@vm0/cli 9.244.1 → 9.244.2
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/{agent-YQGYJJAL.js → agent-ZT7N6MLD.js} +5 -5
- package/{banking-D7J2EBCM.js → banking-AAWKST4W.js} +3 -3
- package/{chat-GLSPPO4Q.js → chat-PAXUGFEY.js} +4 -4
- package/{chunk-J6XRVI4M.js → chunk-7OKWBFGR.js} +2 -2
- package/{chunk-J4HTPZIN.js → chunk-CK6ATTWW.js} +1077 -1026
- package/chunk-CK6ATTWW.js.map +1 -0
- package/{chunk-5AW4UA5H.js → chunk-GV2HEMRJ.js} +4 -4
- package/{chunk-TORSFJDH.js → chunk-JI436BOE.js} +2 -2
- package/{chunk-3CSSUJIW.js → chunk-KS6M3OSO.js} +6 -2
- package/chunk-KS6M3OSO.js.map +1 -0
- package/{chunk-ZOH4QODR.js → chunk-N2NIPFOC.js} +4 -4
- package/{chunk-N2I5XGWI.js → chunk-T6TZMDU6.js} +4 -4
- package/{chunk-ILXKNGUQ.js → chunk-TEIIWJJ2.js} +10 -5
- package/{chunk-ILXKNGUQ.js.map → chunk-TEIIWJJ2.js.map} +1 -1
- package/{chunk-C36BSDXL.js → chunk-TR4ZJNTE.js} +2 -2
- package/{chunk-HU2GEC6P.js → chunk-VEKFZPYL.js} +6 -4
- package/{chunk-HU2GEC6P.js.map → chunk-VEKFZPYL.js.map} +1 -1
- package/{chunk-4ZXERZM5.js → chunk-YAOZNNOI.js} +2 -2
- package/{chunk-4ZXERZM5.js.map → chunk-YAOZNNOI.js.map} +1 -1
- package/{chunk-SLQ4XN54.js → chunk-YQ23BVRO.js} +4 -4
- package/{computer-use-TRYF2PB2.js → computer-use-DHGUK2N3.js} +3 -3
- package/{connector-UEZ6VPT4.js → connector-HVZIDLQO.js} +6 -6
- package/{credit-346GQCTS.js → credit-A3MOD6GS.js} +4 -4
- package/{developer-support-ZVGLRD5L.js → developer-support-RZBCNRJS.js} +3 -3
- package/{doctor-QHPISKZV.js → doctor-WEJARXOC.js} +3 -3
- package/{esm-SRH3OR6L.js → esm-PZKPCIYJ.js} +19 -15
- package/esm-PZKPCIYJ.js.map +1 -0
- package/{generate-YQ2DVYJX.js → generate-KSJ3XCHP.js} +4 -4
- package/{github-YZXH7NUT.js → github-ZN7G4HVO.js} +3 -3
- package/{goal-HWX7V62V.js → goal-7VRW6267.js} +3 -3
- package/{host-ZJNFQAKI.js → host-V5F3XRJ4.js} +5 -5
- package/index.js +21 -21
- package/{logs-SOOZ2WMP.js → logs-QLGN73VK.js} +5 -5
- package/{mail-WKRBZLRO.js → mail-CVTU6HO6.js} +5 -5
- package/{maps-QEIVKTET.js → maps-MFQZMB6E.js} +3 -3
- package/{model-O5HOB255.js → model-FCMASR2E.js} +4 -4
- package/{model-provider-A6K7GE7M.js → model-provider-MVDOV7YK.js} +4 -4
- package/{org-GHXH3SHJ.js → org-SZWD2J3Z.js} +3 -3
- package/package.json +1 -1
- package/{phone-CTTZWXJ7.js → phone-6XQDBYIQ.js} +3 -3
- package/{preference-3VCPYPAC.js → preference-4BINWII6.js} +3 -3
- package/{resource-E42IOTOW.js → resource-LH5VDYZT.js} +6 -6
- package/{scrape-XYY26OGB.js → scrape-JYVPGOYT.js} +3 -3
- package/{search-A2JWWD4C.js → search-LIW7AC5D.js} +5 -5
- package/{secret-FABVWU5E.js → secret-AYES2KFJ.js} +3 -3
- package/{slack-F2MOX43Y.js → slack-3CI3OS5B.js} +3 -3
- package/{teams-6CR3DNP4.js → teams-TALKNMRK.js} +3 -3
- package/{telegram-YCDYDYYY.js → telegram-C32NTQXX.js} +3 -3
- package/{variable-VIXF5Q2A.js → variable-J7P3A4DY.js} +3 -3
- package/{video-XSP6K5HL.js → video-E2CQ7JHV.js} +2 -2
- package/{web-ZARUW6OJ.js → web-VYLDPC4T.js} +3 -3
- package/{web-search-PIAPPJWV.js → web-search-J6NSTJHD.js} +3 -3
- package/{whoami-EMRS4ZFU.js → whoami-6ZFXPI4T.js} +5 -5
- package/{workflow-ULBZ2AZN.js → workflow-EVYHOBXG.js} +3 -3
- package/zero.js +35 -35
- package/chunk-3CSSUJIW.js.map +0 -1
- package/chunk-J4HTPZIN.js.map +0 -1
- package/esm-SRH3OR6L.js.map +0 -1
- /package/{agent-YQGYJJAL.js.map → agent-ZT7N6MLD.js.map} +0 -0
- /package/{banking-D7J2EBCM.js.map → banking-AAWKST4W.js.map} +0 -0
- /package/{chat-GLSPPO4Q.js.map → chat-PAXUGFEY.js.map} +0 -0
- /package/{chunk-J6XRVI4M.js.map → chunk-7OKWBFGR.js.map} +0 -0
- /package/{chunk-5AW4UA5H.js.map → chunk-GV2HEMRJ.js.map} +0 -0
- /package/{chunk-TORSFJDH.js.map → chunk-JI436BOE.js.map} +0 -0
- /package/{chunk-ZOH4QODR.js.map → chunk-N2NIPFOC.js.map} +0 -0
- /package/{chunk-N2I5XGWI.js.map → chunk-T6TZMDU6.js.map} +0 -0
- /package/{chunk-C36BSDXL.js.map → chunk-TR4ZJNTE.js.map} +0 -0
- /package/{chunk-SLQ4XN54.js.map → chunk-YQ23BVRO.js.map} +0 -0
- /package/{computer-use-TRYF2PB2.js.map → computer-use-DHGUK2N3.js.map} +0 -0
- /package/{connector-UEZ6VPT4.js.map → connector-HVZIDLQO.js.map} +0 -0
- /package/{credit-346GQCTS.js.map → credit-A3MOD6GS.js.map} +0 -0
- /package/{developer-support-ZVGLRD5L.js.map → developer-support-RZBCNRJS.js.map} +0 -0
- /package/{doctor-QHPISKZV.js.map → doctor-WEJARXOC.js.map} +0 -0
- /package/{generate-YQ2DVYJX.js.map → generate-KSJ3XCHP.js.map} +0 -0
- /package/{github-YZXH7NUT.js.map → github-ZN7G4HVO.js.map} +0 -0
- /package/{goal-HWX7V62V.js.map → goal-7VRW6267.js.map} +0 -0
- /package/{host-ZJNFQAKI.js.map → host-V5F3XRJ4.js.map} +0 -0
- /package/{logs-SOOZ2WMP.js.map → logs-QLGN73VK.js.map} +0 -0
- /package/{mail-WKRBZLRO.js.map → mail-CVTU6HO6.js.map} +0 -0
- /package/{maps-QEIVKTET.js.map → maps-MFQZMB6E.js.map} +0 -0
- /package/{model-O5HOB255.js.map → model-FCMASR2E.js.map} +0 -0
- /package/{model-provider-A6K7GE7M.js.map → model-provider-MVDOV7YK.js.map} +0 -0
- /package/{org-GHXH3SHJ.js.map → org-SZWD2J3Z.js.map} +0 -0
- /package/{phone-CTTZWXJ7.js.map → phone-6XQDBYIQ.js.map} +0 -0
- /package/{preference-3VCPYPAC.js.map → preference-4BINWII6.js.map} +0 -0
- /package/{resource-E42IOTOW.js.map → resource-LH5VDYZT.js.map} +0 -0
- /package/{scrape-XYY26OGB.js.map → scrape-JYVPGOYT.js.map} +0 -0
- /package/{search-A2JWWD4C.js.map → search-LIW7AC5D.js.map} +0 -0
- /package/{secret-FABVWU5E.js.map → secret-AYES2KFJ.js.map} +0 -0
- /package/{slack-F2MOX43Y.js.map → slack-3CI3OS5B.js.map} +0 -0
- /package/{teams-6CR3DNP4.js.map → teams-TALKNMRK.js.map} +0 -0
- /package/{telegram-YCDYDYYY.js.map → telegram-C32NTQXX.js.map} +0 -0
- /package/{variable-VIXF5Q2A.js.map → variable-J7P3A4DY.js.map} +0 -0
- /package/{video-XSP6K5HL.js.map → video-E2CQ7JHV.js.map} +0 -0
- /package/{web-ZARUW6OJ.js.map → web-VYLDPC4T.js.map} +0 -0
- /package/{web-search-PIAPPJWV.js.map → web-search-J6NSTJHD.js.map} +0 -0
- /package/{whoami-EMRS4ZFU.js.map → whoami-6ZFXPI4T.js.map} +0 -0
- /package/{workflow-ULBZ2AZN.js.map → workflow-EVYHOBXG.js.map} +0 -0
|
@@ -5,86 +5,86 @@ import {
|
|
|
5
5
|
init_esm_shims
|
|
6
6
|
} from "./chunk-DIRAZ3YX.js";
|
|
7
7
|
|
|
8
|
-
// ../../node_modules/.pnpm/tar@7.5.
|
|
8
|
+
// ../../node_modules/.pnpm/tar@7.5.20/node_modules/tar/dist/esm/index.min.js
|
|
9
9
|
init_esm_shims();
|
|
10
|
-
import
|
|
10
|
+
import Qr from "events";
|
|
11
11
|
import I from "fs";
|
|
12
|
-
import { EventEmitter as
|
|
13
|
-
import
|
|
14
|
-
import { StringDecoder as
|
|
15
|
-
import
|
|
12
|
+
import { EventEmitter as Di } from "events";
|
|
13
|
+
import Cs from "stream";
|
|
14
|
+
import { StringDecoder as Hr } from "string_decoder";
|
|
15
|
+
import cr from "path";
|
|
16
16
|
import Kt from "fs";
|
|
17
|
-
import { dirname as
|
|
18
|
-
import { EventEmitter as
|
|
19
|
-
import
|
|
17
|
+
import { dirname as Fn, parse as kn } from "path";
|
|
18
|
+
import { EventEmitter as Dn } from "events";
|
|
19
|
+
import zi from "assert";
|
|
20
20
|
import { Buffer as Ot } from "buffer";
|
|
21
|
-
import * as
|
|
22
|
-
import
|
|
21
|
+
import * as Ps from "zlib";
|
|
22
|
+
import en from "zlib";
|
|
23
23
|
import { posix as Zt } from "path";
|
|
24
|
-
import { basename as
|
|
24
|
+
import { basename as _n } from "path";
|
|
25
25
|
import ui from "fs";
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import { win32 as
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import { randomBytes as
|
|
33
|
-
import
|
|
26
|
+
import X from "fs";
|
|
27
|
+
import js from "path";
|
|
28
|
+
import { win32 as Pn } from "path";
|
|
29
|
+
import ar from "path";
|
|
30
|
+
import Br from "fs";
|
|
31
|
+
import co from "assert";
|
|
32
|
+
import { randomBytes as Mr } from "crypto";
|
|
33
|
+
import m from "fs";
|
|
34
34
|
import R from "path";
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
35
|
+
import pr from "fs";
|
|
36
|
+
import wi from "fs";
|
|
37
|
+
import we from "path";
|
|
38
38
|
import k from "fs";
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import { join as
|
|
39
|
+
import ro from "fs/promises";
|
|
40
|
+
import Si from "path";
|
|
41
|
+
import { join as xr } from "path";
|
|
42
42
|
import v from "fs";
|
|
43
|
-
import
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
for (var e in t)
|
|
47
|
-
};
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
43
|
+
import Pr from "path";
|
|
44
|
+
var zr = Object.defineProperty;
|
|
45
|
+
var Ur = (s3, t) => {
|
|
46
|
+
for (var e in t) zr(s3, e, { get: t[e], enumerable: true });
|
|
47
|
+
};
|
|
48
|
+
var Ds = typeof process == "object" && process ? process : { stdout: null, stderr: null };
|
|
49
|
+
var Wr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof Cs || Gr(s3) || Zr(s3));
|
|
50
|
+
var Gr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Di && typeof s3.pipe == "function" && s3.pipe !== Cs.Writable.prototype.pipe;
|
|
51
|
+
var Zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Di && typeof s3.write == "function" && typeof s3.end == "function";
|
|
52
|
+
var Q = /* @__PURE__ */ Symbol("EOF");
|
|
53
|
+
var J = /* @__PURE__ */ Symbol("maybeEmitEnd");
|
|
54
|
+
var nt = /* @__PURE__ */ Symbol("emittedEnd");
|
|
55
|
+
var De = /* @__PURE__ */ Symbol("emittingEnd");
|
|
56
56
|
var qt = /* @__PURE__ */ Symbol("emittedError");
|
|
57
57
|
var Ne = /* @__PURE__ */ Symbol("closed");
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
58
|
+
var Ns = /* @__PURE__ */ Symbol("read");
|
|
59
|
+
var Ae = /* @__PURE__ */ Symbol("flush");
|
|
60
|
+
var As = /* @__PURE__ */ Symbol("flushChunk");
|
|
61
61
|
var z = /* @__PURE__ */ Symbol("encoding");
|
|
62
62
|
var Mt = /* @__PURE__ */ Symbol("decoder");
|
|
63
63
|
var g = /* @__PURE__ */ Symbol("flowing");
|
|
64
64
|
var Qt = /* @__PURE__ */ Symbol("paused");
|
|
65
65
|
var Bt = /* @__PURE__ */ Symbol("resume");
|
|
66
66
|
var b = /* @__PURE__ */ Symbol("buffer");
|
|
67
|
-
var
|
|
67
|
+
var N = /* @__PURE__ */ Symbol("pipes");
|
|
68
68
|
var _ = /* @__PURE__ */ Symbol("bufferLength");
|
|
69
|
-
var
|
|
70
|
-
var
|
|
69
|
+
var bi = /* @__PURE__ */ Symbol("bufferPush");
|
|
70
|
+
var Ie = /* @__PURE__ */ Symbol("bufferShift");
|
|
71
71
|
var L = /* @__PURE__ */ Symbol("objectMode");
|
|
72
|
-
var
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
72
|
+
var S = /* @__PURE__ */ Symbol("destroyed");
|
|
73
|
+
var _i = /* @__PURE__ */ Symbol("error");
|
|
74
|
+
var Oi = /* @__PURE__ */ Symbol("emitData");
|
|
75
|
+
var Is = /* @__PURE__ */ Symbol("emitEnd");
|
|
76
|
+
var Ti = /* @__PURE__ */ Symbol("emitEnd2");
|
|
77
77
|
var Z = /* @__PURE__ */ Symbol("async");
|
|
78
|
-
var
|
|
79
|
-
var
|
|
78
|
+
var xi = /* @__PURE__ */ Symbol("abort");
|
|
79
|
+
var Ce = /* @__PURE__ */ Symbol("aborted");
|
|
80
80
|
var Jt = /* @__PURE__ */ Symbol("signal");
|
|
81
81
|
var Rt = /* @__PURE__ */ Symbol("dataListeners");
|
|
82
|
-
var
|
|
82
|
+
var C = /* @__PURE__ */ Symbol("discarded");
|
|
83
83
|
var jt = (s3) => Promise.resolve().then(s3);
|
|
84
|
-
var
|
|
85
|
-
var
|
|
86
|
-
var
|
|
87
|
-
var
|
|
84
|
+
var Yr = (s3) => s3();
|
|
85
|
+
var Kr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
|
|
86
|
+
var Vr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
|
|
87
|
+
var $r = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
|
|
88
88
|
var Fe = class {
|
|
89
89
|
src;
|
|
90
90
|
dest;
|
|
@@ -102,7 +102,7 @@ var Fe = class {
|
|
|
102
102
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
|
-
var
|
|
105
|
+
var Li = class extends Fe {
|
|
106
106
|
unpipe() {
|
|
107
107
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
108
108
|
}
|
|
@@ -110,36 +110,36 @@ var xi = class extends Fe {
|
|
|
110
110
|
super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
|
-
var
|
|
114
|
-
var
|
|
115
|
-
var A = class extends
|
|
113
|
+
var Xr = (s3) => !!s3.objectMode;
|
|
114
|
+
var qr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
|
|
115
|
+
var A = class extends Di {
|
|
116
116
|
[g] = false;
|
|
117
117
|
[Qt] = false;
|
|
118
|
-
[
|
|
118
|
+
[N] = [];
|
|
119
119
|
[b] = [];
|
|
120
120
|
[L];
|
|
121
121
|
[z];
|
|
122
122
|
[Z];
|
|
123
123
|
[Mt];
|
|
124
|
-
[
|
|
125
|
-
[
|
|
126
|
-
[
|
|
124
|
+
[Q] = false;
|
|
125
|
+
[nt] = false;
|
|
126
|
+
[De] = false;
|
|
127
127
|
[Ne] = false;
|
|
128
128
|
[qt] = null;
|
|
129
129
|
[_] = 0;
|
|
130
|
-
[
|
|
130
|
+
[S] = false;
|
|
131
131
|
[Jt];
|
|
132
|
-
[
|
|
132
|
+
[Ce] = false;
|
|
133
133
|
[Rt] = 0;
|
|
134
|
-
[
|
|
134
|
+
[C] = false;
|
|
135
135
|
writable = true;
|
|
136
136
|
readable = true;
|
|
137
137
|
constructor(...t) {
|
|
138
138
|
let e = t[0] || {};
|
|
139
139
|
if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
|
|
140
|
-
|
|
140
|
+
Xr(e) ? (this[L] = true, this[z] = null) : qr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new Hr(this[z]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[b] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[N] });
|
|
141
141
|
let { signal: i } = e;
|
|
142
|
-
i && (this[Jt] = i, i.aborted ? this[
|
|
142
|
+
i && (this[Jt] = i, i.aborted ? this[xi]() : i.addEventListener("abort", () => this[xi]()));
|
|
143
143
|
}
|
|
144
144
|
get bufferLength() {
|
|
145
145
|
return this[_];
|
|
@@ -165,56 +165,56 @@ var A = class extends Li {
|
|
|
165
165
|
set async(t) {
|
|
166
166
|
this[Z] = this[Z] || !!t;
|
|
167
167
|
}
|
|
168
|
-
[
|
|
169
|
-
this[
|
|
168
|
+
[xi]() {
|
|
169
|
+
this[Ce] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
|
|
170
170
|
}
|
|
171
171
|
get aborted() {
|
|
172
|
-
return this[
|
|
172
|
+
return this[Ce];
|
|
173
173
|
}
|
|
174
174
|
set aborted(t) {
|
|
175
175
|
}
|
|
176
176
|
write(t, e, i) {
|
|
177
|
-
if (this[
|
|
178
|
-
if (this[
|
|
179
|
-
if (this[
|
|
177
|
+
if (this[Ce]) return false;
|
|
178
|
+
if (this[Q]) throw new Error("write after end");
|
|
179
|
+
if (this[S]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
|
|
180
180
|
typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
|
|
181
|
-
let r = this[Z] ? jt :
|
|
181
|
+
let r = this[Z] ? jt : Yr;
|
|
182
182
|
if (!this[L] && !Buffer.isBuffer(t)) {
|
|
183
|
-
if (
|
|
184
|
-
else if (
|
|
183
|
+
if ($r(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
|
|
184
|
+
else if (Vr(t)) t = Buffer.from(t);
|
|
185
185
|
else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
|
|
186
186
|
}
|
|
187
|
-
return this[L] ? (this[g] && this[_] !== 0 && this[
|
|
187
|
+
return this[L] ? (this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[bi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : t.length ? (typeof t == "string" && !(e === this[z] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z] && (t = this[Mt].write(t)), this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[bi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[g]);
|
|
188
188
|
}
|
|
189
189
|
read(t) {
|
|
190
|
-
if (this[
|
|
191
|
-
if (this[
|
|
190
|
+
if (this[S]) return null;
|
|
191
|
+
if (this[C] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[J](), null;
|
|
192
192
|
this[L] && (t = null), this[b].length > 1 && !this[L] && (this[b] = [this[z] ? this[b].join("") : Buffer.concat(this[b], this[_])]);
|
|
193
|
-
let e = this[
|
|
194
|
-
return this[
|
|
193
|
+
let e = this[Ns](t || null, this[b][0]);
|
|
194
|
+
return this[J](), e;
|
|
195
195
|
}
|
|
196
|
-
[
|
|
197
|
-
if (this[L]) this[
|
|
196
|
+
[Ns](t, e) {
|
|
197
|
+
if (this[L]) this[Ie]();
|
|
198
198
|
else {
|
|
199
199
|
let i = e;
|
|
200
|
-
t === i.length || t === null ? this[
|
|
200
|
+
t === i.length || t === null ? this[Ie]() : typeof i == "string" ? (this[b][0] = i.slice(t), e = i.slice(0, t), this[_] -= t) : (this[b][0] = i.subarray(t), e = i.subarray(0, t), this[_] -= t);
|
|
201
201
|
}
|
|
202
|
-
return this.emit("data", e), !this[b].length && !this[
|
|
202
|
+
return this.emit("data", e), !this[b].length && !this[Q] && this.emit("drain"), e;
|
|
203
203
|
}
|
|
204
204
|
end(t, e, i) {
|
|
205
|
-
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = "utf8"), t !== void 0 && this.write(t, e), i && this.once("end", i), this[
|
|
205
|
+
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = "utf8"), t !== void 0 && this.write(t, e), i && this.once("end", i), this[Q] = true, this.writable = false, (this[g] || !this[Qt]) && this[J](), this;
|
|
206
206
|
}
|
|
207
207
|
[Bt]() {
|
|
208
|
-
this[
|
|
208
|
+
this[S] || (!this[Rt] && !this[N].length && (this[C] = true), this[Qt] = false, this[g] = true, this.emit("resume"), this[b].length ? this[Ae]() : this[Q] ? this[J]() : this.emit("drain"));
|
|
209
209
|
}
|
|
210
210
|
resume() {
|
|
211
211
|
return this[Bt]();
|
|
212
212
|
}
|
|
213
213
|
pause() {
|
|
214
|
-
this[g] = false, this[Qt] = true, this[
|
|
214
|
+
this[g] = false, this[Qt] = true, this[C] = false;
|
|
215
215
|
}
|
|
216
216
|
get destroyed() {
|
|
217
|
-
return this[
|
|
217
|
+
return this[S];
|
|
218
218
|
}
|
|
219
219
|
get flowing() {
|
|
220
220
|
return this[g];
|
|
@@ -222,39 +222,39 @@ var A = class extends Li {
|
|
|
222
222
|
get paused() {
|
|
223
223
|
return this[Qt];
|
|
224
224
|
}
|
|
225
|
-
[
|
|
225
|
+
[bi](t) {
|
|
226
226
|
this[L] ? this[_] += 1 : this[_] += t.length, this[b].push(t);
|
|
227
227
|
}
|
|
228
|
-
[
|
|
228
|
+
[Ie]() {
|
|
229
229
|
return this[L] ? this[_] -= 1 : this[_] -= this[b][0].length, this[b].shift();
|
|
230
230
|
}
|
|
231
|
-
[
|
|
231
|
+
[Ae](t = false) {
|
|
232
232
|
do
|
|
233
233
|
;
|
|
234
|
-
while (this[
|
|
235
|
-
!t && !this[b].length && !this[
|
|
234
|
+
while (this[As](this[Ie]()) && this[b].length);
|
|
235
|
+
!t && !this[b].length && !this[Q] && this.emit("drain");
|
|
236
236
|
}
|
|
237
|
-
[
|
|
237
|
+
[As](t) {
|
|
238
238
|
return this.emit("data", t), this[g];
|
|
239
239
|
}
|
|
240
240
|
pipe(t, e) {
|
|
241
|
-
if (this[
|
|
242
|
-
this[
|
|
243
|
-
let i = this[
|
|
244
|
-
return e = e || {}, t ===
|
|
241
|
+
if (this[S]) return t;
|
|
242
|
+
this[C] = false;
|
|
243
|
+
let i = this[nt];
|
|
244
|
+
return e = e || {}, t === Ds.stdout || t === Ds.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[N].push(e.proxyErrors ? new Li(this, t, e) : new Fe(this, t, e)), this[Z] ? jt(() => this[Bt]()) : this[Bt]()), t;
|
|
245
245
|
}
|
|
246
246
|
unpipe(t) {
|
|
247
|
-
let e = this[
|
|
248
|
-
e && (this[
|
|
247
|
+
let e = this[N].find((i) => i.dest === t);
|
|
248
|
+
e && (this[N].length === 1 ? (this[g] && this[Rt] === 0 && (this[g] = false), this[N] = []) : this[N].splice(this[N].indexOf(e), 1), e.unpipe());
|
|
249
249
|
}
|
|
250
250
|
addListener(t, e) {
|
|
251
251
|
return this.on(t, e);
|
|
252
252
|
}
|
|
253
253
|
on(t, e) {
|
|
254
254
|
let i = super.on(t, e);
|
|
255
|
-
if (t === "data") this[
|
|
255
|
+
if (t === "data") this[C] = false, this[Rt]++, !this[N].length && !this[g] && this[Bt]();
|
|
256
256
|
else if (t === "readable" && this[_] !== 0) super.emit("readable");
|
|
257
|
-
else if (
|
|
257
|
+
else if (Kr(t) && this[nt]) super.emit(t), this.removeAllListeners(t);
|
|
258
258
|
else if (t === "error" && this[qt]) {
|
|
259
259
|
let r = e;
|
|
260
260
|
this[Z] ? jt(() => r.call(this, this[qt])) : r.call(this, this[qt]);
|
|
@@ -266,58 +266,58 @@ var A = class extends Li {
|
|
|
266
266
|
}
|
|
267
267
|
off(t, e) {
|
|
268
268
|
let i = super.off(t, e);
|
|
269
|
-
return t === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[
|
|
269
|
+
return t === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[C] && !this[N].length && (this[g] = false)), i;
|
|
270
270
|
}
|
|
271
271
|
removeAllListeners(t) {
|
|
272
272
|
let e = super.removeAllListeners(t);
|
|
273
|
-
return (t === "data" || t === void 0) && (this[Rt] = 0, !this[
|
|
273
|
+
return (t === "data" || t === void 0) && (this[Rt] = 0, !this[C] && !this[N].length && (this[g] = false)), e;
|
|
274
274
|
}
|
|
275
275
|
get emittedEnd() {
|
|
276
|
-
return this[
|
|
276
|
+
return this[nt];
|
|
277
277
|
}
|
|
278
|
-
[
|
|
279
|
-
!this[
|
|
278
|
+
[J]() {
|
|
279
|
+
!this[De] && !this[nt] && !this[S] && this[b].length === 0 && this[Q] && (this[De] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[De] = false);
|
|
280
280
|
}
|
|
281
281
|
emit(t, ...e) {
|
|
282
282
|
let i = e[0];
|
|
283
|
-
if (t !== "error" && t !== "close" && t !==
|
|
284
|
-
if (t === "data") return !this[L] && !i ? false : this[Z] ? (jt(() => this[
|
|
285
|
-
if (t === "end") return this[
|
|
283
|
+
if (t !== "error" && t !== "close" && t !== S && this[S]) return false;
|
|
284
|
+
if (t === "data") return !this[L] && !i ? false : this[Z] ? (jt(() => this[Oi](i)), true) : this[Oi](i);
|
|
285
|
+
if (t === "end") return this[Is]();
|
|
286
286
|
if (t === "close") {
|
|
287
|
-
if (this[Ne] = true, !this[
|
|
287
|
+
if (this[Ne] = true, !this[nt] && !this[S]) return false;
|
|
288
288
|
let n = super.emit("close");
|
|
289
289
|
return this.removeAllListeners("close"), n;
|
|
290
290
|
} else if (t === "error") {
|
|
291
|
-
this[qt] = i, super.emit(
|
|
291
|
+
this[qt] = i, super.emit(_i, i);
|
|
292
292
|
let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
|
|
293
|
-
return this[
|
|
293
|
+
return this[J](), n;
|
|
294
294
|
} else if (t === "resume") {
|
|
295
295
|
let n = super.emit("resume");
|
|
296
|
-
return this[
|
|
296
|
+
return this[J](), n;
|
|
297
297
|
} else if (t === "finish" || t === "prefinish") {
|
|
298
298
|
let n = super.emit(t);
|
|
299
299
|
return this.removeAllListeners(t), n;
|
|
300
300
|
}
|
|
301
301
|
let r = super.emit(t, ...e);
|
|
302
|
-
return this[
|
|
302
|
+
return this[J](), r;
|
|
303
303
|
}
|
|
304
|
-
[
|
|
305
|
-
for (let i of this[
|
|
306
|
-
let e = this[
|
|
307
|
-
return this[
|
|
304
|
+
[Oi](t) {
|
|
305
|
+
for (let i of this[N]) i.dest.write(t) === false && this.pause();
|
|
306
|
+
let e = this[C] ? false : super.emit("data", t);
|
|
307
|
+
return this[J](), e;
|
|
308
308
|
}
|
|
309
|
-
[
|
|
310
|
-
return this[
|
|
309
|
+
[Is]() {
|
|
310
|
+
return this[nt] ? false : (this[nt] = true, this.readable = false, this[Z] ? (jt(() => this[Ti]()), true) : this[Ti]());
|
|
311
311
|
}
|
|
312
|
-
[
|
|
312
|
+
[Ti]() {
|
|
313
313
|
if (this[Mt]) {
|
|
314
314
|
let e = this[Mt].end();
|
|
315
315
|
if (e) {
|
|
316
|
-
for (let i of this[
|
|
317
|
-
this[
|
|
316
|
+
for (let i of this[N]) i.dest.write(e);
|
|
317
|
+
this[C] || super.emit("data", e);
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
|
-
for (let e of this[
|
|
320
|
+
for (let e of this[N]) e.end();
|
|
321
321
|
let t = super.emit("end");
|
|
322
322
|
return this.removeAllListeners("end"), t;
|
|
323
323
|
}
|
|
@@ -336,26 +336,26 @@ var A = class extends Li {
|
|
|
336
336
|
}
|
|
337
337
|
async promise() {
|
|
338
338
|
return new Promise((t, e) => {
|
|
339
|
-
this.on(
|
|
339
|
+
this.on(S, () => e(new Error("stream destroyed"))), this.on("error", (i) => e(i)), this.on("end", () => t());
|
|
340
340
|
});
|
|
341
341
|
}
|
|
342
342
|
[Symbol.asyncIterator]() {
|
|
343
|
-
this[
|
|
343
|
+
this[C] = false;
|
|
344
344
|
let t = false, e = async () => (this.pause(), t = true, { value: void 0, done: true });
|
|
345
345
|
return { next: () => {
|
|
346
346
|
if (t) return e();
|
|
347
347
|
let r = this.read();
|
|
348
348
|
if (r !== null) return Promise.resolve({ done: false, value: r });
|
|
349
|
-
if (this[
|
|
350
|
-
let n, o,
|
|
351
|
-
this.off("data",
|
|
352
|
-
},
|
|
353
|
-
this.off("error",
|
|
349
|
+
if (this[Q]) return e();
|
|
350
|
+
let n, o, h = (d) => {
|
|
351
|
+
this.off("data", a), this.off("end", l), this.off(S, c), e(), o(d);
|
|
352
|
+
}, a = (d) => {
|
|
353
|
+
this.off("error", h), this.off("end", l), this.off(S, c), this.pause(), n({ value: d, done: !!this[Q] });
|
|
354
354
|
}, l = () => {
|
|
355
|
-
this.off("error",
|
|
356
|
-
}, c = () =>
|
|
357
|
-
return new Promise((d,
|
|
358
|
-
o =
|
|
355
|
+
this.off("error", h), this.off("data", a), this.off(S, c), e(), n({ done: true, value: void 0 });
|
|
356
|
+
}, c = () => h(new Error("stream destroyed"));
|
|
357
|
+
return new Promise((d, y) => {
|
|
358
|
+
o = y, n = d, this.once(S, c), this.once("error", h), this.once("end", l), this.once("data", a);
|
|
359
359
|
});
|
|
360
360
|
}, throw: e, return: e, [Symbol.asyncIterator]() {
|
|
361
361
|
return this;
|
|
@@ -363,71 +363,71 @@ var A = class extends Li {
|
|
|
363
363
|
} };
|
|
364
364
|
}
|
|
365
365
|
[Symbol.iterator]() {
|
|
366
|
-
this[
|
|
367
|
-
let t = false, e = () => (this.pause(), this.off(
|
|
366
|
+
this[C] = false;
|
|
367
|
+
let t = false, e = () => (this.pause(), this.off(_i, e), this.off(S, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
|
|
368
368
|
if (t) return e();
|
|
369
369
|
let r = this.read();
|
|
370
370
|
return r === null ? e() : { done: false, value: r };
|
|
371
371
|
};
|
|
372
|
-
return this.once("end", e), this.once(
|
|
372
|
+
return this.once("end", e), this.once(_i, e), this.once(S, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
|
|
373
373
|
return this;
|
|
374
374
|
}, [Symbol.dispose]: () => {
|
|
375
375
|
} };
|
|
376
376
|
}
|
|
377
377
|
destroy(t) {
|
|
378
|
-
if (this[
|
|
379
|
-
this[
|
|
378
|
+
if (this[S]) return t ? this.emit("error", t) : this.emit(S), this;
|
|
379
|
+
this[S] = true, this[C] = true, this[b].length = 0, this[_] = 0;
|
|
380
380
|
let e = this;
|
|
381
|
-
return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(
|
|
381
|
+
return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(S), this;
|
|
382
382
|
}
|
|
383
383
|
static get isStream() {
|
|
384
|
-
return
|
|
384
|
+
return Wr;
|
|
385
385
|
}
|
|
386
386
|
};
|
|
387
|
-
var
|
|
388
|
-
var
|
|
387
|
+
var Jr = I.writev;
|
|
388
|
+
var ht = /* @__PURE__ */ Symbol("_autoClose");
|
|
389
389
|
var H = /* @__PURE__ */ Symbol("_close");
|
|
390
390
|
var te = /* @__PURE__ */ Symbol("_ended");
|
|
391
|
-
var
|
|
391
|
+
var u = /* @__PURE__ */ Symbol("_fd");
|
|
392
392
|
var Ni = /* @__PURE__ */ Symbol("_finished");
|
|
393
|
-
var
|
|
394
|
-
var
|
|
395
|
-
var
|
|
396
|
-
var
|
|
393
|
+
var tt = /* @__PURE__ */ Symbol("_flags");
|
|
394
|
+
var Ai = /* @__PURE__ */ Symbol("_flush");
|
|
395
|
+
var ki = /* @__PURE__ */ Symbol("_handleChunk");
|
|
396
|
+
var vi = /* @__PURE__ */ Symbol("_makeBuf");
|
|
397
397
|
var ie = /* @__PURE__ */ Symbol("_mode");
|
|
398
|
-
var
|
|
398
|
+
var ke = /* @__PURE__ */ Symbol("_needDrain");
|
|
399
399
|
var Ut = /* @__PURE__ */ Symbol("_onerror");
|
|
400
400
|
var Ht = /* @__PURE__ */ Symbol("_onopen");
|
|
401
|
-
var
|
|
401
|
+
var Ii = /* @__PURE__ */ Symbol("_onread");
|
|
402
402
|
var Pt = /* @__PURE__ */ Symbol("_onwrite");
|
|
403
|
-
var
|
|
403
|
+
var at = /* @__PURE__ */ Symbol("_open");
|
|
404
404
|
var U = /* @__PURE__ */ Symbol("_path");
|
|
405
|
-
var
|
|
405
|
+
var ot = /* @__PURE__ */ Symbol("_pos");
|
|
406
406
|
var Y = /* @__PURE__ */ Symbol("_queue");
|
|
407
407
|
var zt = /* @__PURE__ */ Symbol("_read");
|
|
408
|
-
var
|
|
409
|
-
var
|
|
408
|
+
var Ci = /* @__PURE__ */ Symbol("_readSize");
|
|
409
|
+
var j = /* @__PURE__ */ Symbol("_reading");
|
|
410
410
|
var ee = /* @__PURE__ */ Symbol("_remain");
|
|
411
411
|
var Fi = /* @__PURE__ */ Symbol("_size");
|
|
412
|
-
var
|
|
412
|
+
var ve = /* @__PURE__ */ Symbol("_write");
|
|
413
413
|
var gt = /* @__PURE__ */ Symbol("_writing");
|
|
414
|
-
var
|
|
414
|
+
var Me = /* @__PURE__ */ Symbol("_defaultFlag");
|
|
415
415
|
var bt = /* @__PURE__ */ Symbol("_errored");
|
|
416
416
|
var _t = class extends A {
|
|
417
417
|
[bt] = false;
|
|
418
|
-
[
|
|
418
|
+
[u];
|
|
419
419
|
[U];
|
|
420
|
-
[
|
|
421
|
-
[
|
|
420
|
+
[Ci];
|
|
421
|
+
[j] = false;
|
|
422
422
|
[Fi];
|
|
423
423
|
[ee];
|
|
424
|
-
[
|
|
424
|
+
[ht];
|
|
425
425
|
constructor(t, e) {
|
|
426
426
|
if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
|
|
427
|
-
this[bt] = false, this[
|
|
427
|
+
this[bt] = false, this[u] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ci] = e.readSize || 16 * 1024 * 1024, this[j] = false, this[Fi] = typeof e.size == "number" ? e.size : 1 / 0, this[ee] = this[Fi], this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[u] == "number" ? this[zt]() : this[at]();
|
|
428
428
|
}
|
|
429
429
|
get fd() {
|
|
430
|
-
return this[
|
|
430
|
+
return this[u];
|
|
431
431
|
}
|
|
432
432
|
get path() {
|
|
433
433
|
return this[U];
|
|
@@ -438,36 +438,36 @@ var _t = class extends A {
|
|
|
438
438
|
end() {
|
|
439
439
|
throw new TypeError("this is a readable stream");
|
|
440
440
|
}
|
|
441
|
-
[
|
|
441
|
+
[at]() {
|
|
442
442
|
I.open(this[U], "r", (t, e) => this[Ht](t, e));
|
|
443
443
|
}
|
|
444
444
|
[Ht](t, e) {
|
|
445
|
-
t ? this[Ut](t) : (this[
|
|
445
|
+
t ? this[Ut](t) : (this[u] = e, this.emit("open", e), this[zt]());
|
|
446
446
|
}
|
|
447
|
-
[
|
|
448
|
-
return Buffer.allocUnsafe(Math.min(this[
|
|
447
|
+
[vi]() {
|
|
448
|
+
return Buffer.allocUnsafe(Math.min(this[Ci], this[ee]));
|
|
449
449
|
}
|
|
450
450
|
[zt]() {
|
|
451
|
-
if (!this[
|
|
452
|
-
this[
|
|
453
|
-
let t = this[
|
|
454
|
-
if (t.length === 0) return process.nextTick(() => this[
|
|
455
|
-
I.read(this[
|
|
451
|
+
if (!this[j]) {
|
|
452
|
+
this[j] = true;
|
|
453
|
+
let t = this[vi]();
|
|
454
|
+
if (t.length === 0) return process.nextTick(() => this[Ii](null, 0, t));
|
|
455
|
+
I.read(this[u], t, 0, t.length, null, (e, i, r) => this[Ii](e, i, r));
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
|
-
[
|
|
459
|
-
this[
|
|
458
|
+
[Ii](t, e, i) {
|
|
459
|
+
this[j] = false, t ? this[Ut](t) : this[ki](e, i) && this[zt]();
|
|
460
460
|
}
|
|
461
461
|
[H]() {
|
|
462
|
-
if (this[
|
|
463
|
-
let t = this[
|
|
464
|
-
this[
|
|
462
|
+
if (this[ht] && typeof this[u] == "number") {
|
|
463
|
+
let t = this[u];
|
|
464
|
+
this[u] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
467
|
[Ut](t) {
|
|
468
|
-
this[
|
|
468
|
+
this[j] = true, this[H](), this.emit("error", t);
|
|
469
469
|
}
|
|
470
|
-
[
|
|
470
|
+
[ki](t, e) {
|
|
471
471
|
let i = false;
|
|
472
472
|
return this[ee] -= t, t > 0 && (i = super.write(t < e.length ? e.subarray(0, t) : e)), (t === 0 || this[ee] <= 0) && (i = false, this[H](), super.end()), i;
|
|
473
473
|
}
|
|
@@ -477,7 +477,7 @@ var _t = class extends A {
|
|
|
477
477
|
case "finish":
|
|
478
478
|
return false;
|
|
479
479
|
case "drain":
|
|
480
|
-
return typeof this[
|
|
480
|
+
return typeof this[u] == "number" && this[zt](), false;
|
|
481
481
|
case "error":
|
|
482
482
|
return this[bt] ? false : (this[bt] = true, super.emit(t, ...e));
|
|
483
483
|
default:
|
|
@@ -485,8 +485,8 @@ var _t = class extends A {
|
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
};
|
|
488
|
-
var
|
|
489
|
-
[
|
|
488
|
+
var Be = class extends _t {
|
|
489
|
+
[at]() {
|
|
490
490
|
let t = true;
|
|
491
491
|
try {
|
|
492
492
|
this[Ht](null, I.openSync(this[U], "r")), t = false;
|
|
@@ -497,13 +497,13 @@ var Me = class extends _t {
|
|
|
497
497
|
[zt]() {
|
|
498
498
|
let t = true;
|
|
499
499
|
try {
|
|
500
|
-
if (!this[
|
|
501
|
-
this[
|
|
500
|
+
if (!this[j]) {
|
|
501
|
+
this[j] = true;
|
|
502
502
|
do {
|
|
503
|
-
let e = this[
|
|
504
|
-
if (!this[
|
|
503
|
+
let e = this[vi](), i = e.length === 0 ? 0 : I.readSync(this[u], e, 0, e.length, null);
|
|
504
|
+
if (!this[ki](i, e)) break;
|
|
505
505
|
} while (true);
|
|
506
|
-
this[
|
|
506
|
+
this[j] = false;
|
|
507
507
|
}
|
|
508
508
|
t = false;
|
|
509
509
|
} finally {
|
|
@@ -511,32 +511,32 @@ var Me = class extends _t {
|
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
513
|
[H]() {
|
|
514
|
-
if (this[
|
|
515
|
-
let t = this[
|
|
516
|
-
this[
|
|
514
|
+
if (this[ht] && typeof this[u] == "number") {
|
|
515
|
+
let t = this[u];
|
|
516
|
+
this[u] = void 0, I.closeSync(t), this.emit("close");
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
};
|
|
520
|
-
var
|
|
520
|
+
var et = class extends Qr {
|
|
521
521
|
readable = false;
|
|
522
522
|
writable = true;
|
|
523
523
|
[bt] = false;
|
|
524
524
|
[gt] = false;
|
|
525
525
|
[te] = false;
|
|
526
526
|
[Y] = [];
|
|
527
|
-
[
|
|
527
|
+
[ke] = false;
|
|
528
528
|
[U];
|
|
529
529
|
[ie];
|
|
530
|
-
[
|
|
531
|
-
[
|
|
532
|
-
[
|
|
533
|
-
[
|
|
530
|
+
[ht];
|
|
531
|
+
[u];
|
|
532
|
+
[Me];
|
|
533
|
+
[tt];
|
|
534
534
|
[Ni] = false;
|
|
535
|
-
[
|
|
535
|
+
[ot];
|
|
536
536
|
constructor(t, e) {
|
|
537
|
-
e = e || {}, super(e), this[U] = t, this[
|
|
538
|
-
let i = this[
|
|
539
|
-
this[
|
|
537
|
+
e = e || {}, super(e), this[U] = t, this[u] = typeof e.fd == "number" ? e.fd : void 0, this[ie] = e.mode === void 0 ? 438 : e.mode, this[ot] = typeof e.start == "number" ? e.start : void 0, this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : true;
|
|
538
|
+
let i = this[ot] !== void 0 ? "r+" : "w";
|
|
539
|
+
this[Me] = e.flags === void 0, this[tt] = e.flags === void 0 ? i : e.flags, this[u] === void 0 && this[at]();
|
|
540
540
|
}
|
|
541
541
|
emit(t, ...e) {
|
|
542
542
|
if (t === "error") {
|
|
@@ -546,7 +546,7 @@ var tt = class extends $r {
|
|
|
546
546
|
return super.emit(t, ...e);
|
|
547
547
|
}
|
|
548
548
|
get fd() {
|
|
549
|
-
return this[
|
|
549
|
+
return this[u];
|
|
550
550
|
}
|
|
551
551
|
get path() {
|
|
552
552
|
return this[U];
|
|
@@ -554,61 +554,61 @@ var tt = class extends $r {
|
|
|
554
554
|
[Ut](t) {
|
|
555
555
|
this[H](), this[gt] = true, this.emit("error", t);
|
|
556
556
|
}
|
|
557
|
-
[
|
|
558
|
-
I.open(this[U], this[
|
|
557
|
+
[at]() {
|
|
558
|
+
I.open(this[U], this[tt], this[ie], (t, e) => this[Ht](t, e));
|
|
559
559
|
}
|
|
560
560
|
[Ht](t, e) {
|
|
561
|
-
this[
|
|
561
|
+
this[Me] && this[tt] === "r+" && t && t.code === "ENOENT" ? (this[tt] = "w", this[at]()) : t ? this[Ut](t) : (this[u] = e, this.emit("open", e), this[gt] || this[Ai]());
|
|
562
562
|
}
|
|
563
563
|
end(t, e) {
|
|
564
|
-
return t && this.write(t, e), this[te] = true, !this[gt] && !this[Y].length && typeof this[
|
|
564
|
+
return t && this.write(t, e), this[te] = true, !this[gt] && !this[Y].length && typeof this[u] == "number" && this[Pt](null, 0), this;
|
|
565
565
|
}
|
|
566
566
|
write(t, e) {
|
|
567
|
-
return typeof t == "string" && (t = Buffer.from(t, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[
|
|
567
|
+
return typeof t == "string" && (t = Buffer.from(t, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[u] === void 0 || this[gt] || this[Y].length ? (this[Y].push(t), this[ke] = true, false) : (this[gt] = true, this[ve](t), true);
|
|
568
568
|
}
|
|
569
|
-
[
|
|
570
|
-
I.write(this[
|
|
569
|
+
[ve](t) {
|
|
570
|
+
I.write(this[u], t, 0, t.length, this[ot], (e, i) => this[Pt](e, i));
|
|
571
571
|
}
|
|
572
572
|
[Pt](t, e) {
|
|
573
|
-
t ? this[Ut](t) : (this[
|
|
573
|
+
t ? this[Ut](t) : (this[ot] !== void 0 && typeof e == "number" && (this[ot] += e), this[Y].length ? this[Ai]() : (this[gt] = false, this[te] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[ke] && (this[ke] = false, this.emit("drain"))));
|
|
574
574
|
}
|
|
575
|
-
[
|
|
575
|
+
[Ai]() {
|
|
576
576
|
if (this[Y].length === 0) this[te] && this[Pt](null, 0);
|
|
577
|
-
else if (this[Y].length === 1) this[
|
|
577
|
+
else if (this[Y].length === 1) this[ve](this[Y].pop());
|
|
578
578
|
else {
|
|
579
579
|
let t = this[Y];
|
|
580
|
-
this[Y] = [],
|
|
580
|
+
this[Y] = [], Jr(this[u], t, this[ot], (e, i) => this[Pt](e, i));
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
583
|
[H]() {
|
|
584
|
-
if (this[
|
|
585
|
-
let t = this[
|
|
586
|
-
this[
|
|
584
|
+
if (this[ht] && typeof this[u] == "number") {
|
|
585
|
+
let t = this[u];
|
|
586
|
+
this[u] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
589
|
};
|
|
590
|
-
var Wt = class extends
|
|
591
|
-
[
|
|
590
|
+
var Wt = class extends et {
|
|
591
|
+
[at]() {
|
|
592
592
|
let t;
|
|
593
|
-
if (this[
|
|
594
|
-
t = I.openSync(this[U], this[
|
|
593
|
+
if (this[Me] && this[tt] === "r+") try {
|
|
594
|
+
t = I.openSync(this[U], this[tt], this[ie]);
|
|
595
595
|
} catch (e) {
|
|
596
|
-
if (e?.code === "ENOENT") return this[
|
|
596
|
+
if (e?.code === "ENOENT") return this[tt] = "w", this[at]();
|
|
597
597
|
throw e;
|
|
598
598
|
}
|
|
599
|
-
else t = I.openSync(this[U], this[
|
|
599
|
+
else t = I.openSync(this[U], this[tt], this[ie]);
|
|
600
600
|
this[Ht](null, t);
|
|
601
601
|
}
|
|
602
602
|
[H]() {
|
|
603
|
-
if (this[
|
|
604
|
-
let t = this[
|
|
605
|
-
this[
|
|
603
|
+
if (this[ht] && typeof this[u] == "number") {
|
|
604
|
+
let t = this[u];
|
|
605
|
+
this[u] = void 0, I.closeSync(t), this.emit("close");
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
|
-
[
|
|
608
|
+
[ve](t) {
|
|
609
609
|
let e = true;
|
|
610
610
|
try {
|
|
611
|
-
this[Pt](null, I.writeSync(this[
|
|
611
|
+
this[Pt](null, I.writeSync(this[u], t, 0, t.length, this[ot])), e = false;
|
|
612
612
|
} finally {
|
|
613
613
|
if (e) try {
|
|
614
614
|
this[H]();
|
|
@@ -617,50 +617,50 @@ var Wt = class extends tt {
|
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
619
|
};
|
|
620
|
-
var
|
|
621
|
-
var
|
|
622
|
-
var
|
|
623
|
-
var
|
|
624
|
-
var
|
|
625
|
-
var
|
|
626
|
-
var
|
|
627
|
-
let t =
|
|
620
|
+
var jr = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
|
|
621
|
+
var Fs = (s3) => !!s3.sync && !!s3.file;
|
|
622
|
+
var ks = (s3) => !s3.sync && !!s3.file;
|
|
623
|
+
var vs = (s3) => !!s3.sync && !s3.file;
|
|
624
|
+
var Ms = (s3) => !s3.sync && !s3.file;
|
|
625
|
+
var Bs = (s3) => !!s3.file;
|
|
626
|
+
var tn = (s3) => {
|
|
627
|
+
let t = jr.get(s3);
|
|
628
628
|
return t || s3;
|
|
629
629
|
};
|
|
630
630
|
var se = (s3 = {}) => {
|
|
631
631
|
if (!s3) return {};
|
|
632
632
|
let t = {};
|
|
633
633
|
for (let [e, i] of Object.entries(s3)) {
|
|
634
|
-
let r =
|
|
634
|
+
let r = tn(e);
|
|
635
635
|
t[r] = i;
|
|
636
636
|
}
|
|
637
637
|
return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
|
|
638
638
|
};
|
|
639
|
-
var K = (s3, t, e, i, r) => Object.assign((n = [], o,
|
|
640
|
-
Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (
|
|
641
|
-
let
|
|
642
|
-
if (r?.(
|
|
643
|
-
if (typeof
|
|
644
|
-
return s3(
|
|
645
|
-
} else if (
|
|
646
|
-
let l = t(
|
|
647
|
-
return
|
|
648
|
-
} else if (
|
|
649
|
-
if (typeof
|
|
650
|
-
return e(
|
|
651
|
-
} else if (
|
|
652
|
-
if (typeof
|
|
653
|
-
return i(
|
|
639
|
+
var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
|
|
640
|
+
Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o = o ? Array.from(o) : [];
|
|
641
|
+
let a = se(n);
|
|
642
|
+
if (r?.(a, o), Fs(a)) {
|
|
643
|
+
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
644
|
+
return s3(a, o);
|
|
645
|
+
} else if (ks(a)) {
|
|
646
|
+
let l = t(a, o);
|
|
647
|
+
return h ? l.then(() => h(), h) : l;
|
|
648
|
+
} else if (vs(a)) {
|
|
649
|
+
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
650
|
+
return e(a, o);
|
|
651
|
+
} else if (Ms(a)) {
|
|
652
|
+
if (typeof h == "function") throw new TypeError("callback only supported with file option");
|
|
653
|
+
return i(a, o);
|
|
654
654
|
}
|
|
655
655
|
throw new Error("impossible options??");
|
|
656
656
|
}, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
|
|
657
|
-
var
|
|
658
|
-
var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 },
|
|
659
|
-
var
|
|
660
|
-
var
|
|
661
|
-
var
|
|
662
|
-
var
|
|
663
|
-
Ot.concat = s3 ?
|
|
657
|
+
var sn = en.constants || { ZLIB_VERNUM: 4736 };
|
|
658
|
+
var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, sn));
|
|
659
|
+
var rn = Ot.concat;
|
|
660
|
+
var zs = Object.getOwnPropertyDescriptor(Ot, "concat");
|
|
661
|
+
var nn = (s3) => s3;
|
|
662
|
+
var Bi = zs?.writable === true || zs?.set !== void 0 ? (s3) => {
|
|
663
|
+
Ot.concat = s3 ? nn : rn;
|
|
664
664
|
} : (s3) => {
|
|
665
665
|
};
|
|
666
666
|
var Tt = /* @__PURE__ */ Symbol("_superWrite");
|
|
@@ -674,7 +674,7 @@ var Gt = class extends Error {
|
|
|
674
674
|
return "ZlibError";
|
|
675
675
|
}
|
|
676
676
|
};
|
|
677
|
-
var
|
|
677
|
+
var Pi = /* @__PURE__ */ Symbol("flushFlag");
|
|
678
678
|
var re = class extends A {
|
|
679
679
|
#t = false;
|
|
680
680
|
#i = false;
|
|
@@ -694,9 +694,9 @@ var re = class extends A {
|
|
|
694
694
|
}
|
|
695
695
|
constructor(t, e) {
|
|
696
696
|
if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
|
|
697
|
-
if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof
|
|
697
|
+
if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof Ps[e] != "function") throw new TypeError("Compression method not supported: " + e);
|
|
698
698
|
try {
|
|
699
|
-
this.#e = new
|
|
699
|
+
this.#e = new Ps[e](t);
|
|
700
700
|
} catch (i) {
|
|
701
701
|
throw new Gt(i, this.constructor);
|
|
702
702
|
}
|
|
@@ -708,10 +708,10 @@ var re = class extends A {
|
|
|
708
708
|
this.#e && (this.#e.close(), this.#e = void 0, this.emit("close"));
|
|
709
709
|
}
|
|
710
710
|
reset() {
|
|
711
|
-
if (!this.#t) return
|
|
711
|
+
if (!this.#t) return zi(this.#e, "zlib binding closed"), this.#e.reset?.();
|
|
712
712
|
}
|
|
713
713
|
flush(t) {
|
|
714
|
-
this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(Ot.alloc(0), { [
|
|
714
|
+
this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(Ot.alloc(0), { [Pi]: t })));
|
|
715
715
|
}
|
|
716
716
|
end(t, e, i) {
|
|
717
717
|
return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), t && (e ? this.write(t, e) : this.write(t)), this.flush(this.#n), this.#i = true, super.end(i);
|
|
@@ -724,33 +724,33 @@ var re = class extends A {
|
|
|
724
724
|
}
|
|
725
725
|
write(t, e, i) {
|
|
726
726
|
if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = Ot.from(t, e)), this.#t) return;
|
|
727
|
-
|
|
727
|
+
zi(this.#e, "zlib binding closed");
|
|
728
728
|
let r = this.#e._handle, n = r.close;
|
|
729
729
|
r.close = () => {
|
|
730
730
|
};
|
|
731
731
|
let o = this.#e.close;
|
|
732
732
|
this.#e.close = () => {
|
|
733
|
-
},
|
|
734
|
-
let
|
|
733
|
+
}, Bi(true);
|
|
734
|
+
let h;
|
|
735
735
|
try {
|
|
736
|
-
let l = typeof t[
|
|
737
|
-
|
|
736
|
+
let l = typeof t[Pi] == "number" ? t[Pi] : this.#s;
|
|
737
|
+
h = this.#e._processChunk(t, l), Bi(false);
|
|
738
738
|
} catch (l) {
|
|
739
|
-
|
|
739
|
+
Bi(false), this.#o(new Gt(l, this.write));
|
|
740
740
|
} finally {
|
|
741
741
|
this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
|
|
742
742
|
}
|
|
743
743
|
this.#e && this.#e.on("error", (l) => this.#o(new Gt(l, this.write)));
|
|
744
|
-
let
|
|
745
|
-
if (
|
|
746
|
-
let l =
|
|
747
|
-
|
|
748
|
-
for (let c = 1; c <
|
|
749
|
-
} else
|
|
750
|
-
return i && i(),
|
|
744
|
+
let a;
|
|
745
|
+
if (h) if (Array.isArray(h) && h.length > 0) {
|
|
746
|
+
let l = h[0];
|
|
747
|
+
a = this[Tt](Ot.from(l));
|
|
748
|
+
for (let c = 1; c < h.length; c++) a = this[Tt](h[c]);
|
|
749
|
+
} else a = this[Tt](Ot.from(h));
|
|
750
|
+
return i && i(), a;
|
|
751
751
|
}
|
|
752
752
|
};
|
|
753
|
-
var
|
|
753
|
+
var Pe = class extends re {
|
|
754
754
|
#t;
|
|
755
755
|
#i;
|
|
756
756
|
constructor(t, e) {
|
|
@@ -761,7 +761,7 @@ var Be = class extends re {
|
|
|
761
761
|
if (!this.handle) throw new Error("cannot switch params when binding is closed");
|
|
762
762
|
if (!this.handle.params) throw new Error("not supported in this implementation");
|
|
763
763
|
if (this.#t !== t || this.#i !== e) {
|
|
764
|
-
this.flush(M.Z_SYNC_FLUSH),
|
|
764
|
+
this.flush(M.Z_SYNC_FLUSH), zi(this.handle, "zlib binding closed");
|
|
765
765
|
let i = this.handle.flush;
|
|
766
766
|
this.handle.flush = (r, n) => {
|
|
767
767
|
typeof r == "function" && (n = r, r = this.flushFlag), this.flush(r), n?.();
|
|
@@ -776,7 +776,7 @@ var Be = class extends re {
|
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
};
|
|
779
|
-
var
|
|
779
|
+
var ze = class extends Pe {
|
|
780
780
|
#t;
|
|
781
781
|
constructor(t) {
|
|
782
782
|
super(t, "Gzip"), this.#t = t && !!t.portable;
|
|
@@ -785,89 +785,90 @@ var Pe = class extends Be {
|
|
|
785
785
|
return this.#t ? (this.#t = false, t[9] = 255, super[Tt](t)) : super[Tt](t);
|
|
786
786
|
}
|
|
787
787
|
};
|
|
788
|
-
var
|
|
788
|
+
var Ue = class extends Pe {
|
|
789
789
|
constructor(t) {
|
|
790
790
|
super(t, "Unzip");
|
|
791
791
|
}
|
|
792
792
|
};
|
|
793
|
-
var
|
|
793
|
+
var He = class extends re {
|
|
794
794
|
constructor(t, e) {
|
|
795
795
|
t = t || {}, t.flush = t.flush || M.BROTLI_OPERATION_PROCESS, t.finishFlush = t.finishFlush || M.BROTLI_OPERATION_FINISH, t.fullFlushFlag = M.BROTLI_OPERATION_FLUSH, super(t, e);
|
|
796
796
|
}
|
|
797
797
|
};
|
|
798
|
-
var
|
|
798
|
+
var We = class extends He {
|
|
799
799
|
constructor(t) {
|
|
800
800
|
super(t, "BrotliCompress");
|
|
801
801
|
}
|
|
802
802
|
};
|
|
803
|
-
var
|
|
803
|
+
var Ge = class extends He {
|
|
804
804
|
constructor(t) {
|
|
805
805
|
super(t, "BrotliDecompress");
|
|
806
806
|
}
|
|
807
807
|
};
|
|
808
|
-
var
|
|
808
|
+
var Ze = class extends re {
|
|
809
809
|
constructor(t, e) {
|
|
810
810
|
t = t || {}, t.flush = t.flush || M.ZSTD_e_continue, t.finishFlush = t.finishFlush || M.ZSTD_e_end, t.fullFlushFlag = M.ZSTD_e_flush, super(t, e);
|
|
811
811
|
}
|
|
812
812
|
};
|
|
813
|
-
var
|
|
813
|
+
var Ye = class extends Ze {
|
|
814
814
|
constructor(t) {
|
|
815
815
|
super(t, "ZstdCompress");
|
|
816
816
|
}
|
|
817
817
|
};
|
|
818
|
-
var
|
|
818
|
+
var Ke = class extends Ze {
|
|
819
819
|
constructor(t) {
|
|
820
820
|
super(t, "ZstdDecompress");
|
|
821
821
|
}
|
|
822
822
|
};
|
|
823
|
-
var
|
|
824
|
-
if (Number.isSafeInteger(s3)) s3 < 0 ?
|
|
823
|
+
var Us = (s3, t) => {
|
|
824
|
+
if (Number.isSafeInteger(s3)) s3 < 0 ? an(s3, t) : hn(s3, t);
|
|
825
825
|
else throw Error("cannot encode number outside of javascript safe integer range");
|
|
826
826
|
return t;
|
|
827
827
|
};
|
|
828
|
-
var
|
|
828
|
+
var hn = (s3, t) => {
|
|
829
829
|
t[0] = 128;
|
|
830
830
|
for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
|
|
831
831
|
};
|
|
832
|
-
var
|
|
832
|
+
var an = (s3, t) => {
|
|
833
833
|
t[0] = 255;
|
|
834
834
|
var e = false;
|
|
835
835
|
s3 = s3 * -1;
|
|
836
836
|
for (var i = t.length; i > 1; i--) {
|
|
837
837
|
var r = s3 & 255;
|
|
838
|
-
s3 = Math.floor(s3 / 256), e ? t[i - 1] =
|
|
838
|
+
s3 = Math.floor(s3 / 256), e ? t[i - 1] = Ws(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = Gs(r));
|
|
839
839
|
}
|
|
840
840
|
};
|
|
841
|
-
var
|
|
842
|
-
let t = s3[0], e = t === 128 ?
|
|
841
|
+
var Hs = (s3) => {
|
|
842
|
+
let t = s3[0], e = t === 128 ? cn(s3.subarray(1, s3.length)) : t === 255 ? ln(s3) : null;
|
|
843
843
|
if (e === null) throw Error("invalid base256 encoding");
|
|
844
844
|
if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
|
|
845
845
|
return e;
|
|
846
846
|
};
|
|
847
|
-
var
|
|
847
|
+
var ln = (s3) => {
|
|
848
848
|
for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
|
|
849
849
|
var n = Number(s3[r]), o;
|
|
850
|
-
i ? o =
|
|
850
|
+
i ? o = Ws(n) : n === 0 ? o = n : (i = true, o = Gs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
|
|
851
851
|
}
|
|
852
852
|
return e;
|
|
853
853
|
};
|
|
854
|
-
var
|
|
854
|
+
var cn = (s3) => {
|
|
855
855
|
for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
|
|
856
856
|
var r = Number(s3[i]);
|
|
857
857
|
r !== 0 && (e += r * Math.pow(256, t - i - 1));
|
|
858
858
|
}
|
|
859
859
|
return e;
|
|
860
860
|
};
|
|
861
|
-
var
|
|
862
|
-
var
|
|
863
|
-
var
|
|
864
|
-
|
|
861
|
+
var Ws = (s3) => (255 ^ s3) & 255;
|
|
862
|
+
var Gs = (s3) => (255 ^ s3) + 1 & 255;
|
|
863
|
+
var Hi = {};
|
|
864
|
+
Ur(Hi, { code: () => Ve, isCode: () => ne, isName: () => dn, name: () => oe, normalFsTypes: () => Ui });
|
|
865
865
|
var ne = (s3) => oe.has(s3);
|
|
866
|
-
var
|
|
867
|
-
var
|
|
866
|
+
var dn = (s3) => Ve.has(s3);
|
|
867
|
+
var Ui = /* @__PURE__ */ new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
|
|
868
868
|
var oe = /* @__PURE__ */ new Map([["0", "File"], ["", "OldFile"], ["1", "Link"], ["2", "SymbolicLink"], ["3", "CharacterDevice"], ["4", "BlockDevice"], ["5", "Directory"], ["6", "FIFO"], ["7", "ContiguousFile"], ["g", "GlobalExtendedHeader"], ["x", "ExtendedHeader"], ["A", "SolarisACL"], ["D", "GNUDumpDir"], ["I", "Inode"], ["K", "NextFileHasLongLinkpath"], ["L", "NextFileHasLongPath"], ["M", "ContinuationFile"], ["N", "OldGnuLongPath"], ["S", "SparseFile"], ["V", "TapeVolumeHeader"], ["X", "OldExtendedHeader"]]);
|
|
869
|
-
var
|
|
870
|
-
var
|
|
869
|
+
var Ve = new Map(Array.from(oe).map((s3) => [s3[1], s3[0]]));
|
|
870
|
+
var mn = (s3) => s3 === void 0 || s3 < 0 ? void 0 : s3;
|
|
871
|
+
var F = class {
|
|
871
872
|
cksumValid = false;
|
|
872
873
|
needPax = false;
|
|
873
874
|
nullBlock = false;
|
|
@@ -894,13 +895,13 @@ var C = class {
|
|
|
894
895
|
}
|
|
895
896
|
decode(t, e, i, r) {
|
|
896
897
|
if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
897
|
-
let n = xt(t, e + 156, 1), o =
|
|
898
|
-
if (this.path =
|
|
898
|
+
let n = xt(t, e + 156, 1), o = Ui.has(n), h = o ? i : void 0, a = o ? r : void 0;
|
|
899
|
+
if (this.path = h?.path ?? xt(t, e, 100), this.mode = h?.mode ?? a?.mode ?? lt(t, e + 100, 8), this.uid = h?.uid ?? a?.uid ?? lt(t, e + 108, 8), this.gid = h?.gid ?? a?.gid ?? lt(t, e + 116, 8), this.size = mn(h?.size ?? a?.size ?? lt(t, e + 124, 12)), this.mtime = h?.mtime ?? a?.mtime ?? Wi(t, e + 136, 12), this.cksum = lt(t, e + 148, 12), a && this.#i(a, true), h && this.#i(h), ne(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = xt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = h?.uname ?? a?.uname ?? xt(t, e + 265, 32), this.gname = h?.gname ?? a?.gname ?? xt(t, e + 297, 32), this.devmaj = h?.devmaj ?? a?.devmaj ?? lt(t, e + 329, 8) ?? 0, this.devmin = h?.devmin ?? a?.devmin ?? lt(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
|
|
899
900
|
let c = xt(t, e + 345, 155);
|
|
900
901
|
this.path = c + "/" + this.path;
|
|
901
902
|
} else {
|
|
902
903
|
let c = xt(t, e + 345, 130);
|
|
903
|
-
c && (this.path = c + "/" + this.path), this.atime = i?.atime ?? r?.atime ??
|
|
904
|
+
c && (this.path = c + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Wi(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Wi(t, e + 488, 12);
|
|
904
905
|
}
|
|
905
906
|
let l = 256;
|
|
906
907
|
for (let c = e; c < e + 148; c++) l += t[c];
|
|
@@ -908,16 +909,16 @@ var C = class {
|
|
|
908
909
|
this.cksumValid = l === this.cksum, this.cksum === void 0 && l === 256 && (this.nullBlock = true);
|
|
909
910
|
}
|
|
910
911
|
#i(t, e = false) {
|
|
911
|
-
Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "path" && e || i === "linkpath" && e || i === "global"))));
|
|
912
|
+
Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "size" && Number(r) < 0 || i === "path" && e || i === "linkpath" && e || i === "global"))));
|
|
912
913
|
}
|
|
913
914
|
encode(t, e = 0) {
|
|
914
915
|
if (t || (t = this.block = Buffer.alloc(512)), this.#t === "Unsupported" && (this.#t = "0"), !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
915
|
-
let i = this.ctime || this.atime ? 130 : 155, r =
|
|
916
|
-
this.needPax = !!r[2], this.needPax = Lt(t, e, 100, n) || this.needPax, this.needPax =
|
|
917
|
-
let
|
|
918
|
-
for (let
|
|
919
|
-
for (let
|
|
920
|
-
return this.cksum =
|
|
916
|
+
let i = this.ctime || this.atime ? 130 : 155, r = un(this.path || "", i), n = r[0], o = r[1];
|
|
917
|
+
this.needPax = !!r[2], this.needPax = Lt(t, e, 100, n) || this.needPax, this.needPax = ct(t, e + 100, 8, this.mode) || this.needPax, this.needPax = ct(t, e + 108, 8, this.uid) || this.needPax, this.needPax = ct(t, e + 116, 8, this.gid) || this.needPax, this.needPax = ct(t, e + 124, 12, this.size) || this.needPax, this.needPax = Gi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = Lt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = Lt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = Lt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = ct(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = ct(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = Lt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = Lt(t, e + 345, 155, o) || this.needPax : (this.needPax = Lt(t, e + 345, 130, o) || this.needPax, this.needPax = Gi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Gi(t, e + 488, 12, this.ctime) || this.needPax);
|
|
918
|
+
let h = 256;
|
|
919
|
+
for (let a = e; a < e + 148; a++) h += t[a];
|
|
920
|
+
for (let a = e + 156; a < e + 512; a++) h += t[a];
|
|
921
|
+
return this.cksum = h, ct(t, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
|
|
921
922
|
}
|
|
922
923
|
get type() {
|
|
923
924
|
return this.#t === "Unsupported" ? this.#t : oe.get(this.#t);
|
|
@@ -926,13 +927,13 @@ var C = class {
|
|
|
926
927
|
return this.#t;
|
|
927
928
|
}
|
|
928
929
|
set type(t) {
|
|
929
|
-
let e = String(
|
|
930
|
+
let e = String(Ve.get(t));
|
|
930
931
|
if (ne(e) || e === "Unsupported") this.#t = e;
|
|
931
932
|
else if (ne(t)) this.#t = t;
|
|
932
933
|
else throw new TypeError("invalid entry type: " + t);
|
|
933
934
|
}
|
|
934
935
|
};
|
|
935
|
-
var
|
|
936
|
+
var un = (s3, t) => {
|
|
936
937
|
let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
|
|
937
938
|
if (Buffer.byteLength(i) < 100) n = [i, r, false];
|
|
938
939
|
else {
|
|
@@ -945,20 +946,20 @@ var cn = (s3, t) => {
|
|
|
945
946
|
return n;
|
|
946
947
|
};
|
|
947
948
|
var xt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
|
|
948
|
-
var
|
|
949
|
-
var
|
|
950
|
-
var
|
|
951
|
-
var
|
|
952
|
-
var
|
|
953
|
-
var
|
|
954
|
-
var
|
|
955
|
-
var
|
|
956
|
-
var
|
|
957
|
-
var
|
|
958
|
-
var
|
|
959
|
-
var
|
|
960
|
-
var Lt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i +
|
|
961
|
-
var
|
|
949
|
+
var Wi = (s3, t, e) => pn(lt(s3, t, e));
|
|
950
|
+
var pn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
|
|
951
|
+
var lt = (s3, t, e) => Number(s3[t]) & 128 ? Hs(s3.subarray(t, t + e)) : wn(s3, t, e);
|
|
952
|
+
var En = (s3) => isNaN(s3) ? void 0 : s3;
|
|
953
|
+
var wn = (s3, t, e) => En(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
|
|
954
|
+
var Sn = { 12: 8589934591, 8: 2097151 };
|
|
955
|
+
var ct = (s3, t, e, i) => i === void 0 ? false : i > Sn[e] || i < 0 ? (Us(i, s3.subarray(t, t + e)), true) : (yn(s3, t, e, i), false);
|
|
956
|
+
var yn = (s3, t, e, i) => s3.write(Rn(i, e), t, e, "ascii");
|
|
957
|
+
var Rn = (s3, t) => gn(Math.floor(s3).toString(8), t);
|
|
958
|
+
var gn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
|
|
959
|
+
var Gi = (s3, t, e, i) => i === void 0 ? false : ct(s3, t, e, i.getTime() / 1e3);
|
|
960
|
+
var bn = new Array(156).join("\0");
|
|
961
|
+
var Lt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + bn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
|
|
962
|
+
var ft = class s {
|
|
962
963
|
atime;
|
|
963
964
|
mtime;
|
|
964
965
|
ctime;
|
|
@@ -984,7 +985,7 @@ var ct = class s {
|
|
|
984
985
|
if (t === "") return Buffer.allocUnsafe(0);
|
|
985
986
|
let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
|
|
986
987
|
for (let n = 0; n < 512; n++) r[n] = 0;
|
|
987
|
-
new
|
|
988
|
+
new F({ path: ("PaxHeader/" + _n(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
|
|
988
989
|
for (let n = e + 512; n < r.length; n++) r[n] = 0;
|
|
989
990
|
return r;
|
|
990
991
|
}
|
|
@@ -998,24 +999,52 @@ var ct = class s {
|
|
|
998
999
|
return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
|
|
999
1000
|
}
|
|
1000
1001
|
static parse(t, e, i = false) {
|
|
1001
|
-
return new s(
|
|
1002
|
+
return new s(On(Tn(t), e), i);
|
|
1002
1003
|
}
|
|
1003
1004
|
};
|
|
1004
|
-
var
|
|
1005
|
-
var
|
|
1006
|
-
`).reduce(
|
|
1007
|
-
var
|
|
1005
|
+
var On = (s3, t) => t ? Object.assign({}, t, s3) : s3;
|
|
1006
|
+
var Tn = (s3) => s3.replace(/\n$/, "").split(`
|
|
1007
|
+
`).reduce(xn, /* @__PURE__ */ Object.create(null));
|
|
1008
|
+
var xn = (s3, t) => {
|
|
1008
1009
|
let e = parseInt(t, 10);
|
|
1009
1010
|
if (e !== Buffer.byteLength(t) + 1) return s3;
|
|
1010
1011
|
t = t.slice((e + " ").length);
|
|
1011
1012
|
let i = t.split("="), r = i.shift();
|
|
1012
1013
|
if (!r) return s3;
|
|
1013
|
-
let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1014
|
+
let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=").replace(/\0.*/, "");
|
|
1015
|
+
switch (n) {
|
|
1016
|
+
case "path":
|
|
1017
|
+
case "linkpath":
|
|
1018
|
+
case "type":
|
|
1019
|
+
case "charset":
|
|
1020
|
+
case "comment":
|
|
1021
|
+
case "gname":
|
|
1022
|
+
case "uname":
|
|
1023
|
+
s3[n] = o;
|
|
1024
|
+
break;
|
|
1025
|
+
case "ctime":
|
|
1026
|
+
case "atime":
|
|
1027
|
+
case "mtime":
|
|
1028
|
+
s3[n] = new Date(Number(o) * 1e3);
|
|
1029
|
+
break;
|
|
1030
|
+
case "size":
|
|
1031
|
+
let h = +o;
|
|
1032
|
+
h >= 0 && (s3[n] = h);
|
|
1033
|
+
break;
|
|
1034
|
+
case "gid":
|
|
1035
|
+
case "uid":
|
|
1036
|
+
case "dev":
|
|
1037
|
+
case "ino":
|
|
1038
|
+
case "nlink":
|
|
1039
|
+
case "mode":
|
|
1040
|
+
s3[n] = +o;
|
|
1041
|
+
break;
|
|
1042
|
+
}
|
|
1043
|
+
return s3;
|
|
1044
|
+
};
|
|
1045
|
+
var Ln = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
1046
|
+
var f = Ln !== "win32" ? (s3) => String(s3) : (s3) => String(s3).replaceAll(/\\/g, "/");
|
|
1047
|
+
var $e = class extends A {
|
|
1019
1048
|
extended;
|
|
1020
1049
|
globalExtended;
|
|
1021
1050
|
header;
|
|
@@ -1079,163 +1108,170 @@ var Ve = class extends A {
|
|
|
1079
1108
|
t.path && (t.path = f(t.path)), t.linkpath && (t.linkpath = f(t.linkpath)), Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "path" && e))));
|
|
1080
1109
|
}
|
|
1081
1110
|
};
|
|
1082
|
-
var
|
|
1111
|
+
var Dt = (s3, t, e, i = {}) => {
|
|
1083
1112
|
s3.file && (i.file = s3.file), s3.cwd && (i.cwd = s3.cwd), i.code = e instanceof Error && e.code || t, i.tarCode = t, !s3.strict && i.recoverable !== false ? (e instanceof Error && (i = Object.assign(e, i), e = e.message), s3.emit("warn", t, e, i)) : e instanceof Error ? s3.emit("error", Object.assign(e, i)) : s3.emit("error", Object.assign(new Error(`${t}: ${e}`), i));
|
|
1084
1113
|
};
|
|
1085
|
-
var
|
|
1086
|
-
var
|
|
1087
|
-
var
|
|
1088
|
-
var
|
|
1114
|
+
var Nn = 1024 * 1024;
|
|
1115
|
+
var Xi = Buffer.from([31, 139]);
|
|
1116
|
+
var qi = Buffer.from([40, 181, 47, 253]);
|
|
1117
|
+
var An = Math.max(Xi.length, qi.length);
|
|
1089
1118
|
var B = /* @__PURE__ */ Symbol("state");
|
|
1090
|
-
var
|
|
1091
|
-
var
|
|
1092
|
-
var
|
|
1093
|
-
var
|
|
1119
|
+
var Nt = /* @__PURE__ */ Symbol("writeEntry");
|
|
1120
|
+
var it = /* @__PURE__ */ Symbol("readEntry");
|
|
1121
|
+
var Zi = /* @__PURE__ */ Symbol("nextEntry");
|
|
1122
|
+
var Zs = /* @__PURE__ */ Symbol("processEntry");
|
|
1094
1123
|
var V = /* @__PURE__ */ Symbol("extendedHeader");
|
|
1095
1124
|
var he = /* @__PURE__ */ Symbol("globalExtendedHeader");
|
|
1096
|
-
var
|
|
1097
|
-
var
|
|
1125
|
+
var dt = /* @__PURE__ */ Symbol("meta");
|
|
1126
|
+
var Ys = /* @__PURE__ */ Symbol("emitMeta");
|
|
1098
1127
|
var p = /* @__PURE__ */ Symbol("buffer");
|
|
1099
|
-
var
|
|
1100
|
-
var
|
|
1101
|
-
var
|
|
1128
|
+
var st = /* @__PURE__ */ Symbol("queue");
|
|
1129
|
+
var mt = /* @__PURE__ */ Symbol("ended");
|
|
1130
|
+
var Yi = /* @__PURE__ */ Symbol("emittedEnd");
|
|
1102
1131
|
var At = /* @__PURE__ */ Symbol("emit");
|
|
1103
|
-
var
|
|
1104
|
-
var
|
|
1105
|
-
var
|
|
1106
|
-
var
|
|
1107
|
-
var
|
|
1108
|
-
var
|
|
1132
|
+
var w = /* @__PURE__ */ Symbol("unzip");
|
|
1133
|
+
var Xe = /* @__PURE__ */ Symbol("consumeChunk");
|
|
1134
|
+
var qe = /* @__PURE__ */ Symbol("consumeChunkSub");
|
|
1135
|
+
var Ki = /* @__PURE__ */ Symbol("consumeBody");
|
|
1136
|
+
var Ks = /* @__PURE__ */ Symbol("consumeMeta");
|
|
1137
|
+
var Vs = /* @__PURE__ */ Symbol("consumeHeader");
|
|
1109
1138
|
var ae = /* @__PURE__ */ Symbol("consuming");
|
|
1110
|
-
var
|
|
1111
|
-
var
|
|
1139
|
+
var Vi = /* @__PURE__ */ Symbol("bufferConcat");
|
|
1140
|
+
var Qe = /* @__PURE__ */ Symbol("maybeEnd");
|
|
1112
1141
|
var Yt = /* @__PURE__ */ Symbol("writing");
|
|
1113
|
-
var
|
|
1114
|
-
var
|
|
1142
|
+
var $ = /* @__PURE__ */ Symbol("aborted");
|
|
1143
|
+
var Je = /* @__PURE__ */ Symbol("onDone");
|
|
1115
1144
|
var It = /* @__PURE__ */ Symbol("sawValidEntry");
|
|
1116
|
-
var
|
|
1117
|
-
var
|
|
1118
|
-
var
|
|
1119
|
-
var
|
|
1120
|
-
var
|
|
1145
|
+
var je = /* @__PURE__ */ Symbol("sawNullBlock");
|
|
1146
|
+
var ti = /* @__PURE__ */ Symbol("sawEOF");
|
|
1147
|
+
var $s = /* @__PURE__ */ Symbol("closeStream");
|
|
1148
|
+
var In = 1e3;
|
|
1149
|
+
var le = /* @__PURE__ */ Symbol("compressedBytesRead");
|
|
1150
|
+
var $i = /* @__PURE__ */ Symbol("decompressedBytesRead");
|
|
1151
|
+
var Xs = /* @__PURE__ */ Symbol("checkDecompressionRatio");
|
|
1152
|
+
var Cn = () => true;
|
|
1153
|
+
var rt = class extends Dn {
|
|
1121
1154
|
file;
|
|
1122
1155
|
strict;
|
|
1123
1156
|
maxMetaEntrySize;
|
|
1124
1157
|
filter;
|
|
1125
1158
|
brotli;
|
|
1126
1159
|
zstd;
|
|
1160
|
+
maxDecompressionRatio;
|
|
1127
1161
|
writable = true;
|
|
1128
1162
|
readable = false;
|
|
1129
|
-
[
|
|
1163
|
+
[st] = [];
|
|
1130
1164
|
[p];
|
|
1131
|
-
[
|
|
1132
|
-
[
|
|
1165
|
+
[it];
|
|
1166
|
+
[Nt];
|
|
1133
1167
|
[B] = "begin";
|
|
1134
|
-
[
|
|
1168
|
+
[dt] = "";
|
|
1135
1169
|
[V];
|
|
1136
1170
|
[he];
|
|
1137
|
-
[
|
|
1138
|
-
[
|
|
1139
|
-
[
|
|
1171
|
+
[mt] = false;
|
|
1172
|
+
[w];
|
|
1173
|
+
[$] = false;
|
|
1140
1174
|
[It];
|
|
1141
|
-
[Je] = false;
|
|
1142
1175
|
[je] = false;
|
|
1176
|
+
[ti] = false;
|
|
1143
1177
|
[Yt] = false;
|
|
1144
1178
|
[ae] = false;
|
|
1145
|
-
[
|
|
1179
|
+
[Yi] = false;
|
|
1180
|
+
[le] = 0;
|
|
1181
|
+
[$i] = 0;
|
|
1146
1182
|
constructor(t = {}) {
|
|
1147
|
-
super(), this.file = t.file || "", this.on(
|
|
1183
|
+
super(), this.file = t.file || "", this.on(Je, () => {
|
|
1148
1184
|
(this[B] === "begin" || this[It] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
1149
|
-
}), t.ondone ? this.on(
|
|
1185
|
+
}), t.ondone ? this.on(Je, t.ondone) : this.on(Je, () => {
|
|
1150
1186
|
this.emit("prefinish"), this.emit("finish"), this.emit("end");
|
|
1151
|
-
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize ||
|
|
1187
|
+
}), this.strict = !!t.strict, this.maxDecompressionRatio = typeof t.maxDecompressionRatio == "number" ? t.maxDecompressionRatio : In, this.maxMetaEntrySize = t.maxMetaEntrySize || Nn, this.filter = typeof t.filter == "function" ? t.filter : Cn;
|
|
1152
1188
|
let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
|
|
1153
1189
|
this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
|
|
1154
1190
|
let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
|
|
1155
|
-
this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[
|
|
1191
|
+
this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[$s]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
|
|
1156
1192
|
}
|
|
1157
1193
|
warn(t, e, i = {}) {
|
|
1158
|
-
|
|
1194
|
+
Dt(this, t, e, i);
|
|
1159
1195
|
}
|
|
1160
|
-
[
|
|
1196
|
+
[Vs](t, e) {
|
|
1161
1197
|
this[It] === void 0 && (this[It] = false);
|
|
1162
1198
|
let i;
|
|
1163
1199
|
try {
|
|
1164
|
-
i = new
|
|
1200
|
+
i = new F(t, e, this[V], this[he]);
|
|
1165
1201
|
} catch (r) {
|
|
1166
1202
|
return this.warn("TAR_ENTRY_INVALID", r);
|
|
1167
1203
|
}
|
|
1168
|
-
if (i.nullBlock) this[
|
|
1169
|
-
else if (this[
|
|
1204
|
+
if (i.nullBlock) this[je] ? (this[ti] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
|
|
1205
|
+
else if (this[je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
|
|
1170
1206
|
else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
|
|
1171
1207
|
else {
|
|
1172
1208
|
let r = i.type;
|
|
1173
1209
|
if (/^(Symbolic)?Link$/.test(r) && !i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: i });
|
|
1174
1210
|
else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
|
|
1175
1211
|
else {
|
|
1176
|
-
let n = this[
|
|
1212
|
+
let n = this[Nt] = new $e(i, this[V], this[he]);
|
|
1177
1213
|
if (!this[It]) if (n.remain) {
|
|
1178
1214
|
let o = () => {
|
|
1179
1215
|
n.invalid || (this[It] = true);
|
|
1180
1216
|
};
|
|
1181
1217
|
n.on("end", o);
|
|
1182
1218
|
} else this[It] = true;
|
|
1183
|
-
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[
|
|
1219
|
+
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[dt] = "", n.on("data", (o) => this[dt] += o), this[B] = "meta") : (this[V] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[it] ? this[st].push(n) : (this[st].push(n), this[Zi]())));
|
|
1184
1220
|
}
|
|
1185
1221
|
}
|
|
1186
1222
|
}
|
|
1187
|
-
[
|
|
1223
|
+
[$s]() {
|
|
1188
1224
|
queueMicrotask(() => this.emit("close"));
|
|
1189
1225
|
}
|
|
1190
|
-
[
|
|
1226
|
+
[Zs](t) {
|
|
1191
1227
|
let e = true;
|
|
1192
|
-
if (!t) this[
|
|
1228
|
+
if (!t) this[it] = void 0, e = false;
|
|
1193
1229
|
else if (Array.isArray(t)) {
|
|
1194
1230
|
let [i, ...r] = t;
|
|
1195
1231
|
this.emit(i, ...r);
|
|
1196
|
-
} else this[
|
|
1232
|
+
} else this[it] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Zi]()), e = false);
|
|
1197
1233
|
return e;
|
|
1198
1234
|
}
|
|
1199
|
-
[
|
|
1235
|
+
[Zi]() {
|
|
1200
1236
|
do
|
|
1201
1237
|
;
|
|
1202
|
-
while (this[
|
|
1203
|
-
if (this[
|
|
1204
|
-
let t = this[
|
|
1238
|
+
while (this[Zs](this[st].shift()));
|
|
1239
|
+
if (this[st].length === 0) {
|
|
1240
|
+
let t = this[it];
|
|
1205
1241
|
!t || t.flowing || t.size === t.remain ? this[Yt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
|
|
1206
1242
|
}
|
|
1207
1243
|
}
|
|
1208
|
-
[
|
|
1209
|
-
let i = this[
|
|
1244
|
+
[Ki](t, e) {
|
|
1245
|
+
let i = this[Nt];
|
|
1210
1246
|
if (!i) throw new Error("attempt to consume body without entry??");
|
|
1211
1247
|
let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
|
|
1212
|
-
return i.write(n), i.blockRemain || (this[B] = "header", this[
|
|
1248
|
+
return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
|
|
1213
1249
|
}
|
|
1214
|
-
[
|
|
1215
|
-
let i = this[
|
|
1216
|
-
return !this[
|
|
1250
|
+
[Ks](t, e) {
|
|
1251
|
+
let i = this[Nt], r = this[Ki](t, e);
|
|
1252
|
+
return !this[Nt] && i && this[Ys](i), r;
|
|
1217
1253
|
}
|
|
1218
1254
|
[At](t, e, i) {
|
|
1219
|
-
this[
|
|
1255
|
+
this[st].length === 0 && !this[it] ? this.emit(t, e, i) : this[st].push([t, e, i]);
|
|
1220
1256
|
}
|
|
1221
|
-
[
|
|
1222
|
-
switch (this[At]("meta", this[
|
|
1257
|
+
[Ys](t) {
|
|
1258
|
+
switch (this[At]("meta", this[dt]), t.type) {
|
|
1223
1259
|
case "ExtendedHeader":
|
|
1224
1260
|
case "OldExtendedHeader":
|
|
1225
|
-
this[V] =
|
|
1261
|
+
this[V] = ft.parse(this[dt], this[V], false);
|
|
1226
1262
|
break;
|
|
1227
1263
|
case "GlobalExtendedHeader":
|
|
1228
|
-
this[he] =
|
|
1264
|
+
this[he] = ft.parse(this[dt], this[he], true);
|
|
1229
1265
|
break;
|
|
1230
1266
|
case "NextFileHasLongPath":
|
|
1231
1267
|
case "OldGnuLongPath": {
|
|
1232
1268
|
let e = this[V] ?? /* @__PURE__ */ Object.create(null);
|
|
1233
|
-
this[V] = e, e.path = this[
|
|
1269
|
+
this[V] = e, e.path = this[dt].replace(/\0.*/, "");
|
|
1234
1270
|
break;
|
|
1235
1271
|
}
|
|
1236
1272
|
case "NextFileHasLongLinkpath": {
|
|
1237
1273
|
let e = this[V] || /* @__PURE__ */ Object.create(null);
|
|
1238
|
-
this[V] = e, e.linkpath = this[
|
|
1274
|
+
this[V] = e, e.linkpath = this[dt].replace(/\0.*/, "");
|
|
1239
1275
|
break;
|
|
1240
1276
|
}
|
|
1241
1277
|
default:
|
|
@@ -1243,86 +1279,101 @@ var st = class extends On {
|
|
|
1243
1279
|
}
|
|
1244
1280
|
}
|
|
1245
1281
|
abort(t) {
|
|
1246
|
-
this[
|
|
1282
|
+
if (!this[$]) {
|
|
1283
|
+
if (this[w]) {
|
|
1284
|
+
let e = this[w];
|
|
1285
|
+
e.write = () => true, e.end = () => e, e.emit = () => false, e.destroy?.();
|
|
1286
|
+
}
|
|
1287
|
+
this[$] = true, this.emit("abort", t), this.warn("TAR_ABORT", t, { recoverable: false });
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
[Xs](t) {
|
|
1291
|
+
this[$i] += t.length;
|
|
1292
|
+
let e = this[$i] / this[le];
|
|
1293
|
+
return e > this.maxDecompressionRatio ? (this.abort(new Error(`max decompression ratio exceeded: ${e.toFixed(2)} > ${this.maxDecompressionRatio}`)), false) : true;
|
|
1247
1294
|
}
|
|
1248
1295
|
write(t, e, i) {
|
|
1249
|
-
if (typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8")), this[
|
|
1250
|
-
if ((this[
|
|
1251
|
-
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length <
|
|
1252
|
-
for (let
|
|
1296
|
+
if (typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8")), this[$]) return i?.(), false;
|
|
1297
|
+
if ((this[w] === void 0 || this.brotli === void 0 && this[w] === false) && t) {
|
|
1298
|
+
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < An) return this[p] = t, i?.(), true;
|
|
1299
|
+
for (let a = 0; this[w] === void 0 && a < Xi.length; a++) t[a] !== Xi[a] && (this[w] = false);
|
|
1253
1300
|
let o = false;
|
|
1254
|
-
if (this[
|
|
1301
|
+
if (this[w] === false && this.zstd !== false) {
|
|
1255
1302
|
o = true;
|
|
1256
|
-
for (let
|
|
1303
|
+
for (let a = 0; a < qi.length; a++) if (t[a] !== qi[a]) {
|
|
1257
1304
|
o = false;
|
|
1258
1305
|
break;
|
|
1259
1306
|
}
|
|
1260
1307
|
}
|
|
1261
|
-
let
|
|
1262
|
-
if (this[
|
|
1308
|
+
let h = this.brotli === void 0 && !o;
|
|
1309
|
+
if (this[w] === false && h) if (t.length < 512) if (this[mt]) this.brotli = true;
|
|
1263
1310
|
else return this[p] = t, i?.(), true;
|
|
1264
1311
|
else try {
|
|
1265
|
-
new
|
|
1312
|
+
new F(t.subarray(0, 512)), this.brotli = false;
|
|
1266
1313
|
} catch {
|
|
1267
1314
|
this.brotli = true;
|
|
1268
1315
|
}
|
|
1269
|
-
if (this[
|
|
1270
|
-
let
|
|
1271
|
-
this[
|
|
1272
|
-
this[
|
|
1273
|
-
}), this[
|
|
1274
|
-
|
|
1316
|
+
if (this[w] === void 0 || this[w] === false && (this.brotli || o)) {
|
|
1317
|
+
let a = this[mt];
|
|
1318
|
+
this[mt] = false, this[w] = this[w] === void 0 ? new Ue({}) : o ? new Ke({}) : new Ge({}), this[w].on("data", (c) => {
|
|
1319
|
+
this[Xs](c) && this[Xe](c);
|
|
1320
|
+
}), this[w].on("error", (c) => {
|
|
1321
|
+
this[$] || this.abort(c);
|
|
1322
|
+
}), this[w].on("end", () => {
|
|
1323
|
+
this[mt] = true, this[Xe]();
|
|
1324
|
+
}), this[Yt] = true, this[le] += t.length;
|
|
1325
|
+
let l = !!this[w][a ? "end" : "write"](t);
|
|
1275
1326
|
return this[Yt] = false, i?.(), l;
|
|
1276
1327
|
}
|
|
1277
1328
|
}
|
|
1278
|
-
this[Yt] = true, this[
|
|
1279
|
-
let n = this[
|
|
1280
|
-
return !n && this[
|
|
1329
|
+
this[Yt] = true, this[w] ? (this[le] += t.length, this[w].write(t)) : this[Xe](t), this[Yt] = false;
|
|
1330
|
+
let n = this[st].length > 0 ? false : this[it] ? this[it].flowing : true;
|
|
1331
|
+
return !n && this[st].length === 0 && this[it]?.once("drain", () => this.emit("drain")), i?.(), n;
|
|
1281
1332
|
}
|
|
1282
|
-
[
|
|
1283
|
-
t && !this[
|
|
1333
|
+
[Vi](t) {
|
|
1334
|
+
t && !this[$] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
|
|
1284
1335
|
}
|
|
1285
|
-
[
|
|
1286
|
-
if (this[
|
|
1287
|
-
this[
|
|
1288
|
-
let t = this[
|
|
1289
|
-
if (t
|
|
1336
|
+
[Qe]() {
|
|
1337
|
+
if (this[mt] && !this[Yi] && !this[$] && !this[ae]) {
|
|
1338
|
+
this[Yi] = true;
|
|
1339
|
+
let t = this[Nt];
|
|
1340
|
+
if (t?.blockRemain) {
|
|
1290
1341
|
let e = this[p] ? this[p].length : 0;
|
|
1291
1342
|
this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`, { entry: t }), this[p] && t.write(this[p]), t.end();
|
|
1292
1343
|
}
|
|
1293
|
-
this[At](
|
|
1344
|
+
this[At](Je);
|
|
1294
1345
|
}
|
|
1295
1346
|
}
|
|
1296
|
-
[
|
|
1297
|
-
if (this[ae] && t) this[
|
|
1298
|
-
else if (!t && !this[p]) this[
|
|
1347
|
+
[Xe](t) {
|
|
1348
|
+
if (this[ae] && t) this[Vi](t);
|
|
1349
|
+
else if (!t && !this[p]) this[Qe]();
|
|
1299
1350
|
else if (t) {
|
|
1300
1351
|
if (this[ae] = true, this[p]) {
|
|
1301
|
-
this[
|
|
1352
|
+
this[Vi](t);
|
|
1302
1353
|
let e = this[p];
|
|
1303
|
-
this[p] = void 0, this[
|
|
1304
|
-
} else this[
|
|
1305
|
-
for (; this[p] && this[p]?.length >= 512 && !this[
|
|
1354
|
+
this[p] = void 0, this[qe](e);
|
|
1355
|
+
} else this[qe](t);
|
|
1356
|
+
for (; this[p] && this[p]?.length >= 512 && !this[$] && !this[ti]; ) {
|
|
1306
1357
|
let e = this[p];
|
|
1307
|
-
this[p] = void 0, this[
|
|
1358
|
+
this[p] = void 0, this[qe](e);
|
|
1308
1359
|
}
|
|
1309
1360
|
this[ae] = false;
|
|
1310
1361
|
}
|
|
1311
|
-
(!this[p] || this[
|
|
1362
|
+
(!this[p] || this[mt]) && this[Qe]();
|
|
1312
1363
|
}
|
|
1313
|
-
[
|
|
1364
|
+
[qe](t) {
|
|
1314
1365
|
let e = 0, i = t.length;
|
|
1315
|
-
for (; e + 512 <= i && !this[
|
|
1366
|
+
for (; e + 512 <= i && !this[$] && !this[ti]; ) switch (this[B]) {
|
|
1316
1367
|
case "begin":
|
|
1317
1368
|
case "header":
|
|
1318
|
-
this[
|
|
1369
|
+
this[Vs](t, e), e += 512;
|
|
1319
1370
|
break;
|
|
1320
1371
|
case "ignore":
|
|
1321
1372
|
case "body":
|
|
1322
|
-
e += this[
|
|
1373
|
+
e += this[Ki](t, e);
|
|
1323
1374
|
break;
|
|
1324
1375
|
case "meta":
|
|
1325
|
-
e += this[
|
|
1376
|
+
e += this[Ks](t, e);
|
|
1326
1377
|
break;
|
|
1327
1378
|
default:
|
|
1328
1379
|
throw new Error("invalid state: " + this[B]);
|
|
@@ -1330,46 +1381,46 @@ var st = class extends On {
|
|
|
1330
1381
|
e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
|
|
1331
1382
|
}
|
|
1332
1383
|
end(t, e, i) {
|
|
1333
|
-
return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[
|
|
1384
|
+
return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[$] || (this[w] ? (t && (this[le] += t.length, this[w].write(t)), this[w].end()) : (this[mt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Qe]())), this;
|
|
1334
1385
|
}
|
|
1335
1386
|
};
|
|
1336
|
-
var
|
|
1387
|
+
var ut = (s3) => {
|
|
1337
1388
|
let t = s3.length - 1, e = -1;
|
|
1338
1389
|
for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
|
|
1339
1390
|
return e === -1 ? s3 : s3.slice(0, e);
|
|
1340
1391
|
};
|
|
1341
|
-
var
|
|
1392
|
+
var vn = (s3) => {
|
|
1342
1393
|
let t = s3.onReadEntry;
|
|
1343
1394
|
s3.onReadEntry = t ? (e) => {
|
|
1344
1395
|
t(e), e.resume();
|
|
1345
1396
|
} : (e) => e.resume();
|
|
1346
1397
|
};
|
|
1347
|
-
var
|
|
1348
|
-
let e = new Map(t.map((n) => [
|
|
1349
|
-
let
|
|
1350
|
-
if (n ===
|
|
1398
|
+
var Qi = (s3, t) => {
|
|
1399
|
+
let e = new Map(t.map((n) => [ut(n), true])), i = s3.filter, r = (n, o = "") => {
|
|
1400
|
+
let h = o || kn(n).root || ".", a;
|
|
1401
|
+
if (n === h) a = false;
|
|
1351
1402
|
else {
|
|
1352
1403
|
let l = e.get(n);
|
|
1353
|
-
|
|
1404
|
+
a = l !== void 0 ? l : r(Fn(n), h);
|
|
1354
1405
|
}
|
|
1355
|
-
return e.set(n,
|
|
1406
|
+
return e.set(n, a), a;
|
|
1356
1407
|
};
|
|
1357
|
-
s3.filter = i ? (n, o) => i(n, o) && r(
|
|
1408
|
+
s3.filter = i ? (n, o) => i(n, o) && r(ut(n)) : (n) => r(ut(n));
|
|
1358
1409
|
};
|
|
1359
|
-
var
|
|
1360
|
-
let t = new
|
|
1410
|
+
var Mn = (s3) => {
|
|
1411
|
+
let t = new rt(s3), e = s3.file, i;
|
|
1361
1412
|
try {
|
|
1362
1413
|
i = Kt.openSync(e, "r");
|
|
1363
1414
|
let r = Kt.fstatSync(i), n = s3.maxReadSize || 16 * 1024 * 1024;
|
|
1364
1415
|
if (r.size < n) {
|
|
1365
|
-
let o = Buffer.allocUnsafe(r.size),
|
|
1366
|
-
t.end(
|
|
1416
|
+
let o = Buffer.allocUnsafe(r.size), h = Kt.readSync(i, o, 0, r.size, 0);
|
|
1417
|
+
t.end(h === o.byteLength ? o : o.subarray(0, h));
|
|
1367
1418
|
} else {
|
|
1368
|
-
let o = 0,
|
|
1419
|
+
let o = 0, h = Buffer.allocUnsafe(n);
|
|
1369
1420
|
for (; o < r.size; ) {
|
|
1370
|
-
let
|
|
1371
|
-
if (
|
|
1372
|
-
o +=
|
|
1421
|
+
let a = Kt.readSync(i, h, 0, n, o);
|
|
1422
|
+
if (a === 0) break;
|
|
1423
|
+
o += a, t.write(h.subarray(0, a));
|
|
1373
1424
|
}
|
|
1374
1425
|
t.end();
|
|
1375
1426
|
}
|
|
@@ -1380,58 +1431,58 @@ var In = (s3) => {
|
|
|
1380
1431
|
}
|
|
1381
1432
|
}
|
|
1382
1433
|
};
|
|
1383
|
-
var
|
|
1384
|
-
let e = new
|
|
1385
|
-
return new Promise((o,
|
|
1386
|
-
e.on("error",
|
|
1387
|
-
if (
|
|
1434
|
+
var Bn = (s3, t) => {
|
|
1435
|
+
let e = new rt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
1436
|
+
return new Promise((o, h) => {
|
|
1437
|
+
e.on("error", h), e.on("end", o), Kt.stat(r, (a, l) => {
|
|
1438
|
+
if (a) h(a);
|
|
1388
1439
|
else {
|
|
1389
1440
|
let c = new _t(r, { readSize: i, size: l.size });
|
|
1390
|
-
c.on("error",
|
|
1441
|
+
c.on("error", h), c.pipe(e);
|
|
1391
1442
|
}
|
|
1392
1443
|
});
|
|
1393
1444
|
});
|
|
1394
1445
|
};
|
|
1395
|
-
var
|
|
1396
|
-
t?.length &&
|
|
1446
|
+
var Ct = K(Mn, Bn, (s3) => new rt(s3), (s3) => new rt(s3), (s3, t) => {
|
|
1447
|
+
t?.length && Qi(s3, t), s3.noResume || vn(s3);
|
|
1397
1448
|
});
|
|
1398
|
-
var
|
|
1399
|
-
var { isAbsolute:
|
|
1400
|
-
var
|
|
1401
|
-
let t = "", e =
|
|
1402
|
-
for (;
|
|
1449
|
+
var Ji = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
|
|
1450
|
+
var { isAbsolute: zn, parse: qs } = Pn;
|
|
1451
|
+
var ce = (s3) => {
|
|
1452
|
+
let t = "", e = qs(s3);
|
|
1453
|
+
for (; zn(s3) || e.root; ) {
|
|
1403
1454
|
let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
|
|
1404
|
-
s3 = s3.slice(i.length), t += i, e =
|
|
1455
|
+
s3 = s3.slice(i.length), t += i, e = qs(s3);
|
|
1405
1456
|
}
|
|
1406
1457
|
return [t, s3];
|
|
1407
1458
|
};
|
|
1408
|
-
var
|
|
1409
|
-
var
|
|
1410
|
-
var
|
|
1411
|
-
var
|
|
1412
|
-
var
|
|
1413
|
-
var
|
|
1414
|
-
var
|
|
1415
|
-
var
|
|
1416
|
-
var
|
|
1417
|
-
var
|
|
1418
|
-
var
|
|
1419
|
-
var
|
|
1420
|
-
var
|
|
1421
|
-
var
|
|
1422
|
-
var
|
|
1423
|
-
var
|
|
1424
|
-
var
|
|
1425
|
-
var
|
|
1426
|
-
var
|
|
1427
|
-
var
|
|
1428
|
-
var
|
|
1459
|
+
var ei = ["|", "<", ">", "?", ":"];
|
|
1460
|
+
var ji = ei.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
|
|
1461
|
+
var Un = new Map(ei.map((s3, t) => [s3, ji[t]]));
|
|
1462
|
+
var Hn = new Map(ji.map((s3, t) => [s3, ei[t]]));
|
|
1463
|
+
var ts = (s3) => ei.reduce((t, e) => t.split(e).join(Un.get(e)), s3);
|
|
1464
|
+
var Qs = (s3) => ji.reduce((t, e) => t.split(e).join(Hn.get(e)), s3);
|
|
1465
|
+
var rr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), ut(t) + "/" + s3) : f(s3);
|
|
1466
|
+
var Wn = 16 * 1024 * 1024;
|
|
1467
|
+
var tr = /* @__PURE__ */ Symbol("process");
|
|
1468
|
+
var er = /* @__PURE__ */ Symbol("file");
|
|
1469
|
+
var ir = /* @__PURE__ */ Symbol("directory");
|
|
1470
|
+
var is = /* @__PURE__ */ Symbol("symlink");
|
|
1471
|
+
var sr = /* @__PURE__ */ Symbol("hardlink");
|
|
1472
|
+
var fe = /* @__PURE__ */ Symbol("header");
|
|
1473
|
+
var ii = /* @__PURE__ */ Symbol("read");
|
|
1474
|
+
var ss = /* @__PURE__ */ Symbol("lstat");
|
|
1475
|
+
var si = /* @__PURE__ */ Symbol("onlstat");
|
|
1476
|
+
var rs = /* @__PURE__ */ Symbol("onread");
|
|
1477
|
+
var ns = /* @__PURE__ */ Symbol("onreadlink");
|
|
1478
|
+
var os = /* @__PURE__ */ Symbol("openfile");
|
|
1479
|
+
var hs = /* @__PURE__ */ Symbol("onopenfile");
|
|
1429
1480
|
var pt = /* @__PURE__ */ Symbol("close");
|
|
1430
|
-
var
|
|
1431
|
-
var
|
|
1432
|
-
var
|
|
1433
|
-
var
|
|
1434
|
-
var
|
|
1481
|
+
var ri = /* @__PURE__ */ Symbol("mode");
|
|
1482
|
+
var as = /* @__PURE__ */ Symbol("awaitDrain");
|
|
1483
|
+
var es = /* @__PURE__ */ Symbol("ondrain");
|
|
1484
|
+
var q = /* @__PURE__ */ Symbol("prefix");
|
|
1485
|
+
var de = class extends A {
|
|
1435
1486
|
path;
|
|
1436
1487
|
portable;
|
|
1437
1488
|
myuid = process.getuid && process.getuid() || 0;
|
|
@@ -1464,109 +1515,109 @@ var fe = class extends A {
|
|
|
1464
1515
|
#t = false;
|
|
1465
1516
|
constructor(t, e = {}) {
|
|
1466
1517
|
let i = se(e);
|
|
1467
|
-
super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize ||
|
|
1518
|
+
super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || Wn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
|
|
1468
1519
|
let r = false;
|
|
1469
1520
|
if (!this.preservePaths) {
|
|
1470
|
-
let [o,
|
|
1471
|
-
o && typeof
|
|
1521
|
+
let [o, h] = ce(this.path);
|
|
1522
|
+
o && typeof h == "string" && (this.path = h, r = o);
|
|
1472
1523
|
}
|
|
1473
|
-
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path =
|
|
1524
|
+
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Qs(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || js.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
|
|
1474
1525
|
let n = this.statCache.get(this.absolute);
|
|
1475
|
-
n ? this[
|
|
1526
|
+
n ? this[si](n) : this[ss]();
|
|
1476
1527
|
}
|
|
1477
1528
|
warn(t, e, i = {}) {
|
|
1478
|
-
return
|
|
1529
|
+
return Dt(this, t, e, i);
|
|
1479
1530
|
}
|
|
1480
1531
|
emit(t, ...e) {
|
|
1481
1532
|
return t === "error" && (this.#t = true), super.emit(t, ...e);
|
|
1482
1533
|
}
|
|
1483
|
-
[
|
|
1484
|
-
|
|
1534
|
+
[ss]() {
|
|
1535
|
+
X.lstat(this.absolute, (t, e) => {
|
|
1485
1536
|
if (t) return this.emit("error", t);
|
|
1486
|
-
this[
|
|
1537
|
+
this[si](e);
|
|
1487
1538
|
});
|
|
1488
1539
|
}
|
|
1489
|
-
[
|
|
1490
|
-
this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type =
|
|
1540
|
+
[si](t) {
|
|
1541
|
+
this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Gn(t), this.emit("stat", t), this[tr]();
|
|
1491
1542
|
}
|
|
1492
|
-
[
|
|
1543
|
+
[tr]() {
|
|
1493
1544
|
switch (this.type) {
|
|
1494
1545
|
case "File":
|
|
1495
|
-
return this[
|
|
1546
|
+
return this[er]();
|
|
1496
1547
|
case "Directory":
|
|
1497
|
-
return this[
|
|
1548
|
+
return this[ir]();
|
|
1498
1549
|
case "SymbolicLink":
|
|
1499
|
-
return this[
|
|
1550
|
+
return this[is]();
|
|
1500
1551
|
default:
|
|
1501
1552
|
return this.end();
|
|
1502
1553
|
}
|
|
1503
1554
|
}
|
|
1504
|
-
[
|
|
1505
|
-
return
|
|
1555
|
+
[ri](t) {
|
|
1556
|
+
return Ji(t, this.type === "Directory", this.portable);
|
|
1506
1557
|
}
|
|
1507
|
-
[
|
|
1508
|
-
return
|
|
1558
|
+
[q](t) {
|
|
1559
|
+
return rr(t, this.prefix);
|
|
1509
1560
|
}
|
|
1510
|
-
[
|
|
1561
|
+
[fe]() {
|
|
1511
1562
|
if (!this.stat) throw new Error("cannot write header before stat");
|
|
1512
|
-
this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new
|
|
1563
|
+
this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, mode: this[ri](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ft({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
|
|
1513
1564
|
let t = this.header?.block;
|
|
1514
1565
|
if (!t) throw new Error("failed to encode header");
|
|
1515
1566
|
super.write(t);
|
|
1516
1567
|
}
|
|
1517
|
-
[
|
|
1568
|
+
[ir]() {
|
|
1518
1569
|
if (!this.stat) throw new Error("cannot create directory entry without stat");
|
|
1519
|
-
this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[
|
|
1570
|
+
this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
|
|
1520
1571
|
}
|
|
1521
|
-
[
|
|
1522
|
-
|
|
1572
|
+
[is]() {
|
|
1573
|
+
X.readlink(this.absolute, (t, e) => {
|
|
1523
1574
|
if (t) return this.emit("error", t);
|
|
1524
|
-
this[
|
|
1575
|
+
this[ns](e);
|
|
1525
1576
|
});
|
|
1526
1577
|
}
|
|
1527
|
-
[
|
|
1528
|
-
this.linkpath = f(t), this[
|
|
1578
|
+
[ns](t) {
|
|
1579
|
+
this.linkpath = f(t), this[fe](), this.end();
|
|
1529
1580
|
}
|
|
1530
|
-
[
|
|
1581
|
+
[sr](t) {
|
|
1531
1582
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
1532
|
-
this.type = "Link", this.linkpath = f(
|
|
1583
|
+
this.type = "Link", this.linkpath = f(js.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
|
|
1533
1584
|
}
|
|
1534
|
-
[
|
|
1585
|
+
[er]() {
|
|
1535
1586
|
if (!this.stat) throw new Error("cannot create file entry without stat");
|
|
1536
1587
|
if (this.stat.nlink > 1) {
|
|
1537
1588
|
let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
|
|
1538
|
-
if (e?.indexOf(this.cwd) === 0) return this[
|
|
1589
|
+
if (e?.indexOf(this.cwd) === 0) return this[sr](e);
|
|
1539
1590
|
this.linkCache.set(t, this.absolute);
|
|
1540
1591
|
}
|
|
1541
|
-
if (this[
|
|
1542
|
-
this[
|
|
1592
|
+
if (this[fe](), this.stat.size === 0) return this.end();
|
|
1593
|
+
this[os]();
|
|
1543
1594
|
}
|
|
1544
|
-
[
|
|
1545
|
-
|
|
1595
|
+
[os]() {
|
|
1596
|
+
X.open(this.absolute, "r", (t, e) => {
|
|
1546
1597
|
if (t) return this.emit("error", t);
|
|
1547
|
-
this[
|
|
1598
|
+
this[hs](e);
|
|
1548
1599
|
});
|
|
1549
1600
|
}
|
|
1550
|
-
[
|
|
1601
|
+
[hs](t) {
|
|
1551
1602
|
if (this.fd = t, this.#t) return this[pt]();
|
|
1552
1603
|
if (!this.stat) throw new Error("should stat before calling onopenfile");
|
|
1553
1604
|
this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
|
|
1554
1605
|
let e = Math.min(this.blockLen, this.maxReadSize);
|
|
1555
|
-
this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[
|
|
1606
|
+
this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ii]();
|
|
1556
1607
|
}
|
|
1557
|
-
[
|
|
1608
|
+
[ii]() {
|
|
1558
1609
|
let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
|
|
1559
1610
|
if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
|
|
1560
|
-
|
|
1611
|
+
X.read(t, e, i, r, n, (o, h) => {
|
|
1561
1612
|
if (o) return this[pt](() => this.emit("error", o));
|
|
1562
|
-
this[
|
|
1613
|
+
this[rs](h);
|
|
1563
1614
|
});
|
|
1564
1615
|
}
|
|
1565
1616
|
[pt](t = () => {
|
|
1566
1617
|
}) {
|
|
1567
|
-
this.fd !== void 0 &&
|
|
1618
|
+
this.fd !== void 0 && X.close(this.fd, t);
|
|
1568
1619
|
}
|
|
1569
|
-
[
|
|
1620
|
+
[rs](t) {
|
|
1570
1621
|
if (t <= 0 && this.remain > 0) {
|
|
1571
1622
|
let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
|
|
1572
1623
|
return this[pt](() => this.emit("error", r));
|
|
@@ -1578,9 +1629,9 @@ var fe = class extends A {
|
|
|
1578
1629
|
if (!this.buf) throw new Error("should have created buffer prior to reading");
|
|
1579
1630
|
if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
|
|
1580
1631
|
let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
|
|
1581
|
-
this.write(e) ? this[
|
|
1632
|
+
this.write(e) ? this[es]() : this[as](() => this[es]());
|
|
1582
1633
|
}
|
|
1583
|
-
[
|
|
1634
|
+
[as](t) {
|
|
1584
1635
|
this.once("drain", t);
|
|
1585
1636
|
}
|
|
1586
1637
|
write(t, e, i) {
|
|
@@ -1590,30 +1641,30 @@ var fe = class extends A {
|
|
|
1590
1641
|
}
|
|
1591
1642
|
return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
|
|
1592
1643
|
}
|
|
1593
|
-
[
|
|
1644
|
+
[es]() {
|
|
1594
1645
|
if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
|
|
1595
1646
|
if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
|
|
1596
|
-
this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[
|
|
1647
|
+
this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ii]();
|
|
1597
1648
|
}
|
|
1598
1649
|
};
|
|
1599
|
-
var
|
|
1650
|
+
var ni = class extends de {
|
|
1600
1651
|
sync = true;
|
|
1601
|
-
[
|
|
1602
|
-
this[
|
|
1652
|
+
[ss]() {
|
|
1653
|
+
this[si](X.lstatSync(this.absolute));
|
|
1603
1654
|
}
|
|
1604
|
-
[
|
|
1605
|
-
this[
|
|
1655
|
+
[is]() {
|
|
1656
|
+
this[ns](X.readlinkSync(this.absolute));
|
|
1606
1657
|
}
|
|
1607
|
-
[
|
|
1608
|
-
this[
|
|
1658
|
+
[os]() {
|
|
1659
|
+
this[hs](X.openSync(this.absolute, "r"));
|
|
1609
1660
|
}
|
|
1610
|
-
[
|
|
1661
|
+
[ii]() {
|
|
1611
1662
|
let t = true;
|
|
1612
1663
|
try {
|
|
1613
1664
|
let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
|
|
1614
1665
|
if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
|
|
1615
|
-
let
|
|
1616
|
-
this[
|
|
1666
|
+
let h = X.readSync(e, i, r, n, o);
|
|
1667
|
+
this[rs](h), t = false;
|
|
1617
1668
|
} finally {
|
|
1618
1669
|
if (t) try {
|
|
1619
1670
|
this[pt](() => {
|
|
@@ -1622,15 +1673,15 @@ var ri = class extends fe {
|
|
|
1622
1673
|
}
|
|
1623
1674
|
}
|
|
1624
1675
|
}
|
|
1625
|
-
[
|
|
1676
|
+
[as](t) {
|
|
1626
1677
|
t();
|
|
1627
1678
|
}
|
|
1628
1679
|
[pt](t = () => {
|
|
1629
1680
|
}) {
|
|
1630
|
-
this.fd !== void 0 &&
|
|
1681
|
+
this.fd !== void 0 && X.closeSync(this.fd), t();
|
|
1631
1682
|
}
|
|
1632
1683
|
};
|
|
1633
|
-
var
|
|
1684
|
+
var oi = class extends A {
|
|
1634
1685
|
blockLen = 0;
|
|
1635
1686
|
blockRemain = 0;
|
|
1636
1687
|
buf = 0;
|
|
@@ -1659,29 +1710,29 @@ var ni = class extends A {
|
|
|
1659
1710
|
size;
|
|
1660
1711
|
onWriteEntry;
|
|
1661
1712
|
warn(t, e, i = {}) {
|
|
1662
|
-
return
|
|
1713
|
+
return Dt(this, t, e, i);
|
|
1663
1714
|
}
|
|
1664
1715
|
constructor(t, e = {}) {
|
|
1665
1716
|
let i = se(e);
|
|
1666
1717
|
super(), this.preservePaths = !!i.preservePaths, this.portable = !!i.portable, this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.onWriteEntry = i.onWriteEntry, this.readEntry = t;
|
|
1667
1718
|
let { type: r } = t;
|
|
1668
1719
|
if (r === "Unsupported") throw new Error("writing entry that should be ignored");
|
|
1669
|
-
this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[
|
|
1720
|
+
this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[ri](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
|
|
1670
1721
|
let n = false;
|
|
1671
1722
|
if (!this.preservePaths) {
|
|
1672
|
-
let [
|
|
1673
|
-
|
|
1723
|
+
let [h, a] = ce(this.path);
|
|
1724
|
+
h && typeof a == "string" && (this.path = a, n = h);
|
|
1674
1725
|
}
|
|
1675
|
-
this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new
|
|
1726
|
+
this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new F({ path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, mode: this.mode, uid: this.portable ? void 0 : this.uid, gid: this.portable ? void 0 : this.gid, size: this.size, mtime: this.noMtime ? void 0 : this.mtime, type: this.type, uname: this.portable ? void 0 : this.uname, atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime }), n && this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute path`, { entry: this, path: n + this.path }), this.header.encode() && !this.noPax && super.write(new ft({ atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime, gid: this.portable ? void 0 : this.gid, mtime: this.noMtime ? void 0 : this.mtime, path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, size: this.size, uid: this.portable ? void 0 : this.uid, uname: this.portable ? void 0 : this.uname, dev: this.portable ? void 0 : this.readEntry.dev, ino: this.portable ? void 0 : this.readEntry.ino, nlink: this.portable ? void 0 : this.readEntry.nlink }).encode());
|
|
1676
1727
|
let o = this.header?.block;
|
|
1677
1728
|
if (!o) throw new Error("failed to encode header");
|
|
1678
1729
|
super.write(o), t.pipe(this);
|
|
1679
1730
|
}
|
|
1680
|
-
[
|
|
1681
|
-
return
|
|
1731
|
+
[q](t) {
|
|
1732
|
+
return rr(t, this.prefix);
|
|
1682
1733
|
}
|
|
1683
|
-
[
|
|
1684
|
-
return
|
|
1734
|
+
[ri](t) {
|
|
1735
|
+
return Ji(t, this.type === "Directory", this.portable);
|
|
1685
1736
|
}
|
|
1686
1737
|
write(t, e, i) {
|
|
1687
1738
|
typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
|
|
@@ -1693,8 +1744,8 @@ var ni = class extends A {
|
|
|
1693
1744
|
return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e ?? "utf8")), i && this.once("finish", i), t ? super.end(t, i) : super.end(i), this;
|
|
1694
1745
|
}
|
|
1695
1746
|
};
|
|
1696
|
-
var
|
|
1697
|
-
var
|
|
1747
|
+
var Gn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
|
|
1748
|
+
var hi = class s2 {
|
|
1698
1749
|
tail;
|
|
1699
1750
|
head;
|
|
1700
1751
|
length = 0;
|
|
@@ -1725,11 +1776,11 @@ var oi = class s2 {
|
|
|
1725
1776
|
t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
|
|
1726
1777
|
}
|
|
1727
1778
|
push(...t) {
|
|
1728
|
-
for (let e = 0, i = t.length; e < i; e++)
|
|
1779
|
+
for (let e = 0, i = t.length; e < i; e++) Yn(this, t[e]);
|
|
1729
1780
|
return this.length;
|
|
1730
1781
|
}
|
|
1731
1782
|
unshift(...t) {
|
|
1732
|
-
for (var e = 0, i = t.length; e < i; e++)
|
|
1783
|
+
for (var e = 0, i = t.length; e < i; e++) Kn(this, t[e]);
|
|
1733
1784
|
return this.length;
|
|
1734
1785
|
}
|
|
1735
1786
|
pop() {
|
|
@@ -1825,7 +1876,7 @@ var oi = class s2 {
|
|
|
1825
1876
|
let n = [];
|
|
1826
1877
|
for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
|
|
1827
1878
|
r ? r !== this.tail && (r = r.prev) : r = this.tail;
|
|
1828
|
-
for (let o of i) r =
|
|
1879
|
+
for (let o of i) r = Zn(this, r, o);
|
|
1829
1880
|
return n;
|
|
1830
1881
|
}
|
|
1831
1882
|
reverse() {
|
|
@@ -1837,17 +1888,17 @@ var oi = class s2 {
|
|
|
1837
1888
|
return this.head = e, this.tail = t, this;
|
|
1838
1889
|
}
|
|
1839
1890
|
};
|
|
1840
|
-
function
|
|
1841
|
-
let i = t, r = t ? t.next : s3.head, n = new
|
|
1891
|
+
function Zn(s3, t, e) {
|
|
1892
|
+
let i = t, r = t ? t.next : s3.head, n = new me(e, i, r, s3);
|
|
1842
1893
|
return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
|
|
1843
1894
|
}
|
|
1844
|
-
function
|
|
1845
|
-
s3.tail = new
|
|
1895
|
+
function Yn(s3, t) {
|
|
1896
|
+
s3.tail = new me(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
|
|
1846
1897
|
}
|
|
1847
|
-
function
|
|
1848
|
-
s3.head = new
|
|
1898
|
+
function Kn(s3, t) {
|
|
1899
|
+
s3.head = new me(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
|
|
1849
1900
|
}
|
|
1850
|
-
var
|
|
1901
|
+
var me = class {
|
|
1851
1902
|
list;
|
|
1852
1903
|
next;
|
|
1853
1904
|
prev;
|
|
@@ -1856,7 +1907,7 @@ var de = class {
|
|
|
1856
1907
|
this.list = r, this.value = t, e ? (e.next = this, this.prev = e) : this.prev = void 0, i ? (i.prev = this, this.next = i) : this.next = void 0;
|
|
1857
1908
|
}
|
|
1858
1909
|
};
|
|
1859
|
-
var
|
|
1910
|
+
var pi = class {
|
|
1860
1911
|
path;
|
|
1861
1912
|
absolute;
|
|
1862
1913
|
entry;
|
|
@@ -1870,28 +1921,28 @@ var mi = class {
|
|
|
1870
1921
|
this.path = t || "./", this.absolute = e;
|
|
1871
1922
|
}
|
|
1872
1923
|
};
|
|
1873
|
-
var
|
|
1874
|
-
var
|
|
1924
|
+
var nr = Buffer.alloc(1024);
|
|
1925
|
+
var li = /* @__PURE__ */ Symbol("onStat");
|
|
1875
1926
|
var ue = /* @__PURE__ */ Symbol("ended");
|
|
1876
1927
|
var W = /* @__PURE__ */ Symbol("queue");
|
|
1877
|
-
var
|
|
1928
|
+
var pe = /* @__PURE__ */ Symbol("pendingLinks");
|
|
1878
1929
|
var Et = /* @__PURE__ */ Symbol("current");
|
|
1879
|
-
var
|
|
1880
|
-
var
|
|
1881
|
-
var
|
|
1930
|
+
var Ft = /* @__PURE__ */ Symbol("process");
|
|
1931
|
+
var Ee = /* @__PURE__ */ Symbol("processing");
|
|
1932
|
+
var ai = /* @__PURE__ */ Symbol("processJob");
|
|
1882
1933
|
var G = /* @__PURE__ */ Symbol("jobs");
|
|
1883
|
-
var
|
|
1884
|
-
var
|
|
1885
|
-
var
|
|
1886
|
-
var
|
|
1887
|
-
var
|
|
1888
|
-
var
|
|
1889
|
-
var
|
|
1890
|
-
var
|
|
1891
|
-
var
|
|
1892
|
-
var
|
|
1893
|
-
var
|
|
1894
|
-
var
|
|
1934
|
+
var ls = /* @__PURE__ */ Symbol("jobDone");
|
|
1935
|
+
var ci = /* @__PURE__ */ Symbol("addFSEntry");
|
|
1936
|
+
var or = /* @__PURE__ */ Symbol("addTarEntry");
|
|
1937
|
+
var ds = /* @__PURE__ */ Symbol("stat");
|
|
1938
|
+
var ms = /* @__PURE__ */ Symbol("readdir");
|
|
1939
|
+
var fi = /* @__PURE__ */ Symbol("onreaddir");
|
|
1940
|
+
var di = /* @__PURE__ */ Symbol("pipe");
|
|
1941
|
+
var hr = /* @__PURE__ */ Symbol("entry");
|
|
1942
|
+
var cs = /* @__PURE__ */ Symbol("entryOpt");
|
|
1943
|
+
var mi = /* @__PURE__ */ Symbol("writeEntryClass");
|
|
1944
|
+
var lr = /* @__PURE__ */ Symbol("write");
|
|
1945
|
+
var fs = /* @__PURE__ */ Symbol("ondrain");
|
|
1895
1946
|
var wt = class extends A {
|
|
1896
1947
|
sync = false;
|
|
1897
1948
|
opt;
|
|
@@ -1913,139 +1964,139 @@ var wt = class extends A {
|
|
|
1913
1964
|
mtime;
|
|
1914
1965
|
filter;
|
|
1915
1966
|
jobs;
|
|
1916
|
-
[
|
|
1967
|
+
[mi];
|
|
1917
1968
|
onWriteEntry;
|
|
1918
1969
|
[W];
|
|
1919
|
-
[
|
|
1970
|
+
[pe] = /* @__PURE__ */ new Map();
|
|
1920
1971
|
[G] = 0;
|
|
1921
|
-
[
|
|
1972
|
+
[Ee] = false;
|
|
1922
1973
|
[ue] = false;
|
|
1923
1974
|
constructor(t = {}) {
|
|
1924
|
-
if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[
|
|
1975
|
+
if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[mi] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
|
|
1925
1976
|
if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
|
|
1926
|
-
if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new
|
|
1977
|
+
if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new ze(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new We(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ye(t.zstd)), !this.zip) throw new Error("impossible");
|
|
1927
1978
|
let e = this.zip;
|
|
1928
|
-
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[
|
|
1929
|
-
} else this.on("drain", this[
|
|
1930
|
-
this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new
|
|
1979
|
+
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[fs]()), this.on("resume", () => e.resume());
|
|
1980
|
+
} else this.on("drain", this[fs]);
|
|
1981
|
+
this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new hi(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[Ee] = false, this[ue] = false;
|
|
1931
1982
|
}
|
|
1932
|
-
[
|
|
1983
|
+
[lr](t) {
|
|
1933
1984
|
return super.write(t);
|
|
1934
1985
|
}
|
|
1935
1986
|
add(t) {
|
|
1936
1987
|
return this.write(t), this;
|
|
1937
1988
|
}
|
|
1938
1989
|
end(t, e, i) {
|
|
1939
|
-
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[ue] = true, this[
|
|
1990
|
+
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[ue] = true, this[Ft](), i && i(), this;
|
|
1940
1991
|
}
|
|
1941
1992
|
write(t) {
|
|
1942
1993
|
if (this[ue]) throw new Error("write after end");
|
|
1943
|
-
return typeof t == "string" ? this[
|
|
1994
|
+
return typeof t == "string" ? this[ci](t) : this[or](t), this.flowing;
|
|
1944
1995
|
}
|
|
1945
|
-
[
|
|
1946
|
-
let e = f(
|
|
1996
|
+
[or](t) {
|
|
1997
|
+
let e = f(ar.resolve(this.cwd, t.path));
|
|
1947
1998
|
if (!this.filter(t.path, t)) t.resume();
|
|
1948
1999
|
else {
|
|
1949
|
-
let i = new
|
|
1950
|
-
i.entry = new
|
|
2000
|
+
let i = new pi(t.path, e);
|
|
2001
|
+
i.entry = new oi(t, this[cs](i)), i.entry.on("end", () => this[ls](i)), this[G] += 1, this[W].push(i);
|
|
1951
2002
|
}
|
|
1952
|
-
this[
|
|
2003
|
+
this[Ft]();
|
|
1953
2004
|
}
|
|
1954
|
-
[
|
|
1955
|
-
let e = f(
|
|
1956
|
-
this[W].push(new
|
|
2005
|
+
[ci](t) {
|
|
2006
|
+
let e = f(ar.resolve(this.cwd, t));
|
|
2007
|
+
this[W].push(new pi(t, e)), this[Ft]();
|
|
1957
2008
|
}
|
|
1958
|
-
[
|
|
2009
|
+
[ds](t) {
|
|
1959
2010
|
t.pending = true, this[G] += 1;
|
|
1960
2011
|
let e = this.follow ? "stat" : "lstat";
|
|
1961
2012
|
ui[e](t.absolute, (i, r) => {
|
|
1962
|
-
t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[
|
|
2013
|
+
t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[li](t, r);
|
|
1963
2014
|
});
|
|
1964
2015
|
}
|
|
1965
|
-
[
|
|
2016
|
+
[li](t, e) {
|
|
1966
2017
|
if (this.statCache.set(t.absolute, e), t.stat = e, !this.filter(t.path, e)) t.ignore = true;
|
|
1967
|
-
else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t === this[Et]) this[
|
|
2018
|
+
else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t === this[Et]) this[ai](t);
|
|
1968
2019
|
else {
|
|
1969
|
-
let i = `${e.dev}:${e.ino}`, r = this[
|
|
1970
|
-
r ? r.push(t) : this[
|
|
2020
|
+
let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
|
|
2021
|
+
r ? r.push(t) : this[pe].set(i, [t]), t.pendingLink = true, t.pending = true;
|
|
1971
2022
|
}
|
|
1972
|
-
this[
|
|
2023
|
+
this[Ft]();
|
|
1973
2024
|
}
|
|
1974
|
-
[
|
|
2025
|
+
[ms](t) {
|
|
1975
2026
|
t.pending = true, this[G] += 1, ui.readdir(t.absolute, (e, i) => {
|
|
1976
2027
|
if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
|
|
1977
|
-
this[
|
|
2028
|
+
this[fi](t, i);
|
|
1978
2029
|
});
|
|
1979
2030
|
}
|
|
1980
|
-
[
|
|
1981
|
-
this.readdirCache.set(t.absolute, e), t.readdir = e, this[
|
|
2031
|
+
[fi](t, e) {
|
|
2032
|
+
this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
|
|
1982
2033
|
}
|
|
1983
|
-
[
|
|
1984
|
-
if (!this[
|
|
1985
|
-
this[
|
|
1986
|
-
for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[
|
|
2034
|
+
[Ft]() {
|
|
2035
|
+
if (!this[Ee]) {
|
|
2036
|
+
this[Ee] = true;
|
|
2037
|
+
for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[ai](t.value), t.value.ignore) {
|
|
1987
2038
|
let e = t.next;
|
|
1988
2039
|
this[W].removeNode(t), t.next = e;
|
|
1989
2040
|
}
|
|
1990
|
-
this[
|
|
2041
|
+
this[Ee] = false, this[ue] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(nr) : (super.write(nr), super.end()));
|
|
1991
2042
|
}
|
|
1992
2043
|
}
|
|
1993
2044
|
get [Et]() {
|
|
1994
2045
|
return this[W] && this[W].head && this[W].head.value;
|
|
1995
2046
|
}
|
|
1996
|
-
[
|
|
2047
|
+
[ls](t) {
|
|
1997
2048
|
this[W].shift(), this[G] -= 1;
|
|
1998
2049
|
let { stat: e } = t;
|
|
1999
2050
|
if (e && e.isFile() && e.nlink > 1) {
|
|
2000
|
-
let i = `${e.dev}:${e.ino}`, r = this[
|
|
2051
|
+
let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
|
|
2001
2052
|
if (r) {
|
|
2002
|
-
this[
|
|
2003
|
-
for (let n of r) n.pending = false, this[
|
|
2053
|
+
this[pe].delete(i);
|
|
2054
|
+
for (let n of r) n.pending = false, this[ai](n);
|
|
2004
2055
|
}
|
|
2005
2056
|
}
|
|
2006
|
-
this[
|
|
2057
|
+
this[Ft]();
|
|
2007
2058
|
}
|
|
2008
|
-
[
|
|
2059
|
+
[ai](t) {
|
|
2009
2060
|
if (t.pending && t.pendingLink && t === this[Et] && (t.pending = false, t.pendingLink = false), !t.pending) {
|
|
2010
2061
|
if (t.entry) {
|
|
2011
|
-
t === this[Et] && !t.piped && this[
|
|
2062
|
+
t === this[Et] && !t.piped && this[di](t);
|
|
2012
2063
|
return;
|
|
2013
2064
|
}
|
|
2014
2065
|
if (!t.stat) {
|
|
2015
2066
|
let e = this.statCache.get(t.absolute);
|
|
2016
|
-
e ? this[
|
|
2067
|
+
e ? this[li](t, e) : this[ds](t);
|
|
2017
2068
|
}
|
|
2018
2069
|
if (t.stat && !t.ignore) {
|
|
2019
2070
|
if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
|
|
2020
2071
|
let e = this.readdirCache.get(t.absolute);
|
|
2021
|
-
if (e ? this[
|
|
2072
|
+
if (e ? this[fi](t, e) : this[ms](t), !t.readdir) return;
|
|
2022
2073
|
}
|
|
2023
|
-
if (t.entry = this[
|
|
2074
|
+
if (t.entry = this[hr](t), !t.entry) {
|
|
2024
2075
|
t.ignore = true;
|
|
2025
2076
|
return;
|
|
2026
2077
|
}
|
|
2027
|
-
t === this[Et] && !t.piped && this[
|
|
2078
|
+
t === this[Et] && !t.piped && this[di](t);
|
|
2028
2079
|
}
|
|
2029
2080
|
}
|
|
2030
2081
|
}
|
|
2031
|
-
[
|
|
2082
|
+
[cs](t) {
|
|
2032
2083
|
return { onwarn: (e, i, r) => this.warn(e, i, r), noPax: this.noPax, cwd: this.cwd, absolute: t.absolute, preservePaths: this.preservePaths, maxReadSize: this.maxReadSize, strict: this.strict, portable: this.portable, linkCache: this.linkCache, statCache: this.statCache, noMtime: this.noMtime, mtime: this.mtime, prefix: this.prefix, onWriteEntry: this.onWriteEntry };
|
|
2033
2084
|
}
|
|
2034
|
-
[
|
|
2085
|
+
[hr](t) {
|
|
2035
2086
|
this[G] += 1;
|
|
2036
2087
|
try {
|
|
2037
|
-
return new this[
|
|
2088
|
+
return new this[mi](t.path, this[cs](t)).on("end", () => this[ls](t)).on("error", (i) => this.emit("error", i));
|
|
2038
2089
|
} catch (e) {
|
|
2039
2090
|
this.emit("error", e);
|
|
2040
2091
|
}
|
|
2041
2092
|
}
|
|
2042
|
-
[
|
|
2093
|
+
[fs]() {
|
|
2043
2094
|
this[Et] && this[Et].entry && this[Et].entry.resume();
|
|
2044
2095
|
}
|
|
2045
|
-
[
|
|
2096
|
+
[di](t) {
|
|
2046
2097
|
t.piped = true, t.readdir && t.readdir.forEach((r) => {
|
|
2047
2098
|
let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
|
|
2048
|
-
this[
|
|
2099
|
+
this[ci](o + r);
|
|
2049
2100
|
});
|
|
2050
2101
|
let e = t.entry, i = this.zip;
|
|
2051
2102
|
if (!e) throw new Error("cannot pipe without source");
|
|
@@ -2059,137 +2110,137 @@ var wt = class extends A {
|
|
|
2059
2110
|
return this.zip && this.zip.pause(), super.pause();
|
|
2060
2111
|
}
|
|
2061
2112
|
warn(t, e, i = {}) {
|
|
2062
|
-
|
|
2113
|
+
Dt(this, t, e, i);
|
|
2063
2114
|
}
|
|
2064
2115
|
};
|
|
2065
2116
|
var kt = class extends wt {
|
|
2066
2117
|
sync = true;
|
|
2067
2118
|
constructor(t) {
|
|
2068
|
-
super(t), this[
|
|
2119
|
+
super(t), this[mi] = ni;
|
|
2069
2120
|
}
|
|
2070
2121
|
pause() {
|
|
2071
2122
|
}
|
|
2072
2123
|
resume() {
|
|
2073
2124
|
}
|
|
2074
|
-
[
|
|
2125
|
+
[ds](t) {
|
|
2075
2126
|
let e = this.follow ? "statSync" : "lstatSync";
|
|
2076
|
-
this[
|
|
2127
|
+
this[li](t, ui[e](t.absolute));
|
|
2077
2128
|
}
|
|
2078
|
-
[
|
|
2079
|
-
this[
|
|
2129
|
+
[ms](t) {
|
|
2130
|
+
this[fi](t, ui.readdirSync(t.absolute));
|
|
2080
2131
|
}
|
|
2081
|
-
[
|
|
2132
|
+
[di](t) {
|
|
2082
2133
|
let e = t.entry, i = this.zip;
|
|
2083
2134
|
if (t.readdir && t.readdir.forEach((r) => {
|
|
2084
2135
|
let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
|
|
2085
|
-
this[
|
|
2136
|
+
this[ci](o + r);
|
|
2086
2137
|
}), !e) throw new Error("Cannot pipe without source");
|
|
2087
2138
|
i ? e.on("data", (r) => {
|
|
2088
2139
|
i.write(r);
|
|
2089
2140
|
}) : e.on("data", (r) => {
|
|
2090
|
-
super[
|
|
2141
|
+
super[lr](r);
|
|
2091
2142
|
});
|
|
2092
2143
|
}
|
|
2093
2144
|
};
|
|
2094
|
-
var
|
|
2145
|
+
var Vn = (s3, t) => {
|
|
2095
2146
|
let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
|
|
2096
|
-
e.pipe(i),
|
|
2147
|
+
e.pipe(i), fr(e, t);
|
|
2097
2148
|
};
|
|
2098
|
-
var
|
|
2099
|
-
let e = new wt(s3), i = new
|
|
2149
|
+
var $n = (s3, t) => {
|
|
2150
|
+
let e = new wt(s3), i = new et(s3.file, { mode: s3.mode || 438 });
|
|
2100
2151
|
e.pipe(i);
|
|
2101
2152
|
let r = new Promise((n, o) => {
|
|
2102
2153
|
i.on("error", o), i.on("close", n), e.on("error", o);
|
|
2103
2154
|
});
|
|
2104
|
-
return
|
|
2155
|
+
return dr(e, t).catch((n) => e.emit("error", n)), r;
|
|
2105
2156
|
};
|
|
2106
|
-
var
|
|
2157
|
+
var fr = (s3, t) => {
|
|
2107
2158
|
t.forEach((e) => {
|
|
2108
|
-
e.charAt(0) === "@" ?
|
|
2159
|
+
e.charAt(0) === "@" ? Ct({ file: cr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
2109
2160
|
}), s3.end();
|
|
2110
2161
|
};
|
|
2111
|
-
var
|
|
2112
|
-
for (let e of t) e.charAt(0) === "@" ? await
|
|
2162
|
+
var dr = async (s3, t) => {
|
|
2163
|
+
for (let e of t) e.charAt(0) === "@" ? await Ct({ file: cr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
|
|
2113
2164
|
s3.add(i);
|
|
2114
2165
|
} }) : s3.add(e);
|
|
2115
2166
|
s3.end();
|
|
2116
2167
|
};
|
|
2117
|
-
var
|
|
2168
|
+
var Xn = (s3, t) => {
|
|
2118
2169
|
let e = new kt(s3);
|
|
2119
|
-
return
|
|
2170
|
+
return fr(e, t), e;
|
|
2120
2171
|
};
|
|
2121
|
-
var
|
|
2172
|
+
var qn = (s3, t) => {
|
|
2122
2173
|
let e = new wt(s3);
|
|
2123
|
-
return
|
|
2174
|
+
return dr(e, t).catch((i) => e.emit("error", i)), e;
|
|
2124
2175
|
};
|
|
2125
|
-
var
|
|
2176
|
+
var Qn = K(Vn, $n, Xn, qn, (s3, t) => {
|
|
2126
2177
|
if (!t?.length) throw new TypeError("no paths specified to add to archive");
|
|
2127
2178
|
});
|
|
2128
|
-
var
|
|
2129
|
-
var
|
|
2130
|
-
var { O_CREAT:
|
|
2131
|
-
var
|
|
2132
|
-
var
|
|
2133
|
-
var
|
|
2134
|
-
var
|
|
2135
|
-
var
|
|
2136
|
-
var
|
|
2137
|
-
var
|
|
2179
|
+
var Jn = process.env.__FAKE_PLATFORM__ || process.platform;
|
|
2180
|
+
var Er = Jn === "win32";
|
|
2181
|
+
var { O_CREAT: wr, O_NOFOLLOW: mr, O_TRUNC: Sr, O_WRONLY: yr } = pr.constants;
|
|
2182
|
+
var Rr = Number(process.env.__FAKE_FS_O_FILENAME__) || pr.constants.UV_FS_O_FILEMAP || 0;
|
|
2183
|
+
var jn = Er && !!Rr;
|
|
2184
|
+
var to = 512 * 1024;
|
|
2185
|
+
var eo = Rr | Sr | wr | yr;
|
|
2186
|
+
var ur = !Er && typeof mr == "number" ? mr | Sr | wr | yr : null;
|
|
2187
|
+
var us = ur !== null ? () => ur : jn ? (s3) => s3 < to ? eo : "w" : () => "w";
|
|
2188
|
+
var ps = (s3, t, e) => {
|
|
2138
2189
|
try {
|
|
2139
|
-
return
|
|
2190
|
+
return wi.lchownSync(s3, t, e);
|
|
2140
2191
|
} catch (i) {
|
|
2141
2192
|
if (i?.code !== "ENOENT") throw i;
|
|
2142
2193
|
}
|
|
2143
2194
|
};
|
|
2144
|
-
var
|
|
2145
|
-
|
|
2195
|
+
var Ei = (s3, t, e, i) => {
|
|
2196
|
+
wi.lchown(s3, t, e, (r) => {
|
|
2146
2197
|
i(r && r?.code !== "ENOENT" ? r : null);
|
|
2147
2198
|
});
|
|
2148
2199
|
};
|
|
2149
|
-
var
|
|
2150
|
-
if (t.isDirectory())
|
|
2200
|
+
var io = (s3, t, e, i, r) => {
|
|
2201
|
+
if (t.isDirectory()) Es(we.resolve(s3, t.name), e, i, (n) => {
|
|
2151
2202
|
if (n) return r(n);
|
|
2152
|
-
let o =
|
|
2153
|
-
|
|
2203
|
+
let o = we.resolve(s3, t.name);
|
|
2204
|
+
Ei(o, e, i, r);
|
|
2154
2205
|
});
|
|
2155
2206
|
else {
|
|
2156
|
-
let n =
|
|
2157
|
-
|
|
2207
|
+
let n = we.resolve(s3, t.name);
|
|
2208
|
+
Ei(n, e, i, r);
|
|
2158
2209
|
}
|
|
2159
2210
|
};
|
|
2160
|
-
var
|
|
2161
|
-
|
|
2211
|
+
var Es = (s3, t, e, i) => {
|
|
2212
|
+
wi.readdir(s3, { withFileTypes: true }, (r, n) => {
|
|
2162
2213
|
if (r) {
|
|
2163
2214
|
if (r.code === "ENOENT") return i();
|
|
2164
2215
|
if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
|
|
2165
2216
|
}
|
|
2166
|
-
if (r || !n.length) return
|
|
2167
|
-
let o = n.length,
|
|
2168
|
-
if (!
|
|
2169
|
-
if (l) return i(
|
|
2170
|
-
if (--o === 0) return
|
|
2217
|
+
if (r || !n.length) return Ei(s3, t, e, i);
|
|
2218
|
+
let o = n.length, h = null, a = (l) => {
|
|
2219
|
+
if (!h) {
|
|
2220
|
+
if (l) return i(h = l);
|
|
2221
|
+
if (--o === 0) return Ei(s3, t, e, i);
|
|
2171
2222
|
}
|
|
2172
2223
|
};
|
|
2173
|
-
for (let l of n)
|
|
2224
|
+
for (let l of n) io(s3, l, t, e, a);
|
|
2174
2225
|
});
|
|
2175
2226
|
};
|
|
2176
|
-
var
|
|
2177
|
-
t.isDirectory() &&
|
|
2227
|
+
var so = (s3, t, e, i) => {
|
|
2228
|
+
t.isDirectory() && ws(we.resolve(s3, t.name), e, i), ps(we.resolve(s3, t.name), e, i);
|
|
2178
2229
|
};
|
|
2179
|
-
var
|
|
2230
|
+
var ws = (s3, t, e) => {
|
|
2180
2231
|
let i;
|
|
2181
2232
|
try {
|
|
2182
|
-
i =
|
|
2233
|
+
i = wi.readdirSync(s3, { withFileTypes: true });
|
|
2183
2234
|
} catch (r) {
|
|
2184
2235
|
let n = r;
|
|
2185
2236
|
if (n?.code === "ENOENT") return;
|
|
2186
|
-
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return
|
|
2237
|
+
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return ps(s3, t, e);
|
|
2187
2238
|
throw n;
|
|
2188
2239
|
}
|
|
2189
|
-
for (let r of i)
|
|
2190
|
-
return
|
|
2240
|
+
for (let r of i) so(s3, r, t, e);
|
|
2241
|
+
return ps(s3, t, e);
|
|
2191
2242
|
};
|
|
2192
|
-
var
|
|
2243
|
+
var Se = class extends Error {
|
|
2193
2244
|
path;
|
|
2194
2245
|
code;
|
|
2195
2246
|
syscall = "chdir";
|
|
@@ -2212,97 +2263,97 @@ var St = class extends Error {
|
|
|
2212
2263
|
return "SymlinkError";
|
|
2213
2264
|
}
|
|
2214
2265
|
};
|
|
2215
|
-
var
|
|
2266
|
+
var no = (s3, t) => {
|
|
2216
2267
|
k.stat(s3, (e, i) => {
|
|
2217
|
-
(e || !i.isDirectory()) && (e = new
|
|
2268
|
+
(e || !i.isDirectory()) && (e = new Se(s3, e?.code || "ENOTDIR")), t(e);
|
|
2218
2269
|
});
|
|
2219
2270
|
};
|
|
2220
|
-
var
|
|
2271
|
+
var gr = (s3, t, e) => {
|
|
2221
2272
|
s3 = f(s3);
|
|
2222
|
-
let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid,
|
|
2223
|
-
E ? e(E) : x &&
|
|
2273
|
+
let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, h = t.gid, a = typeof o == "number" && typeof h == "number" && (o !== t.processUid || h !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), y = (E, x) => {
|
|
2274
|
+
E ? e(E) : x && a ? Es(x, o, h, (Le) => y(Le)) : n ? k.chmod(s3, r, e) : e();
|
|
2224
2275
|
};
|
|
2225
|
-
if (s3 === d) return
|
|
2226
|
-
if (l) return
|
|
2227
|
-
let
|
|
2228
|
-
|
|
2276
|
+
if (s3 === d) return no(s3, y);
|
|
2277
|
+
if (l) return ro.mkdir(s3, { mode: r, recursive: true }).then((E) => y(null, E ?? void 0), y);
|
|
2278
|
+
let D = f(Si.relative(d, s3)).split("/");
|
|
2279
|
+
Ss(d, D, r, c, d, void 0, y);
|
|
2229
2280
|
};
|
|
2230
|
-
var
|
|
2281
|
+
var Ss = (s3, t, e, i, r, n, o) => {
|
|
2231
2282
|
if (t.length === 0) return o(null, n);
|
|
2232
|
-
let
|
|
2233
|
-
k.mkdir(
|
|
2283
|
+
let h = t.shift(), a = f(Si.resolve(s3 + "/" + h));
|
|
2284
|
+
k.mkdir(a, e, br(a, t, e, i, r, n, o));
|
|
2234
2285
|
};
|
|
2235
|
-
var
|
|
2236
|
-
|
|
2237
|
-
if (
|
|
2238
|
-
else if (l.isDirectory())
|
|
2286
|
+
var br = (s3, t, e, i, r, n, o) => (h) => {
|
|
2287
|
+
h ? k.lstat(s3, (a, l) => {
|
|
2288
|
+
if (a) a.path = a.path && f(a.path), o(a);
|
|
2289
|
+
else if (l.isDirectory()) Ss(s3, t, e, i, r, n, o);
|
|
2239
2290
|
else if (i) k.unlink(s3, (c) => {
|
|
2240
2291
|
if (c) return o(c);
|
|
2241
|
-
k.mkdir(s3, e,
|
|
2292
|
+
k.mkdir(s3, e, br(s3, t, e, i, r, n, o));
|
|
2242
2293
|
});
|
|
2243
2294
|
else {
|
|
2244
2295
|
if (l.isSymbolicLink()) return o(new St(s3, s3 + "/" + t.join("/")));
|
|
2245
|
-
o(
|
|
2296
|
+
o(h);
|
|
2246
2297
|
}
|
|
2247
|
-
}) : (n = n || s3,
|
|
2298
|
+
}) : (n = n || s3, Ss(s3, t, e, i, r, n, o));
|
|
2248
2299
|
};
|
|
2249
|
-
var
|
|
2300
|
+
var oo = (s3) => {
|
|
2250
2301
|
let t = false, e;
|
|
2251
2302
|
try {
|
|
2252
2303
|
t = k.statSync(s3).isDirectory();
|
|
2253
2304
|
} catch (i) {
|
|
2254
2305
|
e = i?.code;
|
|
2255
2306
|
} finally {
|
|
2256
|
-
if (!t) throw new
|
|
2307
|
+
if (!t) throw new Se(s3, e ?? "ENOTDIR");
|
|
2257
2308
|
}
|
|
2258
2309
|
};
|
|
2259
|
-
var
|
|
2310
|
+
var _r = (s3, t) => {
|
|
2260
2311
|
s3 = f(s3);
|
|
2261
|
-
let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid,
|
|
2262
|
-
E &&
|
|
2312
|
+
let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid, h = typeof n == "number" && typeof o == "number" && (n !== t.processUid || o !== t.processGid), a = t.preserve, l = t.unlink, c = f(t.cwd), d = (E) => {
|
|
2313
|
+
E && h && ws(E, n, o), r && k.chmodSync(s3, i);
|
|
2263
2314
|
};
|
|
2264
|
-
if (s3 === c) return
|
|
2265
|
-
if (
|
|
2266
|
-
let T = f(
|
|
2315
|
+
if (s3 === c) return oo(c), d();
|
|
2316
|
+
if (a) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
|
|
2317
|
+
let T = f(Si.relative(c, s3)).split("/"), D;
|
|
2267
2318
|
for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
|
|
2268
|
-
x = f(
|
|
2319
|
+
x = f(Si.resolve(x));
|
|
2269
2320
|
try {
|
|
2270
|
-
k.mkdirSync(x, i),
|
|
2321
|
+
k.mkdirSync(x, i), D = D || x;
|
|
2271
2322
|
} catch {
|
|
2272
|
-
let
|
|
2273
|
-
if (
|
|
2323
|
+
let Le = k.lstatSync(x);
|
|
2324
|
+
if (Le.isDirectory()) continue;
|
|
2274
2325
|
if (l) {
|
|
2275
|
-
k.unlinkSync(x), k.mkdirSync(x, i),
|
|
2326
|
+
k.unlinkSync(x), k.mkdirSync(x, i), D = D || x;
|
|
2276
2327
|
continue;
|
|
2277
|
-
} else if (
|
|
2328
|
+
} else if (Le.isSymbolicLink()) return new St(x, x + "/" + T.join("/"));
|
|
2278
2329
|
}
|
|
2279
2330
|
}
|
|
2280
|
-
return d(
|
|
2331
|
+
return d(D);
|
|
2281
2332
|
};
|
|
2282
|
-
var
|
|
2283
|
-
var
|
|
2333
|
+
var ys = /* @__PURE__ */ Object.create(null);
|
|
2334
|
+
var Or = 1e4;
|
|
2284
2335
|
var Vt = /* @__PURE__ */ new Set();
|
|
2285
|
-
var
|
|
2286
|
-
Vt.has(s3) ? Vt.delete(s3) :
|
|
2287
|
-
let t =
|
|
2288
|
-
if (e >
|
|
2289
|
-
for (let i of Vt) if (Vt.delete(i), delete
|
|
2336
|
+
var Tr = (s3) => {
|
|
2337
|
+
Vt.has(s3) ? Vt.delete(s3) : ys[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), Vt.add(s3);
|
|
2338
|
+
let t = ys[s3], e = Vt.size - Or;
|
|
2339
|
+
if (e > Or / 10) {
|
|
2340
|
+
for (let i of Vt) if (Vt.delete(i), delete ys[i], --e <= 0) break;
|
|
2290
2341
|
}
|
|
2291
2342
|
return t;
|
|
2292
2343
|
};
|
|
2293
|
-
var
|
|
2294
|
-
var
|
|
2295
|
-
var
|
|
2344
|
+
var ho = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
2345
|
+
var ao = ho === "win32";
|
|
2346
|
+
var lo = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
|
|
2296
2347
|
let r = e.at(-1);
|
|
2297
|
-
return r !== void 0 && (i =
|
|
2348
|
+
return r !== void 0 && (i = xr(r, i)), e.push(i || "/"), e;
|
|
2298
2349
|
}, []);
|
|
2299
|
-
var
|
|
2350
|
+
var yi = class {
|
|
2300
2351
|
#t = /* @__PURE__ */ new Map();
|
|
2301
2352
|
#i = /* @__PURE__ */ new Map();
|
|
2302
2353
|
#s = /* @__PURE__ */ new Set();
|
|
2303
2354
|
reserve(t, e) {
|
|
2304
|
-
t =
|
|
2305
|
-
let i = new Set(t.map((r) =>
|
|
2355
|
+
t = ao ? ["win32 parallelization disabled"] : t.map((r) => ut(xr(Tr(r))));
|
|
2356
|
+
let i = new Set(t.map((r) => lo(r)).reduce((r, n) => r.concat(n)));
|
|
2306
2357
|
this.#i.set(e, { dirs: i, paths: t });
|
|
2307
2358
|
for (let r of t) {
|
|
2308
2359
|
let n = this.#t.get(r);
|
|
@@ -2336,79 +2387,79 @@ var Si = class {
|
|
|
2336
2387
|
if (!e) throw new Error("invalid reservation");
|
|
2337
2388
|
let { paths: i, dirs: r } = e, n = /* @__PURE__ */ new Set();
|
|
2338
2389
|
for (let o of i) {
|
|
2339
|
-
let
|
|
2340
|
-
if (!
|
|
2341
|
-
let
|
|
2342
|
-
if (!
|
|
2390
|
+
let h = this.#t.get(o);
|
|
2391
|
+
if (!h || h?.[0] !== t) continue;
|
|
2392
|
+
let a = h[1];
|
|
2393
|
+
if (!a) {
|
|
2343
2394
|
this.#t.delete(o);
|
|
2344
2395
|
continue;
|
|
2345
2396
|
}
|
|
2346
|
-
if (
|
|
2347
|
-
else for (let l of
|
|
2397
|
+
if (h.shift(), typeof a == "function") n.add(a);
|
|
2398
|
+
else for (let l of a) n.add(l);
|
|
2348
2399
|
}
|
|
2349
2400
|
for (let o of r) {
|
|
2350
|
-
let
|
|
2351
|
-
if (!(!
|
|
2401
|
+
let h = this.#t.get(o), a = h?.[0];
|
|
2402
|
+
if (!(!h || !(a instanceof Set))) if (a.size === 1 && h.length === 1) {
|
|
2352
2403
|
this.#t.delete(o);
|
|
2353
2404
|
continue;
|
|
2354
|
-
} else if (
|
|
2355
|
-
|
|
2356
|
-
let l =
|
|
2405
|
+
} else if (a.size === 1) {
|
|
2406
|
+
h.shift();
|
|
2407
|
+
let l = h[0];
|
|
2357
2408
|
typeof l == "function" && n.add(l);
|
|
2358
|
-
} else
|
|
2409
|
+
} else a.delete(t);
|
|
2359
2410
|
}
|
|
2360
2411
|
return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
|
|
2361
2412
|
}
|
|
2362
2413
|
};
|
|
2363
|
-
var
|
|
2364
|
-
var
|
|
2365
|
-
var
|
|
2366
|
-
var
|
|
2367
|
-
var
|
|
2414
|
+
var Lr = () => process.umask();
|
|
2415
|
+
var Dr = /* @__PURE__ */ Symbol("onEntry");
|
|
2416
|
+
var _s = /* @__PURE__ */ Symbol("checkFs");
|
|
2417
|
+
var Nr = /* @__PURE__ */ Symbol("checkFs2");
|
|
2418
|
+
var Os = /* @__PURE__ */ Symbol("isReusable");
|
|
2368
2419
|
var P = /* @__PURE__ */ Symbol("makeFs");
|
|
2369
|
-
var
|
|
2370
|
-
var
|
|
2371
|
-
var
|
|
2372
|
-
var
|
|
2373
|
-
var
|
|
2374
|
-
var
|
|
2375
|
-
var
|
|
2376
|
-
var
|
|
2377
|
-
var
|
|
2420
|
+
var Ts = /* @__PURE__ */ Symbol("file");
|
|
2421
|
+
var xs = /* @__PURE__ */ Symbol("directory");
|
|
2422
|
+
var gi = /* @__PURE__ */ Symbol("link");
|
|
2423
|
+
var Ar = /* @__PURE__ */ Symbol("symlink");
|
|
2424
|
+
var Ir = /* @__PURE__ */ Symbol("hardlink");
|
|
2425
|
+
var Re = /* @__PURE__ */ Symbol("ensureNoSymlink");
|
|
2426
|
+
var Cr = /* @__PURE__ */ Symbol("unsupported");
|
|
2427
|
+
var Fr = /* @__PURE__ */ Symbol("checkPath");
|
|
2428
|
+
var Rs = /* @__PURE__ */ Symbol("stripAbsolutePath");
|
|
2378
2429
|
var yt = /* @__PURE__ */ Symbol("mkdir");
|
|
2379
2430
|
var O = /* @__PURE__ */ Symbol("onError");
|
|
2380
|
-
var
|
|
2381
|
-
var
|
|
2431
|
+
var Ri = /* @__PURE__ */ Symbol("pending");
|
|
2432
|
+
var kr = /* @__PURE__ */ Symbol("pend");
|
|
2382
2433
|
var $t = /* @__PURE__ */ Symbol("unpend");
|
|
2383
|
-
var
|
|
2384
|
-
var
|
|
2385
|
-
var
|
|
2386
|
-
var
|
|
2387
|
-
var
|
|
2388
|
-
var
|
|
2389
|
-
var
|
|
2390
|
-
var
|
|
2391
|
-
var
|
|
2392
|
-
var
|
|
2393
|
-
var
|
|
2394
|
-
if (!
|
|
2395
|
-
let e = s3 + ".DELETE." +
|
|
2396
|
-
|
|
2434
|
+
var gs = /* @__PURE__ */ Symbol("ended");
|
|
2435
|
+
var bs = /* @__PURE__ */ Symbol("maybeClose");
|
|
2436
|
+
var Ls = /* @__PURE__ */ Symbol("skip");
|
|
2437
|
+
var ge = /* @__PURE__ */ Symbol("doChown");
|
|
2438
|
+
var be = /* @__PURE__ */ Symbol("uid");
|
|
2439
|
+
var _e = /* @__PURE__ */ Symbol("gid");
|
|
2440
|
+
var Oe = /* @__PURE__ */ Symbol("checkedCwd");
|
|
2441
|
+
var fo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
2442
|
+
var Te = fo === "win32";
|
|
2443
|
+
var mo = 1024;
|
|
2444
|
+
var uo = (s3, t) => {
|
|
2445
|
+
if (!Te) return m.unlink(s3, t);
|
|
2446
|
+
let e = s3 + ".DELETE." + Mr(16).toString("hex");
|
|
2447
|
+
m.rename(s3, e, (i) => {
|
|
2397
2448
|
if (i) return t(i);
|
|
2398
|
-
|
|
2449
|
+
m.unlink(e, t);
|
|
2399
2450
|
});
|
|
2400
2451
|
};
|
|
2401
|
-
var
|
|
2402
|
-
if (!
|
|
2403
|
-
let t = s3 + ".DELETE." +
|
|
2404
|
-
|
|
2405
|
-
};
|
|
2406
|
-
var
|
|
2407
|
-
var Xt = class extends
|
|
2408
|
-
[
|
|
2409
|
-
[
|
|
2410
|
-
[
|
|
2411
|
-
reservations = new
|
|
2452
|
+
var po = (s3) => {
|
|
2453
|
+
if (!Te) return m.unlinkSync(s3);
|
|
2454
|
+
let t = s3 + ".DELETE." + Mr(16).toString("hex");
|
|
2455
|
+
m.renameSync(s3, t), m.unlinkSync(t);
|
|
2456
|
+
};
|
|
2457
|
+
var vr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
|
|
2458
|
+
var Xt = class extends rt {
|
|
2459
|
+
[gs] = false;
|
|
2460
|
+
[Oe] = false;
|
|
2461
|
+
[Ri] = 0;
|
|
2462
|
+
reservations = new yi();
|
|
2412
2463
|
transform;
|
|
2413
2464
|
writable = true;
|
|
2414
2465
|
readable = false;
|
|
@@ -2435,32 +2486,32 @@ var Xt = class extends st {
|
|
|
2435
2486
|
chmod;
|
|
2436
2487
|
constructor(t = {}) {
|
|
2437
2488
|
if (t.ondone = () => {
|
|
2438
|
-
this[
|
|
2489
|
+
this[gs] = true, this[bs]();
|
|
2439
2490
|
}, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
|
|
2440
2491
|
if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
|
|
2441
2492
|
if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
2442
2493
|
this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
|
|
2443
2494
|
} else this.uid = void 0, this.gid = void 0, this.setOwner = false;
|
|
2444
|
-
this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ?
|
|
2495
|
+
this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? process.getuid?.() === 0 : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : mo, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Te, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : Lr() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Dr](e));
|
|
2445
2496
|
}
|
|
2446
2497
|
warn(t, e, i = {}) {
|
|
2447
2498
|
return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
|
|
2448
2499
|
}
|
|
2449
|
-
[
|
|
2450
|
-
this[
|
|
2500
|
+
[bs]() {
|
|
2501
|
+
this[gs] && this[Ri] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
|
|
2451
2502
|
}
|
|
2452
|
-
[
|
|
2503
|
+
[Rs](t, e) {
|
|
2453
2504
|
let i = t[e], { type: r } = t;
|
|
2454
2505
|
if (!i || this.preservePaths) return true;
|
|
2455
|
-
let [n, o] =
|
|
2456
|
-
if (
|
|
2506
|
+
let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
|
|
2507
|
+
if (h.includes("..") || Te && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
|
|
2457
2508
|
if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
|
|
2458
|
-
let
|
|
2509
|
+
let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, h.join("/")));
|
|
2459
2510
|
if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
|
|
2460
2511
|
}
|
|
2461
2512
|
return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
|
|
2462
2513
|
}
|
|
2463
|
-
[
|
|
2514
|
+
[Fr](t) {
|
|
2464
2515
|
let e = f(t.path), i = e.split("/");
|
|
2465
2516
|
if (this.strip) {
|
|
2466
2517
|
if (i.length < this.strip) return false;
|
|
@@ -2472,20 +2523,20 @@ var Xt = class extends st {
|
|
|
2472
2523
|
i.splice(0, this.strip), t.path = i.join("/");
|
|
2473
2524
|
}
|
|
2474
2525
|
if (isFinite(this.maxDepth) && i.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", { entry: t, path: e, depth: i.length, maxDepth: this.maxDepth }), false;
|
|
2475
|
-
if (!this[
|
|
2526
|
+
if (!this[Rs](t, "path") || !this[Rs](t, "linkpath")) return false;
|
|
2476
2527
|
if (t.absolute = R.isAbsolute(t.path) ? f(R.resolve(t.path)) : f(R.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
|
|
2477
2528
|
if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
|
|
2478
2529
|
if (this.win32) {
|
|
2479
2530
|
let { root: r } = R.win32.parse(String(t.absolute));
|
|
2480
|
-
t.absolute = r +
|
|
2531
|
+
t.absolute = r + ts(String(t.absolute).slice(r.length));
|
|
2481
2532
|
let { root: n } = R.win32.parse(t.path);
|
|
2482
|
-
t.path = n +
|
|
2533
|
+
t.path = n + ts(t.path.slice(n.length));
|
|
2483
2534
|
}
|
|
2484
2535
|
return true;
|
|
2485
2536
|
}
|
|
2486
|
-
[
|
|
2487
|
-
if (!this[
|
|
2488
|
-
switch (
|
|
2537
|
+
[Dr](t) {
|
|
2538
|
+
if (!this[Fr](t)) return t.resume();
|
|
2539
|
+
switch (co.equal(typeof t.absolute, "string"), t.type) {
|
|
2489
2540
|
case "Directory":
|
|
2490
2541
|
case "GNUDumpDir":
|
|
2491
2542
|
t.mode && (t.mode = t.mode | 448);
|
|
@@ -2494,62 +2545,62 @@ var Xt = class extends st {
|
|
|
2494
2545
|
case "ContiguousFile":
|
|
2495
2546
|
case "Link":
|
|
2496
2547
|
case "SymbolicLink":
|
|
2497
|
-
return this[
|
|
2548
|
+
return this[_s](t);
|
|
2498
2549
|
default:
|
|
2499
|
-
return this[
|
|
2550
|
+
return this[Cr](t);
|
|
2500
2551
|
}
|
|
2501
2552
|
}
|
|
2502
2553
|
[O](t, e) {
|
|
2503
2554
|
t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[$t](), e.resume());
|
|
2504
2555
|
}
|
|
2505
2556
|
[yt](t, e, i) {
|
|
2506
|
-
|
|
2507
|
-
}
|
|
2508
|
-
[Re](t) {
|
|
2509
|
-
return this.forceChown || this.preserveOwner && (typeof t.uid == "number" && t.uid !== this.processUid || typeof t.gid == "number" && t.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
|
|
2557
|
+
gr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
|
|
2510
2558
|
}
|
|
2511
2559
|
[ge](t) {
|
|
2512
|
-
return
|
|
2560
|
+
return this.forceChown || this.preserveOwner && (typeof t.uid == "number" && t.uid !== this.processUid || typeof t.gid == "number" && t.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
|
|
2513
2561
|
}
|
|
2514
2562
|
[be](t) {
|
|
2515
|
-
return
|
|
2563
|
+
return vr(this.uid, t.uid, this.processUid);
|
|
2516
2564
|
}
|
|
2517
|
-
[
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2565
|
+
[_e](t) {
|
|
2566
|
+
return vr(this.gid, t.gid, this.processGid);
|
|
2567
|
+
}
|
|
2568
|
+
[Ts](t, e) {
|
|
2569
|
+
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new et(String(t.absolute), { flags: us(t.size), mode: i, autoClose: false });
|
|
2570
|
+
r.on("error", (a) => {
|
|
2571
|
+
r.fd && m.close(r.fd, () => {
|
|
2572
|
+
}), r.write = () => true, this[O](a, t), e();
|
|
2522
2573
|
});
|
|
2523
|
-
let n = 1, o = (
|
|
2524
|
-
if (
|
|
2525
|
-
r.fd &&
|
|
2526
|
-
}), this[O](
|
|
2574
|
+
let n = 1, o = (a) => {
|
|
2575
|
+
if (a) {
|
|
2576
|
+
r.fd && m.close(r.fd, () => {
|
|
2577
|
+
}), this[O](a, t), e();
|
|
2527
2578
|
return;
|
|
2528
2579
|
}
|
|
2529
|
-
--n === 0 && r.fd !== void 0 &&
|
|
2580
|
+
--n === 0 && r.fd !== void 0 && m.close(r.fd, (l) => {
|
|
2530
2581
|
l ? this[O](l, t) : this[$t](), e();
|
|
2531
2582
|
});
|
|
2532
2583
|
};
|
|
2533
2584
|
r.on("finish", () => {
|
|
2534
|
-
let
|
|
2585
|
+
let a = String(t.absolute), l = r.fd;
|
|
2535
2586
|
if (typeof l == "number" && t.mtime && !this.noMtime) {
|
|
2536
2587
|
n++;
|
|
2537
2588
|
let c = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
|
|
2538
|
-
|
|
2589
|
+
m.futimes(l, c, d, (y) => y ? m.utimes(a, c, d, (T) => o(T && y)) : o());
|
|
2539
2590
|
}
|
|
2540
|
-
if (typeof l == "number" && this[
|
|
2591
|
+
if (typeof l == "number" && this[ge](t)) {
|
|
2541
2592
|
n++;
|
|
2542
|
-
let c = this[
|
|
2543
|
-
typeof c == "number" && typeof d == "number" &&
|
|
2593
|
+
let c = this[be](t), d = this[_e](t);
|
|
2594
|
+
typeof c == "number" && typeof d == "number" && m.fchown(l, c, d, (y) => y ? m.chown(a, c, d, (T) => o(T && y)) : o());
|
|
2544
2595
|
}
|
|
2545
2596
|
o();
|
|
2546
2597
|
});
|
|
2547
|
-
let
|
|
2548
|
-
|
|
2549
|
-
this[O](
|
|
2550
|
-
}), t.pipe(
|
|
2598
|
+
let h = this.transform && this.transform(t) || t;
|
|
2599
|
+
h !== t && (h.on("error", (a) => {
|
|
2600
|
+
this[O](a, t), e();
|
|
2601
|
+
}), t.pipe(h)), h.pipe(r);
|
|
2551
2602
|
}
|
|
2552
|
-
[
|
|
2603
|
+
[xs](t, e) {
|
|
2553
2604
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
|
|
2554
2605
|
this[yt](String(t.absolute), i, (r) => {
|
|
2555
2606
|
if (r) {
|
|
@@ -2559,68 +2610,68 @@ var Xt = class extends st {
|
|
|
2559
2610
|
let n = 1, o = () => {
|
|
2560
2611
|
--n === 0 && (e(), this[$t](), t.resume());
|
|
2561
2612
|
};
|
|
2562
|
-
t.mtime && !this.noMtime && (n++,
|
|
2613
|
+
t.mtime && !this.noMtime && (n++, m.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[ge](t) && (n++, m.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
|
|
2563
2614
|
});
|
|
2564
2615
|
}
|
|
2565
|
-
[
|
|
2616
|
+
[Cr](t) {
|
|
2566
2617
|
t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
|
|
2567
2618
|
}
|
|
2568
|
-
[
|
|
2619
|
+
[Ar](t, e) {
|
|
2569
2620
|
let i = f(R.relative(this.cwd, R.resolve(R.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
|
|
2570
|
-
this[
|
|
2621
|
+
this[Re](t, this.cwd, i, () => this[gi](t, String(t.linkpath), "symlink", e), (r) => {
|
|
2571
2622
|
this[O](r, t), e();
|
|
2572
2623
|
});
|
|
2573
2624
|
}
|
|
2574
|
-
[
|
|
2625
|
+
[Ir](t, e) {
|
|
2575
2626
|
let i = f(R.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
|
|
2576
|
-
this[
|
|
2627
|
+
this[Re](t, this.cwd, r, () => this[gi](t, i, "link", e), (n) => {
|
|
2577
2628
|
this[O](n, t), e();
|
|
2578
2629
|
});
|
|
2579
2630
|
}
|
|
2580
|
-
[
|
|
2631
|
+
[Re](t, e, i, r, n) {
|
|
2581
2632
|
let o = i.shift();
|
|
2582
2633
|
if (this.preservePaths || o === void 0) return r();
|
|
2583
|
-
let
|
|
2584
|
-
|
|
2585
|
-
if (
|
|
2586
|
-
if (l?.isSymbolicLink()) return n(new St(
|
|
2587
|
-
this[
|
|
2634
|
+
let h = R.resolve(e, o);
|
|
2635
|
+
m.lstat(h, (a, l) => {
|
|
2636
|
+
if (a) return r();
|
|
2637
|
+
if (l?.isSymbolicLink()) return n(new St(h, R.resolve(h, i.join("/"))));
|
|
2638
|
+
this[Re](t, h, i, r, n);
|
|
2588
2639
|
});
|
|
2589
2640
|
}
|
|
2590
|
-
[
|
|
2591
|
-
this[
|
|
2641
|
+
[kr]() {
|
|
2642
|
+
this[Ri]++;
|
|
2592
2643
|
}
|
|
2593
2644
|
[$t]() {
|
|
2594
|
-
this[
|
|
2645
|
+
this[Ri]--, this[bs]();
|
|
2595
2646
|
}
|
|
2596
|
-
[
|
|
2647
|
+
[Ls](t) {
|
|
2597
2648
|
this[$t](), t.resume();
|
|
2598
2649
|
}
|
|
2599
|
-
[
|
|
2600
|
-
return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !
|
|
2650
|
+
[Os](t, e) {
|
|
2651
|
+
return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Te;
|
|
2601
2652
|
}
|
|
2602
|
-
[
|
|
2603
|
-
this[
|
|
2653
|
+
[_s](t) {
|
|
2654
|
+
this[kr]();
|
|
2604
2655
|
let e = [t.path];
|
|
2605
|
-
t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[
|
|
2656
|
+
t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Nr](t, i));
|
|
2606
2657
|
}
|
|
2607
|
-
[
|
|
2608
|
-
let i = (
|
|
2609
|
-
e(
|
|
2658
|
+
[Nr](t, e) {
|
|
2659
|
+
let i = (h) => {
|
|
2660
|
+
e(h);
|
|
2610
2661
|
}, r = () => {
|
|
2611
|
-
this[yt](this.cwd, this.dmode, (
|
|
2612
|
-
if (
|
|
2613
|
-
this[O](
|
|
2662
|
+
this[yt](this.cwd, this.dmode, (h) => {
|
|
2663
|
+
if (h) {
|
|
2664
|
+
this[O](h, t), i();
|
|
2614
2665
|
return;
|
|
2615
2666
|
}
|
|
2616
|
-
this[
|
|
2667
|
+
this[Oe] = true, n();
|
|
2617
2668
|
});
|
|
2618
2669
|
}, n = () => {
|
|
2619
2670
|
if (t.absolute !== this.cwd) {
|
|
2620
|
-
let
|
|
2621
|
-
if (
|
|
2622
|
-
if (
|
|
2623
|
-
this[O](
|
|
2671
|
+
let h = f(R.dirname(String(t.absolute)));
|
|
2672
|
+
if (h !== this.cwd) return this[yt](h, this.dmode, (a) => {
|
|
2673
|
+
if (a) {
|
|
2674
|
+
this[O](a, t), i();
|
|
2624
2675
|
return;
|
|
2625
2676
|
}
|
|
2626
2677
|
o();
|
|
@@ -2628,24 +2679,24 @@ var Xt = class extends st {
|
|
|
2628
2679
|
}
|
|
2629
2680
|
o();
|
|
2630
2681
|
}, o = () => {
|
|
2631
|
-
|
|
2632
|
-
if (
|
|
2633
|
-
this[
|
|
2682
|
+
m.lstat(String(t.absolute), (h, a) => {
|
|
2683
|
+
if (a && (this.keep || this.newer && a.mtime > (t.mtime ?? a.mtime))) {
|
|
2684
|
+
this[Ls](t), i();
|
|
2634
2685
|
return;
|
|
2635
2686
|
}
|
|
2636
|
-
if (
|
|
2637
|
-
if (
|
|
2687
|
+
if (h || this[Os](t, a)) return this[P](null, t, i);
|
|
2688
|
+
if (a.isDirectory()) {
|
|
2638
2689
|
if (t.type === "Directory") {
|
|
2639
|
-
let l = this.chmod && t.mode && (
|
|
2640
|
-
return l ?
|
|
2690
|
+
let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
|
|
2691
|
+
return l ? m.chmod(String(t.absolute), Number(t.mode), c) : c();
|
|
2641
2692
|
}
|
|
2642
|
-
if (t.absolute !== this.cwd) return
|
|
2693
|
+
if (t.absolute !== this.cwd) return m.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
2643
2694
|
}
|
|
2644
2695
|
if (t.absolute === this.cwd) return this[P](null, t, i);
|
|
2645
|
-
|
|
2696
|
+
uo(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
2646
2697
|
});
|
|
2647
2698
|
};
|
|
2648
|
-
this[
|
|
2699
|
+
this[Oe] ? n() : r();
|
|
2649
2700
|
}
|
|
2650
2701
|
[P](t, e, i) {
|
|
2651
2702
|
if (t) {
|
|
@@ -2656,40 +2707,40 @@ var Xt = class extends st {
|
|
|
2656
2707
|
case "File":
|
|
2657
2708
|
case "OldFile":
|
|
2658
2709
|
case "ContiguousFile":
|
|
2659
|
-
return this[
|
|
2710
|
+
return this[Ts](e, i);
|
|
2660
2711
|
case "Link":
|
|
2661
|
-
return this[
|
|
2712
|
+
return this[Ir](e, i);
|
|
2662
2713
|
case "SymbolicLink":
|
|
2663
|
-
return this[
|
|
2714
|
+
return this[Ar](e, i);
|
|
2664
2715
|
case "Directory":
|
|
2665
2716
|
case "GNUDumpDir":
|
|
2666
|
-
return this[
|
|
2717
|
+
return this[xs](e, i);
|
|
2667
2718
|
}
|
|
2668
2719
|
}
|
|
2669
|
-
[
|
|
2670
|
-
|
|
2720
|
+
[gi](t, e, i, r) {
|
|
2721
|
+
m[i](e, String(t.absolute), (n) => {
|
|
2671
2722
|
n ? this[O](n, t) : (this[$t](), t.resume()), r();
|
|
2672
2723
|
});
|
|
2673
2724
|
}
|
|
2674
2725
|
};
|
|
2675
|
-
var
|
|
2726
|
+
var ye = (s3) => {
|
|
2676
2727
|
try {
|
|
2677
2728
|
return [null, s3()];
|
|
2678
2729
|
} catch (t) {
|
|
2679
2730
|
return [t, null];
|
|
2680
2731
|
}
|
|
2681
2732
|
};
|
|
2682
|
-
var
|
|
2733
|
+
var xe = class extends Xt {
|
|
2683
2734
|
sync = true;
|
|
2684
2735
|
[P](t, e) {
|
|
2685
2736
|
return super[P](t, e, () => {
|
|
2686
2737
|
});
|
|
2687
2738
|
}
|
|
2688
|
-
[
|
|
2689
|
-
if (!this[
|
|
2739
|
+
[_s](t) {
|
|
2740
|
+
if (!this[Oe]) {
|
|
2690
2741
|
let n = this[yt](this.cwd, this.dmode);
|
|
2691
2742
|
if (n) return this[O](n, t);
|
|
2692
|
-
this[
|
|
2743
|
+
this[Oe] = true;
|
|
2693
2744
|
}
|
|
2694
2745
|
if (t.absolute !== this.cwd) {
|
|
2695
2746
|
let n = f(R.dirname(String(t.absolute)));
|
|
@@ -2698,157 +2749,157 @@ var Te = class extends Xt {
|
|
|
2698
2749
|
if (o) return this[O](o, t);
|
|
2699
2750
|
}
|
|
2700
2751
|
}
|
|
2701
|
-
let [e, i] =
|
|
2702
|
-
if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[
|
|
2703
|
-
if (e || this[
|
|
2752
|
+
let [e, i] = ye(() => m.lstatSync(String(t.absolute)));
|
|
2753
|
+
if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Ls](t);
|
|
2754
|
+
if (e || this[Os](t, i)) return this[P](null, t);
|
|
2704
2755
|
if (i.isDirectory()) {
|
|
2705
2756
|
if (t.type === "Directory") {
|
|
2706
|
-
let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [
|
|
2707
|
-
|
|
2757
|
+
let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? ye(() => {
|
|
2758
|
+
m.chmodSync(String(t.absolute), Number(t.mode));
|
|
2708
2759
|
}) : [];
|
|
2709
|
-
return this[P](
|
|
2760
|
+
return this[P](h, t);
|
|
2710
2761
|
}
|
|
2711
|
-
let [n] =
|
|
2762
|
+
let [n] = ye(() => m.rmdirSync(String(t.absolute)));
|
|
2712
2763
|
this[P](n, t);
|
|
2713
2764
|
}
|
|
2714
|
-
let [r] = t.absolute === this.cwd ? [] :
|
|
2765
|
+
let [r] = t.absolute === this.cwd ? [] : ye(() => po(String(t.absolute)));
|
|
2715
2766
|
this[P](r, t);
|
|
2716
2767
|
}
|
|
2717
|
-
[
|
|
2718
|
-
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (
|
|
2719
|
-
let
|
|
2768
|
+
[Ts](t, e) {
|
|
2769
|
+
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
|
|
2770
|
+
let a;
|
|
2720
2771
|
try {
|
|
2721
|
-
|
|
2772
|
+
m.closeSync(n);
|
|
2722
2773
|
} catch (l) {
|
|
2723
|
-
|
|
2774
|
+
a = l;
|
|
2724
2775
|
}
|
|
2725
|
-
(
|
|
2776
|
+
(h || a) && this[O](h || a, t), e();
|
|
2726
2777
|
}, n;
|
|
2727
2778
|
try {
|
|
2728
|
-
n =
|
|
2729
|
-
} catch (
|
|
2730
|
-
return r(
|
|
2779
|
+
n = m.openSync(String(t.absolute), us(t.size), i);
|
|
2780
|
+
} catch (h) {
|
|
2781
|
+
return r(h);
|
|
2731
2782
|
}
|
|
2732
2783
|
let o = this.transform && this.transform(t) || t;
|
|
2733
|
-
o !== t && (o.on("error", (
|
|
2784
|
+
o !== t && (o.on("error", (h) => this[O](h, t)), t.pipe(o)), o.on("data", (h) => {
|
|
2734
2785
|
try {
|
|
2735
|
-
|
|
2736
|
-
} catch (
|
|
2737
|
-
r(
|
|
2786
|
+
m.writeSync(n, h, 0, h.length);
|
|
2787
|
+
} catch (a) {
|
|
2788
|
+
r(a);
|
|
2738
2789
|
}
|
|
2739
2790
|
}), o.on("end", () => {
|
|
2740
|
-
let
|
|
2791
|
+
let h = null;
|
|
2741
2792
|
if (t.mtime && !this.noMtime) {
|
|
2742
|
-
let
|
|
2793
|
+
let a = t.atime || /* @__PURE__ */ new Date(), l = t.mtime;
|
|
2743
2794
|
try {
|
|
2744
|
-
|
|
2795
|
+
m.futimesSync(n, a, l);
|
|
2745
2796
|
} catch (c) {
|
|
2746
2797
|
try {
|
|
2747
|
-
|
|
2798
|
+
m.utimesSync(String(t.absolute), a, l);
|
|
2748
2799
|
} catch {
|
|
2749
|
-
|
|
2800
|
+
h = c;
|
|
2750
2801
|
}
|
|
2751
2802
|
}
|
|
2752
2803
|
}
|
|
2753
|
-
if (this[
|
|
2754
|
-
let
|
|
2804
|
+
if (this[ge](t)) {
|
|
2805
|
+
let a = this[be](t), l = this[_e](t);
|
|
2755
2806
|
try {
|
|
2756
|
-
|
|
2807
|
+
m.fchownSync(n, Number(a), Number(l));
|
|
2757
2808
|
} catch (c) {
|
|
2758
2809
|
try {
|
|
2759
|
-
|
|
2810
|
+
m.chownSync(String(t.absolute), Number(a), Number(l));
|
|
2760
2811
|
} catch {
|
|
2761
|
-
|
|
2812
|
+
h = h || c;
|
|
2762
2813
|
}
|
|
2763
2814
|
}
|
|
2764
2815
|
}
|
|
2765
|
-
r(
|
|
2816
|
+
r(h);
|
|
2766
2817
|
});
|
|
2767
2818
|
}
|
|
2768
|
-
[
|
|
2819
|
+
[xs](t, e) {
|
|
2769
2820
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[yt](String(t.absolute), i);
|
|
2770
2821
|
if (r) {
|
|
2771
2822
|
this[O](r, t), e();
|
|
2772
2823
|
return;
|
|
2773
2824
|
}
|
|
2774
2825
|
if (t.mtime && !this.noMtime) try {
|
|
2775
|
-
|
|
2826
|
+
m.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
|
|
2776
2827
|
} catch {
|
|
2777
2828
|
}
|
|
2778
|
-
if (this[
|
|
2779
|
-
|
|
2829
|
+
if (this[ge](t)) try {
|
|
2830
|
+
m.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
|
|
2780
2831
|
} catch {
|
|
2781
2832
|
}
|
|
2782
2833
|
e(), t.resume();
|
|
2783
2834
|
}
|
|
2784
2835
|
[yt](t, e) {
|
|
2785
2836
|
try {
|
|
2786
|
-
return
|
|
2837
|
+
return _r(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
|
|
2787
2838
|
} catch (i) {
|
|
2788
2839
|
return i;
|
|
2789
2840
|
}
|
|
2790
2841
|
}
|
|
2791
|
-
[
|
|
2842
|
+
[Re](t, e, i, r, n) {
|
|
2792
2843
|
if (this.preservePaths || i.length === 0) return r();
|
|
2793
2844
|
let o = e;
|
|
2794
|
-
for (let
|
|
2795
|
-
o = R.resolve(o,
|
|
2796
|
-
let [
|
|
2797
|
-
if (
|
|
2845
|
+
for (let h of i) {
|
|
2846
|
+
o = R.resolve(o, h);
|
|
2847
|
+
let [a, l] = ye(() => m.lstatSync(o));
|
|
2848
|
+
if (a) return r();
|
|
2798
2849
|
if (l.isSymbolicLink()) return n(new St(o, R.resolve(e, i.join("/"))));
|
|
2799
2850
|
}
|
|
2800
2851
|
r();
|
|
2801
2852
|
}
|
|
2802
|
-
[
|
|
2853
|
+
[gi](t, e, i, r) {
|
|
2803
2854
|
let n = `${i}Sync`;
|
|
2804
2855
|
try {
|
|
2805
|
-
|
|
2856
|
+
m[n](e, String(t.absolute)), r(), t.resume();
|
|
2806
2857
|
} catch (o) {
|
|
2807
2858
|
return this[O](o, t);
|
|
2808
2859
|
}
|
|
2809
2860
|
}
|
|
2810
2861
|
};
|
|
2811
|
-
var
|
|
2812
|
-
let t = new
|
|
2813
|
-
new
|
|
2862
|
+
var Eo = (s3) => {
|
|
2863
|
+
let t = new xe(s3), e = s3.file, i = Br.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
|
|
2864
|
+
new Be(e, { readSize: r, size: i.size }).pipe(t);
|
|
2814
2865
|
};
|
|
2815
|
-
var
|
|
2866
|
+
var wo = (s3, t) => {
|
|
2816
2867
|
let e = new Xt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
2817
|
-
return new Promise((o,
|
|
2818
|
-
e.on("error",
|
|
2819
|
-
if (
|
|
2868
|
+
return new Promise((o, h) => {
|
|
2869
|
+
e.on("error", h), e.on("close", o), Br.stat(r, (a, l) => {
|
|
2870
|
+
if (a) h(a);
|
|
2820
2871
|
else {
|
|
2821
2872
|
let c = new _t(r, { readSize: i, size: l.size });
|
|
2822
|
-
c.on("error",
|
|
2873
|
+
c.on("error", h), c.pipe(e);
|
|
2823
2874
|
}
|
|
2824
2875
|
});
|
|
2825
2876
|
});
|
|
2826
2877
|
};
|
|
2827
|
-
var
|
|
2828
|
-
t?.length &&
|
|
2878
|
+
var So = K(Eo, wo, (s3) => new xe(s3), (s3) => new Xt(s3), (s3, t) => {
|
|
2879
|
+
t?.length && Qi(s3, t);
|
|
2829
2880
|
});
|
|
2830
|
-
var
|
|
2881
|
+
var yo = (s3, t) => {
|
|
2831
2882
|
let e = new kt(s3), i = true, r, n;
|
|
2832
2883
|
try {
|
|
2833
2884
|
try {
|
|
2834
2885
|
r = v.openSync(s3.file, "r+");
|
|
2835
|
-
} catch (
|
|
2836
|
-
if (
|
|
2837
|
-
else throw
|
|
2886
|
+
} catch (a) {
|
|
2887
|
+
if (a?.code === "ENOENT") r = v.openSync(s3.file, "w+");
|
|
2888
|
+
else throw a;
|
|
2838
2889
|
}
|
|
2839
|
-
let o = v.fstatSync(r),
|
|
2890
|
+
let o = v.fstatSync(r), h = Buffer.alloc(512);
|
|
2840
2891
|
t: for (n = 0; n < o.size; n += 512) {
|
|
2841
2892
|
for (let c = 0, d = 0; c < 512; c += d) {
|
|
2842
|
-
if (d = v.readSync(r,
|
|
2893
|
+
if (d = v.readSync(r, h, c, h.length - c, n + c), n === 0 && h[0] === 31 && h[1] === 139) throw new Error("cannot append to compressed archives");
|
|
2843
2894
|
if (!d) break t;
|
|
2844
2895
|
}
|
|
2845
|
-
let
|
|
2846
|
-
if (!
|
|
2847
|
-
let l = 512 * Math.ceil((
|
|
2896
|
+
let a = new F(h);
|
|
2897
|
+
if (!a.cksumValid) break;
|
|
2898
|
+
let l = 512 * Math.ceil((a.size || 0) / 512);
|
|
2848
2899
|
if (n + l + 512 > o.size) break;
|
|
2849
|
-
n += l, s3.mtimeCache &&
|
|
2900
|
+
n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
|
|
2850
2901
|
}
|
|
2851
|
-
i = false,
|
|
2902
|
+
i = false, Ro(s3, e, n, r, t);
|
|
2852
2903
|
} finally {
|
|
2853
2904
|
if (i) try {
|
|
2854
2905
|
v.closeSync(r);
|
|
@@ -2856,76 +2907,76 @@ var mo = (s3, t) => {
|
|
|
2856
2907
|
}
|
|
2857
2908
|
}
|
|
2858
2909
|
};
|
|
2859
|
-
var
|
|
2910
|
+
var Ro = (s3, t, e, i, r) => {
|
|
2860
2911
|
let n = new Wt(s3.file, { fd: i, start: e });
|
|
2861
|
-
t.pipe(n),
|
|
2912
|
+
t.pipe(n), bo(t, r);
|
|
2862
2913
|
};
|
|
2863
|
-
var
|
|
2914
|
+
var go = (s3, t) => {
|
|
2864
2915
|
t = Array.from(t);
|
|
2865
|
-
let e = new wt(s3), i = (n, o,
|
|
2866
|
-
let
|
|
2867
|
-
T ? v.close(n, (E) =>
|
|
2916
|
+
let e = new wt(s3), i = (n, o, h) => {
|
|
2917
|
+
let a = (T, D) => {
|
|
2918
|
+
T ? v.close(n, (E) => h(T)) : h(null, D);
|
|
2868
2919
|
}, l = 0;
|
|
2869
|
-
if (o === 0) return
|
|
2870
|
-
let c = 0, d = Buffer.alloc(512),
|
|
2871
|
-
if (T ||
|
|
2872
|
-
if (c +=
|
|
2873
|
-
if (l === 0 && d[0] === 31 && d[1] === 139) return
|
|
2874
|
-
if (c < 512) return
|
|
2875
|
-
let E = new
|
|
2876
|
-
if (!E.cksumValid) return
|
|
2920
|
+
if (o === 0) return a(null, 0);
|
|
2921
|
+
let c = 0, d = Buffer.alloc(512), y = (T, D) => {
|
|
2922
|
+
if (T || D === void 0) return a(T);
|
|
2923
|
+
if (c += D, c < 512 && D) return v.read(n, d, c, d.length - c, l + c, y);
|
|
2924
|
+
if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
|
|
2925
|
+
if (c < 512) return a(null, l);
|
|
2926
|
+
let E = new F(d);
|
|
2927
|
+
if (!E.cksumValid) return a(null, l);
|
|
2877
2928
|
let x = 512 * Math.ceil((E.size ?? 0) / 512);
|
|
2878
|
-
if (l + x + 512 > o || (l += x + 512, l >= o)) return
|
|
2879
|
-
s3.mtimeCache && E.mtime && s3.mtimeCache.set(String(E.path), E.mtime), c = 0, v.read(n, d, 0, 512, l,
|
|
2929
|
+
if (l + x + 512 > o || (l += x + 512, l >= o)) return a(null, l);
|
|
2930
|
+
s3.mtimeCache && E.mtime && s3.mtimeCache.set(String(E.path), E.mtime), c = 0, v.read(n, d, 0, 512, l, y);
|
|
2880
2931
|
};
|
|
2881
|
-
v.read(n, d, 0, 512, l,
|
|
2932
|
+
v.read(n, d, 0, 512, l, y);
|
|
2882
2933
|
};
|
|
2883
2934
|
return new Promise((n, o) => {
|
|
2884
2935
|
e.on("error", o);
|
|
2885
|
-
let
|
|
2886
|
-
if (l && l.code === "ENOENT" &&
|
|
2936
|
+
let h = "r+", a = (l, c) => {
|
|
2937
|
+
if (l && l.code === "ENOENT" && h === "r+") return h = "w+", v.open(s3.file, h, a);
|
|
2887
2938
|
if (l || !c) return o(l);
|
|
2888
|
-
v.fstat(c, (d,
|
|
2939
|
+
v.fstat(c, (d, y) => {
|
|
2889
2940
|
if (d) return v.close(c, () => o(d));
|
|
2890
|
-
i(c,
|
|
2941
|
+
i(c, y.size, (T, D) => {
|
|
2891
2942
|
if (T) return o(T);
|
|
2892
|
-
let E = new
|
|
2893
|
-
e.pipe(E), E.on("error", o), E.on("close", n),
|
|
2943
|
+
let E = new et(s3.file, { fd: c, start: D });
|
|
2944
|
+
e.pipe(E), E.on("error", o), E.on("close", n), _o(e, t);
|
|
2894
2945
|
});
|
|
2895
2946
|
});
|
|
2896
2947
|
};
|
|
2897
|
-
v.open(s3.file,
|
|
2948
|
+
v.open(s3.file, h, a);
|
|
2898
2949
|
});
|
|
2899
2950
|
};
|
|
2900
|
-
var
|
|
2951
|
+
var bo = (s3, t) => {
|
|
2901
2952
|
t.forEach((e) => {
|
|
2902
|
-
e.charAt(0) === "@" ?
|
|
2953
|
+
e.charAt(0) === "@" ? Ct({ file: Pr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
2903
2954
|
}), s3.end();
|
|
2904
2955
|
};
|
|
2905
|
-
var
|
|
2906
|
-
for (let e of t) e.charAt(0) === "@" ? await
|
|
2956
|
+
var _o = async (s3, t) => {
|
|
2957
|
+
for (let e of t) e.charAt(0) === "@" ? await Ct({ file: Pr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
2907
2958
|
s3.end();
|
|
2908
2959
|
};
|
|
2909
|
-
var vt = K(
|
|
2960
|
+
var vt = K(yo, go, () => {
|
|
2910
2961
|
throw new TypeError("file is required");
|
|
2911
2962
|
}, () => {
|
|
2912
2963
|
throw new TypeError("file is required");
|
|
2913
2964
|
}, (s3, t) => {
|
|
2914
|
-
if (!
|
|
2965
|
+
if (!Bs(s3)) throw new TypeError("file is required");
|
|
2915
2966
|
if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
|
|
2916
2967
|
if (!t?.length) throw new TypeError("no paths specified to add/replace");
|
|
2917
2968
|
});
|
|
2918
|
-
var
|
|
2919
|
-
vt.validate?.(s3, t),
|
|
2969
|
+
var Oo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
|
|
2970
|
+
vt.validate?.(s3, t), To(s3);
|
|
2920
2971
|
});
|
|
2921
|
-
var
|
|
2972
|
+
var To = (s3) => {
|
|
2922
2973
|
let t = s3.filter;
|
|
2923
2974
|
s3.mtimeCache || (s3.mtimeCache = /* @__PURE__ */ new Map()), s3.filter = t ? (e, i) => t(e, i) && !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0)) : (e, i) => !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0));
|
|
2924
2975
|
};
|
|
2925
2976
|
|
|
2926
2977
|
export {
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2978
|
+
Ct,
|
|
2979
|
+
Qn,
|
|
2980
|
+
So
|
|
2930
2981
|
};
|
|
2931
|
-
//# sourceMappingURL=chunk-
|
|
2982
|
+
//# sourceMappingURL=chunk-CK6ATTWW.js.map
|