npm-pkg-lint 4.6.6 → 4.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +287 -282
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7666,9 +7666,9 @@ import Vt from "node:fs";
|
|
|
7666
7666
|
import { dirname as Ln, parse as Nn } from "path";
|
|
7667
7667
|
import { EventEmitter as _n } from "events";
|
|
7668
7668
|
import Pi from "assert";
|
|
7669
|
-
import { Buffer as
|
|
7669
|
+
import { Buffer as Ot } from "buffer";
|
|
7670
7670
|
import * as vs from "zlib";
|
|
7671
|
-
import
|
|
7671
|
+
import Qr from "zlib";
|
|
7672
7672
|
import { posix as Zt } from "node:path";
|
|
7673
7673
|
import { basename as Sn } from "node:path";
|
|
7674
7674
|
import ui from "fs";
|
|
@@ -7676,7 +7676,7 @@ import $ from "fs";
|
|
|
7676
7676
|
import Xs from "path";
|
|
7677
7677
|
import { win32 as Cn } from "node:path";
|
|
7678
7678
|
import rr from "path";
|
|
7679
|
-
import
|
|
7679
|
+
import kr from "node:fs";
|
|
7680
7680
|
import ro from "node:assert";
|
|
7681
7681
|
import { randomBytes as Cr } from "node:crypto";
|
|
7682
7682
|
import u from "node:fs";
|
|
@@ -7684,12 +7684,12 @@ import R from "node:path";
|
|
|
7684
7684
|
import fr from "fs";
|
|
7685
7685
|
import Ei from "node:fs";
|
|
7686
7686
|
import we from "node:path";
|
|
7687
|
-
import
|
|
7688
|
-
import
|
|
7687
|
+
import F from "node:fs";
|
|
7688
|
+
import Jn from "node:fs/promises";
|
|
7689
7689
|
import wi from "node:path";
|
|
7690
|
-
import { join as
|
|
7690
|
+
import { join as br } from "node:path";
|
|
7691
7691
|
import v from "node:fs";
|
|
7692
|
-
import
|
|
7692
|
+
import Fr from "node:path";
|
|
7693
7693
|
var vr = Object.defineProperty;
|
|
7694
7694
|
var Mr = (s3, t) => {
|
|
7695
7695
|
for (var e in t) vr(s3, e, { get: t[e], enumerable: true });
|
|
@@ -7699,42 +7699,42 @@ var Pr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanc
|
|
|
7699
7699
|
var zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Li && typeof s3.pipe == "function" && s3.pipe !== Ds.Writable.prototype.pipe;
|
|
7700
7700
|
var Ur = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Li && typeof s3.write == "function" && typeof s3.end == "function";
|
|
7701
7701
|
var q = /* @__PURE__ */ Symbol("EOF");
|
|
7702
|
-
var
|
|
7702
|
+
var Q = /* @__PURE__ */ Symbol("maybeEmitEnd");
|
|
7703
7703
|
var rt = /* @__PURE__ */ Symbol("emittedEnd");
|
|
7704
7704
|
var Ne = /* @__PURE__ */ Symbol("emittingEnd");
|
|
7705
|
-
var
|
|
7705
|
+
var Qt = /* @__PURE__ */ Symbol("emittedError");
|
|
7706
7706
|
var De = /* @__PURE__ */ Symbol("closed");
|
|
7707
7707
|
var xs = /* @__PURE__ */ Symbol("read");
|
|
7708
7708
|
var Ae = /* @__PURE__ */ Symbol("flush");
|
|
7709
7709
|
var Ls = /* @__PURE__ */ Symbol("flushChunk");
|
|
7710
7710
|
var z = /* @__PURE__ */ Symbol("encoding");
|
|
7711
7711
|
var Mt = /* @__PURE__ */ Symbol("decoder");
|
|
7712
|
-
var
|
|
7713
|
-
var
|
|
7712
|
+
var g = /* @__PURE__ */ Symbol("flowing");
|
|
7713
|
+
var Jt = /* @__PURE__ */ Symbol("paused");
|
|
7714
7714
|
var Bt = /* @__PURE__ */ Symbol("resume");
|
|
7715
|
-
var
|
|
7715
|
+
var b = /* @__PURE__ */ Symbol("buffer");
|
|
7716
7716
|
var D = /* @__PURE__ */ Symbol("pipes");
|
|
7717
7717
|
var _ = /* @__PURE__ */ Symbol("bufferLength");
|
|
7718
|
-
var
|
|
7718
|
+
var gi = /* @__PURE__ */ Symbol("bufferPush");
|
|
7719
7719
|
var Ie = /* @__PURE__ */ Symbol("bufferShift");
|
|
7720
7720
|
var L = /* @__PURE__ */ Symbol("objectMode");
|
|
7721
7721
|
var w = /* @__PURE__ */ Symbol("destroyed");
|
|
7722
|
-
var
|
|
7722
|
+
var bi = /* @__PURE__ */ Symbol("error");
|
|
7723
7723
|
var _i = /* @__PURE__ */ Symbol("emitData");
|
|
7724
7724
|
var Ns = /* @__PURE__ */ Symbol("emitEnd");
|
|
7725
7725
|
var Oi = /* @__PURE__ */ Symbol("emitEnd2");
|
|
7726
7726
|
var Z = /* @__PURE__ */ Symbol("async");
|
|
7727
7727
|
var Ti = /* @__PURE__ */ Symbol("abort");
|
|
7728
7728
|
var Ce = /* @__PURE__ */ Symbol("aborted");
|
|
7729
|
-
var
|
|
7730
|
-
var
|
|
7729
|
+
var jt = /* @__PURE__ */ Symbol("signal");
|
|
7730
|
+
var Rt = /* @__PURE__ */ Symbol("dataListeners");
|
|
7731
7731
|
var C = /* @__PURE__ */ Symbol("discarded");
|
|
7732
7732
|
var te = (s3) => Promise.resolve().then(s3);
|
|
7733
7733
|
var Hr = (s3) => s3();
|
|
7734
7734
|
var Wr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
|
|
7735
7735
|
var Gr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
|
|
7736
7736
|
var Zr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
|
|
7737
|
-
var
|
|
7737
|
+
var ke = class {
|
|
7738
7738
|
src;
|
|
7739
7739
|
dest;
|
|
7740
7740
|
opts;
|
|
@@ -7751,7 +7751,7 @@ var Fe = class {
|
|
|
7751
7751
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
7752
7752
|
}
|
|
7753
7753
|
};
|
|
7754
|
-
var xi = class extends
|
|
7754
|
+
var xi = class extends ke {
|
|
7755
7755
|
unpipe() {
|
|
7756
7756
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
7757
7757
|
}
|
|
@@ -7762,10 +7762,10 @@ var xi = class extends Fe {
|
|
|
7762
7762
|
var Yr = (s3) => !!s3.objectMode;
|
|
7763
7763
|
var Kr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
|
|
7764
7764
|
var A = class extends Li {
|
|
7765
|
-
[
|
|
7766
|
-
[
|
|
7765
|
+
[g] = false;
|
|
7766
|
+
[Jt] = false;
|
|
7767
7767
|
[D] = [];
|
|
7768
|
-
[
|
|
7768
|
+
[b] = [];
|
|
7769
7769
|
[L];
|
|
7770
7770
|
[z];
|
|
7771
7771
|
[Z];
|
|
@@ -7774,21 +7774,21 @@ var A = class extends Li {
|
|
|
7774
7774
|
[rt] = false;
|
|
7775
7775
|
[Ne] = false;
|
|
7776
7776
|
[De] = false;
|
|
7777
|
-
[
|
|
7777
|
+
[Qt] = null;
|
|
7778
7778
|
[_] = 0;
|
|
7779
7779
|
[w] = false;
|
|
7780
|
-
[
|
|
7780
|
+
[jt];
|
|
7781
7781
|
[Ce] = false;
|
|
7782
|
-
[
|
|
7782
|
+
[Rt] = 0;
|
|
7783
7783
|
[C] = false;
|
|
7784
7784
|
writable = true;
|
|
7785
7785
|
readable = true;
|
|
7786
7786
|
constructor(...t) {
|
|
7787
7787
|
let e = t[0] || {};
|
|
7788
7788
|
if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
|
|
7789
|
-
Yr(e) ? (this[L] = true, this[z] = null) : Kr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new Br(this[z]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[
|
|
7789
|
+
Yr(e) ? (this[L] = true, this[z] = null) : Kr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new Br(this[z]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[b] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[D] });
|
|
7790
7790
|
let { signal: i } = e;
|
|
7791
|
-
i && (this[
|
|
7791
|
+
i && (this[jt] = i, i.aborted ? this[Ti]() : i.addEventListener("abort", () => this[Ti]()));
|
|
7792
7792
|
}
|
|
7793
7793
|
get bufferLength() {
|
|
7794
7794
|
return this[_];
|
|
@@ -7815,7 +7815,7 @@ var A = class extends Li {
|
|
|
7815
7815
|
this[Z] = this[Z] || !!t;
|
|
7816
7816
|
}
|
|
7817
7817
|
[Ti]() {
|
|
7818
|
-
this[Ce] = true, this.emit("abort", this[
|
|
7818
|
+
this[Ce] = true, this.emit("abort", this[jt]?.reason), this.destroy(this[jt]?.reason);
|
|
7819
7819
|
}
|
|
7820
7820
|
get aborted() {
|
|
7821
7821
|
return this[Ce];
|
|
@@ -7833,80 +7833,80 @@ var A = class extends Li {
|
|
|
7833
7833
|
else if (Gr(t)) t = Buffer.from(t);
|
|
7834
7834
|
else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
|
|
7835
7835
|
}
|
|
7836
|
-
return this[L] ? (this[
|
|
7836
|
+
return this[L] ? (this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[gi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : t.length ? (typeof t == "string" && !(e === this[z] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z] && (t = this[Mt].write(t)), this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[gi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[g]);
|
|
7837
7837
|
}
|
|
7838
7838
|
read(t) {
|
|
7839
7839
|
if (this[w]) return null;
|
|
7840
|
-
if (this[C] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[
|
|
7841
|
-
this[L] && (t = null), this[
|
|
7842
|
-
let e = this[xs](t || null, this[
|
|
7843
|
-
return this[
|
|
7840
|
+
if (this[C] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[Q](), null;
|
|
7841
|
+
this[L] && (t = null), this[b].length > 1 && !this[L] && (this[b] = [this[z] ? this[b].join("") : Buffer.concat(this[b], this[_])]);
|
|
7842
|
+
let e = this[xs](t || null, this[b][0]);
|
|
7843
|
+
return this[Q](), e;
|
|
7844
7844
|
}
|
|
7845
7845
|
[xs](t, e) {
|
|
7846
7846
|
if (this[L]) this[Ie]();
|
|
7847
7847
|
else {
|
|
7848
7848
|
let i = e;
|
|
7849
|
-
t === i.length || t === null ? this[Ie]() : typeof i == "string" ? (this[
|
|
7849
|
+
t === i.length || t === null ? this[Ie]() : typeof i == "string" ? (this[b][0] = i.slice(t), e = i.slice(0, t), this[_] -= t) : (this[b][0] = i.subarray(t), e = i.subarray(0, t), this[_] -= t);
|
|
7850
7850
|
}
|
|
7851
|
-
return this.emit("data", e), !this[
|
|
7851
|
+
return this.emit("data", e), !this[b].length && !this[q] && this.emit("drain"), e;
|
|
7852
7852
|
}
|
|
7853
7853
|
end(t, e, i) {
|
|
7854
|
-
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = "utf8"), t !== void 0 && this.write(t, e), i && this.once("end", i), this[q] = true, this.writable = false, (this[
|
|
7854
|
+
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = "utf8"), t !== void 0 && this.write(t, e), i && this.once("end", i), this[q] = true, this.writable = false, (this[g] || !this[Jt]) && this[Q](), this;
|
|
7855
7855
|
}
|
|
7856
7856
|
[Bt]() {
|
|
7857
|
-
this[w] || (!this[
|
|
7857
|
+
this[w] || (!this[Rt] && !this[D].length && (this[C] = true), this[Jt] = false, this[g] = true, this.emit("resume"), this[b].length ? this[Ae]() : this[q] ? this[Q]() : this.emit("drain"));
|
|
7858
7858
|
}
|
|
7859
7859
|
resume() {
|
|
7860
7860
|
return this[Bt]();
|
|
7861
7861
|
}
|
|
7862
7862
|
pause() {
|
|
7863
|
-
this[
|
|
7863
|
+
this[g] = false, this[Jt] = true, this[C] = false;
|
|
7864
7864
|
}
|
|
7865
7865
|
get destroyed() {
|
|
7866
7866
|
return this[w];
|
|
7867
7867
|
}
|
|
7868
7868
|
get flowing() {
|
|
7869
|
-
return this[
|
|
7869
|
+
return this[g];
|
|
7870
7870
|
}
|
|
7871
7871
|
get paused() {
|
|
7872
|
-
return this[
|
|
7872
|
+
return this[Jt];
|
|
7873
7873
|
}
|
|
7874
|
-
[
|
|
7875
|
-
this[L] ? this[_] += 1 : this[_] += t.length, this[
|
|
7874
|
+
[gi](t) {
|
|
7875
|
+
this[L] ? this[_] += 1 : this[_] += t.length, this[b].push(t);
|
|
7876
7876
|
}
|
|
7877
7877
|
[Ie]() {
|
|
7878
|
-
return this[L] ? this[_] -= 1 : this[_] -= this[
|
|
7878
|
+
return this[L] ? this[_] -= 1 : this[_] -= this[b][0].length, this[b].shift();
|
|
7879
7879
|
}
|
|
7880
7880
|
[Ae](t = false) {
|
|
7881
7881
|
do
|
|
7882
7882
|
;
|
|
7883
|
-
while (this[Ls](this[Ie]()) && this[
|
|
7884
|
-
!t && !this[
|
|
7883
|
+
while (this[Ls](this[Ie]()) && this[b].length);
|
|
7884
|
+
!t && !this[b].length && !this[q] && this.emit("drain");
|
|
7885
7885
|
}
|
|
7886
7886
|
[Ls](t) {
|
|
7887
|
-
return this.emit("data", t), this[
|
|
7887
|
+
return this.emit("data", t), this[g];
|
|
7888
7888
|
}
|
|
7889
7889
|
pipe(t, e) {
|
|
7890
7890
|
if (this[w]) return t;
|
|
7891
7891
|
this[C] = false;
|
|
7892
7892
|
let i = this[rt];
|
|
7893
|
-
return e = e || {}, t === Ts.stdout || t === Ts.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[D].push(e.proxyErrors ? new xi(this, t, e) : new
|
|
7893
|
+
return e = e || {}, t === Ts.stdout || t === Ts.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[D].push(e.proxyErrors ? new xi(this, t, e) : new ke(this, t, e)), this[Z] ? te(() => this[Bt]()) : this[Bt]()), t;
|
|
7894
7894
|
}
|
|
7895
7895
|
unpipe(t) {
|
|
7896
7896
|
let e = this[D].find((i) => i.dest === t);
|
|
7897
|
-
e && (this[D].length === 1 ? (this[
|
|
7897
|
+
e && (this[D].length === 1 ? (this[g] && this[Rt] === 0 && (this[g] = false), this[D] = []) : this[D].splice(this[D].indexOf(e), 1), e.unpipe());
|
|
7898
7898
|
}
|
|
7899
7899
|
addListener(t, e) {
|
|
7900
7900
|
return this.on(t, e);
|
|
7901
7901
|
}
|
|
7902
7902
|
on(t, e) {
|
|
7903
7903
|
let i = super.on(t, e);
|
|
7904
|
-
if (t === "data") this[C] = false, this[
|
|
7904
|
+
if (t === "data") this[C] = false, this[Rt]++, !this[D].length && !this[g] && this[Bt]();
|
|
7905
7905
|
else if (t === "readable" && this[_] !== 0) super.emit("readable");
|
|
7906
7906
|
else if (Wr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
|
|
7907
|
-
else if (t === "error" && this[
|
|
7907
|
+
else if (t === "error" && this[Qt]) {
|
|
7908
7908
|
let r = e;
|
|
7909
|
-
this[Z] ? te(() => r.call(this, this[
|
|
7909
|
+
this[Z] ? te(() => r.call(this, this[Qt])) : r.call(this, this[Qt]);
|
|
7910
7910
|
}
|
|
7911
7911
|
return i;
|
|
7912
7912
|
}
|
|
@@ -7915,17 +7915,17 @@ var A = class extends Li {
|
|
|
7915
7915
|
}
|
|
7916
7916
|
off(t, e) {
|
|
7917
7917
|
let i = super.off(t, e);
|
|
7918
|
-
return t === "data" && (this[
|
|
7918
|
+
return t === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[C] && !this[D].length && (this[g] = false)), i;
|
|
7919
7919
|
}
|
|
7920
7920
|
removeAllListeners(t) {
|
|
7921
7921
|
let e = super.removeAllListeners(t);
|
|
7922
|
-
return (t === "data" || t === void 0) && (this[
|
|
7922
|
+
return (t === "data" || t === void 0) && (this[Rt] = 0, !this[C] && !this[D].length && (this[g] = false)), e;
|
|
7923
7923
|
}
|
|
7924
7924
|
get emittedEnd() {
|
|
7925
7925
|
return this[rt];
|
|
7926
7926
|
}
|
|
7927
|
-
[
|
|
7928
|
-
!this[Ne] && !this[rt] && !this[w] && this[
|
|
7927
|
+
[Q]() {
|
|
7928
|
+
!this[Ne] && !this[rt] && !this[w] && this[b].length === 0 && this[q] && (this[Ne] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[De] && this.emit("close"), this[Ne] = false);
|
|
7929
7929
|
}
|
|
7930
7930
|
emit(t, ...e) {
|
|
7931
7931
|
let i = e[0];
|
|
@@ -7937,23 +7937,23 @@ var A = class extends Li {
|
|
|
7937
7937
|
let n = super.emit("close");
|
|
7938
7938
|
return this.removeAllListeners("close"), n;
|
|
7939
7939
|
} else if (t === "error") {
|
|
7940
|
-
this[
|
|
7941
|
-
let n = !this[
|
|
7942
|
-
return this[
|
|
7940
|
+
this[Qt] = i, super.emit(bi, i);
|
|
7941
|
+
let n = !this[jt] || this.listeners("error").length ? super.emit("error", i) : false;
|
|
7942
|
+
return this[Q](), n;
|
|
7943
7943
|
} else if (t === "resume") {
|
|
7944
7944
|
let n = super.emit("resume");
|
|
7945
|
-
return this[
|
|
7945
|
+
return this[Q](), n;
|
|
7946
7946
|
} else if (t === "finish" || t === "prefinish") {
|
|
7947
7947
|
let n = super.emit(t);
|
|
7948
7948
|
return this.removeAllListeners(t), n;
|
|
7949
7949
|
}
|
|
7950
7950
|
let r = super.emit(t, ...e);
|
|
7951
|
-
return this[
|
|
7951
|
+
return this[Q](), r;
|
|
7952
7952
|
}
|
|
7953
7953
|
[_i](t) {
|
|
7954
7954
|
for (let i of this[D]) i.dest.write(t) === false && this.pause();
|
|
7955
7955
|
let e = this[C] ? false : super.emit("data", t);
|
|
7956
|
-
return this[
|
|
7956
|
+
return this[Q](), e;
|
|
7957
7957
|
}
|
|
7958
7958
|
[Ns]() {
|
|
7959
7959
|
return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[Oi]()), true) : this[Oi]());
|
|
@@ -8013,19 +8013,19 @@ var A = class extends Li {
|
|
|
8013
8013
|
}
|
|
8014
8014
|
[Symbol.iterator]() {
|
|
8015
8015
|
this[C] = false;
|
|
8016
|
-
let t = false, e = () => (this.pause(), this.off(
|
|
8016
|
+
let t = false, e = () => (this.pause(), this.off(bi, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
|
|
8017
8017
|
if (t) return e();
|
|
8018
8018
|
let r = this.read();
|
|
8019
8019
|
return r === null ? e() : { done: false, value: r };
|
|
8020
8020
|
};
|
|
8021
|
-
return this.once("end", e), this.once(
|
|
8021
|
+
return this.once("end", e), this.once(bi, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
|
|
8022
8022
|
return this;
|
|
8023
8023
|
}, [Symbol.dispose]: () => {
|
|
8024
8024
|
} };
|
|
8025
8025
|
}
|
|
8026
8026
|
destroy(t) {
|
|
8027
8027
|
if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
|
|
8028
|
-
this[w] = true, this[C] = true, this[
|
|
8028
|
+
this[w] = true, this[C] = true, this[b].length = 0, this[_] = 0;
|
|
8029
8029
|
let e = this;
|
|
8030
8030
|
return typeof e.close == "function" && !this[De] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
|
|
8031
8031
|
}
|
|
@@ -8039,12 +8039,12 @@ var H = /* @__PURE__ */ Symbol("_close");
|
|
|
8039
8039
|
var ee = /* @__PURE__ */ Symbol("_ended");
|
|
8040
8040
|
var m = /* @__PURE__ */ Symbol("_fd");
|
|
8041
8041
|
var Ni = /* @__PURE__ */ Symbol("_finished");
|
|
8042
|
-
var
|
|
8042
|
+
var j = /* @__PURE__ */ Symbol("_flags");
|
|
8043
8043
|
var Di = /* @__PURE__ */ Symbol("_flush");
|
|
8044
|
-
var
|
|
8045
|
-
var
|
|
8044
|
+
var ki = /* @__PURE__ */ Symbol("_handleChunk");
|
|
8045
|
+
var Fi = /* @__PURE__ */ Symbol("_makeBuf");
|
|
8046
8046
|
var se = /* @__PURE__ */ Symbol("_mode");
|
|
8047
|
-
var
|
|
8047
|
+
var Fe = /* @__PURE__ */ Symbol("_needDrain");
|
|
8048
8048
|
var Ut = /* @__PURE__ */ Symbol("_onerror");
|
|
8049
8049
|
var Ht = /* @__PURE__ */ Symbol("_onopen");
|
|
8050
8050
|
var Ai = /* @__PURE__ */ Symbol("_onread");
|
|
@@ -8055,25 +8055,25 @@ var nt = /* @__PURE__ */ Symbol("_pos");
|
|
|
8055
8055
|
var Y = /* @__PURE__ */ Symbol("_queue");
|
|
8056
8056
|
var zt = /* @__PURE__ */ Symbol("_read");
|
|
8057
8057
|
var Ii = /* @__PURE__ */ Symbol("_readSize");
|
|
8058
|
-
var
|
|
8058
|
+
var J = /* @__PURE__ */ Symbol("_reading");
|
|
8059
8059
|
var ie = /* @__PURE__ */ Symbol("_remain");
|
|
8060
8060
|
var Ci = /* @__PURE__ */ Symbol("_size");
|
|
8061
8061
|
var ve = /* @__PURE__ */ Symbol("_write");
|
|
8062
|
-
var
|
|
8062
|
+
var gt = /* @__PURE__ */ Symbol("_writing");
|
|
8063
8063
|
var Me = /* @__PURE__ */ Symbol("_defaultFlag");
|
|
8064
8064
|
var bt = /* @__PURE__ */ Symbol("_errored");
|
|
8065
|
-
var
|
|
8065
|
+
var _t = class extends A {
|
|
8066
8066
|
[bt] = false;
|
|
8067
8067
|
[m];
|
|
8068
8068
|
[U];
|
|
8069
8069
|
[Ii];
|
|
8070
|
-
[
|
|
8070
|
+
[J] = false;
|
|
8071
8071
|
[Ci];
|
|
8072
8072
|
[ie];
|
|
8073
8073
|
[ot];
|
|
8074
8074
|
constructor(t, e) {
|
|
8075
8075
|
if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
|
|
8076
|
-
this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ii] = e.readSize || 16 * 1024 * 1024, this[
|
|
8076
|
+
this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ii] = e.readSize || 16 * 1024 * 1024, this[J] = false, this[Ci] = typeof e.size == "number" ? e.size : 1 / 0, this[ie] = this[Ci], this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht]();
|
|
8077
8077
|
}
|
|
8078
8078
|
get fd() {
|
|
8079
8079
|
return this[m];
|
|
@@ -8093,19 +8093,19 @@ var gt = class extends A {
|
|
|
8093
8093
|
[Ht](t, e) {
|
|
8094
8094
|
t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
|
|
8095
8095
|
}
|
|
8096
|
-
[
|
|
8096
|
+
[Fi]() {
|
|
8097
8097
|
return Buffer.allocUnsafe(Math.min(this[Ii], this[ie]));
|
|
8098
8098
|
}
|
|
8099
8099
|
[zt]() {
|
|
8100
|
-
if (!this[
|
|
8101
|
-
this[
|
|
8102
|
-
let t = this[
|
|
8100
|
+
if (!this[J]) {
|
|
8101
|
+
this[J] = true;
|
|
8102
|
+
let t = this[Fi]();
|
|
8103
8103
|
if (t.length === 0) return process.nextTick(() => this[Ai](null, 0, t));
|
|
8104
8104
|
I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ai](e, i, r));
|
|
8105
8105
|
}
|
|
8106
8106
|
}
|
|
8107
8107
|
[Ai](t, e, i) {
|
|
8108
|
-
this[
|
|
8108
|
+
this[J] = false, t ? this[Ut](t) : this[ki](e, i) && this[zt]();
|
|
8109
8109
|
}
|
|
8110
8110
|
[H]() {
|
|
8111
8111
|
if (this[ot] && typeof this[m] == "number") {
|
|
@@ -8114,9 +8114,9 @@ var gt = class extends A {
|
|
|
8114
8114
|
}
|
|
8115
8115
|
}
|
|
8116
8116
|
[Ut](t) {
|
|
8117
|
-
this[
|
|
8117
|
+
this[J] = true, this[H](), this.emit("error", t);
|
|
8118
8118
|
}
|
|
8119
|
-
[
|
|
8119
|
+
[ki](t, e) {
|
|
8120
8120
|
let i = false;
|
|
8121
8121
|
return this[ie] -= t, t > 0 && (i = super.write(t < e.length ? e.subarray(0, t) : e)), (t === 0 || this[ie] <= 0) && (i = false, this[H](), super.end()), i;
|
|
8122
8122
|
}
|
|
@@ -8134,7 +8134,7 @@ var gt = class extends A {
|
|
|
8134
8134
|
}
|
|
8135
8135
|
}
|
|
8136
8136
|
};
|
|
8137
|
-
var Be = class extends
|
|
8137
|
+
var Be = class extends _t {
|
|
8138
8138
|
[ht]() {
|
|
8139
8139
|
let t = true;
|
|
8140
8140
|
try {
|
|
@@ -8146,13 +8146,13 @@ var Be = class extends gt {
|
|
|
8146
8146
|
[zt]() {
|
|
8147
8147
|
let t = true;
|
|
8148
8148
|
try {
|
|
8149
|
-
if (!this[
|
|
8150
|
-
this[
|
|
8149
|
+
if (!this[J]) {
|
|
8150
|
+
this[J] = true;
|
|
8151
8151
|
do {
|
|
8152
|
-
let e = this[
|
|
8153
|
-
if (!this[
|
|
8152
|
+
let e = this[Fi](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
|
|
8153
|
+
if (!this[ki](i, e)) break;
|
|
8154
8154
|
} while (true);
|
|
8155
|
-
this[
|
|
8155
|
+
this[J] = false;
|
|
8156
8156
|
}
|
|
8157
8157
|
t = false;
|
|
8158
8158
|
} finally {
|
|
@@ -8170,22 +8170,22 @@ var tt2 = class extends Vr {
|
|
|
8170
8170
|
readable = false;
|
|
8171
8171
|
writable = true;
|
|
8172
8172
|
[bt] = false;
|
|
8173
|
-
[
|
|
8173
|
+
[gt] = false;
|
|
8174
8174
|
[ee] = false;
|
|
8175
8175
|
[Y] = [];
|
|
8176
|
-
[
|
|
8176
|
+
[Fe] = false;
|
|
8177
8177
|
[U];
|
|
8178
8178
|
[se];
|
|
8179
8179
|
[ot];
|
|
8180
8180
|
[m];
|
|
8181
8181
|
[Me];
|
|
8182
|
-
[
|
|
8182
|
+
[j];
|
|
8183
8183
|
[Ni] = false;
|
|
8184
8184
|
[nt];
|
|
8185
8185
|
constructor(t, e) {
|
|
8186
8186
|
e = e || {}, super(e), this[U] = t, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[se] = e.mode === void 0 ? 438 : e.mode, this[nt] = typeof e.start == "number" ? e.start : void 0, this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true;
|
|
8187
8187
|
let i = this[nt] !== void 0 ? "r+" : "w";
|
|
8188
|
-
this[Me] = e.flags === void 0, this[
|
|
8188
|
+
this[Me] = e.flags === void 0, this[j] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
|
|
8189
8189
|
}
|
|
8190
8190
|
emit(t, ...e) {
|
|
8191
8191
|
if (t === "error") {
|
|
@@ -8201,25 +8201,25 @@ var tt2 = class extends Vr {
|
|
|
8201
8201
|
return this[U];
|
|
8202
8202
|
}
|
|
8203
8203
|
[Ut](t) {
|
|
8204
|
-
this[H](), this[
|
|
8204
|
+
this[H](), this[gt] = true, this.emit("error", t);
|
|
8205
8205
|
}
|
|
8206
8206
|
[ht]() {
|
|
8207
|
-
I.open(this[U], this[
|
|
8207
|
+
I.open(this[U], this[j], this[se], (t, e) => this[Ht](t, e));
|
|
8208
8208
|
}
|
|
8209
8209
|
[Ht](t, e) {
|
|
8210
|
-
this[Me] && this[
|
|
8210
|
+
this[Me] && this[j] === "r+" && t && t.code === "ENOENT" ? (this[j] = "w", this[ht]()) : t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[gt] || this[Di]());
|
|
8211
8211
|
}
|
|
8212
8212
|
end(t, e) {
|
|
8213
|
-
return t && this.write(t, e), this[ee] = true, !this[
|
|
8213
|
+
return t && this.write(t, e), this[ee] = true, !this[gt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
|
|
8214
8214
|
}
|
|
8215
8215
|
write(t, e) {
|
|
8216
|
-
return typeof t == "string" && (t = Buffer.from(t, e)), this[ee] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[
|
|
8216
|
+
return typeof t == "string" && (t = Buffer.from(t, e)), this[ee] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[gt] || this[Y].length ? (this[Y].push(t), this[Fe] = true, false) : (this[gt] = true, this[ve](t), true);
|
|
8217
8217
|
}
|
|
8218
8218
|
[ve](t) {
|
|
8219
8219
|
I.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
|
|
8220
8220
|
}
|
|
8221
8221
|
[Pt](t, e) {
|
|
8222
|
-
t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Di]() : (this[
|
|
8222
|
+
t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Di]() : (this[gt] = false, this[ee] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[Fe] && (this[Fe] = false, this.emit("drain"))));
|
|
8223
8223
|
}
|
|
8224
8224
|
[Di]() {
|
|
8225
8225
|
if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
|
|
@@ -8239,13 +8239,13 @@ var tt2 = class extends Vr {
|
|
|
8239
8239
|
var Wt = class extends tt2 {
|
|
8240
8240
|
[ht]() {
|
|
8241
8241
|
let t;
|
|
8242
|
-
if (this[Me] && this[
|
|
8243
|
-
t = I.openSync(this[U], this[
|
|
8242
|
+
if (this[Me] && this[j] === "r+") try {
|
|
8243
|
+
t = I.openSync(this[U], this[j], this[se]);
|
|
8244
8244
|
} catch (e) {
|
|
8245
|
-
if (e?.code === "ENOENT") return this[
|
|
8245
|
+
if (e?.code === "ENOENT") return this[j] = "w", this[ht]();
|
|
8246
8246
|
throw e;
|
|
8247
8247
|
}
|
|
8248
|
-
else t = I.openSync(this[U], this[
|
|
8248
|
+
else t = I.openSync(this[U], this[j], this[se]);
|
|
8249
8249
|
this[Ht](null, t);
|
|
8250
8250
|
}
|
|
8251
8251
|
[H]() {
|
|
@@ -8270,8 +8270,8 @@ var Xr = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["
|
|
|
8270
8270
|
var As = (s3) => !!s3.sync && !!s3.file;
|
|
8271
8271
|
var Is = (s3) => !s3.sync && !!s3.file;
|
|
8272
8272
|
var Cs = (s3) => !!s3.sync && !s3.file;
|
|
8273
|
-
var
|
|
8274
|
-
var
|
|
8273
|
+
var ks = (s3) => !s3.sync && !s3.file;
|
|
8274
|
+
var Fs = (s3) => !!s3.file;
|
|
8275
8275
|
var qr = (s3) => {
|
|
8276
8276
|
let t = Xr.get(s3);
|
|
8277
8277
|
return t || s3;
|
|
@@ -8297,22 +8297,22 @@ var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
|
|
|
8297
8297
|
} else if (Cs(a)) {
|
|
8298
8298
|
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
8299
8299
|
return e(a, o);
|
|
8300
|
-
} else if (
|
|
8300
|
+
} else if (ks(a)) {
|
|
8301
8301
|
if (typeof h == "function") throw new TypeError("callback only supported with file option");
|
|
8302
8302
|
return i(a, o);
|
|
8303
8303
|
}
|
|
8304
8304
|
throw new Error("impossible options??");
|
|
8305
8305
|
}, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
|
|
8306
|
-
var
|
|
8307
|
-
var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 },
|
|
8308
|
-
var
|
|
8309
|
-
var Ms = Object.getOwnPropertyDescriptor(
|
|
8306
|
+
var Jr = Qr.constants || { ZLIB_VERNUM: 4736 };
|
|
8307
|
+
var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, Jr));
|
|
8308
|
+
var jr = Ot.concat;
|
|
8309
|
+
var Ms = Object.getOwnPropertyDescriptor(Ot, "concat");
|
|
8310
8310
|
var tn = (s3) => s3;
|
|
8311
8311
|
var Mi = Ms?.writable === true || Ms?.set !== void 0 ? (s3) => {
|
|
8312
|
-
|
|
8312
|
+
Ot.concat = s3 ? tn : jr;
|
|
8313
8313
|
} : (s3) => {
|
|
8314
8314
|
};
|
|
8315
|
-
var
|
|
8315
|
+
var Tt = /* @__PURE__ */ Symbol("_superWrite");
|
|
8316
8316
|
var Gt = class extends Error {
|
|
8317
8317
|
code;
|
|
8318
8318
|
errno;
|
|
@@ -8360,7 +8360,7 @@ var ne = class extends A {
|
|
|
8360
8360
|
if (!this.#t) return Pi(this.#e, "zlib binding closed"), this.#e.reset?.();
|
|
8361
8361
|
}
|
|
8362
8362
|
flush(t) {
|
|
8363
|
-
this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(
|
|
8363
|
+
this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(Ot.alloc(0), { [Bi]: t })));
|
|
8364
8364
|
}
|
|
8365
8365
|
end(t, e, i) {
|
|
8366
8366
|
return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), t && (e ? this.write(t, e) : this.write(t)), this.flush(this.#n), this.#i = true, super.end(i);
|
|
@@ -8368,11 +8368,11 @@ var ne = class extends A {
|
|
|
8368
8368
|
get ended() {
|
|
8369
8369
|
return this.#i;
|
|
8370
8370
|
}
|
|
8371
|
-
[
|
|
8371
|
+
[Tt](t) {
|
|
8372
8372
|
return super.write(t);
|
|
8373
8373
|
}
|
|
8374
8374
|
write(t, e, i) {
|
|
8375
|
-
if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t =
|
|
8375
|
+
if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = Ot.from(t, e)), this.#t) return;
|
|
8376
8376
|
Pi(this.#e, "zlib binding closed");
|
|
8377
8377
|
let r = this.#e._handle, n = r.close;
|
|
8378
8378
|
r.close = () => {
|
|
@@ -8393,9 +8393,9 @@ var ne = class extends A {
|
|
|
8393
8393
|
let a;
|
|
8394
8394
|
if (h) if (Array.isArray(h) && h.length > 0) {
|
|
8395
8395
|
let l = h[0];
|
|
8396
|
-
a = this[
|
|
8397
|
-
for (let c = 1; c < h.length; c++) a = this[
|
|
8398
|
-
} else a = this[
|
|
8396
|
+
a = this[Tt](Ot.from(l));
|
|
8397
|
+
for (let c = 1; c < h.length; c++) a = this[Tt](h[c]);
|
|
8398
|
+
} else a = this[Tt](Ot.from(h));
|
|
8399
8399
|
return i && i(), a;
|
|
8400
8400
|
}
|
|
8401
8401
|
};
|
|
@@ -8430,8 +8430,8 @@ var ze = class extends Pe {
|
|
|
8430
8430
|
constructor(t) {
|
|
8431
8431
|
super(t, "Gzip"), this.#t = t && !!t.portable;
|
|
8432
8432
|
}
|
|
8433
|
-
[
|
|
8434
|
-
return this.#t ? (this.#t = false, t[9] = 255, super[
|
|
8433
|
+
[Tt](t) {
|
|
8434
|
+
return this.#t ? (this.#t = false, t[9] = 255, super[Tt](t)) : super[Tt](t);
|
|
8435
8435
|
}
|
|
8436
8436
|
};
|
|
8437
8437
|
var Ue = class extends Pe {
|
|
@@ -8515,7 +8515,7 @@ var oe = (s3) => he.has(s3);
|
|
|
8515
8515
|
var an = (s3) => Ve.has(s3);
|
|
8516
8516
|
var he = /* @__PURE__ */ new Map([["0", "File"], ["", "OldFile"], ["1", "Link"], ["2", "SymbolicLink"], ["3", "CharacterDevice"], ["4", "BlockDevice"], ["5", "Directory"], ["6", "FIFO"], ["7", "ContiguousFile"], ["g", "GlobalExtendedHeader"], ["x", "ExtendedHeader"], ["A", "SolarisACL"], ["D", "GNUDumpDir"], ["I", "Inode"], ["K", "NextFileHasLongLinkpath"], ["L", "NextFileHasLongPath"], ["M", "ContinuationFile"], ["N", "OldGnuLongPath"], ["S", "SparseFile"], ["V", "TapeVolumeHeader"], ["X", "OldExtendedHeader"]]);
|
|
8517
8517
|
var Ve = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
|
|
8518
|
-
var
|
|
8518
|
+
var k = class {
|
|
8519
8519
|
cksumValid = false;
|
|
8520
8520
|
needPax = false;
|
|
8521
8521
|
nullBlock = false;
|
|
@@ -8542,13 +8542,13 @@ var F = class {
|
|
|
8542
8542
|
}
|
|
8543
8543
|
decode(t, e, i, r) {
|
|
8544
8544
|
if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
8545
|
-
this.path = i?.path ??
|
|
8546
|
-
let n =
|
|
8547
|
-
if (oe(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath =
|
|
8548
|
-
let h =
|
|
8545
|
+
this.path = i?.path ?? xt(t, e, 100), this.mode = i?.mode ?? r?.mode ?? at(t, e + 100, 8), this.uid = i?.uid ?? r?.uid ?? at(t, e + 108, 8), this.gid = i?.gid ?? r?.gid ?? at(t, e + 116, 8), this.size = i?.size ?? r?.size ?? at(t, e + 124, 12), this.mtime = i?.mtime ?? r?.mtime ?? Ui(t, e + 136, 12), this.cksum = at(t, e + 148, 12), r && this.#i(r, true), i && this.#i(i);
|
|
8546
|
+
let n = xt(t, e + 156, 1);
|
|
8547
|
+
if (oe(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = xt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = i?.uname ?? r?.uname ?? xt(t, e + 265, 32), this.gname = i?.gname ?? r?.gname ?? xt(t, e + 297, 32), this.devmaj = i?.devmaj ?? r?.devmaj ?? at(t, e + 329, 8) ?? 0, this.devmin = i?.devmin ?? r?.devmin ?? at(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
|
|
8548
|
+
let h = xt(t, e + 345, 155);
|
|
8549
8549
|
this.path = h + "/" + this.path;
|
|
8550
8550
|
} else {
|
|
8551
|
-
let h =
|
|
8551
|
+
let h = xt(t, e + 345, 130);
|
|
8552
8552
|
h && (this.path = h + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Ui(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Ui(t, e + 488, 12);
|
|
8553
8553
|
}
|
|
8554
8554
|
let o = 256;
|
|
@@ -8562,7 +8562,7 @@ var F = class {
|
|
|
8562
8562
|
encode(t, e = 0) {
|
|
8563
8563
|
if (t || (t = this.block = Buffer.alloc(512)), this.#t === "Unsupported" && (this.#t = "0"), !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
8564
8564
|
let i = this.ctime || this.atime ? 130 : 155, r = ln(this.path || "", i), n = r[0], o = r[1];
|
|
8565
|
-
this.needPax = !!r[2], this.needPax =
|
|
8565
|
+
this.needPax = !!r[2], this.needPax = Lt(t, e, 100, n) || this.needPax, this.needPax = lt(t, e + 100, 8, this.mode) || this.needPax, this.needPax = lt(t, e + 108, 8, this.uid) || this.needPax, this.needPax = lt(t, e + 116, 8, this.gid) || this.needPax, this.needPax = lt(t, e + 124, 12, this.size) || this.needPax, this.needPax = Hi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = Lt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = Lt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = Lt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = lt(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = lt(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = Lt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = Lt(t, e + 345, 155, o) || this.needPax : (this.needPax = Lt(t, e + 345, 130, o) || this.needPax, this.needPax = Hi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Hi(t, e + 488, 12, this.ctime) || this.needPax);
|
|
8566
8566
|
let h = 256;
|
|
8567
8567
|
for (let a = e; a < e + 148; a++) h += t[a];
|
|
8568
8568
|
for (let a = e + 156; a < e + 512; a++) h += t[a];
|
|
@@ -8593,7 +8593,7 @@ var ln = (s3, t) => {
|
|
|
8593
8593
|
}
|
|
8594
8594
|
return n;
|
|
8595
8595
|
};
|
|
8596
|
-
var
|
|
8596
|
+
var xt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
|
|
8597
8597
|
var Ui = (s3, t, e) => cn(at(s3, t, e));
|
|
8598
8598
|
var cn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
|
|
8599
8599
|
var at = (s3, t, e) => Number(s3[t]) & 128 ? Ps(s3.subarray(t, t + e)) : dn(s3, t, e);
|
|
@@ -8606,7 +8606,7 @@ var pn = (s3, t) => En(Math.floor(s3).toString(8), t);
|
|
|
8606
8606
|
var En = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
|
|
8607
8607
|
var Hi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
|
|
8608
8608
|
var wn = new Array(156).join("\0");
|
|
8609
|
-
var
|
|
8609
|
+
var Lt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + wn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
|
|
8610
8610
|
var ct = class s {
|
|
8611
8611
|
atime;
|
|
8612
8612
|
mtime;
|
|
@@ -8633,7 +8633,7 @@ var ct = class s {
|
|
|
8633
8633
|
if (t === "") return Buffer.allocUnsafe(0);
|
|
8634
8634
|
let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
|
|
8635
8635
|
for (let n = 0; n < 512; n++) r[n] = 0;
|
|
8636
|
-
new
|
|
8636
|
+
new k({ path: ("PaxHeader/" + Sn(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
|
|
8637
8637
|
for (let n = e + 512; n < r.length; n++) r[n] = 0;
|
|
8638
8638
|
return r;
|
|
8639
8639
|
}
|
|
@@ -8652,8 +8652,8 @@ var ct = class s {
|
|
|
8652
8652
|
};
|
|
8653
8653
|
var yn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
|
|
8654
8654
|
var Rn = (s3) => s3.replace(/\n$/, "").split(`
|
|
8655
|
-
`).reduce(
|
|
8656
|
-
var
|
|
8655
|
+
`).reduce(gn, /* @__PURE__ */ Object.create(null));
|
|
8656
|
+
var gn = (s3, t) => {
|
|
8657
8657
|
let e = parseInt(t, 10);
|
|
8658
8658
|
if (e !== Buffer.byteLength(t) + 1) return s3;
|
|
8659
8659
|
t = t.slice((e + " ").length);
|
|
@@ -8662,8 +8662,8 @@ var bn = (s3, t) => {
|
|
|
8662
8662
|
let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
|
|
8663
8663
|
return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
|
|
8664
8664
|
};
|
|
8665
|
-
var
|
|
8666
|
-
var f =
|
|
8665
|
+
var bn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
8666
|
+
var f = bn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
|
|
8667
8667
|
var Yt = class extends A {
|
|
8668
8668
|
extended;
|
|
8669
8669
|
globalExtended;
|
|
@@ -8728,7 +8728,7 @@ var Yt = class extends A {
|
|
|
8728
8728
|
t.path && (t.path = f(t.path)), t.linkpath && (t.linkpath = f(t.linkpath)), Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "path" && e))));
|
|
8729
8729
|
}
|
|
8730
8730
|
};
|
|
8731
|
-
var
|
|
8731
|
+
var Nt = (s3, t, e, i = {}) => {
|
|
8732
8732
|
s3.file && (i.file = s3.file), s3.cwd && (i.cwd = s3.cwd), i.code = e instanceof Error && e.code || t, i.tarCode = t, !s3.strict && i.recoverable !== false ? (e instanceof Error && (i = Object.assign(e, i), e = e.message), s3.emit("warn", t, e, i)) : e instanceof Error ? s3.emit("error", Object.assign(e, i)) : s3.emit("error", Object.assign(new Error(`${t}: ${e}`), i));
|
|
8733
8733
|
};
|
|
8734
8734
|
var On = 1024 * 1024;
|
|
@@ -8736,7 +8736,7 @@ var Ki = Buffer.from([31, 139]);
|
|
|
8736
8736
|
var Vi = Buffer.from([40, 181, 47, 253]);
|
|
8737
8737
|
var Tn = Math.max(Ki.length, Vi.length);
|
|
8738
8738
|
var B = /* @__PURE__ */ Symbol("state");
|
|
8739
|
-
var
|
|
8739
|
+
var Dt = /* @__PURE__ */ Symbol("writeEntry");
|
|
8740
8740
|
var et = /* @__PURE__ */ Symbol("readEntry");
|
|
8741
8741
|
var Wi = /* @__PURE__ */ Symbol("nextEntry");
|
|
8742
8742
|
var Hs = /* @__PURE__ */ Symbol("processEntry");
|
|
@@ -8748,7 +8748,7 @@ var p = /* @__PURE__ */ Symbol("buffer");
|
|
|
8748
8748
|
var it = /* @__PURE__ */ Symbol("queue");
|
|
8749
8749
|
var dt = /* @__PURE__ */ Symbol("ended");
|
|
8750
8750
|
var Gi = /* @__PURE__ */ Symbol("emittedEnd");
|
|
8751
|
-
var
|
|
8751
|
+
var At = /* @__PURE__ */ Symbol("emit");
|
|
8752
8752
|
var y = /* @__PURE__ */ Symbol("unzip");
|
|
8753
8753
|
var $e = /* @__PURE__ */ Symbol("consumeChunk");
|
|
8754
8754
|
var Xe = /* @__PURE__ */ Symbol("consumeChunkSub");
|
|
@@ -8760,10 +8760,10 @@ var Yi = /* @__PURE__ */ Symbol("bufferConcat");
|
|
|
8760
8760
|
var qe = /* @__PURE__ */ Symbol("maybeEnd");
|
|
8761
8761
|
var Kt = /* @__PURE__ */ Symbol("writing");
|
|
8762
8762
|
var ut = /* @__PURE__ */ Symbol("aborted");
|
|
8763
|
-
var
|
|
8764
|
-
var
|
|
8765
|
-
var
|
|
8766
|
-
var
|
|
8763
|
+
var Qe = /* @__PURE__ */ Symbol("onDone");
|
|
8764
|
+
var It = /* @__PURE__ */ Symbol("sawValidEntry");
|
|
8765
|
+
var Je = /* @__PURE__ */ Symbol("sawNullBlock");
|
|
8766
|
+
var je = /* @__PURE__ */ Symbol("sawEOF");
|
|
8767
8767
|
var Ys = /* @__PURE__ */ Symbol("closeStream");
|
|
8768
8768
|
var xn = () => true;
|
|
8769
8769
|
var st = class extends _n {
|
|
@@ -8778,7 +8778,7 @@ var st = class extends _n {
|
|
|
8778
8778
|
[it] = [];
|
|
8779
8779
|
[p];
|
|
8780
8780
|
[et];
|
|
8781
|
-
[
|
|
8781
|
+
[Dt];
|
|
8782
8782
|
[B] = "begin";
|
|
8783
8783
|
[ft] = "";
|
|
8784
8784
|
[V];
|
|
@@ -8786,16 +8786,16 @@ var st = class extends _n {
|
|
|
8786
8786
|
[dt] = false;
|
|
8787
8787
|
[y];
|
|
8788
8788
|
[ut] = false;
|
|
8789
|
-
[
|
|
8790
|
-
[Qe] = false;
|
|
8789
|
+
[It];
|
|
8791
8790
|
[Je] = false;
|
|
8791
|
+
[je] = false;
|
|
8792
8792
|
[Kt] = false;
|
|
8793
8793
|
[le] = false;
|
|
8794
8794
|
[Gi] = false;
|
|
8795
8795
|
constructor(t = {}) {
|
|
8796
|
-
super(), this.file = t.file || "", this.on(
|
|
8797
|
-
(this[B] === "begin" || this[
|
|
8798
|
-
}), t.ondone ? this.on(
|
|
8796
|
+
super(), this.file = t.file || "", this.on(Qe, () => {
|
|
8797
|
+
(this[B] === "begin" || this[It] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
8798
|
+
}), t.ondone ? this.on(Qe, t.ondone) : this.on(Qe, () => {
|
|
8799
8799
|
this.emit("prefinish"), this.emit("finish"), this.emit("end");
|
|
8800
8800
|
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || On, this.filter = typeof t.filter == "function" ? t.filter : xn;
|
|
8801
8801
|
let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
|
|
@@ -8804,32 +8804,32 @@ var st = class extends _n {
|
|
|
8804
8804
|
this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Ys]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
|
|
8805
8805
|
}
|
|
8806
8806
|
warn(t, e, i = {}) {
|
|
8807
|
-
|
|
8807
|
+
Nt(this, t, e, i);
|
|
8808
8808
|
}
|
|
8809
8809
|
[Zs](t, e) {
|
|
8810
|
-
this[
|
|
8810
|
+
this[It] === void 0 && (this[It] = false);
|
|
8811
8811
|
let i;
|
|
8812
8812
|
try {
|
|
8813
|
-
i = new
|
|
8813
|
+
i = new k(t, e, this[V], this[ae]);
|
|
8814
8814
|
} catch (r) {
|
|
8815
8815
|
return this.warn("TAR_ENTRY_INVALID", r);
|
|
8816
8816
|
}
|
|
8817
|
-
if (i.nullBlock) this[
|
|
8818
|
-
else if (this[
|
|
8817
|
+
if (i.nullBlock) this[Je] ? (this[je] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[Je] = true, this[At]("nullBlock"));
|
|
8818
|
+
else if (this[Je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
|
|
8819
8819
|
else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
|
|
8820
8820
|
else {
|
|
8821
8821
|
let r = i.type;
|
|
8822
8822
|
if (/^(Symbolic)?Link$/.test(r) && !i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: i });
|
|
8823
8823
|
else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
|
|
8824
8824
|
else {
|
|
8825
|
-
let n = this[
|
|
8826
|
-
if (!this[
|
|
8825
|
+
let n = this[Dt] = new Yt(i, this[V], this[ae]);
|
|
8826
|
+
if (!this[It]) if (n.remain) {
|
|
8827
8827
|
let o = () => {
|
|
8828
|
-
n.invalid || (this[
|
|
8828
|
+
n.invalid || (this[It] = true);
|
|
8829
8829
|
};
|
|
8830
8830
|
n.on("end", o);
|
|
8831
|
-
} else this[
|
|
8832
|
-
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[
|
|
8831
|
+
} else this[It] = true;
|
|
8832
|
+
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[ft] = "", n.on("data", (o) => this[ft] += o), this[B] = "meta") : (this[V] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[et] ? this[it].push(n) : (this[it].push(n), this[Wi]())));
|
|
8833
8833
|
}
|
|
8834
8834
|
}
|
|
8835
8835
|
}
|
|
@@ -8855,20 +8855,20 @@ var st = class extends _n {
|
|
|
8855
8855
|
}
|
|
8856
8856
|
}
|
|
8857
8857
|
[Zi](t, e) {
|
|
8858
|
-
let i = this[
|
|
8858
|
+
let i = this[Dt];
|
|
8859
8859
|
if (!i) throw new Error("attempt to consume body without entry??");
|
|
8860
8860
|
let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
|
|
8861
|
-
return i.write(n), i.blockRemain || (this[B] = "header", this[
|
|
8861
|
+
return i.write(n), i.blockRemain || (this[B] = "header", this[Dt] = void 0, i.end()), n.length;
|
|
8862
8862
|
}
|
|
8863
8863
|
[Gs](t, e) {
|
|
8864
|
-
let i = this[
|
|
8865
|
-
return !this[
|
|
8864
|
+
let i = this[Dt], r = this[Zi](t, e);
|
|
8865
|
+
return !this[Dt] && i && this[Ws](i), r;
|
|
8866
8866
|
}
|
|
8867
|
-
[
|
|
8867
|
+
[At](t, e, i) {
|
|
8868
8868
|
this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
|
|
8869
8869
|
}
|
|
8870
8870
|
[Ws](t) {
|
|
8871
|
-
switch (this[
|
|
8871
|
+
switch (this[At]("meta", this[ft]), t.type) {
|
|
8872
8872
|
case "ExtendedHeader":
|
|
8873
8873
|
case "OldExtendedHeader":
|
|
8874
8874
|
this[V] = ct.parse(this[ft], this[V], false);
|
|
@@ -8911,7 +8911,7 @@ var st = class extends _n {
|
|
|
8911
8911
|
if (this[y] === false && h) if (t.length < 512) if (this[dt]) this.brotli = true;
|
|
8912
8912
|
else return this[p] = t, i?.(), true;
|
|
8913
8913
|
else try {
|
|
8914
|
-
new
|
|
8914
|
+
new k(t.subarray(0, 512)), this.brotli = false;
|
|
8915
8915
|
} catch {
|
|
8916
8916
|
this.brotli = true;
|
|
8917
8917
|
}
|
|
@@ -8934,12 +8934,12 @@ var st = class extends _n {
|
|
|
8934
8934
|
[qe]() {
|
|
8935
8935
|
if (this[dt] && !this[Gi] && !this[ut] && !this[le]) {
|
|
8936
8936
|
this[Gi] = true;
|
|
8937
|
-
let t = this[
|
|
8937
|
+
let t = this[Dt];
|
|
8938
8938
|
if (t && t.blockRemain) {
|
|
8939
8939
|
let e = this[p] ? this[p].length : 0;
|
|
8940
8940
|
this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`, { entry: t }), this[p] && t.write(this[p]), t.end();
|
|
8941
8941
|
}
|
|
8942
|
-
this[
|
|
8942
|
+
this[At](Qe);
|
|
8943
8943
|
}
|
|
8944
8944
|
}
|
|
8945
8945
|
[$e](t) {
|
|
@@ -8951,7 +8951,7 @@ var st = class extends _n {
|
|
|
8951
8951
|
let e = this[p];
|
|
8952
8952
|
this[p] = void 0, this[Xe](e);
|
|
8953
8953
|
} else this[Xe](t);
|
|
8954
|
-
for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[
|
|
8954
|
+
for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[je]; ) {
|
|
8955
8955
|
let e = this[p];
|
|
8956
8956
|
this[p] = void 0, this[Xe](e);
|
|
8957
8957
|
}
|
|
@@ -8961,7 +8961,7 @@ var st = class extends _n {
|
|
|
8961
8961
|
}
|
|
8962
8962
|
[Xe](t) {
|
|
8963
8963
|
let e = 0, i = t.length;
|
|
8964
|
-
for (; e + 512 <= i && !this[ut] && !this[
|
|
8964
|
+
for (; e + 512 <= i && !this[ut] && !this[je]; ) switch (this[B]) {
|
|
8965
8965
|
case "begin":
|
|
8966
8966
|
case "header":
|
|
8967
8967
|
this[Zs](t, e), e += 512;
|
|
@@ -9035,20 +9035,20 @@ var In = (s3, t) => {
|
|
|
9035
9035
|
e.on("error", h), e.on("end", o), Vt.stat(r, (a, l) => {
|
|
9036
9036
|
if (a) h(a);
|
|
9037
9037
|
else {
|
|
9038
|
-
let c = new
|
|
9038
|
+
let c = new _t(r, { readSize: i, size: l.size });
|
|
9039
9039
|
c.on("error", h), c.pipe(e);
|
|
9040
9040
|
}
|
|
9041
9041
|
});
|
|
9042
9042
|
});
|
|
9043
9043
|
};
|
|
9044
|
-
var
|
|
9044
|
+
var Ct = K(An, In, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
|
|
9045
9045
|
t?.length && $i(s3, t), s3.noResume || Dn(s3);
|
|
9046
9046
|
});
|
|
9047
9047
|
var Xi = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
|
|
9048
|
-
var { isAbsolute:
|
|
9048
|
+
var { isAbsolute: kn, parse: Ks } = Cn;
|
|
9049
9049
|
var ce = (s3) => {
|
|
9050
9050
|
let t = "", e = Ks(s3);
|
|
9051
|
-
for (;
|
|
9051
|
+
for (; kn(s3) || e.root; ) {
|
|
9052
9052
|
let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
|
|
9053
9053
|
s3 = s3.slice(i.length), t += i, e = Ks(s3);
|
|
9054
9054
|
}
|
|
@@ -9056,17 +9056,17 @@ var ce = (s3) => {
|
|
|
9056
9056
|
};
|
|
9057
9057
|
var ti = ["|", "<", ">", "?", ":"];
|
|
9058
9058
|
var qi = ti.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
|
|
9059
|
-
var
|
|
9059
|
+
var Fn = new Map(ti.map((s3, t) => [s3, qi[t]]));
|
|
9060
9060
|
var vn = new Map(qi.map((s3, t) => [s3, ti[t]]));
|
|
9061
|
-
var
|
|
9061
|
+
var Qi = (s3) => ti.reduce((t, e) => t.split(e).join(Fn.get(e)), s3);
|
|
9062
9062
|
var Vs = (s3) => qi.reduce((t, e) => t.split(e).join(vn.get(e)), s3);
|
|
9063
9063
|
var tr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
|
|
9064
9064
|
var Mn = 16 * 1024 * 1024;
|
|
9065
9065
|
var qs = /* @__PURE__ */ Symbol("process");
|
|
9066
|
-
var
|
|
9067
|
-
var
|
|
9068
|
-
var
|
|
9069
|
-
var
|
|
9066
|
+
var Qs = /* @__PURE__ */ Symbol("file");
|
|
9067
|
+
var Js = /* @__PURE__ */ Symbol("directory");
|
|
9068
|
+
var ji = /* @__PURE__ */ Symbol("symlink");
|
|
9069
|
+
var js = /* @__PURE__ */ Symbol("hardlink");
|
|
9070
9070
|
var fe = /* @__PURE__ */ Symbol("header");
|
|
9071
9071
|
var ei = /* @__PURE__ */ Symbol("read");
|
|
9072
9072
|
var ts = /* @__PURE__ */ Symbol("lstat");
|
|
@@ -9078,7 +9078,7 @@ var rs = /* @__PURE__ */ Symbol("onopenfile");
|
|
|
9078
9078
|
var pt = /* @__PURE__ */ Symbol("close");
|
|
9079
9079
|
var si = /* @__PURE__ */ Symbol("mode");
|
|
9080
9080
|
var ns = /* @__PURE__ */ Symbol("awaitDrain");
|
|
9081
|
-
var
|
|
9081
|
+
var Ji = /* @__PURE__ */ Symbol("ondrain");
|
|
9082
9082
|
var X = /* @__PURE__ */ Symbol("prefix");
|
|
9083
9083
|
var de = class extends A {
|
|
9084
9084
|
path;
|
|
@@ -9124,7 +9124,7 @@ var de = class extends A {
|
|
|
9124
9124
|
n ? this[ii](n) : this[ts]();
|
|
9125
9125
|
}
|
|
9126
9126
|
warn(t, e, i = {}) {
|
|
9127
|
-
return
|
|
9127
|
+
return Nt(this, t, e, i);
|
|
9128
9128
|
}
|
|
9129
9129
|
emit(t, ...e) {
|
|
9130
9130
|
return t === "error" && (this.#t = true), super.emit(t, ...e);
|
|
@@ -9141,11 +9141,11 @@ var de = class extends A {
|
|
|
9141
9141
|
[qs]() {
|
|
9142
9142
|
switch (this.type) {
|
|
9143
9143
|
case "File":
|
|
9144
|
-
return this[js]();
|
|
9145
|
-
case "Directory":
|
|
9146
9144
|
return this[Qs]();
|
|
9145
|
+
case "Directory":
|
|
9146
|
+
return this[Js]();
|
|
9147
9147
|
case "SymbolicLink":
|
|
9148
|
-
return this[
|
|
9148
|
+
return this[ji]();
|
|
9149
9149
|
default:
|
|
9150
9150
|
return this.end();
|
|
9151
9151
|
}
|
|
@@ -9158,16 +9158,16 @@ var de = class extends A {
|
|
|
9158
9158
|
}
|
|
9159
9159
|
[fe]() {
|
|
9160
9160
|
if (!this.stat) throw new Error("cannot write header before stat");
|
|
9161
|
-
this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new
|
|
9161
|
+
this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new k({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this[si](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
|
|
9162
9162
|
let t = this.header?.block;
|
|
9163
9163
|
if (!t) throw new Error("failed to encode header");
|
|
9164
9164
|
super.write(t);
|
|
9165
9165
|
}
|
|
9166
|
-
[
|
|
9166
|
+
[Js]() {
|
|
9167
9167
|
if (!this.stat) throw new Error("cannot create directory entry without stat");
|
|
9168
9168
|
this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
|
|
9169
9169
|
}
|
|
9170
|
-
[
|
|
9170
|
+
[ji]() {
|
|
9171
9171
|
$.readlink(this.absolute, (t, e) => {
|
|
9172
9172
|
if (t) return this.emit("error", t);
|
|
9173
9173
|
this[is](e);
|
|
@@ -9176,15 +9176,15 @@ var de = class extends A {
|
|
|
9176
9176
|
[is](t) {
|
|
9177
9177
|
this.linkpath = f(t), this[fe](), this.end();
|
|
9178
9178
|
}
|
|
9179
|
-
[
|
|
9179
|
+
[js](t) {
|
|
9180
9180
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
9181
9181
|
this.type = "Link", this.linkpath = f(Xs.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
|
|
9182
9182
|
}
|
|
9183
|
-
[
|
|
9183
|
+
[Qs]() {
|
|
9184
9184
|
if (!this.stat) throw new Error("cannot create file entry without stat");
|
|
9185
9185
|
if (this.stat.nlink > 1) {
|
|
9186
9186
|
let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
|
|
9187
|
-
if (e?.indexOf(this.cwd) === 0) return this[
|
|
9187
|
+
if (e?.indexOf(this.cwd) === 0) return this[js](e);
|
|
9188
9188
|
this.linkCache.set(t, this.absolute);
|
|
9189
9189
|
}
|
|
9190
9190
|
if (this[fe](), this.stat.size === 0) return this.end();
|
|
@@ -9227,7 +9227,7 @@ var de = class extends A {
|
|
|
9227
9227
|
if (!this.buf) throw new Error("should have created buffer prior to reading");
|
|
9228
9228
|
if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
|
|
9229
9229
|
let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
|
|
9230
|
-
this.write(e) ? this[
|
|
9230
|
+
this.write(e) ? this[Ji]() : this[ns](() => this[Ji]());
|
|
9231
9231
|
}
|
|
9232
9232
|
[ns](t) {
|
|
9233
9233
|
this.once("drain", t);
|
|
@@ -9239,7 +9239,7 @@ var de = class extends A {
|
|
|
9239
9239
|
}
|
|
9240
9240
|
return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
|
|
9241
9241
|
}
|
|
9242
|
-
[
|
|
9242
|
+
[Ji]() {
|
|
9243
9243
|
if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
|
|
9244
9244
|
if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
|
|
9245
9245
|
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[ei]();
|
|
@@ -9250,7 +9250,7 @@ var ri = class extends de {
|
|
|
9250
9250
|
[ts]() {
|
|
9251
9251
|
this[ii]($.lstatSync(this.absolute));
|
|
9252
9252
|
}
|
|
9253
|
-
[
|
|
9253
|
+
[ji]() {
|
|
9254
9254
|
this[is]($.readlinkSync(this.absolute));
|
|
9255
9255
|
}
|
|
9256
9256
|
[ss]() {
|
|
@@ -9308,7 +9308,7 @@ var ni = class extends A {
|
|
|
9308
9308
|
size;
|
|
9309
9309
|
onWriteEntry;
|
|
9310
9310
|
warn(t, e, i = {}) {
|
|
9311
|
-
return
|
|
9311
|
+
return Nt(this, t, e, i);
|
|
9312
9312
|
}
|
|
9313
9313
|
constructor(t, e = {}) {
|
|
9314
9314
|
let i = re(e);
|
|
@@ -9321,7 +9321,7 @@ var ni = class extends A {
|
|
|
9321
9321
|
let [h, a] = ce(this.path);
|
|
9322
9322
|
h && typeof a == "string" && (this.path = a, n = h);
|
|
9323
9323
|
}
|
|
9324
|
-
this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new
|
|
9324
|
+
this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new k({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this.mode, uid: this.portable ? void 0 : this.uid, gid: this.portable ? void 0 : this.gid, size: this.size, mtime: this.noMtime ? void 0 : this.mtime, type: this.type, uname: this.portable ? void 0 : this.uname, atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime }), n && this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute path`, { entry: this, path: n + this.path }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime, gid: this.portable ? void 0 : this.gid, mtime: this.noMtime ? void 0 : this.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.size, uid: this.portable ? void 0 : this.uid, uname: this.portable ? void 0 : this.uname, dev: this.portable ? void 0 : this.readEntry.dev, ino: this.portable ? void 0 : this.readEntry.ino, nlink: this.portable ? void 0 : this.readEntry.nlink }).encode());
|
|
9325
9325
|
let o = this.header?.block;
|
|
9326
9326
|
if (!o) throw new Error("failed to encode header");
|
|
9327
9327
|
super.write(o), t.pipe(this);
|
|
@@ -9512,6 +9512,7 @@ var mi = class {
|
|
|
9512
9512
|
stat;
|
|
9513
9513
|
readdir;
|
|
9514
9514
|
pending = false;
|
|
9515
|
+
pendingLink = false;
|
|
9515
9516
|
ignore = false;
|
|
9516
9517
|
piped = false;
|
|
9517
9518
|
constructor(t, e) {
|
|
@@ -9523,8 +9524,8 @@ var ai = /* @__PURE__ */ Symbol("onStat");
|
|
|
9523
9524
|
var me = /* @__PURE__ */ Symbol("ended");
|
|
9524
9525
|
var W = /* @__PURE__ */ Symbol("queue");
|
|
9525
9526
|
var pe = /* @__PURE__ */ Symbol("queue");
|
|
9526
|
-
var
|
|
9527
|
-
var
|
|
9527
|
+
var Et = /* @__PURE__ */ Symbol("current");
|
|
9528
|
+
var kt = /* @__PURE__ */ Symbol("process");
|
|
9528
9529
|
var Ee = /* @__PURE__ */ Symbol("processing");
|
|
9529
9530
|
var hi = /* @__PURE__ */ Symbol("processJob");
|
|
9530
9531
|
var G = /* @__PURE__ */ Symbol("jobs");
|
|
@@ -9540,7 +9541,7 @@ var hs = /* @__PURE__ */ Symbol("entryOpt");
|
|
|
9540
9541
|
var di = /* @__PURE__ */ Symbol("writeEntryClass");
|
|
9541
9542
|
var nr = /* @__PURE__ */ Symbol("write");
|
|
9542
9543
|
var as = /* @__PURE__ */ Symbol("ondrain");
|
|
9543
|
-
var
|
|
9544
|
+
var wt = class extends A {
|
|
9544
9545
|
sync = false;
|
|
9545
9546
|
opt;
|
|
9546
9547
|
cwd;
|
|
@@ -9584,7 +9585,7 @@ var Et = class extends A {
|
|
|
9584
9585
|
return this.write(t), this;
|
|
9585
9586
|
}
|
|
9586
9587
|
end(t, e, i) {
|
|
9587
|
-
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[me] = true, this[
|
|
9588
|
+
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[me] = true, this[kt](), i && i(), this;
|
|
9588
9589
|
}
|
|
9589
9590
|
write(t) {
|
|
9590
9591
|
if (this[me]) throw new Error("write after end");
|
|
@@ -9597,11 +9598,11 @@ var Et = class extends A {
|
|
|
9597
9598
|
let i = new mi(t.path, e);
|
|
9598
9599
|
i.entry = new ni(t, this[hs](i)), i.entry.on("end", () => this[os](i)), this[G] += 1, this[W].push(i);
|
|
9599
9600
|
}
|
|
9600
|
-
this[
|
|
9601
|
+
this[kt]();
|
|
9601
9602
|
}
|
|
9602
9603
|
[li](t) {
|
|
9603
9604
|
let e = f(rr.resolve(this.cwd, t));
|
|
9604
|
-
this[W].push(new mi(t, e)), this[
|
|
9605
|
+
this[W].push(new mi(t, e)), this[kt]();
|
|
9605
9606
|
}
|
|
9606
9607
|
[ls](t) {
|
|
9607
9608
|
t.pending = true, this[G] += 1;
|
|
@@ -9612,12 +9613,12 @@ var Et = class extends A {
|
|
|
9612
9613
|
}
|
|
9613
9614
|
[ai](t, e) {
|
|
9614
9615
|
if (this.statCache.set(t.absolute, e), t.stat = e, !this.filter(t.path, e)) t.ignore = true;
|
|
9615
|
-
else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t === this[
|
|
9616
|
+
else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t === this[Et]) this[hi](t);
|
|
9616
9617
|
else {
|
|
9617
9618
|
let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
|
|
9618
|
-
r ? r.push(t) : this[pe].set(i, [t]), t.pending = true;
|
|
9619
|
+
r ? r.push(t) : this[pe].set(i, [t]), t.pendingLink = true, t.pending = true;
|
|
9619
9620
|
}
|
|
9620
|
-
this[
|
|
9621
|
+
this[kt]();
|
|
9621
9622
|
}
|
|
9622
9623
|
[cs](t) {
|
|
9623
9624
|
t.pending = true, this[G] += 1, ui.readdir(t.absolute, (e, i) => {
|
|
@@ -9626,9 +9627,9 @@ var Et = class extends A {
|
|
|
9626
9627
|
});
|
|
9627
9628
|
}
|
|
9628
9629
|
[ci](t, e) {
|
|
9629
|
-
this.readdirCache.set(t.absolute, e), t.readdir = e, this[
|
|
9630
|
+
this.readdirCache.set(t.absolute, e), t.readdir = e, this[kt]();
|
|
9630
9631
|
}
|
|
9631
|
-
[
|
|
9632
|
+
[kt]() {
|
|
9632
9633
|
if (!this[Ee]) {
|
|
9633
9634
|
this[Ee] = true;
|
|
9634
9635
|
for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[hi](t.value), t.value.ignore) {
|
|
@@ -9638,7 +9639,7 @@ var Et = class extends A {
|
|
|
9638
9639
|
this[Ee] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(er) : (super.write(er), super.end()));
|
|
9639
9640
|
}
|
|
9640
9641
|
}
|
|
9641
|
-
get [
|
|
9642
|
+
get [Et]() {
|
|
9642
9643
|
return this[W] && this[W].head && this[W].head.value;
|
|
9643
9644
|
}
|
|
9644
9645
|
[os](t) {
|
|
@@ -9646,14 +9647,17 @@ var Et = class extends A {
|
|
|
9646
9647
|
let { stat: e } = t;
|
|
9647
9648
|
if (e && e.isFile() && e.nlink > 1) {
|
|
9648
9649
|
let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
|
|
9649
|
-
if (
|
|
9650
|
+
if (r) {
|
|
9651
|
+
this[pe].delete(i);
|
|
9652
|
+
for (let n of r) n.pending = false, this[hi](n);
|
|
9653
|
+
}
|
|
9650
9654
|
}
|
|
9651
|
-
this[
|
|
9655
|
+
this[kt]();
|
|
9652
9656
|
}
|
|
9653
9657
|
[hi](t) {
|
|
9654
|
-
if (!t.pending) {
|
|
9658
|
+
if (t.pending && t.pendingLink && t === this[Et] && (t.pending = false, t.pendingLink = false), !t.pending) {
|
|
9655
9659
|
if (t.entry) {
|
|
9656
|
-
t === this[
|
|
9660
|
+
t === this[Et] && !t.piped && this[fi](t);
|
|
9657
9661
|
return;
|
|
9658
9662
|
}
|
|
9659
9663
|
if (!t.stat) {
|
|
@@ -9669,7 +9673,7 @@ var Et = class extends A {
|
|
|
9669
9673
|
t.ignore = true;
|
|
9670
9674
|
return;
|
|
9671
9675
|
}
|
|
9672
|
-
t === this[
|
|
9676
|
+
t === this[Et] && !t.piped && this[fi](t);
|
|
9673
9677
|
}
|
|
9674
9678
|
}
|
|
9675
9679
|
}
|
|
@@ -9685,7 +9689,7 @@ var Et = class extends A {
|
|
|
9685
9689
|
}
|
|
9686
9690
|
}
|
|
9687
9691
|
[as]() {
|
|
9688
|
-
this[
|
|
9692
|
+
this[Et] && this[Et].entry && this[Et].entry.resume();
|
|
9689
9693
|
}
|
|
9690
9694
|
[fi](t) {
|
|
9691
9695
|
t.piped = true, t.readdir && t.readdir.forEach((r) => {
|
|
@@ -9704,10 +9708,10 @@ var Et = class extends A {
|
|
|
9704
9708
|
return this.zip && this.zip.pause(), super.pause();
|
|
9705
9709
|
}
|
|
9706
9710
|
warn(t, e, i = {}) {
|
|
9707
|
-
|
|
9711
|
+
Nt(this, t, e, i);
|
|
9708
9712
|
}
|
|
9709
9713
|
};
|
|
9710
|
-
var
|
|
9714
|
+
var Ft = class extends wt {
|
|
9711
9715
|
sync = true;
|
|
9712
9716
|
constructor(t) {
|
|
9713
9717
|
super(t), this[di] = ri;
|
|
@@ -9737,11 +9741,11 @@ var kt = class extends Et {
|
|
|
9737
9741
|
}
|
|
9738
9742
|
};
|
|
9739
9743
|
var Hn = (s3, t) => {
|
|
9740
|
-
let e = new
|
|
9744
|
+
let e = new Ft(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
|
|
9741
9745
|
e.pipe(i), hr(e, t);
|
|
9742
9746
|
};
|
|
9743
9747
|
var Wn = (s3, t) => {
|
|
9744
|
-
let e = new
|
|
9748
|
+
let e = new wt(s3), i = new tt2(s3.file, { mode: s3.mode || 438 });
|
|
9745
9749
|
e.pipe(i);
|
|
9746
9750
|
let r = new Promise((n, o) => {
|
|
9747
9751
|
i.on("error", o), i.on("close", n), e.on("error", o);
|
|
@@ -9750,21 +9754,21 @@ var Wn = (s3, t) => {
|
|
|
9750
9754
|
};
|
|
9751
9755
|
var hr = (s3, t) => {
|
|
9752
9756
|
t.forEach((e) => {
|
|
9753
|
-
e.charAt(0) === "@" ?
|
|
9757
|
+
e.charAt(0) === "@" ? Ct({ file: or.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
9754
9758
|
}), s3.end();
|
|
9755
9759
|
};
|
|
9756
9760
|
var ar = async (s3, t) => {
|
|
9757
|
-
for (let e of t) e.charAt(0) === "@" ? await
|
|
9761
|
+
for (let e of t) e.charAt(0) === "@" ? await Ct({ file: or.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
|
|
9758
9762
|
s3.add(i);
|
|
9759
9763
|
} }) : s3.add(e);
|
|
9760
9764
|
s3.end();
|
|
9761
9765
|
};
|
|
9762
9766
|
var Gn = (s3, t) => {
|
|
9763
|
-
let e = new
|
|
9767
|
+
let e = new Ft(s3);
|
|
9764
9768
|
return hr(e, t), e;
|
|
9765
9769
|
};
|
|
9766
9770
|
var Zn = (s3, t) => {
|
|
9767
|
-
let e = new
|
|
9771
|
+
let e = new wt(s3);
|
|
9768
9772
|
return ar(e, t).catch((i) => e.emit("error", i)), e;
|
|
9769
9773
|
};
|
|
9770
9774
|
var Yn = K(Hn, Wn, Gn, Zn, (s3, t) => {
|
|
@@ -9818,7 +9822,7 @@ var us = (s3, t, e, i) => {
|
|
|
9818
9822
|
for (let l of n) qn(s3, l, t, e, a);
|
|
9819
9823
|
});
|
|
9820
9824
|
};
|
|
9821
|
-
var
|
|
9825
|
+
var Qn = (s3, t, e, i) => {
|
|
9822
9826
|
t.isDirectory() && ms(we.resolve(s3, t.name), e, i), ds(we.resolve(s3, t.name), e, i);
|
|
9823
9827
|
};
|
|
9824
9828
|
var ms = (s3, t, e) => {
|
|
@@ -9831,7 +9835,7 @@ var ms = (s3, t, e) => {
|
|
|
9831
9835
|
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return ds(s3, t, e);
|
|
9832
9836
|
throw n;
|
|
9833
9837
|
}
|
|
9834
|
-
for (let r of i)
|
|
9838
|
+
for (let r of i) Qn(s3, r, t, e);
|
|
9835
9839
|
return ds(s3, t, e);
|
|
9836
9840
|
};
|
|
9837
9841
|
var Se = class extends Error {
|
|
@@ -9845,7 +9849,7 @@ var Se = class extends Error {
|
|
|
9845
9849
|
return "CwdError";
|
|
9846
9850
|
}
|
|
9847
9851
|
};
|
|
9848
|
-
var
|
|
9852
|
+
var St = class extends Error {
|
|
9849
9853
|
path;
|
|
9850
9854
|
symlink;
|
|
9851
9855
|
syscall = "symlink";
|
|
@@ -9857,36 +9861,36 @@ var wt = class extends Error {
|
|
|
9857
9861
|
return "SymlinkError";
|
|
9858
9862
|
}
|
|
9859
9863
|
};
|
|
9860
|
-
var
|
|
9861
|
-
|
|
9864
|
+
var jn = (s3, t) => {
|
|
9865
|
+
F.stat(s3, (e, i) => {
|
|
9862
9866
|
(e || !i.isDirectory()) && (e = new Se(s3, e?.code || "ENOTDIR")), t(e);
|
|
9863
9867
|
});
|
|
9864
9868
|
};
|
|
9865
9869
|
var wr = (s3, t, e) => {
|
|
9866
9870
|
s3 = f(s3);
|
|
9867
9871
|
let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, h = t.gid, a = typeof o == "number" && typeof h == "number" && (o !== t.processUid || h !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), S = (E, x) => {
|
|
9868
|
-
E ? e(E) : x && a ? us(x, o, h, (Le) => S(Le)) : n ?
|
|
9872
|
+
E ? e(E) : x && a ? us(x, o, h, (Le) => S(Le)) : n ? F.chmod(s3, r, e) : e();
|
|
9869
9873
|
};
|
|
9870
|
-
if (s3 === d) return
|
|
9871
|
-
if (l) return
|
|
9874
|
+
if (s3 === d) return jn(s3, S);
|
|
9875
|
+
if (l) return Jn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
|
|
9872
9876
|
let N = f(wi.relative(d, s3)).split("/");
|
|
9873
9877
|
ps(d, N, r, c, d, void 0, S);
|
|
9874
9878
|
};
|
|
9875
9879
|
var ps = (s3, t, e, i, r, n, o) => {
|
|
9876
9880
|
if (t.length === 0) return o(null, n);
|
|
9877
9881
|
let h = t.shift(), a = f(wi.resolve(s3 + "/" + h));
|
|
9878
|
-
|
|
9882
|
+
F.mkdir(a, e, Sr(a, t, e, i, r, n, o));
|
|
9879
9883
|
};
|
|
9880
9884
|
var Sr = (s3, t, e, i, r, n, o) => (h) => {
|
|
9881
|
-
h ?
|
|
9885
|
+
h ? F.lstat(s3, (a, l) => {
|
|
9882
9886
|
if (a) a.path = a.path && f(a.path), o(a);
|
|
9883
9887
|
else if (l.isDirectory()) ps(s3, t, e, i, r, n, o);
|
|
9884
|
-
else if (i)
|
|
9888
|
+
else if (i) F.unlink(s3, (c) => {
|
|
9885
9889
|
if (c) return o(c);
|
|
9886
|
-
|
|
9890
|
+
F.mkdir(s3, e, Sr(s3, t, e, i, r, n, o));
|
|
9887
9891
|
});
|
|
9888
9892
|
else {
|
|
9889
|
-
if (l.isSymbolicLink()) return o(new
|
|
9893
|
+
if (l.isSymbolicLink()) return o(new St(s3, s3 + "/" + t.join("/")));
|
|
9890
9894
|
o(h);
|
|
9891
9895
|
}
|
|
9892
9896
|
}) : (n = n || s3, ps(s3, t, e, i, r, n, o));
|
|
@@ -9894,7 +9898,7 @@ var Sr = (s3, t, e, i, r, n, o) => (h) => {
|
|
|
9894
9898
|
var to = (s3) => {
|
|
9895
9899
|
let t = false, e;
|
|
9896
9900
|
try {
|
|
9897
|
-
t =
|
|
9901
|
+
t = F.statSync(s3).isDirectory();
|
|
9898
9902
|
} catch (i) {
|
|
9899
9903
|
e = i?.code;
|
|
9900
9904
|
} finally {
|
|
@@ -9904,22 +9908,22 @@ var to = (s3) => {
|
|
|
9904
9908
|
var yr = (s3, t) => {
|
|
9905
9909
|
s3 = f(s3);
|
|
9906
9910
|
let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid, h = typeof n == "number" && typeof o == "number" && (n !== t.processUid || o !== t.processGid), a = t.preserve, l = t.unlink, c = f(t.cwd), d = (E) => {
|
|
9907
|
-
E && h && ms(E, n, o), r &&
|
|
9911
|
+
E && h && ms(E, n, o), r && F.chmodSync(s3, i);
|
|
9908
9912
|
};
|
|
9909
9913
|
if (s3 === c) return to(c), d();
|
|
9910
|
-
if (a) return d(
|
|
9914
|
+
if (a) return d(F.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
|
|
9911
9915
|
let T = f(wi.relative(c, s3)).split("/"), N;
|
|
9912
9916
|
for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
|
|
9913
9917
|
x = f(wi.resolve(x));
|
|
9914
9918
|
try {
|
|
9915
|
-
|
|
9919
|
+
F.mkdirSync(x, i), N = N || x;
|
|
9916
9920
|
} catch {
|
|
9917
|
-
let Le =
|
|
9921
|
+
let Le = F.lstatSync(x);
|
|
9918
9922
|
if (Le.isDirectory()) continue;
|
|
9919
9923
|
if (l) {
|
|
9920
|
-
|
|
9924
|
+
F.unlinkSync(x), F.mkdirSync(x, i), N = N || x;
|
|
9921
9925
|
continue;
|
|
9922
|
-
} else if (Le.isSymbolicLink()) return new
|
|
9926
|
+
} else if (Le.isSymbolicLink()) return new St(x, x + "/" + T.join("/"));
|
|
9923
9927
|
}
|
|
9924
9928
|
}
|
|
9925
9929
|
return d(N);
|
|
@@ -9927,7 +9931,7 @@ var yr = (s3, t) => {
|
|
|
9927
9931
|
var Es = /* @__PURE__ */ Object.create(null);
|
|
9928
9932
|
var Rr = 1e4;
|
|
9929
9933
|
var $t = /* @__PURE__ */ new Set();
|
|
9930
|
-
var
|
|
9934
|
+
var gr = (s3) => {
|
|
9931
9935
|
$t.has(s3) ? $t.delete(s3) : Es[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
|
|
9932
9936
|
let t = Es[s3], e = $t.size - Rr;
|
|
9933
9937
|
if (e > Rr / 10) {
|
|
@@ -9939,14 +9943,14 @@ var eo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
|
9939
9943
|
var io = eo === "win32";
|
|
9940
9944
|
var so = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
|
|
9941
9945
|
let r = e.at(-1);
|
|
9942
|
-
return r !== void 0 && (i =
|
|
9946
|
+
return r !== void 0 && (i = br(r, i)), e.push(i || "/"), e;
|
|
9943
9947
|
}, []);
|
|
9944
9948
|
var Si = class {
|
|
9945
9949
|
#t = /* @__PURE__ */ new Map();
|
|
9946
9950
|
#i = /* @__PURE__ */ new Map();
|
|
9947
9951
|
#s = /* @__PURE__ */ new Set();
|
|
9948
9952
|
reserve(t, e) {
|
|
9949
|
-
t = io ? ["win32 parallelization disabled"] : t.map((r) => mt(gr(
|
|
9953
|
+
t = io ? ["win32 parallelization disabled"] : t.map((r) => mt(br(gr(r))));
|
|
9950
9954
|
let i = new Set(t.map((r) => so(r)).reduce((r, n) => r.concat(n)));
|
|
9951
9955
|
this.#i.set(e, { dirs: i, paths: t });
|
|
9952
9956
|
for (let r of t) {
|
|
@@ -10009,9 +10013,9 @@ var _r = () => process.umask();
|
|
|
10009
10013
|
var Or = /* @__PURE__ */ Symbol("onEntry");
|
|
10010
10014
|
var Rs = /* @__PURE__ */ Symbol("checkFs");
|
|
10011
10015
|
var Tr = /* @__PURE__ */ Symbol("checkFs2");
|
|
10012
|
-
var
|
|
10016
|
+
var gs = /* @__PURE__ */ Symbol("isReusable");
|
|
10013
10017
|
var P = /* @__PURE__ */ Symbol("makeFs");
|
|
10014
|
-
var
|
|
10018
|
+
var bs = /* @__PURE__ */ Symbol("file");
|
|
10015
10019
|
var _s = /* @__PURE__ */ Symbol("directory");
|
|
10016
10020
|
var Ri = /* @__PURE__ */ Symbol("link");
|
|
10017
10021
|
var xr = /* @__PURE__ */ Symbol("symlink");
|
|
@@ -10020,7 +10024,7 @@ var Re = /* @__PURE__ */ Symbol("ensureNoSymlink");
|
|
|
10020
10024
|
var Nr = /* @__PURE__ */ Symbol("unsupported");
|
|
10021
10025
|
var Dr = /* @__PURE__ */ Symbol("checkPath");
|
|
10022
10026
|
var ws = /* @__PURE__ */ Symbol("stripAbsolutePath");
|
|
10023
|
-
var
|
|
10027
|
+
var yt = /* @__PURE__ */ Symbol("mkdir");
|
|
10024
10028
|
var O = /* @__PURE__ */ Symbol("onError");
|
|
10025
10029
|
var yi = /* @__PURE__ */ Symbol("pending");
|
|
10026
10030
|
var Ar = /* @__PURE__ */ Symbol("pend");
|
|
@@ -10028,8 +10032,8 @@ var Xt = /* @__PURE__ */ Symbol("unpend");
|
|
|
10028
10032
|
var Ss = /* @__PURE__ */ Symbol("ended");
|
|
10029
10033
|
var ys = /* @__PURE__ */ Symbol("maybeClose");
|
|
10030
10034
|
var Os = /* @__PURE__ */ Symbol("skip");
|
|
10031
|
-
var
|
|
10032
|
-
var
|
|
10035
|
+
var ge = /* @__PURE__ */ Symbol("doChown");
|
|
10036
|
+
var be = /* @__PURE__ */ Symbol("uid");
|
|
10033
10037
|
var _e = /* @__PURE__ */ Symbol("gid");
|
|
10034
10038
|
var Oe = /* @__PURE__ */ Symbol("checkedCwd");
|
|
10035
10039
|
var no = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
@@ -10122,9 +10126,9 @@ var qt = class extends st {
|
|
|
10122
10126
|
if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
|
|
10123
10127
|
if (this.win32) {
|
|
10124
10128
|
let { root: r } = R.win32.parse(String(t.absolute));
|
|
10125
|
-
t.absolute = r +
|
|
10129
|
+
t.absolute = r + Qi(String(t.absolute).slice(r.length));
|
|
10126
10130
|
let { root: n } = R.win32.parse(t.path);
|
|
10127
|
-
t.path = n +
|
|
10131
|
+
t.path = n + Qi(t.path.slice(n.length));
|
|
10128
10132
|
}
|
|
10129
10133
|
return true;
|
|
10130
10134
|
}
|
|
@@ -10147,19 +10151,19 @@ var qt = class extends st {
|
|
|
10147
10151
|
[O](t, e) {
|
|
10148
10152
|
t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
|
|
10149
10153
|
}
|
|
10150
|
-
[
|
|
10154
|
+
[yt](t, e, i) {
|
|
10151
10155
|
wr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
|
|
10152
10156
|
}
|
|
10153
|
-
[
|
|
10157
|
+
[ge](t) {
|
|
10154
10158
|
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;
|
|
10155
10159
|
}
|
|
10156
|
-
[
|
|
10160
|
+
[be](t) {
|
|
10157
10161
|
return Ir(this.uid, t.uid, this.processUid);
|
|
10158
10162
|
}
|
|
10159
10163
|
[_e](t) {
|
|
10160
10164
|
return Ir(this.gid, t.gid, this.processGid);
|
|
10161
10165
|
}
|
|
10162
|
-
[
|
|
10166
|
+
[bs](t, e) {
|
|
10163
10167
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt2(String(t.absolute), { flags: fs2(t.size), mode: i, autoClose: false });
|
|
10164
10168
|
r.on("error", (a) => {
|
|
10165
10169
|
r.fd && u.close(r.fd, () => {
|
|
@@ -10182,9 +10186,9 @@ var qt = class extends st {
|
|
|
10182
10186
|
let c = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
|
|
10183
10187
|
u.futimes(l, c, d, (S) => S ? u.utimes(a, c, d, (T) => o(T && S)) : o());
|
|
10184
10188
|
}
|
|
10185
|
-
if (typeof l == "number" && this[
|
|
10189
|
+
if (typeof l == "number" && this[ge](t)) {
|
|
10186
10190
|
n++;
|
|
10187
|
-
let c = this[
|
|
10191
|
+
let c = this[be](t), d = this[_e](t);
|
|
10188
10192
|
typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (S) => S ? u.chown(a, c, d, (T) => o(T && S)) : o());
|
|
10189
10193
|
}
|
|
10190
10194
|
o();
|
|
@@ -10196,7 +10200,7 @@ var qt = class extends st {
|
|
|
10196
10200
|
}
|
|
10197
10201
|
[_s](t, e) {
|
|
10198
10202
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
|
|
10199
|
-
this[
|
|
10203
|
+
this[yt](String(t.absolute), i, (r) => {
|
|
10200
10204
|
if (r) {
|
|
10201
10205
|
this[O](r, t), e();
|
|
10202
10206
|
return;
|
|
@@ -10204,7 +10208,7 @@ var qt = class extends st {
|
|
|
10204
10208
|
let n = 1, o = () => {
|
|
10205
10209
|
--n === 0 && (e(), this[Xt](), t.resume());
|
|
10206
10210
|
};
|
|
10207
|
-
t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[
|
|
10211
|
+
t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[ge](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
|
|
10208
10212
|
});
|
|
10209
10213
|
}
|
|
10210
10214
|
[Nr](t) {
|
|
@@ -10228,7 +10232,7 @@ var qt = class extends st {
|
|
|
10228
10232
|
let h = R.resolve(e, o);
|
|
10229
10233
|
u.lstat(h, (a, l) => {
|
|
10230
10234
|
if (a) return r();
|
|
10231
|
-
if (l?.isSymbolicLink()) return n(new
|
|
10235
|
+
if (l?.isSymbolicLink()) return n(new St(h, R.resolve(h, i.join("/"))));
|
|
10232
10236
|
this[Re](t, h, i, r, n);
|
|
10233
10237
|
});
|
|
10234
10238
|
}
|
|
@@ -10241,7 +10245,7 @@ var qt = class extends st {
|
|
|
10241
10245
|
[Os](t) {
|
|
10242
10246
|
this[Xt](), t.resume();
|
|
10243
10247
|
}
|
|
10244
|
-
[
|
|
10248
|
+
[gs](t, e) {
|
|
10245
10249
|
return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Te;
|
|
10246
10250
|
}
|
|
10247
10251
|
[Rs](t) {
|
|
@@ -10253,7 +10257,7 @@ var qt = class extends st {
|
|
|
10253
10257
|
let i = (h) => {
|
|
10254
10258
|
e(h);
|
|
10255
10259
|
}, r = () => {
|
|
10256
|
-
this[
|
|
10260
|
+
this[yt](this.cwd, this.dmode, (h) => {
|
|
10257
10261
|
if (h) {
|
|
10258
10262
|
this[O](h, t), i();
|
|
10259
10263
|
return;
|
|
@@ -10263,7 +10267,7 @@ var qt = class extends st {
|
|
|
10263
10267
|
}, n = () => {
|
|
10264
10268
|
if (t.absolute !== this.cwd) {
|
|
10265
10269
|
let h = f(R.dirname(String(t.absolute)));
|
|
10266
|
-
if (h !== this.cwd) return this[
|
|
10270
|
+
if (h !== this.cwd) return this[yt](h, this.dmode, (a) => {
|
|
10267
10271
|
if (a) {
|
|
10268
10272
|
this[O](a, t), i();
|
|
10269
10273
|
return;
|
|
@@ -10278,7 +10282,7 @@ var qt = class extends st {
|
|
|
10278
10282
|
this[Os](t), i();
|
|
10279
10283
|
return;
|
|
10280
10284
|
}
|
|
10281
|
-
if (h || this[
|
|
10285
|
+
if (h || this[gs](t, a)) return this[P](null, t, i);
|
|
10282
10286
|
if (a.isDirectory()) {
|
|
10283
10287
|
if (t.type === "Directory") {
|
|
10284
10288
|
let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
|
|
@@ -10301,7 +10305,7 @@ var qt = class extends st {
|
|
|
10301
10305
|
case "File":
|
|
10302
10306
|
case "OldFile":
|
|
10303
10307
|
case "ContiguousFile":
|
|
10304
|
-
return this[
|
|
10308
|
+
return this[bs](e, i);
|
|
10305
10309
|
case "Link":
|
|
10306
10310
|
return this[Lr](e, i);
|
|
10307
10311
|
case "SymbolicLink":
|
|
@@ -10332,20 +10336,20 @@ var xe = class extends qt {
|
|
|
10332
10336
|
}
|
|
10333
10337
|
[Rs](t) {
|
|
10334
10338
|
if (!this[Oe]) {
|
|
10335
|
-
let n = this[
|
|
10339
|
+
let n = this[yt](this.cwd, this.dmode);
|
|
10336
10340
|
if (n) return this[O](n, t);
|
|
10337
10341
|
this[Oe] = true;
|
|
10338
10342
|
}
|
|
10339
10343
|
if (t.absolute !== this.cwd) {
|
|
10340
10344
|
let n = f(R.dirname(String(t.absolute)));
|
|
10341
10345
|
if (n !== this.cwd) {
|
|
10342
|
-
let o = this[
|
|
10346
|
+
let o = this[yt](n, this.dmode);
|
|
10343
10347
|
if (o) return this[O](o, t);
|
|
10344
10348
|
}
|
|
10345
10349
|
}
|
|
10346
10350
|
let [e, i] = ye(() => u.lstatSync(String(t.absolute)));
|
|
10347
10351
|
if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Os](t);
|
|
10348
|
-
if (e || this[
|
|
10352
|
+
if (e || this[gs](t, i)) return this[P](null, t);
|
|
10349
10353
|
if (i.isDirectory()) {
|
|
10350
10354
|
if (t.type === "Directory") {
|
|
10351
10355
|
let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? ye(() => {
|
|
@@ -10359,7 +10363,7 @@ var xe = class extends qt {
|
|
|
10359
10363
|
let [r] = t.absolute === this.cwd ? [] : ye(() => ao(String(t.absolute)));
|
|
10360
10364
|
this[P](r, t);
|
|
10361
10365
|
}
|
|
10362
|
-
[
|
|
10366
|
+
[bs](t, e) {
|
|
10363
10367
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
|
|
10364
10368
|
let a;
|
|
10365
10369
|
try {
|
|
@@ -10395,8 +10399,8 @@ var xe = class extends qt {
|
|
|
10395
10399
|
}
|
|
10396
10400
|
}
|
|
10397
10401
|
}
|
|
10398
|
-
if (this[
|
|
10399
|
-
let a = this[
|
|
10402
|
+
if (this[ge](t)) {
|
|
10403
|
+
let a = this[be](t), l = this[_e](t);
|
|
10400
10404
|
try {
|
|
10401
10405
|
u.fchownSync(n, Number(a), Number(l));
|
|
10402
10406
|
} catch (c) {
|
|
@@ -10411,7 +10415,7 @@ var xe = class extends qt {
|
|
|
10411
10415
|
});
|
|
10412
10416
|
}
|
|
10413
10417
|
[_s](t, e) {
|
|
10414
|
-
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[
|
|
10418
|
+
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[yt](String(t.absolute), i);
|
|
10415
10419
|
if (r) {
|
|
10416
10420
|
this[O](r, t), e();
|
|
10417
10421
|
return;
|
|
@@ -10420,13 +10424,13 @@ var xe = class extends qt {
|
|
|
10420
10424
|
u.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
|
|
10421
10425
|
} catch {
|
|
10422
10426
|
}
|
|
10423
|
-
if (this[
|
|
10424
|
-
u.chownSync(String(t.absolute), Number(this[
|
|
10427
|
+
if (this[ge](t)) try {
|
|
10428
|
+
u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
|
|
10425
10429
|
} catch {
|
|
10426
10430
|
}
|
|
10427
10431
|
e(), t.resume();
|
|
10428
10432
|
}
|
|
10429
|
-
[
|
|
10433
|
+
[yt](t, e) {
|
|
10430
10434
|
try {
|
|
10431
10435
|
return yr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
|
|
10432
10436
|
} catch (i) {
|
|
@@ -10440,7 +10444,7 @@ var xe = class extends qt {
|
|
|
10440
10444
|
o = R.resolve(o, h);
|
|
10441
10445
|
let [a, l] = ye(() => u.lstatSync(o));
|
|
10442
10446
|
if (a) return r();
|
|
10443
|
-
if (l.isSymbolicLink()) return n(new
|
|
10447
|
+
if (l.isSymbolicLink()) return n(new St(o, R.resolve(e, i.join("/"))));
|
|
10444
10448
|
}
|
|
10445
10449
|
r();
|
|
10446
10450
|
}
|
|
@@ -10454,16 +10458,16 @@ var xe = class extends qt {
|
|
|
10454
10458
|
}
|
|
10455
10459
|
};
|
|
10456
10460
|
var lo = (s3) => {
|
|
10457
|
-
let t = new xe(s3), e = s3.file, i =
|
|
10461
|
+
let t = new xe(s3), e = s3.file, i = kr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
|
|
10458
10462
|
new Be(e, { readSize: r, size: i.size }).pipe(t);
|
|
10459
10463
|
};
|
|
10460
10464
|
var co = (s3, t) => {
|
|
10461
10465
|
let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
10462
10466
|
return new Promise((o, h) => {
|
|
10463
|
-
e.on("error", h), e.on("close", o),
|
|
10467
|
+
e.on("error", h), e.on("close", o), kr.stat(r, (a, l) => {
|
|
10464
10468
|
if (a) h(a);
|
|
10465
10469
|
else {
|
|
10466
|
-
let c = new
|
|
10470
|
+
let c = new _t(r, { readSize: i, size: l.size });
|
|
10467
10471
|
c.on("error", h), c.pipe(e);
|
|
10468
10472
|
}
|
|
10469
10473
|
});
|
|
@@ -10473,7 +10477,7 @@ var fo = K(lo, co, (s3) => new xe(s3), (s3) => new qt(s3), (s3, t) => {
|
|
|
10473
10477
|
t?.length && $i(s3, t);
|
|
10474
10478
|
});
|
|
10475
10479
|
var uo = (s3, t) => {
|
|
10476
|
-
let e = new
|
|
10480
|
+
let e = new Ft(s3), i = true, r, n;
|
|
10477
10481
|
try {
|
|
10478
10482
|
try {
|
|
10479
10483
|
r = v.openSync(s3.file, "r+");
|
|
@@ -10487,7 +10491,7 @@ var uo = (s3, t) => {
|
|
|
10487
10491
|
if (d = v.readSync(r, h, c, h.length - c, n + c), n === 0 && h[0] === 31 && h[1] === 139) throw new Error("cannot append to compressed archives");
|
|
10488
10492
|
if (!d) break t;
|
|
10489
10493
|
}
|
|
10490
|
-
let a = new
|
|
10494
|
+
let a = new k(h);
|
|
10491
10495
|
if (!a.cksumValid) break;
|
|
10492
10496
|
let l = 512 * Math.ceil((a.size || 0) / 512);
|
|
10493
10497
|
if (n + l + 512 > o.size) break;
|
|
@@ -10507,7 +10511,7 @@ var mo = (s3, t, e, i, r) => {
|
|
|
10507
10511
|
};
|
|
10508
10512
|
var po = (s3, t) => {
|
|
10509
10513
|
t = Array.from(t);
|
|
10510
|
-
let e = new
|
|
10514
|
+
let e = new wt(s3), i = (n, o, h) => {
|
|
10511
10515
|
let a = (T, N) => {
|
|
10512
10516
|
T ? v.close(n, (E) => h(T)) : h(null, N);
|
|
10513
10517
|
}, l = 0;
|
|
@@ -10517,7 +10521,7 @@ var po = (s3, t) => {
|
|
|
10517
10521
|
if (c += N, c < 512 && N) return v.read(n, d, c, d.length - c, l + c, S);
|
|
10518
10522
|
if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
|
|
10519
10523
|
if (c < 512) return a(null, l);
|
|
10520
|
-
let E = new
|
|
10524
|
+
let E = new k(d);
|
|
10521
10525
|
if (!E.cksumValid) return a(null, l);
|
|
10522
10526
|
let x = 512 * Math.ceil((E.size ?? 0) / 512);
|
|
10523
10527
|
if (l + x + 512 > o || (l += x + 512, l >= o)) return a(null, l);
|
|
@@ -10544,11 +10548,11 @@ var po = (s3, t) => {
|
|
|
10544
10548
|
};
|
|
10545
10549
|
var Eo = (s3, t) => {
|
|
10546
10550
|
t.forEach((e) => {
|
|
10547
|
-
e.charAt(0) === "@" ?
|
|
10551
|
+
e.charAt(0) === "@" ? Ct({ file: Fr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
10548
10552
|
}), s3.end();
|
|
10549
10553
|
};
|
|
10550
10554
|
var wo = async (s3, t) => {
|
|
10551
|
-
for (let e of t) e.charAt(0) === "@" ? await
|
|
10555
|
+
for (let e of t) e.charAt(0) === "@" ? await Ct({ file: Fr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
10552
10556
|
s3.end();
|
|
10553
10557
|
};
|
|
10554
10558
|
var vt = K(uo, po, () => {
|
|
@@ -10556,7 +10560,7 @@ var vt = K(uo, po, () => {
|
|
|
10556
10560
|
}, () => {
|
|
10557
10561
|
throw new TypeError("file is required");
|
|
10558
10562
|
}, (s3, t) => {
|
|
10559
|
-
if (!
|
|
10563
|
+
if (!Fs(s3)) throw new TypeError("file is required");
|
|
10560
10564
|
if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
|
|
10561
10565
|
if (!t?.length) throw new TypeError("no paths specified to add/replace");
|
|
10562
10566
|
});
|
|
@@ -10575,7 +10579,7 @@ function normalize(filename2) {
|
|
|
10575
10579
|
}
|
|
10576
10580
|
async function getFileList(filename2) {
|
|
10577
10581
|
const entries = [];
|
|
10578
|
-
await
|
|
10582
|
+
await Ct({
|
|
10579
10583
|
file: filename2,
|
|
10580
10584
|
strict: true,
|
|
10581
10585
|
onentry: (entry) => entries.push(entry)
|
|
@@ -11561,6 +11565,7 @@ function* noProtocolDependencies(pkg, pkgAst) {
|
|
|
11561
11565
|
|
|
11562
11566
|
// src/rules/obsolete-dependency.ts
|
|
11563
11567
|
var obsolete = [
|
|
11568
|
+
{ package: "array-includes", message: `use native "Array.includes(...)" instead` },
|
|
11564
11569
|
{ package: "make-dir", message: `use native "fs.mkdir(..., { recursive: true })" instead` },
|
|
11565
11570
|
{ package: "mkdirp", message: `use native "fs.mkdir(..., { recursive: true })" instead` },
|
|
11566
11571
|
{ package: "stable", message: `Array#sort is stable in all current implementations` },
|