@vltpkg/cli-js 1.0.0-rc.27 → 1.0.0-rc.29
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/access-6HRR4HXE.js +293 -0
- package/{bugs-CS34LDPD.js → bugs-2CAZQ32S.js} +19 -22
- package/{build-XHEFAWMN.js → build-OAWTNBMS.js} +10 -13
- package/{cache-LII2V5IM.js → cache-JTAFST6T.js} +14 -15
- package/cache-unzip-src-unzip.js +606 -575
- package/{chunk-D27QPHKI.js → chunk-2V4AQPBR.js} +67 -20
- package/{chunk-JQHMLTO5.js → chunk-3MWZTKGK.js} +419 -328
- package/{chunk-DJBBJDHI.js → chunk-7RZL7BZI.js} +159 -74
- package/chunk-7WHVJ56C.js +73 -0
- package/{chunk-LAG2R3YJ.js → chunk-BW6C3YUV.js} +6 -6
- package/{chunk-6YTJVEK2.js → chunk-CLDF5XLG.js} +11 -11
- package/{chunk-DYL7AFY7.js → chunk-CPM47YUH.js} +5 -3
- package/{chunk-QWWYZ3TT.js → chunk-D2MVJDUA.js} +1 -1
- package/{chunk-5E5GX4G6.js → chunk-FBTBHRPG.js} +1 -1
- package/{chunk-AZLX27EM.js → chunk-FXDRM4ZO.js} +296 -258
- package/chunk-G2YT2GWF.js +120 -0
- package/{chunk-INXSTZAX.js → chunk-HAGUS4HI.js} +21 -21
- package/{chunk-FI5TUER7.js → chunk-HQ4US6G3.js} +681 -687
- package/chunk-IEISSXS4.js +711 -0
- package/{chunk-TRXTSZFT.js → chunk-IYO5QKUW.js} +1 -1
- package/{chunk-DJBVQKBB.js → chunk-K3RN3BGU.js} +5 -5
- package/{chunk-P2HZ4ISK.js → chunk-LPLXAVG7.js} +54 -6
- package/{chunk-XSUIV5NF.js → chunk-M7HPHM7B.js} +14 -12
- package/{chunk-BIUCOMBH.js → chunk-MAIQR5GM.js} +5 -5
- package/{chunk-TDTJOKF2.js → chunk-NLFBANVO.js} +8 -1
- package/{chunk-XWF3GJKE.js → chunk-Q3DNNTPG.js} +27 -1
- package/{chunk-VCSVHRCS.js → chunk-R44FR7BY.js} +1269 -590
- package/{chunk-QDGZZ5FZ.js → chunk-TYV4N3S3.js} +6 -692
- package/{chunk-LKFTVDWS.js → chunk-VPKJNCKL.js} +26 -13
- package/{chunk-VTZZIXYW.js → chunk-VRIS5HAW.js} +3 -3
- package/{chunk-S5I2UOBT.js → chunk-WX2DCAG2.js} +7 -7
- package/{chunk-YR47M5L7.js → chunk-XYCCQT7N.js} +34 -39
- package/{chunk-D7U7KDEM.js → chunk-YCQTLBWF.js} +1 -1
- package/{chunk-SR66HWMM.js → chunk-ZINDEKAU.js} +144 -93
- package/{ci-EEXNEPKP.js → ci-TOJJVHI4.js} +13 -16
- package/cli-package.json +2 -1
- package/{config-4ZFJD5AY.js → config-DVAPEE5D.js} +12 -14
- package/{config-6MUU2TRJ.js → config-GOV4E2KK.js} +26 -26
- package/{create-DEKJKPYX.js → create-NGJD7K4L.js} +24 -26
- package/deprecate-WROL4AHK.js +176 -0
- package/{devtools-NOLON5YL.js → devtools-TPMVKPB5.js} +80 -77
- package/dist-tag-WZXXWXMB.js +204 -0
- package/{docs-5EKPZANX.js → docs-YCOZFMZG.js} +19 -22
- package/{exec-I4YPE6YW.js → exec-URG5OWLH.js} +24 -26
- package/{exec-cache-XEWPABLK.js → exec-cache-KHDOEH2F.js} +21 -23
- package/{exec-local-OQXG2VPW.js → exec-local-52TVUL5K.js} +19 -21
- package/{help-OG655SE5.js → help-LNSDVBGJ.js} +4 -5
- package/{init-LJH2YTBM.js → init-XNMWYATA.js} +10 -8
- package/{install-KP2FGWOR.js → install-SKUZERZJ.js} +28 -17
- package/{list-ACZ3ZSIZ.js → list-XEDVFUD5.js} +19 -21
- package/{login-VFTRKZE2.js → login-52SA2DSI.js} +6 -9
- package/{logout-Z4AVG64D.js → logout-5YYHNV5W.js} +6 -9
- package/{pack-GPJNX7RP.js → pack-B7QZHMYP.js} +14 -17
- package/package.json +1 -1
- package/{ping-B2YS4SR3.js → ping-PRGDYDRI.js} +6 -9
- package/{pkg-WUYJDFSH.js → pkg-UEIQIVVD.js} +15 -19
- package/profile-46FKVQEL.js +129 -0
- package/{publish-WTMGC4ET.js → publish-HBYHOSKH.js} +17 -20
- package/{query-UCM35VVC.js → query-5A4YLS2C.js} +19 -21
- package/registry-client-package.json +1 -1
- package/registry-client-src-revalidate.js +1157 -1032
- package/{repo-MZCPTQZU.js → repo-I6X66PHD.js} +19 -22
- package/{reporter-XRZ37LFK.js → reporter-NUXJTV4G.js} +2 -3
- package/{run-CAX4Z2SC.js → run-VEZMUMVH.js} +19 -21
- package/{run-exec-SM42FE7W.js → run-exec-6ADY4BKH.js} +19 -21
- package/security-archive-src-update-expired.js +8 -7
- package/{src-SDJWTPCU.js → src-O32QL33R.js} +20 -22
- package/token-YK6L74PA.js +206 -0
- package/{uninstall-YYPPXM2O.js → uninstall-UBUZBV7E.js} +14 -17
- package/unpublish-ZHJEKT7A.js +224 -0
- package/{update-YFUTH33A.js → update-WO4BHJF4.js} +13 -16
- package/{version-SK256WED.js → version-RLESYHML.js} +13 -16
- package/{view-CBYGJ76J.js → view-UA5HXFXG.js} +16 -17
- package/vlr.js +1 -1
- package/vlrx.js +1 -1
- package/vlt.js +1 -1
- package/vlx.js +1 -1
- package/vlxl.js +1 -1
- package/{whoami-ZT4ZEN2C.js → whoami-7H3FPR2O.js} +6 -9
- package/chunk-52LBC3AX.js +0 -75
- package/chunk-BGQCUUCA.js +0 -667
- package/chunk-E74WGW5C.js +0 -49
- package/chunk-JLJKOF75.js +0 -40
- package/chunk-YP4YNE5Y.js +0 -68
- package/token-YCURCCNR.js +0 -103
|
@@ -1386,86 +1386,86 @@ var require_lib = __commonJS({
|
|
|
1386
1386
|
}
|
|
1387
1387
|
});
|
|
1388
1388
|
|
|
1389
|
-
// ../../node_modules/.vlt/~npm~tar@7.5.
|
|
1390
|
-
import
|
|
1389
|
+
// ../../node_modules/.vlt/~npm~tar@7.5.13/node_modules/tar/dist/esm/index.min.js
|
|
1390
|
+
import Kr from "node:events";
|
|
1391
1391
|
import I from "node:fs";
|
|
1392
|
-
import { EventEmitter as
|
|
1393
|
-
import
|
|
1394
|
-
import { StringDecoder as
|
|
1395
|
-
import
|
|
1392
|
+
import { EventEmitter as Ti } from "node:events";
|
|
1393
|
+
import Ns from "node:stream";
|
|
1394
|
+
import { StringDecoder as Mr } from "node:string_decoder";
|
|
1395
|
+
import nr from "node:path";
|
|
1396
1396
|
import Vt from "node:fs";
|
|
1397
|
-
import { dirname as
|
|
1398
|
-
import { EventEmitter as
|
|
1399
|
-
import
|
|
1400
|
-
import { Buffer as
|
|
1401
|
-
import * as
|
|
1402
|
-
import
|
|
1397
|
+
import { dirname as xn, parse as Ln } from "node:path";
|
|
1398
|
+
import { EventEmitter as _n } from "node:events";
|
|
1399
|
+
import Mi from "node:assert";
|
|
1400
|
+
import { Buffer as gt } from "node:buffer";
|
|
1401
|
+
import * as ks from "node:zlib";
|
|
1402
|
+
import qr from "node:zlib";
|
|
1403
1403
|
import { posix as Zt } from "node:path";
|
|
1404
|
-
import { basename as
|
|
1405
|
-
import
|
|
1404
|
+
import { basename as wn } from "node:path";
|
|
1405
|
+
import fi from "node:fs";
|
|
1406
1406
|
import $ from "node:fs";
|
|
1407
|
-
import
|
|
1408
|
-
import { win32 as
|
|
1409
|
-
import
|
|
1410
|
-
import
|
|
1411
|
-
import
|
|
1412
|
-
import { randomBytes as
|
|
1407
|
+
import $s from "node:path";
|
|
1408
|
+
import { win32 as In } from "node:path";
|
|
1409
|
+
import sr from "node:path";
|
|
1410
|
+
import Cr from "node:fs";
|
|
1411
|
+
import so from "node:assert";
|
|
1412
|
+
import { randomBytes as Ir } from "node:crypto";
|
|
1413
1413
|
import u from "node:fs";
|
|
1414
1414
|
import R from "node:path";
|
|
1415
|
-
import
|
|
1416
|
-
import
|
|
1415
|
+
import cr from "node:fs";
|
|
1416
|
+
import mi from "node:fs";
|
|
1417
1417
|
import Ee from "node:path";
|
|
1418
1418
|
import k from "node:fs";
|
|
1419
|
-
import
|
|
1420
|
-
import
|
|
1421
|
-
import { join as
|
|
1419
|
+
import jn from "node:fs/promises";
|
|
1420
|
+
import pi from "node:path";
|
|
1421
|
+
import { join as br } from "node:path";
|
|
1422
1422
|
import v from "node:fs";
|
|
1423
|
-
import
|
|
1424
|
-
var
|
|
1425
|
-
var
|
|
1426
|
-
for (var e in t)
|
|
1423
|
+
import Fr from "node:path";
|
|
1424
|
+
var kr = Object.defineProperty;
|
|
1425
|
+
var vr = (s3, t) => {
|
|
1426
|
+
for (var e in t) kr(s3, e, { get: t[e], enumerable: true });
|
|
1427
1427
|
};
|
|
1428
|
-
var
|
|
1429
|
-
var
|
|
1430
|
-
var
|
|
1431
|
-
var
|
|
1428
|
+
var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
|
|
1429
|
+
var Br = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof Ns || Pr(s3) || zr(s3));
|
|
1430
|
+
var Pr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.pipe == "function" && s3.pipe !== Ns.Writable.prototype.pipe;
|
|
1431
|
+
var zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.write == "function" && typeof s3.end == "function";
|
|
1432
1432
|
var q = /* @__PURE__ */ Symbol("EOF");
|
|
1433
1433
|
var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
|
|
1434
1434
|
var rt = /* @__PURE__ */ Symbol("emittedEnd");
|
|
1435
|
-
var
|
|
1435
|
+
var Le = /* @__PURE__ */ Symbol("emittingEnd");
|
|
1436
1436
|
var jt = /* @__PURE__ */ Symbol("emittedError");
|
|
1437
|
-
var
|
|
1438
|
-
var
|
|
1439
|
-
var
|
|
1440
|
-
var
|
|
1437
|
+
var Ne = /* @__PURE__ */ Symbol("closed");
|
|
1438
|
+
var Ts = /* @__PURE__ */ Symbol("read");
|
|
1439
|
+
var Ae = /* @__PURE__ */ Symbol("flush");
|
|
1440
|
+
var xs = /* @__PURE__ */ Symbol("flushChunk");
|
|
1441
1441
|
var z = /* @__PURE__ */ Symbol("encoding");
|
|
1442
1442
|
var Mt = /* @__PURE__ */ Symbol("decoder");
|
|
1443
1443
|
var b = /* @__PURE__ */ Symbol("flowing");
|
|
1444
1444
|
var Qt = /* @__PURE__ */ Symbol("paused");
|
|
1445
1445
|
var Bt = /* @__PURE__ */ Symbol("resume");
|
|
1446
|
-
var
|
|
1447
|
-
var
|
|
1448
|
-
var
|
|
1449
|
-
var
|
|
1446
|
+
var _ = /* @__PURE__ */ Symbol("buffer");
|
|
1447
|
+
var A = /* @__PURE__ */ Symbol("pipes");
|
|
1448
|
+
var g = /* @__PURE__ */ Symbol("bufferLength");
|
|
1449
|
+
var yi = /* @__PURE__ */ Symbol("bufferPush");
|
|
1450
1450
|
var De = /* @__PURE__ */ Symbol("bufferShift");
|
|
1451
1451
|
var L = /* @__PURE__ */ Symbol("objectMode");
|
|
1452
1452
|
var w = /* @__PURE__ */ Symbol("destroyed");
|
|
1453
|
-
var
|
|
1454
|
-
var
|
|
1455
|
-
var
|
|
1456
|
-
var
|
|
1453
|
+
var Ri = /* @__PURE__ */ Symbol("error");
|
|
1454
|
+
var bi = /* @__PURE__ */ Symbol("emitData");
|
|
1455
|
+
var Ls = /* @__PURE__ */ Symbol("emitEnd");
|
|
1456
|
+
var _i = /* @__PURE__ */ Symbol("emitEnd2");
|
|
1457
1457
|
var Z = /* @__PURE__ */ Symbol("async");
|
|
1458
1458
|
var gi = /* @__PURE__ */ Symbol("abort");
|
|
1459
|
-
var
|
|
1459
|
+
var Ie = /* @__PURE__ */ Symbol("aborted");
|
|
1460
1460
|
var Jt = /* @__PURE__ */ Symbol("signal");
|
|
1461
1461
|
var yt = /* @__PURE__ */ Symbol("dataListeners");
|
|
1462
1462
|
var C = /* @__PURE__ */ Symbol("discarded");
|
|
1463
1463
|
var te = (s3) => Promise.resolve().then(s3);
|
|
1464
|
-
var
|
|
1465
|
-
var
|
|
1466
|
-
var
|
|
1467
|
-
var
|
|
1468
|
-
var
|
|
1464
|
+
var Ur = (s3) => s3();
|
|
1465
|
+
var Hr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
|
|
1466
|
+
var Wr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
|
|
1467
|
+
var Gr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
|
|
1468
|
+
var Ce = class {
|
|
1469
1469
|
src;
|
|
1470
1470
|
dest;
|
|
1471
1471
|
opts;
|
|
@@ -1482,7 +1482,7 @@ var Ie = class {
|
|
|
1482
1482
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
1483
1483
|
}
|
|
1484
1484
|
};
|
|
1485
|
-
var
|
|
1485
|
+
var Oi = class extends Ce {
|
|
1486
1486
|
unpipe() {
|
|
1487
1487
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
1488
1488
|
}
|
|
@@ -1490,26 +1490,26 @@ var _i = class extends Ie {
|
|
|
1490
1490
|
super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
|
|
1491
1491
|
}
|
|
1492
1492
|
};
|
|
1493
|
-
var
|
|
1494
|
-
var
|
|
1495
|
-
var
|
|
1493
|
+
var Zr = (s3) => !!s3.objectMode;
|
|
1494
|
+
var Yr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
|
|
1495
|
+
var D = class extends Ti {
|
|
1496
1496
|
[b] = false;
|
|
1497
1497
|
[Qt] = false;
|
|
1498
|
-
[
|
|
1499
|
-
[
|
|
1498
|
+
[A] = [];
|
|
1499
|
+
[_] = [];
|
|
1500
1500
|
[L];
|
|
1501
1501
|
[z];
|
|
1502
1502
|
[Z];
|
|
1503
1503
|
[Mt];
|
|
1504
1504
|
[q] = false;
|
|
1505
1505
|
[rt] = false;
|
|
1506
|
-
[xe] = false;
|
|
1507
1506
|
[Le] = false;
|
|
1507
|
+
[Ne] = false;
|
|
1508
1508
|
[jt] = null;
|
|
1509
|
-
[
|
|
1509
|
+
[g] = 0;
|
|
1510
1510
|
[w] = false;
|
|
1511
1511
|
[Jt];
|
|
1512
|
-
[
|
|
1512
|
+
[Ie] = false;
|
|
1513
1513
|
[yt] = 0;
|
|
1514
1514
|
[C] = false;
|
|
1515
1515
|
writable = true;
|
|
@@ -1517,12 +1517,12 @@ var A = class extends Oi {
|
|
|
1517
1517
|
constructor(...t) {
|
|
1518
1518
|
let e = t[0] || {};
|
|
1519
1519
|
if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
|
|
1520
|
-
|
|
1520
|
+
Zr(e) ? (this[L] = true, this[z] = null) : Yr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new Mr(this[z]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
|
|
1521
1521
|
let { signal: i } = e;
|
|
1522
1522
|
i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
|
|
1523
1523
|
}
|
|
1524
1524
|
get bufferLength() {
|
|
1525
|
-
return this[
|
|
1525
|
+
return this[g];
|
|
1526
1526
|
}
|
|
1527
1527
|
get encoding() {
|
|
1528
1528
|
return this[z];
|
|
@@ -1546,46 +1546,46 @@ var A = class extends Oi {
|
|
|
1546
1546
|
this[Z] = this[Z] || !!t;
|
|
1547
1547
|
}
|
|
1548
1548
|
[gi]() {
|
|
1549
|
-
this[
|
|
1549
|
+
this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
|
|
1550
1550
|
}
|
|
1551
1551
|
get aborted() {
|
|
1552
|
-
return this[
|
|
1552
|
+
return this[Ie];
|
|
1553
1553
|
}
|
|
1554
1554
|
set aborted(t) {
|
|
1555
1555
|
}
|
|
1556
1556
|
write(t, e, i) {
|
|
1557
|
-
if (this[
|
|
1557
|
+
if (this[Ie]) return false;
|
|
1558
1558
|
if (this[q]) throw new Error("write after end");
|
|
1559
1559
|
if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
|
|
1560
1560
|
typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
|
|
1561
|
-
let r = this[Z] ? te :
|
|
1561
|
+
let r = this[Z] ? te : Ur;
|
|
1562
1562
|
if (!this[L] && !Buffer.isBuffer(t)) {
|
|
1563
|
-
if (
|
|
1564
|
-
else if (
|
|
1563
|
+
if (Gr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
|
|
1564
|
+
else if (Wr(t)) t = Buffer.from(t);
|
|
1565
1565
|
else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
|
|
1566
1566
|
}
|
|
1567
|
-
return this[L] ? (this[b] && this[
|
|
1567
|
+
return this[L] ? (this[b] && this[g] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[yi](t), this[g] !== 0 && this.emit("readable"), i && r(i), this[b]) : t.length ? (typeof t == "string" && !(e === this[z] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z] && (t = this[Mt].write(t)), this[b] && this[g] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[yi](t), this[g] !== 0 && this.emit("readable"), i && r(i), this[b]) : (this[g] !== 0 && this.emit("readable"), i && r(i), this[b]);
|
|
1568
1568
|
}
|
|
1569
1569
|
read(t) {
|
|
1570
1570
|
if (this[w]) return null;
|
|
1571
|
-
if (this[C] = false, this[
|
|
1572
|
-
this[L] && (t = null), this[
|
|
1573
|
-
let e = this[
|
|
1571
|
+
if (this[C] = false, this[g] === 0 || t === 0 || t && t > this[g]) return this[j](), null;
|
|
1572
|
+
this[L] && (t = null), this[_].length > 1 && !this[L] && (this[_] = [this[z] ? this[_].join("") : Buffer.concat(this[_], this[g])]);
|
|
1573
|
+
let e = this[Ts](t || null, this[_][0]);
|
|
1574
1574
|
return this[j](), e;
|
|
1575
1575
|
}
|
|
1576
|
-
[
|
|
1576
|
+
[Ts](t, e) {
|
|
1577
1577
|
if (this[L]) this[De]();
|
|
1578
1578
|
else {
|
|
1579
1579
|
let i = e;
|
|
1580
|
-
t === i.length || t === null ? this[De]() : typeof i == "string" ? (this[
|
|
1580
|
+
t === i.length || t === null ? this[De]() : typeof i == "string" ? (this[_][0] = i.slice(t), e = i.slice(0, t), this[g] -= t) : (this[_][0] = i.subarray(t), e = i.subarray(0, t), this[g] -= t);
|
|
1581
1581
|
}
|
|
1582
|
-
return this.emit("data", e), !this[
|
|
1582
|
+
return this.emit("data", e), !this[_].length && !this[q] && this.emit("drain"), e;
|
|
1583
1583
|
}
|
|
1584
1584
|
end(t, e, i) {
|
|
1585
1585
|
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = "utf8"), t !== void 0 && this.write(t, e), i && this.once("end", i), this[q] = true, this.writable = false, (this[b] || !this[Qt]) && this[j](), this;
|
|
1586
1586
|
}
|
|
1587
1587
|
[Bt]() {
|
|
1588
|
-
this[w] || (!this[yt] && !this[
|
|
1588
|
+
this[w] || (!this[yt] && !this[A].length && (this[C] = true), this[Qt] = false, this[b] = true, this.emit("resume"), this[_].length ? this[Ae]() : this[q] ? this[j]() : this.emit("drain"));
|
|
1589
1589
|
}
|
|
1590
1590
|
resume() {
|
|
1591
1591
|
return this[Bt]();
|
|
@@ -1602,39 +1602,39 @@ var A = class extends Oi {
|
|
|
1602
1602
|
get paused() {
|
|
1603
1603
|
return this[Qt];
|
|
1604
1604
|
}
|
|
1605
|
-
[
|
|
1606
|
-
this[L] ? this[
|
|
1605
|
+
[yi](t) {
|
|
1606
|
+
this[L] ? this[g] += 1 : this[g] += t.length, this[_].push(t);
|
|
1607
1607
|
}
|
|
1608
1608
|
[De]() {
|
|
1609
|
-
return this[L] ? this[
|
|
1609
|
+
return this[L] ? this[g] -= 1 : this[g] -= this[_][0].length, this[_].shift();
|
|
1610
1610
|
}
|
|
1611
|
-
[
|
|
1611
|
+
[Ae](t = false) {
|
|
1612
1612
|
do
|
|
1613
1613
|
;
|
|
1614
|
-
while (this[
|
|
1615
|
-
!t && !this[
|
|
1614
|
+
while (this[xs](this[De]()) && this[_].length);
|
|
1615
|
+
!t && !this[_].length && !this[q] && this.emit("drain");
|
|
1616
1616
|
}
|
|
1617
|
-
[
|
|
1617
|
+
[xs](t) {
|
|
1618
1618
|
return this.emit("data", t), this[b];
|
|
1619
1619
|
}
|
|
1620
1620
|
pipe(t, e) {
|
|
1621
1621
|
if (this[w]) return t;
|
|
1622
1622
|
this[C] = false;
|
|
1623
1623
|
let i = this[rt];
|
|
1624
|
-
return e = e || {}, t ===
|
|
1624
|
+
return e = e || {}, t === Os.stdout || t === Os.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[A].push(e.proxyErrors ? new Oi(this, t, e) : new Ce(this, t, e)), this[Z] ? te(() => this[Bt]()) : this[Bt]()), t;
|
|
1625
1625
|
}
|
|
1626
1626
|
unpipe(t) {
|
|
1627
|
-
let e = this[
|
|
1628
|
-
e && (this[
|
|
1627
|
+
let e = this[A].find((i) => i.dest === t);
|
|
1628
|
+
e && (this[A].length === 1 ? (this[b] && this[yt] === 0 && (this[b] = false), this[A] = []) : this[A].splice(this[A].indexOf(e), 1), e.unpipe());
|
|
1629
1629
|
}
|
|
1630
1630
|
addListener(t, e) {
|
|
1631
1631
|
return this.on(t, e);
|
|
1632
1632
|
}
|
|
1633
1633
|
on(t, e) {
|
|
1634
1634
|
let i = super.on(t, e);
|
|
1635
|
-
if (t === "data") this[C] = false, this[yt]++, !this[
|
|
1636
|
-
else if (t === "readable" && this[
|
|
1637
|
-
else if (
|
|
1635
|
+
if (t === "data") this[C] = false, this[yt]++, !this[A].length && !this[b] && this[Bt]();
|
|
1636
|
+
else if (t === "readable" && this[g] !== 0) super.emit("readable");
|
|
1637
|
+
else if (Hr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
|
|
1638
1638
|
else if (t === "error" && this[jt]) {
|
|
1639
1639
|
let r = e;
|
|
1640
1640
|
this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
|
|
@@ -1646,29 +1646,29 @@ var A = class extends Oi {
|
|
|
1646
1646
|
}
|
|
1647
1647
|
off(t, e) {
|
|
1648
1648
|
let i = super.off(t, e);
|
|
1649
|
-
return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[
|
|
1649
|
+
return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[A].length && (this[b] = false)), i;
|
|
1650
1650
|
}
|
|
1651
1651
|
removeAllListeners(t) {
|
|
1652
1652
|
let e = super.removeAllListeners(t);
|
|
1653
|
-
return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[
|
|
1653
|
+
return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[A].length && (this[b] = false)), e;
|
|
1654
1654
|
}
|
|
1655
1655
|
get emittedEnd() {
|
|
1656
1656
|
return this[rt];
|
|
1657
1657
|
}
|
|
1658
1658
|
[j]() {
|
|
1659
|
-
!this[
|
|
1659
|
+
!this[Le] && !this[rt] && !this[w] && this[_].length === 0 && this[q] && (this[Le] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[Le] = false);
|
|
1660
1660
|
}
|
|
1661
1661
|
emit(t, ...e) {
|
|
1662
1662
|
let i = e[0];
|
|
1663
1663
|
if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
|
|
1664
|
-
if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[
|
|
1665
|
-
if (t === "end") return this[
|
|
1664
|
+
if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[bi](i)), true) : this[bi](i);
|
|
1665
|
+
if (t === "end") return this[Ls]();
|
|
1666
1666
|
if (t === "close") {
|
|
1667
|
-
if (this[
|
|
1667
|
+
if (this[Ne] = true, !this[rt] && !this[w]) return false;
|
|
1668
1668
|
let n = super.emit("close");
|
|
1669
1669
|
return this.removeAllListeners("close"), n;
|
|
1670
1670
|
} else if (t === "error") {
|
|
1671
|
-
this[jt] = i, super.emit(
|
|
1671
|
+
this[jt] = i, super.emit(Ri, i);
|
|
1672
1672
|
let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
|
|
1673
1673
|
return this[j](), n;
|
|
1674
1674
|
} else if (t === "resume") {
|
|
@@ -1681,23 +1681,23 @@ var A = class extends Oi {
|
|
|
1681
1681
|
let r = super.emit(t, ...e);
|
|
1682
1682
|
return this[j](), r;
|
|
1683
1683
|
}
|
|
1684
|
-
[
|
|
1685
|
-
for (let i of this[
|
|
1684
|
+
[bi](t) {
|
|
1685
|
+
for (let i of this[A]) i.dest.write(t) === false && this.pause();
|
|
1686
1686
|
let e = this[C] ? false : super.emit("data", t);
|
|
1687
1687
|
return this[j](), e;
|
|
1688
1688
|
}
|
|
1689
|
-
[
|
|
1690
|
-
return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[
|
|
1689
|
+
[Ls]() {
|
|
1690
|
+
return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[_i]()), true) : this[_i]());
|
|
1691
1691
|
}
|
|
1692
|
-
[
|
|
1692
|
+
[_i]() {
|
|
1693
1693
|
if (this[Mt]) {
|
|
1694
1694
|
let e = this[Mt].end();
|
|
1695
1695
|
if (e) {
|
|
1696
|
-
for (let i of this[
|
|
1696
|
+
for (let i of this[A]) i.dest.write(e);
|
|
1697
1697
|
this[C] || super.emit("data", e);
|
|
1698
1698
|
}
|
|
1699
1699
|
}
|
|
1700
|
-
for (let e of this[
|
|
1700
|
+
for (let e of this[A]) e.end();
|
|
1701
1701
|
let t = super.emit("end");
|
|
1702
1702
|
return this.removeAllListeners("end"), t;
|
|
1703
1703
|
}
|
|
@@ -1744,67 +1744,67 @@ var A = class extends Oi {
|
|
|
1744
1744
|
}
|
|
1745
1745
|
[Symbol.iterator]() {
|
|
1746
1746
|
this[C] = false;
|
|
1747
|
-
let t = false, e = () => (this.pause(), this.off(
|
|
1747
|
+
let t = false, e = () => (this.pause(), this.off(Ri, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
|
|
1748
1748
|
if (t) return e();
|
|
1749
1749
|
let r = this.read();
|
|
1750
1750
|
return r === null ? e() : { done: false, value: r };
|
|
1751
1751
|
};
|
|
1752
|
-
return this.once("end", e), this.once(
|
|
1752
|
+
return this.once("end", e), this.once(Ri, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
|
|
1753
1753
|
return this;
|
|
1754
1754
|
}, [Symbol.dispose]: () => {
|
|
1755
1755
|
} };
|
|
1756
1756
|
}
|
|
1757
1757
|
destroy(t) {
|
|
1758
1758
|
if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
|
|
1759
|
-
this[w] = true, this[C] = true, this[
|
|
1759
|
+
this[w] = true, this[C] = true, this[_].length = 0, this[g] = 0;
|
|
1760
1760
|
let e = this;
|
|
1761
|
-
return typeof e.close == "function" && !this[
|
|
1761
|
+
return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
|
|
1762
1762
|
}
|
|
1763
1763
|
static get isStream() {
|
|
1764
|
-
return
|
|
1764
|
+
return Br;
|
|
1765
1765
|
}
|
|
1766
1766
|
};
|
|
1767
|
-
var
|
|
1767
|
+
var Vr = I.writev;
|
|
1768
1768
|
var ot = /* @__PURE__ */ Symbol("_autoClose");
|
|
1769
1769
|
var H = /* @__PURE__ */ Symbol("_close");
|
|
1770
1770
|
var ee = /* @__PURE__ */ Symbol("_ended");
|
|
1771
1771
|
var m = /* @__PURE__ */ Symbol("_fd");
|
|
1772
|
-
var
|
|
1772
|
+
var xi = /* @__PURE__ */ Symbol("_finished");
|
|
1773
1773
|
var J = /* @__PURE__ */ Symbol("_flags");
|
|
1774
|
-
var
|
|
1775
|
-
var
|
|
1776
|
-
var
|
|
1774
|
+
var Li = /* @__PURE__ */ Symbol("_flush");
|
|
1775
|
+
var Ii = /* @__PURE__ */ Symbol("_handleChunk");
|
|
1776
|
+
var Ci = /* @__PURE__ */ Symbol("_makeBuf");
|
|
1777
1777
|
var se = /* @__PURE__ */ Symbol("_mode");
|
|
1778
|
-
var
|
|
1778
|
+
var Fe = /* @__PURE__ */ Symbol("_needDrain");
|
|
1779
1779
|
var Ut = /* @__PURE__ */ Symbol("_onerror");
|
|
1780
1780
|
var Ht = /* @__PURE__ */ Symbol("_onopen");
|
|
1781
|
-
var
|
|
1781
|
+
var Ni = /* @__PURE__ */ Symbol("_onread");
|
|
1782
1782
|
var Pt = /* @__PURE__ */ Symbol("_onwrite");
|
|
1783
1783
|
var ht = /* @__PURE__ */ Symbol("_open");
|
|
1784
1784
|
var U = /* @__PURE__ */ Symbol("_path");
|
|
1785
1785
|
var nt = /* @__PURE__ */ Symbol("_pos");
|
|
1786
1786
|
var Y = /* @__PURE__ */ Symbol("_queue");
|
|
1787
1787
|
var zt = /* @__PURE__ */ Symbol("_read");
|
|
1788
|
-
var
|
|
1788
|
+
var Ai = /* @__PURE__ */ Symbol("_readSize");
|
|
1789
1789
|
var Q = /* @__PURE__ */ Symbol("_reading");
|
|
1790
1790
|
var ie = /* @__PURE__ */ Symbol("_remain");
|
|
1791
1791
|
var Di = /* @__PURE__ */ Symbol("_size");
|
|
1792
|
-
var
|
|
1792
|
+
var ke = /* @__PURE__ */ Symbol("_write");
|
|
1793
1793
|
var Rt = /* @__PURE__ */ Symbol("_writing");
|
|
1794
|
-
var
|
|
1794
|
+
var ve = /* @__PURE__ */ Symbol("_defaultFlag");
|
|
1795
1795
|
var bt = /* @__PURE__ */ Symbol("_errored");
|
|
1796
|
-
var
|
|
1796
|
+
var _t = class extends D {
|
|
1797
1797
|
[bt] = false;
|
|
1798
1798
|
[m];
|
|
1799
1799
|
[U];
|
|
1800
|
-
[
|
|
1800
|
+
[Ai];
|
|
1801
1801
|
[Q] = false;
|
|
1802
1802
|
[Di];
|
|
1803
1803
|
[ie];
|
|
1804
1804
|
[ot];
|
|
1805
1805
|
constructor(t, e) {
|
|
1806
1806
|
if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
|
|
1807
|
-
this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[
|
|
1807
|
+
this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ai] = e.readSize || 16 * 1024 * 1024, this[Q] = false, this[Di] = typeof e.size == "number" ? e.size : 1 / 0, this[ie] = this[Di], this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht]();
|
|
1808
1808
|
}
|
|
1809
1809
|
get fd() {
|
|
1810
1810
|
return this[m];
|
|
@@ -1824,19 +1824,19 @@ var gt = class extends A {
|
|
|
1824
1824
|
[Ht](t, e) {
|
|
1825
1825
|
t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
|
|
1826
1826
|
}
|
|
1827
|
-
[
|
|
1828
|
-
return Buffer.allocUnsafe(Math.min(this[
|
|
1827
|
+
[Ci]() {
|
|
1828
|
+
return Buffer.allocUnsafe(Math.min(this[Ai], this[ie]));
|
|
1829
1829
|
}
|
|
1830
1830
|
[zt]() {
|
|
1831
1831
|
if (!this[Q]) {
|
|
1832
1832
|
this[Q] = true;
|
|
1833
|
-
let t = this[
|
|
1834
|
-
if (t.length === 0) return process.nextTick(() => this[
|
|
1835
|
-
I.read(this[m], t, 0, t.length, null, (e, i, r) => this[
|
|
1833
|
+
let t = this[Ci]();
|
|
1834
|
+
if (t.length === 0) return process.nextTick(() => this[Ni](null, 0, t));
|
|
1835
|
+
I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ni](e, i, r));
|
|
1836
1836
|
}
|
|
1837
1837
|
}
|
|
1838
|
-
[
|
|
1839
|
-
this[Q] = false, t ? this[Ut](t) : this[
|
|
1838
|
+
[Ni](t, e, i) {
|
|
1839
|
+
this[Q] = false, t ? this[Ut](t) : this[Ii](e, i) && this[zt]();
|
|
1840
1840
|
}
|
|
1841
1841
|
[H]() {
|
|
1842
1842
|
if (this[ot] && typeof this[m] == "number") {
|
|
@@ -1847,7 +1847,7 @@ var gt = class extends A {
|
|
|
1847
1847
|
[Ut](t) {
|
|
1848
1848
|
this[Q] = true, this[H](), this.emit("error", t);
|
|
1849
1849
|
}
|
|
1850
|
-
[
|
|
1850
|
+
[Ii](t, e) {
|
|
1851
1851
|
let i = false;
|
|
1852
1852
|
return this[ie] -= t, t > 0 && (i = super.write(t < e.length ? e.subarray(0, t) : e)), (t === 0 || this[ie] <= 0) && (i = false, this[H](), super.end()), i;
|
|
1853
1853
|
}
|
|
@@ -1865,7 +1865,7 @@ var gt = class extends A {
|
|
|
1865
1865
|
}
|
|
1866
1866
|
}
|
|
1867
1867
|
};
|
|
1868
|
-
var
|
|
1868
|
+
var Me = class extends _t {
|
|
1869
1869
|
[ht]() {
|
|
1870
1870
|
let t = true;
|
|
1871
1871
|
try {
|
|
@@ -1880,8 +1880,8 @@ var ve = class extends gt {
|
|
|
1880
1880
|
if (!this[Q]) {
|
|
1881
1881
|
this[Q] = true;
|
|
1882
1882
|
do {
|
|
1883
|
-
let e = this[
|
|
1884
|
-
if (!this[
|
|
1883
|
+
let e = this[Ci](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
|
|
1884
|
+
if (!this[Ii](i, e)) break;
|
|
1885
1885
|
} while (true);
|
|
1886
1886
|
this[Q] = false;
|
|
1887
1887
|
}
|
|
@@ -1897,26 +1897,26 @@ var ve = class extends gt {
|
|
|
1897
1897
|
}
|
|
1898
1898
|
}
|
|
1899
1899
|
};
|
|
1900
|
-
var tt = class extends
|
|
1900
|
+
var tt = class extends Kr {
|
|
1901
1901
|
readable = false;
|
|
1902
1902
|
writable = true;
|
|
1903
1903
|
[bt] = false;
|
|
1904
1904
|
[Rt] = false;
|
|
1905
1905
|
[ee] = false;
|
|
1906
1906
|
[Y] = [];
|
|
1907
|
-
[
|
|
1907
|
+
[Fe] = false;
|
|
1908
1908
|
[U];
|
|
1909
1909
|
[se];
|
|
1910
1910
|
[ot];
|
|
1911
1911
|
[m];
|
|
1912
|
-
[
|
|
1912
|
+
[ve];
|
|
1913
1913
|
[J];
|
|
1914
|
-
[
|
|
1914
|
+
[xi] = false;
|
|
1915
1915
|
[nt];
|
|
1916
1916
|
constructor(t, e) {
|
|
1917
1917
|
e = e || {}, super(e), this[U] = t, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[se] = e.mode === void 0 ? 438 : e.mode, this[nt] = typeof e.start == "number" ? e.start : void 0, this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true;
|
|
1918
1918
|
let i = this[nt] !== void 0 ? "r+" : "w";
|
|
1919
|
-
this[
|
|
1919
|
+
this[ve] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
|
|
1920
1920
|
}
|
|
1921
1921
|
emit(t, ...e) {
|
|
1922
1922
|
if (t === "error") {
|
|
@@ -1938,26 +1938,26 @@ var tt = class extends Hr {
|
|
|
1938
1938
|
I.open(this[U], this[J], this[se], (t, e) => this[Ht](t, e));
|
|
1939
1939
|
}
|
|
1940
1940
|
[Ht](t, e) {
|
|
1941
|
-
this[
|
|
1941
|
+
this[ve] && this[J] === "r+" && t && t.code === "ENOENT" ? (this[J] = "w", this[ht]()) : t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[Rt] || this[Li]());
|
|
1942
1942
|
}
|
|
1943
1943
|
end(t, e) {
|
|
1944
1944
|
return t && this.write(t, e), this[ee] = true, !this[Rt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
|
|
1945
1945
|
}
|
|
1946
1946
|
write(t, e) {
|
|
1947
|
-
return typeof t == "string" && (t = Buffer.from(t, e)), this[ee] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[Rt] || this[Y].length ? (this[Y].push(t), this[
|
|
1947
|
+
return typeof t == "string" && (t = Buffer.from(t, e)), this[ee] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[Rt] || this[Y].length ? (this[Y].push(t), this[Fe] = true, false) : (this[Rt] = true, this[ke](t), true);
|
|
1948
1948
|
}
|
|
1949
|
-
[
|
|
1949
|
+
[ke](t) {
|
|
1950
1950
|
I.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
|
|
1951
1951
|
}
|
|
1952
1952
|
[Pt](t, e) {
|
|
1953
|
-
t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[
|
|
1953
|
+
t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Li]() : (this[Rt] = false, this[ee] && !this[xi] ? (this[xi] = true, this[H](), this.emit("finish")) : this[Fe] && (this[Fe] = false, this.emit("drain"))));
|
|
1954
1954
|
}
|
|
1955
|
-
[
|
|
1955
|
+
[Li]() {
|
|
1956
1956
|
if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
|
|
1957
|
-
else if (this[Y].length === 1) this[
|
|
1957
|
+
else if (this[Y].length === 1) this[ke](this[Y].pop());
|
|
1958
1958
|
else {
|
|
1959
1959
|
let t = this[Y];
|
|
1960
|
-
this[Y] = [],
|
|
1960
|
+
this[Y] = [], Vr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
|
|
1961
1961
|
}
|
|
1962
1962
|
}
|
|
1963
1963
|
[H]() {
|
|
@@ -1970,7 +1970,7 @@ var tt = class extends Hr {
|
|
|
1970
1970
|
var Wt = class extends tt {
|
|
1971
1971
|
[ht]() {
|
|
1972
1972
|
let t;
|
|
1973
|
-
if (this[
|
|
1973
|
+
if (this[ve] && this[J] === "r+") try {
|
|
1974
1974
|
t = I.openSync(this[U], this[J], this[se]);
|
|
1975
1975
|
} catch (e) {
|
|
1976
1976
|
if (e?.code === "ENOENT") return this[J] = "w", this[ht]();
|
|
@@ -1985,7 +1985,7 @@ var Wt = class extends tt {
|
|
|
1985
1985
|
this[m] = void 0, I.closeSync(t), this.emit("close");
|
|
1986
1986
|
}
|
|
1987
1987
|
}
|
|
1988
|
-
[
|
|
1988
|
+
[ke](t) {
|
|
1989
1989
|
let e = true;
|
|
1990
1990
|
try {
|
|
1991
1991
|
this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
|
|
@@ -1997,49 +1997,50 @@ var Wt = class extends tt {
|
|
|
1997
1997
|
}
|
|
1998
1998
|
}
|
|
1999
1999
|
};
|
|
2000
|
-
var
|
|
2000
|
+
var $r = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
|
|
2001
2001
|
var As = (s3) => !!s3.sync && !!s3.file;
|
|
2002
|
-
var
|
|
2003
|
-
var
|
|
2004
|
-
var
|
|
2005
|
-
var
|
|
2006
|
-
var
|
|
2007
|
-
let t =
|
|
2002
|
+
var Ds = (s3) => !s3.sync && !!s3.file;
|
|
2003
|
+
var Is = (s3) => !!s3.sync && !s3.file;
|
|
2004
|
+
var Cs = (s3) => !s3.sync && !s3.file;
|
|
2005
|
+
var Fs = (s3) => !!s3.file;
|
|
2006
|
+
var Xr = (s3) => {
|
|
2007
|
+
let t = $r.get(s3);
|
|
2008
2008
|
return t || s3;
|
|
2009
2009
|
};
|
|
2010
2010
|
var re = (s3 = {}) => {
|
|
2011
2011
|
if (!s3) return {};
|
|
2012
2012
|
let t = {};
|
|
2013
2013
|
for (let [e, i] of Object.entries(s3)) {
|
|
2014
|
-
let r =
|
|
2014
|
+
let r = Xr(e);
|
|
2015
2015
|
t[r] = i;
|
|
2016
2016
|
}
|
|
2017
2017
|
return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
|
|
2018
2018
|
};
|
|
2019
2019
|
var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
|
|
2020
|
-
Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o
|
|
2020
|
+
Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o = o ? Array.from(o) : [];
|
|
2021
2021
|
let a = re(n);
|
|
2022
2022
|
if (r?.(a, o), As(a)) {
|
|
2023
2023
|
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
2024
2024
|
return s3(a, o);
|
|
2025
|
+
} else if (Ds(a)) {
|
|
2026
|
+
let l = t(a, o);
|
|
2027
|
+
return h ? l.then(() => h(), h) : l;
|
|
2025
2028
|
} else if (Is(a)) {
|
|
2026
|
-
let l = t(a, o), c = h || void 0;
|
|
2027
|
-
return c ? l.then(() => c(), c) : l;
|
|
2028
|
-
} else if (Cs(a)) {
|
|
2029
2029
|
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
2030
2030
|
return e(a, o);
|
|
2031
|
-
} else if (
|
|
2031
|
+
} else if (Cs(a)) {
|
|
2032
2032
|
if (typeof h == "function") throw new TypeError("callback only supported with file option");
|
|
2033
2033
|
return i(a, o);
|
|
2034
|
-
}
|
|
2034
|
+
}
|
|
2035
|
+
throw new Error("impossible options??");
|
|
2035
2036
|
}, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
|
|
2036
|
-
var
|
|
2037
|
-
var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 },
|
|
2038
|
-
var
|
|
2039
|
-
var
|
|
2040
|
-
var
|
|
2041
|
-
var
|
|
2042
|
-
|
|
2037
|
+
var jr = qr.constants || { ZLIB_VERNUM: 4736 };
|
|
2038
|
+
var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, jr));
|
|
2039
|
+
var Qr = gt.concat;
|
|
2040
|
+
var vs = Object.getOwnPropertyDescriptor(gt, "concat");
|
|
2041
|
+
var Jr = (s3) => s3;
|
|
2042
|
+
var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
|
|
2043
|
+
gt.concat = s3 ? Jr : Qr;
|
|
2043
2044
|
} : (s3) => {
|
|
2044
2045
|
};
|
|
2045
2046
|
var Ot = /* @__PURE__ */ Symbol("_superWrite");
|
|
@@ -2053,8 +2054,8 @@ var Gt = class extends Error {
|
|
|
2053
2054
|
return "ZlibError";
|
|
2054
2055
|
}
|
|
2055
2056
|
};
|
|
2056
|
-
var
|
|
2057
|
-
var ne = class extends
|
|
2057
|
+
var vi = /* @__PURE__ */ Symbol("flushFlag");
|
|
2058
|
+
var ne = class extends D {
|
|
2058
2059
|
#t = false;
|
|
2059
2060
|
#i = false;
|
|
2060
2061
|
#s;
|
|
@@ -2073,9 +2074,9 @@ var ne = class extends A {
|
|
|
2073
2074
|
}
|
|
2074
2075
|
constructor(t, e) {
|
|
2075
2076
|
if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
|
|
2076
|
-
if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof
|
|
2077
|
+
if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof ks[e] != "function") throw new TypeError("Compression method not supported: " + e);
|
|
2077
2078
|
try {
|
|
2078
|
-
this.#e = new
|
|
2079
|
+
this.#e = new ks[e](t);
|
|
2079
2080
|
} catch (i) {
|
|
2080
2081
|
throw new Gt(i, this.constructor);
|
|
2081
2082
|
}
|
|
@@ -2087,10 +2088,10 @@ var ne = class extends A {
|
|
|
2087
2088
|
this.#e && (this.#e.close(), this.#e = void 0, this.emit("close"));
|
|
2088
2089
|
}
|
|
2089
2090
|
reset() {
|
|
2090
|
-
if (!this.#t) return
|
|
2091
|
+
if (!this.#t) return Mi(this.#e, "zlib binding closed"), this.#e.reset?.();
|
|
2091
2092
|
}
|
|
2092
2093
|
flush(t) {
|
|
2093
|
-
this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(
|
|
2094
|
+
this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(gt.alloc(0), { [vi]: t })));
|
|
2094
2095
|
}
|
|
2095
2096
|
end(t, e, i) {
|
|
2096
2097
|
return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), t && (e ? this.write(t, e) : this.write(t)), this.flush(this.#n), this.#i = true, super.end(i);
|
|
@@ -2102,20 +2103,20 @@ var ne = class extends A {
|
|
|
2102
2103
|
return super.write(t);
|
|
2103
2104
|
}
|
|
2104
2105
|
write(t, e, i) {
|
|
2105
|
-
if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t =
|
|
2106
|
-
|
|
2106
|
+
if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = gt.from(t, e)), this.#t) return;
|
|
2107
|
+
Mi(this.#e, "zlib binding closed");
|
|
2107
2108
|
let r = this.#e._handle, n = r.close;
|
|
2108
2109
|
r.close = () => {
|
|
2109
2110
|
};
|
|
2110
2111
|
let o = this.#e.close;
|
|
2111
2112
|
this.#e.close = () => {
|
|
2112
|
-
},
|
|
2113
|
+
}, ki(true);
|
|
2113
2114
|
let h;
|
|
2114
2115
|
try {
|
|
2115
|
-
let l = typeof t[
|
|
2116
|
-
h = this.#e._processChunk(t, l),
|
|
2116
|
+
let l = typeof t[vi] == "number" ? t[vi] : this.#s;
|
|
2117
|
+
h = this.#e._processChunk(t, l), ki(false);
|
|
2117
2118
|
} catch (l) {
|
|
2118
|
-
|
|
2119
|
+
ki(false), this.#o(new Gt(l, this.write));
|
|
2119
2120
|
} finally {
|
|
2120
2121
|
this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
|
|
2121
2122
|
}
|
|
@@ -2123,13 +2124,13 @@ var ne = class extends A {
|
|
|
2123
2124
|
let a;
|
|
2124
2125
|
if (h) if (Array.isArray(h) && h.length > 0) {
|
|
2125
2126
|
let l = h[0];
|
|
2126
|
-
a = this[Ot](
|
|
2127
|
+
a = this[Ot](gt.from(l));
|
|
2127
2128
|
for (let c = 1; c < h.length; c++) a = this[Ot](h[c]);
|
|
2128
|
-
} else a = this[Ot](
|
|
2129
|
+
} else a = this[Ot](gt.from(h));
|
|
2129
2130
|
return i && i(), a;
|
|
2130
2131
|
}
|
|
2131
2132
|
};
|
|
2132
|
-
var
|
|
2133
|
+
var Be = class extends ne {
|
|
2133
2134
|
#t;
|
|
2134
2135
|
#i;
|
|
2135
2136
|
constructor(t, e) {
|
|
@@ -2140,7 +2141,7 @@ var Me = class extends ne {
|
|
|
2140
2141
|
if (!this.handle) throw new Error("cannot switch params when binding is closed");
|
|
2141
2142
|
if (!this.handle.params) throw new Error("not supported in this implementation");
|
|
2142
2143
|
if (this.#t !== t || this.#i !== e) {
|
|
2143
|
-
this.flush(M.Z_SYNC_FLUSH),
|
|
2144
|
+
this.flush(M.Z_SYNC_FLUSH), Mi(this.handle, "zlib binding closed");
|
|
2144
2145
|
let i = this.handle.flush;
|
|
2145
2146
|
this.handle.flush = (r, n) => {
|
|
2146
2147
|
typeof r == "function" && (n = r, r = this.flushFlag), this.flush(r), n?.();
|
|
@@ -2155,7 +2156,7 @@ var Me = class extends ne {
|
|
|
2155
2156
|
}
|
|
2156
2157
|
}
|
|
2157
2158
|
};
|
|
2158
|
-
var
|
|
2159
|
+
var Pe = class extends Be {
|
|
2159
2160
|
#t;
|
|
2160
2161
|
constructor(t) {
|
|
2161
2162
|
super(t, "Gzip"), this.#t = t && !!t.portable;
|
|
@@ -2164,87 +2165,87 @@ var Be = class extends Me {
|
|
|
2164
2165
|
return this.#t ? (this.#t = false, t[9] = 255, super[Ot](t)) : super[Ot](t);
|
|
2165
2166
|
}
|
|
2166
2167
|
};
|
|
2167
|
-
var
|
|
2168
|
+
var ze = class extends Be {
|
|
2168
2169
|
constructor(t) {
|
|
2169
2170
|
super(t, "Unzip");
|
|
2170
2171
|
}
|
|
2171
2172
|
};
|
|
2172
|
-
var
|
|
2173
|
+
var Ue = class extends ne {
|
|
2173
2174
|
constructor(t, e) {
|
|
2174
2175
|
t = t || {}, t.flush = t.flush || M.BROTLI_OPERATION_PROCESS, t.finishFlush = t.finishFlush || M.BROTLI_OPERATION_FINISH, t.fullFlushFlag = M.BROTLI_OPERATION_FLUSH, super(t, e);
|
|
2175
2176
|
}
|
|
2176
2177
|
};
|
|
2177
|
-
var
|
|
2178
|
+
var He = class extends Ue {
|
|
2178
2179
|
constructor(t) {
|
|
2179
2180
|
super(t, "BrotliCompress");
|
|
2180
2181
|
}
|
|
2181
2182
|
};
|
|
2182
|
-
var
|
|
2183
|
+
var We = class extends Ue {
|
|
2183
2184
|
constructor(t) {
|
|
2184
2185
|
super(t, "BrotliDecompress");
|
|
2185
2186
|
}
|
|
2186
2187
|
};
|
|
2187
|
-
var
|
|
2188
|
+
var Ge = class extends ne {
|
|
2188
2189
|
constructor(t, e) {
|
|
2189
2190
|
t = t || {}, t.flush = t.flush || M.ZSTD_e_continue, t.finishFlush = t.finishFlush || M.ZSTD_e_end, t.fullFlushFlag = M.ZSTD_e_flush, super(t, e);
|
|
2190
2191
|
}
|
|
2191
2192
|
};
|
|
2192
|
-
var
|
|
2193
|
+
var Ze = class extends Ge {
|
|
2193
2194
|
constructor(t) {
|
|
2194
2195
|
super(t, "ZstdCompress");
|
|
2195
2196
|
}
|
|
2196
2197
|
};
|
|
2197
|
-
var
|
|
2198
|
+
var Ye = class extends Ge {
|
|
2198
2199
|
constructor(t) {
|
|
2199
2200
|
super(t, "ZstdDecompress");
|
|
2200
2201
|
}
|
|
2201
2202
|
};
|
|
2202
|
-
var
|
|
2203
|
-
if (Number.isSafeInteger(s3)) s3 < 0 ?
|
|
2203
|
+
var Ms = (s3, t) => {
|
|
2204
|
+
if (Number.isSafeInteger(s3)) s3 < 0 ? sn(s3, t) : en(s3, t);
|
|
2204
2205
|
else throw Error("cannot encode number outside of javascript safe integer range");
|
|
2205
2206
|
return t;
|
|
2206
2207
|
};
|
|
2207
|
-
var
|
|
2208
|
+
var en = (s3, t) => {
|
|
2208
2209
|
t[0] = 128;
|
|
2209
2210
|
for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
|
|
2210
2211
|
};
|
|
2211
|
-
var
|
|
2212
|
+
var sn = (s3, t) => {
|
|
2212
2213
|
t[0] = 255;
|
|
2213
2214
|
var e = false;
|
|
2214
2215
|
s3 = s3 * -1;
|
|
2215
2216
|
for (var i = t.length; i > 1; i--) {
|
|
2216
2217
|
var r = s3 & 255;
|
|
2217
|
-
s3 = Math.floor(s3 / 256), e ? t[i - 1] =
|
|
2218
|
+
s3 = Math.floor(s3 / 256), e ? t[i - 1] = Ps(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = zs(r));
|
|
2218
2219
|
}
|
|
2219
2220
|
};
|
|
2220
|
-
var
|
|
2221
|
-
let t = s3[0], e = t === 128 ?
|
|
2221
|
+
var Bs = (s3) => {
|
|
2222
|
+
let t = s3[0], e = t === 128 ? nn(s3.subarray(1, s3.length)) : t === 255 ? rn(s3) : null;
|
|
2222
2223
|
if (e === null) throw Error("invalid base256 encoding");
|
|
2223
2224
|
if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
|
|
2224
2225
|
return e;
|
|
2225
2226
|
};
|
|
2226
|
-
var
|
|
2227
|
+
var rn = (s3) => {
|
|
2227
2228
|
for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
|
|
2228
2229
|
var n = Number(s3[r]), o;
|
|
2229
|
-
i ? o =
|
|
2230
|
+
i ? o = Ps(n) : n === 0 ? o = n : (i = true, o = zs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
|
|
2230
2231
|
}
|
|
2231
2232
|
return e;
|
|
2232
2233
|
};
|
|
2233
|
-
var
|
|
2234
|
+
var nn = (s3) => {
|
|
2234
2235
|
for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
|
|
2235
2236
|
var r = Number(s3[i]);
|
|
2236
2237
|
r !== 0 && (e += r * Math.pow(256, t - i - 1));
|
|
2237
2238
|
}
|
|
2238
2239
|
return e;
|
|
2239
2240
|
};
|
|
2240
|
-
var
|
|
2241
|
-
var
|
|
2242
|
-
var
|
|
2243
|
-
|
|
2241
|
+
var Ps = (s3) => (255 ^ s3) & 255;
|
|
2242
|
+
var zs = (s3) => (255 ^ s3) + 1 & 255;
|
|
2243
|
+
var Bi = {};
|
|
2244
|
+
vr(Bi, { code: () => Ke, isCode: () => oe, isName: () => hn, name: () => he });
|
|
2244
2245
|
var oe = (s3) => he.has(s3);
|
|
2245
|
-
var
|
|
2246
|
+
var hn = (s3) => Ke.has(s3);
|
|
2246
2247
|
var he = /* @__PURE__ */ new Map([["0", "File"], ["", "OldFile"], ["1", "Link"], ["2", "SymbolicLink"], ["3", "CharacterDevice"], ["4", "BlockDevice"], ["5", "Directory"], ["6", "FIFO"], ["7", "ContiguousFile"], ["g", "GlobalExtendedHeader"], ["x", "ExtendedHeader"], ["A", "SolarisACL"], ["D", "GNUDumpDir"], ["I", "Inode"], ["K", "NextFileHasLongLinkpath"], ["L", "NextFileHasLongPath"], ["M", "ContinuationFile"], ["N", "OldGnuLongPath"], ["S", "SparseFile"], ["V", "TapeVolumeHeader"], ["X", "OldExtendedHeader"]]);
|
|
2247
|
-
var
|
|
2248
|
+
var Ke = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
|
|
2248
2249
|
var F = class {
|
|
2249
2250
|
cksumValid = false;
|
|
2250
2251
|
needPax = false;
|
|
@@ -2272,14 +2273,14 @@ var F = class {
|
|
|
2272
2273
|
}
|
|
2273
2274
|
decode(t, e, i, r) {
|
|
2274
2275
|
if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
2275
|
-
this.path = i?.path ?? Tt(t, e, 100), this.mode = i?.mode ?? r?.mode ?? at(t, e + 100, 8), this.uid = i?.uid ?? r?.uid ?? at(t, e + 108, 8), this.gid = i?.gid ?? r?.gid ?? at(t, e + 116, 8), this.size = i?.size ?? r?.size ?? at(t, e + 124, 12), this.mtime = i?.mtime ?? r?.mtime ??
|
|
2276
|
+
this.path = i?.path ?? Tt(t, e, 100), this.mode = i?.mode ?? r?.mode ?? at(t, e + 100, 8), this.uid = i?.uid ?? r?.uid ?? at(t, e + 108, 8), this.gid = i?.gid ?? r?.gid ?? at(t, e + 116, 8), this.size = i?.size ?? r?.size ?? at(t, e + 124, 12), this.mtime = i?.mtime ?? r?.mtime ?? Pi(t, e + 136, 12), this.cksum = at(t, e + 148, 12), r && this.#i(r, true), i && this.#i(i);
|
|
2276
2277
|
let n = Tt(t, e + 156, 1);
|
|
2277
2278
|
if (oe(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = Tt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = i?.uname ?? r?.uname ?? Tt(t, e + 265, 32), this.gname = i?.gname ?? r?.gname ?? Tt(t, e + 297, 32), this.devmaj = i?.devmaj ?? r?.devmaj ?? at(t, e + 329, 8) ?? 0, this.devmin = i?.devmin ?? r?.devmin ?? at(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
|
|
2278
2279
|
let h = Tt(t, e + 345, 155);
|
|
2279
2280
|
this.path = h + "/" + this.path;
|
|
2280
2281
|
} else {
|
|
2281
2282
|
let h = Tt(t, e + 345, 130);
|
|
2282
|
-
h && (this.path = h + "/" + this.path), this.atime = i?.atime ?? r?.atime ??
|
|
2283
|
+
h && (this.path = h + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Pi(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Pi(t, e + 488, 12);
|
|
2283
2284
|
}
|
|
2284
2285
|
let o = 256;
|
|
2285
2286
|
for (let h = e; h < e + 148; h++) o += t[h];
|
|
@@ -2291,8 +2292,8 @@ var F = class {
|
|
|
2291
2292
|
}
|
|
2292
2293
|
encode(t, e = 0) {
|
|
2293
2294
|
if (t || (t = this.block = Buffer.alloc(512)), this.#t === "Unsupported" && (this.#t = "0"), !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
2294
|
-
let i = this.ctime || this.atime ? 130 : 155, r =
|
|
2295
|
-
this.needPax = !!r[2], this.needPax = xt(t, e, 100, n) || this.needPax, this.needPax = lt(t, e + 100, 8, this.mode) || this.needPax, this.needPax = lt(t, e + 108, 8, this.uid) || this.needPax, this.needPax = lt(t, e + 116, 8, this.gid) || this.needPax, this.needPax = lt(t, e + 124, 12, this.size) || this.needPax, this.needPax =
|
|
2295
|
+
let i = this.ctime || this.atime ? 130 : 155, r = an(this.path || "", i), n = r[0], o = r[1];
|
|
2296
|
+
this.needPax = !!r[2], this.needPax = xt(t, e, 100, n) || this.needPax, this.needPax = lt(t, e + 100, 8, this.mode) || this.needPax, this.needPax = lt(t, e + 108, 8, this.uid) || this.needPax, this.needPax = lt(t, e + 116, 8, this.gid) || this.needPax, this.needPax = lt(t, e + 124, 12, this.size) || this.needPax, this.needPax = zi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = xt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = xt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = xt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = lt(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = lt(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = xt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = xt(t, e + 345, 155, o) || this.needPax : (this.needPax = xt(t, e + 345, 130, o) || this.needPax, this.needPax = zi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = zi(t, e + 488, 12, this.ctime) || this.needPax);
|
|
2296
2297
|
let h = 256;
|
|
2297
2298
|
for (let a = e; a < e + 148; a++) h += t[a];
|
|
2298
2299
|
for (let a = e + 156; a < e + 512; a++) h += t[a];
|
|
@@ -2305,13 +2306,13 @@ var F = class {
|
|
|
2305
2306
|
return this.#t;
|
|
2306
2307
|
}
|
|
2307
2308
|
set type(t) {
|
|
2308
|
-
let e = String(
|
|
2309
|
+
let e = String(Ke.get(t));
|
|
2309
2310
|
if (oe(e) || e === "Unsupported") this.#t = e;
|
|
2310
2311
|
else if (oe(t)) this.#t = t;
|
|
2311
2312
|
else throw new TypeError("invalid entry type: " + t);
|
|
2312
2313
|
}
|
|
2313
2314
|
};
|
|
2314
|
-
var
|
|
2315
|
+
var an = (s3, t) => {
|
|
2315
2316
|
let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
|
|
2316
2317
|
if (Buffer.byteLength(i) < 100) n = [i, r, false];
|
|
2317
2318
|
else {
|
|
@@ -2324,19 +2325,19 @@ var sn = (s3, t) => {
|
|
|
2324
2325
|
return n;
|
|
2325
2326
|
};
|
|
2326
2327
|
var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
|
|
2327
|
-
var
|
|
2328
|
-
var
|
|
2329
|
-
var at = (s3, t, e) => Number(s3[t]) & 128 ?
|
|
2330
|
-
var
|
|
2331
|
-
var
|
|
2332
|
-
var
|
|
2333
|
-
var lt = (s3, t, e, i) => i === void 0 ? false : i >
|
|
2334
|
-
var
|
|
2335
|
-
var
|
|
2336
|
-
var
|
|
2337
|
-
var
|
|
2338
|
-
var
|
|
2339
|
-
var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i +
|
|
2328
|
+
var Pi = (s3, t, e) => ln(at(s3, t, e));
|
|
2329
|
+
var ln = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
|
|
2330
|
+
var at = (s3, t, e) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e)) : fn(s3, t, e);
|
|
2331
|
+
var cn = (s3) => isNaN(s3) ? void 0 : s3;
|
|
2332
|
+
var fn = (s3, t, e) => cn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
|
|
2333
|
+
var dn = { 12: 8589934591, 8: 2097151 };
|
|
2334
|
+
var lt = (s3, t, e, i) => i === void 0 ? false : i > dn[e] || i < 0 ? (Ms(i, s3.subarray(t, t + e)), true) : (un(s3, t, e, i), false);
|
|
2335
|
+
var un = (s3, t, e, i) => s3.write(mn(i, e), t, e, "ascii");
|
|
2336
|
+
var mn = (s3, t) => pn(Math.floor(s3).toString(8), t);
|
|
2337
|
+
var pn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
|
|
2338
|
+
var zi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
|
|
2339
|
+
var En = new Array(156).join("\0");
|
|
2340
|
+
var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + En, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
|
|
2340
2341
|
var ct = class s {
|
|
2341
2342
|
atime;
|
|
2342
2343
|
mtime;
|
|
@@ -2363,7 +2364,7 @@ var ct = class s {
|
|
|
2363
2364
|
if (t === "") return Buffer.allocUnsafe(0);
|
|
2364
2365
|
let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
|
|
2365
2366
|
for (let n = 0; n < 512; n++) r[n] = 0;
|
|
2366
|
-
new F({ path: ("PaxHeader/" +
|
|
2367
|
+
new F({ path: ("PaxHeader/" + wn(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
|
|
2367
2368
|
for (let n = e + 512; n < r.length; n++) r[n] = 0;
|
|
2368
2369
|
return r;
|
|
2369
2370
|
}
|
|
@@ -2377,13 +2378,13 @@ var ct = class s {
|
|
|
2377
2378
|
return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
|
|
2378
2379
|
}
|
|
2379
2380
|
static parse(t, e, i = false) {
|
|
2380
|
-
return new s(
|
|
2381
|
+
return new s(Sn(yn(t), e), i);
|
|
2381
2382
|
}
|
|
2382
2383
|
};
|
|
2383
|
-
var
|
|
2384
|
-
var
|
|
2385
|
-
`).reduce(
|
|
2386
|
-
var
|
|
2384
|
+
var Sn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
|
|
2385
|
+
var yn = (s3) => s3.replace(/\n$/, "").split(`
|
|
2386
|
+
`).reduce(Rn, /* @__PURE__ */ Object.create(null));
|
|
2387
|
+
var Rn = (s3, t) => {
|
|
2387
2388
|
let e = parseInt(t, 10);
|
|
2388
2389
|
if (e !== Buffer.byteLength(t) + 1) return s3;
|
|
2389
2390
|
t = t.slice((e + " ").length);
|
|
@@ -2392,9 +2393,9 @@ var pn = (s3, t) => {
|
|
|
2392
2393
|
let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
|
|
2393
2394
|
return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
|
|
2394
2395
|
};
|
|
2395
|
-
var
|
|
2396
|
-
var f =
|
|
2397
|
-
var Yt = class extends
|
|
2396
|
+
var bn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
2397
|
+
var f = bn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
|
|
2398
|
+
var Yt = class extends D {
|
|
2398
2399
|
extended;
|
|
2399
2400
|
globalExtended;
|
|
2400
2401
|
header;
|
|
@@ -2461,42 +2462,42 @@ var Yt = class extends A {
|
|
|
2461
2462
|
var Lt = (s3, t, e, i = {}) => {
|
|
2462
2463
|
s3.file && (i.file = s3.file), s3.cwd && (i.cwd = s3.cwd), i.code = e instanceof Error && e.code || t, i.tarCode = t, !s3.strict && i.recoverable !== false ? (e instanceof Error && (i = Object.assign(e, i), e = e.message), s3.emit("warn", t, e, i)) : e instanceof Error ? s3.emit("error", Object.assign(e, i)) : s3.emit("error", Object.assign(new Error(`${t}: ${e}`), i));
|
|
2463
2464
|
};
|
|
2464
|
-
var
|
|
2465
|
-
var
|
|
2466
|
-
var
|
|
2467
|
-
var
|
|
2465
|
+
var gn = 1024 * 1024;
|
|
2466
|
+
var Zi = Buffer.from([31, 139]);
|
|
2467
|
+
var Yi = Buffer.from([40, 181, 47, 253]);
|
|
2468
|
+
var On = Math.max(Zi.length, Yi.length);
|
|
2468
2469
|
var B = /* @__PURE__ */ Symbol("state");
|
|
2469
2470
|
var Nt = /* @__PURE__ */ Symbol("writeEntry");
|
|
2470
2471
|
var et = /* @__PURE__ */ Symbol("readEntry");
|
|
2471
|
-
var
|
|
2472
|
-
var
|
|
2472
|
+
var Ui = /* @__PURE__ */ Symbol("nextEntry");
|
|
2473
|
+
var Us = /* @__PURE__ */ Symbol("processEntry");
|
|
2473
2474
|
var V = /* @__PURE__ */ Symbol("extendedHeader");
|
|
2474
2475
|
var ae = /* @__PURE__ */ Symbol("globalExtendedHeader");
|
|
2475
2476
|
var ft = /* @__PURE__ */ Symbol("meta");
|
|
2476
|
-
var
|
|
2477
|
+
var Hs = /* @__PURE__ */ Symbol("emitMeta");
|
|
2477
2478
|
var p = /* @__PURE__ */ Symbol("buffer");
|
|
2478
2479
|
var it = /* @__PURE__ */ Symbol("queue");
|
|
2479
2480
|
var dt = /* @__PURE__ */ Symbol("ended");
|
|
2480
|
-
var
|
|
2481
|
-
var
|
|
2481
|
+
var Hi = /* @__PURE__ */ Symbol("emittedEnd");
|
|
2482
|
+
var At = /* @__PURE__ */ Symbol("emit");
|
|
2482
2483
|
var y = /* @__PURE__ */ Symbol("unzip");
|
|
2483
|
-
var
|
|
2484
|
-
var
|
|
2485
|
-
var
|
|
2486
|
-
var
|
|
2487
|
-
var
|
|
2484
|
+
var Ve = /* @__PURE__ */ Symbol("consumeChunk");
|
|
2485
|
+
var $e = /* @__PURE__ */ Symbol("consumeChunkSub");
|
|
2486
|
+
var Wi = /* @__PURE__ */ Symbol("consumeBody");
|
|
2487
|
+
var Ws = /* @__PURE__ */ Symbol("consumeMeta");
|
|
2488
|
+
var Gs = /* @__PURE__ */ Symbol("consumeHeader");
|
|
2488
2489
|
var le = /* @__PURE__ */ Symbol("consuming");
|
|
2489
|
-
var
|
|
2490
|
-
var
|
|
2490
|
+
var Gi = /* @__PURE__ */ Symbol("bufferConcat");
|
|
2491
|
+
var Xe = /* @__PURE__ */ Symbol("maybeEnd");
|
|
2491
2492
|
var Kt = /* @__PURE__ */ Symbol("writing");
|
|
2492
2493
|
var ut = /* @__PURE__ */ Symbol("aborted");
|
|
2493
|
-
var
|
|
2494
|
-
var
|
|
2495
|
-
var
|
|
2496
|
-
var
|
|
2497
|
-
var
|
|
2498
|
-
var
|
|
2499
|
-
var st = class extends
|
|
2494
|
+
var qe = /* @__PURE__ */ Symbol("onDone");
|
|
2495
|
+
var Dt = /* @__PURE__ */ Symbol("sawValidEntry");
|
|
2496
|
+
var je = /* @__PURE__ */ Symbol("sawNullBlock");
|
|
2497
|
+
var Qe = /* @__PURE__ */ Symbol("sawEOF");
|
|
2498
|
+
var Zs = /* @__PURE__ */ Symbol("closeStream");
|
|
2499
|
+
var Tn = () => true;
|
|
2500
|
+
var st = class extends _n {
|
|
2500
2501
|
file;
|
|
2501
2502
|
strict;
|
|
2502
2503
|
maxMetaEntrySize;
|
|
@@ -2516,36 +2517,36 @@ var st = class extends wn {
|
|
|
2516
2517
|
[dt] = false;
|
|
2517
2518
|
[y];
|
|
2518
2519
|
[ut] = false;
|
|
2519
|
-
[
|
|
2520
|
-
[qe] = false;
|
|
2520
|
+
[Dt];
|
|
2521
2521
|
[je] = false;
|
|
2522
|
+
[Qe] = false;
|
|
2522
2523
|
[Kt] = false;
|
|
2523
2524
|
[le] = false;
|
|
2524
|
-
[
|
|
2525
|
+
[Hi] = false;
|
|
2525
2526
|
constructor(t = {}) {
|
|
2526
|
-
super(), this.file = t.file || "", this.on(
|
|
2527
|
-
(this[B] === "begin" || this[
|
|
2528
|
-
}), t.ondone ? this.on(
|
|
2527
|
+
super(), this.file = t.file || "", this.on(qe, () => {
|
|
2528
|
+
(this[B] === "begin" || this[Dt] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
2529
|
+
}), t.ondone ? this.on(qe, t.ondone) : this.on(qe, () => {
|
|
2529
2530
|
this.emit("prefinish"), this.emit("finish"), this.emit("end");
|
|
2530
|
-
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize ||
|
|
2531
|
+
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || gn, this.filter = typeof t.filter == "function" ? t.filter : Tn;
|
|
2531
2532
|
let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
|
|
2532
2533
|
this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
|
|
2533
2534
|
let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
|
|
2534
|
-
this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[
|
|
2535
|
+
this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Zs]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
|
|
2535
2536
|
}
|
|
2536
2537
|
warn(t, e, i = {}) {
|
|
2537
2538
|
Lt(this, t, e, i);
|
|
2538
2539
|
}
|
|
2539
|
-
[
|
|
2540
|
-
this[
|
|
2540
|
+
[Gs](t, e) {
|
|
2541
|
+
this[Dt] === void 0 && (this[Dt] = false);
|
|
2541
2542
|
let i;
|
|
2542
2543
|
try {
|
|
2543
2544
|
i = new F(t, e, this[V], this[ae]);
|
|
2544
2545
|
} catch (r) {
|
|
2545
2546
|
return this.warn("TAR_ENTRY_INVALID", r);
|
|
2546
2547
|
}
|
|
2547
|
-
if (i.nullBlock) this[
|
|
2548
|
-
else if (this[
|
|
2548
|
+
if (i.nullBlock) this[je] ? (this[Qe] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
|
|
2549
|
+
else if (this[je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
|
|
2549
2550
|
else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
|
|
2550
2551
|
else {
|
|
2551
2552
|
let r = i.type;
|
|
@@ -2553,52 +2554,52 @@ var st = class extends wn {
|
|
|
2553
2554
|
else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
|
|
2554
2555
|
else {
|
|
2555
2556
|
let n = this[Nt] = new Yt(i, this[V], this[ae]);
|
|
2556
|
-
if (!this[
|
|
2557
|
+
if (!this[Dt]) if (n.remain) {
|
|
2557
2558
|
let o = () => {
|
|
2558
|
-
n.invalid || (this[
|
|
2559
|
+
n.invalid || (this[Dt] = true);
|
|
2559
2560
|
};
|
|
2560
2561
|
n.on("end", o);
|
|
2561
|
-
} else this[
|
|
2562
|
-
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[
|
|
2562
|
+
} else this[Dt] = true;
|
|
2563
|
+
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[ft] = "", n.on("data", (o) => this[ft] += o), this[B] = "meta") : (this[V] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[et] ? this[it].push(n) : (this[it].push(n), this[Ui]())));
|
|
2563
2564
|
}
|
|
2564
2565
|
}
|
|
2565
2566
|
}
|
|
2566
|
-
[
|
|
2567
|
+
[Zs]() {
|
|
2567
2568
|
queueMicrotask(() => this.emit("close"));
|
|
2568
2569
|
}
|
|
2569
|
-
[
|
|
2570
|
+
[Us](t) {
|
|
2570
2571
|
let e = true;
|
|
2571
2572
|
if (!t) this[et] = void 0, e = false;
|
|
2572
2573
|
else if (Array.isArray(t)) {
|
|
2573
2574
|
let [i, ...r] = t;
|
|
2574
2575
|
this.emit(i, ...r);
|
|
2575
|
-
} else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[
|
|
2576
|
+
} else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Ui]()), e = false);
|
|
2576
2577
|
return e;
|
|
2577
2578
|
}
|
|
2578
|
-
[
|
|
2579
|
+
[Ui]() {
|
|
2579
2580
|
do
|
|
2580
2581
|
;
|
|
2581
|
-
while (this[
|
|
2582
|
-
if (
|
|
2582
|
+
while (this[Us](this[it].shift()));
|
|
2583
|
+
if (this[it].length === 0) {
|
|
2583
2584
|
let t = this[et];
|
|
2584
2585
|
!t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
|
|
2585
2586
|
}
|
|
2586
2587
|
}
|
|
2587
|
-
[
|
|
2588
|
+
[Wi](t, e) {
|
|
2588
2589
|
let i = this[Nt];
|
|
2589
2590
|
if (!i) throw new Error("attempt to consume body without entry??");
|
|
2590
2591
|
let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
|
|
2591
2592
|
return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
|
|
2592
2593
|
}
|
|
2593
|
-
[
|
|
2594
|
-
let i = this[Nt], r = this[
|
|
2595
|
-
return !this[Nt] && i && this[
|
|
2594
|
+
[Ws](t, e) {
|
|
2595
|
+
let i = this[Nt], r = this[Wi](t, e);
|
|
2596
|
+
return !this[Nt] && i && this[Hs](i), r;
|
|
2596
2597
|
}
|
|
2597
|
-
[
|
|
2598
|
-
|
|
2598
|
+
[At](t, e, i) {
|
|
2599
|
+
this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
|
|
2599
2600
|
}
|
|
2600
|
-
[
|
|
2601
|
-
switch (this[
|
|
2601
|
+
[Hs](t) {
|
|
2602
|
+
switch (this[At]("meta", this[ft]), t.type) {
|
|
2602
2603
|
case "ExtendedHeader":
|
|
2603
2604
|
case "OldExtendedHeader":
|
|
2604
2605
|
this[V] = ct.parse(this[ft], this[V], false);
|
|
@@ -2627,12 +2628,12 @@ var st = class extends wn {
|
|
|
2627
2628
|
write(t, e, i) {
|
|
2628
2629
|
if (typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8")), this[ut]) return i?.(), false;
|
|
2629
2630
|
if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
|
|
2630
|
-
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length <
|
|
2631
|
-
for (let a = 0; this[y] === void 0 && a <
|
|
2631
|
+
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < On) return this[p] = t, i?.(), true;
|
|
2632
|
+
for (let a = 0; this[y] === void 0 && a < Zi.length; a++) t[a] !== Zi[a] && (this[y] = false);
|
|
2632
2633
|
let o = false;
|
|
2633
2634
|
if (this[y] === false && this.zstd !== false) {
|
|
2634
2635
|
o = true;
|
|
2635
|
-
for (let a = 0; a <
|
|
2636
|
+
for (let a = 0; a < Yi.length; a++) if (t[a] !== Yi[a]) {
|
|
2636
2637
|
o = false;
|
|
2637
2638
|
break;
|
|
2638
2639
|
}
|
|
@@ -2647,69 +2648,69 @@ var st = class extends wn {
|
|
|
2647
2648
|
}
|
|
2648
2649
|
if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
|
|
2649
2650
|
let a = this[dt];
|
|
2650
|
-
this[dt] = false, this[y] = this[y] === void 0 ? new
|
|
2651
|
-
this[dt] = true, this[
|
|
2651
|
+
this[dt] = false, this[y] = this[y] === void 0 ? new ze({}) : o ? new Ye({}) : new We({}), this[y].on("data", (c) => this[Ve](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
|
|
2652
|
+
this[dt] = true, this[Ve]();
|
|
2652
2653
|
}), this[Kt] = true;
|
|
2653
2654
|
let l = !!this[y][a ? "end" : "write"](t);
|
|
2654
2655
|
return this[Kt] = false, i?.(), l;
|
|
2655
2656
|
}
|
|
2656
2657
|
}
|
|
2657
|
-
this[Kt] = true, this[y] ? this[y].write(t) : this[
|
|
2658
|
-
let n = this[it].length ? false : this[et] ? this[et].flowing : true;
|
|
2659
|
-
return !n &&
|
|
2658
|
+
this[Kt] = true, this[y] ? this[y].write(t) : this[Ve](t), this[Kt] = false;
|
|
2659
|
+
let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
|
|
2660
|
+
return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
|
|
2660
2661
|
}
|
|
2661
|
-
[
|
|
2662
|
+
[Gi](t) {
|
|
2662
2663
|
t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
|
|
2663
2664
|
}
|
|
2664
|
-
[
|
|
2665
|
-
if (this[dt] && !this[
|
|
2666
|
-
this[
|
|
2665
|
+
[Xe]() {
|
|
2666
|
+
if (this[dt] && !this[Hi] && !this[ut] && !this[le]) {
|
|
2667
|
+
this[Hi] = true;
|
|
2667
2668
|
let t = this[Nt];
|
|
2668
2669
|
if (t && t.blockRemain) {
|
|
2669
2670
|
let e = this[p] ? this[p].length : 0;
|
|
2670
2671
|
this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`, { entry: t }), this[p] && t.write(this[p]), t.end();
|
|
2671
2672
|
}
|
|
2672
|
-
this[
|
|
2673
|
+
this[At](qe);
|
|
2673
2674
|
}
|
|
2674
2675
|
}
|
|
2675
|
-
[
|
|
2676
|
-
if (this[le] && t) this[
|
|
2677
|
-
else if (!t && !this[p]) this[
|
|
2676
|
+
[Ve](t) {
|
|
2677
|
+
if (this[le] && t) this[Gi](t);
|
|
2678
|
+
else if (!t && !this[p]) this[Xe]();
|
|
2678
2679
|
else if (t) {
|
|
2679
2680
|
if (this[le] = true, this[p]) {
|
|
2680
|
-
this[
|
|
2681
|
+
this[Gi](t);
|
|
2681
2682
|
let e = this[p];
|
|
2682
|
-
this[p] = void 0, this[
|
|
2683
|
-
} else this[
|
|
2684
|
-
for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[
|
|
2683
|
+
this[p] = void 0, this[$e](e);
|
|
2684
|
+
} else this[$e](t);
|
|
2685
|
+
for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[Qe]; ) {
|
|
2685
2686
|
let e = this[p];
|
|
2686
|
-
this[p] = void 0, this[
|
|
2687
|
+
this[p] = void 0, this[$e](e);
|
|
2687
2688
|
}
|
|
2688
2689
|
this[le] = false;
|
|
2689
2690
|
}
|
|
2690
|
-
(!this[p] || this[dt]) && this[
|
|
2691
|
+
(!this[p] || this[dt]) && this[Xe]();
|
|
2691
2692
|
}
|
|
2692
|
-
[
|
|
2693
|
+
[$e](t) {
|
|
2693
2694
|
let e = 0, i = t.length;
|
|
2694
|
-
for (; e + 512 <= i && !this[ut] && !this[
|
|
2695
|
+
for (; e + 512 <= i && !this[ut] && !this[Qe]; ) switch (this[B]) {
|
|
2695
2696
|
case "begin":
|
|
2696
2697
|
case "header":
|
|
2697
|
-
this[
|
|
2698
|
+
this[Gs](t, e), e += 512;
|
|
2698
2699
|
break;
|
|
2699
2700
|
case "ignore":
|
|
2700
2701
|
case "body":
|
|
2701
|
-
e += this[
|
|
2702
|
+
e += this[Wi](t, e);
|
|
2702
2703
|
break;
|
|
2703
2704
|
case "meta":
|
|
2704
|
-
e += this[
|
|
2705
|
+
e += this[Ws](t, e);
|
|
2705
2706
|
break;
|
|
2706
2707
|
default:
|
|
2707
2708
|
throw new Error("invalid state: " + this[B]);
|
|
2708
2709
|
}
|
|
2709
|
-
e < i && (this[p]
|
|
2710
|
+
e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
|
|
2710
2711
|
}
|
|
2711
2712
|
end(t, e, i) {
|
|
2712
|
-
return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[ut] || (this[y] ? (t && this[y].write(t), this[y].end()) : (this[dt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[
|
|
2713
|
+
return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[ut] || (this[y] ? (t && this[y].write(t), this[y].end()) : (this[dt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Xe]())), this;
|
|
2713
2714
|
}
|
|
2714
2715
|
};
|
|
2715
2716
|
var mt = (s3) => {
|
|
@@ -2717,25 +2718,25 @@ var mt = (s3) => {
|
|
|
2717
2718
|
for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
|
|
2718
2719
|
return e === -1 ? s3 : s3.slice(0, e);
|
|
2719
2720
|
};
|
|
2720
|
-
var
|
|
2721
|
+
var Nn = (s3) => {
|
|
2721
2722
|
let t = s3.onReadEntry;
|
|
2722
2723
|
s3.onReadEntry = t ? (e) => {
|
|
2723
2724
|
t(e), e.resume();
|
|
2724
2725
|
} : (e) => e.resume();
|
|
2725
2726
|
};
|
|
2726
|
-
var
|
|
2727
|
+
var Ki = (s3, t) => {
|
|
2727
2728
|
let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
|
|
2728
|
-
let h = o ||
|
|
2729
|
+
let h = o || Ln(n).root || ".", a;
|
|
2729
2730
|
if (n === h) a = false;
|
|
2730
2731
|
else {
|
|
2731
2732
|
let l = e.get(n);
|
|
2732
|
-
l !== void 0 ?
|
|
2733
|
+
a = l !== void 0 ? l : r(xn(n), h);
|
|
2733
2734
|
}
|
|
2734
2735
|
return e.set(n, a), a;
|
|
2735
2736
|
};
|
|
2736
2737
|
s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
|
|
2737
2738
|
};
|
|
2738
|
-
var
|
|
2739
|
+
var An = (s3) => {
|
|
2739
2740
|
let t = new st(s3), e = s3.file, i;
|
|
2740
2741
|
try {
|
|
2741
2742
|
i = Vt.openSync(e, "r");
|
|
@@ -2759,58 +2760,58 @@ var On = (s3) => {
|
|
|
2759
2760
|
}
|
|
2760
2761
|
}
|
|
2761
2762
|
};
|
|
2762
|
-
var
|
|
2763
|
+
var Dn = (s3, t) => {
|
|
2763
2764
|
let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
2764
2765
|
return new Promise((o, h) => {
|
|
2765
2766
|
e.on("error", h), e.on("end", o), Vt.stat(r, (a, l) => {
|
|
2766
2767
|
if (a) h(a);
|
|
2767
2768
|
else {
|
|
2768
|
-
let c = new
|
|
2769
|
+
let c = new _t(r, { readSize: i, size: l.size });
|
|
2769
2770
|
c.on("error", h), c.pipe(e);
|
|
2770
2771
|
}
|
|
2771
2772
|
});
|
|
2772
2773
|
});
|
|
2773
2774
|
};
|
|
2774
|
-
var It = K(
|
|
2775
|
-
t?.length &&
|
|
2775
|
+
var It = K(An, Dn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
|
|
2776
|
+
t?.length && Ki(s3, t), s3.noResume || Nn(s3);
|
|
2776
2777
|
});
|
|
2777
|
-
var
|
|
2778
|
-
var { isAbsolute:
|
|
2778
|
+
var Vi = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
|
|
2779
|
+
var { isAbsolute: Cn, parse: Ys } = In;
|
|
2779
2780
|
var ce = (s3) => {
|
|
2780
|
-
let t = "", e =
|
|
2781
|
-
for (;
|
|
2781
|
+
let t = "", e = Ys(s3);
|
|
2782
|
+
for (; Cn(s3) || e.root; ) {
|
|
2782
2783
|
let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
|
|
2783
|
-
s3 = s3.slice(i.length), t += i, e =
|
|
2784
|
+
s3 = s3.slice(i.length), t += i, e = Ys(s3);
|
|
2784
2785
|
}
|
|
2785
2786
|
return [t, s3];
|
|
2786
2787
|
};
|
|
2787
|
-
var
|
|
2788
|
-
var
|
|
2789
|
-
var
|
|
2790
|
-
var
|
|
2791
|
-
var
|
|
2792
|
-
var
|
|
2793
|
-
var
|
|
2794
|
-
var
|
|
2795
|
-
var
|
|
2796
|
-
var
|
|
2797
|
-
var
|
|
2798
|
-
var
|
|
2799
|
-
var
|
|
2788
|
+
var Je = ["|", "<", ">", "?", ":"];
|
|
2789
|
+
var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
|
|
2790
|
+
var Fn = new Map(Je.map((s3, t) => [s3, $i[t]]));
|
|
2791
|
+
var kn = new Map($i.map((s3, t) => [s3, Je[t]]));
|
|
2792
|
+
var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Fn.get(e)), s3);
|
|
2793
|
+
var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(kn.get(e)), s3);
|
|
2794
|
+
var Js = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
|
|
2795
|
+
var vn = 16 * 1024 * 1024;
|
|
2796
|
+
var Xs = /* @__PURE__ */ Symbol("process");
|
|
2797
|
+
var qs = /* @__PURE__ */ Symbol("file");
|
|
2798
|
+
var js = /* @__PURE__ */ Symbol("directory");
|
|
2799
|
+
var ji = /* @__PURE__ */ Symbol("symlink");
|
|
2800
|
+
var Qs = /* @__PURE__ */ Symbol("hardlink");
|
|
2800
2801
|
var fe = /* @__PURE__ */ Symbol("header");
|
|
2801
|
-
var
|
|
2802
|
-
var
|
|
2803
|
-
var
|
|
2804
|
-
var
|
|
2805
|
-
var
|
|
2806
|
-
var
|
|
2807
|
-
var
|
|
2802
|
+
var ti = /* @__PURE__ */ Symbol("read");
|
|
2803
|
+
var Qi = /* @__PURE__ */ Symbol("lstat");
|
|
2804
|
+
var ei = /* @__PURE__ */ Symbol("onlstat");
|
|
2805
|
+
var Ji = /* @__PURE__ */ Symbol("onread");
|
|
2806
|
+
var ts = /* @__PURE__ */ Symbol("onreadlink");
|
|
2807
|
+
var es = /* @__PURE__ */ Symbol("openfile");
|
|
2808
|
+
var is = /* @__PURE__ */ Symbol("onopenfile");
|
|
2808
2809
|
var pt = /* @__PURE__ */ Symbol("close");
|
|
2809
|
-
var
|
|
2810
|
-
var
|
|
2811
|
-
var
|
|
2810
|
+
var ii = /* @__PURE__ */ Symbol("mode");
|
|
2811
|
+
var ss = /* @__PURE__ */ Symbol("awaitDrain");
|
|
2812
|
+
var qi = /* @__PURE__ */ Symbol("ondrain");
|
|
2812
2813
|
var X = /* @__PURE__ */ Symbol("prefix");
|
|
2813
|
-
var de = class extends
|
|
2814
|
+
var de = class extends D {
|
|
2814
2815
|
path;
|
|
2815
2816
|
portable;
|
|
2816
2817
|
myuid = process.getuid && process.getuid() || 0;
|
|
@@ -2843,15 +2844,15 @@ var de = class extends A {
|
|
|
2843
2844
|
#t = false;
|
|
2844
2845
|
constructor(t, e = {}) {
|
|
2845
2846
|
let i = re(e);
|
|
2846
|
-
super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize ||
|
|
2847
|
+
super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || vn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
|
|
2847
2848
|
let r = false;
|
|
2848
2849
|
if (!this.preservePaths) {
|
|
2849
2850
|
let [o, h] = ce(this.path);
|
|
2850
2851
|
o && typeof h == "string" && (this.path = h, r = o);
|
|
2851
2852
|
}
|
|
2852
|
-
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path =
|
|
2853
|
+
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Ks(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || $s.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
|
|
2853
2854
|
let n = this.statCache.get(this.absolute);
|
|
2854
|
-
n ? this[
|
|
2855
|
+
n ? this[ei](n) : this[Qi]();
|
|
2855
2856
|
}
|
|
2856
2857
|
warn(t, e, i = {}) {
|
|
2857
2858
|
return Lt(this, t, e, i);
|
|
@@ -2859,93 +2860,93 @@ var de = class extends A {
|
|
|
2859
2860
|
emit(t, ...e) {
|
|
2860
2861
|
return t === "error" && (this.#t = true), super.emit(t, ...e);
|
|
2861
2862
|
}
|
|
2862
|
-
[
|
|
2863
|
+
[Qi]() {
|
|
2863
2864
|
$.lstat(this.absolute, (t, e) => {
|
|
2864
2865
|
if (t) return this.emit("error", t);
|
|
2865
|
-
this[
|
|
2866
|
+
this[ei](e);
|
|
2866
2867
|
});
|
|
2867
2868
|
}
|
|
2868
|
-
[
|
|
2869
|
-
this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type =
|
|
2869
|
+
[ei](t) {
|
|
2870
|
+
this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Mn(t), this.emit("stat", t), this[Xs]();
|
|
2870
2871
|
}
|
|
2871
|
-
[
|
|
2872
|
+
[Xs]() {
|
|
2872
2873
|
switch (this.type) {
|
|
2873
2874
|
case "File":
|
|
2874
|
-
return this[
|
|
2875
|
+
return this[qs]();
|
|
2875
2876
|
case "Directory":
|
|
2876
|
-
return this[
|
|
2877
|
+
return this[js]();
|
|
2877
2878
|
case "SymbolicLink":
|
|
2878
|
-
return this[
|
|
2879
|
+
return this[ji]();
|
|
2879
2880
|
default:
|
|
2880
2881
|
return this.end();
|
|
2881
2882
|
}
|
|
2882
2883
|
}
|
|
2883
|
-
[
|
|
2884
|
-
return
|
|
2884
|
+
[ii](t) {
|
|
2885
|
+
return Vi(t, this.type === "Directory", this.portable);
|
|
2885
2886
|
}
|
|
2886
2887
|
[X](t) {
|
|
2887
|
-
return
|
|
2888
|
+
return Js(t, this.prefix);
|
|
2888
2889
|
}
|
|
2889
2890
|
[fe]() {
|
|
2890
2891
|
if (!this.stat) throw new Error("cannot write header before stat");
|
|
2891
|
-
this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this[
|
|
2892
|
+
this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this[ii](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
|
|
2892
2893
|
let t = this.header?.block;
|
|
2893
2894
|
if (!t) throw new Error("failed to encode header");
|
|
2894
2895
|
super.write(t);
|
|
2895
2896
|
}
|
|
2896
|
-
[
|
|
2897
|
+
[js]() {
|
|
2897
2898
|
if (!this.stat) throw new Error("cannot create directory entry without stat");
|
|
2898
2899
|
this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
|
|
2899
2900
|
}
|
|
2900
|
-
[
|
|
2901
|
+
[ji]() {
|
|
2901
2902
|
$.readlink(this.absolute, (t, e) => {
|
|
2902
2903
|
if (t) return this.emit("error", t);
|
|
2903
|
-
this[
|
|
2904
|
+
this[ts](e);
|
|
2904
2905
|
});
|
|
2905
2906
|
}
|
|
2906
|
-
[
|
|
2907
|
+
[ts](t) {
|
|
2907
2908
|
this.linkpath = f(t), this[fe](), this.end();
|
|
2908
2909
|
}
|
|
2909
|
-
[
|
|
2910
|
+
[Qs](t) {
|
|
2910
2911
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
2911
|
-
this.type = "Link", this.linkpath = f(
|
|
2912
|
+
this.type = "Link", this.linkpath = f($s.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
|
|
2912
2913
|
}
|
|
2913
|
-
[
|
|
2914
|
+
[qs]() {
|
|
2914
2915
|
if (!this.stat) throw new Error("cannot create file entry without stat");
|
|
2915
2916
|
if (this.stat.nlink > 1) {
|
|
2916
2917
|
let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
|
|
2917
|
-
if (e?.indexOf(this.cwd) === 0) return this[
|
|
2918
|
+
if (e?.indexOf(this.cwd) === 0) return this[Qs](e);
|
|
2918
2919
|
this.linkCache.set(t, this.absolute);
|
|
2919
2920
|
}
|
|
2920
2921
|
if (this[fe](), this.stat.size === 0) return this.end();
|
|
2921
|
-
this[
|
|
2922
|
+
this[es]();
|
|
2922
2923
|
}
|
|
2923
|
-
[
|
|
2924
|
+
[es]() {
|
|
2924
2925
|
$.open(this.absolute, "r", (t, e) => {
|
|
2925
2926
|
if (t) return this.emit("error", t);
|
|
2926
|
-
this[
|
|
2927
|
+
this[is](e);
|
|
2927
2928
|
});
|
|
2928
2929
|
}
|
|
2929
|
-
[
|
|
2930
|
+
[is](t) {
|
|
2930
2931
|
if (this.fd = t, this.#t) return this[pt]();
|
|
2931
2932
|
if (!this.stat) throw new Error("should stat before calling onopenfile");
|
|
2932
2933
|
this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
|
|
2933
2934
|
let e = Math.min(this.blockLen, this.maxReadSize);
|
|
2934
|
-
this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[
|
|
2935
|
+
this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ti]();
|
|
2935
2936
|
}
|
|
2936
|
-
[
|
|
2937
|
+
[ti]() {
|
|
2937
2938
|
let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
|
|
2938
2939
|
if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
|
|
2939
2940
|
$.read(t, e, i, r, n, (o, h) => {
|
|
2940
2941
|
if (o) return this[pt](() => this.emit("error", o));
|
|
2941
|
-
this[
|
|
2942
|
+
this[Ji](h);
|
|
2942
2943
|
});
|
|
2943
2944
|
}
|
|
2944
2945
|
[pt](t = () => {
|
|
2945
2946
|
}) {
|
|
2946
2947
|
this.fd !== void 0 && $.close(this.fd, t);
|
|
2947
2948
|
}
|
|
2948
|
-
[
|
|
2949
|
+
[Ji](t) {
|
|
2949
2950
|
if (t <= 0 && this.remain > 0) {
|
|
2950
2951
|
let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
|
|
2951
2952
|
return this[pt](() => this.emit("error", r));
|
|
@@ -2957,9 +2958,9 @@ var de = class extends A {
|
|
|
2957
2958
|
if (!this.buf) throw new Error("should have created buffer prior to reading");
|
|
2958
2959
|
if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
|
|
2959
2960
|
let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
|
|
2960
|
-
this.write(e) ? this[
|
|
2961
|
+
this.write(e) ? this[qi]() : this[ss](() => this[qi]());
|
|
2961
2962
|
}
|
|
2962
|
-
[
|
|
2963
|
+
[ss](t) {
|
|
2963
2964
|
this.once("drain", t);
|
|
2964
2965
|
}
|
|
2965
2966
|
write(t, e, i) {
|
|
@@ -2969,30 +2970,30 @@ var de = class extends A {
|
|
|
2969
2970
|
}
|
|
2970
2971
|
return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
|
|
2971
2972
|
}
|
|
2972
|
-
[
|
|
2973
|
+
[qi]() {
|
|
2973
2974
|
if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
|
|
2974
2975
|
if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
|
|
2975
|
-
this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[
|
|
2976
|
+
this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ti]();
|
|
2976
2977
|
}
|
|
2977
2978
|
};
|
|
2978
|
-
var
|
|
2979
|
+
var si = class extends de {
|
|
2979
2980
|
sync = true;
|
|
2980
|
-
[
|
|
2981
|
-
this[
|
|
2981
|
+
[Qi]() {
|
|
2982
|
+
this[ei]($.lstatSync(this.absolute));
|
|
2982
2983
|
}
|
|
2983
|
-
[
|
|
2984
|
-
this[
|
|
2984
|
+
[ji]() {
|
|
2985
|
+
this[ts]($.readlinkSync(this.absolute));
|
|
2985
2986
|
}
|
|
2986
|
-
[
|
|
2987
|
-
this[
|
|
2987
|
+
[es]() {
|
|
2988
|
+
this[is]($.openSync(this.absolute, "r"));
|
|
2988
2989
|
}
|
|
2989
|
-
[
|
|
2990
|
+
[ti]() {
|
|
2990
2991
|
let t = true;
|
|
2991
2992
|
try {
|
|
2992
2993
|
let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
|
|
2993
2994
|
if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
|
|
2994
2995
|
let h = $.readSync(e, i, r, n, o);
|
|
2995
|
-
this[
|
|
2996
|
+
this[Ji](h), t = false;
|
|
2996
2997
|
} finally {
|
|
2997
2998
|
if (t) try {
|
|
2998
2999
|
this[pt](() => {
|
|
@@ -3001,7 +3002,7 @@ var ii = class extends de {
|
|
|
3001
3002
|
}
|
|
3002
3003
|
}
|
|
3003
3004
|
}
|
|
3004
|
-
[
|
|
3005
|
+
[ss](t) {
|
|
3005
3006
|
t();
|
|
3006
3007
|
}
|
|
3007
3008
|
[pt](t = () => {
|
|
@@ -3009,7 +3010,7 @@ var ii = class extends de {
|
|
|
3009
3010
|
this.fd !== void 0 && $.closeSync(this.fd), t();
|
|
3010
3011
|
}
|
|
3011
3012
|
};
|
|
3012
|
-
var
|
|
3013
|
+
var ri = class extends D {
|
|
3013
3014
|
blockLen = 0;
|
|
3014
3015
|
blockRemain = 0;
|
|
3015
3016
|
buf = 0;
|
|
@@ -3045,7 +3046,7 @@ var si = class extends A {
|
|
|
3045
3046
|
super(), this.preservePaths = !!i.preservePaths, this.portable = !!i.portable, this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.onWriteEntry = i.onWriteEntry, this.readEntry = t;
|
|
3046
3047
|
let { type: r } = t;
|
|
3047
3048
|
if (r === "Unsupported") throw new Error("writing entry that should be ignored");
|
|
3048
|
-
this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[
|
|
3049
|
+
this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[ii](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
|
|
3049
3050
|
let n = false;
|
|
3050
3051
|
if (!this.preservePaths) {
|
|
3051
3052
|
let [h, a] = ce(this.path);
|
|
@@ -3057,10 +3058,10 @@ var si = class extends A {
|
|
|
3057
3058
|
super.write(o), t.pipe(this);
|
|
3058
3059
|
}
|
|
3059
3060
|
[X](t) {
|
|
3060
|
-
return
|
|
3061
|
+
return Js(t, this.prefix);
|
|
3061
3062
|
}
|
|
3062
|
-
[
|
|
3063
|
-
return
|
|
3063
|
+
[ii](t) {
|
|
3064
|
+
return Vi(t, this.type === "Directory", this.portable);
|
|
3064
3065
|
}
|
|
3065
3066
|
write(t, e, i) {
|
|
3066
3067
|
typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
|
|
@@ -3072,8 +3073,8 @@ var si = class extends A {
|
|
|
3072
3073
|
return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e ?? "utf8")), i && this.once("finish", i), t ? super.end(t, i) : super.end(i), this;
|
|
3073
3074
|
}
|
|
3074
3075
|
};
|
|
3075
|
-
var
|
|
3076
|
-
var
|
|
3076
|
+
var Mn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
|
|
3077
|
+
var ni = class s2 {
|
|
3077
3078
|
tail;
|
|
3078
3079
|
head;
|
|
3079
3080
|
length = 0;
|
|
@@ -3104,11 +3105,11 @@ var ri = class s2 {
|
|
|
3104
3105
|
t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
|
|
3105
3106
|
}
|
|
3106
3107
|
push(...t) {
|
|
3107
|
-
for (let e = 0, i = t.length; e < i; e++)
|
|
3108
|
+
for (let e = 0, i = t.length; e < i; e++) Pn(this, t[e]);
|
|
3108
3109
|
return this.length;
|
|
3109
3110
|
}
|
|
3110
3111
|
unshift(...t) {
|
|
3111
|
-
for (var e = 0, i = t.length; e < i; e++)
|
|
3112
|
+
for (var e = 0, i = t.length; e < i; e++) zn(this, t[e]);
|
|
3112
3113
|
return this.length;
|
|
3113
3114
|
}
|
|
3114
3115
|
pop() {
|
|
@@ -3204,7 +3205,7 @@ var ri = class s2 {
|
|
|
3204
3205
|
let n = [];
|
|
3205
3206
|
for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
|
|
3206
3207
|
r ? r !== this.tail && (r = r.prev) : r = this.tail;
|
|
3207
|
-
for (let o of i) r =
|
|
3208
|
+
for (let o of i) r = Bn(this, r, o);
|
|
3208
3209
|
return n;
|
|
3209
3210
|
}
|
|
3210
3211
|
reverse() {
|
|
@@ -3216,14 +3217,14 @@ var ri = class s2 {
|
|
|
3216
3217
|
return this.head = e, this.tail = t, this;
|
|
3217
3218
|
}
|
|
3218
3219
|
};
|
|
3219
|
-
function
|
|
3220
|
+
function Bn(s3, t, e) {
|
|
3220
3221
|
let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
|
|
3221
3222
|
return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
|
|
3222
3223
|
}
|
|
3223
|
-
function
|
|
3224
|
+
function Pn(s3, t) {
|
|
3224
3225
|
s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
|
|
3225
3226
|
}
|
|
3226
|
-
function
|
|
3227
|
+
function zn(s3, t) {
|
|
3227
3228
|
s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
|
|
3228
3229
|
}
|
|
3229
3230
|
var ue = class {
|
|
@@ -3235,7 +3236,7 @@ var ue = class {
|
|
|
3235
3236
|
this.list = r, this.value = t, e ? (e.next = this, this.prev = e) : this.prev = void 0, i ? (i.prev = this, this.next = i) : this.next = void 0;
|
|
3236
3237
|
}
|
|
3237
3238
|
};
|
|
3238
|
-
var
|
|
3239
|
+
var di = class {
|
|
3239
3240
|
path;
|
|
3240
3241
|
absolute;
|
|
3241
3242
|
entry;
|
|
@@ -3248,28 +3249,28 @@ var fi = class {
|
|
|
3248
3249
|
this.path = t || "./", this.absolute = e;
|
|
3249
3250
|
}
|
|
3250
3251
|
};
|
|
3251
|
-
var
|
|
3252
|
-
var
|
|
3252
|
+
var tr = Buffer.alloc(1024);
|
|
3253
|
+
var oi = /* @__PURE__ */ Symbol("onStat");
|
|
3253
3254
|
var me = /* @__PURE__ */ Symbol("ended");
|
|
3254
3255
|
var W = /* @__PURE__ */ Symbol("queue");
|
|
3255
3256
|
var Ct = /* @__PURE__ */ Symbol("current");
|
|
3256
3257
|
var Ft = /* @__PURE__ */ Symbol("process");
|
|
3257
3258
|
var pe = /* @__PURE__ */ Symbol("processing");
|
|
3258
|
-
var
|
|
3259
|
+
var rs = /* @__PURE__ */ Symbol("processJob");
|
|
3259
3260
|
var G = /* @__PURE__ */ Symbol("jobs");
|
|
3260
|
-
var
|
|
3261
|
-
var
|
|
3262
|
-
var
|
|
3263
|
-
var
|
|
3264
|
-
var
|
|
3265
|
-
var
|
|
3266
|
-
var
|
|
3267
|
-
var
|
|
3268
|
-
var
|
|
3269
|
-
var
|
|
3270
|
-
var
|
|
3271
|
-
var
|
|
3272
|
-
var Et = class extends
|
|
3261
|
+
var ns = /* @__PURE__ */ Symbol("jobDone");
|
|
3262
|
+
var hi = /* @__PURE__ */ Symbol("addFSEntry");
|
|
3263
|
+
var er = /* @__PURE__ */ Symbol("addTarEntry");
|
|
3264
|
+
var as = /* @__PURE__ */ Symbol("stat");
|
|
3265
|
+
var ls = /* @__PURE__ */ Symbol("readdir");
|
|
3266
|
+
var ai = /* @__PURE__ */ Symbol("onreaddir");
|
|
3267
|
+
var li = /* @__PURE__ */ Symbol("pipe");
|
|
3268
|
+
var ir = /* @__PURE__ */ Symbol("entry");
|
|
3269
|
+
var os = /* @__PURE__ */ Symbol("entryOpt");
|
|
3270
|
+
var ci = /* @__PURE__ */ Symbol("writeEntryClass");
|
|
3271
|
+
var rr = /* @__PURE__ */ Symbol("write");
|
|
3272
|
+
var hs = /* @__PURE__ */ Symbol("ondrain");
|
|
3273
|
+
var Et = class extends D {
|
|
3273
3274
|
sync = false;
|
|
3274
3275
|
opt;
|
|
3275
3276
|
cwd;
|
|
@@ -3290,22 +3291,22 @@ var Et = class extends A {
|
|
|
3290
3291
|
mtime;
|
|
3291
3292
|
filter;
|
|
3292
3293
|
jobs;
|
|
3293
|
-
[
|
|
3294
|
+
[ci];
|
|
3294
3295
|
onWriteEntry;
|
|
3295
3296
|
[W];
|
|
3296
3297
|
[G] = 0;
|
|
3297
3298
|
[pe] = false;
|
|
3298
3299
|
[me] = false;
|
|
3299
3300
|
constructor(t = {}) {
|
|
3300
|
-
if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[
|
|
3301
|
+
if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[ci] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
|
|
3301
3302
|
if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
|
|
3302
|
-
if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new
|
|
3303
|
+
if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new Pe(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new He(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ze(t.zstd)), !this.zip) throw new Error("impossible");
|
|
3303
3304
|
let e = this.zip;
|
|
3304
|
-
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[
|
|
3305
|
-
} else this.on("drain", this[
|
|
3306
|
-
this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new
|
|
3305
|
+
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[hs]()), this.on("resume", () => e.resume());
|
|
3306
|
+
} else this.on("drain", this[hs]);
|
|
3307
|
+
this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new ni(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[pe] = false, this[me] = false;
|
|
3307
3308
|
}
|
|
3308
|
-
[
|
|
3309
|
+
[rr](t) {
|
|
3309
3310
|
return super.write(t);
|
|
3310
3311
|
}
|
|
3311
3312
|
add(t) {
|
|
@@ -3316,97 +3317,97 @@ var Et = class extends A {
|
|
|
3316
3317
|
}
|
|
3317
3318
|
write(t) {
|
|
3318
3319
|
if (this[me]) throw new Error("write after end");
|
|
3319
|
-
return t instanceof Yt ? this[
|
|
3320
|
+
return t instanceof Yt ? this[er](t) : this[hi](t), this.flowing;
|
|
3320
3321
|
}
|
|
3321
|
-
[
|
|
3322
|
-
let e = f(
|
|
3322
|
+
[er](t) {
|
|
3323
|
+
let e = f(sr.resolve(this.cwd, t.path));
|
|
3323
3324
|
if (!this.filter(t.path, t)) t.resume();
|
|
3324
3325
|
else {
|
|
3325
|
-
let i = new
|
|
3326
|
-
i.entry = new
|
|
3326
|
+
let i = new di(t.path, e);
|
|
3327
|
+
i.entry = new ri(t, this[os](i)), i.entry.on("end", () => this[ns](i)), this[G] += 1, this[W].push(i);
|
|
3327
3328
|
}
|
|
3328
3329
|
this[Ft]();
|
|
3329
3330
|
}
|
|
3330
|
-
[
|
|
3331
|
-
let e = f(
|
|
3332
|
-
this[W].push(new
|
|
3331
|
+
[hi](t) {
|
|
3332
|
+
let e = f(sr.resolve(this.cwd, t));
|
|
3333
|
+
this[W].push(new di(t, e)), this[Ft]();
|
|
3333
3334
|
}
|
|
3334
|
-
[
|
|
3335
|
+
[as](t) {
|
|
3335
3336
|
t.pending = true, this[G] += 1;
|
|
3336
3337
|
let e = this.follow ? "stat" : "lstat";
|
|
3337
|
-
|
|
3338
|
-
t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[
|
|
3338
|
+
fi[e](t.absolute, (i, r) => {
|
|
3339
|
+
t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[oi](t, r);
|
|
3339
3340
|
});
|
|
3340
3341
|
}
|
|
3341
|
-
[
|
|
3342
|
-
this.statCache.set(t.absolute, e), t.stat = e, this.filter(t.path, e) ? e.isFile() && e.nlink > 1 && t === this[Ct] && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync && this[
|
|
3342
|
+
[oi](t, e) {
|
|
3343
|
+
this.statCache.set(t.absolute, e), t.stat = e, this.filter(t.path, e) ? e.isFile() && e.nlink > 1 && t === this[Ct] && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync && this[rs](t) : t.ignore = true, this[Ft]();
|
|
3343
3344
|
}
|
|
3344
|
-
[
|
|
3345
|
-
t.pending = true, this[G] += 1,
|
|
3345
|
+
[ls](t) {
|
|
3346
|
+
t.pending = true, this[G] += 1, fi.readdir(t.absolute, (e, i) => {
|
|
3346
3347
|
if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
|
|
3347
|
-
this[
|
|
3348
|
+
this[ai](t, i);
|
|
3348
3349
|
});
|
|
3349
3350
|
}
|
|
3350
|
-
[
|
|
3351
|
+
[ai](t, e) {
|
|
3351
3352
|
this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
|
|
3352
3353
|
}
|
|
3353
3354
|
[Ft]() {
|
|
3354
3355
|
if (!this[pe]) {
|
|
3355
3356
|
this[pe] = true;
|
|
3356
|
-
for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[
|
|
3357
|
+
for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[rs](t.value), t.value.ignore) {
|
|
3357
3358
|
let e = t.next;
|
|
3358
3359
|
this[W].removeNode(t), t.next = e;
|
|
3359
3360
|
}
|
|
3360
|
-
this[pe] = false, this[me] &&
|
|
3361
|
+
this[pe] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(tr) : (super.write(tr), super.end()));
|
|
3361
3362
|
}
|
|
3362
3363
|
}
|
|
3363
3364
|
get [Ct]() {
|
|
3364
3365
|
return this[W] && this[W].head && this[W].head.value;
|
|
3365
3366
|
}
|
|
3366
|
-
[
|
|
3367
|
+
[ns](t) {
|
|
3367
3368
|
this[W].shift(), this[G] -= 1, this[Ft]();
|
|
3368
3369
|
}
|
|
3369
|
-
[
|
|
3370
|
+
[rs](t) {
|
|
3370
3371
|
if (!t.pending) {
|
|
3371
3372
|
if (t.entry) {
|
|
3372
|
-
t === this[Ct] && !t.piped && this[
|
|
3373
|
+
t === this[Ct] && !t.piped && this[li](t);
|
|
3373
3374
|
return;
|
|
3374
3375
|
}
|
|
3375
3376
|
if (!t.stat) {
|
|
3376
3377
|
let e = this.statCache.get(t.absolute);
|
|
3377
|
-
e ? this[
|
|
3378
|
+
e ? this[oi](t, e) : this[as](t);
|
|
3378
3379
|
}
|
|
3379
3380
|
if (t.stat && !t.ignore) {
|
|
3380
3381
|
if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
|
|
3381
3382
|
let e = this.readdirCache.get(t.absolute);
|
|
3382
|
-
if (e ? this[
|
|
3383
|
+
if (e ? this[ai](t, e) : this[ls](t), !t.readdir) return;
|
|
3383
3384
|
}
|
|
3384
|
-
if (t.entry = this[
|
|
3385
|
+
if (t.entry = this[ir](t), !t.entry) {
|
|
3385
3386
|
t.ignore = true;
|
|
3386
3387
|
return;
|
|
3387
3388
|
}
|
|
3388
|
-
t === this[Ct] && !t.piped && this[
|
|
3389
|
+
t === this[Ct] && !t.piped && this[li](t);
|
|
3389
3390
|
}
|
|
3390
3391
|
}
|
|
3391
3392
|
}
|
|
3392
|
-
[
|
|
3393
|
+
[os](t) {
|
|
3393
3394
|
return { onwarn: (e, i, r) => this.warn(e, i, r), noPax: this.noPax, cwd: this.cwd, absolute: t.absolute, preservePaths: this.preservePaths, maxReadSize: this.maxReadSize, strict: this.strict, portable: this.portable, linkCache: this.linkCache, statCache: this.statCache, noMtime: this.noMtime, mtime: this.mtime, prefix: this.prefix, onWriteEntry: this.onWriteEntry };
|
|
3394
3395
|
}
|
|
3395
|
-
[
|
|
3396
|
+
[ir](t) {
|
|
3396
3397
|
this[G] += 1;
|
|
3397
3398
|
try {
|
|
3398
|
-
return new this[
|
|
3399
|
+
return new this[ci](t.path, this[os](t)).on("end", () => this[ns](t)).on("error", (i) => this.emit("error", i));
|
|
3399
3400
|
} catch (e) {
|
|
3400
3401
|
this.emit("error", e);
|
|
3401
3402
|
}
|
|
3402
3403
|
}
|
|
3403
|
-
[
|
|
3404
|
+
[hs]() {
|
|
3404
3405
|
this[Ct] && this[Ct].entry && this[Ct].entry.resume();
|
|
3405
3406
|
}
|
|
3406
|
-
[
|
|
3407
|
+
[li](t) {
|
|
3407
3408
|
t.piped = true, t.readdir && t.readdir.forEach((r) => {
|
|
3408
3409
|
let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
|
|
3409
|
-
this[
|
|
3410
|
+
this[hi](o + r);
|
|
3410
3411
|
});
|
|
3411
3412
|
let e = t.entry, i = this.zip;
|
|
3412
3413
|
if (!e) throw new Error("cannot pipe without source");
|
|
@@ -3426,131 +3427,129 @@ var Et = class extends A {
|
|
|
3426
3427
|
var kt = class extends Et {
|
|
3427
3428
|
sync = true;
|
|
3428
3429
|
constructor(t) {
|
|
3429
|
-
super(t), this[
|
|
3430
|
+
super(t), this[ci] = si;
|
|
3430
3431
|
}
|
|
3431
3432
|
pause() {
|
|
3432
3433
|
}
|
|
3433
3434
|
resume() {
|
|
3434
3435
|
}
|
|
3435
|
-
[
|
|
3436
|
+
[as](t) {
|
|
3436
3437
|
let e = this.follow ? "statSync" : "lstatSync";
|
|
3437
|
-
this[
|
|
3438
|
+
this[oi](t, fi[e](t.absolute));
|
|
3438
3439
|
}
|
|
3439
|
-
[
|
|
3440
|
-
this[
|
|
3440
|
+
[ls](t) {
|
|
3441
|
+
this[ai](t, fi.readdirSync(t.absolute));
|
|
3441
3442
|
}
|
|
3442
|
-
[
|
|
3443
|
+
[li](t) {
|
|
3443
3444
|
let e = t.entry, i = this.zip;
|
|
3444
3445
|
if (t.readdir && t.readdir.forEach((r) => {
|
|
3445
3446
|
let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
|
|
3446
|
-
this[
|
|
3447
|
+
this[hi](o + r);
|
|
3447
3448
|
}), !e) throw new Error("Cannot pipe without source");
|
|
3448
3449
|
i ? e.on("data", (r) => {
|
|
3449
3450
|
i.write(r);
|
|
3450
3451
|
}) : e.on("data", (r) => {
|
|
3451
|
-
super[
|
|
3452
|
+
super[rr](r);
|
|
3452
3453
|
});
|
|
3453
3454
|
}
|
|
3454
3455
|
};
|
|
3455
|
-
var
|
|
3456
|
+
var Un = (s3, t) => {
|
|
3456
3457
|
let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
|
|
3457
|
-
e.pipe(i),
|
|
3458
|
+
e.pipe(i), or(e, t);
|
|
3458
3459
|
};
|
|
3459
|
-
var
|
|
3460
|
+
var Hn = (s3, t) => {
|
|
3460
3461
|
let e = new Et(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
|
|
3461
3462
|
e.pipe(i);
|
|
3462
3463
|
let r = new Promise((n, o) => {
|
|
3463
3464
|
i.on("error", o), i.on("close", n), e.on("error", o);
|
|
3464
3465
|
});
|
|
3465
|
-
return
|
|
3466
|
+
return hr(e, t).catch((n) => e.emit("error", n)), r;
|
|
3466
3467
|
};
|
|
3467
|
-
var
|
|
3468
|
+
var or = (s3, t) => {
|
|
3468
3469
|
t.forEach((e) => {
|
|
3469
|
-
e.charAt(0) === "@" ? It({ file:
|
|
3470
|
+
e.charAt(0) === "@" ? It({ file: nr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
3470
3471
|
}), s3.end();
|
|
3471
3472
|
};
|
|
3472
|
-
var
|
|
3473
|
-
for (let e
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
s3.add(r);
|
|
3477
|
-
} }) : s3.add(i);
|
|
3478
|
-
}
|
|
3473
|
+
var hr = async (s3, t) => {
|
|
3474
|
+
for (let e of t) e.charAt(0) === "@" ? await It({ file: nr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
|
|
3475
|
+
s3.add(i);
|
|
3476
|
+
} }) : s3.add(e);
|
|
3479
3477
|
s3.end();
|
|
3480
3478
|
};
|
|
3481
|
-
var
|
|
3479
|
+
var Wn = (s3, t) => {
|
|
3482
3480
|
let e = new kt(s3);
|
|
3483
|
-
return
|
|
3481
|
+
return or(e, t), e;
|
|
3484
3482
|
};
|
|
3485
|
-
var
|
|
3483
|
+
var Gn = (s3, t) => {
|
|
3486
3484
|
let e = new Et(s3);
|
|
3487
|
-
return
|
|
3485
|
+
return hr(e, t).catch((i) => e.emit("error", i)), e;
|
|
3488
3486
|
};
|
|
3489
|
-
var
|
|
3487
|
+
var Zn = K(Un, Hn, Wn, Gn, (s3, t) => {
|
|
3490
3488
|
if (!t?.length) throw new TypeError("no paths specified to add to archive");
|
|
3491
3489
|
});
|
|
3492
|
-
var
|
|
3493
|
-
var
|
|
3494
|
-
var { O_CREAT:
|
|
3495
|
-
var
|
|
3496
|
-
var
|
|
3497
|
-
var
|
|
3498
|
-
var
|
|
3499
|
-
var
|
|
3500
|
-
var cs = (s3
|
|
3490
|
+
var Yn = process.env.__FAKE_PLATFORM__ || process.platform;
|
|
3491
|
+
var fr = Yn === "win32";
|
|
3492
|
+
var { O_CREAT: dr, O_NOFOLLOW: ar, O_TRUNC: ur, O_WRONLY: mr } = cr.constants;
|
|
3493
|
+
var pr = Number(process.env.__FAKE_FS_O_FILENAME__) || cr.constants.UV_FS_O_FILEMAP || 0;
|
|
3494
|
+
var Kn = fr && !!pr;
|
|
3495
|
+
var Vn = 512 * 1024;
|
|
3496
|
+
var $n = pr | ur | dr | mr;
|
|
3497
|
+
var lr = !fr && typeof ar == "number" ? ar | ur | dr | mr : null;
|
|
3498
|
+
var cs = lr !== null ? () => lr : Kn ? (s3) => s3 < Vn ? $n : "w" : () => "w";
|
|
3499
|
+
var fs = (s3, t, e) => {
|
|
3501
3500
|
try {
|
|
3502
|
-
return
|
|
3501
|
+
return mi.lchownSync(s3, t, e);
|
|
3503
3502
|
} catch (i) {
|
|
3504
3503
|
if (i?.code !== "ENOENT") throw i;
|
|
3505
3504
|
}
|
|
3506
3505
|
};
|
|
3507
|
-
var
|
|
3508
|
-
|
|
3506
|
+
var ui = (s3, t, e, i) => {
|
|
3507
|
+
mi.lchown(s3, t, e, (r) => {
|
|
3509
3508
|
i(r && r?.code !== "ENOENT" ? r : null);
|
|
3510
3509
|
});
|
|
3511
3510
|
};
|
|
3512
|
-
var
|
|
3513
|
-
if (t.isDirectory())
|
|
3511
|
+
var Xn = (s3, t, e, i, r) => {
|
|
3512
|
+
if (t.isDirectory()) ds(Ee.resolve(s3, t.name), e, i, (n) => {
|
|
3514
3513
|
if (n) return r(n);
|
|
3515
3514
|
let o = Ee.resolve(s3, t.name);
|
|
3516
|
-
|
|
3515
|
+
ui(o, e, i, r);
|
|
3517
3516
|
});
|
|
3518
3517
|
else {
|
|
3519
3518
|
let n = Ee.resolve(s3, t.name);
|
|
3520
|
-
|
|
3519
|
+
ui(n, e, i, r);
|
|
3521
3520
|
}
|
|
3522
3521
|
};
|
|
3523
|
-
var
|
|
3524
|
-
|
|
3522
|
+
var ds = (s3, t, e, i) => {
|
|
3523
|
+
mi.readdir(s3, { withFileTypes: true }, (r, n) => {
|
|
3525
3524
|
if (r) {
|
|
3526
3525
|
if (r.code === "ENOENT") return i();
|
|
3527
3526
|
if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
|
|
3528
3527
|
}
|
|
3529
|
-
if (r || !n.length) return
|
|
3528
|
+
if (r || !n.length) return ui(s3, t, e, i);
|
|
3530
3529
|
let o = n.length, h = null, a = (l) => {
|
|
3531
3530
|
if (!h) {
|
|
3532
3531
|
if (l) return i(h = l);
|
|
3533
|
-
if (--o === 0) return
|
|
3532
|
+
if (--o === 0) return ui(s3, t, e, i);
|
|
3534
3533
|
}
|
|
3535
3534
|
};
|
|
3536
|
-
for (let l of n)
|
|
3535
|
+
for (let l of n) Xn(s3, l, t, e, a);
|
|
3537
3536
|
});
|
|
3538
3537
|
};
|
|
3539
|
-
var
|
|
3540
|
-
t.isDirectory() &&
|
|
3538
|
+
var qn = (s3, t, e, i) => {
|
|
3539
|
+
t.isDirectory() && us(Ee.resolve(s3, t.name), e, i), fs(Ee.resolve(s3, t.name), e, i);
|
|
3541
3540
|
};
|
|
3542
|
-
var
|
|
3541
|
+
var us = (s3, t, e) => {
|
|
3543
3542
|
let i;
|
|
3544
3543
|
try {
|
|
3545
|
-
i =
|
|
3544
|
+
i = mi.readdirSync(s3, { withFileTypes: true });
|
|
3546
3545
|
} catch (r) {
|
|
3547
3546
|
let n = r;
|
|
3548
3547
|
if (n?.code === "ENOENT") return;
|
|
3549
|
-
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return
|
|
3548
|
+
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs(s3, t, e);
|
|
3550
3549
|
throw n;
|
|
3551
3550
|
}
|
|
3552
|
-
for (let r of i)
|
|
3553
|
-
return
|
|
3551
|
+
for (let r of i) qn(s3, r, t, e);
|
|
3552
|
+
return fs(s3, t, e);
|
|
3554
3553
|
};
|
|
3555
3554
|
var we = class extends Error {
|
|
3556
3555
|
path;
|
|
@@ -3575,41 +3574,41 @@ var wt = class extends Error {
|
|
|
3575
3574
|
return "SymlinkError";
|
|
3576
3575
|
}
|
|
3577
3576
|
};
|
|
3578
|
-
var
|
|
3577
|
+
var Qn = (s3, t) => {
|
|
3579
3578
|
k.stat(s3, (e, i) => {
|
|
3580
3579
|
(e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
|
|
3581
3580
|
});
|
|
3582
3581
|
};
|
|
3583
|
-
var
|
|
3582
|
+
var Er = (s3, t, e) => {
|
|
3584
3583
|
s3 = f(s3);
|
|
3585
3584
|
let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, h = t.gid, a = typeof o == "number" && typeof h == "number" && (o !== t.processUid || h !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), S = (E, x) => {
|
|
3586
|
-
E ? e(E) : x && a ?
|
|
3585
|
+
E ? e(E) : x && a ? ds(x, o, h, (xe) => S(xe)) : n ? k.chmod(s3, r, e) : e();
|
|
3587
3586
|
};
|
|
3588
|
-
if (s3 === d) return
|
|
3589
|
-
if (l) return
|
|
3590
|
-
let N = f(
|
|
3591
|
-
|
|
3587
|
+
if (s3 === d) return Qn(s3, S);
|
|
3588
|
+
if (l) return jn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
|
|
3589
|
+
let N = f(pi.relative(d, s3)).split("/");
|
|
3590
|
+
ms(d, N, r, c, d, void 0, S);
|
|
3592
3591
|
};
|
|
3593
|
-
var
|
|
3594
|
-
if (
|
|
3595
|
-
let h = t.shift(), a = f(
|
|
3596
|
-
k.mkdir(a, e,
|
|
3592
|
+
var ms = (s3, t, e, i, r, n, o) => {
|
|
3593
|
+
if (t.length === 0) return o(null, n);
|
|
3594
|
+
let h = t.shift(), a = f(pi.resolve(s3 + "/" + h));
|
|
3595
|
+
k.mkdir(a, e, wr(a, t, e, i, r, n, o));
|
|
3597
3596
|
};
|
|
3598
|
-
var
|
|
3597
|
+
var wr = (s3, t, e, i, r, n, o) => (h) => {
|
|
3599
3598
|
h ? k.lstat(s3, (a, l) => {
|
|
3600
3599
|
if (a) a.path = a.path && f(a.path), o(a);
|
|
3601
|
-
else if (l.isDirectory())
|
|
3600
|
+
else if (l.isDirectory()) ms(s3, t, e, i, r, n, o);
|
|
3602
3601
|
else if (i) k.unlink(s3, (c) => {
|
|
3603
3602
|
if (c) return o(c);
|
|
3604
|
-
k.mkdir(s3, e,
|
|
3603
|
+
k.mkdir(s3, e, wr(s3, t, e, i, r, n, o));
|
|
3605
3604
|
});
|
|
3606
3605
|
else {
|
|
3607
3606
|
if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
|
|
3608
3607
|
o(h);
|
|
3609
3608
|
}
|
|
3610
|
-
}) : (n = n || s3,
|
|
3609
|
+
}) : (n = n || s3, ms(s3, t, e, i, r, n, o));
|
|
3611
3610
|
};
|
|
3612
|
-
var
|
|
3611
|
+
var Jn = (s3) => {
|
|
3613
3612
|
let t = false, e;
|
|
3614
3613
|
try {
|
|
3615
3614
|
t = k.statSync(s3).isDirectory();
|
|
@@ -3619,53 +3618,53 @@ var Qn = (s3) => {
|
|
|
3619
3618
|
if (!t) throw new we(s3, e ?? "ENOTDIR");
|
|
3620
3619
|
}
|
|
3621
3620
|
};
|
|
3622
|
-
var
|
|
3621
|
+
var Sr = (s3, t) => {
|
|
3623
3622
|
s3 = f(s3);
|
|
3624
3623
|
let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid, h = typeof n == "number" && typeof o == "number" && (n !== t.processUid || o !== t.processGid), a = t.preserve, l = t.unlink, c = f(t.cwd), d = (E) => {
|
|
3625
|
-
E && h &&
|
|
3624
|
+
E && h && us(E, n, o), r && k.chmodSync(s3, i);
|
|
3626
3625
|
};
|
|
3627
|
-
if (s3 === c) return
|
|
3626
|
+
if (s3 === c) return Jn(c), d();
|
|
3628
3627
|
if (a) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
|
|
3629
|
-
let T = f(
|
|
3628
|
+
let T = f(pi.relative(c, s3)).split("/"), N;
|
|
3630
3629
|
for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
|
|
3631
|
-
x = f(
|
|
3630
|
+
x = f(pi.resolve(x));
|
|
3632
3631
|
try {
|
|
3633
3632
|
k.mkdirSync(x, i), N = N || x;
|
|
3634
3633
|
} catch {
|
|
3635
|
-
let
|
|
3636
|
-
if (
|
|
3634
|
+
let xe = k.lstatSync(x);
|
|
3635
|
+
if (xe.isDirectory()) continue;
|
|
3637
3636
|
if (l) {
|
|
3638
3637
|
k.unlinkSync(x), k.mkdirSync(x, i), N = N || x;
|
|
3639
3638
|
continue;
|
|
3640
|
-
} else if (
|
|
3639
|
+
} else if (xe.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
|
|
3641
3640
|
}
|
|
3642
3641
|
}
|
|
3643
3642
|
return d(N);
|
|
3644
3643
|
};
|
|
3645
|
-
var
|
|
3646
|
-
var
|
|
3644
|
+
var ps = /* @__PURE__ */ Object.create(null);
|
|
3645
|
+
var yr = 1e4;
|
|
3647
3646
|
var $t = /* @__PURE__ */ new Set();
|
|
3648
|
-
var
|
|
3649
|
-
$t.has(s3) ? $t.delete(s3) :
|
|
3650
|
-
let t =
|
|
3651
|
-
if (e >
|
|
3652
|
-
for (let i of $t) if ($t.delete(i), delete
|
|
3647
|
+
var Rr = (s3) => {
|
|
3648
|
+
$t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
|
|
3649
|
+
let t = ps[s3], e = $t.size - yr;
|
|
3650
|
+
if (e > yr / 10) {
|
|
3651
|
+
for (let i of $t) if ($t.delete(i), delete ps[i], --e <= 0) break;
|
|
3653
3652
|
}
|
|
3654
3653
|
return t;
|
|
3655
3654
|
};
|
|
3656
|
-
var
|
|
3657
|
-
var
|
|
3658
|
-
var
|
|
3659
|
-
let r = e
|
|
3660
|
-
return r !== void 0 && (i =
|
|
3655
|
+
var to = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
3656
|
+
var eo = to === "win32";
|
|
3657
|
+
var io = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
|
|
3658
|
+
let r = e.at(-1);
|
|
3659
|
+
return r !== void 0 && (i = br(r, i)), e.push(i || "/"), e;
|
|
3661
3660
|
}, []);
|
|
3662
|
-
var
|
|
3661
|
+
var Ei = class {
|
|
3663
3662
|
#t = /* @__PURE__ */ new Map();
|
|
3664
3663
|
#i = /* @__PURE__ */ new Map();
|
|
3665
3664
|
#s = /* @__PURE__ */ new Set();
|
|
3666
3665
|
reserve(t, e) {
|
|
3667
|
-
t =
|
|
3668
|
-
let i = new Set(t.map((r) =>
|
|
3666
|
+
t = eo ? ["win32 parallelization disabled"] : t.map((r) => mt(br(Rr(r))));
|
|
3667
|
+
let i = new Set(t.map((r) => io(r)).reduce((r, n) => r.concat(n)));
|
|
3669
3668
|
this.#i.set(e, { dirs: i, paths: t });
|
|
3670
3669
|
for (let r of t) {
|
|
3671
3670
|
let n = this.#t.get(r);
|
|
@@ -3675,7 +3674,7 @@ var pi = class {
|
|
|
3675
3674
|
let n = this.#t.get(r);
|
|
3676
3675
|
if (!n) this.#t.set(r, [/* @__PURE__ */ new Set([e])]);
|
|
3677
3676
|
else {
|
|
3678
|
-
let o = n
|
|
3677
|
+
let o = n.at(-1);
|
|
3679
3678
|
o instanceof Set ? o.add(e) : n.push(/* @__PURE__ */ new Set([e]));
|
|
3680
3679
|
}
|
|
3681
3680
|
}
|
|
@@ -3723,55 +3722,55 @@ var pi = class {
|
|
|
3723
3722
|
return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
|
|
3724
3723
|
}
|
|
3725
3724
|
};
|
|
3726
|
-
var
|
|
3727
|
-
var
|
|
3728
|
-
var
|
|
3729
|
-
var
|
|
3730
|
-
var
|
|
3725
|
+
var _r = () => process.umask();
|
|
3726
|
+
var gr = /* @__PURE__ */ Symbol("onEntry");
|
|
3727
|
+
var ys = /* @__PURE__ */ Symbol("checkFs");
|
|
3728
|
+
var Or = /* @__PURE__ */ Symbol("checkFs2");
|
|
3729
|
+
var Rs = /* @__PURE__ */ Symbol("isReusable");
|
|
3731
3730
|
var P = /* @__PURE__ */ Symbol("makeFs");
|
|
3732
|
-
var
|
|
3733
|
-
var
|
|
3734
|
-
var
|
|
3735
|
-
var
|
|
3736
|
-
var
|
|
3731
|
+
var bs = /* @__PURE__ */ Symbol("file");
|
|
3732
|
+
var _s = /* @__PURE__ */ Symbol("directory");
|
|
3733
|
+
var Si = /* @__PURE__ */ Symbol("link");
|
|
3734
|
+
var Tr = /* @__PURE__ */ Symbol("symlink");
|
|
3735
|
+
var xr = /* @__PURE__ */ Symbol("hardlink");
|
|
3737
3736
|
var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
|
|
3738
|
-
var
|
|
3739
|
-
var
|
|
3740
|
-
var
|
|
3737
|
+
var Lr = /* @__PURE__ */ Symbol("unsupported");
|
|
3738
|
+
var Nr = /* @__PURE__ */ Symbol("checkPath");
|
|
3739
|
+
var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
|
|
3741
3740
|
var St = /* @__PURE__ */ Symbol("mkdir");
|
|
3742
3741
|
var O = /* @__PURE__ */ Symbol("onError");
|
|
3743
|
-
var
|
|
3744
|
-
var
|
|
3742
|
+
var wi = /* @__PURE__ */ Symbol("pending");
|
|
3743
|
+
var Ar = /* @__PURE__ */ Symbol("pend");
|
|
3745
3744
|
var Xt = /* @__PURE__ */ Symbol("unpend");
|
|
3746
|
-
var
|
|
3747
|
-
var
|
|
3745
|
+
var ws = /* @__PURE__ */ Symbol("ended");
|
|
3746
|
+
var Ss = /* @__PURE__ */ Symbol("maybeClose");
|
|
3748
3747
|
var gs = /* @__PURE__ */ Symbol("skip");
|
|
3749
3748
|
var Re = /* @__PURE__ */ Symbol("doChown");
|
|
3750
3749
|
var be = /* @__PURE__ */ Symbol("uid");
|
|
3751
|
-
var
|
|
3752
|
-
var
|
|
3753
|
-
var
|
|
3754
|
-
var Oe =
|
|
3755
|
-
var
|
|
3756
|
-
var
|
|
3750
|
+
var _e = /* @__PURE__ */ Symbol("gid");
|
|
3751
|
+
var ge = /* @__PURE__ */ Symbol("checkedCwd");
|
|
3752
|
+
var ro = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
3753
|
+
var Oe = ro === "win32";
|
|
3754
|
+
var no = 1024;
|
|
3755
|
+
var oo = (s3, t) => {
|
|
3757
3756
|
if (!Oe) return u.unlink(s3, t);
|
|
3758
|
-
let e = s3 + ".DELETE." +
|
|
3757
|
+
let e = s3 + ".DELETE." + Ir(16).toString("hex");
|
|
3759
3758
|
u.rename(s3, e, (i) => {
|
|
3760
3759
|
if (i) return t(i);
|
|
3761
3760
|
u.unlink(e, t);
|
|
3762
3761
|
});
|
|
3763
3762
|
};
|
|
3764
|
-
var
|
|
3763
|
+
var ho = (s3) => {
|
|
3765
3764
|
if (!Oe) return u.unlinkSync(s3);
|
|
3766
|
-
let t = s3 + ".DELETE." +
|
|
3765
|
+
let t = s3 + ".DELETE." + Ir(16).toString("hex");
|
|
3767
3766
|
u.renameSync(s3, t), u.unlinkSync(t);
|
|
3768
3767
|
};
|
|
3769
|
-
var
|
|
3768
|
+
var Dr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
|
|
3770
3769
|
var qt = class extends st {
|
|
3771
|
-
[
|
|
3772
|
-
[
|
|
3773
|
-
[
|
|
3774
|
-
reservations = new
|
|
3770
|
+
[ws] = false;
|
|
3771
|
+
[ge] = false;
|
|
3772
|
+
[wi] = 0;
|
|
3773
|
+
reservations = new Ei();
|
|
3775
3774
|
transform;
|
|
3776
3775
|
writable = true;
|
|
3777
3776
|
readable = false;
|
|
@@ -3798,34 +3797,32 @@ var qt = class extends st {
|
|
|
3798
3797
|
chmod;
|
|
3799
3798
|
constructor(t = {}) {
|
|
3800
3799
|
if (t.ondone = () => {
|
|
3801
|
-
this[
|
|
3800
|
+
this[ws] = true, this[Ss]();
|
|
3802
3801
|
}, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
|
|
3803
3802
|
if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
|
|
3804
3803
|
if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
3805
3804
|
this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
|
|
3806
3805
|
} else this.uid = void 0, this.gid = void 0, this.setOwner = false;
|
|
3807
|
-
t.preserveOwner === void 0 && typeof t.uid != "number" ?
|
|
3806
|
+
this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : no, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : _r() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[gr](e));
|
|
3808
3807
|
}
|
|
3809
3808
|
warn(t, e, i = {}) {
|
|
3810
3809
|
return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
|
|
3811
3810
|
}
|
|
3812
|
-
[
|
|
3813
|
-
this[
|
|
3811
|
+
[Ss]() {
|
|
3812
|
+
this[ws] && this[wi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
|
|
3814
3813
|
}
|
|
3815
|
-
[
|
|
3814
|
+
[Es](t, e) {
|
|
3816
3815
|
let i = t[e], { type: r } = t;
|
|
3817
3816
|
if (!i || this.preservePaths) return true;
|
|
3818
|
-
let [n, o] = ce(i), h = o.
|
|
3817
|
+
let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
|
|
3819
3818
|
if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
|
|
3820
3819
|
if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
|
|
3824
|
-
}
|
|
3820
|
+
let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, h.join("/")));
|
|
3821
|
+
if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
|
|
3825
3822
|
}
|
|
3826
3823
|
return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
|
|
3827
3824
|
}
|
|
3828
|
-
[
|
|
3825
|
+
[Nr](t) {
|
|
3829
3826
|
let e = f(t.path), i = e.split("/");
|
|
3830
3827
|
if (this.strip) {
|
|
3831
3828
|
if (i.length < this.strip) return false;
|
|
@@ -3837,20 +3834,20 @@ var qt = class extends st {
|
|
|
3837
3834
|
i.splice(0, this.strip), t.path = i.join("/");
|
|
3838
3835
|
}
|
|
3839
3836
|
if (isFinite(this.maxDepth) && i.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", { entry: t, path: e, depth: i.length, maxDepth: this.maxDepth }), false;
|
|
3840
|
-
if (!this[
|
|
3841
|
-
if (R.isAbsolute(t.path) ?
|
|
3837
|
+
if (!this[Es](t, "path") || !this[Es](t, "linkpath")) return false;
|
|
3838
|
+
if (t.absolute = R.isAbsolute(t.path) ? f(R.resolve(t.path)) : f(R.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
|
|
3842
3839
|
if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
|
|
3843
3840
|
if (this.win32) {
|
|
3844
3841
|
let { root: r } = R.win32.parse(String(t.absolute));
|
|
3845
|
-
t.absolute = r +
|
|
3842
|
+
t.absolute = r + Xi(String(t.absolute).slice(r.length));
|
|
3846
3843
|
let { root: n } = R.win32.parse(t.path);
|
|
3847
|
-
t.path = n +
|
|
3844
|
+
t.path = n + Xi(t.path.slice(n.length));
|
|
3848
3845
|
}
|
|
3849
3846
|
return true;
|
|
3850
3847
|
}
|
|
3851
|
-
[
|
|
3852
|
-
if (!this[
|
|
3853
|
-
switch (
|
|
3848
|
+
[gr](t) {
|
|
3849
|
+
if (!this[Nr](t)) return t.resume();
|
|
3850
|
+
switch (so.equal(typeof t.absolute, "string"), t.type) {
|
|
3854
3851
|
case "Directory":
|
|
3855
3852
|
case "GNUDumpDir":
|
|
3856
3853
|
t.mode && (t.mode = t.mode | 448);
|
|
@@ -3859,28 +3856,28 @@ var qt = class extends st {
|
|
|
3859
3856
|
case "ContiguousFile":
|
|
3860
3857
|
case "Link":
|
|
3861
3858
|
case "SymbolicLink":
|
|
3862
|
-
return this[
|
|
3859
|
+
return this[ys](t);
|
|
3863
3860
|
default:
|
|
3864
|
-
return this[
|
|
3861
|
+
return this[Lr](t);
|
|
3865
3862
|
}
|
|
3866
3863
|
}
|
|
3867
3864
|
[O](t, e) {
|
|
3868
3865
|
t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
|
|
3869
3866
|
}
|
|
3870
3867
|
[St](t, e, i) {
|
|
3871
|
-
|
|
3868
|
+
Er(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
|
|
3872
3869
|
}
|
|
3873
3870
|
[Re](t) {
|
|
3874
3871
|
return this.forceChown || this.preserveOwner && (typeof t.uid == "number" && t.uid !== this.processUid || typeof t.gid == "number" && t.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
|
|
3875
3872
|
}
|
|
3876
3873
|
[be](t) {
|
|
3877
|
-
return
|
|
3874
|
+
return Dr(this.uid, t.uid, this.processUid);
|
|
3878
3875
|
}
|
|
3879
|
-
[
|
|
3880
|
-
return
|
|
3876
|
+
[_e](t) {
|
|
3877
|
+
return Dr(this.gid, t.gid, this.processGid);
|
|
3881
3878
|
}
|
|
3882
|
-
[
|
|
3883
|
-
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), { flags:
|
|
3879
|
+
[bs](t, e) {
|
|
3880
|
+
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), { flags: cs(t.size), mode: i, autoClose: false });
|
|
3884
3881
|
r.on("error", (a) => {
|
|
3885
3882
|
r.fd && u.close(r.fd, () => {
|
|
3886
3883
|
}), r.write = () => true, this[O](a, t), e();
|
|
@@ -3904,7 +3901,7 @@ var qt = class extends st {
|
|
|
3904
3901
|
}
|
|
3905
3902
|
if (typeof l == "number" && this[Re](t)) {
|
|
3906
3903
|
n++;
|
|
3907
|
-
let c = this[be](t), d = this[
|
|
3904
|
+
let c = this[be](t), d = this[_e](t);
|
|
3908
3905
|
typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (S) => S ? u.chown(a, c, d, (T) => o(T && S)) : o());
|
|
3909
3906
|
}
|
|
3910
3907
|
o();
|
|
@@ -3914,7 +3911,7 @@ var qt = class extends st {
|
|
|
3914
3911
|
this[O](a, t), e();
|
|
3915
3912
|
}), t.pipe(h)), h.pipe(r);
|
|
3916
3913
|
}
|
|
3917
|
-
[
|
|
3914
|
+
[_s](t, e) {
|
|
3918
3915
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
|
|
3919
3916
|
this[St](String(t.absolute), i, (r) => {
|
|
3920
3917
|
if (r) {
|
|
@@ -3924,21 +3921,21 @@ var qt = class extends st {
|
|
|
3924
3921
|
let n = 1, o = () => {
|
|
3925
3922
|
--n === 0 && (e(), this[Xt](), t.resume());
|
|
3926
3923
|
};
|
|
3927
|
-
t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[
|
|
3924
|
+
t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
|
|
3928
3925
|
});
|
|
3929
3926
|
}
|
|
3930
|
-
[
|
|
3927
|
+
[Lr](t) {
|
|
3931
3928
|
t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
|
|
3932
3929
|
}
|
|
3933
|
-
[
|
|
3930
|
+
[Tr](t, e) {
|
|
3934
3931
|
let i = f(R.relative(this.cwd, R.resolve(R.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
|
|
3935
|
-
this[ye](t, this.cwd, i, () => this[
|
|
3932
|
+
this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
|
|
3936
3933
|
this[O](r, t), e();
|
|
3937
3934
|
});
|
|
3938
3935
|
}
|
|
3939
|
-
[
|
|
3936
|
+
[xr](t, e) {
|
|
3940
3937
|
let i = f(R.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
|
|
3941
|
-
this[ye](t, this.cwd, r, () => this[
|
|
3938
|
+
this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e), (n) => {
|
|
3942
3939
|
this[O](n, t), e();
|
|
3943
3940
|
});
|
|
3944
3941
|
}
|
|
@@ -3952,24 +3949,24 @@ var qt = class extends st {
|
|
|
3952
3949
|
this[ye](t, h, i, r, n);
|
|
3953
3950
|
});
|
|
3954
3951
|
}
|
|
3955
|
-
[
|
|
3956
|
-
this[
|
|
3952
|
+
[Ar]() {
|
|
3953
|
+
this[wi]++;
|
|
3957
3954
|
}
|
|
3958
3955
|
[Xt]() {
|
|
3959
|
-
this[
|
|
3956
|
+
this[wi]--, this[Ss]();
|
|
3960
3957
|
}
|
|
3961
3958
|
[gs](t) {
|
|
3962
3959
|
this[Xt](), t.resume();
|
|
3963
3960
|
}
|
|
3964
|
-
[
|
|
3961
|
+
[Rs](t, e) {
|
|
3965
3962
|
return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
|
|
3966
3963
|
}
|
|
3967
|
-
[
|
|
3968
|
-
this[
|
|
3964
|
+
[ys](t) {
|
|
3965
|
+
this[Ar]();
|
|
3969
3966
|
let e = [t.path];
|
|
3970
|
-
t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[
|
|
3967
|
+
t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Or](t, i));
|
|
3971
3968
|
}
|
|
3972
|
-
[
|
|
3969
|
+
[Or](t, e) {
|
|
3973
3970
|
let i = (h) => {
|
|
3974
3971
|
e(h);
|
|
3975
3972
|
}, r = () => {
|
|
@@ -3978,7 +3975,7 @@ var qt = class extends st {
|
|
|
3978
3975
|
this[O](h, t), i();
|
|
3979
3976
|
return;
|
|
3980
3977
|
}
|
|
3981
|
-
this[
|
|
3978
|
+
this[ge] = true, n();
|
|
3982
3979
|
});
|
|
3983
3980
|
}, n = () => {
|
|
3984
3981
|
if (t.absolute !== this.cwd) {
|
|
@@ -3998,7 +3995,7 @@ var qt = class extends st {
|
|
|
3998
3995
|
this[gs](t), i();
|
|
3999
3996
|
return;
|
|
4000
3997
|
}
|
|
4001
|
-
if (h || this[
|
|
3998
|
+
if (h || this[Rs](t, a)) return this[P](null, t, i);
|
|
4002
3999
|
if (a.isDirectory()) {
|
|
4003
4000
|
if (t.type === "Directory") {
|
|
4004
4001
|
let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
|
|
@@ -4007,10 +4004,10 @@ var qt = class extends st {
|
|
|
4007
4004
|
if (t.absolute !== this.cwd) return u.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
4008
4005
|
}
|
|
4009
4006
|
if (t.absolute === this.cwd) return this[P](null, t, i);
|
|
4010
|
-
|
|
4007
|
+
oo(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
4011
4008
|
});
|
|
4012
4009
|
};
|
|
4013
|
-
this[
|
|
4010
|
+
this[ge] ? n() : r();
|
|
4014
4011
|
}
|
|
4015
4012
|
[P](t, e, i) {
|
|
4016
4013
|
if (t) {
|
|
@@ -4021,17 +4018,17 @@ var qt = class extends st {
|
|
|
4021
4018
|
case "File":
|
|
4022
4019
|
case "OldFile":
|
|
4023
4020
|
case "ContiguousFile":
|
|
4024
|
-
return this[
|
|
4021
|
+
return this[bs](e, i);
|
|
4025
4022
|
case "Link":
|
|
4026
|
-
return this[
|
|
4023
|
+
return this[xr](e, i);
|
|
4027
4024
|
case "SymbolicLink":
|
|
4028
|
-
return this[
|
|
4025
|
+
return this[Tr](e, i);
|
|
4029
4026
|
case "Directory":
|
|
4030
4027
|
case "GNUDumpDir":
|
|
4031
|
-
return this[
|
|
4028
|
+
return this[_s](e, i);
|
|
4032
4029
|
}
|
|
4033
4030
|
}
|
|
4034
|
-
[
|
|
4031
|
+
[Si](t, e, i, r) {
|
|
4035
4032
|
u[i](e, String(t.absolute), (n) => {
|
|
4036
4033
|
n ? this[O](n, t) : (this[Xt](), t.resume()), r();
|
|
4037
4034
|
});
|
|
@@ -4050,11 +4047,11 @@ var Te = class extends qt {
|
|
|
4050
4047
|
return super[P](t, e, () => {
|
|
4051
4048
|
});
|
|
4052
4049
|
}
|
|
4053
|
-
[
|
|
4054
|
-
if (!this[
|
|
4050
|
+
[ys](t) {
|
|
4051
|
+
if (!this[ge]) {
|
|
4055
4052
|
let n = this[St](this.cwd, this.dmode);
|
|
4056
4053
|
if (n) return this[O](n, t);
|
|
4057
|
-
this[
|
|
4054
|
+
this[ge] = true;
|
|
4058
4055
|
}
|
|
4059
4056
|
if (t.absolute !== this.cwd) {
|
|
4060
4057
|
let n = f(R.dirname(String(t.absolute)));
|
|
@@ -4065,7 +4062,7 @@ var Te = class extends qt {
|
|
|
4065
4062
|
}
|
|
4066
4063
|
let [e, i] = Se(() => u.lstatSync(String(t.absolute)));
|
|
4067
4064
|
if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[gs](t);
|
|
4068
|
-
if (e || this[
|
|
4065
|
+
if (e || this[Rs](t, i)) return this[P](null, t);
|
|
4069
4066
|
if (i.isDirectory()) {
|
|
4070
4067
|
if (t.type === "Directory") {
|
|
4071
4068
|
let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? Se(() => {
|
|
@@ -4076,10 +4073,10 @@ var Te = class extends qt {
|
|
|
4076
4073
|
let [n] = Se(() => u.rmdirSync(String(t.absolute)));
|
|
4077
4074
|
this[P](n, t);
|
|
4078
4075
|
}
|
|
4079
|
-
let [r] = t.absolute === this.cwd ? [] : Se(() =>
|
|
4076
|
+
let [r] = t.absolute === this.cwd ? [] : Se(() => ho(String(t.absolute)));
|
|
4080
4077
|
this[P](r, t);
|
|
4081
4078
|
}
|
|
4082
|
-
[
|
|
4079
|
+
[bs](t, e) {
|
|
4083
4080
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
|
|
4084
4081
|
let a;
|
|
4085
4082
|
try {
|
|
@@ -4090,7 +4087,7 @@ var Te = class extends qt {
|
|
|
4090
4087
|
(h || a) && this[O](h || a, t), e();
|
|
4091
4088
|
}, n;
|
|
4092
4089
|
try {
|
|
4093
|
-
n = u.openSync(String(t.absolute),
|
|
4090
|
+
n = u.openSync(String(t.absolute), cs(t.size), i);
|
|
4094
4091
|
} catch (h) {
|
|
4095
4092
|
return r(h);
|
|
4096
4093
|
}
|
|
@@ -4116,7 +4113,7 @@ var Te = class extends qt {
|
|
|
4116
4113
|
}
|
|
4117
4114
|
}
|
|
4118
4115
|
if (this[Re](t)) {
|
|
4119
|
-
let a = this[be](t), l = this[
|
|
4116
|
+
let a = this[be](t), l = this[_e](t);
|
|
4120
4117
|
try {
|
|
4121
4118
|
u.fchownSync(n, Number(a), Number(l));
|
|
4122
4119
|
} catch (c) {
|
|
@@ -4130,7 +4127,7 @@ var Te = class extends qt {
|
|
|
4130
4127
|
r(h);
|
|
4131
4128
|
});
|
|
4132
4129
|
}
|
|
4133
|
-
[
|
|
4130
|
+
[_s](t, e) {
|
|
4134
4131
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[St](String(t.absolute), i);
|
|
4135
4132
|
if (r) {
|
|
4136
4133
|
this[O](r, t), e();
|
|
@@ -4141,20 +4138,20 @@ var Te = class extends qt {
|
|
|
4141
4138
|
} catch {
|
|
4142
4139
|
}
|
|
4143
4140
|
if (this[Re](t)) try {
|
|
4144
|
-
u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[
|
|
4141
|
+
u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
|
|
4145
4142
|
} catch {
|
|
4146
4143
|
}
|
|
4147
4144
|
e(), t.resume();
|
|
4148
4145
|
}
|
|
4149
4146
|
[St](t, e) {
|
|
4150
4147
|
try {
|
|
4151
|
-
return
|
|
4148
|
+
return Sr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
|
|
4152
4149
|
} catch (i) {
|
|
4153
4150
|
return i;
|
|
4154
4151
|
}
|
|
4155
4152
|
}
|
|
4156
4153
|
[ye](t, e, i, r, n) {
|
|
4157
|
-
if (this.preservePaths ||
|
|
4154
|
+
if (this.preservePaths || i.length === 0) return r();
|
|
4158
4155
|
let o = e;
|
|
4159
4156
|
for (let h of i) {
|
|
4160
4157
|
o = R.resolve(o, h);
|
|
@@ -4164,7 +4161,7 @@ var Te = class extends qt {
|
|
|
4164
4161
|
}
|
|
4165
4162
|
r();
|
|
4166
4163
|
}
|
|
4167
|
-
[
|
|
4164
|
+
[Si](t, e, i, r) {
|
|
4168
4165
|
let n = `${i}Sync`;
|
|
4169
4166
|
try {
|
|
4170
4167
|
u[n](e, String(t.absolute)), r(), t.resume();
|
|
@@ -4173,26 +4170,26 @@ var Te = class extends qt {
|
|
|
4173
4170
|
}
|
|
4174
4171
|
}
|
|
4175
4172
|
};
|
|
4176
|
-
var
|
|
4177
|
-
let t = new Te(s3), e = s3.file, i =
|
|
4178
|
-
new
|
|
4173
|
+
var ao = (s3) => {
|
|
4174
|
+
let t = new Te(s3), e = s3.file, i = Cr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
|
|
4175
|
+
new Me(e, { readSize: r, size: i.size }).pipe(t);
|
|
4179
4176
|
};
|
|
4180
|
-
var
|
|
4177
|
+
var lo = (s3, t) => {
|
|
4181
4178
|
let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
4182
4179
|
return new Promise((o, h) => {
|
|
4183
|
-
e.on("error", h), e.on("close", o),
|
|
4180
|
+
e.on("error", h), e.on("close", o), Cr.stat(r, (a, l) => {
|
|
4184
4181
|
if (a) h(a);
|
|
4185
4182
|
else {
|
|
4186
|
-
let c = new
|
|
4183
|
+
let c = new _t(r, { readSize: i, size: l.size });
|
|
4187
4184
|
c.on("error", h), c.pipe(e);
|
|
4188
4185
|
}
|
|
4189
4186
|
});
|
|
4190
4187
|
});
|
|
4191
4188
|
};
|
|
4192
|
-
var
|
|
4193
|
-
t?.length &&
|
|
4189
|
+
var co = K(ao, lo, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
|
|
4190
|
+
t?.length && Ki(s3, t);
|
|
4194
4191
|
});
|
|
4195
|
-
var
|
|
4192
|
+
var fo = (s3, t) => {
|
|
4196
4193
|
let e = new kt(s3), i = true, r, n;
|
|
4197
4194
|
try {
|
|
4198
4195
|
try {
|
|
@@ -4213,7 +4210,7 @@ var co = (s3, t) => {
|
|
|
4213
4210
|
if (n + l + 512 > o.size) break;
|
|
4214
4211
|
n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
|
|
4215
4212
|
}
|
|
4216
|
-
i = false,
|
|
4213
|
+
i = false, uo(s3, e, n, r, t);
|
|
4217
4214
|
} finally {
|
|
4218
4215
|
if (i) try {
|
|
4219
4216
|
v.closeSync(r);
|
|
@@ -4221,11 +4218,11 @@ var co = (s3, t) => {
|
|
|
4221
4218
|
}
|
|
4222
4219
|
}
|
|
4223
4220
|
};
|
|
4224
|
-
var
|
|
4221
|
+
var uo = (s3, t, e, i, r) => {
|
|
4225
4222
|
let n = new Wt(s3.file, { fd: i, start: e });
|
|
4226
|
-
t.pipe(n),
|
|
4223
|
+
t.pipe(n), po(t, r);
|
|
4227
4224
|
};
|
|
4228
|
-
var
|
|
4225
|
+
var mo = (s3, t) => {
|
|
4229
4226
|
t = Array.from(t);
|
|
4230
4227
|
let e = new Et(s3), i = (n, o, h) => {
|
|
4231
4228
|
let a = (T, N) => {
|
|
@@ -4233,7 +4230,7 @@ var uo = (s3, t) => {
|
|
|
4233
4230
|
}, l = 0;
|
|
4234
4231
|
if (o === 0) return a(null, 0);
|
|
4235
4232
|
let c = 0, d = Buffer.alloc(512), S = (T, N) => {
|
|
4236
|
-
if (T ||
|
|
4233
|
+
if (T || N === void 0) return a(T);
|
|
4237
4234
|
if (c += N, c < 512 && N) return v.read(n, d, c, d.length - c, l + c, S);
|
|
4238
4235
|
if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
|
|
4239
4236
|
if (c < 512) return a(null, l);
|
|
@@ -4255,38 +4252,35 @@ var uo = (s3, t) => {
|
|
|
4255
4252
|
i(c, S.size, (T, N) => {
|
|
4256
4253
|
if (T) return o(T);
|
|
4257
4254
|
let E = new tt(s3.file, { fd: c, start: N });
|
|
4258
|
-
e.pipe(E), E.on("error", o), E.on("close", n),
|
|
4255
|
+
e.pipe(E), E.on("error", o), E.on("close", n), Eo(e, t);
|
|
4259
4256
|
});
|
|
4260
4257
|
});
|
|
4261
4258
|
};
|
|
4262
4259
|
v.open(s3.file, h, a);
|
|
4263
4260
|
});
|
|
4264
4261
|
};
|
|
4265
|
-
var
|
|
4262
|
+
var po = (s3, t) => {
|
|
4266
4263
|
t.forEach((e) => {
|
|
4267
|
-
e.charAt(0) === "@" ? It({ file:
|
|
4264
|
+
e.charAt(0) === "@" ? It({ file: Fr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
4268
4265
|
}), s3.end();
|
|
4269
4266
|
};
|
|
4270
|
-
var
|
|
4271
|
-
for (let e
|
|
4272
|
-
let i = String(t[e]);
|
|
4273
|
-
i.charAt(0) === "@" ? await It({ file: Nr.resolve(String(s3.cwd), i.slice(1)), noResume: true, onReadEntry: (r) => s3.add(r) }) : s3.add(i);
|
|
4274
|
-
}
|
|
4267
|
+
var Eo = async (s3, t) => {
|
|
4268
|
+
for (let e of t) e.charAt(0) === "@" ? await It({ file: Fr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
4275
4269
|
s3.end();
|
|
4276
4270
|
};
|
|
4277
|
-
var vt = K(
|
|
4271
|
+
var vt = K(fo, mo, () => {
|
|
4278
4272
|
throw new TypeError("file is required");
|
|
4279
4273
|
}, () => {
|
|
4280
4274
|
throw new TypeError("file is required");
|
|
4281
4275
|
}, (s3, t) => {
|
|
4282
|
-
if (!
|
|
4276
|
+
if (!Fs(s3)) throw new TypeError("file is required");
|
|
4283
4277
|
if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
|
|
4284
4278
|
if (!t?.length) throw new TypeError("no paths specified to add/replace");
|
|
4285
4279
|
});
|
|
4286
|
-
var
|
|
4287
|
-
vt.validate?.(s3, t),
|
|
4280
|
+
var wo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
|
|
4281
|
+
vt.validate?.(s3, t), So(s3);
|
|
4288
4282
|
});
|
|
4289
|
-
var
|
|
4283
|
+
var So = (s3) => {
|
|
4290
4284
|
let t = s3.filter;
|
|
4291
4285
|
s3.mtimeCache || (s3.mtimeCache = /* @__PURE__ */ new Map()), s3.filter = t ? (e, i) => t(e, i) && !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0)) : (e, i) => !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0));
|
|
4292
4286
|
};
|
|
@@ -4294,5 +4288,5 @@ var wo = (s3) => {
|
|
|
4294
4288
|
export {
|
|
4295
4289
|
require_lib,
|
|
4296
4290
|
It,
|
|
4297
|
-
|
|
4291
|
+
Zn
|
|
4298
4292
|
};
|