tar 7.5.24 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1705 -1147
- package/dist/commonjs/bytes.d.ts +21 -0
- package/dist/commonjs/bytes.d.ts.map +1 -0
- package/dist/commonjs/bytes.js +83 -0
- package/dist/commonjs/bytes.js.map +1 -0
- package/dist/commonjs/codec.d.ts +53 -0
- package/dist/commonjs/codec.d.ts.map +1 -0
- package/dist/commonjs/codec.js +35 -0
- package/dist/commonjs/codec.js.map +1 -0
- package/dist/commonjs/concat.d.ts +3 -0
- package/dist/commonjs/concat.d.ts.map +1 -0
- package/dist/commonjs/concat.js +20 -0
- package/dist/commonjs/concat.js.map +1 -0
- package/dist/commonjs/create.d.ts +39 -2
- package/dist/commonjs/create.d.ts.map +1 -1
- package/dist/commonjs/create.js +150 -64
- package/dist/commonjs/create.js.map +1 -1
- package/dist/commonjs/dealias.d.ts +79 -0
- package/dist/commonjs/dealias.d.ts.map +1 -0
- package/dist/commonjs/dealias.js +50 -0
- package/dist/commonjs/dealias.js.map +1 -0
- package/dist/commonjs/delete.d.ts +19 -0
- package/dist/commonjs/delete.d.ts.map +1 -0
- package/dist/commonjs/delete.js +121 -0
- package/dist/commonjs/delete.js.map +1 -0
- package/dist/commonjs/entries.d.ts +82 -0
- package/dist/commonjs/entries.d.ts.map +1 -0
- package/dist/commonjs/entries.js +398 -0
- package/dist/commonjs/entries.js.map +1 -0
- package/dist/commonjs/extract.d.ts +14 -2
- package/dist/commonjs/extract.d.ts.map +1 -1
- package/dist/commonjs/extract.js +40 -81
- package/dist/commonjs/extract.js.map +1 -1
- package/dist/commonjs/fs.d.ts +201 -0
- package/dist/commonjs/fs.d.ts.map +1 -0
- package/dist/commonjs/fs.js +5 -0
- package/dist/commonjs/fs.js.map +1 -0
- package/dist/commonjs/header.d.ts +4 -4
- package/dist/commonjs/header.d.ts.map +1 -1
- package/dist/commonjs/header.js +38 -42
- package/dist/commonjs/header.js.map +1 -1
- package/dist/commonjs/index.d.ts +25 -18
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +46 -18
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/index.min.js +2 -3
- package/dist/commonjs/index.min.js.map +4 -4
- package/dist/commonjs/large-numbers.d.ts +2 -2
- package/dist/commonjs/large-numbers.d.ts.map +1 -1
- package/dist/commonjs/large-numbers.js +4 -4
- package/dist/commonjs/large-numbers.js.map +1 -1
- package/dist/commonjs/list.d.ts +23 -6
- package/dist/commonjs/list.d.ts.map +1 -1
- package/dist/commonjs/list.js +99 -138
- package/dist/commonjs/list.js.map +1 -1
- package/dist/commonjs/mkdir.d.ts +16 -11
- package/dist/commonjs/mkdir.d.ts.map +1 -1
- package/dist/commonjs/mkdir.js +121 -159
- package/dist/commonjs/mkdir.js.map +1 -1
- package/dist/commonjs/options.d.ts +284 -513
- package/dist/commonjs/options.d.ts.map +1 -1
- package/dist/commonjs/options.js +20 -61
- package/dist/commonjs/options.js.map +1 -1
- package/dist/commonjs/pack.d.ts +150 -96
- package/dist/commonjs/pack.d.ts.map +1 -1
- package/dist/commonjs/pack.js +752 -445
- package/dist/commonjs/pack.js.map +1 -1
- package/dist/commonjs/parser.d.ts +94 -0
- package/dist/commonjs/parser.d.ts.map +1 -0
- package/dist/commonjs/parser.js +381 -0
- package/dist/commonjs/parser.js.map +1 -0
- package/dist/commonjs/path-reservations.d.ts +17 -7
- package/dist/commonjs/path-reservations.d.ts.map +1 -1
- package/dist/commonjs/path-reservations.js +96 -119
- package/dist/commonjs/path-reservations.js.map +1 -1
- package/dist/commonjs/path.d.ts +19 -0
- package/dist/commonjs/path.d.ts.map +1 -0
- package/dist/commonjs/path.js +90 -0
- package/dist/commonjs/path.js.map +1 -0
- package/dist/commonjs/pax.d.ts +3 -1
- package/dist/commonjs/pax.d.ts.map +1 -1
- package/dist/commonjs/pax.js +53 -43
- package/dist/commonjs/pax.js.map +1 -1
- package/dist/commonjs/read-entry.d.ts +97 -11
- package/dist/commonjs/read-entry.d.ts.map +1 -1
- package/dist/commonjs/read-entry.js +248 -97
- package/dist/commonjs/read-entry.js.map +1 -1
- package/dist/commonjs/read-file.d.ts +22 -0
- package/dist/commonjs/read-file.d.ts.map +1 -0
- package/dist/commonjs/read-file.js +104 -0
- package/dist/commonjs/read-file.js.map +1 -0
- package/dist/commonjs/replace.d.ts +45 -1
- package/dist/commonjs/replace.d.ts.map +1 -1
- package/dist/commonjs/replace.js +165 -211
- package/dist/commonjs/replace.js.map +1 -1
- package/dist/commonjs/server/codecs.d.ts +38 -0
- package/dist/commonjs/server/codecs.d.ts.map +1 -0
- package/dist/commonjs/server/codecs.js +252 -0
- package/dist/commonjs/server/codecs.js.map +1 -0
- package/dist/commonjs/server/index.d.ts +115 -0
- package/dist/commonjs/server/index.d.ts.map +1 -0
- package/dist/commonjs/server/index.js +166 -0
- package/dist/commonjs/server/index.js.map +1 -0
- package/dist/commonjs/server/index.min.js +3 -0
- package/dist/commonjs/server/index.min.js.map +7 -0
- package/dist/commonjs/strip-absolute-path.d.ts +8 -0
- package/dist/commonjs/strip-absolute-path.d.ts.map +1 -1
- package/dist/commonjs/strip-absolute-path.js +17 -20
- package/dist/commonjs/strip-absolute-path.js.map +1 -1
- package/dist/commonjs/to-stream.d.ts +7 -0
- package/dist/commonjs/to-stream.d.ts.map +1 -0
- package/dist/commonjs/to-stream.js +22 -0
- package/dist/commonjs/to-stream.js.map +1 -0
- package/dist/commonjs/types.d.ts +4 -3
- package/dist/commonjs/types.d.ts.map +1 -1
- package/dist/commonjs/types.js +4 -3
- package/dist/commonjs/types.js.map +1 -1
- package/dist/commonjs/unpack.d.ts +135 -89
- package/dist/commonjs/unpack.d.ts.map +1 -1
- package/dist/commonjs/unpack.js +760 -727
- package/dist/commonjs/unpack.js.map +1 -1
- package/dist/commonjs/update.d.ts +11 -1
- package/dist/commonjs/update.d.ts.map +1 -1
- package/dist/commonjs/update.js +37 -28
- package/dist/commonjs/update.js.map +1 -1
- package/dist/commonjs/warn.d.ts +27 -0
- package/dist/commonjs/warn.d.ts.map +1 -0
- package/dist/commonjs/warn.js +36 -0
- package/dist/commonjs/warn.js.map +1 -0
- package/dist/commonjs/win32-path.d.ts +16 -0
- package/dist/commonjs/win32-path.d.ts.map +1 -0
- package/dist/commonjs/win32-path.js +67 -0
- package/dist/commonjs/win32-path.js.map +1 -0
- package/dist/commonjs/write-entry.d.ts +64 -111
- package/dist/commonjs/write-entry.d.ts.map +1 -1
- package/dist/commonjs/write-entry.js +108 -672
- package/dist/commonjs/write-entry.js.map +1 -1
- package/dist/commonjs/write-flag.d.ts +18 -0
- package/dist/commonjs/write-flag.d.ts.map +1 -0
- package/dist/commonjs/write-flag.js +29 -0
- package/dist/commonjs/write-flag.js.map +1 -0
- package/dist/esm/bytes.d.ts +21 -0
- package/dist/esm/bytes.d.ts.map +1 -0
- package/dist/esm/bytes.js +72 -0
- package/dist/esm/bytes.js.map +1 -0
- package/dist/esm/codec.d.ts +53 -0
- package/dist/esm/codec.d.ts.map +1 -0
- package/dist/esm/codec.js +32 -0
- package/dist/esm/codec.js.map +1 -0
- package/dist/esm/concat.d.ts +3 -0
- package/dist/esm/concat.d.ts.map +1 -0
- package/dist/esm/concat.js +16 -0
- package/dist/esm/concat.js.map +1 -0
- package/dist/esm/create.d.ts +39 -2
- package/dist/esm/create.d.ts.map +1 -1
- package/dist/esm/create.js +144 -61
- package/dist/esm/create.js.map +1 -1
- package/dist/esm/dealias.d.ts +79 -0
- package/dist/esm/dealias.d.ts.map +1 -0
- package/dist/esm/dealias.js +46 -0
- package/dist/esm/dealias.js.map +1 -0
- package/dist/esm/delete.d.ts +19 -0
- package/dist/esm/delete.d.ts.map +1 -0
- package/dist/esm/delete.js +117 -0
- package/dist/esm/delete.js.map +1 -0
- package/dist/esm/entries.d.ts +82 -0
- package/dist/esm/entries.d.ts.map +1 -0
- package/dist/esm/entries.js +388 -0
- package/dist/esm/entries.js.map +1 -0
- package/dist/esm/extract.d.ts +14 -2
- package/dist/esm/extract.d.ts.map +1 -1
- package/dist/esm/extract.js +37 -44
- package/dist/esm/extract.js.map +1 -1
- package/dist/esm/fs.d.ts +201 -0
- package/dist/esm/fs.d.ts.map +1 -0
- package/dist/esm/fs.js +4 -0
- package/dist/esm/fs.js.map +1 -0
- package/dist/esm/header.d.ts +4 -4
- package/dist/esm/header.d.ts.map +1 -1
- package/dist/esm/header.js +38 -42
- package/dist/esm/header.js.map +1 -1
- package/dist/esm/index.d.ts +25 -18
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +23 -18
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +2 -3
- package/dist/esm/index.min.js.map +4 -4
- package/dist/esm/large-numbers.d.ts +2 -2
- package/dist/esm/large-numbers.d.ts.map +1 -1
- package/dist/esm/large-numbers.js +4 -4
- package/dist/esm/large-numbers.js.map +1 -1
- package/dist/esm/list.d.ts +23 -6
- package/dist/esm/list.d.ts.map +1 -1
- package/dist/esm/list.js +96 -101
- package/dist/esm/list.js.map +1 -1
- package/dist/esm/mkdir.d.ts +16 -11
- package/dist/esm/mkdir.d.ts.map +1 -1
- package/dist/esm/mkdir.js +119 -154
- package/dist/esm/mkdir.js.map +1 -1
- package/dist/esm/options.d.ts +284 -513
- package/dist/esm/options.d.ts.map +1 -1
- package/dist/esm/options.js +17 -51
- package/dist/esm/options.js.map +1 -1
- package/dist/esm/pack.d.ts +150 -96
- package/dist/esm/pack.d.ts.map +1 -1
- package/dist/esm/pack.js +750 -441
- package/dist/esm/pack.js.map +1 -1
- package/dist/esm/parser.d.ts +94 -0
- package/dist/esm/parser.d.ts.map +1 -0
- package/dist/esm/parser.js +377 -0
- package/dist/esm/parser.js.map +1 -0
- package/dist/esm/path-reservations.d.ts +17 -7
- package/dist/esm/path-reservations.d.ts.map +1 -1
- package/dist/esm/path-reservations.js +96 -119
- package/dist/esm/path-reservations.js.map +1 -1
- package/dist/esm/path.d.ts +19 -0
- package/dist/esm/path.d.ts.map +1 -0
- package/dist/esm/path.js +80 -0
- package/dist/esm/path.js.map +1 -0
- package/dist/esm/pax.d.ts +3 -1
- package/dist/esm/pax.d.ts.map +1 -1
- package/dist/esm/pax.js +52 -42
- package/dist/esm/pax.js.map +1 -1
- package/dist/esm/read-entry.d.ts +97 -11
- package/dist/esm/read-entry.d.ts.map +1 -1
- package/dist/esm/read-entry.js +245 -96
- package/dist/esm/read-entry.js.map +1 -1
- package/dist/esm/read-file.d.ts +22 -0
- package/dist/esm/read-file.d.ts.map +1 -0
- package/dist/esm/read-file.js +99 -0
- package/dist/esm/read-file.js.map +1 -0
- package/dist/esm/replace.d.ts +45 -1
- package/dist/esm/replace.d.ts.map +1 -1
- package/dist/esm/replace.js +161 -207
- package/dist/esm/replace.js.map +1 -1
- package/dist/esm/server/codecs.d.ts +38 -0
- package/dist/esm/server/codecs.d.ts.map +1 -0
- package/dist/esm/server/codecs.js +214 -0
- package/dist/esm/server/codecs.js.map +1 -0
- package/dist/esm/server/index.d.ts +115 -0
- package/dist/esm/server/index.d.ts.map +1 -0
- package/dist/esm/server/index.js +102 -0
- package/dist/esm/server/index.js.map +1 -0
- package/dist/esm/server/index.min.js +3 -0
- package/dist/esm/server/index.min.js.map +7 -0
- package/dist/esm/strip-absolute-path.d.ts +8 -0
- package/dist/esm/strip-absolute-path.d.ts.map +1 -1
- package/dist/esm/strip-absolute-path.js +17 -20
- package/dist/esm/strip-absolute-path.js.map +1 -1
- package/dist/esm/to-stream.d.ts +7 -0
- package/dist/esm/to-stream.d.ts.map +1 -0
- package/dist/esm/to-stream.js +18 -0
- package/dist/esm/to-stream.js.map +1 -0
- package/dist/esm/types.d.ts +4 -3
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/esm/types.js +4 -3
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/unpack.d.ts +135 -89
- package/dist/esm/unpack.d.ts.map +1 -1
- package/dist/esm/unpack.js +756 -721
- package/dist/esm/unpack.js.map +1 -1
- package/dist/esm/update.d.ts +11 -1
- package/dist/esm/update.d.ts.map +1 -1
- package/dist/esm/update.js +35 -28
- package/dist/esm/update.js.map +1 -1
- package/dist/esm/warn.d.ts +27 -0
- package/dist/esm/warn.d.ts.map +1 -0
- package/dist/esm/warn.js +31 -0
- package/dist/esm/warn.js.map +1 -0
- package/dist/esm/win32-path.d.ts +16 -0
- package/dist/esm/win32-path.d.ts.map +1 -0
- package/dist/esm/win32-path.js +60 -0
- package/dist/esm/win32-path.js.map +1 -0
- package/dist/esm/write-entry.d.ts +64 -111
- package/dist/esm/write-entry.d.ts.map +1 -1
- package/dist/esm/write-entry.js +107 -633
- package/dist/esm/write-entry.js.map +1 -1
- package/dist/esm/write-flag.d.ts +18 -0
- package/dist/esm/write-flag.d.ts.map +1 -0
- package/dist/esm/write-flag.js +25 -0
- package/dist/esm/write-flag.js.map +1 -0
- package/package.json +68 -224
- package/dist/commonjs/get-write-flag.d.ts +0 -2
- package/dist/commonjs/get-write-flag.d.ts.map +0 -1
- package/dist/commonjs/get-write-flag.js +0 -32
- package/dist/commonjs/get-write-flag.js.map +0 -1
- package/dist/commonjs/make-command.d.ts +0 -49
- package/dist/commonjs/make-command.d.ts.map +0 -1
- package/dist/commonjs/make-command.js +0 -52
- package/dist/commonjs/make-command.js.map +0 -1
- package/dist/commonjs/normalize-windows-path.d.ts +0 -2
- package/dist/commonjs/normalize-windows-path.d.ts.map +0 -1
- package/dist/commonjs/normalize-windows-path.js +0 -12
- package/dist/commonjs/normalize-windows-path.js.map +0 -1
- package/dist/commonjs/parse.d.ts +0 -92
- package/dist/commonjs/parse.d.ts.map +0 -1
- package/dist/commonjs/parse.js +0 -655
- package/dist/commonjs/parse.js.map +0 -1
- package/dist/commonjs/process-umask.d.ts +0 -2
- package/dist/commonjs/process-umask.d.ts.map +0 -1
- package/dist/commonjs/process-umask.js +0 -7
- package/dist/commonjs/process-umask.js.map +0 -1
- package/dist/commonjs/warn-method.d.ts +0 -24
- package/dist/commonjs/warn-method.d.ts.map +0 -1
- package/dist/commonjs/warn-method.js +0 -31
- package/dist/commonjs/warn-method.js.map +0 -1
- package/dist/esm/get-write-flag.d.ts +0 -2
- package/dist/esm/get-write-flag.d.ts.map +0 -1
- package/dist/esm/get-write-flag.js +0 -26
- package/dist/esm/get-write-flag.js.map +0 -1
- package/dist/esm/make-command.d.ts +0 -49
- package/dist/esm/make-command.d.ts.map +0 -1
- package/dist/esm/make-command.js +0 -48
- package/dist/esm/make-command.js.map +0 -1
- package/dist/esm/normalize-windows-path.d.ts +0 -2
- package/dist/esm/normalize-windows-path.d.ts.map +0 -1
- package/dist/esm/normalize-windows-path.js +0 -9
- package/dist/esm/normalize-windows-path.js.map +0 -1
- package/dist/esm/parse.d.ts +0 -92
- package/dist/esm/parse.d.ts.map +0 -1
- package/dist/esm/parse.js +0 -651
- package/dist/esm/parse.js.map +0 -1
- package/dist/esm/process-umask.d.ts +0 -2
- package/dist/esm/process-umask.d.ts.map +0 -1
- package/dist/esm/process-umask.js +0 -3
- package/dist/esm/process-umask.js.map +0 -1
- package/dist/esm/warn-method.d.ts +0 -24
- package/dist/esm/warn-method.d.ts.map +0 -1
- package/dist/esm/warn-method.js +0 -27
- package/dist/esm/warn-method.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,K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
CHANGED
|
@@ -1,66 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// turn tar(1) style args like `C` into the more verbose things like `cwd`
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
['p', 'preserveOwner'],
|
|
23
|
-
['L', 'follow'],
|
|
24
|
-
['h', 'follow'],
|
|
25
|
-
['onentry', 'onReadEntry'],
|
|
26
|
-
]);
|
|
27
|
-
const isSyncFile = (o) => !!o.sync && !!o.file;
|
|
28
|
-
exports.isSyncFile = isSyncFile;
|
|
29
|
-
const isAsyncFile = (o) => !o.sync && !!o.file;
|
|
30
|
-
exports.isAsyncFile = isAsyncFile;
|
|
31
|
-
const isSyncNoFile = (o) => !!o.sync && !o.file;
|
|
32
|
-
exports.isSyncNoFile = isSyncNoFile;
|
|
33
|
-
const isAsyncNoFile = (o) => !o.sync && !o.file;
|
|
34
|
-
exports.isAsyncNoFile = isAsyncNoFile;
|
|
35
|
-
const isSync = (o) => !!o.sync;
|
|
36
|
-
exports.isSync = isSync;
|
|
37
|
-
const isAsync = (o) => !o.sync;
|
|
38
|
-
exports.isAsync = isAsync;
|
|
39
|
-
const isFile = (o) => !!o.file;
|
|
40
|
-
exports.isFile = isFile;
|
|
41
|
-
const isNoFile = (o) => !o.file;
|
|
42
|
-
exports.isNoFile = isNoFile;
|
|
43
|
-
const dealiasKey = (k) => {
|
|
44
|
-
const d = argmap.get(k);
|
|
45
|
-
if (d)
|
|
46
|
-
return d;
|
|
47
|
-
return k;
|
|
48
|
-
};
|
|
49
|
-
const dealias = (opt = {}) => {
|
|
50
|
-
if (!opt)
|
|
51
|
-
return {};
|
|
52
|
-
const result = {};
|
|
53
|
-
for (const [key, v] of Object.entries(opt)) {
|
|
54
|
-
// TS doesn't know that aliases are going to always be the same type
|
|
55
|
-
const k = dealiasKey(key);
|
|
56
|
-
result[k] = v;
|
|
57
|
-
}
|
|
58
|
-
// affordance for deprecated noChmod -> chmod
|
|
59
|
-
if (result.chmod === undefined && result.noChmod === false) {
|
|
60
|
-
result.chmod = true;
|
|
3
|
+
exports.countOption = exports.ownOptions = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* A copy of the options with no prototype, so that an option that is
|
|
6
|
+
* not set cannot get a value from a changed `Object.prototype`.
|
|
7
|
+
*/
|
|
8
|
+
const ownOptions = (opt, more) => Object.assign(Object.create(null), opt, more);
|
|
9
|
+
exports.ownOptions = ownOptions;
|
|
10
|
+
/**
|
|
11
|
+
* The value of an option that is a count, such as `jobs`: the
|
|
12
|
+
* default if the option is not set or is 0, and a `TypeError` if the
|
|
13
|
+
* value is not a positive integer or `Infinity`.
|
|
14
|
+
*/
|
|
15
|
+
const countOption = (name, value, def) => {
|
|
16
|
+
if (value === undefined || value === null || value === 0)
|
|
17
|
+
return def;
|
|
18
|
+
if (value === Infinity ||
|
|
19
|
+
(Number.isInteger(value) && Number(value) > 0)) {
|
|
20
|
+
return value;
|
|
61
21
|
}
|
|
62
|
-
|
|
63
|
-
return result;
|
|
22
|
+
throw new TypeError(`${name} must be a positive integer`);
|
|
64
23
|
};
|
|
65
|
-
exports.
|
|
24
|
+
exports.countOption = countOption;
|
|
66
25
|
//# sourceMappingURL=options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":";AAAA,0EAA0E;;;AAQ1E,MAAM,MAAM,GAAG,IAAI,GAAG,CAAgD;IACpE,CAAC,GAAG,EAAE,KAAK,CAAC;IACZ,CAAC,GAAG,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,CAAC;IAC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AAO,CAAA;IACrB,OAAO,MAAoB,CAAA;AAC7B,CAAC,CAAA;AAjBY,QAAA,OAAO,WAiBnB","sourcesContent":["// turn tar(1) style args like `C` into the more verbose things like `cwd`\n\nimport { type GzipOptions, type ZlibOptions } from 'minizlib'\nimport { type Stats } from 'node:fs'\nimport { type ReadEntry } from './read-entry.js'\nimport { type WarnData } from './warn-method.js'\nimport type { WriteEntry } from './write-entry.js'\n\nconst argmap = new Map<keyof TarOptionsWithAliases, keyof TarOptions>([\n ['C', 'cwd'],\n ['f', 'file'],\n ['z', 'gzip'],\n ['P', 'preservePaths'],\n ['U', 'unlink'],\n ['strip-components', 'strip'],\n ['stripComponents', 'strip'],\n ['keep-newer', 'newer'],\n ['keepNewer', 'newer'],\n ['keep-newer-files', 'newer'],\n ['keepNewerFiles', 'newer'],\n ['k', 'keep'],\n ['keep-existing', 'keep'],\n ['keepExisting', 'keep'],\n ['m', 'noMtime'],\n ['no-mtime', 'noMtime'],\n ['p', 'preserveOwner'],\n ['L', 'follow'],\n ['h', 'follow'],\n ['onentry', 'onReadEntry'],\n])\n\n/**\n * The options that can be provided to tar commands.\n *\n * Note that some of these are only relevant for certain commands, since\n * they are specific to reading or writing.\n *\n * Aliases are provided in the {@link TarOptionsWithAliases} type.\n */\nexport interface TarOptions {\n //////////////////////////\n // shared options\n\n /**\n * Perform all I/O operations synchronously. If the stream is ended\n * immediately, then it will be processed entirely synchronously.\n */\n sync?: boolean\n\n /**\n * The tar file to be read and/or written. When this is set, a stream\n * is not returned. Asynchronous commands will return a promise indicating\n * when the operation is completed, and synchronous commands will return\n * immediately.\n */\n file?: string\n\n /**\n * Treat warnings as crash-worthy errors. Defaults false.\n */\n strict?: boolean\n\n /**\n * The effective current working directory for this tar command\n */\n cwd?: string\n\n /**\n * When creating a tar archive, this can be used to compress it as well.\n * Set to `true` to use the default gzip options, or customize them as\n * needed.\n *\n * When reading, if this is unset, then the compression status will be\n * inferred from the archive data. This is generally best, unless you are\n * sure of the compression settings in use to create the archive, and want to\n * fail if the archive doesn't match expectations.\n */\n gzip?: boolean | GzipOptions\n\n /**\n * When creating archives, preserve absolute and `..` paths in the archive,\n * rather than sanitizing them under the cwd.\n *\n * When extracting, allow absolute paths, paths containing `..`, and\n * extracting through symbolic links. By default, the root `/` is stripped\n * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing\n * `..` are not extracted, and any file whose location would be modified by a\n * symbolic link is not extracted.\n *\n * **WARNING** This is almost always unsafe, and must NEVER be used on\n * archives from untrusted sources, such as user input, and every entry must\n * be validated to ensure it is safe to write. Even if the input is not\n * malicious, mistakes can cause a lot of damage!\n */\n preservePaths?: boolean\n\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n noMtime?: boolean\n\n /**\n * Set to `true` or an object with settings for `zlib.BrotliCompress()` to\n * create a brotli-compressed archive\n *\n * When extracting, this will cause the archive to be treated as a\n * brotli-compressed file if set to `true` or a ZlibOptions object.\n *\n * If set `false`, then brotli options will not be used.\n *\n * If this, the `gzip`, and `zstd` options are left `undefined`, then tar\n * will attempt to infer the brotli compression status, but can only do so\n * based on the filename. If the filename ends in `.tbr` or `.tar.br`, and\n * the first 512 bytes are not a valid tar header, then brotli decompression\n * will be attempted.\n */\n brotli?: boolean | ZlibOptions\n\n /**\n * Set to `true` or an object with settings for `zstd.compress()` to\n * create a zstd-compressed archive\n *\n * When extracting, this will cause the archive to be treated as a\n * zstd-compressed file if set to `true` or a ZlibOptions object.\n *\n * If set `false`, then zstd options will not be used.\n *\n * If this, the `gzip`, and `brotli` options are left `undefined`, then tar\n * will attempt to infer the zstd compression status, but can only do so\n * based on the filename. If the filename ends in `.tzst` or `.tar.zst`, and\n * the first 512 bytes are not a valid tar header, then zstd decompression\n * will be attempted.\n */\n zstd?: boolean | ZlibOptions\n\n /**\n * A function that is called with `(path, stat)` when creating an archive, or\n * `(path, entry)` when extracting. Return true to process the file/entry, or\n * false to exclude it.\n */\n filter?: (path: string, entry: Stats | ReadEntry) => boolean\n\n /**\n * A function that gets called for any warning encountered.\n *\n * Note: if `strict` is set, then the warning will throw, and this method\n * will not be called.\n */\n onwarn?: (code: string, message: string, data: WarnData) => unknown\n\n /**\n * The maximum allowed ratio of decompressed bytes to compressed bytes when\n * reading gzip, brotli, or zstd-compressed archives.\n *\n * This defaults to `1000` and aborts extraction or parsing when exceeded.\n * Set to `Infinity` to disable the limit.\n */\n maxDecompressionRatio?: number\n\n //////////////////////////\n // extraction options\n\n /**\n * When extracting, unlink files before creating them. Without this option,\n * tar overwrites existing files, which preserves existing hardlinks. With\n * this option, existing hardlinks will be broken, as will any symlink that\n * would affect the location of an extracted file.\n */\n unlink?: boolean\n\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n *\n * Any entry whose entire path is stripped will be excluded.\n */\n strip?: number\n\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n newer?: boolean\n\n /**\n * When extracting, do not overwrite existing files at all.\n */\n keep?: boolean\n\n /**\n * When extracting, set the `uid` and `gid` of extracted entries to the `uid`\n * and `gid` fields in the archive. Defaults to true when run as root, and\n * false otherwise.\n *\n * If false, then files and directories will be set with the owner and group\n * of the user running the process. This is similar to `-p` in `tar(1)`, but\n * ACLs and other system-specific data is never unpacked in this\n * implementation, and modes are set by default already.\n */\n preserveOwner?: boolean\n\n /**\n * The maximum depth of subfolders to extract into. This defaults to 1024.\n * Anything deeper than the limit will raise a warning and skip the entry.\n * Set to `Infinity` to remove the limitation.\n */\n maxDepth?: number\n\n /**\n * When extracting, force all created files and directories, and all\n * implicitly created directories, to be owned by the specified user id,\n * regardless of the `uid` field in the archive.\n *\n * Cannot be used along with `preserveOwner`. Requires also setting the `gid`\n * option.\n */\n uid?: number\n\n /**\n * When extracting, force all created files and directories, and all\n * implicitly created directories, to be owned by the specified group id,\n * regardless of the `gid` field in the archive.\n *\n * Cannot be used along with `preserveOwner`. Requires also setting the `uid`\n * option.\n */\n gid?: number\n\n /**\n * When extracting, provide a function that takes an `entry` object, and\n * returns a stream, or any falsey value. If a stream is provided, then that\n * stream's data will be written instead of the contents of the archive\n * entry. If a falsey value is provided, then the entry is written to disk as\n * normal.\n *\n * To exclude items from extraction, use the `filter` option.\n *\n * Note that using an asynchronous stream type with the `transform` option\n * will cause undefined behavior in synchronous extractions.\n * [MiniPass](http://npm.im/minipass)-based streams are designed for this use\n * case.\n */\n transform?: (\n entry: ReadEntry,\n ) => ReadEntry | null | undefined | false | 0 | ''\n\n /**\n * Call `chmod()` to ensure that extracted files match the entry's mode\n * field. Without this field set, all mode fields in archive entries are a\n * best effort attempt only.\n *\n * Setting this necessitates a call to the deprecated `process.umask()`\n * method to determine the default umask value, unless a `processUmask`\n * config is provided as well.\n *\n * If not set, tar will attempt to create file system entries with whatever\n * mode is provided, and let the implicit process `umask` apply normally, but\n * if a file already exists to be written to, then its existing mode will not\n * be modified.\n *\n * When setting `chmod: true`, it is highly recommend to set the\n * {@link TarOptions#processUmask} option as well, to avoid the call to the\n * deprecated (and thread-unsafe) `process.umask()` method.\n */\n chmod?: boolean\n\n /**\n * When setting the {@link TarOptions#chmod} option to `true`, you may\n * provide a value here to avoid having to call the deprecated and\n * thread-unsafe `process.umask()` method.\n *\n * This has no effect with `chmod` is not set to true, as mode values are not\n * set explicitly anyway. If `chmod` is set to `true`, and a value is not\n * provided here, then `process.umask()` must be called, which will result in\n * deprecation warnings.\n *\n * The most common values for this are `0o22` (resulting in directories\n * created with mode `0o755` and files with `0o644` by default) and `0o2`\n * (resulting in directores created with mode `0o775` and files `0o664`, so\n * they are group-writable).\n */\n processUmask?: number\n\n //////////////////////////\n // archive creation options\n\n /**\n * When parsing/listing archives, `entry` streams are by default resumed\n * (set into \"flowing\" mode) immediately after the call to `onReadEntry()`.\n * Set `noResume: true` to suppress this behavior.\n *\n * Note that when this is set, the stream will never complete until the\n * data is consumed somehow.\n *\n * Set automatically in extract operations, since the entry is piped to\n * a file system entry right away. Only relevant when parsing.\n */\n noResume?: boolean\n\n /**\n * When creating, updating, or replacing within archives, this method will\n * be called with each WriteEntry that is created.\n */\n onWriteEntry?: (entry: WriteEntry) => unknown\n\n /**\n * When extracting or listing archives, this method will be called with\n * each entry that is not excluded by a `filter`.\n *\n * Important when listing archives synchronously from a file, because there\n * is otherwise no way to interact with the data!\n */\n onReadEntry?: (entry: ReadEntry) => unknown\n\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n follow?: boolean\n\n /**\n * When creating archives, omit any metadata that is system-specific:\n * `ctime`, `atime`, `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and\n * `nlink`. Note that `mtime` is still included, because this is necessary\n * for other time-based operations such as `tar.update`. Additionally, `mode`\n * is set to a \"reasonable default\" for mose unix systems, based on an\n * effective `umask` of `0o22`.\n *\n * This also defaults the `portable` option in the gzip configs when creating\n * a compressed archive, in order to produce deterministic archives that are\n * not operating-system specific.\n */\n portable?: boolean\n\n /**\n * When creating archives, do not recursively archive the contents of\n * directories. By default, archiving a directory archives all of its\n * contents as well.\n */\n noDirRecurse?: boolean\n\n /**\n * Suppress Pax extended headers when creating archives. Note that this means\n * long paths and linkpaths will be truncated, and large or negative numeric\n * values may be interpreted incorrectly.\n */\n noPax?: boolean\n\n /**\n * Set to a `Date` object to force a specific `mtime` value for everything\n * written to an archive.\n *\n * This is useful when creating archives that are intended to be\n * deterministic based on their contents, irrespective of the file's last\n * modification time.\n *\n * Overridden by `noMtime`.\n */\n mtime?: Date\n\n /**\n * A path portion to prefix onto the entries added to an archive.\n */\n prefix?: string\n\n /**\n * The mode to set on any created file archive, defaults to 0o666\n * masked by the process umask, often resulting in 0o644.\n *\n * This does *not* affect the mode fields of individual entries, or the\n * mode status of extracted entries on the filesystem.\n */\n mode?: number\n\n //////////////////////////\n // internal options\n\n /**\n * A cache of mtime values, to avoid having to stat the same file repeatedly.\n *\n * @internal\n */\n mtimeCache?: Map<string, Date>\n\n /**\n * maximum buffer size for `fs.read()` operations.\n *\n * @internal\n */\n maxReadSize?: number\n\n /**\n * Filter modes of entries being unpacked, like `process.umask()`\n *\n * @internal\n */\n umask?: number\n\n /**\n * Default mode for directories. Used for all implicitly created directories,\n * and any directories in the archive that do not have a mode field.\n *\n * @internal\n */\n dmode?: number\n\n /**\n * default mode for files\n *\n * @internal\n */\n fmode?: number\n\n /**\n * Map that tracks which directories already exist, for extraction\n *\n * @internal\n */\n dirCache?: Map<string, boolean>\n /**\n * maximum supported size of meta entries. Defaults to 1MB\n *\n * @internal\n */\n maxMetaEntrySize?: number\n\n /**\n * A Map object containing the device and inode value for any file whose\n * `nlink` value is greater than 1, to identify hard links when creating\n * archives.\n *\n * @internal\n */\n linkCache?: Map<LinkCacheKey, string>\n\n /**\n * A map object containing the results of `fs.readdir()` calls.\n *\n * @internal\n */\n readdirCache?: Map<string, string[]>\n\n /**\n * A cache of all `lstat` results, for use in creating archives.\n *\n * @internal\n */\n statCache?: Map<string, Stats>\n\n /**\n * Number of concurrent jobs to run when creating archives.\n *\n * Defaults to 4.\n *\n * @internal\n */\n jobs?: number\n\n /**\n * Automatically set to true on Windows systems.\n *\n * When extracting, causes behavior where filenames containing `<|>?:`\n * characters are converted to windows-compatible escape sequences in the\n * created filesystem entries.\n *\n * When packing, causes behavior where paths replace `\\` with `/`, and\n * filenames containing the windows-compatible escaped forms of `<|>?:` are\n * converted to actual `<|>?:` characters in the archive.\n *\n * @internal\n */\n win32?: boolean\n\n /**\n * For `WriteEntry` objects, the absolute path to the entry on the\n * filesystem. By default, this is `resolve(cwd, entry.path)`, but it can be\n * overridden explicitly.\n *\n * @internal\n */\n absolute?: string\n\n /**\n * Used with Parser stream interface, to attach and take over when the\n * stream is completely parsed. If this is set, then the prefinish,\n * finish, and end events will not fire, and are the responsibility of\n * the ondone method to emit properly.\n *\n * @internal\n */\n ondone?: () => void\n\n /**\n * Mostly for testing, but potentially useful in some cases.\n * Forcibly trigger a chown on every entry, no matter what.\n */\n forceChown?: boolean\n\n /**\n * ambiguous deprecated name for {@link onReadEntry}\n *\n * @deprecated\n */\n onentry?: (entry: ReadEntry) => unknown\n}\n\nexport type TarOptionsSync = TarOptions & { sync: true }\nexport type TarOptionsAsync = TarOptions & { sync?: false }\nexport type TarOptionsFile = TarOptions & { file: string }\nexport type TarOptionsNoFile = TarOptions & { file?: undefined }\nexport type TarOptionsSyncFile = TarOptionsSync & TarOptionsFile\nexport type TarOptionsAsyncFile = TarOptionsAsync & TarOptionsFile\nexport type TarOptionsSyncNoFile = TarOptionsSync & TarOptionsNoFile\nexport type TarOptionsAsyncNoFile = TarOptionsAsync & TarOptionsNoFile\n\nexport type LinkCacheKey = `${number}:${number}`\n\nexport interface TarOptionsWithAliases extends TarOptions {\n /**\n * The effective current working directory for this tar command\n */\n C?: TarOptions['cwd']\n /**\n * The tar file to be read and/or written. When this is set, a stream\n * is not returned. Asynchronous commands will return a promise indicating\n * when the operation is completed, and synchronous commands will return\n * immediately.\n */\n f?: TarOptions['file']\n /**\n * When creating a tar archive, this can be used to compress it as well.\n * Set to `true` to use the default gzip options, or customize them as\n * needed.\n *\n * When reading, if this is unset, then the compression status will be\n * inferred from the archive data. This is generally best, unless you are\n * sure of the compression settings in use to create the archive, and want to\n * fail if the archive doesn't match expectations.\n */\n z?: TarOptions['gzip']\n /**\n * When creating archives, preserve absolute and `..` paths in the archive,\n * rather than sanitizing them under the cwd.\n *\n * When extracting, allow absolute paths, paths containing `..`, and\n * extracting through symbolic links. By default, the root `/` is stripped\n * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing\n * `..` are not extracted, and any file whose location would be modified by a\n * symbolic link is not extracted.\n *\n * **WARNING** This is almost always unsafe, and must NEVER be used on\n * archives from untrusted sources, such as user input, and every entry must\n * be validated to ensure it is safe to write. Even if the input is not\n * malicious, mistakes can cause a lot of damage!\n */\n P?: TarOptions['preservePaths']\n /**\n * When extracting, unlink files before creating them. Without this option,\n * tar overwrites existing files, which preserves existing hardlinks. With\n * this option, existing hardlinks will be broken, as will any symlink that\n * would affect the location of an extracted file.\n */\n U?: TarOptions['unlink']\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n */\n 'strip-components'?: TarOptions['strip']\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n */\n stripComponents?: TarOptions['strip']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n 'keep-newer'?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n keepNewer?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n 'keep-newer-files'?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n keepNewerFiles?: TarOptions['newer']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n k?: TarOptions['keep']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n 'keep-existing'?: TarOptions['keep']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n keepExisting?: TarOptions['keep']\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n m?: TarOptions['noMtime']\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n 'no-mtime'?: TarOptions['noMtime']\n /**\n * When extracting, set the `uid` and `gid` of extracted entries to the `uid`\n * and `gid` fields in the archive. Defaults to true when run as root, and\n * false otherwise.\n *\n * If false, then files and directories will be set with the owner and group\n * of the user running the process. This is similar to `-p` in `tar(1)`, but\n * ACLs and other system-specific data is never unpacked in this\n * implementation, and modes are set by default already.\n */\n p?: TarOptions['preserveOwner']\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n L?: TarOptions['follow']\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n h?: TarOptions['follow']\n\n /**\n * Deprecated option. Set explicitly false to set `chmod: true`. Ignored\n * if {@link TarOptions#chmod} is set to any boolean value.\n *\n * @deprecated\n */\n noChmod?: boolean\n}\n\nexport type TarOptionsWithAliasesSync = TarOptionsWithAliases & {\n sync: true\n}\nexport type TarOptionsWithAliasesAsync = TarOptionsWithAliases & {\n sync?: false\n}\nexport type TarOptionsWithAliasesFile =\n | (TarOptionsWithAliases & {\n file: string\n })\n | (TarOptionsWithAliases & { f: string })\nexport type TarOptionsWithAliasesSyncFile = TarOptionsWithAliasesSync &\n TarOptionsWithAliasesFile\nexport type TarOptionsWithAliasesAsyncFile = TarOptionsWithAliasesAsync &\n TarOptionsWithAliasesFile\n\nexport type TarOptionsWithAliasesNoFile = TarOptionsWithAliases & {\n f?: undefined\n file?: undefined\n}\n\nexport type TarOptionsWithAliasesSyncNoFile = TarOptionsWithAliasesSync &\n TarOptionsWithAliasesNoFile\nexport type TarOptionsWithAliasesAsyncNoFile = TarOptionsWithAliasesAsync &\n TarOptionsWithAliasesNoFile\n\nexport const isSyncFile = <O extends TarOptions>(\n o: O,\n): o is O & TarOptionsSyncFile => !!o.sync && !!o.file\nexport const isAsyncFile = <O extends TarOptions>(\n o: O,\n): o is O & TarOptionsAsyncFile => !o.sync && !!o.file\nexport const isSyncNoFile = <O extends TarOptions>(\n o: O,\n): o is O & TarOptionsSyncNoFile => !!o.sync && !o.file\nexport const isAsyncNoFile = <O extends TarOptions>(\n o: O,\n): o is O & TarOptionsAsyncNoFile => !o.sync && !o.file\nexport const isSync = <O extends TarOptions>(\n o: O,\n): o is O & TarOptionsSync => !!o.sync\nexport const isAsync = <O extends TarOptions>(\n o: O,\n): o is O & TarOptionsAsync => !o.sync\nexport const isFile = <O extends TarOptions>(\n o: O,\n): o is O & TarOptionsFile => !!o.file\nexport const isNoFile = <O extends TarOptions>(\n o: O,\n): o is O & TarOptionsNoFile => !o.file\n\nconst dealiasKey = (k: keyof TarOptionsWithAliases): keyof TarOptions => {\n const d = argmap.get(k)\n if (d) return d\n return k as keyof TarOptions\n}\n\nexport const dealias = (opt: TarOptionsWithAliases = {}): TarOptions => {\n if (!opt) return {}\n const result: Record<string, unknown> = {}\n for (const [key, v] of Object.entries(opt) as [\n keyof TarOptionsWithAliases,\n unknown,\n ][]) {\n // TS doesn't know that aliases are going to always be the same type\n const k = dealiasKey(key)\n result[k] = v\n }\n // affordance for deprecated noChmod -> chmod\n if (result.chmod === undefined && result.noChmod === false) {\n result.chmod = true\n }\n delete result.noChmod\n return result as TarOptions\n}\n"]}
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":";;;AAeA;;;GAGG;AACI,MAAM,UAAU,GAAG,CACxB,GAAM,EACN,IAAiB,EACd,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;AAH7C,QAAA,UAAU,cAGmC;AAE1D;;;;GAIG;AACI,MAAM,WAAW,GAAG,CACzB,IAAY,EACZ,KAAc,EACd,GAAW,EACH,EAAE;IACV,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,GAAG,CAAA;IACpE,IACE,KAAK,KAAK,QAAQ;QAClB,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAC9C,CAAC;QACD,OAAO,KAAe,CAAA;IACxB,CAAC;IACD,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,6BAA6B,CAAC,CAAA;AAC3D,CAAC,CAAA;AAbY,QAAA,WAAW,eAavB","sourcesContent":["import type { Codec } from './codec.js'\nimport type { EntryData, ReadEntry, ReadEntrySync } from './read-entry.js'\nimport type { ExtractFS, ExtractFSSync, TarFS, TarFSSync } from './fs.js'\nimport type { WarnOptions } from './warn.js'\nimport type {\n CreateFS,\n CreateFSSync,\n CreateStats,\n DeleteFS,\n DeleteFSSync,\n ReplaceFS,\n ReplaceFSSync,\n} from './fs.js'\nimport type { WriteEntry } from './write-entry.js'\n\n/**\n * A copy of the options with no prototype, so that an option that is\n * not set cannot get a value from a changed `Object.prototype`.\n */\nexport const ownOptions = <T extends object>(\n opt: T,\n more?: Partial<T>,\n): T => Object.assign(Object.create(null) as T, opt, more)\n\n/**\n * The value of an option that is a count, such as `jobs`: the\n * default if the option is not set or is 0, and a `TypeError` if the\n * value is not a positive integer or `Infinity`.\n */\nexport const countOption = (\n name: string,\n value: unknown,\n def: number,\n): number => {\n if (value === undefined || value === null || value === 0) return def\n if (\n value === Infinity ||\n (Number.isInteger(value) && Number(value) > 0)\n ) {\n return value as number\n }\n throw new TypeError(`${name} must be a positive integer`)\n}\n\n/** The options of a `Parser`. */\nexport type ParserOptions<E extends EntryData = EntryData> =\n WarnOptions & {\n /**\n * Called with each entry that is an object of the file system.\n * If it returns false, the entry is ignored.\n */\n filter?: (path: string, entry: E) => boolean\n /**\n * The largest PAX or GNU long name entry to read, in bytes. A\n * larger one is skipped. Default 1 MiB.\n */\n maxMetaEntrySize?: number\n /** With `'win32'`, each `\\` in a path is changed to `/`. */\n platform?: 'win32' | 'posix'\n }\n\n/** The options of the readers. */\nexport type ReadOptions<E extends EntryData = ReadEntry> =\n ParserOptions<E> & {\n /**\n * Stop with an error when the decompressed size is more than this\n * many times the compressed size. Default 1000.\n */\n maxDecompressionRatio?: number\n /**\n * Compression formats, tried in order before the gzip support of\n * the runtime.\n */\n codecs?: Codec[]\n }\n\n/** The options of `entriesSync`. */\nexport type ReadOptionsSync = ReadOptions<ReadEntrySync>\n\n/** The archive data that `entries` reads. */\nexport type TarInput =\n | Uint8Array\n | ArrayBuffer\n | Blob\n | ReadableStream<Uint8Array>\n | AsyncIterable<Uint8Array>\n | Iterable<Uint8Array>\n\n/** The archive data that `entriesSync` reads. */\nexport type TarInputSync = Uint8Array | ArrayBuffer | Iterable<Uint8Array>\n\n/** The options of `list`. Set `input`, or `file` and `fs`. */\nexport type ListOptions = ReadOptions & {\n input?: TarInput\n /** The path of the archive file. */\n file?: string\n fs?: TarFS\n /**\n * The most bytes to read from the file at one time. Default, and\n * with 0, 16 MiB. A positive integer, or `Infinity`.\n */\n maxReadSize?: number\n /**\n * Called with each entry. A promise is awaited before the next\n * entry.\n */\n onEntry?: (entry: ReadEntry) => unknown\n}\n\n/** The options of `listSync`. Set `input`, or `file` and `fs`. */\nexport type ListOptionsSync = ReadOptionsSync & {\n input?: TarInputSync\n /** The path of the archive file. */\n file?: string\n fs?: TarFSSync\n /**\n * The most bytes to read from the file at one time. Default, and\n * with 0, 16 MiB. A positive integer, or `Infinity`.\n */\n maxReadSize?: number\n /** Called with each entry. */\n onEntry?: (entry: ReadEntrySync) => unknown\n}\n\n/**\n * The options of the extraction that are not about the archive data\n * or the file system functions.\n */\nexport type UnpackOptions = {\n /** The absolute path of the directory to extract into. */\n cwd: string\n /**\n * With `'win32'`: the path rules of Windows, the characters `<|>?:`\n * in a name are changed to private-use characters, a file is\n * renamed before it is removed, and one entry is extracted at a\n * time.\n */\n platform?: 'win32' | 'posix'\n /** Remove this number of leading parts from each path. */\n strip?: number\n /**\n * Permit absolute paths, `..` in paths, and extraction through\n * symbolic links. This is not safe with an archive that is not\n * trusted.\n */\n preservePaths?: boolean\n /**\n * Remove a file before the entry is written, in place of a write\n * into the existing file. Also remove a symbolic link in the path\n * to an entry.\n */\n unlink?: boolean\n /** Do not write over an existing file. */\n keep?: boolean\n /** Do not write over a file that is newer than the entry. */\n newer?: boolean\n /** Do not set the times of the entries. */\n noMtime?: boolean\n /**\n * Set the owner of each entry to the `uid` and `gid` in the\n * archive. Default: true if `processUid` is 0 and `uid` is not set.\n */\n preserveOwner?: boolean\n /** Set the owner of each entry to this user. Needs `gid`. */\n uid?: number\n /** Set the owner of each entry to this group. Needs `uid`. */\n gid?: number\n /** Set the owner of each entry, also when it is the process owner. */\n forceChown?: boolean\n /**\n * Set the mode of each directory with `chmod`, so that the umask of\n * the process does not change it.\n */\n chmod?: boolean\n /**\n * The umask of the process. Only used with `chmod`. Default 0o22.\n */\n processUmask?: number\n /** The user ID of the process. */\n processUid?: number\n /** The group ID of the process. */\n processGid?: number\n /** Sets the default of `dmode` and `fmode`. Default: `processUmask`. */\n umask?: number\n /** The mode of a directory that has no mode in the archive. */\n dmode?: number\n /** The mode of a file that has no mode in the archive. */\n fmode?: number\n /**\n * The most parts that a path or a link target can have. Default\n * 1024. `Infinity` removes the limit.\n */\n maxDepth?: number\n}\n\n/**\n * The options of `extract`. Set `input`, or `file`. With `file`, the\n * `fs` must also have the functions of `TarFS`.\n */\nexport type ExtractOptions = ReadOptions &\n UnpackOptions & {\n /**\n * The most bytes to read from the file at one time. Default, and\n * with 0, 16 MiB. A positive integer, or `Infinity`.\n */\n maxReadSize?: number\n /**\n * Called with each entry before it is extracted. A promise is\n * awaited before the entry is extracted.\n */\n onEntry?: (entry: ReadEntry) => unknown\n /**\n * Return a stream that changes the content of a file entry, or\n * `undefined` to write the content as it is.\n */\n transform?: (\n entry: ReadEntry,\n ) => TransformStream<Uint8Array, Uint8Array> | undefined\n /**\n * The most entries to extract at one time. Default, and with 0,\n * 16. A positive integer, or `Infinity`.\n */\n jobs?: number\n } & (\n | {\n /**\n * The archive data. A chunk must not change after the source\n * gives it.\n */\n input: TarInput\n /** The name of the archive, for warnings. */\n file?: string\n fs: ExtractFS\n }\n | {\n input?: undefined\n /** The path of the archive file. */\n file: string\n fs: ExtractFS & TarFS\n }\n )\n\n/** The options of `extractSync`. Set `input`, or `file`. */\nexport type ExtractOptionsSync = ReadOptionsSync &\n UnpackOptions & {\n /**\n * The most bytes to read from the file at one time. Default, and\n * with 0, 16 MiB. A positive integer, or `Infinity`.\n */\n maxReadSize?: number\n /** Called with each entry before it is extracted. */\n onEntry?: (entry: ReadEntrySync) => unknown\n /**\n * Return a function that changes each chunk of the content of a\n * file entry, or `undefined` to write the content as it is.\n */\n transform?: (\n entry: ReadEntrySync,\n ) => ((chunk: Uint8Array) => Uint8Array) | undefined\n } & (\n | {\n input: TarInputSync\n /** The name of the archive, for warnings. */\n file?: string\n fs: ExtractFSSync\n }\n | {\n input?: undefined\n /** The path of the archive file. */\n file: string\n fs: ExtractFSSync & TarFSSync\n }\n )\n\n/** The options that `Pack` and `PackSync` share. */\nexport type PackOptionsBase<E extends EntryData> = WarnOptions & {\n /**\n * The absolute path of the directory that the paths to add are\n * relative to. A pack needs it, and `fs`, to add a path. A path\n * that is not absolute is a `TypeError`.\n */\n cwd?: string\n /** A directory to put before the path of each entry. */\n prefix?: string\n /**\n * Leave out the data that is specific to one system: `uid`, `gid`,\n * `uname`, `gname`, `atime`, `ctime`, `dev`, `ino`, `nlink`, and\n * the `mtime` of a directory. Remove the write permission of the\n * group and of others.\n */\n portable?: boolean\n /** Write no PAX header for a field that does not fit the header. */\n noPax?: boolean\n /** Add the target of a symbolic link, not the link. */\n follow?: boolean\n /** Add a directory without the entries in it. */\n noDirRecurse?: boolean\n /** Write no `mtime`. */\n noMtime?: boolean\n /** The `mtime` of each entry. */\n mtime?: Date\n /** Keep a root at the start of a path, such as `/`. */\n preservePaths?: boolean\n /**\n * Called with each path and its `lstat` result (its `stat` result\n * with `follow`), and with each entry of another archive. If it\n * returns false, the path or the entry is not added.\n */\n filter?: (path: string, entry: CreateStats | E) => boolean\n /**\n * The most bytes to read from a file at one time. Default, and\n * with 0, 16 MiB. A positive integer, or `Infinity`. A larger file\n * is not read before the pack comes to it.\n */\n maxReadSize?: number\n /**\n * With `'win32'`, each `\\` in a path is changed to `/`, and the\n * characters that `winchars` encodes are decoded.\n */\n platform?: 'win32' | 'posix'\n /** The user ID of the process. */\n processUid?: number\n /** The `uname` of each file that `processUid` owns. */\n processUname?: string\n /**\n * Called with each entry before its header is written. It can\n * change the fields of the entry.\n */\n onWriteEntry?: (entry: WriteEntry) => unknown\n /**\n * Compression formats, before the gzip support of the runtime. The\n * options `gzip`, `brotli`, and `zstd` select the first codec that\n * has that name.\n */\n codecs?: Codec[]\n /** Compress with the codec named `gzip`. */\n gzip?: boolean | Record<string, unknown>\n /** Compress with the codec named `brotli` in `codecs`. */\n brotli?: boolean | Record<string, unknown>\n /** Compress with the codec named `zstd` in `codecs`. */\n zstd?: boolean | Record<string, unknown>\n /**\n * Compress with this codec. It does not need to be in `codecs`.\n * With a pair, the second item is given to the `compress` function\n * of the codec.\n */\n compress?: Codec | [codec: Codec, options: Record<string, unknown>]\n}\n\n/** The options of `Pack`. */\nexport type PackOptions = PackOptionsBase<ReadEntry> & {\n fs?: CreateFS\n /**\n * The number of paths at the start of the queue that are read\n * before the pack writes them. Default, and with 0, 4. A positive\n * integer, or `Infinity`.\n */\n jobs?: number\n}\n\n/** The options of `PackSync`. */\nexport type PackOptionsSync = PackOptionsBase<ReadEntrySync> & {\n fs?: CreateFSSync\n}\n\n/**\n * The options of `create`. With `file`, the archive is written to\n * that path through `fs`.\n */\nexport type CreateOptions = PackOptions & {\n /** The mode of the archive file. Default 0o666. */\n mode?: number\n}\n\n/** The options of `createSync`. */\nexport type CreateOptionsSync = PackOptionsSync & {\n /** The mode of the archive file. Default 0o666. */\n mode?: number\n}\n\n/** The options of `replace` and `update`. */\nexport type ReplaceOptions = CreateOptions & {\n /** The path of the archive file. It is made if it does not exist. */\n file: string\n fs: ReplaceFS\n /**\n * Gets the path and the `mtime` of each entry that the archive\n * has. `update` adds a path only if it is newer than the `mtime`\n * here.\n */\n mtimeCache?: Map<string, Date>\n}\n\n/** The options of `replaceSync` and `updateSync`. */\nexport type ReplaceOptionsSync = CreateOptionsSync & {\n /** The path of the archive file. It is made if it does not exist. */\n file: string\n fs: ReplaceFSSync\n /**\n * Gets the path and the `mtime` of each entry that the archive\n * has. `updateSync` adds a path only if it is newer than the\n * `mtime` here.\n */\n mtimeCache?: Map<string, Date>\n}\n\n/** The options of `delete`. */\nexport type DeleteOptions = Omit<ReadOptions, 'filter'> & {\n /** The path of the archive file. */\n file: string\n fs: DeleteFS\n /**\n * Return true to remove the entry. With a list of paths, an entry\n * is removed only if the list also has it.\n */\n filter?: (path: string, entry: ReadEntry) => boolean\n /**\n * The most bytes to read from the file at one time. Default, and\n * with 0, 16 MiB. A positive integer, or `Infinity`.\n */\n maxReadSize?: number\n}\n\n/** The options of `deleteSync`. */\nexport type DeleteOptionsSync = Omit<ReadOptionsSync, 'filter'> & {\n /** The path of the archive file. */\n file: string\n fs: DeleteFSSync\n /**\n * Return true to remove the entry. With a list of paths, an entry\n * is removed only if the list also has it.\n */\n filter?: (path: string, entry: ReadEntrySync) => boolean\n /**\n * The most bytes to read from the file at one time. Default, and\n * with 0, 16 MiB. A positive integer, or `Infinity`.\n */\n maxReadSize?: number\n}\n"]}
|
package/dist/commonjs/pack.d.ts
CHANGED
|
@@ -1,105 +1,159 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { EntryTypeName } from './types.js';
|
|
2
|
+
import { type Codec } from './codec.js';
|
|
3
|
+
import type { CreateFileHandle, CreateFS, CreateFSSync, CreateStats, FileId } from './fs.js';
|
|
4
|
+
import { type PackOptions, type PackOptionsBase, type PackOptionsSync } from './options.js';
|
|
5
|
+
import type { ReadEntry, ReadEntrySync } from './read-entry.js';
|
|
6
|
+
import { WriteEntry, type EncodeOptions } from './write-entry.js';
|
|
7
|
+
/** A directory above a path, when a pack follows symbolic links. */
|
|
8
|
+
export type Ancestor = {
|
|
9
|
+
key: string;
|
|
10
|
+
up?: Ancestor;
|
|
11
|
+
};
|
|
12
|
+
/** What `Pack` reads for a path before it writes the entry. */
|
|
13
|
+
export type PackLoad = {
|
|
14
|
+
stat: CreateStats;
|
|
15
|
+
/** The identity of the object: the stat, or exact `dev` and `ino`. */
|
|
16
|
+
id: FileId;
|
|
17
|
+
type: EntryTypeName;
|
|
18
|
+
/** The target of a symbolic link. */
|
|
19
|
+
linkpath?: string;
|
|
20
|
+
/** The names in a directory. */
|
|
21
|
+
names?: string[];
|
|
22
|
+
/** A file of `maxReadSize` bytes or less, after 512 bytes of zeros. */
|
|
23
|
+
buf?: Uint8Array;
|
|
24
|
+
/** A larger file. */
|
|
25
|
+
handle?: CreateFileHandle;
|
|
26
|
+
/** The path is a different object now. The pack skips it. */
|
|
27
|
+
changed?: boolean;
|
|
28
|
+
};
|
|
29
|
+
/** A path in the queue of a pack. */
|
|
3
30
|
export declare class PackJob {
|
|
4
31
|
path: string;
|
|
5
32
|
absolute: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
piped: boolean;
|
|
33
|
+
/** The directories above it, when the pack follows symbolic links. */
|
|
34
|
+
up?: Ancestor;
|
|
35
|
+
/** The target, when the pack writes the file as a hard link. */
|
|
36
|
+
linkpath?: string;
|
|
37
|
+
/** Set when `Pack` starts to read the path. */
|
|
38
|
+
ready?: Promise<PackLoad | undefined>;
|
|
13
39
|
constructor(path: string, absolute: string);
|
|
14
40
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
declare
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
cwd
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
41
|
+
/** One item of the queue of a pack, and the item after it. */
|
|
42
|
+
export type QueueNode<T> = {
|
|
43
|
+
item: T;
|
|
44
|
+
next?: QueueNode<T>;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* The parts of `Pack` and `PackSync` that are the same: the options,
|
|
48
|
+
* the queue, and the rules that make an entry from a path or from an
|
|
49
|
+
* entry of another archive.
|
|
50
|
+
*/
|
|
51
|
+
export declare abstract class PackBase<FS, E extends ReadEntry | ReadEntrySync, S extends object> {
|
|
52
|
+
#private;
|
|
53
|
+
opt: PackOptionsBase<E>;
|
|
54
|
+
fs?: FS;
|
|
55
|
+
/** The normalized form of `opt.cwd`. */
|
|
56
|
+
cwd?: string;
|
|
57
|
+
win32: boolean;
|
|
58
|
+
maxReadSize: number;
|
|
59
|
+
/** The options of `WriteEntry.encode`. */
|
|
60
|
+
header: EncodeOptions;
|
|
61
|
+
/** The compression of the output. */
|
|
62
|
+
codec?: Codec;
|
|
63
|
+
codecOptions?: Record<string, unknown>;
|
|
64
|
+
/** True after `end()`. */
|
|
65
|
+
ended: boolean;
|
|
66
|
+
protected head?: QueueNode<PackJob | WriteEntry | E | S>;
|
|
67
|
+
protected tail?: QueueNode<PackJob | WriteEntry | E | S>;
|
|
68
|
+
protected wake?: () => void;
|
|
69
|
+
constructor(opt: PackOptionsBase<E> & {
|
|
70
|
+
fs?: FS;
|
|
71
|
+
}, compress: 'compress' | 'compressSync');
|
|
72
|
+
/** The absolute form of a path that is relative to `cwd`. */
|
|
73
|
+
resolve(path: string): string;
|
|
74
|
+
/**
|
|
75
|
+
* Put a path, an entry, or a source of entries at the end of the
|
|
76
|
+
* queue. A directory is added with all that is in it.
|
|
77
|
+
*/
|
|
78
|
+
add(item: string | WriteEntry | E | S): this;
|
|
79
|
+
/** Add no more. The archive ends after the last item of the queue. */
|
|
80
|
+
end(): this;
|
|
81
|
+
protected push(item: PackJob | WriteEntry | E | S): void;
|
|
82
|
+
protected shift(): void;
|
|
83
|
+
/**
|
|
84
|
+
* True if the pack must read the exact `dev` and `ino` of the
|
|
85
|
+
* object with the `bigint` option: the numbers are not exact, and a
|
|
86
|
+
* wrong match loses data. That is a file with more than one link,
|
|
87
|
+
* which a wrong match makes a hard link to a different file, and
|
|
88
|
+
* with `follow` a directory, which a wrong match skips as a
|
|
89
|
+
* directory in itself. Each other object gets no second stat.
|
|
90
|
+
*/
|
|
91
|
+
protected needsExact(stat: CreateStats): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* The type of the entry to write for a path, or `undefined` to
|
|
94
|
+
* write no entry. The pack calls it one time for each path, in the
|
|
95
|
+
* order of the queue. `id` is the stat, or the exact `dev` and `ino`
|
|
96
|
+
* of the object.
|
|
97
|
+
*/
|
|
98
|
+
protected plan(job: PackJob, stat: CreateStats, id: FileId): EntryTypeName | undefined;
|
|
99
|
+
/** The jobs for the names in the directory of `job`. */
|
|
100
|
+
protected children(job: PackJob, names: string[], id: FileId): PackJob[];
|
|
101
|
+
/**
|
|
102
|
+
* Report a path that does not exist, and skip it. Each other error
|
|
103
|
+
* of the stat is thrown.
|
|
104
|
+
*/
|
|
105
|
+
protected missing(job: PackJob, er: unknown): undefined;
|
|
106
|
+
/** Report a path that is a different object after its `lstat`. */
|
|
107
|
+
protected changed(job: PackJob, type: EntryTypeName): void;
|
|
108
|
+
/** Make the entry for a path. */
|
|
109
|
+
protected pathEntry(job: PackJob, stat: CreateStats, type: EntryTypeName, linkpath: string | undefined, body: WriteEntry['body']): WriteEntry;
|
|
110
|
+
/**
|
|
111
|
+
* Make the entry to write for an entry that the caller added.
|
|
112
|
+
* `undefined` if the filter refuses an entry of another archive.
|
|
113
|
+
*/
|
|
114
|
+
protected addedEntry(item: WriteEntry | E): WriteEntry | undefined;
|
|
115
|
+
}
|
|
116
|
+
/** What `Pack.add()` takes. */
|
|
117
|
+
export type PackInput = string | WriteEntry | ReadEntry | AsyncIterable<WriteEntry | ReadEntry> | Iterable<WriteEntry | ReadEntry>;
|
|
118
|
+
/** What `PackSync.add()` takes. */
|
|
119
|
+
export type PackInputSync = string | WriteEntry | ReadEntrySync | Iterable<WriteEntry | ReadEntrySync>;
|
|
120
|
+
/**
|
|
121
|
+
* Makes an archive. `add()` paths and entries, then `end()`. The
|
|
122
|
+
* pack is the async iterator of the bytes of the archive, compressed
|
|
123
|
+
* if an option selects a codec.
|
|
124
|
+
*
|
|
125
|
+
* It reads the file system only when the consumer asks for bytes.
|
|
126
|
+
* Then it reads the first `jobs` paths of the queue at the same
|
|
127
|
+
* time, and writes them in the order of the queue. The entries of a
|
|
128
|
+
* directory go to the end of the queue.
|
|
129
|
+
*
|
|
130
|
+
* `return()` closes each file that is open.
|
|
131
|
+
*/
|
|
132
|
+
export declare class Pack extends PackBase<CreateFS, ReadEntry, AsyncIterable<WriteEntry | ReadEntry> | Iterable<WriteEntry | ReadEntry>> implements AsyncIterableIterator<Uint8Array, undefined> {
|
|
133
|
+
#private;
|
|
63
134
|
jobs: number;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
[
|
|
69
|
-
[PROCESSING]: boolean;
|
|
70
|
-
[ENDED]: boolean;
|
|
71
|
-
constructor(opt?: TarOptions);
|
|
72
|
-
[WRITE](chunk: Buffer): boolean;
|
|
73
|
-
add(path: string | ReadEntry): this;
|
|
74
|
-
end(cb?: () => void): this;
|
|
75
|
-
end(path: string | ReadEntry, cb?: () => void): this;
|
|
76
|
-
end(path: string | ReadEntry, encoding?: Minipass.Encoding, cb?: () => void): this;
|
|
77
|
-
write(path: string | ReadEntry): boolean;
|
|
78
|
-
[ADDTARENTRY](p: ReadEntry): void;
|
|
79
|
-
[ADDFSENTRY](p: string): void;
|
|
80
|
-
[STAT](job: PackJob): void;
|
|
81
|
-
[ONSTAT](job: PackJob, stat: Stats): void;
|
|
82
|
-
[READDIR](job: PackJob): void;
|
|
83
|
-
[ONREADDIR](job: PackJob, entries: string[]): void;
|
|
84
|
-
[PROCESS](): void;
|
|
85
|
-
get [CURRENT](): PackJob | undefined;
|
|
86
|
-
[JOBDONE](job: PackJob): void;
|
|
87
|
-
[PROCESSJOB](job: PackJob): void;
|
|
88
|
-
[ENTRYOPT](job: PackJob): TarOptions;
|
|
89
|
-
[ENTRY](job: PackJob): WriteEntry | undefined;
|
|
90
|
-
[ONDRAIN](): void;
|
|
91
|
-
[PIPE](job: PackJob): void;
|
|
92
|
-
pause(): void;
|
|
93
|
-
warn(code: string, message: string | Error, data?: WarnData): void;
|
|
135
|
+
constructor(opt?: PackOptions);
|
|
136
|
+
next(): Promise<IteratorResult<Uint8Array, undefined>>;
|
|
137
|
+
/** Stop, and close each file that is open. */
|
|
138
|
+
return(): Promise<IteratorResult<Uint8Array, undefined>>;
|
|
139
|
+
[Symbol.asyncIterator](): this;
|
|
94
140
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
141
|
+
/**
|
|
142
|
+
* Makes an archive with no promise. `add()` paths and entries. The
|
|
143
|
+
* pack is the iterator of the bytes of the archive. It reads the
|
|
144
|
+
* file system only when the consumer asks for bytes, one path at a
|
|
145
|
+
* time. The entries of a directory come before the next item that
|
|
146
|
+
* the caller added.
|
|
147
|
+
*
|
|
148
|
+
* The pack ends when the iterator comes to the end of the queue.
|
|
149
|
+
* With compression, the iterator gives all the archive in one chunk.
|
|
150
|
+
*/
|
|
151
|
+
export declare class PackSync extends PackBase<CreateFSSync, ReadEntrySync, Iterable<WriteEntry | ReadEntrySync>> implements IterableIterator<Uint8Array, undefined> {
|
|
152
|
+
#private;
|
|
153
|
+
constructor(opt?: PackOptionsSync);
|
|
154
|
+
next(): IteratorResult<Uint8Array, undefined>;
|
|
155
|
+
/** Stop, and close the file that is open. */
|
|
156
|
+
return(): IteratorResult<Uint8Array, undefined>;
|
|
157
|
+
[Symbol.iterator](): this;
|
|
103
158
|
}
|
|
104
|
-
export {};
|
|
105
159
|
//# sourceMappingURL=pack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack.d.ts","sourceRoot":"","sources":["../../src/pack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pack.d.ts","sourceRoot":"","sources":["../../src/pack.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,OAAO,EAAQ,KAAK,KAAK,EAAoB,MAAM,YAAY,CAAA;AAE/D,OAAO,KAAK,EACV,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,MAAM,EACP,MAAM,SAAS,CAAA;AAChB,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAK/D,OAAO,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAA;AA4DjE,oEAAoE;AACpE,MAAM,MAAM,QAAQ,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAA;AAErD,+DAA+D;AAC/D,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,WAAW,CAAA;IACjB,sEAAsE;IACtE,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,aAAa,CAAA;IACnB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,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