nitro-nightly 3.0.1-20260124-165031-9c6abf17 → 3.0.1-20260127-164246-ef01b092
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/dist/_build/common.mjs +2084 -3212
- package/dist/_build/rolldown.mjs +12 -25
- package/dist/_build/rollup.mjs +11 -27
- package/dist/_build/vite.build.mjs +7 -11
- package/dist/_chunks/dev.mjs +20 -42
- package/dist/_chunks/nitro.mjs +13 -92
- package/dist/_chunks/nitro2.mjs +1 -5
- package/dist/_chunks/utils.mjs +10 -24
- package/dist/_common.mjs +12 -24
- package/dist/_libs/citty.mjs +1 -13
- package/dist/_libs/commondir+is-reference.mjs +12 -22
- package/dist/_libs/compatx.mjs +1 -4
- package/dist/_libs/confbox.mjs +363 -376
- package/dist/_libs/escape-string-regexp.mjs +1 -4
- package/dist/_libs/estree-walker.mjs +4 -92
- package/dist/_libs/hasown+resolve+deepmerge.mjs +144 -230
- package/dist/_libs/httpxy.mjs +5 -21
- package/dist/_libs/klona.mjs +1 -4
- package/dist/_libs/nypm+giget+tinyexec.mjs +874 -926
- package/dist/_libs/plugin-alias.mjs +1 -5
- package/dist/_libs/plugin-inject.mjs +1 -5
- package/dist/_libs/plugin-json.mjs +1 -5
- package/dist/_libs/pluginutils+plugin-commonjs.d.mts +2 -2
- package/dist/_libs/pluginutils.mjs +1 -31
- package/dist/_libs/rc9+c12+dotenv.mjs +43 -83
- package/dist/_libs/readdirp+chokidar.mjs +184 -360
- package/dist/_libs/remapping.mjs +1 -5
- package/dist/_libs/resolve-uri+gen-mapping.mjs +12 -48
- package/dist/_libs/rou3.mjs +1 -32
- package/dist/_libs/tsconfck.mjs +21 -334
- package/dist/_libs/ultrahtml.mjs +3 -16
- package/dist/_libs/unimport+unplugin.mjs +15 -75
- package/dist/_presets.mjs +260 -445
- package/dist/builder.mjs +1 -2
- package/dist/cli/_chunks/build.mjs +1 -5
- package/dist/cli/_chunks/common.mjs +1 -4
- package/dist/cli/_chunks/dev.mjs +1 -5
- package/dist/cli/_chunks/list.mjs +1 -5
- package/dist/cli/_chunks/prepare.mjs +1 -5
- package/dist/cli/_chunks/run.mjs +1 -5
- package/dist/cli/_chunks/task.mjs +1 -5
- package/dist/cli/index.mjs +1 -5
- package/dist/types/index.d.mts +5 -5
- package/dist/types/index.mjs +1 -2
- package/dist/vite.mjs +44 -63
- package/package.json +21 -21
|
@@ -23,451 +23,449 @@ import O$2 from "zlib";
|
|
|
23
23
|
import nt$1 from "process";
|
|
24
24
|
import a$a from "util";
|
|
25
25
|
import c from "node:readline";
|
|
26
|
-
|
|
27
|
-
//#region node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.js
|
|
28
26
|
var l$2 = Object.create;
|
|
29
27
|
var u$5 = Object.defineProperty;
|
|
30
28
|
var d = Object.getOwnPropertyDescriptor;
|
|
31
29
|
var f$4 = Object.getOwnPropertyNames;
|
|
32
30
|
var p$1 = Object.getPrototypeOf;
|
|
33
31
|
var m$3 = Object.prototype.hasOwnProperty;
|
|
34
|
-
var h$1 = (e
|
|
35
|
-
var g = (e
|
|
36
|
-
if (t
|
|
37
|
-
s
|
|
38
|
-
if (!m$3.call(e
|
|
39
|
-
get: ((e
|
|
40
|
-
enumerable: !(r = d(t
|
|
32
|
+
var h$1 = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
|
|
33
|
+
var g = (e, t, n, r) => {
|
|
34
|
+
if (t && typeof t === "object" || typeof t === "function") for (var i = f$4(t), a = 0, o = i.length, s; a < o; a++) {
|
|
35
|
+
s = i[a];
|
|
36
|
+
if (!m$3.call(e, s) && s !== n) u$5(e, s, {
|
|
37
|
+
get: ((e) => t[e]).bind(null, s),
|
|
38
|
+
enumerable: !(r = d(t, s)) || r.enumerable
|
|
41
39
|
});
|
|
42
40
|
}
|
|
43
|
-
return e
|
|
41
|
+
return e;
|
|
44
42
|
};
|
|
45
|
-
var _$1 = (e
|
|
46
|
-
value: e
|
|
43
|
+
var _$1 = (e, t, n) => (n = e != null ? l$2(p$1(e)) : {}, g(t || !e || !e.__esModule ? u$5(n, "default", {
|
|
44
|
+
value: e,
|
|
47
45
|
enumerable: true
|
|
48
|
-
}) : n
|
|
46
|
+
}) : n, e));
|
|
49
47
|
var v$2 = /* @__PURE__ */ createRequire$1(import.meta.url);
|
|
50
48
|
const y$3 = /^path$/i;
|
|
51
49
|
const b = {
|
|
52
50
|
key: "PATH",
|
|
53
51
|
value: ""
|
|
54
52
|
};
|
|
55
|
-
function x(e
|
|
56
|
-
for (const t
|
|
57
|
-
if (!Object.prototype.hasOwnProperty.call(e
|
|
58
|
-
const n
|
|
59
|
-
if (!n
|
|
53
|
+
function x(e) {
|
|
54
|
+
for (const t in e) {
|
|
55
|
+
if (!Object.prototype.hasOwnProperty.call(e, t) || !y$3.test(t)) continue;
|
|
56
|
+
const n = e[t];
|
|
57
|
+
if (!n) return b;
|
|
60
58
|
return {
|
|
61
|
-
key: t
|
|
62
|
-
value: n
|
|
59
|
+
key: t,
|
|
60
|
+
value: n
|
|
63
61
|
};
|
|
64
62
|
}
|
|
65
63
|
return b;
|
|
66
64
|
}
|
|
67
|
-
function S$1(e
|
|
68
|
-
const i
|
|
69
|
-
let o
|
|
70
|
-
let s
|
|
65
|
+
function S$1(e, t) {
|
|
66
|
+
const i = t.value.split(delimiter);
|
|
67
|
+
let o = e;
|
|
68
|
+
let s;
|
|
71
69
|
do {
|
|
72
|
-
i
|
|
73
|
-
s
|
|
74
|
-
o
|
|
75
|
-
} while (o
|
|
70
|
+
i.push(resolve$1(o, "node_modules", ".bin"));
|
|
71
|
+
s = o;
|
|
72
|
+
o = dirname$1(o);
|
|
73
|
+
} while (o !== s);
|
|
76
74
|
return {
|
|
77
|
-
key: t
|
|
78
|
-
value: i
|
|
75
|
+
key: t.key,
|
|
76
|
+
value: i.join(delimiter)
|
|
79
77
|
};
|
|
80
78
|
}
|
|
81
|
-
function C$1(e
|
|
82
|
-
const n
|
|
79
|
+
function C$1(e, t) {
|
|
80
|
+
const n = {
|
|
83
81
|
...process.env,
|
|
84
|
-
...t
|
|
82
|
+
...t
|
|
85
83
|
};
|
|
86
|
-
const r = S$1(e
|
|
87
|
-
n
|
|
88
|
-
return n
|
|
84
|
+
const r = S$1(e, x(n));
|
|
85
|
+
n[r.key] = r.value;
|
|
86
|
+
return n;
|
|
89
87
|
}
|
|
90
|
-
const w$2 = (e
|
|
91
|
-
let t
|
|
92
|
-
const n
|
|
88
|
+
const w$2 = (e) => {
|
|
89
|
+
let t = e.length;
|
|
90
|
+
const n = new PassThrough();
|
|
93
91
|
const r = () => {
|
|
94
|
-
if (--t
|
|
92
|
+
if (--t === 0) n.emit("end");
|
|
95
93
|
};
|
|
96
|
-
for (const t
|
|
97
|
-
t
|
|
98
|
-
t
|
|
94
|
+
for (const t of e) {
|
|
95
|
+
t.pipe(n, { end: false });
|
|
96
|
+
t.on("end", r);
|
|
99
97
|
}
|
|
100
|
-
return n
|
|
98
|
+
return n;
|
|
101
99
|
};
|
|
102
|
-
var T$1 = h$1((exports, t
|
|
103
|
-
t
|
|
104
|
-
a
|
|
105
|
-
var n
|
|
106
|
-
function r(e
|
|
107
|
-
var n
|
|
108
|
-
if (!n
|
|
109
|
-
n
|
|
110
|
-
if (n
|
|
111
|
-
for (var r
|
|
112
|
-
var i
|
|
113
|
-
if (i
|
|
100
|
+
var T$1 = h$1((exports, t) => {
|
|
101
|
+
t.exports = a;
|
|
102
|
+
a.sync = o;
|
|
103
|
+
var n = v$2("fs");
|
|
104
|
+
function r(e, t) {
|
|
105
|
+
var n = t.pathExt !== void 0 ? t.pathExt : process.env.PATHEXT;
|
|
106
|
+
if (!n) return true;
|
|
107
|
+
n = n.split(";");
|
|
108
|
+
if (n.indexOf("") !== -1) return true;
|
|
109
|
+
for (var r = 0; r < n.length; r++) {
|
|
110
|
+
var i = n[r].toLowerCase();
|
|
111
|
+
if (i && e.substr(-i.length).toLowerCase() === i) return true;
|
|
114
112
|
}
|
|
115
113
|
return false;
|
|
116
114
|
}
|
|
117
|
-
function i
|
|
118
|
-
if (!e
|
|
119
|
-
return r(t
|
|
115
|
+
function i(e, t, n) {
|
|
116
|
+
if (!e.isSymbolicLink() && !e.isFile()) return false;
|
|
117
|
+
return r(t, n);
|
|
120
118
|
}
|
|
121
|
-
function a
|
|
122
|
-
n
|
|
123
|
-
r
|
|
119
|
+
function a(e, t, r) {
|
|
120
|
+
n.stat(e, function(n, a) {
|
|
121
|
+
r(n, n ? false : i(a, e, t));
|
|
124
122
|
});
|
|
125
123
|
}
|
|
126
|
-
function o
|
|
127
|
-
return i
|
|
124
|
+
function o(e, t) {
|
|
125
|
+
return i(n.statSync(e), e, t);
|
|
128
126
|
}
|
|
129
127
|
});
|
|
130
|
-
var E$1 = h$1((exports, t
|
|
131
|
-
t
|
|
132
|
-
r.sync = i
|
|
133
|
-
var n
|
|
134
|
-
function r(e
|
|
135
|
-
n
|
|
136
|
-
r
|
|
128
|
+
var E$1 = h$1((exports, t) => {
|
|
129
|
+
t.exports = r;
|
|
130
|
+
r.sync = i;
|
|
131
|
+
var n = v$2("fs");
|
|
132
|
+
function r(e, t, r) {
|
|
133
|
+
n.stat(e, function(e, n) {
|
|
134
|
+
r(e, e ? false : a(n, t));
|
|
137
135
|
});
|
|
138
136
|
}
|
|
139
|
-
function i
|
|
140
|
-
return a
|
|
137
|
+
function i(e, t) {
|
|
138
|
+
return a(n.statSync(e), t);
|
|
141
139
|
}
|
|
142
|
-
function a
|
|
143
|
-
return e
|
|
140
|
+
function a(e, t) {
|
|
141
|
+
return e.isFile() && o(e, t);
|
|
144
142
|
}
|
|
145
|
-
function o
|
|
146
|
-
var n
|
|
147
|
-
var r
|
|
148
|
-
var i
|
|
149
|
-
var a
|
|
150
|
-
var o
|
|
151
|
-
var s
|
|
152
|
-
var c
|
|
153
|
-
var l
|
|
154
|
-
var u
|
|
155
|
-
return n
|
|
143
|
+
function o(e, t) {
|
|
144
|
+
var n = e.mode;
|
|
145
|
+
var r = e.uid;
|
|
146
|
+
var i = e.gid;
|
|
147
|
+
var a = t.uid !== void 0 ? t.uid : process.getuid && process.getuid();
|
|
148
|
+
var o = t.gid !== void 0 ? t.gid : process.getgid && process.getgid();
|
|
149
|
+
var s = parseInt("100", 8);
|
|
150
|
+
var c = parseInt("010", 8);
|
|
151
|
+
var l = parseInt("001", 8);
|
|
152
|
+
var u = s | c;
|
|
153
|
+
return n & l || n & c && i === o || n & s && r === a || n & u && a === 0;
|
|
156
154
|
}
|
|
157
155
|
});
|
|
158
|
-
var D = h$1((exports, t
|
|
156
|
+
var D = h$1((exports, t) => {
|
|
159
157
|
v$2("fs");
|
|
160
158
|
var r;
|
|
161
159
|
if (process.platform === "win32" || global.TESTING_WINDOWS) r = T$1();
|
|
162
160
|
else r = E$1();
|
|
163
|
-
t
|
|
164
|
-
i
|
|
165
|
-
function i
|
|
166
|
-
if (typeof t
|
|
167
|
-
n
|
|
168
|
-
t
|
|
169
|
-
}
|
|
170
|
-
if (!n
|
|
161
|
+
t.exports = i;
|
|
162
|
+
i.sync = a;
|
|
163
|
+
function i(e, t, n) {
|
|
164
|
+
if (typeof t === "function") {
|
|
165
|
+
n = t;
|
|
166
|
+
t = {};
|
|
167
|
+
}
|
|
168
|
+
if (!n) {
|
|
171
169
|
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
172
|
-
return new Promise(function(n
|
|
173
|
-
i
|
|
174
|
-
if (e
|
|
175
|
-
else n
|
|
170
|
+
return new Promise(function(n, r) {
|
|
171
|
+
i(e, t || {}, function(e, t) {
|
|
172
|
+
if (e) r(e);
|
|
173
|
+
else n(t);
|
|
176
174
|
});
|
|
177
175
|
});
|
|
178
176
|
}
|
|
179
|
-
r(e
|
|
180
|
-
if (e
|
|
181
|
-
if (e
|
|
182
|
-
e
|
|
183
|
-
r
|
|
177
|
+
r(e, t || {}, function(e, r) {
|
|
178
|
+
if (e) {
|
|
179
|
+
if (e.code === "EACCES" || t && t.ignoreErrors) {
|
|
180
|
+
e = null;
|
|
181
|
+
r = false;
|
|
184
182
|
}
|
|
185
183
|
}
|
|
186
|
-
n
|
|
184
|
+
n(e, r);
|
|
187
185
|
});
|
|
188
186
|
}
|
|
189
|
-
function a
|
|
187
|
+
function a(e, t) {
|
|
190
188
|
try {
|
|
191
|
-
return r.sync(e
|
|
192
|
-
} catch (e
|
|
193
|
-
if (t
|
|
194
|
-
else throw e
|
|
189
|
+
return r.sync(e, t || {});
|
|
190
|
+
} catch (e) {
|
|
191
|
+
if (t && t.ignoreErrors || e.code === "EACCES") return false;
|
|
192
|
+
else throw e;
|
|
195
193
|
}
|
|
196
194
|
}
|
|
197
195
|
});
|
|
198
|
-
var O$3 = h$1((exports, t
|
|
199
|
-
const n
|
|
196
|
+
var O$3 = h$1((exports, t) => {
|
|
197
|
+
const n = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
200
198
|
const r = v$2("path");
|
|
201
|
-
const i
|
|
202
|
-
const a
|
|
203
|
-
const o
|
|
204
|
-
const s
|
|
205
|
-
const r
|
|
206
|
-
const a
|
|
207
|
-
const o
|
|
208
|
-
const s
|
|
209
|
-
if (n
|
|
210
|
-
if (e
|
|
199
|
+
const i = n ? ";" : ":";
|
|
200
|
+
const a = D();
|
|
201
|
+
const o = (e) => Object.assign(/* @__PURE__ */ new Error(`not found: ${e}`), { code: "ENOENT" });
|
|
202
|
+
const s = (e, t) => {
|
|
203
|
+
const r = t.colon || i;
|
|
204
|
+
const a = e.match(/\//) || n && e.match(/\\/) ? [""] : [...n ? [process.cwd()] : [], ...(t.path || process.env.PATH || "").split(r)];
|
|
205
|
+
const o = n ? t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
206
|
+
const s = n ? o.split(r) : [""];
|
|
207
|
+
if (n) {
|
|
208
|
+
if (e.indexOf(".") !== -1 && s[0] !== "") s.unshift("");
|
|
211
209
|
}
|
|
212
210
|
return {
|
|
213
|
-
pathEnv: a
|
|
214
|
-
pathExt: s
|
|
215
|
-
pathExtExe: o
|
|
211
|
+
pathEnv: a,
|
|
212
|
+
pathExt: s,
|
|
213
|
+
pathExtExe: o
|
|
216
214
|
};
|
|
217
215
|
};
|
|
218
|
-
const c
|
|
219
|
-
if (typeof t
|
|
220
|
-
n
|
|
221
|
-
t
|
|
222
|
-
}
|
|
223
|
-
if (!t
|
|
224
|
-
const { pathEnv: i
|
|
225
|
-
const u
|
|
226
|
-
const d = (n
|
|
227
|
-
if (n
|
|
228
|
-
const c
|
|
229
|
-
const l
|
|
230
|
-
const d
|
|
231
|
-
a
|
|
216
|
+
const c = (e, t, n) => {
|
|
217
|
+
if (typeof t === "function") {
|
|
218
|
+
n = t;
|
|
219
|
+
t = {};
|
|
220
|
+
}
|
|
221
|
+
if (!t) t = {};
|
|
222
|
+
const { pathEnv: i, pathExt: c, pathExtExe: l } = s(e, t);
|
|
223
|
+
const u = [];
|
|
224
|
+
const d = (n) => new Promise((a, s) => {
|
|
225
|
+
if (n === i.length) return t.all && u.length ? a(u) : s(o(e));
|
|
226
|
+
const c = i[n];
|
|
227
|
+
const l = /^".*"$/.test(c) ? c.slice(1, -1) : c;
|
|
228
|
+
const d = r.join(l, e);
|
|
229
|
+
a(f(!l && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + d : d, n, 0));
|
|
232
230
|
});
|
|
233
|
-
const f
|
|
234
|
-
if (r
|
|
235
|
-
const s
|
|
236
|
-
a
|
|
237
|
-
if (!a
|
|
238
|
-
else return i
|
|
239
|
-
return i
|
|
231
|
+
const f = (e, n, r) => new Promise((i, o) => {
|
|
232
|
+
if (r === c.length) return i(d(n + 1));
|
|
233
|
+
const s = c[r];
|
|
234
|
+
a(e + s, { pathExt: l }, (a, o) => {
|
|
235
|
+
if (!a && o) if (t.all) u.push(e + s);
|
|
236
|
+
else return i(e + s);
|
|
237
|
+
return i(f(e, n, r + 1));
|
|
240
238
|
});
|
|
241
239
|
});
|
|
242
|
-
return n
|
|
240
|
+
return n ? d(0).then((e) => n(null, e), n) : d(0);
|
|
243
241
|
};
|
|
244
|
-
const l
|
|
245
|
-
t
|
|
246
|
-
const { pathEnv: n
|
|
247
|
-
const l
|
|
248
|
-
for (let o
|
|
249
|
-
const s
|
|
250
|
-
const u
|
|
251
|
-
const d = r.join(u
|
|
252
|
-
const f
|
|
253
|
-
for (let e
|
|
254
|
-
const n
|
|
242
|
+
const l = (e, t) => {
|
|
243
|
+
t = t || {};
|
|
244
|
+
const { pathEnv: n, pathExt: i, pathExtExe: c } = s(e, t);
|
|
245
|
+
const l = [];
|
|
246
|
+
for (let o = 0; o < n.length; o++) {
|
|
247
|
+
const s = n[o];
|
|
248
|
+
const u = /^".*"$/.test(s) ? s.slice(1, -1) : s;
|
|
249
|
+
const d = r.join(u, e);
|
|
250
|
+
const f = !u && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + d : d;
|
|
251
|
+
for (let e = 0; e < i.length; e++) {
|
|
252
|
+
const n = f + i[e];
|
|
255
253
|
try {
|
|
256
|
-
if (a
|
|
257
|
-
else return n
|
|
258
|
-
} catch (e
|
|
254
|
+
if (a.sync(n, { pathExt: c })) if (t.all) l.push(n);
|
|
255
|
+
else return n;
|
|
256
|
+
} catch (e) {}
|
|
259
257
|
}
|
|
260
258
|
}
|
|
261
|
-
if (t
|
|
262
|
-
if (t
|
|
263
|
-
throw o
|
|
259
|
+
if (t.all && l.length) return l;
|
|
260
|
+
if (t.nothrow) return null;
|
|
261
|
+
throw o(e);
|
|
264
262
|
};
|
|
265
|
-
t
|
|
266
|
-
c
|
|
263
|
+
t.exports = c;
|
|
264
|
+
c.sync = l;
|
|
267
265
|
});
|
|
268
|
-
var k$1 = h$1((exports, t
|
|
269
|
-
const n
|
|
270
|
-
const t
|
|
271
|
-
if ((e
|
|
272
|
-
return Object.keys(t
|
|
266
|
+
var k$1 = h$1((exports, t) => {
|
|
267
|
+
const n = (e = {}) => {
|
|
268
|
+
const t = e.env || process.env;
|
|
269
|
+
if ((e.platform || process.platform) !== "win32") return "PATH";
|
|
270
|
+
return Object.keys(t).reverse().find((e) => e.toUpperCase() === "PATH") || "Path";
|
|
273
271
|
};
|
|
274
|
-
t
|
|
275
|
-
t
|
|
272
|
+
t.exports = n;
|
|
273
|
+
t.exports.default = n;
|
|
276
274
|
});
|
|
277
|
-
var A = h$1((exports, t
|
|
278
|
-
const n
|
|
275
|
+
var A = h$1((exports, t) => {
|
|
276
|
+
const n = v$2("path");
|
|
279
277
|
const r = O$3();
|
|
280
|
-
const i
|
|
281
|
-
function a
|
|
282
|
-
const a
|
|
283
|
-
const o
|
|
284
|
-
const s
|
|
285
|
-
const c
|
|
286
|
-
if (c
|
|
287
|
-
process.chdir(e
|
|
288
|
-
} catch (e
|
|
289
|
-
let l
|
|
278
|
+
const i = k$1();
|
|
279
|
+
function a(e, t) {
|
|
280
|
+
const a = e.options.env || process.env;
|
|
281
|
+
const o = process.cwd();
|
|
282
|
+
const s = e.options.cwd != null;
|
|
283
|
+
const c = s && process.chdir !== void 0 && !process.chdir.disabled;
|
|
284
|
+
if (c) try {
|
|
285
|
+
process.chdir(e.options.cwd);
|
|
286
|
+
} catch (e) {}
|
|
287
|
+
let l;
|
|
290
288
|
try {
|
|
291
|
-
l
|
|
292
|
-
path: a
|
|
293
|
-
pathExt: t
|
|
289
|
+
l = r.sync(e.command, {
|
|
290
|
+
path: a[i({ env: a })],
|
|
291
|
+
pathExt: t ? n.delimiter : void 0
|
|
294
292
|
});
|
|
295
|
-
} catch (e
|
|
296
|
-
if (c
|
|
293
|
+
} catch (e) {} finally {
|
|
294
|
+
if (c) process.chdir(o);
|
|
297
295
|
}
|
|
298
|
-
if (l
|
|
299
|
-
return l
|
|
296
|
+
if (l) l = n.resolve(s ? e.options.cwd : "", l);
|
|
297
|
+
return l;
|
|
300
298
|
}
|
|
301
|
-
function o
|
|
302
|
-
return a
|
|
299
|
+
function o(e) {
|
|
300
|
+
return a(e) || a(e, true);
|
|
303
301
|
}
|
|
304
|
-
t
|
|
302
|
+
t.exports = o;
|
|
305
303
|
});
|
|
306
|
-
var j$2 = h$1((exports, t
|
|
307
|
-
const n
|
|
308
|
-
function r(e
|
|
309
|
-
e
|
|
310
|
-
return e
|
|
311
|
-
}
|
|
312
|
-
function i
|
|
313
|
-
e
|
|
314
|
-
e
|
|
315
|
-
e
|
|
316
|
-
e
|
|
317
|
-
e
|
|
318
|
-
if (t
|
|
319
|
-
return e
|
|
320
|
-
}
|
|
321
|
-
t
|
|
322
|
-
t
|
|
304
|
+
var j$2 = h$1((exports, t) => {
|
|
305
|
+
const n = /([()\][%!^"`<>&|;, *?])/g;
|
|
306
|
+
function r(e) {
|
|
307
|
+
e = e.replace(n, "^$1");
|
|
308
|
+
return e;
|
|
309
|
+
}
|
|
310
|
+
function i(e, t) {
|
|
311
|
+
e = `${e}`;
|
|
312
|
+
e = e.replace(/(\\*)"/g, "$1$1\\\"");
|
|
313
|
+
e = e.replace(/(\\*)$/, "$1$1");
|
|
314
|
+
e = `"${e}"`;
|
|
315
|
+
e = e.replace(n, "^$1");
|
|
316
|
+
if (t) e = e.replace(n, "^$1");
|
|
317
|
+
return e;
|
|
318
|
+
}
|
|
319
|
+
t.exports.command = r;
|
|
320
|
+
t.exports.argument = i;
|
|
323
321
|
});
|
|
324
|
-
var M = h$1((exports, t
|
|
325
|
-
t
|
|
322
|
+
var M = h$1((exports, t) => {
|
|
323
|
+
t.exports = /^#!(.*)/;
|
|
326
324
|
});
|
|
327
|
-
var N = h$1((exports, t
|
|
328
|
-
const n
|
|
329
|
-
t
|
|
330
|
-
const t
|
|
331
|
-
if (!t
|
|
332
|
-
const [r, i
|
|
333
|
-
const a
|
|
334
|
-
if (a
|
|
335
|
-
return i
|
|
325
|
+
var N = h$1((exports, t) => {
|
|
326
|
+
const n = M();
|
|
327
|
+
t.exports = (e = "") => {
|
|
328
|
+
const t = e.match(n);
|
|
329
|
+
if (!t) return null;
|
|
330
|
+
const [r, i] = t[0].replace(/#! ?/, "").split(" ");
|
|
331
|
+
const a = r.split("/").pop();
|
|
332
|
+
if (a === "env") return i;
|
|
333
|
+
return i ? `${a} ${i}` : a;
|
|
336
334
|
};
|
|
337
335
|
});
|
|
338
|
-
var P$1 = h$1((exports, t
|
|
339
|
-
const n
|
|
336
|
+
var P$1 = h$1((exports, t) => {
|
|
337
|
+
const n = v$2("fs");
|
|
340
338
|
const r = N();
|
|
341
|
-
function i
|
|
342
|
-
const t
|
|
343
|
-
const i
|
|
344
|
-
let a
|
|
339
|
+
function i(e) {
|
|
340
|
+
const t = 150;
|
|
341
|
+
const i = Buffer.alloc(t);
|
|
342
|
+
let a;
|
|
345
343
|
try {
|
|
346
|
-
a
|
|
347
|
-
n
|
|
348
|
-
n
|
|
349
|
-
} catch (e
|
|
350
|
-
return r(i
|
|
344
|
+
a = n.openSync(e, "r");
|
|
345
|
+
n.readSync(a, i, 0, t, 0);
|
|
346
|
+
n.closeSync(a);
|
|
347
|
+
} catch (e) {}
|
|
348
|
+
return r(i.toString());
|
|
351
349
|
}
|
|
352
|
-
t
|
|
350
|
+
t.exports = i;
|
|
353
351
|
});
|
|
354
|
-
var F$3 = h$1((exports, t
|
|
355
|
-
const n
|
|
352
|
+
var F$3 = h$1((exports, t) => {
|
|
353
|
+
const n = v$2("path");
|
|
356
354
|
const r = A();
|
|
357
|
-
const i
|
|
358
|
-
const a
|
|
359
|
-
const o
|
|
360
|
-
const s
|
|
361
|
-
const c
|
|
362
|
-
function l
|
|
363
|
-
e
|
|
364
|
-
const t
|
|
365
|
-
if (t
|
|
366
|
-
e
|
|
367
|
-
e
|
|
368
|
-
return r(e
|
|
369
|
-
}
|
|
370
|
-
return e
|
|
371
|
-
}
|
|
372
|
-
function u
|
|
373
|
-
if (!o
|
|
374
|
-
const t
|
|
375
|
-
const r
|
|
376
|
-
if (e
|
|
377
|
-
const r
|
|
378
|
-
e
|
|
379
|
-
e
|
|
380
|
-
e
|
|
381
|
-
e
|
|
355
|
+
const i = j$2();
|
|
356
|
+
const a = P$1();
|
|
357
|
+
const o = process.platform === "win32";
|
|
358
|
+
const s = /\.(?:com|exe)$/i;
|
|
359
|
+
const c = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
360
|
+
function l(e) {
|
|
361
|
+
e.file = r(e);
|
|
362
|
+
const t = e.file && a(e.file);
|
|
363
|
+
if (t) {
|
|
364
|
+
e.args.unshift(e.file);
|
|
365
|
+
e.command = t;
|
|
366
|
+
return r(e);
|
|
367
|
+
}
|
|
368
|
+
return e.file;
|
|
369
|
+
}
|
|
370
|
+
function u(e) {
|
|
371
|
+
if (!o) return e;
|
|
372
|
+
const t = l(e);
|
|
373
|
+
const r = !s.test(t);
|
|
374
|
+
if (e.options.forceShell || r) {
|
|
375
|
+
const r = c.test(t);
|
|
376
|
+
e.command = n.normalize(e.command);
|
|
377
|
+
e.command = i.command(e.command);
|
|
378
|
+
e.args = e.args.map((e) => i.argument(e, r));
|
|
379
|
+
e.args = [
|
|
382
380
|
"/d",
|
|
383
381
|
"/s",
|
|
384
382
|
"/c",
|
|
385
|
-
`"${[e
|
|
383
|
+
`"${[e.command].concat(e.args).join(" ")}"`
|
|
386
384
|
];
|
|
387
|
-
e
|
|
388
|
-
e
|
|
389
|
-
}
|
|
390
|
-
return e
|
|
391
|
-
}
|
|
392
|
-
function d(e
|
|
393
|
-
if (t
|
|
394
|
-
n
|
|
395
|
-
t
|
|
396
|
-
}
|
|
397
|
-
t
|
|
398
|
-
n
|
|
399
|
-
const r
|
|
400
|
-
command: e
|
|
401
|
-
args: t
|
|
402
|
-
options: n
|
|
385
|
+
e.command = process.env.comspec || "cmd.exe";
|
|
386
|
+
e.options.windowsVerbatimArguments = true;
|
|
387
|
+
}
|
|
388
|
+
return e;
|
|
389
|
+
}
|
|
390
|
+
function d(e, t, n) {
|
|
391
|
+
if (t && !Array.isArray(t)) {
|
|
392
|
+
n = t;
|
|
393
|
+
t = null;
|
|
394
|
+
}
|
|
395
|
+
t = t ? t.slice(0) : [];
|
|
396
|
+
n = Object.assign({}, n);
|
|
397
|
+
const r = {
|
|
398
|
+
command: e,
|
|
399
|
+
args: t,
|
|
400
|
+
options: n,
|
|
403
401
|
file: void 0,
|
|
404
402
|
original: {
|
|
405
|
-
command: e
|
|
406
|
-
args: t
|
|
403
|
+
command: e,
|
|
404
|
+
args: t
|
|
407
405
|
}
|
|
408
406
|
};
|
|
409
|
-
return n
|
|
407
|
+
return n.shell ? r : u(r);
|
|
410
408
|
}
|
|
411
|
-
t
|
|
409
|
+
t.exports = d;
|
|
412
410
|
});
|
|
413
|
-
var I = h$1((exports, t
|
|
414
|
-
const n
|
|
415
|
-
function r(e
|
|
416
|
-
return Object.assign(/* @__PURE__ */ new Error(`${t
|
|
411
|
+
var I = h$1((exports, t) => {
|
|
412
|
+
const n = process.platform === "win32";
|
|
413
|
+
function r(e, t) {
|
|
414
|
+
return Object.assign(/* @__PURE__ */ new Error(`${t} ${e.command} ENOENT`), {
|
|
417
415
|
code: "ENOENT",
|
|
418
416
|
errno: "ENOENT",
|
|
419
|
-
syscall: `${t
|
|
420
|
-
path: e
|
|
421
|
-
spawnargs: e
|
|
417
|
+
syscall: `${t} ${e.command}`,
|
|
418
|
+
path: e.command,
|
|
419
|
+
spawnargs: e.args
|
|
422
420
|
});
|
|
423
421
|
}
|
|
424
|
-
function i
|
|
425
|
-
if (!n
|
|
426
|
-
const r
|
|
427
|
-
e
|
|
428
|
-
if (n
|
|
429
|
-
const n
|
|
430
|
-
if (n
|
|
422
|
+
function i(e, t) {
|
|
423
|
+
if (!n) return;
|
|
424
|
+
const r = e.emit;
|
|
425
|
+
e.emit = function(n, i) {
|
|
426
|
+
if (n === "exit") {
|
|
427
|
+
const n = a(i, t, "spawn");
|
|
428
|
+
if (n) return r.call(e, "error", n);
|
|
431
429
|
}
|
|
432
|
-
return r
|
|
430
|
+
return r.apply(e, arguments);
|
|
433
431
|
};
|
|
434
432
|
}
|
|
435
|
-
function a
|
|
436
|
-
if (n
|
|
433
|
+
function a(e, t) {
|
|
434
|
+
if (n && e === 1 && !t.file) return r(t.original, "spawn");
|
|
437
435
|
return null;
|
|
438
436
|
}
|
|
439
|
-
function o
|
|
440
|
-
if (n
|
|
437
|
+
function o(e, t) {
|
|
438
|
+
if (n && e === 1 && !t.file) return r(t.original, "spawnSync");
|
|
441
439
|
return null;
|
|
442
440
|
}
|
|
443
|
-
t
|
|
444
|
-
hookChildProcess: i
|
|
445
|
-
verifyENOENT: a
|
|
446
|
-
verifyENOENTSync: o
|
|
441
|
+
t.exports = {
|
|
442
|
+
hookChildProcess: i,
|
|
443
|
+
verifyENOENT: a,
|
|
444
|
+
verifyENOENTSync: o,
|
|
447
445
|
notFoundError: r
|
|
448
446
|
};
|
|
449
447
|
});
|
|
450
|
-
var R$2 = _$1(h$1((exports, t
|
|
451
|
-
const n
|
|
448
|
+
var R$2 = _$1(h$1((exports, t) => {
|
|
449
|
+
const n = v$2("child_process");
|
|
452
450
|
const r = F$3();
|
|
453
|
-
const i
|
|
454
|
-
function a
|
|
455
|
-
const o
|
|
456
|
-
const s
|
|
457
|
-
i
|
|
458
|
-
return s
|
|
459
|
-
}
|
|
460
|
-
function o
|
|
461
|
-
const o
|
|
462
|
-
const s
|
|
463
|
-
s
|
|
464
|
-
return s
|
|
465
|
-
}
|
|
466
|
-
t
|
|
467
|
-
t
|
|
468
|
-
t
|
|
469
|
-
t
|
|
470
|
-
t
|
|
451
|
+
const i = I();
|
|
452
|
+
function a(e, t, a) {
|
|
453
|
+
const o = r(e, t, a);
|
|
454
|
+
const s = n.spawn(o.command, o.args, o.options);
|
|
455
|
+
i.hookChildProcess(s, o);
|
|
456
|
+
return s;
|
|
457
|
+
}
|
|
458
|
+
function o(e, t, a) {
|
|
459
|
+
const o = r(e, t, a);
|
|
460
|
+
const s = n.spawnSync(o.command, o.args, o.options);
|
|
461
|
+
s.error = s.error || i.verifyENOENTSync(s.status, o);
|
|
462
|
+
return s;
|
|
463
|
+
}
|
|
464
|
+
t.exports = a;
|
|
465
|
+
t.exports.spawn = a;
|
|
466
|
+
t.exports.sync = o;
|
|
467
|
+
t.exports._parse = r;
|
|
468
|
+
t.exports._enoent = i;
|
|
471
469
|
})(), 1);
|
|
472
470
|
var z$1 = class extends Error {
|
|
473
471
|
result;
|
|
@@ -475,10 +473,10 @@ var z$1 = class extends Error {
|
|
|
475
473
|
get exitCode() {
|
|
476
474
|
if (this.result.exitCode !== null) return this.result.exitCode;
|
|
477
475
|
}
|
|
478
|
-
constructor(e
|
|
479
|
-
super(`Process exited with non-zero status (${e
|
|
480
|
-
this.result = e
|
|
481
|
-
this.output = t
|
|
476
|
+
constructor(e, t) {
|
|
477
|
+
super(`Process exited with non-zero status (${e.exitCode})`);
|
|
478
|
+
this.result = e;
|
|
479
|
+
this.output = t;
|
|
482
480
|
}
|
|
483
481
|
};
|
|
484
482
|
const B = {
|
|
@@ -486,30 +484,30 @@ const B = {
|
|
|
486
484
|
persist: false
|
|
487
485
|
};
|
|
488
486
|
const V = { windowsHide: true };
|
|
489
|
-
function H$2(e
|
|
487
|
+
function H$2(e, t) {
|
|
490
488
|
return {
|
|
491
|
-
command: normalize$1(e
|
|
492
|
-
args: t
|
|
489
|
+
command: normalize$1(e),
|
|
490
|
+
args: t ?? []
|
|
493
491
|
};
|
|
494
492
|
}
|
|
495
|
-
function U(e
|
|
496
|
-
const t
|
|
497
|
-
for (const n
|
|
498
|
-
if (n
|
|
499
|
-
t
|
|
500
|
-
return n
|
|
501
|
-
}
|
|
502
|
-
const e
|
|
503
|
-
t
|
|
493
|
+
function U(e) {
|
|
494
|
+
const t = new AbortController();
|
|
495
|
+
for (const n of e) {
|
|
496
|
+
if (n.aborted) {
|
|
497
|
+
t.abort();
|
|
498
|
+
return n;
|
|
499
|
+
}
|
|
500
|
+
const e = () => {
|
|
501
|
+
t.abort(n.reason);
|
|
504
502
|
};
|
|
505
|
-
n
|
|
503
|
+
n.addEventListener("abort", e, { signal: t.signal });
|
|
506
504
|
}
|
|
507
|
-
return t
|
|
505
|
+
return t.signal;
|
|
508
506
|
}
|
|
509
|
-
async function W(e
|
|
510
|
-
let t
|
|
511
|
-
for await (const n
|
|
512
|
-
return t
|
|
507
|
+
async function W(e) {
|
|
508
|
+
let t = "";
|
|
509
|
+
for await (const n of e) t += n.toString();
|
|
510
|
+
return t;
|
|
513
511
|
}
|
|
514
512
|
var G$1 = class {
|
|
515
513
|
_process;
|
|
@@ -529,19 +527,19 @@ var G$1 = class {
|
|
|
529
527
|
get exitCode() {
|
|
530
528
|
if (this._process && this._process.exitCode !== null) return this._process.exitCode;
|
|
531
529
|
}
|
|
532
|
-
constructor(e
|
|
530
|
+
constructor(e, t, n) {
|
|
533
531
|
this._options = {
|
|
534
532
|
...B,
|
|
535
|
-
...n
|
|
533
|
+
...n
|
|
536
534
|
};
|
|
537
|
-
this._command = e
|
|
538
|
-
this._args = t
|
|
539
|
-
this._processClosed = new Promise((e
|
|
540
|
-
this._resolveClose = e
|
|
535
|
+
this._command = e;
|
|
536
|
+
this._args = t ?? [];
|
|
537
|
+
this._processClosed = new Promise((e) => {
|
|
538
|
+
this._resolveClose = e;
|
|
541
539
|
});
|
|
542
540
|
}
|
|
543
|
-
kill(e
|
|
544
|
-
return this._process?.kill(e
|
|
541
|
+
kill(e) {
|
|
542
|
+
return this._process?.kill(e) === true;
|
|
545
543
|
}
|
|
546
544
|
get aborted() {
|
|
547
545
|
return this._aborted;
|
|
@@ -549,101 +547,98 @@ var G$1 = class {
|
|
|
549
547
|
get killed() {
|
|
550
548
|
return this._process?.killed === true;
|
|
551
549
|
}
|
|
552
|
-
pipe(e
|
|
553
|
-
return q$1(e
|
|
554
|
-
...n
|
|
550
|
+
pipe(e, t, n) {
|
|
551
|
+
return q$1(e, t, {
|
|
552
|
+
...n,
|
|
555
553
|
stdin: this
|
|
556
554
|
});
|
|
557
555
|
}
|
|
558
556
|
async *[Symbol.asyncIterator]() {
|
|
559
|
-
const e
|
|
560
|
-
if (!e
|
|
561
|
-
const t
|
|
562
|
-
if (this._streamErr) t
|
|
563
|
-
if (this._streamOut) t
|
|
564
|
-
const n
|
|
565
|
-
const r = c.createInterface({ input: n
|
|
566
|
-
for await (const e
|
|
557
|
+
const e = this._process;
|
|
558
|
+
if (!e) return;
|
|
559
|
+
const t = [];
|
|
560
|
+
if (this._streamErr) t.push(this._streamErr);
|
|
561
|
+
if (this._streamOut) t.push(this._streamOut);
|
|
562
|
+
const n = w$2(t);
|
|
563
|
+
const r = c.createInterface({ input: n });
|
|
564
|
+
for await (const e of r) yield e.toString();
|
|
567
565
|
await this._processClosed;
|
|
568
|
-
e
|
|
566
|
+
e.removeAllListeners();
|
|
569
567
|
if (this._thrownError) throw this._thrownError;
|
|
570
568
|
if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new z$1(this);
|
|
571
569
|
}
|
|
572
570
|
async _waitForOutput() {
|
|
573
|
-
const e
|
|
574
|
-
if (!e
|
|
575
|
-
const [t
|
|
571
|
+
const e = this._process;
|
|
572
|
+
if (!e) throw new Error("No process was started");
|
|
573
|
+
const [t, n] = await Promise.all([this._streamOut ? W(this._streamOut) : "", this._streamErr ? W(this._streamErr) : ""]);
|
|
576
574
|
await this._processClosed;
|
|
577
575
|
if (this._options?.stdin) await this._options.stdin;
|
|
578
|
-
e
|
|
576
|
+
e.removeAllListeners();
|
|
579
577
|
if (this._thrownError) throw this._thrownError;
|
|
580
578
|
const r = {
|
|
581
|
-
stderr: n
|
|
582
|
-
stdout: t
|
|
579
|
+
stderr: n,
|
|
580
|
+
stdout: t,
|
|
583
581
|
exitCode: this.exitCode
|
|
584
582
|
};
|
|
585
583
|
if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new z$1(this, r);
|
|
586
584
|
return r;
|
|
587
585
|
}
|
|
588
|
-
then(e
|
|
589
|
-
return this._waitForOutput().then(e
|
|
586
|
+
then(e, t) {
|
|
587
|
+
return this._waitForOutput().then(e, t);
|
|
590
588
|
}
|
|
591
589
|
_streamOut;
|
|
592
590
|
_streamErr;
|
|
593
591
|
spawn() {
|
|
594
|
-
const e
|
|
595
|
-
const n
|
|
592
|
+
const e = cwd();
|
|
593
|
+
const n = this._options;
|
|
596
594
|
const r = {
|
|
597
595
|
...V,
|
|
598
|
-
...n
|
|
596
|
+
...n.nodeOptions
|
|
599
597
|
};
|
|
600
|
-
const i
|
|
598
|
+
const i = [];
|
|
601
599
|
this._resetState();
|
|
602
|
-
if (n
|
|
603
|
-
if (n
|
|
604
|
-
if (n
|
|
605
|
-
if (i
|
|
606
|
-
r.env = C$1(e
|
|
607
|
-
const { command: a
|
|
608
|
-
const c
|
|
609
|
-
const l
|
|
610
|
-
if (l
|
|
611
|
-
if (l
|
|
612
|
-
this._process = l
|
|
613
|
-
l
|
|
614
|
-
l
|
|
615
|
-
if (n
|
|
616
|
-
const { stdout: e
|
|
617
|
-
if (e
|
|
600
|
+
if (n.timeout !== void 0) i.push(AbortSignal.timeout(n.timeout));
|
|
601
|
+
if (n.signal !== void 0) i.push(n.signal);
|
|
602
|
+
if (n.persist === true) r.detached = true;
|
|
603
|
+
if (i.length > 0) r.signal = U(i);
|
|
604
|
+
r.env = C$1(e, r.env);
|
|
605
|
+
const { command: a, args: s } = H$2(this._command, this._args);
|
|
606
|
+
const c = (0, R$2._parse)(a, s, r);
|
|
607
|
+
const l = spawn(c.command, c.args, c.options);
|
|
608
|
+
if (l.stderr) this._streamErr = l.stderr;
|
|
609
|
+
if (l.stdout) this._streamOut = l.stdout;
|
|
610
|
+
this._process = l;
|
|
611
|
+
l.once("error", this._onError);
|
|
612
|
+
l.once("close", this._onClose);
|
|
613
|
+
if (n.stdin !== void 0 && l.stdin && n.stdin.process) {
|
|
614
|
+
const { stdout: e } = n.stdin.process;
|
|
615
|
+
if (e) e.pipe(l.stdin);
|
|
618
616
|
}
|
|
619
617
|
}
|
|
620
618
|
_resetState() {
|
|
621
619
|
this._aborted = false;
|
|
622
|
-
this._processClosed = new Promise((e
|
|
623
|
-
this._resolveClose = e
|
|
620
|
+
this._processClosed = new Promise((e) => {
|
|
621
|
+
this._resolveClose = e;
|
|
624
622
|
});
|
|
625
623
|
this._thrownError = void 0;
|
|
626
624
|
}
|
|
627
|
-
_onError = (e
|
|
628
|
-
if (e
|
|
625
|
+
_onError = (e) => {
|
|
626
|
+
if (e.name === "AbortError" && (!(e.cause instanceof Error) || e.cause.name !== "TimeoutError")) {
|
|
629
627
|
this._aborted = true;
|
|
630
628
|
return;
|
|
631
629
|
}
|
|
632
|
-
this._thrownError = e
|
|
630
|
+
this._thrownError = e;
|
|
633
631
|
};
|
|
634
632
|
_onClose = () => {
|
|
635
633
|
if (this._resolveClose) this._resolveClose();
|
|
636
634
|
};
|
|
637
635
|
};
|
|
638
|
-
const K = (e
|
|
639
|
-
const r = new G$1(e
|
|
636
|
+
const K = (e, t, n) => {
|
|
637
|
+
const r = new G$1(e, t, n);
|
|
640
638
|
r.spawn();
|
|
641
639
|
return r;
|
|
642
640
|
};
|
|
643
641
|
const q$1 = K;
|
|
644
|
-
|
|
645
|
-
//#endregion
|
|
646
|
-
//#region node_modules/.pnpm/nypm@0.6.4/node_modules/nypm/dist/index.mjs
|
|
647
642
|
var dist_exports$1 = /* @__PURE__ */ __exportAll({
|
|
648
643
|
addDependency: () => addDependency,
|
|
649
644
|
addDevDependency: () => addDevDependency,
|
|
@@ -651,28 +646,28 @@ var dist_exports$1 = /* @__PURE__ */ __exportAll({
|
|
|
651
646
|
installDependencies: () => installDependencies,
|
|
652
647
|
packageManagers: () => packageManagers
|
|
653
648
|
});
|
|
654
|
-
async function findup(cwd
|
|
655
|
-
const segments = normalize$2(cwd
|
|
649
|
+
async function findup(cwd, match, options = {}) {
|
|
650
|
+
const segments = normalize$2(cwd).split("/");
|
|
656
651
|
while (segments.length > 0) {
|
|
657
652
|
const result = await match(segments.join("/") || "/");
|
|
658
653
|
if (result || !options.includeParentDirs) return result;
|
|
659
654
|
segments.pop();
|
|
660
655
|
}
|
|
661
656
|
}
|
|
662
|
-
async function readPackageJSON(cwd
|
|
663
|
-
return findup(cwd
|
|
664
|
-
const pkgPath = join$1(p
|
|
657
|
+
async function readPackageJSON(cwd) {
|
|
658
|
+
return findup(cwd, (p) => {
|
|
659
|
+
const pkgPath = join$1(p, "package.json");
|
|
665
660
|
if (existsSync(pkgPath)) return readFile(pkgPath, "utf8").then((data) => JSON.parse(data));
|
|
666
661
|
});
|
|
667
662
|
}
|
|
668
663
|
function cached(fn) {
|
|
669
|
-
let v
|
|
664
|
+
let v;
|
|
670
665
|
return () => {
|
|
671
|
-
if (v
|
|
672
|
-
v
|
|
673
|
-
return v
|
|
666
|
+
if (v === void 0) v = fn().then((r) => {
|
|
667
|
+
v = r;
|
|
668
|
+
return v;
|
|
674
669
|
});
|
|
675
|
-
return v
|
|
670
|
+
return v;
|
|
676
671
|
};
|
|
677
672
|
}
|
|
678
673
|
const hasCorepack = cached(async () => {
|
|
@@ -699,7 +694,7 @@ async function executeCommand(command, args, options = {}) {
|
|
|
699
694
|
}
|
|
700
695
|
const NO_PACKAGE_MANAGER_DETECTED_ERROR_MSG = "No package manager auto-detected.";
|
|
701
696
|
async function resolveOperationOptions(options = {}) {
|
|
702
|
-
const cwd
|
|
697
|
+
const cwd = options.cwd || process.cwd();
|
|
703
698
|
const env = {
|
|
704
699
|
...process.env,
|
|
705
700
|
...options.env
|
|
@@ -707,7 +702,7 @@ async function resolveOperationOptions(options = {}) {
|
|
|
707
702
|
const packageManager = (typeof options.packageManager === "string" ? packageManagers.find((pm) => pm.name === options.packageManager) : options.packageManager) || await detectPackageManager(options.cwd || process.cwd());
|
|
708
703
|
if (!packageManager) throw new Error(NO_PACKAGE_MANAGER_DETECTED_ERROR_MSG);
|
|
709
704
|
return {
|
|
710
|
-
cwd
|
|
705
|
+
cwd,
|
|
711
706
|
env,
|
|
712
707
|
silent: options.silent ?? false,
|
|
713
708
|
packageManager,
|
|
@@ -773,17 +768,10 @@ const packageManagers = [
|
|
|
773
768
|
files: ["deno.json"]
|
|
774
769
|
}
|
|
775
770
|
];
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
*
|
|
779
|
-
* 1. Use `packageManager` field from package.json
|
|
780
|
-
*
|
|
781
|
-
* 2. Known lock files and other files
|
|
782
|
-
*/
|
|
783
|
-
async function detectPackageManager(cwd$1, options = {}) {
|
|
784
|
-
const detected = await findup(resolve$2(cwd$1 || "."), async (path$2) => {
|
|
771
|
+
async function detectPackageManager(cwd, options = {}) {
|
|
772
|
+
const detected = await findup(resolve$2(cwd || "."), async (path) => {
|
|
785
773
|
if (!options.ignorePackageJSON) {
|
|
786
|
-
const packageJSONPath = join$2(path
|
|
774
|
+
const packageJSONPath = join$2(path, "package.json");
|
|
787
775
|
if (existsSync(packageJSONPath)) {
|
|
788
776
|
const packageJSON = JSON.parse(await readFile(packageJSONPath, "utf8"));
|
|
789
777
|
if (packageJSON?.packageManager) {
|
|
@@ -804,10 +792,10 @@ async function detectPackageManager(cwd$1, options = {}) {
|
|
|
804
792
|
}
|
|
805
793
|
}
|
|
806
794
|
}
|
|
807
|
-
if (existsSync(join$2(path
|
|
795
|
+
if (existsSync(join$2(path, "deno.json"))) return packageManagers.find((pm) => pm.name === "deno");
|
|
808
796
|
}
|
|
809
797
|
if (!options.ignoreLockFile) {
|
|
810
|
-
for (const packageManager of packageManagers) if ([packageManager.lockFile, packageManager.files].flat().filter(Boolean).some((file) => existsSync(resolve$2(path
|
|
798
|
+
for (const packageManager of packageManagers) if ([packageManager.lockFile, packageManager.files].flat().filter(Boolean).some((file) => existsSync(resolve$2(path, file)))) return { ...packageManager };
|
|
811
799
|
}
|
|
812
800
|
}, { includeParentDirs: options.includeParentDirs ?? true });
|
|
813
801
|
if (!detected && !options.ignoreArgv) {
|
|
@@ -818,15 +806,6 @@ async function detectPackageManager(cwd$1, options = {}) {
|
|
|
818
806
|
}
|
|
819
807
|
return detected;
|
|
820
808
|
}
|
|
821
|
-
/**
|
|
822
|
-
* Installs project dependencies.
|
|
823
|
-
*
|
|
824
|
-
* @param options - Options to pass to the API call.
|
|
825
|
-
* @param options.cwd - The directory to run the command in.
|
|
826
|
-
* @param options.silent - Whether to run the command in silent mode.
|
|
827
|
-
* @param options.packageManager - The package manager info to use (auto-detected).
|
|
828
|
-
* @param options.frozenLockFile - Whether to install dependencies with frozen lock file.
|
|
829
|
-
*/
|
|
830
809
|
async function installDependencies(options = {}) {
|
|
831
810
|
const resolvedOptions = await resolveOperationOptions(options);
|
|
832
811
|
const commandArgs = options.frozenLockFile ? {
|
|
@@ -847,23 +826,11 @@ async function installDependencies(options = {}) {
|
|
|
847
826
|
args: commandArgs
|
|
848
827
|
} };
|
|
849
828
|
}
|
|
850
|
-
/**
|
|
851
|
-
* Adds dependency to the project.
|
|
852
|
-
*
|
|
853
|
-
* @param name - Name of the dependency to add.
|
|
854
|
-
* @param options - Options to pass to the API call.
|
|
855
|
-
* @param options.cwd - The directory to run the command in.
|
|
856
|
-
* @param options.silent - Whether to run the command in silent mode.
|
|
857
|
-
* @param options.packageManager - The package manager info to use (auto-detected).
|
|
858
|
-
* @param options.dev - Whether to add the dependency as dev dependency.
|
|
859
|
-
* @param options.workspace - The name of the workspace to use.
|
|
860
|
-
* @param options.global - Whether to run the command in global mode.
|
|
861
|
-
*/
|
|
862
829
|
async function addDependency(name, options = {}) {
|
|
863
830
|
const resolvedOptions = await resolveOperationOptions(options);
|
|
864
831
|
const names = Array.isArray(name) ? name : [name];
|
|
865
832
|
if (resolvedOptions.packageManager.name === "deno") {
|
|
866
|
-
for (let i
|
|
833
|
+
for (let i = 0; i < names.length; i++) if (!/^(npm|jsr|file):.+$/.test(names[i] || "")) names[i] = `npm:${names[i]}`;
|
|
867
834
|
}
|
|
868
835
|
if (names.length === 0) return {};
|
|
869
836
|
const args = (resolvedOptions.packageManager.name === "yarn" ? [
|
|
@@ -906,36 +873,25 @@ async function addDependency(name, options = {}) {
|
|
|
906
873
|
args
|
|
907
874
|
} };
|
|
908
875
|
}
|
|
909
|
-
/**
|
|
910
|
-
* Adds dev dependency to the project.
|
|
911
|
-
*
|
|
912
|
-
* @param name - Name of the dev dependency to add.
|
|
913
|
-
* @param options - Options to pass to the API call.
|
|
914
|
-
* @param options.cwd - The directory to run the command in.
|
|
915
|
-
* @param options.silent - Whether to run the command in silent mode.
|
|
916
|
-
* @param options.packageManager - The package manager info to use (auto-detected).
|
|
917
|
-
* @param options.workspace - The name of the workspace to use.
|
|
918
|
-
* @param options.global - Whether to run the command in global mode.
|
|
919
|
-
*
|
|
920
|
-
*/
|
|
921
876
|
async function addDevDependency(name, options = {}) {
|
|
922
877
|
return await addDependency(name, {
|
|
923
878
|
...options,
|
|
924
879
|
dev: true
|
|
925
880
|
});
|
|
926
881
|
}
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
882
|
+
globalThis.Blob;
|
|
883
|
+
globalThis.File;
|
|
884
|
+
globalThis.FormData;
|
|
885
|
+
globalThis.Headers;
|
|
886
|
+
globalThis.Request;
|
|
887
|
+
globalThis.Response;
|
|
888
|
+
globalThis.AbortController;
|
|
889
|
+
const l$1 = globalThis.fetch || (() => {
|
|
931
890
|
throw new Error("[node-fetch-native] Failed to fetch: `globalThis.fetch` is not available!");
|
|
932
891
|
});
|
|
933
|
-
|
|
934
|
-
//#endregion
|
|
935
|
-
//#region node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs
|
|
936
892
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
937
|
-
function getDefaultExportFromCjs(x
|
|
938
|
-
return x
|
|
893
|
+
function getDefaultExportFromCjs(x) {
|
|
894
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
939
895
|
}
|
|
940
896
|
var i$6, t$5;
|
|
941
897
|
function s$6() {
|
|
@@ -1006,57 +962,57 @@ function w$1() {
|
|
|
1006
962
|
if (i$5) return f$3;
|
|
1007
963
|
i$5 = 1;
|
|
1008
964
|
const v = (e, r) => {
|
|
1009
|
-
if (Number.isSafeInteger(e)) e < 0 ? g
|
|
965
|
+
if (Number.isSafeInteger(e)) e < 0 ? g(e, r) : p(e, r);
|
|
1010
966
|
else throw Error("cannot encode number outside of javascript safe integer range");
|
|
1011
967
|
return r;
|
|
1012
968
|
}, p = (e, r) => {
|
|
1013
969
|
r[0] = 128;
|
|
1014
970
|
for (var o = r.length; o > 1; o--) r[o - 1] = e & 255, e = Math.floor(e / 256);
|
|
1015
|
-
}, g
|
|
971
|
+
}, g = (e, r) => {
|
|
1016
972
|
r[0] = 255;
|
|
1017
973
|
var o = false;
|
|
1018
974
|
e = e * -1;
|
|
1019
975
|
for (var s = r.length; s > 1; s--) {
|
|
1020
976
|
var a = e & 255;
|
|
1021
|
-
e = Math.floor(e / 256), o ? r[s - 1] = l(a) : a === 0 ? r[s - 1] = 0 : (o = true, r[s - 1] = c
|
|
977
|
+
e = Math.floor(e / 256), o ? r[s - 1] = l(a) : a === 0 ? r[s - 1] = 0 : (o = true, r[s - 1] = c(a));
|
|
1022
978
|
}
|
|
1023
|
-
}, h
|
|
1024
|
-
const r = e[0], o = r === 128 ? d
|
|
979
|
+
}, h = (e) => {
|
|
980
|
+
const r = e[0], o = r === 128 ? d(e.slice(1, e.length)) : r === 255 ? x(e) : null;
|
|
1025
981
|
if (o === null) throw Error("invalid base256 encoding");
|
|
1026
982
|
if (!Number.isSafeInteger(o)) throw Error("parsed number outside of javascript safe integer range");
|
|
1027
983
|
return o;
|
|
1028
|
-
}, x
|
|
984
|
+
}, x = (e) => {
|
|
1029
985
|
for (var r = e.length, o = 0, s = false, a = r - 1; a > -1; a--) {
|
|
1030
986
|
var n = e[a], t;
|
|
1031
|
-
s ? t = l(n) : n === 0 ? t = n : (s = true, t = c
|
|
987
|
+
s ? t = l(n) : n === 0 ? t = n : (s = true, t = c(n)), t !== 0 && (o -= t * Math.pow(256, r - a - 1));
|
|
1032
988
|
}
|
|
1033
989
|
return o;
|
|
1034
|
-
}, d
|
|
990
|
+
}, d = (e) => {
|
|
1035
991
|
for (var r = e.length, o = 0, s = r - 1; s > -1; s--) {
|
|
1036
992
|
var a = e[s];
|
|
1037
993
|
a !== 0 && (o += a * Math.pow(256, r - s - 1));
|
|
1038
994
|
}
|
|
1039
995
|
return o;
|
|
1040
|
-
}, l = (e) => (255 ^ e) & 255, c
|
|
996
|
+
}, l = (e) => (255 ^ e) & 255, c = (e) => (255 ^ e) + 1 & 255;
|
|
1041
997
|
return f$3 = {
|
|
1042
998
|
encode: v,
|
|
1043
|
-
parse: h
|
|
999
|
+
parse: h
|
|
1044
1000
|
}, f$3;
|
|
1045
1001
|
}
|
|
1046
1002
|
var k, w;
|
|
1047
1003
|
function E() {
|
|
1048
1004
|
if (w) return k;
|
|
1049
1005
|
w = 1;
|
|
1050
|
-
const u = n$3(), x
|
|
1051
|
-
class B
|
|
1052
|
-
constructor(e, t, i, h
|
|
1053
|
-
this.cksumValid = false, this.needPax = false, this.nullBlock = false, this.block = null, this.path = null, this.mode = null, this.uid = null, this.gid = null, this.size = null, this.mtime = null, this.cksum = null, this[a] = "0", this.linkpath = null, this.uname = null, this.gname = null, this.devmaj = 0, this.devmin = 0, this.atime = null, this.ctime = null, Buffer.isBuffer(e) ? this.decode(e, t || 0, i, h
|
|
1006
|
+
const u = n$3(), x = path.posix, y = w$1(), P = Symbol("slurp"), a = Symbol("type");
|
|
1007
|
+
class B {
|
|
1008
|
+
constructor(e, t, i, h) {
|
|
1009
|
+
this.cksumValid = false, this.needPax = false, this.nullBlock = false, this.block = null, this.path = null, this.mode = null, this.uid = null, this.gid = null, this.size = null, this.mtime = null, this.cksum = null, this[a] = "0", this.linkpath = null, this.uname = null, this.gname = null, this.devmaj = 0, this.devmin = 0, this.atime = null, this.ctime = null, Buffer.isBuffer(e) ? this.decode(e, t || 0, i, h) : e && this.set(e);
|
|
1054
1010
|
}
|
|
1055
|
-
decode(e, t, i, h
|
|
1011
|
+
decode(e, t, i, h) {
|
|
1056
1012
|
if (t || (t = 0), !e || !(e.length >= t + 512)) throw new Error("need 512 bytes for header");
|
|
1057
|
-
if (this.path = d
|
|
1013
|
+
if (this.path = d(e, t, 100), this.mode = r(e, t + 100, 8), this.uid = r(e, t + 108, 8), this.gid = r(e, t + 116, 8), this.size = r(e, t + 124, 12), this.mtime = o(e, t + 136, 12), this.cksum = r(e, t + 148, 12), this[P](i), this[P](h, true), this[a] = d(e, t + 156, 1), this[a] === "" && (this[a] = "0"), this[a] === "0" && this.path.slice(-1) === "/" && (this[a] = "5"), this[a] === "5" && (this.size = 0), this.linkpath = d(e, t + 157, 100), e.slice(t + 257, t + 265).toString() === "ustar\x0000") if (this.uname = d(e, t + 265, 32), this.gname = d(e, t + 297, 32), this.devmaj = r(e, t + 329, 8), this.devmin = r(e, t + 337, 8), e[t + 475] !== 0) this.path = d(e, t + 345, 155) + "/" + this.path;
|
|
1058
1014
|
else {
|
|
1059
|
-
const n = d
|
|
1015
|
+
const n = d(e, t + 345, 130);
|
|
1060
1016
|
n && (this.path = n + "/" + this.path), this.atime = o(e, t + 476, 12), this.ctime = o(e, t + 488, 12);
|
|
1061
1017
|
}
|
|
1062
1018
|
let l = 256;
|
|
@@ -1064,17 +1020,17 @@ function E() {
|
|
|
1064
1020
|
for (let n = t + 156; n < t + 512; n++) l += e[n];
|
|
1065
1021
|
this.cksumValid = l === this.cksum, this.cksum === null && l === 256 && (this.nullBlock = true);
|
|
1066
1022
|
}
|
|
1067
|
-
[P
|
|
1023
|
+
[P](e, t) {
|
|
1068
1024
|
for (const i in e) e[i] !== null && e[i] !== void 0 && !(t && i === "path") && (this[i] = e[i]);
|
|
1069
1025
|
}
|
|
1070
1026
|
encode(e, t) {
|
|
1071
1027
|
if (e || (e = this.block = Buffer.alloc(512), t = 0), t || (t = 0), !(e.length >= t + 512)) throw new Error("need 512 bytes for header");
|
|
1072
|
-
const i = this.ctime || this.atime ? 130 : 155, h
|
|
1073
|
-
this.needPax = h
|
|
1028
|
+
const i = this.ctime || this.atime ? 130 : 155, h = L(this.path || "", i), l = h[0], n = h[1];
|
|
1029
|
+
this.needPax = h[2], this.needPax = m(e, t, 100, l) || this.needPax, this.needPax = c(e, t + 100, 8, this.mode) || this.needPax, this.needPax = c(e, t + 108, 8, this.uid) || this.needPax, this.needPax = c(e, t + 116, 8, this.gid) || this.needPax, this.needPax = c(e, t + 124, 12, this.size) || this.needPax, this.needPax = g(e, t + 136, 12, this.mtime) || this.needPax, e[t + 156] = this[a].charCodeAt(0), this.needPax = m(e, t + 157, 100, this.linkpath) || this.needPax, e.write("ustar\x0000", t + 257, 8), this.needPax = m(e, t + 265, 32, this.uname) || this.needPax, this.needPax = m(e, t + 297, 32, this.gname) || this.needPax, this.needPax = c(e, t + 329, 8, this.devmaj) || this.needPax, this.needPax = c(e, t + 337, 8, this.devmin) || this.needPax, this.needPax = m(e, t + 345, i, n) || this.needPax, e[t + 475] !== 0 ? this.needPax = m(e, t + 345, 155, n) || this.needPax : (this.needPax = m(e, t + 345, 130, n) || this.needPax, this.needPax = g(e, t + 476, 12, this.atime) || this.needPax, this.needPax = g(e, t + 488, 12, this.ctime) || this.needPax);
|
|
1074
1030
|
let S = 256;
|
|
1075
1031
|
for (let p = t; p < t + 148; p++) S += e[p];
|
|
1076
1032
|
for (let p = t + 156; p < t + 512; p++) S += e[p];
|
|
1077
|
-
return this.cksum = S, c
|
|
1033
|
+
return this.cksum = S, c(e, t + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
|
|
1078
1034
|
}
|
|
1079
1035
|
set(e) {
|
|
1080
1036
|
for (const t in e) e[t] !== null && e[t] !== void 0 && (this[t] = e[t]);
|
|
@@ -1090,26 +1046,26 @@ function E() {
|
|
|
1090
1046
|
}
|
|
1091
1047
|
}
|
|
1092
1048
|
const L = (s, e) => {
|
|
1093
|
-
let i = s, h
|
|
1094
|
-
const n = x
|
|
1049
|
+
let i = s, h = "", l;
|
|
1050
|
+
const n = x.parse(s).root || ".";
|
|
1095
1051
|
if (Buffer.byteLength(i) < 100) l = [
|
|
1096
1052
|
i,
|
|
1097
|
-
h
|
|
1053
|
+
h,
|
|
1098
1054
|
false
|
|
1099
1055
|
];
|
|
1100
1056
|
else {
|
|
1101
|
-
h
|
|
1057
|
+
h = x.dirname(i), i = x.basename(i);
|
|
1102
1058
|
do
|
|
1103
|
-
Buffer.byteLength(i) <= 100 && Buffer.byteLength(h
|
|
1059
|
+
Buffer.byteLength(i) <= 100 && Buffer.byteLength(h) <= e ? l = [
|
|
1104
1060
|
i,
|
|
1105
|
-
h
|
|
1061
|
+
h,
|
|
1106
1062
|
false
|
|
1107
|
-
] : Buffer.byteLength(i) > 100 && Buffer.byteLength(h
|
|
1063
|
+
] : Buffer.byteLength(i) > 100 && Buffer.byteLength(h) <= e ? l = [
|
|
1108
1064
|
i.slice(0, 99),
|
|
1109
|
-
h
|
|
1065
|
+
h,
|
|
1110
1066
|
true
|
|
1111
|
-
] : (i = x
|
|
1112
|
-
while (h
|
|
1067
|
+
] : (i = x.join(x.basename(h), i), h = x.dirname(h));
|
|
1068
|
+
while (h !== n && !l);
|
|
1113
1069
|
l || (l = [
|
|
1114
1070
|
s.slice(0, 99),
|
|
1115
1071
|
"",
|
|
@@ -1117,11 +1073,11 @@ function E() {
|
|
|
1117
1073
|
]);
|
|
1118
1074
|
}
|
|
1119
1075
|
return l;
|
|
1120
|
-
}, d
|
|
1076
|
+
}, d = (s, e, t) => s.slice(e, e + t).toString("utf8").replace(/\0.*/, ""), o = (s, e, t) => N(r(s, e, t)), N = (s) => s === null ? null : /* @__PURE__ */ new Date(s * 1e3), r = (s, e, t) => s[e] & 128 ? y.parse(s.slice(e, e + t)) : j(s, e, t), q = (s) => isNaN(s) ? null : s, j = (s, e, t) => q(parseInt(s.slice(e, e + t).toString("utf8").replace(/\0.*$/, "").trim(), 8)), v = {
|
|
1121
1077
|
12: 8589934591,
|
|
1122
1078
|
8: 2097151
|
|
1123
|
-
}, c
|
|
1124
|
-
return k = B
|
|
1079
|
+
}, c = (s, e, t, i) => i === null ? false : i > v[t] || i < 0 ? (y.encode(i, s.slice(e, e + t)), true) : ($(s, e, t, i), false), $ = (s, e, t, i) => s.write(_(i, t), e, t, "ascii"), _ = (s, e) => z(Math.floor(s).toString(8), e), z = (s, e) => (s.length === e - 1 ? s : new Array(e - s.length - 1).join("0") + s + " ") + "\0", g = (s, e, t, i) => i === null ? false : c(s, e, t, i.getTime() / 1e3), A = new Array(156).join("\0"), m = (s, e, t, i) => i === null ? false : (s.write(i + A, e, t, "utf8"), i.length !== Buffer.byteLength(i) || i.length > t);
|
|
1080
|
+
return k = B, k;
|
|
1125
1081
|
}
|
|
1126
1082
|
var e$3, t$3;
|
|
1127
1083
|
function i$4() {
|
|
@@ -1140,7 +1096,7 @@ function c$3() {
|
|
|
1140
1096
|
if (i instanceof r || (i = new r()), i.tail = null, i.head = null, i.length = 0, t && typeof t.forEach == "function") t.forEach(function(n) {
|
|
1141
1097
|
i.push(n);
|
|
1142
1098
|
});
|
|
1143
|
-
else if (arguments.length > 0) for (var e = 0, h
|
|
1099
|
+
else if (arguments.length > 0) for (var e = 0, h = arguments.length; e < h; e++) i.push(arguments[e]);
|
|
1144
1100
|
return i;
|
|
1145
1101
|
}
|
|
1146
1102
|
r.prototype.removeNode = function(t) {
|
|
@@ -1177,10 +1133,10 @@ function c$3() {
|
|
|
1177
1133
|
}
|
|
1178
1134
|
}, r.prototype.forEach = function(t, i) {
|
|
1179
1135
|
i = i || this;
|
|
1180
|
-
for (var e = this.head, h
|
|
1136
|
+
for (var e = this.head, h = 0; e !== null; h++) t.call(i, e.value, h, this), e = e.next;
|
|
1181
1137
|
}, r.prototype.forEachReverse = function(t, i) {
|
|
1182
1138
|
i = i || this;
|
|
1183
|
-
for (var e = this.tail, h
|
|
1139
|
+
for (var e = this.tail, h = this.length - 1; e !== null; h--) t.call(i, e.value, h, this), e = e.prev;
|
|
1184
1140
|
}, r.prototype.get = function(t) {
|
|
1185
1141
|
for (var i = 0, e = this.head; e !== null && i < t; i++) e = e.next;
|
|
1186
1142
|
if (i === t && e !== null) return e.value;
|
|
@@ -1189,25 +1145,25 @@ function c$3() {
|
|
|
1189
1145
|
if (i === t && e !== null) return e.value;
|
|
1190
1146
|
}, r.prototype.map = function(t, i) {
|
|
1191
1147
|
i = i || this;
|
|
1192
|
-
for (var e = new r(), h
|
|
1148
|
+
for (var e = new r(), h = this.head; h !== null;) e.push(t.call(i, h.value, this)), h = h.next;
|
|
1193
1149
|
return e;
|
|
1194
1150
|
}, r.prototype.mapReverse = function(t, i) {
|
|
1195
1151
|
i = i || this;
|
|
1196
|
-
for (var e = new r(), h
|
|
1152
|
+
for (var e = new r(), h = this.tail; h !== null;) e.push(t.call(i, h.value, this)), h = h.prev;
|
|
1197
1153
|
return e;
|
|
1198
1154
|
}, r.prototype.reduce = function(t, i) {
|
|
1199
|
-
var e, h
|
|
1155
|
+
var e, h = this.head;
|
|
1200
1156
|
if (arguments.length > 1) e = i;
|
|
1201
|
-
else if (this.head) h
|
|
1157
|
+
else if (this.head) h = this.head.next, e = this.head.value;
|
|
1202
1158
|
else throw new TypeError("Reduce of empty list with no initial value");
|
|
1203
|
-
for (var n = 0; h
|
|
1159
|
+
for (var n = 0; h !== null; n++) e = t(e, h.value, n), h = h.next;
|
|
1204
1160
|
return e;
|
|
1205
1161
|
}, r.prototype.reduceReverse = function(t, i) {
|
|
1206
|
-
var e, h
|
|
1162
|
+
var e, h = this.tail;
|
|
1207
1163
|
if (arguments.length > 1) e = i;
|
|
1208
|
-
else if (this.tail) h
|
|
1164
|
+
else if (this.tail) h = this.tail.prev, e = this.tail.value;
|
|
1209
1165
|
else throw new TypeError("Reduce of empty list with no initial value");
|
|
1210
|
-
for (var n = this.length - 1; h
|
|
1166
|
+
for (var n = this.length - 1; h !== null; n--) e = t(e, h.value, n), h = h.prev;
|
|
1211
1167
|
return e;
|
|
1212
1168
|
}, r.prototype.toArray = function() {
|
|
1213
1169
|
for (var t = new Array(this.length), i = 0, e = this.head; e !== null; i++) t[i] = e.value, e = e.next;
|
|
@@ -1220,34 +1176,34 @@ function c$3() {
|
|
|
1220
1176
|
var e = new r();
|
|
1221
1177
|
if (i < t || i < 0) return e;
|
|
1222
1178
|
t < 0 && (t = 0), i > this.length && (i = this.length);
|
|
1223
|
-
for (var h
|
|
1224
|
-
for (; n !== null && h
|
|
1179
|
+
for (var h = 0, n = this.head; n !== null && h < t; h++) n = n.next;
|
|
1180
|
+
for (; n !== null && h < i; h++, n = n.next) e.push(n.value);
|
|
1225
1181
|
return e;
|
|
1226
1182
|
}, r.prototype.sliceReverse = function(t, i) {
|
|
1227
1183
|
i = i || this.length, i < 0 && (i += this.length), t = t || 0, t < 0 && (t += this.length);
|
|
1228
1184
|
var e = new r();
|
|
1229
1185
|
if (i < t || i < 0) return e;
|
|
1230
1186
|
t < 0 && (t = 0), i > this.length && (i = this.length);
|
|
1231
|
-
for (var h
|
|
1232
|
-
for (; n !== null && h
|
|
1187
|
+
for (var h = this.length, n = this.tail; n !== null && h > i; h--) n = n.prev;
|
|
1188
|
+
for (; n !== null && h > t; h--, n = n.prev) e.push(n.value);
|
|
1233
1189
|
return e;
|
|
1234
1190
|
}, r.prototype.splice = function(t, i, ...e) {
|
|
1235
1191
|
t > this.length && (t = this.length - 1), t < 0 && (t = this.length + t);
|
|
1236
|
-
for (var h
|
|
1237
|
-
for (var l = [], h
|
|
1192
|
+
for (var h = 0, n = this.head; n !== null && h < t; h++) n = n.next;
|
|
1193
|
+
for (var l = [], h = 0; n && h < i; h++) l.push(n.value), n = this.removeNode(n);
|
|
1238
1194
|
n === null && (n = this.tail), n !== this.head && n !== this.tail && (n = n.prev);
|
|
1239
|
-
for (var h
|
|
1195
|
+
for (var h = 0; h < e.length; h++) n = v(this, n, e[h]);
|
|
1240
1196
|
return l;
|
|
1241
1197
|
}, r.prototype.reverse = function() {
|
|
1242
1198
|
for (var t = this.head, i = this.tail, e = t; e !== null; e = e.prev) {
|
|
1243
|
-
var h
|
|
1244
|
-
e.prev = e.next, e.next = h
|
|
1199
|
+
var h = e.prev;
|
|
1200
|
+
e.prev = e.next, e.next = h;
|
|
1245
1201
|
}
|
|
1246
1202
|
return this.head = i, this.tail = t, this;
|
|
1247
1203
|
};
|
|
1248
1204
|
function v(t, i, e) {
|
|
1249
|
-
var h
|
|
1250
|
-
return h
|
|
1205
|
+
var h = i === t.head ? new s(e, null, i, t) : new s(e, i, i.next, t);
|
|
1206
|
+
return h.next === null && (t.tail = h), h.prev === null && (t.head = h), t.length++, h;
|
|
1251
1207
|
}
|
|
1252
1208
|
function f(t, i) {
|
|
1253
1209
|
t.tail = new s(i, t.tail, null, t), t.head || (t.head = t.tail), t.length++;
|
|
@@ -1255,9 +1211,9 @@ function c$3() {
|
|
|
1255
1211
|
function o(t, i) {
|
|
1256
1212
|
t.head = new s(i, null, t.head, t), t.tail || (t.tail = t.head), t.length++;
|
|
1257
1213
|
}
|
|
1258
|
-
function s(t, i, e, h
|
|
1259
|
-
if (!(this instanceof s)) return new s(t, i, e, h
|
|
1260
|
-
this.list = h
|
|
1214
|
+
function s(t, i, e, h) {
|
|
1215
|
+
if (!(this instanceof s)) return new s(t, i, e, h);
|
|
1216
|
+
this.list = h, this.value = t, i ? (i.next = this, this.prev = i) : this.prev = null, e ? (e.prev = this, this.next = e) : this.next = null;
|
|
1261
1217
|
}
|
|
1262
1218
|
try {
|
|
1263
1219
|
i$4()(r);
|
|
@@ -1272,10 +1228,10 @@ function ft() {
|
|
|
1272
1228
|
const H = typeof process == "object" && process ? process : {
|
|
1273
1229
|
stdout: null,
|
|
1274
1230
|
stderr: null
|
|
1275
|
-
}, Z = nt, q = ot, G = ht.StringDecoder, m = Symbol("EOF"), d
|
|
1231
|
+
}, Z = nt, q = ot, G = ht.StringDecoder, m = Symbol("EOF"), d = Symbol("maybeEmitEnd"), y = Symbol("emittedEnd"), R = Symbol("emittingEnd"), g = Symbol("emittedError"), B = Symbol("closed"), Y = Symbol("read"), T = Symbol("flush"), $ = Symbol("flushChunk"), f = Symbol("encoding"), c = Symbol("decoder"), M = Symbol("flowing"), S = Symbol("paused"), b = Symbol("resume"), i = Symbol("buffer"), a = Symbol("pipes"), n = Symbol("bufferLength"), j = Symbol("bufferPush"), I = Symbol("bufferShift"), o = Symbol("objectMode"), r = Symbol("destroyed"), P = Symbol("error"), x = Symbol("emitData"), V = Symbol("emitEnd"), N = Symbol("emitEnd2"), p = Symbol("async"), _ = Symbol("abort"), O = Symbol("aborted"), E = Symbol("signal"), w = (h) => Promise.resolve().then(h), J = commonjsGlobal._MP_NO_ITERATOR_SYMBOLS_ !== "1", K = J && Symbol.asyncIterator || Symbol("asyncIterator not implemented"), W = J && Symbol.iterator || Symbol("iterator not implemented"), k = (h) => h === "end" || h === "finish" || h === "prefinish", tt = (h) => h instanceof ArrayBuffer || typeof h == "object" && h.constructor && h.constructor.name === "ArrayBuffer" && h.byteLength >= 0, et = (h) => !Buffer.isBuffer(h) && ArrayBuffer.isView(h);
|
|
1276
1232
|
class z {
|
|
1277
1233
|
constructor(t, e, s) {
|
|
1278
|
-
this.src = t, this.dest = e, this.opts = s, this.ondrain = () => t[b
|
|
1234
|
+
this.src = t, this.dest = e, this.opts = s, this.ondrain = () => t[b](), e.on("drain", this.ondrain);
|
|
1279
1235
|
}
|
|
1280
1236
|
unpipe() {
|
|
1281
1237
|
this.dest.removeListener("drain", this.ondrain);
|
|
@@ -1295,7 +1251,7 @@ function ft() {
|
|
|
1295
1251
|
}
|
|
1296
1252
|
class F extends q {
|
|
1297
1253
|
constructor(t) {
|
|
1298
|
-
super(), this[M
|
|
1254
|
+
super(), this[M] = false, this[S] = false, this[a] = [], this[i] = [], this[o] = t && t.objectMode || false, this[o] ? this[f] = null : this[f] = t && t.encoding || null, this[f] === "buffer" && (this[f] = null), this[p] = t && !!t.async || false, this[c] = this[f] ? new G(this[f]) : null, this[m] = false, this[y] = false, this[R] = false, this[B] = false, this[g] = null, this.writable = true, this.readable = true, this[n] = 0, this[r] = false, t && t.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[i] }), t && t.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[a] }), this[E] = t && t.signal, this[O] = false, this[E] && (this[E].addEventListener("abort", () => this[_]()), this[E].aborted && this[_]());
|
|
1299
1255
|
}
|
|
1300
1256
|
get bufferLength() {
|
|
1301
1257
|
return this[n];
|
|
@@ -1305,8 +1261,8 @@ function ft() {
|
|
|
1305
1261
|
}
|
|
1306
1262
|
set encoding(t) {
|
|
1307
1263
|
if (this[o]) throw new Error("cannot set encoding in objectMode");
|
|
1308
|
-
if (this[f] && t !== this[f] && (this[c
|
|
1309
|
-
this[f] !== t && (this[c
|
|
1264
|
+
if (this[f] && t !== this[f] && (this[c] && this[c].lastNeed || this[n])) throw new Error("cannot change encoding");
|
|
1265
|
+
this[f] !== t && (this[c] = t ? new G(t) : null, this[i].length && (this[i] = this[i].map((e) => this[c].write(e)))), this[f] = t;
|
|
1310
1266
|
}
|
|
1311
1267
|
setEncoding(t) {
|
|
1312
1268
|
this.encoding = t;
|
|
@@ -1336,35 +1292,35 @@ function ft() {
|
|
|
1336
1292
|
if (this[r]) return this.emit("error", Object.assign(/* @__PURE__ */ new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
|
|
1337
1293
|
typeof e == "function" && (s = e, e = "utf8"), e || (e = "utf8");
|
|
1338
1294
|
const l = this[p] ? w : (u) => u();
|
|
1339
|
-
return !this[o] && !Buffer.isBuffer(t) && (et(t) ? t = Buffer.from(t.buffer, t.byteOffset, t.byteLength) : tt(t) ? t = Buffer.from(t) : typeof t != "string" && (this.objectMode = true)), this[o] ? (this.flowing && this[n] !== 0 && this[T](true), this.flowing ? this.emit("data", t) : this[j](t), this[n] !== 0 && this.emit("readable"), s && l(s), this.flowing) : t.length ? (typeof t == "string" && !(e === this[f] && !this[c
|
|
1295
|
+
return !this[o] && !Buffer.isBuffer(t) && (et(t) ? t = Buffer.from(t.buffer, t.byteOffset, t.byteLength) : tt(t) ? t = Buffer.from(t) : typeof t != "string" && (this.objectMode = true)), this[o] ? (this.flowing && this[n] !== 0 && this[T](true), this.flowing ? this.emit("data", t) : this[j](t), this[n] !== 0 && this.emit("readable"), s && l(s), this.flowing) : t.length ? (typeof t == "string" && !(e === this[f] && !this[c].lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[f] && (t = this[c].write(t)), this.flowing && this[n] !== 0 && this[T](true), this.flowing ? this.emit("data", t) : this[j](t), this[n] !== 0 && this.emit("readable"), s && l(s), this.flowing) : (this[n] !== 0 && this.emit("readable"), s && l(s), this.flowing);
|
|
1340
1296
|
}
|
|
1341
1297
|
read(t) {
|
|
1342
1298
|
if (this[r]) return null;
|
|
1343
|
-
if (this[n] === 0 || t === 0 || t > this[n]) return this[d
|
|
1299
|
+
if (this[n] === 0 || t === 0 || t > this[n]) return this[d](), null;
|
|
1344
1300
|
this[o] && (t = null), this[i].length > 1 && !this[o] && (this.encoding ? this[i] = [this[i].join("")] : this[i] = [Buffer.concat(this[i], this[n])]);
|
|
1345
1301
|
const e = this[Y](t || null, this[i][0]);
|
|
1346
|
-
return this[d
|
|
1302
|
+
return this[d](), e;
|
|
1347
1303
|
}
|
|
1348
1304
|
[Y](t, e) {
|
|
1349
|
-
return t === e.length || t === null ? this[I
|
|
1305
|
+
return t === e.length || t === null ? this[I]() : (this[i][0] = e.slice(t), e = e.slice(0, t), this[n] -= t), this.emit("data", e), !this[i].length && !this[m] && this.emit("drain"), e;
|
|
1350
1306
|
}
|
|
1351
1307
|
end(t, e, s) {
|
|
1352
|
-
return typeof t == "function" && (s = t, t = null), typeof e == "function" && (s = e, e = "utf8"), t && this.write(t, e), s && this.once("end", s), this[m] = true, this.writable = false, (this.flowing || !this[S]) && this[d
|
|
1308
|
+
return typeof t == "function" && (s = t, t = null), typeof e == "function" && (s = e, e = "utf8"), t && this.write(t, e), s && this.once("end", s), this[m] = true, this.writable = false, (this.flowing || !this[S]) && this[d](), this;
|
|
1353
1309
|
}
|
|
1354
|
-
[b
|
|
1355
|
-
this[r] || (this[S] = false, this[M
|
|
1310
|
+
[b]() {
|
|
1311
|
+
this[r] || (this[S] = false, this[M] = true, this.emit("resume"), this[i].length ? this[T]() : this[m] ? this[d]() : this.emit("drain"));
|
|
1356
1312
|
}
|
|
1357
1313
|
resume() {
|
|
1358
|
-
return this[b
|
|
1314
|
+
return this[b]();
|
|
1359
1315
|
}
|
|
1360
1316
|
pause() {
|
|
1361
|
-
this[M
|
|
1317
|
+
this[M] = false, this[S] = true;
|
|
1362
1318
|
}
|
|
1363
1319
|
get destroyed() {
|
|
1364
1320
|
return this[r];
|
|
1365
1321
|
}
|
|
1366
1322
|
get flowing() {
|
|
1367
|
-
return this[M
|
|
1323
|
+
return this[M];
|
|
1368
1324
|
}
|
|
1369
1325
|
get paused() {
|
|
1370
1326
|
return this[S];
|
|
@@ -1372,12 +1328,12 @@ function ft() {
|
|
|
1372
1328
|
[j](t) {
|
|
1373
1329
|
this[o] ? this[n] += 1 : this[n] += t.length, this[i].push(t);
|
|
1374
1330
|
}
|
|
1375
|
-
[I
|
|
1331
|
+
[I]() {
|
|
1376
1332
|
return this[o] ? this[n] -= 1 : this[n] -= this[i][0].length, this[i].shift();
|
|
1377
1333
|
}
|
|
1378
1334
|
[T](t) {
|
|
1379
1335
|
do ;
|
|
1380
|
-
while (this[$](this[I
|
|
1336
|
+
while (this[$](this[I]()) && this[i].length);
|
|
1381
1337
|
!t && !this[i].length && !this[m] && this.emit("drain");
|
|
1382
1338
|
}
|
|
1383
1339
|
[$](t) {
|
|
@@ -1386,7 +1342,7 @@ while (this[$](this[I$1]()) && this[i].length);
|
|
|
1386
1342
|
pipe(t, e) {
|
|
1387
1343
|
if (this[r]) return;
|
|
1388
1344
|
const s = this[y];
|
|
1389
|
-
return e = e || {}, t === H.stdout || t === H.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, s ? e.end && t.end() : (this[a].push(e.proxyErrors ? new st(this, t, e) : new z(this, t, e)), this[p] ? w(() => this[b
|
|
1345
|
+
return e = e || {}, t === H.stdout || t === H.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, s ? e.end && t.end() : (this[a].push(e.proxyErrors ? new st(this, t, e) : new z(this, t, e)), this[p] ? w(() => this[b]()) : this[b]()), t;
|
|
1390
1346
|
}
|
|
1391
1347
|
unpipe(t) {
|
|
1392
1348
|
const e = this[a].find((s) => s.dest === t);
|
|
@@ -1397,47 +1353,47 @@ while (this[$](this[I$1]()) && this[i].length);
|
|
|
1397
1353
|
}
|
|
1398
1354
|
on(t, e) {
|
|
1399
1355
|
const s = super.on(t, e);
|
|
1400
|
-
return t === "data" && !this[a].length && !this.flowing ? this[b
|
|
1356
|
+
return t === "data" && !this[a].length && !this.flowing ? this[b]() : t === "readable" && this[n] !== 0 ? super.emit("readable") : k(t) && this[y] ? (super.emit(t), this.removeAllListeners(t)) : t === "error" && this[g] && (this[p] ? w(() => e.call(this, this[g])) : e.call(this, this[g])), s;
|
|
1401
1357
|
}
|
|
1402
1358
|
get emittedEnd() {
|
|
1403
1359
|
return this[y];
|
|
1404
1360
|
}
|
|
1405
|
-
[d
|
|
1406
|
-
!this[R] && !this[y] && !this[r] && this[i].length === 0 && this[m] && (this[R] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[B
|
|
1361
|
+
[d]() {
|
|
1362
|
+
!this[R] && !this[y] && !this[r] && this[i].length === 0 && this[m] && (this[R] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[B] && this.emit("close"), this[R] = false);
|
|
1407
1363
|
}
|
|
1408
1364
|
emit(t, e, ...s) {
|
|
1409
1365
|
if (t !== "error" && t !== "close" && t !== r && this[r]) return;
|
|
1410
|
-
if (t === "data") return !this[o] && !e ? false : this[p] ? w(() => this[x
|
|
1411
|
-
if (t === "end") return this[V
|
|
1366
|
+
if (t === "data") return !this[o] && !e ? false : this[p] ? w(() => this[x](e)) : this[x](e);
|
|
1367
|
+
if (t === "end") return this[V]();
|
|
1412
1368
|
if (t === "close") {
|
|
1413
|
-
if (this[B
|
|
1369
|
+
if (this[B] = true, !this[y] && !this[r]) return;
|
|
1414
1370
|
const u = super.emit("close");
|
|
1415
1371
|
return this.removeAllListeners("close"), u;
|
|
1416
1372
|
} else if (t === "error") {
|
|
1417
|
-
this[g
|
|
1373
|
+
this[g] = e, super.emit(P, e);
|
|
1418
1374
|
const u = !this[E] || this.listeners("error").length ? super.emit("error", e) : false;
|
|
1419
|
-
return this[d
|
|
1375
|
+
return this[d](), u;
|
|
1420
1376
|
} else if (t === "resume") {
|
|
1421
1377
|
const u = super.emit("resume");
|
|
1422
|
-
return this[d
|
|
1378
|
+
return this[d](), u;
|
|
1423
1379
|
} else if (t === "finish" || t === "prefinish") {
|
|
1424
1380
|
const u = super.emit(t);
|
|
1425
1381
|
return this.removeAllListeners(t), u;
|
|
1426
1382
|
}
|
|
1427
1383
|
const l = super.emit(t, e, ...s);
|
|
1428
|
-
return this[d
|
|
1384
|
+
return this[d](), l;
|
|
1429
1385
|
}
|
|
1430
|
-
[x
|
|
1386
|
+
[x](t) {
|
|
1431
1387
|
for (const s of this[a]) s.dest.write(t) === false && this.pause();
|
|
1432
1388
|
const e = super.emit("data", t);
|
|
1433
|
-
return this[d
|
|
1389
|
+
return this[d](), e;
|
|
1434
1390
|
}
|
|
1435
|
-
[V
|
|
1436
|
-
this[y] || (this[y] = true, this.readable = false, this[p] ? w(() => this[N
|
|
1391
|
+
[V]() {
|
|
1392
|
+
this[y] || (this[y] = true, this.readable = false, this[p] ? w(() => this[N]()) : this[N]());
|
|
1437
1393
|
}
|
|
1438
|
-
[N
|
|
1439
|
-
if (this[c
|
|
1440
|
-
const e = this[c
|
|
1394
|
+
[N]() {
|
|
1395
|
+
if (this[c]) {
|
|
1396
|
+
const e = this[c].end();
|
|
1441
1397
|
if (e) {
|
|
1442
1398
|
for (const s of this[a]) s.dest.write(e);
|
|
1443
1399
|
super.emit("data", e);
|
|
@@ -1463,7 +1419,7 @@ while (this[$](this[I$1]()) && this[i].length);
|
|
|
1463
1419
|
this.on(r, () => e(/* @__PURE__ */ new Error("stream destroyed"))), this.on("error", (s) => e(s)), this.on("end", () => t());
|
|
1464
1420
|
});
|
|
1465
1421
|
}
|
|
1466
|
-
[K
|
|
1422
|
+
[K]() {
|
|
1467
1423
|
let t = false;
|
|
1468
1424
|
const e = () => (this.pause(), t = true, Promise.resolve({ done: true }));
|
|
1469
1425
|
return {
|
|
@@ -1476,45 +1432,45 @@ while (this[$](this[I$1]()) && this[i].length);
|
|
|
1476
1432
|
});
|
|
1477
1433
|
if (this[m]) return e();
|
|
1478
1434
|
let u = null, Q = null;
|
|
1479
|
-
const A
|
|
1480
|
-
this.removeListener("data", U
|
|
1481
|
-
}, U
|
|
1482
|
-
this.removeListener("error", A
|
|
1435
|
+
const A = (L) => {
|
|
1436
|
+
this.removeListener("data", U), this.removeListener("end", C), this.removeListener(r, D), e(), Q(L);
|
|
1437
|
+
}, U = (L) => {
|
|
1438
|
+
this.removeListener("error", A), this.removeListener("end", C), this.removeListener(r, D), this.pause(), u({
|
|
1483
1439
|
value: L,
|
|
1484
1440
|
done: !!this[m]
|
|
1485
1441
|
});
|
|
1486
1442
|
}, C = () => {
|
|
1487
|
-
this.removeListener("error", A
|
|
1488
|
-
}, D
|
|
1443
|
+
this.removeListener("error", A), this.removeListener("data", U), this.removeListener(r, D), e(), u({ done: true });
|
|
1444
|
+
}, D = () => A(/* @__PURE__ */ new Error("stream destroyed"));
|
|
1489
1445
|
return new Promise((L, it) => {
|
|
1490
|
-
Q = it, u = L, this.once(r, D
|
|
1446
|
+
Q = it, u = L, this.once(r, D), this.once("error", A), this.once("end", C), this.once("data", U);
|
|
1491
1447
|
});
|
|
1492
1448
|
},
|
|
1493
1449
|
throw: e,
|
|
1494
1450
|
return: e,
|
|
1495
|
-
[K
|
|
1451
|
+
[K]() {
|
|
1496
1452
|
return this;
|
|
1497
1453
|
}
|
|
1498
1454
|
};
|
|
1499
1455
|
}
|
|
1500
|
-
[W
|
|
1456
|
+
[W]() {
|
|
1501
1457
|
let t = false;
|
|
1502
|
-
const e = () => (this.pause(), this.removeListener(P
|
|
1458
|
+
const e = () => (this.pause(), this.removeListener(P, e), this.removeListener(r, e), this.removeListener("end", e), t = true, { done: true }), s = () => {
|
|
1503
1459
|
if (t) return e();
|
|
1504
1460
|
const l = this.read();
|
|
1505
1461
|
return l === null ? e() : { value: l };
|
|
1506
1462
|
};
|
|
1507
|
-
return this.once("end", e), this.once(P
|
|
1463
|
+
return this.once("end", e), this.once(P, e), this.once(r, e), {
|
|
1508
1464
|
next: s,
|
|
1509
1465
|
throw: e,
|
|
1510
1466
|
return: e,
|
|
1511
|
-
[W
|
|
1467
|
+
[W]() {
|
|
1512
1468
|
return this;
|
|
1513
1469
|
}
|
|
1514
1470
|
};
|
|
1515
1471
|
}
|
|
1516
1472
|
destroy(t) {
|
|
1517
|
-
return this[r] ? (t ? this.emit("error", t) : this.emit(r), this) : (this[r] = true, this[i].length = 0, this[n] = 0, typeof this.close == "function" && !this[B
|
|
1473
|
+
return this[r] ? (t ? this.emit("error", t) : this.emit(r), this) : (this[r] = true, this[i].length = 0, this[n] = 0, typeof this.close == "function" && !this[B] && this.close(), t ? this.emit("error", t) : this.emit(r), this);
|
|
1518
1474
|
}
|
|
1519
1475
|
static isStream(t) {
|
|
1520
1476
|
return !!t && (t instanceof F || t instanceof q || t instanceof Z && (typeof t.pipe == "function" || typeof t.write == "function" && typeof t.end == "function"));
|
|
@@ -1559,8 +1515,8 @@ function u$3() {
|
|
|
1559
1515
|
write(t) {
|
|
1560
1516
|
const e = t.length;
|
|
1561
1517
|
if (e > this.blockRemain) throw new Error("writing more to entry than is appropriate");
|
|
1562
|
-
const i = this.remain, c
|
|
1563
|
-
return this.remain = Math.max(0, i - e), this.blockRemain = Math.max(0, c
|
|
1518
|
+
const i = this.remain, c = this.blockRemain;
|
|
1519
|
+
return this.remain = Math.max(0, i - e), this.blockRemain = Math.max(0, c - e), this.ignore ? true : i >= e ? super.write(t) : super.write(t.slice(0, i));
|
|
1564
1520
|
}
|
|
1565
1521
|
[r](t, e) {
|
|
1566
1522
|
for (const i in t) t[i] !== null && t[i] !== void 0 && !(e && i === "path") && (this[i] = i === "path" || i === "linkpath" ? s(t[i]) : t[i]);
|
|
@@ -1571,8 +1527,8 @@ var r$2, a$5;
|
|
|
1571
1527
|
function f$2() {
|
|
1572
1528
|
if (a$5) return r$2;
|
|
1573
1529
|
a$5 = 1;
|
|
1574
|
-
const c
|
|
1575
|
-
class h
|
|
1530
|
+
const c = E(), d = path;
|
|
1531
|
+
class h {
|
|
1576
1532
|
constructor(e, n) {
|
|
1577
1533
|
this.atime = e.atime || null, this.charset = e.charset || null, this.comment = e.comment || null, this.ctime = e.ctime || null, this.gid = e.gid || null, this.gname = e.gname || null, this.linkpath = e.linkpath || null, this.mtime = e.mtime || null, this.path = e.path || null, this.size = e.size || null, this.uid = e.uid || null, this.uname = e.uname || null, this.dev = e.dev || null, this.ino = e.ino || null, this.nlink = e.nlink || null, this.global = n || false;
|
|
1578
1534
|
}
|
|
@@ -1581,8 +1537,8 @@ function f$2() {
|
|
|
1581
1537
|
if (e === "") return null;
|
|
1582
1538
|
const n = Buffer.byteLength(e), l = 512 * Math.ceil(1 + n / 512), i = Buffer.allocUnsafe(l);
|
|
1583
1539
|
for (let t = 0; t < 512; t++) i[t] = 0;
|
|
1584
|
-
new c
|
|
1585
|
-
path: ("PaxHeader/" + d
|
|
1540
|
+
new c({
|
|
1541
|
+
path: ("PaxHeader/" + d.basename(this.path)).slice(0, 99),
|
|
1586
1542
|
mode: this.mode || 420,
|
|
1587
1543
|
uid: this.uid || null,
|
|
1588
1544
|
gid: this.gid || null,
|
|
@@ -1611,7 +1567,7 @@ function f$2() {
|
|
|
1611
1567
|
return i + t >= Math.pow(10, t) && (t += 1), t + i + l;
|
|
1612
1568
|
}
|
|
1613
1569
|
}
|
|
1614
|
-
h
|
|
1570
|
+
h.parse = (s, e, n) => new h(o(u(s), e), n);
|
|
1615
1571
|
const o = (s, e) => e ? Object.keys(s).reduce((n, l) => (n[l] = s[l], n), e) : s, u = (s) => s.replace(/\n$/, "").split(`
|
|
1616
1572
|
`).reduce(m, Object.create(null)), m = (s, e) => {
|
|
1617
1573
|
const n = parseInt(e, 10);
|
|
@@ -1622,7 +1578,7 @@ function f$2() {
|
|
|
1622
1578
|
const t = l.join("=");
|
|
1623
1579
|
return s[i] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i) ? /* @__PURE__ */ new Date(t * 1e3) : /^[0-9]+$/.test(t) ? +t : t, s;
|
|
1624
1580
|
};
|
|
1625
|
-
return r$2 = h
|
|
1581
|
+
return r$2 = h, r$2;
|
|
1626
1582
|
}
|
|
1627
1583
|
var i$3 = {};
|
|
1628
1584
|
var _, R$1;
|
|
@@ -1743,11 +1699,11 @@ var j, H$1;
|
|
|
1743
1699
|
function tt() {
|
|
1744
1700
|
if (H$1) return j;
|
|
1745
1701
|
H$1 = 1;
|
|
1746
|
-
const I
|
|
1702
|
+
const I = typeof process == "object" && process ? process : {
|
|
1747
1703
|
stdout: null,
|
|
1748
1704
|
stderr: null
|
|
1749
|
-
}, Y = nt, x
|
|
1750
|
-
class U
|
|
1705
|
+
}, Y = nt, x = ot, N = ht.StringDecoder, u = Symbol("EOF"), a = Symbol("maybeEmitEnd"), c = Symbol("emittedEnd"), S = Symbol("emittingEnd"), E = Symbol("emittedError"), w = Symbol("closed"), P = Symbol("read"), L = Symbol("flush"), _ = Symbol("flushChunk"), h = Symbol("encoding"), m = Symbol("decoder"), M = Symbol("flowing"), y = Symbol("paused"), p = Symbol("resume"), s = Symbol("bufferLength"), T = Symbol("bufferPush"), B = Symbol("bufferShift"), r = Symbol("objectMode"), n = Symbol("destroyed"), D = Symbol("emitData"), F = Symbol("emitEnd"), R = Symbol("emitEnd2"), d = Symbol("async"), b = (o) => Promise.resolve().then(o), C = commonjsGlobal._MP_NO_ITERATOR_SYMBOLS_ !== "1", $ = C && Symbol.asyncIterator || Symbol("asyncIterator not implemented"), G = C && Symbol.iterator || Symbol("iterator not implemented"), V = (o) => o === "end" || o === "finish" || o === "prefinish", v = (o) => o instanceof ArrayBuffer || typeof o == "object" && o.constructor && o.constructor.name === "ArrayBuffer" && o.byteLength >= 0, J = (o) => !Buffer.isBuffer(o) && ArrayBuffer.isView(o);
|
|
1706
|
+
class U {
|
|
1751
1707
|
constructor(t, e, i) {
|
|
1752
1708
|
this.src = t, this.dest = e, this.opts = i, this.ondrain = () => t[p](), e.on("drain", this.ondrain);
|
|
1753
1709
|
}
|
|
@@ -1759,7 +1715,7 @@ function tt() {
|
|
|
1759
1715
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
1760
1716
|
}
|
|
1761
1717
|
}
|
|
1762
|
-
class K
|
|
1718
|
+
class K extends U {
|
|
1763
1719
|
unpipe() {
|
|
1764
1720
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
1765
1721
|
}
|
|
@@ -1767,20 +1723,20 @@ function tt() {
|
|
|
1767
1723
|
super(t, e, i), this.proxyErrors = (l) => e.emit("error", l), t.on("error", this.proxyErrors);
|
|
1768
1724
|
}
|
|
1769
1725
|
}
|
|
1770
|
-
return j = class q extends x
|
|
1726
|
+
return j = class q extends x {
|
|
1771
1727
|
constructor(t) {
|
|
1772
|
-
super(), this[M
|
|
1728
|
+
super(), this[M] = false, this[y] = false, this.pipes = [], this.buffer = [], this[r] = t && t.objectMode || false, this[r] ? this[h] = null : this[h] = t && t.encoding || null, this[h] === "buffer" && (this[h] = null), this[d] = t && !!t.async || false, this[m] = this[h] ? new N(this[h]) : null, this[u] = false, this[c] = false, this[S] = false, this[w] = false, this[E] = null, this.writable = true, this.readable = true, this[s] = 0, this[n] = false;
|
|
1773
1729
|
}
|
|
1774
1730
|
get bufferLength() {
|
|
1775
1731
|
return this[s];
|
|
1776
1732
|
}
|
|
1777
1733
|
get encoding() {
|
|
1778
|
-
return this[h
|
|
1734
|
+
return this[h];
|
|
1779
1735
|
}
|
|
1780
1736
|
set encoding(t) {
|
|
1781
1737
|
if (this[r]) throw new Error("cannot set encoding in objectMode");
|
|
1782
|
-
if (this[h
|
|
1783
|
-
this[h
|
|
1738
|
+
if (this[h] && t !== this[h] && (this[m] && this[m].lastNeed || this[s])) throw new Error("cannot change encoding");
|
|
1739
|
+
this[h] !== t && (this[m] = t ? new N(t) : null, this.buffer.length && (this.buffer = this.buffer.map((e) => this[m].write(e)))), this[h] = t;
|
|
1784
1740
|
}
|
|
1785
1741
|
setEncoding(t) {
|
|
1786
1742
|
this.encoding = t;
|
|
@@ -1792,45 +1748,45 @@ function tt() {
|
|
|
1792
1748
|
this[r] = this[r] || !!t;
|
|
1793
1749
|
}
|
|
1794
1750
|
get async() {
|
|
1795
|
-
return this[d
|
|
1751
|
+
return this[d];
|
|
1796
1752
|
}
|
|
1797
1753
|
set async(t) {
|
|
1798
|
-
this[d
|
|
1754
|
+
this[d] = this[d] || !!t;
|
|
1799
1755
|
}
|
|
1800
1756
|
write(t, e, i) {
|
|
1801
1757
|
if (this[u]) throw new Error("write after end");
|
|
1802
1758
|
if (this[n]) return this.emit("error", Object.assign(/* @__PURE__ */ new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
|
|
1803
1759
|
typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
|
|
1804
|
-
const l = this[d
|
|
1805
|
-
return !this[r] && !Buffer.isBuffer(t) && (J(t) ? t = Buffer.from(t.buffer, t.byteOffset, t.byteLength) : v(t) ? t = Buffer.from(t) : typeof t != "string" && (this.objectMode = true)), this[r] ? (this.flowing && this[s] !== 0 && this[L](true), this.flowing ? this.emit("data", t) : this[T](t), this[s] !== 0 && this.emit("readable"), i && l(i), this.flowing) : t.length ? (typeof t == "string" && !(e === this[h
|
|
1760
|
+
const l = this[d] ? b : (f) => f();
|
|
1761
|
+
return !this[r] && !Buffer.isBuffer(t) && (J(t) ? t = Buffer.from(t.buffer, t.byteOffset, t.byteLength) : v(t) ? t = Buffer.from(t) : typeof t != "string" && (this.objectMode = true)), this[r] ? (this.flowing && this[s] !== 0 && this[L](true), this.flowing ? this.emit("data", t) : this[T](t), this[s] !== 0 && this.emit("readable"), i && l(i), this.flowing) : t.length ? (typeof t == "string" && !(e === this[h] && !this[m].lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[h] && (t = this[m].write(t)), this.flowing && this[s] !== 0 && this[L](true), this.flowing ? this.emit("data", t) : this[T](t), this[s] !== 0 && this.emit("readable"), i && l(i), this.flowing) : (this[s] !== 0 && this.emit("readable"), i && l(i), this.flowing);
|
|
1806
1762
|
}
|
|
1807
1763
|
read(t) {
|
|
1808
1764
|
if (this[n]) return null;
|
|
1809
1765
|
if (this[s] === 0 || t === 0 || t > this[s]) return this[a](), null;
|
|
1810
1766
|
this[r] && (t = null), this.buffer.length > 1 && !this[r] && (this.encoding ? this.buffer = [this.buffer.join("")] : this.buffer = [Buffer.concat(this.buffer, this[s])]);
|
|
1811
|
-
const e = this[P
|
|
1767
|
+
const e = this[P](t || null, this.buffer[0]);
|
|
1812
1768
|
return this[a](), e;
|
|
1813
1769
|
}
|
|
1814
|
-
[P
|
|
1815
|
-
return t === e.length || t === null ? this[B
|
|
1770
|
+
[P](t, e) {
|
|
1771
|
+
return t === e.length || t === null ? this[B]() : (this.buffer[0] = e.slice(t), e = e.slice(0, t), this[s] -= t), this.emit("data", e), !this.buffer.length && !this[u] && this.emit("drain"), e;
|
|
1816
1772
|
}
|
|
1817
1773
|
end(t, e, i) {
|
|
1818
1774
|
return typeof t == "function" && (i = t, t = null), typeof e == "function" && (i = e, e = "utf8"), t && this.write(t, e), i && this.once("end", i), this[u] = true, this.writable = false, (this.flowing || !this[y]) && this[a](), this;
|
|
1819
1775
|
}
|
|
1820
1776
|
[p]() {
|
|
1821
|
-
this[n] || (this[y] = false, this[M
|
|
1777
|
+
this[n] || (this[y] = false, this[M] = true, this.emit("resume"), this.buffer.length ? this[L]() : this[u] ? this[a]() : this.emit("drain"));
|
|
1822
1778
|
}
|
|
1823
1779
|
resume() {
|
|
1824
1780
|
return this[p]();
|
|
1825
1781
|
}
|
|
1826
1782
|
pause() {
|
|
1827
|
-
this[M
|
|
1783
|
+
this[M] = false, this[y] = true;
|
|
1828
1784
|
}
|
|
1829
1785
|
get destroyed() {
|
|
1830
1786
|
return this[n];
|
|
1831
1787
|
}
|
|
1832
1788
|
get flowing() {
|
|
1833
|
-
return this[M
|
|
1789
|
+
return this[M];
|
|
1834
1790
|
}
|
|
1835
1791
|
get paused() {
|
|
1836
1792
|
return this[y];
|
|
@@ -1838,12 +1794,12 @@ function tt() {
|
|
|
1838
1794
|
[T](t) {
|
|
1839
1795
|
this[r] ? this[s] += 1 : this[s] += t.length, this.buffer.push(t);
|
|
1840
1796
|
}
|
|
1841
|
-
[B
|
|
1797
|
+
[B]() {
|
|
1842
1798
|
return this.buffer.length && (this[r] ? this[s] -= 1 : this[s] -= this.buffer[0].length), this.buffer.shift();
|
|
1843
1799
|
}
|
|
1844
1800
|
[L](t) {
|
|
1845
1801
|
do ;
|
|
1846
|
-
while (this[_](this[B
|
|
1802
|
+
while (this[_](this[B]()));
|
|
1847
1803
|
!t && !this.buffer.length && !this[u] && this.emit("drain");
|
|
1848
1804
|
}
|
|
1849
1805
|
[_](t) {
|
|
@@ -1851,8 +1807,8 @@ while (this[_](this[B$1]()));
|
|
|
1851
1807
|
}
|
|
1852
1808
|
pipe(t, e) {
|
|
1853
1809
|
if (this[n]) return;
|
|
1854
|
-
const i = this[c
|
|
1855
|
-
return e = e || {}, t === I
|
|
1810
|
+
const i = this[c];
|
|
1811
|
+
return e = e || {}, t === I.stdout || t === I.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this.pipes.push(e.proxyErrors ? new K(this, t, e) : new U(this, t, e)), this[d] ? b(() => this[p]()) : this[p]()), t;
|
|
1856
1812
|
}
|
|
1857
1813
|
unpipe(t) {
|
|
1858
1814
|
const e = this.pipes.find((i) => i.dest === t);
|
|
@@ -1863,20 +1819,20 @@ while (this[_](this[B$1]()));
|
|
|
1863
1819
|
}
|
|
1864
1820
|
on(t, e) {
|
|
1865
1821
|
const i = super.on(t, e);
|
|
1866
|
-
return t === "data" && !this.pipes.length && !this.flowing ? this[p]() : t === "readable" && this[s] !== 0 ? super.emit("readable") : V
|
|
1822
|
+
return t === "data" && !this.pipes.length && !this.flowing ? this[p]() : t === "readable" && this[s] !== 0 ? super.emit("readable") : V(t) && this[c] ? (super.emit(t), this.removeAllListeners(t)) : t === "error" && this[E] && (this[d] ? b(() => e.call(this, this[E])) : e.call(this, this[E])), i;
|
|
1867
1823
|
}
|
|
1868
1824
|
get emittedEnd() {
|
|
1869
|
-
return this[c
|
|
1825
|
+
return this[c];
|
|
1870
1826
|
}
|
|
1871
1827
|
[a]() {
|
|
1872
|
-
!this[S] && !this[c
|
|
1828
|
+
!this[S] && !this[c] && !this[n] && this.buffer.length === 0 && this[u] && (this[S] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[w] && this.emit("close"), this[S] = false);
|
|
1873
1829
|
}
|
|
1874
1830
|
emit(t, e, ...i) {
|
|
1875
1831
|
if (t !== "error" && t !== "close" && t !== n && this[n]) return;
|
|
1876
|
-
if (t === "data") return e ? this[d
|
|
1832
|
+
if (t === "data") return e ? this[d] ? b(() => this[D](e)) : this[D](e) : false;
|
|
1877
1833
|
if (t === "end") return this[F]();
|
|
1878
1834
|
if (t === "close") {
|
|
1879
|
-
if (this[w] = true, !this[c
|
|
1835
|
+
if (this[w] = true, !this[c] && !this[n]) return;
|
|
1880
1836
|
const f = super.emit("close");
|
|
1881
1837
|
return this.removeAllListeners("close"), f;
|
|
1882
1838
|
} else if (t === "error") {
|
|
@@ -1893,13 +1849,13 @@ while (this[_](this[B$1]()));
|
|
|
1893
1849
|
const l = super.emit(t, e, ...i);
|
|
1894
1850
|
return this[a](), l;
|
|
1895
1851
|
}
|
|
1896
|
-
[D
|
|
1852
|
+
[D](t) {
|
|
1897
1853
|
for (const i of this.pipes) i.dest.write(t) === false && this.pause();
|
|
1898
1854
|
const e = super.emit("data", t);
|
|
1899
1855
|
return this[a](), e;
|
|
1900
1856
|
}
|
|
1901
1857
|
[F]() {
|
|
1902
|
-
this[c
|
|
1858
|
+
this[c] || (this[c] = true, this.readable = false, this[d] ? b(() => this[R]()) : this[R]());
|
|
1903
1859
|
}
|
|
1904
1860
|
[R]() {
|
|
1905
1861
|
if (this[m]) {
|
|
@@ -1922,7 +1878,7 @@ while (this[_](this[B$1]()));
|
|
|
1922
1878
|
}), e.then(() => t);
|
|
1923
1879
|
}
|
|
1924
1880
|
concat() {
|
|
1925
|
-
return this[r] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this.collect().then((t) => this[r] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this[h
|
|
1881
|
+
return this[r] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this.collect().then((t) => this[r] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this[h] ? t.join("") : Buffer.concat(t, t.dataLength));
|
|
1926
1882
|
}
|
|
1927
1883
|
promise() {
|
|
1928
1884
|
return new Promise((t, e) => {
|
|
@@ -1938,18 +1894,18 @@ while (this[_](this[B$1]()));
|
|
|
1938
1894
|
});
|
|
1939
1895
|
if (this[u]) return Promise.resolve({ done: true });
|
|
1940
1896
|
let i = null, l = null;
|
|
1941
|
-
const f = (g
|
|
1942
|
-
this.removeListener("data", A
|
|
1943
|
-
}, A
|
|
1897
|
+
const f = (g) => {
|
|
1898
|
+
this.removeListener("data", A), this.removeListener("end", O), l(g);
|
|
1899
|
+
}, A = (g) => {
|
|
1944
1900
|
this.removeListener("error", f), this.removeListener("end", O), this.pause(), i({
|
|
1945
|
-
value: g
|
|
1901
|
+
value: g,
|
|
1946
1902
|
done: !!this[u]
|
|
1947
1903
|
});
|
|
1948
1904
|
}, O = () => {
|
|
1949
|
-
this.removeListener("error", f), this.removeListener("data", A
|
|
1950
|
-
}, W
|
|
1951
|
-
return new Promise((g
|
|
1952
|
-
l = z, i = g
|
|
1905
|
+
this.removeListener("error", f), this.removeListener("data", A), i({ done: true });
|
|
1906
|
+
}, W = () => f(/* @__PURE__ */ new Error("stream destroyed"));
|
|
1907
|
+
return new Promise((g, z) => {
|
|
1908
|
+
l = z, i = g, this.once(n, W), this.once("error", f), this.once("end", O), this.once("data", A);
|
|
1953
1909
|
});
|
|
1954
1910
|
} };
|
|
1955
1911
|
}
|
|
@@ -1966,7 +1922,7 @@ while (this[_](this[B$1]()));
|
|
|
1966
1922
|
return this[n] ? (t ? this.emit("error", t) : this.emit(n), this) : (this[n] = true, this.buffer.length = 0, this[s] = 0, typeof this.close == "function" && !this[w] && this.close(), t ? this.emit("error", t) : this.emit(n), this);
|
|
1967
1923
|
}
|
|
1968
1924
|
static isStream(t) {
|
|
1969
|
-
return !!t && (t instanceof q || t instanceof x
|
|
1925
|
+
return !!t && (t instanceof q || t instanceof x || t instanceof Y && (typeof t.pipe == "function" || typeof t.write == "function" && typeof t.end == "function"));
|
|
1970
1926
|
}
|
|
1971
1927
|
}, j;
|
|
1972
1928
|
}
|
|
@@ -1974,8 +1930,8 @@ var C;
|
|
|
1974
1930
|
function J() {
|
|
1975
1931
|
if (C) return i$3;
|
|
1976
1932
|
C = 1;
|
|
1977
|
-
const w = j$1, n = P.Buffer, z = O$2, u = i$3.constants = T(), L = tt(), E = n.concat, c
|
|
1978
|
-
class d
|
|
1933
|
+
const w = j$1, n = P.Buffer, z = O$2, u = i$3.constants = T(), L = tt(), E = n.concat, c = Symbol("_superWrite");
|
|
1934
|
+
class d extends Error {
|
|
1979
1935
|
constructor(s) {
|
|
1980
1936
|
super("zlib: " + s.message), this.code = s.code, this.errno = s.errno, this.code || (this.code = "ZLIB_ERROR"), this.message = "zlib: " + s.message, Error.captureStackTrace(this, this.constructor);
|
|
1981
1937
|
}
|
|
@@ -1983,19 +1939,19 @@ function J() {
|
|
|
1983
1939
|
return "ZlibError";
|
|
1984
1940
|
}
|
|
1985
1941
|
}
|
|
1986
|
-
const Z = Symbol("opts"), p = Symbol("flushFlag"), I
|
|
1987
|
-
class x
|
|
1942
|
+
const Z = Symbol("opts"), p = Symbol("flushFlag"), I = Symbol("finishFlushFlag"), y = Symbol("fullFlushFlag"), t = Symbol("handle"), _ = Symbol("onError"), f = Symbol("sawError"), F = Symbol("level"), S = Symbol("strategy"), g = Symbol("ended");
|
|
1943
|
+
class x extends L {
|
|
1988
1944
|
constructor(s, e) {
|
|
1989
1945
|
if (!s || typeof s != "object") throw new TypeError("invalid options for ZlibBase constructor");
|
|
1990
|
-
super(s), this[f] = false, this[g
|
|
1946
|
+
super(s), this[f] = false, this[g] = false, this[Z] = s, this[p] = s.flush, this[I] = s.finishFlush;
|
|
1991
1947
|
try {
|
|
1992
1948
|
this[t] = new z[e](s);
|
|
1993
1949
|
} catch (i) {
|
|
1994
|
-
throw new d
|
|
1950
|
+
throw new d(i);
|
|
1995
1951
|
}
|
|
1996
1952
|
this[_] = (i) => {
|
|
1997
1953
|
this[f] || (this[f] = true, this.close(), this.emit("error", i));
|
|
1998
|
-
}, this[t].on("error", (i) => this[_](new d
|
|
1954
|
+
}, this[t].on("error", (i) => this[_](new d(i))), this.once("end", () => this.close);
|
|
1999
1955
|
}
|
|
2000
1956
|
close() {
|
|
2001
1957
|
this[t] && (this[t].close(), this[t] = null, this.emit("close"));
|
|
@@ -2007,10 +1963,10 @@ function J() {
|
|
|
2007
1963
|
this.ended || (typeof s != "number" && (s = this[y]), this.write(Object.assign(n.alloc(0), { [p]: s })));
|
|
2008
1964
|
}
|
|
2009
1965
|
end(s, e, i) {
|
|
2010
|
-
return s && this.write(s, e), this.flush(this[I
|
|
1966
|
+
return s && this.write(s, e), this.flush(this[I]), this[g] = true, super.end(null, null, i);
|
|
2011
1967
|
}
|
|
2012
1968
|
get ended() {
|
|
2013
|
-
return this[g
|
|
1969
|
+
return this[g];
|
|
2014
1970
|
}
|
|
2015
1971
|
write(s, e, i) {
|
|
2016
1972
|
if (typeof e == "function" && (i = e, e = "utf8"), typeof s == "string" && (s = n.from(s, e)), this[f]) return;
|
|
@@ -2019,28 +1975,28 @@ function J() {
|
|
|
2019
1975
|
m.close = () => {};
|
|
2020
1976
|
const G = this[t].close;
|
|
2021
1977
|
this[t].close = () => {}, n.concat = (l) => l;
|
|
2022
|
-
let h
|
|
1978
|
+
let h;
|
|
2023
1979
|
try {
|
|
2024
1980
|
const l = typeof s[p] == "number" ? s[p] : this[p];
|
|
2025
|
-
h
|
|
1981
|
+
h = this[t]._processChunk(s, l), n.concat = E;
|
|
2026
1982
|
} catch (l) {
|
|
2027
|
-
n.concat = E, this[_](new d
|
|
1983
|
+
n.concat = E, this[_](new d(l));
|
|
2028
1984
|
} finally {
|
|
2029
1985
|
this[t] && (this[t]._handle = m, m.close = R, this[t].close = G, this[t].removeAllListeners("error"));
|
|
2030
1986
|
}
|
|
2031
|
-
this[t] && this[t].on("error", (l) => this[_](new d
|
|
2032
|
-
let b
|
|
2033
|
-
if (h
|
|
2034
|
-
b
|
|
2035
|
-
for (let l = 1; l < h
|
|
2036
|
-
} else b
|
|
2037
|
-
return i && i(), b
|
|
2038
|
-
}
|
|
2039
|
-
[c
|
|
1987
|
+
this[t] && this[t].on("error", (l) => this[_](new d(l)));
|
|
1988
|
+
let b;
|
|
1989
|
+
if (h) if (Array.isArray(h) && h.length > 0) {
|
|
1990
|
+
b = this[c](n.from(h[0]));
|
|
1991
|
+
for (let l = 1; l < h.length; l++) b = this[c](h[l]);
|
|
1992
|
+
} else b = this[c](n.from(h));
|
|
1993
|
+
return i && i(), b;
|
|
1994
|
+
}
|
|
1995
|
+
[c](s) {
|
|
2040
1996
|
return super.write(s);
|
|
2041
1997
|
}
|
|
2042
1998
|
}
|
|
2043
|
-
class a extends x
|
|
1999
|
+
class a extends x {
|
|
2044
2000
|
constructor(s, e) {
|
|
2045
2001
|
s = s || {}, s.flush = s.flush || u.Z_NO_FLUSH, s.finishFlush = s.finishFlush || u.Z_FINISH, super(s, e), this[y] = u.Z_FULL_FLUSH, this[F] = s.level, this[S] = s.strategy;
|
|
2046
2002
|
}
|
|
@@ -2069,21 +2025,21 @@ function J() {
|
|
|
2069
2025
|
super(s, "Deflate");
|
|
2070
2026
|
}
|
|
2071
2027
|
}
|
|
2072
|
-
class D
|
|
2028
|
+
class D extends a {
|
|
2073
2029
|
constructor(s) {
|
|
2074
2030
|
super(s, "Inflate");
|
|
2075
2031
|
}
|
|
2076
2032
|
}
|
|
2077
|
-
const B
|
|
2033
|
+
const B = Symbol("_portable");
|
|
2078
2034
|
class $ extends a {
|
|
2079
2035
|
constructor(s) {
|
|
2080
|
-
super(s, "Gzip"), this[B
|
|
2036
|
+
super(s, "Gzip"), this[B] = s && !!s.portable;
|
|
2081
2037
|
}
|
|
2082
|
-
[c
|
|
2083
|
-
return this[B
|
|
2038
|
+
[c](s) {
|
|
2039
|
+
return this[B] ? (this[B] = false, s[9] = 255, super[c](s)) : super[c](s);
|
|
2084
2040
|
}
|
|
2085
2041
|
}
|
|
2086
|
-
class N
|
|
2042
|
+
class N extends a {
|
|
2087
2043
|
constructor(s) {
|
|
2088
2044
|
super(s, "Gunzip");
|
|
2089
2045
|
}
|
|
@@ -2093,17 +2049,17 @@ function J() {
|
|
|
2093
2049
|
super(s, "DeflateRaw");
|
|
2094
2050
|
}
|
|
2095
2051
|
}
|
|
2096
|
-
let T$1
|
|
2052
|
+
let T$1 = class T extends a {
|
|
2097
2053
|
constructor(s) {
|
|
2098
2054
|
super(s, "InflateRaw");
|
|
2099
2055
|
}
|
|
2100
2056
|
};
|
|
2101
|
-
class U
|
|
2057
|
+
class U extends a {
|
|
2102
2058
|
constructor(s) {
|
|
2103
2059
|
super(s, "Unzip");
|
|
2104
2060
|
}
|
|
2105
2061
|
}
|
|
2106
|
-
class O extends x
|
|
2062
|
+
class O extends x {
|
|
2107
2063
|
constructor(s, e) {
|
|
2108
2064
|
s = s || {}, s.flush = s.flush || u.BROTLI_OPERATION_PROCESS, s.finishFlush = s.finishFlush || u.BROTLI_OPERATION_FINISH, super(s, e), this[y] = u.BROTLI_OPERATION_FLUSH;
|
|
2109
2065
|
}
|
|
@@ -2113,12 +2069,12 @@ function J() {
|
|
|
2113
2069
|
super(s, "BrotliCompress");
|
|
2114
2070
|
}
|
|
2115
2071
|
}
|
|
2116
|
-
class A
|
|
2072
|
+
class A extends O {
|
|
2117
2073
|
constructor(s) {
|
|
2118
2074
|
super(s, "BrotliDecompress");
|
|
2119
2075
|
}
|
|
2120
2076
|
}
|
|
2121
|
-
return i$3.Deflate = q, i$3.Inflate = D
|
|
2077
|
+
return i$3.Deflate = q, i$3.Inflate = D, i$3.Gzip = $, i$3.Gunzip = N, i$3.DeflateRaw = H, i$3.InflateRaw = T$1, i$3.Unzip = U, typeof z.BrotliCompress == "function" ? (i$3.BrotliCompress = v, i$3.BrotliDecompress = A) : i$3.BrotliCompress = i$3.BrotliDecompress = class {
|
|
2122
2078
|
constructor() {
|
|
2123
2079
|
throw new Error("Brotli is not supported in this version of Node.js");
|
|
2124
2080
|
}
|
|
@@ -2128,26 +2084,26 @@ var O$1, F$2;
|
|
|
2128
2084
|
function rt() {
|
|
2129
2085
|
if (F$2) return O$1;
|
|
2130
2086
|
F$2 = 1;
|
|
2131
|
-
const P
|
|
2132
|
-
return O$1 = P
|
|
2087
|
+
const P = c$4(), $ = E(), v = nt, W = c$3(), G = 1024 * 1024, k = u$3(), C = f$2(), x = J(), { nextTick: j } = nt$1, B = Buffer.from([31, 139]), h = Symbol("state"), d = Symbol("writeEntry"), a = Symbol("readEntry"), I = Symbol("nextEntry"), U = Symbol("processEntry"), l = Symbol("extendedHeader"), y = Symbol("globalExtendedHeader"), c = Symbol("meta"), H = Symbol("emitMeta"), n = Symbol("buffer"), f = Symbol("queue"), u = Symbol("ended"), L = Symbol("emittedEnd"), b = Symbol("emit"), r = Symbol("unzip"), _ = Symbol("consumeChunk"), g = Symbol("consumeChunkSub"), q = Symbol("consumeBody"), z = Symbol("consumeMeta"), Y = Symbol("consumeHeader"), N = Symbol("consuming"), D = Symbol("bufferConcat"), M = Symbol("maybeEnd"), S = Symbol("writing"), m = Symbol("aborted"), T = Symbol("onDone"), E$1 = Symbol("sawValidEntry"), R = Symbol("sawNullBlock"), A = Symbol("sawEOF"), V = Symbol("closeStream"), K = (X) => true;
|
|
2088
|
+
return O$1 = P(class extends v {
|
|
2133
2089
|
constructor(t) {
|
|
2134
|
-
t = t || {}, super(t), this.file = t.file || "", this[E$1
|
|
2135
|
-
(this[h
|
|
2090
|
+
t = t || {}, super(t), this.file = t.file || "", this[E$1] = null, this.on(T, (s) => {
|
|
2091
|
+
(this[h] === "begin" || this[E$1] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
2136
2092
|
}), t.ondone ? this.on(T, t.ondone) : this.on(T, (s) => {
|
|
2137
2093
|
this.emit("prefinish"), this.emit("finish"), this.emit("end");
|
|
2138
|
-
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || G, this.filter = typeof t.filter == "function" ? t.filter : K
|
|
2094
|
+
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || G, this.filter = typeof t.filter == "function" ? t.filter : K;
|
|
2139
2095
|
const i = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
|
|
2140
|
-
this.brotli = !t.gzip && t.brotli !== void 0 ? t.brotli : i ? void 0 : false, this.writable = true, this.readable = false, this[f] = new W
|
|
2096
|
+
this.brotli = !t.gzip && t.brotli !== void 0 ? t.brotli : i ? void 0 : false, this.writable = true, this.readable = false, this[f] = new W(), this[n] = null, this[a] = null, this[d] = null, this[h] = "begin", this[c] = "", this[l] = null, this[y] = null, this[u] = false, this[r] = null, this[m] = false, this[R] = false, this[A] = false, this.on("end", () => this[V]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onentry == "function" && this.on("entry", t.onentry);
|
|
2141
2097
|
}
|
|
2142
2098
|
[Y](t, i) {
|
|
2143
|
-
this[E$1
|
|
2099
|
+
this[E$1] === null && (this[E$1] = false);
|
|
2144
2100
|
let s;
|
|
2145
2101
|
try {
|
|
2146
2102
|
s = new $(t, i, this[l], this[y]);
|
|
2147
2103
|
} catch (o) {
|
|
2148
2104
|
return this.warn("TAR_ENTRY_INVALID", o);
|
|
2149
2105
|
}
|
|
2150
|
-
if (s.nullBlock) this[R] ? (this[A
|
|
2106
|
+
if (s.nullBlock) this[R] ? (this[A] = true, this[h] === "begin" && (this[h] = "header"), this[b]("eof")) : (this[R] = true, this[b]("nullBlock"));
|
|
2151
2107
|
else if (this[R] = false, !s.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: s });
|
|
2152
2108
|
else if (!s.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: s });
|
|
2153
2109
|
else {
|
|
@@ -2155,41 +2111,41 @@ function rt() {
|
|
|
2155
2111
|
if (/^(Symbolic)?Link$/.test(o) && !s.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: s });
|
|
2156
2112
|
else if (!/^(Symbolic)?Link$/.test(o) && s.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: s });
|
|
2157
2113
|
else {
|
|
2158
|
-
const e = this[d
|
|
2159
|
-
if (!this[E$1
|
|
2114
|
+
const e = this[d] = new k(s, this[l], this[y]);
|
|
2115
|
+
if (!this[E$1]) if (e.remain) {
|
|
2160
2116
|
const w = () => {
|
|
2161
|
-
e.invalid || (this[E$1
|
|
2117
|
+
e.invalid || (this[E$1] = true);
|
|
2162
2118
|
};
|
|
2163
2119
|
e.on("end", w);
|
|
2164
|
-
} else this[E$1
|
|
2165
|
-
e.meta ? e.size > this.maxMetaEntrySize ? (e.ignore = true, this[b
|
|
2120
|
+
} else this[E$1] = true;
|
|
2121
|
+
e.meta ? e.size > this.maxMetaEntrySize ? (e.ignore = true, this[b]("ignoredEntry", e), this[h] = "ignore", e.resume()) : e.size > 0 && (this[c] = "", e.on("data", (w) => this[c] += w), this[h] = "meta") : (this[l] = null, e.ignore = e.ignore || !this.filter(e.path, e), e.ignore ? (this[b]("ignoredEntry", e), this[h] = e.remain ? "ignore" : "header", e.resume()) : (e.remain ? this[h] = "body" : (this[h] = "header", e.end()), this[a] ? this[f].push(e) : (this[f].push(e), this[I]())));
|
|
2166
2122
|
}
|
|
2167
2123
|
}
|
|
2168
2124
|
}
|
|
2169
|
-
[V
|
|
2125
|
+
[V]() {
|
|
2170
2126
|
j(() => this.emit("close"));
|
|
2171
2127
|
}
|
|
2172
|
-
[U
|
|
2128
|
+
[U](t) {
|
|
2173
2129
|
let i = true;
|
|
2174
|
-
return t ? Array.isArray(t) ? this.emit.apply(this, t) : (this[a] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", (s) => this[I
|
|
2130
|
+
return t ? Array.isArray(t) ? this.emit.apply(this, t) : (this[a] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", (s) => this[I]()), i = false)) : (this[a] = null, i = false), i;
|
|
2175
2131
|
}
|
|
2176
|
-
[I
|
|
2132
|
+
[I]() {
|
|
2177
2133
|
do ;
|
|
2178
|
-
while (this[U
|
|
2134
|
+
while (this[U](this[f].shift()));
|
|
2179
2135
|
if (!this[f].length) {
|
|
2180
2136
|
const t = this[a];
|
|
2181
2137
|
!t || t.flowing || t.size === t.remain ? this[S] || this.emit("drain") : t.once("drain", (s) => this.emit("drain"));
|
|
2182
2138
|
}
|
|
2183
2139
|
}
|
|
2184
2140
|
[q](t, i) {
|
|
2185
|
-
const s = this[d
|
|
2186
|
-
return s.write(e), s.blockRemain || (this[h
|
|
2141
|
+
const s = this[d], o = s.blockRemain, e = o >= t.length && i === 0 ? t : t.slice(i, i + o);
|
|
2142
|
+
return s.write(e), s.blockRemain || (this[h] = "header", this[d] = null, s.end()), e.length;
|
|
2187
2143
|
}
|
|
2188
2144
|
[z](t, i) {
|
|
2189
|
-
const s = this[d
|
|
2190
|
-
return this[d
|
|
2145
|
+
const s = this[d], o = this[q](t, i);
|
|
2146
|
+
return this[d] || this[H](s), o;
|
|
2191
2147
|
}
|
|
2192
|
-
[b
|
|
2148
|
+
[b](t, i, s) {
|
|
2193
2149
|
!this[f].length && !this[a] ? this.emit(t, i, s) : this[f].push([
|
|
2194
2150
|
t,
|
|
2195
2151
|
i,
|
|
@@ -2197,20 +2153,20 @@ while (this[U$1](this[f].shift()));
|
|
|
2197
2153
|
]);
|
|
2198
2154
|
}
|
|
2199
2155
|
[H](t) {
|
|
2200
|
-
switch (this[b
|
|
2156
|
+
switch (this[b]("meta", this[c]), t.type) {
|
|
2201
2157
|
case "ExtendedHeader":
|
|
2202
2158
|
case "OldExtendedHeader":
|
|
2203
|
-
this[l] = C.parse(this[c
|
|
2159
|
+
this[l] = C.parse(this[c], this[l], false);
|
|
2204
2160
|
break;
|
|
2205
2161
|
case "GlobalExtendedHeader":
|
|
2206
|
-
this[y] = C.parse(this[c
|
|
2162
|
+
this[y] = C.parse(this[c], this[y], true);
|
|
2207
2163
|
break;
|
|
2208
2164
|
case "NextFileHasLongPath":
|
|
2209
2165
|
case "OldGnuLongPath":
|
|
2210
|
-
this[l] = this[l] || Object.create(null), this[l].path = this[c
|
|
2166
|
+
this[l] = this[l] || Object.create(null), this[l].path = this[c].replace(/\0.*/, "");
|
|
2211
2167
|
break;
|
|
2212
2168
|
case "NextFileHasLongLinkpath":
|
|
2213
|
-
this[l] = this[l] || Object.create(null), this[l].linkpath = this[c
|
|
2169
|
+
this[l] = this[l] || Object.create(null), this[l].linkpath = this[c].replace(/\0.*/, "");
|
|
2214
2170
|
break;
|
|
2215
2171
|
default: throw new Error("unknown meta: " + t.type);
|
|
2216
2172
|
}
|
|
@@ -2221,8 +2177,8 @@ while (this[U$1](this[f].shift()));
|
|
|
2221
2177
|
write(t) {
|
|
2222
2178
|
if (this[m]) return;
|
|
2223
2179
|
if ((this[r] === null || this.brotli === void 0 && this[r] === false) && t) {
|
|
2224
|
-
if (this[n] && (t = Buffer.concat([this[n], t]), this[n] = null), t.length < B
|
|
2225
|
-
for (let e = 0; this[r] === null && e < B
|
|
2180
|
+
if (this[n] && (t = Buffer.concat([this[n], t]), this[n] = null), t.length < B.length) return this[n] = t, true;
|
|
2181
|
+
for (let e = 0; this[r] === null && e < B.length; e++) t[e] !== B[e] && (this[r] = false);
|
|
2226
2182
|
const o = this.brotli === void 0;
|
|
2227
2183
|
if (this[r] === false && o) if (t.length < 512) if (this[u]) this.brotli = true;
|
|
2228
2184
|
else return this[n] = t, true;
|
|
@@ -2233,7 +2189,7 @@ while (this[U$1](this[f].shift()));
|
|
|
2233
2189
|
}
|
|
2234
2190
|
if (this[r] === null || this[r] === false && this.brotli) {
|
|
2235
2191
|
const e = this[u];
|
|
2236
|
-
this[u] = false, this[r] = this[r] === null ? new x
|
|
2192
|
+
this[u] = false, this[r] = this[r] === null ? new x.Unzip() : new x.BrotliDecompress(), this[r].on("data", (p) => this[_](p)), this[r].on("error", (p) => this.abort(p)), this[r].on("end", (p) => {
|
|
2237
2193
|
this[u] = true, this[_]();
|
|
2238
2194
|
}), this[S] = true;
|
|
2239
2195
|
const w = this[r][e ? "end" : "write"](t);
|
|
@@ -2244,41 +2200,41 @@ while (this[U$1](this[f].shift()));
|
|
|
2244
2200
|
const s = this[f].length ? false : this[a] ? this[a].flowing : true;
|
|
2245
2201
|
return !s && !this[f].length && this[a].once("drain", (o) => this.emit("drain")), s;
|
|
2246
2202
|
}
|
|
2247
|
-
[D
|
|
2203
|
+
[D](t) {
|
|
2248
2204
|
t && !this[m] && (this[n] = this[n] ? Buffer.concat([this[n], t]) : t);
|
|
2249
2205
|
}
|
|
2250
|
-
[M
|
|
2251
|
-
if (this[u] && !this[L] && !this[m] && !this[N
|
|
2206
|
+
[M]() {
|
|
2207
|
+
if (this[u] && !this[L] && !this[m] && !this[N]) {
|
|
2252
2208
|
this[L] = true;
|
|
2253
|
-
const t = this[d
|
|
2209
|
+
const t = this[d];
|
|
2254
2210
|
if (t && t.blockRemain) {
|
|
2255
2211
|
const i = this[n] ? this[n].length : 0;
|
|
2256
2212
|
this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t.blockRemain} more bytes, only ${i} available)`, { entry: t }), this[n] && t.write(this[n]), t.end();
|
|
2257
2213
|
}
|
|
2258
|
-
this[b
|
|
2214
|
+
this[b](T);
|
|
2259
2215
|
}
|
|
2260
2216
|
}
|
|
2261
2217
|
[_](t) {
|
|
2262
|
-
if (this[N
|
|
2263
|
-
else if (!t && !this[n]) this[M
|
|
2218
|
+
if (this[N]) this[D](t);
|
|
2219
|
+
else if (!t && !this[n]) this[M]();
|
|
2264
2220
|
else {
|
|
2265
|
-
if (this[N
|
|
2266
|
-
this[D
|
|
2221
|
+
if (this[N] = true, this[n]) {
|
|
2222
|
+
this[D](t);
|
|
2267
2223
|
const i = this[n];
|
|
2268
|
-
this[n] = null, this[g
|
|
2269
|
-
} else this[g
|
|
2270
|
-
for (; this[n] && this[n].length >= 512 && !this[m] && !this[A
|
|
2224
|
+
this[n] = null, this[g](i);
|
|
2225
|
+
} else this[g](t);
|
|
2226
|
+
for (; this[n] && this[n].length >= 512 && !this[m] && !this[A];) {
|
|
2271
2227
|
const i = this[n];
|
|
2272
|
-
this[n] = null, this[g
|
|
2228
|
+
this[n] = null, this[g](i);
|
|
2273
2229
|
}
|
|
2274
|
-
this[N
|
|
2230
|
+
this[N] = false;
|
|
2275
2231
|
}
|
|
2276
|
-
(!this[n] || this[u]) && this[M
|
|
2232
|
+
(!this[n] || this[u]) && this[M]();
|
|
2277
2233
|
}
|
|
2278
|
-
[g
|
|
2234
|
+
[g](t) {
|
|
2279
2235
|
let i = 0;
|
|
2280
2236
|
const s = t.length;
|
|
2281
|
-
for (; i + 512 <= s && !this[m] && !this[A
|
|
2237
|
+
for (; i + 512 <= s && !this[m] && !this[A];) switch (this[h]) {
|
|
2282
2238
|
case "begin":
|
|
2283
2239
|
case "header":
|
|
2284
2240
|
this[Y](t, i), i += 512;
|
|
@@ -2290,7 +2246,7 @@ while (this[U$1](this[f].shift()));
|
|
|
2290
2246
|
case "meta":
|
|
2291
2247
|
i += this[z](t, i);
|
|
2292
2248
|
break;
|
|
2293
|
-
default: throw new Error("invalid state: " + this[h
|
|
2249
|
+
default: throw new Error("invalid state: " + this[h]);
|
|
2294
2250
|
}
|
|
2295
2251
|
i < s && (this[n] ? this[n] = Buffer.concat([t.slice(i), this[n]]) : this[n] = t.slice(i));
|
|
2296
2252
|
}
|
|
@@ -2304,20 +2260,20 @@ var v$1;
|
|
|
2304
2260
|
function X() {
|
|
2305
2261
|
if (v$1) return s$4;
|
|
2306
2262
|
v$1 = 1;
|
|
2307
|
-
const H = tt(), I
|
|
2263
|
+
const H = tt(), I = nt.EventEmitter, r = nativeFs;
|
|
2308
2264
|
let R = r.writev;
|
|
2309
2265
|
if (!R) {
|
|
2310
|
-
const c
|
|
2311
|
-
R = (e, i, $, A
|
|
2312
|
-
const G = (J, K
|
|
2313
|
-
j.oncomplete = G, c
|
|
2266
|
+
const c = process.binding("fs"), t = c.FSReqWrap || c.FSReqCallback;
|
|
2267
|
+
R = (e, i, $, A) => {
|
|
2268
|
+
const G = (J, K) => A(J, K, i), j = new t();
|
|
2269
|
+
j.oncomplete = G, c.writeBuffers(e, i, $, j);
|
|
2314
2270
|
};
|
|
2315
2271
|
}
|
|
2316
|
-
const m = Symbol("_autoClose"), h
|
|
2317
|
-
class D
|
|
2272
|
+
const m = Symbol("_autoClose"), h = Symbol("_close"), g = Symbol("_ended"), s = Symbol("_fd"), B = Symbol("_finished"), o = Symbol("_flags"), x = Symbol("_flush"), z = Symbol("_handleChunk"), T = Symbol("_makeBuf"), q = Symbol("_mode"), E = Symbol("_needDrain"), d = Symbol("_onerror"), y = Symbol("_onopen"), W = Symbol("_onread"), _ = Symbol("_onwrite"), a = Symbol("_open"), l = Symbol("_path"), u = Symbol("_pos"), n = Symbol("_queue"), S = Symbol("_read"), M = Symbol("_readSize"), f = Symbol("_reading"), k = Symbol("_remain"), N = Symbol("_size"), C = Symbol("_write"), b = Symbol("_writing"), F = Symbol("_defaultFlag"), p = Symbol("_errored");
|
|
2273
|
+
class D extends H {
|
|
2318
2274
|
constructor(t, e) {
|
|
2319
2275
|
if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
|
|
2320
|
-
this[p] = false, this[s] = typeof e.fd == "number" ? e.fd : null, this[l] = t, this[M
|
|
2276
|
+
this[p] = false, this[s] = typeof e.fd == "number" ? e.fd : null, this[l] = t, this[M] = e.readSize || 16 * 1024 * 1024, this[f] = false, this[N] = typeof e.size == "number" ? e.size : Infinity, this[k] = this[N], this[m] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[s] == "number" ? this[S]() : this[a]();
|
|
2321
2277
|
}
|
|
2322
2278
|
get fd() {
|
|
2323
2279
|
return this[s];
|
|
@@ -2335,34 +2291,34 @@ function X() {
|
|
|
2335
2291
|
r.open(this[l], "r", (t, e) => this[y](t, e));
|
|
2336
2292
|
}
|
|
2337
2293
|
[y](t, e) {
|
|
2338
|
-
t ? this[d
|
|
2294
|
+
t ? this[d](t) : (this[s] = e, this.emit("open", e), this[S]());
|
|
2339
2295
|
}
|
|
2340
2296
|
[T]() {
|
|
2341
|
-
return Buffer.allocUnsafe(Math.min(this[M
|
|
2297
|
+
return Buffer.allocUnsafe(Math.min(this[M], this[k]));
|
|
2342
2298
|
}
|
|
2343
2299
|
[S]() {
|
|
2344
2300
|
if (!this[f]) {
|
|
2345
2301
|
this[f] = true;
|
|
2346
2302
|
const t = this[T]();
|
|
2347
|
-
if (t.length === 0) return process.nextTick(() => this[W
|
|
2348
|
-
r.read(this[s], t, 0, t.length, null, (e, i, $) => this[W
|
|
2303
|
+
if (t.length === 0) return process.nextTick(() => this[W](null, 0, t));
|
|
2304
|
+
r.read(this[s], t, 0, t.length, null, (e, i, $) => this[W](e, i, $));
|
|
2349
2305
|
}
|
|
2350
2306
|
}
|
|
2351
|
-
[W
|
|
2352
|
-
this[f] = false, t ? this[d
|
|
2307
|
+
[W](t, e, i) {
|
|
2308
|
+
this[f] = false, t ? this[d](t) : this[z](e, i) && this[S]();
|
|
2353
2309
|
}
|
|
2354
|
-
[h
|
|
2310
|
+
[h]() {
|
|
2355
2311
|
if (this[m] && typeof this[s] == "number") {
|
|
2356
2312
|
const t = this[s];
|
|
2357
2313
|
this[s] = null, r.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
2358
2314
|
}
|
|
2359
2315
|
}
|
|
2360
|
-
[d
|
|
2361
|
-
this[f] = true, this[h
|
|
2316
|
+
[d](t) {
|
|
2317
|
+
this[f] = true, this[h](), this.emit("error", t);
|
|
2362
2318
|
}
|
|
2363
2319
|
[z](t, e) {
|
|
2364
2320
|
let i = false;
|
|
2365
|
-
return this[k] -= t, t > 0 && (i = super.write(t < e.length ? e.slice(0, t) : e)), (t === 0 || this[k] <= 0) && (i = false, this[h
|
|
2321
|
+
return this[k] -= t, t > 0 && (i = super.write(t < e.length ? e.slice(0, t) : e)), (t === 0 || this[k] <= 0) && (i = false, this[h](), super.end()), i;
|
|
2366
2322
|
}
|
|
2367
2323
|
emit(t, e) {
|
|
2368
2324
|
switch (t) {
|
|
@@ -2376,13 +2332,13 @@ function X() {
|
|
|
2376
2332
|
}
|
|
2377
2333
|
}
|
|
2378
2334
|
}
|
|
2379
|
-
class P
|
|
2335
|
+
class P extends D {
|
|
2380
2336
|
[a]() {
|
|
2381
2337
|
let t = true;
|
|
2382
2338
|
try {
|
|
2383
2339
|
this[y](null, r.openSync(this[l], "r")), t = !1;
|
|
2384
2340
|
} finally {
|
|
2385
|
-
t && this[h
|
|
2341
|
+
t && this[h]();
|
|
2386
2342
|
}
|
|
2387
2343
|
}
|
|
2388
2344
|
[S]() {
|
|
@@ -2398,19 +2354,19 @@ function X() {
|
|
|
2398
2354
|
}
|
|
2399
2355
|
t = !1;
|
|
2400
2356
|
} finally {
|
|
2401
|
-
t && this[h
|
|
2357
|
+
t && this[h]();
|
|
2402
2358
|
}
|
|
2403
2359
|
}
|
|
2404
|
-
[h
|
|
2360
|
+
[h]() {
|
|
2405
2361
|
if (this[m] && typeof this[s] == "number") {
|
|
2406
2362
|
const t = this[s];
|
|
2407
2363
|
this[s] = null, r.closeSync(t), this.emit("close");
|
|
2408
2364
|
}
|
|
2409
2365
|
}
|
|
2410
2366
|
}
|
|
2411
|
-
class O extends I
|
|
2367
|
+
class O extends I {
|
|
2412
2368
|
constructor(t, e) {
|
|
2413
|
-
e = e || {}, super(e), this.readable = false, this.writable = true, this[p] = false, this[b
|
|
2369
|
+
e = e || {}, super(e), this.readable = false, this.writable = true, this[p] = false, this[b] = false, this[g] = false, this[E] = false, this[n] = [], this[l] = t, this[s] = typeof e.fd == "number" ? e.fd : null, this[q] = e.mode === void 0 ? 438 : e.mode, this[u] = typeof e.start == "number" ? e.start : null, this[m] = typeof e.autoClose == "boolean" ? e.autoClose : true;
|
|
2414
2370
|
const i = this[u] !== null ? "r+" : "w";
|
|
2415
2371
|
this[F] = e.flags === void 0, this[o] = this[F] ? i : e.flags, this[s] === null && this[a]();
|
|
2416
2372
|
}
|
|
@@ -2427,43 +2383,43 @@ function X() {
|
|
|
2427
2383
|
get path() {
|
|
2428
2384
|
return this[l];
|
|
2429
2385
|
}
|
|
2430
|
-
[d
|
|
2431
|
-
this[h
|
|
2386
|
+
[d](t) {
|
|
2387
|
+
this[h](), this[b] = true, this.emit("error", t);
|
|
2432
2388
|
}
|
|
2433
2389
|
[a]() {
|
|
2434
2390
|
r.open(this[l], this[o], this[q], (t, e) => this[y](t, e));
|
|
2435
2391
|
}
|
|
2436
2392
|
[y](t, e) {
|
|
2437
|
-
this[F] && this[o] === "r+" && t && t.code === "ENOENT" ? (this[o] = "w", this[a]()) : t ? this[d
|
|
2393
|
+
this[F] && this[o] === "r+" && t && t.code === "ENOENT" ? (this[o] = "w", this[a]()) : t ? this[d](t) : (this[s] = e, this.emit("open", e), this[x]());
|
|
2438
2394
|
}
|
|
2439
2395
|
end(t, e) {
|
|
2440
|
-
return t && this.write(t, e), this[g
|
|
2396
|
+
return t && this.write(t, e), this[g] = true, !this[b] && !this[n].length && typeof this[s] == "number" && this[_](null, 0), this;
|
|
2441
2397
|
}
|
|
2442
2398
|
write(t, e) {
|
|
2443
|
-
return typeof t == "string" && (t = Buffer.from(t, e)), this[g
|
|
2399
|
+
return typeof t == "string" && (t = Buffer.from(t, e)), this[g] ? (this.emit("error", /* @__PURE__ */ new Error("write() after end()")), false) : this[s] === null || this[b] || this[n].length ? (this[n].push(t), this[E] = true, false) : (this[b] = true, this[C](t), true);
|
|
2444
2400
|
}
|
|
2445
2401
|
[C](t) {
|
|
2446
2402
|
r.write(this[s], t, 0, t.length, this[u], (e, i) => this[_](e, i));
|
|
2447
2403
|
}
|
|
2448
2404
|
[_](t, e) {
|
|
2449
|
-
t ? this[d
|
|
2405
|
+
t ? this[d](t) : (this[u] !== null && (this[u] += e), this[n].length ? this[x]() : (this[b] = false, this[g] && !this[B] ? (this[B] = true, this[h](), this.emit("finish")) : this[E] && (this[E] = false, this.emit("drain"))));
|
|
2450
2406
|
}
|
|
2451
|
-
[x
|
|
2452
|
-
if (this[n].length === 0) this[g
|
|
2407
|
+
[x]() {
|
|
2408
|
+
if (this[n].length === 0) this[g] && this[_](null, 0);
|
|
2453
2409
|
else if (this[n].length === 1) this[C](this[n].pop());
|
|
2454
2410
|
else {
|
|
2455
2411
|
const t = this[n];
|
|
2456
2412
|
this[n] = [], R(this[s], t, this[u], (e, i) => this[_](e, i));
|
|
2457
2413
|
}
|
|
2458
2414
|
}
|
|
2459
|
-
[h
|
|
2415
|
+
[h]() {
|
|
2460
2416
|
if (this[m] && typeof this[s] == "number") {
|
|
2461
2417
|
const t = this[s];
|
|
2462
2418
|
this[s] = null, r.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
2463
2419
|
}
|
|
2464
2420
|
}
|
|
2465
2421
|
}
|
|
2466
|
-
class U
|
|
2422
|
+
class U extends O {
|
|
2467
2423
|
[a]() {
|
|
2468
2424
|
let t;
|
|
2469
2425
|
if (this[F] && this[o] === "r+") try {
|
|
@@ -2475,7 +2431,7 @@ function X() {
|
|
|
2475
2431
|
else t = r.openSync(this[l], this[o], this[q]);
|
|
2476
2432
|
this[y](null, t);
|
|
2477
2433
|
}
|
|
2478
|
-
[h
|
|
2434
|
+
[h]() {
|
|
2479
2435
|
if (this[m] && typeof this[s] == "number") {
|
|
2480
2436
|
const t = this[s];
|
|
2481
2437
|
this[s] = null, r.closeSync(t), this.emit("close");
|
|
@@ -2487,12 +2443,12 @@ function X() {
|
|
|
2487
2443
|
this[_](null, r.writeSync(this[s], t, 0, t.length, this[u])), e = !1;
|
|
2488
2444
|
} finally {
|
|
2489
2445
|
if (e) try {
|
|
2490
|
-
this[h
|
|
2446
|
+
this[h]();
|
|
2491
2447
|
} catch {}
|
|
2492
2448
|
}
|
|
2493
2449
|
}
|
|
2494
2450
|
}
|
|
2495
|
-
return s$4.ReadStream = D
|
|
2451
|
+
return s$4.ReadStream = D, s$4.ReadStreamSync = P, s$4.WriteStream = O, s$4.WriteStreamSync = U, s$4;
|
|
2496
2452
|
}
|
|
2497
2453
|
var r$1 = { exports: {} };
|
|
2498
2454
|
var i$2, m$2;
|
|
@@ -2546,11 +2502,11 @@ var i$1, c$2;
|
|
|
2546
2502
|
function t() {
|
|
2547
2503
|
if (c$2) return i$1;
|
|
2548
2504
|
c$2 = 1;
|
|
2549
|
-
const { dirname: u } = path, f = (r, e, n = void 0) => n === e ? Promise.resolve() : r.statAsync(e).then((d
|
|
2505
|
+
const { dirname: u } = path, f = (r, e, n = void 0) => n === e ? Promise.resolve() : r.statAsync(e).then((d) => d.isDirectory() ? n : void 0, (d) => d.code === "ENOENT" ? f(r, u(e), e) : void 0), o = (r, e, n = void 0) => {
|
|
2550
2506
|
if (n !== e) try {
|
|
2551
2507
|
return r.statSync(e).isDirectory() ? n : void 0;
|
|
2552
|
-
} catch (d
|
|
2553
|
-
return d
|
|
2508
|
+
} catch (d) {
|
|
2509
|
+
return d.code === "ENOENT" ? o(r, u(e), e) : void 0;
|
|
2554
2510
|
}
|
|
2555
2511
|
};
|
|
2556
2512
|
return i$1 = {
|
|
@@ -2562,22 +2518,22 @@ var o$3, a$4;
|
|
|
2562
2518
|
function y$2() {
|
|
2563
2519
|
if (a$4) return o$3;
|
|
2564
2520
|
a$4 = 1;
|
|
2565
|
-
const { dirname: f } = path, t = (n, e, c
|
|
2521
|
+
const { dirname: f } = path, t = (n, e, c) => {
|
|
2566
2522
|
e.recursive = false;
|
|
2567
2523
|
const i = f(n);
|
|
2568
2524
|
return i === n ? e.mkdirAsync(n, e).catch((r) => {
|
|
2569
2525
|
if (r.code !== "EISDIR") throw r;
|
|
2570
|
-
}) : e.mkdirAsync(n, e).then(() => c
|
|
2526
|
+
}) : e.mkdirAsync(n, e).then(() => c || n, (r) => {
|
|
2571
2527
|
if (r.code === "ENOENT") return t(i, e).then((u) => t(n, e, u));
|
|
2572
2528
|
if (r.code !== "EEXIST" && r.code !== "EROFS") throw r;
|
|
2573
2529
|
return e.statAsync(n).then((u) => {
|
|
2574
|
-
if (u.isDirectory()) return c
|
|
2530
|
+
if (u.isDirectory()) return c;
|
|
2575
2531
|
throw r;
|
|
2576
2532
|
}, () => {
|
|
2577
2533
|
throw r;
|
|
2578
2534
|
});
|
|
2579
2535
|
});
|
|
2580
|
-
}, d
|
|
2536
|
+
}, d = (n, e, c) => {
|
|
2581
2537
|
const i = f(n);
|
|
2582
2538
|
if (e.recursive = false, i === n) try {
|
|
2583
2539
|
return e.mkdirSync(n, e);
|
|
@@ -2586,9 +2542,9 @@ function y$2() {
|
|
|
2586
2542
|
return;
|
|
2587
2543
|
}
|
|
2588
2544
|
try {
|
|
2589
|
-
return e.mkdirSync(n, e), c
|
|
2545
|
+
return e.mkdirSync(n, e), c || n;
|
|
2590
2546
|
} catch (r) {
|
|
2591
|
-
if (r.code === "ENOENT") return d
|
|
2547
|
+
if (r.code === "ENOENT") return d(n, e, d(i, e, c));
|
|
2592
2548
|
if (r.code !== "EEXIST" && r.code !== "EROFS") throw r;
|
|
2593
2549
|
try {
|
|
2594
2550
|
if (!e.statSync(n).isDirectory()) throw r;
|
|
@@ -2599,16 +2555,16 @@ function y$2() {
|
|
|
2599
2555
|
};
|
|
2600
2556
|
return o$3 = {
|
|
2601
2557
|
mkdirpManual: t,
|
|
2602
|
-
mkdirpManualSync: d
|
|
2558
|
+
mkdirpManualSync: d
|
|
2603
2559
|
}, o$3;
|
|
2604
2560
|
}
|
|
2605
2561
|
var c$1, m$1;
|
|
2606
2562
|
function s$3() {
|
|
2607
2563
|
if (m$1) return c$1;
|
|
2608
2564
|
m$1 = 1;
|
|
2609
|
-
const { dirname: u } = path, { findMade: d
|
|
2565
|
+
const { dirname: u } = path, { findMade: d, findMadeSync: t$1 } = t(), { mkdirpManual: a, mkdirpManualSync: k } = y$2();
|
|
2610
2566
|
return c$1 = {
|
|
2611
|
-
mkdirpNative: (e, r) => (r.recursive = true, u(e) === e ? r.mkdirAsync(e, r) : d
|
|
2567
|
+
mkdirpNative: (e, r) => (r.recursive = true, u(e) === e ? r.mkdirAsync(e, r) : d(r, e).then((n) => r.mkdirAsync(e, r).then(() => n).catch((i) => {
|
|
2612
2568
|
if (i.code === "ENOENT") return a(e, r);
|
|
2613
2569
|
throw i;
|
|
2614
2570
|
}))),
|
|
@@ -2638,70 +2594,70 @@ var m, s$1;
|
|
|
2638
2594
|
function S() {
|
|
2639
2595
|
if (s$1) return m;
|
|
2640
2596
|
s$1 = 1;
|
|
2641
|
-
const i = t$2(), u = u$2(), { mkdirpNative: a, mkdirpNativeSync: c
|
|
2642
|
-
return n.sync = d
|
|
2597
|
+
const i = t$2(), u = u$2(), { mkdirpNative: a, mkdirpNativeSync: c } = s$3(), { mkdirpManual: o, mkdirpManualSync: q } = y$2(), { useNative: t, useNativeSync: _ } = a$3(), n = (e, r) => (e = u(e), r = i(r), t(r) ? a(e, r) : o(e, r)), d = (e, r) => (e = u(e), r = i(r), _(r) ? c(e, r) : q(e, r));
|
|
2598
|
+
return n.sync = d, n.native = (e, r) => a(u(e), i(r)), n.manual = (e, r) => o(u(e), i(r)), n.nativeSync = (e, r) => c(u(e), i(r)), n.manualSync = (e, r) => q(u(e), i(r)), m = n, m;
|
|
2643
2599
|
}
|
|
2644
2600
|
var y$1, O;
|
|
2645
2601
|
function F$1() {
|
|
2646
2602
|
if (O) return y$1;
|
|
2647
2603
|
O = 1;
|
|
2648
|
-
const c
|
|
2604
|
+
const c = nativeFs, a = path, T = c.lchown ? "lchown" : "chown", I = c.lchownSync ? "lchownSync" : "chownSync", i = c.lchown && !process.version.match(/v1[1-9]+\./) && !process.version.match(/v10\.[6-9]/), u = (r, e, n) => {
|
|
2649
2605
|
try {
|
|
2650
|
-
return c
|
|
2606
|
+
return c[I](r, e, n);
|
|
2651
2607
|
} catch (t) {
|
|
2652
2608
|
if (t.code !== "ENOENT") throw t;
|
|
2653
2609
|
}
|
|
2654
|
-
}, D
|
|
2610
|
+
}, D = (r, e, n) => {
|
|
2655
2611
|
try {
|
|
2656
|
-
return c
|
|
2612
|
+
return c.chownSync(r, e, n);
|
|
2657
2613
|
} catch (t) {
|
|
2658
2614
|
if (t.code !== "ENOENT") throw t;
|
|
2659
2615
|
}
|
|
2660
2616
|
}, _ = i ? (r, e, n, t) => (o) => {
|
|
2661
|
-
!o || o.code !== "EISDIR" ? t(o) : c
|
|
2617
|
+
!o || o.code !== "EISDIR" ? t(o) : c.chown(r, e, n, t);
|
|
2662
2618
|
} : (r, e, n, t) => t, w = i ? (r, e, n) => {
|
|
2663
2619
|
try {
|
|
2664
2620
|
return u(r, e, n);
|
|
2665
2621
|
} catch (t) {
|
|
2666
2622
|
if (t.code !== "EISDIR") throw t;
|
|
2667
|
-
D
|
|
2623
|
+
D(r, e, n);
|
|
2668
2624
|
}
|
|
2669
2625
|
} : (r, e, n) => u(r, e, n), R = process.version;
|
|
2670
|
-
let N
|
|
2671
|
-
/^v4\./.test(R) && (N
|
|
2672
|
-
const h
|
|
2673
|
-
c
|
|
2626
|
+
let N = (r, e, n) => c.readdir(r, e, n), q = (r, e) => c.readdirSync(r, e);
|
|
2627
|
+
/^v4\./.test(R) && (N = (r, e, n) => c.readdir(r, n));
|
|
2628
|
+
const h = (r, e, n, t) => {
|
|
2629
|
+
c[T](r, e, n, _(r, e, n, (o) => {
|
|
2674
2630
|
t(o && o.code !== "ENOENT" ? o : null);
|
|
2675
2631
|
}));
|
|
2676
2632
|
}, S = (r, e, n, t, o) => {
|
|
2677
|
-
if (typeof e == "string") return c
|
|
2633
|
+
if (typeof e == "string") return c.lstat(a.resolve(r, e), (s, f) => {
|
|
2678
2634
|
if (s) return o(s.code !== "ENOENT" ? s : null);
|
|
2679
2635
|
f.name = e, S(r, f, n, t, o);
|
|
2680
2636
|
});
|
|
2681
2637
|
if (e.isDirectory()) E(a.resolve(r, e.name), n, t, (s) => {
|
|
2682
2638
|
if (s) return o(s);
|
|
2683
|
-
h
|
|
2639
|
+
h(a.resolve(r, e.name), n, t, o);
|
|
2684
2640
|
});
|
|
2685
|
-
else h
|
|
2641
|
+
else h(a.resolve(r, e.name), n, t, o);
|
|
2686
2642
|
}, E = (r, e, n, t) => {
|
|
2687
|
-
N
|
|
2643
|
+
N(r, { withFileTypes: true }, (o, s) => {
|
|
2688
2644
|
if (o) {
|
|
2689
2645
|
if (o.code === "ENOENT") return t();
|
|
2690
2646
|
if (o.code !== "ENOTDIR" && o.code !== "ENOTSUP") return t(o);
|
|
2691
2647
|
}
|
|
2692
|
-
if (o || !s.length) return h
|
|
2648
|
+
if (o || !s.length) return h(r, e, n, t);
|
|
2693
2649
|
let f = s.length, v = null;
|
|
2694
2650
|
const H = (l) => {
|
|
2695
2651
|
if (!v) {
|
|
2696
2652
|
if (l) return t(v = l);
|
|
2697
|
-
if (--f === 0) return h
|
|
2653
|
+
if (--f === 0) return h(r, e, n, t);
|
|
2698
2654
|
}
|
|
2699
2655
|
};
|
|
2700
2656
|
s.forEach((l) => S(r, l, e, n, H));
|
|
2701
2657
|
});
|
|
2702
2658
|
}, C = (r, e, n, t) => {
|
|
2703
2659
|
if (typeof e == "string") try {
|
|
2704
|
-
const o = c
|
|
2660
|
+
const o = c.lstatSync(a.resolve(r, e));
|
|
2705
2661
|
o.name = e, e = o;
|
|
2706
2662
|
} catch (o) {
|
|
2707
2663
|
if (o.code === "ENOENT") return;
|
|
@@ -2725,8 +2681,8 @@ var R;
|
|
|
2725
2681
|
function H() {
|
|
2726
2682
|
if (R) return r$1.exports;
|
|
2727
2683
|
R = 1;
|
|
2728
|
-
const g
|
|
2729
|
-
class D
|
|
2684
|
+
const g = S(), l = nativeFs, p = path, x = F$1(), y = a$7();
|
|
2685
|
+
class D extends Error {
|
|
2730
2686
|
constructor(e, s) {
|
|
2731
2687
|
super("Cannot extract through symbolic link"), this.path = s, this.symlink = e;
|
|
2732
2688
|
}
|
|
@@ -2742,39 +2698,39 @@ function H() {
|
|
|
2742
2698
|
return "CwdError";
|
|
2743
2699
|
}
|
|
2744
2700
|
}
|
|
2745
|
-
const v = (n, e) => n.get(y(e)), q = (n, e, s) => n.set(y(e), s), I
|
|
2701
|
+
const v = (n, e) => n.get(y(e)), q = (n, e, s) => n.set(y(e), s), I = (n, e) => {
|
|
2746
2702
|
l.stat(n, (s, r) => {
|
|
2747
2703
|
(s || !r.isDirectory()) && (s = new E(n, s && s.code || "ENOTDIR")), e(s);
|
|
2748
2704
|
});
|
|
2749
2705
|
};
|
|
2750
2706
|
r$1.exports = (n, e, s) => {
|
|
2751
2707
|
n = y(n);
|
|
2752
|
-
const r = e.umask, c
|
|
2753
|
-
k ? s(k) : (q(h
|
|
2708
|
+
const r = e.umask, c = e.mode | 448, f = (c & r) !== 0, t = e.uid, i = e.gid, a = typeof t == "number" && typeof i == "number" && (t !== e.processUid || i !== e.processGid), u = e.preserve, m = e.unlink, h = e.cache, d = y(e.cwd), w = (k, o) => {
|
|
2709
|
+
k ? s(k) : (q(h, n, true), o && a ? x(o, t, i, (G) => w(G)) : f ? l.chmod(n, c, s) : s());
|
|
2754
2710
|
};
|
|
2755
|
-
if (h
|
|
2756
|
-
if (n === d
|
|
2757
|
-
if (u) return g
|
|
2758
|
-
C(d
|
|
2711
|
+
if (h && v(h, n) === true) return w();
|
|
2712
|
+
if (n === d) return I(n, w);
|
|
2713
|
+
if (u) return g(n, { mode: c }).then((k) => w(null, k), w);
|
|
2714
|
+
C(d, y(p.relative(d, n)).split("/"), c, h, m, d, null, w);
|
|
2759
2715
|
};
|
|
2760
|
-
const C = (n, e, s, r, c
|
|
2716
|
+
const C = (n, e, s, r, c, f, t, i) => {
|
|
2761
2717
|
if (!e.length) return i(null, t);
|
|
2762
2718
|
const a = e.shift(), u = y(p.resolve(n + "/" + a));
|
|
2763
|
-
if (v(r, u)) return C(u, e, s, r, c
|
|
2764
|
-
l.mkdir(u, s, j(u, e, s, r, c
|
|
2765
|
-
}, j = (n, e, s, r, c
|
|
2719
|
+
if (v(r, u)) return C(u, e, s, r, c, f, t, i);
|
|
2720
|
+
l.mkdir(u, s, j(u, e, s, r, c, f, t, i));
|
|
2721
|
+
}, j = (n, e, s, r, c, f, t, i) => (a) => {
|
|
2766
2722
|
a ? l.lstat(n, (u, m) => {
|
|
2767
2723
|
if (u) u.path = u.path && y(u.path), i(u);
|
|
2768
|
-
else if (m.isDirectory()) C(n, e, s, r, c
|
|
2769
|
-
else if (c
|
|
2770
|
-
if (h
|
|
2771
|
-
l.mkdir(n, s, j(n, e, s, r, c
|
|
2724
|
+
else if (m.isDirectory()) C(n, e, s, r, c, f, t, i);
|
|
2725
|
+
else if (c) l.unlink(n, (h) => {
|
|
2726
|
+
if (h) return i(h);
|
|
2727
|
+
l.mkdir(n, s, j(n, e, s, r, c, f, t, i));
|
|
2772
2728
|
});
|
|
2773
2729
|
else {
|
|
2774
|
-
if (m.isSymbolicLink()) return i(new D
|
|
2730
|
+
if (m.isSymbolicLink()) return i(new D(n, n + "/" + e.join("/")));
|
|
2775
2731
|
i(a);
|
|
2776
2732
|
}
|
|
2777
|
-
}) : (t = t || n, C(n, e, s, r, c
|
|
2733
|
+
}) : (t = t || n, C(n, e, s, r, c, f, t, i));
|
|
2778
2734
|
}, L = (n) => {
|
|
2779
2735
|
let e = false, s = "ENOTDIR";
|
|
2780
2736
|
try {
|
|
@@ -2787,27 +2743,27 @@ function H() {
|
|
|
2787
2743
|
};
|
|
2788
2744
|
return r$1.exports.sync = (n, e) => {
|
|
2789
2745
|
n = y(n);
|
|
2790
|
-
const s = e.umask, r = e.mode | 448, c
|
|
2791
|
-
q(m, n, true), k && i && x
|
|
2746
|
+
const s = e.umask, r = e.mode | 448, c = (r & s) !== 0, f = e.uid, t = e.gid, i = typeof f == "number" && typeof t == "number" && (f !== e.processUid || t !== e.processGid), a = e.preserve, u = e.unlink, m = e.cache, h = y(e.cwd), d = (k) => {
|
|
2747
|
+
q(m, n, true), k && i && x.sync(k, f, t), c && l.chmodSync(n, r);
|
|
2792
2748
|
};
|
|
2793
|
-
if (m && v(m, n) === true) return d
|
|
2794
|
-
if (n === h
|
|
2795
|
-
if (a) return d
|
|
2796
|
-
const $ = y(p.relative(h
|
|
2749
|
+
if (m && v(m, n) === true) return d();
|
|
2750
|
+
if (n === h) return L(h), d();
|
|
2751
|
+
if (a) return d(g.sync(n, r));
|
|
2752
|
+
const $ = y(p.relative(h, n)).split("/");
|
|
2797
2753
|
let S = null;
|
|
2798
|
-
for (let k = $.shift(), o = h
|
|
2754
|
+
for (let k = $.shift(), o = h; k && (o += "/" + k); k = $.shift()) if (o = y(p.resolve(o)), !v(m, o)) try {
|
|
2799
2755
|
l.mkdirSync(o, r), S = S || o, q(m, o, !0);
|
|
2800
2756
|
} catch {
|
|
2801
|
-
const M
|
|
2802
|
-
if (M
|
|
2757
|
+
const M = l.lstatSync(o);
|
|
2758
|
+
if (M.isDirectory()) {
|
|
2803
2759
|
q(m, o, true);
|
|
2804
2760
|
continue;
|
|
2805
2761
|
} else if (u) {
|
|
2806
2762
|
l.unlinkSync(o), l.mkdirSync(o, r), S = S || o, q(m, o, true);
|
|
2807
2763
|
continue;
|
|
2808
|
-
} else if (M
|
|
2764
|
+
} else if (M.isSymbolicLink()) return new D(o, o + "/" + $.join("/"));
|
|
2809
2765
|
}
|
|
2810
|
-
return d
|
|
2766
|
+
return d(S);
|
|
2811
2767
|
}, r$1.exports;
|
|
2812
2768
|
}
|
|
2813
2769
|
var a$2, i;
|
|
@@ -2820,10 +2776,10 @@ function p() {
|
|
|
2820
2776
|
">",
|
|
2821
2777
|
"?",
|
|
2822
2778
|
":"
|
|
2823
|
-
], t = o.map((e) => String.fromCharCode(61440 + e.charCodeAt(0))), s = new Map(o.map((e, r) => [e, t[r]])), c
|
|
2779
|
+
], t = o.map((e) => String.fromCharCode(61440 + e.charCodeAt(0))), s = new Map(o.map((e, r) => [e, t[r]])), c = new Map(t.map((e, r) => [e, o[r]]));
|
|
2824
2780
|
return a$2 = {
|
|
2825
2781
|
encode: (e) => o.reduce((r, n) => r.split(n).join(s.get(n)), e),
|
|
2826
|
-
decode: (e) => t.reduce((r, n) => r.split(n).join(c
|
|
2782
|
+
decode: (e) => t.reduce((r, n) => r.split(n).join(c.get(n)), e)
|
|
2827
2783
|
}, a$2;
|
|
2828
2784
|
}
|
|
2829
2785
|
var o$2, n;
|
|
@@ -2845,21 +2801,21 @@ var u$1, f$1;
|
|
|
2845
2801
|
function z() {
|
|
2846
2802
|
if (f$1) return u$1;
|
|
2847
2803
|
f$1 = 1;
|
|
2848
|
-
const l = j$1, m = a$1(), g
|
|
2804
|
+
const l = j$1, m = a$1(), g = s(), { join: d } = path, q = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
2849
2805
|
return u$1 = () => {
|
|
2850
|
-
const i = /* @__PURE__ */ new Map(), c
|
|
2851
|
-
const s = c
|
|
2806
|
+
const i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), v = (e) => e.split("/").slice(0, -1).reduce((o, r) => (o.length && (r = d(o[o.length - 1], r)), o.push(r || "/"), o), []), a = /* @__PURE__ */ new Set(), w = (e) => {
|
|
2807
|
+
const s = c.get(e);
|
|
2852
2808
|
if (!s) throw new Error("function does not have any path reservations");
|
|
2853
2809
|
return {
|
|
2854
2810
|
paths: s.paths.map((o) => i.get(o)),
|
|
2855
2811
|
dirs: [...s.dirs].map((o) => i.get(o))
|
|
2856
2812
|
};
|
|
2857
|
-
}, h
|
|
2813
|
+
}, h = (e) => {
|
|
2858
2814
|
const { paths: s, dirs: o } = w(e);
|
|
2859
2815
|
return s.every((r) => r[0] === e) && o.every((r) => r[0] instanceof Set && r[0].has(e));
|
|
2860
|
-
}, p = (e) => a.has(e) || !h
|
|
2816
|
+
}, p = (e) => a.has(e) || !h(e) ? false : (a.add(e), e(() => S(e)), true), S = (e) => {
|
|
2861
2817
|
if (!a.has(e)) return false;
|
|
2862
|
-
const { paths: s, dirs: o } = c
|
|
2818
|
+
const { paths: s, dirs: o } = c.get(e), r = /* @__PURE__ */ new Set();
|
|
2863
2819
|
return s.forEach((t) => {
|
|
2864
2820
|
const n = i.get(t);
|
|
2865
2821
|
l.equal(n[0], e), n.length === 1 ? i.delete(t) : (n.shift(), typeof n[0] == "function" ? r.add(n[0]) : n[0].forEach((E) => r.add(E)));
|
|
@@ -2869,11 +2825,11 @@ function z() {
|
|
|
2869
2825
|
}), a.delete(e), r.forEach((t) => p(t)), true;
|
|
2870
2826
|
};
|
|
2871
2827
|
return {
|
|
2872
|
-
check: h
|
|
2828
|
+
check: h,
|
|
2873
2829
|
reserve: (e, s) => {
|
|
2874
|
-
e = q ? ["win32 parallelization disabled"] : e.map((r) => g
|
|
2830
|
+
e = q ? ["win32 parallelization disabled"] : e.map((r) => g(d(m(r))).toLowerCase());
|
|
2875
2831
|
const o = new Set(e.map((r) => v(r)).reduce((r, t) => r.concat(t)));
|
|
2876
|
-
return c
|
|
2832
|
+
return c.set(s, {
|
|
2877
2833
|
dirs: o,
|
|
2878
2834
|
paths: e
|
|
2879
2835
|
}), e.forEach((r) => {
|
|
@@ -2905,14 +2861,14 @@ var e, o;
|
|
|
2905
2861
|
function F() {
|
|
2906
2862
|
if (o) return e;
|
|
2907
2863
|
o = 1;
|
|
2908
|
-
const t = process.env.__FAKE_PLATFORM__ || process.platform, s = typeof Bun < "u" ? false : t === "win32", { O_CREAT: _, O_TRUNC: a, O_WRONLY: i, UV_FS_O_FILEMAP: r = 0 } = (commonjsGlobal.__FAKE_TESTING_FS__ || nativeFs).constants, c
|
|
2909
|
-
return e = c
|
|
2864
|
+
const t = process.env.__FAKE_PLATFORM__ || process.platform, s = typeof Bun < "u" ? false : t === "win32", { O_CREAT: _, O_TRUNC: a, O_WRONLY: i, UV_FS_O_FILEMAP: r = 0 } = (commonjsGlobal.__FAKE_TESTING_FS__ || nativeFs).constants, c = s && !!r, f = 512 * 1024, p = r | a | _ | i;
|
|
2865
|
+
return e = c ? (l) => l < f ? p : "w" : () => "w", e;
|
|
2910
2866
|
}
|
|
2911
2867
|
var G, y;
|
|
2912
2868
|
function Os() {
|
|
2913
2869
|
if (y) return G;
|
|
2914
2870
|
y = 1;
|
|
2915
|
-
const ss = j$1, is = rt(), r = nativeFs, es = X(), w = path, M
|
|
2871
|
+
const ss = j$1, is = rt(), r = nativeFs, es = X(), w = path, M = H(), K = p(), ts = z(), os = c$5(), l = a$7(), rs = s(), hs = a$1(), H$1 = Symbol("onEntry"), q = Symbol("checkFs"), Y = Symbol("checkFs2"), v = Symbol("pruneCache"), N = Symbol("isReusable"), d = Symbol("makeFs"), U = Symbol("file"), F$1 = Symbol("directory"), O = Symbol("link"), B = Symbol("symlink"), z$1 = Symbol("hardlink"), W = Symbol("unsupported"), j = Symbol("checkPath"), b = Symbol("mkdir"), m = Symbol("onError"), $ = Symbol("pending"), V$1 = Symbol("pend"), S = Symbol("unpend"), P = Symbol("ended"), A = Symbol("maybeClose"), x = Symbol("skip"), E = Symbol("doChown"), R = Symbol("uid"), _ = Symbol("gid"), g = Symbol("checkedCwd"), X$1 = Ds, J = F(), C = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32", cs = 1024, as = (a, s) => {
|
|
2916
2872
|
if (!C) return r.unlink(a, s);
|
|
2917
2873
|
const i = a + ".DELETE." + X$1.randomBytes(16).toString("hex");
|
|
2918
2874
|
r.rename(a, i, (e) => {
|
|
@@ -2935,8 +2891,8 @@ function Os() {
|
|
|
2935
2891
|
class L extends is {
|
|
2936
2892
|
constructor(s) {
|
|
2937
2893
|
if (s || (s = {}), s.ondone = (i) => {
|
|
2938
|
-
this[P
|
|
2939
|
-
}, super(s), this[g
|
|
2894
|
+
this[P] = true, this[A]();
|
|
2895
|
+
}, super(s), this[g] = false, this.reservations = ts(), this.transform = typeof s.transform == "function" ? s.transform : null, this.writable = true, this.readable = false, this[$] = 0, this[P] = false, this.dirCache = s.dirCache || /* @__PURE__ */ new Map(), typeof s.uid == "number" || typeof s.gid == "number") {
|
|
2940
2896
|
if (typeof s.uid != "number" || typeof s.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
|
|
2941
2897
|
if (s.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
2942
2898
|
this.uid = s.uid, this.gid = s.gid, this.setOwner = true;
|
|
@@ -2946,8 +2902,8 @@ function Os() {
|
|
|
2946
2902
|
warn(s, i, e = {}) {
|
|
2947
2903
|
return (s === "TAR_BAD_ARCHIVE" || s === "TAR_ABORT") && (e.recoverable = false), super.warn(s, i, e);
|
|
2948
2904
|
}
|
|
2949
|
-
[A
|
|
2950
|
-
this[P
|
|
2905
|
+
[A]() {
|
|
2906
|
+
this[P] && this[$] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
|
|
2951
2907
|
}
|
|
2952
2908
|
[j](s) {
|
|
2953
2909
|
const i = l(s.path), e = i.split("/");
|
|
@@ -2971,7 +2927,7 @@ function Os() {
|
|
|
2971
2927
|
entry: s,
|
|
2972
2928
|
path: i
|
|
2973
2929
|
}), false;
|
|
2974
|
-
const [t, o] = os
|
|
2930
|
+
const [t, o] = os(i);
|
|
2975
2931
|
t && (s.path = o, this.warn("TAR_ENTRY_INFO", `stripping ${t} from absolute path`, {
|
|
2976
2932
|
entry: s,
|
|
2977
2933
|
path: i
|
|
@@ -2986,9 +2942,9 @@ function Os() {
|
|
|
2986
2942
|
if (s.absolute === this.cwd && s.type !== "Directory" && s.type !== "GNUDumpDir") return false;
|
|
2987
2943
|
if (this.win32) {
|
|
2988
2944
|
const { root: t } = w.win32.parse(s.absolute);
|
|
2989
|
-
s.absolute = t + K
|
|
2945
|
+
s.absolute = t + K.encode(s.absolute.slice(t.length));
|
|
2990
2946
|
const { root: o } = w.win32.parse(s.path);
|
|
2991
|
-
s.path = o + K
|
|
2947
|
+
s.path = o + K.encode(s.path.slice(o.length));
|
|
2992
2948
|
}
|
|
2993
2949
|
return true;
|
|
2994
2950
|
}
|
|
@@ -3002,17 +2958,14 @@ function Os() {
|
|
|
3002
2958
|
case "ContiguousFile":
|
|
3003
2959
|
case "Link":
|
|
3004
2960
|
case "SymbolicLink": return this[q](s);
|
|
3005
|
-
|
|
3006
|
-
case "BlockDevice":
|
|
3007
|
-
case "FIFO":
|
|
3008
|
-
default: return this[W$1](s);
|
|
2961
|
+
default: return this[W](s);
|
|
3009
2962
|
}
|
|
3010
2963
|
}
|
|
3011
2964
|
[m](s, i) {
|
|
3012
2965
|
s.name === "CwdError" ? this.emit("error", s) : (this.warn("TAR_ENTRY_ERROR", s, { entry: i }), this[S](), i.resume());
|
|
3013
2966
|
}
|
|
3014
|
-
[b
|
|
3015
|
-
M
|
|
2967
|
+
[b](s, i, e) {
|
|
2968
|
+
M(l(s), {
|
|
3016
2969
|
uid: this.uid,
|
|
3017
2970
|
gid: this.gid,
|
|
3018
2971
|
processUid: this.processUid,
|
|
@@ -3035,65 +2988,65 @@ function Os() {
|
|
|
3035
2988
|
[_](s) {
|
|
3036
2989
|
return Q(this.gid, s.gid, this.processGid);
|
|
3037
2990
|
}
|
|
3038
|
-
[U
|
|
2991
|
+
[U](s, i) {
|
|
3039
2992
|
const e = s.mode & 4095 || this.fmode, t = new es.WriteStream(s.absolute, {
|
|
3040
2993
|
flags: J(s.size),
|
|
3041
2994
|
mode: e,
|
|
3042
2995
|
autoClose: false
|
|
3043
2996
|
});
|
|
3044
|
-
t.on("error", (c
|
|
3045
|
-
t.fd && r.close(t.fd, () => {}), t.write = () => true, this[m](c
|
|
2997
|
+
t.on("error", (c) => {
|
|
2998
|
+
t.fd && r.close(t.fd, () => {}), t.write = () => true, this[m](c, s), i();
|
|
3046
2999
|
});
|
|
3047
3000
|
let o = 1;
|
|
3048
|
-
const u = (c
|
|
3049
|
-
if (c
|
|
3050
|
-
t.fd && r.close(t.fd, () => {}), this[m](c
|
|
3001
|
+
const u = (c) => {
|
|
3002
|
+
if (c) {
|
|
3003
|
+
t.fd && r.close(t.fd, () => {}), this[m](c, s), i();
|
|
3051
3004
|
return;
|
|
3052
3005
|
}
|
|
3053
3006
|
--o === 0 && r.close(t.fd, (n) => {
|
|
3054
3007
|
n ? this[m](n, s) : this[S](), i();
|
|
3055
3008
|
});
|
|
3056
3009
|
};
|
|
3057
|
-
t.on("finish", (c
|
|
3010
|
+
t.on("finish", (c) => {
|
|
3058
3011
|
const n = s.absolute, p = t.fd;
|
|
3059
3012
|
if (s.mtime && !this.noMtime) {
|
|
3060
3013
|
o++;
|
|
3061
3014
|
const f = s.atime || /* @__PURE__ */ new Date(), k = s.mtime;
|
|
3062
|
-
r.futimes(p, f, k, (D
|
|
3015
|
+
r.futimes(p, f, k, (D) => D ? r.utimes(n, f, k, (I) => u(I && D)) : u());
|
|
3063
3016
|
}
|
|
3064
3017
|
if (this[E](s)) {
|
|
3065
3018
|
o++;
|
|
3066
3019
|
const f = this[R](s), k = this[_](s);
|
|
3067
|
-
r.fchown(p, f, k, (D
|
|
3020
|
+
r.fchown(p, f, k, (D) => D ? r.chown(n, f, k, (I) => u(I && D)) : u());
|
|
3068
3021
|
}
|
|
3069
3022
|
u();
|
|
3070
3023
|
});
|
|
3071
|
-
const h
|
|
3072
|
-
h
|
|
3073
|
-
this[m](c
|
|
3074
|
-
}), s.pipe(h
|
|
3024
|
+
const h = this.transform && this.transform(s) || s;
|
|
3025
|
+
h !== s && (h.on("error", (c) => {
|
|
3026
|
+
this[m](c, s), i();
|
|
3027
|
+
}), s.pipe(h)), h.pipe(t);
|
|
3075
3028
|
}
|
|
3076
3029
|
[F$1](s, i) {
|
|
3077
3030
|
const e = s.mode & 4095 || this.dmode;
|
|
3078
|
-
this[b
|
|
3031
|
+
this[b](s.absolute, e, (t) => {
|
|
3079
3032
|
if (t) {
|
|
3080
3033
|
this[m](t, s), i();
|
|
3081
3034
|
return;
|
|
3082
3035
|
}
|
|
3083
3036
|
let o = 1;
|
|
3084
|
-
const u = (h
|
|
3037
|
+
const u = (h) => {
|
|
3085
3038
|
--o === 0 && (i(), this[S](), s.resume());
|
|
3086
3039
|
};
|
|
3087
3040
|
s.mtime && !this.noMtime && (o++, r.utimes(s.absolute, s.atime || /* @__PURE__ */ new Date(), s.mtime, u)), this[E](s) && (o++, r.chown(s.absolute, this[R](s), this[_](s), u)), u();
|
|
3088
3041
|
});
|
|
3089
3042
|
}
|
|
3090
|
-
[W
|
|
3043
|
+
[W](s) {
|
|
3091
3044
|
s.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${s.type}`, { entry: s }), s.resume();
|
|
3092
3045
|
}
|
|
3093
|
-
[B
|
|
3046
|
+
[B](s, i) {
|
|
3094
3047
|
this[O](s, s.linkpath, "symlink", i);
|
|
3095
3048
|
}
|
|
3096
|
-
[z$1
|
|
3049
|
+
[z$1](s, i) {
|
|
3097
3050
|
const e = l(w.resolve(this.cwd, s.linkpath));
|
|
3098
3051
|
this[O](s, e, "link", i);
|
|
3099
3052
|
}
|
|
@@ -3101,12 +3054,12 @@ function Os() {
|
|
|
3101
3054
|
this[$]++;
|
|
3102
3055
|
}
|
|
3103
3056
|
[S]() {
|
|
3104
|
-
this[$]--, this[A
|
|
3057
|
+
this[$]--, this[A]();
|
|
3105
3058
|
}
|
|
3106
|
-
[x
|
|
3059
|
+
[x](s) {
|
|
3107
3060
|
this[S](), s.resume();
|
|
3108
3061
|
}
|
|
3109
|
-
[N
|
|
3062
|
+
[N](s, i) {
|
|
3110
3063
|
return s.type === "File" && !this.unlink && i.isFile() && i.nlink <= 1 && !C;
|
|
3111
3064
|
}
|
|
3112
3065
|
[q](s) {
|
|
@@ -3119,22 +3072,22 @@ function Os() {
|
|
|
3119
3072
|
}
|
|
3120
3073
|
[Y](s, i) {
|
|
3121
3074
|
this[v](s);
|
|
3122
|
-
const e = (h
|
|
3123
|
-
this[v](s), i(h
|
|
3075
|
+
const e = (h) => {
|
|
3076
|
+
this[v](s), i(h);
|
|
3124
3077
|
}, t = () => {
|
|
3125
|
-
this[b
|
|
3126
|
-
if (h
|
|
3127
|
-
this[m](h
|
|
3078
|
+
this[b](this.cwd, this.dmode, (h) => {
|
|
3079
|
+
if (h) {
|
|
3080
|
+
this[m](h, s), e();
|
|
3128
3081
|
return;
|
|
3129
3082
|
}
|
|
3130
|
-
this[g
|
|
3083
|
+
this[g] = true, o();
|
|
3131
3084
|
});
|
|
3132
3085
|
}, o = () => {
|
|
3133
3086
|
if (s.absolute !== this.cwd) {
|
|
3134
|
-
const h
|
|
3135
|
-
if (h
|
|
3136
|
-
if (c
|
|
3137
|
-
this[m](c
|
|
3087
|
+
const h = l(w.dirname(s.absolute));
|
|
3088
|
+
if (h !== this.cwd) return this[b](h, this.dmode, (c) => {
|
|
3089
|
+
if (c) {
|
|
3090
|
+
this[m](c, s), e();
|
|
3138
3091
|
return;
|
|
3139
3092
|
}
|
|
3140
3093
|
u();
|
|
@@ -3142,26 +3095,26 @@ function Os() {
|
|
|
3142
3095
|
}
|
|
3143
3096
|
u();
|
|
3144
3097
|
}, u = () => {
|
|
3145
|
-
r.lstat(s.absolute, (h
|
|
3146
|
-
if (c
|
|
3147
|
-
this[x
|
|
3098
|
+
r.lstat(s.absolute, (h, c) => {
|
|
3099
|
+
if (c && (this.keep || this.newer && c.mtime > s.mtime)) {
|
|
3100
|
+
this[x](s), e();
|
|
3148
3101
|
return;
|
|
3149
3102
|
}
|
|
3150
|
-
if (h
|
|
3151
|
-
if (c
|
|
3103
|
+
if (h || this[N](s, c)) return this[d](null, s, e);
|
|
3104
|
+
if (c.isDirectory()) {
|
|
3152
3105
|
if (s.type === "Directory") {
|
|
3153
|
-
const n = !this.noChmod && s.mode && (c
|
|
3106
|
+
const n = !this.noChmod && s.mode && (c.mode & 4095) !== s.mode, p = (f) => this[d](f, s, e);
|
|
3154
3107
|
return n ? r.chmod(s.absolute, s.mode, p) : p();
|
|
3155
3108
|
}
|
|
3156
|
-
if (s.absolute !== this.cwd) return r.rmdir(s.absolute, (n) => this[d
|
|
3109
|
+
if (s.absolute !== this.cwd) return r.rmdir(s.absolute, (n) => this[d](n, s, e));
|
|
3157
3110
|
}
|
|
3158
|
-
if (s.absolute === this.cwd) return this[d
|
|
3159
|
-
as(s.absolute, (n) => this[d
|
|
3111
|
+
if (s.absolute === this.cwd) return this[d](null, s, e);
|
|
3112
|
+
as(s.absolute, (n) => this[d](n, s, e));
|
|
3160
3113
|
});
|
|
3161
3114
|
};
|
|
3162
|
-
this[g
|
|
3115
|
+
this[g] ? o() : t();
|
|
3163
3116
|
}
|
|
3164
|
-
[d
|
|
3117
|
+
[d](s, i, e) {
|
|
3165
3118
|
if (s) {
|
|
3166
3119
|
this[m](s, i), e();
|
|
3167
3120
|
return;
|
|
@@ -3169,9 +3122,9 @@ function Os() {
|
|
|
3169
3122
|
switch (i.type) {
|
|
3170
3123
|
case "File":
|
|
3171
3124
|
case "OldFile":
|
|
3172
|
-
case "ContiguousFile": return this[U
|
|
3173
|
-
case "Link": return this[z$1
|
|
3174
|
-
case "SymbolicLink": return this[B
|
|
3125
|
+
case "ContiguousFile": return this[U](i, e);
|
|
3126
|
+
case "Link": return this[z$1](i, e);
|
|
3127
|
+
case "SymbolicLink": return this[B](i, e);
|
|
3175
3128
|
case "Directory":
|
|
3176
3129
|
case "GNUDumpDir": return this[F$1](i, e);
|
|
3177
3130
|
}
|
|
@@ -3190,63 +3143,63 @@ function Os() {
|
|
|
3190
3143
|
}
|
|
3191
3144
|
};
|
|
3192
3145
|
class ls extends L {
|
|
3193
|
-
[d
|
|
3194
|
-
return super[d
|
|
3146
|
+
[d](s, i) {
|
|
3147
|
+
return super[d](s, i, () => {});
|
|
3195
3148
|
}
|
|
3196
3149
|
[q](s) {
|
|
3197
|
-
if (this[v](s), !this[g
|
|
3198
|
-
const o = this[b
|
|
3150
|
+
if (this[v](s), !this[g]) {
|
|
3151
|
+
const o = this[b](this.cwd, this.dmode);
|
|
3199
3152
|
if (o) return this[m](o, s);
|
|
3200
|
-
this[g
|
|
3153
|
+
this[g] = true;
|
|
3201
3154
|
}
|
|
3202
3155
|
if (s.absolute !== this.cwd) {
|
|
3203
3156
|
const o = l(w.dirname(s.absolute));
|
|
3204
3157
|
if (o !== this.cwd) {
|
|
3205
|
-
const u = this[b
|
|
3158
|
+
const u = this[b](o, this.dmode);
|
|
3206
3159
|
if (u) return this[m](u, s);
|
|
3207
3160
|
}
|
|
3208
3161
|
}
|
|
3209
3162
|
const [i, e] = T(() => r.lstatSync(s.absolute));
|
|
3210
|
-
if (e && (this.keep || this.newer && e.mtime > s.mtime)) return this[x
|
|
3211
|
-
if (i || this[N
|
|
3163
|
+
if (e && (this.keep || this.newer && e.mtime > s.mtime)) return this[x](s);
|
|
3164
|
+
if (i || this[N](s, e)) return this[d](null, s);
|
|
3212
3165
|
if (e.isDirectory()) {
|
|
3213
3166
|
if (s.type === "Directory") {
|
|
3214
|
-
const [h
|
|
3167
|
+
const [h] = !this.noChmod && s.mode && (e.mode & 4095) !== s.mode ? T(() => {
|
|
3215
3168
|
r.chmodSync(s.absolute, s.mode);
|
|
3216
3169
|
}) : [];
|
|
3217
|
-
return this[d
|
|
3170
|
+
return this[d](h, s);
|
|
3218
3171
|
}
|
|
3219
3172
|
const [o] = T(() => r.rmdirSync(s.absolute));
|
|
3220
|
-
this[d
|
|
3173
|
+
this[d](o, s);
|
|
3221
3174
|
}
|
|
3222
3175
|
const [t] = s.absolute === this.cwd ? [] : T(() => us(s.absolute));
|
|
3223
|
-
this[d
|
|
3176
|
+
this[d](t, s);
|
|
3224
3177
|
}
|
|
3225
|
-
[U
|
|
3226
|
-
const e = s.mode & 4095 || this.fmode, t = (h
|
|
3227
|
-
let c
|
|
3178
|
+
[U](s, i) {
|
|
3179
|
+
const e = s.mode & 4095 || this.fmode, t = (h) => {
|
|
3180
|
+
let c;
|
|
3228
3181
|
try {
|
|
3229
3182
|
r.closeSync(o);
|
|
3230
3183
|
} catch (n) {
|
|
3231
|
-
c
|
|
3184
|
+
c = n;
|
|
3232
3185
|
}
|
|
3233
|
-
(h
|
|
3186
|
+
(h || c) && this[m](h || c, s), i();
|
|
3234
3187
|
};
|
|
3235
3188
|
let o;
|
|
3236
3189
|
try {
|
|
3237
3190
|
o = r.openSync(s.absolute, J(s.size), e);
|
|
3238
|
-
} catch (h
|
|
3239
|
-
return t(h
|
|
3191
|
+
} catch (h) {
|
|
3192
|
+
return t(h);
|
|
3240
3193
|
}
|
|
3241
3194
|
const u = this.transform && this.transform(s) || s;
|
|
3242
|
-
u !== s && (u.on("error", (h
|
|
3195
|
+
u !== s && (u.on("error", (h) => this[m](h, s)), s.pipe(u)), u.on("data", (h) => {
|
|
3243
3196
|
try {
|
|
3244
|
-
r.writeSync(o, h
|
|
3245
|
-
} catch (c
|
|
3246
|
-
t(c
|
|
3197
|
+
r.writeSync(o, h, 0, h.length);
|
|
3198
|
+
} catch (c) {
|
|
3199
|
+
t(c);
|
|
3247
3200
|
}
|
|
3248
|
-
}), u.on("end", (h
|
|
3249
|
-
let c
|
|
3201
|
+
}), u.on("end", (h) => {
|
|
3202
|
+
let c = null;
|
|
3250
3203
|
if (s.mtime && !this.noMtime) {
|
|
3251
3204
|
const n = s.atime || /* @__PURE__ */ new Date(), p = s.mtime;
|
|
3252
3205
|
try {
|
|
@@ -3255,7 +3208,7 @@ function Os() {
|
|
|
3255
3208
|
try {
|
|
3256
3209
|
r.utimesSync(s.absolute, n, p);
|
|
3257
3210
|
} catch {
|
|
3258
|
-
c
|
|
3211
|
+
c = f;
|
|
3259
3212
|
}
|
|
3260
3213
|
}
|
|
3261
3214
|
}
|
|
@@ -3267,15 +3220,15 @@ function Os() {
|
|
|
3267
3220
|
try {
|
|
3268
3221
|
r.chownSync(s.absolute, n, p);
|
|
3269
3222
|
} catch {
|
|
3270
|
-
c
|
|
3223
|
+
c = c || f;
|
|
3271
3224
|
}
|
|
3272
3225
|
}
|
|
3273
3226
|
}
|
|
3274
|
-
t(c
|
|
3227
|
+
t(c);
|
|
3275
3228
|
});
|
|
3276
3229
|
}
|
|
3277
3230
|
[F$1](s, i) {
|
|
3278
|
-
const e = s.mode & 4095 || this.dmode, t = this[b
|
|
3231
|
+
const e = s.mode & 4095 || this.dmode, t = this[b](s.absolute, e);
|
|
3279
3232
|
if (t) {
|
|
3280
3233
|
this[m](t, s), i();
|
|
3281
3234
|
return;
|
|
@@ -3288,9 +3241,9 @@ function Os() {
|
|
|
3288
3241
|
} catch {}
|
|
3289
3242
|
i(), s.resume();
|
|
3290
3243
|
}
|
|
3291
|
-
[b
|
|
3244
|
+
[b](s, i) {
|
|
3292
3245
|
try {
|
|
3293
|
-
return M
|
|
3246
|
+
return M.sync(l(s), {
|
|
3294
3247
|
uid: this.uid,
|
|
3295
3248
|
gid: this.gid,
|
|
3296
3249
|
processUid: this.processUid,
|
|
@@ -3326,12 +3279,12 @@ function v() {
|
|
|
3326
3279
|
const t = w(r);
|
|
3327
3280
|
if (t.sync && typeof o == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
3328
3281
|
if (!t.file && typeof o == "function") throw new TypeError("callback only supported with file option");
|
|
3329
|
-
return e.length && d
|
|
3282
|
+
return e.length && d(t, e), t.file && t.sync ? $(t) : t.file ? h(t, o) : t.sync ? x(t) : z(t);
|
|
3330
3283
|
};
|
|
3331
|
-
const d
|
|
3284
|
+
const d = (r, e) => {
|
|
3332
3285
|
const o = new Map(e.map((n) => [m(n), true])), t = r.filter, s = (n, i) => {
|
|
3333
|
-
const a = i || l.parse(n).root || ".", c
|
|
3334
|
-
return o.set(n, c
|
|
3286
|
+
const a = i || l.parse(n).root || ".", c = n === a ? false : o.has(n) ? o.get(n) : s(l.dirname(n), a);
|
|
3287
|
+
return o.set(n, c), c;
|
|
3335
3288
|
};
|
|
3336
3289
|
r.filter = t ? (n, i) => t(n, i) && s(m(n)) : (n) => s(m(n));
|
|
3337
3290
|
}, $ = (r) => {
|
|
@@ -3340,10 +3293,10 @@ function v() {
|
|
|
3340
3293
|
readSize: s,
|
|
3341
3294
|
size: t.size
|
|
3342
3295
|
}).pipe(e);
|
|
3343
|
-
}, h
|
|
3296
|
+
}, h = (r, e) => {
|
|
3344
3297
|
const o = new u(r), t = r.maxReadSize || 16 * 1024 * 1024, s = r.file, n = new Promise((i, a) => {
|
|
3345
|
-
o.on("error", a), o.on("close", i), p.stat(s, (c
|
|
3346
|
-
if (c
|
|
3298
|
+
o.on("error", a), o.on("close", i), p.stat(s, (c, R) => {
|
|
3299
|
+
if (c) a(c);
|
|
3347
3300
|
else {
|
|
3348
3301
|
const S = new y.ReadStream(s, {
|
|
3349
3302
|
readSize: t,
|
|
@@ -3354,7 +3307,7 @@ function v() {
|
|
|
3354
3307
|
});
|
|
3355
3308
|
});
|
|
3356
3309
|
return e ? n.then(e, e) : n;
|
|
3357
|
-
}, x
|
|
3310
|
+
}, x = (r) => new u.Sync(r), z = (r) => new u(r);
|
|
3358
3311
|
return f;
|
|
3359
3312
|
}
|
|
3360
3313
|
const tarExtract = getDefaultExportFromCjs(v());
|
|
@@ -3594,10 +3547,5 @@ async function downloadTemplate(input, options = {}) {
|
|
|
3594
3547
|
dir: extractPath
|
|
3595
3548
|
};
|
|
3596
3549
|
}
|
|
3597
|
-
|
|
3598
|
-
//#endregion
|
|
3599
|
-
//#region node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs
|
|
3600
3550
|
var dist_exports = /* @__PURE__ */ __exportAll({ downloadTemplate: () => downloadTemplate });
|
|
3601
|
-
|
|
3602
|
-
//#endregion
|
|
3603
|
-
export { dist_exports$1 as n, dist_exports as t };
|
|
3551
|
+
export { dist_exports$1 as n, dist_exports as t };
|