tsoa
This commit is contained in:
9
node_modules/@hapi/file/LICENSE.md
generated
vendored
Normal file
9
node_modules/@hapi/file/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
Copyright (c) 2019-2022, Project contributors
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* The names of any contributors may not be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
17
node_modules/@hapi/file/README.md
generated
vendored
Normal file
17
node_modules/@hapi/file/README.md
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<a href="https://hapi.dev"><img src="https://raw.githubusercontent.com/hapijs/assets/master/images/family.png" width="180px" align="right" /></a>
|
||||
|
||||
# @hapi/file
|
||||
|
||||
#### General purpose file utilities.
|
||||
|
||||
**file** is part of the **hapi** ecosystem and was designed to work seamlessly with the [hapi web framework](https://hapi.dev) and its other components (but works great on its own or with other frameworks). If you are using a different web framework and find this module useful, check out [hapi](https://hapi.dev) – they work even better together.
|
||||
|
||||
### Visit the [hapi.dev](https://hapi.dev) Developer Portal for tutorials, documentation, and support
|
||||
|
||||
## Useful resources
|
||||
|
||||
- [Documentation and API](https://hapi.dev/family/file/)
|
||||
- [Versions status](https://hapi.dev/resources/status/#file) (builds, dependencies, node versions, licenses, eol)
|
||||
- [Changelog](https://hapi.dev/family/file/changelog/)
|
||||
- [Project policies](https://hapi.dev/policies/)
|
||||
- [Free and commercial support options](https://hapi.dev/support/)
|
||||
9
node_modules/@hapi/file/lib/index.d.ts
generated
vendored
Executable file
9
node_modules/@hapi/file/lib/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
Generate a random file name within a given path and optional extension.
|
||||
|
||||
@param path - The file path within to generate a temporary file.
|
||||
@param extension - File extension.
|
||||
|
||||
@return The generarted filename.
|
||||
*/
|
||||
export function uniqueFilename(path: string, extension?: string): string;
|
||||
22
node_modules/@hapi/file/lib/index.js
generated
vendored
Executable file
22
node_modules/@hapi/file/lib/index.js
generated
vendored
Executable file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
const Crypto = require('crypto');
|
||||
const Path = require('path');
|
||||
|
||||
|
||||
const internals = {};
|
||||
|
||||
|
||||
exports.uniqueFilename = function (path, extension) {
|
||||
|
||||
if (extension) {
|
||||
extension = extension[0] !== '.' ? '.' + extension : extension;
|
||||
}
|
||||
else {
|
||||
extension = '';
|
||||
}
|
||||
|
||||
path = Path.resolve(path);
|
||||
const name = [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-') + extension;
|
||||
return Path.join(path, name);
|
||||
};
|
||||
33
node_modules/@hapi/file/package.json
generated
vendored
Normal file
33
node_modules/@hapi/file/package.json
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "@hapi/file",
|
||||
"description": "General purpose file utilities",
|
||||
"version": "3.0.0",
|
||||
"repository": "git://github.com/hapijs/file",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"keywords": [
|
||||
"utilities",
|
||||
"file"
|
||||
],
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"plugin:@hapi/module"
|
||||
]
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@hapi/code": "^9.0.0",
|
||||
"@hapi/eslint-plugin": "*",
|
||||
"@hapi/lab": "^25.0.1",
|
||||
"@types/node": "^17.0.36",
|
||||
"typescript": "~4.7.2"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "lab -a @hapi/code -t 100 -L -Y",
|
||||
"test-cov-html": "lab -a @hapi/code -t 100 -L -r html -o coverage.html"
|
||||
},
|
||||
"license": "BSD-3-Clause"
|
||||
}
|
||||
Reference in New Issue
Block a user