Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +22 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/cwd-error.d.ts +8 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/cwd-error.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/cwd-error.js +14 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/cwd-error.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/extract.d.ts +3 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/extract.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/extract.js +49 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/extract.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/get-write-flag.d.ts +2 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/get-write-flag.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/get-write-flag.js +23 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/get-write-flag.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/header.d.ts +54 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/header.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/header.js +279 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/header.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/index.d.ts +20 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/index.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/index.js +20 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/index.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/large-numbers.d.ts +4 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/large-numbers.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/large-numbers.js +94 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/large-numbers.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/list.d.ts +7 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/list.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/list.js +106 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/list.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/make-command.d.ts +49 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/make-command.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/make-command.js +57 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/make-command.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mkdir.d.ts +27 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mkdir.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mkdir.js +201 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mkdir.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mode-fix.d.ts +2 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mode-fix.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mode-fix.js +25 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mode-fix.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-unicode.d.ts +2 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-unicode.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-unicode.js +13 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-unicode.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-windows-path.d.ts +2 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-windows-path.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/options.d.ts +605 -0
.gitattributes
CHANGED
|
@@ -1954,3 +1954,25 @@ platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-c
|
|
| 1954 |
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/monaco-editor/dev/vs/language/typescript/tsWorker.js filter=lfs diff=lfs merge=lfs -text
|
| 1955 |
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/monaco-editor/esm/vs/language/typescript/ts.worker.js filter=lfs diff=lfs merge=lfs -text
|
| 1956 |
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/monaco-editor/min-maps/vs/editor/editor.main.js.map filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1954 |
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/monaco-editor/dev/vs/language/typescript/tsWorker.js filter=lfs diff=lfs merge=lfs -text
|
| 1955 |
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/monaco-editor/esm/vs/language/typescript/ts.worker.js filter=lfs diff=lfs merge=lfs -text
|
| 1956 |
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/monaco-editor/min-maps/vs/editor/editor.main.js.map filter=lfs diff=lfs merge=lfs -text
|
| 1957 |
+
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/elizabeth-repo/archive/data/elizabeth_memory.db filter=lfs diff=lfs merge=lfs -text
|
| 1958 |
+
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/elizabeth-repo/archive/data/nova_memory.db filter=lfs diff=lfs merge=lfs -text
|
| 1959 |
+
platform/dbops/archive/databases_old/data/ignite/wal/node00-d9d63a82-440d-4fb7-81b8-75df16f87609/0000000000000000.wal filter=lfs diff=lfs merge=lfs -text
|
| 1960 |
+
platform/dbops/archive/databases_old/data/ignite/wal/node00-d9d63a82-440d-4fb7-81b8-75df16f87609/0000000000000001.wal filter=lfs diff=lfs merge=lfs -text
|
| 1961 |
+
platform/dbops/archive/databases_old/data/ignite/wal/node00-d9d63a82-440d-4fb7-81b8-75df16f87609/0000000000000002.wal filter=lfs diff=lfs merge=lfs -text
|
| 1962 |
+
platform/dbops/archive/databases_old/data/ignite/wal/node00-d9d63a82-440d-4fb7-81b8-75df16f87609/0000000000000003.wal filter=lfs diff=lfs merge=lfs -text
|
| 1963 |
+
platform/dbops/archive/databases_old/data/ignite/wal/node00-d9d63a82-440d-4fb7-81b8-75df16f87609/0000000000000004.wal filter=lfs diff=lfs merge=lfs -text
|
| 1964 |
+
platform/dbops/archive/databases_old/data/ignite/wal/node00-d9d63a82-440d-4fb7-81b8-75df16f87609/0000000000000005.wal filter=lfs diff=lfs merge=lfs -text
|
| 1965 |
+
platform/dbops/archive/databases_old/data/ignite/wal/node00-d9d63a82-440d-4fb7-81b8-75df16f87609/0000000000000006.wal filter=lfs diff=lfs merge=lfs -text
|
| 1966 |
+
platform/dbops/archive/databases_old/data/ignite/wal/node00-d9d63a82-440d-4fb7-81b8-75df16f87609/0000000000000007.wal filter=lfs diff=lfs merge=lfs -text
|
| 1967 |
+
platform/dbops/archive/databases_old/data/ignite/wal/node00-d9d63a82-440d-4fb7-81b8-75df16f87609/0000000000000008.wal filter=lfs diff=lfs merge=lfs -text
|
| 1968 |
+
platform/dbops/archive/databases_old/data/ignite/wal/node00-d9d63a82-440d-4fb7-81b8-75df16f87609/0000000000000009.wal filter=lfs diff=lfs merge=lfs -text
|
| 1969 |
+
platform/dbops/archive/databases_old/data/mlflow/backend/mlflow.db filter=lfs diff=lfs merge=lfs -text
|
| 1970 |
+
platform/dbops/archive/databases_old/data/mongodb/journal/WiredTigerLog.0000000001 filter=lfs diff=lfs merge=lfs -text
|
| 1971 |
+
platform/dbops/archive/databases_old/data/mongodb/journal/WiredTigerPreplog.0000000001 filter=lfs diff=lfs merge=lfs -text
|
| 1972 |
+
platform/dbops/archive/databases_old/data/pulsar/data/bookkeeper/current/198d9f7e3e6.txn filter=lfs diff=lfs merge=lfs -text
|
| 1973 |
+
platform/dbops/archive/databases_old/data/pulsar/data/bookkeeper/current/198d9f7e3e7.txn filter=lfs diff=lfs merge=lfs -text
|
| 1974 |
+
platform/dbops/archive/databases_old/data/pulsar/data/bookkeeper/current/198d9f7e3e8.txn filter=lfs diff=lfs merge=lfs -text
|
| 1975 |
+
platform/dbops/archive/databases_old/data/pulsar/data/bookkeeper/current/ledgers/000014.log filter=lfs diff=lfs merge=lfs -text
|
| 1976 |
+
platform/dbops/archive/databases_old/data/qdrant/storage/collections/quantum_secure_data/0/wal/open-1 filter=lfs diff=lfs merge=lfs -text
|
| 1977 |
+
platform/dbops/archive/databases_old/data/qdrant/storage/collections/quantum_secure_data/0/wal/open-2 filter=lfs diff=lfs merge=lfs -text
|
| 1978 |
+
platform/dbops/archive/databases_old/data/qdrant/storage/collections/quantum_secure_data/0/segments/0c15fd83-fc15-4628-8473-6494dc8bb4ee/vector_storage/deleted/flags_a.dat filter=lfs diff=lfs merge=lfs -text
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/cwd-error.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export declare class CwdError extends Error {
|
| 2 |
+
path: string;
|
| 3 |
+
code: string;
|
| 4 |
+
syscall: 'chdir';
|
| 5 |
+
constructor(path: string, code: string);
|
| 6 |
+
get name(): string;
|
| 7 |
+
}
|
| 8 |
+
//# sourceMappingURL=cwd-error.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/cwd-error.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"cwd-error.d.ts","sourceRoot":"","sources":["../../src/cwd-error.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAU;gBAEd,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAMtC,IAAI,IAAI,WAEP;CACF"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/cwd-error.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export class CwdError extends Error {
|
| 2 |
+
path;
|
| 3 |
+
code;
|
| 4 |
+
syscall = 'chdir';
|
| 5 |
+
constructor(path, code) {
|
| 6 |
+
super(`${code}: Cannot cd into '${path}'`);
|
| 7 |
+
this.path = path;
|
| 8 |
+
this.code = code;
|
| 9 |
+
}
|
| 10 |
+
get name() {
|
| 11 |
+
return 'CwdError';
|
| 12 |
+
}
|
| 13 |
+
}
|
| 14 |
+
//# sourceMappingURL=cwd-error.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/cwd-error.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"cwd-error.js","sourceRoot":"","sources":["../../src/cwd-error.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,QAAS,SAAQ,KAAK;IACjC,IAAI,CAAQ;IACZ,IAAI,CAAQ;IACZ,OAAO,GAAY,OAAO,CAAA;IAE1B,YAAY,IAAY,EAAE,IAAY;QACpC,KAAK,CAAC,GAAG,IAAI,qBAAqB,IAAI,GAAG,CAAC,CAAA;QAC1C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,UAAU,CAAA;IACnB,CAAC;CACF","sourcesContent":["export class CwdError extends Error {\n path: string\n code: string\n syscall: 'chdir' = 'chdir'\n\n constructor(path: string, code: string) {\n super(`${code}: Cannot cd into '${path}'`)\n this.path = path\n this.code = code\n }\n\n get name() {\n return 'CwdError'\n }\n}\n"]}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/extract.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Unpack, UnpackSync } from './unpack.js';
|
| 2 |
+
export declare const extract: import("./make-command.js").TarCommand<Unpack, UnpackSync>;
|
| 3 |
+
//# sourceMappingURL=extract.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/extract.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../src/extract.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AA2ChD,eAAO,MAAM,OAAO,4DAQnB,CAAA"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/extract.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// tar -x
|
| 2 |
+
import * as fsm from '@isaacs/fs-minipass';
|
| 3 |
+
import fs from 'node:fs';
|
| 4 |
+
import { filesFilter } from './list.js';
|
| 5 |
+
import { makeCommand } from './make-command.js';
|
| 6 |
+
import { Unpack, UnpackSync } from './unpack.js';
|
| 7 |
+
const extractFileSync = (opt) => {
|
| 8 |
+
const u = new UnpackSync(opt);
|
| 9 |
+
const file = opt.file;
|
| 10 |
+
const stat = fs.statSync(file);
|
| 11 |
+
// This trades a zero-byte read() syscall for a stat
|
| 12 |
+
// However, it will usually result in less memory allocation
|
| 13 |
+
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
|
| 14 |
+
const stream = new fsm.ReadStreamSync(file, {
|
| 15 |
+
readSize: readSize,
|
| 16 |
+
size: stat.size,
|
| 17 |
+
});
|
| 18 |
+
stream.pipe(u);
|
| 19 |
+
};
|
| 20 |
+
const extractFile = (opt, _) => {
|
| 21 |
+
const u = new Unpack(opt);
|
| 22 |
+
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
|
| 23 |
+
const file = opt.file;
|
| 24 |
+
const p = new Promise((resolve, reject) => {
|
| 25 |
+
u.on('error', reject);
|
| 26 |
+
u.on('close', resolve);
|
| 27 |
+
// This trades a zero-byte read() syscall for a stat
|
| 28 |
+
// However, it will usually result in less memory allocation
|
| 29 |
+
fs.stat(file, (er, stat) => {
|
| 30 |
+
if (er) {
|
| 31 |
+
reject(er);
|
| 32 |
+
}
|
| 33 |
+
else {
|
| 34 |
+
const stream = new fsm.ReadStream(file, {
|
| 35 |
+
readSize: readSize,
|
| 36 |
+
size: stat.size,
|
| 37 |
+
});
|
| 38 |
+
stream.on('error', reject);
|
| 39 |
+
stream.pipe(u);
|
| 40 |
+
}
|
| 41 |
+
});
|
| 42 |
+
});
|
| 43 |
+
return p;
|
| 44 |
+
};
|
| 45 |
+
export const extract = makeCommand(extractFileSync, extractFile, opt => new UnpackSync(opt), opt => new Unpack(opt), (opt, files) => {
|
| 46 |
+
if (files?.length)
|
| 47 |
+
filesFilter(opt, files);
|
| 48 |
+
});
|
| 49 |
+
//# sourceMappingURL=extract.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/extract.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../src/extract.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CA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C,EAAE,CAAC,CAAA;YACZ,CAAC;iBAAM,CAAC;gBACN,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE;oBACtC,QAAQ,EAAE,QAAQ;oBAClB,IAAI,EAAE,IAAI,CAAC,IAAI;iBAChB,CAAC,CAAA;gBACF,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;gBAC1B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YAChB,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IACF,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAChC,eAAe,EACf,WAAW,EACX,GAAG,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,EAC1B,GAAG,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,EACtB,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;IACb,IAAI,KAAK,EAAE,MAAM;QAAE,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;AAC5C,CAAC,CACF,CAAA","sourcesContent":["// tar -x\nimport * as fsm from '@isaacs/fs-minipass'\nimport fs from 'node:fs'\nimport { filesFilter } from './list.js'\nimport { makeCommand } from './make-command.js'\nimport { TarOptionsFile, TarOptionsSyncFile } from './options.js'\nimport { Unpack, UnpackSync } from './unpack.js'\n\nconst extractFileSync = (opt: TarOptionsSyncFile) => {\n const u = new UnpackSync(opt)\n const file = opt.file\n const stat = fs.statSync(file)\n // This trades a zero-byte read() syscall for a stat\n // However, it will usually result in less memory allocation\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n const stream = new fsm.ReadStreamSync(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.pipe(u)\n}\n\nconst extractFile = (opt: TarOptionsFile, _?: string[]) => {\n const u = new Unpack(opt)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n\n const file = opt.file\n const p = new Promise<void>((resolve, reject) => {\n u.on('error', reject)\n u.on('close', resolve)\n\n // This trades a zero-byte read() syscall for a stat\n // However, it will usually result in less memory allocation\n fs.stat(file, (er, stat) => {\n if (er) {\n reject(er)\n } else {\n const stream = new fsm.ReadStream(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.on('error', reject)\n stream.pipe(u)\n }\n })\n })\n return p\n}\n\nexport const extract = makeCommand<Unpack, UnpackSync>(\n extractFileSync,\n extractFile,\n opt => new UnpackSync(opt),\n opt => new Unpack(opt),\n (opt, files) => {\n if (files?.length) filesFilter(opt, files)\n },\n)\n"]}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/get-write-flag.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export declare const getWriteFlag: (() => string) | ((size: number) => number | "w");
|
| 2 |
+
//# sourceMappingURL=get-write-flag.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/get-write-flag.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"get-write-flag.d.ts","sourceRoot":"","sources":["../../src/get-write-flag.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,YAAY,2BAGd,MAAM,kBAAwC,CAAA"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/get-write-flag.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Get the appropriate flag to use for creating files
|
| 2 |
+
// We use fmap on Windows platforms for files less than
|
| 3 |
+
// 512kb. This is a fairly low limit, but avoids making
|
| 4 |
+
// things slower in some cases. Since most of what this
|
| 5 |
+
// library is used for is extracting tarballs of many
|
| 6 |
+
// relatively small files in npm packages and the like,
|
| 7 |
+
// it can be a big boost on Windows platforms.
|
| 8 |
+
import fs from 'fs';
|
| 9 |
+
const platform = process.env.__FAKE_PLATFORM__ || process.platform;
|
| 10 |
+
const isWindows = platform === 'win32';
|
| 11 |
+
/* c8 ignore start */
|
| 12 |
+
const { O_CREAT, O_TRUNC, O_WRONLY } = fs.constants;
|
| 13 |
+
const UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) ||
|
| 14 |
+
fs.constants.UV_FS_O_FILEMAP ||
|
| 15 |
+
0;
|
| 16 |
+
/* c8 ignore stop */
|
| 17 |
+
const fMapEnabled = isWindows && !!UV_FS_O_FILEMAP;
|
| 18 |
+
const fMapLimit = 512 * 1024;
|
| 19 |
+
const fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY;
|
| 20 |
+
export const getWriteFlag = !fMapEnabled ?
|
| 21 |
+
() => 'w'
|
| 22 |
+
: (size) => (size < fMapLimit ? fMapFlag : 'w');
|
| 23 |
+
//# sourceMappingURL=get-write-flag.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/get-write-flag.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"get-write-flag.js","sourceRoot":"","sources":["../../src/get-write-flag.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,uDAAuD;AACvD,wDAAwD;AACxD,wDAAwD;AACxD,qDAAqD;AACrD,uDAAuD;AACvD,8CAA8C;AAE9C,OAAO,EAAE,MAAM,IAAI,CAAA;AAEnB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAClE,MAAM,SAAS,GAAG,QAAQ,KAAK,OAAO,CAAA;AAEtC,qBAAqB;AACrB,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,SAAS,CAAA;AACnD,MAAM,eAAe,GACnB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;IAC1C,EAAE,CAAC,SAAS,CAAC,eAAe;IAC5B,CAAC,CAAA;AACH,oBAAoB;AAEpB,MAAM,WAAW,GAAG,SAAS,IAAI,CAAC,CAAC,eAAe,CAAA;AAClD,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI,CAAA;AAC5B,MAAM,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAC/D,MAAM,CAAC,MAAM,YAAY,GACvB,CAAC,WAAW,CAAC,CAAC;IACZ,GAAG,EAAE,CAAC,GAAG;IACX,CAAC,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA","sourcesContent":["// Get the appropriate flag to use for creating files\n// We use fmap on Windows platforms for files less than\n// 512kb. This is a fairly low limit, but avoids making\n// things slower in some cases. Since most of what this\n// library is used for is extracting tarballs of many\n// relatively small files in npm packages and the like,\n// it can be a big boost on Windows platforms.\n\nimport fs from 'fs'\n\nconst platform = process.env.__FAKE_PLATFORM__ || process.platform\nconst isWindows = platform === 'win32'\n\n/* c8 ignore start */\nconst { O_CREAT, O_TRUNC, O_WRONLY } = fs.constants\nconst UV_FS_O_FILEMAP =\n Number(process.env.__FAKE_FS_O_FILENAME__) ||\n fs.constants.UV_FS_O_FILEMAP ||\n 0\n/* c8 ignore stop */\n\nconst fMapEnabled = isWindows && !!UV_FS_O_FILEMAP\nconst fMapLimit = 512 * 1024\nconst fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY\nexport const getWriteFlag =\n !fMapEnabled ?\n () => 'w'\n : (size: number) => (size < fMapLimit ? fMapFlag : 'w')\n"]}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/header.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/// <reference types="node" resolution-mode="require"/>
|
| 2 |
+
import type { EntryTypeCode, EntryTypeName } from './types.js';
|
| 3 |
+
export type HeaderData = {
|
| 4 |
+
path?: string;
|
| 5 |
+
mode?: number;
|
| 6 |
+
uid?: number;
|
| 7 |
+
gid?: number;
|
| 8 |
+
size?: number;
|
| 9 |
+
cksum?: number;
|
| 10 |
+
type?: EntryTypeName | 'Unsupported';
|
| 11 |
+
linkpath?: string;
|
| 12 |
+
uname?: string;
|
| 13 |
+
gname?: string;
|
| 14 |
+
devmaj?: number;
|
| 15 |
+
devmin?: number;
|
| 16 |
+
atime?: Date;
|
| 17 |
+
ctime?: Date;
|
| 18 |
+
mtime?: Date;
|
| 19 |
+
charset?: string;
|
| 20 |
+
comment?: string;
|
| 21 |
+
dev?: number;
|
| 22 |
+
ino?: number;
|
| 23 |
+
nlink?: number;
|
| 24 |
+
};
|
| 25 |
+
export declare class Header implements HeaderData {
|
| 26 |
+
#private;
|
| 27 |
+
cksumValid: boolean;
|
| 28 |
+
needPax: boolean;
|
| 29 |
+
nullBlock: boolean;
|
| 30 |
+
block?: Buffer;
|
| 31 |
+
path?: string;
|
| 32 |
+
mode?: number;
|
| 33 |
+
uid?: number;
|
| 34 |
+
gid?: number;
|
| 35 |
+
size?: number;
|
| 36 |
+
cksum?: number;
|
| 37 |
+
linkpath?: string;
|
| 38 |
+
uname?: string;
|
| 39 |
+
gname?: string;
|
| 40 |
+
devmaj: number;
|
| 41 |
+
devmin: number;
|
| 42 |
+
atime?: Date;
|
| 43 |
+
ctime?: Date;
|
| 44 |
+
mtime?: Date;
|
| 45 |
+
charset?: string;
|
| 46 |
+
comment?: string;
|
| 47 |
+
constructor(data?: Buffer | HeaderData, off?: number, ex?: HeaderData, gex?: HeaderData);
|
| 48 |
+
decode(buf: Buffer, off: number, ex?: HeaderData, gex?: HeaderData): void;
|
| 49 |
+
encode(buf?: Buffer, off?: number): boolean;
|
| 50 |
+
get type(): EntryTypeName;
|
| 51 |
+
get typeKey(): EntryTypeCode | 'Unsupported';
|
| 52 |
+
set type(type: EntryTypeCode | EntryTypeName | 'Unsupported');
|
| 53 |
+
}
|
| 54 |
+
//# sourceMappingURL=header.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/header.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/header.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG9D,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// parse a 512-byte header block to a data object, or vice-versa
|
| 2 |
+
// encode returns `true` if a pax extended header is needed, because
|
| 3 |
+
// the data could not be faithfully encoded in a simple header.
|
| 4 |
+
// (Also, check header.needPax to see if it needs a pax header.)
|
| 5 |
+
import { posix as pathModule } from 'node:path';
|
| 6 |
+
import * as large from './large-numbers.js';
|
| 7 |
+
import * as types from './types.js';
|
| 8 |
+
export class Header {
|
| 9 |
+
cksumValid = false;
|
| 10 |
+
needPax = false;
|
| 11 |
+
nullBlock = false;
|
| 12 |
+
block;
|
| 13 |
+
path;
|
| 14 |
+
mode;
|
| 15 |
+
uid;
|
| 16 |
+
gid;
|
| 17 |
+
size;
|
| 18 |
+
cksum;
|
| 19 |
+
#type = 'Unsupported';
|
| 20 |
+
linkpath;
|
| 21 |
+
uname;
|
| 22 |
+
gname;
|
| 23 |
+
devmaj = 0;
|
| 24 |
+
devmin = 0;
|
| 25 |
+
atime;
|
| 26 |
+
ctime;
|
| 27 |
+
mtime;
|
| 28 |
+
charset;
|
| 29 |
+
comment;
|
| 30 |
+
constructor(data, off = 0, ex, gex) {
|
| 31 |
+
if (Buffer.isBuffer(data)) {
|
| 32 |
+
this.decode(data, off || 0, ex, gex);
|
| 33 |
+
}
|
| 34 |
+
else if (data) {
|
| 35 |
+
this.#slurp(data);
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
decode(buf, off, ex, gex) {
|
| 39 |
+
if (!off) {
|
| 40 |
+
off = 0;
|
| 41 |
+
}
|
| 42 |
+
if (!buf || !(buf.length >= off + 512)) {
|
| 43 |
+
throw new Error('need 512 bytes for header');
|
| 44 |
+
}
|
| 45 |
+
this.path = decString(buf, off, 100);
|
| 46 |
+
this.mode = decNumber(buf, off + 100, 8);
|
| 47 |
+
this.uid = decNumber(buf, off + 108, 8);
|
| 48 |
+
this.gid = decNumber(buf, off + 116, 8);
|
| 49 |
+
this.size = decNumber(buf, off + 124, 12);
|
| 50 |
+
this.mtime = decDate(buf, off + 136, 12);
|
| 51 |
+
this.cksum = decNumber(buf, off + 148, 12);
|
| 52 |
+
// if we have extended or global extended headers, apply them now
|
| 53 |
+
// See https://github.com/npm/node-tar/pull/187
|
| 54 |
+
// Apply global before local, so it overrides
|
| 55 |
+
if (gex)
|
| 56 |
+
this.#slurp(gex, true);
|
| 57 |
+
if (ex)
|
| 58 |
+
this.#slurp(ex);
|
| 59 |
+
// old tar versions marked dirs as a file with a trailing /
|
| 60 |
+
const t = decString(buf, off + 156, 1);
|
| 61 |
+
if (types.isCode(t)) {
|
| 62 |
+
this.#type = t || '0';
|
| 63 |
+
}
|
| 64 |
+
if (this.#type === '0' && this.path.slice(-1) === '/') {
|
| 65 |
+
this.#type = '5';
|
| 66 |
+
}
|
| 67 |
+
// tar implementations sometimes incorrectly put the stat(dir).size
|
| 68 |
+
// as the size in the tarball, even though Directory entries are
|
| 69 |
+
// not able to have any body at all. In the very rare chance that
|
| 70 |
+
// it actually DOES have a body, we weren't going to do anything with
|
| 71 |
+
// it anyway, and it'll just be a warning about an invalid header.
|
| 72 |
+
if (this.#type === '5') {
|
| 73 |
+
this.size = 0;
|
| 74 |
+
}
|
| 75 |
+
this.linkpath = decString(buf, off + 157, 100);
|
| 76 |
+
if (buf.subarray(off + 257, off + 265).toString() ===
|
| 77 |
+
'ustar\u000000') {
|
| 78 |
+
this.uname = decString(buf, off + 265, 32);
|
| 79 |
+
this.gname = decString(buf, off + 297, 32);
|
| 80 |
+
/* c8 ignore start */
|
| 81 |
+
this.devmaj = decNumber(buf, off + 329, 8) ?? 0;
|
| 82 |
+
this.devmin = decNumber(buf, off + 337, 8) ?? 0;
|
| 83 |
+
/* c8 ignore stop */
|
| 84 |
+
if (buf[off + 475] !== 0) {
|
| 85 |
+
// definitely a prefix, definitely >130 chars.
|
| 86 |
+
const prefix = decString(buf, off + 345, 155);
|
| 87 |
+
this.path = prefix + '/' + this.path;
|
| 88 |
+
}
|
| 89 |
+
else {
|
| 90 |
+
const prefix = decString(buf, off + 345, 130);
|
| 91 |
+
if (prefix) {
|
| 92 |
+
this.path = prefix + '/' + this.path;
|
| 93 |
+
}
|
| 94 |
+
this.atime = decDate(buf, off + 476, 12);
|
| 95 |
+
this.ctime = decDate(buf, off + 488, 12);
|
| 96 |
+
}
|
| 97 |
+
}
|
| 98 |
+
let sum = 8 * 0x20;
|
| 99 |
+
for (let i = off; i < off + 148; i++) {
|
| 100 |
+
sum += buf[i];
|
| 101 |
+
}
|
| 102 |
+
for (let i = off + 156; i < off + 512; i++) {
|
| 103 |
+
sum += buf[i];
|
| 104 |
+
}
|
| 105 |
+
this.cksumValid = sum === this.cksum;
|
| 106 |
+
if (this.cksum === undefined && sum === 8 * 0x20) {
|
| 107 |
+
this.nullBlock = true;
|
| 108 |
+
}
|
| 109 |
+
}
|
| 110 |
+
#slurp(ex, gex = false) {
|
| 111 |
+
Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => {
|
| 112 |
+
// we slurp in everything except for the path attribute in
|
| 113 |
+
// a global extended header, because that's weird. Also, any
|
| 114 |
+
// null/undefined values are ignored.
|
| 115 |
+
return !(v === null ||
|
| 116 |
+
v === undefined ||
|
| 117 |
+
(k === 'path' && gex) ||
|
| 118 |
+
(k === 'linkpath' && gex) ||
|
| 119 |
+
k === 'global');
|
| 120 |
+
})));
|
| 121 |
+
}
|
| 122 |
+
encode(buf, off = 0) {
|
| 123 |
+
if (!buf) {
|
| 124 |
+
buf = this.block = Buffer.alloc(512);
|
| 125 |
+
}
|
| 126 |
+
if (this.#type === 'Unsupported') {
|
| 127 |
+
this.#type = '0';
|
| 128 |
+
}
|
| 129 |
+
if (!(buf.length >= off + 512)) {
|
| 130 |
+
throw new Error('need 512 bytes for header');
|
| 131 |
+
}
|
| 132 |
+
const prefixSize = this.ctime || this.atime ? 130 : 155;
|
| 133 |
+
const split = splitPrefix(this.path || '', prefixSize);
|
| 134 |
+
const path = split[0];
|
| 135 |
+
const prefix = split[1];
|
| 136 |
+
this.needPax = !!split[2];
|
| 137 |
+
this.needPax = encString(buf, off, 100, path) || this.needPax;
|
| 138 |
+
this.needPax =
|
| 139 |
+
encNumber(buf, off + 100, 8, this.mode) || this.needPax;
|
| 140 |
+
this.needPax =
|
| 141 |
+
encNumber(buf, off + 108, 8, this.uid) || this.needPax;
|
| 142 |
+
this.needPax =
|
| 143 |
+
encNumber(buf, off + 116, 8, this.gid) || this.needPax;
|
| 144 |
+
this.needPax =
|
| 145 |
+
encNumber(buf, off + 124, 12, this.size) || this.needPax;
|
| 146 |
+
this.needPax =
|
| 147 |
+
encDate(buf, off + 136, 12, this.mtime) || this.needPax;
|
| 148 |
+
buf[off + 156] = this.#type.charCodeAt(0);
|
| 149 |
+
this.needPax =
|
| 150 |
+
encString(buf, off + 157, 100, this.linkpath) || this.needPax;
|
| 151 |
+
buf.write('ustar\u000000', off + 257, 8);
|
| 152 |
+
this.needPax =
|
| 153 |
+
encString(buf, off + 265, 32, this.uname) || this.needPax;
|
| 154 |
+
this.needPax =
|
| 155 |
+
encString(buf, off + 297, 32, this.gname) || this.needPax;
|
| 156 |
+
this.needPax =
|
| 157 |
+
encNumber(buf, off + 329, 8, this.devmaj) || this.needPax;
|
| 158 |
+
this.needPax =
|
| 159 |
+
encNumber(buf, off + 337, 8, this.devmin) || this.needPax;
|
| 160 |
+
this.needPax =
|
| 161 |
+
encString(buf, off + 345, prefixSize, prefix) || this.needPax;
|
| 162 |
+
if (buf[off + 475] !== 0) {
|
| 163 |
+
this.needPax =
|
| 164 |
+
encString(buf, off + 345, 155, prefix) || this.needPax;
|
| 165 |
+
}
|
| 166 |
+
else {
|
| 167 |
+
this.needPax =
|
| 168 |
+
encString(buf, off + 345, 130, prefix) || this.needPax;
|
| 169 |
+
this.needPax =
|
| 170 |
+
encDate(buf, off + 476, 12, this.atime) || this.needPax;
|
| 171 |
+
this.needPax =
|
| 172 |
+
encDate(buf, off + 488, 12, this.ctime) || this.needPax;
|
| 173 |
+
}
|
| 174 |
+
let sum = 8 * 0x20;
|
| 175 |
+
for (let i = off; i < off + 148; i++) {
|
| 176 |
+
sum += buf[i];
|
| 177 |
+
}
|
| 178 |
+
for (let i = off + 156; i < off + 512; i++) {
|
| 179 |
+
sum += buf[i];
|
| 180 |
+
}
|
| 181 |
+
this.cksum = sum;
|
| 182 |
+
encNumber(buf, off + 148, 8, this.cksum);
|
| 183 |
+
this.cksumValid = true;
|
| 184 |
+
return this.needPax;
|
| 185 |
+
}
|
| 186 |
+
get type() {
|
| 187 |
+
return (this.#type === 'Unsupported' ?
|
| 188 |
+
this.#type
|
| 189 |
+
: types.name.get(this.#type));
|
| 190 |
+
}
|
| 191 |
+
get typeKey() {
|
| 192 |
+
return this.#type;
|
| 193 |
+
}
|
| 194 |
+
set type(type) {
|
| 195 |
+
const c = String(types.code.get(type));
|
| 196 |
+
if (types.isCode(c) || c === 'Unsupported') {
|
| 197 |
+
this.#type = c;
|
| 198 |
+
}
|
| 199 |
+
else if (types.isCode(type)) {
|
| 200 |
+
this.#type = type;
|
| 201 |
+
}
|
| 202 |
+
else {
|
| 203 |
+
throw new TypeError('invalid entry type: ' + type);
|
| 204 |
+
}
|
| 205 |
+
}
|
| 206 |
+
}
|
| 207 |
+
const splitPrefix = (p, prefixSize) => {
|
| 208 |
+
const pathSize = 100;
|
| 209 |
+
let pp = p;
|
| 210 |
+
let prefix = '';
|
| 211 |
+
let ret = undefined;
|
| 212 |
+
const root = pathModule.parse(p).root || '.';
|
| 213 |
+
if (Buffer.byteLength(pp) < pathSize) {
|
| 214 |
+
ret = [pp, prefix, false];
|
| 215 |
+
}
|
| 216 |
+
else {
|
| 217 |
+
// first set prefix to the dir, and path to the base
|
| 218 |
+
prefix = pathModule.dirname(pp);
|
| 219 |
+
pp = pathModule.basename(pp);
|
| 220 |
+
do {
|
| 221 |
+
if (Buffer.byteLength(pp) <= pathSize &&
|
| 222 |
+
Buffer.byteLength(prefix) <= prefixSize) {
|
| 223 |
+
// both fit!
|
| 224 |
+
ret = [pp, prefix, false];
|
| 225 |
+
}
|
| 226 |
+
else if (Buffer.byteLength(pp) > pathSize &&
|
| 227 |
+
Buffer.byteLength(prefix) <= prefixSize) {
|
| 228 |
+
// prefix fits in prefix, but path doesn't fit in path
|
| 229 |
+
ret = [pp.slice(0, pathSize - 1), prefix, true];
|
| 230 |
+
}
|
| 231 |
+
else {
|
| 232 |
+
// make path take a bit from prefix
|
| 233 |
+
pp = pathModule.join(pathModule.basename(prefix), pp);
|
| 234 |
+
prefix = pathModule.dirname(prefix);
|
| 235 |
+
}
|
| 236 |
+
} while (prefix !== root && ret === undefined);
|
| 237 |
+
// at this point, found no resolution, just truncate
|
| 238 |
+
if (!ret) {
|
| 239 |
+
ret = [p.slice(0, pathSize - 1), '', true];
|
| 240 |
+
}
|
| 241 |
+
}
|
| 242 |
+
return ret;
|
| 243 |
+
};
|
| 244 |
+
const decString = (buf, off, size) => buf
|
| 245 |
+
.subarray(off, off + size)
|
| 246 |
+
.toString('utf8')
|
| 247 |
+
.replace(/\0.*/, '');
|
| 248 |
+
const decDate = (buf, off, size) => numToDate(decNumber(buf, off, size));
|
| 249 |
+
const numToDate = (num) => num === undefined ? undefined : new Date(num * 1000);
|
| 250 |
+
const decNumber = (buf, off, size) => Number(buf[off]) & 0x80 ?
|
| 251 |
+
large.parse(buf.subarray(off, off + size))
|
| 252 |
+
: decSmallNumber(buf, off, size);
|
| 253 |
+
const nanUndef = (value) => (isNaN(value) ? undefined : value);
|
| 254 |
+
const decSmallNumber = (buf, off, size) => nanUndef(parseInt(buf
|
| 255 |
+
.subarray(off, off + size)
|
| 256 |
+
.toString('utf8')
|
| 257 |
+
.replace(/\0.*$/, '')
|
| 258 |
+
.trim(), 8));
|
| 259 |
+
// the maximum encodable as a null-terminated octal, by field size
|
| 260 |
+
const MAXNUM = {
|
| 261 |
+
12: 0o77777777777,
|
| 262 |
+
8: 0o7777777,
|
| 263 |
+
};
|
| 264 |
+
const encNumber = (buf, off, size, num) => num === undefined ? false
|
| 265 |
+
: num > MAXNUM[size] || num < 0 ?
|
| 266 |
+
(large.encode(num, buf.subarray(off, off + size)), true)
|
| 267 |
+
: (encSmallNumber(buf, off, size, num), false);
|
| 268 |
+
const encSmallNumber = (buf, off, size, num) => buf.write(octalString(num, size), off, size, 'ascii');
|
| 269 |
+
const octalString = (num, size) => padOctal(Math.floor(num).toString(8), size);
|
| 270 |
+
const padOctal = (str, size) => (str.length === size - 1 ?
|
| 271 |
+
str
|
| 272 |
+
: new Array(size - str.length - 1).join('0') + str + ' ') + '\0';
|
| 273 |
+
const encDate = (buf, off, size, date) => date === undefined ? false : (encNumber(buf, off, size, date.getTime() / 1000));
|
| 274 |
+
// enough to fill the longest string we've got
|
| 275 |
+
const NULLS = new Array(156).join('\0');
|
| 276 |
+
// pad with nulls, return true if it's longer or non-ascii
|
| 277 |
+
const encString = (buf, off, size, str) => str === undefined ? false : ((buf.write(str + NULLS, off, size, 'utf8'),
|
| 278 |
+
str.length !== Buffer.byteLength(str) || str.length > size));
|
| 279 |
+
//# sourceMappingURL=header.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/header.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/header.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,oEAAoE;AACpE,+DAA+D;AAC/D,gEAAgE;AAEhE,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAA;AAE3C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AA4BnC,MAAM,OAAO,MAAM;IACjB,UAAU,GAAY,KAAK,CAAA;IAC3B,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AAC,GAAW,EAAE,IAAY,EAAE,EAAE,CAC7C,CAAC,GAAG,CAAC,MAAM,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC;IACxB,GAAG;IACL,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAA;AAElE,MAAM,OAAO,GAAG,CACd,GAAW,EACX,GAAW,EACX,IAAY,EACZ,IAAW,EACX,EAAE,CACF,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC3B,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CACjD,CAAA;AAEH,8CAA8C;AAC9C,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACvC,0DAA0D;AAC1D,MAAM,SAAS,GAAG,CAChB,GAAW,EACX,GAAW,EACX,IAAY,EACZ,GAAY,EACZ,EAAE,CACF,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC1B,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC;IAC1C,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAC5D,CAAA","sourcesContent":["// parse a 512-byte header block to a data object, or vice-versa\n// encode returns `true` if a pax extended header is needed, because\n// the data could not be faithfully encoded in a simple header.\n// (Also, check header.needPax to see if it needs a pax header.)\n\nimport { posix as pathModule } from 'node:path'\nimport * as large from './large-numbers.js'\nimport type { EntryTypeCode, EntryTypeName } from './types.js'\nimport * as types from './types.js'\n\nexport type HeaderData = {\n path?: string\n mode?: number\n uid?: number\n gid?: number\n size?: number\n cksum?: number\n type?: EntryTypeName | 'Unsupported'\n linkpath?: string\n uname?: string\n gname?: string\n devmaj?: number\n devmin?: number\n atime?: Date\n ctime?: Date\n mtime?: Date\n\n // fields that are common in extended PAX headers, but not in the\n // \"standard\" tar header block\n charset?: string\n comment?: string\n dev?: number\n ino?: number\n nlink?: number\n}\n\nexport class Header implements HeaderData {\n cksumValid: boolean = false\n needPax: boolean = false\n nullBlock: boolean = false\n\n block?: Buffer\n path?: string\n mode?: number\n uid?: number\n gid?: number\n size?: number\n cksum?: number\n #type: EntryTypeCode | 'Unsupported' = 'Unsupported'\n linkpath?: string\n uname?: string\n gname?: string\n devmaj: number = 0\n devmin: number = 0\n atime?: Date\n ctime?: Date\n mtime?: Date\n\n charset?: string\n comment?: string\n\n constructor(\n data?: Buffer | HeaderData,\n off: number = 0,\n ex?: HeaderData,\n gex?: HeaderData,\n ) {\n if (Buffer.isBuffer(data)) {\n this.decode(data, off || 0, ex, gex)\n } else if (data) {\n this.#slurp(data)\n }\n }\n\n decode(\n buf: Buffer,\n off: number,\n ex?: HeaderData,\n gex?: HeaderData,\n ) {\n if (!off) {\n off = 0\n }\n\n if (!buf || !(buf.length >= off + 512)) {\n throw new Error('need 512 bytes for header')\n }\n\n this.path = decString(buf, off, 100)\n this.mode = decNumber(buf, off + 100, 8)\n this.uid = decNumber(buf, off + 108, 8)\n this.gid = decNumber(buf, off + 116, 8)\n this.size = decNumber(buf, off + 124, 12)\n this.mtime = decDate(buf, off + 136, 12)\n this.cksum = decNumber(buf, off + 148, 12)\n\n // if we have extended or global extended headers, apply them now\n // See https://github.com/npm/node-tar/pull/187\n // Apply global before local, so it overrides\n if (gex) this.#slurp(gex, true)\n if (ex) this.#slurp(ex)\n\n // old tar versions marked dirs as a file with a trailing /\n const t = decString(buf, off + 156, 1)\n if (types.isCode(t)) {\n this.#type = t || '0'\n }\n if (this.#type === '0' && this.path.slice(-1) === '/') {\n this.#type = '5'\n }\n\n // tar implementations sometimes incorrectly put the stat(dir).size\n // as the size in the tarball, even though Directory entries are\n // not able to have any body at all. In the very rare chance that\n // it actually DOES have a body, we weren't going to do anything with\n // it anyway, and it'll just be a warning about an invalid header.\n if (this.#type === '5') {\n this.size = 0\n }\n\n this.linkpath = decString(buf, off + 157, 100)\n if (\n buf.subarray(off + 257, off + 265).toString() ===\n 'ustar\\u000000'\n ) {\n this.uname = decString(buf, off + 265, 32)\n this.gname = decString(buf, off + 297, 32)\n /* c8 ignore start */\n this.devmaj = decNumber(buf, off + 329, 8) ?? 0\n this.devmin = decNumber(buf, off + 337, 8) ?? 0\n /* c8 ignore stop */\n if (buf[off + 475] !== 0) {\n // definitely a prefix, definitely >130 chars.\n const prefix = decString(buf, off + 345, 155)\n this.path = prefix + '/' + this.path\n } else {\n const prefix = decString(buf, off + 345, 130)\n if (prefix) {\n this.path = prefix + '/' + this.path\n }\n this.atime = decDate(buf, off + 476, 12)\n this.ctime = decDate(buf, off + 488, 12)\n }\n }\n\n let sum = 8 * 0x20\n for (let i = off; i < off + 148; i++) {\n sum += buf[i] as number\n }\n\n for (let i = off + 156; i < off + 512; i++) {\n sum += buf[i] as number\n }\n\n this.cksumValid = sum === this.cksum\n if (this.cksum === undefined && sum === 8 * 0x20) {\n this.nullBlock = true\n }\n }\n\n #slurp(ex: HeaderData, gex: boolean = false) {\n Object.assign(\n this,\n Object.fromEntries(\n Object.entries(ex).filter(([k, v]) => {\n // we slurp in everything except for the path attribute in\n // a global extended header, because that's weird. Also, any\n // null/undefined values are ignored.\n return !(\n v === null ||\n v === undefined ||\n (k === 'path' && gex) ||\n (k === 'linkpath' && gex) ||\n k === 'global'\n )\n }),\n ),\n )\n }\n\n encode(buf?: Buffer, off: number = 0) {\n if (!buf) {\n buf = this.block = Buffer.alloc(512)\n }\n\n if (this.#type === 'Unsupported') {\n this.#type = '0'\n }\n\n if (!(buf.length >= off + 512)) {\n throw new Error('need 512 bytes for header')\n }\n\n const prefixSize = this.ctime || this.atime ? 130 : 155\n const split = splitPrefix(this.path || '', prefixSize)\n const path = split[0]\n const prefix = split[1]\n this.needPax = !!split[2]\n\n this.needPax = encString(buf, off, 100, path) || this.needPax\n this.needPax =\n encNumber(buf, off + 100, 8, this.mode) || this.needPax\n this.needPax =\n encNumber(buf, off + 108, 8, this.uid) || this.needPax\n this.needPax =\n encNumber(buf, off + 116, 8, this.gid) || this.needPax\n this.needPax =\n encNumber(buf, off + 124, 12, this.size) || this.needPax\n this.needPax =\n encDate(buf, off + 136, 12, this.mtime) || this.needPax\n buf[off + 156] = this.#type.charCodeAt(0)\n this.needPax =\n encString(buf, off + 157, 100, this.linkpath) || this.needPax\n buf.write('ustar\\u000000', off + 257, 8)\n this.needPax =\n encString(buf, off + 265, 32, this.uname) || this.needPax\n this.needPax =\n encString(buf, off + 297, 32, this.gname) || this.needPax\n this.needPax =\n encNumber(buf, off + 329, 8, this.devmaj) || this.needPax\n this.needPax =\n encNumber(buf, off + 337, 8, this.devmin) || this.needPax\n this.needPax =\n encString(buf, off + 345, prefixSize, prefix) || this.needPax\n if (buf[off + 475] !== 0) {\n this.needPax =\n encString(buf, off + 345, 155, prefix) || this.needPax\n } else {\n this.needPax =\n encString(buf, off + 345, 130, prefix) || this.needPax\n this.needPax =\n encDate(buf, off + 476, 12, this.atime) || this.needPax\n this.needPax =\n encDate(buf, off + 488, 12, this.ctime) || this.needPax\n }\n\n let sum = 8 * 0x20\n for (let i = off; i < off + 148; i++) {\n sum += buf[i] as number\n }\n\n for (let i = off + 156; i < off + 512; i++) {\n sum += buf[i] as number\n }\n\n this.cksum = sum\n encNumber(buf, off + 148, 8, this.cksum)\n this.cksumValid = true\n\n return this.needPax\n }\n\n get type(): EntryTypeName {\n return (\n this.#type === 'Unsupported' ?\n this.#type\n : types.name.get(this.#type)) as EntryTypeName\n }\n\n get typeKey(): EntryTypeCode | 'Unsupported' {\n return this.#type\n }\n\n set type(type: EntryTypeCode | EntryTypeName | 'Unsupported') {\n const c = String(types.code.get(type as EntryTypeName))\n if (types.isCode(c) || c === 'Unsupported') {\n this.#type = c\n } else if (types.isCode(type)) {\n this.#type = type\n } else {\n throw new TypeError('invalid entry type: ' + type)\n }\n }\n}\n\nconst splitPrefix = (\n p: string,\n prefixSize: number,\n): [string, string, boolean] => {\n const pathSize = 100\n let pp = p\n let prefix = ''\n let ret: undefined | [string, string, boolean] = undefined\n const root = pathModule.parse(p).root || '.'\n\n if (Buffer.byteLength(pp) < pathSize) {\n ret = [pp, prefix, false]\n } else {\n // first set prefix to the dir, and path to the base\n prefix = pathModule.dirname(pp)\n pp = pathModule.basename(pp)\n\n do {\n if (\n Buffer.byteLength(pp) <= pathSize &&\n Buffer.byteLength(prefix) <= prefixSize\n ) {\n // both fit!\n ret = [pp, prefix, false]\n } else if (\n Buffer.byteLength(pp) > pathSize &&\n Buffer.byteLength(prefix) <= prefixSize\n ) {\n // prefix fits in prefix, but path doesn't fit in path\n ret = [pp.slice(0, pathSize - 1), prefix, true]\n } else {\n // make path take a bit from prefix\n pp = pathModule.join(pathModule.basename(prefix), pp)\n prefix = pathModule.dirname(prefix)\n }\n } while (prefix !== root && ret === undefined)\n\n // at this point, found no resolution, just truncate\n if (!ret) {\n ret = [p.slice(0, pathSize - 1), '', true]\n }\n }\n return ret\n}\n\nconst decString = (buf: Buffer, off: number, size: number) =>\n buf\n .subarray(off, off + size)\n .toString('utf8')\n .replace(/\\0.*/, '')\n\nconst decDate = (buf: Buffer, off: number, size: number) =>\n numToDate(decNumber(buf, off, size))\n\nconst numToDate = (num?: number) =>\n num === undefined ? undefined : new Date(num * 1000)\n\nconst decNumber = (buf: Buffer, off: number, size: number) =>\n Number(buf[off]) & 0x80 ?\n large.parse(buf.subarray(off, off + size))\n : decSmallNumber(buf, off, size)\n\nconst nanUndef = (value: number) => (isNaN(value) ? undefined : value)\n\nconst decSmallNumber = (buf: Buffer, off: number, size: number) =>\n nanUndef(\n parseInt(\n buf\n .subarray(off, off + size)\n .toString('utf8')\n .replace(/\\0.*$/, '')\n .trim(),\n 8,\n ),\n )\n\n// the maximum encodable as a null-terminated octal, by field size\nconst MAXNUM = {\n 12: 0o77777777777,\n 8: 0o7777777,\n}\n\nconst encNumber = (\n buf: Buffer,\n off: number,\n size: 12 | 8,\n num?: number,\n) =>\n num === undefined ? false\n : num > MAXNUM[size] || num < 0 ?\n (large.encode(num, buf.subarray(off, off + size)), true)\n : (encSmallNumber(buf, off, size, num), false)\n\nconst encSmallNumber = (\n buf: Buffer,\n off: number,\n size: number,\n num: number,\n) => buf.write(octalString(num, size), off, size, 'ascii')\n\nconst octalString = (num: number, size: number) =>\n padOctal(Math.floor(num).toString(8), size)\n\nconst padOctal = (str: string, size: number) =>\n (str.length === size - 1 ?\n str\n : new Array(size - str.length - 1).join('0') + str + ' ') + '\\0'\n\nconst encDate = (\n buf: Buffer,\n off: number,\n size: 8 | 12,\n date?: Date,\n) =>\n date === undefined ? false : (\n encNumber(buf, off, size, date.getTime() / 1000)\n )\n\n// enough to fill the longest string we've got\nconst NULLS = new Array(156).join('\\0')\n// pad with nulls, return true if it's longer or non-ascii\nconst encString = (\n buf: Buffer,\n off: number,\n size: number,\n str?: string,\n) =>\n str === undefined ? false : (\n (buf.write(str + NULLS, off, size, 'utf8'),\n str.length !== Buffer.byteLength(str) || str.length > size)\n )\n"]}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export { type TarOptionsWithAliasesAsync, type TarOptionsWithAliasesAsyncFile, type TarOptionsWithAliasesAsyncNoFile, type TarOptionsWithAliasesSyncNoFile, type TarOptionsWithAliases, type TarOptionsWithAliasesFile, type TarOptionsWithAliasesSync, type TarOptionsWithAliasesSyncFile, } from './options.js';
|
| 2 |
+
export * from './create.js';
|
| 3 |
+
export { create as c } from './create.js';
|
| 4 |
+
export * from './extract.js';
|
| 5 |
+
export { extract as x } from './extract.js';
|
| 6 |
+
export * from './header.js';
|
| 7 |
+
export * from './list.js';
|
| 8 |
+
export { list as t } from './list.js';
|
| 9 |
+
export * from './pack.js';
|
| 10 |
+
export * from './parse.js';
|
| 11 |
+
export * from './pax.js';
|
| 12 |
+
export * from './read-entry.js';
|
| 13 |
+
export * from './replace.js';
|
| 14 |
+
export { replace as r } from './replace.js';
|
| 15 |
+
export * as types from './types.js';
|
| 16 |
+
export * from './unpack.js';
|
| 17 |
+
export * from './update.js';
|
| 18 |
+
export { update as u } from './update.js';
|
| 19 |
+
export * from './write-entry.js';
|
| 20 |
+
//# sourceMappingURL=index.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,GACnC,MAAM,cAAc,CAAA;AAErB,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,WAAW,CAAA;AAErC,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,kBAAkB,CAAA"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export * from './create.js';
|
| 2 |
+
export { create as c } from './create.js';
|
| 3 |
+
export * from './extract.js';
|
| 4 |
+
export { extract as x } from './extract.js';
|
| 5 |
+
export * from './header.js';
|
| 6 |
+
export * from './list.js';
|
| 7 |
+
export { list as t } from './list.js';
|
| 8 |
+
// classes
|
| 9 |
+
export * from './pack.js';
|
| 10 |
+
export * from './parse.js';
|
| 11 |
+
export * from './pax.js';
|
| 12 |
+
export * from './read-entry.js';
|
| 13 |
+
export * from './replace.js';
|
| 14 |
+
export { replace as r } from './replace.js';
|
| 15 |
+
export * as types from './types.js';
|
| 16 |
+
export * from './unpack.js';
|
| 17 |
+
export * from './update.js';
|
| 18 |
+
export { update as u } from './update.js';
|
| 19 |
+
export * from './write-entry.js';
|
| 20 |
+
//# sourceMappingURL=index.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAWA,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,WAAW,CAAA;AACrC,UAAU;AACV,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,kBAAkB,CAAA","sourcesContent":["export {\n type TarOptionsWithAliasesAsync,\n type TarOptionsWithAliasesAsyncFile,\n type TarOptionsWithAliasesAsyncNoFile,\n type TarOptionsWithAliasesSyncNoFile,\n type TarOptionsWithAliases,\n type TarOptionsWithAliasesFile,\n type TarOptionsWithAliasesSync,\n type TarOptionsWithAliasesSyncFile,\n} from './options.js'\n\nexport * from './create.js'\nexport { create as c } from './create.js'\nexport * from './extract.js'\nexport { extract as x } from './extract.js'\nexport * from './header.js'\nexport * from './list.js'\nexport { list as t } from './list.js'\n// classes\nexport * from './pack.js'\nexport * from './parse.js'\nexport * from './pax.js'\nexport * from './read-entry.js'\nexport * from './replace.js'\nexport { replace as r } from './replace.js'\nexport * as types from './types.js'\nexport * from './unpack.js'\nexport * from './update.js'\nexport { update as u } from './update.js'\nexport * from './write-entry.js'\n"]}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/large-numbers.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/// <reference types="node" resolution-mode="require"/>
|
| 2 |
+
export declare const encode: (num: number, buf: Buffer) => Buffer;
|
| 3 |
+
export declare const parse: (buf: Buffer) => number;
|
| 4 |
+
//# sourceMappingURL=large-numbers.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/large-numbers.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"large-numbers.d.ts","sourceRoot":"","sources":["../../src/large-numbers.ts"],"names":[],"mappings":";AAGA,eAAO,MAAM,MAAM,QAAS,MAAM,OAAO,MAAM,WAa9C,CAAA;AA6BD,eAAO,MAAM,KAAK,QAAS,MAAM,WAmBhC,CAAA"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/large-numbers.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Tar can encode large and negative numbers using a leading byte of
|
| 2 |
+
// 0xff for negative, and 0x80 for positive.
|
| 3 |
+
export const encode = (num, buf) => {
|
| 4 |
+
if (!Number.isSafeInteger(num)) {
|
| 5 |
+
// The number is so large that javascript cannot represent it with integer
|
| 6 |
+
// precision.
|
| 7 |
+
throw Error('cannot encode number outside of javascript safe integer range');
|
| 8 |
+
}
|
| 9 |
+
else if (num < 0) {
|
| 10 |
+
encodeNegative(num, buf);
|
| 11 |
+
}
|
| 12 |
+
else {
|
| 13 |
+
encodePositive(num, buf);
|
| 14 |
+
}
|
| 15 |
+
return buf;
|
| 16 |
+
};
|
| 17 |
+
const encodePositive = (num, buf) => {
|
| 18 |
+
buf[0] = 0x80;
|
| 19 |
+
for (var i = buf.length; i > 1; i--) {
|
| 20 |
+
buf[i - 1] = num & 0xff;
|
| 21 |
+
num = Math.floor(num / 0x100);
|
| 22 |
+
}
|
| 23 |
+
};
|
| 24 |
+
const encodeNegative = (num, buf) => {
|
| 25 |
+
buf[0] = 0xff;
|
| 26 |
+
var flipped = false;
|
| 27 |
+
num = num * -1;
|
| 28 |
+
for (var i = buf.length; i > 1; i--) {
|
| 29 |
+
var byte = num & 0xff;
|
| 30 |
+
num = Math.floor(num / 0x100);
|
| 31 |
+
if (flipped) {
|
| 32 |
+
buf[i - 1] = onesComp(byte);
|
| 33 |
+
}
|
| 34 |
+
else if (byte === 0) {
|
| 35 |
+
buf[i - 1] = 0;
|
| 36 |
+
}
|
| 37 |
+
else {
|
| 38 |
+
flipped = true;
|
| 39 |
+
buf[i - 1] = twosComp(byte);
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
};
|
| 43 |
+
export const parse = (buf) => {
|
| 44 |
+
const pre = buf[0];
|
| 45 |
+
const value = pre === 0x80 ? pos(buf.subarray(1, buf.length))
|
| 46 |
+
: pre === 0xff ? twos(buf)
|
| 47 |
+
: null;
|
| 48 |
+
if (value === null) {
|
| 49 |
+
throw Error('invalid base256 encoding');
|
| 50 |
+
}
|
| 51 |
+
if (!Number.isSafeInteger(value)) {
|
| 52 |
+
// The number is so large that javascript cannot represent it with integer
|
| 53 |
+
// precision.
|
| 54 |
+
throw Error('parsed number outside of javascript safe integer range');
|
| 55 |
+
}
|
| 56 |
+
return value;
|
| 57 |
+
};
|
| 58 |
+
const twos = (buf) => {
|
| 59 |
+
var len = buf.length;
|
| 60 |
+
var sum = 0;
|
| 61 |
+
var flipped = false;
|
| 62 |
+
for (var i = len - 1; i > -1; i--) {
|
| 63 |
+
var byte = Number(buf[i]);
|
| 64 |
+
var f;
|
| 65 |
+
if (flipped) {
|
| 66 |
+
f = onesComp(byte);
|
| 67 |
+
}
|
| 68 |
+
else if (byte === 0) {
|
| 69 |
+
f = byte;
|
| 70 |
+
}
|
| 71 |
+
else {
|
| 72 |
+
flipped = true;
|
| 73 |
+
f = twosComp(byte);
|
| 74 |
+
}
|
| 75 |
+
if (f !== 0) {
|
| 76 |
+
sum -= f * Math.pow(256, len - i - 1);
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
return sum;
|
| 80 |
+
};
|
| 81 |
+
const pos = (buf) => {
|
| 82 |
+
var len = buf.length;
|
| 83 |
+
var sum = 0;
|
| 84 |
+
for (var i = len - 1; i > -1; i--) {
|
| 85 |
+
var byte = Number(buf[i]);
|
| 86 |
+
if (byte !== 0) {
|
| 87 |
+
sum += byte * Math.pow(256, len - i - 1);
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
return sum;
|
| 91 |
+
};
|
| 92 |
+
const onesComp = (byte) => (0xff ^ byte) & 0xff;
|
| 93 |
+
const twosComp = (byte) => ((0xff ^ byte) + 1) & 0xff;
|
| 94 |
+
//# sourceMappingURL=large-numbers.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/large-numbers.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"large-numbers.js","sourceRoot":"","sources":["../../src/large-numbers.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,4CAA4C;AAE5C,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;IACjD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,0EAA0E;QAC1E,aAAa;QACb,MAAM,KAAK,CACT,+DAA+D,CAChE,CAAA;IACH,CAAC;SAAM,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;QACnB,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IAC1B,CAAC;SAAM,CAAC;QACN,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IAC1B,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;IAClD,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;IAEb,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACpC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAA;QACvB,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,CAAA;IAC/B,CAAC;AACH,CAAC,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;IAClD,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA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,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACzB,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;YACf,GAAG,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,CAAA;AAEvD,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAA","sourcesContent":["// Tar can encode large and negative numbers using a leading byte of\n// 0xff for negative, and 0x80 for positive.\n\nexport const encode = (num: number, buf: Buffer) => {\n if (!Number.isSafeInteger(num)) {\n // The number is so large that javascript cannot represent it with integer\n // precision.\n throw Error(\n 'cannot encode number outside of javascript safe integer range',\n )\n } else if (num < 0) {\n encodeNegative(num, buf)\n } else {\n encodePositive(num, buf)\n }\n return buf\n}\n\nconst encodePositive = (num: number, buf: Buffer) => {\n buf[0] = 0x80\n\n for (var i = buf.length; i > 1; i--) {\n buf[i - 1] = num & 0xff\n num = Math.floor(num / 0x100)\n }\n}\n\nconst encodeNegative = (num: number, buf: Buffer) => {\n buf[0] = 0xff\n var flipped = false\n num = num * -1\n for (var i = buf.length; i > 1; i--) {\n var byte = num & 0xff\n num = Math.floor(num / 0x100)\n if (flipped) {\n buf[i - 1] = onesComp(byte)\n } else if (byte === 0) {\n buf[i - 1] = 0\n } else {\n flipped = true\n buf[i - 1] = twosComp(byte)\n }\n }\n}\n\nexport const parse = (buf: Buffer) => {\n const pre = buf[0]\n const value =\n pre === 0x80 ? pos(buf.subarray(1, buf.length))\n : pre === 0xff ? twos(buf)\n : null\n if (value === null) {\n throw Error('invalid base256 encoding')\n }\n\n if (!Number.isSafeInteger(value)) {\n // The number is so large that javascript cannot represent it with integer\n // precision.\n throw Error(\n 'parsed number outside of javascript safe integer range',\n )\n }\n\n return value\n}\n\nconst twos = (buf: Buffer) => {\n var len = buf.length\n var sum = 0\n var flipped = false\n for (var i = len - 1; i > -1; i--) {\n var byte = Number(buf[i])\n var f\n if (flipped) {\n f = onesComp(byte)\n } else if (byte === 0) {\n f = byte\n } else {\n flipped = true\n f = twosComp(byte)\n }\n if (f !== 0) {\n sum -= f * Math.pow(256, len - i - 1)\n }\n }\n return sum\n}\n\nconst pos = (buf: Buffer) => {\n var len = buf.length\n var sum = 0\n for (var i = len - 1; i > -1; i--) {\n var byte = Number(buf[i])\n if (byte !== 0) {\n sum += byte * Math.pow(256, len - i - 1)\n }\n }\n return sum\n}\n\nconst onesComp = (byte: number) => (0xff ^ byte) & 0xff\n\nconst twosComp = (byte: number) => ((0xff ^ byte) + 1) & 0xff\n"]}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/list.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { TarOptions } from './options.js';
|
| 2 |
+
import { Parser } from './parse.js';
|
| 3 |
+
export declare const filesFilter: (opt: TarOptions, files: string[]) => void;
|
| 4 |
+
export declare const list: import("./make-command.js").TarCommand<Parser, Parser & {
|
| 5 |
+
sync: true;
|
| 6 |
+
}>;
|
| 7 |
+
//# sourceMappingURL=list.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/list.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/list.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,UAAU,EAGX,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAgBnC,eAAO,MAAM,WAAW,QAAS,UAAU,SAAS,MAAM,EAAE,SA4B3D,CAAA;AA4DD,eAAO,MAAM,IAAI;UAG4B,IAAI;EAMhD,CAAA"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/list.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// tar -t
|
| 2 |
+
import * as fsm from '@isaacs/fs-minipass';
|
| 3 |
+
import fs from 'node:fs';
|
| 4 |
+
import { dirname, parse } from 'path';
|
| 5 |
+
import { makeCommand } from './make-command.js';
|
| 6 |
+
import { Parser } from './parse.js';
|
| 7 |
+
import { stripTrailingSlashes } from './strip-trailing-slashes.js';
|
| 8 |
+
const onReadEntryFunction = (opt) => {
|
| 9 |
+
const onReadEntry = opt.onReadEntry;
|
| 10 |
+
opt.onReadEntry =
|
| 11 |
+
onReadEntry ?
|
| 12 |
+
e => {
|
| 13 |
+
onReadEntry(e);
|
| 14 |
+
e.resume();
|
| 15 |
+
}
|
| 16 |
+
: e => e.resume();
|
| 17 |
+
};
|
| 18 |
+
// construct a filter that limits the file entries listed
|
| 19 |
+
// include child entries if a dir is included
|
| 20 |
+
export const filesFilter = (opt, files) => {
|
| 21 |
+
const map = new Map(files.map(f => [stripTrailingSlashes(f), true]));
|
| 22 |
+
const filter = opt.filter;
|
| 23 |
+
const mapHas = (file, r = '') => {
|
| 24 |
+
const root = r || parse(file).root || '.';
|
| 25 |
+
let ret;
|
| 26 |
+
if (file === root)
|
| 27 |
+
ret = false;
|
| 28 |
+
else {
|
| 29 |
+
const m = map.get(file);
|
| 30 |
+
if (m !== undefined) {
|
| 31 |
+
ret = m;
|
| 32 |
+
}
|
| 33 |
+
else {
|
| 34 |
+
ret = mapHas(dirname(file), root);
|
| 35 |
+
}
|
| 36 |
+
}
|
| 37 |
+
map.set(file, ret);
|
| 38 |
+
return ret;
|
| 39 |
+
};
|
| 40 |
+
opt.filter =
|
| 41 |
+
filter ?
|
| 42 |
+
(file, entry) => filter(file, entry) && mapHas(stripTrailingSlashes(file))
|
| 43 |
+
: file => mapHas(stripTrailingSlashes(file));
|
| 44 |
+
};
|
| 45 |
+
const listFileSync = (opt) => {
|
| 46 |
+
const p = new Parser(opt);
|
| 47 |
+
const file = opt.file;
|
| 48 |
+
let fd;
|
| 49 |
+
try {
|
| 50 |
+
const stat = fs.statSync(file);
|
| 51 |
+
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
|
| 52 |
+
if (stat.size < readSize) {
|
| 53 |
+
p.end(fs.readFileSync(file));
|
| 54 |
+
}
|
| 55 |
+
else {
|
| 56 |
+
let pos = 0;
|
| 57 |
+
const buf = Buffer.allocUnsafe(readSize);
|
| 58 |
+
fd = fs.openSync(file, 'r');
|
| 59 |
+
while (pos < stat.size) {
|
| 60 |
+
const bytesRead = fs.readSync(fd, buf, 0, readSize, pos);
|
| 61 |
+
pos += bytesRead;
|
| 62 |
+
p.write(buf.subarray(0, bytesRead));
|
| 63 |
+
}
|
| 64 |
+
p.end();
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
finally {
|
| 68 |
+
if (typeof fd === 'number') {
|
| 69 |
+
try {
|
| 70 |
+
fs.closeSync(fd);
|
| 71 |
+
/* c8 ignore next */
|
| 72 |
+
}
|
| 73 |
+
catch (er) { }
|
| 74 |
+
}
|
| 75 |
+
}
|
| 76 |
+
};
|
| 77 |
+
const listFile = (opt, _files) => {
|
| 78 |
+
const parse = new Parser(opt);
|
| 79 |
+
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
|
| 80 |
+
const file = opt.file;
|
| 81 |
+
const p = new Promise((resolve, reject) => {
|
| 82 |
+
parse.on('error', reject);
|
| 83 |
+
parse.on('end', resolve);
|
| 84 |
+
fs.stat(file, (er, stat) => {
|
| 85 |
+
if (er) {
|
| 86 |
+
reject(er);
|
| 87 |
+
}
|
| 88 |
+
else {
|
| 89 |
+
const stream = new fsm.ReadStream(file, {
|
| 90 |
+
readSize: readSize,
|
| 91 |
+
size: stat.size,
|
| 92 |
+
});
|
| 93 |
+
stream.on('error', reject);
|
| 94 |
+
stream.pipe(parse);
|
| 95 |
+
}
|
| 96 |
+
});
|
| 97 |
+
});
|
| 98 |
+
return p;
|
| 99 |
+
};
|
| 100 |
+
export const list = makeCommand(listFileSync, listFile, opt => new Parser(opt), opt => new Parser(opt), (opt, files) => {
|
| 101 |
+
if (files?.length)
|
| 102 |
+
filesFilter(opt, files);
|
| 103 |
+
if (!opt.noResume)
|
| 104 |
+
onReadEntryFunction(opt);
|
| 105 |
+
});
|
| 106 |
+
//# sourceMappingURL=list.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/list.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/list.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAM/C,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAElE,MAAM,mBAAmB,GAAG,CAAC,GAAe,EAAE,EAAE;IAC9C,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAA;IACnC,GAAG,CAAC,WAAW;QACb,WAAW,CAAC,CAAC;YACX,CAAC,CAAC,EAAE;gBACF,WAAW,CAAC,CAAC,CAAC,CAAA;gBACd,CAAC,CAAC,MAAM,EAAE,CAAA;YACZ,CAAC;YACH,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAA;AACrB,CAAC,CAAA;AAED,yDAAyD;AACzD,6CAA6C;AAC7C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAe,EAAE,KAAe,EAAE,EAAE;IAC9D,MAAM,GAAG,GAAG,IAAI,GAAG,CACjB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAChD,CAAA;IACD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;IAEzB,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,IAAY,EAAE,EAAW,EAAE;QACvD,MAAM,IAAI,GAAG,CAAC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C,OAAO,EAAE,MAAM,CAAC,CAAA;QACzB,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAExB,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE;YACzB,IAAI,EAAE,EAAE,CAAC;gBACP,MAAM,CAAC,EAAE,CAAC,CAAA;YACZ,CAAC;iBAAM,CAAC;gBACN,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE;oBACtC,QAAQ,EAAE,QAAQ;oBAClB,IAAI,EAAE,IAAI,CAAC,IAAI;iBAChB,CAAC,CAAA;gBACF,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;gBAC1B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YACpB,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IACF,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAC7B,YAAY,EACZ,QAAQ,EACR,GAAG,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAA4B,EACjD,GAAG,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,EACtB,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;IACb,IAAI,KAAK,EAAE,MAAM;QAAE,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAC1C,IAAI,CAAC,GAAG,CAAC,QAAQ;QAAE,mBAAmB,CAAC,GAAG,CAAC,CAAA;AAC7C,CAAC,CACF,CAAA","sourcesContent":["// tar -t\nimport * as fsm from '@isaacs/fs-minipass'\nimport fs from 'node:fs'\nimport { dirname, parse } from 'path'\nimport { makeCommand } from './make-command.js'\nimport {\n TarOptions,\n TarOptionsFile,\n TarOptionsSyncFile,\n} from './options.js'\nimport { Parser } from './parse.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\n\nconst onReadEntryFunction = (opt: TarOptions) => {\n const onReadEntry = opt.onReadEntry\n opt.onReadEntry =\n onReadEntry ?\n e => {\n onReadEntry(e)\n e.resume()\n }\n : e => e.resume()\n}\n\n// construct a filter that limits the file entries listed\n// include child entries if a dir is included\nexport const filesFilter = (opt: TarOptions, files: string[]) => {\n const map = new Map<string, boolean>(\n files.map(f => [stripTrailingSlashes(f), true]),\n )\n const filter = opt.filter\n\n const mapHas = (file: string, r: string = ''): boolean => {\n const root = r || parse(file).root || '.'\n let ret: boolean\n if (file === root) ret = false\n else {\n const m = map.get(file)\n if (m !== undefined) {\n ret = m\n } else {\n ret = mapHas(dirname(file), root)\n }\n }\n\n map.set(file, ret)\n return ret\n }\n\n opt.filter =\n filter ?\n (file, entry) =>\n filter(file, entry) && mapHas(stripTrailingSlashes(file))\n : file => mapHas(stripTrailingSlashes(file))\n}\n\nconst listFileSync = (opt: TarOptionsSyncFile) => {\n const p = new Parser(opt)\n const file = opt.file\n let fd\n try {\n const stat = fs.statSync(file)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n if (stat.size < readSize) {\n p.end(fs.readFileSync(file))\n } else {\n let pos = 0\n const buf = Buffer.allocUnsafe(readSize)\n fd = fs.openSync(file, 'r')\n while (pos < stat.size) {\n const bytesRead = fs.readSync(fd, buf, 0, readSize, pos)\n pos += bytesRead\n p.write(buf.subarray(0, bytesRead))\n }\n p.end()\n }\n } finally {\n if (typeof fd === 'number') {\n try {\n fs.closeSync(fd)\n /* c8 ignore next */\n } catch (er) {}\n }\n }\n}\n\nconst listFile = (\n opt: TarOptionsFile,\n _files: string[],\n): Promise<void> => {\n const parse = new Parser(opt)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n\n const file = opt.file\n const p = new Promise<void>((resolve, reject) => {\n parse.on('error', reject)\n parse.on('end', resolve)\n\n fs.stat(file, (er, stat) => {\n if (er) {\n reject(er)\n } else {\n const stream = new fsm.ReadStream(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.on('error', reject)\n stream.pipe(parse)\n }\n })\n })\n return p\n}\n\nexport const list = makeCommand(\n listFileSync,\n listFile,\n opt => new Parser(opt) as Parser & { sync: true },\n opt => new Parser(opt),\n (opt, files) => {\n if (files?.length) filesFilter(opt, files)\n if (!opt.noResume) onReadEntryFunction(opt)\n },\n)\n"]}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/make-command.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { TarOptions, TarOptionsAsyncFile, TarOptionsAsyncNoFile, TarOptionsSyncFile, TarOptionsSyncNoFile, TarOptionsWithAliases, TarOptionsWithAliasesAsync, TarOptionsWithAliasesAsyncFile, TarOptionsWithAliasesAsyncNoFile, TarOptionsWithAliasesFile, TarOptionsWithAliasesNoFile, TarOptionsWithAliasesSync, TarOptionsWithAliasesSyncFile, TarOptionsWithAliasesSyncNoFile } from './options.js';
|
| 2 |
+
export type CB = (er?: Error) => any;
|
| 3 |
+
export type TarCommand<AsyncClass, SyncClass extends {
|
| 4 |
+
sync: true;
|
| 5 |
+
}> = {
|
| 6 |
+
(): AsyncClass;
|
| 7 |
+
(opt: TarOptionsWithAliasesAsyncNoFile): AsyncClass;
|
| 8 |
+
(entries: string[]): AsyncClass;
|
| 9 |
+
(opt: TarOptionsWithAliasesAsyncNoFile, entries: string[]): AsyncClass;
|
| 10 |
+
} & {
|
| 11 |
+
(opt: TarOptionsWithAliasesSyncNoFile): SyncClass;
|
| 12 |
+
(opt: TarOptionsWithAliasesSyncNoFile, entries: string[]): SyncClass;
|
| 13 |
+
} & {
|
| 14 |
+
(opt: TarOptionsWithAliasesAsyncFile): Promise<void>;
|
| 15 |
+
(opt: TarOptionsWithAliasesAsyncFile, entries: string[]): Promise<void>;
|
| 16 |
+
(opt: TarOptionsWithAliasesAsyncFile, cb: CB): Promise<void>;
|
| 17 |
+
(opt: TarOptionsWithAliasesAsyncFile, entries: string[], cb: CB): Promise<void>;
|
| 18 |
+
} & {
|
| 19 |
+
(opt: TarOptionsWithAliasesSyncFile): void;
|
| 20 |
+
(opt: TarOptionsWithAliasesSyncFile, entries: string[]): void;
|
| 21 |
+
} & {
|
| 22 |
+
(opt: TarOptionsWithAliasesSync): typeof opt extends (TarOptionsWithAliasesFile) ? void : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass : void | SyncClass;
|
| 23 |
+
(opt: TarOptionsWithAliasesSync, entries: string[]): typeof opt extends TarOptionsWithAliasesFile ? void : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass : void | SyncClass;
|
| 24 |
+
} & {
|
| 25 |
+
(opt: TarOptionsWithAliasesAsync): typeof opt extends (TarOptionsWithAliasesFile) ? Promise<void> : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass : Promise<void> | AsyncClass;
|
| 26 |
+
(opt: TarOptionsWithAliasesAsync, entries: string[]): typeof opt extends TarOptionsWithAliasesFile ? Promise<void> : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass : Promise<void> | AsyncClass;
|
| 27 |
+
(opt: TarOptionsWithAliasesAsync, cb: CB): Promise<void>;
|
| 28 |
+
(opt: TarOptionsWithAliasesAsync, entries: string[], cb: CB): typeof opt extends TarOptionsWithAliasesFile ? Promise<void> : typeof opt extends TarOptionsWithAliasesNoFile ? never : Promise<void>;
|
| 29 |
+
} & {
|
| 30 |
+
(opt: TarOptionsWithAliasesFile): Promise<void> | void;
|
| 31 |
+
(opt: TarOptionsWithAliasesFile, entries: string[]): typeof opt extends TarOptionsWithAliasesSync ? void : typeof opt extends TarOptionsWithAliasesAsync ? Promise<void> : Promise<void> | void;
|
| 32 |
+
(opt: TarOptionsWithAliasesFile, cb: CB): Promise<void>;
|
| 33 |
+
(opt: TarOptionsWithAliasesFile, entries: string[], cb: CB): typeof opt extends TarOptionsWithAliasesSync ? never : typeof opt extends TarOptionsWithAliasesAsync ? Promise<void> : Promise<void>;
|
| 34 |
+
} & {
|
| 35 |
+
(opt: TarOptionsWithAliasesNoFile): typeof opt extends (TarOptionsWithAliasesSync) ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass;
|
| 36 |
+
(opt: TarOptionsWithAliasesNoFile, entries: string[]): typeof opt extends TarOptionsWithAliasesSync ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass;
|
| 37 |
+
} & {
|
| 38 |
+
(opt: TarOptionsWithAliases): typeof opt extends (TarOptionsWithAliasesFile) ? typeof opt extends TarOptionsWithAliasesSync ? void : typeof opt extends TarOptionsWithAliasesAsync ? Promise<void> : void | Promise<void> : typeof opt extends TarOptionsWithAliasesNoFile ? typeof opt extends TarOptionsWithAliasesSync ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass : typeof opt extends TarOptionsWithAliasesSync ? SyncClass | void : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass | Promise<void> : SyncClass | void | AsyncClass | Promise<void>;
|
| 39 |
+
} & {
|
| 40 |
+
syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void;
|
| 41 |
+
asyncFile: (opt: TarOptionsAsyncFile, entries: string[], cb?: CB) => Promise<void>;
|
| 42 |
+
syncNoFile: (opt: TarOptionsSyncNoFile, entries: string[]) => SyncClass;
|
| 43 |
+
asyncNoFile: (opt: TarOptionsAsyncNoFile, entries: string[]) => AsyncClass;
|
| 44 |
+
validate?: (opt: TarOptions, entries?: string[]) => void;
|
| 45 |
+
};
|
| 46 |
+
export declare const makeCommand: <AsyncClass, SyncClass extends {
|
| 47 |
+
sync: true;
|
| 48 |
+
}>(syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void, asyncFile: (opt: TarOptionsAsyncFile, entries: string[], cb?: CB) => Promise<void>, syncNoFile: (opt: TarOptionsSyncNoFile, entries: string[]) => SyncClass, asyncNoFile: (opt: TarOptionsAsyncNoFile, entries: string[]) => AsyncClass, validate?: (opt: TarOptions, entries?: string[]) => void) => TarCommand<AsyncClass, SyncClass>;
|
| 49 |
+
//# sourceMappingURL=make-command.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/make-command.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"make-command.d.ts","sourceRoot":"","sources":["../../src/make-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,UAAU,EACV,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,8BAA8B,EAC9B,gCAAgC,EAChC,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,6BAA6B,EAC7B,+BAA+B,EAChC,MAAM,cAAc,CAAA;AAErB,MAAM,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,KAAK,GAAG,CAAA;AAEpC,MAAM,MAAM,UAAU,CACpB,UAAU,EACV,SAAS,SAAS;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,IAC9B;IAEF,IAAI,UAAU,CAAA;IACd,CAAC,GAAG,EAAE,gCAAgC,GAAG,UAAU,CAAA;IACnD,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,UAAU,CAAA;IAC/B,CACE,GAAG,EAAE,gCAA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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { dealias, isAsyncFile, isAsyncNoFile, isSyncFile, isSyncNoFile, } from './options.js';
|
| 2 |
+
export const makeCommand = (syncFile, asyncFile, syncNoFile, asyncNoFile, validate) => {
|
| 3 |
+
return Object.assign((opt_ = [], entries, cb) => {
|
| 4 |
+
if (Array.isArray(opt_)) {
|
| 5 |
+
entries = opt_;
|
| 6 |
+
opt_ = {};
|
| 7 |
+
}
|
| 8 |
+
if (typeof entries === 'function') {
|
| 9 |
+
cb = entries;
|
| 10 |
+
entries = undefined;
|
| 11 |
+
}
|
| 12 |
+
if (!entries) {
|
| 13 |
+
entries = [];
|
| 14 |
+
}
|
| 15 |
+
else {
|
| 16 |
+
entries = Array.from(entries);
|
| 17 |
+
}
|
| 18 |
+
const opt = dealias(opt_);
|
| 19 |
+
validate?.(opt, entries);
|
| 20 |
+
if (isSyncFile(opt)) {
|
| 21 |
+
if (typeof cb === 'function') {
|
| 22 |
+
throw new TypeError('callback not supported for sync tar functions');
|
| 23 |
+
}
|
| 24 |
+
return syncFile(opt, entries);
|
| 25 |
+
}
|
| 26 |
+
else if (isAsyncFile(opt)) {
|
| 27 |
+
const p = asyncFile(opt, entries);
|
| 28 |
+
// weirdness to make TS happy
|
| 29 |
+
const c = cb ? cb : undefined;
|
| 30 |
+
return c ? p.then(() => c(), c) : p;
|
| 31 |
+
}
|
| 32 |
+
else if (isSyncNoFile(opt)) {
|
| 33 |
+
if (typeof cb === 'function') {
|
| 34 |
+
throw new TypeError('callback not supported for sync tar functions');
|
| 35 |
+
}
|
| 36 |
+
return syncNoFile(opt, entries);
|
| 37 |
+
}
|
| 38 |
+
else if (isAsyncNoFile(opt)) {
|
| 39 |
+
if (typeof cb === 'function') {
|
| 40 |
+
throw new TypeError('callback only supported with file option');
|
| 41 |
+
}
|
| 42 |
+
return asyncNoFile(opt, entries);
|
| 43 |
+
/* c8 ignore start */
|
| 44 |
+
}
|
| 45 |
+
else {
|
| 46 |
+
throw new Error('impossible options??');
|
| 47 |
+
}
|
| 48 |
+
/* c8 ignore stop */
|
| 49 |
+
}, {
|
| 50 |
+
syncFile,
|
| 51 |
+
asyncFile,
|
| 52 |
+
syncNoFile,
|
| 53 |
+
asyncNoFile,
|
| 54 |
+
validate,
|
| 55 |
+
});
|
| 56 |
+
};
|
| 57 |
+
//# sourceMappingURL=make-command.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/make-command.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"make-command.js","sourceRoot":"","sources":["../../src/make-command.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,WAAW,EACX,aAAa,EACb,UAAU,EACV,YAAY,GAeb,MAAM,cAAc,CAAA;AA2IrB,MAAM,CAAC,MAAM,WAAW,GAAG,CAIzB,QAA8D,EAC9D,SAIkB,EAClB,UAGc,EACd,WAGe,EACf,QAAwD,EACrB,EAAE;IACrC,OAAO,MAAM,CAAC,MAAM,CAClB,CACE,OAAyC,EAAE,EAC3C,OAAuB,EACvB,EAAO,EACP,EAAE;QACF,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,GAAG,IAAI,CAAA;YACd,IAAI,GAAG,EAAE,CAAA;QACX,CAAC;QAED,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE,CAAC;YAClC,EAAE,GAAG,OAAO,CAAA;YACZ,OAAO,GAAG,SAAS,CAAA;QACrB,CAAC;QAED,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAA;QACd,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/B,CAAC;QAED,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;QAEz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R,SAAS;QACT,UAAU;QACV,WAAW;QACX,QAAQ;KACT,CACmC,CAAA;AACxC,CAAC,CAAA","sourcesContent":["import {\n dealias,\n isAsyncFile,\n isAsyncNoFile,\n isSyncFile,\n isSyncNoFile,\n TarOptions,\n TarOptionsAsyncFile,\n TarOptionsAsyncNoFile,\n TarOptionsSyncFile,\n TarOptionsSyncNoFile,\n TarOptionsWithAliases,\n TarOptionsWithAliasesAsync,\n TarOptionsWithAliasesAsyncFile,\n TarOptionsWithAliasesAsyncNoFile,\n TarOptionsWithAliasesFile,\n TarOptionsWithAliasesNoFile,\n TarOptionsWithAliasesSync,\n TarOptionsWithAliasesSyncFile,\n TarOptionsWithAliasesSyncNoFile,\n} from './options.js'\n\nexport type CB = (er?: Error) => any\n\nexport type TarCommand<\n AsyncClass,\n SyncClass extends { sync: true },\n> = {\n // async and no file specified\n (): AsyncClass\n (opt: TarOptionsWithAliasesAsyncNoFile): AsyncClass\n (entries: string[]): AsyncClass\n (\n opt: TarOptionsWithAliasesAsyncNoFile,\n entries: string[],\n ): AsyncClass\n} & {\n // sync and no file\n (opt: TarOptionsWithAliasesSyncNoFile): SyncClass\n (opt: TarOptionsWithAliasesSyncNoFile, entries: string[]): SyncClass\n} & {\n // async and file\n (opt: TarOptionsWithAliasesAsyncFile): Promise<void>\n (\n opt: TarOptionsWithAliasesAsyncFile,\n entries: string[],\n ): Promise<void>\n (opt: TarOptionsWithAliasesAsyncFile, cb: CB): Promise<void>\n (\n opt: TarOptionsWithAliasesAsyncFile,\n entries: string[],\n cb: CB,\n ): Promise<void>\n} & {\n // sync and file\n (opt: TarOptionsWithAliasesSyncFile): void\n (opt: TarOptionsWithAliasesSyncFile, entries: string[]): void\n} & {\n // sync, maybe file\n (opt: TarOptionsWithAliasesSync): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n void\n : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass\n : void | SyncClass\n (\n opt: TarOptionsWithAliasesSync,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesFile ? void\n : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass\n : void | SyncClass\n} & {\n // async, maybe file\n (opt: TarOptionsWithAliasesAsync): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n Promise<void>\n : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass\n : Promise<void> | AsyncClass\n (\n opt: TarOptionsWithAliasesAsync,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesFile ? Promise<void>\n : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass\n : Promise<void> | AsyncClass\n (opt: TarOptionsWithAliasesAsync, cb: CB): Promise<void>\n (\n opt: TarOptionsWithAliasesAsync,\n entries: string[],\n cb: CB,\n ): typeof opt extends TarOptionsWithAliasesFile ? Promise<void>\n : typeof opt extends TarOptionsWithAliasesNoFile ? never\n : Promise<void>\n} & {\n // maybe sync, file\n (opt: TarOptionsWithAliasesFile): Promise<void> | void\n (\n opt: TarOptionsWithAliasesFile,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesSync ? void\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise<void>\n : Promise<void> | void\n (opt: TarOptionsWithAliasesFile, cb: CB): Promise<void>\n (\n opt: TarOptionsWithAliasesFile,\n entries: string[],\n cb: CB,\n ): typeof opt extends TarOptionsWithAliasesSync ? never\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise<void>\n : Promise<void>\n} & {\n // maybe sync, no file\n (opt: TarOptionsWithAliasesNoFile): typeof opt extends (\n TarOptionsWithAliasesSync\n ) ?\n SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n (\n opt: TarOptionsWithAliasesNoFile,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesSync ? SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n} & {\n // maybe sync, maybe file\n (opt: TarOptionsWithAliases): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n typeof opt extends TarOptionsWithAliasesSync ? void\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise<void>\n : void | Promise<void>\n : typeof opt extends TarOptionsWithAliasesNoFile ?\n typeof opt extends TarOptionsWithAliasesSync ? SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n : typeof opt extends TarOptionsWithAliasesSync ? SyncClass | void\n : typeof opt extends TarOptionsWithAliasesAsync ?\n AsyncClass | Promise<void>\n : SyncClass | void | AsyncClass | Promise<void>\n} & {\n // extras\n syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void\n asyncFile: (\n opt: TarOptionsAsyncFile,\n entries: string[],\n cb?: CB,\n ) => Promise<void>\n syncNoFile: (\n opt: TarOptionsSyncNoFile,\n entries: string[],\n ) => SyncClass\n asyncNoFile: (\n opt: TarOptionsAsyncNoFile,\n entries: string[],\n ) => AsyncClass\n validate?: (opt: TarOptions, entries?: string[]) => void\n}\n\nexport const makeCommand = <\n AsyncClass,\n SyncClass extends { sync: true },\n>(\n syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void,\n asyncFile: (\n opt: TarOptionsAsyncFile,\n entries: string[],\n cb?: CB,\n ) => Promise<void>,\n syncNoFile: (\n opt: TarOptionsSyncNoFile,\n entries: string[],\n ) => SyncClass,\n asyncNoFile: (\n opt: TarOptionsAsyncNoFile,\n entries: string[],\n ) => AsyncClass,\n validate?: (opt: TarOptions, entries?: string[]) => void,\n): TarCommand<AsyncClass, SyncClass> => {\n return Object.assign(\n (\n opt_: TarOptionsWithAliases | string[] = [],\n entries?: string[] | CB,\n cb?: CB,\n ) => {\n if (Array.isArray(opt_)) {\n entries = opt_\n opt_ = {}\n }\n\n if (typeof entries === 'function') {\n cb = entries\n entries = undefined\n }\n\n if (!entries) {\n entries = []\n } else {\n entries = Array.from(entries)\n }\n\n const opt = dealias(opt_)\n\n validate?.(opt, entries)\n\n if (isSyncFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback not supported for sync tar functions',\n )\n }\n return syncFile(opt, entries)\n } else if (isAsyncFile(opt)) {\n const p = asyncFile(opt, entries)\n // weirdness to make TS happy\n const c = cb ? cb : undefined\n return c ? p.then(() => c(), c) : p\n } else if (isSyncNoFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback not supported for sync tar functions',\n )\n }\n return syncNoFile(opt, entries)\n } else if (isAsyncNoFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback only supported with file option',\n )\n }\n return asyncNoFile(opt, entries)\n /* c8 ignore start */\n } else {\n throw new Error('impossible options??')\n }\n /* c8 ignore stop */\n },\n {\n syncFile,\n asyncFile,\n syncNoFile,\n asyncNoFile,\n validate,\n },\n ) as TarCommand<AsyncClass, SyncClass>\n}\n"]}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mkdir.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/// <reference types="node" resolution-mode="require"/>
|
| 2 |
+
import { CwdError } from './cwd-error.js';
|
| 3 |
+
import { SymlinkError } from './symlink-error.js';
|
| 4 |
+
export type MkdirOptions = {
|
| 5 |
+
uid?: number;
|
| 6 |
+
gid?: number;
|
| 7 |
+
processUid?: number;
|
| 8 |
+
processGid?: number;
|
| 9 |
+
umask?: number;
|
| 10 |
+
preserve: boolean;
|
| 11 |
+
unlink: boolean;
|
| 12 |
+
cache: Map<string, boolean>;
|
| 13 |
+
cwd: string;
|
| 14 |
+
mode: number;
|
| 15 |
+
};
|
| 16 |
+
export type MkdirError = NodeJS.ErrnoException | CwdError | SymlinkError;
|
| 17 |
+
/**
|
| 18 |
+
* Wrapper around mkdirp for tar's needs.
|
| 19 |
+
*
|
| 20 |
+
* The main purpose is to avoid creating directories if we know that
|
| 21 |
+
* they already exist (and track which ones exist for this purpose),
|
| 22 |
+
* and prevent entries from being extracted into symlinked folders,
|
| 23 |
+
* if `preservePaths` is not set.
|
| 24 |
+
*/
|
| 25 |
+
export declare const mkdir: (dir: string, opt: MkdirOptions, cb: (er?: null | MkdirError, made?: string) => void) => void | Promise<void>;
|
| 26 |
+
export declare const mkdirSync: (dir: string, opt: MkdirOptions) => void | SymlinkError;
|
| 27 |
+
//# sourceMappingURL=mkdir.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mkdir.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"mkdir.d.ts","sourceRoot":"","sources":["../../src/mkdir.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,UAAU,GAClB,MAAM,CAAC,cAAc,GACrB,QAAQ,GACR,YAAY,CAAA;AAyBhB;;;;;;;GAO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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { chownr, chownrSync } from 'chownr';
|
| 2 |
+
import fs from 'fs';
|
| 3 |
+
import { mkdirp, mkdirpSync } from 'mkdirp';
|
| 4 |
+
import path from 'node:path';
|
| 5 |
+
import { CwdError } from './cwd-error.js';
|
| 6 |
+
import { normalizeWindowsPath } from './normalize-windows-path.js';
|
| 7 |
+
import { SymlinkError } from './symlink-error.js';
|
| 8 |
+
const cGet = (cache, key) => cache.get(normalizeWindowsPath(key));
|
| 9 |
+
const cSet = (cache, key, val) => cache.set(normalizeWindowsPath(key), val);
|
| 10 |
+
const checkCwd = (dir, cb) => {
|
| 11 |
+
fs.stat(dir, (er, st) => {
|
| 12 |
+
if (er || !st.isDirectory()) {
|
| 13 |
+
er = new CwdError(dir, er?.code || 'ENOTDIR');
|
| 14 |
+
}
|
| 15 |
+
cb(er);
|
| 16 |
+
});
|
| 17 |
+
};
|
| 18 |
+
/**
|
| 19 |
+
* Wrapper around mkdirp for tar's needs.
|
| 20 |
+
*
|
| 21 |
+
* The main purpose is to avoid creating directories if we know that
|
| 22 |
+
* they already exist (and track which ones exist for this purpose),
|
| 23 |
+
* and prevent entries from being extracted into symlinked folders,
|
| 24 |
+
* if `preservePaths` is not set.
|
| 25 |
+
*/
|
| 26 |
+
export const mkdir = (dir, opt, cb) => {
|
| 27 |
+
dir = normalizeWindowsPath(dir);
|
| 28 |
+
// if there's any overlap between mask and mode,
|
| 29 |
+
// then we'll need an explicit chmod
|
| 30 |
+
/* c8 ignore next */
|
| 31 |
+
const umask = opt.umask ?? 0o22;
|
| 32 |
+
const mode = opt.mode | 0o0700;
|
| 33 |
+
const needChmod = (mode & umask) !== 0;
|
| 34 |
+
const uid = opt.uid;
|
| 35 |
+
const gid = opt.gid;
|
| 36 |
+
const doChown = typeof uid === 'number' &&
|
| 37 |
+
typeof gid === 'number' &&
|
| 38 |
+
(uid !== opt.processUid || gid !== opt.processGid);
|
| 39 |
+
const preserve = opt.preserve;
|
| 40 |
+
const unlink = opt.unlink;
|
| 41 |
+
const cache = opt.cache;
|
| 42 |
+
const cwd = normalizeWindowsPath(opt.cwd);
|
| 43 |
+
const done = (er, created) => {
|
| 44 |
+
if (er) {
|
| 45 |
+
cb(er);
|
| 46 |
+
}
|
| 47 |
+
else {
|
| 48 |
+
cSet(cache, dir, true);
|
| 49 |
+
if (created && doChown) {
|
| 50 |
+
chownr(created, uid, gid, er => done(er));
|
| 51 |
+
}
|
| 52 |
+
else if (needChmod) {
|
| 53 |
+
fs.chmod(dir, mode, cb);
|
| 54 |
+
}
|
| 55 |
+
else {
|
| 56 |
+
cb();
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
};
|
| 60 |
+
if (cache && cGet(cache, dir) === true) {
|
| 61 |
+
return done();
|
| 62 |
+
}
|
| 63 |
+
if (dir === cwd) {
|
| 64 |
+
return checkCwd(dir, done);
|
| 65 |
+
}
|
| 66 |
+
if (preserve) {
|
| 67 |
+
return mkdirp(dir, { mode }).then(made => done(null, made ?? undefined), // oh, ts
|
| 68 |
+
done);
|
| 69 |
+
}
|
| 70 |
+
const sub = normalizeWindowsPath(path.relative(cwd, dir));
|
| 71 |
+
const parts = sub.split('/');
|
| 72 |
+
mkdir_(cwd, parts, mode, cache, unlink, cwd, undefined, done);
|
| 73 |
+
};
|
| 74 |
+
const mkdir_ = (base, parts, mode, cache, unlink, cwd, created, cb) => {
|
| 75 |
+
if (!parts.length) {
|
| 76 |
+
return cb(null, created);
|
| 77 |
+
}
|
| 78 |
+
const p = parts.shift();
|
| 79 |
+
const part = normalizeWindowsPath(path.resolve(base + '/' + p));
|
| 80 |
+
if (cGet(cache, part)) {
|
| 81 |
+
return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb);
|
| 82 |
+
}
|
| 83 |
+
fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb));
|
| 84 |
+
};
|
| 85 |
+
const onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => (er) => {
|
| 86 |
+
if (er) {
|
| 87 |
+
fs.lstat(part, (statEr, st) => {
|
| 88 |
+
if (statEr) {
|
| 89 |
+
statEr.path =
|
| 90 |
+
statEr.path && normalizeWindowsPath(statEr.path);
|
| 91 |
+
cb(statEr);
|
| 92 |
+
}
|
| 93 |
+
else if (st.isDirectory()) {
|
| 94 |
+
mkdir_(part, parts, mode, cache, unlink, cwd, created, cb);
|
| 95 |
+
}
|
| 96 |
+
else if (unlink) {
|
| 97 |
+
fs.unlink(part, er => {
|
| 98 |
+
if (er) {
|
| 99 |
+
return cb(er);
|
| 100 |
+
}
|
| 101 |
+
fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb));
|
| 102 |
+
});
|
| 103 |
+
}
|
| 104 |
+
else if (st.isSymbolicLink()) {
|
| 105 |
+
return cb(new SymlinkError(part, part + '/' + parts.join('/')));
|
| 106 |
+
}
|
| 107 |
+
else {
|
| 108 |
+
cb(er);
|
| 109 |
+
}
|
| 110 |
+
});
|
| 111 |
+
}
|
| 112 |
+
else {
|
| 113 |
+
created = created || part;
|
| 114 |
+
mkdir_(part, parts, mode, cache, unlink, cwd, created, cb);
|
| 115 |
+
}
|
| 116 |
+
};
|
| 117 |
+
const checkCwdSync = (dir) => {
|
| 118 |
+
let ok = false;
|
| 119 |
+
let code = undefined;
|
| 120 |
+
try {
|
| 121 |
+
ok = fs.statSync(dir).isDirectory();
|
| 122 |
+
}
|
| 123 |
+
catch (er) {
|
| 124 |
+
code = er?.code;
|
| 125 |
+
}
|
| 126 |
+
finally {
|
| 127 |
+
if (!ok) {
|
| 128 |
+
throw new CwdError(dir, code ?? 'ENOTDIR');
|
| 129 |
+
}
|
| 130 |
+
}
|
| 131 |
+
};
|
| 132 |
+
export const mkdirSync = (dir, opt) => {
|
| 133 |
+
dir = normalizeWindowsPath(dir);
|
| 134 |
+
// if there's any overlap between mask and mode,
|
| 135 |
+
// then we'll need an explicit chmod
|
| 136 |
+
/* c8 ignore next */
|
| 137 |
+
const umask = opt.umask ?? 0o22;
|
| 138 |
+
const mode = opt.mode | 0o700;
|
| 139 |
+
const needChmod = (mode & umask) !== 0;
|
| 140 |
+
const uid = opt.uid;
|
| 141 |
+
const gid = opt.gid;
|
| 142 |
+
const doChown = typeof uid === 'number' &&
|
| 143 |
+
typeof gid === 'number' &&
|
| 144 |
+
(uid !== opt.processUid || gid !== opt.processGid);
|
| 145 |
+
const preserve = opt.preserve;
|
| 146 |
+
const unlink = opt.unlink;
|
| 147 |
+
const cache = opt.cache;
|
| 148 |
+
const cwd = normalizeWindowsPath(opt.cwd);
|
| 149 |
+
const done = (created) => {
|
| 150 |
+
cSet(cache, dir, true);
|
| 151 |
+
if (created && doChown) {
|
| 152 |
+
chownrSync(created, uid, gid);
|
| 153 |
+
}
|
| 154 |
+
if (needChmod) {
|
| 155 |
+
fs.chmodSync(dir, mode);
|
| 156 |
+
}
|
| 157 |
+
};
|
| 158 |
+
if (cache && cGet(cache, dir) === true) {
|
| 159 |
+
return done();
|
| 160 |
+
}
|
| 161 |
+
if (dir === cwd) {
|
| 162 |
+
checkCwdSync(cwd);
|
| 163 |
+
return done();
|
| 164 |
+
}
|
| 165 |
+
if (preserve) {
|
| 166 |
+
return done(mkdirpSync(dir, mode) ?? undefined);
|
| 167 |
+
}
|
| 168 |
+
const sub = normalizeWindowsPath(path.relative(cwd, dir));
|
| 169 |
+
const parts = sub.split('/');
|
| 170 |
+
let created = undefined;
|
| 171 |
+
for (let p = parts.shift(), part = cwd; p && (part += '/' + p); p = parts.shift()) {
|
| 172 |
+
part = normalizeWindowsPath(path.resolve(part));
|
| 173 |
+
if (cGet(cache, part)) {
|
| 174 |
+
continue;
|
| 175 |
+
}
|
| 176 |
+
try {
|
| 177 |
+
fs.mkdirSync(part, mode);
|
| 178 |
+
created = created || part;
|
| 179 |
+
cSet(cache, part, true);
|
| 180 |
+
}
|
| 181 |
+
catch (er) {
|
| 182 |
+
const st = fs.lstatSync(part);
|
| 183 |
+
if (st.isDirectory()) {
|
| 184 |
+
cSet(cache, part, true);
|
| 185 |
+
continue;
|
| 186 |
+
}
|
| 187 |
+
else if (unlink) {
|
| 188 |
+
fs.unlinkSync(part);
|
| 189 |
+
fs.mkdirSync(part, mode);
|
| 190 |
+
created = created || part;
|
| 191 |
+
cSet(cache, part, true);
|
| 192 |
+
continue;
|
| 193 |
+
}
|
| 194 |
+
else if (st.isSymbolicLink()) {
|
| 195 |
+
return new SymlinkError(part, part + '/' + parts.join('/'));
|
| 196 |
+
}
|
| 197 |
+
}
|
| 198 |
+
}
|
| 199 |
+
return done(created);
|
| 200 |
+
};
|
| 201 |
+
//# sourceMappingURL=mkdir.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mkdir.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"mkdir.js","sourceRoot":"","sources":["../../src/mkdir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,EAAE,MAAM,IA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,GAAG,OAAO,IAAI,IAAI,CAAA;gBACzB,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;gBACvB,SAAQ;YACV,CAAC;iBAAM,IAAI,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC;gBAC/B,OAAO,IAAI,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;YAC7D,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC,OAAO,CAAC,CAAA;AACtB,CAAC,CAAA","sourcesContent":["import { chownr, chownrSync } from 'chownr'\nimport fs from 'fs'\nimport { mkdirp, mkdirpSync } from 'mkdirp'\nimport path from 'node:path'\nimport { CwdError } from './cwd-error.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { SymlinkError } from './symlink-error.js'\n\nexport type MkdirOptions = {\n uid?: number\n gid?: number\n processUid?: number\n processGid?: number\n umask?: number\n preserve: boolean\n unlink: boolean\n cache: Map<string, boolean>\n cwd: string\n mode: number\n}\n\nexport type MkdirError =\n | NodeJS.ErrnoException\n | CwdError\n | SymlinkError\n\nconst cGet = (cache: Map<string, boolean>, key: string) =>\n cache.get(normalizeWindowsPath(key))\nconst cSet = (\n cache: Map<string, boolean>,\n key: string,\n val: boolean,\n) => cache.set(normalizeWindowsPath(key), val)\n\nconst checkCwd = (\n dir: string,\n cb: (er?: null | MkdirError) => any,\n) => {\n fs.stat(dir, (er, st) => {\n if (er || !st.isDirectory()) {\n er = new CwdError(\n dir,\n (er as NodeJS.ErrnoException)?.code || 'ENOTDIR',\n )\n }\n cb(er)\n })\n}\n\n/**\n * Wrapper around mkdirp for tar's needs.\n *\n * The main purpose is to avoid creating directories if we know that\n * they already exist (and track which ones exist for this purpose),\n * and prevent entries from being extracted into symlinked folders,\n * if `preservePaths` is not set.\n */\nexport const mkdir = (\n dir: string,\n opt: MkdirOptions,\n cb: (er?: null | MkdirError, made?: string) => void,\n) => {\n dir = normalizeWindowsPath(dir)\n\n // if there's any overlap between mask and mode,\n // then we'll need an explicit chmod\n /* c8 ignore next */\n const umask = opt.umask ?? 0o22\n const mode = opt.mode | 0o0700\n const needChmod = (mode & umask) !== 0\n\n const uid = opt.uid\n const gid = opt.gid\n const doChown =\n typeof uid === 'number' &&\n typeof gid === 'number' &&\n (uid !== opt.processUid || gid !== opt.processGid)\n\n const preserve = opt.preserve\n const unlink = opt.unlink\n const cache = opt.cache\n const cwd = normalizeWindowsPath(opt.cwd)\n\n const done = (er?: null | MkdirError, created?: string) => {\n if (er) {\n cb(er)\n } else {\n cSet(cache, dir, true)\n if (created && doChown) {\n chownr(created, uid, gid, er =>\n done(er as NodeJS.ErrnoException),\n )\n } else if (needChmod) {\n fs.chmod(dir, mode, cb)\n } else {\n cb()\n }\n }\n }\n\n if (cache && cGet(cache, dir) === true) {\n return done()\n }\n\n if (dir === cwd) {\n return checkCwd(dir, done)\n }\n\n if (preserve) {\n return mkdirp(dir, { mode }).then(\n made => done(null, made ?? undefined), // oh, ts\n done,\n )\n }\n\n const sub = normalizeWindowsPath(path.relative(cwd, dir))\n const parts = sub.split('/')\n mkdir_(cwd, parts, mode, cache, unlink, cwd, undefined, done)\n}\n\nconst mkdir_ = (\n base: string,\n parts: string[],\n mode: number,\n cache: Map<string, boolean>,\n unlink: boolean,\n cwd: string,\n created: string | undefined,\n cb: (er?: null | MkdirError, made?: string) => void,\n): void => {\n if (!parts.length) {\n return cb(null, created)\n }\n const p = parts.shift()\n const part = normalizeWindowsPath(path.resolve(base + '/' + p))\n if (cGet(cache, part)) {\n return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n }\n fs.mkdir(\n part,\n mode,\n onmkdir(part, parts, mode, cache, unlink, cwd, created, cb),\n )\n}\n\nconst onmkdir =\n (\n part: string,\n parts: string[],\n mode: number,\n cache: Map<string, boolean>,\n unlink: boolean,\n cwd: string,\n created: string | undefined,\n cb: (er?: null | MkdirError, made?: string) => void,\n ) =>\n (er?: null | NodeJS.ErrnoException) => {\n if (er) {\n fs.lstat(part, (statEr, st) => {\n if (statEr) {\n statEr.path =\n statEr.path && normalizeWindowsPath(statEr.path)\n cb(statEr)\n } else if (st.isDirectory()) {\n mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n } else if (unlink) {\n fs.unlink(part, er => {\n if (er) {\n return cb(er)\n }\n fs.mkdir(\n part,\n mode,\n onmkdir(\n part,\n parts,\n mode,\n cache,\n unlink,\n cwd,\n created,\n cb,\n ),\n )\n })\n } else if (st.isSymbolicLink()) {\n return cb(\n new SymlinkError(part, part + '/' + parts.join('/')),\n )\n } else {\n cb(er)\n }\n })\n } else {\n created = created || part\n mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n }\n }\n\nconst checkCwdSync = (dir: string) => {\n let ok = false\n let code: string | undefined = undefined\n try {\n ok = fs.statSync(dir).isDirectory()\n } catch (er) {\n code = (er as NodeJS.ErrnoException)?.code\n } finally {\n if (!ok) {\n throw new CwdError(dir, code ?? 'ENOTDIR')\n }\n }\n}\n\nexport const mkdirSync = (dir: string, opt: MkdirOptions) => {\n dir = normalizeWindowsPath(dir)\n // if there's any overlap between mask and mode,\n // then we'll need an explicit chmod\n /* c8 ignore next */\n const umask = opt.umask ?? 0o22\n const mode = opt.mode | 0o700\n const needChmod = (mode & umask) !== 0\n\n const uid = opt.uid\n const gid = opt.gid\n const doChown =\n typeof uid === 'number' &&\n typeof gid === 'number' &&\n (uid !== opt.processUid || gid !== opt.processGid)\n\n const preserve = opt.preserve\n const unlink = opt.unlink\n const cache = opt.cache\n const cwd = normalizeWindowsPath(opt.cwd)\n\n const done = (created?: string | undefined) => {\n cSet(cache, dir, true)\n if (created && doChown) {\n chownrSync(created, uid, gid)\n }\n if (needChmod) {\n fs.chmodSync(dir, mode)\n }\n }\n\n if (cache && cGet(cache, dir) === true) {\n return done()\n }\n\n if (dir === cwd) {\n checkCwdSync(cwd)\n return done()\n }\n\n if (preserve) {\n return done(mkdirpSync(dir, mode) ?? undefined)\n }\n\n const sub = normalizeWindowsPath(path.relative(cwd, dir))\n const parts = sub.split('/')\n let created: string | undefined = undefined\n for (\n let p = parts.shift(), part = cwd;\n p && (part += '/' + p);\n p = parts.shift()\n ) {\n part = normalizeWindowsPath(path.resolve(part))\n if (cGet(cache, part)) {\n continue\n }\n\n try {\n fs.mkdirSync(part, mode)\n created = created || part\n cSet(cache, part, true)\n } catch (er) {\n const st = fs.lstatSync(part)\n if (st.isDirectory()) {\n cSet(cache, part, true)\n continue\n } else if (unlink) {\n fs.unlinkSync(part)\n fs.mkdirSync(part, mode)\n created = created || part\n cSet(cache, part, true)\n continue\n } else if (st.isSymbolicLink()) {\n return new SymlinkError(part, part + '/' + parts.join('/'))\n }\n }\n }\n\n return done(created)\n}\n"]}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mode-fix.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export declare const modeFix: (mode: number, isDir: boolean, portable: boolean) => number;
|
| 2 |
+
//# sourceMappingURL=mode-fix.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mode-fix.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"mode-fix.d.ts","sourceRoot":"","sources":["../../src/mode-fix.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SACZ,MAAM,SACL,OAAO,YACJ,OAAO,WA0BlB,CAAA"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mode-fix.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export const modeFix = (mode, isDir, portable) => {
|
| 2 |
+
mode &= 0o7777;
|
| 3 |
+
// in portable mode, use the minimum reasonable umask
|
| 4 |
+
// if this system creates files with 0o664 by default
|
| 5 |
+
// (as some linux distros do), then we'll write the
|
| 6 |
+
// archive with 0o644 instead. Also, don't ever create
|
| 7 |
+
// a file that is not readable/writable by the owner.
|
| 8 |
+
if (portable) {
|
| 9 |
+
mode = (mode | 0o600) & ~0o22;
|
| 10 |
+
}
|
| 11 |
+
// if dirs are readable, then they should be listable
|
| 12 |
+
if (isDir) {
|
| 13 |
+
if (mode & 0o400) {
|
| 14 |
+
mode |= 0o100;
|
| 15 |
+
}
|
| 16 |
+
if (mode & 0o40) {
|
| 17 |
+
mode |= 0o10;
|
| 18 |
+
}
|
| 19 |
+
if (mode & 0o4) {
|
| 20 |
+
mode |= 0o1;
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
return mode;
|
| 24 |
+
};
|
| 25 |
+
//# sourceMappingURL=mode-fix.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/mode-fix.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"mode-fix.js","sourceRoot":"","sources":["../../src/mode-fix.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,IAAY,EACZ,KAAc,EACd,QAAiB,EACjB,EAAE;IACF,IAAI,IAAI,MAAM,CAAA;IAEd,qDAAqD;IACrD,qDAAqD;IACrD,mDAAmD;IACnD,uDAAuD;IACvD,qDAAqD;IACrD,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAA;IAC/B,CAAC;IAED,qDAAqD;IACrD,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,IAAI,GAAG,KAAK,EAAE,CAAC;YACjB,IAAI,IAAI,KAAK,CAAA;QACf,CAAC;QACD,IAAI,IAAI,GAAG,IAAI,EAAE,CAAC;YAChB,IAAI,IAAI,IAAI,CAAA;QACd,CAAC;QACD,IAAI,IAAI,GAAG,GAAG,EAAE,CAAC;YACf,IAAI,IAAI,GAAG,CAAA;QACb,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA","sourcesContent":["export const modeFix = (\n mode: number,\n isDir: boolean,\n portable: boolean,\n) => {\n mode &= 0o7777\n\n // in portable mode, use the minimum reasonable umask\n // if this system creates files with 0o664 by default\n // (as some linux distros do), then we'll write the\n // archive with 0o644 instead. Also, don't ever create\n // a file that is not readable/writable by the owner.\n if (portable) {\n mode = (mode | 0o600) & ~0o22\n }\n\n // if dirs are readable, then they should be listable\n if (isDir) {\n if (mode & 0o400) {\n mode |= 0o100\n }\n if (mode & 0o40) {\n mode |= 0o10\n }\n if (mode & 0o4) {\n mode |= 0o1\n }\n }\n return mode\n}\n"]}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-unicode.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export declare const normalizeUnicode: (s: string) => any;
|
| 2 |
+
//# sourceMappingURL=normalize-unicode.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-unicode.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"normalize-unicode.d.ts","sourceRoot":"","sources":["../../src/normalize-unicode.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAO,MAAM,QAKzC,CAAA"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-unicode.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// warning: extremely hot code path.
|
| 2 |
+
// This has been meticulously optimized for use
|
| 3 |
+
// within npm install on large package trees.
|
| 4 |
+
// Do not edit without careful benchmarking.
|
| 5 |
+
const normalizeCache = Object.create(null);
|
| 6 |
+
const { hasOwnProperty } = Object.prototype;
|
| 7 |
+
export const normalizeUnicode = (s) => {
|
| 8 |
+
if (!hasOwnProperty.call(normalizeCache, s)) {
|
| 9 |
+
normalizeCache[s] = s.normalize('NFD');
|
| 10 |
+
}
|
| 11 |
+
return normalizeCache[s];
|
| 12 |
+
};
|
| 13 |
+
//# sourceMappingURL=normalize-unicode.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-unicode.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"normalize-unicode.js","sourceRoot":"","sources":["../../src/normalize-unicode.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,+CAA+C;AAC/C,6CAA6C;AAC7C,4CAA4C;AAC5C,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAC1C,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC,SAAS,CAAA;AAC3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAS,EAAE,EAAE;IAC5C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC;QAC5C,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;IACxC,CAAC;IACD,OAAO,cAAc,CAAC,CAAC,CAAC,CAAA;AAC1B,CAAC,CAAA","sourcesContent":["// warning: extremely hot code path.\n// This has been meticulously optimized for use\n// within npm install on large package trees.\n// Do not edit without careful benchmarking.\nconst normalizeCache = Object.create(null)\nconst { hasOwnProperty } = Object.prototype\nexport const normalizeUnicode = (s: string) => {\n if (!hasOwnProperty.call(normalizeCache, s)) {\n normalizeCache[s] = s.normalize('NFD')\n }\n return normalizeCache[s]\n}\n"]}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-windows-path.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export declare const normalizeWindowsPath: (p: string) => string;
|
| 2 |
+
//# sourceMappingURL=normalize-windows-path.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"normalize-windows-path.d.ts","sourceRoot":"","sources":["../../src/normalize-windows-path.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,MAEzB,MAAM,WAC+B,CAAA"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-windows-path.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// on windows, either \ or / are valid directory separators.
|
| 2 |
+
// on unix, \ is a valid character in filenames.
|
| 3 |
+
// so, on windows, and only on windows, we replace all \ chars with /,
|
| 4 |
+
// so that we can use / as our one and only directory separator char.
|
| 5 |
+
const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
| 6 |
+
export const normalizeWindowsPath = platform !== 'win32' ?
|
| 7 |
+
(p) => p
|
| 8 |
+
: (p) => p && p.replace(/\\/g, '/');
|
| 9 |
+
//# sourceMappingURL=normalize-windows-path.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/normalize-windows-path.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"normalize-windows-path.js","sourceRoot":"","sources":["../../src/normalize-windows-path.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,gDAAgD;AAChD,sEAAsE;AACtE,qEAAqE;AAErE,MAAM,QAAQ,GACZ,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAE3D,MAAM,CAAC,MAAM,oBAAoB,GAC/B,QAAQ,KAAK,OAAO,CAAC,CAAC;IACpB,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA","sourcesContent":["// on windows, either \\ or / are valid directory separators.\n// on unix, \\ is a valid character in filenames.\n// so, on windows, and only on windows, we replace all \\ chars with /,\n// so that we can use / as our one and only directory separator char.\n\nconst platform =\n process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\n\nexport const normalizeWindowsPath =\n platform !== 'win32' ?\n (p: string) => p\n : (p: string) => p && p.replace(/\\\\/g, '/')\n"]}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/ui/node_modules/tar/dist/esm/options.d.ts
ADDED
|
@@ -0,0 +1,605 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/// <reference types="node" resolution-mode="require"/>
|
| 2 |
+
import { type GzipOptions, type ZlibOptions } from 'minizlib';
|
| 3 |
+
import { type Stats } from 'node:fs';
|
| 4 |
+
import { type ReadEntry } from './read-entry.js';
|
| 5 |
+
import { type WarnData } from './warn-method.js';
|
| 6 |
+
import { WriteEntry } from './write-entry.js';
|
| 7 |
+
/**
|
| 8 |
+
* The options that can be provided to tar commands.
|
| 9 |
+
*
|
| 10 |
+
* Note that some of these are only relevant for certain commands, since
|
| 11 |
+
* they are specific to reading or writing.
|
| 12 |
+
*
|
| 13 |
+
* Aliases are provided in the {@link TarOptionsWithAliases} type.
|
| 14 |
+
*/
|
| 15 |
+
export interface TarOptions {
|
| 16 |
+
/**
|
| 17 |
+
* Perform all I/O operations synchronously. If the stream is ended
|
| 18 |
+
* immediately, then it will be processed entirely synchronously.
|
| 19 |
+
*/
|
| 20 |
+
sync?: boolean;
|
| 21 |
+
/**
|
| 22 |
+
* The tar file to be read and/or written. When this is set, a stream
|
| 23 |
+
* is not returned. Asynchronous commands will return a promise indicating
|
| 24 |
+
* when the operation is completed, and synchronous commands will return
|
| 25 |
+
* immediately.
|
| 26 |
+
*/
|
| 27 |
+
file?: string;
|
| 28 |
+
/**
|
| 29 |
+
* Treat warnings as crash-worthy errors. Defaults false.
|
| 30 |
+
*/
|
| 31 |
+
strict?: boolean;
|
| 32 |
+
/**
|
| 33 |
+
* The effective current working directory for this tar command
|
| 34 |
+
*/
|
| 35 |
+
cwd?: string;
|
| 36 |
+
/**
|
| 37 |
+
* When creating a tar archive, this can be used to compress it as well.
|
| 38 |
+
* Set to `true` to use the default gzip options, or customize them as
|
| 39 |
+
* needed.
|
| 40 |
+
*
|
| 41 |
+
* When reading, if this is unset, then the compression status will be
|
| 42 |
+
* inferred from the archive data. This is generally best, unless you are
|
| 43 |
+
* sure of the compression settings in use to create the archive, and want to
|
| 44 |
+
* fail if the archive doesn't match expectations.
|
| 45 |
+
*/
|
| 46 |
+
gzip?: boolean | GzipOptions;
|
| 47 |
+
/**
|
| 48 |
+
* When creating archives, preserve absolute and `..` paths in the archive,
|
| 49 |
+
* rather than sanitizing them under the cwd.
|
| 50 |
+
*
|
| 51 |
+
* When extracting, allow absolute paths, paths containing `..`, and
|
| 52 |
+
* extracting through symbolic links. By default, the root `/` is stripped
|
| 53 |
+
* from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing
|
| 54 |
+
* `..` are not extracted, and any file whose location would be modified by a
|
| 55 |
+
* symbolic link is not extracted.
|
| 56 |
+
*
|
| 57 |
+
* **WARNING** This is almost always unsafe, and must NEVER be used on
|
| 58 |
+
* archives from untrusted sources, such as user input, and every entry must
|
| 59 |
+
* be validated to ensure it is safe to write. Even if the input is not
|
| 60 |
+
* malicious, mistakes can cause a lot of damage!
|
| 61 |
+
*/
|
| 62 |
+
preservePaths?: boolean;
|
| 63 |
+
/**
|
| 64 |
+
* When extracting, do not set the `mtime` value for extracted entries to
|
| 65 |
+
* match the `mtime` in the archive.
|
| 66 |
+
*
|
| 67 |
+
* When creating archives, do not store the `mtime` value in the entry. Note
|
| 68 |
+
* that this prevents properly using other mtime-based features (such as
|
| 69 |
+
* `tar.update` or the `newer` option) with the resulting archive.
|
| 70 |
+
*/
|
| 71 |
+
noMtime?: boolean;
|
| 72 |
+
/**
|
| 73 |
+
* Set to `true` or an object with settings for `zlib.BrotliCompress()` to
|
| 74 |
+
* create a brotli-compressed archive
|
| 75 |
+
*
|
| 76 |
+
* When extracting, this will cause the archive to be treated as a
|
| 77 |
+
* brotli-compressed file if set to `true` or a ZlibOptions object.
|
| 78 |
+
*
|
| 79 |
+
* If set `false`, then brotli options will not be used.
|
| 80 |
+
*
|
| 81 |
+
* If both this and the `gzip` option are left `undefined`, then tar will
|
| 82 |
+
* attempt to infer the brotli compression status, but can only do so based
|
| 83 |
+
* on the filename. If the filename ends in `.tbr` or `.tar.br`, and the
|
| 84 |
+
* first 512 bytes are not a valid tar header, then brotli decompression
|
| 85 |
+
* will be attempted.
|
| 86 |
+
*/
|
| 87 |
+
brotli?: boolean | ZlibOptions;
|
| 88 |
+
/**
|
| 89 |
+
* A function that is called with `(path, stat)` when creating an archive, or
|
| 90 |
+
* `(path, entry)` when extracting. Return true to process the file/entry, or
|
| 91 |
+
* false to exclude it.
|
| 92 |
+
*/
|
| 93 |
+
filter?: (path: string, entry: Stats | ReadEntry) => boolean;
|
| 94 |
+
/**
|
| 95 |
+
* A function that gets called for any warning encountered.
|
| 96 |
+
*
|
| 97 |
+
* Note: if `strict` is set, then the warning will throw, and this method
|
| 98 |
+
* will not be called.
|
| 99 |
+
*/
|
| 100 |
+
onwarn?: (code: string, message: string, data: WarnData) => any;
|
| 101 |
+
/**
|
| 102 |
+
* When extracting, unlink files before creating them. Without this option,
|
| 103 |
+
* tar overwrites existing files, which preserves existing hardlinks. With
|
| 104 |
+
* this option, existing hardlinks will be broken, as will any symlink that
|
| 105 |
+
* would affect the location of an extracted file.
|
| 106 |
+
*/
|
| 107 |
+
unlink?: boolean;
|
| 108 |
+
/**
|
| 109 |
+
* When extracting, strip the specified number of path portions from the
|
| 110 |
+
* entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be
|
| 111 |
+
* extracted to `{cwd}/c/d`.
|
| 112 |
+
*
|
| 113 |
+
* Any entry whose entire path is stripped will be excluded.
|
| 114 |
+
*/
|
| 115 |
+
strip?: number;
|
| 116 |
+
/**
|
| 117 |
+
* When extracting, keep the existing file on disk if it's newer than the
|
| 118 |
+
* file in the archive.
|
| 119 |
+
*/
|
| 120 |
+
newer?: boolean;
|
| 121 |
+
/**
|
| 122 |
+
* When extracting, do not overwrite existing files at all.
|
| 123 |
+
*/
|
| 124 |
+
keep?: boolean;
|
| 125 |
+
/**
|
| 126 |
+
* When extracting, set the `uid` and `gid` of extracted entries to the `uid`
|
| 127 |
+
* and `gid` fields in the archive. Defaults to true when run as root, and
|
| 128 |
+
* false otherwise.
|
| 129 |
+
*
|
| 130 |
+
* If false, then files and directories will be set with the owner and group
|
| 131 |
+
* of the user running the process. This is similar to `-p` in `tar(1)`, but
|
| 132 |
+
* ACLs and other system-specific data is never unpacked in this
|
| 133 |
+
* implementation, and modes are set by default already.
|
| 134 |
+
*/
|
| 135 |
+
preserveOwner?: boolean;
|
| 136 |
+
/**
|
| 137 |
+
* The maximum depth of subfolders to extract into. This defaults to 1024.
|
| 138 |
+
* Anything deeper than the limit will raise a warning and skip the entry.
|
| 139 |
+
* Set to `Infinity` to remove the limitation.
|
| 140 |
+
*/
|
| 141 |
+
maxDepth?: number;
|
| 142 |
+
/**
|
| 143 |
+
* When extracting, force all created files and directories, and all
|
| 144 |
+
* implicitly created directories, to be owned by the specified user id,
|
| 145 |
+
* regardless of the `uid` field in the archive.
|
| 146 |
+
*
|
| 147 |
+
* Cannot be used along with `preserveOwner`. Requires also setting the `gid`
|
| 148 |
+
* option.
|
| 149 |
+
*/
|
| 150 |
+
uid?: number;
|
| 151 |
+
/**
|
| 152 |
+
* When extracting, force all created files and directories, and all
|
| 153 |
+
* implicitly created directories, to be owned by the specified group id,
|
| 154 |
+
* regardless of the `gid` field in the archive.
|
| 155 |
+
*
|
| 156 |
+
* Cannot be used along with `preserveOwner`. Requires also setting the `uid`
|
| 157 |
+
* option.
|
| 158 |
+
*/
|
| 159 |
+
gid?: number;
|
| 160 |
+
/**
|
| 161 |
+
* When extracting, provide a function that takes an `entry` object, and
|
| 162 |
+
* returns a stream, or any falsey value. If a stream is provided, then that
|
| 163 |
+
* stream's data will be written instead of the contents of the archive
|
| 164 |
+
* entry. If a falsey value is provided, then the entry is written to disk as
|
| 165 |
+
* normal.
|
| 166 |
+
*
|
| 167 |
+
* To exclude items from extraction, use the `filter` option.
|
| 168 |
+
*
|
| 169 |
+
* Note that using an asynchronous stream type with the `transform` option
|
| 170 |
+
* will cause undefined behavior in synchronous extractions.
|
| 171 |
+
* [MiniPass](http://npm.im/minipass)-based streams are designed for this use
|
| 172 |
+
* case.
|
| 173 |
+
*/
|
| 174 |
+
transform?: (entry: ReadEntry) => any;
|
| 175 |
+
/**
|
| 176 |
+
* Call `chmod()` to ensure that extracted files match the entry's mode
|
| 177 |
+
* field. Without this field set, all mode fields in archive entries are a
|
| 178 |
+
* best effort attempt only.
|
| 179 |
+
*
|
| 180 |
+
* Setting this necessitates a call to the deprecated `process.umask()`
|
| 181 |
+
* method to determine the default umask value, unless a `processUmask`
|
| 182 |
+
* config is provided as well.
|
| 183 |
+
*
|
| 184 |
+
* If not set, tar will attempt to create file system entries with whatever
|
| 185 |
+
* mode is provided, and let the implicit process `umask` apply normally, but
|
| 186 |
+
* if a file already exists to be written to, then its existing mode will not
|
| 187 |
+
* be modified.
|
| 188 |
+
*
|
| 189 |
+
* When setting `chmod: true`, it is highly recommend to set the
|
| 190 |
+
* {@link TarOptions#processUmask} option as well, to avoid the call to the
|
| 191 |
+
* deprecated (and thread-unsafe) `process.umask()` method.
|
| 192 |
+
*/
|
| 193 |
+
chmod?: boolean;
|
| 194 |
+
/**
|
| 195 |
+
* When setting the {@link TarOptions#chmod} option to `true`, you may
|
| 196 |
+
* provide a value here to avoid having to call the deprecated and
|
| 197 |
+
* thread-unsafe `process.umask()` method.
|
| 198 |
+
*
|
| 199 |
+
* This has no effect with `chmod` is not set to true, as mode values are not
|
| 200 |
+
* set explicitly anyway. If `chmod` is set to `true`, and a value is not
|
| 201 |
+
* provided here, then `process.umask()` must be called, which will result in
|
| 202 |
+
* deprecation warnings.
|
| 203 |
+
*
|
| 204 |
+
* The most common values for this are `0o22` (resulting in directories
|
| 205 |
+
* created with mode `0o755` and files with `0o644` by default) and `0o2`
|
| 206 |
+
* (resulting in directores created with mode `0o775` and files `0o664`, so
|
| 207 |
+
* they are group-writable).
|
| 208 |
+
*/
|
| 209 |
+
processUmask?: number;
|
| 210 |
+
/**
|
| 211 |
+
* When parsing/listing archives, `entry` streams are by default resumed
|
| 212 |
+
* (set into "flowing" mode) immediately after the call to `onReadEntry()`.
|
| 213 |
+
* Set `noResume: true` to suppress this behavior.
|
| 214 |
+
*
|
| 215 |
+
* Note that when this is set, the stream will never complete until the
|
| 216 |
+
* data is consumed somehow.
|
| 217 |
+
*
|
| 218 |
+
* Set automatically in extract operations, since the entry is piped to
|
| 219 |
+
* a file system entry right away. Only relevant when parsing.
|
| 220 |
+
*/
|
| 221 |
+
noResume?: boolean;
|
| 222 |
+
/**
|
| 223 |
+
* When creating, updating, or replacing within archives, this method will
|
| 224 |
+
* be called with each WriteEntry that is created.
|
| 225 |
+
*/
|
| 226 |
+
onWriteEntry?: (entry: WriteEntry) => any;
|
| 227 |
+
/**
|
| 228 |
+
* When extracting or listing archives, this method will be called with
|
| 229 |
+
* each entry that is not excluded by a `filter`.
|
| 230 |
+
*
|
| 231 |
+
* Important when listing archives synchronously from a file, because there
|
| 232 |
+
* is otherwise no way to interact with the data!
|
| 233 |
+
*/
|
| 234 |
+
onReadEntry?: (entry: ReadEntry) => any;
|
| 235 |
+
/**
|
| 236 |
+
* Pack the targets of symbolic links rather than the link itself.
|
| 237 |
+
*/
|
| 238 |
+
follow?: boolean;
|
| 239 |
+
/**
|
| 240 |
+
* When creating archives, omit any metadata that is system-specific:
|
| 241 |
+
* `ctime`, `atime`, `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and
|
| 242 |
+
* `nlink`. Note that `mtime` is still included, because this is necessary
|
| 243 |
+
* for other time-based operations such as `tar.update`. Additionally, `mode`
|
| 244 |
+
* is set to a "reasonable default" for mose unix systems, based on an
|
| 245 |
+
* effective `umask` of `0o22`.
|
| 246 |
+
*
|
| 247 |
+
* This also defaults the `portable` option in the gzip configs when creating
|
| 248 |
+
* a compressed archive, in order to produce deterministic archives that are
|
| 249 |
+
* not operating-system specific.
|
| 250 |
+
*/
|
| 251 |
+
portable?: boolean;
|
| 252 |
+
/**
|
| 253 |
+
* When creating archives, do not recursively archive the contents of
|
| 254 |
+
* directories. By default, archiving a directory archives all of its
|
| 255 |
+
* contents as well.
|
| 256 |
+
*/
|
| 257 |
+
noDirRecurse?: boolean;
|
| 258 |
+
/**
|
| 259 |
+
* Suppress Pax extended headers when creating archives. Note that this means
|
| 260 |
+
* long paths and linkpaths will be truncated, and large or negative numeric
|
| 261 |
+
* values may be interpreted incorrectly.
|
| 262 |
+
*/
|
| 263 |
+
noPax?: boolean;
|
| 264 |
+
/**
|
| 265 |
+
* Set to a `Date` object to force a specific `mtime` value for everything
|
| 266 |
+
* written to an archive.
|
| 267 |
+
*
|
| 268 |
+
* This is useful when creating archives that are intended to be
|
| 269 |
+
* deterministic based on their contents, irrespective of the file's last
|
| 270 |
+
* modification time.
|
| 271 |
+
*
|
| 272 |
+
* Overridden by `noMtime`.
|
| 273 |
+
*/
|
| 274 |
+
mtime?: Date;
|
| 275 |
+
/**
|
| 276 |
+
* A path portion to prefix onto the entries added to an archive.
|
| 277 |
+
*/
|
| 278 |
+
prefix?: string;
|
| 279 |
+
/**
|
| 280 |
+
* The mode to set on any created file archive, defaults to 0o666
|
| 281 |
+
* masked by the process umask, often resulting in 0o644.
|
| 282 |
+
*
|
| 283 |
+
* This does *not* affect the mode fields of individual entries, or the
|
| 284 |
+
* mode status of extracted entries on the filesystem.
|
| 285 |
+
*/
|
| 286 |
+
mode?: number;
|
| 287 |
+
/**
|
| 288 |
+
* A cache of mtime values, to avoid having to stat the same file repeatedly.
|
| 289 |
+
*
|
| 290 |
+
* @internal
|
| 291 |
+
*/
|
| 292 |
+
mtimeCache?: Map<string, Date>;
|
| 293 |
+
/**
|
| 294 |
+
* maximum buffer size for `fs.read()` operations.
|
| 295 |
+
*
|
| 296 |
+
* @internal
|
| 297 |
+
*/
|
| 298 |
+
maxReadSize?: number;
|
| 299 |
+
/**
|
| 300 |
+
* Filter modes of entries being unpacked, like `process.umask()`
|
| 301 |
+
*
|
| 302 |
+
* @internal
|
| 303 |
+
*/
|
| 304 |
+
umask?: number;
|
| 305 |
+
/**
|
| 306 |
+
* Default mode for directories. Used for all implicitly created directories,
|
| 307 |
+
* and any directories in the archive that do not have a mode field.
|
| 308 |
+
*
|
| 309 |
+
* @internal
|
| 310 |
+
*/
|
| 311 |
+
dmode?: number;
|
| 312 |
+
/**
|
| 313 |
+
* default mode for files
|
| 314 |
+
*
|
| 315 |
+
* @internal
|
| 316 |
+
*/
|
| 317 |
+
fmode?: number;
|
| 318 |
+
/**
|
| 319 |
+
* Map that tracks which directories already exist, for extraction
|
| 320 |
+
*
|
| 321 |
+
* @internal
|
| 322 |
+
*/
|
| 323 |
+
dirCache?: Map<string, boolean>;
|
| 324 |
+
/**
|
| 325 |
+
* maximum supported size of meta entries. Defaults to 1MB
|
| 326 |
+
*
|
| 327 |
+
* @internal
|
| 328 |
+
*/
|
| 329 |
+
maxMetaEntrySize?: number;
|
| 330 |
+
/**
|
| 331 |
+
* A Map object containing the device and inode value for any file whose
|
| 332 |
+
* `nlink` value is greater than 1, to identify hard links when creating
|
| 333 |
+
* archives.
|
| 334 |
+
*
|
| 335 |
+
* @internal
|
| 336 |
+
*/
|
| 337 |
+
linkCache?: Map<LinkCacheKey, string>;
|
| 338 |
+
/**
|
| 339 |
+
* A map object containing the results of `fs.readdir()` calls.
|
| 340 |
+
*
|
| 341 |
+
* @internal
|
| 342 |
+
*/
|
| 343 |
+
readdirCache?: Map<string, string[]>;
|
| 344 |
+
/**
|
| 345 |
+
* A cache of all `lstat` results, for use in creating archives.
|
| 346 |
+
*
|
| 347 |
+
* @internal
|
| 348 |
+
*/
|
| 349 |
+
statCache?: Map<string, Stats>;
|
| 350 |
+
/**
|
| 351 |
+
* Number of concurrent jobs to run when creating archives.
|
| 352 |
+
*
|
| 353 |
+
* Defaults to 4.
|
| 354 |
+
*
|
| 355 |
+
* @internal
|
| 356 |
+
*/
|
| 357 |
+
jobs?: number;
|
| 358 |
+
/**
|
| 359 |
+
* Automatically set to true on Windows systems.
|
| 360 |
+
*
|
| 361 |
+
* When extracting, causes behavior where filenames containing `<|>?:`
|
| 362 |
+
* characters are converted to windows-compatible escape sequences in the
|
| 363 |
+
* created filesystem entries.
|
| 364 |
+
*
|
| 365 |
+
* When packing, causes behavior where paths replace `\` with `/`, and
|
| 366 |
+
* filenames containing the windows-compatible escaped forms of `<|>?:` are
|
| 367 |
+
* converted to actual `<|>?:` characters in the archive.
|
| 368 |
+
*
|
| 369 |
+
* @internal
|
| 370 |
+
*/
|
| 371 |
+
win32?: boolean;
|
| 372 |
+
/**
|
| 373 |
+
* For `WriteEntry` objects, the absolute path to the entry on the
|
| 374 |
+
* filesystem. By default, this is `resolve(cwd, entry.path)`, but it can be
|
| 375 |
+
* overridden explicitly.
|
| 376 |
+
*
|
| 377 |
+
* @internal
|
| 378 |
+
*/
|
| 379 |
+
absolute?: string;
|
| 380 |
+
/**
|
| 381 |
+
* Used with Parser stream interface, to attach and take over when the
|
| 382 |
+
* stream is completely parsed. If this is set, then the prefinish,
|
| 383 |
+
* finish, and end events will not fire, and are the responsibility of
|
| 384 |
+
* the ondone method to emit properly.
|
| 385 |
+
*
|
| 386 |
+
* @internal
|
| 387 |
+
*/
|
| 388 |
+
ondone?: () => void;
|
| 389 |
+
/**
|
| 390 |
+
* Mostly for testing, but potentially useful in some cases.
|
| 391 |
+
* Forcibly trigger a chown on every entry, no matter what.
|
| 392 |
+
*/
|
| 393 |
+
forceChown?: boolean;
|
| 394 |
+
/**
|
| 395 |
+
* ambiguous deprecated name for {@link onReadEntry}
|
| 396 |
+
*
|
| 397 |
+
* @deprecated
|
| 398 |
+
*/
|
| 399 |
+
onentry?: (entry: ReadEntry) => any;
|
| 400 |
+
}
|
| 401 |
+
export type TarOptionsSync = TarOptions & {
|
| 402 |
+
sync: true;
|
| 403 |
+
};
|
| 404 |
+
export type TarOptionsAsync = TarOptions & {
|
| 405 |
+
sync?: false;
|
| 406 |
+
};
|
| 407 |
+
export type TarOptionsFile = TarOptions & {
|
| 408 |
+
file: string;
|
| 409 |
+
};
|
| 410 |
+
export type TarOptionsNoFile = TarOptions & {
|
| 411 |
+
file?: undefined;
|
| 412 |
+
};
|
| 413 |
+
export type TarOptionsSyncFile = TarOptionsSync & TarOptionsFile;
|
| 414 |
+
export type TarOptionsAsyncFile = TarOptionsAsync & TarOptionsFile;
|
| 415 |
+
export type TarOptionsSyncNoFile = TarOptionsSync & TarOptionsNoFile;
|
| 416 |
+
export type TarOptionsAsyncNoFile = TarOptionsAsync & TarOptionsNoFile;
|
| 417 |
+
export type LinkCacheKey = `${number}:${number}`;
|
| 418 |
+
export interface TarOptionsWithAliases extends TarOptions {
|
| 419 |
+
/**
|
| 420 |
+
* The effective current working directory for this tar command
|
| 421 |
+
*/
|
| 422 |
+
C?: TarOptions['cwd'];
|
| 423 |
+
/**
|
| 424 |
+
* The tar file to be read and/or written. When this is set, a stream
|
| 425 |
+
* is not returned. Asynchronous commands will return a promise indicating
|
| 426 |
+
* when the operation is completed, and synchronous commands will return
|
| 427 |
+
* immediately.
|
| 428 |
+
*/
|
| 429 |
+
f?: TarOptions['file'];
|
| 430 |
+
/**
|
| 431 |
+
* When creating a tar archive, this can be used to compress it as well.
|
| 432 |
+
* Set to `true` to use the default gzip options, or customize them as
|
| 433 |
+
* needed.
|
| 434 |
+
*
|
| 435 |
+
* When reading, if this is unset, then the compression status will be
|
| 436 |
+
* inferred from the archive data. This is generally best, unless you are
|
| 437 |
+
* sure of the compression settings in use to create the archive, and want to
|
| 438 |
+
* fail if the archive doesn't match expectations.
|
| 439 |
+
*/
|
| 440 |
+
z?: TarOptions['gzip'];
|
| 441 |
+
/**
|
| 442 |
+
* When creating archives, preserve absolute and `..` paths in the archive,
|
| 443 |
+
* rather than sanitizing them under the cwd.
|
| 444 |
+
*
|
| 445 |
+
* When extracting, allow absolute paths, paths containing `..`, and
|
| 446 |
+
* extracting through symbolic links. By default, the root `/` is stripped
|
| 447 |
+
* from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing
|
| 448 |
+
* `..` are not extracted, and any file whose location would be modified by a
|
| 449 |
+
* symbolic link is not extracted.
|
| 450 |
+
*
|
| 451 |
+
* **WARNING** This is almost always unsafe, and must NEVER be used on
|
| 452 |
+
* archives from untrusted sources, such as user input, and every entry must
|
| 453 |
+
* be validated to ensure it is safe to write. Even if the input is not
|
| 454 |
+
* malicious, mistakes can cause a lot of damage!
|
| 455 |
+
*/
|
| 456 |
+
P?: TarOptions['preservePaths'];
|
| 457 |
+
/**
|
| 458 |
+
* When extracting, unlink files before creating them. Without this option,
|
| 459 |
+
* tar overwrites existing files, which preserves existing hardlinks. With
|
| 460 |
+
* this option, existing hardlinks will be broken, as will any symlink that
|
| 461 |
+
* would affect the location of an extracted file.
|
| 462 |
+
*/
|
| 463 |
+
U?: TarOptions['unlink'];
|
| 464 |
+
/**
|
| 465 |
+
* When extracting, strip the specified number of path portions from the
|
| 466 |
+
* entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be
|
| 467 |
+
* extracted to `{cwd}/c/d`.
|
| 468 |
+
*/
|
| 469 |
+
'strip-components'?: TarOptions['strip'];
|
| 470 |
+
/**
|
| 471 |
+
* When extracting, strip the specified number of path portions from the
|
| 472 |
+
* entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be
|
| 473 |
+
* extracted to `{cwd}/c/d`.
|
| 474 |
+
*/
|
| 475 |
+
stripComponents?: TarOptions['strip'];
|
| 476 |
+
/**
|
| 477 |
+
* When extracting, keep the existing file on disk if it's newer than the
|
| 478 |
+
* file in the archive.
|
| 479 |
+
*/
|
| 480 |
+
'keep-newer'?: TarOptions['newer'];
|
| 481 |
+
/**
|
| 482 |
+
* When extracting, keep the existing file on disk if it's newer than the
|
| 483 |
+
* file in the archive.
|
| 484 |
+
*/
|
| 485 |
+
keepNewer?: TarOptions['newer'];
|
| 486 |
+
/**
|
| 487 |
+
* When extracting, keep the existing file on disk if it's newer than the
|
| 488 |
+
* file in the archive.
|
| 489 |
+
*/
|
| 490 |
+
'keep-newer-files'?: TarOptions['newer'];
|
| 491 |
+
/**
|
| 492 |
+
* When extracting, keep the existing file on disk if it's newer than the
|
| 493 |
+
* file in the archive.
|
| 494 |
+
*/
|
| 495 |
+
keepNewerFiles?: TarOptions['newer'];
|
| 496 |
+
/**
|
| 497 |
+
* When extracting, do not overwrite existing files at all.
|
| 498 |
+
*/
|
| 499 |
+
k?: TarOptions['keep'];
|
| 500 |
+
/**
|
| 501 |
+
* When extracting, do not overwrite existing files at all.
|
| 502 |
+
*/
|
| 503 |
+
'keep-existing'?: TarOptions['keep'];
|
| 504 |
+
/**
|
| 505 |
+
* When extracting, do not overwrite existing files at all.
|
| 506 |
+
*/
|
| 507 |
+
keepExisting?: TarOptions['keep'];
|
| 508 |
+
/**
|
| 509 |
+
* When extracting, do not set the `mtime` value for extracted entries to
|
| 510 |
+
* match the `mtime` in the archive.
|
| 511 |
+
*
|
| 512 |
+
* When creating archives, do not store the `mtime` value in the entry. Note
|
| 513 |
+
* that this prevents properly using other mtime-based features (such as
|
| 514 |
+
* `tar.update` or the `newer` option) with the resulting archive.
|
| 515 |
+
*/
|
| 516 |
+
m?: TarOptions['noMtime'];
|
| 517 |
+
/**
|
| 518 |
+
* When extracting, do not set the `mtime` value for extracted entries to
|
| 519 |
+
* match the `mtime` in the archive.
|
| 520 |
+
*
|
| 521 |
+
* When creating archives, do not store the `mtime` value in the entry. Note
|
| 522 |
+
* that this prevents properly using other mtime-based features (such as
|
| 523 |
+
* `tar.update` or the `newer` option) with the resulting archive.
|
| 524 |
+
*/
|
| 525 |
+
'no-mtime'?: TarOptions['noMtime'];
|
| 526 |
+
/**
|
| 527 |
+
* When extracting, set the `uid` and `gid` of extracted entries to the `uid`
|
| 528 |
+
* and `gid` fields in the archive. Defaults to true when run as root, and
|
| 529 |
+
* false otherwise.
|
| 530 |
+
*
|
| 531 |
+
* If false, then files and directories will be set with the owner and group
|
| 532 |
+
* of the user running the process. This is similar to `-p` in `tar(1)`, but
|
| 533 |
+
* ACLs and other system-specific data is never unpacked in this
|
| 534 |
+
* implementation, and modes are set by default already.
|
| 535 |
+
*/
|
| 536 |
+
p?: TarOptions['preserveOwner'];
|
| 537 |
+
/**
|
| 538 |
+
* Pack the targets of symbolic links rather than the link itself.
|
| 539 |
+
*/
|
| 540 |
+
L?: TarOptions['follow'];
|
| 541 |
+
/**
|
| 542 |
+
* Pack the targets of symbolic links rather than the link itself.
|
| 543 |
+
*/
|
| 544 |
+
h?: TarOptions['follow'];
|
| 545 |
+
/**
|
| 546 |
+
* Deprecated option. Set explicitly false to set `chmod: true`. Ignored
|
| 547 |
+
* if {@link TarOptions#chmod} is set to any boolean value.
|
| 548 |
+
*
|
| 549 |
+
* @deprecated
|
| 550 |
+
*/
|
| 551 |
+
noChmod?: boolean;
|
| 552 |
+
}
|
| 553 |
+
export type TarOptionsWithAliasesSync = TarOptionsWithAliases & {
|
| 554 |
+
sync: true;
|
| 555 |
+
};
|
| 556 |
+
export type TarOptionsWithAliasesAsync = TarOptionsWithAliases & {
|
| 557 |
+
sync?: false;
|
| 558 |
+
};
|
| 559 |
+
export type TarOptionsWithAliasesFile = (TarOptionsWithAliases & {
|
| 560 |
+
file: string;
|
| 561 |
+
}) | (TarOptionsWithAliases & {
|
| 562 |
+
f: string;
|
| 563 |
+
});
|
| 564 |
+
export type TarOptionsWithAliasesSyncFile = TarOptionsWithAliasesSync & TarOptionsWithAliasesFile;
|
| 565 |
+
export type TarOptionsWithAliasesAsyncFile = TarOptionsWithAliasesAsync & TarOptionsWithAliasesFile;
|
| 566 |
+
export type TarOptionsWithAliasesNoFile = TarOptionsWithAliases & {
|
| 567 |
+
f?: undefined;
|
| 568 |
+
file?: undefined;
|
| 569 |
+
};
|
| 570 |
+
export type TarOptionsWithAliasesSyncNoFile = TarOptionsWithAliasesSync & TarOptionsWithAliasesNoFile;
|
| 571 |
+
export type TarOptionsWithAliasesAsyncNoFile = TarOptionsWithAliasesAsync & TarOptionsWithAliasesNoFile;
|
| 572 |
+
export declare const isSyncFile: <O extends TarOptions>(o: O) => o is O & TarOptions & {
|
| 573 |
+
sync: true;
|
| 574 |
+
} & {
|
| 575 |
+
file: string;
|
| 576 |
+
};
|
| 577 |
+
export declare const isAsyncFile: <O extends TarOptions>(o: O) => o is O & TarOptions & {
|
| 578 |
+
sync?: false | undefined;
|
| 579 |
+
} & {
|
| 580 |
+
file: string;
|
| 581 |
+
};
|
| 582 |
+
export declare const isSyncNoFile: <O extends TarOptions>(o: O) => o is O & TarOptions & {
|
| 583 |
+
sync: true;
|
| 584 |
+
} & {
|
| 585 |
+
file?: undefined;
|
| 586 |
+
};
|
| 587 |
+
export declare const isAsyncNoFile: <O extends TarOptions>(o: O) => o is O & TarOptions & {
|
| 588 |
+
sync?: false | undefined;
|
| 589 |
+
} & {
|
| 590 |
+
file?: undefined;
|
| 591 |
+
};
|
| 592 |
+
export declare const isSync: <O extends TarOptions>(o: O) => o is O & TarOptions & {
|
| 593 |
+
sync: true;
|
| 594 |
+
};
|
| 595 |
+
export declare const isAsync: <O extends TarOptions>(o: O) => o is O & TarOptions & {
|
| 596 |
+
sync?: false | undefined;
|
| 597 |
+
};
|
| 598 |
+
export declare const isFile: <O extends TarOptions>(o: O) => o is O & TarOptions & {
|
| 599 |
+
file: string;
|
| 600 |
+
};
|
| 601 |
+
export declare const isNoFile: <O extends TarOptions>(o: O) => o is O & TarOptions & {
|
| 602 |
+
file?: undefined;
|
| 603 |
+
};
|
| 604 |
+
export declare const dealias: (opt?: TarOptionsWithAliases) => TarOptions;
|
| 605 |
+
//# sourceMappingURL=options.d.ts.map
|