nitro-nightly 3.0.1-20260119-145349-d0c4950f → 3.0.1-20260120-133205-cbfce96c
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 +542 -542
- package/dist/_build/rolldown.mjs +5 -5
- package/dist/_build/rollup.mjs +3 -3
- package/dist/_build/vite.build.mjs +1 -1
- package/dist/_chunks/dev.mjs +4 -4
- package/dist/_chunks/nitro.mjs +3 -3
- package/dist/_chunks/nitro2.mjs +1 -1
- package/dist/_chunks/utils.mjs +1 -1
- package/dist/_libs/@hiogawa/vite-plugin-fullstack.mjs +2 -2
- package/dist/_libs/@jridgewell/gen-mapping.mjs +1 -1
- package/dist/_libs/@rollup/plugin-commonjs.d.mts +241 -0
- package/dist/_libs/@rollup/plugin-commonjs.mjs +19 -19
- package/dist/_libs/@rollup/plugin-inject.mjs +1 -1
- package/dist/_libs/c12.d.mts +214 -0
- package/dist/_libs/c12.mjs +6 -6
- package/dist/_libs/chokidar.mjs +2 -2
- package/dist/_libs/compatx.d.mts +47 -0
- package/dist/_libs/confbox.mjs +2 -2
- package/dist/_libs/esbuild.d.mts +20 -0
- package/dist/_libs/giget.mjs +1305 -1305
- package/dist/_libs/httpxy.d.mts +79 -0
- package/dist/_libs/httpxy.mjs +1 -1
- package/dist/_libs/magic-string.d.mts +220 -0
- package/dist/_libs/mlly.d.mts +57 -0
- package/dist/_libs/pkg-types.d.mts +23 -0
- package/dist/_libs/rou3.d.mts +43 -0
- package/dist/_libs/std-env.d.mts +4 -0
- package/dist/_libs/unimport.d.mts +426 -0
- package/dist/_libs/unimport.mjs +11 -11
- package/dist/_libs/unwasm.d.mts +29 -0
- package/dist/_presets.mjs +1 -1
- package/dist/builder.mjs +1 -1
- package/dist/cli/_chunks/build.mjs +1 -1
- package/dist/cli/_chunks/dev.mjs +1 -1
- package/dist/cli/_chunks/list.mjs +1 -1
- package/dist/cli/_chunks/prepare.mjs +1 -1
- package/dist/cli/_chunks/run.mjs +1 -1
- package/dist/presets/aws-lambda/runtime/_utils.d.mts +0 -5
- package/dist/presets/netlify/runtime/netlify-edge.d.mts +0 -1
- package/dist/presets/winterjs/runtime/winterjs.d.mts +0 -1
- package/dist/runtime/internal/error/dev.d.mts +0 -1
- package/dist/runtime/internal/route-rules.d.mts +0 -4
- package/dist/runtime/internal/routes/openapi.d.mts +0 -1
- package/dist/runtime/internal/routes/scalar.d.mts +0 -1
- package/dist/runtime/internal/routes/swagger.d.mts +0 -1
- package/dist/runtime/internal/runtime-config.d.mts +0 -1
- package/dist/runtime/nitro.d.mts +0 -3
- package/dist/runtime/virtual/renderer-template.d.mts +0 -1
- package/dist/types/index.d.mts +962 -1095
- package/dist/vite.d.mts +13 -13
- package/dist/vite.mjs +10 -9
- package/package.json +9 -9
package/dist/_libs/giget.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __exportAll } from "../_common.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { Y as readPackageJSON, at as join$2, ct as resolve$2, nt as dirname$2, ot as normalize$2, tt as basename$2 } from "../_build/common.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { createWriteStream, existsSync, readdirSync, renameSync } from "node:fs";
|
|
5
5
|
import nativeFs from "fs";
|
|
@@ -223,15 +223,15 @@ var O$3 = h$1((exports, t$7) => {
|
|
|
223
223
|
if (!t$8) t$8 = {};
|
|
224
224
|
const { pathEnv: i$9, pathExt: c$7, pathExtExe: l$4 } = s$8(e$7, t$8);
|
|
225
225
|
const u$6 = [];
|
|
226
|
-
const d
|
|
226
|
+
const d = (n$6) => new Promise((a$12, s$9) => {
|
|
227
227
|
if (n$6 === i$9.length) return t$8.all && u$6.length ? a$12(u$6) : s$9(o$6(e$7));
|
|
228
228
|
const c$8 = i$9[n$6];
|
|
229
229
|
const l$5 = /^".*"$/.test(c$8) ? c$8.slice(1, -1) : c$8;
|
|
230
|
-
const d$
|
|
231
|
-
a$12(f$5(!l$5 && /^\.[\\\/]/.test(e$7) ? e$7.slice(0, 2) + d$
|
|
230
|
+
const d$1 = r.join(l$5, e$7);
|
|
231
|
+
a$12(f$5(!l$5 && /^\.[\\\/]/.test(e$7) ? e$7.slice(0, 2) + d$1 : d$1, n$6, 0));
|
|
232
232
|
});
|
|
233
233
|
const f$5 = (e$8, n$6, r$3) => new Promise((i$10, o$7) => {
|
|
234
|
-
if (r$3 === c$7.length) return i$10(d
|
|
234
|
+
if (r$3 === c$7.length) return i$10(d(n$6 + 1));
|
|
235
235
|
const s$9 = c$7[r$3];
|
|
236
236
|
a$11(e$8 + s$9, { pathExt: l$4 }, (a$12, o$8) => {
|
|
237
237
|
if (!a$12 && o$8) if (t$8.all) u$6.push(e$8 + s$9);
|
|
@@ -239,7 +239,7 @@ var O$3 = h$1((exports, t$7) => {
|
|
|
239
239
|
return i$10(f$5(e$8, n$6, r$3 + 1));
|
|
240
240
|
});
|
|
241
241
|
});
|
|
242
|
-
return n$5 ? d
|
|
242
|
+
return n$5 ? d(0).then((e$8) => n$5(null, e$8), n$5) : d(0);
|
|
243
243
|
};
|
|
244
244
|
const l$3 = (e$7, t$8) => {
|
|
245
245
|
t$8 = t$8 || {};
|
|
@@ -248,8 +248,8 @@ var O$3 = h$1((exports, t$7) => {
|
|
|
248
248
|
for (let o$7 = 0; o$7 < n$5.length; o$7++) {
|
|
249
249
|
const s$9 = n$5[o$7];
|
|
250
250
|
const u$6 = /^".*"$/.test(s$9) ? s$9.slice(1, -1) : s$9;
|
|
251
|
-
const d
|
|
252
|
-
const f$5 = !u$6 && /^\.[\\\/]/.test(e$7) ? e$7.slice(0, 2) + d
|
|
251
|
+
const d = r.join(u$6, e$7);
|
|
252
|
+
const f$5 = !u$6 && /^\.[\\\/]/.test(e$7) ? e$7.slice(0, 2) + d : d;
|
|
253
253
|
for (let e$8 = 0; e$8 < i$9.length; e$8++) {
|
|
254
254
|
const n$6 = f$5 + i$9[e$8];
|
|
255
255
|
try {
|
|
@@ -389,7 +389,7 @@ var F$3 = h$1((exports, t$7) => {
|
|
|
389
389
|
}
|
|
390
390
|
return e$7;
|
|
391
391
|
}
|
|
392
|
-
function d
|
|
392
|
+
function d(e$7, t$8, n$5) {
|
|
393
393
|
if (t$8 && !Array.isArray(t$8)) {
|
|
394
394
|
n$5 = t$8;
|
|
395
395
|
t$8 = null;
|
|
@@ -408,7 +408,7 @@ var F$3 = h$1((exports, t$7) => {
|
|
|
408
408
|
};
|
|
409
409
|
return n$5.shell ? r$3 : u$6(r$3);
|
|
410
410
|
}
|
|
411
|
-
t$7.exports = d
|
|
411
|
+
t$7.exports = d;
|
|
412
412
|
});
|
|
413
413
|
var I = h$1((exports, t$7) => {
|
|
414
414
|
const n$4 = process.platform === "win32";
|
|
@@ -888,7 +888,7 @@ var i$6, t$5;
|
|
|
888
888
|
function s$6() {
|
|
889
889
|
if (t$5) return i$6;
|
|
890
890
|
t$5 = 1;
|
|
891
|
-
const n
|
|
891
|
+
const n = new Map([
|
|
892
892
|
["C", "cwd"],
|
|
893
893
|
["f", "file"],
|
|
894
894
|
["z", "gzip"],
|
|
@@ -909,21 +909,21 @@ function s$6() {
|
|
|
909
909
|
["L", "follow"],
|
|
910
910
|
["h", "follow"]
|
|
911
911
|
]);
|
|
912
|
-
return i$6 = (r) => r ? Object.keys(r).map((e
|
|
912
|
+
return i$6 = (r) => r ? Object.keys(r).map((e) => [n.has(e) ? n.get(e) : e, r[e]]).reduce((e, p) => (e[p[0]] = p[1], e), Object.create(null)) : {}, i$6;
|
|
913
913
|
}
|
|
914
914
|
var e$5, t$4;
|
|
915
915
|
function c$4() {
|
|
916
|
-
return t$4 || (t$4 = 1, e$5 = (o
|
|
917
|
-
warn(n
|
|
918
|
-
this.file && (r.file = this.file), this.cwd && (r.cwd = this.cwd), r.code = i
|
|
916
|
+
return t$4 || (t$4 = 1, e$5 = (o) => class extends o {
|
|
917
|
+
warn(n, i, r = {}) {
|
|
918
|
+
this.file && (r.file = this.file), this.cwd && (r.cwd = this.cwd), r.code = i instanceof Error && i.code || n, r.tarCode = n, !this.strict && r.recoverable !== false ? (i instanceof Error && (r = Object.assign(i, r), i = i.message), this.emit("warn", r.tarCode, i, r)) : i instanceof Error ? this.emit("error", Object.assign(i, r)) : this.emit("error", Object.assign(/* @__PURE__ */ new Error(`${n}: ${i}`), r));
|
|
919
919
|
}
|
|
920
920
|
}), e$5;
|
|
921
921
|
}
|
|
922
922
|
var e$4 = {};
|
|
923
923
|
var a$9;
|
|
924
924
|
function n$3() {
|
|
925
|
-
return a$9 ? e$4 : (a$9 = 1, function(e
|
|
926
|
-
e
|
|
925
|
+
return a$9 ? e$4 : (a$9 = 1, function(e) {
|
|
926
|
+
e.name = new Map([
|
|
927
927
|
["0", "File"],
|
|
928
928
|
["", "OldFile"],
|
|
929
929
|
["1", "Link"],
|
|
@@ -945,48 +945,48 @@ function n$3() {
|
|
|
945
945
|
["S", "SparseFile"],
|
|
946
946
|
["V", "TapeVolumeHeader"],
|
|
947
947
|
["X", "OldExtendedHeader"]
|
|
948
|
-
]), e
|
|
948
|
+
]), e.code = new Map(Array.from(e.name).map((i) => [i[1], i[0]]));
|
|
949
949
|
}(e$4), e$4);
|
|
950
950
|
}
|
|
951
951
|
var f$3, i$5;
|
|
952
952
|
function w$1() {
|
|
953
953
|
if (i$5) return f$3;
|
|
954
954
|
i$5 = 1;
|
|
955
|
-
const v
|
|
956
|
-
if (Number.isSafeInteger(e
|
|
955
|
+
const v = (e, r) => {
|
|
956
|
+
if (Number.isSafeInteger(e)) e < 0 ? g$1(e, r) : p(e, r);
|
|
957
957
|
else throw Error("cannot encode number outside of javascript safe integer range");
|
|
958
958
|
return r;
|
|
959
|
-
}, p
|
|
959
|
+
}, p = (e, r) => {
|
|
960
960
|
r[0] = 128;
|
|
961
|
-
for (var o
|
|
962
|
-
}, g$1 = (e
|
|
961
|
+
for (var o = r.length; o > 1; o--) r[o - 1] = e & 255, e = Math.floor(e / 256);
|
|
962
|
+
}, g$1 = (e, r) => {
|
|
963
963
|
r[0] = 255;
|
|
964
|
-
var o
|
|
965
|
-
e
|
|
966
|
-
for (var s
|
|
967
|
-
var a
|
|
968
|
-
e
|
|
969
|
-
}
|
|
970
|
-
}, h$2 = (e
|
|
971
|
-
const r = e
|
|
972
|
-
if (o
|
|
973
|
-
if (!Number.isSafeInteger(o
|
|
974
|
-
return o
|
|
975
|
-
}, x$1 = (e
|
|
976
|
-
for (var r = e
|
|
977
|
-
var n
|
|
978
|
-
s
|
|
979
|
-
}
|
|
980
|
-
return o
|
|
981
|
-
}, d$1 = (e
|
|
982
|
-
for (var r = e
|
|
983
|
-
var a
|
|
984
|
-
a
|
|
985
|
-
}
|
|
986
|
-
return o
|
|
987
|
-
}, l
|
|
964
|
+
var o = false;
|
|
965
|
+
e = e * -1;
|
|
966
|
+
for (var s = r.length; s > 1; s--) {
|
|
967
|
+
var a = e & 255;
|
|
968
|
+
e = Math.floor(e / 256), o ? r[s - 1] = l(a) : a === 0 ? r[s - 1] = 0 : (o = true, r[s - 1] = c$1(a));
|
|
969
|
+
}
|
|
970
|
+
}, h$2 = (e) => {
|
|
971
|
+
const r = e[0], o = r === 128 ? d$1(e.slice(1, e.length)) : r === 255 ? x$1(e) : null;
|
|
972
|
+
if (o === null) throw Error("invalid base256 encoding");
|
|
973
|
+
if (!Number.isSafeInteger(o)) throw Error("parsed number outside of javascript safe integer range");
|
|
974
|
+
return o;
|
|
975
|
+
}, x$1 = (e) => {
|
|
976
|
+
for (var r = e.length, o = 0, s = false, a = r - 1; a > -1; a--) {
|
|
977
|
+
var n = e[a], t;
|
|
978
|
+
s ? t = l(n) : n === 0 ? t = n : (s = true, t = c$1(n)), t !== 0 && (o -= t * Math.pow(256, r - a - 1));
|
|
979
|
+
}
|
|
980
|
+
return o;
|
|
981
|
+
}, d$1 = (e) => {
|
|
982
|
+
for (var r = e.length, o = 0, s = r - 1; s > -1; s--) {
|
|
983
|
+
var a = e[s];
|
|
984
|
+
a !== 0 && (o += a * Math.pow(256, r - s - 1));
|
|
985
|
+
}
|
|
986
|
+
return o;
|
|
987
|
+
}, l = (e) => (255 ^ e) & 255, c$1 = (e) => (255 ^ e) + 1 & 255;
|
|
988
988
|
return f$3 = {
|
|
989
|
-
encode: v
|
|
989
|
+
encode: v,
|
|
990
990
|
parse: h$2
|
|
991
991
|
}, f$3;
|
|
992
992
|
}
|
|
@@ -994,86 +994,86 @@ var k, w;
|
|
|
994
994
|
function E() {
|
|
995
995
|
if (w) return k;
|
|
996
996
|
w = 1;
|
|
997
|
-
const u
|
|
997
|
+
const u = n$3(), x$1 = path.posix, y = w$1(), P$2 = Symbol("slurp"), a = Symbol("type");
|
|
998
998
|
class B$1 {
|
|
999
|
-
constructor(e
|
|
1000
|
-
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
|
|
999
|
+
constructor(e, t, i, h$2) {
|
|
1000
|
+
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$2) : e && this.set(e);
|
|
1001
1001
|
}
|
|
1002
|
-
decode(e
|
|
1003
|
-
if (t
|
|
1004
|
-
if (this.path = d$1(e
|
|
1002
|
+
decode(e, t, i, h$2) {
|
|
1003
|
+
if (t || (t = 0), !e || !(e.length >= t + 512)) throw new Error("need 512 bytes for header");
|
|
1004
|
+
if (this.path = d$1(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$2](i), this[P$2](h$2, true), this[a] = d$1(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$1(e, t + 157, 100), e.slice(t + 257, t + 265).toString() === "ustar\x0000") if (this.uname = d$1(e, t + 265, 32), this.gname = d$1(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$1(e, t + 345, 155) + "/" + this.path;
|
|
1005
1005
|
else {
|
|
1006
|
-
const n
|
|
1007
|
-
n
|
|
1006
|
+
const n = d$1(e, t + 345, 130);
|
|
1007
|
+
n && (this.path = n + "/" + this.path), this.atime = o(e, t + 476, 12), this.ctime = o(e, t + 488, 12);
|
|
1008
1008
|
}
|
|
1009
|
-
let l
|
|
1010
|
-
for (let n
|
|
1011
|
-
for (let n
|
|
1012
|
-
this.cksumValid = l
|
|
1013
|
-
}
|
|
1014
|
-
[P$2](e
|
|
1015
|
-
for (const i
|
|
1016
|
-
}
|
|
1017
|
-
encode(e
|
|
1018
|
-
if (e
|
|
1019
|
-
const i
|
|
1020
|
-
this.needPax = h$2[2], this.needPax = m
|
|
1021
|
-
let S
|
|
1022
|
-
for (let p
|
|
1023
|
-
for (let p
|
|
1024
|
-
return this.cksum = S
|
|
1025
|
-
}
|
|
1026
|
-
set(e
|
|
1027
|
-
for (const t
|
|
1009
|
+
let l = 256;
|
|
1010
|
+
for (let n = t; n < t + 148; n++) l += e[n];
|
|
1011
|
+
for (let n = t + 156; n < t + 512; n++) l += e[n];
|
|
1012
|
+
this.cksumValid = l === this.cksum, this.cksum === null && l === 256 && (this.nullBlock = true);
|
|
1013
|
+
}
|
|
1014
|
+
[P$2](e, t) {
|
|
1015
|
+
for (const i in e) e[i] !== null && e[i] !== void 0 && !(t && i === "path") && (this[i] = e[i]);
|
|
1016
|
+
}
|
|
1017
|
+
encode(e, t) {
|
|
1018
|
+
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");
|
|
1019
|
+
const i = this.ctime || this.atime ? 130 : 155, h$2 = L(this.path || "", i), l = h$2[0], n = h$2[1];
|
|
1020
|
+
this.needPax = h$2[2], this.needPax = m(e, t, 100, l) || this.needPax, this.needPax = c$1(e, t + 100, 8, this.mode) || this.needPax, this.needPax = c$1(e, t + 108, 8, this.uid) || this.needPax, this.needPax = c$1(e, t + 116, 8, this.gid) || this.needPax, this.needPax = c$1(e, t + 124, 12, this.size) || this.needPax, this.needPax = g$1(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$1(e, t + 329, 8, this.devmaj) || this.needPax, this.needPax = c$1(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$1(e, t + 476, 12, this.atime) || this.needPax, this.needPax = g$1(e, t + 488, 12, this.ctime) || this.needPax);
|
|
1021
|
+
let S = 256;
|
|
1022
|
+
for (let p = t; p < t + 148; p++) S += e[p];
|
|
1023
|
+
for (let p = t + 156; p < t + 512; p++) S += e[p];
|
|
1024
|
+
return this.cksum = S, c$1(e, t + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
|
|
1025
|
+
}
|
|
1026
|
+
set(e) {
|
|
1027
|
+
for (const t in e) e[t] !== null && e[t] !== void 0 && (this[t] = e[t]);
|
|
1028
1028
|
}
|
|
1029
1029
|
get type() {
|
|
1030
|
-
return u
|
|
1030
|
+
return u.name.get(this[a]) || this[a];
|
|
1031
1031
|
}
|
|
1032
1032
|
get typeKey() {
|
|
1033
|
-
return this[a
|
|
1033
|
+
return this[a];
|
|
1034
1034
|
}
|
|
1035
|
-
set type(e
|
|
1036
|
-
u
|
|
1035
|
+
set type(e) {
|
|
1036
|
+
u.code.has(e) ? this[a] = u.code.get(e) : this[a] = e;
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
|
-
const L = (s
|
|
1040
|
-
let i
|
|
1041
|
-
const n
|
|
1042
|
-
if (Buffer.byteLength(i
|
|
1043
|
-
i
|
|
1039
|
+
const L = (s, e) => {
|
|
1040
|
+
let i = s, h$2 = "", l;
|
|
1041
|
+
const n = x$1.parse(s).root || ".";
|
|
1042
|
+
if (Buffer.byteLength(i) < 100) l = [
|
|
1043
|
+
i,
|
|
1044
1044
|
h$2,
|
|
1045
1045
|
false
|
|
1046
1046
|
];
|
|
1047
1047
|
else {
|
|
1048
|
-
h$2 = x$1.dirname(i
|
|
1048
|
+
h$2 = x$1.dirname(i), i = x$1.basename(i);
|
|
1049
1049
|
do
|
|
1050
|
-
Buffer.byteLength(i
|
|
1051
|
-
i
|
|
1050
|
+
Buffer.byteLength(i) <= 100 && Buffer.byteLength(h$2) <= e ? l = [
|
|
1051
|
+
i,
|
|
1052
1052
|
h$2,
|
|
1053
1053
|
false
|
|
1054
|
-
] : Buffer.byteLength(i
|
|
1055
|
-
i
|
|
1054
|
+
] : Buffer.byteLength(i) > 100 && Buffer.byteLength(h$2) <= e ? l = [
|
|
1055
|
+
i.slice(0, 99),
|
|
1056
1056
|
h$2,
|
|
1057
1057
|
true
|
|
1058
|
-
] : (i
|
|
1059
|
-
while (h$2 !== n
|
|
1060
|
-
l
|
|
1061
|
-
s
|
|
1058
|
+
] : (i = x$1.join(x$1.basename(h$2), i), h$2 = x$1.dirname(h$2));
|
|
1059
|
+
while (h$2 !== n && !l);
|
|
1060
|
+
l || (l = [
|
|
1061
|
+
s.slice(0, 99),
|
|
1062
1062
|
"",
|
|
1063
1063
|
true
|
|
1064
1064
|
]);
|
|
1065
1065
|
}
|
|
1066
|
-
return l
|
|
1067
|
-
}, d$1 = (s
|
|
1066
|
+
return l;
|
|
1067
|
+
}, d$1 = (s, e, t) => s.slice(e, e + t).toString("utf8").replace(/\0.*/, ""), o = (s, e, t) => N$1(r(s, e, t)), N$1 = (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 = {
|
|
1068
1068
|
12: 8589934591,
|
|
1069
1069
|
8: 2097151
|
|
1070
|
-
}, c$
|
|
1070
|
+
}, c$1 = (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$1 = (s, e, t, i) => i === null ? false : c$1(s, e, t, i.getTime() / 1e3), A$1 = new Array(156).join("\0"), m = (s, e, t, i) => i === null ? false : (s.write(i + A$1, e, t, "utf8"), i.length !== Buffer.byteLength(i) || i.length > t);
|
|
1071
1071
|
return k = B$1, k;
|
|
1072
1072
|
}
|
|
1073
1073
|
var e$3, t$3;
|
|
1074
1074
|
function i$4() {
|
|
1075
|
-
return t$3 || (t$3 = 1, e$3 = function(o
|
|
1076
|
-
o
|
|
1075
|
+
return t$3 || (t$3 = 1, e$3 = function(o) {
|
|
1076
|
+
o.prototype[Symbol.iterator] = function* () {
|
|
1077
1077
|
for (let r = this.head; r; r = r.next) yield r.value;
|
|
1078
1078
|
};
|
|
1079
1079
|
}), e$3;
|
|
@@ -1081,130 +1081,130 @@ function i$4() {
|
|
|
1081
1081
|
var u$4, a$8;
|
|
1082
1082
|
function c$3() {
|
|
1083
1083
|
if (a$8) return u$4;
|
|
1084
|
-
a$8 = 1, u$4 = r, r.Node = s
|
|
1085
|
-
function r(t
|
|
1086
|
-
var i
|
|
1087
|
-
if (i
|
|
1088
|
-
i
|
|
1084
|
+
a$8 = 1, u$4 = r, r.Node = s, r.create = r;
|
|
1085
|
+
function r(t) {
|
|
1086
|
+
var i = this;
|
|
1087
|
+
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) {
|
|
1088
|
+
i.push(n);
|
|
1089
1089
|
});
|
|
1090
|
-
else if (arguments.length > 0) for (var e
|
|
1091
|
-
return i
|
|
1092
|
-
}
|
|
1093
|
-
r.prototype.removeNode = function(t
|
|
1094
|
-
if (t
|
|
1095
|
-
var i
|
|
1096
|
-
return i
|
|
1097
|
-
}, r.prototype.unshiftNode = function(t
|
|
1098
|
-
if (t
|
|
1099
|
-
t
|
|
1100
|
-
var i
|
|
1101
|
-
t
|
|
1102
|
-
}
|
|
1103
|
-
}, r.prototype.pushNode = function(t
|
|
1104
|
-
if (t
|
|
1105
|
-
t
|
|
1106
|
-
var i
|
|
1107
|
-
t
|
|
1090
|
+
else if (arguments.length > 0) for (var e = 0, h$2 = arguments.length; e < h$2; e++) i.push(arguments[e]);
|
|
1091
|
+
return i;
|
|
1092
|
+
}
|
|
1093
|
+
r.prototype.removeNode = function(t) {
|
|
1094
|
+
if (t.list !== this) throw new Error("removing node which does not belong to this list");
|
|
1095
|
+
var i = t.next, e = t.prev;
|
|
1096
|
+
return i && (i.prev = e), e && (e.next = i), t === this.head && (this.head = i), t === this.tail && (this.tail = e), t.list.length--, t.next = null, t.prev = null, t.list = null, i;
|
|
1097
|
+
}, r.prototype.unshiftNode = function(t) {
|
|
1098
|
+
if (t !== this.head) {
|
|
1099
|
+
t.list && t.list.removeNode(t);
|
|
1100
|
+
var i = this.head;
|
|
1101
|
+
t.list = this, t.next = i, i && (i.prev = t), this.head = t, this.tail || (this.tail = t), this.length++;
|
|
1102
|
+
}
|
|
1103
|
+
}, r.prototype.pushNode = function(t) {
|
|
1104
|
+
if (t !== this.tail) {
|
|
1105
|
+
t.list && t.list.removeNode(t);
|
|
1106
|
+
var i = this.tail;
|
|
1107
|
+
t.list = this, t.prev = i, i && (i.next = t), this.tail = t, this.head || (this.head = t), this.length++;
|
|
1108
1108
|
}
|
|
1109
1109
|
}, r.prototype.push = function() {
|
|
1110
|
-
for (var t
|
|
1110
|
+
for (var t = 0, i = arguments.length; t < i; t++) f(this, arguments[t]);
|
|
1111
1111
|
return this.length;
|
|
1112
1112
|
}, r.prototype.unshift = function() {
|
|
1113
|
-
for (var t
|
|
1113
|
+
for (var t = 0, i = arguments.length; t < i; t++) o(this, arguments[t]);
|
|
1114
1114
|
return this.length;
|
|
1115
1115
|
}, r.prototype.pop = function() {
|
|
1116
1116
|
if (this.tail) {
|
|
1117
|
-
var t
|
|
1118
|
-
return this.tail = this.tail.prev, this.tail ? this.tail.next = null : this.head = null, this.length--, t
|
|
1117
|
+
var t = this.tail.value;
|
|
1118
|
+
return this.tail = this.tail.prev, this.tail ? this.tail.next = null : this.head = null, this.length--, t;
|
|
1119
1119
|
}
|
|
1120
1120
|
}, r.prototype.shift = function() {
|
|
1121
1121
|
if (this.head) {
|
|
1122
|
-
var t
|
|
1123
|
-
return this.head = this.head.next, this.head ? this.head.prev = null : this.tail = null, this.length--, t
|
|
1124
|
-
}
|
|
1125
|
-
}, r.prototype.forEach = function(t
|
|
1126
|
-
i
|
|
1127
|
-
for (var e
|
|
1128
|
-
}, r.prototype.forEachReverse = function(t
|
|
1129
|
-
i
|
|
1130
|
-
for (var e
|
|
1131
|
-
}, r.prototype.get = function(t
|
|
1132
|
-
for (var i
|
|
1133
|
-
if (i
|
|
1134
|
-
}, r.prototype.getReverse = function(t
|
|
1135
|
-
for (var i
|
|
1136
|
-
if (i
|
|
1137
|
-
}, r.prototype.map = function(t
|
|
1138
|
-
i
|
|
1139
|
-
for (var e
|
|
1140
|
-
return e
|
|
1141
|
-
}, r.prototype.mapReverse = function(t
|
|
1142
|
-
i
|
|
1143
|
-
for (var e
|
|
1144
|
-
return e
|
|
1145
|
-
}, r.prototype.reduce = function(t
|
|
1146
|
-
var e
|
|
1147
|
-
if (arguments.length > 1) e
|
|
1148
|
-
else if (this.head) h$2 = this.head.next, e
|
|
1122
|
+
var t = this.head.value;
|
|
1123
|
+
return this.head = this.head.next, this.head ? this.head.prev = null : this.tail = null, this.length--, t;
|
|
1124
|
+
}
|
|
1125
|
+
}, r.prototype.forEach = function(t, i) {
|
|
1126
|
+
i = i || this;
|
|
1127
|
+
for (var e = this.head, h$2 = 0; e !== null; h$2++) t.call(i, e.value, h$2, this), e = e.next;
|
|
1128
|
+
}, r.prototype.forEachReverse = function(t, i) {
|
|
1129
|
+
i = i || this;
|
|
1130
|
+
for (var e = this.tail, h$2 = this.length - 1; e !== null; h$2--) t.call(i, e.value, h$2, this), e = e.prev;
|
|
1131
|
+
}, r.prototype.get = function(t) {
|
|
1132
|
+
for (var i = 0, e = this.head; e !== null && i < t; i++) e = e.next;
|
|
1133
|
+
if (i === t && e !== null) return e.value;
|
|
1134
|
+
}, r.prototype.getReverse = function(t) {
|
|
1135
|
+
for (var i = 0, e = this.tail; e !== null && i < t; i++) e = e.prev;
|
|
1136
|
+
if (i === t && e !== null) return e.value;
|
|
1137
|
+
}, r.prototype.map = function(t, i) {
|
|
1138
|
+
i = i || this;
|
|
1139
|
+
for (var e = new r(), h$2 = this.head; h$2 !== null;) e.push(t.call(i, h$2.value, this)), h$2 = h$2.next;
|
|
1140
|
+
return e;
|
|
1141
|
+
}, r.prototype.mapReverse = function(t, i) {
|
|
1142
|
+
i = i || this;
|
|
1143
|
+
for (var e = new r(), h$2 = this.tail; h$2 !== null;) e.push(t.call(i, h$2.value, this)), h$2 = h$2.prev;
|
|
1144
|
+
return e;
|
|
1145
|
+
}, r.prototype.reduce = function(t, i) {
|
|
1146
|
+
var e, h$2 = this.head;
|
|
1147
|
+
if (arguments.length > 1) e = i;
|
|
1148
|
+
else if (this.head) h$2 = this.head.next, e = this.head.value;
|
|
1149
1149
|
else throw new TypeError("Reduce of empty list with no initial value");
|
|
1150
|
-
for (var n
|
|
1151
|
-
return e
|
|
1152
|
-
}, r.prototype.reduceReverse = function(t
|
|
1153
|
-
var e
|
|
1154
|
-
if (arguments.length > 1) e
|
|
1155
|
-
else if (this.tail) h$2 = this.tail.prev, e
|
|
1150
|
+
for (var n = 0; h$2 !== null; n++) e = t(e, h$2.value, n), h$2 = h$2.next;
|
|
1151
|
+
return e;
|
|
1152
|
+
}, r.prototype.reduceReverse = function(t, i) {
|
|
1153
|
+
var e, h$2 = this.tail;
|
|
1154
|
+
if (arguments.length > 1) e = i;
|
|
1155
|
+
else if (this.tail) h$2 = this.tail.prev, e = this.tail.value;
|
|
1156
1156
|
else throw new TypeError("Reduce of empty list with no initial value");
|
|
1157
|
-
for (var n
|
|
1158
|
-
return e
|
|
1157
|
+
for (var n = this.length - 1; h$2 !== null; n--) e = t(e, h$2.value, n), h$2 = h$2.prev;
|
|
1158
|
+
return e;
|
|
1159
1159
|
}, r.prototype.toArray = function() {
|
|
1160
|
-
for (var t
|
|
1161
|
-
return t
|
|
1160
|
+
for (var t = new Array(this.length), i = 0, e = this.head; e !== null; i++) t[i] = e.value, e = e.next;
|
|
1161
|
+
return t;
|
|
1162
1162
|
}, r.prototype.toArrayReverse = function() {
|
|
1163
|
-
for (var t
|
|
1164
|
-
return t
|
|
1165
|
-
}, r.prototype.slice = function(t
|
|
1166
|
-
i
|
|
1167
|
-
var e
|
|
1168
|
-
if (i
|
|
1169
|
-
t
|
|
1170
|
-
for (var h$2 = 0, n
|
|
1171
|
-
for (; n
|
|
1172
|
-
return e
|
|
1173
|
-
}, r.prototype.sliceReverse = function(t
|
|
1174
|
-
i
|
|
1175
|
-
var e
|
|
1176
|
-
if (i
|
|
1177
|
-
t
|
|
1178
|
-
for (var h$2 = this.length, n
|
|
1179
|
-
for (; n
|
|
1180
|
-
return e
|
|
1181
|
-
}, r.prototype.splice = function(t
|
|
1182
|
-
t
|
|
1183
|
-
for (var h$2 = 0, n
|
|
1184
|
-
for (var l
|
|
1185
|
-
n
|
|
1186
|
-
for (var h$2 = 0; h$2 < e
|
|
1187
|
-
return l
|
|
1163
|
+
for (var t = new Array(this.length), i = 0, e = this.tail; e !== null; i++) t[i] = e.value, e = e.prev;
|
|
1164
|
+
return t;
|
|
1165
|
+
}, r.prototype.slice = function(t, i) {
|
|
1166
|
+
i = i || this.length, i < 0 && (i += this.length), t = t || 0, t < 0 && (t += this.length);
|
|
1167
|
+
var e = new r();
|
|
1168
|
+
if (i < t || i < 0) return e;
|
|
1169
|
+
t < 0 && (t = 0), i > this.length && (i = this.length);
|
|
1170
|
+
for (var h$2 = 0, n = this.head; n !== null && h$2 < t; h$2++) n = n.next;
|
|
1171
|
+
for (; n !== null && h$2 < i; h$2++, n = n.next) e.push(n.value);
|
|
1172
|
+
return e;
|
|
1173
|
+
}, r.prototype.sliceReverse = function(t, i) {
|
|
1174
|
+
i = i || this.length, i < 0 && (i += this.length), t = t || 0, t < 0 && (t += this.length);
|
|
1175
|
+
var e = new r();
|
|
1176
|
+
if (i < t || i < 0) return e;
|
|
1177
|
+
t < 0 && (t = 0), i > this.length && (i = this.length);
|
|
1178
|
+
for (var h$2 = this.length, n = this.tail; n !== null && h$2 > i; h$2--) n = n.prev;
|
|
1179
|
+
for (; n !== null && h$2 > t; h$2--, n = n.prev) e.push(n.value);
|
|
1180
|
+
return e;
|
|
1181
|
+
}, r.prototype.splice = function(t, i, ...e) {
|
|
1182
|
+
t > this.length && (t = this.length - 1), t < 0 && (t = this.length + t);
|
|
1183
|
+
for (var h$2 = 0, n = this.head; n !== null && h$2 < t; h$2++) n = n.next;
|
|
1184
|
+
for (var l = [], h$2 = 0; n && h$2 < i; h$2++) l.push(n.value), n = this.removeNode(n);
|
|
1185
|
+
n === null && (n = this.tail), n !== this.head && n !== this.tail && (n = n.prev);
|
|
1186
|
+
for (var h$2 = 0; h$2 < e.length; h$2++) n = v(this, n, e[h$2]);
|
|
1187
|
+
return l;
|
|
1188
1188
|
}, r.prototype.reverse = function() {
|
|
1189
|
-
for (var t
|
|
1190
|
-
var h$2 = e
|
|
1191
|
-
e
|
|
1189
|
+
for (var t = this.head, i = this.tail, e = t; e !== null; e = e.prev) {
|
|
1190
|
+
var h$2 = e.prev;
|
|
1191
|
+
e.prev = e.next, e.next = h$2;
|
|
1192
1192
|
}
|
|
1193
|
-
return this.head = i
|
|
1193
|
+
return this.head = i, this.tail = t, this;
|
|
1194
1194
|
};
|
|
1195
|
-
function v
|
|
1196
|
-
var h$2 = i
|
|
1197
|
-
return h$2.next === null && (t
|
|
1195
|
+
function v(t, i, e) {
|
|
1196
|
+
var h$2 = i === t.head ? new s(e, null, i, t) : new s(e, i, i.next, t);
|
|
1197
|
+
return h$2.next === null && (t.tail = h$2), h$2.prev === null && (t.head = h$2), t.length++, h$2;
|
|
1198
1198
|
}
|
|
1199
|
-
function f
|
|
1200
|
-
t
|
|
1199
|
+
function f(t, i) {
|
|
1200
|
+
t.tail = new s(i, t.tail, null, t), t.head || (t.head = t.tail), t.length++;
|
|
1201
1201
|
}
|
|
1202
|
-
function o
|
|
1203
|
-
t
|
|
1202
|
+
function o(t, i) {
|
|
1203
|
+
t.head = new s(i, null, t.head, t), t.tail || (t.tail = t.head), t.length++;
|
|
1204
1204
|
}
|
|
1205
|
-
function s
|
|
1206
|
-
if (!(this instanceof s
|
|
1207
|
-
this.list = h$2, this.value = t
|
|
1205
|
+
function s(t, i, e, h$2) {
|
|
1206
|
+
if (!(this instanceof s)) return new s(t, i, e, h$2);
|
|
1207
|
+
this.list = h$2, this.value = t, i ? (i.next = this, this.prev = i) : this.prev = null, e ? (e.prev = this, this.next = e) : this.next = null;
|
|
1208
1208
|
}
|
|
1209
1209
|
try {
|
|
1210
1210
|
i$4()(r);
|
|
@@ -1216,13 +1216,13 @@ var X$1;
|
|
|
1216
1216
|
function ft() {
|
|
1217
1217
|
if (X$1) return s$5;
|
|
1218
1218
|
X$1 = 1;
|
|
1219
|
-
const H
|
|
1219
|
+
const H = typeof process == "object" && process ? process : {
|
|
1220
1220
|
stdout: null,
|
|
1221
1221
|
stderr: null
|
|
1222
|
-
}, Z = nt, q
|
|
1223
|
-
class z
|
|
1224
|
-
constructor(t
|
|
1225
|
-
this.src = t
|
|
1222
|
+
}, Z = nt, q = ot, G = ht.StringDecoder, m = Symbol("EOF"), d$1 = Symbol("maybeEmitEnd"), y = Symbol("emittedEnd"), R = Symbol("emittingEnd"), g$1 = Symbol("emittedError"), B$1 = Symbol("closed"), Y = Symbol("read"), T = Symbol("flush"), $ = Symbol("flushChunk"), f = Symbol("encoding"), c$1 = Symbol("decoder"), M$1 = Symbol("flowing"), S = Symbol("paused"), b$1 = Symbol("resume"), i = Symbol("buffer"), a = Symbol("pipes"), n = Symbol("bufferLength"), j = Symbol("bufferPush"), I$1 = Symbol("bufferShift"), o = Symbol("objectMode"), r = Symbol("destroyed"), P$2 = Symbol("error"), x$1 = Symbol("emitData"), V$1 = Symbol("emitEnd"), N$1 = Symbol("emitEnd2"), p = Symbol("async"), _ = Symbol("abort"), O = Symbol("aborted"), E = Symbol("signal"), w = (h$2) => Promise.resolve().then(h$2), J = commonjsGlobal._MP_NO_ITERATOR_SYMBOLS_ !== "1", K$1 = J && Symbol.asyncIterator || Symbol("asyncIterator not implemented"), W$1 = J && Symbol.iterator || Symbol("iterator not implemented"), k = (h$2) => h$2 === "end" || h$2 === "finish" || h$2 === "prefinish", tt = (h$2) => h$2 instanceof ArrayBuffer || typeof h$2 == "object" && h$2.constructor && h$2.constructor.name === "ArrayBuffer" && h$2.byteLength >= 0, et = (h$2) => !Buffer.isBuffer(h$2) && ArrayBuffer.isView(h$2);
|
|
1223
|
+
class z {
|
|
1224
|
+
constructor(t, e, s) {
|
|
1225
|
+
this.src = t, this.dest = e, this.opts = s, this.ondrain = () => t[b$1](), e.on("drain", this.ondrain);
|
|
1226
1226
|
}
|
|
1227
1227
|
unpipe() {
|
|
1228
1228
|
this.dest.removeListener("drain", this.ondrain);
|
|
@@ -1232,80 +1232,80 @@ function ft() {
|
|
|
1232
1232
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
|
-
class st extends z
|
|
1235
|
+
class st extends z {
|
|
1236
1236
|
unpipe() {
|
|
1237
1237
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
1238
1238
|
}
|
|
1239
|
-
constructor(t
|
|
1240
|
-
super(t
|
|
1239
|
+
constructor(t, e, s) {
|
|
1240
|
+
super(t, e, s), this.proxyErrors = (l) => e.emit("error", l), t.on("error", this.proxyErrors);
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
|
-
class F
|
|
1244
|
-
constructor(t
|
|
1245
|
-
super(), this[M$1] = false, this[S
|
|
1243
|
+
class F extends q {
|
|
1244
|
+
constructor(t) {
|
|
1245
|
+
super(), this[M$1] = 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$1] = this[f] ? new G(this[f]) : null, this[m] = false, this[y] = false, this[R] = false, this[B$1] = false, this[g$1] = 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[_]());
|
|
1246
1246
|
}
|
|
1247
1247
|
get bufferLength() {
|
|
1248
|
-
return this[n
|
|
1248
|
+
return this[n];
|
|
1249
1249
|
}
|
|
1250
1250
|
get encoding() {
|
|
1251
|
-
return this[f
|
|
1251
|
+
return this[f];
|
|
1252
1252
|
}
|
|
1253
|
-
set encoding(t
|
|
1254
|
-
if (this[o
|
|
1255
|
-
if (this[f
|
|
1256
|
-
this[f
|
|
1253
|
+
set encoding(t) {
|
|
1254
|
+
if (this[o]) throw new Error("cannot set encoding in objectMode");
|
|
1255
|
+
if (this[f] && t !== this[f] && (this[c$1] && this[c$1].lastNeed || this[n])) throw new Error("cannot change encoding");
|
|
1256
|
+
this[f] !== t && (this[c$1] = t ? new G(t) : null, this[i].length && (this[i] = this[i].map((e) => this[c$1].write(e)))), this[f] = t;
|
|
1257
1257
|
}
|
|
1258
|
-
setEncoding(t
|
|
1259
|
-
this.encoding = t
|
|
1258
|
+
setEncoding(t) {
|
|
1259
|
+
this.encoding = t;
|
|
1260
1260
|
}
|
|
1261
1261
|
get objectMode() {
|
|
1262
|
-
return this[o
|
|
1262
|
+
return this[o];
|
|
1263
1263
|
}
|
|
1264
|
-
set objectMode(t
|
|
1265
|
-
this[o
|
|
1264
|
+
set objectMode(t) {
|
|
1265
|
+
this[o] = this[o] || !!t;
|
|
1266
1266
|
}
|
|
1267
1267
|
get async() {
|
|
1268
|
-
return this[p
|
|
1268
|
+
return this[p];
|
|
1269
1269
|
}
|
|
1270
|
-
set async(t
|
|
1271
|
-
this[p
|
|
1270
|
+
set async(t) {
|
|
1271
|
+
this[p] = this[p] || !!t;
|
|
1272
1272
|
}
|
|
1273
|
-
[_
|
|
1274
|
-
this[O
|
|
1273
|
+
[_]() {
|
|
1274
|
+
this[O] = true, this.emit("abort", this[E].reason), this.destroy(this[E].reason);
|
|
1275
1275
|
}
|
|
1276
1276
|
get aborted() {
|
|
1277
|
-
return this[O
|
|
1277
|
+
return this[O];
|
|
1278
1278
|
}
|
|
1279
|
-
set aborted(t
|
|
1280
|
-
write(t
|
|
1281
|
-
if (this[O
|
|
1282
|
-
if (this[m
|
|
1279
|
+
set aborted(t) {}
|
|
1280
|
+
write(t, e, s) {
|
|
1281
|
+
if (this[O]) return false;
|
|
1282
|
+
if (this[m]) throw new Error("write after end");
|
|
1283
1283
|
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;
|
|
1284
|
-
typeof e
|
|
1285
|
-
const l
|
|
1286
|
-
return !this[o
|
|
1284
|
+
typeof e == "function" && (s = e, e = "utf8"), e || (e = "utf8");
|
|
1285
|
+
const l = this[p] ? w : (u) => u();
|
|
1286
|
+
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$1].lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[f] && (t = this[c$1].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);
|
|
1287
1287
|
}
|
|
1288
|
-
read(t
|
|
1288
|
+
read(t) {
|
|
1289
1289
|
if (this[r]) return null;
|
|
1290
|
-
if (this[n
|
|
1291
|
-
this[o
|
|
1292
|
-
const e
|
|
1293
|
-
return this[d$1](), e
|
|
1290
|
+
if (this[n] === 0 || t === 0 || t > this[n]) return this[d$1](), null;
|
|
1291
|
+
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])]);
|
|
1292
|
+
const e = this[Y](t || null, this[i][0]);
|
|
1293
|
+
return this[d$1](), e;
|
|
1294
1294
|
}
|
|
1295
|
-
[Y](t
|
|
1296
|
-
return t
|
|
1295
|
+
[Y](t, e) {
|
|
1296
|
+
return t === e.length || t === null ? this[I$1]() : (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;
|
|
1297
1297
|
}
|
|
1298
|
-
end(t
|
|
1299
|
-
return typeof t
|
|
1298
|
+
end(t, e, s) {
|
|
1299
|
+
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$1](), this;
|
|
1300
1300
|
}
|
|
1301
1301
|
[b$1]() {
|
|
1302
|
-
this[r] || (this[S
|
|
1302
|
+
this[r] || (this[S] = false, this[M$1] = true, this.emit("resume"), this[i].length ? this[T]() : this[m] ? this[d$1]() : this.emit("drain"));
|
|
1303
1303
|
}
|
|
1304
1304
|
resume() {
|
|
1305
1305
|
return this[b$1]();
|
|
1306
1306
|
}
|
|
1307
1307
|
pause() {
|
|
1308
|
-
this[M$1] = false, this[S
|
|
1308
|
+
this[M$1] = false, this[S] = true;
|
|
1309
1309
|
}
|
|
1310
1310
|
get destroyed() {
|
|
1311
1311
|
return this[r];
|
|
@@ -1314,160 +1314,160 @@ function ft() {
|
|
|
1314
1314
|
return this[M$1];
|
|
1315
1315
|
}
|
|
1316
1316
|
get paused() {
|
|
1317
|
-
return this[S
|
|
1317
|
+
return this[S];
|
|
1318
1318
|
}
|
|
1319
|
-
[j
|
|
1320
|
-
this[o
|
|
1319
|
+
[j](t) {
|
|
1320
|
+
this[o] ? this[n] += 1 : this[n] += t.length, this[i].push(t);
|
|
1321
1321
|
}
|
|
1322
1322
|
[I$1]() {
|
|
1323
|
-
return this[o
|
|
1323
|
+
return this[o] ? this[n] -= 1 : this[n] -= this[i][0].length, this[i].shift();
|
|
1324
1324
|
}
|
|
1325
|
-
[T
|
|
1325
|
+
[T](t) {
|
|
1326
1326
|
do ;
|
|
1327
|
-
while (this[$](this[I$1]()) && this[i
|
|
1328
|
-
!t
|
|
1327
|
+
while (this[$](this[I$1]()) && this[i].length);
|
|
1328
|
+
!t && !this[i].length && !this[m] && this.emit("drain");
|
|
1329
1329
|
}
|
|
1330
|
-
[$](t
|
|
1331
|
-
return this.emit("data", t
|
|
1330
|
+
[$](t) {
|
|
1331
|
+
return this.emit("data", t), this.flowing;
|
|
1332
1332
|
}
|
|
1333
|
-
pipe(t
|
|
1333
|
+
pipe(t, e) {
|
|
1334
1334
|
if (this[r]) return;
|
|
1335
|
-
const s
|
|
1336
|
-
return e
|
|
1335
|
+
const s = this[y];
|
|
1336
|
+
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$1]()) : this[b$1]()), t;
|
|
1337
1337
|
}
|
|
1338
|
-
unpipe(t
|
|
1339
|
-
const e
|
|
1340
|
-
e
|
|
1338
|
+
unpipe(t) {
|
|
1339
|
+
const e = this[a].find((s) => s.dest === t);
|
|
1340
|
+
e && (this[a].splice(this[a].indexOf(e), 1), e.unpipe());
|
|
1341
1341
|
}
|
|
1342
|
-
addListener(t
|
|
1343
|
-
return this.on(t
|
|
1342
|
+
addListener(t, e) {
|
|
1343
|
+
return this.on(t, e);
|
|
1344
1344
|
}
|
|
1345
|
-
on(t
|
|
1346
|
-
const s
|
|
1347
|
-
return t
|
|
1345
|
+
on(t, e) {
|
|
1346
|
+
const s = super.on(t, e);
|
|
1347
|
+
return t === "data" && !this[a].length && !this.flowing ? this[b$1]() : t === "readable" && this[n] !== 0 ? super.emit("readable") : k(t) && this[y] ? (super.emit(t), this.removeAllListeners(t)) : t === "error" && this[g$1] && (this[p] ? w(() => e.call(this, this[g$1])) : e.call(this, this[g$1])), s;
|
|
1348
1348
|
}
|
|
1349
1349
|
get emittedEnd() {
|
|
1350
|
-
return this[y
|
|
1350
|
+
return this[y];
|
|
1351
1351
|
}
|
|
1352
1352
|
[d$1]() {
|
|
1353
|
-
!this[R
|
|
1354
|
-
}
|
|
1355
|
-
emit(t
|
|
1356
|
-
if (t
|
|
1357
|
-
if (t
|
|
1358
|
-
if (t
|
|
1359
|
-
if (t
|
|
1360
|
-
if (this[B$1] = true, !this[y
|
|
1361
|
-
const u
|
|
1362
|
-
return this.removeAllListeners("close"), u
|
|
1363
|
-
} else if (t
|
|
1364
|
-
this[g$1] = e
|
|
1365
|
-
const u
|
|
1366
|
-
return this[d$1](), u
|
|
1367
|
-
} else if (t
|
|
1368
|
-
const u
|
|
1369
|
-
return this[d$1](), u
|
|
1370
|
-
} else if (t
|
|
1371
|
-
const u
|
|
1372
|
-
return this.removeAllListeners(t
|
|
1353
|
+
!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$1] && this.emit("close"), this[R] = false);
|
|
1354
|
+
}
|
|
1355
|
+
emit(t, e, ...s) {
|
|
1356
|
+
if (t !== "error" && t !== "close" && t !== r && this[r]) return;
|
|
1357
|
+
if (t === "data") return !this[o] && !e ? false : this[p] ? w(() => this[x$1](e)) : this[x$1](e);
|
|
1358
|
+
if (t === "end") return this[V$1]();
|
|
1359
|
+
if (t === "close") {
|
|
1360
|
+
if (this[B$1] = true, !this[y] && !this[r]) return;
|
|
1361
|
+
const u = super.emit("close");
|
|
1362
|
+
return this.removeAllListeners("close"), u;
|
|
1363
|
+
} else if (t === "error") {
|
|
1364
|
+
this[g$1] = e, super.emit(P$2, e);
|
|
1365
|
+
const u = !this[E] || this.listeners("error").length ? super.emit("error", e) : false;
|
|
1366
|
+
return this[d$1](), u;
|
|
1367
|
+
} else if (t === "resume") {
|
|
1368
|
+
const u = super.emit("resume");
|
|
1369
|
+
return this[d$1](), u;
|
|
1370
|
+
} else if (t === "finish" || t === "prefinish") {
|
|
1371
|
+
const u = super.emit(t);
|
|
1372
|
+
return this.removeAllListeners(t), u;
|
|
1373
1373
|
}
|
|
1374
|
-
const l
|
|
1375
|
-
return this[d$1](), l
|
|
1374
|
+
const l = super.emit(t, e, ...s);
|
|
1375
|
+
return this[d$1](), l;
|
|
1376
1376
|
}
|
|
1377
|
-
[x$1](t
|
|
1378
|
-
for (const s
|
|
1379
|
-
const e
|
|
1380
|
-
return this[d$1](), e
|
|
1377
|
+
[x$1](t) {
|
|
1378
|
+
for (const s of this[a]) s.dest.write(t) === false && this.pause();
|
|
1379
|
+
const e = super.emit("data", t);
|
|
1380
|
+
return this[d$1](), e;
|
|
1381
1381
|
}
|
|
1382
1382
|
[V$1]() {
|
|
1383
|
-
this[y
|
|
1383
|
+
this[y] || (this[y] = true, this.readable = false, this[p] ? w(() => this[N$1]()) : this[N$1]());
|
|
1384
1384
|
}
|
|
1385
1385
|
[N$1]() {
|
|
1386
|
-
if (this[c$
|
|
1387
|
-
const e
|
|
1388
|
-
if (e
|
|
1389
|
-
for (const s
|
|
1390
|
-
super.emit("data", e
|
|
1386
|
+
if (this[c$1]) {
|
|
1387
|
+
const e = this[c$1].end();
|
|
1388
|
+
if (e) {
|
|
1389
|
+
for (const s of this[a]) s.dest.write(e);
|
|
1390
|
+
super.emit("data", e);
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
|
-
for (const e
|
|
1394
|
-
const t
|
|
1395
|
-
return this.removeAllListeners("end"), t
|
|
1393
|
+
for (const e of this[a]) e.end();
|
|
1394
|
+
const t = super.emit("end");
|
|
1395
|
+
return this.removeAllListeners("end"), t;
|
|
1396
1396
|
}
|
|
1397
1397
|
collect() {
|
|
1398
|
-
const t
|
|
1399
|
-
this[o
|
|
1400
|
-
const e
|
|
1401
|
-
return this.on("data", (s
|
|
1402
|
-
t
|
|
1403
|
-
}), e
|
|
1398
|
+
const t = [];
|
|
1399
|
+
this[o] || (t.dataLength = 0);
|
|
1400
|
+
const e = this.promise();
|
|
1401
|
+
return this.on("data", (s) => {
|
|
1402
|
+
t.push(s), this[o] || (t.dataLength += s.length);
|
|
1403
|
+
}), e.then(() => t);
|
|
1404
1404
|
}
|
|
1405
1405
|
concat() {
|
|
1406
|
-
return this[o
|
|
1406
|
+
return this[o] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this.collect().then((t) => this[o] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this[f] ? t.join("") : Buffer.concat(t, t.dataLength));
|
|
1407
1407
|
}
|
|
1408
1408
|
promise() {
|
|
1409
|
-
return new Promise((t
|
|
1410
|
-
this.on(r, () => e
|
|
1409
|
+
return new Promise((t, e) => {
|
|
1410
|
+
this.on(r, () => e(/* @__PURE__ */ new Error("stream destroyed"))), this.on("error", (s) => e(s)), this.on("end", () => t());
|
|
1411
1411
|
});
|
|
1412
1412
|
}
|
|
1413
1413
|
[K$1]() {
|
|
1414
|
-
let t
|
|
1415
|
-
const e
|
|
1414
|
+
let t = false;
|
|
1415
|
+
const e = () => (this.pause(), t = true, Promise.resolve({ done: true }));
|
|
1416
1416
|
return {
|
|
1417
1417
|
next: () => {
|
|
1418
|
-
if (t
|
|
1419
|
-
const l
|
|
1420
|
-
if (l
|
|
1418
|
+
if (t) return e();
|
|
1419
|
+
const l = this.read();
|
|
1420
|
+
if (l !== null) return Promise.resolve({
|
|
1421
1421
|
done: false,
|
|
1422
|
-
value: l
|
|
1422
|
+
value: l
|
|
1423
1423
|
});
|
|
1424
|
-
if (this[m
|
|
1425
|
-
let u
|
|
1424
|
+
if (this[m]) return e();
|
|
1425
|
+
let u = null, Q = null;
|
|
1426
1426
|
const A$1 = (L) => {
|
|
1427
|
-
this.removeListener("data", U$1), this.removeListener("end", C
|
|
1427
|
+
this.removeListener("data", U$1), this.removeListener("end", C), this.removeListener(r, D$1), e(), Q(L);
|
|
1428
1428
|
}, U$1 = (L) => {
|
|
1429
|
-
this.removeListener("error", A$1), this.removeListener("end", C
|
|
1429
|
+
this.removeListener("error", A$1), this.removeListener("end", C), this.removeListener(r, D$1), this.pause(), u({
|
|
1430
1430
|
value: L,
|
|
1431
|
-
done: !!this[m
|
|
1431
|
+
done: !!this[m]
|
|
1432
1432
|
});
|
|
1433
|
-
}, C
|
|
1434
|
-
this.removeListener("error", A$1), this.removeListener("data", U$1), this.removeListener(r, D$1), e
|
|
1433
|
+
}, C = () => {
|
|
1434
|
+
this.removeListener("error", A$1), this.removeListener("data", U$1), this.removeListener(r, D$1), e(), u({ done: true });
|
|
1435
1435
|
}, D$1 = () => A$1(/* @__PURE__ */ new Error("stream destroyed"));
|
|
1436
1436
|
return new Promise((L, it) => {
|
|
1437
|
-
Q = it, u
|
|
1437
|
+
Q = it, u = L, this.once(r, D$1), this.once("error", A$1), this.once("end", C), this.once("data", U$1);
|
|
1438
1438
|
});
|
|
1439
1439
|
},
|
|
1440
|
-
throw: e
|
|
1441
|
-
return: e
|
|
1440
|
+
throw: e,
|
|
1441
|
+
return: e,
|
|
1442
1442
|
[K$1]() {
|
|
1443
1443
|
return this;
|
|
1444
1444
|
}
|
|
1445
1445
|
};
|
|
1446
1446
|
}
|
|
1447
1447
|
[W$1]() {
|
|
1448
|
-
let t
|
|
1449
|
-
const e
|
|
1450
|
-
if (t
|
|
1451
|
-
const l
|
|
1452
|
-
return l
|
|
1448
|
+
let t = false;
|
|
1449
|
+
const e = () => (this.pause(), this.removeListener(P$2, e), this.removeListener(r, e), this.removeListener("end", e), t = true, { done: true }), s = () => {
|
|
1450
|
+
if (t) return e();
|
|
1451
|
+
const l = this.read();
|
|
1452
|
+
return l === null ? e() : { value: l };
|
|
1453
1453
|
};
|
|
1454
|
-
return this.once("end", e
|
|
1455
|
-
next: s
|
|
1456
|
-
throw: e
|
|
1457
|
-
return: e
|
|
1454
|
+
return this.once("end", e), this.once(P$2, e), this.once(r, e), {
|
|
1455
|
+
next: s,
|
|
1456
|
+
throw: e,
|
|
1457
|
+
return: e,
|
|
1458
1458
|
[W$1]() {
|
|
1459
1459
|
return this;
|
|
1460
1460
|
}
|
|
1461
1461
|
};
|
|
1462
1462
|
}
|
|
1463
|
-
destroy(t
|
|
1464
|
-
return this[r] ? (t
|
|
1463
|
+
destroy(t) {
|
|
1464
|
+
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$1] && this.close(), t ? this.emit("error", t) : this.emit(r), this);
|
|
1465
1465
|
}
|
|
1466
|
-
static isStream(t
|
|
1467
|
-
return !!t
|
|
1466
|
+
static isStream(t) {
|
|
1467
|
+
return !!t && (t instanceof F || t instanceof q || t instanceof Z && (typeof t.pipe == "function" || typeof t.write == "function" && typeof t.end == "function"));
|
|
1468
1468
|
}
|
|
1469
1469
|
}
|
|
1470
|
-
return s$5.Minipass = F
|
|
1470
|
+
return s$5.Minipass = F, s$5;
|
|
1471
1471
|
}
|
|
1472
1472
|
var e$2, o$4;
|
|
1473
1473
|
function a$7() {
|
|
@@ -1477,10 +1477,10 @@ var n$2, a$6;
|
|
|
1477
1477
|
function u$3() {
|
|
1478
1478
|
if (a$6) return n$2;
|
|
1479
1479
|
a$6 = 1;
|
|
1480
|
-
const { Minipass: o
|
|
1481
|
-
return n$2 = class extends o
|
|
1482
|
-
constructor(t
|
|
1483
|
-
switch (super(), this.pause(), this.extended = e
|
|
1480
|
+
const { Minipass: o } = ft(), s = a$7(), r = Symbol("slurp");
|
|
1481
|
+
return n$2 = class extends o {
|
|
1482
|
+
constructor(t, e, i) {
|
|
1483
|
+
switch (super(), this.pause(), this.extended = e, this.globalExtended = i, this.header = t, this.startBlockSize = 512 * Math.ceil(t.size / 512), this.blockRemain = this.startBlockSize, this.remain = t.size, this.type = t.type, this.meta = false, this.ignore = false, this.type) {
|
|
1484
1484
|
case "File":
|
|
1485
1485
|
case "OldFile":
|
|
1486
1486
|
case "Link":
|
|
@@ -1501,16 +1501,16 @@ function u$3() {
|
|
|
1501
1501
|
break;
|
|
1502
1502
|
default: this.ignore = true;
|
|
1503
1503
|
}
|
|
1504
|
-
this.path = s
|
|
1504
|
+
this.path = s(t.path), this.mode = t.mode, this.mode && (this.mode = this.mode & 4095), this.uid = t.uid, this.gid = t.gid, this.uname = t.uname, this.gname = t.gname, this.size = t.size, this.mtime = t.mtime, this.atime = t.atime, this.ctime = t.ctime, this.linkpath = s(t.linkpath), this.uname = t.uname, this.gname = t.gname, e && this[r](e), i && this[r](i, true);
|
|
1505
1505
|
}
|
|
1506
|
-
write(t
|
|
1507
|
-
const e
|
|
1508
|
-
if (e
|
|
1509
|
-
const i
|
|
1510
|
-
return this.remain = Math.max(0, i
|
|
1506
|
+
write(t) {
|
|
1507
|
+
const e = t.length;
|
|
1508
|
+
if (e > this.blockRemain) throw new Error("writing more to entry than is appropriate");
|
|
1509
|
+
const i = this.remain, c$1 = this.blockRemain;
|
|
1510
|
+
return this.remain = Math.max(0, i - e), this.blockRemain = Math.max(0, c$1 - e), this.ignore ? true : i >= e ? super.write(t) : super.write(t.slice(0, i));
|
|
1511
1511
|
}
|
|
1512
|
-
[r](t
|
|
1513
|
-
for (const i
|
|
1512
|
+
[r](t, e) {
|
|
1513
|
+
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]);
|
|
1514
1514
|
}
|
|
1515
1515
|
}, n$2;
|
|
1516
1516
|
}
|
|
@@ -1518,22 +1518,22 @@ var r$2, a$5;
|
|
|
1518
1518
|
function f$2() {
|
|
1519
1519
|
if (a$5) return r$2;
|
|
1520
1520
|
a$5 = 1;
|
|
1521
|
-
const c$
|
|
1521
|
+
const c$1 = E(), d$1 = path;
|
|
1522
1522
|
class h$2 {
|
|
1523
|
-
constructor(e
|
|
1524
|
-
this.atime = e
|
|
1523
|
+
constructor(e, n) {
|
|
1524
|
+
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;
|
|
1525
1525
|
}
|
|
1526
1526
|
encode() {
|
|
1527
|
-
const e
|
|
1528
|
-
if (e
|
|
1529
|
-
const n
|
|
1530
|
-
for (let t
|
|
1531
|
-
new c$
|
|
1527
|
+
const e = this.encodeBody();
|
|
1528
|
+
if (e === "") return null;
|
|
1529
|
+
const n = Buffer.byteLength(e), l = 512 * Math.ceil(1 + n / 512), i = Buffer.allocUnsafe(l);
|
|
1530
|
+
for (let t = 0; t < 512; t++) i[t] = 0;
|
|
1531
|
+
new c$1({
|
|
1532
1532
|
path: ("PaxHeader/" + d$1.basename(this.path)).slice(0, 99),
|
|
1533
1533
|
mode: this.mode || 420,
|
|
1534
1534
|
uid: this.uid || null,
|
|
1535
1535
|
gid: this.gid || null,
|
|
1536
|
-
size: n
|
|
1536
|
+
size: n,
|
|
1537
1537
|
mtime: this.mtime || null,
|
|
1538
1538
|
type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader",
|
|
1539
1539
|
linkpath: "",
|
|
@@ -1543,31 +1543,31 @@ function f$2() {
|
|
|
1543
1543
|
devmin: 0,
|
|
1544
1544
|
atime: this.atime || null,
|
|
1545
1545
|
ctime: this.ctime || null
|
|
1546
|
-
}).encode(i
|
|
1547
|
-
for (let t
|
|
1548
|
-
return i
|
|
1546
|
+
}).encode(i), i.write(e, 512, n, "utf8");
|
|
1547
|
+
for (let t = n + 512; t < i.length; t++) i[t] = 0;
|
|
1548
|
+
return i;
|
|
1549
1549
|
}
|
|
1550
1550
|
encodeBody() {
|
|
1551
1551
|
return this.encodeField("path") + this.encodeField("ctime") + this.encodeField("atime") + this.encodeField("dev") + this.encodeField("ino") + this.encodeField("nlink") + this.encodeField("charset") + this.encodeField("comment") + this.encodeField("gid") + this.encodeField("gname") + this.encodeField("linkpath") + this.encodeField("mtime") + this.encodeField("size") + this.encodeField("uid") + this.encodeField("uname");
|
|
1552
1552
|
}
|
|
1553
|
-
encodeField(e
|
|
1554
|
-
if (this[e
|
|
1555
|
-
const n
|
|
1556
|
-
`, i
|
|
1557
|
-
let t
|
|
1558
|
-
return i
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
h$2.parse = (s
|
|
1562
|
-
const o
|
|
1563
|
-
`).reduce(m
|
|
1564
|
-
const n
|
|
1565
|
-
if (n
|
|
1566
|
-
e
|
|
1567
|
-
const l
|
|
1568
|
-
if (!i
|
|
1569
|
-
const t
|
|
1570
|
-
return s
|
|
1553
|
+
encodeField(e) {
|
|
1554
|
+
if (this[e] === null || this[e] === void 0) return "";
|
|
1555
|
+
const n = this[e] instanceof Date ? this[e].getTime() / 1e3 : this[e], l = " " + (e === "dev" || e === "ino" || e === "nlink" ? "SCHILY." : "") + e + "=" + n + `
|
|
1556
|
+
`, i = Buffer.byteLength(l);
|
|
1557
|
+
let t = Math.floor(Math.log(i) / Math.log(10)) + 1;
|
|
1558
|
+
return i + t >= Math.pow(10, t) && (t += 1), t + i + l;
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
h$2.parse = (s, e, n) => new h$2(o(u(s), e), n);
|
|
1562
|
+
const o = (s, e) => e ? Object.keys(s).reduce((n, l) => (n[l] = s[l], n), e) : s, u = (s) => s.replace(/\n$/, "").split(`
|
|
1563
|
+
`).reduce(m, Object.create(null)), m = (s, e) => {
|
|
1564
|
+
const n = parseInt(e, 10);
|
|
1565
|
+
if (n !== Buffer.byteLength(e) + 1) return s;
|
|
1566
|
+
e = e.slice((n + " ").length);
|
|
1567
|
+
const l = e.split("="), i = l.shift().replace(/^SCHILY\.(dev|ino|nlink)/, "$1");
|
|
1568
|
+
if (!i) return s;
|
|
1569
|
+
const t = l.join("=");
|
|
1570
|
+
return s[i] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i) ? /* @__PURE__ */ new Date(t * 1e3) : /^[0-9]+$/.test(t) ? +t : t, s;
|
|
1571
1571
|
};
|
|
1572
1572
|
return r$2 = h$2, r$2;
|
|
1573
1573
|
}
|
|
@@ -1576,7 +1576,7 @@ var _, R$1;
|
|
|
1576
1576
|
function T() {
|
|
1577
1577
|
if (R$1) return _;
|
|
1578
1578
|
R$1 = 1;
|
|
1579
|
-
const E
|
|
1579
|
+
const E = O$2.constants || { ZLIB_VERNUM: 4736 };
|
|
1580
1580
|
return _ = Object.freeze(Object.assign(Object.create(null), {
|
|
1581
1581
|
Z_NO_FLUSH: 0,
|
|
1582
1582
|
Z_PARTIAL_FLUSH: 1,
|
|
@@ -1684,7 +1684,7 @@ function T() {
|
|
|
1684
1684
|
BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27,
|
|
1685
1685
|
BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30,
|
|
1686
1686
|
BROTLI_DECODER_ERROR_UNREACHABLE: -31
|
|
1687
|
-
}, E
|
|
1687
|
+
}, E)), _;
|
|
1688
1688
|
}
|
|
1689
1689
|
var j, H$1;
|
|
1690
1690
|
function tt() {
|
|
@@ -1693,10 +1693,10 @@ function tt() {
|
|
|
1693
1693
|
const I$1 = typeof process == "object" && process ? process : {
|
|
1694
1694
|
stdout: null,
|
|
1695
1695
|
stderr: null
|
|
1696
|
-
}, Y = nt, x$1 = ot, N$1 = ht.StringDecoder, u
|
|
1696
|
+
}, Y = nt, x$1 = ot, N$1 = ht.StringDecoder, u = Symbol("EOF"), a = Symbol("maybeEmitEnd"), c$1 = Symbol("emittedEnd"), S = Symbol("emittingEnd"), E = Symbol("emittedError"), w = Symbol("closed"), P$2 = Symbol("read"), L = Symbol("flush"), _ = Symbol("flushChunk"), h$2 = Symbol("encoding"), m = Symbol("decoder"), M$1 = Symbol("flowing"), y = Symbol("paused"), p = Symbol("resume"), s = Symbol("bufferLength"), T = Symbol("bufferPush"), B$1 = Symbol("bufferShift"), r = Symbol("objectMode"), n = Symbol("destroyed"), D$1 = Symbol("emitData"), F = Symbol("emitEnd"), R = Symbol("emitEnd2"), d$1 = Symbol("async"), b$1 = (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$1 = (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);
|
|
1697
1697
|
class U$1 {
|
|
1698
|
-
constructor(t
|
|
1699
|
-
this.src = t
|
|
1698
|
+
constructor(t, e, i) {
|
|
1699
|
+
this.src = t, this.dest = e, this.opts = i, this.ondrain = () => t[p](), e.on("drain", this.ondrain);
|
|
1700
1700
|
}
|
|
1701
1701
|
unpipe() {
|
|
1702
1702
|
this.dest.removeListener("drain", this.ondrain);
|
|
@@ -1710,210 +1710,210 @@ function tt() {
|
|
|
1710
1710
|
unpipe() {
|
|
1711
1711
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
1712
1712
|
}
|
|
1713
|
-
constructor(t
|
|
1714
|
-
super(t
|
|
1713
|
+
constructor(t, e, i) {
|
|
1714
|
+
super(t, e, i), this.proxyErrors = (l) => e.emit("error", l), t.on("error", this.proxyErrors);
|
|
1715
1715
|
}
|
|
1716
1716
|
}
|
|
1717
|
-
return j = class q
|
|
1718
|
-
constructor(t
|
|
1719
|
-
super(), this[M$1] = false, this[y
|
|
1717
|
+
return j = class q extends x$1 {
|
|
1718
|
+
constructor(t) {
|
|
1719
|
+
super(), this[M$1] = false, this[y] = false, this.pipes = [], this.buffer = [], this[r] = t && t.objectMode || false, this[r] ? this[h$2] = null : this[h$2] = t && t.encoding || null, this[h$2] === "buffer" && (this[h$2] = null), this[d$1] = t && !!t.async || false, this[m] = this[h$2] ? new N$1(this[h$2]) : null, this[u] = false, this[c$1] = false, this[S] = false, this[w] = false, this[E] = null, this.writable = true, this.readable = true, this[s] = 0, this[n] = false;
|
|
1720
1720
|
}
|
|
1721
1721
|
get bufferLength() {
|
|
1722
|
-
return this[s
|
|
1722
|
+
return this[s];
|
|
1723
1723
|
}
|
|
1724
1724
|
get encoding() {
|
|
1725
1725
|
return this[h$2];
|
|
1726
1726
|
}
|
|
1727
|
-
set encoding(t
|
|
1727
|
+
set encoding(t) {
|
|
1728
1728
|
if (this[r]) throw new Error("cannot set encoding in objectMode");
|
|
1729
|
-
if (this[h$2] && t
|
|
1730
|
-
this[h$2] !== t
|
|
1729
|
+
if (this[h$2] && t !== this[h$2] && (this[m] && this[m].lastNeed || this[s])) throw new Error("cannot change encoding");
|
|
1730
|
+
this[h$2] !== t && (this[m] = t ? new N$1(t) : null, this.buffer.length && (this.buffer = this.buffer.map((e) => this[m].write(e)))), this[h$2] = t;
|
|
1731
1731
|
}
|
|
1732
|
-
setEncoding(t
|
|
1733
|
-
this.encoding = t
|
|
1732
|
+
setEncoding(t) {
|
|
1733
|
+
this.encoding = t;
|
|
1734
1734
|
}
|
|
1735
1735
|
get objectMode() {
|
|
1736
1736
|
return this[r];
|
|
1737
1737
|
}
|
|
1738
|
-
set objectMode(t
|
|
1739
|
-
this[r] = this[r] || !!t
|
|
1738
|
+
set objectMode(t) {
|
|
1739
|
+
this[r] = this[r] || !!t;
|
|
1740
1740
|
}
|
|
1741
1741
|
get async() {
|
|
1742
1742
|
return this[d$1];
|
|
1743
1743
|
}
|
|
1744
|
-
set async(t
|
|
1745
|
-
this[d$1] = this[d$1] || !!t
|
|
1744
|
+
set async(t) {
|
|
1745
|
+
this[d$1] = this[d$1] || !!t;
|
|
1746
1746
|
}
|
|
1747
|
-
write(t
|
|
1748
|
-
if (this[u
|
|
1749
|
-
if (this[n
|
|
1750
|
-
typeof e
|
|
1751
|
-
const l
|
|
1752
|
-
return !this[r] && !Buffer.isBuffer(t
|
|
1747
|
+
write(t, e, i) {
|
|
1748
|
+
if (this[u]) throw new Error("write after end");
|
|
1749
|
+
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;
|
|
1750
|
+
typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
|
|
1751
|
+
const l = this[d$1] ? b$1 : (f) => f();
|
|
1752
|
+
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$2] && !this[m].lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[h$2] && (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);
|
|
1753
1753
|
}
|
|
1754
|
-
read(t
|
|
1755
|
-
if (this[n
|
|
1756
|
-
if (this[s
|
|
1757
|
-
this[r] && (t
|
|
1758
|
-
const e
|
|
1759
|
-
return this[a
|
|
1754
|
+
read(t) {
|
|
1755
|
+
if (this[n]) return null;
|
|
1756
|
+
if (this[s] === 0 || t === 0 || t > this[s]) return this[a](), null;
|
|
1757
|
+
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])]);
|
|
1758
|
+
const e = this[P$2](t || null, this.buffer[0]);
|
|
1759
|
+
return this[a](), e;
|
|
1760
1760
|
}
|
|
1761
|
-
[P$2](t
|
|
1762
|
-
return t
|
|
1761
|
+
[P$2](t, e) {
|
|
1762
|
+
return t === e.length || t === null ? this[B$1]() : (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;
|
|
1763
1763
|
}
|
|
1764
|
-
end(t
|
|
1765
|
-
return typeof t
|
|
1764
|
+
end(t, e, i) {
|
|
1765
|
+
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;
|
|
1766
1766
|
}
|
|
1767
|
-
[p
|
|
1768
|
-
this[n
|
|
1767
|
+
[p]() {
|
|
1768
|
+
this[n] || (this[y] = false, this[M$1] = true, this.emit("resume"), this.buffer.length ? this[L]() : this[u] ? this[a]() : this.emit("drain"));
|
|
1769
1769
|
}
|
|
1770
1770
|
resume() {
|
|
1771
|
-
return this[p
|
|
1771
|
+
return this[p]();
|
|
1772
1772
|
}
|
|
1773
1773
|
pause() {
|
|
1774
|
-
this[M$1] = false, this[y
|
|
1774
|
+
this[M$1] = false, this[y] = true;
|
|
1775
1775
|
}
|
|
1776
1776
|
get destroyed() {
|
|
1777
|
-
return this[n
|
|
1777
|
+
return this[n];
|
|
1778
1778
|
}
|
|
1779
1779
|
get flowing() {
|
|
1780
1780
|
return this[M$1];
|
|
1781
1781
|
}
|
|
1782
1782
|
get paused() {
|
|
1783
|
-
return this[y
|
|
1783
|
+
return this[y];
|
|
1784
1784
|
}
|
|
1785
|
-
[T
|
|
1786
|
-
this[r] ? this[s
|
|
1785
|
+
[T](t) {
|
|
1786
|
+
this[r] ? this[s] += 1 : this[s] += t.length, this.buffer.push(t);
|
|
1787
1787
|
}
|
|
1788
1788
|
[B$1]() {
|
|
1789
|
-
return this.buffer.length && (this[r] ? this[s
|
|
1789
|
+
return this.buffer.length && (this[r] ? this[s] -= 1 : this[s] -= this.buffer[0].length), this.buffer.shift();
|
|
1790
1790
|
}
|
|
1791
|
-
[L](t
|
|
1791
|
+
[L](t) {
|
|
1792
1792
|
do ;
|
|
1793
|
-
while (this[_
|
|
1794
|
-
!t
|
|
1793
|
+
while (this[_](this[B$1]()));
|
|
1794
|
+
!t && !this.buffer.length && !this[u] && this.emit("drain");
|
|
1795
1795
|
}
|
|
1796
|
-
[_
|
|
1797
|
-
return t
|
|
1796
|
+
[_](t) {
|
|
1797
|
+
return t ? (this.emit("data", t), this.flowing) : false;
|
|
1798
1798
|
}
|
|
1799
|
-
pipe(t
|
|
1800
|
-
if (this[n
|
|
1801
|
-
const i
|
|
1802
|
-
return e
|
|
1799
|
+
pipe(t, e) {
|
|
1800
|
+
if (this[n]) return;
|
|
1801
|
+
const i = this[c$1];
|
|
1802
|
+
return e = e || {}, t === I$1.stdout || t === I$1.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$1(this, t, e) : new U$1(this, t, e)), this[d$1] ? b$1(() => this[p]()) : this[p]()), t;
|
|
1803
1803
|
}
|
|
1804
|
-
unpipe(t
|
|
1805
|
-
const e
|
|
1806
|
-
e
|
|
1804
|
+
unpipe(t) {
|
|
1805
|
+
const e = this.pipes.find((i) => i.dest === t);
|
|
1806
|
+
e && (this.pipes.splice(this.pipes.indexOf(e), 1), e.unpipe());
|
|
1807
1807
|
}
|
|
1808
|
-
addListener(t
|
|
1809
|
-
return this.on(t
|
|
1808
|
+
addListener(t, e) {
|
|
1809
|
+
return this.on(t, e);
|
|
1810
1810
|
}
|
|
1811
|
-
on(t
|
|
1812
|
-
const i
|
|
1813
|
-
return t
|
|
1811
|
+
on(t, e) {
|
|
1812
|
+
const i = super.on(t, e);
|
|
1813
|
+
return t === "data" && !this.pipes.length && !this.flowing ? this[p]() : t === "readable" && this[s] !== 0 ? super.emit("readable") : V$1(t) && this[c$1] ? (super.emit(t), this.removeAllListeners(t)) : t === "error" && this[E] && (this[d$1] ? b$1(() => e.call(this, this[E])) : e.call(this, this[E])), i;
|
|
1814
1814
|
}
|
|
1815
1815
|
get emittedEnd() {
|
|
1816
|
-
return this[c$
|
|
1817
|
-
}
|
|
1818
|
-
[a
|
|
1819
|
-
!this[S
|
|
1820
|
-
}
|
|
1821
|
-
emit(t
|
|
1822
|
-
if (t
|
|
1823
|
-
if (t
|
|
1824
|
-
if (t
|
|
1825
|
-
if (t
|
|
1826
|
-
if (this[w
|
|
1827
|
-
const f
|
|
1828
|
-
return this.removeAllListeners("close"), f
|
|
1829
|
-
} else if (t
|
|
1830
|
-
this[E
|
|
1831
|
-
const f
|
|
1832
|
-
return this[a
|
|
1833
|
-
} else if (t
|
|
1834
|
-
const f
|
|
1835
|
-
return this[a
|
|
1836
|
-
} else if (t
|
|
1837
|
-
const f
|
|
1838
|
-
return this.removeAllListeners(t
|
|
1816
|
+
return this[c$1];
|
|
1817
|
+
}
|
|
1818
|
+
[a]() {
|
|
1819
|
+
!this[S] && !this[c$1] && !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);
|
|
1820
|
+
}
|
|
1821
|
+
emit(t, e, ...i) {
|
|
1822
|
+
if (t !== "error" && t !== "close" && t !== n && this[n]) return;
|
|
1823
|
+
if (t === "data") return e ? this[d$1] ? b$1(() => this[D$1](e)) : this[D$1](e) : false;
|
|
1824
|
+
if (t === "end") return this[F]();
|
|
1825
|
+
if (t === "close") {
|
|
1826
|
+
if (this[w] = true, !this[c$1] && !this[n]) return;
|
|
1827
|
+
const f = super.emit("close");
|
|
1828
|
+
return this.removeAllListeners("close"), f;
|
|
1829
|
+
} else if (t === "error") {
|
|
1830
|
+
this[E] = e;
|
|
1831
|
+
const f = super.emit("error", e);
|
|
1832
|
+
return this[a](), f;
|
|
1833
|
+
} else if (t === "resume") {
|
|
1834
|
+
const f = super.emit("resume");
|
|
1835
|
+
return this[a](), f;
|
|
1836
|
+
} else if (t === "finish" || t === "prefinish") {
|
|
1837
|
+
const f = super.emit(t);
|
|
1838
|
+
return this.removeAllListeners(t), f;
|
|
1839
1839
|
}
|
|
1840
|
-
const l
|
|
1841
|
-
return this[a
|
|
1842
|
-
}
|
|
1843
|
-
[D$1](t
|
|
1844
|
-
for (const i
|
|
1845
|
-
const e
|
|
1846
|
-
return this[a
|
|
1847
|
-
}
|
|
1848
|
-
[F
|
|
1849
|
-
this[c$
|
|
1850
|
-
}
|
|
1851
|
-
[R
|
|
1852
|
-
if (this[m
|
|
1853
|
-
const e
|
|
1854
|
-
if (e
|
|
1855
|
-
for (const i
|
|
1856
|
-
super.emit("data", e
|
|
1840
|
+
const l = super.emit(t, e, ...i);
|
|
1841
|
+
return this[a](), l;
|
|
1842
|
+
}
|
|
1843
|
+
[D$1](t) {
|
|
1844
|
+
for (const i of this.pipes) i.dest.write(t) === false && this.pause();
|
|
1845
|
+
const e = super.emit("data", t);
|
|
1846
|
+
return this[a](), e;
|
|
1847
|
+
}
|
|
1848
|
+
[F]() {
|
|
1849
|
+
this[c$1] || (this[c$1] = true, this.readable = false, this[d$1] ? b$1(() => this[R]()) : this[R]());
|
|
1850
|
+
}
|
|
1851
|
+
[R]() {
|
|
1852
|
+
if (this[m]) {
|
|
1853
|
+
const e = this[m].end();
|
|
1854
|
+
if (e) {
|
|
1855
|
+
for (const i of this.pipes) i.dest.write(e);
|
|
1856
|
+
super.emit("data", e);
|
|
1857
1857
|
}
|
|
1858
1858
|
}
|
|
1859
|
-
for (const e
|
|
1860
|
-
const t
|
|
1861
|
-
return this.removeAllListeners("end"), t
|
|
1859
|
+
for (const e of this.pipes) e.end();
|
|
1860
|
+
const t = super.emit("end");
|
|
1861
|
+
return this.removeAllListeners("end"), t;
|
|
1862
1862
|
}
|
|
1863
1863
|
collect() {
|
|
1864
|
-
const t
|
|
1865
|
-
this[r] || (t
|
|
1866
|
-
const e
|
|
1867
|
-
return this.on("data", (i
|
|
1868
|
-
t
|
|
1869
|
-
}), e
|
|
1864
|
+
const t = [];
|
|
1865
|
+
this[r] || (t.dataLength = 0);
|
|
1866
|
+
const e = this.promise();
|
|
1867
|
+
return this.on("data", (i) => {
|
|
1868
|
+
t.push(i), this[r] || (t.dataLength += i.length);
|
|
1869
|
+
}), e.then(() => t);
|
|
1870
1870
|
}
|
|
1871
1871
|
concat() {
|
|
1872
|
-
return this[r] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this.collect().then((t
|
|
1872
|
+
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$2] ? t.join("") : Buffer.concat(t, t.dataLength));
|
|
1873
1873
|
}
|
|
1874
1874
|
promise() {
|
|
1875
|
-
return new Promise((t
|
|
1876
|
-
this.on(n
|
|
1875
|
+
return new Promise((t, e) => {
|
|
1876
|
+
this.on(n, () => e(/* @__PURE__ */ new Error("stream destroyed"))), this.on("error", (i) => e(i)), this.on("end", () => t());
|
|
1877
1877
|
});
|
|
1878
1878
|
}
|
|
1879
1879
|
[$]() {
|
|
1880
1880
|
return { next: () => {
|
|
1881
|
-
const e
|
|
1882
|
-
if (e
|
|
1881
|
+
const e = this.read();
|
|
1882
|
+
if (e !== null) return Promise.resolve({
|
|
1883
1883
|
done: false,
|
|
1884
|
-
value: e
|
|
1884
|
+
value: e
|
|
1885
1885
|
});
|
|
1886
|
-
if (this[u
|
|
1887
|
-
let i
|
|
1888
|
-
const f
|
|
1889
|
-
this.removeListener("data", A$1), this.removeListener("end", O
|
|
1886
|
+
if (this[u]) return Promise.resolve({ done: true });
|
|
1887
|
+
let i = null, l = null;
|
|
1888
|
+
const f = (g$1) => {
|
|
1889
|
+
this.removeListener("data", A$1), this.removeListener("end", O), l(g$1);
|
|
1890
1890
|
}, A$1 = (g$1) => {
|
|
1891
|
-
this.removeListener("error", f
|
|
1891
|
+
this.removeListener("error", f), this.removeListener("end", O), this.pause(), i({
|
|
1892
1892
|
value: g$1,
|
|
1893
|
-
done: !!this[u
|
|
1893
|
+
done: !!this[u]
|
|
1894
1894
|
});
|
|
1895
|
-
}, O
|
|
1896
|
-
this.removeListener("error", f
|
|
1897
|
-
}, W$1 = () => f
|
|
1898
|
-
return new Promise((g$1, z
|
|
1899
|
-
l
|
|
1895
|
+
}, O = () => {
|
|
1896
|
+
this.removeListener("error", f), this.removeListener("data", A$1), i({ done: true });
|
|
1897
|
+
}, W$1 = () => f(/* @__PURE__ */ new Error("stream destroyed"));
|
|
1898
|
+
return new Promise((g$1, z) => {
|
|
1899
|
+
l = z, i = g$1, this.once(n, W$1), this.once("error", f), this.once("end", O), this.once("data", A$1);
|
|
1900
1900
|
});
|
|
1901
1901
|
} };
|
|
1902
1902
|
}
|
|
1903
|
-
[G
|
|
1903
|
+
[G]() {
|
|
1904
1904
|
return { next: () => {
|
|
1905
|
-
const e
|
|
1905
|
+
const e = this.read();
|
|
1906
1906
|
return {
|
|
1907
|
-
value: e
|
|
1908
|
-
done: e
|
|
1907
|
+
value: e,
|
|
1908
|
+
done: e === null
|
|
1909
1909
|
};
|
|
1910
1910
|
} };
|
|
1911
1911
|
}
|
|
1912
|
-
destroy(t
|
|
1913
|
-
return this[n
|
|
1912
|
+
destroy(t) {
|
|
1913
|
+
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);
|
|
1914
1914
|
}
|
|
1915
|
-
static isStream(t
|
|
1916
|
-
return !!t
|
|
1915
|
+
static isStream(t) {
|
|
1916
|
+
return !!t && (t instanceof q || t instanceof x$1 || t instanceof Y && (typeof t.pipe == "function" || typeof t.write == "function" && typeof t.end == "function"));
|
|
1917
1917
|
}
|
|
1918
1918
|
}, j;
|
|
1919
1919
|
}
|
|
@@ -1921,151 +1921,151 @@ var C;
|
|
|
1921
1921
|
function J() {
|
|
1922
1922
|
if (C) return i$3;
|
|
1923
1923
|
C = 1;
|
|
1924
|
-
const w
|
|
1924
|
+
const w = j$1, n = P.Buffer, z = O$2, u = i$3.constants = T(), L = tt(), E = n.concat, c$1 = Symbol("_superWrite");
|
|
1925
1925
|
class d$1 extends Error {
|
|
1926
|
-
constructor(s
|
|
1927
|
-
super("zlib: " + s
|
|
1926
|
+
constructor(s) {
|
|
1927
|
+
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);
|
|
1928
1928
|
}
|
|
1929
1929
|
get name() {
|
|
1930
1930
|
return "ZlibError";
|
|
1931
1931
|
}
|
|
1932
1932
|
}
|
|
1933
|
-
const Z = Symbol("opts"), p
|
|
1933
|
+
const Z = Symbol("opts"), p = Symbol("flushFlag"), I$1 = Symbol("finishFlushFlag"), y = Symbol("fullFlushFlag"), t = Symbol("handle"), _ = Symbol("onError"), f = Symbol("sawError"), F = Symbol("level"), S = Symbol("strategy"), g$1 = Symbol("ended");
|
|
1934
1934
|
class x$1 extends L {
|
|
1935
|
-
constructor(s
|
|
1936
|
-
if (!s
|
|
1937
|
-
super(s
|
|
1935
|
+
constructor(s, e) {
|
|
1936
|
+
if (!s || typeof s != "object") throw new TypeError("invalid options for ZlibBase constructor");
|
|
1937
|
+
super(s), this[f] = false, this[g$1] = false, this[Z] = s, this[p] = s.flush, this[I$1] = s.finishFlush;
|
|
1938
1938
|
try {
|
|
1939
|
-
this[t
|
|
1940
|
-
} catch (i
|
|
1941
|
-
throw new d$1(i
|
|
1939
|
+
this[t] = new z[e](s);
|
|
1940
|
+
} catch (i) {
|
|
1941
|
+
throw new d$1(i);
|
|
1942
1942
|
}
|
|
1943
|
-
this[_
|
|
1944
|
-
this[f
|
|
1945
|
-
}, this[t
|
|
1943
|
+
this[_] = (i) => {
|
|
1944
|
+
this[f] || (this[f] = true, this.close(), this.emit("error", i));
|
|
1945
|
+
}, this[t].on("error", (i) => this[_](new d$1(i))), this.once("end", () => this.close);
|
|
1946
1946
|
}
|
|
1947
1947
|
close() {
|
|
1948
|
-
this[t
|
|
1948
|
+
this[t] && (this[t].close(), this[t] = null, this.emit("close"));
|
|
1949
1949
|
}
|
|
1950
1950
|
reset() {
|
|
1951
|
-
if (!this[f
|
|
1951
|
+
if (!this[f]) return w(this[t], "zlib binding closed"), this[t].reset();
|
|
1952
1952
|
}
|
|
1953
|
-
flush(s
|
|
1954
|
-
this.ended || (typeof s
|
|
1953
|
+
flush(s) {
|
|
1954
|
+
this.ended || (typeof s != "number" && (s = this[y]), this.write(Object.assign(n.alloc(0), { [p]: s })));
|
|
1955
1955
|
}
|
|
1956
|
-
end(s
|
|
1957
|
-
return s
|
|
1956
|
+
end(s, e, i) {
|
|
1957
|
+
return s && this.write(s, e), this.flush(this[I$1]), this[g$1] = true, super.end(null, null, i);
|
|
1958
1958
|
}
|
|
1959
1959
|
get ended() {
|
|
1960
1960
|
return this[g$1];
|
|
1961
1961
|
}
|
|
1962
|
-
write(s
|
|
1963
|
-
if (typeof e
|
|
1964
|
-
w
|
|
1965
|
-
const m
|
|
1966
|
-
m
|
|
1967
|
-
const G
|
|
1968
|
-
this[t
|
|
1962
|
+
write(s, e, i) {
|
|
1963
|
+
if (typeof e == "function" && (i = e, e = "utf8"), typeof s == "string" && (s = n.from(s, e)), this[f]) return;
|
|
1964
|
+
w(this[t], "zlib binding closed");
|
|
1965
|
+
const m = this[t]._handle, R = m.close;
|
|
1966
|
+
m.close = () => {};
|
|
1967
|
+
const G = this[t].close;
|
|
1968
|
+
this[t].close = () => {}, n.concat = (l) => l;
|
|
1969
1969
|
let h$2;
|
|
1970
1970
|
try {
|
|
1971
|
-
const l
|
|
1972
|
-
h$2 = this[t
|
|
1973
|
-
} catch (l
|
|
1974
|
-
n
|
|
1971
|
+
const l = typeof s[p] == "number" ? s[p] : this[p];
|
|
1972
|
+
h$2 = this[t]._processChunk(s, l), n.concat = E;
|
|
1973
|
+
} catch (l) {
|
|
1974
|
+
n.concat = E, this[_](new d$1(l));
|
|
1975
1975
|
} finally {
|
|
1976
|
-
this[t
|
|
1976
|
+
this[t] && (this[t]._handle = m, m.close = R, this[t].close = G, this[t].removeAllListeners("error"));
|
|
1977
1977
|
}
|
|
1978
|
-
this[t
|
|
1978
|
+
this[t] && this[t].on("error", (l) => this[_](new d$1(l)));
|
|
1979
1979
|
let b$1;
|
|
1980
1980
|
if (h$2) if (Array.isArray(h$2) && h$2.length > 0) {
|
|
1981
|
-
b$1 = this[c$
|
|
1982
|
-
for (let l
|
|
1983
|
-
} else b$1 = this[c$
|
|
1984
|
-
return i
|
|
1985
|
-
}
|
|
1986
|
-
[c$
|
|
1987
|
-
return super.write(s
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
1990
|
-
class a
|
|
1991
|
-
constructor(s
|
|
1992
|
-
s
|
|
1993
|
-
}
|
|
1994
|
-
params(s
|
|
1995
|
-
if (!this[f
|
|
1996
|
-
if (!this[t
|
|
1997
|
-
if (!this[t
|
|
1998
|
-
if (this[F
|
|
1999
|
-
this.flush(u
|
|
2000
|
-
const i
|
|
2001
|
-
this[t
|
|
2002
|
-
this.flush(m
|
|
1981
|
+
b$1 = this[c$1](n.from(h$2[0]));
|
|
1982
|
+
for (let l = 1; l < h$2.length; l++) b$1 = this[c$1](h$2[l]);
|
|
1983
|
+
} else b$1 = this[c$1](n.from(h$2));
|
|
1984
|
+
return i && i(), b$1;
|
|
1985
|
+
}
|
|
1986
|
+
[c$1](s) {
|
|
1987
|
+
return super.write(s);
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
class a extends x$1 {
|
|
1991
|
+
constructor(s, e) {
|
|
1992
|
+
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;
|
|
1993
|
+
}
|
|
1994
|
+
params(s, e) {
|
|
1995
|
+
if (!this[f]) {
|
|
1996
|
+
if (!this[t]) throw new Error("cannot switch params when binding is closed");
|
|
1997
|
+
if (!this[t].params) throw new Error("not supported in this implementation");
|
|
1998
|
+
if (this[F] !== s || this[S] !== e) {
|
|
1999
|
+
this.flush(u.Z_SYNC_FLUSH), w(this[t], "zlib binding closed");
|
|
2000
|
+
const i = this[t].flush;
|
|
2001
|
+
this[t].flush = (m, R) => {
|
|
2002
|
+
this.flush(m), R();
|
|
2003
2003
|
};
|
|
2004
2004
|
try {
|
|
2005
|
-
this[t
|
|
2005
|
+
this[t].params(s, e);
|
|
2006
2006
|
} finally {
|
|
2007
|
-
this[t
|
|
2007
|
+
this[t].flush = i;
|
|
2008
2008
|
}
|
|
2009
|
-
this[t
|
|
2009
|
+
this[t] && (this[F] = s, this[S] = e);
|
|
2010
2010
|
}
|
|
2011
2011
|
}
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
2014
|
-
class q
|
|
2015
|
-
constructor(s
|
|
2016
|
-
super(s
|
|
2014
|
+
class q extends a {
|
|
2015
|
+
constructor(s) {
|
|
2016
|
+
super(s, "Deflate");
|
|
2017
2017
|
}
|
|
2018
2018
|
}
|
|
2019
|
-
class D$1 extends a
|
|
2020
|
-
constructor(s
|
|
2021
|
-
super(s
|
|
2019
|
+
class D$1 extends a {
|
|
2020
|
+
constructor(s) {
|
|
2021
|
+
super(s, "Inflate");
|
|
2022
2022
|
}
|
|
2023
2023
|
}
|
|
2024
2024
|
const B$1 = Symbol("_portable");
|
|
2025
|
-
class $ extends a
|
|
2026
|
-
constructor(s
|
|
2027
|
-
super(s
|
|
2025
|
+
class $ extends a {
|
|
2026
|
+
constructor(s) {
|
|
2027
|
+
super(s, "Gzip"), this[B$1] = s && !!s.portable;
|
|
2028
2028
|
}
|
|
2029
|
-
[c$
|
|
2030
|
-
return this[B$1] ? (this[B$1] = false, s
|
|
2029
|
+
[c$1](s) {
|
|
2030
|
+
return this[B$1] ? (this[B$1] = false, s[9] = 255, super[c$1](s)) : super[c$1](s);
|
|
2031
2031
|
}
|
|
2032
2032
|
}
|
|
2033
|
-
class N$1 extends a
|
|
2034
|
-
constructor(s
|
|
2035
|
-
super(s
|
|
2033
|
+
class N$1 extends a {
|
|
2034
|
+
constructor(s) {
|
|
2035
|
+
super(s, "Gunzip");
|
|
2036
2036
|
}
|
|
2037
2037
|
}
|
|
2038
|
-
class H
|
|
2039
|
-
constructor(s
|
|
2040
|
-
super(s
|
|
2038
|
+
class H extends a {
|
|
2039
|
+
constructor(s) {
|
|
2040
|
+
super(s, "DeflateRaw");
|
|
2041
2041
|
}
|
|
2042
2042
|
}
|
|
2043
|
-
let T$1$1 = class T
|
|
2044
|
-
constructor(s
|
|
2045
|
-
super(s
|
|
2043
|
+
let T$1$1 = class T extends a {
|
|
2044
|
+
constructor(s) {
|
|
2045
|
+
super(s, "InflateRaw");
|
|
2046
2046
|
}
|
|
2047
2047
|
};
|
|
2048
|
-
class U$1 extends a
|
|
2049
|
-
constructor(s
|
|
2050
|
-
super(s
|
|
2048
|
+
class U$1 extends a {
|
|
2049
|
+
constructor(s) {
|
|
2050
|
+
super(s, "Unzip");
|
|
2051
2051
|
}
|
|
2052
2052
|
}
|
|
2053
|
-
class O
|
|
2054
|
-
constructor(s
|
|
2055
|
-
s
|
|
2053
|
+
class O extends x$1 {
|
|
2054
|
+
constructor(s, e) {
|
|
2055
|
+
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;
|
|
2056
2056
|
}
|
|
2057
2057
|
}
|
|
2058
|
-
class v
|
|
2059
|
-
constructor(s
|
|
2060
|
-
super(s
|
|
2058
|
+
class v extends O {
|
|
2059
|
+
constructor(s) {
|
|
2060
|
+
super(s, "BrotliCompress");
|
|
2061
2061
|
}
|
|
2062
2062
|
}
|
|
2063
|
-
class A$1 extends O
|
|
2064
|
-
constructor(s
|
|
2065
|
-
super(s
|
|
2063
|
+
class A$1 extends O {
|
|
2064
|
+
constructor(s) {
|
|
2065
|
+
super(s, "BrotliDecompress");
|
|
2066
2066
|
}
|
|
2067
2067
|
}
|
|
2068
|
-
return i$3.Deflate = q
|
|
2068
|
+
return i$3.Deflate = q, i$3.Inflate = D$1, i$3.Gzip = $, i$3.Gunzip = N$1, i$3.DeflateRaw = H, i$3.InflateRaw = T$1$1, i$3.Unzip = U$1, typeof z.BrotliCompress == "function" ? (i$3.BrotliCompress = v, i$3.BrotliDecompress = A$1) : i$3.BrotliCompress = i$3.BrotliDecompress = class {
|
|
2069
2069
|
constructor() {
|
|
2070
2070
|
throw new Error("Brotli is not supported in this version of Node.js");
|
|
2071
2071
|
}
|
|
@@ -2075,174 +2075,174 @@ var O$1, F$2;
|
|
|
2075
2075
|
function rt() {
|
|
2076
2076
|
if (F$2) return O$1;
|
|
2077
2077
|
F$2 = 1;
|
|
2078
|
-
const P$2 = c$4(), $ = E(), v
|
|
2079
|
-
return O$1 = P$2(class extends v
|
|
2080
|
-
constructor(t
|
|
2081
|
-
t
|
|
2078
|
+
const P$2 = c$4(), $ = E(), v = nt, W$1 = c$3(), G = 1024 * 1024, k = u$3(), C = f$2(), x$1 = J(), { nextTick: j } = nt$1, B$1 = Buffer.from([31, 139]), h$2 = Symbol("state"), d$1 = Symbol("writeEntry"), a = Symbol("readEntry"), I$1 = Symbol("nextEntry"), U$1 = Symbol("processEntry"), l = Symbol("extendedHeader"), y = Symbol("globalExtendedHeader"), c$1 = Symbol("meta"), H = Symbol("emitMeta"), n = Symbol("buffer"), f = Symbol("queue"), u = Symbol("ended"), L = Symbol("emittedEnd"), b$1 = Symbol("emit"), r = Symbol("unzip"), _ = Symbol("consumeChunk"), g$1 = Symbol("consumeChunkSub"), q = Symbol("consumeBody"), z = Symbol("consumeMeta"), Y = Symbol("consumeHeader"), N$1 = Symbol("consuming"), D$1 = Symbol("bufferConcat"), M$1 = Symbol("maybeEnd"), S = Symbol("writing"), m = Symbol("aborted"), T = Symbol("onDone"), E$1$1 = Symbol("sawValidEntry"), R = Symbol("sawNullBlock"), A$1 = Symbol("sawEOF"), V$1 = Symbol("closeStream"), K$1 = (X) => true;
|
|
2079
|
+
return O$1 = P$2(class extends v {
|
|
2080
|
+
constructor(t) {
|
|
2081
|
+
t = t || {}, super(t), this.file = t.file || "", this[E$1$1] = null, this.on(T, (s) => {
|
|
2082
2082
|
(this[h$2] === "begin" || this[E$1$1] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
2083
|
-
}), t
|
|
2083
|
+
}), t.ondone ? this.on(T, t.ondone) : this.on(T, (s) => {
|
|
2084
2084
|
this.emit("prefinish"), this.emit("finish"), this.emit("end");
|
|
2085
|
-
}), this.strict = !!t
|
|
2086
|
-
const i
|
|
2087
|
-
this.brotli = !t
|
|
2085
|
+
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || G, this.filter = typeof t.filter == "function" ? t.filter : K$1;
|
|
2086
|
+
const i = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
|
|
2087
|
+
this.brotli = !t.gzip && t.brotli !== void 0 ? t.brotli : i ? void 0 : false, this.writable = true, this.readable = false, this[f] = new W$1(), this[n] = null, this[a] = null, this[d$1] = null, this[h$2] = "begin", this[c$1] = "", this[l] = null, this[y] = null, this[u] = false, this[r] = null, this[m] = false, this[R] = false, this[A$1] = false, this.on("end", () => this[V$1]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onentry == "function" && this.on("entry", t.onentry);
|
|
2088
2088
|
}
|
|
2089
|
-
[Y](t
|
|
2089
|
+
[Y](t, i) {
|
|
2090
2090
|
this[E$1$1] === null && (this[E$1$1] = false);
|
|
2091
|
-
let s
|
|
2091
|
+
let s;
|
|
2092
2092
|
try {
|
|
2093
|
-
s
|
|
2094
|
-
} catch (o
|
|
2095
|
-
return this.warn("TAR_ENTRY_INVALID", o
|
|
2093
|
+
s = new $(t, i, this[l], this[y]);
|
|
2094
|
+
} catch (o) {
|
|
2095
|
+
return this.warn("TAR_ENTRY_INVALID", o);
|
|
2096
2096
|
}
|
|
2097
|
-
if (s
|
|
2098
|
-
else if (this[R
|
|
2099
|
-
else if (!s
|
|
2097
|
+
if (s.nullBlock) this[R] ? (this[A$1] = true, this[h$2] === "begin" && (this[h$2] = "header"), this[b$1]("eof")) : (this[R] = true, this[b$1]("nullBlock"));
|
|
2098
|
+
else if (this[R] = false, !s.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: s });
|
|
2099
|
+
else if (!s.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: s });
|
|
2100
2100
|
else {
|
|
2101
|
-
const o
|
|
2102
|
-
if (/^(Symbolic)?Link$/.test(o
|
|
2103
|
-
else if (!/^(Symbolic)?Link$/.test(o
|
|
2101
|
+
const o = s.type;
|
|
2102
|
+
if (/^(Symbolic)?Link$/.test(o) && !s.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: s });
|
|
2103
|
+
else if (!/^(Symbolic)?Link$/.test(o) && s.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: s });
|
|
2104
2104
|
else {
|
|
2105
|
-
const e
|
|
2106
|
-
if (!this[E$1$1]) if (e
|
|
2107
|
-
const w
|
|
2108
|
-
e
|
|
2105
|
+
const e = this[d$1] = new k(s, this[l], this[y]);
|
|
2106
|
+
if (!this[E$1$1]) if (e.remain) {
|
|
2107
|
+
const w = () => {
|
|
2108
|
+
e.invalid || (this[E$1$1] = true);
|
|
2109
2109
|
};
|
|
2110
|
-
e
|
|
2110
|
+
e.on("end", w);
|
|
2111
2111
|
} else this[E$1$1] = true;
|
|
2112
|
-
e
|
|
2112
|
+
e.meta ? e.size > this.maxMetaEntrySize ? (e.ignore = true, this[b$1]("ignoredEntry", e), this[h$2] = "ignore", e.resume()) : e.size > 0 && (this[c$1] = "", e.on("data", (w) => this[c$1] += w), this[h$2] = "meta") : (this[l] = null, e.ignore = e.ignore || !this.filter(e.path, e), e.ignore ? (this[b$1]("ignoredEntry", e), this[h$2] = e.remain ? "ignore" : "header", e.resume()) : (e.remain ? this[h$2] = "body" : (this[h$2] = "header", e.end()), this[a] ? this[f].push(e) : (this[f].push(e), this[I$1]())));
|
|
2113
2113
|
}
|
|
2114
2114
|
}
|
|
2115
2115
|
}
|
|
2116
2116
|
[V$1]() {
|
|
2117
|
-
j
|
|
2117
|
+
j(() => this.emit("close"));
|
|
2118
2118
|
}
|
|
2119
|
-
[U$1](t
|
|
2120
|
-
let i
|
|
2121
|
-
return t
|
|
2119
|
+
[U$1](t) {
|
|
2120
|
+
let i = true;
|
|
2121
|
+
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$1]()), i = false)) : (this[a] = null, i = false), i;
|
|
2122
2122
|
}
|
|
2123
2123
|
[I$1]() {
|
|
2124
2124
|
do ;
|
|
2125
|
-
while (this[U$1](this[f
|
|
2126
|
-
if (!this[f
|
|
2127
|
-
const t
|
|
2128
|
-
!t
|
|
2125
|
+
while (this[U$1](this[f].shift()));
|
|
2126
|
+
if (!this[f].length) {
|
|
2127
|
+
const t = this[a];
|
|
2128
|
+
!t || t.flowing || t.size === t.remain ? this[S] || this.emit("drain") : t.once("drain", (s) => this.emit("drain"));
|
|
2129
2129
|
}
|
|
2130
2130
|
}
|
|
2131
|
-
[q
|
|
2132
|
-
const s
|
|
2133
|
-
return s
|
|
2131
|
+
[q](t, i) {
|
|
2132
|
+
const s = this[d$1], o = s.blockRemain, e = o >= t.length && i === 0 ? t : t.slice(i, i + o);
|
|
2133
|
+
return s.write(e), s.blockRemain || (this[h$2] = "header", this[d$1] = null, s.end()), e.length;
|
|
2134
2134
|
}
|
|
2135
|
-
[z
|
|
2136
|
-
const s
|
|
2137
|
-
return this[d$1] || this[H
|
|
2135
|
+
[z](t, i) {
|
|
2136
|
+
const s = this[d$1], o = this[q](t, i);
|
|
2137
|
+
return this[d$1] || this[H](s), o;
|
|
2138
2138
|
}
|
|
2139
|
-
[b$1](t
|
|
2140
|
-
!this[f
|
|
2141
|
-
t
|
|
2142
|
-
i
|
|
2143
|
-
s
|
|
2139
|
+
[b$1](t, i, s) {
|
|
2140
|
+
!this[f].length && !this[a] ? this.emit(t, i, s) : this[f].push([
|
|
2141
|
+
t,
|
|
2142
|
+
i,
|
|
2143
|
+
s
|
|
2144
2144
|
]);
|
|
2145
2145
|
}
|
|
2146
|
-
[H
|
|
2147
|
-
switch (this[b$1]("meta", this[c$
|
|
2146
|
+
[H](t) {
|
|
2147
|
+
switch (this[b$1]("meta", this[c$1]), t.type) {
|
|
2148
2148
|
case "ExtendedHeader":
|
|
2149
2149
|
case "OldExtendedHeader":
|
|
2150
|
-
this[l
|
|
2150
|
+
this[l] = C.parse(this[c$1], this[l], false);
|
|
2151
2151
|
break;
|
|
2152
2152
|
case "GlobalExtendedHeader":
|
|
2153
|
-
this[y
|
|
2153
|
+
this[y] = C.parse(this[c$1], this[y], true);
|
|
2154
2154
|
break;
|
|
2155
2155
|
case "NextFileHasLongPath":
|
|
2156
2156
|
case "OldGnuLongPath":
|
|
2157
|
-
this[l
|
|
2157
|
+
this[l] = this[l] || Object.create(null), this[l].path = this[c$1].replace(/\0.*/, "");
|
|
2158
2158
|
break;
|
|
2159
2159
|
case "NextFileHasLongLinkpath":
|
|
2160
|
-
this[l
|
|
2160
|
+
this[l] = this[l] || Object.create(null), this[l].linkpath = this[c$1].replace(/\0.*/, "");
|
|
2161
2161
|
break;
|
|
2162
|
-
default: throw new Error("unknown meta: " + t
|
|
2162
|
+
default: throw new Error("unknown meta: " + t.type);
|
|
2163
2163
|
}
|
|
2164
2164
|
}
|
|
2165
|
-
abort(t
|
|
2166
|
-
this[m
|
|
2167
|
-
}
|
|
2168
|
-
write(t
|
|
2169
|
-
if (this[m
|
|
2170
|
-
if ((this[r] === null || this.brotli === void 0 && this[r] === false) && t
|
|
2171
|
-
if (this[n
|
|
2172
|
-
for (let e
|
|
2173
|
-
const o
|
|
2174
|
-
if (this[r] === false && o
|
|
2175
|
-
else return this[n
|
|
2165
|
+
abort(t) {
|
|
2166
|
+
this[m] = true, this.emit("abort", t), this.warn("TAR_ABORT", t, { recoverable: false });
|
|
2167
|
+
}
|
|
2168
|
+
write(t) {
|
|
2169
|
+
if (this[m]) return;
|
|
2170
|
+
if ((this[r] === null || this.brotli === void 0 && this[r] === false) && t) {
|
|
2171
|
+
if (this[n] && (t = Buffer.concat([this[n], t]), this[n] = null), t.length < B$1.length) return this[n] = t, true;
|
|
2172
|
+
for (let e = 0; this[r] === null && e < B$1.length; e++) t[e] !== B$1[e] && (this[r] = false);
|
|
2173
|
+
const o = this.brotli === void 0;
|
|
2174
|
+
if (this[r] === false && o) if (t.length < 512) if (this[u]) this.brotli = true;
|
|
2175
|
+
else return this[n] = t, true;
|
|
2176
2176
|
else try {
|
|
2177
|
-
new $(t
|
|
2177
|
+
new $(t.slice(0, 512)), this.brotli = !1;
|
|
2178
2178
|
} catch {
|
|
2179
2179
|
this.brotli = true;
|
|
2180
2180
|
}
|
|
2181
2181
|
if (this[r] === null || this[r] === false && this.brotli) {
|
|
2182
|
-
const e
|
|
2183
|
-
this[u
|
|
2184
|
-
this[u
|
|
2185
|
-
}), this[S
|
|
2186
|
-
const w
|
|
2187
|
-
return this[S
|
|
2182
|
+
const e = this[u];
|
|
2183
|
+
this[u] = false, this[r] = this[r] === null ? new x$1.Unzip() : new x$1.BrotliDecompress(), this[r].on("data", (p) => this[_](p)), this[r].on("error", (p) => this.abort(p)), this[r].on("end", (p) => {
|
|
2184
|
+
this[u] = true, this[_]();
|
|
2185
|
+
}), this[S] = true;
|
|
2186
|
+
const w = this[r][e ? "end" : "write"](t);
|
|
2187
|
+
return this[S] = false, w;
|
|
2188
2188
|
}
|
|
2189
2189
|
}
|
|
2190
|
-
this[S
|
|
2191
|
-
const s
|
|
2192
|
-
return !s
|
|
2190
|
+
this[S] = true, this[r] ? this[r].write(t) : this[_](t), this[S] = false;
|
|
2191
|
+
const s = this[f].length ? false : this[a] ? this[a].flowing : true;
|
|
2192
|
+
return !s && !this[f].length && this[a].once("drain", (o) => this.emit("drain")), s;
|
|
2193
2193
|
}
|
|
2194
|
-
[D$1](t
|
|
2195
|
-
t
|
|
2194
|
+
[D$1](t) {
|
|
2195
|
+
t && !this[m] && (this[n] = this[n] ? Buffer.concat([this[n], t]) : t);
|
|
2196
2196
|
}
|
|
2197
2197
|
[M$1]() {
|
|
2198
|
-
if (this[u
|
|
2198
|
+
if (this[u] && !this[L] && !this[m] && !this[N$1]) {
|
|
2199
2199
|
this[L] = true;
|
|
2200
|
-
const t
|
|
2201
|
-
if (t
|
|
2202
|
-
const i
|
|
2203
|
-
this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t
|
|
2200
|
+
const t = this[d$1];
|
|
2201
|
+
if (t && t.blockRemain) {
|
|
2202
|
+
const i = this[n] ? this[n].length : 0;
|
|
2203
|
+
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();
|
|
2204
2204
|
}
|
|
2205
|
-
this[b$1](T
|
|
2205
|
+
this[b$1](T);
|
|
2206
2206
|
}
|
|
2207
2207
|
}
|
|
2208
|
-
[_
|
|
2209
|
-
if (this[N$1]) this[D$1](t
|
|
2210
|
-
else if (!t
|
|
2208
|
+
[_](t) {
|
|
2209
|
+
if (this[N$1]) this[D$1](t);
|
|
2210
|
+
else if (!t && !this[n]) this[M$1]();
|
|
2211
2211
|
else {
|
|
2212
|
-
if (this[N$1] = true, this[n
|
|
2213
|
-
this[D$1](t
|
|
2214
|
-
const i
|
|
2215
|
-
this[n
|
|
2216
|
-
} else this[g$1](t
|
|
2217
|
-
for (; this[n
|
|
2218
|
-
const i
|
|
2219
|
-
this[n
|
|
2212
|
+
if (this[N$1] = true, this[n]) {
|
|
2213
|
+
this[D$1](t);
|
|
2214
|
+
const i = this[n];
|
|
2215
|
+
this[n] = null, this[g$1](i);
|
|
2216
|
+
} else this[g$1](t);
|
|
2217
|
+
for (; this[n] && this[n].length >= 512 && !this[m] && !this[A$1];) {
|
|
2218
|
+
const i = this[n];
|
|
2219
|
+
this[n] = null, this[g$1](i);
|
|
2220
2220
|
}
|
|
2221
2221
|
this[N$1] = false;
|
|
2222
2222
|
}
|
|
2223
|
-
(!this[n
|
|
2223
|
+
(!this[n] || this[u]) && this[M$1]();
|
|
2224
2224
|
}
|
|
2225
|
-
[g$1](t
|
|
2226
|
-
let i
|
|
2227
|
-
const s
|
|
2228
|
-
for (; i
|
|
2225
|
+
[g$1](t) {
|
|
2226
|
+
let i = 0;
|
|
2227
|
+
const s = t.length;
|
|
2228
|
+
for (; i + 512 <= s && !this[m] && !this[A$1];) switch (this[h$2]) {
|
|
2229
2229
|
case "begin":
|
|
2230
2230
|
case "header":
|
|
2231
|
-
this[Y](t
|
|
2231
|
+
this[Y](t, i), i += 512;
|
|
2232
2232
|
break;
|
|
2233
2233
|
case "ignore":
|
|
2234
2234
|
case "body":
|
|
2235
|
-
i
|
|
2235
|
+
i += this[q](t, i);
|
|
2236
2236
|
break;
|
|
2237
2237
|
case "meta":
|
|
2238
|
-
i
|
|
2238
|
+
i += this[z](t, i);
|
|
2239
2239
|
break;
|
|
2240
2240
|
default: throw new Error("invalid state: " + this[h$2]);
|
|
2241
2241
|
}
|
|
2242
|
-
i
|
|
2242
|
+
i < s && (this[n] ? this[n] = Buffer.concat([t.slice(i), this[n]]) : this[n] = t.slice(i));
|
|
2243
2243
|
}
|
|
2244
|
-
end(t
|
|
2245
|
-
this[m
|
|
2244
|
+
end(t) {
|
|
2245
|
+
this[m] || (this[r] ? this[r].end(t) : (this[u] = true, this.brotli === void 0 && (t = t || Buffer.alloc(0)), this.write(t)));
|
|
2246
2246
|
}
|
|
2247
2247
|
}), O$1;
|
|
2248
2248
|
}
|
|
@@ -2251,26 +2251,26 @@ var v$1;
|
|
|
2251
2251
|
function X() {
|
|
2252
2252
|
if (v$1) return s$4;
|
|
2253
2253
|
v$1 = 1;
|
|
2254
|
-
const H
|
|
2255
|
-
let R
|
|
2256
|
-
if (!R
|
|
2257
|
-
const c$
|
|
2258
|
-
R
|
|
2259
|
-
const G
|
|
2260
|
-
j
|
|
2254
|
+
const H = tt(), I$1 = nt.EventEmitter, r = nativeFs;
|
|
2255
|
+
let R = r.writev;
|
|
2256
|
+
if (!R) {
|
|
2257
|
+
const c$1 = process.binding("fs"), t = c$1.FSReqWrap || c$1.FSReqCallback;
|
|
2258
|
+
R = (e, i, $, A$1) => {
|
|
2259
|
+
const G = (J, K$1) => A$1(J, K$1, i), j = new t();
|
|
2260
|
+
j.oncomplete = G, c$1.writeBuffers(e, i, $, j);
|
|
2261
2261
|
};
|
|
2262
2262
|
}
|
|
2263
|
-
const m
|
|
2264
|
-
class D$1 extends H
|
|
2265
|
-
constructor(t
|
|
2266
|
-
if (e
|
|
2267
|
-
this[p
|
|
2263
|
+
const m = Symbol("_autoClose"), h$2 = Symbol("_close"), g$1 = Symbol("_ended"), s = Symbol("_fd"), B$1 = Symbol("_finished"), o = Symbol("_flags"), x$1 = Symbol("_flush"), z = Symbol("_handleChunk"), T = Symbol("_makeBuf"), q = Symbol("_mode"), E = Symbol("_needDrain"), d$1 = Symbol("_onerror"), y = Symbol("_onopen"), W$1 = Symbol("_onread"), _ = Symbol("_onwrite"), a = Symbol("_open"), l = Symbol("_path"), u = Symbol("_pos"), n = Symbol("_queue"), S = Symbol("_read"), M$1 = Symbol("_readSize"), f = Symbol("_reading"), k = Symbol("_remain"), N$1 = Symbol("_size"), C = Symbol("_write"), b$1 = Symbol("_writing"), F = Symbol("_defaultFlag"), p = Symbol("_errored");
|
|
2264
|
+
class D$1 extends H {
|
|
2265
|
+
constructor(t, e) {
|
|
2266
|
+
if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
|
|
2267
|
+
this[p] = false, this[s] = typeof e.fd == "number" ? e.fd : null, this[l] = t, this[M$1] = e.readSize || 16 * 1024 * 1024, this[f] = false, this[N$1] = typeof e.size == "number" ? e.size : Infinity, this[k] = this[N$1], this[m] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[s] == "number" ? this[S]() : this[a]();
|
|
2268
2268
|
}
|
|
2269
2269
|
get fd() {
|
|
2270
|
-
return this[s
|
|
2270
|
+
return this[s];
|
|
2271
2271
|
}
|
|
2272
2272
|
get path() {
|
|
2273
|
-
return this[l
|
|
2273
|
+
return this[l];
|
|
2274
2274
|
}
|
|
2275
2275
|
write() {
|
|
2276
2276
|
throw new TypeError("this is a readable stream");
|
|
@@ -2278,210 +2278,210 @@ function X() {
|
|
|
2278
2278
|
end() {
|
|
2279
2279
|
throw new TypeError("this is a readable stream");
|
|
2280
2280
|
}
|
|
2281
|
-
[a
|
|
2282
|
-
r.open(this[l
|
|
2281
|
+
[a]() {
|
|
2282
|
+
r.open(this[l], "r", (t, e) => this[y](t, e));
|
|
2283
2283
|
}
|
|
2284
|
-
[y
|
|
2285
|
-
t
|
|
2284
|
+
[y](t, e) {
|
|
2285
|
+
t ? this[d$1](t) : (this[s] = e, this.emit("open", e), this[S]());
|
|
2286
2286
|
}
|
|
2287
|
-
[T
|
|
2288
|
-
return Buffer.allocUnsafe(Math.min(this[M$1], this[k
|
|
2287
|
+
[T]() {
|
|
2288
|
+
return Buffer.allocUnsafe(Math.min(this[M$1], this[k]));
|
|
2289
2289
|
}
|
|
2290
|
-
[S
|
|
2291
|
-
if (!this[f
|
|
2292
|
-
this[f
|
|
2293
|
-
const t
|
|
2294
|
-
if (t
|
|
2295
|
-
r.read(this[s
|
|
2290
|
+
[S]() {
|
|
2291
|
+
if (!this[f]) {
|
|
2292
|
+
this[f] = true;
|
|
2293
|
+
const t = this[T]();
|
|
2294
|
+
if (t.length === 0) return process.nextTick(() => this[W$1](null, 0, t));
|
|
2295
|
+
r.read(this[s], t, 0, t.length, null, (e, i, $) => this[W$1](e, i, $));
|
|
2296
2296
|
}
|
|
2297
2297
|
}
|
|
2298
|
-
[W$1](t
|
|
2299
|
-
this[f
|
|
2298
|
+
[W$1](t, e, i) {
|
|
2299
|
+
this[f] = false, t ? this[d$1](t) : this[z](e, i) && this[S]();
|
|
2300
2300
|
}
|
|
2301
2301
|
[h$2]() {
|
|
2302
|
-
if (this[m
|
|
2303
|
-
const t
|
|
2304
|
-
this[s
|
|
2302
|
+
if (this[m] && typeof this[s] == "number") {
|
|
2303
|
+
const t = this[s];
|
|
2304
|
+
this[s] = null, r.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
2305
2305
|
}
|
|
2306
2306
|
}
|
|
2307
|
-
[d$1](t
|
|
2308
|
-
this[f
|
|
2307
|
+
[d$1](t) {
|
|
2308
|
+
this[f] = true, this[h$2](), this.emit("error", t);
|
|
2309
2309
|
}
|
|
2310
|
-
[z
|
|
2311
|
-
let i
|
|
2312
|
-
return this[k
|
|
2310
|
+
[z](t, e) {
|
|
2311
|
+
let i = false;
|
|
2312
|
+
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$2](), super.end()), i;
|
|
2313
2313
|
}
|
|
2314
|
-
emit(t
|
|
2315
|
-
switch (t
|
|
2314
|
+
emit(t, e) {
|
|
2315
|
+
switch (t) {
|
|
2316
2316
|
case "prefinish":
|
|
2317
2317
|
case "finish": break;
|
|
2318
2318
|
case "drain":
|
|
2319
|
-
typeof this[s
|
|
2319
|
+
typeof this[s] == "number" && this[S]();
|
|
2320
2320
|
break;
|
|
2321
|
-
case "error": return this[p
|
|
2322
|
-
default: return super.emit(t
|
|
2321
|
+
case "error": return this[p] ? void 0 : (this[p] = true, super.emit(t, e));
|
|
2322
|
+
default: return super.emit(t, e);
|
|
2323
2323
|
}
|
|
2324
2324
|
}
|
|
2325
2325
|
}
|
|
2326
2326
|
class P$2 extends D$1 {
|
|
2327
|
-
[a
|
|
2328
|
-
let t
|
|
2327
|
+
[a]() {
|
|
2328
|
+
let t = true;
|
|
2329
2329
|
try {
|
|
2330
|
-
this[y
|
|
2330
|
+
this[y](null, r.openSync(this[l], "r")), t = !1;
|
|
2331
2331
|
} finally {
|
|
2332
|
-
t
|
|
2332
|
+
t && this[h$2]();
|
|
2333
2333
|
}
|
|
2334
2334
|
}
|
|
2335
|
-
[S
|
|
2336
|
-
let t
|
|
2335
|
+
[S]() {
|
|
2336
|
+
let t = true;
|
|
2337
2337
|
try {
|
|
2338
|
-
if (!this[f
|
|
2339
|
-
this[f
|
|
2338
|
+
if (!this[f]) {
|
|
2339
|
+
this[f] = !0;
|
|
2340
2340
|
do {
|
|
2341
|
-
const e
|
|
2342
|
-
if (!this[z
|
|
2341
|
+
const e = this[T](), i = e.length === 0 ? 0 : r.readSync(this[s], e, 0, e.length, null);
|
|
2342
|
+
if (!this[z](i, e)) break;
|
|
2343
2343
|
} while (!0);
|
|
2344
|
-
this[f
|
|
2344
|
+
this[f] = !1;
|
|
2345
2345
|
}
|
|
2346
|
-
t
|
|
2346
|
+
t = !1;
|
|
2347
2347
|
} finally {
|
|
2348
|
-
t
|
|
2348
|
+
t && this[h$2]();
|
|
2349
2349
|
}
|
|
2350
2350
|
}
|
|
2351
2351
|
[h$2]() {
|
|
2352
|
-
if (this[m
|
|
2353
|
-
const t
|
|
2354
|
-
this[s
|
|
2352
|
+
if (this[m] && typeof this[s] == "number") {
|
|
2353
|
+
const t = this[s];
|
|
2354
|
+
this[s] = null, r.closeSync(t), this.emit("close");
|
|
2355
2355
|
}
|
|
2356
2356
|
}
|
|
2357
2357
|
}
|
|
2358
|
-
class O
|
|
2359
|
-
constructor(t
|
|
2360
|
-
e
|
|
2361
|
-
const i
|
|
2362
|
-
this[F
|
|
2358
|
+
class O extends I$1 {
|
|
2359
|
+
constructor(t, e) {
|
|
2360
|
+
e = e || {}, super(e), this.readable = false, this.writable = true, this[p] = false, this[b$1] = false, this[g$1] = 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;
|
|
2361
|
+
const i = this[u] !== null ? "r+" : "w";
|
|
2362
|
+
this[F] = e.flags === void 0, this[o] = this[F] ? i : e.flags, this[s] === null && this[a]();
|
|
2363
2363
|
}
|
|
2364
|
-
emit(t
|
|
2365
|
-
if (t
|
|
2366
|
-
if (this[p
|
|
2367
|
-
this[p
|
|
2364
|
+
emit(t, e) {
|
|
2365
|
+
if (t === "error") {
|
|
2366
|
+
if (this[p]) return;
|
|
2367
|
+
this[p] = true;
|
|
2368
2368
|
}
|
|
2369
|
-
return super.emit(t
|
|
2369
|
+
return super.emit(t, e);
|
|
2370
2370
|
}
|
|
2371
2371
|
get fd() {
|
|
2372
|
-
return this[s
|
|
2372
|
+
return this[s];
|
|
2373
2373
|
}
|
|
2374
2374
|
get path() {
|
|
2375
|
-
return this[l
|
|
2375
|
+
return this[l];
|
|
2376
2376
|
}
|
|
2377
|
-
[d$1](t
|
|
2378
|
-
this[h$2](), this[b$1] = true, this.emit("error", t
|
|
2377
|
+
[d$1](t) {
|
|
2378
|
+
this[h$2](), this[b$1] = true, this.emit("error", t);
|
|
2379
2379
|
}
|
|
2380
|
-
[a
|
|
2381
|
-
r.open(this[l
|
|
2380
|
+
[a]() {
|
|
2381
|
+
r.open(this[l], this[o], this[q], (t, e) => this[y](t, e));
|
|
2382
2382
|
}
|
|
2383
|
-
[y
|
|
2384
|
-
this[F
|
|
2383
|
+
[y](t, e) {
|
|
2384
|
+
this[F] && this[o] === "r+" && t && t.code === "ENOENT" ? (this[o] = "w", this[a]()) : t ? this[d$1](t) : (this[s] = e, this.emit("open", e), this[x$1]());
|
|
2385
2385
|
}
|
|
2386
|
-
end(t
|
|
2387
|
-
return t
|
|
2386
|
+
end(t, e) {
|
|
2387
|
+
return t && this.write(t, e), this[g$1] = true, !this[b$1] && !this[n].length && typeof this[s] == "number" && this[_](null, 0), this;
|
|
2388
2388
|
}
|
|
2389
|
-
write(t
|
|
2390
|
-
return typeof t
|
|
2389
|
+
write(t, e) {
|
|
2390
|
+
return typeof t == "string" && (t = Buffer.from(t, e)), this[g$1] ? (this.emit("error", /* @__PURE__ */ new Error("write() after end()")), false) : this[s] === null || this[b$1] || this[n].length ? (this[n].push(t), this[E] = true, false) : (this[b$1] = true, this[C](t), true);
|
|
2391
2391
|
}
|
|
2392
|
-
[C
|
|
2393
|
-
r.write(this[s
|
|
2392
|
+
[C](t) {
|
|
2393
|
+
r.write(this[s], t, 0, t.length, this[u], (e, i) => this[_](e, i));
|
|
2394
2394
|
}
|
|
2395
|
-
[_
|
|
2396
|
-
t
|
|
2395
|
+
[_](t, e) {
|
|
2396
|
+
t ? this[d$1](t) : (this[u] !== null && (this[u] += e), this[n].length ? this[x$1]() : (this[b$1] = false, this[g$1] && !this[B$1] ? (this[B$1] = true, this[h$2](), this.emit("finish")) : this[E] && (this[E] = false, this.emit("drain"))));
|
|
2397
2397
|
}
|
|
2398
2398
|
[x$1]() {
|
|
2399
|
-
if (this[n
|
|
2400
|
-
else if (this[n
|
|
2399
|
+
if (this[n].length === 0) this[g$1] && this[_](null, 0);
|
|
2400
|
+
else if (this[n].length === 1) this[C](this[n].pop());
|
|
2401
2401
|
else {
|
|
2402
|
-
const t
|
|
2403
|
-
this[n
|
|
2402
|
+
const t = this[n];
|
|
2403
|
+
this[n] = [], R(this[s], t, this[u], (e, i) => this[_](e, i));
|
|
2404
2404
|
}
|
|
2405
2405
|
}
|
|
2406
2406
|
[h$2]() {
|
|
2407
|
-
if (this[m
|
|
2408
|
-
const t
|
|
2409
|
-
this[s
|
|
2407
|
+
if (this[m] && typeof this[s] == "number") {
|
|
2408
|
+
const t = this[s];
|
|
2409
|
+
this[s] = null, r.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
2410
2410
|
}
|
|
2411
2411
|
}
|
|
2412
2412
|
}
|
|
2413
|
-
class U$1 extends O
|
|
2414
|
-
[a
|
|
2415
|
-
let t
|
|
2416
|
-
if (this[F
|
|
2417
|
-
t
|
|
2418
|
-
} catch (e
|
|
2419
|
-
if (e
|
|
2420
|
-
throw e
|
|
2413
|
+
class U$1 extends O {
|
|
2414
|
+
[a]() {
|
|
2415
|
+
let t;
|
|
2416
|
+
if (this[F] && this[o] === "r+") try {
|
|
2417
|
+
t = r.openSync(this[l], this[o], this[q]);
|
|
2418
|
+
} catch (e) {
|
|
2419
|
+
if (e.code === "ENOENT") return this[o] = "w", this[a]();
|
|
2420
|
+
throw e;
|
|
2421
2421
|
}
|
|
2422
|
-
else t
|
|
2423
|
-
this[y
|
|
2422
|
+
else t = r.openSync(this[l], this[o], this[q]);
|
|
2423
|
+
this[y](null, t);
|
|
2424
2424
|
}
|
|
2425
2425
|
[h$2]() {
|
|
2426
|
-
if (this[m
|
|
2427
|
-
const t
|
|
2428
|
-
this[s
|
|
2426
|
+
if (this[m] && typeof this[s] == "number") {
|
|
2427
|
+
const t = this[s];
|
|
2428
|
+
this[s] = null, r.closeSync(t), this.emit("close");
|
|
2429
2429
|
}
|
|
2430
2430
|
}
|
|
2431
|
-
[C
|
|
2432
|
-
let e
|
|
2431
|
+
[C](t) {
|
|
2432
|
+
let e = true;
|
|
2433
2433
|
try {
|
|
2434
|
-
this[_
|
|
2434
|
+
this[_](null, r.writeSync(this[s], t, 0, t.length, this[u])), e = !1;
|
|
2435
2435
|
} finally {
|
|
2436
|
-
if (e
|
|
2436
|
+
if (e) try {
|
|
2437
2437
|
this[h$2]();
|
|
2438
2438
|
} catch {}
|
|
2439
2439
|
}
|
|
2440
2440
|
}
|
|
2441
2441
|
}
|
|
2442
|
-
return s$4.ReadStream = D$1, s$4.ReadStreamSync = P$2, s$4.WriteStream = O
|
|
2442
|
+
return s$4.ReadStream = D$1, s$4.ReadStreamSync = P$2, s$4.WriteStream = O, s$4.WriteStreamSync = U$1, s$4;
|
|
2443
2443
|
}
|
|
2444
2444
|
var r$1 = { exports: {} };
|
|
2445
2445
|
var i$2, m$2;
|
|
2446
2446
|
function t$2() {
|
|
2447
2447
|
if (m$2) return i$2;
|
|
2448
2448
|
m$2 = 1;
|
|
2449
|
-
const { promisify: n
|
|
2449
|
+
const { promisify: n } = a$a, e = nativeFs;
|
|
2450
2450
|
return i$2 = (r) => {
|
|
2451
2451
|
if (!r) r = {
|
|
2452
2452
|
mode: 511,
|
|
2453
|
-
fs: e
|
|
2453
|
+
fs: e
|
|
2454
2454
|
};
|
|
2455
2455
|
else if (typeof r == "object") r = {
|
|
2456
2456
|
mode: 511,
|
|
2457
|
-
fs: e
|
|
2457
|
+
fs: e,
|
|
2458
2458
|
...r
|
|
2459
2459
|
};
|
|
2460
2460
|
else if (typeof r == "number") r = {
|
|
2461
2461
|
mode: r,
|
|
2462
|
-
fs: e
|
|
2462
|
+
fs: e
|
|
2463
2463
|
};
|
|
2464
2464
|
else if (typeof r == "string") r = {
|
|
2465
2465
|
mode: parseInt(r, 8),
|
|
2466
|
-
fs: e
|
|
2466
|
+
fs: e
|
|
2467
2467
|
};
|
|
2468
2468
|
else throw new TypeError("invalid options argument");
|
|
2469
|
-
return r.mkdir = r.mkdir || r.fs.mkdir || e
|
|
2469
|
+
return r.mkdir = r.mkdir || r.fs.mkdir || e.mkdir, r.mkdirAsync = n(r.mkdir), r.stat = r.stat || r.fs.stat || e.stat, r.statAsync = n(r.stat), r.statSync = r.statSync || r.fs.statSync || e.statSync, r.mkdirSync = r.mkdirSync || r.fs.mkdirSync || e.mkdirSync, r;
|
|
2470
2470
|
}, i$2;
|
|
2471
2471
|
}
|
|
2472
2472
|
var e$1, t$1;
|
|
2473
2473
|
function u$2() {
|
|
2474
2474
|
if (t$1) return e$1;
|
|
2475
2475
|
t$1 = 1;
|
|
2476
|
-
const s
|
|
2476
|
+
const s = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform, { resolve: o, parse: n } = path;
|
|
2477
2477
|
return e$1 = (r) => {
|
|
2478
2478
|
if (/\0/.test(r)) throw Object.assign(/* @__PURE__ */ new TypeError("path must be a string without null bytes"), {
|
|
2479
2479
|
path: r,
|
|
2480
2480
|
code: "ERR_INVALID_ARG_VALUE"
|
|
2481
2481
|
});
|
|
2482
|
-
if (r = o
|
|
2483
|
-
const i
|
|
2484
|
-
if (i
|
|
2482
|
+
if (r = o(r), s === "win32") {
|
|
2483
|
+
const i = /[*|"<>?:]/, { root: a } = n(r);
|
|
2484
|
+
if (i.test(r.substr(a.length))) throw Object.assign(/* @__PURE__ */ new Error("Illegal characters in path."), {
|
|
2485
2485
|
path: r,
|
|
2486
2486
|
code: "EINVAL"
|
|
2487
2487
|
});
|
|
@@ -2493,59 +2493,59 @@ var i$1, c$2;
|
|
|
2493
2493
|
function t() {
|
|
2494
2494
|
if (c$2) return i$1;
|
|
2495
2495
|
c$2 = 1;
|
|
2496
|
-
const { dirname: u
|
|
2497
|
-
if (n
|
|
2498
|
-
return r.statSync(e
|
|
2496
|
+
const { dirname: u } = path, f = (r, e, n = void 0) => n === e ? Promise.resolve() : r.statAsync(e).then((d$1) => d$1.isDirectory() ? n : void 0, (d$1) => d$1.code === "ENOENT" ? f(r, u(e), e) : void 0), o = (r, e, n = void 0) => {
|
|
2497
|
+
if (n !== e) try {
|
|
2498
|
+
return r.statSync(e).isDirectory() ? n : void 0;
|
|
2499
2499
|
} catch (d$1) {
|
|
2500
|
-
return d$1.code === "ENOENT" ? o
|
|
2500
|
+
return d$1.code === "ENOENT" ? o(r, u(e), e) : void 0;
|
|
2501
2501
|
}
|
|
2502
2502
|
};
|
|
2503
2503
|
return i$1 = {
|
|
2504
|
-
findMade: f
|
|
2505
|
-
findMadeSync: o
|
|
2504
|
+
findMade: f,
|
|
2505
|
+
findMadeSync: o
|
|
2506
2506
|
}, i$1;
|
|
2507
2507
|
}
|
|
2508
2508
|
var o$3, a$4;
|
|
2509
2509
|
function y$2() {
|
|
2510
2510
|
if (a$4) return o$3;
|
|
2511
2511
|
a$4 = 1;
|
|
2512
|
-
const { dirname: f
|
|
2513
|
-
e
|
|
2514
|
-
const i
|
|
2515
|
-
return i
|
|
2512
|
+
const { dirname: f } = path, t = (n, e, c$1) => {
|
|
2513
|
+
e.recursive = false;
|
|
2514
|
+
const i = f(n);
|
|
2515
|
+
return i === n ? e.mkdirAsync(n, e).catch((r) => {
|
|
2516
2516
|
if (r.code !== "EISDIR") throw r;
|
|
2517
|
-
}) : e
|
|
2518
|
-
if (r.code === "ENOENT") return t
|
|
2517
|
+
}) : e.mkdirAsync(n, e).then(() => c$1 || n, (r) => {
|
|
2518
|
+
if (r.code === "ENOENT") return t(i, e).then((u) => t(n, e, u));
|
|
2519
2519
|
if (r.code !== "EEXIST" && r.code !== "EROFS") throw r;
|
|
2520
|
-
return e
|
|
2521
|
-
if (u
|
|
2520
|
+
return e.statAsync(n).then((u) => {
|
|
2521
|
+
if (u.isDirectory()) return c$1;
|
|
2522
2522
|
throw r;
|
|
2523
2523
|
}, () => {
|
|
2524
2524
|
throw r;
|
|
2525
2525
|
});
|
|
2526
2526
|
});
|
|
2527
|
-
}, d$1 = (n
|
|
2528
|
-
const i
|
|
2529
|
-
if (e
|
|
2530
|
-
return e
|
|
2527
|
+
}, d$1 = (n, e, c$1) => {
|
|
2528
|
+
const i = f(n);
|
|
2529
|
+
if (e.recursive = false, i === n) try {
|
|
2530
|
+
return e.mkdirSync(n, e);
|
|
2531
2531
|
} catch (r) {
|
|
2532
2532
|
if (r.code !== "EISDIR") throw r;
|
|
2533
2533
|
return;
|
|
2534
2534
|
}
|
|
2535
2535
|
try {
|
|
2536
|
-
return e
|
|
2536
|
+
return e.mkdirSync(n, e), c$1 || n;
|
|
2537
2537
|
} catch (r) {
|
|
2538
|
-
if (r.code === "ENOENT") return d$1(n
|
|
2538
|
+
if (r.code === "ENOENT") return d$1(n, e, d$1(i, e, c$1));
|
|
2539
2539
|
if (r.code !== "EEXIST" && r.code !== "EROFS") throw r;
|
|
2540
2540
|
try {
|
|
2541
|
-
if (!e
|
|
2541
|
+
if (!e.statSync(n).isDirectory()) throw r;
|
|
2542
2542
|
} catch {
|
|
2543
2543
|
throw r;
|
|
2544
2544
|
}
|
|
2545
2545
|
}
|
|
2546
2546
|
};
|
|
2547
2547
|
return o$3 = {
|
|
2548
|
-
mkdirpManual: t
|
|
2548
|
+
mkdirpManual: t,
|
|
2549
2549
|
mkdirpManualSync: d$1
|
|
2550
2550
|
}, o$3;
|
|
2551
2551
|
}
|
|
@@ -2553,20 +2553,20 @@ var c$1, m$1;
|
|
|
2553
2553
|
function s$3() {
|
|
2554
2554
|
if (m$1) return c$1;
|
|
2555
2555
|
m$1 = 1;
|
|
2556
|
-
const { dirname: u
|
|
2556
|
+
const { dirname: u } = path, { findMade: d$1, findMadeSync: t$1 } = t(), { mkdirpManual: a, mkdirpManualSync: k } = y$2();
|
|
2557
2557
|
return c$1 = {
|
|
2558
|
-
mkdirpNative: (e
|
|
2559
|
-
if (i
|
|
2560
|
-
throw i
|
|
2558
|
+
mkdirpNative: (e, r) => (r.recursive = true, u(e) === e ? r.mkdirAsync(e, r) : d$1(r, e).then((n) => r.mkdirAsync(e, r).then(() => n).catch((i) => {
|
|
2559
|
+
if (i.code === "ENOENT") return a(e, r);
|
|
2560
|
+
throw i;
|
|
2561
2561
|
}))),
|
|
2562
|
-
mkdirpNativeSync: (e
|
|
2563
|
-
if (r.recursive = true, u
|
|
2564
|
-
const n
|
|
2562
|
+
mkdirpNativeSync: (e, r) => {
|
|
2563
|
+
if (r.recursive = true, u(e) === e) return r.mkdirSync(e, r);
|
|
2564
|
+
const n = t$1(r, e);
|
|
2565
2565
|
try {
|
|
2566
|
-
return r.mkdirSync(e
|
|
2567
|
-
} catch (i
|
|
2568
|
-
if (i
|
|
2569
|
-
throw i
|
|
2566
|
+
return r.mkdirSync(e, r), n;
|
|
2567
|
+
} catch (i) {
|
|
2568
|
+
if (i.code === "ENOENT") return k(e, r);
|
|
2569
|
+
throw i;
|
|
2570
2570
|
}
|
|
2571
2571
|
}
|
|
2572
2572
|
}, c$1;
|
|
@@ -2575,261 +2575,261 @@ var s$2, n$1;
|
|
|
2575
2575
|
function a$3() {
|
|
2576
2576
|
if (n$1) return s$2;
|
|
2577
2577
|
n$1 = 1;
|
|
2578
|
-
const i
|
|
2578
|
+
const i = nativeFs, e = (process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version).replace(/^v/, "").split("."), t = +e[0] > 10 || +e[0] == 10 && +e[1] >= 12;
|
|
2579
2579
|
return s$2 = {
|
|
2580
|
-
useNative: t
|
|
2581
|
-
useNativeSync: t
|
|
2580
|
+
useNative: t ? (r) => r.mkdir === i.mkdir : () => false,
|
|
2581
|
+
useNativeSync: t ? (r) => r.mkdirSync === i.mkdirSync : () => false
|
|
2582
2582
|
}, s$2;
|
|
2583
2583
|
}
|
|
2584
2584
|
var m, s$1;
|
|
2585
2585
|
function S() {
|
|
2586
2586
|
if (s$1) return m;
|
|
2587
2587
|
s$1 = 1;
|
|
2588
|
-
const i
|
|
2589
|
-
return n
|
|
2588
|
+
const i = t$2(), u = u$2(), { mkdirpNative: a, mkdirpNativeSync: c$1 } = 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$1 = (e, r) => (e = u(e), r = i(r), _(r) ? c$1(e, r) : q(e, r));
|
|
2589
|
+
return n.sync = d$1, n.native = (e, r) => a(u(e), i(r)), n.manual = (e, r) => o(u(e), i(r)), n.nativeSync = (e, r) => c$1(u(e), i(r)), n.manualSync = (e, r) => q(u(e), i(r)), m = n, m;
|
|
2590
2590
|
}
|
|
2591
2591
|
var y$1, O;
|
|
2592
2592
|
function F$1() {
|
|
2593
2593
|
if (O) return y$1;
|
|
2594
2594
|
O = 1;
|
|
2595
|
-
const c$
|
|
2595
|
+
const c$1 = nativeFs, a = path, T = c$1.lchown ? "lchown" : "chown", I$1 = c$1.lchownSync ? "lchownSync" : "chownSync", i = c$1.lchown && !process.version.match(/v1[1-9]+\./) && !process.version.match(/v10\.[6-9]/), u = (r, e, n) => {
|
|
2596
2596
|
try {
|
|
2597
|
-
return c$
|
|
2598
|
-
} catch (t
|
|
2599
|
-
if (t
|
|
2597
|
+
return c$1[I$1](r, e, n);
|
|
2598
|
+
} catch (t) {
|
|
2599
|
+
if (t.code !== "ENOENT") throw t;
|
|
2600
2600
|
}
|
|
2601
|
-
}, D$1 = (r, e
|
|
2601
|
+
}, D$1 = (r, e, n) => {
|
|
2602
2602
|
try {
|
|
2603
|
-
return c$
|
|
2604
|
-
} catch (t
|
|
2605
|
-
if (t
|
|
2603
|
+
return c$1.chownSync(r, e, n);
|
|
2604
|
+
} catch (t) {
|
|
2605
|
+
if (t.code !== "ENOENT") throw t;
|
|
2606
2606
|
}
|
|
2607
|
-
}, _
|
|
2608
|
-
!o
|
|
2609
|
-
} : (r, e
|
|
2607
|
+
}, _ = i ? (r, e, n, t) => (o) => {
|
|
2608
|
+
!o || o.code !== "EISDIR" ? t(o) : c$1.chown(r, e, n, t);
|
|
2609
|
+
} : (r, e, n, t) => t, w = i ? (r, e, n) => {
|
|
2610
2610
|
try {
|
|
2611
|
-
return u
|
|
2612
|
-
} catch (t
|
|
2613
|
-
if (t
|
|
2614
|
-
D$1(r, e
|
|
2615
|
-
}
|
|
2616
|
-
} : (r, e
|
|
2617
|
-
let N$1 = (r, e
|
|
2618
|
-
/^v4\./.test(R
|
|
2619
|
-
const h$2 = (r, e
|
|
2620
|
-
c$
|
|
2621
|
-
t
|
|
2611
|
+
return u(r, e, n);
|
|
2612
|
+
} catch (t) {
|
|
2613
|
+
if (t.code !== "EISDIR") throw t;
|
|
2614
|
+
D$1(r, e, n);
|
|
2615
|
+
}
|
|
2616
|
+
} : (r, e, n) => u(r, e, n), R = process.version;
|
|
2617
|
+
let N$1 = (r, e, n) => c$1.readdir(r, e, n), q = (r, e) => c$1.readdirSync(r, e);
|
|
2618
|
+
/^v4\./.test(R) && (N$1 = (r, e, n) => c$1.readdir(r, n));
|
|
2619
|
+
const h$2 = (r, e, n, t) => {
|
|
2620
|
+
c$1[T](r, e, n, _(r, e, n, (o) => {
|
|
2621
|
+
t(o && o.code !== "ENOENT" ? o : null);
|
|
2622
2622
|
}));
|
|
2623
|
-
}, S
|
|
2624
|
-
if (typeof e
|
|
2625
|
-
if (s
|
|
2626
|
-
f
|
|
2623
|
+
}, S = (r, e, n, t, o) => {
|
|
2624
|
+
if (typeof e == "string") return c$1.lstat(a.resolve(r, e), (s, f) => {
|
|
2625
|
+
if (s) return o(s.code !== "ENOENT" ? s : null);
|
|
2626
|
+
f.name = e, S(r, f, n, t, o);
|
|
2627
2627
|
});
|
|
2628
|
-
if (e
|
|
2629
|
-
if (s
|
|
2630
|
-
h$2(a
|
|
2628
|
+
if (e.isDirectory()) E(a.resolve(r, e.name), n, t, (s) => {
|
|
2629
|
+
if (s) return o(s);
|
|
2630
|
+
h$2(a.resolve(r, e.name), n, t, o);
|
|
2631
2631
|
});
|
|
2632
|
-
else h$2(a
|
|
2633
|
-
}, E
|
|
2634
|
-
N$1(r, { withFileTypes: true }, (o
|
|
2635
|
-
if (o
|
|
2636
|
-
if (o
|
|
2637
|
-
if (o
|
|
2632
|
+
else h$2(a.resolve(r, e.name), n, t, o);
|
|
2633
|
+
}, E = (r, e, n, t) => {
|
|
2634
|
+
N$1(r, { withFileTypes: true }, (o, s) => {
|
|
2635
|
+
if (o) {
|
|
2636
|
+
if (o.code === "ENOENT") return t();
|
|
2637
|
+
if (o.code !== "ENOTDIR" && o.code !== "ENOTSUP") return t(o);
|
|
2638
2638
|
}
|
|
2639
|
-
if (o
|
|
2640
|
-
let f
|
|
2641
|
-
const H
|
|
2642
|
-
if (!v
|
|
2643
|
-
if (l
|
|
2644
|
-
if (--f
|
|
2639
|
+
if (o || !s.length) return h$2(r, e, n, t);
|
|
2640
|
+
let f = s.length, v = null;
|
|
2641
|
+
const H = (l) => {
|
|
2642
|
+
if (!v) {
|
|
2643
|
+
if (l) return t(v = l);
|
|
2644
|
+
if (--f === 0) return h$2(r, e, n, t);
|
|
2645
2645
|
}
|
|
2646
2646
|
};
|
|
2647
|
-
s
|
|
2647
|
+
s.forEach((l) => S(r, l, e, n, H));
|
|
2648
2648
|
});
|
|
2649
|
-
}, C
|
|
2650
|
-
if (typeof e
|
|
2651
|
-
const o
|
|
2652
|
-
o
|
|
2653
|
-
} catch (o
|
|
2654
|
-
if (o
|
|
2655
|
-
throw o
|
|
2656
|
-
}
|
|
2657
|
-
e
|
|
2658
|
-
}, m
|
|
2659
|
-
let t
|
|
2649
|
+
}, C = (r, e, n, t) => {
|
|
2650
|
+
if (typeof e == "string") try {
|
|
2651
|
+
const o = c$1.lstatSync(a.resolve(r, e));
|
|
2652
|
+
o.name = e, e = o;
|
|
2653
|
+
} catch (o) {
|
|
2654
|
+
if (o.code === "ENOENT") return;
|
|
2655
|
+
throw o;
|
|
2656
|
+
}
|
|
2657
|
+
e.isDirectory() && m(a.resolve(r, e.name), n, t), w(a.resolve(r, e.name), n, t);
|
|
2658
|
+
}, m = (r, e, n) => {
|
|
2659
|
+
let t;
|
|
2660
2660
|
try {
|
|
2661
|
-
t
|
|
2662
|
-
} catch (o
|
|
2663
|
-
if (o
|
|
2664
|
-
if (o
|
|
2665
|
-
throw o
|
|
2661
|
+
t = q(r, { withFileTypes: !0 });
|
|
2662
|
+
} catch (o) {
|
|
2663
|
+
if (o.code === "ENOENT") return;
|
|
2664
|
+
if (o.code === "ENOTDIR" || o.code === "ENOTSUP") return w(r, e, n);
|
|
2665
|
+
throw o;
|
|
2666
2666
|
}
|
|
2667
|
-
return t
|
|
2667
|
+
return t && t.length && t.forEach((o) => C(r, o, e, n)), w(r, e, n);
|
|
2668
2668
|
};
|
|
2669
|
-
return y$1 = E
|
|
2669
|
+
return y$1 = E, E.sync = m, y$1;
|
|
2670
2670
|
}
|
|
2671
2671
|
var R;
|
|
2672
2672
|
function H() {
|
|
2673
2673
|
if (R) return r$1.exports;
|
|
2674
2674
|
R = 1;
|
|
2675
|
-
const g$1 = S(), l
|
|
2675
|
+
const g$1 = S(), l = nativeFs, p = path, x$1 = F$1(), y = a$7();
|
|
2676
2676
|
class D$1 extends Error {
|
|
2677
|
-
constructor(e
|
|
2678
|
-
super("Cannot extract through symbolic link"), this.path = s
|
|
2677
|
+
constructor(e, s) {
|
|
2678
|
+
super("Cannot extract through symbolic link"), this.path = s, this.symlink = e;
|
|
2679
2679
|
}
|
|
2680
2680
|
get name() {
|
|
2681
2681
|
return "SylinkError";
|
|
2682
2682
|
}
|
|
2683
2683
|
}
|
|
2684
|
-
class E
|
|
2685
|
-
constructor(e
|
|
2686
|
-
super(s
|
|
2684
|
+
class E extends Error {
|
|
2685
|
+
constructor(e, s) {
|
|
2686
|
+
super(s + ": Cannot cd into '" + e + "'"), this.path = e, this.code = s;
|
|
2687
2687
|
}
|
|
2688
2688
|
get name() {
|
|
2689
2689
|
return "CwdError";
|
|
2690
2690
|
}
|
|
2691
2691
|
}
|
|
2692
|
-
const v
|
|
2693
|
-
l
|
|
2694
|
-
(s
|
|
2692
|
+
const v = (n, e) => n.get(y(e)), q = (n, e, s) => n.set(y(e), s), I$1 = (n, e) => {
|
|
2693
|
+
l.stat(n, (s, r) => {
|
|
2694
|
+
(s || !r.isDirectory()) && (s = new E(n, s && s.code || "ENOTDIR")), e(s);
|
|
2695
2695
|
});
|
|
2696
2696
|
};
|
|
2697
|
-
r$1.exports = (n
|
|
2698
|
-
n
|
|
2699
|
-
const r = e
|
|
2700
|
-
k
|
|
2697
|
+
r$1.exports = (n, e, s) => {
|
|
2698
|
+
n = y(n);
|
|
2699
|
+
const r = e.umask, c$1 = e.mode | 448, f = (c$1 & 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$2 = e.cache, d$1 = y(e.cwd), w = (k, o) => {
|
|
2700
|
+
k ? s(k) : (q(h$2, n, true), o && a ? x$1(o, t, i, (G) => w(G)) : f ? l.chmod(n, c$1, s) : s());
|
|
2701
2701
|
};
|
|
2702
|
-
if (h$2 && v
|
|
2703
|
-
if (n
|
|
2704
|
-
if (u
|
|
2705
|
-
C
|
|
2702
|
+
if (h$2 && v(h$2, n) === true) return w();
|
|
2703
|
+
if (n === d$1) return I$1(n, w);
|
|
2704
|
+
if (u) return g$1(n, { mode: c$1 }).then((k) => w(null, k), w);
|
|
2705
|
+
C(d$1, y(p.relative(d$1, n)).split("/"), c$1, h$2, m, d$1, null, w);
|
|
2706
2706
|
};
|
|
2707
|
-
const C
|
|
2708
|
-
if (!e
|
|
2709
|
-
const a
|
|
2710
|
-
if (v
|
|
2711
|
-
l
|
|
2712
|
-
}, j
|
|
2713
|
-
a
|
|
2714
|
-
if (u
|
|
2715
|
-
else if (m
|
|
2716
|
-
else if (c$
|
|
2717
|
-
if (h$2) return i
|
|
2718
|
-
l
|
|
2707
|
+
const C = (n, e, s, r, c$1, f, t, i) => {
|
|
2708
|
+
if (!e.length) return i(null, t);
|
|
2709
|
+
const a = e.shift(), u = y(p.resolve(n + "/" + a));
|
|
2710
|
+
if (v(r, u)) return C(u, e, s, r, c$1, f, t, i);
|
|
2711
|
+
l.mkdir(u, s, j(u, e, s, r, c$1, f, t, i));
|
|
2712
|
+
}, j = (n, e, s, r, c$1, f, t, i) => (a) => {
|
|
2713
|
+
a ? l.lstat(n, (u, m) => {
|
|
2714
|
+
if (u) u.path = u.path && y(u.path), i(u);
|
|
2715
|
+
else if (m.isDirectory()) C(n, e, s, r, c$1, f, t, i);
|
|
2716
|
+
else if (c$1) l.unlink(n, (h$2) => {
|
|
2717
|
+
if (h$2) return i(h$2);
|
|
2718
|
+
l.mkdir(n, s, j(n, e, s, r, c$1, f, t, i));
|
|
2719
2719
|
});
|
|
2720
2720
|
else {
|
|
2721
|
-
if (m
|
|
2722
|
-
i
|
|
2721
|
+
if (m.isSymbolicLink()) return i(new D$1(n, n + "/" + e.join("/")));
|
|
2722
|
+
i(a);
|
|
2723
2723
|
}
|
|
2724
|
-
}) : (t
|
|
2725
|
-
}, L = (n
|
|
2726
|
-
let e
|
|
2724
|
+
}) : (t = t || n, C(n, e, s, r, c$1, f, t, i));
|
|
2725
|
+
}, L = (n) => {
|
|
2726
|
+
let e = false, s = "ENOTDIR";
|
|
2727
2727
|
try {
|
|
2728
|
-
e
|
|
2728
|
+
e = l.statSync(n).isDirectory();
|
|
2729
2729
|
} catch (r) {
|
|
2730
|
-
s
|
|
2730
|
+
s = r.code;
|
|
2731
2731
|
} finally {
|
|
2732
|
-
if (!e
|
|
2732
|
+
if (!e) throw new E(n, s);
|
|
2733
2733
|
}
|
|
2734
2734
|
};
|
|
2735
|
-
return r$1.exports.sync = (n
|
|
2736
|
-
n
|
|
2737
|
-
const s
|
|
2738
|
-
q
|
|
2735
|
+
return r$1.exports.sync = (n, e) => {
|
|
2736
|
+
n = y(n);
|
|
2737
|
+
const s = e.umask, r = e.mode | 448, c$1 = (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$2 = y(e.cwd), d$1 = (k) => {
|
|
2738
|
+
q(m, n, true), k && i && x$1.sync(k, f, t), c$1 && l.chmodSync(n, r);
|
|
2739
2739
|
};
|
|
2740
|
-
if (m
|
|
2741
|
-
if (n
|
|
2742
|
-
if (a
|
|
2743
|
-
const $ = y
|
|
2744
|
-
let S
|
|
2745
|
-
for (let k
|
|
2746
|
-
l
|
|
2740
|
+
if (m && v(m, n) === true) return d$1();
|
|
2741
|
+
if (n === h$2) return L(h$2), d$1();
|
|
2742
|
+
if (a) return d$1(g$1.sync(n, r));
|
|
2743
|
+
const $ = y(p.relative(h$2, n)).split("/");
|
|
2744
|
+
let S = null;
|
|
2745
|
+
for (let k = $.shift(), o = h$2; k && (o += "/" + k); k = $.shift()) if (o = y(p.resolve(o)), !v(m, o)) try {
|
|
2746
|
+
l.mkdirSync(o, r), S = S || o, q(m, o, !0);
|
|
2747
2747
|
} catch {
|
|
2748
|
-
const M$1 = l
|
|
2748
|
+
const M$1 = l.lstatSync(o);
|
|
2749
2749
|
if (M$1.isDirectory()) {
|
|
2750
|
-
q
|
|
2750
|
+
q(m, o, true);
|
|
2751
2751
|
continue;
|
|
2752
|
-
} else if (u
|
|
2753
|
-
l
|
|
2752
|
+
} else if (u) {
|
|
2753
|
+
l.unlinkSync(o), l.mkdirSync(o, r), S = S || o, q(m, o, true);
|
|
2754
2754
|
continue;
|
|
2755
|
-
} else if (M$1.isSymbolicLink()) return new D$1(o
|
|
2755
|
+
} else if (M$1.isSymbolicLink()) return new D$1(o, o + "/" + $.join("/"));
|
|
2756
2756
|
}
|
|
2757
|
-
return d$1(S
|
|
2757
|
+
return d$1(S);
|
|
2758
2758
|
}, r$1.exports;
|
|
2759
2759
|
}
|
|
2760
2760
|
var a$2, i;
|
|
2761
2761
|
function p() {
|
|
2762
2762
|
if (i) return a$2;
|
|
2763
2763
|
i = 1;
|
|
2764
|
-
const o
|
|
2764
|
+
const o = [
|
|
2765
2765
|
"|",
|
|
2766
2766
|
"<",
|
|
2767
2767
|
">",
|
|
2768
2768
|
"?",
|
|
2769
2769
|
":"
|
|
2770
|
-
], t
|
|
2770
|
+
], t = o.map((e) => String.fromCharCode(61440 + e.charCodeAt(0))), s = new Map(o.map((e, r) => [e, t[r]])), c$1 = new Map(t.map((e, r) => [e, o[r]]));
|
|
2771
2771
|
return a$2 = {
|
|
2772
|
-
encode: (e
|
|
2773
|
-
decode: (e
|
|
2772
|
+
encode: (e) => o.reduce((r, n) => r.split(n).join(s.get(n)), e),
|
|
2773
|
+
decode: (e) => t.reduce((r, n) => r.split(n).join(c$1.get(n)), e)
|
|
2774
2774
|
}, a$2;
|
|
2775
2775
|
}
|
|
2776
2776
|
var o$2, n;
|
|
2777
2777
|
function a$1() {
|
|
2778
2778
|
if (n) return o$2;
|
|
2779
2779
|
n = 1;
|
|
2780
|
-
const r = Object.create(null), { hasOwnProperty: i
|
|
2781
|
-
return o$2 = (e
|
|
2780
|
+
const r = Object.create(null), { hasOwnProperty: i } = Object.prototype;
|
|
2781
|
+
return o$2 = (e) => (i.call(r, e) || (r[e] = e.normalize("NFD")), r[e]), o$2;
|
|
2782
2782
|
}
|
|
2783
2783
|
var a, l;
|
|
2784
2784
|
function s() {
|
|
2785
2785
|
return l || (l = 1, a = (r) => {
|
|
2786
|
-
let e
|
|
2787
|
-
for (; e
|
|
2788
|
-
return i
|
|
2786
|
+
let e = r.length - 1, i = -1;
|
|
2787
|
+
for (; e > -1 && r.charAt(e) === "/";) i = e, e--;
|
|
2788
|
+
return i === -1 ? r : r.slice(0, i);
|
|
2789
2789
|
}), a;
|
|
2790
2790
|
}
|
|
2791
2791
|
var u$1, f$1;
|
|
2792
2792
|
function z() {
|
|
2793
2793
|
if (f$1) return u$1;
|
|
2794
2794
|
f$1 = 1;
|
|
2795
|
-
const l
|
|
2795
|
+
const l = j$1, m = a$1(), g$1 = s(), { join: d$1 } = path, q = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
2796
2796
|
return u$1 = () => {
|
|
2797
|
-
const i
|
|
2798
|
-
const s
|
|
2799
|
-
if (!s
|
|
2797
|
+
const i = /* @__PURE__ */ new Map(), c$1 = /* @__PURE__ */ new Map(), v = (e) => e.split("/").slice(0, -1).reduce((o, r) => (o.length && (r = d$1(o[o.length - 1], r)), o.push(r || "/"), o), []), a = /* @__PURE__ */ new Set(), w = (e) => {
|
|
2798
|
+
const s = c$1.get(e);
|
|
2799
|
+
if (!s) throw new Error("function does not have any path reservations");
|
|
2800
2800
|
return {
|
|
2801
|
-
paths: s
|
|
2802
|
-
dirs: [...s
|
|
2801
|
+
paths: s.paths.map((o) => i.get(o)),
|
|
2802
|
+
dirs: [...s.dirs].map((o) => i.get(o))
|
|
2803
2803
|
};
|
|
2804
|
-
}, h$2 = (e
|
|
2805
|
-
const { paths: s
|
|
2806
|
-
return s
|
|
2807
|
-
}, p
|
|
2808
|
-
if (!a
|
|
2809
|
-
const { paths: s
|
|
2810
|
-
return s
|
|
2811
|
-
const n
|
|
2812
|
-
l
|
|
2813
|
-
}), o
|
|
2814
|
-
const n
|
|
2815
|
-
l
|
|
2816
|
-
}), a
|
|
2804
|
+
}, h$2 = (e) => {
|
|
2805
|
+
const { paths: s, dirs: o } = w(e);
|
|
2806
|
+
return s.every((r) => r[0] === e) && o.every((r) => r[0] instanceof Set && r[0].has(e));
|
|
2807
|
+
}, p = (e) => a.has(e) || !h$2(e) ? false : (a.add(e), e(() => S(e)), true), S = (e) => {
|
|
2808
|
+
if (!a.has(e)) return false;
|
|
2809
|
+
const { paths: s, dirs: o } = c$1.get(e), r = /* @__PURE__ */ new Set();
|
|
2810
|
+
return s.forEach((t) => {
|
|
2811
|
+
const n = i.get(t);
|
|
2812
|
+
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)));
|
|
2813
|
+
}), o.forEach((t) => {
|
|
2814
|
+
const n = i.get(t);
|
|
2815
|
+
l(n[0] instanceof Set), n[0].size === 1 && n.length === 1 ? i.delete(t) : n[0].size === 1 ? (n.shift(), r.add(n[0])) : n[0].delete(e);
|
|
2816
|
+
}), a.delete(e), r.forEach((t) => p(t)), true;
|
|
2817
2817
|
};
|
|
2818
2818
|
return {
|
|
2819
2819
|
check: h$2,
|
|
2820
|
-
reserve: (e
|
|
2821
|
-
e
|
|
2822
|
-
const o
|
|
2823
|
-
return c$
|
|
2824
|
-
dirs: o
|
|
2825
|
-
paths: e
|
|
2826
|
-
}), e
|
|
2827
|
-
const t
|
|
2828
|
-
t
|
|
2829
|
-
}), o
|
|
2830
|
-
const t
|
|
2831
|
-
t
|
|
2832
|
-
}), p
|
|
2820
|
+
reserve: (e, s) => {
|
|
2821
|
+
e = q ? ["win32 parallelization disabled"] : e.map((r) => g$1(d$1(m(r))).toLowerCase());
|
|
2822
|
+
const o = new Set(e.map((r) => v(r)).reduce((r, t) => r.concat(t)));
|
|
2823
|
+
return c$1.set(s, {
|
|
2824
|
+
dirs: o,
|
|
2825
|
+
paths: e
|
|
2826
|
+
}), e.forEach((r) => {
|
|
2827
|
+
const t = i.get(r);
|
|
2828
|
+
t ? t.push(s) : i.set(r, [s]);
|
|
2829
|
+
}), o.forEach((r) => {
|
|
2830
|
+
const t = i.get(r);
|
|
2831
|
+
t ? t[t.length - 1] instanceof Set ? t[t.length - 1].add(s) : t.push(new Set([s])) : i.set(r, [new Set([s])]);
|
|
2832
|
+
}), p(s);
|
|
2833
2833
|
}
|
|
2834
2834
|
};
|
|
2835
2835
|
}, u$1;
|
|
@@ -2838,128 +2838,128 @@ var o$1, u;
|
|
|
2838
2838
|
function c$5() {
|
|
2839
2839
|
if (u) return o$1;
|
|
2840
2840
|
u = 1;
|
|
2841
|
-
const { isAbsolute: l
|
|
2841
|
+
const { isAbsolute: l, parse: t } = path.win32;
|
|
2842
2842
|
return o$1 = (r) => {
|
|
2843
|
-
let s
|
|
2844
|
-
for (; l
|
|
2845
|
-
const i
|
|
2846
|
-
r = r.slice(i
|
|
2843
|
+
let s = "", e = t(r);
|
|
2844
|
+
for (; l(r) || e.root;) {
|
|
2845
|
+
const i = r.charAt(0) === "/" && r.slice(0, 4) !== "//?/" ? "/" : e.root;
|
|
2846
|
+
r = r.slice(i.length), s += i, e = t(r);
|
|
2847
2847
|
}
|
|
2848
|
-
return [s
|
|
2848
|
+
return [s, r];
|
|
2849
2849
|
}, o$1;
|
|
2850
2850
|
}
|
|
2851
2851
|
var e, o;
|
|
2852
2852
|
function F() {
|
|
2853
2853
|
if (o) return e;
|
|
2854
2854
|
o = 1;
|
|
2855
|
-
const t
|
|
2856
|
-
return e = c$
|
|
2855
|
+
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$1 = s && !!r, f = 512 * 1024, p = r | a | _ | i;
|
|
2856
|
+
return e = c$1 ? (l) => l < f ? p : "w" : () => "w", e;
|
|
2857
2857
|
}
|
|
2858
2858
|
var G, y;
|
|
2859
2859
|
function Os() {
|
|
2860
2860
|
if (y) return G;
|
|
2861
2861
|
y = 1;
|
|
2862
|
-
const ss = j$1, is = rt(), r = nativeFs, es = X(), w
|
|
2863
|
-
if (!C
|
|
2864
|
-
const i
|
|
2865
|
-
r.rename(a
|
|
2866
|
-
if (e
|
|
2867
|
-
r.unlink(i
|
|
2862
|
+
const ss = j$1, is = rt(), r = nativeFs, es = X(), w = path, M$1 = H(), K$1 = p(), ts = z(), os$1 = c$5(), l = a$7(), rs = s(), hs = a$1(), H$1 = Symbol("onEntry"), q = Symbol("checkFs"), Y = Symbol("checkFs2"), v = Symbol("pruneCache"), N$1 = Symbol("isReusable"), d$1 = Symbol("makeFs"), U$1 = Symbol("file"), F$1 = Symbol("directory"), O = Symbol("link"), B$1 = Symbol("symlink"), z$1$1 = Symbol("hardlink"), W$1 = Symbol("unsupported"), j = Symbol("checkPath"), b$1 = Symbol("mkdir"), m = Symbol("onError"), $ = Symbol("pending"), V$1 = Symbol("pend"), S = Symbol("unpend"), P$2 = Symbol("ended"), A$1 = Symbol("maybeClose"), x$1 = Symbol("skip"), E = Symbol("doChown"), R = Symbol("uid"), _ = Symbol("gid"), g$1 = Symbol("checkedCwd"), X$1 = Ds, J = F(), C = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32", cs = 1024, as = (a, s) => {
|
|
2863
|
+
if (!C) return r.unlink(a, s);
|
|
2864
|
+
const i = a + ".DELETE." + X$1.randomBytes(16).toString("hex");
|
|
2865
|
+
r.rename(a, i, (e) => {
|
|
2866
|
+
if (e) return s(e);
|
|
2867
|
+
r.unlink(i, s);
|
|
2868
2868
|
});
|
|
2869
|
-
}, us = (a
|
|
2870
|
-
if (!C
|
|
2871
|
-
const s
|
|
2872
|
-
r.renameSync(a
|
|
2873
|
-
}, Q = (a
|
|
2874
|
-
s
|
|
2875
|
-
for (const i
|
|
2876
|
-
const e
|
|
2877
|
-
(e
|
|
2878
|
-
}
|
|
2879
|
-
}, ms = (a
|
|
2880
|
-
for (const s
|
|
2869
|
+
}, us = (a) => {
|
|
2870
|
+
if (!C) return r.unlinkSync(a);
|
|
2871
|
+
const s = a + ".DELETE." + X$1.randomBytes(16).toString("hex");
|
|
2872
|
+
r.renameSync(a, s), r.unlinkSync(s);
|
|
2873
|
+
}, Q = (a, s, i) => a === a >>> 0 ? a : s === s >>> 0 ? s : i, Z = (a) => rs(l(hs(a))).toLowerCase(), ns = (a, s) => {
|
|
2874
|
+
s = Z(s);
|
|
2875
|
+
for (const i of a.keys()) {
|
|
2876
|
+
const e = Z(i);
|
|
2877
|
+
(e === s || e.indexOf(s + "/") === 0) && a.delete(i);
|
|
2878
|
+
}
|
|
2879
|
+
}, ms = (a) => {
|
|
2880
|
+
for (const s of a.keys()) a.delete(s);
|
|
2881
2881
|
};
|
|
2882
2882
|
class L extends is {
|
|
2883
|
-
constructor(s
|
|
2884
|
-
if (s
|
|
2883
|
+
constructor(s) {
|
|
2884
|
+
if (s || (s = {}), s.ondone = (i) => {
|
|
2885
2885
|
this[P$2] = true, this[A$1]();
|
|
2886
|
-
}, super(s
|
|
2887
|
-
if (typeof s
|
|
2888
|
-
if (s
|
|
2889
|
-
this.uid = s
|
|
2886
|
+
}, super(s), this[g$1] = false, this.reservations = ts(), this.transform = typeof s.transform == "function" ? s.transform : null, this.writable = true, this.readable = false, this[$] = 0, this[P$2] = false, this.dirCache = s.dirCache || /* @__PURE__ */ new Map(), typeof s.uid == "number" || typeof s.gid == "number") {
|
|
2887
|
+
if (typeof s.uid != "number" || typeof s.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
|
|
2888
|
+
if (s.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
2889
|
+
this.uid = s.uid, this.gid = s.gid, this.setOwner = true;
|
|
2890
2890
|
} else this.uid = null, this.gid = null, this.setOwner = false;
|
|
2891
|
-
s
|
|
2891
|
+
s.preserveOwner === void 0 && typeof s.uid != "number" ? this.preserveOwner = process.getuid && process.getuid() === 0 : this.preserveOwner = !!s.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : null, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : null, this.maxDepth = typeof s.maxDepth == "number" ? s.maxDepth : cs, this.forceChown = s.forceChown === true, this.win32 = !!s.win32 || C, this.newer = !!s.newer, this.keep = !!s.keep, this.noMtime = !!s.noMtime, this.preservePaths = !!s.preservePaths, this.unlink = !!s.unlink, this.cwd = l(w.resolve(s.cwd || process.cwd())), this.strip = +s.strip || 0, this.processUmask = s.noChmod ? 0 : process.umask(), this.umask = typeof s.umask == "number" ? s.umask : this.processUmask, this.dmode = s.dmode || 511 & ~this.umask, this.fmode = s.fmode || 438 & ~this.umask, this.on("entry", (i) => this[H$1](i));
|
|
2892
2892
|
}
|
|
2893
|
-
warn(s
|
|
2894
|
-
return (s
|
|
2893
|
+
warn(s, i, e = {}) {
|
|
2894
|
+
return (s === "TAR_BAD_ARCHIVE" || s === "TAR_ABORT") && (e.recoverable = false), super.warn(s, i, e);
|
|
2895
2895
|
}
|
|
2896
2896
|
[A$1]() {
|
|
2897
2897
|
this[P$2] && this[$] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
|
|
2898
2898
|
}
|
|
2899
|
-
[j
|
|
2900
|
-
const i
|
|
2899
|
+
[j](s) {
|
|
2900
|
+
const i = l(s.path), e = i.split("/");
|
|
2901
2901
|
if (this.strip) {
|
|
2902
|
-
if (e
|
|
2903
|
-
if (s
|
|
2904
|
-
const t
|
|
2905
|
-
if (t
|
|
2902
|
+
if (e.length < this.strip) return false;
|
|
2903
|
+
if (s.type === "Link") {
|
|
2904
|
+
const t = l(s.linkpath).split("/");
|
|
2905
|
+
if (t.length >= this.strip) s.linkpath = t.slice(this.strip).join("/");
|
|
2906
2906
|
else return false;
|
|
2907
2907
|
}
|
|
2908
|
-
e
|
|
2908
|
+
e.splice(0, this.strip), s.path = e.join("/");
|
|
2909
2909
|
}
|
|
2910
|
-
if (isFinite(this.maxDepth) && e
|
|
2911
|
-
entry: s
|
|
2912
|
-
path: i
|
|
2913
|
-
depth: e
|
|
2910
|
+
if (isFinite(this.maxDepth) && e.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", {
|
|
2911
|
+
entry: s,
|
|
2912
|
+
path: i,
|
|
2913
|
+
depth: e.length,
|
|
2914
2914
|
maxDepth: this.maxDepth
|
|
2915
2915
|
}), false;
|
|
2916
2916
|
if (!this.preservePaths) {
|
|
2917
|
-
if (e
|
|
2918
|
-
entry: s
|
|
2919
|
-
path: i
|
|
2917
|
+
if (e.includes("..") || C && /^[a-z]:\.\.$/i.test(e[0])) return this.warn("TAR_ENTRY_ERROR", "path contains '..'", {
|
|
2918
|
+
entry: s,
|
|
2919
|
+
path: i
|
|
2920
2920
|
}), false;
|
|
2921
|
-
const [t
|
|
2922
|
-
t
|
|
2923
|
-
entry: s
|
|
2924
|
-
path: i
|
|
2921
|
+
const [t, o] = os$1(i);
|
|
2922
|
+
t && (s.path = o, this.warn("TAR_ENTRY_INFO", `stripping ${t} from absolute path`, {
|
|
2923
|
+
entry: s,
|
|
2924
|
+
path: i
|
|
2925
2925
|
}));
|
|
2926
2926
|
}
|
|
2927
|
-
if (w
|
|
2928
|
-
entry: s
|
|
2929
|
-
path: l
|
|
2930
|
-
resolvedPath: s
|
|
2927
|
+
if (w.isAbsolute(s.path) ? s.absolute = l(w.resolve(s.path)) : s.absolute = l(w.resolve(this.cwd, s.path)), !this.preservePaths && s.absolute.indexOf(this.cwd + "/") !== 0 && s.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
|
|
2928
|
+
entry: s,
|
|
2929
|
+
path: l(s.path),
|
|
2930
|
+
resolvedPath: s.absolute,
|
|
2931
2931
|
cwd: this.cwd
|
|
2932
2932
|
}), false;
|
|
2933
|
-
if (s
|
|
2933
|
+
if (s.absolute === this.cwd && s.type !== "Directory" && s.type !== "GNUDumpDir") return false;
|
|
2934
2934
|
if (this.win32) {
|
|
2935
|
-
const { root: t
|
|
2936
|
-
s
|
|
2937
|
-
const { root: o
|
|
2938
|
-
s
|
|
2935
|
+
const { root: t } = w.win32.parse(s.absolute);
|
|
2936
|
+
s.absolute = t + K$1.encode(s.absolute.slice(t.length));
|
|
2937
|
+
const { root: o } = w.win32.parse(s.path);
|
|
2938
|
+
s.path = o + K$1.encode(s.path.slice(o.length));
|
|
2939
2939
|
}
|
|
2940
2940
|
return true;
|
|
2941
2941
|
}
|
|
2942
|
-
[H$1
|
|
2943
|
-
if (!this[j
|
|
2944
|
-
switch (ss.equal(typeof s
|
|
2942
|
+
[H$1](s) {
|
|
2943
|
+
if (!this[j](s)) return s.resume();
|
|
2944
|
+
switch (ss.equal(typeof s.absolute, "string"), s.type) {
|
|
2945
2945
|
case "Directory":
|
|
2946
|
-
case "GNUDumpDir": s
|
|
2946
|
+
case "GNUDumpDir": s.mode && (s.mode = s.mode | 448);
|
|
2947
2947
|
case "File":
|
|
2948
2948
|
case "OldFile":
|
|
2949
2949
|
case "ContiguousFile":
|
|
2950
2950
|
case "Link":
|
|
2951
|
-
case "SymbolicLink": return this[q
|
|
2951
|
+
case "SymbolicLink": return this[q](s);
|
|
2952
2952
|
case "CharacterDevice":
|
|
2953
2953
|
case "BlockDevice":
|
|
2954
2954
|
case "FIFO":
|
|
2955
|
-
default: return this[W$1](s
|
|
2955
|
+
default: return this[W$1](s);
|
|
2956
2956
|
}
|
|
2957
2957
|
}
|
|
2958
|
-
[m
|
|
2959
|
-
s
|
|
2958
|
+
[m](s, i) {
|
|
2959
|
+
s.name === "CwdError" ? this.emit("error", s) : (this.warn("TAR_ENTRY_ERROR", s, { entry: i }), this[S](), i.resume());
|
|
2960
2960
|
}
|
|
2961
|
-
[b$1](s
|
|
2962
|
-
M$1(l
|
|
2961
|
+
[b$1](s, i, e) {
|
|
2962
|
+
M$1(l(s), {
|
|
2963
2963
|
uid: this.uid,
|
|
2964
2964
|
gid: this.gid,
|
|
2965
2965
|
processUid: this.processUid,
|
|
@@ -2969,275 +2969,275 @@ function Os() {
|
|
|
2969
2969
|
unlink: this.unlink,
|
|
2970
2970
|
cache: this.dirCache,
|
|
2971
2971
|
cwd: this.cwd,
|
|
2972
|
-
mode: i
|
|
2972
|
+
mode: i,
|
|
2973
2973
|
noChmod: this.noChmod
|
|
2974
|
-
}, e
|
|
2974
|
+
}, e);
|
|
2975
2975
|
}
|
|
2976
|
-
[E
|
|
2977
|
-
return this.forceChown || this.preserveOwner && (typeof s
|
|
2976
|
+
[E](s) {
|
|
2977
|
+
return this.forceChown || this.preserveOwner && (typeof s.uid == "number" && s.uid !== this.processUid || typeof s.gid == "number" && s.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
|
|
2978
2978
|
}
|
|
2979
|
-
[R
|
|
2980
|
-
return Q(this.uid, s
|
|
2979
|
+
[R](s) {
|
|
2980
|
+
return Q(this.uid, s.uid, this.processUid);
|
|
2981
2981
|
}
|
|
2982
|
-
[_
|
|
2983
|
-
return Q(this.gid, s
|
|
2982
|
+
[_](s) {
|
|
2983
|
+
return Q(this.gid, s.gid, this.processGid);
|
|
2984
2984
|
}
|
|
2985
|
-
[U$1](s
|
|
2986
|
-
const e
|
|
2987
|
-
flags: J
|
|
2988
|
-
mode: e
|
|
2985
|
+
[U$1](s, i) {
|
|
2986
|
+
const e = s.mode & 4095 || this.fmode, t = new es.WriteStream(s.absolute, {
|
|
2987
|
+
flags: J(s.size),
|
|
2988
|
+
mode: e,
|
|
2989
2989
|
autoClose: false
|
|
2990
2990
|
});
|
|
2991
|
-
t
|
|
2992
|
-
t
|
|
2991
|
+
t.on("error", (c$1) => {
|
|
2992
|
+
t.fd && r.close(t.fd, () => {}), t.write = () => true, this[m](c$1, s), i();
|
|
2993
2993
|
});
|
|
2994
|
-
let o
|
|
2995
|
-
const u
|
|
2996
|
-
if (c$
|
|
2997
|
-
t
|
|
2994
|
+
let o = 1;
|
|
2995
|
+
const u = (c$1) => {
|
|
2996
|
+
if (c$1) {
|
|
2997
|
+
t.fd && r.close(t.fd, () => {}), this[m](c$1, s), i();
|
|
2998
2998
|
return;
|
|
2999
2999
|
}
|
|
3000
|
-
--o
|
|
3001
|
-
n
|
|
3000
|
+
--o === 0 && r.close(t.fd, (n) => {
|
|
3001
|
+
n ? this[m](n, s) : this[S](), i();
|
|
3002
3002
|
});
|
|
3003
3003
|
};
|
|
3004
|
-
t
|
|
3005
|
-
const n
|
|
3006
|
-
if (s
|
|
3007
|
-
o
|
|
3008
|
-
const f
|
|
3009
|
-
r.futimes(p
|
|
3004
|
+
t.on("finish", (c$1) => {
|
|
3005
|
+
const n = s.absolute, p = t.fd;
|
|
3006
|
+
if (s.mtime && !this.noMtime) {
|
|
3007
|
+
o++;
|
|
3008
|
+
const f = s.atime || /* @__PURE__ */ new Date(), k = s.mtime;
|
|
3009
|
+
r.futimes(p, f, k, (D$1) => D$1 ? r.utimes(n, f, k, (I$1) => u(I$1 && D$1)) : u());
|
|
3010
3010
|
}
|
|
3011
|
-
if (this[E
|
|
3012
|
-
o
|
|
3013
|
-
const f
|
|
3014
|
-
r.fchown(p
|
|
3011
|
+
if (this[E](s)) {
|
|
3012
|
+
o++;
|
|
3013
|
+
const f = this[R](s), k = this[_](s);
|
|
3014
|
+
r.fchown(p, f, k, (D$1) => D$1 ? r.chown(n, f, k, (I$1) => u(I$1 && D$1)) : u());
|
|
3015
3015
|
}
|
|
3016
|
-
u
|
|
3016
|
+
u();
|
|
3017
3017
|
});
|
|
3018
|
-
const h$2 = this.transform && this.transform(s
|
|
3019
|
-
h$2 !== s
|
|
3020
|
-
this[m
|
|
3021
|
-
}), s
|
|
3022
|
-
}
|
|
3023
|
-
[F$1
|
|
3024
|
-
const e
|
|
3025
|
-
this[b$1](s
|
|
3026
|
-
if (t
|
|
3027
|
-
this[m
|
|
3018
|
+
const h$2 = this.transform && this.transform(s) || s;
|
|
3019
|
+
h$2 !== s && (h$2.on("error", (c$1) => {
|
|
3020
|
+
this[m](c$1, s), i();
|
|
3021
|
+
}), s.pipe(h$2)), h$2.pipe(t);
|
|
3022
|
+
}
|
|
3023
|
+
[F$1](s, i) {
|
|
3024
|
+
const e = s.mode & 4095 || this.dmode;
|
|
3025
|
+
this[b$1](s.absolute, e, (t) => {
|
|
3026
|
+
if (t) {
|
|
3027
|
+
this[m](t, s), i();
|
|
3028
3028
|
return;
|
|
3029
3029
|
}
|
|
3030
|
-
let o
|
|
3031
|
-
const u
|
|
3032
|
-
--o
|
|
3030
|
+
let o = 1;
|
|
3031
|
+
const u = (h$2) => {
|
|
3032
|
+
--o === 0 && (i(), this[S](), s.resume());
|
|
3033
3033
|
};
|
|
3034
|
-
s
|
|
3034
|
+
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();
|
|
3035
3035
|
});
|
|
3036
3036
|
}
|
|
3037
|
-
[W$1](s
|
|
3038
|
-
s
|
|
3037
|
+
[W$1](s) {
|
|
3038
|
+
s.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${s.type}`, { entry: s }), s.resume();
|
|
3039
3039
|
}
|
|
3040
|
-
[B$1](s
|
|
3041
|
-
this[O
|
|
3040
|
+
[B$1](s, i) {
|
|
3041
|
+
this[O](s, s.linkpath, "symlink", i);
|
|
3042
3042
|
}
|
|
3043
|
-
[z$1$1](s
|
|
3044
|
-
const e
|
|
3045
|
-
this[O
|
|
3043
|
+
[z$1$1](s, i) {
|
|
3044
|
+
const e = l(w.resolve(this.cwd, s.linkpath));
|
|
3045
|
+
this[O](s, e, "link", i);
|
|
3046
3046
|
}
|
|
3047
3047
|
[V$1]() {
|
|
3048
3048
|
this[$]++;
|
|
3049
3049
|
}
|
|
3050
|
-
[S
|
|
3050
|
+
[S]() {
|
|
3051
3051
|
this[$]--, this[A$1]();
|
|
3052
3052
|
}
|
|
3053
|
-
[x$1](s
|
|
3054
|
-
this[S
|
|
3053
|
+
[x$1](s) {
|
|
3054
|
+
this[S](), s.resume();
|
|
3055
3055
|
}
|
|
3056
|
-
[N$1](s
|
|
3057
|
-
return s
|
|
3056
|
+
[N$1](s, i) {
|
|
3057
|
+
return s.type === "File" && !this.unlink && i.isFile() && i.nlink <= 1 && !C;
|
|
3058
3058
|
}
|
|
3059
|
-
[q
|
|
3059
|
+
[q](s) {
|
|
3060
3060
|
this[V$1]();
|
|
3061
|
-
const i
|
|
3062
|
-
s
|
|
3061
|
+
const i = [s.path];
|
|
3062
|
+
s.linkpath && i.push(s.linkpath), this.reservations.reserve(i, (e) => this[Y](s, e));
|
|
3063
3063
|
}
|
|
3064
|
-
[v
|
|
3065
|
-
s
|
|
3064
|
+
[v](s) {
|
|
3065
|
+
s.type === "SymbolicLink" ? ms(this.dirCache) : s.type !== "Directory" && ns(this.dirCache, s.absolute);
|
|
3066
3066
|
}
|
|
3067
|
-
[Y](s
|
|
3068
|
-
this[v
|
|
3069
|
-
const e
|
|
3070
|
-
this[v
|
|
3071
|
-
}, t
|
|
3067
|
+
[Y](s, i) {
|
|
3068
|
+
this[v](s);
|
|
3069
|
+
const e = (h$2) => {
|
|
3070
|
+
this[v](s), i(h$2);
|
|
3071
|
+
}, t = () => {
|
|
3072
3072
|
this[b$1](this.cwd, this.dmode, (h$2) => {
|
|
3073
3073
|
if (h$2) {
|
|
3074
|
-
this[m
|
|
3074
|
+
this[m](h$2, s), e();
|
|
3075
3075
|
return;
|
|
3076
3076
|
}
|
|
3077
|
-
this[g$1] = true, o
|
|
3077
|
+
this[g$1] = true, o();
|
|
3078
3078
|
});
|
|
3079
|
-
}, o
|
|
3080
|
-
if (s
|
|
3081
|
-
const h$2 = l
|
|
3082
|
-
if (h$2 !== this.cwd) return this[b$1](h$2, this.dmode, (c$
|
|
3083
|
-
if (c$
|
|
3084
|
-
this[m
|
|
3079
|
+
}, o = () => {
|
|
3080
|
+
if (s.absolute !== this.cwd) {
|
|
3081
|
+
const h$2 = l(w.dirname(s.absolute));
|
|
3082
|
+
if (h$2 !== this.cwd) return this[b$1](h$2, this.dmode, (c$1) => {
|
|
3083
|
+
if (c$1) {
|
|
3084
|
+
this[m](c$1, s), e();
|
|
3085
3085
|
return;
|
|
3086
3086
|
}
|
|
3087
|
-
u
|
|
3087
|
+
u();
|
|
3088
3088
|
});
|
|
3089
3089
|
}
|
|
3090
|
-
u
|
|
3091
|
-
}, u
|
|
3092
|
-
r.lstat(s
|
|
3093
|
-
if (c$
|
|
3094
|
-
this[x$1](s
|
|
3090
|
+
u();
|
|
3091
|
+
}, u = () => {
|
|
3092
|
+
r.lstat(s.absolute, (h$2, c$1) => {
|
|
3093
|
+
if (c$1 && (this.keep || this.newer && c$1.mtime > s.mtime)) {
|
|
3094
|
+
this[x$1](s), e();
|
|
3095
3095
|
return;
|
|
3096
3096
|
}
|
|
3097
|
-
if (h$2 || this[N$1](s
|
|
3098
|
-
if (c$
|
|
3099
|
-
if (s
|
|
3100
|
-
const n
|
|
3101
|
-
return n
|
|
3097
|
+
if (h$2 || this[N$1](s, c$1)) return this[d$1](null, s, e);
|
|
3098
|
+
if (c$1.isDirectory()) {
|
|
3099
|
+
if (s.type === "Directory") {
|
|
3100
|
+
const n = !this.noChmod && s.mode && (c$1.mode & 4095) !== s.mode, p = (f) => this[d$1](f, s, e);
|
|
3101
|
+
return n ? r.chmod(s.absolute, s.mode, p) : p();
|
|
3102
3102
|
}
|
|
3103
|
-
if (s
|
|
3103
|
+
if (s.absolute !== this.cwd) return r.rmdir(s.absolute, (n) => this[d$1](n, s, e));
|
|
3104
3104
|
}
|
|
3105
|
-
if (s
|
|
3106
|
-
as(s
|
|
3105
|
+
if (s.absolute === this.cwd) return this[d$1](null, s, e);
|
|
3106
|
+
as(s.absolute, (n) => this[d$1](n, s, e));
|
|
3107
3107
|
});
|
|
3108
3108
|
};
|
|
3109
|
-
this[g$1] ? o
|
|
3109
|
+
this[g$1] ? o() : t();
|
|
3110
3110
|
}
|
|
3111
|
-
[d$1](s
|
|
3112
|
-
if (s
|
|
3113
|
-
this[m
|
|
3111
|
+
[d$1](s, i, e) {
|
|
3112
|
+
if (s) {
|
|
3113
|
+
this[m](s, i), e();
|
|
3114
3114
|
return;
|
|
3115
3115
|
}
|
|
3116
|
-
switch (i
|
|
3116
|
+
switch (i.type) {
|
|
3117
3117
|
case "File":
|
|
3118
3118
|
case "OldFile":
|
|
3119
|
-
case "ContiguousFile": return this[U$1](i
|
|
3120
|
-
case "Link": return this[z$1$1](i
|
|
3121
|
-
case "SymbolicLink": return this[B$1](i
|
|
3119
|
+
case "ContiguousFile": return this[U$1](i, e);
|
|
3120
|
+
case "Link": return this[z$1$1](i, e);
|
|
3121
|
+
case "SymbolicLink": return this[B$1](i, e);
|
|
3122
3122
|
case "Directory":
|
|
3123
|
-
case "GNUDumpDir": return this[F$1
|
|
3123
|
+
case "GNUDumpDir": return this[F$1](i, e);
|
|
3124
3124
|
}
|
|
3125
3125
|
}
|
|
3126
|
-
[O
|
|
3127
|
-
r[e
|
|
3128
|
-
o
|
|
3126
|
+
[O](s, i, e, t) {
|
|
3127
|
+
r[e](i, s.absolute, (o) => {
|
|
3128
|
+
o ? this[m](o, s) : (this[S](), s.resume()), t();
|
|
3129
3129
|
});
|
|
3130
3130
|
}
|
|
3131
3131
|
}
|
|
3132
|
-
const T
|
|
3132
|
+
const T = (a) => {
|
|
3133
3133
|
try {
|
|
3134
|
-
return [null, a
|
|
3135
|
-
} catch (s
|
|
3136
|
-
return [s
|
|
3134
|
+
return [null, a()];
|
|
3135
|
+
} catch (s) {
|
|
3136
|
+
return [s, null];
|
|
3137
3137
|
}
|
|
3138
3138
|
};
|
|
3139
3139
|
class ls extends L {
|
|
3140
|
-
[d$1](s
|
|
3141
|
-
return super[d$1](s
|
|
3140
|
+
[d$1](s, i) {
|
|
3141
|
+
return super[d$1](s, i, () => {});
|
|
3142
3142
|
}
|
|
3143
|
-
[q
|
|
3144
|
-
if (this[v
|
|
3145
|
-
const o
|
|
3146
|
-
if (o
|
|
3143
|
+
[q](s) {
|
|
3144
|
+
if (this[v](s), !this[g$1]) {
|
|
3145
|
+
const o = this[b$1](this.cwd, this.dmode);
|
|
3146
|
+
if (o) return this[m](o, s);
|
|
3147
3147
|
this[g$1] = true;
|
|
3148
3148
|
}
|
|
3149
|
-
if (s
|
|
3150
|
-
const o
|
|
3151
|
-
if (o
|
|
3152
|
-
const u
|
|
3153
|
-
if (u
|
|
3149
|
+
if (s.absolute !== this.cwd) {
|
|
3150
|
+
const o = l(w.dirname(s.absolute));
|
|
3151
|
+
if (o !== this.cwd) {
|
|
3152
|
+
const u = this[b$1](o, this.dmode);
|
|
3153
|
+
if (u) return this[m](u, s);
|
|
3154
3154
|
}
|
|
3155
3155
|
}
|
|
3156
|
-
const [i
|
|
3157
|
-
if (e
|
|
3158
|
-
if (i
|
|
3159
|
-
if (e
|
|
3160
|
-
if (s
|
|
3161
|
-
const [h$2] = !this.noChmod && s
|
|
3162
|
-
r.chmodSync(s
|
|
3156
|
+
const [i, e] = T(() => r.lstatSync(s.absolute));
|
|
3157
|
+
if (e && (this.keep || this.newer && e.mtime > s.mtime)) return this[x$1](s);
|
|
3158
|
+
if (i || this[N$1](s, e)) return this[d$1](null, s);
|
|
3159
|
+
if (e.isDirectory()) {
|
|
3160
|
+
if (s.type === "Directory") {
|
|
3161
|
+
const [h$2] = !this.noChmod && s.mode && (e.mode & 4095) !== s.mode ? T(() => {
|
|
3162
|
+
r.chmodSync(s.absolute, s.mode);
|
|
3163
3163
|
}) : [];
|
|
3164
|
-
return this[d$1](h$2, s
|
|
3164
|
+
return this[d$1](h$2, s);
|
|
3165
3165
|
}
|
|
3166
|
-
const [o
|
|
3167
|
-
this[d$1](o
|
|
3166
|
+
const [o] = T(() => r.rmdirSync(s.absolute));
|
|
3167
|
+
this[d$1](o, s);
|
|
3168
3168
|
}
|
|
3169
|
-
const [t
|
|
3170
|
-
this[d$1](t
|
|
3169
|
+
const [t] = s.absolute === this.cwd ? [] : T(() => us(s.absolute));
|
|
3170
|
+
this[d$1](t, s);
|
|
3171
3171
|
}
|
|
3172
|
-
[U$1](s
|
|
3173
|
-
const e
|
|
3174
|
-
let c$
|
|
3172
|
+
[U$1](s, i) {
|
|
3173
|
+
const e = s.mode & 4095 || this.fmode, t = (h$2) => {
|
|
3174
|
+
let c$1;
|
|
3175
3175
|
try {
|
|
3176
|
-
r.closeSync(o
|
|
3177
|
-
} catch (n
|
|
3178
|
-
c$
|
|
3176
|
+
r.closeSync(o);
|
|
3177
|
+
} catch (n) {
|
|
3178
|
+
c$1 = n;
|
|
3179
3179
|
}
|
|
3180
|
-
(h$2 || c$
|
|
3180
|
+
(h$2 || c$1) && this[m](h$2 || c$1, s), i();
|
|
3181
3181
|
};
|
|
3182
|
-
let o
|
|
3182
|
+
let o;
|
|
3183
3183
|
try {
|
|
3184
|
-
o
|
|
3184
|
+
o = r.openSync(s.absolute, J(s.size), e);
|
|
3185
3185
|
} catch (h$2) {
|
|
3186
|
-
return t
|
|
3186
|
+
return t(h$2);
|
|
3187
3187
|
}
|
|
3188
|
-
const u
|
|
3189
|
-
u
|
|
3188
|
+
const u = this.transform && this.transform(s) || s;
|
|
3189
|
+
u !== s && (u.on("error", (h$2) => this[m](h$2, s)), s.pipe(u)), u.on("data", (h$2) => {
|
|
3190
3190
|
try {
|
|
3191
|
-
r.writeSync(o
|
|
3192
|
-
} catch (c$
|
|
3193
|
-
t
|
|
3191
|
+
r.writeSync(o, h$2, 0, h$2.length);
|
|
3192
|
+
} catch (c$1) {
|
|
3193
|
+
t(c$1);
|
|
3194
3194
|
}
|
|
3195
|
-
}), u
|
|
3196
|
-
let c$
|
|
3197
|
-
if (s
|
|
3198
|
-
const n
|
|
3195
|
+
}), u.on("end", (h$2) => {
|
|
3196
|
+
let c$1 = null;
|
|
3197
|
+
if (s.mtime && !this.noMtime) {
|
|
3198
|
+
const n = s.atime || /* @__PURE__ */ new Date(), p = s.mtime;
|
|
3199
3199
|
try {
|
|
3200
|
-
r.futimesSync(o
|
|
3201
|
-
} catch (f
|
|
3200
|
+
r.futimesSync(o, n, p);
|
|
3201
|
+
} catch (f) {
|
|
3202
3202
|
try {
|
|
3203
|
-
r.utimesSync(s
|
|
3203
|
+
r.utimesSync(s.absolute, n, p);
|
|
3204
3204
|
} catch {
|
|
3205
|
-
c$
|
|
3205
|
+
c$1 = f;
|
|
3206
3206
|
}
|
|
3207
3207
|
}
|
|
3208
3208
|
}
|
|
3209
|
-
if (this[E
|
|
3210
|
-
const n
|
|
3209
|
+
if (this[E](s)) {
|
|
3210
|
+
const n = this[R](s), p = this[_](s);
|
|
3211
3211
|
try {
|
|
3212
|
-
r.fchownSync(o
|
|
3213
|
-
} catch (f
|
|
3212
|
+
r.fchownSync(o, n, p);
|
|
3213
|
+
} catch (f) {
|
|
3214
3214
|
try {
|
|
3215
|
-
r.chownSync(s
|
|
3215
|
+
r.chownSync(s.absolute, n, p);
|
|
3216
3216
|
} catch {
|
|
3217
|
-
c$
|
|
3217
|
+
c$1 = c$1 || f;
|
|
3218
3218
|
}
|
|
3219
3219
|
}
|
|
3220
3220
|
}
|
|
3221
|
-
t
|
|
3221
|
+
t(c$1);
|
|
3222
3222
|
});
|
|
3223
3223
|
}
|
|
3224
|
-
[F$1
|
|
3225
|
-
const e
|
|
3226
|
-
if (t
|
|
3227
|
-
this[m
|
|
3224
|
+
[F$1](s, i) {
|
|
3225
|
+
const e = s.mode & 4095 || this.dmode, t = this[b$1](s.absolute, e);
|
|
3226
|
+
if (t) {
|
|
3227
|
+
this[m](t, s), i();
|
|
3228
3228
|
return;
|
|
3229
3229
|
}
|
|
3230
|
-
if (s
|
|
3231
|
-
r.utimesSync(s
|
|
3230
|
+
if (s.mtime && !this.noMtime) try {
|
|
3231
|
+
r.utimesSync(s.absolute, s.atime || /* @__PURE__ */ new Date(), s.mtime);
|
|
3232
3232
|
} catch {}
|
|
3233
|
-
if (this[E
|
|
3234
|
-
r.chownSync(s
|
|
3233
|
+
if (this[E](s)) try {
|
|
3234
|
+
r.chownSync(s.absolute, this[R](s), this[_](s));
|
|
3235
3235
|
} catch {}
|
|
3236
|
-
i
|
|
3236
|
+
i(), s.resume();
|
|
3237
3237
|
}
|
|
3238
|
-
[b$1](s
|
|
3238
|
+
[b$1](s, i) {
|
|
3239
3239
|
try {
|
|
3240
|
-
return M$1.sync(l
|
|
3240
|
+
return M$1.sync(l(s), {
|
|
3241
3241
|
uid: this.uid,
|
|
3242
3242
|
gid: this.gid,
|
|
3243
3243
|
processUid: this.processUid,
|
|
@@ -3247,17 +3247,17 @@ function Os() {
|
|
|
3247
3247
|
unlink: this.unlink,
|
|
3248
3248
|
cache: this.dirCache,
|
|
3249
3249
|
cwd: this.cwd,
|
|
3250
|
-
mode: i
|
|
3250
|
+
mode: i
|
|
3251
3251
|
});
|
|
3252
|
-
} catch (e
|
|
3253
|
-
return e
|
|
3252
|
+
} catch (e) {
|
|
3253
|
+
return e;
|
|
3254
3254
|
}
|
|
3255
3255
|
}
|
|
3256
|
-
[O
|
|
3256
|
+
[O](s, i, e, t) {
|
|
3257
3257
|
try {
|
|
3258
|
-
r[e
|
|
3259
|
-
} catch (o
|
|
3260
|
-
return this[m
|
|
3258
|
+
r[e + "Sync"](i, s.absolute), t(), s.resume();
|
|
3259
|
+
} catch (o) {
|
|
3260
|
+
return this[m](o, s);
|
|
3261
3261
|
}
|
|
3262
3262
|
}
|
|
3263
3263
|
}
|
|
@@ -3267,41 +3267,41 @@ var f, q;
|
|
|
3267
3267
|
function v() {
|
|
3268
3268
|
if (q) return f;
|
|
3269
3269
|
q = 1;
|
|
3270
|
-
const w
|
|
3271
|
-
f = (r, e
|
|
3272
|
-
typeof r == "function" ? (o
|
|
3273
|
-
const t
|
|
3274
|
-
if (t
|
|
3275
|
-
if (!t
|
|
3276
|
-
return e
|
|
3270
|
+
const w = s$6(), u = Os(), p = nativeFs, y = X(), l = path, m = s();
|
|
3271
|
+
f = (r, e, o) => {
|
|
3272
|
+
typeof r == "function" ? (o = r, e = null, r = {}) : Array.isArray(r) && (e = r, r = {}), typeof e == "function" && (o = e, e = null), e ? e = Array.from(e) : e = [];
|
|
3273
|
+
const t = w(r);
|
|
3274
|
+
if (t.sync && typeof o == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
3275
|
+
if (!t.file && typeof o == "function") throw new TypeError("callback only supported with file option");
|
|
3276
|
+
return e.length && d$1(t, e), t.file && t.sync ? $(t) : t.file ? h$2(t, o) : t.sync ? x$1(t) : z(t);
|
|
3277
3277
|
};
|
|
3278
|
-
const d$1 = (r, e
|
|
3279
|
-
const o
|
|
3280
|
-
const a
|
|
3281
|
-
return o
|
|
3278
|
+
const d$1 = (r, e) => {
|
|
3279
|
+
const o = new Map(e.map((n) => [m(n), true])), t = r.filter, s = (n, i) => {
|
|
3280
|
+
const a = i || l.parse(n).root || ".", c$1 = n === a ? false : o.has(n) ? o.get(n) : s(l.dirname(n), a);
|
|
3281
|
+
return o.set(n, c$1), c$1;
|
|
3282
3282
|
};
|
|
3283
|
-
r.filter = t
|
|
3283
|
+
r.filter = t ? (n, i) => t(n, i) && s(m(n)) : (n) => s(m(n));
|
|
3284
3284
|
}, $ = (r) => {
|
|
3285
|
-
const e
|
|
3286
|
-
new y
|
|
3287
|
-
readSize: s
|
|
3288
|
-
size: t
|
|
3289
|
-
}).pipe(e
|
|
3290
|
-
}, h$2 = (r, e
|
|
3291
|
-
const o
|
|
3292
|
-
o
|
|
3293
|
-
if (c$
|
|
3285
|
+
const e = new u.Sync(r), o = r.file, t = p.statSync(o), s = r.maxReadSize || 16 * 1024 * 1024;
|
|
3286
|
+
new y.ReadStreamSync(o, {
|
|
3287
|
+
readSize: s,
|
|
3288
|
+
size: t.size
|
|
3289
|
+
}).pipe(e);
|
|
3290
|
+
}, h$2 = (r, e) => {
|
|
3291
|
+
const o = new u(r), t = r.maxReadSize || 16 * 1024 * 1024, s = r.file, n = new Promise((i, a) => {
|
|
3292
|
+
o.on("error", a), o.on("close", i), p.stat(s, (c$1, R) => {
|
|
3293
|
+
if (c$1) a(c$1);
|
|
3294
3294
|
else {
|
|
3295
|
-
const S
|
|
3296
|
-
readSize: t
|
|
3297
|
-
size: R
|
|
3295
|
+
const S = new y.ReadStream(s, {
|
|
3296
|
+
readSize: t,
|
|
3297
|
+
size: R.size
|
|
3298
3298
|
});
|
|
3299
|
-
S
|
|
3299
|
+
S.on("error", a), S.pipe(o);
|
|
3300
3300
|
}
|
|
3301
3301
|
});
|
|
3302
3302
|
});
|
|
3303
|
-
return e
|
|
3304
|
-
}, x$1 = (r) => new u
|
|
3303
|
+
return e ? n.then(e, e) : n;
|
|
3304
|
+
}, x$1 = (r) => new u.Sync(r), z = (r) => new u(r);
|
|
3305
3305
|
return f;
|
|
3306
3306
|
}
|
|
3307
3307
|
const tarExtract = getDefaultExportFromCjs(v());
|
|
@@ -3322,11 +3322,11 @@ async function download(url, filePath, options = {}) {
|
|
|
3322
3322
|
}
|
|
3323
3323
|
const inputRegex = /^(?<repo>[\w.-]+\/[\w.-]+)(?<subdir>[^#]+)?(?<ref>#[\w./@-]+)?/;
|
|
3324
3324
|
function parseGitURI(input) {
|
|
3325
|
-
const m
|
|
3325
|
+
const m = input.match(inputRegex)?.groups || {};
|
|
3326
3326
|
return {
|
|
3327
|
-
repo: m
|
|
3328
|
-
subdir: m
|
|
3329
|
-
ref: m
|
|
3327
|
+
repo: m.repo,
|
|
3328
|
+
subdir: m.subdir || "/",
|
|
3329
|
+
ref: m.ref ? m.ref.slice(1) : "main"
|
|
3330
3330
|
};
|
|
3331
3331
|
}
|
|
3332
3332
|
function debug(...args) {
|
|
@@ -3516,7 +3516,7 @@ async function downloadTemplate(input, options = {}) {
|
|
|
3516
3516
|
});
|
|
3517
3517
|
if (!options.force && existsSync(extractPath) && readdirSync(extractPath).length > 0) throw new Error(`Destination ${extractPath} already exists.`);
|
|
3518
3518
|
await mkdir(extractPath, { recursive: true });
|
|
3519
|
-
const s
|
|
3519
|
+
const s = Date.now();
|
|
3520
3520
|
const subdir = template.subdir?.replace(/^\//, "") || "";
|
|
3521
3521
|
await tarExtract({
|
|
3522
3522
|
file: tarPath,
|
|
@@ -3527,7 +3527,7 @@ async function downloadTemplate(input, options = {}) {
|
|
|
3527
3527
|
else entry.path = "";
|
|
3528
3528
|
}
|
|
3529
3529
|
});
|
|
3530
|
-
debug(`Extracted to ${extractPath} in ${Date.now() - s
|
|
3530
|
+
debug(`Extracted to ${extractPath} in ${Date.now() - s}ms`);
|
|
3531
3531
|
if (options.install) {
|
|
3532
3532
|
debug("Installing dependencies...");
|
|
3533
3533
|
await installDependencies({
|
|
@@ -3547,4 +3547,4 @@ async function downloadTemplate(input, options = {}) {
|
|
|
3547
3547
|
var dist_exports = /* @__PURE__ */ __exportAll({ downloadTemplate: () => downloadTemplate });
|
|
3548
3548
|
|
|
3549
3549
|
//#endregion
|
|
3550
|
-
export {
|
|
3550
|
+
export { dist_exports$1 as n, dist_exports as t };
|