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