Updated the files.

This commit is contained in:
Batuhan Berk Başoğlu 2024-02-08 19:38:41 -05:00
parent 1553e6b971
commit 753967d4f5
23418 changed files with 3784666 additions and 0 deletions

3
my-app/node_modules/tuf-js/dist/utils/tmpfile.d.ts generated vendored Executable file
View file

@ -0,0 +1,3 @@
type TempFileHandler<T> = (file: string) => Promise<T>;
export declare const withTempFile: <T>(handler: TempFileHandler<T>) => Promise<T>;
export {};

25
my-app/node_modules/tuf-js/dist/utils/tmpfile.js generated vendored Executable file
View file

@ -0,0 +1,25 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.withTempFile = void 0;
const promises_1 = __importDefault(require("fs/promises"));
const os_1 = __importDefault(require("os"));
const path_1 = __importDefault(require("path"));
// Invokes the given handler with the path to a temporary file. The file
// is deleted after the handler returns.
const withTempFile = async (handler) => withTempDir(async (dir) => handler(path_1.default.join(dir, 'tempfile')));
exports.withTempFile = withTempFile;
// Invokes the given handler with a temporary directory. The directory is
// deleted after the handler returns.
const withTempDir = async (handler) => {
const tmpDir = await promises_1.default.realpath(os_1.default.tmpdir());
const dir = await promises_1.default.mkdtemp(tmpDir + path_1.default.sep);
try {
return await handler(dir);
}
finally {
await promises_1.default.rm(dir, { force: true, recursive: true, maxRetries: 3 });
}
};

1
my-app/node_modules/tuf-js/dist/utils/url.d.ts generated vendored Executable file
View file

@ -0,0 +1 @@
export declare function join(base: string, path: string): string;

14
my-app/node_modules/tuf-js/dist/utils/url.js generated vendored Executable file
View file

@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.join = void 0;
const url_1 = require("url");
function join(base, path) {
return new url_1.URL(ensureTrailingSlash(base) + removeLeadingSlash(path)).toString();
}
exports.join = join;
function ensureTrailingSlash(path) {
return path.endsWith('/') ? path : path + '/';
}
function removeLeadingSlash(path) {
return path.startsWith('/') ? path.slice(1) : path;
}