npm-pkg-lint 5.1.3 → 5.1.4
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 +807 -807
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7718,85 +7718,85 @@ function isBlacklisted(filename2) {
|
|
|
7718
7718
|
import fs3 from "node:fs";
|
|
7719
7719
|
|
|
7720
7720
|
// node_modules/tar/dist/esm/index.min.js
|
|
7721
|
-
import
|
|
7721
|
+
import $r from "events";
|
|
7722
7722
|
import I from "fs";
|
|
7723
7723
|
import { EventEmitter as Li } from "node:events";
|
|
7724
|
-
import
|
|
7725
|
-
import { StringDecoder as
|
|
7726
|
-
import
|
|
7727
|
-
import
|
|
7728
|
-
import { dirname as
|
|
7729
|
-
import { EventEmitter as
|
|
7724
|
+
import As from "node:stream";
|
|
7725
|
+
import { StringDecoder as Pr } from "node:string_decoder";
|
|
7726
|
+
import hr from "node:path";
|
|
7727
|
+
import Kt from "node:fs";
|
|
7728
|
+
import { dirname as Nn, parse as Dn } from "path";
|
|
7729
|
+
import { EventEmitter as On } from "events";
|
|
7730
7730
|
import Pi from "assert";
|
|
7731
7731
|
import { Buffer as Ot } from "buffer";
|
|
7732
|
-
import * as
|
|
7733
|
-
import
|
|
7732
|
+
import * as Ms from "zlib";
|
|
7733
|
+
import Jr from "zlib";
|
|
7734
7734
|
import { posix as Zt } from "node:path";
|
|
7735
|
-
import { basename as
|
|
7735
|
+
import { basename as yn } from "node:path";
|
|
7736
7736
|
import ui from "fs";
|
|
7737
7737
|
import $ from "fs";
|
|
7738
|
-
import
|
|
7738
|
+
import qs from "path";
|
|
7739
7739
|
import { win32 as Cn } from "node:path";
|
|
7740
|
-
import
|
|
7740
|
+
import nr from "path";
|
|
7741
7741
|
import kr from "node:fs";
|
|
7742
|
-
import
|
|
7742
|
+
import no from "node:assert";
|
|
7743
7743
|
import { randomBytes as Cr } from "node:crypto";
|
|
7744
7744
|
import u from "node:fs";
|
|
7745
7745
|
import R from "node:path";
|
|
7746
|
-
import
|
|
7746
|
+
import dr from "fs";
|
|
7747
7747
|
import Ei from "node:fs";
|
|
7748
|
-
import
|
|
7749
|
-
import
|
|
7750
|
-
import
|
|
7748
|
+
import Ee from "node:path";
|
|
7749
|
+
import k from "node:fs";
|
|
7750
|
+
import jn from "node:fs/promises";
|
|
7751
7751
|
import wi from "node:path";
|
|
7752
|
-
import { join as
|
|
7752
|
+
import { join as _r } from "node:path";
|
|
7753
7753
|
import v from "node:fs";
|
|
7754
|
-
import
|
|
7755
|
-
var
|
|
7756
|
-
var
|
|
7757
|
-
for (var e in t)
|
|
7754
|
+
import vr from "node:path";
|
|
7755
|
+
var Mr = Object.defineProperty;
|
|
7756
|
+
var Br = (s3, t) => {
|
|
7757
|
+
for (var e in t) Mr(s3, e, { get: t[e], enumerable: true });
|
|
7758
7758
|
};
|
|
7759
|
-
var
|
|
7760
|
-
var
|
|
7761
|
-
var
|
|
7762
|
-
var
|
|
7759
|
+
var xs = typeof process == "object" && process ? process : { stdout: null, stderr: null };
|
|
7760
|
+
var zr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof As || Ur(s3) || Hr(s3));
|
|
7761
|
+
var Ur = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Li && typeof s3.pipe == "function" && s3.pipe !== As.Writable.prototype.pipe;
|
|
7762
|
+
var Hr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Li && typeof s3.write == "function" && typeof s3.end == "function";
|
|
7763
7763
|
var q = /* @__PURE__ */ Symbol("EOF");
|
|
7764
7764
|
var Q = /* @__PURE__ */ Symbol("maybeEmitEnd");
|
|
7765
7765
|
var rt = /* @__PURE__ */ Symbol("emittedEnd");
|
|
7766
|
-
var
|
|
7767
|
-
var
|
|
7768
|
-
var
|
|
7769
|
-
var
|
|
7770
|
-
var
|
|
7771
|
-
var
|
|
7766
|
+
var Le = /* @__PURE__ */ Symbol("emittingEnd");
|
|
7767
|
+
var qt = /* @__PURE__ */ Symbol("emittedError");
|
|
7768
|
+
var Ne = /* @__PURE__ */ Symbol("closed");
|
|
7769
|
+
var Ls = /* @__PURE__ */ Symbol("read");
|
|
7770
|
+
var De = /* @__PURE__ */ Symbol("flush");
|
|
7771
|
+
var Ns = /* @__PURE__ */ Symbol("flushChunk");
|
|
7772
7772
|
var z = /* @__PURE__ */ Symbol("encoding");
|
|
7773
7773
|
var Mt = /* @__PURE__ */ Symbol("decoder");
|
|
7774
7774
|
var g = /* @__PURE__ */ Symbol("flowing");
|
|
7775
|
-
var
|
|
7775
|
+
var Qt = /* @__PURE__ */ Symbol("paused");
|
|
7776
7776
|
var Bt = /* @__PURE__ */ Symbol("resume");
|
|
7777
7777
|
var b = /* @__PURE__ */ Symbol("buffer");
|
|
7778
7778
|
var D = /* @__PURE__ */ Symbol("pipes");
|
|
7779
7779
|
var _ = /* @__PURE__ */ Symbol("bufferLength");
|
|
7780
7780
|
var gi = /* @__PURE__ */ Symbol("bufferPush");
|
|
7781
|
-
var
|
|
7781
|
+
var Ae = /* @__PURE__ */ Symbol("bufferShift");
|
|
7782
7782
|
var L = /* @__PURE__ */ Symbol("objectMode");
|
|
7783
7783
|
var w = /* @__PURE__ */ Symbol("destroyed");
|
|
7784
7784
|
var bi = /* @__PURE__ */ Symbol("error");
|
|
7785
7785
|
var _i = /* @__PURE__ */ Symbol("emitData");
|
|
7786
|
-
var
|
|
7786
|
+
var Ds = /* @__PURE__ */ Symbol("emitEnd");
|
|
7787
7787
|
var Oi = /* @__PURE__ */ Symbol("emitEnd2");
|
|
7788
7788
|
var Z = /* @__PURE__ */ Symbol("async");
|
|
7789
7789
|
var Ti = /* @__PURE__ */ Symbol("abort");
|
|
7790
|
-
var
|
|
7791
|
-
var
|
|
7790
|
+
var Ie = /* @__PURE__ */ Symbol("aborted");
|
|
7791
|
+
var Jt = /* @__PURE__ */ Symbol("signal");
|
|
7792
7792
|
var Rt = /* @__PURE__ */ Symbol("dataListeners");
|
|
7793
|
-
var
|
|
7794
|
-
var
|
|
7795
|
-
var
|
|
7796
|
-
var
|
|
7797
|
-
var
|
|
7798
|
-
var
|
|
7799
|
-
var
|
|
7793
|
+
var F = /* @__PURE__ */ Symbol("discarded");
|
|
7794
|
+
var jt = (s3) => Promise.resolve().then(s3);
|
|
7795
|
+
var Wr = (s3) => s3();
|
|
7796
|
+
var Gr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
|
|
7797
|
+
var Zr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
|
|
7798
|
+
var Yr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
|
|
7799
|
+
var Fe = class {
|
|
7800
7800
|
src;
|
|
7801
7801
|
dest;
|
|
7802
7802
|
opts;
|
|
@@ -7813,7 +7813,7 @@ var ke = class {
|
|
|
7813
7813
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
7814
7814
|
}
|
|
7815
7815
|
};
|
|
7816
|
-
var xi = class extends
|
|
7816
|
+
var xi = class extends Fe {
|
|
7817
7817
|
unpipe() {
|
|
7818
7818
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
7819
7819
|
}
|
|
@@ -7821,11 +7821,11 @@ var xi = class extends ke {
|
|
|
7821
7821
|
super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
|
|
7822
7822
|
}
|
|
7823
7823
|
};
|
|
7824
|
-
var
|
|
7825
|
-
var
|
|
7824
|
+
var Kr = (s3) => !!s3.objectMode;
|
|
7825
|
+
var Vr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
|
|
7826
7826
|
var A = class extends Li {
|
|
7827
7827
|
[g] = false;
|
|
7828
|
-
[
|
|
7828
|
+
[Qt] = false;
|
|
7829
7829
|
[D] = [];
|
|
7830
7830
|
[b] = [];
|
|
7831
7831
|
[L];
|
|
@@ -7834,23 +7834,23 @@ var A = class extends Li {
|
|
|
7834
7834
|
[Mt];
|
|
7835
7835
|
[q] = false;
|
|
7836
7836
|
[rt] = false;
|
|
7837
|
+
[Le] = false;
|
|
7837
7838
|
[Ne] = false;
|
|
7838
|
-
[
|
|
7839
|
-
[Qt] = null;
|
|
7839
|
+
[qt] = null;
|
|
7840
7840
|
[_] = 0;
|
|
7841
7841
|
[w] = false;
|
|
7842
|
-
[
|
|
7843
|
-
[
|
|
7842
|
+
[Jt];
|
|
7843
|
+
[Ie] = false;
|
|
7844
7844
|
[Rt] = 0;
|
|
7845
|
-
[
|
|
7845
|
+
[F] = false;
|
|
7846
7846
|
writable = true;
|
|
7847
7847
|
readable = true;
|
|
7848
7848
|
constructor(...t) {
|
|
7849
7849
|
let e = t[0] || {};
|
|
7850
7850
|
if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
|
|
7851
|
-
|
|
7851
|
+
Kr(e) ? (this[L] = true, this[z] = null) : Vr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new Pr(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] });
|
|
7852
7852
|
let { signal: i } = e;
|
|
7853
|
-
i && (this[
|
|
7853
|
+
i && (this[Jt] = i, i.aborted ? this[Ti]() : i.addEventListener("abort", () => this[Ti]()));
|
|
7854
7854
|
}
|
|
7855
7855
|
get bufferLength() {
|
|
7856
7856
|
return this[_];
|
|
@@ -7877,52 +7877,52 @@ var A = class extends Li {
|
|
|
7877
7877
|
this[Z] = this[Z] || !!t;
|
|
7878
7878
|
}
|
|
7879
7879
|
[Ti]() {
|
|
7880
|
-
this[
|
|
7880
|
+
this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
|
|
7881
7881
|
}
|
|
7882
7882
|
get aborted() {
|
|
7883
|
-
return this[
|
|
7883
|
+
return this[Ie];
|
|
7884
7884
|
}
|
|
7885
7885
|
set aborted(t) {
|
|
7886
7886
|
}
|
|
7887
7887
|
write(t, e, i) {
|
|
7888
|
-
if (this[
|
|
7888
|
+
if (this[Ie]) return false;
|
|
7889
7889
|
if (this[q]) throw new Error("write after end");
|
|
7890
7890
|
if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
|
|
7891
7891
|
typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
|
|
7892
|
-
let r = this[Z] ?
|
|
7892
|
+
let r = this[Z] ? jt : Wr;
|
|
7893
7893
|
if (!this[L] && !Buffer.isBuffer(t)) {
|
|
7894
|
-
if (
|
|
7895
|
-
else if (
|
|
7894
|
+
if (Yr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
|
|
7895
|
+
else if (Zr(t)) t = Buffer.from(t);
|
|
7896
7896
|
else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
|
|
7897
7897
|
}
|
|
7898
|
-
return this[L] ? (this[g] && this[_] !== 0 && this[
|
|
7898
|
+
return this[L] ? (this[g] && this[_] !== 0 && this[De](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[De](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]);
|
|
7899
7899
|
}
|
|
7900
7900
|
read(t) {
|
|
7901
7901
|
if (this[w]) return null;
|
|
7902
|
-
if (this[
|
|
7902
|
+
if (this[F] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[Q](), null;
|
|
7903
7903
|
this[L] && (t = null), this[b].length > 1 && !this[L] && (this[b] = [this[z] ? this[b].join("") : Buffer.concat(this[b], this[_])]);
|
|
7904
|
-
let e = this[
|
|
7904
|
+
let e = this[Ls](t || null, this[b][0]);
|
|
7905
7905
|
return this[Q](), e;
|
|
7906
7906
|
}
|
|
7907
|
-
[
|
|
7908
|
-
if (this[L]) this[
|
|
7907
|
+
[Ls](t, e) {
|
|
7908
|
+
if (this[L]) this[Ae]();
|
|
7909
7909
|
else {
|
|
7910
7910
|
let i = e;
|
|
7911
|
-
t === i.length || t === null ? this[
|
|
7911
|
+
t === i.length || t === null ? this[Ae]() : 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);
|
|
7912
7912
|
}
|
|
7913
7913
|
return this.emit("data", e), !this[b].length && !this[q] && this.emit("drain"), e;
|
|
7914
7914
|
}
|
|
7915
7915
|
end(t, e, i) {
|
|
7916
|
-
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[
|
|
7916
|
+
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[Qt]) && this[Q](), this;
|
|
7917
7917
|
}
|
|
7918
7918
|
[Bt]() {
|
|
7919
|
-
this[w] || (!this[Rt] && !this[D].length && (this[
|
|
7919
|
+
this[w] || (!this[Rt] && !this[D].length && (this[F] = true), this[Qt] = false, this[g] = true, this.emit("resume"), this[b].length ? this[De]() : this[q] ? this[Q]() : this.emit("drain"));
|
|
7920
7920
|
}
|
|
7921
7921
|
resume() {
|
|
7922
7922
|
return this[Bt]();
|
|
7923
7923
|
}
|
|
7924
7924
|
pause() {
|
|
7925
|
-
this[g] = false, this[
|
|
7925
|
+
this[g] = false, this[Qt] = true, this[F] = false;
|
|
7926
7926
|
}
|
|
7927
7927
|
get destroyed() {
|
|
7928
7928
|
return this[w];
|
|
@@ -7931,28 +7931,28 @@ var A = class extends Li {
|
|
|
7931
7931
|
return this[g];
|
|
7932
7932
|
}
|
|
7933
7933
|
get paused() {
|
|
7934
|
-
return this[
|
|
7934
|
+
return this[Qt];
|
|
7935
7935
|
}
|
|
7936
7936
|
[gi](t) {
|
|
7937
7937
|
this[L] ? this[_] += 1 : this[_] += t.length, this[b].push(t);
|
|
7938
7938
|
}
|
|
7939
|
-
[
|
|
7939
|
+
[Ae]() {
|
|
7940
7940
|
return this[L] ? this[_] -= 1 : this[_] -= this[b][0].length, this[b].shift();
|
|
7941
7941
|
}
|
|
7942
|
-
[
|
|
7942
|
+
[De](t = false) {
|
|
7943
7943
|
do
|
|
7944
7944
|
;
|
|
7945
|
-
while (this[
|
|
7945
|
+
while (this[Ns](this[Ae]()) && this[b].length);
|
|
7946
7946
|
!t && !this[b].length && !this[q] && this.emit("drain");
|
|
7947
7947
|
}
|
|
7948
|
-
[
|
|
7948
|
+
[Ns](t) {
|
|
7949
7949
|
return this.emit("data", t), this[g];
|
|
7950
7950
|
}
|
|
7951
7951
|
pipe(t, e) {
|
|
7952
7952
|
if (this[w]) return t;
|
|
7953
|
-
this[
|
|
7953
|
+
this[F] = false;
|
|
7954
7954
|
let i = this[rt];
|
|
7955
|
-
return e = e || {}, t ===
|
|
7955
|
+
return e = e || {}, t === xs.stdout || t === xs.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 Fe(this, t, e)), this[Z] ? jt(() => this[Bt]()) : this[Bt]()), t;
|
|
7956
7956
|
}
|
|
7957
7957
|
unpipe(t) {
|
|
7958
7958
|
let e = this[D].find((i) => i.dest === t);
|
|
@@ -7963,12 +7963,12 @@ var A = class extends Li {
|
|
|
7963
7963
|
}
|
|
7964
7964
|
on(t, e) {
|
|
7965
7965
|
let i = super.on(t, e);
|
|
7966
|
-
if (t === "data") this[
|
|
7966
|
+
if (t === "data") this[F] = false, this[Rt]++, !this[D].length && !this[g] && this[Bt]();
|
|
7967
7967
|
else if (t === "readable" && this[_] !== 0) super.emit("readable");
|
|
7968
|
-
else if (
|
|
7969
|
-
else if (t === "error" && this[
|
|
7968
|
+
else if (Gr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
|
|
7969
|
+
else if (t === "error" && this[qt]) {
|
|
7970
7970
|
let r = e;
|
|
7971
|
-
this[Z] ?
|
|
7971
|
+
this[Z] ? jt(() => r.call(this, this[qt])) : r.call(this, this[qt]);
|
|
7972
7972
|
}
|
|
7973
7973
|
return i;
|
|
7974
7974
|
}
|
|
@@ -7977,30 +7977,30 @@ var A = class extends Li {
|
|
|
7977
7977
|
}
|
|
7978
7978
|
off(t, e) {
|
|
7979
7979
|
let i = super.off(t, e);
|
|
7980
|
-
return t === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[
|
|
7980
|
+
return t === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[F] && !this[D].length && (this[g] = false)), i;
|
|
7981
7981
|
}
|
|
7982
7982
|
removeAllListeners(t) {
|
|
7983
7983
|
let e = super.removeAllListeners(t);
|
|
7984
|
-
return (t === "data" || t === void 0) && (this[Rt] = 0, !this[
|
|
7984
|
+
return (t === "data" || t === void 0) && (this[Rt] = 0, !this[F] && !this[D].length && (this[g] = false)), e;
|
|
7985
7985
|
}
|
|
7986
7986
|
get emittedEnd() {
|
|
7987
7987
|
return this[rt];
|
|
7988
7988
|
}
|
|
7989
7989
|
[Q]() {
|
|
7990
|
-
!this[
|
|
7990
|
+
!this[Le] && !this[rt] && !this[w] && this[b].length === 0 && this[q] && (this[Le] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[Le] = false);
|
|
7991
7991
|
}
|
|
7992
7992
|
emit(t, ...e) {
|
|
7993
7993
|
let i = e[0];
|
|
7994
7994
|
if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
|
|
7995
|
-
if (t === "data") return !this[L] && !i ? false : this[Z] ? (
|
|
7996
|
-
if (t === "end") return this[
|
|
7995
|
+
if (t === "data") return !this[L] && !i ? false : this[Z] ? (jt(() => this[_i](i)), true) : this[_i](i);
|
|
7996
|
+
if (t === "end") return this[Ds]();
|
|
7997
7997
|
if (t === "close") {
|
|
7998
|
-
if (this[
|
|
7998
|
+
if (this[Ne] = true, !this[rt] && !this[w]) return false;
|
|
7999
7999
|
let n = super.emit("close");
|
|
8000
8000
|
return this.removeAllListeners("close"), n;
|
|
8001
8001
|
} else if (t === "error") {
|
|
8002
|
-
this[
|
|
8003
|
-
let n = !this[
|
|
8002
|
+
this[qt] = i, super.emit(bi, i);
|
|
8003
|
+
let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
|
|
8004
8004
|
return this[Q](), n;
|
|
8005
8005
|
} else if (t === "resume") {
|
|
8006
8006
|
let n = super.emit("resume");
|
|
@@ -8014,18 +8014,18 @@ var A = class extends Li {
|
|
|
8014
8014
|
}
|
|
8015
8015
|
[_i](t) {
|
|
8016
8016
|
for (let i of this[D]) i.dest.write(t) === false && this.pause();
|
|
8017
|
-
let e = this[
|
|
8017
|
+
let e = this[F] ? false : super.emit("data", t);
|
|
8018
8018
|
return this[Q](), e;
|
|
8019
8019
|
}
|
|
8020
|
-
[
|
|
8021
|
-
return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (
|
|
8020
|
+
[Ds]() {
|
|
8021
|
+
return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (jt(() => this[Oi]()), true) : this[Oi]());
|
|
8022
8022
|
}
|
|
8023
8023
|
[Oi]() {
|
|
8024
8024
|
if (this[Mt]) {
|
|
8025
8025
|
let e = this[Mt].end();
|
|
8026
8026
|
if (e) {
|
|
8027
8027
|
for (let i of this[D]) i.dest.write(e);
|
|
8028
|
-
this[
|
|
8028
|
+
this[F] || super.emit("data", e);
|
|
8029
8029
|
}
|
|
8030
8030
|
}
|
|
8031
8031
|
for (let e of this[D]) e.end();
|
|
@@ -8051,22 +8051,22 @@ var A = class extends Li {
|
|
|
8051
8051
|
});
|
|
8052
8052
|
}
|
|
8053
8053
|
[Symbol.asyncIterator]() {
|
|
8054
|
-
this[
|
|
8054
|
+
this[F] = false;
|
|
8055
8055
|
let t = false, e = async () => (this.pause(), t = true, { value: void 0, done: true });
|
|
8056
8056
|
return { next: () => {
|
|
8057
8057
|
if (t) return e();
|
|
8058
8058
|
let r = this.read();
|
|
8059
8059
|
if (r !== null) return Promise.resolve({ done: false, value: r });
|
|
8060
8060
|
if (this[q]) return e();
|
|
8061
|
-
let n, o,
|
|
8062
|
-
this.off("data",
|
|
8063
|
-
},
|
|
8064
|
-
this.off("error",
|
|
8061
|
+
let n, o, a = (d) => {
|
|
8062
|
+
this.off("data", h), this.off("end", l), this.off(w, c), e(), o(d);
|
|
8063
|
+
}, h = (d) => {
|
|
8064
|
+
this.off("error", a), this.off("end", l), this.off(w, c), this.pause(), n({ value: d, done: !!this[q] });
|
|
8065
8065
|
}, l = () => {
|
|
8066
|
-
this.off("error",
|
|
8067
|
-
}, c = () =>
|
|
8066
|
+
this.off("error", a), this.off("data", h), this.off(w, c), e(), n({ done: true, value: void 0 });
|
|
8067
|
+
}, c = () => a(new Error("stream destroyed"));
|
|
8068
8068
|
return new Promise((d, S) => {
|
|
8069
|
-
o = S, n = d, this.once(w, c), this.once("error",
|
|
8069
|
+
o = S, n = d, this.once(w, c), this.once("error", a), this.once("end", l), this.once("data", h);
|
|
8070
8070
|
});
|
|
8071
8071
|
}, throw: e, return: e, [Symbol.asyncIterator]() {
|
|
8072
8072
|
return this;
|
|
@@ -8074,7 +8074,7 @@ var A = class extends Li {
|
|
|
8074
8074
|
} };
|
|
8075
8075
|
}
|
|
8076
8076
|
[Symbol.iterator]() {
|
|
8077
|
-
this[
|
|
8077
|
+
this[F] = false;
|
|
8078
8078
|
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 = () => {
|
|
8079
8079
|
if (t) return e();
|
|
8080
8080
|
let r = this.read();
|
|
@@ -8087,26 +8087,26 @@ var A = class extends Li {
|
|
|
8087
8087
|
}
|
|
8088
8088
|
destroy(t) {
|
|
8089
8089
|
if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
|
|
8090
|
-
this[w] = true, this[
|
|
8090
|
+
this[w] = true, this[F] = true, this[b].length = 0, this[_] = 0;
|
|
8091
8091
|
let e = this;
|
|
8092
|
-
return typeof e.close == "function" && !this[
|
|
8092
|
+
return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
|
|
8093
8093
|
}
|
|
8094
8094
|
static get isStream() {
|
|
8095
|
-
return
|
|
8095
|
+
return zr;
|
|
8096
8096
|
}
|
|
8097
8097
|
};
|
|
8098
|
-
var
|
|
8098
|
+
var Xr = I.writev;
|
|
8099
8099
|
var ot = /* @__PURE__ */ Symbol("_autoClose");
|
|
8100
8100
|
var H = /* @__PURE__ */ Symbol("_close");
|
|
8101
|
-
var
|
|
8101
|
+
var te = /* @__PURE__ */ Symbol("_ended");
|
|
8102
8102
|
var m = /* @__PURE__ */ Symbol("_fd");
|
|
8103
8103
|
var Ni = /* @__PURE__ */ Symbol("_finished");
|
|
8104
8104
|
var j = /* @__PURE__ */ Symbol("_flags");
|
|
8105
8105
|
var Di = /* @__PURE__ */ Symbol("_flush");
|
|
8106
|
-
var
|
|
8107
|
-
var
|
|
8108
|
-
var
|
|
8109
|
-
var
|
|
8106
|
+
var Ci = /* @__PURE__ */ Symbol("_handleChunk");
|
|
8107
|
+
var ki = /* @__PURE__ */ Symbol("_makeBuf");
|
|
8108
|
+
var ie = /* @__PURE__ */ Symbol("_mode");
|
|
8109
|
+
var Ce = /* @__PURE__ */ Symbol("_needDrain");
|
|
8110
8110
|
var Ut = /* @__PURE__ */ Symbol("_onerror");
|
|
8111
8111
|
var Ht = /* @__PURE__ */ Symbol("_onopen");
|
|
8112
8112
|
var Ai = /* @__PURE__ */ Symbol("_onread");
|
|
@@ -8118,11 +8118,11 @@ var Y = /* @__PURE__ */ Symbol("_queue");
|
|
|
8118
8118
|
var zt = /* @__PURE__ */ Symbol("_read");
|
|
8119
8119
|
var Ii = /* @__PURE__ */ Symbol("_readSize");
|
|
8120
8120
|
var J = /* @__PURE__ */ Symbol("_reading");
|
|
8121
|
-
var
|
|
8122
|
-
var
|
|
8123
|
-
var
|
|
8121
|
+
var ee = /* @__PURE__ */ Symbol("_remain");
|
|
8122
|
+
var Fi = /* @__PURE__ */ Symbol("_size");
|
|
8123
|
+
var ke = /* @__PURE__ */ Symbol("_write");
|
|
8124
8124
|
var gt = /* @__PURE__ */ Symbol("_writing");
|
|
8125
|
-
var
|
|
8125
|
+
var ve = /* @__PURE__ */ Symbol("_defaultFlag");
|
|
8126
8126
|
var bt = /* @__PURE__ */ Symbol("_errored");
|
|
8127
8127
|
var _t = class extends A {
|
|
8128
8128
|
[bt] = false;
|
|
@@ -8130,12 +8130,12 @@ var _t = class extends A {
|
|
|
8130
8130
|
[U];
|
|
8131
8131
|
[Ii];
|
|
8132
8132
|
[J] = false;
|
|
8133
|
-
[
|
|
8134
|
-
[
|
|
8133
|
+
[Fi];
|
|
8134
|
+
[ee];
|
|
8135
8135
|
[ot];
|
|
8136
8136
|
constructor(t, e) {
|
|
8137
8137
|
if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
|
|
8138
|
-
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[
|
|
8138
|
+
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[Fi] = typeof e.size == "number" ? e.size : 1 / 0, this[ee] = this[Fi], this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht]();
|
|
8139
8139
|
}
|
|
8140
8140
|
get fd() {
|
|
8141
8141
|
return this[m];
|
|
@@ -8155,19 +8155,19 @@ var _t = class extends A {
|
|
|
8155
8155
|
[Ht](t, e) {
|
|
8156
8156
|
t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
|
|
8157
8157
|
}
|
|
8158
|
-
[
|
|
8159
|
-
return Buffer.allocUnsafe(Math.min(this[Ii], this[
|
|
8158
|
+
[ki]() {
|
|
8159
|
+
return Buffer.allocUnsafe(Math.min(this[Ii], this[ee]));
|
|
8160
8160
|
}
|
|
8161
8161
|
[zt]() {
|
|
8162
8162
|
if (!this[J]) {
|
|
8163
8163
|
this[J] = true;
|
|
8164
|
-
let t = this[
|
|
8164
|
+
let t = this[ki]();
|
|
8165
8165
|
if (t.length === 0) return process.nextTick(() => this[Ai](null, 0, t));
|
|
8166
8166
|
I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ai](e, i, r));
|
|
8167
8167
|
}
|
|
8168
8168
|
}
|
|
8169
8169
|
[Ai](t, e, i) {
|
|
8170
|
-
this[J] = false, t ? this[Ut](t) : this[
|
|
8170
|
+
this[J] = false, t ? this[Ut](t) : this[Ci](e, i) && this[zt]();
|
|
8171
8171
|
}
|
|
8172
8172
|
[H]() {
|
|
8173
8173
|
if (this[ot] && typeof this[m] == "number") {
|
|
@@ -8178,9 +8178,9 @@ var _t = class extends A {
|
|
|
8178
8178
|
[Ut](t) {
|
|
8179
8179
|
this[J] = true, this[H](), this.emit("error", t);
|
|
8180
8180
|
}
|
|
8181
|
-
[
|
|
8181
|
+
[Ci](t, e) {
|
|
8182
8182
|
let i = false;
|
|
8183
|
-
return this[
|
|
8183
|
+
return this[ee] -= t, t > 0 && (i = super.write(t < e.length ? e.subarray(0, t) : e)), (t === 0 || this[ee] <= 0) && (i = false, this[H](), super.end()), i;
|
|
8184
8184
|
}
|
|
8185
8185
|
emit(t, ...e) {
|
|
8186
8186
|
switch (t) {
|
|
@@ -8196,7 +8196,7 @@ var _t = class extends A {
|
|
|
8196
8196
|
}
|
|
8197
8197
|
}
|
|
8198
8198
|
};
|
|
8199
|
-
var
|
|
8199
|
+
var Me = class extends _t {
|
|
8200
8200
|
[ht]() {
|
|
8201
8201
|
let t = true;
|
|
8202
8202
|
try {
|
|
@@ -8211,8 +8211,8 @@ var Be = class extends _t {
|
|
|
8211
8211
|
if (!this[J]) {
|
|
8212
8212
|
this[J] = true;
|
|
8213
8213
|
do {
|
|
8214
|
-
let e = this[
|
|
8215
|
-
if (!this[
|
|
8214
|
+
let e = this[ki](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
|
|
8215
|
+
if (!this[Ci](i, e)) break;
|
|
8216
8216
|
} while (true);
|
|
8217
8217
|
this[J] = false;
|
|
8218
8218
|
}
|
|
@@ -8228,26 +8228,26 @@ var Be = class extends _t {
|
|
|
8228
8228
|
}
|
|
8229
8229
|
}
|
|
8230
8230
|
};
|
|
8231
|
-
var tt2 = class extends
|
|
8231
|
+
var tt2 = class extends $r {
|
|
8232
8232
|
readable = false;
|
|
8233
8233
|
writable = true;
|
|
8234
8234
|
[bt] = false;
|
|
8235
8235
|
[gt] = false;
|
|
8236
|
-
[
|
|
8236
|
+
[te] = false;
|
|
8237
8237
|
[Y] = [];
|
|
8238
|
-
[
|
|
8238
|
+
[Ce] = false;
|
|
8239
8239
|
[U];
|
|
8240
|
-
[
|
|
8240
|
+
[ie];
|
|
8241
8241
|
[ot];
|
|
8242
8242
|
[m];
|
|
8243
|
-
[
|
|
8243
|
+
[ve];
|
|
8244
8244
|
[j];
|
|
8245
8245
|
[Ni] = false;
|
|
8246
8246
|
[nt];
|
|
8247
8247
|
constructor(t, e) {
|
|
8248
|
-
e = e || {}, super(e), this[U] = t, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[
|
|
8248
|
+
e = e || {}, super(e), this[U] = t, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[ie] = 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;
|
|
8249
8249
|
let i = this[nt] !== void 0 ? "r+" : "w";
|
|
8250
|
-
this[
|
|
8250
|
+
this[ve] = e.flags === void 0, this[j] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
|
|
8251
8251
|
}
|
|
8252
8252
|
emit(t, ...e) {
|
|
8253
8253
|
if (t === "error") {
|
|
@@ -8266,29 +8266,29 @@ var tt2 = class extends Vr {
|
|
|
8266
8266
|
this[H](), this[gt] = true, this.emit("error", t);
|
|
8267
8267
|
}
|
|
8268
8268
|
[ht]() {
|
|
8269
|
-
I.open(this[U], this[j], this[
|
|
8269
|
+
I.open(this[U], this[j], this[ie], (t, e) => this[Ht](t, e));
|
|
8270
8270
|
}
|
|
8271
8271
|
[Ht](t, e) {
|
|
8272
|
-
this[
|
|
8272
|
+
this[ve] && this[j] === "r+" && t && t.code === "ENOENT" ? (this[j] = "w", this[ht]()) : t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[gt] || this[Di]());
|
|
8273
8273
|
}
|
|
8274
8274
|
end(t, e) {
|
|
8275
|
-
return t && this.write(t, e), this[
|
|
8275
|
+
return t && this.write(t, e), this[te] = true, !this[gt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
|
|
8276
8276
|
}
|
|
8277
8277
|
write(t, e) {
|
|
8278
|
-
return typeof t == "string" && (t = Buffer.from(t, e)), this[
|
|
8278
|
+
return typeof t == "string" && (t = Buffer.from(t, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[gt] || this[Y].length ? (this[Y].push(t), this[Ce] = true, false) : (this[gt] = true, this[ke](t), true);
|
|
8279
8279
|
}
|
|
8280
|
-
[
|
|
8280
|
+
[ke](t) {
|
|
8281
8281
|
I.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
|
|
8282
8282
|
}
|
|
8283
8283
|
[Pt](t, e) {
|
|
8284
|
-
t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Di]() : (this[gt] = false, this[
|
|
8284
|
+
t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Di]() : (this[gt] = false, this[te] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[Ce] && (this[Ce] = false, this.emit("drain"))));
|
|
8285
8285
|
}
|
|
8286
8286
|
[Di]() {
|
|
8287
|
-
if (this[Y].length === 0) this[
|
|
8288
|
-
else if (this[Y].length === 1) this[
|
|
8287
|
+
if (this[Y].length === 0) this[te] && this[Pt](null, 0);
|
|
8288
|
+
else if (this[Y].length === 1) this[ke](this[Y].pop());
|
|
8289
8289
|
else {
|
|
8290
8290
|
let t = this[Y];
|
|
8291
|
-
this[Y] = [],
|
|
8291
|
+
this[Y] = [], Xr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
|
|
8292
8292
|
}
|
|
8293
8293
|
}
|
|
8294
8294
|
[H]() {
|
|
@@ -8301,13 +8301,13 @@ var tt2 = class extends Vr {
|
|
|
8301
8301
|
var Wt = class extends tt2 {
|
|
8302
8302
|
[ht]() {
|
|
8303
8303
|
let t;
|
|
8304
|
-
if (this[
|
|
8305
|
-
t = I.openSync(this[U], this[j], this[
|
|
8304
|
+
if (this[ve] && this[j] === "r+") try {
|
|
8305
|
+
t = I.openSync(this[U], this[j], this[ie]);
|
|
8306
8306
|
} catch (e) {
|
|
8307
8307
|
if (e?.code === "ENOENT") return this[j] = "w", this[ht]();
|
|
8308
8308
|
throw e;
|
|
8309
8309
|
}
|
|
8310
|
-
else t = I.openSync(this[U], this[j], this[
|
|
8310
|
+
else t = I.openSync(this[U], this[j], this[ie]);
|
|
8311
8311
|
this[Ht](null, t);
|
|
8312
8312
|
}
|
|
8313
8313
|
[H]() {
|
|
@@ -8316,7 +8316,7 @@ var Wt = class extends tt2 {
|
|
|
8316
8316
|
this[m] = void 0, I.closeSync(t), this.emit("close");
|
|
8317
8317
|
}
|
|
8318
8318
|
}
|
|
8319
|
-
[
|
|
8319
|
+
[ke](t) {
|
|
8320
8320
|
let e = true;
|
|
8321
8321
|
try {
|
|
8322
8322
|
this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
|
|
@@ -8328,50 +8328,50 @@ var Wt = class extends tt2 {
|
|
|
8328
8328
|
}
|
|
8329
8329
|
}
|
|
8330
8330
|
};
|
|
8331
|
-
var
|
|
8332
|
-
var
|
|
8333
|
-
var
|
|
8331
|
+
var qr = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
|
|
8332
|
+
var Is = (s3) => !!s3.sync && !!s3.file;
|
|
8333
|
+
var Fs = (s3) => !s3.sync && !!s3.file;
|
|
8334
8334
|
var Cs = (s3) => !!s3.sync && !s3.file;
|
|
8335
8335
|
var ks = (s3) => !s3.sync && !s3.file;
|
|
8336
|
-
var
|
|
8337
|
-
var
|
|
8338
|
-
let t =
|
|
8336
|
+
var vs = (s3) => !!s3.file;
|
|
8337
|
+
var Qr = (s3) => {
|
|
8338
|
+
let t = qr.get(s3);
|
|
8339
8339
|
return t || s3;
|
|
8340
8340
|
};
|
|
8341
|
-
var
|
|
8341
|
+
var se = (s3 = {}) => {
|
|
8342
8342
|
if (!s3) return {};
|
|
8343
8343
|
let t = {};
|
|
8344
8344
|
for (let [e, i] of Object.entries(s3)) {
|
|
8345
|
-
let r =
|
|
8345
|
+
let r = Qr(e);
|
|
8346
8346
|
t[r] = i;
|
|
8347
8347
|
}
|
|
8348
8348
|
return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
|
|
8349
8349
|
};
|
|
8350
|
-
var K = (s3, t, e, i, r) => Object.assign((n = [], o,
|
|
8351
|
-
Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (
|
|
8352
|
-
let
|
|
8353
|
-
if (r?.(
|
|
8354
|
-
if (typeof
|
|
8355
|
-
return s3(
|
|
8356
|
-
} else if (
|
|
8357
|
-
let l = t(
|
|
8358
|
-
return
|
|
8359
|
-
} else if (Cs(
|
|
8360
|
-
if (typeof
|
|
8361
|
-
return e(
|
|
8362
|
-
} else if (ks(
|
|
8363
|
-
if (typeof
|
|
8364
|
-
return i(
|
|
8350
|
+
var K = (s3, t, e, i, r) => Object.assign((n = [], o, a) => {
|
|
8351
|
+
Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (a = o, o = void 0), o = o ? Array.from(o) : [];
|
|
8352
|
+
let h = se(n);
|
|
8353
|
+
if (r?.(h, o), Is(h)) {
|
|
8354
|
+
if (typeof a == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
8355
|
+
return s3(h, o);
|
|
8356
|
+
} else if (Fs(h)) {
|
|
8357
|
+
let l = t(h, o);
|
|
8358
|
+
return a ? l.then(() => a(), a) : l;
|
|
8359
|
+
} else if (Cs(h)) {
|
|
8360
|
+
if (typeof a == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
8361
|
+
return e(h, o);
|
|
8362
|
+
} else if (ks(h)) {
|
|
8363
|
+
if (typeof a == "function") throw new TypeError("callback only supported with file option");
|
|
8364
|
+
return i(h, o);
|
|
8365
8365
|
}
|
|
8366
8366
|
throw new Error("impossible options??");
|
|
8367
8367
|
}, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
|
|
8368
|
-
var
|
|
8369
|
-
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 },
|
|
8370
|
-
var
|
|
8371
|
-
var
|
|
8372
|
-
var
|
|
8373
|
-
var Mi =
|
|
8374
|
-
Ot.concat = s3 ?
|
|
8368
|
+
var jr = Jr.constants || { ZLIB_VERNUM: 4736 };
|
|
8369
|
+
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));
|
|
8370
|
+
var tn = Ot.concat;
|
|
8371
|
+
var Bs = Object.getOwnPropertyDescriptor(Ot, "concat");
|
|
8372
|
+
var en = (s3) => s3;
|
|
8373
|
+
var Mi = Bs?.writable === true || Bs?.set !== void 0 ? (s3) => {
|
|
8374
|
+
Ot.concat = s3 ? en : tn;
|
|
8375
8375
|
} : (s3) => {
|
|
8376
8376
|
};
|
|
8377
8377
|
var Tt = /* @__PURE__ */ Symbol("_superWrite");
|
|
@@ -8386,7 +8386,7 @@ var Gt = class extends Error {
|
|
|
8386
8386
|
}
|
|
8387
8387
|
};
|
|
8388
8388
|
var Bi = /* @__PURE__ */ Symbol("flushFlag");
|
|
8389
|
-
var
|
|
8389
|
+
var re = class extends A {
|
|
8390
8390
|
#t = false;
|
|
8391
8391
|
#i = false;
|
|
8392
8392
|
#s;
|
|
@@ -8405,9 +8405,9 @@ var ne = class extends A {
|
|
|
8405
8405
|
}
|
|
8406
8406
|
constructor(t, e) {
|
|
8407
8407
|
if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
|
|
8408
|
-
if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof
|
|
8408
|
+
if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof Ms[e] != "function") throw new TypeError("Compression method not supported: " + e);
|
|
8409
8409
|
try {
|
|
8410
|
-
this.#e = new
|
|
8410
|
+
this.#e = new Ms[e](t);
|
|
8411
8411
|
} catch (i) {
|
|
8412
8412
|
throw new Gt(i, this.constructor);
|
|
8413
8413
|
}
|
|
@@ -8442,26 +8442,26 @@ var ne = class extends A {
|
|
|
8442
8442
|
let o = this.#e.close;
|
|
8443
8443
|
this.#e.close = () => {
|
|
8444
8444
|
}, Mi(true);
|
|
8445
|
-
let
|
|
8445
|
+
let a;
|
|
8446
8446
|
try {
|
|
8447
8447
|
let l = typeof t[Bi] == "number" ? t[Bi] : this.#s;
|
|
8448
|
-
|
|
8448
|
+
a = this.#e._processChunk(t, l), Mi(false);
|
|
8449
8449
|
} catch (l) {
|
|
8450
8450
|
Mi(false), this.#o(new Gt(l, this.write));
|
|
8451
8451
|
} finally {
|
|
8452
8452
|
this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
|
|
8453
8453
|
}
|
|
8454
8454
|
this.#e && this.#e.on("error", (l) => this.#o(new Gt(l, this.write)));
|
|
8455
|
-
let
|
|
8456
|
-
if (
|
|
8457
|
-
let l =
|
|
8458
|
-
|
|
8459
|
-
for (let c = 1; c <
|
|
8460
|
-
} else
|
|
8461
|
-
return i && i(),
|
|
8455
|
+
let h;
|
|
8456
|
+
if (a) if (Array.isArray(a) && a.length > 0) {
|
|
8457
|
+
let l = a[0];
|
|
8458
|
+
h = this[Tt](Ot.from(l));
|
|
8459
|
+
for (let c = 1; c < a.length; c++) h = this[Tt](a[c]);
|
|
8460
|
+
} else h = this[Tt](Ot.from(a));
|
|
8461
|
+
return i && i(), h;
|
|
8462
8462
|
}
|
|
8463
8463
|
};
|
|
8464
|
-
var
|
|
8464
|
+
var Be = class extends re {
|
|
8465
8465
|
#t;
|
|
8466
8466
|
#i;
|
|
8467
8467
|
constructor(t, e) {
|
|
@@ -8487,7 +8487,7 @@ var Pe = class extends ne {
|
|
|
8487
8487
|
}
|
|
8488
8488
|
}
|
|
8489
8489
|
};
|
|
8490
|
-
var
|
|
8490
|
+
var Pe = class extends Be {
|
|
8491
8491
|
#t;
|
|
8492
8492
|
constructor(t) {
|
|
8493
8493
|
super(t, "Gzip"), this.#t = t && !!t.portable;
|
|
@@ -8496,88 +8496,89 @@ var ze = class extends Pe {
|
|
|
8496
8496
|
return this.#t ? (this.#t = false, t[9] = 255, super[Tt](t)) : super[Tt](t);
|
|
8497
8497
|
}
|
|
8498
8498
|
};
|
|
8499
|
-
var
|
|
8499
|
+
var ze = class extends Be {
|
|
8500
8500
|
constructor(t) {
|
|
8501
8501
|
super(t, "Unzip");
|
|
8502
8502
|
}
|
|
8503
8503
|
};
|
|
8504
|
-
var
|
|
8504
|
+
var Ue = class extends re {
|
|
8505
8505
|
constructor(t, e) {
|
|
8506
8506
|
t = t || {}, t.flush = t.flush || M.BROTLI_OPERATION_PROCESS, t.finishFlush = t.finishFlush || M.BROTLI_OPERATION_FINISH, t.fullFlushFlag = M.BROTLI_OPERATION_FLUSH, super(t, e);
|
|
8507
8507
|
}
|
|
8508
8508
|
};
|
|
8509
|
-
var
|
|
8509
|
+
var He = class extends Ue {
|
|
8510
8510
|
constructor(t) {
|
|
8511
8511
|
super(t, "BrotliCompress");
|
|
8512
8512
|
}
|
|
8513
8513
|
};
|
|
8514
|
-
var
|
|
8514
|
+
var We = class extends Ue {
|
|
8515
8515
|
constructor(t) {
|
|
8516
8516
|
super(t, "BrotliDecompress");
|
|
8517
8517
|
}
|
|
8518
8518
|
};
|
|
8519
|
-
var
|
|
8519
|
+
var Ge = class extends re {
|
|
8520
8520
|
constructor(t, e) {
|
|
8521
8521
|
t = t || {}, t.flush = t.flush || M.ZSTD_e_continue, t.finishFlush = t.finishFlush || M.ZSTD_e_end, t.fullFlushFlag = M.ZSTD_e_flush, super(t, e);
|
|
8522
8522
|
}
|
|
8523
8523
|
};
|
|
8524
|
-
var
|
|
8524
|
+
var Ze = class extends Ge {
|
|
8525
8525
|
constructor(t) {
|
|
8526
8526
|
super(t, "ZstdCompress");
|
|
8527
8527
|
}
|
|
8528
8528
|
};
|
|
8529
|
-
var
|
|
8529
|
+
var Ye = class extends Ge {
|
|
8530
8530
|
constructor(t) {
|
|
8531
8531
|
super(t, "ZstdDecompress");
|
|
8532
8532
|
}
|
|
8533
8533
|
};
|
|
8534
|
-
var
|
|
8535
|
-
if (Number.isSafeInteger(s3)) s3 < 0 ?
|
|
8534
|
+
var Ps = (s3, t) => {
|
|
8535
|
+
if (Number.isSafeInteger(s3)) s3 < 0 ? nn(s3, t) : rn(s3, t);
|
|
8536
8536
|
else throw Error("cannot encode number outside of javascript safe integer range");
|
|
8537
8537
|
return t;
|
|
8538
8538
|
};
|
|
8539
|
-
var
|
|
8539
|
+
var rn = (s3, t) => {
|
|
8540
8540
|
t[0] = 128;
|
|
8541
8541
|
for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
|
|
8542
8542
|
};
|
|
8543
|
-
var
|
|
8543
|
+
var nn = (s3, t) => {
|
|
8544
8544
|
t[0] = 255;
|
|
8545
8545
|
var e = false;
|
|
8546
8546
|
s3 = s3 * -1;
|
|
8547
8547
|
for (var i = t.length; i > 1; i--) {
|
|
8548
8548
|
var r = s3 & 255;
|
|
8549
|
-
s3 = Math.floor(s3 / 256), e ? t[i - 1] =
|
|
8549
|
+
s3 = Math.floor(s3 / 256), e ? t[i - 1] = Us(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = Hs(r));
|
|
8550
8550
|
}
|
|
8551
8551
|
};
|
|
8552
|
-
var
|
|
8553
|
-
let t = s3[0], e = t === 128 ?
|
|
8552
|
+
var zs = (s3) => {
|
|
8553
|
+
let t = s3[0], e = t === 128 ? hn(s3.subarray(1, s3.length)) : t === 255 ? on(s3) : null;
|
|
8554
8554
|
if (e === null) throw Error("invalid base256 encoding");
|
|
8555
8555
|
if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
|
|
8556
8556
|
return e;
|
|
8557
8557
|
};
|
|
8558
|
-
var
|
|
8558
|
+
var on = (s3) => {
|
|
8559
8559
|
for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
|
|
8560
8560
|
var n = Number(s3[r]), o;
|
|
8561
|
-
i ? o =
|
|
8561
|
+
i ? o = Us(n) : n === 0 ? o = n : (i = true, o = Hs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
|
|
8562
8562
|
}
|
|
8563
8563
|
return e;
|
|
8564
8564
|
};
|
|
8565
|
-
var
|
|
8565
|
+
var hn = (s3) => {
|
|
8566
8566
|
for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
|
|
8567
8567
|
var r = Number(s3[i]);
|
|
8568
8568
|
r !== 0 && (e += r * Math.pow(256, t - i - 1));
|
|
8569
8569
|
}
|
|
8570
8570
|
return e;
|
|
8571
8571
|
};
|
|
8572
|
-
var
|
|
8573
|
-
var
|
|
8574
|
-
var
|
|
8575
|
-
|
|
8576
|
-
var
|
|
8577
|
-
var
|
|
8578
|
-
var
|
|
8579
|
-
var
|
|
8580
|
-
var
|
|
8572
|
+
var Us = (s3) => (255 ^ s3) & 255;
|
|
8573
|
+
var Hs = (s3) => (255 ^ s3) + 1 & 255;
|
|
8574
|
+
var Ui = {};
|
|
8575
|
+
Br(Ui, { code: () => Ke, isCode: () => ne, isName: () => ln, name: () => oe, normalFsTypes: () => zi });
|
|
8576
|
+
var ne = (s3) => oe.has(s3);
|
|
8577
|
+
var ln = (s3) => Ke.has(s3);
|
|
8578
|
+
var zi = /* @__PURE__ */ new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
|
|
8579
|
+
var oe = /* @__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"]]);
|
|
8580
|
+
var Ke = new Map(Array.from(oe).map((s3) => [s3[1], s3[0]]));
|
|
8581
|
+
var C = class {
|
|
8581
8582
|
cksumValid = false;
|
|
8582
8583
|
needPax = false;
|
|
8583
8584
|
nullBlock = false;
|
|
@@ -8604,46 +8605,45 @@ var k = class {
|
|
|
8604
8605
|
}
|
|
8605
8606
|
decode(t, e, i, r) {
|
|
8606
8607
|
if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
8607
|
-
|
|
8608
|
-
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
this.path = h + "/" + this.path;
|
|
8608
|
+
let n = xt(t, e + 156, 1), o = zi.has(n), a = o ? i : void 0, h = o ? r : void 0;
|
|
8609
|
+
if (this.path = a?.path ?? xt(t, e, 100), this.mode = a?.mode ?? h?.mode ?? at(t, e + 100, 8), this.uid = a?.uid ?? h?.uid ?? at(t, e + 108, 8), this.gid = a?.gid ?? h?.gid ?? at(t, e + 116, 8), this.size = a?.size ?? h?.size ?? at(t, e + 124, 12), this.mtime = a?.mtime ?? h?.mtime ?? Hi(t, e + 136, 12), this.cksum = at(t, e + 148, 12), h && this.#i(h, true), a && this.#i(a), ne(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = xt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = a?.uname ?? h?.uname ?? xt(t, e + 265, 32), this.gname = a?.gname ?? h?.gname ?? xt(t, e + 297, 32), this.devmaj = a?.devmaj ?? h?.devmaj ?? at(t, e + 329, 8) ?? 0, this.devmin = a?.devmin ?? h?.devmin ?? at(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
|
|
8610
|
+
let c = xt(t, e + 345, 155);
|
|
8611
|
+
this.path = c + "/" + this.path;
|
|
8612
8612
|
} else {
|
|
8613
|
-
let
|
|
8614
|
-
|
|
8613
|
+
let c = xt(t, e + 345, 130);
|
|
8614
|
+
c && (this.path = c + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Hi(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Hi(t, e + 488, 12);
|
|
8615
8615
|
}
|
|
8616
|
-
let
|
|
8617
|
-
for (let
|
|
8618
|
-
for (let
|
|
8619
|
-
this.cksumValid =
|
|
8616
|
+
let l = 256;
|
|
8617
|
+
for (let c = e; c < e + 148; c++) l += t[c];
|
|
8618
|
+
for (let c = e + 156; c < e + 512; c++) l += t[c];
|
|
8619
|
+
this.cksumValid = l === this.cksum, this.cksum === void 0 && l === 256 && (this.nullBlock = true);
|
|
8620
8620
|
}
|
|
8621
8621
|
#i(t, e = false) {
|
|
8622
8622
|
Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "path" && e || i === "linkpath" && e || i === "global"))));
|
|
8623
8623
|
}
|
|
8624
8624
|
encode(t, e = 0) {
|
|
8625
8625
|
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");
|
|
8626
|
-
let i = this.ctime || this.atime ? 130 : 155, r =
|
|
8627
|
-
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 =
|
|
8628
|
-
let
|
|
8629
|
-
for (let
|
|
8630
|
-
for (let
|
|
8631
|
-
return this.cksum =
|
|
8626
|
+
let i = this.ctime || this.atime ? 130 : 155, r = cn(this.path || "", i), n = r[0], o = r[1];
|
|
8627
|
+
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 = Wi(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 = Wi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Wi(t, e + 488, 12, this.ctime) || this.needPax);
|
|
8628
|
+
let a = 256;
|
|
8629
|
+
for (let h = e; h < e + 148; h++) a += t[h];
|
|
8630
|
+
for (let h = e + 156; h < e + 512; h++) a += t[h];
|
|
8631
|
+
return this.cksum = a, lt(t, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
|
|
8632
8632
|
}
|
|
8633
8633
|
get type() {
|
|
8634
|
-
return this.#t === "Unsupported" ? this.#t :
|
|
8634
|
+
return this.#t === "Unsupported" ? this.#t : oe.get(this.#t);
|
|
8635
8635
|
}
|
|
8636
8636
|
get typeKey() {
|
|
8637
8637
|
return this.#t;
|
|
8638
8638
|
}
|
|
8639
8639
|
set type(t) {
|
|
8640
|
-
let e = String(
|
|
8641
|
-
if (
|
|
8642
|
-
else if (
|
|
8640
|
+
let e = String(Ke.get(t));
|
|
8641
|
+
if (ne(e) || e === "Unsupported") this.#t = e;
|
|
8642
|
+
else if (ne(t)) this.#t = t;
|
|
8643
8643
|
else throw new TypeError("invalid entry type: " + t);
|
|
8644
8644
|
}
|
|
8645
8645
|
};
|
|
8646
|
-
var
|
|
8646
|
+
var cn = (s3, t) => {
|
|
8647
8647
|
let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
|
|
8648
8648
|
if (Buffer.byteLength(i) < 100) n = [i, r, false];
|
|
8649
8649
|
else {
|
|
@@ -8656,19 +8656,19 @@ var ln = (s3, t) => {
|
|
|
8656
8656
|
return n;
|
|
8657
8657
|
};
|
|
8658
8658
|
var xt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
|
|
8659
|
-
var
|
|
8660
|
-
var
|
|
8661
|
-
var at = (s3, t, e) => Number(s3[t]) & 128 ?
|
|
8662
|
-
var
|
|
8663
|
-
var
|
|
8664
|
-
var
|
|
8665
|
-
var lt = (s3, t, e, i) => i === void 0 ? false : i >
|
|
8666
|
-
var
|
|
8667
|
-
var
|
|
8668
|
-
var
|
|
8669
|
-
var
|
|
8670
|
-
var
|
|
8671
|
-
var Lt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i +
|
|
8659
|
+
var Hi = (s3, t, e) => fn(at(s3, t, e));
|
|
8660
|
+
var fn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
|
|
8661
|
+
var at = (s3, t, e) => Number(s3[t]) & 128 ? zs(s3.subarray(t, t + e)) : un(s3, t, e);
|
|
8662
|
+
var dn = (s3) => isNaN(s3) ? void 0 : s3;
|
|
8663
|
+
var un = (s3, t, e) => dn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
|
|
8664
|
+
var mn = { 12: 8589934591, 8: 2097151 };
|
|
8665
|
+
var lt = (s3, t, e, i) => i === void 0 ? false : i > mn[e] || i < 0 ? (Ps(i, s3.subarray(t, t + e)), true) : (pn(s3, t, e, i), false);
|
|
8666
|
+
var pn = (s3, t, e, i) => s3.write(En(i, e), t, e, "ascii");
|
|
8667
|
+
var En = (s3, t) => wn(Math.floor(s3).toString(8), t);
|
|
8668
|
+
var wn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
|
|
8669
|
+
var Wi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
|
|
8670
|
+
var Sn = new Array(156).join("\0");
|
|
8671
|
+
var Lt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + Sn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
|
|
8672
8672
|
var ct = class s {
|
|
8673
8673
|
atime;
|
|
8674
8674
|
mtime;
|
|
@@ -8695,7 +8695,7 @@ var ct = class s {
|
|
|
8695
8695
|
if (t === "") return Buffer.allocUnsafe(0);
|
|
8696
8696
|
let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
|
|
8697
8697
|
for (let n = 0; n < 512; n++) r[n] = 0;
|
|
8698
|
-
new
|
|
8698
|
+
new C({ path: ("PaxHeader/" + yn(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");
|
|
8699
8699
|
for (let n = e + 512; n < r.length; n++) r[n] = 0;
|
|
8700
8700
|
return r;
|
|
8701
8701
|
}
|
|
@@ -8709,13 +8709,13 @@ var ct = class s {
|
|
|
8709
8709
|
return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
|
|
8710
8710
|
}
|
|
8711
8711
|
static parse(t, e, i = false) {
|
|
8712
|
-
return new s(
|
|
8712
|
+
return new s(Rn(gn(t), e), i);
|
|
8713
8713
|
}
|
|
8714
8714
|
};
|
|
8715
|
-
var
|
|
8716
|
-
var
|
|
8717
|
-
`).reduce(
|
|
8718
|
-
var
|
|
8715
|
+
var Rn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
|
|
8716
|
+
var gn = (s3) => s3.replace(/\n$/, "").split(`
|
|
8717
|
+
`).reduce(bn, /* @__PURE__ */ Object.create(null));
|
|
8718
|
+
var bn = (s3, t) => {
|
|
8719
8719
|
let e = parseInt(t, 10);
|
|
8720
8720
|
if (e !== Buffer.byteLength(t) + 1) return s3;
|
|
8721
8721
|
t = t.slice((e + " ").length);
|
|
@@ -8724,9 +8724,9 @@ var gn = (s3, t) => {
|
|
|
8724
8724
|
let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
|
|
8725
8725
|
return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
|
|
8726
8726
|
};
|
|
8727
|
-
var
|
|
8728
|
-
var f =
|
|
8729
|
-
var
|
|
8727
|
+
var _n = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
8728
|
+
var f = _n !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
|
|
8729
|
+
var Ve = class extends A {
|
|
8730
8730
|
extended;
|
|
8731
8731
|
globalExtended;
|
|
8732
8732
|
header;
|
|
@@ -8793,42 +8793,42 @@ var Yt = class extends A {
|
|
|
8793
8793
|
var Nt = (s3, t, e, i = {}) => {
|
|
8794
8794
|
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));
|
|
8795
8795
|
};
|
|
8796
|
-
var
|
|
8797
|
-
var
|
|
8798
|
-
var
|
|
8799
|
-
var
|
|
8796
|
+
var Tn = 1024 * 1024;
|
|
8797
|
+
var Vi = Buffer.from([31, 139]);
|
|
8798
|
+
var $i = Buffer.from([40, 181, 47, 253]);
|
|
8799
|
+
var xn = Math.max(Vi.length, $i.length);
|
|
8800
8800
|
var B = /* @__PURE__ */ Symbol("state");
|
|
8801
8801
|
var Dt = /* @__PURE__ */ Symbol("writeEntry");
|
|
8802
8802
|
var et = /* @__PURE__ */ Symbol("readEntry");
|
|
8803
|
-
var
|
|
8804
|
-
var
|
|
8803
|
+
var Gi = /* @__PURE__ */ Symbol("nextEntry");
|
|
8804
|
+
var Ws = /* @__PURE__ */ Symbol("processEntry");
|
|
8805
8805
|
var V = /* @__PURE__ */ Symbol("extendedHeader");
|
|
8806
|
-
var
|
|
8806
|
+
var he = /* @__PURE__ */ Symbol("globalExtendedHeader");
|
|
8807
8807
|
var ft = /* @__PURE__ */ Symbol("meta");
|
|
8808
|
-
var
|
|
8808
|
+
var Gs = /* @__PURE__ */ Symbol("emitMeta");
|
|
8809
8809
|
var p = /* @__PURE__ */ Symbol("buffer");
|
|
8810
8810
|
var it = /* @__PURE__ */ Symbol("queue");
|
|
8811
8811
|
var dt = /* @__PURE__ */ Symbol("ended");
|
|
8812
|
-
var
|
|
8812
|
+
var Zi = /* @__PURE__ */ Symbol("emittedEnd");
|
|
8813
8813
|
var At = /* @__PURE__ */ Symbol("emit");
|
|
8814
8814
|
var y = /* @__PURE__ */ Symbol("unzip");
|
|
8815
8815
|
var $e = /* @__PURE__ */ Symbol("consumeChunk");
|
|
8816
8816
|
var Xe = /* @__PURE__ */ Symbol("consumeChunkSub");
|
|
8817
|
-
var
|
|
8818
|
-
var
|
|
8819
|
-
var
|
|
8820
|
-
var
|
|
8821
|
-
var
|
|
8817
|
+
var Yi = /* @__PURE__ */ Symbol("consumeBody");
|
|
8818
|
+
var Zs = /* @__PURE__ */ Symbol("consumeMeta");
|
|
8819
|
+
var Ys = /* @__PURE__ */ Symbol("consumeHeader");
|
|
8820
|
+
var ae = /* @__PURE__ */ Symbol("consuming");
|
|
8821
|
+
var Ki = /* @__PURE__ */ Symbol("bufferConcat");
|
|
8822
8822
|
var qe = /* @__PURE__ */ Symbol("maybeEnd");
|
|
8823
|
-
var
|
|
8823
|
+
var Yt = /* @__PURE__ */ Symbol("writing");
|
|
8824
8824
|
var ut = /* @__PURE__ */ Symbol("aborted");
|
|
8825
8825
|
var Qe = /* @__PURE__ */ Symbol("onDone");
|
|
8826
8826
|
var It = /* @__PURE__ */ Symbol("sawValidEntry");
|
|
8827
8827
|
var Je = /* @__PURE__ */ Symbol("sawNullBlock");
|
|
8828
8828
|
var je = /* @__PURE__ */ Symbol("sawEOF");
|
|
8829
|
-
var
|
|
8830
|
-
var
|
|
8831
|
-
var st = class extends
|
|
8829
|
+
var Ks = /* @__PURE__ */ Symbol("closeStream");
|
|
8830
|
+
var Ln = () => true;
|
|
8831
|
+
var st = class extends On {
|
|
8832
8832
|
file;
|
|
8833
8833
|
strict;
|
|
8834
8834
|
maxMetaEntrySize;
|
|
@@ -8844,35 +8844,35 @@ var st = class extends _n {
|
|
|
8844
8844
|
[B] = "begin";
|
|
8845
8845
|
[ft] = "";
|
|
8846
8846
|
[V];
|
|
8847
|
-
[
|
|
8847
|
+
[he];
|
|
8848
8848
|
[dt] = false;
|
|
8849
8849
|
[y];
|
|
8850
8850
|
[ut] = false;
|
|
8851
8851
|
[It];
|
|
8852
8852
|
[Je] = false;
|
|
8853
8853
|
[je] = false;
|
|
8854
|
-
[
|
|
8855
|
-
[
|
|
8856
|
-
[
|
|
8854
|
+
[Yt] = false;
|
|
8855
|
+
[ae] = false;
|
|
8856
|
+
[Zi] = false;
|
|
8857
8857
|
constructor(t = {}) {
|
|
8858
8858
|
super(), this.file = t.file || "", this.on(Qe, () => {
|
|
8859
8859
|
(this[B] === "begin" || this[It] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
8860
8860
|
}), t.ondone ? this.on(Qe, t.ondone) : this.on(Qe, () => {
|
|
8861
8861
|
this.emit("prefinish"), this.emit("finish"), this.emit("end");
|
|
8862
|
-
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize ||
|
|
8862
|
+
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || Tn, this.filter = typeof t.filter == "function" ? t.filter : Ln;
|
|
8863
8863
|
let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
|
|
8864
8864
|
this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
|
|
8865
8865
|
let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
|
|
8866
|
-
this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[
|
|
8866
|
+
this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Ks]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
|
|
8867
8867
|
}
|
|
8868
8868
|
warn(t, e, i = {}) {
|
|
8869
8869
|
Nt(this, t, e, i);
|
|
8870
8870
|
}
|
|
8871
|
-
[
|
|
8871
|
+
[Ys](t, e) {
|
|
8872
8872
|
this[It] === void 0 && (this[It] = false);
|
|
8873
8873
|
let i;
|
|
8874
8874
|
try {
|
|
8875
|
-
i = new
|
|
8875
|
+
i = new C(t, e, this[V], this[he]);
|
|
8876
8876
|
} catch (r) {
|
|
8877
8877
|
return this.warn("TAR_ENTRY_INVALID", r);
|
|
8878
8878
|
}
|
|
@@ -8884,59 +8884,59 @@ var st = class extends _n {
|
|
|
8884
8884
|
if (/^(Symbolic)?Link$/.test(r) && !i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: i });
|
|
8885
8885
|
else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
|
|
8886
8886
|
else {
|
|
8887
|
-
let n = this[Dt] = new
|
|
8887
|
+
let n = this[Dt] = new Ve(i, this[V], this[he]);
|
|
8888
8888
|
if (!this[It]) if (n.remain) {
|
|
8889
8889
|
let o = () => {
|
|
8890
8890
|
n.invalid || (this[It] = true);
|
|
8891
8891
|
};
|
|
8892
8892
|
n.on("end", o);
|
|
8893
8893
|
} else this[It] = true;
|
|
8894
|
-
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[
|
|
8894
|
+
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[Gi]())));
|
|
8895
8895
|
}
|
|
8896
8896
|
}
|
|
8897
8897
|
}
|
|
8898
|
-
[
|
|
8898
|
+
[Ks]() {
|
|
8899
8899
|
queueMicrotask(() => this.emit("close"));
|
|
8900
8900
|
}
|
|
8901
|
-
[
|
|
8901
|
+
[Ws](t) {
|
|
8902
8902
|
let e = true;
|
|
8903
8903
|
if (!t) this[et] = void 0, e = false;
|
|
8904
8904
|
else if (Array.isArray(t)) {
|
|
8905
8905
|
let [i, ...r] = t;
|
|
8906
8906
|
this.emit(i, ...r);
|
|
8907
|
-
} else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[
|
|
8907
|
+
} else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Gi]()), e = false);
|
|
8908
8908
|
return e;
|
|
8909
8909
|
}
|
|
8910
|
-
[
|
|
8910
|
+
[Gi]() {
|
|
8911
8911
|
do
|
|
8912
8912
|
;
|
|
8913
|
-
while (this[
|
|
8913
|
+
while (this[Ws](this[it].shift()));
|
|
8914
8914
|
if (this[it].length === 0) {
|
|
8915
8915
|
let t = this[et];
|
|
8916
|
-
!t || t.flowing || t.size === t.remain ? this[
|
|
8916
|
+
!t || t.flowing || t.size === t.remain ? this[Yt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
|
|
8917
8917
|
}
|
|
8918
8918
|
}
|
|
8919
|
-
[
|
|
8919
|
+
[Yi](t, e) {
|
|
8920
8920
|
let i = this[Dt];
|
|
8921
8921
|
if (!i) throw new Error("attempt to consume body without entry??");
|
|
8922
8922
|
let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
|
|
8923
8923
|
return i.write(n), i.blockRemain || (this[B] = "header", this[Dt] = void 0, i.end()), n.length;
|
|
8924
8924
|
}
|
|
8925
|
-
[
|
|
8926
|
-
let i = this[Dt], r = this[
|
|
8927
|
-
return !this[Dt] && i && this[
|
|
8925
|
+
[Zs](t, e) {
|
|
8926
|
+
let i = this[Dt], r = this[Yi](t, e);
|
|
8927
|
+
return !this[Dt] && i && this[Gs](i), r;
|
|
8928
8928
|
}
|
|
8929
8929
|
[At](t, e, i) {
|
|
8930
8930
|
this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
|
|
8931
8931
|
}
|
|
8932
|
-
[
|
|
8932
|
+
[Gs](t) {
|
|
8933
8933
|
switch (this[At]("meta", this[ft]), t.type) {
|
|
8934
8934
|
case "ExtendedHeader":
|
|
8935
8935
|
case "OldExtendedHeader":
|
|
8936
8936
|
this[V] = ct.parse(this[ft], this[V], false);
|
|
8937
8937
|
break;
|
|
8938
8938
|
case "GlobalExtendedHeader":
|
|
8939
|
-
this[
|
|
8939
|
+
this[he] = ct.parse(this[ft], this[he], true);
|
|
8940
8940
|
break;
|
|
8941
8941
|
case "NextFileHasLongPath":
|
|
8942
8942
|
case "OldGnuLongPath": {
|
|
@@ -8959,43 +8959,43 @@ var st = class extends _n {
|
|
|
8959
8959
|
write(t, e, i) {
|
|
8960
8960
|
if (typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8")), this[ut]) return i?.(), false;
|
|
8961
8961
|
if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
|
|
8962
|
-
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length <
|
|
8963
|
-
for (let
|
|
8962
|
+
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < xn) return this[p] = t, i?.(), true;
|
|
8963
|
+
for (let h = 0; this[y] === void 0 && h < Vi.length; h++) t[h] !== Vi[h] && (this[y] = false);
|
|
8964
8964
|
let o = false;
|
|
8965
8965
|
if (this[y] === false && this.zstd !== false) {
|
|
8966
8966
|
o = true;
|
|
8967
|
-
for (let
|
|
8967
|
+
for (let h = 0; h < $i.length; h++) if (t[h] !== $i[h]) {
|
|
8968
8968
|
o = false;
|
|
8969
8969
|
break;
|
|
8970
8970
|
}
|
|
8971
8971
|
}
|
|
8972
|
-
let
|
|
8973
|
-
if (this[y] === false &&
|
|
8972
|
+
let a = this.brotli === void 0 && !o;
|
|
8973
|
+
if (this[y] === false && a) if (t.length < 512) if (this[dt]) this.brotli = true;
|
|
8974
8974
|
else return this[p] = t, i?.(), true;
|
|
8975
8975
|
else try {
|
|
8976
|
-
new
|
|
8976
|
+
new C(t.subarray(0, 512)), this.brotli = false;
|
|
8977
8977
|
} catch {
|
|
8978
8978
|
this.brotli = true;
|
|
8979
8979
|
}
|
|
8980
8980
|
if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
|
|
8981
|
-
let
|
|
8982
|
-
this[dt] = false, this[y] = this[y] === void 0 ? new
|
|
8981
|
+
let h = this[dt];
|
|
8982
|
+
this[dt] = false, this[y] = this[y] === void 0 ? new ze({}) : o ? new Ye({}) : new We({}), this[y].on("data", (c) => this[$e](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
|
|
8983
8983
|
this[dt] = true, this[$e]();
|
|
8984
|
-
}), this[
|
|
8985
|
-
let l = !!this[y][
|
|
8986
|
-
return this[
|
|
8984
|
+
}), this[Yt] = true;
|
|
8985
|
+
let l = !!this[y][h ? "end" : "write"](t);
|
|
8986
|
+
return this[Yt] = false, i?.(), l;
|
|
8987
8987
|
}
|
|
8988
8988
|
}
|
|
8989
|
-
this[
|
|
8989
|
+
this[Yt] = true, this[y] ? this[y].write(t) : this[$e](t), this[Yt] = false;
|
|
8990
8990
|
let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
|
|
8991
8991
|
return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
|
|
8992
8992
|
}
|
|
8993
|
-
[
|
|
8993
|
+
[Ki](t) {
|
|
8994
8994
|
t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
|
|
8995
8995
|
}
|
|
8996
8996
|
[qe]() {
|
|
8997
|
-
if (this[dt] && !this[
|
|
8998
|
-
this[
|
|
8997
|
+
if (this[dt] && !this[Zi] && !this[ut] && !this[ae]) {
|
|
8998
|
+
this[Zi] = true;
|
|
8999
8999
|
let t = this[Dt];
|
|
9000
9000
|
if (t && t.blockRemain) {
|
|
9001
9001
|
let e = this[p] ? this[p].length : 0;
|
|
@@ -9005,11 +9005,11 @@ var st = class extends _n {
|
|
|
9005
9005
|
}
|
|
9006
9006
|
}
|
|
9007
9007
|
[$e](t) {
|
|
9008
|
-
if (this[
|
|
9008
|
+
if (this[ae] && t) this[Ki](t);
|
|
9009
9009
|
else if (!t && !this[p]) this[qe]();
|
|
9010
9010
|
else if (t) {
|
|
9011
|
-
if (this[
|
|
9012
|
-
this[
|
|
9011
|
+
if (this[ae] = true, this[p]) {
|
|
9012
|
+
this[Ki](t);
|
|
9013
9013
|
let e = this[p];
|
|
9014
9014
|
this[p] = void 0, this[Xe](e);
|
|
9015
9015
|
} else this[Xe](t);
|
|
@@ -9017,7 +9017,7 @@ var st = class extends _n {
|
|
|
9017
9017
|
let e = this[p];
|
|
9018
9018
|
this[p] = void 0, this[Xe](e);
|
|
9019
9019
|
}
|
|
9020
|
-
this[
|
|
9020
|
+
this[ae] = false;
|
|
9021
9021
|
}
|
|
9022
9022
|
(!this[p] || this[dt]) && this[qe]();
|
|
9023
9023
|
}
|
|
@@ -9026,14 +9026,14 @@ var st = class extends _n {
|
|
|
9026
9026
|
for (; e + 512 <= i && !this[ut] && !this[je]; ) switch (this[B]) {
|
|
9027
9027
|
case "begin":
|
|
9028
9028
|
case "header":
|
|
9029
|
-
this[
|
|
9029
|
+
this[Ys](t, e), e += 512;
|
|
9030
9030
|
break;
|
|
9031
9031
|
case "ignore":
|
|
9032
9032
|
case "body":
|
|
9033
|
-
e += this[
|
|
9033
|
+
e += this[Yi](t, e);
|
|
9034
9034
|
break;
|
|
9035
9035
|
case "meta":
|
|
9036
|
-
e += this[
|
|
9036
|
+
e += this[Zs](t, e);
|
|
9037
9037
|
break;
|
|
9038
9038
|
default:
|
|
9039
9039
|
throw new Error("invalid state: " + this[B]);
|
|
@@ -9049,100 +9049,100 @@ var mt = (s3) => {
|
|
|
9049
9049
|
for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
|
|
9050
9050
|
return e === -1 ? s3 : s3.slice(0, e);
|
|
9051
9051
|
};
|
|
9052
|
-
var
|
|
9052
|
+
var An = (s3) => {
|
|
9053
9053
|
let t = s3.onReadEntry;
|
|
9054
9054
|
s3.onReadEntry = t ? (e) => {
|
|
9055
9055
|
t(e), e.resume();
|
|
9056
9056
|
} : (e) => e.resume();
|
|
9057
9057
|
};
|
|
9058
|
-
var
|
|
9058
|
+
var Xi = (s3, t) => {
|
|
9059
9059
|
let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
|
|
9060
|
-
let
|
|
9061
|
-
if (n ===
|
|
9060
|
+
let a = o || Dn(n).root || ".", h;
|
|
9061
|
+
if (n === a) h = false;
|
|
9062
9062
|
else {
|
|
9063
9063
|
let l = e.get(n);
|
|
9064
|
-
|
|
9064
|
+
h = l !== void 0 ? l : r(Nn(n), a);
|
|
9065
9065
|
}
|
|
9066
|
-
return e.set(n,
|
|
9066
|
+
return e.set(n, h), h;
|
|
9067
9067
|
};
|
|
9068
9068
|
s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
|
|
9069
9069
|
};
|
|
9070
|
-
var
|
|
9070
|
+
var In = (s3) => {
|
|
9071
9071
|
let t = new st(s3), e = s3.file, i;
|
|
9072
9072
|
try {
|
|
9073
|
-
i =
|
|
9074
|
-
let r =
|
|
9073
|
+
i = Kt.openSync(e, "r");
|
|
9074
|
+
let r = Kt.fstatSync(i), n = s3.maxReadSize || 16 * 1024 * 1024;
|
|
9075
9075
|
if (r.size < n) {
|
|
9076
|
-
let o = Buffer.allocUnsafe(r.size),
|
|
9077
|
-
t.end(
|
|
9076
|
+
let o = Buffer.allocUnsafe(r.size), a = Kt.readSync(i, o, 0, r.size, 0);
|
|
9077
|
+
t.end(a === o.byteLength ? o : o.subarray(0, a));
|
|
9078
9078
|
} else {
|
|
9079
|
-
let o = 0,
|
|
9079
|
+
let o = 0, a = Buffer.allocUnsafe(n);
|
|
9080
9080
|
for (; o < r.size; ) {
|
|
9081
|
-
let
|
|
9082
|
-
if (
|
|
9083
|
-
o +=
|
|
9081
|
+
let h = Kt.readSync(i, a, 0, n, o);
|
|
9082
|
+
if (h === 0) break;
|
|
9083
|
+
o += h, t.write(a.subarray(0, h));
|
|
9084
9084
|
}
|
|
9085
9085
|
t.end();
|
|
9086
9086
|
}
|
|
9087
9087
|
} finally {
|
|
9088
9088
|
if (typeof i == "number") try {
|
|
9089
|
-
|
|
9089
|
+
Kt.closeSync(i);
|
|
9090
9090
|
} catch {
|
|
9091
9091
|
}
|
|
9092
9092
|
}
|
|
9093
9093
|
};
|
|
9094
|
-
var
|
|
9094
|
+
var Fn = (s3, t) => {
|
|
9095
9095
|
let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
9096
|
-
return new Promise((o,
|
|
9097
|
-
e.on("error",
|
|
9098
|
-
if (
|
|
9096
|
+
return new Promise((o, a) => {
|
|
9097
|
+
e.on("error", a), e.on("end", o), Kt.stat(r, (h, l) => {
|
|
9098
|
+
if (h) a(h);
|
|
9099
9099
|
else {
|
|
9100
9100
|
let c = new _t(r, { readSize: i, size: l.size });
|
|
9101
|
-
c.on("error",
|
|
9101
|
+
c.on("error", a), c.pipe(e);
|
|
9102
9102
|
}
|
|
9103
9103
|
});
|
|
9104
9104
|
});
|
|
9105
9105
|
};
|
|
9106
|
-
var
|
|
9107
|
-
t?.length &&
|
|
9106
|
+
var Ft = K(In, Fn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
|
|
9107
|
+
t?.length && Xi(s3, t), s3.noResume || An(s3);
|
|
9108
9108
|
});
|
|
9109
|
-
var
|
|
9110
|
-
var { isAbsolute: kn, parse:
|
|
9111
|
-
var
|
|
9112
|
-
let t = "", e =
|
|
9109
|
+
var qi = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
|
|
9110
|
+
var { isAbsolute: kn, parse: Vs } = Cn;
|
|
9111
|
+
var le = (s3) => {
|
|
9112
|
+
let t = "", e = Vs(s3);
|
|
9113
9113
|
for (; kn(s3) || e.root; ) {
|
|
9114
9114
|
let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
|
|
9115
|
-
s3 = s3.slice(i.length), t += i, e =
|
|
9115
|
+
s3 = s3.slice(i.length), t += i, e = Vs(s3);
|
|
9116
9116
|
}
|
|
9117
9117
|
return [t, s3];
|
|
9118
9118
|
};
|
|
9119
9119
|
var ti = ["|", "<", ">", "?", ":"];
|
|
9120
|
-
var
|
|
9121
|
-
var
|
|
9122
|
-
var
|
|
9123
|
-
var
|
|
9124
|
-
var
|
|
9125
|
-
var
|
|
9126
|
-
var
|
|
9127
|
-
var
|
|
9128
|
-
var
|
|
9129
|
-
var
|
|
9130
|
-
var
|
|
9131
|
-
var
|
|
9132
|
-
var
|
|
9120
|
+
var Qi = ti.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
|
|
9121
|
+
var vn = new Map(ti.map((s3, t) => [s3, Qi[t]]));
|
|
9122
|
+
var Mn = new Map(Qi.map((s3, t) => [s3, ti[t]]));
|
|
9123
|
+
var Ji = (s3) => ti.reduce((t, e) => t.split(e).join(vn.get(e)), s3);
|
|
9124
|
+
var $s = (s3) => Qi.reduce((t, e) => t.split(e).join(Mn.get(e)), s3);
|
|
9125
|
+
var er = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
|
|
9126
|
+
var Bn = 16 * 1024 * 1024;
|
|
9127
|
+
var Qs = /* @__PURE__ */ Symbol("process");
|
|
9128
|
+
var Js = /* @__PURE__ */ Symbol("file");
|
|
9129
|
+
var js = /* @__PURE__ */ Symbol("directory");
|
|
9130
|
+
var ts = /* @__PURE__ */ Symbol("symlink");
|
|
9131
|
+
var tr = /* @__PURE__ */ Symbol("hardlink");
|
|
9132
|
+
var ce = /* @__PURE__ */ Symbol("header");
|
|
9133
9133
|
var ei = /* @__PURE__ */ Symbol("read");
|
|
9134
|
-
var
|
|
9134
|
+
var es = /* @__PURE__ */ Symbol("lstat");
|
|
9135
9135
|
var ii = /* @__PURE__ */ Symbol("onlstat");
|
|
9136
|
-
var
|
|
9137
|
-
var
|
|
9138
|
-
var
|
|
9139
|
-
var
|
|
9136
|
+
var is = /* @__PURE__ */ Symbol("onread");
|
|
9137
|
+
var ss = /* @__PURE__ */ Symbol("onreadlink");
|
|
9138
|
+
var rs = /* @__PURE__ */ Symbol("openfile");
|
|
9139
|
+
var ns = /* @__PURE__ */ Symbol("onopenfile");
|
|
9140
9140
|
var pt = /* @__PURE__ */ Symbol("close");
|
|
9141
9141
|
var si = /* @__PURE__ */ Symbol("mode");
|
|
9142
|
-
var
|
|
9143
|
-
var
|
|
9142
|
+
var os = /* @__PURE__ */ Symbol("awaitDrain");
|
|
9143
|
+
var ji = /* @__PURE__ */ Symbol("ondrain");
|
|
9144
9144
|
var X = /* @__PURE__ */ Symbol("prefix");
|
|
9145
|
-
var
|
|
9145
|
+
var fe = class extends A {
|
|
9146
9146
|
path;
|
|
9147
9147
|
portable;
|
|
9148
9148
|
myuid = process.getuid && process.getuid() || 0;
|
|
@@ -9174,16 +9174,16 @@ var de = class extends A {
|
|
|
9174
9174
|
onWriteEntry;
|
|
9175
9175
|
#t = false;
|
|
9176
9176
|
constructor(t, e = {}) {
|
|
9177
|
-
let i =
|
|
9178
|
-
super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize ||
|
|
9177
|
+
let i = se(e);
|
|
9178
|
+
super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || Bn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
|
|
9179
9179
|
let r = false;
|
|
9180
9180
|
if (!this.preservePaths) {
|
|
9181
|
-
let [o,
|
|
9182
|
-
o && typeof
|
|
9181
|
+
let [o, a] = le(this.path);
|
|
9182
|
+
o && typeof a == "string" && (this.path = a, r = o);
|
|
9183
9183
|
}
|
|
9184
|
-
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path =
|
|
9184
|
+
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = $s(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || qs.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
|
|
9185
9185
|
let n = this.statCache.get(this.absolute);
|
|
9186
|
-
n ? this[ii](n) : this[
|
|
9186
|
+
n ? this[ii](n) : this[es]();
|
|
9187
9187
|
}
|
|
9188
9188
|
warn(t, e, i = {}) {
|
|
9189
9189
|
return Nt(this, t, e, i);
|
|
@@ -9191,74 +9191,74 @@ var de = class extends A {
|
|
|
9191
9191
|
emit(t, ...e) {
|
|
9192
9192
|
return t === "error" && (this.#t = true), super.emit(t, ...e);
|
|
9193
9193
|
}
|
|
9194
|
-
[
|
|
9194
|
+
[es]() {
|
|
9195
9195
|
$.lstat(this.absolute, (t, e) => {
|
|
9196
9196
|
if (t) return this.emit("error", t);
|
|
9197
9197
|
this[ii](e);
|
|
9198
9198
|
});
|
|
9199
9199
|
}
|
|
9200
9200
|
[ii](t) {
|
|
9201
|
-
this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type =
|
|
9201
|
+
this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Pn(t), this.emit("stat", t), this[Qs]();
|
|
9202
9202
|
}
|
|
9203
|
-
[
|
|
9203
|
+
[Qs]() {
|
|
9204
9204
|
switch (this.type) {
|
|
9205
9205
|
case "File":
|
|
9206
|
-
return this[Qs]();
|
|
9207
|
-
case "Directory":
|
|
9208
9206
|
return this[Js]();
|
|
9207
|
+
case "Directory":
|
|
9208
|
+
return this[js]();
|
|
9209
9209
|
case "SymbolicLink":
|
|
9210
|
-
return this[
|
|
9210
|
+
return this[ts]();
|
|
9211
9211
|
default:
|
|
9212
9212
|
return this.end();
|
|
9213
9213
|
}
|
|
9214
9214
|
}
|
|
9215
9215
|
[si](t) {
|
|
9216
|
-
return
|
|
9216
|
+
return qi(t, this.type === "Directory", this.portable);
|
|
9217
9217
|
}
|
|
9218
9218
|
[X](t) {
|
|
9219
|
-
return
|
|
9219
|
+
return er(t, this.prefix);
|
|
9220
9220
|
}
|
|
9221
|
-
[
|
|
9221
|
+
[ce]() {
|
|
9222
9222
|
if (!this.stat) throw new Error("cannot write header before stat");
|
|
9223
|
-
this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new
|
|
9223
|
+
this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new C({ 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());
|
|
9224
9224
|
let t = this.header?.block;
|
|
9225
9225
|
if (!t) throw new Error("failed to encode header");
|
|
9226
9226
|
super.write(t);
|
|
9227
9227
|
}
|
|
9228
|
-
[
|
|
9228
|
+
[js]() {
|
|
9229
9229
|
if (!this.stat) throw new Error("cannot create directory entry without stat");
|
|
9230
|
-
this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[
|
|
9230
|
+
this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[ce](), this.end();
|
|
9231
9231
|
}
|
|
9232
|
-
[
|
|
9232
|
+
[ts]() {
|
|
9233
9233
|
$.readlink(this.absolute, (t, e) => {
|
|
9234
9234
|
if (t) return this.emit("error", t);
|
|
9235
|
-
this[
|
|
9235
|
+
this[ss](e);
|
|
9236
9236
|
});
|
|
9237
9237
|
}
|
|
9238
|
-
[
|
|
9239
|
-
this.linkpath = f(t), this[
|
|
9238
|
+
[ss](t) {
|
|
9239
|
+
this.linkpath = f(t), this[ce](), this.end();
|
|
9240
9240
|
}
|
|
9241
|
-
[
|
|
9241
|
+
[tr](t) {
|
|
9242
9242
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
9243
|
-
this.type = "Link", this.linkpath = f(
|
|
9243
|
+
this.type = "Link", this.linkpath = f(qs.relative(this.cwd, t)), this.stat.size = 0, this[ce](), this.end();
|
|
9244
9244
|
}
|
|
9245
|
-
[
|
|
9245
|
+
[Js]() {
|
|
9246
9246
|
if (!this.stat) throw new Error("cannot create file entry without stat");
|
|
9247
9247
|
if (this.stat.nlink > 1) {
|
|
9248
9248
|
let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
|
|
9249
|
-
if (e?.indexOf(this.cwd) === 0) return this[
|
|
9249
|
+
if (e?.indexOf(this.cwd) === 0) return this[tr](e);
|
|
9250
9250
|
this.linkCache.set(t, this.absolute);
|
|
9251
9251
|
}
|
|
9252
|
-
if (this[
|
|
9253
|
-
this[
|
|
9252
|
+
if (this[ce](), this.stat.size === 0) return this.end();
|
|
9253
|
+
this[rs]();
|
|
9254
9254
|
}
|
|
9255
|
-
[
|
|
9255
|
+
[rs]() {
|
|
9256
9256
|
$.open(this.absolute, "r", (t, e) => {
|
|
9257
9257
|
if (t) return this.emit("error", t);
|
|
9258
|
-
this[
|
|
9258
|
+
this[ns](e);
|
|
9259
9259
|
});
|
|
9260
9260
|
}
|
|
9261
|
-
[
|
|
9261
|
+
[ns](t) {
|
|
9262
9262
|
if (this.fd = t, this.#t) return this[pt]();
|
|
9263
9263
|
if (!this.stat) throw new Error("should stat before calling onopenfile");
|
|
9264
9264
|
this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
|
|
@@ -9268,16 +9268,16 @@ var de = class extends A {
|
|
|
9268
9268
|
[ei]() {
|
|
9269
9269
|
let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
|
|
9270
9270
|
if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
|
|
9271
|
-
$.read(t, e, i, r, n, (o,
|
|
9271
|
+
$.read(t, e, i, r, n, (o, a) => {
|
|
9272
9272
|
if (o) return this[pt](() => this.emit("error", o));
|
|
9273
|
-
this[
|
|
9273
|
+
this[is](a);
|
|
9274
9274
|
});
|
|
9275
9275
|
}
|
|
9276
9276
|
[pt](t = () => {
|
|
9277
9277
|
}) {
|
|
9278
9278
|
this.fd !== void 0 && $.close(this.fd, t);
|
|
9279
9279
|
}
|
|
9280
|
-
[
|
|
9280
|
+
[is](t) {
|
|
9281
9281
|
if (t <= 0 && this.remain > 0) {
|
|
9282
9282
|
let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
|
|
9283
9283
|
return this[pt](() => this.emit("error", r));
|
|
@@ -9289,9 +9289,9 @@ var de = class extends A {
|
|
|
9289
9289
|
if (!this.buf) throw new Error("should have created buffer prior to reading");
|
|
9290
9290
|
if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
|
|
9291
9291
|
let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
|
|
9292
|
-
this.write(e) ? this[
|
|
9292
|
+
this.write(e) ? this[ji]() : this[os](() => this[ji]());
|
|
9293
9293
|
}
|
|
9294
|
-
[
|
|
9294
|
+
[os](t) {
|
|
9295
9295
|
this.once("drain", t);
|
|
9296
9296
|
}
|
|
9297
9297
|
write(t, e, i) {
|
|
@@ -9301,30 +9301,30 @@ var de = class extends A {
|
|
|
9301
9301
|
}
|
|
9302
9302
|
return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
|
|
9303
9303
|
}
|
|
9304
|
-
[
|
|
9304
|
+
[ji]() {
|
|
9305
9305
|
if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
|
|
9306
9306
|
if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
|
|
9307
9307
|
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]();
|
|
9308
9308
|
}
|
|
9309
9309
|
};
|
|
9310
|
-
var ri = class extends
|
|
9310
|
+
var ri = class extends fe {
|
|
9311
9311
|
sync = true;
|
|
9312
|
-
[
|
|
9312
|
+
[es]() {
|
|
9313
9313
|
this[ii]($.lstatSync(this.absolute));
|
|
9314
9314
|
}
|
|
9315
|
-
[
|
|
9316
|
-
this[
|
|
9315
|
+
[ts]() {
|
|
9316
|
+
this[ss]($.readlinkSync(this.absolute));
|
|
9317
9317
|
}
|
|
9318
|
-
[
|
|
9319
|
-
this[
|
|
9318
|
+
[rs]() {
|
|
9319
|
+
this[ns]($.openSync(this.absolute, "r"));
|
|
9320
9320
|
}
|
|
9321
9321
|
[ei]() {
|
|
9322
9322
|
let t = true;
|
|
9323
9323
|
try {
|
|
9324
9324
|
let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
|
|
9325
9325
|
if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
|
|
9326
|
-
let
|
|
9327
|
-
this[
|
|
9326
|
+
let a = $.readSync(e, i, r, n, o);
|
|
9327
|
+
this[is](a), t = false;
|
|
9328
9328
|
} finally {
|
|
9329
9329
|
if (t) try {
|
|
9330
9330
|
this[pt](() => {
|
|
@@ -9333,7 +9333,7 @@ var ri = class extends de {
|
|
|
9333
9333
|
}
|
|
9334
9334
|
}
|
|
9335
9335
|
}
|
|
9336
|
-
[
|
|
9336
|
+
[os](t) {
|
|
9337
9337
|
t();
|
|
9338
9338
|
}
|
|
9339
9339
|
[pt](t = () => {
|
|
@@ -9373,26 +9373,26 @@ var ni = class extends A {
|
|
|
9373
9373
|
return Nt(this, t, e, i);
|
|
9374
9374
|
}
|
|
9375
9375
|
constructor(t, e = {}) {
|
|
9376
|
-
let i =
|
|
9376
|
+
let i = se(e);
|
|
9377
9377
|
super(), this.preservePaths = !!i.preservePaths, this.portable = !!i.portable, this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.onWriteEntry = i.onWriteEntry, this.readEntry = t;
|
|
9378
9378
|
let { type: r } = t;
|
|
9379
9379
|
if (r === "Unsupported") throw new Error("writing entry that should be ignored");
|
|
9380
9380
|
this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[si](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
|
|
9381
9381
|
let n = false;
|
|
9382
9382
|
if (!this.preservePaths) {
|
|
9383
|
-
let [
|
|
9384
|
-
|
|
9383
|
+
let [a, h] = le(this.path);
|
|
9384
|
+
a && typeof h == "string" && (this.path = h, n = a);
|
|
9385
9385
|
}
|
|
9386
|
-
this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new
|
|
9386
|
+
this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new C({ 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());
|
|
9387
9387
|
let o = this.header?.block;
|
|
9388
9388
|
if (!o) throw new Error("failed to encode header");
|
|
9389
9389
|
super.write(o), t.pipe(this);
|
|
9390
9390
|
}
|
|
9391
9391
|
[X](t) {
|
|
9392
|
-
return
|
|
9392
|
+
return er(t, this.prefix);
|
|
9393
9393
|
}
|
|
9394
9394
|
[si](t) {
|
|
9395
|
-
return
|
|
9395
|
+
return qi(t, this.type === "Directory", this.portable);
|
|
9396
9396
|
}
|
|
9397
9397
|
write(t, e, i) {
|
|
9398
9398
|
typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
|
|
@@ -9404,7 +9404,7 @@ var ni = class extends A {
|
|
|
9404
9404
|
return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e ?? "utf8")), i && this.once("finish", i), t ? super.end(t, i) : super.end(i), this;
|
|
9405
9405
|
}
|
|
9406
9406
|
};
|
|
9407
|
-
var
|
|
9407
|
+
var Pn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
|
|
9408
9408
|
var oi = class s2 {
|
|
9409
9409
|
tail;
|
|
9410
9410
|
head;
|
|
@@ -9436,11 +9436,11 @@ var oi = class s2 {
|
|
|
9436
9436
|
t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
|
|
9437
9437
|
}
|
|
9438
9438
|
push(...t) {
|
|
9439
|
-
for (let e = 0, i = t.length; e < i; e++)
|
|
9439
|
+
for (let e = 0, i = t.length; e < i; e++) Un(this, t[e]);
|
|
9440
9440
|
return this.length;
|
|
9441
9441
|
}
|
|
9442
9442
|
unshift(...t) {
|
|
9443
|
-
for (var e = 0, i = t.length; e < i; e++)
|
|
9443
|
+
for (var e = 0, i = t.length; e < i; e++) Hn(this, t[e]);
|
|
9444
9444
|
return this.length;
|
|
9445
9445
|
}
|
|
9446
9446
|
pop() {
|
|
@@ -9536,7 +9536,7 @@ var oi = class s2 {
|
|
|
9536
9536
|
let n = [];
|
|
9537
9537
|
for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
|
|
9538
9538
|
r ? r !== this.tail && (r = r.prev) : r = this.tail;
|
|
9539
|
-
for (let o of i) r =
|
|
9539
|
+
for (let o of i) r = zn(this, r, o);
|
|
9540
9540
|
return n;
|
|
9541
9541
|
}
|
|
9542
9542
|
reverse() {
|
|
@@ -9548,17 +9548,17 @@ var oi = class s2 {
|
|
|
9548
9548
|
return this.head = e, this.tail = t, this;
|
|
9549
9549
|
}
|
|
9550
9550
|
};
|
|
9551
|
-
function
|
|
9552
|
-
let i = t, r = t ? t.next : s3.head, n = new
|
|
9551
|
+
function zn(s3, t, e) {
|
|
9552
|
+
let i = t, r = t ? t.next : s3.head, n = new de(e, i, r, s3);
|
|
9553
9553
|
return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
|
|
9554
9554
|
}
|
|
9555
|
-
function zn(s3, t) {
|
|
9556
|
-
s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
|
|
9557
|
-
}
|
|
9558
9555
|
function Un(s3, t) {
|
|
9559
|
-
s3.
|
|
9556
|
+
s3.tail = new de(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
|
|
9560
9557
|
}
|
|
9561
|
-
|
|
9558
|
+
function Hn(s3, t) {
|
|
9559
|
+
s3.head = new de(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
|
|
9560
|
+
}
|
|
9561
|
+
var de = class {
|
|
9562
9562
|
list;
|
|
9563
9563
|
next;
|
|
9564
9564
|
prev;
|
|
@@ -9581,28 +9581,28 @@ var mi = class {
|
|
|
9581
9581
|
this.path = t || "./", this.absolute = e;
|
|
9582
9582
|
}
|
|
9583
9583
|
};
|
|
9584
|
-
var
|
|
9584
|
+
var ir = Buffer.alloc(1024);
|
|
9585
9585
|
var ai = /* @__PURE__ */ Symbol("onStat");
|
|
9586
|
-
var
|
|
9586
|
+
var ue = /* @__PURE__ */ Symbol("ended");
|
|
9587
9587
|
var W = /* @__PURE__ */ Symbol("queue");
|
|
9588
|
-
var
|
|
9588
|
+
var me = /* @__PURE__ */ Symbol("pendingLinks");
|
|
9589
9589
|
var Et = /* @__PURE__ */ Symbol("current");
|
|
9590
|
-
var
|
|
9591
|
-
var
|
|
9590
|
+
var Ct = /* @__PURE__ */ Symbol("process");
|
|
9591
|
+
var pe = /* @__PURE__ */ Symbol("processing");
|
|
9592
9592
|
var hi = /* @__PURE__ */ Symbol("processJob");
|
|
9593
9593
|
var G = /* @__PURE__ */ Symbol("jobs");
|
|
9594
|
-
var
|
|
9594
|
+
var hs = /* @__PURE__ */ Symbol("jobDone");
|
|
9595
9595
|
var li = /* @__PURE__ */ Symbol("addFSEntry");
|
|
9596
|
-
var
|
|
9597
|
-
var
|
|
9598
|
-
var
|
|
9596
|
+
var sr = /* @__PURE__ */ Symbol("addTarEntry");
|
|
9597
|
+
var cs = /* @__PURE__ */ Symbol("stat");
|
|
9598
|
+
var fs2 = /* @__PURE__ */ Symbol("readdir");
|
|
9599
9599
|
var ci = /* @__PURE__ */ Symbol("onreaddir");
|
|
9600
9600
|
var fi = /* @__PURE__ */ Symbol("pipe");
|
|
9601
|
-
var
|
|
9602
|
-
var
|
|
9601
|
+
var rr = /* @__PURE__ */ Symbol("entry");
|
|
9602
|
+
var as = /* @__PURE__ */ Symbol("entryOpt");
|
|
9603
9603
|
var di = /* @__PURE__ */ Symbol("writeEntryClass");
|
|
9604
|
-
var
|
|
9605
|
-
var
|
|
9604
|
+
var or = /* @__PURE__ */ Symbol("write");
|
|
9605
|
+
var ls = /* @__PURE__ */ Symbol("ondrain");
|
|
9606
9606
|
var wt = class extends A {
|
|
9607
9607
|
sync = false;
|
|
9608
9608
|
opt;
|
|
@@ -9627,46 +9627,46 @@ var wt = class extends A {
|
|
|
9627
9627
|
[di];
|
|
9628
9628
|
onWriteEntry;
|
|
9629
9629
|
[W];
|
|
9630
|
-
[
|
|
9630
|
+
[me] = /* @__PURE__ */ new Map();
|
|
9631
9631
|
[G] = 0;
|
|
9632
|
-
[
|
|
9633
|
-
[
|
|
9632
|
+
[pe] = false;
|
|
9633
|
+
[ue] = false;
|
|
9634
9634
|
constructor(t = {}) {
|
|
9635
|
-
if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[di] =
|
|
9635
|
+
if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[di] = fe, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
|
|
9636
9636
|
if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
|
|
9637
|
-
if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new
|
|
9637
|
+
if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new Pe(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new He(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ze(t.zstd)), !this.zip) throw new Error("impossible");
|
|
9638
9638
|
let e = this.zip;
|
|
9639
|
-
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[
|
|
9640
|
-
} else this.on("drain", this[
|
|
9641
|
-
this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new oi(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[
|
|
9639
|
+
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[ls]()), this.on("resume", () => e.resume());
|
|
9640
|
+
} else this.on("drain", this[ls]);
|
|
9641
|
+
this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new oi(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[pe] = false, this[ue] = false;
|
|
9642
9642
|
}
|
|
9643
|
-
[
|
|
9643
|
+
[or](t) {
|
|
9644
9644
|
return super.write(t);
|
|
9645
9645
|
}
|
|
9646
9646
|
add(t) {
|
|
9647
9647
|
return this.write(t), this;
|
|
9648
9648
|
}
|
|
9649
9649
|
end(t, e, i) {
|
|
9650
|
-
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[
|
|
9650
|
+
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[ue] = true, this[Ct](), i && i(), this;
|
|
9651
9651
|
}
|
|
9652
9652
|
write(t) {
|
|
9653
|
-
if (this[
|
|
9654
|
-
return t
|
|
9653
|
+
if (this[ue]) throw new Error("write after end");
|
|
9654
|
+
return typeof t == "string" ? this[li](t) : this[sr](t), this.flowing;
|
|
9655
9655
|
}
|
|
9656
|
-
[
|
|
9657
|
-
let e = f(
|
|
9656
|
+
[sr](t) {
|
|
9657
|
+
let e = f(nr.resolve(this.cwd, t.path));
|
|
9658
9658
|
if (!this.filter(t.path, t)) t.resume();
|
|
9659
9659
|
else {
|
|
9660
9660
|
let i = new mi(t.path, e);
|
|
9661
|
-
i.entry = new ni(t, this[
|
|
9661
|
+
i.entry = new ni(t, this[as](i)), i.entry.on("end", () => this[hs](i)), this[G] += 1, this[W].push(i);
|
|
9662
9662
|
}
|
|
9663
|
-
this[
|
|
9663
|
+
this[Ct]();
|
|
9664
9664
|
}
|
|
9665
9665
|
[li](t) {
|
|
9666
|
-
let e = f(
|
|
9667
|
-
this[W].push(new mi(t, e)), this[
|
|
9666
|
+
let e = f(nr.resolve(this.cwd, t));
|
|
9667
|
+
this[W].push(new mi(t, e)), this[Ct]();
|
|
9668
9668
|
}
|
|
9669
|
-
[
|
|
9669
|
+
[cs](t) {
|
|
9670
9670
|
t.pending = true, this[G] += 1;
|
|
9671
9671
|
let e = this.follow ? "stat" : "lstat";
|
|
9672
9672
|
ui[e](t.absolute, (i, r) => {
|
|
@@ -9677,44 +9677,44 @@ var wt = class extends A {
|
|
|
9677
9677
|
if (this.statCache.set(t.absolute, e), t.stat = e, !this.filter(t.path, e)) t.ignore = true;
|
|
9678
9678
|
else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t === this[Et]) this[hi](t);
|
|
9679
9679
|
else {
|
|
9680
|
-
let i = `${e.dev}:${e.ino}`, r = this[
|
|
9681
|
-
r ? r.push(t) : this[
|
|
9680
|
+
let i = `${e.dev}:${e.ino}`, r = this[me].get(i);
|
|
9681
|
+
r ? r.push(t) : this[me].set(i, [t]), t.pendingLink = true, t.pending = true;
|
|
9682
9682
|
}
|
|
9683
|
-
this[
|
|
9683
|
+
this[Ct]();
|
|
9684
9684
|
}
|
|
9685
|
-
[
|
|
9685
|
+
[fs2](t) {
|
|
9686
9686
|
t.pending = true, this[G] += 1, ui.readdir(t.absolute, (e, i) => {
|
|
9687
9687
|
if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
|
|
9688
9688
|
this[ci](t, i);
|
|
9689
9689
|
});
|
|
9690
9690
|
}
|
|
9691
9691
|
[ci](t, e) {
|
|
9692
|
-
this.readdirCache.set(t.absolute, e), t.readdir = e, this[
|
|
9692
|
+
this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ct]();
|
|
9693
9693
|
}
|
|
9694
|
-
[
|
|
9695
|
-
if (!this[
|
|
9696
|
-
this[
|
|
9694
|
+
[Ct]() {
|
|
9695
|
+
if (!this[pe]) {
|
|
9696
|
+
this[pe] = true;
|
|
9697
9697
|
for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[hi](t.value), t.value.ignore) {
|
|
9698
9698
|
let e = t.next;
|
|
9699
9699
|
this[W].removeNode(t), t.next = e;
|
|
9700
9700
|
}
|
|
9701
|
-
this[
|
|
9701
|
+
this[pe] = false, this[ue] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(ir) : (super.write(ir), super.end()));
|
|
9702
9702
|
}
|
|
9703
9703
|
}
|
|
9704
9704
|
get [Et]() {
|
|
9705
9705
|
return this[W] && this[W].head && this[W].head.value;
|
|
9706
9706
|
}
|
|
9707
|
-
[
|
|
9707
|
+
[hs](t) {
|
|
9708
9708
|
this[W].shift(), this[G] -= 1;
|
|
9709
9709
|
let { stat: e } = t;
|
|
9710
9710
|
if (e && e.isFile() && e.nlink > 1) {
|
|
9711
|
-
let i = `${e.dev}:${e.ino}`, r = this[
|
|
9711
|
+
let i = `${e.dev}:${e.ino}`, r = this[me].get(i);
|
|
9712
9712
|
if (r) {
|
|
9713
|
-
this[
|
|
9713
|
+
this[me].delete(i);
|
|
9714
9714
|
for (let n of r) n.pending = false, this[hi](n);
|
|
9715
9715
|
}
|
|
9716
9716
|
}
|
|
9717
|
-
this[
|
|
9717
|
+
this[Ct]();
|
|
9718
9718
|
}
|
|
9719
9719
|
[hi](t) {
|
|
9720
9720
|
if (t.pending && t.pendingLink && t === this[Et] && (t.pending = false, t.pendingLink = false), !t.pending) {
|
|
@@ -9724,14 +9724,14 @@ var wt = class extends A {
|
|
|
9724
9724
|
}
|
|
9725
9725
|
if (!t.stat) {
|
|
9726
9726
|
let e = this.statCache.get(t.absolute);
|
|
9727
|
-
e ? this[ai](t, e) : this[
|
|
9727
|
+
e ? this[ai](t, e) : this[cs](t);
|
|
9728
9728
|
}
|
|
9729
9729
|
if (t.stat && !t.ignore) {
|
|
9730
9730
|
if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
|
|
9731
9731
|
let e = this.readdirCache.get(t.absolute);
|
|
9732
|
-
if (e ? this[ci](t, e) : this[
|
|
9732
|
+
if (e ? this[ci](t, e) : this[fs2](t), !t.readdir) return;
|
|
9733
9733
|
}
|
|
9734
|
-
if (t.entry = this[
|
|
9734
|
+
if (t.entry = this[rr](t), !t.entry) {
|
|
9735
9735
|
t.ignore = true;
|
|
9736
9736
|
return;
|
|
9737
9737
|
}
|
|
@@ -9739,18 +9739,18 @@ var wt = class extends A {
|
|
|
9739
9739
|
}
|
|
9740
9740
|
}
|
|
9741
9741
|
}
|
|
9742
|
-
[
|
|
9742
|
+
[as](t) {
|
|
9743
9743
|
return { onwarn: (e, i, r) => this.warn(e, i, r), noPax: this.noPax, cwd: this.cwd, absolute: t.absolute, preservePaths: this.preservePaths, maxReadSize: this.maxReadSize, strict: this.strict, portable: this.portable, linkCache: this.linkCache, statCache: this.statCache, noMtime: this.noMtime, mtime: this.mtime, prefix: this.prefix, onWriteEntry: this.onWriteEntry };
|
|
9744
9744
|
}
|
|
9745
|
-
[
|
|
9745
|
+
[rr](t) {
|
|
9746
9746
|
this[G] += 1;
|
|
9747
9747
|
try {
|
|
9748
|
-
return new this[di](t.path, this[
|
|
9748
|
+
return new this[di](t.path, this[as](t)).on("end", () => this[hs](t)).on("error", (i) => this.emit("error", i));
|
|
9749
9749
|
} catch (e) {
|
|
9750
9750
|
this.emit("error", e);
|
|
9751
9751
|
}
|
|
9752
9752
|
}
|
|
9753
|
-
[
|
|
9753
|
+
[ls]() {
|
|
9754
9754
|
this[Et] && this[Et].entry && this[Et].entry.resume();
|
|
9755
9755
|
}
|
|
9756
9756
|
[fi](t) {
|
|
@@ -9773,7 +9773,7 @@ var wt = class extends A {
|
|
|
9773
9773
|
Nt(this, t, e, i);
|
|
9774
9774
|
}
|
|
9775
9775
|
};
|
|
9776
|
-
var
|
|
9776
|
+
var kt = class extends wt {
|
|
9777
9777
|
sync = true;
|
|
9778
9778
|
constructor(t) {
|
|
9779
9779
|
super(t), this[di] = ri;
|
|
@@ -9782,11 +9782,11 @@ var Ft = class extends wt {
|
|
|
9782
9782
|
}
|
|
9783
9783
|
resume() {
|
|
9784
9784
|
}
|
|
9785
|
-
[
|
|
9785
|
+
[cs](t) {
|
|
9786
9786
|
let e = this.follow ? "statSync" : "lstatSync";
|
|
9787
9787
|
this[ai](t, ui[e](t.absolute));
|
|
9788
9788
|
}
|
|
9789
|
-
[
|
|
9789
|
+
[fs2](t) {
|
|
9790
9790
|
this[ci](t, ui.readdirSync(t.absolute));
|
|
9791
9791
|
}
|
|
9792
9792
|
[fi](t) {
|
|
@@ -9798,54 +9798,54 @@ var Ft = class extends wt {
|
|
|
9798
9798
|
i ? e.on("data", (r) => {
|
|
9799
9799
|
i.write(r);
|
|
9800
9800
|
}) : e.on("data", (r) => {
|
|
9801
|
-
super[
|
|
9801
|
+
super[or](r);
|
|
9802
9802
|
});
|
|
9803
9803
|
}
|
|
9804
9804
|
};
|
|
9805
|
-
var Hn = (s3, t) => {
|
|
9806
|
-
let e = new Ft(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
|
|
9807
|
-
e.pipe(i), hr(e, t);
|
|
9808
|
-
};
|
|
9809
9805
|
var Wn = (s3, t) => {
|
|
9806
|
+
let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
|
|
9807
|
+
e.pipe(i), ar(e, t);
|
|
9808
|
+
};
|
|
9809
|
+
var Gn = (s3, t) => {
|
|
9810
9810
|
let e = new wt(s3), i = new tt2(s3.file, { mode: s3.mode || 438 });
|
|
9811
9811
|
e.pipe(i);
|
|
9812
9812
|
let r = new Promise((n, o) => {
|
|
9813
9813
|
i.on("error", o), i.on("close", n), e.on("error", o);
|
|
9814
9814
|
});
|
|
9815
|
-
return
|
|
9815
|
+
return lr(e, t).catch((n) => e.emit("error", n)), r;
|
|
9816
9816
|
};
|
|
9817
|
-
var
|
|
9817
|
+
var ar = (s3, t) => {
|
|
9818
9818
|
t.forEach((e) => {
|
|
9819
|
-
e.charAt(0) === "@" ?
|
|
9819
|
+
e.charAt(0) === "@" ? Ft({ file: hr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
9820
9820
|
}), s3.end();
|
|
9821
9821
|
};
|
|
9822
|
-
var
|
|
9823
|
-
for (let e of t) e.charAt(0) === "@" ? await
|
|
9822
|
+
var lr = async (s3, t) => {
|
|
9823
|
+
for (let e of t) e.charAt(0) === "@" ? await Ft({ file: hr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
|
|
9824
9824
|
s3.add(i);
|
|
9825
9825
|
} }) : s3.add(e);
|
|
9826
9826
|
s3.end();
|
|
9827
9827
|
};
|
|
9828
|
-
var Gn = (s3, t) => {
|
|
9829
|
-
let e = new Ft(s3);
|
|
9830
|
-
return hr(e, t), e;
|
|
9831
|
-
};
|
|
9832
9828
|
var Zn = (s3, t) => {
|
|
9829
|
+
let e = new kt(s3);
|
|
9830
|
+
return ar(e, t), e;
|
|
9831
|
+
};
|
|
9832
|
+
var Yn = (s3, t) => {
|
|
9833
9833
|
let e = new wt(s3);
|
|
9834
|
-
return
|
|
9834
|
+
return lr(e, t).catch((i) => e.emit("error", i)), e;
|
|
9835
9835
|
};
|
|
9836
|
-
var
|
|
9836
|
+
var Kn = K(Wn, Gn, Zn, Yn, (s3, t) => {
|
|
9837
9837
|
if (!t?.length) throw new TypeError("no paths specified to add to archive");
|
|
9838
9838
|
});
|
|
9839
|
-
var
|
|
9840
|
-
var
|
|
9841
|
-
var { O_CREAT:
|
|
9842
|
-
var
|
|
9843
|
-
var
|
|
9844
|
-
var
|
|
9845
|
-
var
|
|
9846
|
-
var
|
|
9847
|
-
var
|
|
9848
|
-
var
|
|
9839
|
+
var Vn = process.env.__FAKE_PLATFORM__ || process.platform;
|
|
9840
|
+
var ur = Vn === "win32";
|
|
9841
|
+
var { O_CREAT: mr, O_NOFOLLOW: cr, O_TRUNC: pr, O_WRONLY: Er } = dr.constants;
|
|
9842
|
+
var wr = Number(process.env.__FAKE_FS_O_FILENAME__) || dr.constants.UV_FS_O_FILEMAP || 0;
|
|
9843
|
+
var $n = ur && !!wr;
|
|
9844
|
+
var Xn = 512 * 1024;
|
|
9845
|
+
var qn = wr | pr | mr | Er;
|
|
9846
|
+
var fr = !ur && typeof cr == "number" ? cr | pr | mr | Er : null;
|
|
9847
|
+
var ds = fr !== null ? () => fr : $n ? (s3) => s3 < Xn ? qn : "w" : () => "w";
|
|
9848
|
+
var us = (s3, t, e) => {
|
|
9849
9849
|
try {
|
|
9850
9850
|
return Ei.lchownSync(s3, t, e);
|
|
9851
9851
|
} catch (i) {
|
|
@@ -9857,50 +9857,50 @@ var pi = (s3, t, e, i) => {
|
|
|
9857
9857
|
i(r && r?.code !== "ENOENT" ? r : null);
|
|
9858
9858
|
});
|
|
9859
9859
|
};
|
|
9860
|
-
var
|
|
9861
|
-
if (t.isDirectory())
|
|
9860
|
+
var Qn = (s3, t, e, i, r) => {
|
|
9861
|
+
if (t.isDirectory()) ms(Ee.resolve(s3, t.name), e, i, (n) => {
|
|
9862
9862
|
if (n) return r(n);
|
|
9863
|
-
let o =
|
|
9863
|
+
let o = Ee.resolve(s3, t.name);
|
|
9864
9864
|
pi(o, e, i, r);
|
|
9865
9865
|
});
|
|
9866
9866
|
else {
|
|
9867
|
-
let n =
|
|
9867
|
+
let n = Ee.resolve(s3, t.name);
|
|
9868
9868
|
pi(n, e, i, r);
|
|
9869
9869
|
}
|
|
9870
9870
|
};
|
|
9871
|
-
var
|
|
9871
|
+
var ms = (s3, t, e, i) => {
|
|
9872
9872
|
Ei.readdir(s3, { withFileTypes: true }, (r, n) => {
|
|
9873
9873
|
if (r) {
|
|
9874
9874
|
if (r.code === "ENOENT") return i();
|
|
9875
9875
|
if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
|
|
9876
9876
|
}
|
|
9877
9877
|
if (r || !n.length) return pi(s3, t, e, i);
|
|
9878
|
-
let o = n.length,
|
|
9879
|
-
if (!
|
|
9880
|
-
if (l) return i(
|
|
9878
|
+
let o = n.length, a = null, h = (l) => {
|
|
9879
|
+
if (!a) {
|
|
9880
|
+
if (l) return i(a = l);
|
|
9881
9881
|
if (--o === 0) return pi(s3, t, e, i);
|
|
9882
9882
|
}
|
|
9883
9883
|
};
|
|
9884
|
-
for (let l of n)
|
|
9884
|
+
for (let l of n) Qn(s3, l, t, e, h);
|
|
9885
9885
|
});
|
|
9886
9886
|
};
|
|
9887
|
-
var
|
|
9888
|
-
t.isDirectory() &&
|
|
9887
|
+
var Jn = (s3, t, e, i) => {
|
|
9888
|
+
t.isDirectory() && ps(Ee.resolve(s3, t.name), e, i), us(Ee.resolve(s3, t.name), e, i);
|
|
9889
9889
|
};
|
|
9890
|
-
var
|
|
9890
|
+
var ps = (s3, t, e) => {
|
|
9891
9891
|
let i;
|
|
9892
9892
|
try {
|
|
9893
9893
|
i = Ei.readdirSync(s3, { withFileTypes: true });
|
|
9894
9894
|
} catch (r) {
|
|
9895
9895
|
let n = r;
|
|
9896
9896
|
if (n?.code === "ENOENT") return;
|
|
9897
|
-
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return
|
|
9897
|
+
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return us(s3, t, e);
|
|
9898
9898
|
throw n;
|
|
9899
9899
|
}
|
|
9900
|
-
for (let r of i)
|
|
9901
|
-
return
|
|
9900
|
+
for (let r of i) Jn(s3, r, t, e);
|
|
9901
|
+
return us(s3, t, e);
|
|
9902
9902
|
};
|
|
9903
|
-
var
|
|
9903
|
+
var we = class extends Error {
|
|
9904
9904
|
path;
|
|
9905
9905
|
code;
|
|
9906
9906
|
syscall = "chdir";
|
|
@@ -9923,97 +9923,97 @@ var St = class extends Error {
|
|
|
9923
9923
|
return "SymlinkError";
|
|
9924
9924
|
}
|
|
9925
9925
|
};
|
|
9926
|
-
var
|
|
9927
|
-
|
|
9928
|
-
(e || !i.isDirectory()) && (e = new
|
|
9926
|
+
var to = (s3, t) => {
|
|
9927
|
+
k.stat(s3, (e, i) => {
|
|
9928
|
+
(e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
|
|
9929
9929
|
});
|
|
9930
9930
|
};
|
|
9931
|
-
var
|
|
9931
|
+
var Sr = (s3, t, e) => {
|
|
9932
9932
|
s3 = f(s3);
|
|
9933
|
-
let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid,
|
|
9934
|
-
E ? e(E) : x &&
|
|
9933
|
+
let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, a = t.gid, h = typeof o == "number" && typeof a == "number" && (o !== t.processUid || a !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), S = (E, x) => {
|
|
9934
|
+
E ? e(E) : x && h ? ms(x, o, a, (xe) => S(xe)) : n ? k.chmod(s3, r, e) : e();
|
|
9935
9935
|
};
|
|
9936
|
-
if (s3 === d) return
|
|
9937
|
-
if (l) return
|
|
9936
|
+
if (s3 === d) return to(s3, S);
|
|
9937
|
+
if (l) return jn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
|
|
9938
9938
|
let N = f(wi.relative(d, s3)).split("/");
|
|
9939
|
-
|
|
9939
|
+
Es(d, N, r, c, d, void 0, S);
|
|
9940
9940
|
};
|
|
9941
|
-
var
|
|
9941
|
+
var Es = (s3, t, e, i, r, n, o) => {
|
|
9942
9942
|
if (t.length === 0) return o(null, n);
|
|
9943
|
-
let
|
|
9944
|
-
|
|
9943
|
+
let a = t.shift(), h = f(wi.resolve(s3 + "/" + a));
|
|
9944
|
+
k.mkdir(h, e, yr(h, t, e, i, r, n, o));
|
|
9945
9945
|
};
|
|
9946
|
-
var
|
|
9947
|
-
|
|
9948
|
-
if (
|
|
9949
|
-
else if (l.isDirectory())
|
|
9950
|
-
else if (i)
|
|
9946
|
+
var yr = (s3, t, e, i, r, n, o) => (a) => {
|
|
9947
|
+
a ? k.lstat(s3, (h, l) => {
|
|
9948
|
+
if (h) h.path = h.path && f(h.path), o(h);
|
|
9949
|
+
else if (l.isDirectory()) Es(s3, t, e, i, r, n, o);
|
|
9950
|
+
else if (i) k.unlink(s3, (c) => {
|
|
9951
9951
|
if (c) return o(c);
|
|
9952
|
-
|
|
9952
|
+
k.mkdir(s3, e, yr(s3, t, e, i, r, n, o));
|
|
9953
9953
|
});
|
|
9954
9954
|
else {
|
|
9955
9955
|
if (l.isSymbolicLink()) return o(new St(s3, s3 + "/" + t.join("/")));
|
|
9956
|
-
o(
|
|
9956
|
+
o(a);
|
|
9957
9957
|
}
|
|
9958
|
-
}) : (n = n || s3,
|
|
9958
|
+
}) : (n = n || s3, Es(s3, t, e, i, r, n, o));
|
|
9959
9959
|
};
|
|
9960
|
-
var
|
|
9960
|
+
var eo = (s3) => {
|
|
9961
9961
|
let t = false, e;
|
|
9962
9962
|
try {
|
|
9963
|
-
t =
|
|
9963
|
+
t = k.statSync(s3).isDirectory();
|
|
9964
9964
|
} catch (i) {
|
|
9965
9965
|
e = i?.code;
|
|
9966
9966
|
} finally {
|
|
9967
|
-
if (!t) throw new
|
|
9967
|
+
if (!t) throw new we(s3, e ?? "ENOTDIR");
|
|
9968
9968
|
}
|
|
9969
9969
|
};
|
|
9970
|
-
var
|
|
9970
|
+
var Rr = (s3, t) => {
|
|
9971
9971
|
s3 = f(s3);
|
|
9972
|
-
let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid,
|
|
9973
|
-
E &&
|
|
9972
|
+
let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid, a = typeof n == "number" && typeof o == "number" && (n !== t.processUid || o !== t.processGid), h = t.preserve, l = t.unlink, c = f(t.cwd), d = (E) => {
|
|
9973
|
+
E && a && ps(E, n, o), r && k.chmodSync(s3, i);
|
|
9974
9974
|
};
|
|
9975
|
-
if (s3 === c) return
|
|
9976
|
-
if (
|
|
9975
|
+
if (s3 === c) return eo(c), d();
|
|
9976
|
+
if (h) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
|
|
9977
9977
|
let T = f(wi.relative(c, s3)).split("/"), N;
|
|
9978
9978
|
for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
|
|
9979
9979
|
x = f(wi.resolve(x));
|
|
9980
9980
|
try {
|
|
9981
|
-
|
|
9981
|
+
k.mkdirSync(x, i), N = N || x;
|
|
9982
9982
|
} catch {
|
|
9983
|
-
let
|
|
9984
|
-
if (
|
|
9983
|
+
let xe = k.lstatSync(x);
|
|
9984
|
+
if (xe.isDirectory()) continue;
|
|
9985
9985
|
if (l) {
|
|
9986
|
-
|
|
9986
|
+
k.unlinkSync(x), k.mkdirSync(x, i), N = N || x;
|
|
9987
9987
|
continue;
|
|
9988
|
-
} else if (
|
|
9988
|
+
} else if (xe.isSymbolicLink()) return new St(x, x + "/" + T.join("/"));
|
|
9989
9989
|
}
|
|
9990
9990
|
}
|
|
9991
9991
|
return d(N);
|
|
9992
9992
|
};
|
|
9993
|
-
var
|
|
9994
|
-
var
|
|
9995
|
-
var
|
|
9996
|
-
var
|
|
9997
|
-
|
|
9998
|
-
let t =
|
|
9999
|
-
if (e >
|
|
10000
|
-
for (let i of
|
|
9993
|
+
var ws = /* @__PURE__ */ Object.create(null);
|
|
9994
|
+
var gr = 1e4;
|
|
9995
|
+
var Vt = /* @__PURE__ */ new Set();
|
|
9996
|
+
var br = (s3) => {
|
|
9997
|
+
Vt.has(s3) ? Vt.delete(s3) : ws[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), Vt.add(s3);
|
|
9998
|
+
let t = ws[s3], e = Vt.size - gr;
|
|
9999
|
+
if (e > gr / 10) {
|
|
10000
|
+
for (let i of Vt) if (Vt.delete(i), delete ws[i], --e <= 0) break;
|
|
10001
10001
|
}
|
|
10002
10002
|
return t;
|
|
10003
10003
|
};
|
|
10004
|
-
var
|
|
10005
|
-
var
|
|
10006
|
-
var
|
|
10004
|
+
var io = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
10005
|
+
var so = io === "win32";
|
|
10006
|
+
var ro = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
|
|
10007
10007
|
let r = e.at(-1);
|
|
10008
|
-
return r !== void 0 && (i =
|
|
10008
|
+
return r !== void 0 && (i = _r(r, i)), e.push(i || "/"), e;
|
|
10009
10009
|
}, []);
|
|
10010
10010
|
var Si = class {
|
|
10011
10011
|
#t = /* @__PURE__ */ new Map();
|
|
10012
10012
|
#i = /* @__PURE__ */ new Map();
|
|
10013
10013
|
#s = /* @__PURE__ */ new Set();
|
|
10014
10014
|
reserve(t, e) {
|
|
10015
|
-
t =
|
|
10016
|
-
let i = new Set(t.map((r) =>
|
|
10015
|
+
t = so ? ["win32 parallelization disabled"] : t.map((r) => mt(_r(br(r))));
|
|
10016
|
+
let i = new Set(t.map((r) => ro(r)).reduce((r, n) => r.concat(n)));
|
|
10017
10017
|
this.#i.set(e, { dirs: i, paths: t });
|
|
10018
10018
|
for (let r of t) {
|
|
10019
10019
|
let n = this.#t.get(r);
|
|
@@ -10047,77 +10047,77 @@ var Si = class {
|
|
|
10047
10047
|
if (!e) throw new Error("invalid reservation");
|
|
10048
10048
|
let { paths: i, dirs: r } = e, n = /* @__PURE__ */ new Set();
|
|
10049
10049
|
for (let o of i) {
|
|
10050
|
-
let
|
|
10051
|
-
if (!
|
|
10052
|
-
let
|
|
10053
|
-
if (!
|
|
10050
|
+
let a = this.#t.get(o);
|
|
10051
|
+
if (!a || a?.[0] !== t) continue;
|
|
10052
|
+
let h = a[1];
|
|
10053
|
+
if (!h) {
|
|
10054
10054
|
this.#t.delete(o);
|
|
10055
10055
|
continue;
|
|
10056
10056
|
}
|
|
10057
|
-
if (
|
|
10058
|
-
else for (let l of
|
|
10057
|
+
if (a.shift(), typeof h == "function") n.add(h);
|
|
10058
|
+
else for (let l of h) n.add(l);
|
|
10059
10059
|
}
|
|
10060
10060
|
for (let o of r) {
|
|
10061
|
-
let
|
|
10062
|
-
if (!(!
|
|
10061
|
+
let a = this.#t.get(o), h = a?.[0];
|
|
10062
|
+
if (!(!a || !(h instanceof Set))) if (h.size === 1 && a.length === 1) {
|
|
10063
10063
|
this.#t.delete(o);
|
|
10064
10064
|
continue;
|
|
10065
|
-
} else if (
|
|
10066
|
-
|
|
10067
|
-
let l =
|
|
10065
|
+
} else if (h.size === 1) {
|
|
10066
|
+
a.shift();
|
|
10067
|
+
let l = a[0];
|
|
10068
10068
|
typeof l == "function" && n.add(l);
|
|
10069
|
-
} else
|
|
10069
|
+
} else h.delete(t);
|
|
10070
10070
|
}
|
|
10071
10071
|
return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
|
|
10072
10072
|
}
|
|
10073
10073
|
};
|
|
10074
|
-
var
|
|
10075
|
-
var
|
|
10076
|
-
var
|
|
10077
|
-
var
|
|
10078
|
-
var
|
|
10074
|
+
var Or = () => process.umask();
|
|
10075
|
+
var Tr = /* @__PURE__ */ Symbol("onEntry");
|
|
10076
|
+
var gs = /* @__PURE__ */ Symbol("checkFs");
|
|
10077
|
+
var xr = /* @__PURE__ */ Symbol("checkFs2");
|
|
10078
|
+
var bs = /* @__PURE__ */ Symbol("isReusable");
|
|
10079
10079
|
var P = /* @__PURE__ */ Symbol("makeFs");
|
|
10080
|
-
var
|
|
10081
|
-
var
|
|
10080
|
+
var _s = /* @__PURE__ */ Symbol("file");
|
|
10081
|
+
var Os = /* @__PURE__ */ Symbol("directory");
|
|
10082
10082
|
var Ri = /* @__PURE__ */ Symbol("link");
|
|
10083
|
-
var
|
|
10084
|
-
var
|
|
10085
|
-
var
|
|
10086
|
-
var
|
|
10087
|
-
var
|
|
10088
|
-
var
|
|
10083
|
+
var Lr = /* @__PURE__ */ Symbol("symlink");
|
|
10084
|
+
var Nr = /* @__PURE__ */ Symbol("hardlink");
|
|
10085
|
+
var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
|
|
10086
|
+
var Dr = /* @__PURE__ */ Symbol("unsupported");
|
|
10087
|
+
var Ar = /* @__PURE__ */ Symbol("checkPath");
|
|
10088
|
+
var Ss = /* @__PURE__ */ Symbol("stripAbsolutePath");
|
|
10089
10089
|
var yt = /* @__PURE__ */ Symbol("mkdir");
|
|
10090
10090
|
var O = /* @__PURE__ */ Symbol("onError");
|
|
10091
10091
|
var yi = /* @__PURE__ */ Symbol("pending");
|
|
10092
|
-
var
|
|
10093
|
-
var
|
|
10094
|
-
var
|
|
10095
|
-
var
|
|
10096
|
-
var
|
|
10097
|
-
var
|
|
10098
|
-
var
|
|
10099
|
-
var
|
|
10100
|
-
var
|
|
10101
|
-
var
|
|
10102
|
-
var
|
|
10103
|
-
var
|
|
10104
|
-
var
|
|
10105
|
-
if (!
|
|
10092
|
+
var Ir = /* @__PURE__ */ Symbol("pend");
|
|
10093
|
+
var $t = /* @__PURE__ */ Symbol("unpend");
|
|
10094
|
+
var ys = /* @__PURE__ */ Symbol("ended");
|
|
10095
|
+
var Rs = /* @__PURE__ */ Symbol("maybeClose");
|
|
10096
|
+
var Ts = /* @__PURE__ */ Symbol("skip");
|
|
10097
|
+
var Re = /* @__PURE__ */ Symbol("doChown");
|
|
10098
|
+
var ge = /* @__PURE__ */ Symbol("uid");
|
|
10099
|
+
var be = /* @__PURE__ */ Symbol("gid");
|
|
10100
|
+
var _e = /* @__PURE__ */ Symbol("checkedCwd");
|
|
10101
|
+
var oo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
10102
|
+
var Oe = oo === "win32";
|
|
10103
|
+
var ho = 1024;
|
|
10104
|
+
var ao = (s3, t) => {
|
|
10105
|
+
if (!Oe) return u.unlink(s3, t);
|
|
10106
10106
|
let e = s3 + ".DELETE." + Cr(16).toString("hex");
|
|
10107
10107
|
u.rename(s3, e, (i) => {
|
|
10108
10108
|
if (i) return t(i);
|
|
10109
10109
|
u.unlink(e, t);
|
|
10110
10110
|
});
|
|
10111
10111
|
};
|
|
10112
|
-
var
|
|
10113
|
-
if (!
|
|
10112
|
+
var lo = (s3) => {
|
|
10113
|
+
if (!Oe) return u.unlinkSync(s3);
|
|
10114
10114
|
let t = s3 + ".DELETE." + Cr(16).toString("hex");
|
|
10115
10115
|
u.renameSync(s3, t), u.unlinkSync(t);
|
|
10116
10116
|
};
|
|
10117
|
-
var
|
|
10118
|
-
var
|
|
10119
|
-
[
|
|
10120
|
-
[
|
|
10117
|
+
var Fr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
|
|
10118
|
+
var Xt = class extends st {
|
|
10119
|
+
[ys] = false;
|
|
10120
|
+
[_e] = false;
|
|
10121
10121
|
[yi] = 0;
|
|
10122
10122
|
reservations = new Si();
|
|
10123
10123
|
transform;
|
|
@@ -10146,32 +10146,32 @@ var qt = class extends st {
|
|
|
10146
10146
|
chmod;
|
|
10147
10147
|
constructor(t = {}) {
|
|
10148
10148
|
if (t.ondone = () => {
|
|
10149
|
-
this[
|
|
10149
|
+
this[ys] = true, this[Rs]();
|
|
10150
10150
|
}, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
|
|
10151
10151
|
if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
|
|
10152
10152
|
if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
10153
10153
|
this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
|
|
10154
10154
|
} else this.uid = void 0, this.gid = void 0, this.setOwner = false;
|
|
10155
|
-
this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth :
|
|
10155
|
+
this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : ho, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : Or() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Tr](e));
|
|
10156
10156
|
}
|
|
10157
10157
|
warn(t, e, i = {}) {
|
|
10158
10158
|
return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
|
|
10159
10159
|
}
|
|
10160
|
-
[
|
|
10161
|
-
this[
|
|
10160
|
+
[Rs]() {
|
|
10161
|
+
this[ys] && this[yi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
|
|
10162
10162
|
}
|
|
10163
|
-
[
|
|
10163
|
+
[Ss](t, e) {
|
|
10164
10164
|
let i = t[e], { type: r } = t;
|
|
10165
10165
|
if (!i || this.preservePaths) return true;
|
|
10166
|
-
let [n, o] =
|
|
10167
|
-
if (
|
|
10166
|
+
let [n, o] = le(i), a = o.replaceAll(/\\/g, "/").split("/");
|
|
10167
|
+
if (a.includes("..") || Oe && /^[a-z]:\.\.$/i.test(a[0] ?? "")) {
|
|
10168
10168
|
if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
|
|
10169
|
-
let
|
|
10169
|
+
let h = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(h, a.join("/")));
|
|
10170
10170
|
if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
|
|
10171
10171
|
}
|
|
10172
10172
|
return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
|
|
10173
10173
|
}
|
|
10174
|
-
[
|
|
10174
|
+
[Ar](t) {
|
|
10175
10175
|
let e = f(t.path), i = e.split("/");
|
|
10176
10176
|
if (this.strip) {
|
|
10177
10177
|
if (i.length < this.strip) return false;
|
|
@@ -10183,20 +10183,20 @@ var qt = class extends st {
|
|
|
10183
10183
|
i.splice(0, this.strip), t.path = i.join("/");
|
|
10184
10184
|
}
|
|
10185
10185
|
if (isFinite(this.maxDepth) && i.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", { entry: t, path: e, depth: i.length, maxDepth: this.maxDepth }), false;
|
|
10186
|
-
if (!this[
|
|
10186
|
+
if (!this[Ss](t, "path") || !this[Ss](t, "linkpath")) return false;
|
|
10187
10187
|
if (t.absolute = R.isAbsolute(t.path) ? f(R.resolve(t.path)) : f(R.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
|
|
10188
10188
|
if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
|
|
10189
10189
|
if (this.win32) {
|
|
10190
10190
|
let { root: r } = R.win32.parse(String(t.absolute));
|
|
10191
|
-
t.absolute = r +
|
|
10191
|
+
t.absolute = r + Ji(String(t.absolute).slice(r.length));
|
|
10192
10192
|
let { root: n } = R.win32.parse(t.path);
|
|
10193
|
-
t.path = n +
|
|
10193
|
+
t.path = n + Ji(t.path.slice(n.length));
|
|
10194
10194
|
}
|
|
10195
10195
|
return true;
|
|
10196
10196
|
}
|
|
10197
|
-
[
|
|
10198
|
-
if (!this[
|
|
10199
|
-
switch (
|
|
10197
|
+
[Tr](t) {
|
|
10198
|
+
if (!this[Ar](t)) return t.resume();
|
|
10199
|
+
switch (no.equal(typeof t.absolute, "string"), t.type) {
|
|
10200
10200
|
case "Directory":
|
|
10201
10201
|
case "GNUDumpDir":
|
|
10202
10202
|
t.mode && (t.mode = t.mode | 448);
|
|
@@ -10205,62 +10205,62 @@ var qt = class extends st {
|
|
|
10205
10205
|
case "ContiguousFile":
|
|
10206
10206
|
case "Link":
|
|
10207
10207
|
case "SymbolicLink":
|
|
10208
|
-
return this[
|
|
10208
|
+
return this[gs](t);
|
|
10209
10209
|
default:
|
|
10210
|
-
return this[
|
|
10210
|
+
return this[Dr](t);
|
|
10211
10211
|
}
|
|
10212
10212
|
}
|
|
10213
10213
|
[O](t, e) {
|
|
10214
|
-
t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[
|
|
10214
|
+
t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[$t](), e.resume());
|
|
10215
10215
|
}
|
|
10216
10216
|
[yt](t, e, i) {
|
|
10217
|
-
|
|
10217
|
+
Sr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
|
|
10218
10218
|
}
|
|
10219
|
-
[
|
|
10219
|
+
[Re](t) {
|
|
10220
10220
|
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;
|
|
10221
10221
|
}
|
|
10222
|
-
[
|
|
10223
|
-
return
|
|
10222
|
+
[ge](t) {
|
|
10223
|
+
return Fr(this.uid, t.uid, this.processUid);
|
|
10224
10224
|
}
|
|
10225
|
-
[
|
|
10226
|
-
return
|
|
10225
|
+
[be](t) {
|
|
10226
|
+
return Fr(this.gid, t.gid, this.processGid);
|
|
10227
10227
|
}
|
|
10228
|
-
[
|
|
10229
|
-
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt2(String(t.absolute), { flags:
|
|
10230
|
-
r.on("error", (
|
|
10228
|
+
[_s](t, e) {
|
|
10229
|
+
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt2(String(t.absolute), { flags: ds(t.size), mode: i, autoClose: false });
|
|
10230
|
+
r.on("error", (h) => {
|
|
10231
10231
|
r.fd && u.close(r.fd, () => {
|
|
10232
|
-
}), r.write = () => true, this[O](
|
|
10232
|
+
}), r.write = () => true, this[O](h, t), e();
|
|
10233
10233
|
});
|
|
10234
|
-
let n = 1, o = (
|
|
10235
|
-
if (
|
|
10234
|
+
let n = 1, o = (h) => {
|
|
10235
|
+
if (h) {
|
|
10236
10236
|
r.fd && u.close(r.fd, () => {
|
|
10237
|
-
}), this[O](
|
|
10237
|
+
}), this[O](h, t), e();
|
|
10238
10238
|
return;
|
|
10239
10239
|
}
|
|
10240
10240
|
--n === 0 && r.fd !== void 0 && u.close(r.fd, (l) => {
|
|
10241
|
-
l ? this[O](l, t) : this[
|
|
10241
|
+
l ? this[O](l, t) : this[$t](), e();
|
|
10242
10242
|
});
|
|
10243
10243
|
};
|
|
10244
10244
|
r.on("finish", () => {
|
|
10245
|
-
let
|
|
10245
|
+
let h = String(t.absolute), l = r.fd;
|
|
10246
10246
|
if (typeof l == "number" && t.mtime && !this.noMtime) {
|
|
10247
10247
|
n++;
|
|
10248
10248
|
let c = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
|
|
10249
|
-
u.futimes(l, c, d, (S) => S ? u.utimes(
|
|
10249
|
+
u.futimes(l, c, d, (S) => S ? u.utimes(h, c, d, (T) => o(T && S)) : o());
|
|
10250
10250
|
}
|
|
10251
|
-
if (typeof l == "number" && this[
|
|
10251
|
+
if (typeof l == "number" && this[Re](t)) {
|
|
10252
10252
|
n++;
|
|
10253
|
-
let c = this[
|
|
10254
|
-
typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (S) => S ? u.chown(
|
|
10253
|
+
let c = this[ge](t), d = this[be](t);
|
|
10254
|
+
typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (S) => S ? u.chown(h, c, d, (T) => o(T && S)) : o());
|
|
10255
10255
|
}
|
|
10256
10256
|
o();
|
|
10257
10257
|
});
|
|
10258
|
-
let
|
|
10259
|
-
|
|
10260
|
-
this[O](
|
|
10261
|
-
}), t.pipe(
|
|
10258
|
+
let a = this.transform && this.transform(t) || t;
|
|
10259
|
+
a !== t && (a.on("error", (h) => {
|
|
10260
|
+
this[O](h, t), e();
|
|
10261
|
+
}), t.pipe(a)), a.pipe(r);
|
|
10262
10262
|
}
|
|
10263
|
-
[
|
|
10263
|
+
[Os](t, e) {
|
|
10264
10264
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
|
|
10265
10265
|
this[yt](String(t.absolute), i, (r) => {
|
|
10266
10266
|
if (r) {
|
|
@@ -10268,70 +10268,70 @@ var qt = class extends st {
|
|
|
10268
10268
|
return;
|
|
10269
10269
|
}
|
|
10270
10270
|
let n = 1, o = () => {
|
|
10271
|
-
--n === 0 && (e(), this[
|
|
10271
|
+
--n === 0 && (e(), this[$t](), t.resume());
|
|
10272
10272
|
};
|
|
10273
|
-
t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[
|
|
10273
|
+
t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, u.chown(String(t.absolute), Number(this[ge](t)), Number(this[be](t)), o)), o();
|
|
10274
10274
|
});
|
|
10275
10275
|
}
|
|
10276
|
-
[
|
|
10276
|
+
[Dr](t) {
|
|
10277
10277
|
t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
|
|
10278
10278
|
}
|
|
10279
|
-
[
|
|
10279
|
+
[Lr](t, e) {
|
|
10280
10280
|
let i = f(R.relative(this.cwd, R.resolve(R.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
|
|
10281
|
-
this[
|
|
10281
|
+
this[ye](t, this.cwd, i, () => this[Ri](t, String(t.linkpath), "symlink", e), (r) => {
|
|
10282
10282
|
this[O](r, t), e();
|
|
10283
10283
|
});
|
|
10284
10284
|
}
|
|
10285
|
-
[
|
|
10285
|
+
[Nr](t, e) {
|
|
10286
10286
|
let i = f(R.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
|
|
10287
|
-
this[
|
|
10287
|
+
this[ye](t, this.cwd, r, () => this[Ri](t, i, "link", e), (n) => {
|
|
10288
10288
|
this[O](n, t), e();
|
|
10289
10289
|
});
|
|
10290
10290
|
}
|
|
10291
|
-
[
|
|
10291
|
+
[ye](t, e, i, r, n) {
|
|
10292
10292
|
let o = i.shift();
|
|
10293
10293
|
if (this.preservePaths || o === void 0) return r();
|
|
10294
|
-
let
|
|
10295
|
-
u.lstat(
|
|
10296
|
-
if (
|
|
10297
|
-
if (l?.isSymbolicLink()) return n(new St(
|
|
10298
|
-
this[
|
|
10294
|
+
let a = R.resolve(e, o);
|
|
10295
|
+
u.lstat(a, (h, l) => {
|
|
10296
|
+
if (h) return r();
|
|
10297
|
+
if (l?.isSymbolicLink()) return n(new St(a, R.resolve(a, i.join("/"))));
|
|
10298
|
+
this[ye](t, a, i, r, n);
|
|
10299
10299
|
});
|
|
10300
10300
|
}
|
|
10301
|
-
[
|
|
10301
|
+
[Ir]() {
|
|
10302
10302
|
this[yi]++;
|
|
10303
10303
|
}
|
|
10304
|
-
[
|
|
10305
|
-
this[yi]--, this[
|
|
10304
|
+
[$t]() {
|
|
10305
|
+
this[yi]--, this[Rs]();
|
|
10306
10306
|
}
|
|
10307
|
-
[
|
|
10308
|
-
this[
|
|
10307
|
+
[Ts](t) {
|
|
10308
|
+
this[$t](), t.resume();
|
|
10309
10309
|
}
|
|
10310
|
-
[
|
|
10311
|
-
return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !
|
|
10310
|
+
[bs](t, e) {
|
|
10311
|
+
return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
|
|
10312
10312
|
}
|
|
10313
|
-
[
|
|
10314
|
-
this[
|
|
10313
|
+
[gs](t) {
|
|
10314
|
+
this[Ir]();
|
|
10315
10315
|
let e = [t.path];
|
|
10316
|
-
t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[
|
|
10316
|
+
t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[xr](t, i));
|
|
10317
10317
|
}
|
|
10318
|
-
[
|
|
10319
|
-
let i = (
|
|
10320
|
-
e(
|
|
10318
|
+
[xr](t, e) {
|
|
10319
|
+
let i = (a) => {
|
|
10320
|
+
e(a);
|
|
10321
10321
|
}, r = () => {
|
|
10322
|
-
this[yt](this.cwd, this.dmode, (
|
|
10323
|
-
if (
|
|
10324
|
-
this[O](
|
|
10322
|
+
this[yt](this.cwd, this.dmode, (a) => {
|
|
10323
|
+
if (a) {
|
|
10324
|
+
this[O](a, t), i();
|
|
10325
10325
|
return;
|
|
10326
10326
|
}
|
|
10327
|
-
this[
|
|
10327
|
+
this[_e] = true, n();
|
|
10328
10328
|
});
|
|
10329
10329
|
}, n = () => {
|
|
10330
10330
|
if (t.absolute !== this.cwd) {
|
|
10331
|
-
let
|
|
10332
|
-
if (
|
|
10333
|
-
if (
|
|
10334
|
-
this[O](
|
|
10331
|
+
let a = f(R.dirname(String(t.absolute)));
|
|
10332
|
+
if (a !== this.cwd) return this[yt](a, this.dmode, (h) => {
|
|
10333
|
+
if (h) {
|
|
10334
|
+
this[O](h, t), i();
|
|
10335
10335
|
return;
|
|
10336
10336
|
}
|
|
10337
10337
|
o();
|
|
@@ -10339,24 +10339,24 @@ var qt = class extends st {
|
|
|
10339
10339
|
}
|
|
10340
10340
|
o();
|
|
10341
10341
|
}, o = () => {
|
|
10342
|
-
u.lstat(String(t.absolute), (
|
|
10343
|
-
if (
|
|
10344
|
-
this[
|
|
10342
|
+
u.lstat(String(t.absolute), (a, h) => {
|
|
10343
|
+
if (h && (this.keep || this.newer && h.mtime > (t.mtime ?? h.mtime))) {
|
|
10344
|
+
this[Ts](t), i();
|
|
10345
10345
|
return;
|
|
10346
10346
|
}
|
|
10347
|
-
if (
|
|
10348
|
-
if (
|
|
10347
|
+
if (a || this[bs](t, h)) return this[P](null, t, i);
|
|
10348
|
+
if (h.isDirectory()) {
|
|
10349
10349
|
if (t.type === "Directory") {
|
|
10350
|
-
let l = this.chmod && t.mode && (
|
|
10350
|
+
let l = this.chmod && t.mode && (h.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
|
|
10351
10351
|
return l ? u.chmod(String(t.absolute), Number(t.mode), c) : c();
|
|
10352
10352
|
}
|
|
10353
10353
|
if (t.absolute !== this.cwd) return u.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
10354
10354
|
}
|
|
10355
10355
|
if (t.absolute === this.cwd) return this[P](null, t, i);
|
|
10356
|
-
|
|
10356
|
+
ao(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
10357
10357
|
});
|
|
10358
10358
|
};
|
|
10359
|
-
this[
|
|
10359
|
+
this[_e] ? n() : r();
|
|
10360
10360
|
}
|
|
10361
10361
|
[P](t, e, i) {
|
|
10362
10362
|
if (t) {
|
|
@@ -10367,40 +10367,40 @@ var qt = class extends st {
|
|
|
10367
10367
|
case "File":
|
|
10368
10368
|
case "OldFile":
|
|
10369
10369
|
case "ContiguousFile":
|
|
10370
|
-
return this[
|
|
10370
|
+
return this[_s](e, i);
|
|
10371
10371
|
case "Link":
|
|
10372
|
-
return this[
|
|
10372
|
+
return this[Nr](e, i);
|
|
10373
10373
|
case "SymbolicLink":
|
|
10374
|
-
return this[
|
|
10374
|
+
return this[Lr](e, i);
|
|
10375
10375
|
case "Directory":
|
|
10376
10376
|
case "GNUDumpDir":
|
|
10377
|
-
return this[
|
|
10377
|
+
return this[Os](e, i);
|
|
10378
10378
|
}
|
|
10379
10379
|
}
|
|
10380
10380
|
[Ri](t, e, i, r) {
|
|
10381
10381
|
u[i](e, String(t.absolute), (n) => {
|
|
10382
|
-
n ? this[O](n, t) : (this[
|
|
10382
|
+
n ? this[O](n, t) : (this[$t](), t.resume()), r();
|
|
10383
10383
|
});
|
|
10384
10384
|
}
|
|
10385
10385
|
};
|
|
10386
|
-
var
|
|
10386
|
+
var Se = (s3) => {
|
|
10387
10387
|
try {
|
|
10388
10388
|
return [null, s3()];
|
|
10389
10389
|
} catch (t) {
|
|
10390
10390
|
return [t, null];
|
|
10391
10391
|
}
|
|
10392
10392
|
};
|
|
10393
|
-
var
|
|
10393
|
+
var Te = class extends Xt {
|
|
10394
10394
|
sync = true;
|
|
10395
10395
|
[P](t, e) {
|
|
10396
10396
|
return super[P](t, e, () => {
|
|
10397
10397
|
});
|
|
10398
10398
|
}
|
|
10399
|
-
[
|
|
10400
|
-
if (!this[
|
|
10399
|
+
[gs](t) {
|
|
10400
|
+
if (!this[_e]) {
|
|
10401
10401
|
let n = this[yt](this.cwd, this.dmode);
|
|
10402
10402
|
if (n) return this[O](n, t);
|
|
10403
|
-
this[
|
|
10403
|
+
this[_e] = true;
|
|
10404
10404
|
}
|
|
10405
10405
|
if (t.absolute !== this.cwd) {
|
|
10406
10406
|
let n = f(R.dirname(String(t.absolute)));
|
|
@@ -10409,74 +10409,74 @@ var xe = class extends qt {
|
|
|
10409
10409
|
if (o) return this[O](o, t);
|
|
10410
10410
|
}
|
|
10411
10411
|
}
|
|
10412
|
-
let [e, i] =
|
|
10413
|
-
if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[
|
|
10414
|
-
if (e || this[
|
|
10412
|
+
let [e, i] = Se(() => u.lstatSync(String(t.absolute)));
|
|
10413
|
+
if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Ts](t);
|
|
10414
|
+
if (e || this[bs](t, i)) return this[P](null, t);
|
|
10415
10415
|
if (i.isDirectory()) {
|
|
10416
10416
|
if (t.type === "Directory") {
|
|
10417
|
-
let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [
|
|
10417
|
+
let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [a] = o ? Se(() => {
|
|
10418
10418
|
u.chmodSync(String(t.absolute), Number(t.mode));
|
|
10419
10419
|
}) : [];
|
|
10420
|
-
return this[P](
|
|
10420
|
+
return this[P](a, t);
|
|
10421
10421
|
}
|
|
10422
|
-
let [n] =
|
|
10422
|
+
let [n] = Se(() => u.rmdirSync(String(t.absolute)));
|
|
10423
10423
|
this[P](n, t);
|
|
10424
10424
|
}
|
|
10425
|
-
let [r] = t.absolute === this.cwd ? [] :
|
|
10425
|
+
let [r] = t.absolute === this.cwd ? [] : Se(() => lo(String(t.absolute)));
|
|
10426
10426
|
this[P](r, t);
|
|
10427
10427
|
}
|
|
10428
|
-
[
|
|
10429
|
-
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (
|
|
10430
|
-
let
|
|
10428
|
+
[_s](t, e) {
|
|
10429
|
+
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (a) => {
|
|
10430
|
+
let h;
|
|
10431
10431
|
try {
|
|
10432
10432
|
u.closeSync(n);
|
|
10433
10433
|
} catch (l) {
|
|
10434
|
-
|
|
10434
|
+
h = l;
|
|
10435
10435
|
}
|
|
10436
|
-
(
|
|
10436
|
+
(a || h) && this[O](a || h, t), e();
|
|
10437
10437
|
}, n;
|
|
10438
10438
|
try {
|
|
10439
|
-
n = u.openSync(String(t.absolute),
|
|
10440
|
-
} catch (
|
|
10441
|
-
return r(
|
|
10439
|
+
n = u.openSync(String(t.absolute), ds(t.size), i);
|
|
10440
|
+
} catch (a) {
|
|
10441
|
+
return r(a);
|
|
10442
10442
|
}
|
|
10443
10443
|
let o = this.transform && this.transform(t) || t;
|
|
10444
|
-
o !== t && (o.on("error", (
|
|
10444
|
+
o !== t && (o.on("error", (a) => this[O](a, t)), t.pipe(o)), o.on("data", (a) => {
|
|
10445
10445
|
try {
|
|
10446
|
-
u.writeSync(n,
|
|
10447
|
-
} catch (
|
|
10448
|
-
r(
|
|
10446
|
+
u.writeSync(n, a, 0, a.length);
|
|
10447
|
+
} catch (h) {
|
|
10448
|
+
r(h);
|
|
10449
10449
|
}
|
|
10450
10450
|
}), o.on("end", () => {
|
|
10451
|
-
let
|
|
10451
|
+
let a = null;
|
|
10452
10452
|
if (t.mtime && !this.noMtime) {
|
|
10453
|
-
let
|
|
10453
|
+
let h = t.atime || /* @__PURE__ */ new Date(), l = t.mtime;
|
|
10454
10454
|
try {
|
|
10455
|
-
u.futimesSync(n,
|
|
10455
|
+
u.futimesSync(n, h, l);
|
|
10456
10456
|
} catch (c) {
|
|
10457
10457
|
try {
|
|
10458
|
-
u.utimesSync(String(t.absolute),
|
|
10458
|
+
u.utimesSync(String(t.absolute), h, l);
|
|
10459
10459
|
} catch {
|
|
10460
|
-
|
|
10460
|
+
a = c;
|
|
10461
10461
|
}
|
|
10462
10462
|
}
|
|
10463
10463
|
}
|
|
10464
|
-
if (this[
|
|
10465
|
-
let
|
|
10464
|
+
if (this[Re](t)) {
|
|
10465
|
+
let h = this[ge](t), l = this[be](t);
|
|
10466
10466
|
try {
|
|
10467
|
-
u.fchownSync(n, Number(
|
|
10467
|
+
u.fchownSync(n, Number(h), Number(l));
|
|
10468
10468
|
} catch (c) {
|
|
10469
10469
|
try {
|
|
10470
|
-
u.chownSync(String(t.absolute), Number(
|
|
10470
|
+
u.chownSync(String(t.absolute), Number(h), Number(l));
|
|
10471
10471
|
} catch {
|
|
10472
|
-
|
|
10472
|
+
a = a || c;
|
|
10473
10473
|
}
|
|
10474
10474
|
}
|
|
10475
10475
|
}
|
|
10476
|
-
r(
|
|
10476
|
+
r(a);
|
|
10477
10477
|
});
|
|
10478
10478
|
}
|
|
10479
|
-
[
|
|
10479
|
+
[Os](t, e) {
|
|
10480
10480
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[yt](String(t.absolute), i);
|
|
10481
10481
|
if (r) {
|
|
10482
10482
|
this[O](r, t), e();
|
|
@@ -10486,26 +10486,26 @@ var xe = class extends qt {
|
|
|
10486
10486
|
u.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
|
|
10487
10487
|
} catch {
|
|
10488
10488
|
}
|
|
10489
|
-
if (this[
|
|
10490
|
-
u.chownSync(String(t.absolute), Number(this[
|
|
10489
|
+
if (this[Re](t)) try {
|
|
10490
|
+
u.chownSync(String(t.absolute), Number(this[ge](t)), Number(this[be](t)));
|
|
10491
10491
|
} catch {
|
|
10492
10492
|
}
|
|
10493
10493
|
e(), t.resume();
|
|
10494
10494
|
}
|
|
10495
10495
|
[yt](t, e) {
|
|
10496
10496
|
try {
|
|
10497
|
-
return
|
|
10497
|
+
return Rr(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 });
|
|
10498
10498
|
} catch (i) {
|
|
10499
10499
|
return i;
|
|
10500
10500
|
}
|
|
10501
10501
|
}
|
|
10502
|
-
[
|
|
10502
|
+
[ye](t, e, i, r, n) {
|
|
10503
10503
|
if (this.preservePaths || i.length === 0) return r();
|
|
10504
10504
|
let o = e;
|
|
10505
|
-
for (let
|
|
10506
|
-
o = R.resolve(o,
|
|
10507
|
-
let [
|
|
10508
|
-
if (
|
|
10505
|
+
for (let a of i) {
|
|
10506
|
+
o = R.resolve(o, a);
|
|
10507
|
+
let [h, l] = Se(() => u.lstatSync(o));
|
|
10508
|
+
if (h) return r();
|
|
10509
10509
|
if (l.isSymbolicLink()) return n(new St(o, R.resolve(e, i.join("/"))));
|
|
10510
10510
|
}
|
|
10511
10511
|
r();
|
|
@@ -10519,47 +10519,47 @@ var xe = class extends qt {
|
|
|
10519
10519
|
}
|
|
10520
10520
|
}
|
|
10521
10521
|
};
|
|
10522
|
-
var
|
|
10523
|
-
let t = new
|
|
10524
|
-
new
|
|
10522
|
+
var co = (s3) => {
|
|
10523
|
+
let t = new Te(s3), e = s3.file, i = kr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
|
|
10524
|
+
new Me(e, { readSize: r, size: i.size }).pipe(t);
|
|
10525
10525
|
};
|
|
10526
|
-
var
|
|
10527
|
-
let e = new
|
|
10528
|
-
return new Promise((o,
|
|
10529
|
-
e.on("error",
|
|
10530
|
-
if (
|
|
10526
|
+
var fo = (s3, t) => {
|
|
10527
|
+
let e = new Xt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
10528
|
+
return new Promise((o, a) => {
|
|
10529
|
+
e.on("error", a), e.on("close", o), kr.stat(r, (h, l) => {
|
|
10530
|
+
if (h) a(h);
|
|
10531
10531
|
else {
|
|
10532
10532
|
let c = new _t(r, { readSize: i, size: l.size });
|
|
10533
|
-
c.on("error",
|
|
10533
|
+
c.on("error", a), c.pipe(e);
|
|
10534
10534
|
}
|
|
10535
10535
|
});
|
|
10536
10536
|
});
|
|
10537
10537
|
};
|
|
10538
|
-
var
|
|
10539
|
-
t?.length &&
|
|
10538
|
+
var uo = K(co, fo, (s3) => new Te(s3), (s3) => new Xt(s3), (s3, t) => {
|
|
10539
|
+
t?.length && Xi(s3, t);
|
|
10540
10540
|
});
|
|
10541
|
-
var
|
|
10542
|
-
let e = new
|
|
10541
|
+
var mo = (s3, t) => {
|
|
10542
|
+
let e = new kt(s3), i = true, r, n;
|
|
10543
10543
|
try {
|
|
10544
10544
|
try {
|
|
10545
10545
|
r = v.openSync(s3.file, "r+");
|
|
10546
|
-
} catch (
|
|
10547
|
-
if (
|
|
10548
|
-
else throw
|
|
10546
|
+
} catch (h) {
|
|
10547
|
+
if (h?.code === "ENOENT") r = v.openSync(s3.file, "w+");
|
|
10548
|
+
else throw h;
|
|
10549
10549
|
}
|
|
10550
|
-
let o = v.fstatSync(r),
|
|
10550
|
+
let o = v.fstatSync(r), a = Buffer.alloc(512);
|
|
10551
10551
|
t: for (n = 0; n < o.size; n += 512) {
|
|
10552
10552
|
for (let c = 0, d = 0; c < 512; c += d) {
|
|
10553
|
-
if (d = v.readSync(r,
|
|
10553
|
+
if (d = v.readSync(r, a, c, a.length - c, n + c), n === 0 && a[0] === 31 && a[1] === 139) throw new Error("cannot append to compressed archives");
|
|
10554
10554
|
if (!d) break t;
|
|
10555
10555
|
}
|
|
10556
|
-
let
|
|
10557
|
-
if (!
|
|
10558
|
-
let l = 512 * Math.ceil((
|
|
10556
|
+
let h = new C(a);
|
|
10557
|
+
if (!h.cksumValid) break;
|
|
10558
|
+
let l = 512 * Math.ceil((h.size || 0) / 512);
|
|
10559
10559
|
if (n + l + 512 > o.size) break;
|
|
10560
|
-
n += l, s3.mtimeCache &&
|
|
10560
|
+
n += l, s3.mtimeCache && h.mtime && s3.mtimeCache.set(String(h.path), h.mtime);
|
|
10561
10561
|
}
|
|
10562
|
-
i = false,
|
|
10562
|
+
i = false, po(s3, e, n, r, t);
|
|
10563
10563
|
} finally {
|
|
10564
10564
|
if (i) try {
|
|
10565
10565
|
v.closeSync(r);
|
|
@@ -10567,69 +10567,69 @@ var uo = (s3, t) => {
|
|
|
10567
10567
|
}
|
|
10568
10568
|
}
|
|
10569
10569
|
};
|
|
10570
|
-
var
|
|
10570
|
+
var po = (s3, t, e, i, r) => {
|
|
10571
10571
|
let n = new Wt(s3.file, { fd: i, start: e });
|
|
10572
|
-
t.pipe(n),
|
|
10572
|
+
t.pipe(n), wo(t, r);
|
|
10573
10573
|
};
|
|
10574
|
-
var
|
|
10574
|
+
var Eo = (s3, t) => {
|
|
10575
10575
|
t = Array.from(t);
|
|
10576
|
-
let e = new wt(s3), i = (n, o,
|
|
10577
|
-
let
|
|
10578
|
-
T ? v.close(n, (E) =>
|
|
10576
|
+
let e = new wt(s3), i = (n, o, a) => {
|
|
10577
|
+
let h = (T, N) => {
|
|
10578
|
+
T ? v.close(n, (E) => a(T)) : a(null, N);
|
|
10579
10579
|
}, l = 0;
|
|
10580
|
-
if (o === 0) return
|
|
10580
|
+
if (o === 0) return h(null, 0);
|
|
10581
10581
|
let c = 0, d = Buffer.alloc(512), S = (T, N) => {
|
|
10582
|
-
if (T || N === void 0) return
|
|
10582
|
+
if (T || N === void 0) return h(T);
|
|
10583
10583
|
if (c += N, c < 512 && N) return v.read(n, d, c, d.length - c, l + c, S);
|
|
10584
|
-
if (l === 0 && d[0] === 31 && d[1] === 139) return
|
|
10585
|
-
if (c < 512) return
|
|
10586
|
-
let E = new
|
|
10587
|
-
if (!E.cksumValid) return
|
|
10584
|
+
if (l === 0 && d[0] === 31 && d[1] === 139) return h(new Error("cannot append to compressed archives"));
|
|
10585
|
+
if (c < 512) return h(null, l);
|
|
10586
|
+
let E = new C(d);
|
|
10587
|
+
if (!E.cksumValid) return h(null, l);
|
|
10588
10588
|
let x = 512 * Math.ceil((E.size ?? 0) / 512);
|
|
10589
|
-
if (l + x + 512 > o || (l += x + 512, l >= o)) return
|
|
10589
|
+
if (l + x + 512 > o || (l += x + 512, l >= o)) return h(null, l);
|
|
10590
10590
|
s3.mtimeCache && E.mtime && s3.mtimeCache.set(String(E.path), E.mtime), c = 0, v.read(n, d, 0, 512, l, S);
|
|
10591
10591
|
};
|
|
10592
10592
|
v.read(n, d, 0, 512, l, S);
|
|
10593
10593
|
};
|
|
10594
10594
|
return new Promise((n, o) => {
|
|
10595
10595
|
e.on("error", o);
|
|
10596
|
-
let
|
|
10597
|
-
if (l && l.code === "ENOENT" &&
|
|
10596
|
+
let a = "r+", h = (l, c) => {
|
|
10597
|
+
if (l && l.code === "ENOENT" && a === "r+") return a = "w+", v.open(s3.file, a, h);
|
|
10598
10598
|
if (l || !c) return o(l);
|
|
10599
10599
|
v.fstat(c, (d, S) => {
|
|
10600
10600
|
if (d) return v.close(c, () => o(d));
|
|
10601
10601
|
i(c, S.size, (T, N) => {
|
|
10602
10602
|
if (T) return o(T);
|
|
10603
10603
|
let E = new tt2(s3.file, { fd: c, start: N });
|
|
10604
|
-
e.pipe(E), E.on("error", o), E.on("close", n),
|
|
10604
|
+
e.pipe(E), E.on("error", o), E.on("close", n), So(e, t);
|
|
10605
10605
|
});
|
|
10606
10606
|
});
|
|
10607
10607
|
};
|
|
10608
|
-
v.open(s3.file,
|
|
10608
|
+
v.open(s3.file, a, h);
|
|
10609
10609
|
});
|
|
10610
10610
|
};
|
|
10611
|
-
var
|
|
10611
|
+
var wo = (s3, t) => {
|
|
10612
10612
|
t.forEach((e) => {
|
|
10613
|
-
e.charAt(0) === "@" ?
|
|
10613
|
+
e.charAt(0) === "@" ? Ft({ file: vr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
10614
10614
|
}), s3.end();
|
|
10615
10615
|
};
|
|
10616
|
-
var
|
|
10617
|
-
for (let e of t) e.charAt(0) === "@" ? await
|
|
10616
|
+
var So = async (s3, t) => {
|
|
10617
|
+
for (let e of t) e.charAt(0) === "@" ? await Ft({ file: vr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
10618
10618
|
s3.end();
|
|
10619
10619
|
};
|
|
10620
|
-
var vt = K(
|
|
10620
|
+
var vt = K(mo, Eo, () => {
|
|
10621
10621
|
throw new TypeError("file is required");
|
|
10622
10622
|
}, () => {
|
|
10623
10623
|
throw new TypeError("file is required");
|
|
10624
10624
|
}, (s3, t) => {
|
|
10625
|
-
if (!
|
|
10625
|
+
if (!vs(s3)) throw new TypeError("file is required");
|
|
10626
10626
|
if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
|
|
10627
10627
|
if (!t?.length) throw new TypeError("no paths specified to add/replace");
|
|
10628
10628
|
});
|
|
10629
|
-
var
|
|
10630
|
-
vt.validate?.(s3, t),
|
|
10629
|
+
var yo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
|
|
10630
|
+
vt.validate?.(s3, t), Ro(s3);
|
|
10631
10631
|
});
|
|
10632
|
-
var
|
|
10632
|
+
var Ro = (s3) => {
|
|
10633
10633
|
let t = s3.filter;
|
|
10634
10634
|
s3.mtimeCache || (s3.mtimeCache = /* @__PURE__ */ new Map()), s3.filter = t ? (e, i) => t(e, i) && !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0)) : (e, i) => !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0));
|
|
10635
10635
|
};
|
|
@@ -10641,7 +10641,7 @@ function normalize(filename2) {
|
|
|
10641
10641
|
}
|
|
10642
10642
|
async function getFileList(filename2) {
|
|
10643
10643
|
const entries = [];
|
|
10644
|
-
await
|
|
10644
|
+
await Ft({
|
|
10645
10645
|
file: filename2,
|
|
10646
10646
|
strict: true,
|
|
10647
10647
|
onentry: (entry) => entries.push(entry)
|