@brainbase-labs/cli 0.27.0 → 0.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -3
- package/dist/index.js +1055 -980
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -29503,13 +29503,13 @@ var require_codegen = __commonJS((exports) => {
|
|
|
29503
29503
|
this._currNode.nodes.push(node);
|
|
29504
29504
|
this._nodes.push(node);
|
|
29505
29505
|
}
|
|
29506
|
-
_endBlockNode(N1,
|
|
29506
|
+
_endBlockNode(N1, N22) {
|
|
29507
29507
|
const n = this._currNode;
|
|
29508
|
-
if (n instanceof N1 ||
|
|
29508
|
+
if (n instanceof N1 || N22 && n instanceof N22) {
|
|
29509
29509
|
this._nodes.pop();
|
|
29510
29510
|
return this;
|
|
29511
29511
|
}
|
|
29512
|
-
throw new Error(`CodeGen: not in block "${
|
|
29512
|
+
throw new Error(`CodeGen: not in block "${N22 ? `${N1.kind}/${N22.kind}` : N1.kind}"`);
|
|
29513
29513
|
}
|
|
29514
29514
|
_elseNode(node) {
|
|
29515
29515
|
const n = this._currNode;
|
|
@@ -29584,7 +29584,7 @@ var require_codegen = __commonJS((exports) => {
|
|
|
29584
29584
|
}
|
|
29585
29585
|
exports.or = or2;
|
|
29586
29586
|
function mappend(op) {
|
|
29587
|
-
return (x3,
|
|
29587
|
+
return (x3, y3) => x3 === code_1.nil ? y3 : y3 === code_1.nil ? x3 : (0, code_1._)`${par(x3)} ${op} ${par(y3)}`;
|
|
29588
29588
|
}
|
|
29589
29589
|
function par(x3) {
|
|
29590
29590
|
return x3 instanceof code_1.Name ? x3 : (0, code_1._)`(${x3})`;
|
|
@@ -32437,7 +32437,7 @@ var require_core = __commonJS((exports) => {
|
|
|
32437
32437
|
};
|
|
32438
32438
|
var MAX_EXPRESSION = 200;
|
|
32439
32439
|
function requiredOptions(o2) {
|
|
32440
|
-
var _a, _b, _c, _d, _e2, _f, _g, _h, _j, _k, _l, _m,
|
|
32440
|
+
var _a, _b, _c, _d, _e2, _f, _g, _h, _j, _k, _l, _m, _o2, _p, _q, _r2, _s2, _t2, _u, _v, _w, _x, _y, _z, _0;
|
|
32441
32441
|
const s3 = o2.strict;
|
|
32442
32442
|
const _optz = (_a = o2.code) === null || _a === undefined ? undefined : _a.optimize;
|
|
32443
32443
|
const optimize = _optz === true || _optz === undefined ? 1 : _optz || 0;
|
|
@@ -32448,7 +32448,7 @@ var require_core = __commonJS((exports) => {
|
|
|
32448
32448
|
strictNumbers: (_h = (_g = o2.strictNumbers) !== null && _g !== undefined ? _g : s3) !== null && _h !== undefined ? _h : true,
|
|
32449
32449
|
strictTypes: (_k = (_j = o2.strictTypes) !== null && _j !== undefined ? _j : s3) !== null && _k !== undefined ? _k : "log",
|
|
32450
32450
|
strictTuples: (_m = (_l = o2.strictTuples) !== null && _l !== undefined ? _l : s3) !== null && _m !== undefined ? _m : "log",
|
|
32451
|
-
strictRequired: (_p = (
|
|
32451
|
+
strictRequired: (_p = (_o2 = o2.strictRequired) !== null && _o2 !== undefined ? _o2 : s3) !== null && _p !== undefined ? _p : false,
|
|
32452
32452
|
code: o2.code ? { ...o2.code, optimize, regExp } : { optimize, regExp },
|
|
32453
32453
|
loopRequired: (_q = o2.loopRequired) !== null && _q !== undefined ? _q : MAX_EXPRESSION,
|
|
32454
32454
|
loopEnum: (_r2 = o2.loopEnum) !== null && _r2 !== undefined ? _r2 : MAX_EXPRESSION,
|
|
@@ -36008,7 +36008,7 @@ function padStart(s, n) {
|
|
|
36008
36008
|
// package.json
|
|
36009
36009
|
var package_default = {
|
|
36010
36010
|
name: "@brainbase-labs/cli",
|
|
36011
|
-
version: "0.27.
|
|
36011
|
+
version: "0.27.1",
|
|
36012
36012
|
description: "Pack, share, and install agent templates across harnesses (Claude Code, Codex, ...).",
|
|
36013
36013
|
type: "module",
|
|
36014
36014
|
bin: {
|
|
@@ -36055,7 +36055,7 @@ var package_default = {
|
|
|
36055
36055
|
picocolors: "^1.0.0",
|
|
36056
36056
|
react: "^18.3.1",
|
|
36057
36057
|
"smol-toml": "^1.6.1",
|
|
36058
|
-
tar: "^7.
|
|
36058
|
+
tar: "^7.5.22",
|
|
36059
36059
|
yaml: "^2.8.4",
|
|
36060
36060
|
zod: "^3.23.8"
|
|
36061
36061
|
},
|
|
@@ -54793,86 +54793,86 @@ import path60 from "node:path";
|
|
|
54793
54793
|
import crypto2 from "node:crypto";
|
|
54794
54794
|
|
|
54795
54795
|
// node_modules/tar/dist/esm/index.min.js
|
|
54796
|
-
import
|
|
54796
|
+
import Qr from "events";
|
|
54797
54797
|
import I3 from "fs";
|
|
54798
|
-
import { EventEmitter as
|
|
54799
|
-
import
|
|
54800
|
-
import { StringDecoder as
|
|
54801
|
-
import
|
|
54802
|
-
import
|
|
54803
|
-
import { dirname as
|
|
54804
|
-
import { EventEmitter as
|
|
54805
|
-
import
|
|
54806
|
-
import { Buffer as
|
|
54807
|
-
import * as
|
|
54808
|
-
import
|
|
54798
|
+
import { EventEmitter as Di } from "node:events";
|
|
54799
|
+
import Cs from "node:stream";
|
|
54800
|
+
import { StringDecoder as Hr } from "node:string_decoder";
|
|
54801
|
+
import cr from "node:path";
|
|
54802
|
+
import Kt from "node:fs";
|
|
54803
|
+
import { dirname as Fn, parse as kn } from "path";
|
|
54804
|
+
import { EventEmitter as Dn } from "events";
|
|
54805
|
+
import zi from "assert";
|
|
54806
|
+
import { Buffer as Ot } from "buffer";
|
|
54807
|
+
import * as Ps from "zlib";
|
|
54808
|
+
import en from "zlib";
|
|
54809
54809
|
import { posix as Zt } from "node:path";
|
|
54810
|
-
import { basename as
|
|
54811
|
-
import
|
|
54812
|
-
import
|
|
54813
|
-
import
|
|
54814
|
-
import { win32 as
|
|
54815
|
-
import
|
|
54816
|
-
import
|
|
54817
|
-
import
|
|
54818
|
-
import { randomBytes as
|
|
54810
|
+
import { basename as _n } from "node:path";
|
|
54811
|
+
import mi from "fs";
|
|
54812
|
+
import X3 from "fs";
|
|
54813
|
+
import js from "path";
|
|
54814
|
+
import { win32 as Pn } from "node:path";
|
|
54815
|
+
import ar from "path";
|
|
54816
|
+
import Br from "node:fs";
|
|
54817
|
+
import co from "node:assert";
|
|
54818
|
+
import { randomBytes as Mr } from "node:crypto";
|
|
54819
54819
|
import u from "node:fs";
|
|
54820
54820
|
import R3 from "node:path";
|
|
54821
|
-
import
|
|
54822
|
-
import
|
|
54823
|
-
import
|
|
54821
|
+
import pr from "fs";
|
|
54822
|
+
import wi from "node:fs";
|
|
54823
|
+
import we from "node:path";
|
|
54824
54824
|
import k2 from "node:fs";
|
|
54825
|
-
import
|
|
54826
|
-
import
|
|
54827
|
-
import { join as
|
|
54825
|
+
import ro from "node:fs/promises";
|
|
54826
|
+
import Si from "node:path";
|
|
54827
|
+
import { join as xr } from "node:path";
|
|
54828
54828
|
import v2 from "node:fs";
|
|
54829
|
-
import
|
|
54830
|
-
var
|
|
54831
|
-
var
|
|
54829
|
+
import Pr from "node:path";
|
|
54830
|
+
var zr = Object.defineProperty;
|
|
54831
|
+
var Ur = (s, t) => {
|
|
54832
54832
|
for (var e2 in t)
|
|
54833
|
-
|
|
54833
|
+
zr(s, e2, { get: t[e2], enumerable: true });
|
|
54834
54834
|
};
|
|
54835
|
-
var
|
|
54836
|
-
var
|
|
54837
|
-
var
|
|
54838
|
-
var
|
|
54839
|
-
var
|
|
54840
|
-
var
|
|
54841
|
-
var
|
|
54842
|
-
var
|
|
54843
|
-
var
|
|
54835
|
+
var Ds = typeof process == "object" && process ? process : { stdout: null, stderr: null };
|
|
54836
|
+
var Wr = (s) => !!s && typeof s == "object" && (s instanceof A3 || s instanceof Cs || Gr(s) || Zr(s));
|
|
54837
|
+
var Gr = (s) => !!s && typeof s == "object" && s instanceof Di && typeof s.pipe == "function" && s.pipe !== Cs.Writable.prototype.pipe;
|
|
54838
|
+
var Zr = (s) => !!s && typeof s == "object" && s instanceof Di && typeof s.write == "function" && typeof s.end == "function";
|
|
54839
|
+
var Q3 = Symbol("EOF");
|
|
54840
|
+
var J3 = Symbol("maybeEmitEnd");
|
|
54841
|
+
var nt = Symbol("emittedEnd");
|
|
54842
|
+
var De = Symbol("emittingEnd");
|
|
54843
|
+
var qt = Symbol("emittedError");
|
|
54844
54844
|
var Ne = Symbol("closed");
|
|
54845
|
-
var
|
|
54845
|
+
var Ns = Symbol("read");
|
|
54846
54846
|
var Ae = Symbol("flush");
|
|
54847
|
-
var
|
|
54847
|
+
var As = Symbol("flushChunk");
|
|
54848
54848
|
var z3 = Symbol("encoding");
|
|
54849
54849
|
var Mt = Symbol("decoder");
|
|
54850
|
-
var
|
|
54850
|
+
var g2 = Symbol("flowing");
|
|
54851
54851
|
var Qt = Symbol("paused");
|
|
54852
54852
|
var Bt = Symbol("resume");
|
|
54853
|
-
var
|
|
54854
|
-
var
|
|
54855
|
-
var
|
|
54856
|
-
var
|
|
54857
|
-
var
|
|
54853
|
+
var b3 = Symbol("buffer");
|
|
54854
|
+
var N2 = Symbol("pipes");
|
|
54855
|
+
var _3 = Symbol("bufferLength");
|
|
54856
|
+
var bi = Symbol("bufferPush");
|
|
54857
|
+
var Ie = Symbol("bufferShift");
|
|
54858
54858
|
var L2 = Symbol("objectMode");
|
|
54859
|
-
var
|
|
54860
|
-
var
|
|
54861
|
-
var
|
|
54862
|
-
var
|
|
54863
|
-
var
|
|
54859
|
+
var S3 = Symbol("destroyed");
|
|
54860
|
+
var _i = Symbol("error");
|
|
54861
|
+
var Oi = Symbol("emitData");
|
|
54862
|
+
var Is = Symbol("emitEnd");
|
|
54863
|
+
var Ti = Symbol("emitEnd2");
|
|
54864
54864
|
var Z3 = Symbol("async");
|
|
54865
|
-
var
|
|
54866
|
-
var
|
|
54865
|
+
var xi = Symbol("abort");
|
|
54866
|
+
var Ce = Symbol("aborted");
|
|
54867
54867
|
var Jt = Symbol("signal");
|
|
54868
|
-
var
|
|
54868
|
+
var Rt = Symbol("dataListeners");
|
|
54869
54869
|
var C2 = Symbol("discarded");
|
|
54870
|
-
var
|
|
54871
|
-
var
|
|
54872
|
-
var
|
|
54873
|
-
var
|
|
54874
|
-
var
|
|
54875
|
-
var
|
|
54870
|
+
var jt = (s) => Promise.resolve().then(s);
|
|
54871
|
+
var Yr = (s) => s();
|
|
54872
|
+
var Kr = (s) => s === "end" || s === "finish" || s === "prefinish";
|
|
54873
|
+
var Vr = (s) => s instanceof ArrayBuffer || !!s && typeof s == "object" && s.constructor && s.constructor.name === "ArrayBuffer" && s.byteLength >= 0;
|
|
54874
|
+
var $r = (s) => !Buffer.isBuffer(s) && ArrayBuffer.isView(s);
|
|
54875
|
+
var Fe = class {
|
|
54876
54876
|
src;
|
|
54877
54877
|
dest;
|
|
54878
54878
|
opts;
|
|
@@ -54888,7 +54888,7 @@ var Ce = class {
|
|
|
54888
54888
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
54889
54889
|
}
|
|
54890
54890
|
};
|
|
54891
|
-
var
|
|
54891
|
+
var Li = class extends Fe {
|
|
54892
54892
|
unpipe() {
|
|
54893
54893
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
54894
54894
|
}
|
|
@@ -54896,27 +54896,27 @@ var Oi = class extends Ce {
|
|
|
54896
54896
|
super(t, e2, i), this.proxyErrors = (r2) => this.dest.emit("error", r2), t.on("error", this.proxyErrors);
|
|
54897
54897
|
}
|
|
54898
54898
|
};
|
|
54899
|
-
var
|
|
54900
|
-
var
|
|
54901
|
-
var
|
|
54902
|
-
[
|
|
54899
|
+
var Xr = (s) => !!s.objectMode;
|
|
54900
|
+
var qr = (s) => !s.objectMode && !!s.encoding && s.encoding !== "buffer";
|
|
54901
|
+
var A3 = class extends Di {
|
|
54902
|
+
[g2] = false;
|
|
54903
54903
|
[Qt] = false;
|
|
54904
|
-
[
|
|
54905
|
-
[
|
|
54904
|
+
[N2] = [];
|
|
54905
|
+
[b3] = [];
|
|
54906
54906
|
[L2];
|
|
54907
54907
|
[z3];
|
|
54908
54908
|
[Z3];
|
|
54909
54909
|
[Mt];
|
|
54910
|
-
[
|
|
54911
|
-
[
|
|
54912
|
-
[
|
|
54910
|
+
[Q3] = false;
|
|
54911
|
+
[nt] = false;
|
|
54912
|
+
[De] = false;
|
|
54913
54913
|
[Ne] = false;
|
|
54914
|
-
[
|
|
54915
|
-
[
|
|
54916
|
-
[
|
|
54914
|
+
[qt] = null;
|
|
54915
|
+
[_3] = 0;
|
|
54916
|
+
[S3] = false;
|
|
54917
54917
|
[Jt];
|
|
54918
|
-
[
|
|
54919
|
-
[
|
|
54918
|
+
[Ce] = false;
|
|
54919
|
+
[Rt] = 0;
|
|
54920
54920
|
[C2] = false;
|
|
54921
54921
|
writable = true;
|
|
54922
54922
|
readable = true;
|
|
@@ -54924,12 +54924,12 @@ var D = class extends Ti {
|
|
|
54924
54924
|
let e2 = t[0] || {};
|
|
54925
54925
|
if (super(), e2.objectMode && typeof e2.encoding == "string")
|
|
54926
54926
|
throw new TypeError("Encoding and objectMode may not be used together");
|
|
54927
|
-
|
|
54927
|
+
Xr(e2) ? (this[L2] = true, this[z3] = null) : qr(e2) ? (this[z3] = e2.encoding, this[L2] = false) : (this[L2] = false, this[z3] = null), this[Z3] = !!e2.async, this[Mt] = this[z3] ? new Hr(this[z3]) : null, e2 && e2.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[b3] }), e2 && e2.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[N2] });
|
|
54928
54928
|
let { signal: i } = e2;
|
|
54929
|
-
i && (this[Jt] = i, i.aborted ? this[
|
|
54929
|
+
i && (this[Jt] = i, i.aborted ? this[xi]() : i.addEventListener("abort", () => this[xi]()));
|
|
54930
54930
|
}
|
|
54931
54931
|
get bufferLength() {
|
|
54932
|
-
return this[
|
|
54932
|
+
return this[_3];
|
|
54933
54933
|
}
|
|
54934
54934
|
get encoding() {
|
|
54935
54935
|
return this[z3];
|
|
@@ -54952,96 +54952,96 @@ var D = class extends Ti {
|
|
|
54952
54952
|
set async(t) {
|
|
54953
54953
|
this[Z3] = this[Z3] || !!t;
|
|
54954
54954
|
}
|
|
54955
|
-
[
|
|
54956
|
-
this[
|
|
54955
|
+
[xi]() {
|
|
54956
|
+
this[Ce] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
|
|
54957
54957
|
}
|
|
54958
54958
|
get aborted() {
|
|
54959
|
-
return this[
|
|
54959
|
+
return this[Ce];
|
|
54960
54960
|
}
|
|
54961
54961
|
set aborted(t) {}
|
|
54962
54962
|
write(t, e2, i) {
|
|
54963
|
-
if (this[
|
|
54963
|
+
if (this[Ce])
|
|
54964
54964
|
return false;
|
|
54965
|
-
if (this[
|
|
54965
|
+
if (this[Q3])
|
|
54966
54966
|
throw new Error("write after end");
|
|
54967
|
-
if (this[
|
|
54967
|
+
if (this[S3])
|
|
54968
54968
|
return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
|
|
54969
54969
|
typeof e2 == "function" && (i = e2, e2 = "utf8"), e2 || (e2 = "utf8");
|
|
54970
|
-
let r2 = this[Z3] ?
|
|
54970
|
+
let r2 = this[Z3] ? jt : Yr;
|
|
54971
54971
|
if (!this[L2] && !Buffer.isBuffer(t)) {
|
|
54972
|
-
if (
|
|
54972
|
+
if ($r(t))
|
|
54973
54973
|
t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
|
|
54974
|
-
else if (
|
|
54974
|
+
else if (Vr(t))
|
|
54975
54975
|
t = Buffer.from(t);
|
|
54976
54976
|
else if (typeof t != "string")
|
|
54977
54977
|
throw new Error("Non-contiguous data written to non-objectMode stream");
|
|
54978
54978
|
}
|
|
54979
|
-
return this[L2] ? (this[
|
|
54979
|
+
return this[L2] ? (this[g2] && this[_3] !== 0 && this[Ae](true), this[g2] ? this.emit("data", t) : this[bi](t), this[_3] !== 0 && this.emit("readable"), i && r2(i), this[g2]) : t.length ? (typeof t == "string" && !(e2 === this[z3] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e2)), Buffer.isBuffer(t) && this[z3] && (t = this[Mt].write(t)), this[g2] && this[_3] !== 0 && this[Ae](true), this[g2] ? this.emit("data", t) : this[bi](t), this[_3] !== 0 && this.emit("readable"), i && r2(i), this[g2]) : (this[_3] !== 0 && this.emit("readable"), i && r2(i), this[g2]);
|
|
54980
54980
|
}
|
|
54981
54981
|
read(t) {
|
|
54982
|
-
if (this[
|
|
54982
|
+
if (this[S3])
|
|
54983
54983
|
return null;
|
|
54984
|
-
if (this[C2] = false, this[
|
|
54985
|
-
return this[
|
|
54986
|
-
this[L2] && (t = null), this[
|
|
54987
|
-
let e2 = this[
|
|
54988
|
-
return this[
|
|
54984
|
+
if (this[C2] = false, this[_3] === 0 || t === 0 || t && t > this[_3])
|
|
54985
|
+
return this[J3](), null;
|
|
54986
|
+
this[L2] && (t = null), this[b3].length > 1 && !this[L2] && (this[b3] = [this[z3] ? this[b3].join("") : Buffer.concat(this[b3], this[_3])]);
|
|
54987
|
+
let e2 = this[Ns](t || null, this[b3][0]);
|
|
54988
|
+
return this[J3](), e2;
|
|
54989
54989
|
}
|
|
54990
|
-
[
|
|
54990
|
+
[Ns](t, e2) {
|
|
54991
54991
|
if (this[L2])
|
|
54992
|
-
this[
|
|
54992
|
+
this[Ie]();
|
|
54993
54993
|
else {
|
|
54994
54994
|
let i = e2;
|
|
54995
|
-
t === i.length || t === null ? this[
|
|
54995
|
+
t === i.length || t === null ? this[Ie]() : typeof i == "string" ? (this[b3][0] = i.slice(t), e2 = i.slice(0, t), this[_3] -= t) : (this[b3][0] = i.subarray(t), e2 = i.subarray(0, t), this[_3] -= t);
|
|
54996
54996
|
}
|
|
54997
|
-
return this.emit("data", e2), !this[
|
|
54997
|
+
return this.emit("data", e2), !this[b3].length && !this[Q3] && this.emit("drain"), e2;
|
|
54998
54998
|
}
|
|
54999
54999
|
end(t, e2, i) {
|
|
55000
|
-
return typeof t == "function" && (i = t, t = undefined), typeof e2 == "function" && (i = e2, e2 = "utf8"), t !== undefined && this.write(t, e2), i && this.once("end", i), this[
|
|
55000
|
+
return typeof t == "function" && (i = t, t = undefined), typeof e2 == "function" && (i = e2, e2 = "utf8"), t !== undefined && this.write(t, e2), i && this.once("end", i), this[Q3] = true, this.writable = false, (this[g2] || !this[Qt]) && this[J3](), this;
|
|
55001
55001
|
}
|
|
55002
55002
|
[Bt]() {
|
|
55003
|
-
this[
|
|
55003
|
+
this[S3] || (!this[Rt] && !this[N2].length && (this[C2] = true), this[Qt] = false, this[g2] = true, this.emit("resume"), this[b3].length ? this[Ae]() : this[Q3] ? this[J3]() : this.emit("drain"));
|
|
55004
55004
|
}
|
|
55005
55005
|
resume() {
|
|
55006
55006
|
return this[Bt]();
|
|
55007
55007
|
}
|
|
55008
55008
|
pause() {
|
|
55009
|
-
this[
|
|
55009
|
+
this[g2] = false, this[Qt] = true, this[C2] = false;
|
|
55010
55010
|
}
|
|
55011
55011
|
get destroyed() {
|
|
55012
|
-
return this[
|
|
55012
|
+
return this[S3];
|
|
55013
55013
|
}
|
|
55014
55014
|
get flowing() {
|
|
55015
|
-
return this[
|
|
55015
|
+
return this[g2];
|
|
55016
55016
|
}
|
|
55017
55017
|
get paused() {
|
|
55018
55018
|
return this[Qt];
|
|
55019
55019
|
}
|
|
55020
|
-
[
|
|
55021
|
-
this[L2] ? this[
|
|
55020
|
+
[bi](t) {
|
|
55021
|
+
this[L2] ? this[_3] += 1 : this[_3] += t.length, this[b3].push(t);
|
|
55022
55022
|
}
|
|
55023
|
-
[
|
|
55024
|
-
return this[L2] ? this[
|
|
55023
|
+
[Ie]() {
|
|
55024
|
+
return this[L2] ? this[_3] -= 1 : this[_3] -= this[b3][0].length, this[b3].shift();
|
|
55025
55025
|
}
|
|
55026
55026
|
[Ae](t = false) {
|
|
55027
55027
|
do
|
|
55028
55028
|
;
|
|
55029
|
-
while (this[
|
|
55030
|
-
!t && !this[
|
|
55029
|
+
while (this[As](this[Ie]()) && this[b3].length);
|
|
55030
|
+
!t && !this[b3].length && !this[Q3] && this.emit("drain");
|
|
55031
55031
|
}
|
|
55032
|
-
[
|
|
55033
|
-
return this.emit("data", t), this[
|
|
55032
|
+
[As](t) {
|
|
55033
|
+
return this.emit("data", t), this[g2];
|
|
55034
55034
|
}
|
|
55035
55035
|
pipe(t, e2) {
|
|
55036
|
-
if (this[
|
|
55036
|
+
if (this[S3])
|
|
55037
55037
|
return t;
|
|
55038
55038
|
this[C2] = false;
|
|
55039
|
-
let i = this[
|
|
55040
|
-
return e2 = e2 || {}, t ===
|
|
55039
|
+
let i = this[nt];
|
|
55040
|
+
return e2 = e2 || {}, t === Ds.stdout || t === Ds.stderr ? e2.end = false : e2.end = e2.end !== false, e2.proxyErrors = !!e2.proxyErrors, i ? e2.end && t.end() : (this[N2].push(e2.proxyErrors ? new Li(this, t, e2) : new Fe(this, t, e2)), this[Z3] ? jt(() => this[Bt]()) : this[Bt]()), t;
|
|
55041
55041
|
}
|
|
55042
55042
|
unpipe(t) {
|
|
55043
|
-
let e2 = this[
|
|
55044
|
-
e2 && (this[
|
|
55043
|
+
let e2 = this[N2].find((i) => i.dest === t);
|
|
55044
|
+
e2 && (this[N2].length === 1 ? (this[g2] && this[Rt] === 0 && (this[g2] = false), this[N2] = []) : this[N2].splice(this[N2].indexOf(e2), 1), e2.unpipe());
|
|
55045
55045
|
}
|
|
55046
55046
|
addListener(t, e2) {
|
|
55047
55047
|
return this.on(t, e2);
|
|
@@ -55049,14 +55049,14 @@ var D = class extends Ti {
|
|
|
55049
55049
|
on(t, e2) {
|
|
55050
55050
|
let i = super.on(t, e2);
|
|
55051
55051
|
if (t === "data")
|
|
55052
|
-
this[C2] = false, this[
|
|
55053
|
-
else if (t === "readable" && this[
|
|
55052
|
+
this[C2] = false, this[Rt]++, !this[N2].length && !this[g2] && this[Bt]();
|
|
55053
|
+
else if (t === "readable" && this[_3] !== 0)
|
|
55054
55054
|
super.emit("readable");
|
|
55055
|
-
else if (
|
|
55055
|
+
else if (Kr(t) && this[nt])
|
|
55056
55056
|
super.emit(t), this.removeAllListeners(t);
|
|
55057
|
-
else if (t === "error" && this[
|
|
55057
|
+
else if (t === "error" && this[qt]) {
|
|
55058
55058
|
let r2 = e2;
|
|
55059
|
-
this[Z3] ?
|
|
55059
|
+
this[Z3] ? jt(() => r2.call(this, this[qt])) : r2.call(this, this[qt]);
|
|
55060
55060
|
}
|
|
55061
55061
|
return i;
|
|
55062
55062
|
}
|
|
@@ -55065,64 +55065,64 @@ var D = class extends Ti {
|
|
|
55065
55065
|
}
|
|
55066
55066
|
off(t, e2) {
|
|
55067
55067
|
let i = super.off(t, e2);
|
|
55068
|
-
return t === "data" && (this[
|
|
55068
|
+
return t === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[C2] && !this[N2].length && (this[g2] = false)), i;
|
|
55069
55069
|
}
|
|
55070
55070
|
removeAllListeners(t) {
|
|
55071
55071
|
let e2 = super.removeAllListeners(t);
|
|
55072
|
-
return (t === "data" || t === undefined) && (this[
|
|
55072
|
+
return (t === "data" || t === undefined) && (this[Rt] = 0, !this[C2] && !this[N2].length && (this[g2] = false)), e2;
|
|
55073
55073
|
}
|
|
55074
55074
|
get emittedEnd() {
|
|
55075
|
-
return this[
|
|
55075
|
+
return this[nt];
|
|
55076
55076
|
}
|
|
55077
|
-
[
|
|
55078
|
-
!this[
|
|
55077
|
+
[J3]() {
|
|
55078
|
+
!this[De] && !this[nt] && !this[S3] && this[b3].length === 0 && this[Q3] && (this[De] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[De] = false);
|
|
55079
55079
|
}
|
|
55080
55080
|
emit(t, ...e2) {
|
|
55081
55081
|
let i = e2[0];
|
|
55082
|
-
if (t !== "error" && t !== "close" && t !==
|
|
55082
|
+
if (t !== "error" && t !== "close" && t !== S3 && this[S3])
|
|
55083
55083
|
return false;
|
|
55084
55084
|
if (t === "data")
|
|
55085
|
-
return !this[L2] && !i ? false : this[Z3] ? (
|
|
55085
|
+
return !this[L2] && !i ? false : this[Z3] ? (jt(() => this[Oi](i)), true) : this[Oi](i);
|
|
55086
55086
|
if (t === "end")
|
|
55087
|
-
return this[
|
|
55087
|
+
return this[Is]();
|
|
55088
55088
|
if (t === "close") {
|
|
55089
|
-
if (this[Ne] = true, !this[
|
|
55089
|
+
if (this[Ne] = true, !this[nt] && !this[S3])
|
|
55090
55090
|
return false;
|
|
55091
55091
|
let n = super.emit("close");
|
|
55092
55092
|
return this.removeAllListeners("close"), n;
|
|
55093
55093
|
} else if (t === "error") {
|
|
55094
|
-
this[
|
|
55094
|
+
this[qt] = i, super.emit(_i, i);
|
|
55095
55095
|
let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
|
|
55096
|
-
return this[
|
|
55096
|
+
return this[J3](), n;
|
|
55097
55097
|
} else if (t === "resume") {
|
|
55098
55098
|
let n = super.emit("resume");
|
|
55099
|
-
return this[
|
|
55099
|
+
return this[J3](), n;
|
|
55100
55100
|
} else if (t === "finish" || t === "prefinish") {
|
|
55101
55101
|
let n = super.emit(t);
|
|
55102
55102
|
return this.removeAllListeners(t), n;
|
|
55103
55103
|
}
|
|
55104
55104
|
let r2 = super.emit(t, ...e2);
|
|
55105
|
-
return this[
|
|
55105
|
+
return this[J3](), r2;
|
|
55106
55106
|
}
|
|
55107
|
-
[
|
|
55108
|
-
for (let i of this[
|
|
55107
|
+
[Oi](t) {
|
|
55108
|
+
for (let i of this[N2])
|
|
55109
55109
|
i.dest.write(t) === false && this.pause();
|
|
55110
55110
|
let e2 = this[C2] ? false : super.emit("data", t);
|
|
55111
|
-
return this[
|
|
55111
|
+
return this[J3](), e2;
|
|
55112
55112
|
}
|
|
55113
|
-
[
|
|
55114
|
-
return this[
|
|
55113
|
+
[Is]() {
|
|
55114
|
+
return this[nt] ? false : (this[nt] = true, this.readable = false, this[Z3] ? (jt(() => this[Ti]()), true) : this[Ti]());
|
|
55115
55115
|
}
|
|
55116
|
-
[
|
|
55116
|
+
[Ti]() {
|
|
55117
55117
|
if (this[Mt]) {
|
|
55118
55118
|
let e2 = this[Mt].end();
|
|
55119
55119
|
if (e2) {
|
|
55120
|
-
for (let i of this[
|
|
55120
|
+
for (let i of this[N2])
|
|
55121
55121
|
i.dest.write(e2);
|
|
55122
55122
|
this[C2] || super.emit("data", e2);
|
|
55123
55123
|
}
|
|
55124
55124
|
}
|
|
55125
|
-
for (let e2 of this[
|
|
55125
|
+
for (let e2 of this[N2])
|
|
55126
55126
|
e2.end();
|
|
55127
55127
|
let t = super.emit("end");
|
|
55128
55128
|
return this.removeAllListeners("end"), t;
|
|
@@ -55143,7 +55143,7 @@ var D = class extends Ti {
|
|
|
55143
55143
|
}
|
|
55144
55144
|
async promise() {
|
|
55145
55145
|
return new Promise((t, e2) => {
|
|
55146
|
-
this.on(
|
|
55146
|
+
this.on(S3, () => e2(new Error("stream destroyed"))), this.on("error", (i) => e2(i)), this.on("end", () => t());
|
|
55147
55147
|
});
|
|
55148
55148
|
}
|
|
55149
55149
|
[Symbol.asyncIterator]() {
|
|
@@ -55155,17 +55155,17 @@ var D = class extends Ti {
|
|
|
55155
55155
|
let r2 = this.read();
|
|
55156
55156
|
if (r2 !== null)
|
|
55157
55157
|
return Promise.resolve({ done: false, value: r2 });
|
|
55158
|
-
if (this[
|
|
55158
|
+
if (this[Q3])
|
|
55159
55159
|
return e2();
|
|
55160
55160
|
let n, o2, h2 = (d3) => {
|
|
55161
|
-
this.off("data", a3), this.off("end", l2), this.off(
|
|
55161
|
+
this.off("data", a3), this.off("end", l2), this.off(S3, c2), e2(), o2(d3);
|
|
55162
55162
|
}, a3 = (d3) => {
|
|
55163
|
-
this.off("error", h2), this.off("end", l2), this.off(
|
|
55163
|
+
this.off("error", h2), this.off("end", l2), this.off(S3, c2), this.pause(), n({ value: d3, done: !!this[Q3] });
|
|
55164
55164
|
}, l2 = () => {
|
|
55165
|
-
this.off("error", h2), this.off("data", a3), this.off(
|
|
55165
|
+
this.off("error", h2), this.off("data", a3), this.off(S3, c2), e2(), n({ done: true, value: undefined });
|
|
55166
55166
|
}, c2 = () => h2(new Error("stream destroyed"));
|
|
55167
|
-
return new Promise((d3,
|
|
55168
|
-
o2 =
|
|
55167
|
+
return new Promise((d3, y3) => {
|
|
55168
|
+
o2 = y3, n = d3, this.once(S3, c2), this.once("error", h2), this.once("end", l2), this.once("data", a3);
|
|
55169
55169
|
});
|
|
55170
55170
|
}, throw: e2, return: e2, [Symbol.asyncIterator]() {
|
|
55171
55171
|
return this;
|
|
@@ -55173,69 +55173,69 @@ var D = class extends Ti {
|
|
|
55173
55173
|
}
|
|
55174
55174
|
[Symbol.iterator]() {
|
|
55175
55175
|
this[C2] = false;
|
|
55176
|
-
let t = false, e2 = () => (this.pause(), this.off(
|
|
55176
|
+
let t = false, e2 = () => (this.pause(), this.off(_i, e2), this.off(S3, e2), this.off("end", e2), t = true, { done: true, value: undefined }), i = () => {
|
|
55177
55177
|
if (t)
|
|
55178
55178
|
return e2();
|
|
55179
55179
|
let r2 = this.read();
|
|
55180
55180
|
return r2 === null ? e2() : { done: false, value: r2 };
|
|
55181
55181
|
};
|
|
55182
|
-
return this.once("end", e2), this.once(
|
|
55182
|
+
return this.once("end", e2), this.once(_i, e2), this.once(S3, e2), { next: i, throw: e2, return: e2, [Symbol.iterator]() {
|
|
55183
55183
|
return this;
|
|
55184
55184
|
}, [Symbol.dispose]: () => {} };
|
|
55185
55185
|
}
|
|
55186
55186
|
destroy(t) {
|
|
55187
|
-
if (this[
|
|
55188
|
-
return t ? this.emit("error", t) : this.emit(
|
|
55189
|
-
this[
|
|
55187
|
+
if (this[S3])
|
|
55188
|
+
return t ? this.emit("error", t) : this.emit(S3), this;
|
|
55189
|
+
this[S3] = true, this[C2] = true, this[b3].length = 0, this[_3] = 0;
|
|
55190
55190
|
let e2 = this;
|
|
55191
|
-
return typeof e2.close == "function" && !this[Ne] && e2.close(), t ? this.emit("error", t) : this.emit(
|
|
55191
|
+
return typeof e2.close == "function" && !this[Ne] && e2.close(), t ? this.emit("error", t) : this.emit(S3), this;
|
|
55192
55192
|
}
|
|
55193
55193
|
static get isStream() {
|
|
55194
|
-
return
|
|
55194
|
+
return Wr;
|
|
55195
55195
|
}
|
|
55196
55196
|
};
|
|
55197
|
-
var
|
|
55198
|
-
var
|
|
55197
|
+
var Jr = I3.writev;
|
|
55198
|
+
var ht = Symbol("_autoClose");
|
|
55199
55199
|
var H2 = Symbol("_close");
|
|
55200
|
-
var
|
|
55200
|
+
var te2 = Symbol("_ended");
|
|
55201
55201
|
var m2 = Symbol("_fd");
|
|
55202
|
-
var
|
|
55203
|
-
var
|
|
55204
|
-
var
|
|
55205
|
-
var
|
|
55206
|
-
var
|
|
55207
|
-
var
|
|
55208
|
-
var
|
|
55202
|
+
var Ni = Symbol("_finished");
|
|
55203
|
+
var tt = Symbol("_flags");
|
|
55204
|
+
var Ai = Symbol("_flush");
|
|
55205
|
+
var ki = Symbol("_handleChunk");
|
|
55206
|
+
var vi = Symbol("_makeBuf");
|
|
55207
|
+
var ie2 = Symbol("_mode");
|
|
55208
|
+
var ke = Symbol("_needDrain");
|
|
55209
55209
|
var Ut = Symbol("_onerror");
|
|
55210
55210
|
var Ht = Symbol("_onopen");
|
|
55211
|
-
var
|
|
55211
|
+
var Ii = Symbol("_onread");
|
|
55212
55212
|
var Pt = Symbol("_onwrite");
|
|
55213
|
-
var
|
|
55213
|
+
var at2 = Symbol("_open");
|
|
55214
55214
|
var U3 = Symbol("_path");
|
|
55215
|
-
var
|
|
55215
|
+
var ot = Symbol("_pos");
|
|
55216
55216
|
var Y3 = Symbol("_queue");
|
|
55217
55217
|
var zt = Symbol("_read");
|
|
55218
|
-
var
|
|
55219
|
-
var
|
|
55220
|
-
var
|
|
55221
|
-
var
|
|
55222
|
-
var
|
|
55223
|
-
var
|
|
55224
|
-
var
|
|
55218
|
+
var Ci = Symbol("_readSize");
|
|
55219
|
+
var j2 = Symbol("_reading");
|
|
55220
|
+
var ee2 = Symbol("_remain");
|
|
55221
|
+
var Fi = Symbol("_size");
|
|
55222
|
+
var ve = Symbol("_write");
|
|
55223
|
+
var gt2 = Symbol("_writing");
|
|
55224
|
+
var Me = Symbol("_defaultFlag");
|
|
55225
55225
|
var bt = Symbol("_errored");
|
|
55226
|
-
var _t = class extends
|
|
55226
|
+
var _t = class extends A3 {
|
|
55227
55227
|
[bt] = false;
|
|
55228
55228
|
[m2];
|
|
55229
55229
|
[U3];
|
|
55230
|
-
[
|
|
55231
|
-
[
|
|
55232
|
-
[
|
|
55233
|
-
[
|
|
55234
|
-
[
|
|
55230
|
+
[Ci];
|
|
55231
|
+
[j2] = false;
|
|
55232
|
+
[Fi];
|
|
55233
|
+
[ee2];
|
|
55234
|
+
[ht];
|
|
55235
55235
|
constructor(t, e2) {
|
|
55236
55236
|
if (e2 = e2 || {}, super(e2), this.readable = true, this.writable = false, typeof t != "string")
|
|
55237
55237
|
throw new TypeError("path must be a string");
|
|
55238
|
-
this[bt] = false, this[m2] = typeof e2.fd == "number" ? e2.fd : undefined, this[U3] = t, this[
|
|
55238
|
+
this[bt] = false, this[m2] = typeof e2.fd == "number" ? e2.fd : undefined, this[U3] = t, this[Ci] = e2.readSize || 16 * 1024 * 1024, this[j2] = false, this[Fi] = typeof e2.size == "number" ? e2.size : 1 / 0, this[ee2] = this[Fi], this[ht] = typeof e2.autoClose == "boolean" ? e2.autoClose : true, typeof this[m2] == "number" ? this[zt]() : this[at2]();
|
|
55239
55239
|
}
|
|
55240
55240
|
get fd() {
|
|
55241
55241
|
return this[m2];
|
|
@@ -55249,39 +55249,39 @@ var _t = class extends D {
|
|
|
55249
55249
|
end() {
|
|
55250
55250
|
throw new TypeError("this is a readable stream");
|
|
55251
55251
|
}
|
|
55252
|
-
[
|
|
55252
|
+
[at2]() {
|
|
55253
55253
|
I3.open(this[U3], "r", (t, e2) => this[Ht](t, e2));
|
|
55254
55254
|
}
|
|
55255
55255
|
[Ht](t, e2) {
|
|
55256
55256
|
t ? this[Ut](t) : (this[m2] = e2, this.emit("open", e2), this[zt]());
|
|
55257
55257
|
}
|
|
55258
|
-
[
|
|
55259
|
-
return Buffer.allocUnsafe(Math.min(this[
|
|
55258
|
+
[vi]() {
|
|
55259
|
+
return Buffer.allocUnsafe(Math.min(this[Ci], this[ee2]));
|
|
55260
55260
|
}
|
|
55261
55261
|
[zt]() {
|
|
55262
|
-
if (!this[
|
|
55263
|
-
this[
|
|
55264
|
-
let t = this[
|
|
55262
|
+
if (!this[j2]) {
|
|
55263
|
+
this[j2] = true;
|
|
55264
|
+
let t = this[vi]();
|
|
55265
55265
|
if (t.length === 0)
|
|
55266
|
-
return process.nextTick(() => this[
|
|
55267
|
-
I3.read(this[m2], t, 0, t.length, null, (e2, i, r2) => this[
|
|
55266
|
+
return process.nextTick(() => this[Ii](null, 0, t));
|
|
55267
|
+
I3.read(this[m2], t, 0, t.length, null, (e2, i, r2) => this[Ii](e2, i, r2));
|
|
55268
55268
|
}
|
|
55269
55269
|
}
|
|
55270
|
-
[
|
|
55271
|
-
this[
|
|
55270
|
+
[Ii](t, e2, i) {
|
|
55271
|
+
this[j2] = false, t ? this[Ut](t) : this[ki](e2, i) && this[zt]();
|
|
55272
55272
|
}
|
|
55273
55273
|
[H2]() {
|
|
55274
|
-
if (this[
|
|
55274
|
+
if (this[ht] && typeof this[m2] == "number") {
|
|
55275
55275
|
let t = this[m2];
|
|
55276
55276
|
this[m2] = undefined, I3.close(t, (e2) => e2 ? this.emit("error", e2) : this.emit("close"));
|
|
55277
55277
|
}
|
|
55278
55278
|
}
|
|
55279
55279
|
[Ut](t) {
|
|
55280
|
-
this[
|
|
55280
|
+
this[j2] = true, this[H2](), this.emit("error", t);
|
|
55281
55281
|
}
|
|
55282
|
-
[
|
|
55282
|
+
[ki](t, e2) {
|
|
55283
55283
|
let i = false;
|
|
55284
|
-
return this[
|
|
55284
|
+
return this[ee2] -= t, t > 0 && (i = super.write(t < e2.length ? e2.subarray(0, t) : e2)), (t === 0 || this[ee2] <= 0) && (i = false, this[H2](), super.end()), i;
|
|
55285
55285
|
}
|
|
55286
55286
|
emit(t, ...e2) {
|
|
55287
55287
|
switch (t) {
|
|
@@ -55297,8 +55297,8 @@ var _t = class extends D {
|
|
|
55297
55297
|
}
|
|
55298
55298
|
}
|
|
55299
55299
|
};
|
|
55300
|
-
var
|
|
55301
|
-
[
|
|
55300
|
+
var Be = class extends _t {
|
|
55301
|
+
[at2]() {
|
|
55302
55302
|
let t = true;
|
|
55303
55303
|
try {
|
|
55304
55304
|
this[Ht](null, I3.openSync(this[U3], "r")), t = false;
|
|
@@ -55309,14 +55309,14 @@ var Me = class extends _t {
|
|
|
55309
55309
|
[zt]() {
|
|
55310
55310
|
let t = true;
|
|
55311
55311
|
try {
|
|
55312
|
-
if (!this[
|
|
55313
|
-
this[
|
|
55312
|
+
if (!this[j2]) {
|
|
55313
|
+
this[j2] = true;
|
|
55314
55314
|
do {
|
|
55315
|
-
let e2 = this[
|
|
55316
|
-
if (!this[
|
|
55315
|
+
let e2 = this[vi](), i = e2.length === 0 ? 0 : I3.readSync(this[m2], e2, 0, e2.length, null);
|
|
55316
|
+
if (!this[ki](i, e2))
|
|
55317
55317
|
break;
|
|
55318
55318
|
} while (true);
|
|
55319
|
-
this[
|
|
55319
|
+
this[j2] = false;
|
|
55320
55320
|
}
|
|
55321
55321
|
t = false;
|
|
55322
55322
|
} finally {
|
|
@@ -55324,32 +55324,32 @@ var Me = class extends _t {
|
|
|
55324
55324
|
}
|
|
55325
55325
|
}
|
|
55326
55326
|
[H2]() {
|
|
55327
|
-
if (this[
|
|
55327
|
+
if (this[ht] && typeof this[m2] == "number") {
|
|
55328
55328
|
let t = this[m2];
|
|
55329
55329
|
this[m2] = undefined, I3.closeSync(t), this.emit("close");
|
|
55330
55330
|
}
|
|
55331
55331
|
}
|
|
55332
55332
|
};
|
|
55333
|
-
var
|
|
55333
|
+
var et = class extends Qr {
|
|
55334
55334
|
readable = false;
|
|
55335
55335
|
writable = true;
|
|
55336
55336
|
[bt] = false;
|
|
55337
|
-
[
|
|
55338
|
-
[
|
|
55337
|
+
[gt2] = false;
|
|
55338
|
+
[te2] = false;
|
|
55339
55339
|
[Y3] = [];
|
|
55340
|
-
[
|
|
55340
|
+
[ke] = false;
|
|
55341
55341
|
[U3];
|
|
55342
|
-
[
|
|
55343
|
-
[
|
|
55342
|
+
[ie2];
|
|
55343
|
+
[ht];
|
|
55344
55344
|
[m2];
|
|
55345
|
-
[
|
|
55346
|
-
[
|
|
55347
|
-
[
|
|
55348
|
-
[
|
|
55345
|
+
[Me];
|
|
55346
|
+
[tt];
|
|
55347
|
+
[Ni] = false;
|
|
55348
|
+
[ot];
|
|
55349
55349
|
constructor(t, e2) {
|
|
55350
|
-
e2 = e2 || {}, super(e2), this[U3] = t, this[m2] = typeof e2.fd == "number" ? e2.fd : undefined, this[
|
|
55351
|
-
let i = this[
|
|
55352
|
-
this[
|
|
55350
|
+
e2 = e2 || {}, super(e2), this[U3] = t, this[m2] = typeof e2.fd == "number" ? e2.fd : undefined, this[ie2] = e2.mode === undefined ? 438 : e2.mode, this[ot] = typeof e2.start == "number" ? e2.start : undefined, this[ht] = typeof e2.autoClose == "boolean" ? e2.autoClose : true;
|
|
55351
|
+
let i = this[ot] !== undefined ? "r+" : "w";
|
|
55352
|
+
this[Me] = e2.flags === undefined, this[tt] = e2.flags === undefined ? i : e2.flags, this[m2] === undefined && this[at2]();
|
|
55353
55353
|
}
|
|
55354
55354
|
emit(t, ...e2) {
|
|
55355
55355
|
if (t === "error") {
|
|
@@ -55366,68 +55366,68 @@ var tt = class extends Kr {
|
|
|
55366
55366
|
return this[U3];
|
|
55367
55367
|
}
|
|
55368
55368
|
[Ut](t) {
|
|
55369
|
-
this[H2](), this[
|
|
55369
|
+
this[H2](), this[gt2] = true, this.emit("error", t);
|
|
55370
55370
|
}
|
|
55371
|
-
[
|
|
55372
|
-
I3.open(this[U3], this[
|
|
55371
|
+
[at2]() {
|
|
55372
|
+
I3.open(this[U3], this[tt], this[ie2], (t, e2) => this[Ht](t, e2));
|
|
55373
55373
|
}
|
|
55374
55374
|
[Ht](t, e2) {
|
|
55375
|
-
this[
|
|
55375
|
+
this[Me] && this[tt] === "r+" && t && t.code === "ENOENT" ? (this[tt] = "w", this[at2]()) : t ? this[Ut](t) : (this[m2] = e2, this.emit("open", e2), this[gt2] || this[Ai]());
|
|
55376
55376
|
}
|
|
55377
55377
|
end(t, e2) {
|
|
55378
|
-
return t && this.write(t, e2), this[
|
|
55378
|
+
return t && this.write(t, e2), this[te2] = true, !this[gt2] && !this[Y3].length && typeof this[m2] == "number" && this[Pt](null, 0), this;
|
|
55379
55379
|
}
|
|
55380
55380
|
write(t, e2) {
|
|
55381
|
-
return typeof t == "string" && (t = Buffer.from(t, e2)), this[
|
|
55381
|
+
return typeof t == "string" && (t = Buffer.from(t, e2)), this[te2] ? (this.emit("error", new Error("write() after end()")), false) : this[m2] === undefined || this[gt2] || this[Y3].length ? (this[Y3].push(t), this[ke] = true, false) : (this[gt2] = true, this[ve](t), true);
|
|
55382
55382
|
}
|
|
55383
|
-
[
|
|
55384
|
-
I3.write(this[m2], t, 0, t.length, this[
|
|
55383
|
+
[ve](t) {
|
|
55384
|
+
I3.write(this[m2], t, 0, t.length, this[ot], (e2, i) => this[Pt](e2, i));
|
|
55385
55385
|
}
|
|
55386
55386
|
[Pt](t, e2) {
|
|
55387
|
-
t ? this[Ut](t) : (this[
|
|
55387
|
+
t ? this[Ut](t) : (this[ot] !== undefined && typeof e2 == "number" && (this[ot] += e2), this[Y3].length ? this[Ai]() : (this[gt2] = false, this[te2] && !this[Ni] ? (this[Ni] = true, this[H2](), this.emit("finish")) : this[ke] && (this[ke] = false, this.emit("drain"))));
|
|
55388
55388
|
}
|
|
55389
|
-
[
|
|
55389
|
+
[Ai]() {
|
|
55390
55390
|
if (this[Y3].length === 0)
|
|
55391
|
-
this[
|
|
55391
|
+
this[te2] && this[Pt](null, 0);
|
|
55392
55392
|
else if (this[Y3].length === 1)
|
|
55393
|
-
this[
|
|
55393
|
+
this[ve](this[Y3].pop());
|
|
55394
55394
|
else {
|
|
55395
55395
|
let t = this[Y3];
|
|
55396
|
-
this[Y3] = [],
|
|
55396
|
+
this[Y3] = [], Jr(this[m2], t, this[ot], (e2, i) => this[Pt](e2, i));
|
|
55397
55397
|
}
|
|
55398
55398
|
}
|
|
55399
55399
|
[H2]() {
|
|
55400
|
-
if (this[
|
|
55400
|
+
if (this[ht] && typeof this[m2] == "number") {
|
|
55401
55401
|
let t = this[m2];
|
|
55402
55402
|
this[m2] = undefined, I3.close(t, (e2) => e2 ? this.emit("error", e2) : this.emit("close"));
|
|
55403
55403
|
}
|
|
55404
55404
|
}
|
|
55405
55405
|
};
|
|
55406
|
-
var Wt = class extends
|
|
55407
|
-
[
|
|
55406
|
+
var Wt = class extends et {
|
|
55407
|
+
[at2]() {
|
|
55408
55408
|
let t;
|
|
55409
|
-
if (this[
|
|
55409
|
+
if (this[Me] && this[tt] === "r+")
|
|
55410
55410
|
try {
|
|
55411
|
-
t = I3.openSync(this[U3], this[
|
|
55411
|
+
t = I3.openSync(this[U3], this[tt], this[ie2]);
|
|
55412
55412
|
} catch (e2) {
|
|
55413
55413
|
if (e2?.code === "ENOENT")
|
|
55414
|
-
return this[
|
|
55414
|
+
return this[tt] = "w", this[at2]();
|
|
55415
55415
|
throw e2;
|
|
55416
55416
|
}
|
|
55417
55417
|
else
|
|
55418
|
-
t = I3.openSync(this[U3], this[
|
|
55418
|
+
t = I3.openSync(this[U3], this[tt], this[ie2]);
|
|
55419
55419
|
this[Ht](null, t);
|
|
55420
55420
|
}
|
|
55421
55421
|
[H2]() {
|
|
55422
|
-
if (this[
|
|
55422
|
+
if (this[ht] && typeof this[m2] == "number") {
|
|
55423
55423
|
let t = this[m2];
|
|
55424
55424
|
this[m2] = undefined, I3.closeSync(t), this.emit("close");
|
|
55425
55425
|
}
|
|
55426
55426
|
}
|
|
55427
|
-
[
|
|
55427
|
+
[ve](t) {
|
|
55428
55428
|
let e2 = true;
|
|
55429
55429
|
try {
|
|
55430
|
-
this[Pt](null, I3.writeSync(this[m2], t, 0, t.length, this[
|
|
55430
|
+
this[Pt](null, I3.writeSync(this[m2], t, 0, t.length, this[ot])), e2 = false;
|
|
55431
55431
|
} finally {
|
|
55432
55432
|
if (e2)
|
|
55433
55433
|
try {
|
|
@@ -55436,56 +55436,56 @@ var Wt = class extends tt {
|
|
|
55436
55436
|
}
|
|
55437
55437
|
}
|
|
55438
55438
|
};
|
|
55439
|
-
var
|
|
55440
|
-
var
|
|
55441
|
-
var
|
|
55442
|
-
var
|
|
55443
|
-
var
|
|
55444
|
-
var
|
|
55445
|
-
var
|
|
55446
|
-
let t =
|
|
55439
|
+
var jr = 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"]]);
|
|
55440
|
+
var Fs = (s) => !!s.sync && !!s.file;
|
|
55441
|
+
var ks = (s) => !s.sync && !!s.file;
|
|
55442
|
+
var vs = (s) => !!s.sync && !s.file;
|
|
55443
|
+
var Ms = (s) => !s.sync && !s.file;
|
|
55444
|
+
var Bs = (s) => !!s.file;
|
|
55445
|
+
var tn = (s) => {
|
|
55446
|
+
let t = jr.get(s);
|
|
55447
55447
|
return t || s;
|
|
55448
55448
|
};
|
|
55449
|
-
var
|
|
55449
|
+
var se2 = (s = {}) => {
|
|
55450
55450
|
if (!s)
|
|
55451
55451
|
return {};
|
|
55452
55452
|
let t = {};
|
|
55453
55453
|
for (let [e2, i] of Object.entries(s)) {
|
|
55454
|
-
let r2 =
|
|
55454
|
+
let r2 = tn(e2);
|
|
55455
55455
|
t[r2] = i;
|
|
55456
55456
|
}
|
|
55457
55457
|
return t.chmod === undefined && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
|
|
55458
55458
|
};
|
|
55459
55459
|
var K3 = (s, t, e2, i, r2) => Object.assign((n = [], o2, h2) => {
|
|
55460
55460
|
Array.isArray(n) && (o2 = n, n = {}), typeof o2 == "function" && (h2 = o2, o2 = undefined), o2 = o2 ? Array.from(o2) : [];
|
|
55461
|
-
let a3 =
|
|
55462
|
-
if (r2?.(a3, o2),
|
|
55461
|
+
let a3 = se2(n);
|
|
55462
|
+
if (r2?.(a3, o2), Fs(a3)) {
|
|
55463
55463
|
if (typeof h2 == "function")
|
|
55464
55464
|
throw new TypeError("callback not supported for sync tar functions");
|
|
55465
55465
|
return s(a3, o2);
|
|
55466
|
-
} else if (
|
|
55466
|
+
} else if (ks(a3)) {
|
|
55467
55467
|
let l2 = t(a3, o2);
|
|
55468
55468
|
return h2 ? l2.then(() => h2(), h2) : l2;
|
|
55469
|
-
} else if (
|
|
55469
|
+
} else if (vs(a3)) {
|
|
55470
55470
|
if (typeof h2 == "function")
|
|
55471
55471
|
throw new TypeError("callback not supported for sync tar functions");
|
|
55472
55472
|
return e2(a3, o2);
|
|
55473
|
-
} else if (
|
|
55473
|
+
} else if (Ms(a3)) {
|
|
55474
55474
|
if (typeof h2 == "function")
|
|
55475
55475
|
throw new TypeError("callback only supported with file option");
|
|
55476
55476
|
return i(a3, o2);
|
|
55477
55477
|
}
|
|
55478
55478
|
throw new Error("impossible options??");
|
|
55479
55479
|
}, { syncFile: s, asyncFile: t, syncNoFile: e2, asyncNoFile: i, validate: r2 });
|
|
55480
|
-
var
|
|
55481
|
-
var M3 = Object.freeze(Object.assign(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 },
|
|
55482
|
-
var
|
|
55483
|
-
var
|
|
55484
|
-
var
|
|
55485
|
-
var
|
|
55486
|
-
|
|
55480
|
+
var sn = en.constants || { ZLIB_VERNUM: 4736 };
|
|
55481
|
+
var M3 = Object.freeze(Object.assign(Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, sn));
|
|
55482
|
+
var rn = Ot.concat;
|
|
55483
|
+
var zs = Object.getOwnPropertyDescriptor(Ot, "concat");
|
|
55484
|
+
var nn = (s) => s;
|
|
55485
|
+
var Bi = zs?.writable === true || zs?.set !== undefined ? (s) => {
|
|
55486
|
+
Ot.concat = s ? nn : rn;
|
|
55487
55487
|
} : (s) => {};
|
|
55488
|
-
var
|
|
55488
|
+
var Tt = Symbol("_superWrite");
|
|
55489
55489
|
var Gt = class extends Error {
|
|
55490
55490
|
code;
|
|
55491
55491
|
errno;
|
|
@@ -55496,8 +55496,8 @@ var Gt = class extends Error {
|
|
|
55496
55496
|
return "ZlibError";
|
|
55497
55497
|
}
|
|
55498
55498
|
};
|
|
55499
|
-
var
|
|
55500
|
-
var
|
|
55499
|
+
var Pi = Symbol("flushFlag");
|
|
55500
|
+
var re2 = class extends A3 {
|
|
55501
55501
|
#t = false;
|
|
55502
55502
|
#i = false;
|
|
55503
55503
|
#s;
|
|
@@ -55517,10 +55517,10 @@ var ne = class extends D {
|
|
|
55517
55517
|
constructor(t, e2) {
|
|
55518
55518
|
if (!t || typeof t != "object")
|
|
55519
55519
|
throw new TypeError("invalid options for ZlibBase constructor");
|
|
55520
|
-
if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof
|
|
55520
|
+
if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof Ps[e2] != "function")
|
|
55521
55521
|
throw new TypeError("Compression method not supported: " + e2);
|
|
55522
55522
|
try {
|
|
55523
|
-
this.#e = new
|
|
55523
|
+
this.#e = new Ps[e2](t);
|
|
55524
55524
|
} catch (i) {
|
|
55525
55525
|
throw new Gt(i, this.constructor);
|
|
55526
55526
|
}
|
|
@@ -55533,10 +55533,10 @@ var ne = class extends D {
|
|
|
55533
55533
|
}
|
|
55534
55534
|
reset() {
|
|
55535
55535
|
if (!this.#t)
|
|
55536
|
-
return
|
|
55536
|
+
return zi(this.#e, "zlib binding closed"), this.#e.reset?.();
|
|
55537
55537
|
}
|
|
55538
55538
|
flush(t) {
|
|
55539
|
-
this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(
|
|
55539
|
+
this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(Ot.alloc(0), { [Pi]: t })));
|
|
55540
55540
|
}
|
|
55541
55541
|
end(t, e2, i) {
|
|
55542
55542
|
return typeof t == "function" && (i = t, e2 = undefined, t = undefined), typeof e2 == "function" && (i = e2, e2 = undefined), t && (e2 ? this.write(t, e2) : this.write(t)), this.flush(this.#n), this.#i = true, super.end(i);
|
|
@@ -55544,23 +55544,23 @@ var ne = class extends D {
|
|
|
55544
55544
|
get ended() {
|
|
55545
55545
|
return this.#i;
|
|
55546
55546
|
}
|
|
55547
|
-
[
|
|
55547
|
+
[Tt](t) {
|
|
55548
55548
|
return super.write(t);
|
|
55549
55549
|
}
|
|
55550
55550
|
write(t, e2, i) {
|
|
55551
|
-
if (typeof e2 == "function" && (i = e2, e2 = "utf8"), typeof t == "string" && (t =
|
|
55551
|
+
if (typeof e2 == "function" && (i = e2, e2 = "utf8"), typeof t == "string" && (t = Ot.from(t, e2)), this.#t)
|
|
55552
55552
|
return;
|
|
55553
|
-
|
|
55553
|
+
zi(this.#e, "zlib binding closed");
|
|
55554
55554
|
let r2 = this.#e._handle, n = r2.close;
|
|
55555
55555
|
r2.close = () => {};
|
|
55556
55556
|
let o2 = this.#e.close;
|
|
55557
|
-
this.#e.close = () => {},
|
|
55557
|
+
this.#e.close = () => {}, Bi(true);
|
|
55558
55558
|
let h2;
|
|
55559
55559
|
try {
|
|
55560
|
-
let l2 = typeof t[
|
|
55561
|
-
h2 = this.#e._processChunk(t, l2),
|
|
55560
|
+
let l2 = typeof t[Pi] == "number" ? t[Pi] : this.#s;
|
|
55561
|
+
h2 = this.#e._processChunk(t, l2), Bi(false);
|
|
55562
55562
|
} catch (l2) {
|
|
55563
|
-
|
|
55563
|
+
Bi(false), this.#o(new Gt(l2, this.write));
|
|
55564
55564
|
} finally {
|
|
55565
55565
|
this.#e && (this.#e._handle = r2, r2.close = n, this.#e.close = o2, this.#e.removeAllListeners("error"));
|
|
55566
55566
|
}
|
|
@@ -55569,15 +55569,15 @@ var ne = class extends D {
|
|
|
55569
55569
|
if (h2)
|
|
55570
55570
|
if (Array.isArray(h2) && h2.length > 0) {
|
|
55571
55571
|
let l2 = h2[0];
|
|
55572
|
-
a3 = this[
|
|
55572
|
+
a3 = this[Tt](Ot.from(l2));
|
|
55573
55573
|
for (let c2 = 1;c2 < h2.length; c2++)
|
|
55574
|
-
a3 = this[
|
|
55574
|
+
a3 = this[Tt](h2[c2]);
|
|
55575
55575
|
} else
|
|
55576
|
-
a3 = this[
|
|
55576
|
+
a3 = this[Tt](Ot.from(h2));
|
|
55577
55577
|
return i && i(), a3;
|
|
55578
55578
|
}
|
|
55579
55579
|
};
|
|
55580
|
-
var
|
|
55580
|
+
var Pe = class extends re2 {
|
|
55581
55581
|
#t;
|
|
55582
55582
|
#i;
|
|
55583
55583
|
constructor(t, e2) {
|
|
@@ -55590,7 +55590,7 @@ var Be = class extends ne {
|
|
|
55590
55590
|
if (!this.handle.params)
|
|
55591
55591
|
throw new Error("not supported in this implementation");
|
|
55592
55592
|
if (this.#t !== t || this.#i !== e2) {
|
|
55593
|
-
this.flush(M3.Z_SYNC_FLUSH),
|
|
55593
|
+
this.flush(M3.Z_SYNC_FLUSH), zi(this.handle, "zlib binding closed");
|
|
55594
55594
|
let i = this.handle.flush;
|
|
55595
55595
|
this.handle.flush = (r2, n) => {
|
|
55596
55596
|
typeof r2 == "function" && (n = r2, r2 = this.flushFlag), this.flush(r2), n?.();
|
|
@@ -55605,101 +55605,103 @@ var Be = class extends ne {
|
|
|
55605
55605
|
}
|
|
55606
55606
|
}
|
|
55607
55607
|
};
|
|
55608
|
-
var
|
|
55608
|
+
var ze = class extends Pe {
|
|
55609
55609
|
#t;
|
|
55610
55610
|
constructor(t) {
|
|
55611
55611
|
super(t, "Gzip"), this.#t = t && !!t.portable;
|
|
55612
55612
|
}
|
|
55613
|
-
[
|
|
55614
|
-
return this.#t ? (this.#t = false, t[9] = 255, super[
|
|
55613
|
+
[Tt](t) {
|
|
55614
|
+
return this.#t ? (this.#t = false, t[9] = 255, super[Tt](t)) : super[Tt](t);
|
|
55615
55615
|
}
|
|
55616
55616
|
};
|
|
55617
|
-
var
|
|
55617
|
+
var Ue = class extends Pe {
|
|
55618
55618
|
constructor(t) {
|
|
55619
55619
|
super(t, "Unzip");
|
|
55620
55620
|
}
|
|
55621
55621
|
};
|
|
55622
|
-
var
|
|
55622
|
+
var He = class extends re2 {
|
|
55623
55623
|
constructor(t, e2) {
|
|
55624
55624
|
t = t || {}, t.flush = t.flush || M3.BROTLI_OPERATION_PROCESS, t.finishFlush = t.finishFlush || M3.BROTLI_OPERATION_FINISH, t.fullFlushFlag = M3.BROTLI_OPERATION_FLUSH, super(t, e2);
|
|
55625
55625
|
}
|
|
55626
55626
|
};
|
|
55627
|
-
var
|
|
55627
|
+
var We = class extends He {
|
|
55628
55628
|
constructor(t) {
|
|
55629
55629
|
super(t, "BrotliCompress");
|
|
55630
55630
|
}
|
|
55631
55631
|
};
|
|
55632
|
-
var
|
|
55632
|
+
var Ge = class extends He {
|
|
55633
55633
|
constructor(t) {
|
|
55634
55634
|
super(t, "BrotliDecompress");
|
|
55635
55635
|
}
|
|
55636
55636
|
};
|
|
55637
|
-
var
|
|
55637
|
+
var Ze = class extends re2 {
|
|
55638
55638
|
constructor(t, e2) {
|
|
55639
55639
|
t = t || {}, t.flush = t.flush || M3.ZSTD_e_continue, t.finishFlush = t.finishFlush || M3.ZSTD_e_end, t.fullFlushFlag = M3.ZSTD_e_flush, super(t, e2);
|
|
55640
55640
|
}
|
|
55641
55641
|
};
|
|
55642
|
-
var
|
|
55642
|
+
var Ye = class extends Ze {
|
|
55643
55643
|
constructor(t) {
|
|
55644
55644
|
super(t, "ZstdCompress");
|
|
55645
55645
|
}
|
|
55646
55646
|
};
|
|
55647
|
-
var
|
|
55647
|
+
var Ke = class extends Ze {
|
|
55648
55648
|
constructor(t) {
|
|
55649
55649
|
super(t, "ZstdDecompress");
|
|
55650
55650
|
}
|
|
55651
55651
|
};
|
|
55652
|
-
var
|
|
55652
|
+
var Us = (s, t) => {
|
|
55653
55653
|
if (Number.isSafeInteger(s))
|
|
55654
|
-
s < 0 ?
|
|
55654
|
+
s < 0 ? an(s, t) : hn(s, t);
|
|
55655
55655
|
else
|
|
55656
55656
|
throw Error("cannot encode number outside of javascript safe integer range");
|
|
55657
55657
|
return t;
|
|
55658
55658
|
};
|
|
55659
|
-
var
|
|
55659
|
+
var hn = (s, t) => {
|
|
55660
55660
|
t[0] = 128;
|
|
55661
55661
|
for (var e2 = t.length;e2 > 1; e2--)
|
|
55662
55662
|
t[e2 - 1] = s & 255, s = Math.floor(s / 256);
|
|
55663
55663
|
};
|
|
55664
|
-
var
|
|
55664
|
+
var an = (s, t) => {
|
|
55665
55665
|
t[0] = 255;
|
|
55666
55666
|
var e2 = false;
|
|
55667
55667
|
s = s * -1;
|
|
55668
55668
|
for (var i = t.length;i > 1; i--) {
|
|
55669
55669
|
var r2 = s & 255;
|
|
55670
|
-
s = Math.floor(s / 256), e2 ? t[i - 1] =
|
|
55670
|
+
s = Math.floor(s / 256), e2 ? t[i - 1] = Ws(r2) : r2 === 0 ? t[i - 1] = 0 : (e2 = true, t[i - 1] = Gs(r2));
|
|
55671
55671
|
}
|
|
55672
55672
|
};
|
|
55673
|
-
var
|
|
55674
|
-
let t = s[0], e2 = t === 128 ?
|
|
55673
|
+
var Hs = (s) => {
|
|
55674
|
+
let t = s[0], e2 = t === 128 ? cn(s.subarray(1, s.length)) : t === 255 ? ln(s) : null;
|
|
55675
55675
|
if (e2 === null)
|
|
55676
55676
|
throw Error("invalid base256 encoding");
|
|
55677
55677
|
if (!Number.isSafeInteger(e2))
|
|
55678
55678
|
throw Error("parsed number outside of javascript safe integer range");
|
|
55679
55679
|
return e2;
|
|
55680
55680
|
};
|
|
55681
|
-
var
|
|
55681
|
+
var ln = (s) => {
|
|
55682
55682
|
for (var t = s.length, e2 = 0, i = false, r2 = t - 1;r2 > -1; r2--) {
|
|
55683
55683
|
var n = Number(s[r2]), o2;
|
|
55684
|
-
i ? o2 =
|
|
55684
|
+
i ? o2 = Ws(n) : n === 0 ? o2 = n : (i = true, o2 = Gs(n)), o2 !== 0 && (e2 -= o2 * Math.pow(256, t - r2 - 1));
|
|
55685
55685
|
}
|
|
55686
55686
|
return e2;
|
|
55687
55687
|
};
|
|
55688
|
-
var
|
|
55688
|
+
var cn = (s) => {
|
|
55689
55689
|
for (var t = s.length, e2 = 0, i = t - 1;i > -1; i--) {
|
|
55690
55690
|
var r2 = Number(s[i]);
|
|
55691
55691
|
r2 !== 0 && (e2 += r2 * Math.pow(256, t - i - 1));
|
|
55692
55692
|
}
|
|
55693
55693
|
return e2;
|
|
55694
55694
|
};
|
|
55695
|
-
var
|
|
55696
|
-
var
|
|
55697
|
-
var
|
|
55698
|
-
|
|
55699
|
-
var
|
|
55700
|
-
var
|
|
55701
|
-
var
|
|
55702
|
-
var
|
|
55695
|
+
var Ws = (s) => (255 ^ s) & 255;
|
|
55696
|
+
var Gs = (s) => (255 ^ s) + 1 & 255;
|
|
55697
|
+
var Hi = {};
|
|
55698
|
+
Ur(Hi, { code: () => Ve, isCode: () => ne, isName: () => dn, name: () => oe, normalFsTypes: () => Ui });
|
|
55699
|
+
var ne = (s) => oe.has(s);
|
|
55700
|
+
var dn = (s) => Ve.has(s);
|
|
55701
|
+
var Ui = new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
|
|
55702
|
+
var oe = 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"]]);
|
|
55703
|
+
var Ve = new Map(Array.from(oe).map((s) => [s[1], s[0]]));
|
|
55704
|
+
var un = (s) => s === undefined || s < 0 ? undefined : s;
|
|
55703
55705
|
var F = class {
|
|
55704
55706
|
cksumValid = false;
|
|
55705
55707
|
needPax = false;
|
|
@@ -55728,55 +55730,54 @@ var F = class {
|
|
|
55728
55730
|
decode(t, e2, i, r2) {
|
|
55729
55731
|
if (e2 || (e2 = 0), !t || !(t.length >= e2 + 512))
|
|
55730
55732
|
throw new Error("need 512 bytes for header");
|
|
55731
|
-
|
|
55732
|
-
|
|
55733
|
-
|
|
55734
|
-
|
|
55735
|
-
|
|
55736
|
-
this.path = h2 + "/" + this.path;
|
|
55733
|
+
let n = xt(t, e2 + 156, 1), o2 = Ui.has(n), h2 = o2 ? i : undefined, a3 = o2 ? r2 : undefined;
|
|
55734
|
+
if (this.path = h2?.path ?? xt(t, e2, 100), this.mode = h2?.mode ?? a3?.mode ?? lt2(t, e2 + 100, 8), this.uid = h2?.uid ?? a3?.uid ?? lt2(t, e2 + 108, 8), this.gid = h2?.gid ?? a3?.gid ?? lt2(t, e2 + 116, 8), this.size = un(h2?.size ?? a3?.size ?? lt2(t, e2 + 124, 12)), this.mtime = h2?.mtime ?? a3?.mtime ?? Wi(t, e2 + 136, 12), this.cksum = lt2(t, e2 + 148, 12), a3 && this.#i(a3, true), h2 && this.#i(h2), ne(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = xt(t, e2 + 157, 100), t.subarray(e2 + 257, e2 + 265).toString() === "ustar\x0000")
|
|
55735
|
+
if (this.uname = h2?.uname ?? a3?.uname ?? xt(t, e2 + 265, 32), this.gname = h2?.gname ?? a3?.gname ?? xt(t, e2 + 297, 32), this.devmaj = h2?.devmaj ?? a3?.devmaj ?? lt2(t, e2 + 329, 8) ?? 0, this.devmin = h2?.devmin ?? a3?.devmin ?? lt2(t, e2 + 337, 8) ?? 0, t[e2 + 475] !== 0) {
|
|
55736
|
+
let c2 = xt(t, e2 + 345, 155);
|
|
55737
|
+
this.path = c2 + "/" + this.path;
|
|
55737
55738
|
} else {
|
|
55738
|
-
let
|
|
55739
|
-
|
|
55739
|
+
let c2 = xt(t, e2 + 345, 130);
|
|
55740
|
+
c2 && (this.path = c2 + "/" + this.path), this.atime = i?.atime ?? r2?.atime ?? Wi(t, e2 + 476, 12), this.ctime = i?.ctime ?? r2?.ctime ?? Wi(t, e2 + 488, 12);
|
|
55740
55741
|
}
|
|
55741
|
-
let
|
|
55742
|
-
for (let
|
|
55743
|
-
|
|
55744
|
-
for (let
|
|
55745
|
-
|
|
55746
|
-
this.cksumValid =
|
|
55742
|
+
let l2 = 256;
|
|
55743
|
+
for (let c2 = e2;c2 < e2 + 148; c2++)
|
|
55744
|
+
l2 += t[c2];
|
|
55745
|
+
for (let c2 = e2 + 156;c2 < e2 + 512; c2++)
|
|
55746
|
+
l2 += t[c2];
|
|
55747
|
+
this.cksumValid = l2 === this.cksum, this.cksum === undefined && l2 === 256 && (this.nullBlock = true);
|
|
55747
55748
|
}
|
|
55748
55749
|
#i(t, e2 = false) {
|
|
55749
|
-
Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r2]) => !(r2 == null || i === "path" && e2 || i === "linkpath" && e2 || i === "global"))));
|
|
55750
|
+
Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r2]) => !(r2 == null || i === "size" && Number(r2) < 0 || i === "path" && e2 || i === "linkpath" && e2 || i === "global"))));
|
|
55750
55751
|
}
|
|
55751
55752
|
encode(t, e2 = 0) {
|
|
55752
55753
|
if (t || (t = this.block = Buffer.alloc(512)), this.#t === "Unsupported" && (this.#t = "0"), !(t.length >= e2 + 512))
|
|
55753
55754
|
throw new Error("need 512 bytes for header");
|
|
55754
|
-
let i = this.ctime || this.atime ? 130 : 155, r2 =
|
|
55755
|
-
this.needPax = !!r2[2], this.needPax =
|
|
55755
|
+
let i = this.ctime || this.atime ? 130 : 155, r2 = mn(this.path || "", i), n = r2[0], o2 = r2[1];
|
|
55756
|
+
this.needPax = !!r2[2], this.needPax = Lt(t, e2, 100, n) || this.needPax, this.needPax = ct(t, e2 + 100, 8, this.mode) || this.needPax, this.needPax = ct(t, e2 + 108, 8, this.uid) || this.needPax, this.needPax = ct(t, e2 + 116, 8, this.gid) || this.needPax, this.needPax = ct(t, e2 + 124, 12, this.size) || this.needPax, this.needPax = Gi(t, e2 + 136, 12, this.mtime) || this.needPax, t[e2 + 156] = Number(this.#t.codePointAt(0)), this.needPax = Lt(t, e2 + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e2 + 257, 8), this.needPax = Lt(t, e2 + 265, 32, this.uname) || this.needPax, this.needPax = Lt(t, e2 + 297, 32, this.gname) || this.needPax, this.needPax = ct(t, e2 + 329, 8, this.devmaj) || this.needPax, this.needPax = ct(t, e2 + 337, 8, this.devmin) || this.needPax, this.needPax = Lt(t, e2 + 345, i, o2) || this.needPax, t[e2 + 475] !== 0 ? this.needPax = Lt(t, e2 + 345, 155, o2) || this.needPax : (this.needPax = Lt(t, e2 + 345, 130, o2) || this.needPax, this.needPax = Gi(t, e2 + 476, 12, this.atime) || this.needPax, this.needPax = Gi(t, e2 + 488, 12, this.ctime) || this.needPax);
|
|
55756
55757
|
let h2 = 256;
|
|
55757
55758
|
for (let a3 = e2;a3 < e2 + 148; a3++)
|
|
55758
55759
|
h2 += t[a3];
|
|
55759
55760
|
for (let a3 = e2 + 156;a3 < e2 + 512; a3++)
|
|
55760
55761
|
h2 += t[a3];
|
|
55761
|
-
return this.cksum = h2,
|
|
55762
|
+
return this.cksum = h2, ct(t, e2 + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
|
|
55762
55763
|
}
|
|
55763
55764
|
get type() {
|
|
55764
|
-
return this.#t === "Unsupported" ? this.#t :
|
|
55765
|
+
return this.#t === "Unsupported" ? this.#t : oe.get(this.#t);
|
|
55765
55766
|
}
|
|
55766
55767
|
get typeKey() {
|
|
55767
55768
|
return this.#t;
|
|
55768
55769
|
}
|
|
55769
55770
|
set type(t) {
|
|
55770
|
-
let e2 = String(
|
|
55771
|
-
if (
|
|
55771
|
+
let e2 = String(Ve.get(t));
|
|
55772
|
+
if (ne(e2) || e2 === "Unsupported")
|
|
55772
55773
|
this.#t = e2;
|
|
55773
|
-
else if (
|
|
55774
|
+
else if (ne(t))
|
|
55774
55775
|
this.#t = t;
|
|
55775
55776
|
else
|
|
55776
55777
|
throw new TypeError("invalid entry type: " + t);
|
|
55777
55778
|
}
|
|
55778
55779
|
};
|
|
55779
|
-
var
|
|
55780
|
+
var mn = (s, t) => {
|
|
55780
55781
|
let i = s, r2 = "", n, o2 = Zt.parse(s).root || ".";
|
|
55781
55782
|
if (Buffer.byteLength(i) < 100)
|
|
55782
55783
|
n = [i, r2, false];
|
|
@@ -55789,21 +55790,21 @@ var an = (s, t) => {
|
|
|
55789
55790
|
}
|
|
55790
55791
|
return n;
|
|
55791
55792
|
};
|
|
55792
|
-
var
|
|
55793
|
-
var
|
|
55794
|
-
var
|
|
55795
|
-
var
|
|
55796
|
-
var
|
|
55797
|
-
var
|
|
55798
|
-
var
|
|
55799
|
-
var
|
|
55800
|
-
var
|
|
55801
|
-
var
|
|
55802
|
-
var
|
|
55803
|
-
var
|
|
55804
|
-
var
|
|
55805
|
-
var
|
|
55806
|
-
var
|
|
55793
|
+
var xt = (s, t, e2) => s.subarray(t, t + e2).toString("utf8").replace(/\0.*/, "");
|
|
55794
|
+
var Wi = (s, t, e2) => pn(lt2(s, t, e2));
|
|
55795
|
+
var pn = (s) => s === undefined ? undefined : new Date(s * 1000);
|
|
55796
|
+
var lt2 = (s, t, e2) => Number(s[t]) & 128 ? Hs(s.subarray(t, t + e2)) : wn(s, t, e2);
|
|
55797
|
+
var En = (s) => isNaN(s) ? undefined : s;
|
|
55798
|
+
var wn = (s, t, e2) => En(parseInt(s.subarray(t, t + e2).toString("utf8").replace(/\0.*$/, "").trim(), 8));
|
|
55799
|
+
var Sn = { 12: 8589934591, 8: 2097151 };
|
|
55800
|
+
var ct = (s, t, e2, i) => i === undefined ? false : i > Sn[e2] || i < 0 ? (Us(i, s.subarray(t, t + e2)), true) : (yn(s, t, e2, i), false);
|
|
55801
|
+
var yn = (s, t, e2, i) => s.write(Rn(i, e2), t, e2, "ascii");
|
|
55802
|
+
var Rn = (s, t) => gn(Math.floor(s).toString(8), t);
|
|
55803
|
+
var gn = (s, t) => (s.length === t - 1 ? s : new Array(t - s.length - 1).join("0") + s + " ") + "\x00";
|
|
55804
|
+
var Gi = (s, t, e2, i) => i === undefined ? false : ct(s, t, e2, i.getTime() / 1000);
|
|
55805
|
+
var bn = new Array(156).join("\x00");
|
|
55806
|
+
var Lt = (s, t, e2, i) => i === undefined ? false : (s.write(i + bn, t, e2, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e2);
|
|
55807
|
+
var ft = class s {
|
|
55807
55808
|
atime;
|
|
55808
55809
|
mtime;
|
|
55809
55810
|
ctime;
|
|
@@ -55831,7 +55832,7 @@ var ct = class s {
|
|
|
55831
55832
|
let e2 = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e2 / 512), r2 = Buffer.allocUnsafe(i);
|
|
55832
55833
|
for (let n = 0;n < 512; n++)
|
|
55833
55834
|
r2[n] = 0;
|
|
55834
|
-
new F({ path: ("PaxHeader/" +
|
|
55835
|
+
new F({ path: ("PaxHeader/" + _n(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e2, 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(r2), r2.write(t, 512, e2, "utf8");
|
|
55835
55836
|
for (let n = e2 + 512;n < r2.length; n++)
|
|
55836
55837
|
r2[n] = 0;
|
|
55837
55838
|
return r2;
|
|
@@ -55847,13 +55848,13 @@ var ct = class s {
|
|
|
55847
55848
|
return n + o2 >= Math.pow(10, o2) && (o2 += 1), o2 + n + r2;
|
|
55848
55849
|
}
|
|
55849
55850
|
static parse(t, e2, i = false) {
|
|
55850
|
-
return new s(
|
|
55851
|
+
return new s(On(Tn(t), e2), i);
|
|
55851
55852
|
}
|
|
55852
55853
|
};
|
|
55853
|
-
var
|
|
55854
|
-
var
|
|
55855
|
-
`).reduce(
|
|
55856
|
-
var
|
|
55854
|
+
var On = (s2, t) => t ? Object.assign({}, t, s2) : s2;
|
|
55855
|
+
var Tn = (s2) => s2.replace(/\n$/, "").split(`
|
|
55856
|
+
`).reduce(xn, Object.create(null));
|
|
55857
|
+
var xn = (s2, t) => {
|
|
55857
55858
|
let e2 = parseInt(t, 10);
|
|
55858
55859
|
if (e2 !== Buffer.byteLength(t) + 1)
|
|
55859
55860
|
return s2;
|
|
@@ -55861,12 +55862,40 @@ var Rn = (s2, t) => {
|
|
|
55861
55862
|
let i = t.split("="), r2 = i.shift();
|
|
55862
55863
|
if (!r2)
|
|
55863
55864
|
return s2;
|
|
55864
|
-
let n = r2.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o2 = i.join("=");
|
|
55865
|
-
|
|
55865
|
+
let n = r2.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o2 = i.join("=").replace(/\0.*/, "");
|
|
55866
|
+
switch (n) {
|
|
55867
|
+
case "path":
|
|
55868
|
+
case "linkpath":
|
|
55869
|
+
case "type":
|
|
55870
|
+
case "charset":
|
|
55871
|
+
case "comment":
|
|
55872
|
+
case "gname":
|
|
55873
|
+
case "uname":
|
|
55874
|
+
s2[n] = o2;
|
|
55875
|
+
break;
|
|
55876
|
+
case "ctime":
|
|
55877
|
+
case "atime":
|
|
55878
|
+
case "mtime":
|
|
55879
|
+
s2[n] = new Date(Number(o2) * 1000);
|
|
55880
|
+
break;
|
|
55881
|
+
case "size":
|
|
55882
|
+
let h2 = +o2;
|
|
55883
|
+
h2 >= 0 && (s2[n] = h2);
|
|
55884
|
+
break;
|
|
55885
|
+
case "gid":
|
|
55886
|
+
case "uid":
|
|
55887
|
+
case "dev":
|
|
55888
|
+
case "ino":
|
|
55889
|
+
case "nlink":
|
|
55890
|
+
case "mode":
|
|
55891
|
+
s2[n] = +o2;
|
|
55892
|
+
break;
|
|
55893
|
+
}
|
|
55894
|
+
return s2;
|
|
55866
55895
|
};
|
|
55867
|
-
var
|
|
55868
|
-
var f3 =
|
|
55869
|
-
var
|
|
55896
|
+
var Ln = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
55897
|
+
var f3 = Ln !== "win32" ? (s2) => String(s2) : (s2) => String(s2).replaceAll(/\\/g, "/");
|
|
55898
|
+
var $e2 = class extends A3 {
|
|
55870
55899
|
extended;
|
|
55871
55900
|
globalExtended;
|
|
55872
55901
|
header;
|
|
@@ -55932,94 +55961,101 @@ var Yt = class extends D {
|
|
|
55932
55961
|
t.path && (t.path = f3(t.path)), t.linkpath && (t.linkpath = f3(t.linkpath)), Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r2]) => !(r2 == null || i === "path" && e2))));
|
|
55933
55962
|
}
|
|
55934
55963
|
};
|
|
55935
|
-
var
|
|
55964
|
+
var Dt = (s2, t, e2, i = {}) => {
|
|
55936
55965
|
s2.file && (i.file = s2.file), s2.cwd && (i.cwd = s2.cwd), i.code = e2 instanceof Error && e2.code || t, i.tarCode = t, !s2.strict && i.recoverable !== false ? (e2 instanceof Error && (i = Object.assign(e2, i), e2 = e2.message), s2.emit("warn", t, e2, i)) : e2 instanceof Error ? s2.emit("error", Object.assign(e2, i)) : s2.emit("error", Object.assign(new Error(`${t}: ${e2}`), i));
|
|
55937
55966
|
};
|
|
55938
|
-
var
|
|
55939
|
-
var
|
|
55940
|
-
var
|
|
55941
|
-
var
|
|
55967
|
+
var Nn = 1024 * 1024;
|
|
55968
|
+
var Xi = Buffer.from([31, 139]);
|
|
55969
|
+
var qi = Buffer.from([40, 181, 47, 253]);
|
|
55970
|
+
var An = Math.max(Xi.length, qi.length);
|
|
55942
55971
|
var B2 = Symbol("state");
|
|
55943
55972
|
var Nt = Symbol("writeEntry");
|
|
55944
|
-
var
|
|
55945
|
-
var
|
|
55946
|
-
var
|
|
55973
|
+
var it = Symbol("readEntry");
|
|
55974
|
+
var Zi = Symbol("nextEntry");
|
|
55975
|
+
var Zs = Symbol("processEntry");
|
|
55947
55976
|
var V2 = Symbol("extendedHeader");
|
|
55948
|
-
var
|
|
55949
|
-
var
|
|
55950
|
-
var
|
|
55977
|
+
var he = Symbol("globalExtendedHeader");
|
|
55978
|
+
var dt = Symbol("meta");
|
|
55979
|
+
var Ys = Symbol("emitMeta");
|
|
55951
55980
|
var p = Symbol("buffer");
|
|
55952
|
-
var
|
|
55953
|
-
var
|
|
55954
|
-
var
|
|
55981
|
+
var st = Symbol("queue");
|
|
55982
|
+
var ut = Symbol("ended");
|
|
55983
|
+
var Yi = Symbol("emittedEnd");
|
|
55955
55984
|
var At = Symbol("emit");
|
|
55956
|
-
var
|
|
55957
|
-
var
|
|
55958
|
-
var
|
|
55959
|
-
var
|
|
55960
|
-
var
|
|
55961
|
-
var
|
|
55962
|
-
var
|
|
55963
|
-
var
|
|
55964
|
-
var
|
|
55965
|
-
var
|
|
55966
|
-
var
|
|
55967
|
-
var
|
|
55968
|
-
var
|
|
55985
|
+
var w3 = Symbol("unzip");
|
|
55986
|
+
var Xe = Symbol("consumeChunk");
|
|
55987
|
+
var qe = Symbol("consumeChunkSub");
|
|
55988
|
+
var Ki = Symbol("consumeBody");
|
|
55989
|
+
var Ks = Symbol("consumeMeta");
|
|
55990
|
+
var Vs = Symbol("consumeHeader");
|
|
55991
|
+
var ae2 = Symbol("consuming");
|
|
55992
|
+
var Vi = Symbol("bufferConcat");
|
|
55993
|
+
var Qe = Symbol("maybeEnd");
|
|
55994
|
+
var Yt = Symbol("writing");
|
|
55995
|
+
var $2 = Symbol("aborted");
|
|
55996
|
+
var Je = Symbol("onDone");
|
|
55997
|
+
var It = Symbol("sawValidEntry");
|
|
55969
55998
|
var je = Symbol("sawNullBlock");
|
|
55970
|
-
var
|
|
55971
|
-
var
|
|
55972
|
-
var
|
|
55973
|
-
var
|
|
55999
|
+
var ti = Symbol("sawEOF");
|
|
56000
|
+
var $s = Symbol("closeStream");
|
|
56001
|
+
var In = 1000;
|
|
56002
|
+
var le2 = Symbol("compressedBytesRead");
|
|
56003
|
+
var $i = Symbol("decompressedBytesRead");
|
|
56004
|
+
var Xs = Symbol("checkDecompressionRatio");
|
|
56005
|
+
var Cn = () => true;
|
|
56006
|
+
var rt = class extends Dn {
|
|
55974
56007
|
file;
|
|
55975
56008
|
strict;
|
|
55976
56009
|
maxMetaEntrySize;
|
|
55977
56010
|
filter;
|
|
55978
56011
|
brotli;
|
|
55979
56012
|
zstd;
|
|
56013
|
+
maxDecompressionRatio;
|
|
55980
56014
|
writable = true;
|
|
55981
56015
|
readable = false;
|
|
55982
|
-
[
|
|
56016
|
+
[st] = [];
|
|
55983
56017
|
[p];
|
|
55984
|
-
[
|
|
56018
|
+
[it];
|
|
55985
56019
|
[Nt];
|
|
55986
56020
|
[B2] = "begin";
|
|
55987
|
-
[
|
|
56021
|
+
[dt] = "";
|
|
55988
56022
|
[V2];
|
|
55989
|
-
[
|
|
55990
|
-
[dt] = false;
|
|
55991
|
-
[y3];
|
|
56023
|
+
[he];
|
|
55992
56024
|
[ut] = false;
|
|
55993
|
-
[
|
|
56025
|
+
[w3];
|
|
56026
|
+
[$2] = false;
|
|
56027
|
+
[It];
|
|
55994
56028
|
[je] = false;
|
|
55995
|
-
[
|
|
55996
|
-
[
|
|
55997
|
-
[
|
|
55998
|
-
[
|
|
56029
|
+
[ti] = false;
|
|
56030
|
+
[Yt] = false;
|
|
56031
|
+
[ae2] = false;
|
|
56032
|
+
[Yi] = false;
|
|
56033
|
+
[le2] = 0;
|
|
56034
|
+
[$i] = 0;
|
|
55999
56035
|
constructor(t = {}) {
|
|
56000
|
-
super(), this.file = t.file || "", this.on(
|
|
56001
|
-
(this[B2] === "begin" || this[
|
|
56002
|
-
}), t.ondone ? this.on(
|
|
56036
|
+
super(), this.file = t.file || "", this.on(Je, () => {
|
|
56037
|
+
(this[B2] === "begin" || this[It] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
56038
|
+
}), t.ondone ? this.on(Je, t.ondone) : this.on(Je, () => {
|
|
56003
56039
|
this.emit("prefinish"), this.emit("finish"), this.emit("end");
|
|
56004
|
-
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize ||
|
|
56040
|
+
}), this.strict = !!t.strict, this.maxDecompressionRatio = typeof t.maxDecompressionRatio == "number" ? t.maxDecompressionRatio : In, this.maxMetaEntrySize = t.maxMetaEntrySize || Nn, this.filter = typeof t.filter == "function" ? t.filter : Cn;
|
|
56005
56041
|
let e2 = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
|
|
56006
56042
|
this.brotli = !(t.gzip || t.zstd) && t.brotli !== undefined ? t.brotli : e2 ? undefined : false;
|
|
56007
56043
|
let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
|
|
56008
|
-
this.zstd = !(t.gzip || t.brotli) && t.zstd !== undefined ? t.zstd : i ? true : undefined, this.on("end", () => this[
|
|
56044
|
+
this.zstd = !(t.gzip || t.brotli) && t.zstd !== undefined ? t.zstd : i ? true : undefined, this.on("end", () => this[$s]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
|
|
56009
56045
|
}
|
|
56010
56046
|
warn(t, e2, i = {}) {
|
|
56011
|
-
|
|
56047
|
+
Dt(this, t, e2, i);
|
|
56012
56048
|
}
|
|
56013
|
-
[
|
|
56014
|
-
this[
|
|
56049
|
+
[Vs](t, e2) {
|
|
56050
|
+
this[It] === undefined && (this[It] = false);
|
|
56015
56051
|
let i;
|
|
56016
56052
|
try {
|
|
56017
|
-
i = new F(t, e2, this[V2], this[
|
|
56053
|
+
i = new F(t, e2, this[V2], this[he]);
|
|
56018
56054
|
} catch (r2) {
|
|
56019
56055
|
return this.warn("TAR_ENTRY_INVALID", r2);
|
|
56020
56056
|
}
|
|
56021
56057
|
if (i.nullBlock)
|
|
56022
|
-
this[je] ? (this[
|
|
56058
|
+
this[je] ? (this[ti] = true, this[B2] === "begin" && (this[B2] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
|
|
56023
56059
|
else if (this[je] = false, !i.cksumValid)
|
|
56024
56060
|
this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
|
|
56025
56061
|
else if (!i.path)
|
|
@@ -56031,74 +56067,74 @@ var st = class extends _n {
|
|
|
56031
56067
|
else if (!/^(Symbolic)?Link$/.test(r2) && !/^(Global)?ExtendedHeader$/.test(r2) && i.linkpath)
|
|
56032
56068
|
this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
|
|
56033
56069
|
else {
|
|
56034
|
-
let n = this[Nt] = new
|
|
56035
|
-
if (!this[
|
|
56070
|
+
let n = this[Nt] = new $e2(i, this[V2], this[he]);
|
|
56071
|
+
if (!this[It])
|
|
56036
56072
|
if (n.remain) {
|
|
56037
56073
|
let o2 = () => {
|
|
56038
|
-
n.invalid || (this[
|
|
56074
|
+
n.invalid || (this[It] = true);
|
|
56039
56075
|
};
|
|
56040
56076
|
n.on("end", o2);
|
|
56041
56077
|
} else
|
|
56042
|
-
this[
|
|
56043
|
-
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B2] = "ignore", n.resume()) : n.size > 0 && (this[
|
|
56078
|
+
this[It] = true;
|
|
56079
|
+
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B2] = "ignore", n.resume()) : n.size > 0 && (this[dt] = "", n.on("data", (o2) => this[dt] += o2), this[B2] = "meta") : (this[V2] = undefined, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B2] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B2] = "body" : (this[B2] = "header", n.end()), this[it] ? this[st].push(n) : (this[st].push(n), this[Zi]())));
|
|
56044
56080
|
}
|
|
56045
56081
|
}
|
|
56046
56082
|
}
|
|
56047
|
-
[
|
|
56083
|
+
[$s]() {
|
|
56048
56084
|
queueMicrotask(() => this.emit("close"));
|
|
56049
56085
|
}
|
|
56050
|
-
[
|
|
56086
|
+
[Zs](t) {
|
|
56051
56087
|
let e2 = true;
|
|
56052
56088
|
if (!t)
|
|
56053
|
-
this[
|
|
56089
|
+
this[it] = undefined, e2 = false;
|
|
56054
56090
|
else if (Array.isArray(t)) {
|
|
56055
56091
|
let [i, ...r2] = t;
|
|
56056
56092
|
this.emit(i, ...r2);
|
|
56057
56093
|
} else
|
|
56058
|
-
this[
|
|
56094
|
+
this[it] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Zi]()), e2 = false);
|
|
56059
56095
|
return e2;
|
|
56060
56096
|
}
|
|
56061
|
-
[
|
|
56097
|
+
[Zi]() {
|
|
56062
56098
|
do
|
|
56063
56099
|
;
|
|
56064
|
-
while (this[
|
|
56065
|
-
if (this[
|
|
56066
|
-
let t = this[
|
|
56067
|
-
!t || t.flowing || t.size === t.remain ? this[
|
|
56100
|
+
while (this[Zs](this[st].shift()));
|
|
56101
|
+
if (this[st].length === 0) {
|
|
56102
|
+
let t = this[it];
|
|
56103
|
+
!t || t.flowing || t.size === t.remain ? this[Yt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
|
|
56068
56104
|
}
|
|
56069
56105
|
}
|
|
56070
|
-
[
|
|
56106
|
+
[Ki](t, e2) {
|
|
56071
56107
|
let i = this[Nt];
|
|
56072
56108
|
if (!i)
|
|
56073
56109
|
throw new Error("attempt to consume body without entry??");
|
|
56074
56110
|
let r2 = i.blockRemain ?? 0, n = r2 >= t.length && e2 === 0 ? t : t.subarray(e2, e2 + r2);
|
|
56075
56111
|
return i.write(n), i.blockRemain || (this[B2] = "header", this[Nt] = undefined, i.end()), n.length;
|
|
56076
56112
|
}
|
|
56077
|
-
[
|
|
56078
|
-
let i = this[Nt], r2 = this[
|
|
56079
|
-
return !this[Nt] && i && this[
|
|
56113
|
+
[Ks](t, e2) {
|
|
56114
|
+
let i = this[Nt], r2 = this[Ki](t, e2);
|
|
56115
|
+
return !this[Nt] && i && this[Ys](i), r2;
|
|
56080
56116
|
}
|
|
56081
56117
|
[At](t, e2, i) {
|
|
56082
|
-
this[
|
|
56118
|
+
this[st].length === 0 && !this[it] ? this.emit(t, e2, i) : this[st].push([t, e2, i]);
|
|
56083
56119
|
}
|
|
56084
|
-
[
|
|
56085
|
-
switch (this[At]("meta", this[
|
|
56120
|
+
[Ys](t) {
|
|
56121
|
+
switch (this[At]("meta", this[dt]), t.type) {
|
|
56086
56122
|
case "ExtendedHeader":
|
|
56087
56123
|
case "OldExtendedHeader":
|
|
56088
|
-
this[V2] =
|
|
56124
|
+
this[V2] = ft.parse(this[dt], this[V2], false);
|
|
56089
56125
|
break;
|
|
56090
56126
|
case "GlobalExtendedHeader":
|
|
56091
|
-
this[
|
|
56127
|
+
this[he] = ft.parse(this[dt], this[he], true);
|
|
56092
56128
|
break;
|
|
56093
56129
|
case "NextFileHasLongPath":
|
|
56094
56130
|
case "OldGnuLongPath": {
|
|
56095
56131
|
let e2 = this[V2] ?? Object.create(null);
|
|
56096
|
-
this[V2] = e2, e2.path = this[
|
|
56132
|
+
this[V2] = e2, e2.path = this[dt].replace(/\0.*/, "");
|
|
56097
56133
|
break;
|
|
56098
56134
|
}
|
|
56099
56135
|
case "NextFileHasLongLinkpath": {
|
|
56100
56136
|
let e2 = this[V2] || Object.create(null);
|
|
56101
|
-
this[V2] = e2, e2.linkpath = this[
|
|
56137
|
+
this[V2] = e2, e2.linkpath = this[dt].replace(/\0.*/, "");
|
|
56102
56138
|
break;
|
|
56103
56139
|
}
|
|
56104
56140
|
default:
|
|
@@ -56106,29 +56142,40 @@ var st = class extends _n {
|
|
|
56106
56142
|
}
|
|
56107
56143
|
}
|
|
56108
56144
|
abort(t) {
|
|
56109
|
-
this[
|
|
56145
|
+
if (!this[$2]) {
|
|
56146
|
+
if (this[w3]) {
|
|
56147
|
+
let e2 = this[w3];
|
|
56148
|
+
e2.write = () => true, e2.end = () => e2, e2.emit = () => false, e2.destroy?.();
|
|
56149
|
+
}
|
|
56150
|
+
this[$2] = true, this.emit("abort", t), this.warn("TAR_ABORT", t, { recoverable: false });
|
|
56151
|
+
}
|
|
56152
|
+
}
|
|
56153
|
+
[Xs](t) {
|
|
56154
|
+
this[$i] += t.length;
|
|
56155
|
+
let e2 = this[$i] / this[le2];
|
|
56156
|
+
return e2 > this.maxDecompressionRatio ? (this.abort(new Error(`max decompression ratio exceeded: ${e2.toFixed(2)} > ${this.maxDecompressionRatio}`)), false) : true;
|
|
56110
56157
|
}
|
|
56111
56158
|
write(t, e2, i) {
|
|
56112
|
-
if (typeof e2 == "function" && (i = e2, e2 = undefined), typeof t == "string" && (t = Buffer.from(t, typeof e2 == "string" ? e2 : "utf8")), this[
|
|
56159
|
+
if (typeof e2 == "function" && (i = e2, e2 = undefined), typeof t == "string" && (t = Buffer.from(t, typeof e2 == "string" ? e2 : "utf8")), this[$2])
|
|
56113
56160
|
return i?.(), false;
|
|
56114
|
-
if ((this[
|
|
56115
|
-
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = undefined), t.length <
|
|
56161
|
+
if ((this[w3] === undefined || this.brotli === undefined && this[w3] === false) && t) {
|
|
56162
|
+
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = undefined), t.length < An)
|
|
56116
56163
|
return this[p] = t, i?.(), true;
|
|
56117
|
-
for (let a3 = 0;this[
|
|
56118
|
-
t[a3] !==
|
|
56164
|
+
for (let a3 = 0;this[w3] === undefined && a3 < Xi.length; a3++)
|
|
56165
|
+
t[a3] !== Xi[a3] && (this[w3] = false);
|
|
56119
56166
|
let o2 = false;
|
|
56120
|
-
if (this[
|
|
56167
|
+
if (this[w3] === false && this.zstd !== false) {
|
|
56121
56168
|
o2 = true;
|
|
56122
|
-
for (let a3 = 0;a3 <
|
|
56123
|
-
if (t[a3] !==
|
|
56169
|
+
for (let a3 = 0;a3 < qi.length; a3++)
|
|
56170
|
+
if (t[a3] !== qi[a3]) {
|
|
56124
56171
|
o2 = false;
|
|
56125
56172
|
break;
|
|
56126
56173
|
}
|
|
56127
56174
|
}
|
|
56128
56175
|
let h2 = this.brotli === undefined && !o2;
|
|
56129
|
-
if (this[
|
|
56176
|
+
if (this[w3] === false && h2)
|
|
56130
56177
|
if (t.length < 512)
|
|
56131
|
-
if (this[
|
|
56178
|
+
if (this[ut])
|
|
56132
56179
|
this.brotli = true;
|
|
56133
56180
|
else
|
|
56134
56181
|
return this[p] = t, i?.(), true;
|
|
@@ -56138,67 +56185,71 @@ var st = class extends _n {
|
|
|
56138
56185
|
} catch {
|
|
56139
56186
|
this.brotli = true;
|
|
56140
56187
|
}
|
|
56141
|
-
if (this[
|
|
56142
|
-
let a3 = this[
|
|
56143
|
-
this[
|
|
56144
|
-
this[
|
|
56145
|
-
}), this[
|
|
56146
|
-
|
|
56147
|
-
|
|
56148
|
-
|
|
56149
|
-
|
|
56150
|
-
|
|
56151
|
-
|
|
56152
|
-
|
|
56153
|
-
|
|
56154
|
-
|
|
56155
|
-
|
|
56156
|
-
|
|
56157
|
-
|
|
56158
|
-
|
|
56159
|
-
|
|
56188
|
+
if (this[w3] === undefined || this[w3] === false && (this.brotli || o2)) {
|
|
56189
|
+
let a3 = this[ut];
|
|
56190
|
+
this[ut] = false, this[w3] = this[w3] === undefined ? new Ue({}) : o2 ? new Ke({}) : new Ge({}), this[w3].on("data", (c2) => {
|
|
56191
|
+
this[Xs](c2) && this[Xe](c2);
|
|
56192
|
+
}), this[w3].on("error", (c2) => {
|
|
56193
|
+
this[$2] || this.abort(c2);
|
|
56194
|
+
}), this[w3].on("end", () => {
|
|
56195
|
+
this[ut] = true, this[Xe]();
|
|
56196
|
+
}), this[Yt] = true, this[le2] += t.length;
|
|
56197
|
+
let l2 = !!this[w3][a3 ? "end" : "write"](t);
|
|
56198
|
+
return this[Yt] = false, i?.(), l2;
|
|
56199
|
+
}
|
|
56200
|
+
}
|
|
56201
|
+
this[Yt] = true, this[w3] ? (this[le2] += t.length, this[w3].write(t)) : this[Xe](t), this[Yt] = false;
|
|
56202
|
+
let n = this[st].length > 0 ? false : this[it] ? this[it].flowing : true;
|
|
56203
|
+
return !n && this[st].length === 0 && this[it]?.once("drain", () => this.emit("drain")), i?.(), n;
|
|
56204
|
+
}
|
|
56205
|
+
[Vi](t) {
|
|
56206
|
+
t && !this[$2] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
|
|
56207
|
+
}
|
|
56208
|
+
[Qe]() {
|
|
56209
|
+
if (this[ut] && !this[Yi] && !this[$2] && !this[ae2]) {
|
|
56210
|
+
this[Yi] = true;
|
|
56160
56211
|
let t = this[Nt];
|
|
56161
|
-
if (t
|
|
56212
|
+
if (t?.blockRemain) {
|
|
56162
56213
|
let e2 = this[p] ? this[p].length : 0;
|
|
56163
56214
|
this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t.blockRemain} more bytes, only ${e2} available)`, { entry: t }), this[p] && t.write(this[p]), t.end();
|
|
56164
56215
|
}
|
|
56165
|
-
this[At](
|
|
56216
|
+
this[At](Je);
|
|
56166
56217
|
}
|
|
56167
56218
|
}
|
|
56168
|
-
[
|
|
56169
|
-
if (this[
|
|
56170
|
-
this[
|
|
56219
|
+
[Xe](t) {
|
|
56220
|
+
if (this[ae2] && t)
|
|
56221
|
+
this[Vi](t);
|
|
56171
56222
|
else if (!t && !this[p])
|
|
56172
|
-
this[
|
|
56223
|
+
this[Qe]();
|
|
56173
56224
|
else if (t) {
|
|
56174
|
-
if (this[
|
|
56175
|
-
this[
|
|
56225
|
+
if (this[ae2] = true, this[p]) {
|
|
56226
|
+
this[Vi](t);
|
|
56176
56227
|
let e2 = this[p];
|
|
56177
|
-
this[p] = undefined, this[
|
|
56228
|
+
this[p] = undefined, this[qe](e2);
|
|
56178
56229
|
} else
|
|
56179
|
-
this[
|
|
56180
|
-
for (;this[p] && this[p]?.length >= 512 && !this[
|
|
56230
|
+
this[qe](t);
|
|
56231
|
+
for (;this[p] && this[p]?.length >= 512 && !this[$2] && !this[ti]; ) {
|
|
56181
56232
|
let e2 = this[p];
|
|
56182
|
-
this[p] = undefined, this[
|
|
56233
|
+
this[p] = undefined, this[qe](e2);
|
|
56183
56234
|
}
|
|
56184
|
-
this[
|
|
56235
|
+
this[ae2] = false;
|
|
56185
56236
|
}
|
|
56186
|
-
(!this[p] || this[
|
|
56237
|
+
(!this[p] || this[ut]) && this[Qe]();
|
|
56187
56238
|
}
|
|
56188
|
-
[
|
|
56239
|
+
[qe](t) {
|
|
56189
56240
|
let e2 = 0, i = t.length;
|
|
56190
|
-
for (;e2 + 512 <= i && !this[
|
|
56241
|
+
for (;e2 + 512 <= i && !this[$2] && !this[ti]; )
|
|
56191
56242
|
switch (this[B2]) {
|
|
56192
56243
|
case "begin":
|
|
56193
56244
|
case "header":
|
|
56194
|
-
this[
|
|
56245
|
+
this[Vs](t, e2), e2 += 512;
|
|
56195
56246
|
break;
|
|
56196
56247
|
case "ignore":
|
|
56197
56248
|
case "body":
|
|
56198
|
-
e2 += this[
|
|
56249
|
+
e2 += this[Ki](t, e2);
|
|
56199
56250
|
break;
|
|
56200
56251
|
case "meta":
|
|
56201
|
-
e2 += this[
|
|
56252
|
+
e2 += this[Ks](t, e2);
|
|
56202
56253
|
break;
|
|
56203
56254
|
default:
|
|
56204
56255
|
throw new Error("invalid state: " + this[B2]);
|
|
@@ -56206,7 +56257,7 @@ var st = class extends _n {
|
|
|
56206
56257
|
e2 < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e2), this[p]]) : t.subarray(e2));
|
|
56207
56258
|
}
|
|
56208
56259
|
end(t, e2, i) {
|
|
56209
|
-
return typeof t == "function" && (i = t, e2 = undefined, t = undefined), typeof e2 == "function" && (i = e2, e2 = undefined), typeof t == "string" && (t = Buffer.from(t, e2)), i && this.once("finish", i), this[
|
|
56260
|
+
return typeof t == "function" && (i = t, e2 = undefined, t = undefined), typeof e2 == "function" && (i = e2, e2 = undefined), typeof t == "string" && (t = Buffer.from(t, e2)), i && this.once("finish", i), this[$2] || (this[w3] ? (t && (this[le2] += t.length, this[w3].write(t)), this[w3].end()) : (this[ut] = true, (this.brotli === undefined || this.zstd === undefined) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Qe]())), this;
|
|
56210
56261
|
}
|
|
56211
56262
|
};
|
|
56212
56263
|
var mt = (s2) => {
|
|
@@ -56215,37 +56266,39 @@ var mt = (s2) => {
|
|
|
56215
56266
|
e2 = t, t--;
|
|
56216
56267
|
return e2 === -1 ? s2 : s2.slice(0, e2);
|
|
56217
56268
|
};
|
|
56218
|
-
var
|
|
56269
|
+
var vn = (s2) => {
|
|
56219
56270
|
let t = s2.onReadEntry;
|
|
56220
56271
|
s2.onReadEntry = t ? (e2) => {
|
|
56221
56272
|
t(e2), e2.resume();
|
|
56222
56273
|
} : (e2) => e2.resume();
|
|
56223
56274
|
};
|
|
56224
|
-
var
|
|
56225
|
-
let e2 = new Map(t.map((
|
|
56226
|
-
|
|
56227
|
-
|
|
56228
|
-
|
|
56275
|
+
var Qi = (s2, t) => {
|
|
56276
|
+
let e2 = new Map(t.map((o2) => [mt(o2), true])), i = s2.filter, r2 = 100, n = (o2, h2 = "", a3 = 0) => {
|
|
56277
|
+
if (a3 >= r2)
|
|
56278
|
+
return e2.set(o2, false), false;
|
|
56279
|
+
let l2 = h2 || kn(o2).root || ".", c2;
|
|
56280
|
+
if (o2 === l2)
|
|
56281
|
+
c2 = false;
|
|
56229
56282
|
else {
|
|
56230
|
-
let
|
|
56231
|
-
|
|
56283
|
+
let d3 = e2.get(o2);
|
|
56284
|
+
c2 = d3 !== undefined ? d3 : n(Fn(o2), l2, a3 + 1);
|
|
56232
56285
|
}
|
|
56233
|
-
return e2.set(
|
|
56286
|
+
return e2.set(o2, c2), c2;
|
|
56234
56287
|
};
|
|
56235
|
-
s2.filter = i ? (
|
|
56288
|
+
s2.filter = i ? (o2, h2) => i(o2, h2) && n(mt(o2)) : (o2) => n(mt(o2));
|
|
56236
56289
|
};
|
|
56237
|
-
var
|
|
56238
|
-
let t = new
|
|
56290
|
+
var Mn = (s2) => {
|
|
56291
|
+
let t = new rt(s2), e2 = s2.file, i;
|
|
56239
56292
|
try {
|
|
56240
|
-
i =
|
|
56241
|
-
let r2 =
|
|
56293
|
+
i = Kt.openSync(e2, "r");
|
|
56294
|
+
let r2 = Kt.fstatSync(i), n = s2.maxReadSize || 16 * 1024 * 1024;
|
|
56242
56295
|
if (r2.size < n) {
|
|
56243
|
-
let o2 = Buffer.allocUnsafe(r2.size), h2 =
|
|
56296
|
+
let o2 = Buffer.allocUnsafe(r2.size), h2 = Kt.readSync(i, o2, 0, r2.size, 0);
|
|
56244
56297
|
t.end(h2 === o2.byteLength ? o2 : o2.subarray(0, h2));
|
|
56245
56298
|
} else {
|
|
56246
56299
|
let o2 = 0, h2 = Buffer.allocUnsafe(n);
|
|
56247
56300
|
for (;o2 < r2.size; ) {
|
|
56248
|
-
let a3 =
|
|
56301
|
+
let a3 = Kt.readSync(i, h2, 0, n, o2);
|
|
56249
56302
|
if (a3 === 0)
|
|
56250
56303
|
break;
|
|
56251
56304
|
o2 += a3, t.write(h2.subarray(0, a3));
|
|
@@ -56255,14 +56308,14 @@ var An = (s2) => {
|
|
|
56255
56308
|
} finally {
|
|
56256
56309
|
if (typeof i == "number")
|
|
56257
56310
|
try {
|
|
56258
|
-
|
|
56311
|
+
Kt.closeSync(i);
|
|
56259
56312
|
} catch {}
|
|
56260
56313
|
}
|
|
56261
56314
|
};
|
|
56262
|
-
var
|
|
56263
|
-
let e2 = new
|
|
56315
|
+
var Bn = (s2, t) => {
|
|
56316
|
+
let e2 = new rt(s2), i = s2.maxReadSize || 16 * 1024 * 1024, r2 = s2.file;
|
|
56264
56317
|
return new Promise((o2, h2) => {
|
|
56265
|
-
e2.on("error", h2), e2.on("end", o2),
|
|
56318
|
+
e2.on("error", h2), e2.on("end", o2), Kt.stat(r2, (a3, l2) => {
|
|
56266
56319
|
if (a3)
|
|
56267
56320
|
h2(a3);
|
|
56268
56321
|
else {
|
|
@@ -56272,46 +56325,46 @@ var Dn = (s2, t) => {
|
|
|
56272
56325
|
});
|
|
56273
56326
|
});
|
|
56274
56327
|
};
|
|
56275
|
-
var
|
|
56276
|
-
t?.length &&
|
|
56328
|
+
var Ct = K3(Mn, Bn, (s2) => new rt(s2), (s2) => new rt(s2), (s2, t) => {
|
|
56329
|
+
t?.length && Qi(s2, t), s2.noResume || vn(s2);
|
|
56277
56330
|
});
|
|
56278
|
-
var
|
|
56279
|
-
var { isAbsolute:
|
|
56331
|
+
var Ji = (s2, t, e2) => (s2 &= 4095, e2 && (s2 = (s2 | 384) & -19), t && (s2 & 256 && (s2 |= 64), s2 & 32 && (s2 |= 8), s2 & 4 && (s2 |= 1)), s2);
|
|
56332
|
+
var { isAbsolute: zn, parse: qs } = Pn;
|
|
56280
56333
|
var ce2 = (s2) => {
|
|
56281
|
-
let t = "", e2 =
|
|
56282
|
-
for (;
|
|
56334
|
+
let t = "", e2 = qs(s2);
|
|
56335
|
+
for (;zn(s2) || e2.root; ) {
|
|
56283
56336
|
let i = s2.charAt(0) === "/" && s2.slice(0, 4) !== "//?/" ? "/" : e2.root;
|
|
56284
|
-
s2 = s2.slice(i.length), t += i, e2 =
|
|
56337
|
+
s2 = s2.slice(i.length), t += i, e2 = qs(s2);
|
|
56285
56338
|
}
|
|
56286
56339
|
return [t, s2];
|
|
56287
56340
|
};
|
|
56288
|
-
var
|
|
56289
|
-
var
|
|
56290
|
-
var
|
|
56291
|
-
var
|
|
56292
|
-
var
|
|
56293
|
-
var
|
|
56294
|
-
var
|
|
56295
|
-
var
|
|
56296
|
-
var
|
|
56297
|
-
var
|
|
56298
|
-
var
|
|
56299
|
-
var
|
|
56300
|
-
var
|
|
56341
|
+
var ei = ["|", "<", ">", "?", ":"];
|
|
56342
|
+
var ji = ei.map((s2) => String.fromCodePoint(61440 + Number(s2.codePointAt(0))));
|
|
56343
|
+
var Un = new Map(ei.map((s2, t) => [s2, ji[t]]));
|
|
56344
|
+
var Hn = new Map(ji.map((s2, t) => [s2, ei[t]]));
|
|
56345
|
+
var ts = (s2) => ei.reduce((t, e2) => t.split(e2).join(Un.get(e2)), s2);
|
|
56346
|
+
var Qs = (s2) => ji.reduce((t, e2) => t.split(e2).join(Hn.get(e2)), s2);
|
|
56347
|
+
var rr = (s2, t) => t ? (s2 = f3(s2).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s2) : f3(s2);
|
|
56348
|
+
var Wn = 16 * 1024 * 1024;
|
|
56349
|
+
var tr = Symbol("process");
|
|
56350
|
+
var er = Symbol("file");
|
|
56351
|
+
var ir = Symbol("directory");
|
|
56352
|
+
var is = Symbol("symlink");
|
|
56353
|
+
var sr = Symbol("hardlink");
|
|
56301
56354
|
var fe = Symbol("header");
|
|
56302
|
-
var
|
|
56303
|
-
var
|
|
56304
|
-
var
|
|
56305
|
-
var
|
|
56306
|
-
var
|
|
56307
|
-
var
|
|
56308
|
-
var
|
|
56355
|
+
var ii = Symbol("read");
|
|
56356
|
+
var ss = Symbol("lstat");
|
|
56357
|
+
var si = Symbol("onlstat");
|
|
56358
|
+
var rs = Symbol("onread");
|
|
56359
|
+
var ns = Symbol("onreadlink");
|
|
56360
|
+
var os5 = Symbol("openfile");
|
|
56361
|
+
var hs = Symbol("onopenfile");
|
|
56309
56362
|
var pt = Symbol("close");
|
|
56310
|
-
var
|
|
56311
|
-
var
|
|
56312
|
-
var
|
|
56313
|
-
var
|
|
56314
|
-
var de2 = class extends
|
|
56363
|
+
var ri = Symbol("mode");
|
|
56364
|
+
var as = Symbol("awaitDrain");
|
|
56365
|
+
var es = Symbol("ondrain");
|
|
56366
|
+
var q3 = Symbol("prefix");
|
|
56367
|
+
var de2 = class extends A3 {
|
|
56315
56368
|
path;
|
|
56316
56369
|
portable;
|
|
56317
56370
|
myuid = process.getuid && process.getuid() || 0;
|
|
@@ -56343,123 +56396,123 @@ var de2 = class extends D {
|
|
|
56343
56396
|
onWriteEntry;
|
|
56344
56397
|
#t = false;
|
|
56345
56398
|
constructor(t, e2 = {}) {
|
|
56346
|
-
let i =
|
|
56347
|
-
super(), this.path = f3(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize ||
|
|
56399
|
+
let i = se2(e2);
|
|
56400
|
+
super(), this.path = f3(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || Wn, this.linkCache = i.linkCache || new Map, this.statCache = i.statCache || new Map, this.preservePaths = !!i.preservePaths, this.cwd = f3(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f3(i.prefix) : undefined, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
|
|
56348
56401
|
let r2 = false;
|
|
56349
56402
|
if (!this.preservePaths) {
|
|
56350
56403
|
let [o2, h2] = ce2(this.path);
|
|
56351
56404
|
o2 && typeof h2 == "string" && (this.path = h2, r2 = o2);
|
|
56352
56405
|
}
|
|
56353
|
-
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path =
|
|
56406
|
+
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Qs(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f3(i.absolute || js.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r2 && this.warn("TAR_ENTRY_INFO", `stripping ${r2} from absolute path`, { entry: this, path: r2 + this.path });
|
|
56354
56407
|
let n = this.statCache.get(this.absolute);
|
|
56355
|
-
n ? this[
|
|
56408
|
+
n ? this[si](n) : this[ss]();
|
|
56356
56409
|
}
|
|
56357
56410
|
warn(t, e2, i = {}) {
|
|
56358
|
-
return
|
|
56411
|
+
return Dt(this, t, e2, i);
|
|
56359
56412
|
}
|
|
56360
56413
|
emit(t, ...e2) {
|
|
56361
56414
|
return t === "error" && (this.#t = true), super.emit(t, ...e2);
|
|
56362
56415
|
}
|
|
56363
|
-
[
|
|
56364
|
-
|
|
56416
|
+
[ss]() {
|
|
56417
|
+
X3.lstat(this.absolute, (t, e2) => {
|
|
56365
56418
|
if (t)
|
|
56366
56419
|
return this.emit("error", t);
|
|
56367
|
-
this[
|
|
56420
|
+
this[si](e2);
|
|
56368
56421
|
});
|
|
56369
56422
|
}
|
|
56370
|
-
[
|
|
56371
|
-
this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type =
|
|
56423
|
+
[si](t) {
|
|
56424
|
+
this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Gn(t), this.emit("stat", t), this[tr]();
|
|
56372
56425
|
}
|
|
56373
|
-
[
|
|
56426
|
+
[tr]() {
|
|
56374
56427
|
switch (this.type) {
|
|
56375
56428
|
case "File":
|
|
56376
|
-
return this[
|
|
56429
|
+
return this[er]();
|
|
56377
56430
|
case "Directory":
|
|
56378
|
-
return this[
|
|
56431
|
+
return this[ir]();
|
|
56379
56432
|
case "SymbolicLink":
|
|
56380
|
-
return this[
|
|
56433
|
+
return this[is]();
|
|
56381
56434
|
default:
|
|
56382
56435
|
return this.end();
|
|
56383
56436
|
}
|
|
56384
56437
|
}
|
|
56385
|
-
[
|
|
56386
|
-
return
|
|
56438
|
+
[ri](t) {
|
|
56439
|
+
return Ji(t, this.type === "Directory", this.portable);
|
|
56387
56440
|
}
|
|
56388
|
-
[
|
|
56389
|
-
return
|
|
56441
|
+
[q3](t) {
|
|
56442
|
+
return rr(t, this.prefix);
|
|
56390
56443
|
}
|
|
56391
56444
|
[fe]() {
|
|
56392
56445
|
if (!this.stat)
|
|
56393
56446
|
throw new Error("cannot write header before stat");
|
|
56394
|
-
this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[
|
|
56447
|
+
this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[q3](this.path), linkpath: this.type === "Link" && this.linkpath !== undefined ? this[q3](this.linkpath) : this.linkpath, mode: this[ri](this.stat.mode), uid: this.portable ? undefined : this.stat.uid, gid: this.portable ? undefined : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? undefined : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? undefined : this.type, uname: this.portable ? undefined : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? undefined : this.stat.atime, ctime: this.portable ? undefined : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ft({ atime: this.portable ? undefined : this.header.atime, ctime: this.portable ? undefined : this.header.ctime, gid: this.portable ? undefined : this.header.gid, mtime: this.noMtime ? undefined : this.mtime || this.header.mtime, path: this[q3](this.path), linkpath: this.type === "Link" && this.linkpath !== undefined ? this[q3](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? undefined : this.header.uid, uname: this.portable ? undefined : this.header.uname, dev: this.portable ? undefined : this.stat.dev, ino: this.portable ? undefined : this.stat.ino, nlink: this.portable ? undefined : this.stat.nlink }).encode());
|
|
56395
56448
|
let t = this.header?.block;
|
|
56396
56449
|
if (!t)
|
|
56397
56450
|
throw new Error("failed to encode header");
|
|
56398
56451
|
super.write(t);
|
|
56399
56452
|
}
|
|
56400
|
-
[
|
|
56453
|
+
[ir]() {
|
|
56401
56454
|
if (!this.stat)
|
|
56402
56455
|
throw new Error("cannot create directory entry without stat");
|
|
56403
56456
|
this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
|
|
56404
56457
|
}
|
|
56405
|
-
[
|
|
56406
|
-
|
|
56458
|
+
[is]() {
|
|
56459
|
+
X3.readlink(this.absolute, (t, e2) => {
|
|
56407
56460
|
if (t)
|
|
56408
56461
|
return this.emit("error", t);
|
|
56409
|
-
this[
|
|
56462
|
+
this[ns](e2);
|
|
56410
56463
|
});
|
|
56411
56464
|
}
|
|
56412
|
-
[
|
|
56465
|
+
[ns](t) {
|
|
56413
56466
|
this.linkpath = f3(t), this[fe](), this.end();
|
|
56414
56467
|
}
|
|
56415
|
-
[
|
|
56468
|
+
[sr](t) {
|
|
56416
56469
|
if (!this.stat)
|
|
56417
56470
|
throw new Error("cannot create link entry without stat");
|
|
56418
|
-
this.type = "Link", this.linkpath = f3(
|
|
56471
|
+
this.type = "Link", this.linkpath = f3(js.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
|
|
56419
56472
|
}
|
|
56420
|
-
[
|
|
56473
|
+
[er]() {
|
|
56421
56474
|
if (!this.stat)
|
|
56422
56475
|
throw new Error("cannot create file entry without stat");
|
|
56423
56476
|
if (this.stat.nlink > 1) {
|
|
56424
56477
|
let t = `${this.stat.dev}:${this.stat.ino}`, e2 = this.linkCache.get(t);
|
|
56425
56478
|
if (e2?.indexOf(this.cwd) === 0)
|
|
56426
|
-
return this[
|
|
56479
|
+
return this[sr](e2);
|
|
56427
56480
|
this.linkCache.set(t, this.absolute);
|
|
56428
56481
|
}
|
|
56429
56482
|
if (this[fe](), this.stat.size === 0)
|
|
56430
56483
|
return this.end();
|
|
56431
|
-
this[
|
|
56484
|
+
this[os5]();
|
|
56432
56485
|
}
|
|
56433
|
-
[
|
|
56434
|
-
|
|
56486
|
+
[os5]() {
|
|
56487
|
+
X3.open(this.absolute, "r", (t, e2) => {
|
|
56435
56488
|
if (t)
|
|
56436
56489
|
return this.emit("error", t);
|
|
56437
|
-
this[
|
|
56490
|
+
this[hs](e2);
|
|
56438
56491
|
});
|
|
56439
56492
|
}
|
|
56440
|
-
[
|
|
56493
|
+
[hs](t) {
|
|
56441
56494
|
if (this.fd = t, this.#t)
|
|
56442
56495
|
return this[pt]();
|
|
56443
56496
|
if (!this.stat)
|
|
56444
56497
|
throw new Error("should stat before calling onopenfile");
|
|
56445
56498
|
this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
|
|
56446
56499
|
let e2 = Math.min(this.blockLen, this.maxReadSize);
|
|
56447
|
-
this.buf = Buffer.allocUnsafe(e2), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[
|
|
56500
|
+
this.buf = Buffer.allocUnsafe(e2), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ii]();
|
|
56448
56501
|
}
|
|
56449
|
-
[
|
|
56502
|
+
[ii]() {
|
|
56450
56503
|
let { fd: t, buf: e2, offset: i, length: r2, pos: n } = this;
|
|
56451
56504
|
if (t === undefined || e2 === undefined)
|
|
56452
56505
|
throw new Error("cannot read file without first opening");
|
|
56453
|
-
|
|
56506
|
+
X3.read(t, e2, i, r2, n, (o2, h2) => {
|
|
56454
56507
|
if (o2)
|
|
56455
56508
|
return this[pt](() => this.emit("error", o2));
|
|
56456
|
-
this[
|
|
56509
|
+
this[rs](h2);
|
|
56457
56510
|
});
|
|
56458
56511
|
}
|
|
56459
56512
|
[pt](t = () => {}) {
|
|
56460
|
-
this.fd !== undefined &&
|
|
56513
|
+
this.fd !== undefined && X3.close(this.fd, t);
|
|
56461
56514
|
}
|
|
56462
|
-
[
|
|
56515
|
+
[rs](t) {
|
|
56463
56516
|
if (t <= 0 && this.remain > 0) {
|
|
56464
56517
|
let r2 = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
|
|
56465
56518
|
return this[pt](() => this.emit("error", r2));
|
|
@@ -56474,9 +56527,9 @@ var de2 = class extends D {
|
|
|
56474
56527
|
for (let r2 = t;r2 < this.length && t < this.blockRemain; r2++)
|
|
56475
56528
|
this.buf[r2 + this.offset] = 0, t++, this.remain++;
|
|
56476
56529
|
let e2 = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
|
|
56477
|
-
this.write(e2) ? this[
|
|
56530
|
+
this.write(e2) ? this[es]() : this[as](() => this[es]());
|
|
56478
56531
|
}
|
|
56479
|
-
[
|
|
56532
|
+
[as](t) {
|
|
56480
56533
|
this.once("drain", t);
|
|
56481
56534
|
}
|
|
56482
56535
|
write(t, e2, i) {
|
|
@@ -56486,33 +56539,33 @@ var de2 = class extends D {
|
|
|
56486
56539
|
}
|
|
56487
56540
|
return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
|
|
56488
56541
|
}
|
|
56489
|
-
[
|
|
56542
|
+
[es]() {
|
|
56490
56543
|
if (!this.remain)
|
|
56491
56544
|
return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
|
|
56492
56545
|
if (!this.buf)
|
|
56493
56546
|
throw new Error("buffer lost somehow in ONDRAIN");
|
|
56494
|
-
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[
|
|
56547
|
+
this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ii]();
|
|
56495
56548
|
}
|
|
56496
56549
|
};
|
|
56497
|
-
var
|
|
56550
|
+
var ni = class extends de2 {
|
|
56498
56551
|
sync = true;
|
|
56499
|
-
[
|
|
56500
|
-
this[
|
|
56552
|
+
[ss]() {
|
|
56553
|
+
this[si](X3.lstatSync(this.absolute));
|
|
56501
56554
|
}
|
|
56502
|
-
[
|
|
56503
|
-
this[
|
|
56555
|
+
[is]() {
|
|
56556
|
+
this[ns](X3.readlinkSync(this.absolute));
|
|
56504
56557
|
}
|
|
56505
|
-
[
|
|
56506
|
-
this[
|
|
56558
|
+
[os5]() {
|
|
56559
|
+
this[hs](X3.openSync(this.absolute, "r"));
|
|
56507
56560
|
}
|
|
56508
|
-
[
|
|
56561
|
+
[ii]() {
|
|
56509
56562
|
let t = true;
|
|
56510
56563
|
try {
|
|
56511
56564
|
let { fd: e2, buf: i, offset: r2, length: n, pos: o2 } = this;
|
|
56512
56565
|
if (e2 === undefined || i === undefined)
|
|
56513
56566
|
throw new Error("fd and buf must be set in READ method");
|
|
56514
|
-
let h2 =
|
|
56515
|
-
this[
|
|
56567
|
+
let h2 = X3.readSync(e2, i, r2, n, o2);
|
|
56568
|
+
this[rs](h2), t = false;
|
|
56516
56569
|
} finally {
|
|
56517
56570
|
if (t)
|
|
56518
56571
|
try {
|
|
@@ -56520,14 +56573,14 @@ var si = class extends de2 {
|
|
|
56520
56573
|
} catch {}
|
|
56521
56574
|
}
|
|
56522
56575
|
}
|
|
56523
|
-
[
|
|
56576
|
+
[as](t) {
|
|
56524
56577
|
t();
|
|
56525
56578
|
}
|
|
56526
56579
|
[pt](t = () => {}) {
|
|
56527
|
-
this.fd !== undefined &&
|
|
56580
|
+
this.fd !== undefined && X3.closeSync(this.fd), t();
|
|
56528
56581
|
}
|
|
56529
56582
|
};
|
|
56530
|
-
var
|
|
56583
|
+
var oi = class extends A3 {
|
|
56531
56584
|
blockLen = 0;
|
|
56532
56585
|
blockRemain = 0;
|
|
56533
56586
|
buf = 0;
|
|
@@ -56556,31 +56609,31 @@ var ri = class extends D {
|
|
|
56556
56609
|
size;
|
|
56557
56610
|
onWriteEntry;
|
|
56558
56611
|
warn(t, e2, i = {}) {
|
|
56559
|
-
return
|
|
56612
|
+
return Dt(this, t, e2, i);
|
|
56560
56613
|
}
|
|
56561
56614
|
constructor(t, e2 = {}) {
|
|
56562
|
-
let i =
|
|
56615
|
+
let i = se2(e2);
|
|
56563
56616
|
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;
|
|
56564
56617
|
let { type: r2 } = t;
|
|
56565
56618
|
if (r2 === "Unsupported")
|
|
56566
56619
|
throw new Error("writing entry that should be ignored");
|
|
56567
|
-
this.type = r2, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f3(t.path), this.mode = t.mode !== undefined ? this[
|
|
56620
|
+
this.type = r2, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f3(t.path), this.mode = t.mode !== undefined ? this[ri](t.mode) : undefined, this.uid = this.portable ? undefined : t.uid, this.gid = this.portable ? undefined : t.gid, this.uname = this.portable ? undefined : t.uname, this.gname = this.portable ? undefined : t.gname, this.size = t.size, this.mtime = this.noMtime ? undefined : i.mtime || t.mtime, this.atime = this.portable ? undefined : t.atime, this.ctime = this.portable ? undefined : t.ctime, this.linkpath = t.linkpath !== undefined ? f3(t.linkpath) : undefined, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
|
|
56568
56621
|
let n = false;
|
|
56569
56622
|
if (!this.preservePaths) {
|
|
56570
56623
|
let [h2, a3] = ce2(this.path);
|
|
56571
56624
|
h2 && typeof a3 == "string" && (this.path = a3, n = h2);
|
|
56572
56625
|
}
|
|
56573
|
-
this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new F({ path: this[
|
|
56626
|
+
this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new F({ path: this[q3](this.path), linkpath: this.type === "Link" && this.linkpath !== undefined ? this[q3](this.linkpath) : this.linkpath, mode: this.mode, uid: this.portable ? undefined : this.uid, gid: this.portable ? undefined : this.gid, size: this.size, mtime: this.noMtime ? undefined : this.mtime, type: this.type, uname: this.portable ? undefined : this.uname, atime: this.portable ? undefined : this.atime, ctime: this.portable ? undefined : this.ctime }), n && this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute path`, { entry: this, path: n + this.path }), this.header.encode() && !this.noPax && super.write(new ft({ atime: this.portable ? undefined : this.atime, ctime: this.portable ? undefined : this.ctime, gid: this.portable ? undefined : this.gid, mtime: this.noMtime ? undefined : this.mtime, path: this[q3](this.path), linkpath: this.type === "Link" && this.linkpath !== undefined ? this[q3](this.linkpath) : this.linkpath, size: this.size, uid: this.portable ? undefined : this.uid, uname: this.portable ? undefined : this.uname, dev: this.portable ? undefined : this.readEntry.dev, ino: this.portable ? undefined : this.readEntry.ino, nlink: this.portable ? undefined : this.readEntry.nlink }).encode());
|
|
56574
56627
|
let o2 = this.header?.block;
|
|
56575
56628
|
if (!o2)
|
|
56576
56629
|
throw new Error("failed to encode header");
|
|
56577
56630
|
super.write(o2), t.pipe(this);
|
|
56578
56631
|
}
|
|
56579
|
-
[
|
|
56580
|
-
return
|
|
56632
|
+
[q3](t) {
|
|
56633
|
+
return rr(t, this.prefix);
|
|
56581
56634
|
}
|
|
56582
|
-
[
|
|
56583
|
-
return
|
|
56635
|
+
[ri](t) {
|
|
56636
|
+
return Ji(t, this.type === "Directory", this.portable);
|
|
56584
56637
|
}
|
|
56585
56638
|
write(t, e2, i) {
|
|
56586
56639
|
typeof e2 == "function" && (i = e2, e2 = undefined), typeof t == "string" && (t = Buffer.from(t, typeof e2 == "string" ? e2 : "utf8"));
|
|
@@ -56593,8 +56646,8 @@ var ri = class extends D {
|
|
|
56593
56646
|
return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), typeof t == "function" && (i = t, e2 = undefined, t = undefined), typeof e2 == "function" && (i = e2, e2 = undefined), typeof t == "string" && (t = Buffer.from(t, e2 ?? "utf8")), i && this.once("finish", i), t ? super.end(t, i) : super.end(i), this;
|
|
56594
56647
|
}
|
|
56595
56648
|
};
|
|
56596
|
-
var
|
|
56597
|
-
var
|
|
56649
|
+
var Gn = (s2) => s2.isFile() ? "File" : s2.isDirectory() ? "Directory" : s2.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
|
|
56650
|
+
var hi = class s2 {
|
|
56598
56651
|
tail;
|
|
56599
56652
|
head;
|
|
56600
56653
|
length = 0;
|
|
@@ -56631,12 +56684,12 @@ var ni = class s2 {
|
|
|
56631
56684
|
}
|
|
56632
56685
|
push(...t) {
|
|
56633
56686
|
for (let e2 = 0, i = t.length;e2 < i; e2++)
|
|
56634
|
-
|
|
56687
|
+
Yn(this, t[e2]);
|
|
56635
56688
|
return this.length;
|
|
56636
56689
|
}
|
|
56637
56690
|
unshift(...t) {
|
|
56638
56691
|
for (var e2 = 0, i = t.length;e2 < i; e2++)
|
|
56639
|
-
|
|
56692
|
+
Kn(this, t[e2]);
|
|
56640
56693
|
return this.length;
|
|
56641
56694
|
}
|
|
56642
56695
|
pop() {
|
|
@@ -56761,7 +56814,7 @@ var ni = class s2 {
|
|
|
56761
56814
|
n.push(r2.value), r2 = this.removeNode(r2);
|
|
56762
56815
|
r2 ? r2 !== this.tail && (r2 = r2.prev) : r2 = this.tail;
|
|
56763
56816
|
for (let o2 of i)
|
|
56764
|
-
r2 =
|
|
56817
|
+
r2 = Zn(this, r2, o2);
|
|
56765
56818
|
return n;
|
|
56766
56819
|
}
|
|
56767
56820
|
reverse() {
|
|
@@ -56773,14 +56826,14 @@ var ni = class s2 {
|
|
|
56773
56826
|
return this.head = e2, this.tail = t, this;
|
|
56774
56827
|
}
|
|
56775
56828
|
};
|
|
56776
|
-
function
|
|
56829
|
+
function Zn(s3, t, e2) {
|
|
56777
56830
|
let i = t, r2 = t ? t.next : s3.head, n = new ue2(e2, i, r2, s3);
|
|
56778
56831
|
return n.next === undefined && (s3.tail = n), n.prev === undefined && (s3.head = n), s3.length++, n;
|
|
56779
56832
|
}
|
|
56780
|
-
function
|
|
56833
|
+
function Yn(s3, t) {
|
|
56781
56834
|
s3.tail = new ue2(t, s3.tail, undefined, s3), s3.head || (s3.head = s3.tail), s3.length++;
|
|
56782
56835
|
}
|
|
56783
|
-
function
|
|
56836
|
+
function Kn(s3, t) {
|
|
56784
56837
|
s3.head = new ue2(t, undefined, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
|
|
56785
56838
|
}
|
|
56786
56839
|
var ue2 = class {
|
|
@@ -56792,41 +56845,43 @@ var ue2 = class {
|
|
|
56792
56845
|
this.list = r2, this.value = t, e2 ? (e2.next = this, this.prev = e2) : this.prev = undefined, i ? (i.prev = this, this.next = i) : this.next = undefined;
|
|
56793
56846
|
}
|
|
56794
56847
|
};
|
|
56795
|
-
var
|
|
56848
|
+
var pi = class {
|
|
56796
56849
|
path;
|
|
56797
56850
|
absolute;
|
|
56798
56851
|
entry;
|
|
56799
56852
|
stat;
|
|
56800
56853
|
readdir;
|
|
56801
56854
|
pending = false;
|
|
56855
|
+
pendingLink = false;
|
|
56802
56856
|
ignore = false;
|
|
56803
56857
|
piped = false;
|
|
56804
56858
|
constructor(t, e2) {
|
|
56805
56859
|
this.path = t || "./", this.absolute = e2;
|
|
56806
56860
|
}
|
|
56807
56861
|
};
|
|
56808
|
-
var
|
|
56809
|
-
var
|
|
56862
|
+
var nr = Buffer.alloc(1024);
|
|
56863
|
+
var li = Symbol("onStat");
|
|
56810
56864
|
var me2 = Symbol("ended");
|
|
56811
56865
|
var W2 = Symbol("queue");
|
|
56812
|
-
var
|
|
56866
|
+
var pe = Symbol("pendingLinks");
|
|
56867
|
+
var Et = Symbol("current");
|
|
56813
56868
|
var Ft = Symbol("process");
|
|
56814
|
-
var
|
|
56815
|
-
var
|
|
56869
|
+
var Ee = Symbol("processing");
|
|
56870
|
+
var ai = Symbol("processJob");
|
|
56816
56871
|
var G2 = Symbol("jobs");
|
|
56817
|
-
var
|
|
56818
|
-
var
|
|
56819
|
-
var
|
|
56820
|
-
var
|
|
56821
|
-
var
|
|
56822
|
-
var
|
|
56823
|
-
var
|
|
56824
|
-
var
|
|
56825
|
-
var
|
|
56826
|
-
var
|
|
56827
|
-
var
|
|
56828
|
-
var
|
|
56829
|
-
var
|
|
56872
|
+
var ls = Symbol("jobDone");
|
|
56873
|
+
var ci = Symbol("addFSEntry");
|
|
56874
|
+
var or = Symbol("addTarEntry");
|
|
56875
|
+
var ds = Symbol("stat");
|
|
56876
|
+
var us = Symbol("readdir");
|
|
56877
|
+
var fi = Symbol("onreaddir");
|
|
56878
|
+
var di = Symbol("pipe");
|
|
56879
|
+
var hr = Symbol("entry");
|
|
56880
|
+
var cs = Symbol("entryOpt");
|
|
56881
|
+
var ui = Symbol("writeEntryClass");
|
|
56882
|
+
var lr = Symbol("write");
|
|
56883
|
+
var fs49 = Symbol("ondrain");
|
|
56884
|
+
var wt = class extends A3 {
|
|
56830
56885
|
sync = false;
|
|
56831
56886
|
opt;
|
|
56832
56887
|
cwd;
|
|
@@ -56847,25 +56902,26 @@ var Et = class extends D {
|
|
|
56847
56902
|
mtime;
|
|
56848
56903
|
filter;
|
|
56849
56904
|
jobs;
|
|
56850
|
-
[
|
|
56905
|
+
[ui];
|
|
56851
56906
|
onWriteEntry;
|
|
56852
56907
|
[W2];
|
|
56908
|
+
[pe] = new Map;
|
|
56853
56909
|
[G2] = 0;
|
|
56854
|
-
[
|
|
56910
|
+
[Ee] = false;
|
|
56855
56911
|
[me2] = false;
|
|
56856
56912
|
constructor(t = {}) {
|
|
56857
|
-
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 = f3(t.prefix || ""), this.linkCache = t.linkCache || new Map, this.statCache = t.statCache || new Map, this.readdirCache = t.readdirCache || new Map, this.onWriteEntry = t.onWriteEntry, this[
|
|
56913
|
+
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 = f3(t.prefix || ""), this.linkCache = t.linkCache || new Map, this.statCache = t.statCache || new Map, this.readdirCache = t.readdirCache || new Map, this.onWriteEntry = t.onWriteEntry, this[ui] = de2, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
|
|
56858
56914
|
if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1)
|
|
56859
56915
|
throw new TypeError("gzip, brotli, zstd are mutually exclusive");
|
|
56860
|
-
if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new
|
|
56916
|
+
if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new ze(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new We(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ye(t.zstd)), !this.zip)
|
|
56861
56917
|
throw new Error("impossible");
|
|
56862
56918
|
let e2 = this.zip;
|
|
56863
|
-
e2.on("data", (i) => super.write(i)), e2.on("end", () => super.end()), e2.on("drain", () => this[
|
|
56919
|
+
e2.on("data", (i) => super.write(i)), e2.on("end", () => super.end()), e2.on("drain", () => this[fs49]()), this.on("resume", () => e2.resume());
|
|
56864
56920
|
} else
|
|
56865
|
-
this.on("drain", this[
|
|
56866
|
-
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[W2] = new
|
|
56921
|
+
this.on("drain", this[fs49]);
|
|
56922
|
+
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[W2] = new hi, this[G2] = 0, this.jobs = Number(t.jobs) || 4, this[Ee] = false, this[me2] = false;
|
|
56867
56923
|
}
|
|
56868
|
-
[
|
|
56924
|
+
[lr](t) {
|
|
56869
56925
|
return super.write(t);
|
|
56870
56926
|
}
|
|
56871
56927
|
add(t) {
|
|
@@ -56877,101 +56933,120 @@ var Et = class extends D {
|
|
|
56877
56933
|
write(t) {
|
|
56878
56934
|
if (this[me2])
|
|
56879
56935
|
throw new Error("write after end");
|
|
56880
|
-
return t
|
|
56936
|
+
return typeof t == "string" ? this[ci](t) : this[or](t), this.flowing;
|
|
56881
56937
|
}
|
|
56882
|
-
[
|
|
56883
|
-
let e2 = f3(
|
|
56938
|
+
[or](t) {
|
|
56939
|
+
let e2 = f3(ar.resolve(this.cwd, t.path));
|
|
56884
56940
|
if (!this.filter(t.path, t))
|
|
56885
56941
|
t.resume();
|
|
56886
56942
|
else {
|
|
56887
|
-
let i = new
|
|
56888
|
-
i.entry = new
|
|
56943
|
+
let i = new pi(t.path, e2);
|
|
56944
|
+
i.entry = new oi(t, this[cs](i)), i.entry.on("end", () => this[ls](i)), this[G2] += 1, this[W2].push(i);
|
|
56889
56945
|
}
|
|
56890
56946
|
this[Ft]();
|
|
56891
56947
|
}
|
|
56892
|
-
[
|
|
56893
|
-
let e2 = f3(
|
|
56894
|
-
this[W2].push(new
|
|
56948
|
+
[ci](t) {
|
|
56949
|
+
let e2 = f3(ar.resolve(this.cwd, t));
|
|
56950
|
+
this[W2].push(new pi(t, e2)), this[Ft]();
|
|
56895
56951
|
}
|
|
56896
|
-
[
|
|
56952
|
+
[ds](t) {
|
|
56897
56953
|
t.pending = true, this[G2] += 1;
|
|
56898
56954
|
let e2 = this.follow ? "stat" : "lstat";
|
|
56899
|
-
|
|
56900
|
-
t.pending = false, this[G2] -= 1, i ? this.emit("error", i) : this[
|
|
56955
|
+
mi[e2](t.absolute, (i, r2) => {
|
|
56956
|
+
t.pending = false, this[G2] -= 1, i ? this.emit("error", i) : this[li](t, r2);
|
|
56901
56957
|
});
|
|
56902
56958
|
}
|
|
56903
|
-
[
|
|
56904
|
-
this.statCache.set(t.absolute, e2), t.stat = e2, this.filter(t.path, e2)
|
|
56959
|
+
[li](t, e2) {
|
|
56960
|
+
if (this.statCache.set(t.absolute, e2), t.stat = e2, !this.filter(t.path, e2))
|
|
56961
|
+
t.ignore = true;
|
|
56962
|
+
else if (e2.isFile() && e2.nlink > 1 && !this.linkCache.get(`${e2.dev}:${e2.ino}`) && !this.sync)
|
|
56963
|
+
if (t === this[Et])
|
|
56964
|
+
this[ai](t);
|
|
56965
|
+
else {
|
|
56966
|
+
let i = `${e2.dev}:${e2.ino}`, r2 = this[pe].get(i);
|
|
56967
|
+
r2 ? r2.push(t) : this[pe].set(i, [t]), t.pendingLink = true, t.pending = true;
|
|
56968
|
+
}
|
|
56969
|
+
this[Ft]();
|
|
56905
56970
|
}
|
|
56906
|
-
[
|
|
56907
|
-
t.pending = true, this[G2] += 1,
|
|
56971
|
+
[us](t) {
|
|
56972
|
+
t.pending = true, this[G2] += 1, mi.readdir(t.absolute, (e2, i) => {
|
|
56908
56973
|
if (t.pending = false, this[G2] -= 1, e2)
|
|
56909
56974
|
return this.emit("error", e2);
|
|
56910
|
-
this[
|
|
56975
|
+
this[fi](t, i);
|
|
56911
56976
|
});
|
|
56912
56977
|
}
|
|
56913
|
-
[
|
|
56978
|
+
[fi](t, e2) {
|
|
56914
56979
|
this.readdirCache.set(t.absolute, e2), t.readdir = e2, this[Ft]();
|
|
56915
56980
|
}
|
|
56916
56981
|
[Ft]() {
|
|
56917
|
-
if (!this[
|
|
56918
|
-
this[
|
|
56982
|
+
if (!this[Ee]) {
|
|
56983
|
+
this[Ee] = true;
|
|
56919
56984
|
for (let t = this[W2].head;t && this[G2] < this.jobs; t = t.next)
|
|
56920
|
-
if (this[
|
|
56985
|
+
if (this[ai](t.value), t.value.ignore) {
|
|
56921
56986
|
let e2 = t.next;
|
|
56922
56987
|
this[W2].removeNode(t), t.next = e2;
|
|
56923
56988
|
}
|
|
56924
|
-
this[
|
|
56989
|
+
this[Ee] = false, this[me2] && this[W2].length === 0 && this[G2] === 0 && (this.zip ? this.zip.end(nr) : (super.write(nr), super.end()));
|
|
56925
56990
|
}
|
|
56926
56991
|
}
|
|
56927
|
-
get [
|
|
56992
|
+
get [Et]() {
|
|
56928
56993
|
return this[W2] && this[W2].head && this[W2].head.value;
|
|
56929
56994
|
}
|
|
56930
|
-
[
|
|
56931
|
-
this[W2].shift(), this[G2] -= 1
|
|
56995
|
+
[ls](t) {
|
|
56996
|
+
this[W2].shift(), this[G2] -= 1;
|
|
56997
|
+
let { stat: e2 } = t;
|
|
56998
|
+
if (e2 && e2.isFile() && e2.nlink > 1) {
|
|
56999
|
+
let i = `${e2.dev}:${e2.ino}`, r2 = this[pe].get(i);
|
|
57000
|
+
if (r2) {
|
|
57001
|
+
this[pe].delete(i);
|
|
57002
|
+
for (let n of r2)
|
|
57003
|
+
n.pending = false, this[ai](n);
|
|
57004
|
+
}
|
|
57005
|
+
}
|
|
57006
|
+
this[Ft]();
|
|
56932
57007
|
}
|
|
56933
|
-
[
|
|
56934
|
-
if (!t.pending) {
|
|
57008
|
+
[ai](t) {
|
|
57009
|
+
if (t.pending && t.pendingLink && t === this[Et] && (t.pending = false, t.pendingLink = false), !t.pending) {
|
|
56935
57010
|
if (t.entry) {
|
|
56936
|
-
t === this[
|
|
57011
|
+
t === this[Et] && !t.piped && this[di](t);
|
|
56937
57012
|
return;
|
|
56938
57013
|
}
|
|
56939
57014
|
if (!t.stat) {
|
|
56940
57015
|
let e2 = this.statCache.get(t.absolute);
|
|
56941
|
-
e2 ? this[
|
|
57016
|
+
e2 ? this[li](t, e2) : this[ds](t);
|
|
56942
57017
|
}
|
|
56943
57018
|
if (t.stat && !t.ignore) {
|
|
56944
57019
|
if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
|
|
56945
57020
|
let e2 = this.readdirCache.get(t.absolute);
|
|
56946
|
-
if (e2 ? this[
|
|
57021
|
+
if (e2 ? this[fi](t, e2) : this[us](t), !t.readdir)
|
|
56947
57022
|
return;
|
|
56948
57023
|
}
|
|
56949
|
-
if (t.entry = this[
|
|
57024
|
+
if (t.entry = this[hr](t), !t.entry) {
|
|
56950
57025
|
t.ignore = true;
|
|
56951
57026
|
return;
|
|
56952
57027
|
}
|
|
56953
|
-
t === this[
|
|
57028
|
+
t === this[Et] && !t.piped && this[di](t);
|
|
56954
57029
|
}
|
|
56955
57030
|
}
|
|
56956
57031
|
}
|
|
56957
|
-
[
|
|
57032
|
+
[cs](t) {
|
|
56958
57033
|
return { onwarn: (e2, i, r2) => this.warn(e2, i, r2), 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 };
|
|
56959
57034
|
}
|
|
56960
|
-
[
|
|
57035
|
+
[hr](t) {
|
|
56961
57036
|
this[G2] += 1;
|
|
56962
57037
|
try {
|
|
56963
|
-
return new this[
|
|
57038
|
+
return new this[ui](t.path, this[cs](t)).on("end", () => this[ls](t)).on("error", (i) => this.emit("error", i));
|
|
56964
57039
|
} catch (e2) {
|
|
56965
57040
|
this.emit("error", e2);
|
|
56966
57041
|
}
|
|
56967
57042
|
}
|
|
56968
|
-
[
|
|
56969
|
-
this[
|
|
57043
|
+
[fs49]() {
|
|
57044
|
+
this[Et] && this[Et].entry && this[Et].entry.resume();
|
|
56970
57045
|
}
|
|
56971
|
-
[
|
|
57046
|
+
[di](t) {
|
|
56972
57047
|
t.piped = true, t.readdir && t.readdir.forEach((r2) => {
|
|
56973
57048
|
let n = t.path, o2 = n === "./" ? "" : n.replace(/\/*$/, "/");
|
|
56974
|
-
this[
|
|
57049
|
+
this[ci](o2 + r2);
|
|
56975
57050
|
});
|
|
56976
57051
|
let e2 = t.entry, i = this.zip;
|
|
56977
57052
|
if (!e2)
|
|
@@ -56986,110 +57061,110 @@ var Et = class extends D {
|
|
|
56986
57061
|
return this.zip && this.zip.pause(), super.pause();
|
|
56987
57062
|
}
|
|
56988
57063
|
warn(t, e2, i = {}) {
|
|
56989
|
-
|
|
57064
|
+
Dt(this, t, e2, i);
|
|
56990
57065
|
}
|
|
56991
57066
|
};
|
|
56992
|
-
var kt = class extends
|
|
57067
|
+
var kt = class extends wt {
|
|
56993
57068
|
sync = true;
|
|
56994
57069
|
constructor(t) {
|
|
56995
|
-
super(t), this[
|
|
57070
|
+
super(t), this[ui] = ni;
|
|
56996
57071
|
}
|
|
56997
57072
|
pause() {}
|
|
56998
57073
|
resume() {}
|
|
56999
|
-
[
|
|
57074
|
+
[ds](t) {
|
|
57000
57075
|
let e2 = this.follow ? "statSync" : "lstatSync";
|
|
57001
|
-
this[
|
|
57076
|
+
this[li](t, mi[e2](t.absolute));
|
|
57002
57077
|
}
|
|
57003
|
-
[
|
|
57004
|
-
this[
|
|
57078
|
+
[us](t) {
|
|
57079
|
+
this[fi](t, mi.readdirSync(t.absolute));
|
|
57005
57080
|
}
|
|
57006
|
-
[
|
|
57081
|
+
[di](t) {
|
|
57007
57082
|
let e2 = t.entry, i = this.zip;
|
|
57008
57083
|
if (t.readdir && t.readdir.forEach((r2) => {
|
|
57009
57084
|
let n = t.path, o2 = n === "./" ? "" : n.replace(/\/*$/, "/");
|
|
57010
|
-
this[
|
|
57085
|
+
this[ci](o2 + r2);
|
|
57011
57086
|
}), !e2)
|
|
57012
57087
|
throw new Error("Cannot pipe without source");
|
|
57013
57088
|
i ? e2.on("data", (r2) => {
|
|
57014
57089
|
i.write(r2);
|
|
57015
57090
|
}) : e2.on("data", (r2) => {
|
|
57016
|
-
super[
|
|
57091
|
+
super[lr](r2);
|
|
57017
57092
|
});
|
|
57018
57093
|
}
|
|
57019
57094
|
};
|
|
57020
|
-
var
|
|
57095
|
+
var Vn = (s3, t) => {
|
|
57021
57096
|
let e2 = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
|
|
57022
|
-
e2.pipe(i),
|
|
57097
|
+
e2.pipe(i), fr(e2, t);
|
|
57023
57098
|
};
|
|
57024
|
-
var
|
|
57025
|
-
let e2 = new
|
|
57099
|
+
var $n = (s3, t) => {
|
|
57100
|
+
let e2 = new wt(s3), i = new et(s3.file, { mode: s3.mode || 438 });
|
|
57026
57101
|
e2.pipe(i);
|
|
57027
57102
|
let r2 = new Promise((n, o2) => {
|
|
57028
57103
|
i.on("error", o2), i.on("close", n), e2.on("error", o2);
|
|
57029
57104
|
});
|
|
57030
|
-
return
|
|
57105
|
+
return dr(e2, t).catch((n) => e2.emit("error", n)), r2;
|
|
57031
57106
|
};
|
|
57032
|
-
var
|
|
57107
|
+
var fr = (s3, t) => {
|
|
57033
57108
|
t.forEach((e2) => {
|
|
57034
|
-
e2.charAt(0) === "@" ?
|
|
57109
|
+
e2.charAt(0) === "@" ? Ct({ file: cr.resolve(s3.cwd, e2.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e2);
|
|
57035
57110
|
}), s3.end();
|
|
57036
57111
|
};
|
|
57037
|
-
var
|
|
57112
|
+
var dr = async (s3, t) => {
|
|
57038
57113
|
for (let e2 of t)
|
|
57039
|
-
e2.charAt(0) === "@" ? await
|
|
57114
|
+
e2.charAt(0) === "@" ? await Ct({ file: cr.resolve(String(s3.cwd), e2.slice(1)), noResume: true, onReadEntry: (i) => {
|
|
57040
57115
|
s3.add(i);
|
|
57041
57116
|
} }) : s3.add(e2);
|
|
57042
57117
|
s3.end();
|
|
57043
57118
|
};
|
|
57044
|
-
var
|
|
57119
|
+
var Xn = (s3, t) => {
|
|
57045
57120
|
let e2 = new kt(s3);
|
|
57046
|
-
return
|
|
57121
|
+
return fr(e2, t), e2;
|
|
57047
57122
|
};
|
|
57048
|
-
var
|
|
57049
|
-
let e2 = new
|
|
57050
|
-
return
|
|
57123
|
+
var qn = (s3, t) => {
|
|
57124
|
+
let e2 = new wt(s3);
|
|
57125
|
+
return dr(e2, t).catch((i) => e2.emit("error", i)), e2;
|
|
57051
57126
|
};
|
|
57052
|
-
var
|
|
57127
|
+
var Qn = K3(Vn, $n, Xn, qn, (s3, t) => {
|
|
57053
57128
|
if (!t?.length)
|
|
57054
57129
|
throw new TypeError("no paths specified to add to archive");
|
|
57055
57130
|
});
|
|
57056
|
-
var
|
|
57057
|
-
var
|
|
57058
|
-
var { O_CREAT:
|
|
57059
|
-
var
|
|
57060
|
-
var
|
|
57061
|
-
var
|
|
57062
|
-
var
|
|
57063
|
-
var
|
|
57064
|
-
var
|
|
57065
|
-
var
|
|
57131
|
+
var Jn = process.env.__FAKE_PLATFORM__ || process.platform;
|
|
57132
|
+
var Er = Jn === "win32";
|
|
57133
|
+
var { O_CREAT: wr, O_NOFOLLOW: ur, O_TRUNC: Sr, O_WRONLY: yr } = pr.constants;
|
|
57134
|
+
var Rr = Number(process.env.__FAKE_FS_O_FILENAME__) || pr.constants.UV_FS_O_FILEMAP || 0;
|
|
57135
|
+
var jn = Er && !!Rr;
|
|
57136
|
+
var to = 512 * 1024;
|
|
57137
|
+
var eo = Rr | Sr | wr | yr;
|
|
57138
|
+
var mr = !Er && typeof ur == "number" ? ur | Sr | wr | yr : null;
|
|
57139
|
+
var ms = mr !== null ? () => mr : jn ? (s3) => s3 < to ? eo : "w" : () => "w";
|
|
57140
|
+
var ps = (s3, t, e2) => {
|
|
57066
57141
|
try {
|
|
57067
|
-
return
|
|
57142
|
+
return wi.lchownSync(s3, t, e2);
|
|
57068
57143
|
} catch (i) {
|
|
57069
57144
|
if (i?.code !== "ENOENT")
|
|
57070
57145
|
throw i;
|
|
57071
57146
|
}
|
|
57072
57147
|
};
|
|
57073
|
-
var
|
|
57074
|
-
|
|
57148
|
+
var Ei = (s3, t, e2, i) => {
|
|
57149
|
+
wi.lchown(s3, t, e2, (r2) => {
|
|
57075
57150
|
i(r2 && r2?.code !== "ENOENT" ? r2 : null);
|
|
57076
57151
|
});
|
|
57077
57152
|
};
|
|
57078
|
-
var
|
|
57153
|
+
var io = (s3, t, e2, i, r2) => {
|
|
57079
57154
|
if (t.isDirectory())
|
|
57080
|
-
|
|
57155
|
+
Es(we.resolve(s3, t.name), e2, i, (n) => {
|
|
57081
57156
|
if (n)
|
|
57082
57157
|
return r2(n);
|
|
57083
|
-
let o2 =
|
|
57084
|
-
|
|
57158
|
+
let o2 = we.resolve(s3, t.name);
|
|
57159
|
+
Ei(o2, e2, i, r2);
|
|
57085
57160
|
});
|
|
57086
57161
|
else {
|
|
57087
|
-
let n =
|
|
57088
|
-
|
|
57162
|
+
let n = we.resolve(s3, t.name);
|
|
57163
|
+
Ei(n, e2, i, r2);
|
|
57089
57164
|
}
|
|
57090
57165
|
};
|
|
57091
|
-
var
|
|
57092
|
-
|
|
57166
|
+
var Es = (s3, t, e2, i) => {
|
|
57167
|
+
wi.readdir(s3, { withFileTypes: true }, (r2, n) => {
|
|
57093
57168
|
if (r2) {
|
|
57094
57169
|
if (r2.code === "ENOENT")
|
|
57095
57170
|
return i();
|
|
@@ -57097,39 +57172,39 @@ var ds = (s3, t, e2, i) => {
|
|
|
57097
57172
|
return i(r2);
|
|
57098
57173
|
}
|
|
57099
57174
|
if (r2 || !n.length)
|
|
57100
|
-
return
|
|
57175
|
+
return Ei(s3, t, e2, i);
|
|
57101
57176
|
let o2 = n.length, h2 = null, a3 = (l2) => {
|
|
57102
57177
|
if (!h2) {
|
|
57103
57178
|
if (l2)
|
|
57104
57179
|
return i(h2 = l2);
|
|
57105
57180
|
if (--o2 === 0)
|
|
57106
|
-
return
|
|
57181
|
+
return Ei(s3, t, e2, i);
|
|
57107
57182
|
}
|
|
57108
57183
|
};
|
|
57109
57184
|
for (let l2 of n)
|
|
57110
|
-
|
|
57185
|
+
io(s3, l2, t, e2, a3);
|
|
57111
57186
|
});
|
|
57112
57187
|
};
|
|
57113
|
-
var
|
|
57114
|
-
t.isDirectory() &&
|
|
57188
|
+
var so = (s3, t, e2, i) => {
|
|
57189
|
+
t.isDirectory() && ws(we.resolve(s3, t.name), e2, i), ps(we.resolve(s3, t.name), e2, i);
|
|
57115
57190
|
};
|
|
57116
|
-
var
|
|
57191
|
+
var ws = (s3, t, e2) => {
|
|
57117
57192
|
let i;
|
|
57118
57193
|
try {
|
|
57119
|
-
i =
|
|
57194
|
+
i = wi.readdirSync(s3, { withFileTypes: true });
|
|
57120
57195
|
} catch (r2) {
|
|
57121
57196
|
let n = r2;
|
|
57122
57197
|
if (n?.code === "ENOENT")
|
|
57123
57198
|
return;
|
|
57124
57199
|
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP")
|
|
57125
|
-
return
|
|
57200
|
+
return ps(s3, t, e2);
|
|
57126
57201
|
throw n;
|
|
57127
57202
|
}
|
|
57128
57203
|
for (let r2 of i)
|
|
57129
|
-
|
|
57130
|
-
return
|
|
57204
|
+
so(s3, r2, t, e2);
|
|
57205
|
+
return ps(s3, t, e2);
|
|
57131
57206
|
};
|
|
57132
|
-
var
|
|
57207
|
+
var Se = class extends Error {
|
|
57133
57208
|
path;
|
|
57134
57209
|
code;
|
|
57135
57210
|
syscall = "chdir";
|
|
@@ -57140,7 +57215,7 @@ var we = class extends Error {
|
|
|
57140
57215
|
return "CwdError";
|
|
57141
57216
|
}
|
|
57142
57217
|
};
|
|
57143
|
-
var
|
|
57218
|
+
var St = class extends Error {
|
|
57144
57219
|
path;
|
|
57145
57220
|
symlink;
|
|
57146
57221
|
syscall = "symlink";
|
|
@@ -57152,49 +57227,49 @@ var wt = class extends Error {
|
|
|
57152
57227
|
return "SymlinkError";
|
|
57153
57228
|
}
|
|
57154
57229
|
};
|
|
57155
|
-
var
|
|
57230
|
+
var no = (s3, t) => {
|
|
57156
57231
|
k2.stat(s3, (e2, i) => {
|
|
57157
|
-
(e2 || !i.isDirectory()) && (e2 = new
|
|
57232
|
+
(e2 || !i.isDirectory()) && (e2 = new Se(s3, e2?.code || "ENOTDIR")), t(e2);
|
|
57158
57233
|
});
|
|
57159
57234
|
};
|
|
57160
|
-
var
|
|
57235
|
+
var gr = (s3, t, e2) => {
|
|
57161
57236
|
s3 = f3(s3);
|
|
57162
|
-
let i = t.umask ?? 18, r2 = t.mode | 448, n = (r2 & i) !== 0, o2 = t.uid, h2 = t.gid, a3 = typeof o2 == "number" && typeof h2 == "number" && (o2 !== t.processUid || h2 !== t.processGid), l2 = t.preserve, c2 = t.unlink, d3 = f3(t.cwd),
|
|
57163
|
-
E2 ? e2(E2) : x3 && a3 ?
|
|
57237
|
+
let i = t.umask ?? 18, r2 = t.mode | 448, n = (r2 & i) !== 0, o2 = t.uid, h2 = t.gid, a3 = typeof o2 == "number" && typeof h2 == "number" && (o2 !== t.processUid || h2 !== t.processGid), l2 = t.preserve, c2 = t.unlink, d3 = f3(t.cwd), y3 = (E2, x3) => {
|
|
57238
|
+
E2 ? e2(E2) : x3 && a3 ? Es(x3, o2, h2, (Le) => y3(Le)) : n ? k2.chmod(s3, r2, e2) : e2();
|
|
57164
57239
|
};
|
|
57165
57240
|
if (s3 === d3)
|
|
57166
|
-
return
|
|
57241
|
+
return no(s3, y3);
|
|
57167
57242
|
if (l2)
|
|
57168
|
-
return
|
|
57169
|
-
let
|
|
57170
|
-
|
|
57243
|
+
return ro.mkdir(s3, { mode: r2, recursive: true }).then((E2) => y3(null, E2 ?? undefined), y3);
|
|
57244
|
+
let D = f3(Si.relative(d3, s3)).split("/");
|
|
57245
|
+
Ss(d3, D, r2, c2, d3, undefined, y3);
|
|
57171
57246
|
};
|
|
57172
|
-
var
|
|
57247
|
+
var Ss = (s3, t, e2, i, r2, n, o2) => {
|
|
57173
57248
|
if (t.length === 0)
|
|
57174
57249
|
return o2(null, n);
|
|
57175
|
-
let h2 = t.shift(), a3 = f3(
|
|
57176
|
-
k2.mkdir(a3, e2,
|
|
57250
|
+
let h2 = t.shift(), a3 = f3(Si.resolve(s3 + "/" + h2));
|
|
57251
|
+
k2.mkdir(a3, e2, br(a3, t, e2, i, r2, n, o2));
|
|
57177
57252
|
};
|
|
57178
|
-
var
|
|
57253
|
+
var br = (s3, t, e2, i, r2, n, o2) => (h2) => {
|
|
57179
57254
|
h2 ? k2.lstat(s3, (a3, l2) => {
|
|
57180
57255
|
if (a3)
|
|
57181
57256
|
a3.path = a3.path && f3(a3.path), o2(a3);
|
|
57182
57257
|
else if (l2.isDirectory())
|
|
57183
|
-
|
|
57258
|
+
Ss(s3, t, e2, i, r2, n, o2);
|
|
57184
57259
|
else if (i)
|
|
57185
57260
|
k2.unlink(s3, (c2) => {
|
|
57186
57261
|
if (c2)
|
|
57187
57262
|
return o2(c2);
|
|
57188
|
-
k2.mkdir(s3, e2,
|
|
57263
|
+
k2.mkdir(s3, e2, br(s3, t, e2, i, r2, n, o2));
|
|
57189
57264
|
});
|
|
57190
57265
|
else {
|
|
57191
57266
|
if (l2.isSymbolicLink())
|
|
57192
|
-
return o2(new
|
|
57267
|
+
return o2(new St(s3, s3 + "/" + t.join("/")));
|
|
57193
57268
|
o2(h2);
|
|
57194
57269
|
}
|
|
57195
|
-
}) : (n = n || s3,
|
|
57270
|
+
}) : (n = n || s3, Ss(s3, t, e2, i, r2, n, o2));
|
|
57196
57271
|
};
|
|
57197
|
-
var
|
|
57272
|
+
var oo = (s3) => {
|
|
57198
57273
|
let t = false, e2;
|
|
57199
57274
|
try {
|
|
57200
57275
|
t = k2.statSync(s3).isDirectory();
|
|
@@ -57202,62 +57277,62 @@ var Jn = (s3) => {
|
|
|
57202
57277
|
e2 = i?.code;
|
|
57203
57278
|
} finally {
|
|
57204
57279
|
if (!t)
|
|
57205
|
-
throw new
|
|
57280
|
+
throw new Se(s3, e2 ?? "ENOTDIR");
|
|
57206
57281
|
}
|
|
57207
57282
|
};
|
|
57208
|
-
var
|
|
57283
|
+
var _r = (s3, t) => {
|
|
57209
57284
|
s3 = f3(s3);
|
|
57210
57285
|
let e2 = t.umask ?? 18, i = t.mode | 448, r2 = (i & e2) !== 0, n = t.uid, o2 = t.gid, h2 = typeof n == "number" && typeof o2 == "number" && (n !== t.processUid || o2 !== t.processGid), a3 = t.preserve, l2 = t.unlink, c2 = f3(t.cwd), d3 = (E2) => {
|
|
57211
|
-
E2 && h2 &&
|
|
57286
|
+
E2 && h2 && ws(E2, n, o2), r2 && k2.chmodSync(s3, i);
|
|
57212
57287
|
};
|
|
57213
57288
|
if (s3 === c2)
|
|
57214
|
-
return
|
|
57289
|
+
return oo(c2), d3();
|
|
57215
57290
|
if (a3)
|
|
57216
57291
|
return d3(k2.mkdirSync(s3, { mode: i, recursive: true }) ?? undefined);
|
|
57217
|
-
let T3 = f3(
|
|
57292
|
+
let T3 = f3(Si.relative(c2, s3)).split("/"), D;
|
|
57218
57293
|
for (let E2 = T3.shift(), x3 = c2;E2 && (x3 += "/" + E2); E2 = T3.shift()) {
|
|
57219
|
-
x3 = f3(
|
|
57294
|
+
x3 = f3(Si.resolve(x3));
|
|
57220
57295
|
try {
|
|
57221
|
-
k2.mkdirSync(x3, i),
|
|
57296
|
+
k2.mkdirSync(x3, i), D = D || x3;
|
|
57222
57297
|
} catch {
|
|
57223
|
-
let
|
|
57224
|
-
if (
|
|
57298
|
+
let Le = k2.lstatSync(x3);
|
|
57299
|
+
if (Le.isDirectory())
|
|
57225
57300
|
continue;
|
|
57226
57301
|
if (l2) {
|
|
57227
|
-
k2.unlinkSync(x3), k2.mkdirSync(x3, i),
|
|
57302
|
+
k2.unlinkSync(x3), k2.mkdirSync(x3, i), D = D || x3;
|
|
57228
57303
|
continue;
|
|
57229
|
-
} else if (
|
|
57230
|
-
return new
|
|
57304
|
+
} else if (Le.isSymbolicLink())
|
|
57305
|
+
return new St(x3, x3 + "/" + T3.join("/"));
|
|
57231
57306
|
}
|
|
57232
57307
|
}
|
|
57233
|
-
return d3(
|
|
57308
|
+
return d3(D);
|
|
57234
57309
|
};
|
|
57235
|
-
var
|
|
57236
|
-
var
|
|
57237
|
-
var
|
|
57238
|
-
var
|
|
57239
|
-
|
|
57240
|
-
let t =
|
|
57241
|
-
if (e2 >
|
|
57242
|
-
for (let i of
|
|
57243
|
-
if (
|
|
57310
|
+
var ys = Object.create(null);
|
|
57311
|
+
var Or = 1e4;
|
|
57312
|
+
var Vt = new Set;
|
|
57313
|
+
var Tr = (s3) => {
|
|
57314
|
+
Vt.has(s3) ? Vt.delete(s3) : ys[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), Vt.add(s3);
|
|
57315
|
+
let t = ys[s3], e2 = Vt.size - Or;
|
|
57316
|
+
if (e2 > Or / 10) {
|
|
57317
|
+
for (let i of Vt)
|
|
57318
|
+
if (Vt.delete(i), delete ys[i], --e2 <= 0)
|
|
57244
57319
|
break;
|
|
57245
57320
|
}
|
|
57246
57321
|
return t;
|
|
57247
57322
|
};
|
|
57248
|
-
var
|
|
57249
|
-
var
|
|
57250
|
-
var
|
|
57323
|
+
var ho = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
57324
|
+
var ao = ho === "win32";
|
|
57325
|
+
var lo = (s3) => s3.split("/").slice(0, -1).reduce((e2, i) => {
|
|
57251
57326
|
let r2 = e2.at(-1);
|
|
57252
|
-
return r2 !== undefined && (i =
|
|
57327
|
+
return r2 !== undefined && (i = xr(r2, i)), e2.push(i || "/"), e2;
|
|
57253
57328
|
}, []);
|
|
57254
|
-
var
|
|
57329
|
+
var yi = class {
|
|
57255
57330
|
#t = new Map;
|
|
57256
57331
|
#i = new Map;
|
|
57257
57332
|
#s = new Set;
|
|
57258
57333
|
reserve(t, e2) {
|
|
57259
|
-
t =
|
|
57260
|
-
let i = new Set(t.map((r2) =>
|
|
57334
|
+
t = ao ? ["win32 parallelization disabled"] : t.map((r2) => mt(xr(Tr(r2))));
|
|
57335
|
+
let i = new Set(t.map((r2) => lo(r2)).reduce((r2, n) => r2.concat(n)));
|
|
57261
57336
|
this.#i.set(e2, { dirs: i, paths: t });
|
|
57262
57337
|
for (let r2 of t) {
|
|
57263
57338
|
let n = this.#t.get(r2);
|
|
@@ -57325,58 +57400,58 @@ var Ei = class {
|
|
|
57325
57400
|
return this.#s.delete(t), n.forEach((o2) => this.#r(o2)), true;
|
|
57326
57401
|
}
|
|
57327
57402
|
};
|
|
57328
|
-
var
|
|
57329
|
-
var
|
|
57330
|
-
var
|
|
57331
|
-
var
|
|
57332
|
-
var
|
|
57403
|
+
var Lr = () => process.umask();
|
|
57404
|
+
var Dr = Symbol("onEntry");
|
|
57405
|
+
var _s = Symbol("checkFs");
|
|
57406
|
+
var Nr = Symbol("checkFs2");
|
|
57407
|
+
var Os = Symbol("isReusable");
|
|
57333
57408
|
var P2 = Symbol("makeFs");
|
|
57334
|
-
var
|
|
57335
|
-
var
|
|
57336
|
-
var
|
|
57337
|
-
var
|
|
57338
|
-
var
|
|
57339
|
-
var
|
|
57340
|
-
var
|
|
57341
|
-
var
|
|
57342
|
-
var
|
|
57343
|
-
var
|
|
57409
|
+
var Ts = Symbol("file");
|
|
57410
|
+
var xs = Symbol("directory");
|
|
57411
|
+
var gi = Symbol("link");
|
|
57412
|
+
var Ar = Symbol("symlink");
|
|
57413
|
+
var Ir = Symbol("hardlink");
|
|
57414
|
+
var Re = Symbol("ensureNoSymlink");
|
|
57415
|
+
var Cr = Symbol("unsupported");
|
|
57416
|
+
var Fr = Symbol("checkPath");
|
|
57417
|
+
var Rs = Symbol("stripAbsolutePath");
|
|
57418
|
+
var yt = Symbol("mkdir");
|
|
57344
57419
|
var O2 = Symbol("onError");
|
|
57345
|
-
var
|
|
57346
|
-
var
|
|
57347
|
-
var
|
|
57348
|
-
var
|
|
57349
|
-
var
|
|
57350
|
-
var
|
|
57351
|
-
var
|
|
57420
|
+
var Ri = Symbol("pending");
|
|
57421
|
+
var kr = Symbol("pend");
|
|
57422
|
+
var $t = Symbol("unpend");
|
|
57423
|
+
var gs = Symbol("ended");
|
|
57424
|
+
var bs = Symbol("maybeClose");
|
|
57425
|
+
var Ls = Symbol("skip");
|
|
57426
|
+
var ge = Symbol("doChown");
|
|
57352
57427
|
var be = Symbol("uid");
|
|
57353
57428
|
var _e = Symbol("gid");
|
|
57354
|
-
var
|
|
57355
|
-
var
|
|
57356
|
-
var
|
|
57357
|
-
var
|
|
57358
|
-
var
|
|
57359
|
-
if (!
|
|
57429
|
+
var Oe = Symbol("checkedCwd");
|
|
57430
|
+
var fo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
57431
|
+
var Te = fo === "win32";
|
|
57432
|
+
var uo = 1024;
|
|
57433
|
+
var mo = (s3, t) => {
|
|
57434
|
+
if (!Te)
|
|
57360
57435
|
return u.unlink(s3, t);
|
|
57361
|
-
let e2 = s3 + ".DELETE." +
|
|
57436
|
+
let e2 = s3 + ".DELETE." + Mr(16).toString("hex");
|
|
57362
57437
|
u.rename(s3, e2, (i) => {
|
|
57363
57438
|
if (i)
|
|
57364
57439
|
return t(i);
|
|
57365
57440
|
u.unlink(e2, t);
|
|
57366
57441
|
});
|
|
57367
57442
|
};
|
|
57368
|
-
var
|
|
57369
|
-
if (!
|
|
57443
|
+
var po = (s3) => {
|
|
57444
|
+
if (!Te)
|
|
57370
57445
|
return u.unlinkSync(s3);
|
|
57371
|
-
let t = s3 + ".DELETE." +
|
|
57446
|
+
let t = s3 + ".DELETE." + Mr(16).toString("hex");
|
|
57372
57447
|
u.renameSync(s3, t), u.unlinkSync(t);
|
|
57373
57448
|
};
|
|
57374
|
-
var
|
|
57375
|
-
var
|
|
57376
|
-
[
|
|
57377
|
-
[
|
|
57378
|
-
[
|
|
57379
|
-
reservations = new
|
|
57449
|
+
var vr = (s3, t, e2) => s3 !== undefined && s3 === s3 >>> 0 ? s3 : t !== undefined && t === t >>> 0 ? t : e2;
|
|
57450
|
+
var Xt = class extends rt {
|
|
57451
|
+
[gs] = false;
|
|
57452
|
+
[Oe] = false;
|
|
57453
|
+
[Ri] = 0;
|
|
57454
|
+
reservations = new yi;
|
|
57380
57455
|
transform;
|
|
57381
57456
|
writable = true;
|
|
57382
57457
|
readable = false;
|
|
@@ -57403,7 +57478,7 @@ var qt = class extends st {
|
|
|
57403
57478
|
chmod;
|
|
57404
57479
|
constructor(t = {}) {
|
|
57405
57480
|
if (t.ondone = () => {
|
|
57406
|
-
this[
|
|
57481
|
+
this[gs] = true, this[bs]();
|
|
57407
57482
|
}, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
|
|
57408
57483
|
if (typeof t.uid != "number" || typeof t.gid != "number")
|
|
57409
57484
|
throw new TypeError("cannot set owner without number uid and gid");
|
|
@@ -57412,20 +57487,20 @@ var qt = class extends st {
|
|
|
57412
57487
|
this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
|
|
57413
57488
|
} else
|
|
57414
57489
|
this.uid = undefined, this.gid = undefined, this.setOwner = false;
|
|
57415
|
-
this.preserveOwner = t.preserveOwner === undefined && typeof t.uid != "number" ?
|
|
57490
|
+
this.preserveOwner = t.preserveOwner === undefined && typeof t.uid != "number" ? process.getuid?.() === 0 : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : undefined, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : undefined, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : uo, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Te, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f3(R3.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : Lr() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e2) => this[Dr](e2));
|
|
57416
57491
|
}
|
|
57417
57492
|
warn(t, e2, i = {}) {
|
|
57418
57493
|
return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e2, i);
|
|
57419
57494
|
}
|
|
57420
|
-
[
|
|
57421
|
-
this[
|
|
57495
|
+
[bs]() {
|
|
57496
|
+
this[gs] && this[Ri] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
|
|
57422
57497
|
}
|
|
57423
|
-
[
|
|
57498
|
+
[Rs](t, e2) {
|
|
57424
57499
|
let i = t[e2], { type: r2 } = t;
|
|
57425
57500
|
if (!i || this.preservePaths)
|
|
57426
57501
|
return true;
|
|
57427
57502
|
let [n, o2] = ce2(i), h2 = o2.replaceAll(/\\/g, "/").split("/");
|
|
57428
|
-
if (h2.includes("..") ||
|
|
57503
|
+
if (h2.includes("..") || Te && /^[a-z]:\.\.$/i.test(h2[0] ?? "")) {
|
|
57429
57504
|
if (e2 === "path" || r2 === "Link")
|
|
57430
57505
|
return this.warn("TAR_ENTRY_ERROR", `${e2} contains '..'`, { entry: t, [e2]: i }), false;
|
|
57431
57506
|
let a3 = R3.posix.dirname(t.path), l2 = R3.posix.normalize(R3.posix.join(a3, h2.join("/")));
|
|
@@ -57434,7 +57509,7 @@ var qt = class extends st {
|
|
|
57434
57509
|
}
|
|
57435
57510
|
return n && (t[e2] = String(o2), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e2}`, { entry: t, [e2]: i })), true;
|
|
57436
57511
|
}
|
|
57437
|
-
[
|
|
57512
|
+
[Fr](t) {
|
|
57438
57513
|
let e2 = f3(t.path), i = e2.split("/");
|
|
57439
57514
|
if (this.strip) {
|
|
57440
57515
|
if (i.length < this.strip)
|
|
@@ -57450,7 +57525,7 @@ var qt = class extends st {
|
|
|
57450
57525
|
}
|
|
57451
57526
|
if (isFinite(this.maxDepth) && i.length > this.maxDepth)
|
|
57452
57527
|
return this.warn("TAR_ENTRY_ERROR", "path excessively deep", { entry: t, path: e2, depth: i.length, maxDepth: this.maxDepth }), false;
|
|
57453
|
-
if (!this[
|
|
57528
|
+
if (!this[Rs](t, "path") || !this[Rs](t, "linkpath"))
|
|
57454
57529
|
return false;
|
|
57455
57530
|
if (t.absolute = R3.isAbsolute(t.path) ? f3(R3.resolve(t.path)) : f3(R3.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd)
|
|
57456
57531
|
return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f3(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
|
|
@@ -57458,16 +57533,16 @@ var qt = class extends st {
|
|
|
57458
57533
|
return false;
|
|
57459
57534
|
if (this.win32) {
|
|
57460
57535
|
let { root: r2 } = R3.win32.parse(String(t.absolute));
|
|
57461
|
-
t.absolute = r2 +
|
|
57536
|
+
t.absolute = r2 + ts(String(t.absolute).slice(r2.length));
|
|
57462
57537
|
let { root: n } = R3.win32.parse(t.path);
|
|
57463
|
-
t.path = n +
|
|
57538
|
+
t.path = n + ts(t.path.slice(n.length));
|
|
57464
57539
|
}
|
|
57465
57540
|
return true;
|
|
57466
57541
|
}
|
|
57467
|
-
[
|
|
57468
|
-
if (!this[
|
|
57542
|
+
[Dr](t) {
|
|
57543
|
+
if (!this[Fr](t))
|
|
57469
57544
|
return t.resume();
|
|
57470
|
-
switch (
|
|
57545
|
+
switch (co.equal(typeof t.absolute, "string"), t.type) {
|
|
57471
57546
|
case "Directory":
|
|
57472
57547
|
case "GNUDumpDir":
|
|
57473
57548
|
t.mode && (t.mode = t.mode | 448);
|
|
@@ -57476,28 +57551,28 @@ var qt = class extends st {
|
|
|
57476
57551
|
case "ContiguousFile":
|
|
57477
57552
|
case "Link":
|
|
57478
57553
|
case "SymbolicLink":
|
|
57479
|
-
return this[
|
|
57554
|
+
return this[_s](t);
|
|
57480
57555
|
default:
|
|
57481
|
-
return this[
|
|
57556
|
+
return this[Cr](t);
|
|
57482
57557
|
}
|
|
57483
57558
|
}
|
|
57484
57559
|
[O2](t, e2) {
|
|
57485
|
-
t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e2 }), this[
|
|
57560
|
+
t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e2 }), this[$t](), e2.resume());
|
|
57486
57561
|
}
|
|
57487
|
-
[
|
|
57488
|
-
|
|
57562
|
+
[yt](t, e2, i) {
|
|
57563
|
+
gr(f3(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: e2 }, i);
|
|
57489
57564
|
}
|
|
57490
|
-
[
|
|
57565
|
+
[ge](t) {
|
|
57491
57566
|
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;
|
|
57492
57567
|
}
|
|
57493
57568
|
[be](t) {
|
|
57494
|
-
return
|
|
57569
|
+
return vr(this.uid, t.uid, this.processUid);
|
|
57495
57570
|
}
|
|
57496
57571
|
[_e](t) {
|
|
57497
|
-
return
|
|
57572
|
+
return vr(this.gid, t.gid, this.processGid);
|
|
57498
57573
|
}
|
|
57499
|
-
[
|
|
57500
|
-
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r2 = new
|
|
57574
|
+
[Ts](t, e2) {
|
|
57575
|
+
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r2 = new et(String(t.absolute), { flags: ms(t.size), mode: i, autoClose: false });
|
|
57501
57576
|
r2.on("error", (a3) => {
|
|
57502
57577
|
r2.fd && u.close(r2.fd, () => {}), r2.write = () => true, this[O2](a3, t), e2();
|
|
57503
57578
|
});
|
|
@@ -57507,7 +57582,7 @@ var qt = class extends st {
|
|
|
57507
57582
|
return;
|
|
57508
57583
|
}
|
|
57509
57584
|
--n === 0 && r2.fd !== undefined && u.close(r2.fd, (l2) => {
|
|
57510
|
-
l2 ? this[O2](l2, t) : this[
|
|
57585
|
+
l2 ? this[O2](l2, t) : this[$t](), e2();
|
|
57511
57586
|
});
|
|
57512
57587
|
};
|
|
57513
57588
|
r2.on("finish", () => {
|
|
@@ -57515,12 +57590,12 @@ var qt = class extends st {
|
|
|
57515
57590
|
if (typeof l2 == "number" && t.mtime && !this.noMtime) {
|
|
57516
57591
|
n++;
|
|
57517
57592
|
let c2 = t.atime || new Date, d3 = t.mtime;
|
|
57518
|
-
u.futimes(l2, c2, d3, (
|
|
57593
|
+
u.futimes(l2, c2, d3, (y3) => y3 ? u.utimes(a3, c2, d3, (T3) => o2(T3 && y3)) : o2());
|
|
57519
57594
|
}
|
|
57520
|
-
if (typeof l2 == "number" && this[
|
|
57595
|
+
if (typeof l2 == "number" && this[ge](t)) {
|
|
57521
57596
|
n++;
|
|
57522
57597
|
let c2 = this[be](t), d3 = this[_e](t);
|
|
57523
|
-
typeof c2 == "number" && typeof d3 == "number" && u.fchown(l2, c2, d3, (
|
|
57598
|
+
typeof c2 == "number" && typeof d3 == "number" && u.fchown(l2, c2, d3, (y3) => y3 ? u.chown(a3, c2, d3, (T3) => o2(T3 && y3)) : o2());
|
|
57524
57599
|
}
|
|
57525
57600
|
o2();
|
|
57526
57601
|
});
|
|
@@ -57529,35 +57604,35 @@ var qt = class extends st {
|
|
|
57529
57604
|
this[O2](a3, t), e2();
|
|
57530
57605
|
}), t.pipe(h2)), h2.pipe(r2);
|
|
57531
57606
|
}
|
|
57532
|
-
[
|
|
57607
|
+
[xs](t, e2) {
|
|
57533
57608
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
|
|
57534
|
-
this[
|
|
57609
|
+
this[yt](String(t.absolute), i, (r2) => {
|
|
57535
57610
|
if (r2) {
|
|
57536
57611
|
this[O2](r2, t), e2();
|
|
57537
57612
|
return;
|
|
57538
57613
|
}
|
|
57539
57614
|
let n = 1, o2 = () => {
|
|
57540
|
-
--n === 0 && (e2(), this[
|
|
57615
|
+
--n === 0 && (e2(), this[$t](), t.resume());
|
|
57541
57616
|
};
|
|
57542
|
-
t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || new Date, t.mtime, o2)), this[
|
|
57617
|
+
t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || new Date, t.mtime, o2)), this[ge](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o2)), o2();
|
|
57543
57618
|
});
|
|
57544
57619
|
}
|
|
57545
|
-
[
|
|
57620
|
+
[Cr](t) {
|
|
57546
57621
|
t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
|
|
57547
57622
|
}
|
|
57548
|
-
[
|
|
57623
|
+
[Ar](t, e2) {
|
|
57549
57624
|
let i = f3(R3.relative(this.cwd, R3.resolve(R3.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
|
|
57550
|
-
this[
|
|
57625
|
+
this[Re](t, this.cwd, i, () => this[gi](t, String(t.linkpath), "symlink", e2), (r2) => {
|
|
57551
57626
|
this[O2](r2, t), e2();
|
|
57552
57627
|
});
|
|
57553
57628
|
}
|
|
57554
|
-
[
|
|
57629
|
+
[Ir](t, e2) {
|
|
57555
57630
|
let i = f3(R3.resolve(this.cwd, String(t.linkpath))), r2 = f3(String(t.linkpath)).split("/");
|
|
57556
|
-
this[
|
|
57631
|
+
this[Re](t, this.cwd, r2, () => this[gi](t, i, "link", e2), (n) => {
|
|
57557
57632
|
this[O2](n, t), e2();
|
|
57558
57633
|
});
|
|
57559
57634
|
}
|
|
57560
|
-
[
|
|
57635
|
+
[Re](t, e2, i, r2, n) {
|
|
57561
57636
|
let o2 = i.shift();
|
|
57562
57637
|
if (this.preservePaths || o2 === undefined)
|
|
57563
57638
|
return r2();
|
|
@@ -57566,43 +57641,43 @@ var qt = class extends st {
|
|
|
57566
57641
|
if (a3)
|
|
57567
57642
|
return r2();
|
|
57568
57643
|
if (l2?.isSymbolicLink())
|
|
57569
|
-
return n(new
|
|
57570
|
-
this[
|
|
57644
|
+
return n(new St(h2, R3.resolve(h2, i.join("/"))));
|
|
57645
|
+
this[Re](t, h2, i, r2, n);
|
|
57571
57646
|
});
|
|
57572
57647
|
}
|
|
57573
|
-
[
|
|
57574
|
-
this[
|
|
57648
|
+
[kr]() {
|
|
57649
|
+
this[Ri]++;
|
|
57575
57650
|
}
|
|
57576
|
-
[
|
|
57577
|
-
this[
|
|
57651
|
+
[$t]() {
|
|
57652
|
+
this[Ri]--, this[bs]();
|
|
57578
57653
|
}
|
|
57579
|
-
[
|
|
57580
|
-
this[
|
|
57654
|
+
[Ls](t) {
|
|
57655
|
+
this[$t](), t.resume();
|
|
57581
57656
|
}
|
|
57582
|
-
[
|
|
57583
|
-
return t.type === "File" && !this.unlink && e2.isFile() && e2.nlink <= 1 && !
|
|
57657
|
+
[Os](t, e2) {
|
|
57658
|
+
return t.type === "File" && !this.unlink && e2.isFile() && e2.nlink <= 1 && !Te;
|
|
57584
57659
|
}
|
|
57585
|
-
[
|
|
57586
|
-
this[
|
|
57660
|
+
[_s](t) {
|
|
57661
|
+
this[kr]();
|
|
57587
57662
|
let e2 = [t.path];
|
|
57588
|
-
t.linkpath && e2.push(t.linkpath), this.reservations.reserve(e2, (i) => this[
|
|
57663
|
+
t.linkpath && e2.push(t.linkpath), this.reservations.reserve(e2, (i) => this[Nr](t, i));
|
|
57589
57664
|
}
|
|
57590
|
-
[
|
|
57665
|
+
[Nr](t, e2) {
|
|
57591
57666
|
let i = (h2) => {
|
|
57592
57667
|
e2(h2);
|
|
57593
57668
|
}, r2 = () => {
|
|
57594
|
-
this[
|
|
57669
|
+
this[yt](this.cwd, this.dmode, (h2) => {
|
|
57595
57670
|
if (h2) {
|
|
57596
57671
|
this[O2](h2, t), i();
|
|
57597
57672
|
return;
|
|
57598
57673
|
}
|
|
57599
|
-
this[
|
|
57674
|
+
this[Oe] = true, n();
|
|
57600
57675
|
});
|
|
57601
57676
|
}, n = () => {
|
|
57602
57677
|
if (t.absolute !== this.cwd) {
|
|
57603
57678
|
let h2 = f3(R3.dirname(String(t.absolute)));
|
|
57604
57679
|
if (h2 !== this.cwd)
|
|
57605
|
-
return this[
|
|
57680
|
+
return this[yt](h2, this.dmode, (a3) => {
|
|
57606
57681
|
if (a3) {
|
|
57607
57682
|
this[O2](a3, t), i();
|
|
57608
57683
|
return;
|
|
@@ -57614,10 +57689,10 @@ var qt = class extends st {
|
|
|
57614
57689
|
}, o2 = () => {
|
|
57615
57690
|
u.lstat(String(t.absolute), (h2, a3) => {
|
|
57616
57691
|
if (a3 && (this.keep || this.newer && a3.mtime > (t.mtime ?? a3.mtime))) {
|
|
57617
|
-
this[
|
|
57692
|
+
this[Ls](t), i();
|
|
57618
57693
|
return;
|
|
57619
57694
|
}
|
|
57620
|
-
if (h2 || this[
|
|
57695
|
+
if (h2 || this[Os](t, a3))
|
|
57621
57696
|
return this[P2](null, t, i);
|
|
57622
57697
|
if (a3.isDirectory()) {
|
|
57623
57698
|
if (t.type === "Directory") {
|
|
@@ -57629,10 +57704,10 @@ var qt = class extends st {
|
|
|
57629
57704
|
}
|
|
57630
57705
|
if (t.absolute === this.cwd)
|
|
57631
57706
|
return this[P2](null, t, i);
|
|
57632
|
-
|
|
57707
|
+
mo(String(t.absolute), (l2) => this[P2](l2 ?? null, t, i));
|
|
57633
57708
|
});
|
|
57634
57709
|
};
|
|
57635
|
-
this[
|
|
57710
|
+
this[Oe] ? n() : r2();
|
|
57636
57711
|
}
|
|
57637
57712
|
[P2](t, e2, i) {
|
|
57638
57713
|
if (t) {
|
|
@@ -57643,68 +57718,68 @@ var qt = class extends st {
|
|
|
57643
57718
|
case "File":
|
|
57644
57719
|
case "OldFile":
|
|
57645
57720
|
case "ContiguousFile":
|
|
57646
|
-
return this[
|
|
57721
|
+
return this[Ts](e2, i);
|
|
57647
57722
|
case "Link":
|
|
57648
|
-
return this[
|
|
57723
|
+
return this[Ir](e2, i);
|
|
57649
57724
|
case "SymbolicLink":
|
|
57650
|
-
return this[
|
|
57725
|
+
return this[Ar](e2, i);
|
|
57651
57726
|
case "Directory":
|
|
57652
57727
|
case "GNUDumpDir":
|
|
57653
|
-
return this[
|
|
57728
|
+
return this[xs](e2, i);
|
|
57654
57729
|
}
|
|
57655
57730
|
}
|
|
57656
|
-
[
|
|
57731
|
+
[gi](t, e2, i, r2) {
|
|
57657
57732
|
u[i](e2, String(t.absolute), (n) => {
|
|
57658
|
-
n ? this[O2](n, t) : (this[
|
|
57733
|
+
n ? this[O2](n, t) : (this[$t](), t.resume()), r2();
|
|
57659
57734
|
});
|
|
57660
57735
|
}
|
|
57661
57736
|
};
|
|
57662
|
-
var
|
|
57737
|
+
var ye = (s3) => {
|
|
57663
57738
|
try {
|
|
57664
57739
|
return [null, s3()];
|
|
57665
57740
|
} catch (t) {
|
|
57666
57741
|
return [t, null];
|
|
57667
57742
|
}
|
|
57668
57743
|
};
|
|
57669
|
-
var
|
|
57744
|
+
var xe = class extends Xt {
|
|
57670
57745
|
sync = true;
|
|
57671
57746
|
[P2](t, e2) {
|
|
57672
57747
|
return super[P2](t, e2, () => {});
|
|
57673
57748
|
}
|
|
57674
|
-
[
|
|
57675
|
-
if (!this[
|
|
57676
|
-
let n = this[
|
|
57749
|
+
[_s](t) {
|
|
57750
|
+
if (!this[Oe]) {
|
|
57751
|
+
let n = this[yt](this.cwd, this.dmode);
|
|
57677
57752
|
if (n)
|
|
57678
57753
|
return this[O2](n, t);
|
|
57679
|
-
this[
|
|
57754
|
+
this[Oe] = true;
|
|
57680
57755
|
}
|
|
57681
57756
|
if (t.absolute !== this.cwd) {
|
|
57682
57757
|
let n = f3(R3.dirname(String(t.absolute)));
|
|
57683
57758
|
if (n !== this.cwd) {
|
|
57684
|
-
let o2 = this[
|
|
57759
|
+
let o2 = this[yt](n, this.dmode);
|
|
57685
57760
|
if (o2)
|
|
57686
57761
|
return this[O2](o2, t);
|
|
57687
57762
|
}
|
|
57688
57763
|
}
|
|
57689
|
-
let [e2, i] =
|
|
57764
|
+
let [e2, i] = ye(() => u.lstatSync(String(t.absolute)));
|
|
57690
57765
|
if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime)))
|
|
57691
|
-
return this[
|
|
57692
|
-
if (e2 || this[
|
|
57766
|
+
return this[Ls](t);
|
|
57767
|
+
if (e2 || this[Os](t, i))
|
|
57693
57768
|
return this[P2](null, t);
|
|
57694
57769
|
if (i.isDirectory()) {
|
|
57695
57770
|
if (t.type === "Directory") {
|
|
57696
|
-
let o2 = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h2] = o2 ?
|
|
57771
|
+
let o2 = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h2] = o2 ? ye(() => {
|
|
57697
57772
|
u.chmodSync(String(t.absolute), Number(t.mode));
|
|
57698
57773
|
}) : [];
|
|
57699
57774
|
return this[P2](h2, t);
|
|
57700
57775
|
}
|
|
57701
|
-
let [n] =
|
|
57776
|
+
let [n] = ye(() => u.rmdirSync(String(t.absolute)));
|
|
57702
57777
|
this[P2](n, t);
|
|
57703
57778
|
}
|
|
57704
|
-
let [r2] = t.absolute === this.cwd ? [] :
|
|
57779
|
+
let [r2] = t.absolute === this.cwd ? [] : ye(() => po(String(t.absolute)));
|
|
57705
57780
|
this[P2](r2, t);
|
|
57706
57781
|
}
|
|
57707
|
-
[
|
|
57782
|
+
[Ts](t, e2) {
|
|
57708
57783
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r2 = (h2) => {
|
|
57709
57784
|
let a3;
|
|
57710
57785
|
try {
|
|
@@ -57715,7 +57790,7 @@ var Te = class extends qt {
|
|
|
57715
57790
|
(h2 || a3) && this[O2](h2 || a3, t), e2();
|
|
57716
57791
|
}, n;
|
|
57717
57792
|
try {
|
|
57718
|
-
n = u.openSync(String(t.absolute),
|
|
57793
|
+
n = u.openSync(String(t.absolute), ms(t.size), i);
|
|
57719
57794
|
} catch (h2) {
|
|
57720
57795
|
return r2(h2);
|
|
57721
57796
|
}
|
|
@@ -57740,7 +57815,7 @@ var Te = class extends qt {
|
|
|
57740
57815
|
}
|
|
57741
57816
|
}
|
|
57742
57817
|
}
|
|
57743
|
-
if (this[
|
|
57818
|
+
if (this[ge](t)) {
|
|
57744
57819
|
let a3 = this[be](t), l2 = this[_e](t);
|
|
57745
57820
|
try {
|
|
57746
57821
|
u.fchownSync(n, Number(a3), Number(l2));
|
|
@@ -57755,8 +57830,8 @@ var Te = class extends qt {
|
|
|
57755
57830
|
r2(h2);
|
|
57756
57831
|
});
|
|
57757
57832
|
}
|
|
57758
|
-
[
|
|
57759
|
-
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r2 = this[
|
|
57833
|
+
[xs](t, e2) {
|
|
57834
|
+
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r2 = this[yt](String(t.absolute), i);
|
|
57760
57835
|
if (r2) {
|
|
57761
57836
|
this[O2](r2, t), e2();
|
|
57762
57837
|
return;
|
|
@@ -57765,34 +57840,34 @@ var Te = class extends qt {
|
|
|
57765
57840
|
try {
|
|
57766
57841
|
u.utimesSync(String(t.absolute), t.atime || new Date, t.mtime);
|
|
57767
57842
|
} catch {}
|
|
57768
|
-
if (this[
|
|
57843
|
+
if (this[ge](t))
|
|
57769
57844
|
try {
|
|
57770
57845
|
u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
|
|
57771
57846
|
} catch {}
|
|
57772
57847
|
e2(), t.resume();
|
|
57773
57848
|
}
|
|
57774
|
-
[
|
|
57849
|
+
[yt](t, e2) {
|
|
57775
57850
|
try {
|
|
57776
|
-
return
|
|
57851
|
+
return _r(f3(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: e2 });
|
|
57777
57852
|
} catch (i) {
|
|
57778
57853
|
return i;
|
|
57779
57854
|
}
|
|
57780
57855
|
}
|
|
57781
|
-
[
|
|
57856
|
+
[Re](t, e2, i, r2, n) {
|
|
57782
57857
|
if (this.preservePaths || i.length === 0)
|
|
57783
57858
|
return r2();
|
|
57784
57859
|
let o2 = e2;
|
|
57785
57860
|
for (let h2 of i) {
|
|
57786
57861
|
o2 = R3.resolve(o2, h2);
|
|
57787
|
-
let [a3, l2] =
|
|
57862
|
+
let [a3, l2] = ye(() => u.lstatSync(o2));
|
|
57788
57863
|
if (a3)
|
|
57789
57864
|
return r2();
|
|
57790
57865
|
if (l2.isSymbolicLink())
|
|
57791
|
-
return n(new
|
|
57866
|
+
return n(new St(o2, R3.resolve(e2, i.join("/"))));
|
|
57792
57867
|
}
|
|
57793
57868
|
r2();
|
|
57794
57869
|
}
|
|
57795
|
-
[
|
|
57870
|
+
[gi](t, e2, i, r2) {
|
|
57796
57871
|
let n = `${i}Sync`;
|
|
57797
57872
|
try {
|
|
57798
57873
|
u[n](e2, String(t.absolute)), r2(), t.resume();
|
|
@@ -57801,14 +57876,14 @@ var Te = class extends qt {
|
|
|
57801
57876
|
}
|
|
57802
57877
|
}
|
|
57803
57878
|
};
|
|
57804
|
-
var
|
|
57805
|
-
let t = new
|
|
57806
|
-
new
|
|
57879
|
+
var Eo = (s3) => {
|
|
57880
|
+
let t = new xe(s3), e2 = s3.file, i = Br.statSync(e2), r2 = s3.maxReadSize || 16 * 1024 * 1024;
|
|
57881
|
+
new Be(e2, { readSize: r2, size: i.size }).pipe(t);
|
|
57807
57882
|
};
|
|
57808
|
-
var
|
|
57809
|
-
let e2 = new
|
|
57883
|
+
var wo = (s3, t) => {
|
|
57884
|
+
let e2 = new Xt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r2 = s3.file;
|
|
57810
57885
|
return new Promise((o2, h2) => {
|
|
57811
|
-
e2.on("error", h2), e2.on("close", o2),
|
|
57886
|
+
e2.on("error", h2), e2.on("close", o2), Br.stat(r2, (a3, l2) => {
|
|
57812
57887
|
if (a3)
|
|
57813
57888
|
h2(a3);
|
|
57814
57889
|
else {
|
|
@@ -57818,10 +57893,10 @@ var lo = (s3, t) => {
|
|
|
57818
57893
|
});
|
|
57819
57894
|
});
|
|
57820
57895
|
};
|
|
57821
|
-
var
|
|
57822
|
-
t?.length &&
|
|
57896
|
+
var So = K3(Eo, wo, (s3) => new xe(s3), (s3) => new Xt(s3), (s3, t) => {
|
|
57897
|
+
t?.length && Qi(s3, t);
|
|
57823
57898
|
});
|
|
57824
|
-
var
|
|
57899
|
+
var yo = (s3, t) => {
|
|
57825
57900
|
let e2 = new kt(s3), i = true, r2, n;
|
|
57826
57901
|
try {
|
|
57827
57902
|
try {
|
|
@@ -57849,7 +57924,7 @@ var fo = (s3, t) => {
|
|
|
57849
57924
|
break;
|
|
57850
57925
|
n += l2, s3.mtimeCache && a3.mtime && s3.mtimeCache.set(String(a3.path), a3.mtime);
|
|
57851
57926
|
}
|
|
57852
|
-
i = false,
|
|
57927
|
+
i = false, Ro(s3, e2, n, r2, t);
|
|
57853
57928
|
} finally {
|
|
57854
57929
|
if (i)
|
|
57855
57930
|
try {
|
|
@@ -57857,23 +57932,23 @@ var fo = (s3, t) => {
|
|
|
57857
57932
|
} catch {}
|
|
57858
57933
|
}
|
|
57859
57934
|
};
|
|
57860
|
-
var
|
|
57935
|
+
var Ro = (s3, t, e2, i, r2) => {
|
|
57861
57936
|
let n = new Wt(s3.file, { fd: i, start: e2 });
|
|
57862
|
-
t.pipe(n),
|
|
57937
|
+
t.pipe(n), bo(t, r2);
|
|
57863
57938
|
};
|
|
57864
|
-
var
|
|
57939
|
+
var go = (s3, t) => {
|
|
57865
57940
|
t = Array.from(t);
|
|
57866
|
-
let e2 = new
|
|
57867
|
-
let a3 = (T3,
|
|
57868
|
-
T3 ? v2.close(n, (E2) => h2(T3)) : h2(null,
|
|
57941
|
+
let e2 = new wt(s3), i = (n, o2, h2) => {
|
|
57942
|
+
let a3 = (T3, D) => {
|
|
57943
|
+
T3 ? v2.close(n, (E2) => h2(T3)) : h2(null, D);
|
|
57869
57944
|
}, l2 = 0;
|
|
57870
57945
|
if (o2 === 0)
|
|
57871
57946
|
return a3(null, 0);
|
|
57872
|
-
let c2 = 0, d3 = Buffer.alloc(512),
|
|
57873
|
-
if (T3 ||
|
|
57947
|
+
let c2 = 0, d3 = Buffer.alloc(512), y3 = (T3, D) => {
|
|
57948
|
+
if (T3 || D === undefined)
|
|
57874
57949
|
return a3(T3);
|
|
57875
|
-
if (c2 +=
|
|
57876
|
-
return v2.read(n, d3, c2, d3.length - c2, l2 + c2,
|
|
57950
|
+
if (c2 += D, c2 < 512 && D)
|
|
57951
|
+
return v2.read(n, d3, c2, d3.length - c2, l2 + c2, y3);
|
|
57877
57952
|
if (l2 === 0 && d3[0] === 31 && d3[1] === 139)
|
|
57878
57953
|
return a3(new Error("cannot append to compressed archives"));
|
|
57879
57954
|
if (c2 < 512)
|
|
@@ -57884,9 +57959,9 @@ var mo = (s3, t) => {
|
|
|
57884
57959
|
let x3 = 512 * Math.ceil((E2.size ?? 0) / 512);
|
|
57885
57960
|
if (l2 + x3 + 512 > o2 || (l2 += x3 + 512, l2 >= o2))
|
|
57886
57961
|
return a3(null, l2);
|
|
57887
|
-
s3.mtimeCache && E2.mtime && s3.mtimeCache.set(String(E2.path), E2.mtime), c2 = 0, v2.read(n, d3, 0, 512, l2,
|
|
57962
|
+
s3.mtimeCache && E2.mtime && s3.mtimeCache.set(String(E2.path), E2.mtime), c2 = 0, v2.read(n, d3, 0, 512, l2, y3);
|
|
57888
57963
|
};
|
|
57889
|
-
v2.read(n, d3, 0, 512, l2,
|
|
57964
|
+
v2.read(n, d3, 0, 512, l2, y3);
|
|
57890
57965
|
};
|
|
57891
57966
|
return new Promise((n, o2) => {
|
|
57892
57967
|
e2.on("error", o2);
|
|
@@ -57895,46 +57970,46 @@ var mo = (s3, t) => {
|
|
|
57895
57970
|
return h2 = "w+", v2.open(s3.file, h2, a3);
|
|
57896
57971
|
if (l2 || !c2)
|
|
57897
57972
|
return o2(l2);
|
|
57898
|
-
v2.fstat(c2, (d3,
|
|
57973
|
+
v2.fstat(c2, (d3, y3) => {
|
|
57899
57974
|
if (d3)
|
|
57900
57975
|
return v2.close(c2, () => o2(d3));
|
|
57901
|
-
i(c2,
|
|
57976
|
+
i(c2, y3.size, (T3, D) => {
|
|
57902
57977
|
if (T3)
|
|
57903
57978
|
return o2(T3);
|
|
57904
|
-
let E2 = new
|
|
57905
|
-
e2.pipe(E2), E2.on("error", o2), E2.on("close", n),
|
|
57979
|
+
let E2 = new et(s3.file, { fd: c2, start: D });
|
|
57980
|
+
e2.pipe(E2), E2.on("error", o2), E2.on("close", n), _o(e2, t);
|
|
57906
57981
|
});
|
|
57907
57982
|
});
|
|
57908
57983
|
};
|
|
57909
57984
|
v2.open(s3.file, h2, a3);
|
|
57910
57985
|
});
|
|
57911
57986
|
};
|
|
57912
|
-
var
|
|
57987
|
+
var bo = (s3, t) => {
|
|
57913
57988
|
t.forEach((e2) => {
|
|
57914
|
-
e2.charAt(0) === "@" ?
|
|
57989
|
+
e2.charAt(0) === "@" ? Ct({ file: Pr.resolve(s3.cwd, e2.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e2);
|
|
57915
57990
|
}), s3.end();
|
|
57916
57991
|
};
|
|
57917
|
-
var
|
|
57992
|
+
var _o = async (s3, t) => {
|
|
57918
57993
|
for (let e2 of t)
|
|
57919
|
-
e2.charAt(0) === "@" ? await
|
|
57994
|
+
e2.charAt(0) === "@" ? await Ct({ file: Pr.resolve(String(s3.cwd), e2.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e2);
|
|
57920
57995
|
s3.end();
|
|
57921
57996
|
};
|
|
57922
|
-
var vt = K3(
|
|
57997
|
+
var vt = K3(yo, go, () => {
|
|
57923
57998
|
throw new TypeError("file is required");
|
|
57924
57999
|
}, () => {
|
|
57925
58000
|
throw new TypeError("file is required");
|
|
57926
58001
|
}, (s3, t) => {
|
|
57927
|
-
if (!
|
|
58002
|
+
if (!Bs(s3))
|
|
57928
58003
|
throw new TypeError("file is required");
|
|
57929
58004
|
if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr"))
|
|
57930
58005
|
throw new TypeError("cannot append to compressed archives");
|
|
57931
58006
|
if (!t?.length)
|
|
57932
58007
|
throw new TypeError("no paths specified to add/replace");
|
|
57933
58008
|
});
|
|
57934
|
-
var
|
|
57935
|
-
vt.validate?.(s3, t),
|
|
58009
|
+
var Oo = K3(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
|
|
58010
|
+
vt.validate?.(s3, t), To(s3);
|
|
57936
58011
|
});
|
|
57937
|
-
var
|
|
58012
|
+
var To = (s3) => {
|
|
57938
58013
|
let t = s3.filter;
|
|
57939
58014
|
s3.mtimeCache || (s3.mtimeCache = new Map), s3.filter = t ? (e2, i) => t(e2, i) && !((s3.mtimeCache?.get(e2) ?? i.mtime ?? 0) > (i.mtime ?? 0)) : (e2, i) => !((s3.mtimeCache?.get(e2) ?? i.mtime ?? 0) > (i.mtime ?? 0));
|
|
57940
58015
|
};
|
|
@@ -58241,7 +58316,7 @@ async function pack(opts) {
|
|
|
58241
58316
|
for (const rel of files) {
|
|
58242
58317
|
safeRelPath(rel);
|
|
58243
58318
|
}
|
|
58244
|
-
await
|
|
58319
|
+
await Qn({
|
|
58245
58320
|
cwd: root,
|
|
58246
58321
|
gzip: true,
|
|
58247
58322
|
file: opts.outFile,
|
|
@@ -58267,7 +58342,7 @@ async function extract(opts) {
|
|
|
58267
58342
|
let entryCount = 0;
|
|
58268
58343
|
const written = [];
|
|
58269
58344
|
let filterError;
|
|
58270
|
-
await
|
|
58345
|
+
await So({
|
|
58271
58346
|
file: opts.tarFile,
|
|
58272
58347
|
cwd: out,
|
|
58273
58348
|
strict: true,
|
|
@@ -70778,8 +70853,8 @@ function $constructor(name, initializer, params) {
|
|
|
70778
70853
|
const inst = params?.Parent ? new Definition : this;
|
|
70779
70854
|
init(inst, def);
|
|
70780
70855
|
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
70781
|
-
for (const
|
|
70782
|
-
|
|
70856
|
+
for (const fn of inst._zod.deferred) {
|
|
70857
|
+
fn();
|
|
70783
70858
|
}
|
|
70784
70859
|
return inst;
|
|
70785
70860
|
}
|
|
@@ -71895,9 +71970,9 @@ class Doc {
|
|
|
71895
71970
|
if (this)
|
|
71896
71971
|
this.args = args;
|
|
71897
71972
|
}
|
|
71898
|
-
indented(
|
|
71973
|
+
indented(fn) {
|
|
71899
71974
|
this.indent += 1;
|
|
71900
|
-
|
|
71975
|
+
fn(this);
|
|
71901
71976
|
this.indent -= 1;
|
|
71902
71977
|
}
|
|
71903
71978
|
write(arg) {
|
|
@@ -71944,8 +72019,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
71944
72019
|
checks.unshift(inst);
|
|
71945
72020
|
}
|
|
71946
72021
|
for (const ch of checks) {
|
|
71947
|
-
for (const
|
|
71948
|
-
|
|
72022
|
+
for (const fn of ch._zod.onattach) {
|
|
72023
|
+
fn(inst);
|
|
71949
72024
|
}
|
|
71950
72025
|
}
|
|
71951
72026
|
if (checks.length === 0) {
|
|
@@ -72587,8 +72662,8 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
72587
72662
|
}
|
|
72588
72663
|
doc.write(`payload.value = newResult;`);
|
|
72589
72664
|
doc.write(`return payload;`);
|
|
72590
|
-
const
|
|
72591
|
-
return (payload, ctx) =>
|
|
72665
|
+
const fn = doc.compile();
|
|
72666
|
+
return (payload, ctx) => fn(shape, payload, ctx);
|
|
72592
72667
|
};
|
|
72593
72668
|
let fastpass;
|
|
72594
72669
|
const isObject3 = isObject2;
|
|
@@ -73832,22 +73907,22 @@ function _array(Class2, element, params) {
|
|
|
73832
73907
|
...normalizeParams(params)
|
|
73833
73908
|
});
|
|
73834
73909
|
}
|
|
73835
|
-
function _custom(Class2,
|
|
73910
|
+
function _custom(Class2, fn, _params) {
|
|
73836
73911
|
const norm = normalizeParams(_params);
|
|
73837
73912
|
norm.abort ?? (norm.abort = true);
|
|
73838
73913
|
const schema = new Class2({
|
|
73839
73914
|
type: "custom",
|
|
73840
73915
|
check: "custom",
|
|
73841
|
-
fn
|
|
73916
|
+
fn,
|
|
73842
73917
|
...norm
|
|
73843
73918
|
});
|
|
73844
73919
|
return schema;
|
|
73845
73920
|
}
|
|
73846
|
-
function _refine(Class2,
|
|
73921
|
+
function _refine(Class2, fn, _params) {
|
|
73847
73922
|
const schema = new Class2({
|
|
73848
73923
|
type: "custom",
|
|
73849
73924
|
check: "custom",
|
|
73850
|
-
fn
|
|
73925
|
+
fn,
|
|
73851
73926
|
...normalizeParams(_params)
|
|
73852
73927
|
});
|
|
73853
73928
|
return schema;
|
|
@@ -74017,7 +74092,7 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
74017
74092
|
inst.spa = inst.safeParseAsync;
|
|
74018
74093
|
inst.refine = (check, params) => inst.check(refine(check, params));
|
|
74019
74094
|
inst.superRefine = (refinement) => inst.check(superRefine(refinement));
|
|
74020
|
-
inst.overwrite = (
|
|
74095
|
+
inst.overwrite = (fn) => inst.check(_overwrite(fn));
|
|
74021
74096
|
inst.optional = () => optional(inst);
|
|
74022
74097
|
inst.nullable = () => nullable(inst);
|
|
74023
74098
|
inst.nullish = () => optional(nullable(inst));
|
|
@@ -74490,10 +74565,10 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
74490
74565
|
return payload;
|
|
74491
74566
|
};
|
|
74492
74567
|
});
|
|
74493
|
-
function transform2(
|
|
74568
|
+
function transform2(fn) {
|
|
74494
74569
|
return new ZodTransform({
|
|
74495
74570
|
type: "transform",
|
|
74496
|
-
transform:
|
|
74571
|
+
transform: fn
|
|
74497
74572
|
});
|
|
74498
74573
|
}
|
|
74499
74574
|
var ZodOptional2 = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
|
|
@@ -74599,20 +74674,20 @@ var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
|
74599
74674
|
$ZodCustom.init(inst, def);
|
|
74600
74675
|
ZodType2.init(inst, def);
|
|
74601
74676
|
});
|
|
74602
|
-
function check(
|
|
74677
|
+
function check(fn) {
|
|
74603
74678
|
const ch = new $ZodCheck({
|
|
74604
74679
|
check: "custom"
|
|
74605
74680
|
});
|
|
74606
|
-
ch._zod.check =
|
|
74681
|
+
ch._zod.check = fn;
|
|
74607
74682
|
return ch;
|
|
74608
74683
|
}
|
|
74609
|
-
function custom2(
|
|
74610
|
-
return _custom(ZodCustom,
|
|
74684
|
+
function custom2(fn, _params) {
|
|
74685
|
+
return _custom(ZodCustom, fn ?? (() => true), _params);
|
|
74611
74686
|
}
|
|
74612
|
-
function refine(
|
|
74613
|
-
return _refine(ZodCustom,
|
|
74687
|
+
function refine(fn, _params = {}) {
|
|
74688
|
+
return _refine(ZodCustom, fn, _params);
|
|
74614
74689
|
}
|
|
74615
|
-
function superRefine(
|
|
74690
|
+
function superRefine(fn) {
|
|
74616
74691
|
const ch = check((payload) => {
|
|
74617
74692
|
payload.addIssue = (issue2) => {
|
|
74618
74693
|
if (typeof issue2 === "string") {
|
|
@@ -74628,12 +74703,12 @@ function superRefine(fn2) {
|
|
|
74628
74703
|
payload.issues.push(exports_util.issue(_issue));
|
|
74629
74704
|
}
|
|
74630
74705
|
};
|
|
74631
|
-
return
|
|
74706
|
+
return fn(payload.value, payload);
|
|
74632
74707
|
});
|
|
74633
74708
|
return ch;
|
|
74634
74709
|
}
|
|
74635
|
-
function preprocess(
|
|
74636
|
-
return pipe(transform2(
|
|
74710
|
+
function preprocess(fn, schema) {
|
|
74711
|
+
return pipe(transform2(fn), schema);
|
|
74637
74712
|
}
|
|
74638
74713
|
// node_modules/zod/v4/classic/compat.js
|
|
74639
74714
|
var ZodIssueCode2 = {
|
|
@@ -80488,7 +80563,7 @@ async function extractArchiveMembers(archivePath, outputRoot, materials, context
|
|
|
80488
80563
|
}
|
|
80489
80564
|
const matches2 = new Map;
|
|
80490
80565
|
let validationError;
|
|
80491
|
-
const unpack =
|
|
80566
|
+
const unpack = So({
|
|
80492
80567
|
cwd: outputRoot,
|
|
80493
80568
|
strict: true,
|
|
80494
80569
|
preserveOwner: false,
|