This commit is contained in:
2026-03-03 15:23:00 +00:00
parent 5e3726de39
commit 8e223bfbec
3689 changed files with 955330 additions and 1011 deletions

9
node_modules/@hapi/file/lib/index.d.ts generated vendored Executable file
View 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
View 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);
};