npm-pkg-lint 5.5.0 → 5.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +293 -290
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4918,32 +4918,32 @@ import Cs from "node:stream";
|
|
|
4918
4918
|
import { StringDecoder as Hr } from "node:string_decoder";
|
|
4919
4919
|
import cr from "node:path";
|
|
4920
4920
|
import Kt from "node:fs";
|
|
4921
|
-
import { dirname as
|
|
4922
|
-
import { EventEmitter as
|
|
4921
|
+
import { dirname as kn, parse as Mn } from "path";
|
|
4922
|
+
import { EventEmitter as Nn } from "events";
|
|
4923
4923
|
import zi from "assert";
|
|
4924
4924
|
import { Buffer as Ot } from "buffer";
|
|
4925
4925
|
import * as Ps from "zlib";
|
|
4926
4926
|
import en from "zlib";
|
|
4927
4927
|
import { posix as Zt } from "node:path";
|
|
4928
4928
|
import { basename as _n } from "node:path";
|
|
4929
|
-
import
|
|
4929
|
+
import ui from "fs";
|
|
4930
4930
|
import X from "fs";
|
|
4931
4931
|
import js from "path";
|
|
4932
|
-
import { win32 as
|
|
4932
|
+
import { win32 as zn } from "node:path";
|
|
4933
4933
|
import ar from "path";
|
|
4934
4934
|
import Br from "node:fs";
|
|
4935
|
-
import
|
|
4936
|
-
import { randomBytes as
|
|
4937
|
-
import
|
|
4935
|
+
import fo from "node:assert";
|
|
4936
|
+
import { randomBytes as vr } from "node:crypto";
|
|
4937
|
+
import m from "node:fs";
|
|
4938
4938
|
import R from "node:path";
|
|
4939
4939
|
import pr from "fs";
|
|
4940
4940
|
import wi from "node:fs";
|
|
4941
4941
|
import we from "node:path";
|
|
4942
4942
|
import k from "node:fs";
|
|
4943
|
-
import
|
|
4943
|
+
import no from "node:fs/promises";
|
|
4944
4944
|
import Si from "node:path";
|
|
4945
4945
|
import { join as xr } from "node:path";
|
|
4946
|
-
import
|
|
4946
|
+
import M from "node:fs";
|
|
4947
4947
|
import Pr from "node:path";
|
|
4948
4948
|
var zr = Object.defineProperty;
|
|
4949
4949
|
var Ur = (s3, t) => {
|
|
@@ -4963,7 +4963,7 @@ var Ns = /* @__PURE__ */ Symbol("read");
|
|
|
4963
4963
|
var Ae = /* @__PURE__ */ Symbol("flush");
|
|
4964
4964
|
var As = /* @__PURE__ */ Symbol("flushChunk");
|
|
4965
4965
|
var z = /* @__PURE__ */ Symbol("encoding");
|
|
4966
|
-
var
|
|
4966
|
+
var vt = /* @__PURE__ */ Symbol("decoder");
|
|
4967
4967
|
var g = /* @__PURE__ */ Symbol("flowing");
|
|
4968
4968
|
var Qt = /* @__PURE__ */ Symbol("paused");
|
|
4969
4969
|
var Bt = /* @__PURE__ */ Symbol("resume");
|
|
@@ -4987,8 +4987,8 @@ var C = /* @__PURE__ */ Symbol("discarded");
|
|
|
4987
4987
|
var jt = (s3) => Promise.resolve().then(s3);
|
|
4988
4988
|
var Yr = (s3) => s3();
|
|
4989
4989
|
var Kr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
|
|
4990
|
-
var
|
|
4991
|
-
var
|
|
4990
|
+
var $r = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
|
|
4991
|
+
var Vr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
|
|
4992
4992
|
var Fe = class {
|
|
4993
4993
|
src;
|
|
4994
4994
|
dest;
|
|
@@ -5024,7 +5024,7 @@ var A = class extends Di {
|
|
|
5024
5024
|
[L];
|
|
5025
5025
|
[z];
|
|
5026
5026
|
[Z];
|
|
5027
|
-
[
|
|
5027
|
+
[vt];
|
|
5028
5028
|
[Q] = false;
|
|
5029
5029
|
[nt] = false;
|
|
5030
5030
|
[De] = false;
|
|
@@ -5041,7 +5041,7 @@ var A = class extends Di {
|
|
|
5041
5041
|
constructor(...t) {
|
|
5042
5042
|
let e = t[0] || {};
|
|
5043
5043
|
if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
|
|
5044
|
-
Xr(e) ? (this[L] = true, this[z] = null) : qr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[
|
|
5044
|
+
Xr(e) ? (this[L] = true, this[z] = null) : qr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[vt] = this[z] ? new Hr(this[z]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[b] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[N] });
|
|
5045
5045
|
let { signal: i } = e;
|
|
5046
5046
|
i && (this[Jt] = i, i.aborted ? this[xi]() : i.addEventListener("abort", () => this[xi]()));
|
|
5047
5047
|
}
|
|
@@ -5084,11 +5084,11 @@ var A = class extends Di {
|
|
|
5084
5084
|
typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
|
|
5085
5085
|
let r = this[Z] ? jt : Yr;
|
|
5086
5086
|
if (!this[L] && !Buffer.isBuffer(t)) {
|
|
5087
|
-
if (
|
|
5088
|
-
else if (
|
|
5087
|
+
if (Vr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
|
|
5088
|
+
else if ($r(t)) t = Buffer.from(t);
|
|
5089
5089
|
else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
|
|
5090
5090
|
}
|
|
5091
|
-
return this[L] ? (this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[bi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : t.length ? (typeof t == "string" && !(e === this[z] && !this[
|
|
5091
|
+
return this[L] ? (this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[bi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : t.length ? (typeof t == "string" && !(e === this[z] && !this[vt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z] && (t = this[vt].write(t)), this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[bi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[g]);
|
|
5092
5092
|
}
|
|
5093
5093
|
read(t) {
|
|
5094
5094
|
if (this[S]) return null;
|
|
@@ -5214,8 +5214,8 @@ var A = class extends Di {
|
|
|
5214
5214
|
return this[nt] ? false : (this[nt] = true, this.readable = false, this[Z] ? (jt(() => this[Ti]()), true) : this[Ti]());
|
|
5215
5215
|
}
|
|
5216
5216
|
[Ti]() {
|
|
5217
|
-
if (this[
|
|
5218
|
-
let e = this[
|
|
5217
|
+
if (this[vt]) {
|
|
5218
|
+
let e = this[vt].end();
|
|
5219
5219
|
if (e) {
|
|
5220
5220
|
for (let i of this[N]) i.dest.write(e);
|
|
5221
5221
|
this[C] || super.emit("data", e);
|
|
@@ -5292,12 +5292,12 @@ var Jr = I.writev;
|
|
|
5292
5292
|
var ht = /* @__PURE__ */ Symbol("_autoClose");
|
|
5293
5293
|
var H = /* @__PURE__ */ Symbol("_close");
|
|
5294
5294
|
var te = /* @__PURE__ */ Symbol("_ended");
|
|
5295
|
-
var
|
|
5295
|
+
var u = /* @__PURE__ */ Symbol("_fd");
|
|
5296
5296
|
var Ni = /* @__PURE__ */ Symbol("_finished");
|
|
5297
5297
|
var tt2 = /* @__PURE__ */ Symbol("_flags");
|
|
5298
5298
|
var Ai = /* @__PURE__ */ Symbol("_flush");
|
|
5299
5299
|
var ki = /* @__PURE__ */ Symbol("_handleChunk");
|
|
5300
|
-
var
|
|
5300
|
+
var Mi = /* @__PURE__ */ Symbol("_makeBuf");
|
|
5301
5301
|
var ie = /* @__PURE__ */ Symbol("_mode");
|
|
5302
5302
|
var ke = /* @__PURE__ */ Symbol("_needDrain");
|
|
5303
5303
|
var Ut = /* @__PURE__ */ Symbol("_onerror");
|
|
@@ -5313,13 +5313,13 @@ var Ci = /* @__PURE__ */ Symbol("_readSize");
|
|
|
5313
5313
|
var j = /* @__PURE__ */ Symbol("_reading");
|
|
5314
5314
|
var ee = /* @__PURE__ */ Symbol("_remain");
|
|
5315
5315
|
var Fi = /* @__PURE__ */ Symbol("_size");
|
|
5316
|
-
var
|
|
5316
|
+
var Me = /* @__PURE__ */ Symbol("_write");
|
|
5317
5317
|
var gt = /* @__PURE__ */ Symbol("_writing");
|
|
5318
|
-
var
|
|
5318
|
+
var ve = /* @__PURE__ */ Symbol("_defaultFlag");
|
|
5319
5319
|
var bt = /* @__PURE__ */ Symbol("_errored");
|
|
5320
5320
|
var _t = class extends A {
|
|
5321
5321
|
[bt] = false;
|
|
5322
|
-
[
|
|
5322
|
+
[u];
|
|
5323
5323
|
[U];
|
|
5324
5324
|
[Ci];
|
|
5325
5325
|
[j] = false;
|
|
@@ -5328,10 +5328,10 @@ var _t = class extends A {
|
|
|
5328
5328
|
[ht];
|
|
5329
5329
|
constructor(t, e) {
|
|
5330
5330
|
if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
|
|
5331
|
-
this[bt] = false, this[
|
|
5331
|
+
this[bt] = false, this[u] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ci] = e.readSize || 16 * 1024 * 1024, this[j] = false, this[Fi] = typeof e.size == "number" ? e.size : 1 / 0, this[ee] = this[Fi], this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[u] == "number" ? this[zt]() : this[at]();
|
|
5332
5332
|
}
|
|
5333
5333
|
get fd() {
|
|
5334
|
-
return this[
|
|
5334
|
+
return this[u];
|
|
5335
5335
|
}
|
|
5336
5336
|
get path() {
|
|
5337
5337
|
return this[U];
|
|
@@ -5346,26 +5346,26 @@ var _t = class extends A {
|
|
|
5346
5346
|
I.open(this[U], "r", (t, e) => this[Ht](t, e));
|
|
5347
5347
|
}
|
|
5348
5348
|
[Ht](t, e) {
|
|
5349
|
-
t ? this[Ut](t) : (this[
|
|
5349
|
+
t ? this[Ut](t) : (this[u] = e, this.emit("open", e), this[zt]());
|
|
5350
5350
|
}
|
|
5351
|
-
[
|
|
5351
|
+
[Mi]() {
|
|
5352
5352
|
return Buffer.allocUnsafe(Math.min(this[Ci], this[ee]));
|
|
5353
5353
|
}
|
|
5354
5354
|
[zt]() {
|
|
5355
5355
|
if (!this[j]) {
|
|
5356
5356
|
this[j] = true;
|
|
5357
|
-
let t = this[
|
|
5357
|
+
let t = this[Mi]();
|
|
5358
5358
|
if (t.length === 0) return process.nextTick(() => this[Ii](null, 0, t));
|
|
5359
|
-
I.read(this[
|
|
5359
|
+
I.read(this[u], t, 0, t.length, null, (e, i, r) => this[Ii](e, i, r));
|
|
5360
5360
|
}
|
|
5361
5361
|
}
|
|
5362
5362
|
[Ii](t, e, i) {
|
|
5363
5363
|
this[j] = false, t ? this[Ut](t) : this[ki](e, i) && this[zt]();
|
|
5364
5364
|
}
|
|
5365
5365
|
[H]() {
|
|
5366
|
-
if (this[ht] && typeof this[
|
|
5367
|
-
let t = this[
|
|
5368
|
-
this[
|
|
5366
|
+
if (this[ht] && typeof this[u] == "number") {
|
|
5367
|
+
let t = this[u];
|
|
5368
|
+
this[u] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
5369
5369
|
}
|
|
5370
5370
|
}
|
|
5371
5371
|
[Ut](t) {
|
|
@@ -5381,7 +5381,7 @@ var _t = class extends A {
|
|
|
5381
5381
|
case "finish":
|
|
5382
5382
|
return false;
|
|
5383
5383
|
case "drain":
|
|
5384
|
-
return typeof this[
|
|
5384
|
+
return typeof this[u] == "number" && this[zt](), false;
|
|
5385
5385
|
case "error":
|
|
5386
5386
|
return this[bt] ? false : (this[bt] = true, super.emit(t, ...e));
|
|
5387
5387
|
default:
|
|
@@ -5404,7 +5404,7 @@ var Be = class extends _t {
|
|
|
5404
5404
|
if (!this[j]) {
|
|
5405
5405
|
this[j] = true;
|
|
5406
5406
|
do {
|
|
5407
|
-
let e = this[
|
|
5407
|
+
let e = this[Mi](), i = e.length === 0 ? 0 : I.readSync(this[u], e, 0, e.length, null);
|
|
5408
5408
|
if (!this[ki](i, e)) break;
|
|
5409
5409
|
} while (true);
|
|
5410
5410
|
this[j] = false;
|
|
@@ -5415,9 +5415,9 @@ var Be = class extends _t {
|
|
|
5415
5415
|
}
|
|
5416
5416
|
}
|
|
5417
5417
|
[H]() {
|
|
5418
|
-
if (this[ht] && typeof this[
|
|
5419
|
-
let t = this[
|
|
5420
|
-
this[
|
|
5418
|
+
if (this[ht] && typeof this[u] == "number") {
|
|
5419
|
+
let t = this[u];
|
|
5420
|
+
this[u] = void 0, I.closeSync(t), this.emit("close");
|
|
5421
5421
|
}
|
|
5422
5422
|
}
|
|
5423
5423
|
};
|
|
@@ -5432,15 +5432,15 @@ var et = class extends Qr {
|
|
|
5432
5432
|
[U];
|
|
5433
5433
|
[ie];
|
|
5434
5434
|
[ht];
|
|
5435
|
-
[
|
|
5436
|
-
[
|
|
5435
|
+
[u];
|
|
5436
|
+
[ve];
|
|
5437
5437
|
[tt2];
|
|
5438
5438
|
[Ni] = false;
|
|
5439
5439
|
[ot];
|
|
5440
5440
|
constructor(t, e) {
|
|
5441
|
-
e = e || {}, super(e), this[U] = t, this[
|
|
5441
|
+
e = e || {}, super(e), this[U] = t, this[u] = typeof e.fd == "number" ? e.fd : void 0, this[ie] = e.mode === void 0 ? 438 : e.mode, this[ot] = typeof e.start == "number" ? e.start : void 0, this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : true;
|
|
5442
5442
|
let i = this[ot] !== void 0 ? "r+" : "w";
|
|
5443
|
-
this[
|
|
5443
|
+
this[ve] = e.flags === void 0, this[tt2] = e.flags === void 0 ? i : e.flags, this[u] === void 0 && this[at]();
|
|
5444
5444
|
}
|
|
5445
5445
|
emit(t, ...e) {
|
|
5446
5446
|
if (t === "error") {
|
|
@@ -5450,7 +5450,7 @@ var et = class extends Qr {
|
|
|
5450
5450
|
return super.emit(t, ...e);
|
|
5451
5451
|
}
|
|
5452
5452
|
get fd() {
|
|
5453
|
-
return this[
|
|
5453
|
+
return this[u];
|
|
5454
5454
|
}
|
|
5455
5455
|
get path() {
|
|
5456
5456
|
return this[U];
|
|
@@ -5462,39 +5462,39 @@ var et = class extends Qr {
|
|
|
5462
5462
|
I.open(this[U], this[tt2], this[ie], (t, e) => this[Ht](t, e));
|
|
5463
5463
|
}
|
|
5464
5464
|
[Ht](t, e) {
|
|
5465
|
-
this[
|
|
5465
|
+
this[ve] && this[tt2] === "r+" && t && t.code === "ENOENT" ? (this[tt2] = "w", this[at]()) : t ? this[Ut](t) : (this[u] = e, this.emit("open", e), this[gt] || this[Ai]());
|
|
5466
5466
|
}
|
|
5467
5467
|
end(t, e) {
|
|
5468
|
-
return t && this.write(t, e), this[te] = true, !this[gt] && !this[Y].length && typeof this[
|
|
5468
|
+
return t && this.write(t, e), this[te] = true, !this[gt] && !this[Y].length && typeof this[u] == "number" && this[Pt](null, 0), this;
|
|
5469
5469
|
}
|
|
5470
5470
|
write(t, e) {
|
|
5471
|
-
return typeof t == "string" && (t = Buffer.from(t, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[
|
|
5471
|
+
return typeof t == "string" && (t = Buffer.from(t, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[u] === void 0 || this[gt] || this[Y].length ? (this[Y].push(t), this[ke] = true, false) : (this[gt] = true, this[Me](t), true);
|
|
5472
5472
|
}
|
|
5473
|
-
[
|
|
5474
|
-
I.write(this[
|
|
5473
|
+
[Me](t) {
|
|
5474
|
+
I.write(this[u], t, 0, t.length, this[ot], (e, i) => this[Pt](e, i));
|
|
5475
5475
|
}
|
|
5476
5476
|
[Pt](t, e) {
|
|
5477
5477
|
t ? this[Ut](t) : (this[ot] !== void 0 && typeof e == "number" && (this[ot] += e), this[Y].length ? this[Ai]() : (this[gt] = false, this[te] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[ke] && (this[ke] = false, this.emit("drain"))));
|
|
5478
5478
|
}
|
|
5479
5479
|
[Ai]() {
|
|
5480
5480
|
if (this[Y].length === 0) this[te] && this[Pt](null, 0);
|
|
5481
|
-
else if (this[Y].length === 1) this[
|
|
5481
|
+
else if (this[Y].length === 1) this[Me](this[Y].pop());
|
|
5482
5482
|
else {
|
|
5483
5483
|
let t = this[Y];
|
|
5484
|
-
this[Y] = [], Jr(this[
|
|
5484
|
+
this[Y] = [], Jr(this[u], t, this[ot], (e, i) => this[Pt](e, i));
|
|
5485
5485
|
}
|
|
5486
5486
|
}
|
|
5487
5487
|
[H]() {
|
|
5488
|
-
if (this[ht] && typeof this[
|
|
5489
|
-
let t = this[
|
|
5490
|
-
this[
|
|
5488
|
+
if (this[ht] && typeof this[u] == "number") {
|
|
5489
|
+
let t = this[u];
|
|
5490
|
+
this[u] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
5491
5491
|
}
|
|
5492
5492
|
}
|
|
5493
5493
|
};
|
|
5494
5494
|
var Wt = class extends et {
|
|
5495
5495
|
[at]() {
|
|
5496
5496
|
let t;
|
|
5497
|
-
if (this[
|
|
5497
|
+
if (this[ve] && this[tt2] === "r+") try {
|
|
5498
5498
|
t = I.openSync(this[U], this[tt2], this[ie]);
|
|
5499
5499
|
} catch (e) {
|
|
5500
5500
|
if (e?.code === "ENOENT") return this[tt2] = "w", this[at]();
|
|
@@ -5504,15 +5504,15 @@ var Wt = class extends et {
|
|
|
5504
5504
|
this[Ht](null, t);
|
|
5505
5505
|
}
|
|
5506
5506
|
[H]() {
|
|
5507
|
-
if (this[ht] && typeof this[
|
|
5508
|
-
let t = this[
|
|
5509
|
-
this[
|
|
5507
|
+
if (this[ht] && typeof this[u] == "number") {
|
|
5508
|
+
let t = this[u];
|
|
5509
|
+
this[u] = void 0, I.closeSync(t), this.emit("close");
|
|
5510
5510
|
}
|
|
5511
5511
|
}
|
|
5512
|
-
[
|
|
5512
|
+
[Me](t) {
|
|
5513
5513
|
let e = true;
|
|
5514
5514
|
try {
|
|
5515
|
-
this[Pt](null, I.writeSync(this[
|
|
5515
|
+
this[Pt](null, I.writeSync(this[u], t, 0, t.length, this[ot])), e = false;
|
|
5516
5516
|
} finally {
|
|
5517
5517
|
if (e) try {
|
|
5518
5518
|
this[H]();
|
|
@@ -5524,8 +5524,8 @@ var Wt = class extends et {
|
|
|
5524
5524
|
var jr = /* @__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"]]);
|
|
5525
5525
|
var Fs = (s3) => !!s3.sync && !!s3.file;
|
|
5526
5526
|
var ks = (s3) => !s3.sync && !!s3.file;
|
|
5527
|
-
var
|
|
5528
|
-
var
|
|
5527
|
+
var Ms = (s3) => !!s3.sync && !s3.file;
|
|
5528
|
+
var vs = (s3) => !s3.sync && !s3.file;
|
|
5529
5529
|
var Bs = (s3) => !!s3.file;
|
|
5530
5530
|
var tn = (s3) => {
|
|
5531
5531
|
let t = jr.get(s3);
|
|
@@ -5549,17 +5549,17 @@ var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
|
|
|
5549
5549
|
} else if (ks(a)) {
|
|
5550
5550
|
let l = t(a, o);
|
|
5551
5551
|
return h ? l.then(() => h(), h) : l;
|
|
5552
|
-
} else if (
|
|
5552
|
+
} else if (Ms(a)) {
|
|
5553
5553
|
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
5554
5554
|
return e(a, o);
|
|
5555
|
-
} else if (
|
|
5555
|
+
} else if (vs(a)) {
|
|
5556
5556
|
if (typeof h == "function") throw new TypeError("callback only supported with file option");
|
|
5557
5557
|
return i(a, o);
|
|
5558
5558
|
}
|
|
5559
5559
|
throw new Error("impossible options??");
|
|
5560
5560
|
}, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
|
|
5561
5561
|
var sn = en.constants || { ZLIB_VERNUM: 4736 };
|
|
5562
|
-
var
|
|
5562
|
+
var v = 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 }, sn));
|
|
5563
5563
|
var rn = Ot.concat;
|
|
5564
5564
|
var zs = Object.getOwnPropertyDescriptor(Ot, "concat");
|
|
5565
5565
|
var nn = (s3) => s3;
|
|
@@ -5658,14 +5658,14 @@ var Pe = class extends re {
|
|
|
5658
5658
|
#t;
|
|
5659
5659
|
#i;
|
|
5660
5660
|
constructor(t, e) {
|
|
5661
|
-
t = t || {}, t.flush = t.flush ||
|
|
5661
|
+
t = t || {}, t.flush = t.flush || v.Z_NO_FLUSH, t.finishFlush = t.finishFlush || v.Z_FINISH, t.fullFlushFlag = v.Z_FULL_FLUSH, super(t, e), this.#t = t.level, this.#i = t.strategy;
|
|
5662
5662
|
}
|
|
5663
5663
|
params(t, e) {
|
|
5664
5664
|
if (!this.sawError) {
|
|
5665
5665
|
if (!this.handle) throw new Error("cannot switch params when binding is closed");
|
|
5666
5666
|
if (!this.handle.params) throw new Error("not supported in this implementation");
|
|
5667
5667
|
if (this.#t !== t || this.#i !== e) {
|
|
5668
|
-
this.flush(
|
|
5668
|
+
this.flush(v.Z_SYNC_FLUSH), zi(this.handle, "zlib binding closed");
|
|
5669
5669
|
let i = this.handle.flush;
|
|
5670
5670
|
this.handle.flush = (r, n) => {
|
|
5671
5671
|
typeof r == "function" && (n = r, r = this.flushFlag), this.flush(r), n?.();
|
|
@@ -5696,7 +5696,7 @@ var Ue = class extends Pe {
|
|
|
5696
5696
|
};
|
|
5697
5697
|
var He = class extends re {
|
|
5698
5698
|
constructor(t, e) {
|
|
5699
|
-
t = t || {}, t.flush = t.flush ||
|
|
5699
|
+
t = t || {}, t.flush = t.flush || v.BROTLI_OPERATION_PROCESS, t.finishFlush = t.finishFlush || v.BROTLI_OPERATION_FINISH, t.fullFlushFlag = v.BROTLI_OPERATION_FLUSH, super(t, e);
|
|
5700
5700
|
}
|
|
5701
5701
|
};
|
|
5702
5702
|
var We = class extends He {
|
|
@@ -5711,7 +5711,7 @@ var Ge = class extends He {
|
|
|
5711
5711
|
};
|
|
5712
5712
|
var Ze = class extends re {
|
|
5713
5713
|
constructor(t, e) {
|
|
5714
|
-
t = t || {}, t.flush = t.flush ||
|
|
5714
|
+
t = t || {}, t.flush = t.flush || v.ZSTD_e_continue, t.finishFlush = t.finishFlush || v.ZSTD_e_end, t.fullFlushFlag = v.ZSTD_e_flush, super(t, e);
|
|
5715
5715
|
}
|
|
5716
5716
|
};
|
|
5717
5717
|
var Ye = class extends Ze {
|
|
@@ -5765,13 +5765,13 @@ var cn = (s3) => {
|
|
|
5765
5765
|
var Ws = (s3) => (255 ^ s3) & 255;
|
|
5766
5766
|
var Gs = (s3) => (255 ^ s3) + 1 & 255;
|
|
5767
5767
|
var Hi = {};
|
|
5768
|
-
Ur(Hi, { code: () =>
|
|
5768
|
+
Ur(Hi, { code: () => $e, isCode: () => ne, isName: () => dn, name: () => oe, normalFsTypes: () => Ui });
|
|
5769
5769
|
var ne = (s3) => oe.has(s3);
|
|
5770
|
-
var dn = (s3) =>
|
|
5770
|
+
var dn = (s3) => $e.has(s3);
|
|
5771
5771
|
var Ui = /* @__PURE__ */ new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
|
|
5772
5772
|
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"]]);
|
|
5773
|
-
var
|
|
5774
|
-
var
|
|
5773
|
+
var $e = new Map(Array.from(oe).map((s3) => [s3[1], s3[0]]));
|
|
5774
|
+
var mn = (s3) => s3 === void 0 || s3 < 0 ? void 0 : s3;
|
|
5775
5775
|
var F = class {
|
|
5776
5776
|
cksumValid = false;
|
|
5777
5777
|
needPax = false;
|
|
@@ -5800,7 +5800,7 @@ var F = class {
|
|
|
5800
5800
|
decode(t, e, i, r) {
|
|
5801
5801
|
if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
5802
5802
|
let n = xt(t, e + 156, 1), o = Ui.has(n), h = o ? i : void 0, a = o ? r : void 0;
|
|
5803
|
-
if (this.path = h?.path ?? xt(t, e, 100), this.mode = h?.mode ?? a?.mode ?? lt(t, e + 100, 8), this.uid = h?.uid ?? a?.uid ?? lt(t, e + 108, 8), this.gid = h?.gid ?? a?.gid ?? lt(t, e + 116, 8), this.size =
|
|
5803
|
+
if (this.path = h?.path ?? xt(t, e, 100), this.mode = h?.mode ?? a?.mode ?? lt(t, e + 100, 8), this.uid = h?.uid ?? a?.uid ?? lt(t, e + 108, 8), this.gid = h?.gid ?? a?.gid ?? lt(t, e + 116, 8), this.size = mn(h?.size ?? a?.size ?? lt(t, e + 124, 12)), this.mtime = h?.mtime ?? a?.mtime ?? Wi(t, e + 136, 12), this.cksum = lt(t, e + 148, 12), a && this.#i(a, true), h && this.#i(h), 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 = h?.uname ?? a?.uname ?? xt(t, e + 265, 32), this.gname = h?.gname ?? a?.gname ?? xt(t, e + 297, 32), this.devmaj = h?.devmaj ?? a?.devmaj ?? lt(t, e + 329, 8) ?? 0, this.devmin = h?.devmin ?? a?.devmin ?? lt(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
|
|
5804
5804
|
let c = xt(t, e + 345, 155);
|
|
5805
5805
|
this.path = c + "/" + this.path;
|
|
5806
5806
|
} else {
|
|
@@ -5817,7 +5817,7 @@ var F = class {
|
|
|
5817
5817
|
}
|
|
5818
5818
|
encode(t, e = 0) {
|
|
5819
5819
|
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");
|
|
5820
|
-
let i = this.ctime || this.atime ? 130 : 155, r =
|
|
5820
|
+
let i = this.ctime || this.atime ? 130 : 155, r = un(this.path || "", i), n = r[0], o = r[1];
|
|
5821
5821
|
this.needPax = !!r[2], this.needPax = Lt(t, e, 100, n) || this.needPax, this.needPax = ct(t, e + 100, 8, this.mode) || this.needPax, this.needPax = ct(t, e + 108, 8, this.uid) || this.needPax, this.needPax = ct(t, e + 116, 8, this.gid) || this.needPax, this.needPax = ct(t, e + 124, 12, this.size) || this.needPax, this.needPax = Gi(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 = ct(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = ct(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 = Gi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Gi(t, e + 488, 12, this.ctime) || this.needPax);
|
|
5822
5822
|
let h = 256;
|
|
5823
5823
|
for (let a = e; a < e + 148; a++) h += t[a];
|
|
@@ -5831,13 +5831,13 @@ var F = class {
|
|
|
5831
5831
|
return this.#t;
|
|
5832
5832
|
}
|
|
5833
5833
|
set type(t) {
|
|
5834
|
-
let e = String(
|
|
5834
|
+
let e = String($e.get(t));
|
|
5835
5835
|
if (ne(e) || e === "Unsupported") this.#t = e;
|
|
5836
5836
|
else if (ne(t)) this.#t = t;
|
|
5837
5837
|
else throw new TypeError("invalid entry type: " + t);
|
|
5838
5838
|
}
|
|
5839
5839
|
};
|
|
5840
|
-
var
|
|
5840
|
+
var un = (s3, t) => {
|
|
5841
5841
|
let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
|
|
5842
5842
|
if (Buffer.byteLength(i) < 100) n = [i, r, false];
|
|
5843
5843
|
else {
|
|
@@ -5863,6 +5863,7 @@ var gn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).joi
|
|
|
5863
5863
|
var Gi = (s3, t, e, i) => i === void 0 ? false : ct(s3, t, e, i.getTime() / 1e3);
|
|
5864
5864
|
var bn = new Array(156).join("\0");
|
|
5865
5865
|
var Lt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + bn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
|
|
5866
|
+
var On = /^(?:0|[1-9]\d*)$/;
|
|
5866
5867
|
var ft = class s {
|
|
5867
5868
|
atime;
|
|
5868
5869
|
mtime;
|
|
@@ -5903,13 +5904,13 @@ var ft = class s {
|
|
|
5903
5904
|
return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
|
|
5904
5905
|
}
|
|
5905
5906
|
static parse(t, e, i = false) {
|
|
5906
|
-
return new s(
|
|
5907
|
+
return new s(Tn(xn(t), e), i);
|
|
5907
5908
|
}
|
|
5908
5909
|
};
|
|
5909
|
-
var
|
|
5910
|
-
var
|
|
5911
|
-
`).reduce(
|
|
5912
|
-
var
|
|
5910
|
+
var Tn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
|
|
5911
|
+
var xn = (s3) => s3.replace(/\n$/, "").split(`
|
|
5912
|
+
`).reduce(Ln, /* @__PURE__ */ Object.create(null));
|
|
5913
|
+
var Ln = (s3, t) => {
|
|
5913
5914
|
let e = parseInt(t, 10);
|
|
5914
5915
|
if (e !== Buffer.byteLength(t) + 1) return s3;
|
|
5915
5916
|
t = t.slice((e + " ").length);
|
|
@@ -5932,8 +5933,10 @@ var xn = (s3, t) => {
|
|
|
5932
5933
|
s3[n] = new Date(Number(o) * 1e3);
|
|
5933
5934
|
break;
|
|
5934
5935
|
case "size":
|
|
5936
|
+
if (!On.test(o.trim())) break;
|
|
5935
5937
|
let h = +o;
|
|
5936
|
-
|
|
5938
|
+
if (!Number.isSafeInteger(h)) break;
|
|
5939
|
+
s3[n] = h;
|
|
5937
5940
|
break;
|
|
5938
5941
|
case "gid":
|
|
5939
5942
|
case "uid":
|
|
@@ -5946,9 +5949,9 @@ var xn = (s3, t) => {
|
|
|
5946
5949
|
}
|
|
5947
5950
|
return s3;
|
|
5948
5951
|
};
|
|
5949
|
-
var
|
|
5950
|
-
var f =
|
|
5951
|
-
var
|
|
5952
|
+
var Dn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
5953
|
+
var f = Dn !== "win32" ? (s3) => String(s3) : (s3) => String(s3).replaceAll(/\\/g, "/");
|
|
5954
|
+
var Ve = class extends A {
|
|
5952
5955
|
extended;
|
|
5953
5956
|
globalExtended;
|
|
5954
5957
|
header;
|
|
@@ -6015,22 +6018,22 @@ var $e = class extends A {
|
|
|
6015
6018
|
var Dt = (s3, t, e, i = {}) => {
|
|
6016
6019
|
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));
|
|
6017
6020
|
};
|
|
6018
|
-
var
|
|
6021
|
+
var An = 1024 * 1024;
|
|
6019
6022
|
var Xi = Buffer.from([31, 139]);
|
|
6020
6023
|
var qi = Buffer.from([40, 181, 47, 253]);
|
|
6021
|
-
var
|
|
6024
|
+
var In = Math.max(Xi.length, qi.length);
|
|
6022
6025
|
var B = /* @__PURE__ */ Symbol("state");
|
|
6023
6026
|
var Nt = /* @__PURE__ */ Symbol("writeEntry");
|
|
6024
6027
|
var it = /* @__PURE__ */ Symbol("readEntry");
|
|
6025
6028
|
var Zi = /* @__PURE__ */ Symbol("nextEntry");
|
|
6026
6029
|
var Zs = /* @__PURE__ */ Symbol("processEntry");
|
|
6027
|
-
var
|
|
6030
|
+
var $ = /* @__PURE__ */ Symbol("extendedHeader");
|
|
6028
6031
|
var he = /* @__PURE__ */ Symbol("globalExtendedHeader");
|
|
6029
6032
|
var dt = /* @__PURE__ */ Symbol("meta");
|
|
6030
6033
|
var Ys = /* @__PURE__ */ Symbol("emitMeta");
|
|
6031
6034
|
var p = /* @__PURE__ */ Symbol("buffer");
|
|
6032
6035
|
var st = /* @__PURE__ */ Symbol("queue");
|
|
6033
|
-
var
|
|
6036
|
+
var mt = /* @__PURE__ */ Symbol("ended");
|
|
6034
6037
|
var Yi = /* @__PURE__ */ Symbol("emittedEnd");
|
|
6035
6038
|
var At = /* @__PURE__ */ Symbol("emit");
|
|
6036
6039
|
var w = /* @__PURE__ */ Symbol("unzip");
|
|
@@ -6038,23 +6041,23 @@ var Xe = /* @__PURE__ */ Symbol("consumeChunk");
|
|
|
6038
6041
|
var qe = /* @__PURE__ */ Symbol("consumeChunkSub");
|
|
6039
6042
|
var Ki = /* @__PURE__ */ Symbol("consumeBody");
|
|
6040
6043
|
var Ks = /* @__PURE__ */ Symbol("consumeMeta");
|
|
6041
|
-
var
|
|
6044
|
+
var $s = /* @__PURE__ */ Symbol("consumeHeader");
|
|
6042
6045
|
var ae = /* @__PURE__ */ Symbol("consuming");
|
|
6043
|
-
var
|
|
6046
|
+
var $i = /* @__PURE__ */ Symbol("bufferConcat");
|
|
6044
6047
|
var Qe = /* @__PURE__ */ Symbol("maybeEnd");
|
|
6045
6048
|
var Yt = /* @__PURE__ */ Symbol("writing");
|
|
6046
|
-
var
|
|
6049
|
+
var V = /* @__PURE__ */ Symbol("aborted");
|
|
6047
6050
|
var Je = /* @__PURE__ */ Symbol("onDone");
|
|
6048
6051
|
var It = /* @__PURE__ */ Symbol("sawValidEntry");
|
|
6049
6052
|
var je = /* @__PURE__ */ Symbol("sawNullBlock");
|
|
6050
6053
|
var ti = /* @__PURE__ */ Symbol("sawEOF");
|
|
6051
|
-
var
|
|
6052
|
-
var
|
|
6054
|
+
var Vs = /* @__PURE__ */ Symbol("closeStream");
|
|
6055
|
+
var Cn = 1e3;
|
|
6053
6056
|
var le = /* @__PURE__ */ Symbol("compressedBytesRead");
|
|
6054
|
-
var
|
|
6057
|
+
var Vi = /* @__PURE__ */ Symbol("decompressedBytesRead");
|
|
6055
6058
|
var Xs = /* @__PURE__ */ Symbol("checkDecompressionRatio");
|
|
6056
|
-
var
|
|
6057
|
-
var rt = class extends
|
|
6059
|
+
var Fn = () => true;
|
|
6060
|
+
var rt = class extends Nn {
|
|
6058
6061
|
file;
|
|
6059
6062
|
strict;
|
|
6060
6063
|
maxMetaEntrySize;
|
|
@@ -6070,11 +6073,11 @@ var rt = class extends Dn {
|
|
|
6070
6073
|
[Nt];
|
|
6071
6074
|
[B] = "begin";
|
|
6072
6075
|
[dt] = "";
|
|
6073
|
-
[
|
|
6076
|
+
[$];
|
|
6074
6077
|
[he];
|
|
6075
|
-
[
|
|
6078
|
+
[mt] = false;
|
|
6076
6079
|
[w];
|
|
6077
|
-
[
|
|
6080
|
+
[V] = false;
|
|
6078
6081
|
[It];
|
|
6079
6082
|
[je] = false;
|
|
6080
6083
|
[ti] = false;
|
|
@@ -6082,26 +6085,26 @@ var rt = class extends Dn {
|
|
|
6082
6085
|
[ae] = false;
|
|
6083
6086
|
[Yi] = false;
|
|
6084
6087
|
[le] = 0;
|
|
6085
|
-
[
|
|
6088
|
+
[Vi] = 0;
|
|
6086
6089
|
constructor(t = {}) {
|
|
6087
6090
|
super(), this.file = t.file || "", this.on(Je, () => {
|
|
6088
6091
|
(this[B] === "begin" || this[It] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
6089
6092
|
}), t.ondone ? this.on(Je, t.ondone) : this.on(Je, () => {
|
|
6090
6093
|
this.emit("prefinish"), this.emit("finish"), this.emit("end");
|
|
6091
|
-
}), this.strict = !!t.strict, this.maxDecompressionRatio = typeof t.maxDecompressionRatio == "number" ? t.maxDecompressionRatio :
|
|
6094
|
+
}), this.strict = !!t.strict, this.maxDecompressionRatio = typeof t.maxDecompressionRatio == "number" ? t.maxDecompressionRatio : Cn, this.maxMetaEntrySize = t.maxMetaEntrySize || An, this.filter = typeof t.filter == "function" ? t.filter : Fn;
|
|
6092
6095
|
let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
|
|
6093
6096
|
this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
|
|
6094
6097
|
let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
|
|
6095
|
-
this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[
|
|
6098
|
+
this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Vs]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
|
|
6096
6099
|
}
|
|
6097
6100
|
warn(t, e, i = {}) {
|
|
6098
6101
|
Dt(this, t, e, i);
|
|
6099
6102
|
}
|
|
6100
|
-
[
|
|
6103
|
+
[$s](t, e) {
|
|
6101
6104
|
this[It] === void 0 && (this[It] = false);
|
|
6102
6105
|
let i;
|
|
6103
6106
|
try {
|
|
6104
|
-
i = new F(t, e, this[
|
|
6107
|
+
i = new F(t, e, this[$], this[he]);
|
|
6105
6108
|
} catch (r) {
|
|
6106
6109
|
return this.warn("TAR_ENTRY_INVALID", r);
|
|
6107
6110
|
}
|
|
@@ -6113,18 +6116,18 @@ var rt = class extends Dn {
|
|
|
6113
6116
|
if (/^(Symbolic)?Link$/.test(r) && !i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: i });
|
|
6114
6117
|
else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
|
|
6115
6118
|
else {
|
|
6116
|
-
let n = this[Nt] = new
|
|
6119
|
+
let n = this[Nt] = new Ve(i, this[$], this[he]);
|
|
6117
6120
|
if (!this[It]) if (n.remain) {
|
|
6118
6121
|
let o = () => {
|
|
6119
6122
|
n.invalid || (this[It] = true);
|
|
6120
6123
|
};
|
|
6121
6124
|
n.on("end", o);
|
|
6122
6125
|
} else this[It] = true;
|
|
6123
|
-
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[dt] = "", n.on("data", (o) => this[dt] += o), this[B] = "meta") : (this[
|
|
6126
|
+
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[dt] = "", n.on("data", (o) => this[dt] += o), this[B] = "meta") : (this[$] = 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[it] ? this[st].push(n) : (this[st].push(n), this[Zi]())));
|
|
6124
6127
|
}
|
|
6125
6128
|
}
|
|
6126
6129
|
}
|
|
6127
|
-
[
|
|
6130
|
+
[Vs]() {
|
|
6128
6131
|
queueMicrotask(() => this.emit("close"));
|
|
6129
6132
|
}
|
|
6130
6133
|
[Zs](t) {
|
|
@@ -6162,20 +6165,20 @@ var rt = class extends Dn {
|
|
|
6162
6165
|
switch (this[At]("meta", this[dt]), t.type) {
|
|
6163
6166
|
case "ExtendedHeader":
|
|
6164
6167
|
case "OldExtendedHeader":
|
|
6165
|
-
this[
|
|
6168
|
+
this[$] = ft.parse(this[dt], this[$], false);
|
|
6166
6169
|
break;
|
|
6167
6170
|
case "GlobalExtendedHeader":
|
|
6168
6171
|
this[he] = ft.parse(this[dt], this[he], true);
|
|
6169
6172
|
break;
|
|
6170
6173
|
case "NextFileHasLongPath":
|
|
6171
6174
|
case "OldGnuLongPath": {
|
|
6172
|
-
let e = this[
|
|
6173
|
-
this[
|
|
6175
|
+
let e = this[$] ?? /* @__PURE__ */ Object.create(null);
|
|
6176
|
+
this[$] = e, e.path = this[dt].replace(/\0.*/, "");
|
|
6174
6177
|
break;
|
|
6175
6178
|
}
|
|
6176
6179
|
case "NextFileHasLongLinkpath": {
|
|
6177
|
-
let e = this[
|
|
6178
|
-
this[
|
|
6180
|
+
let e = this[$] || /* @__PURE__ */ Object.create(null);
|
|
6181
|
+
this[$] = e, e.linkpath = this[dt].replace(/\0.*/, "");
|
|
6179
6182
|
break;
|
|
6180
6183
|
}
|
|
6181
6184
|
default:
|
|
@@ -6183,23 +6186,23 @@ var rt = class extends Dn {
|
|
|
6183
6186
|
}
|
|
6184
6187
|
}
|
|
6185
6188
|
abort(t) {
|
|
6186
|
-
if (!this[
|
|
6189
|
+
if (!this[V]) {
|
|
6187
6190
|
if (this[w]) {
|
|
6188
6191
|
let e = this[w];
|
|
6189
6192
|
e.write = () => true, e.end = () => e, e.emit = () => false, e.destroy?.();
|
|
6190
6193
|
}
|
|
6191
|
-
this[
|
|
6194
|
+
this[V] = true, this.emit("abort", t), this.warn("TAR_ABORT", t, { recoverable: false });
|
|
6192
6195
|
}
|
|
6193
6196
|
}
|
|
6194
6197
|
[Xs](t) {
|
|
6195
|
-
this[
|
|
6196
|
-
let e = this[
|
|
6198
|
+
this[Vi] += t.length;
|
|
6199
|
+
let e = this[Vi] / this[le];
|
|
6197
6200
|
return e > this.maxDecompressionRatio ? (this.abort(new Error(`max decompression ratio exceeded: ${e.toFixed(2)} > ${this.maxDecompressionRatio}`)), false) : true;
|
|
6198
6201
|
}
|
|
6199
6202
|
write(t, e, i) {
|
|
6200
|
-
if (typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8")), this[
|
|
6203
|
+
if (typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8")), this[V]) return i?.(), false;
|
|
6201
6204
|
if ((this[w] === void 0 || this.brotli === void 0 && this[w] === false) && t) {
|
|
6202
|
-
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length <
|
|
6205
|
+
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < In) return this[p] = t, i?.(), true;
|
|
6203
6206
|
for (let a = 0; this[w] === void 0 && a < Xi.length; a++) t[a] !== Xi[a] && (this[w] = false);
|
|
6204
6207
|
let o = false;
|
|
6205
6208
|
if (this[w] === false && this.zstd !== false) {
|
|
@@ -6210,7 +6213,7 @@ var rt = class extends Dn {
|
|
|
6210
6213
|
}
|
|
6211
6214
|
}
|
|
6212
6215
|
let h = this.brotli === void 0 && !o;
|
|
6213
|
-
if (this[w] === false && h) if (t.length < 512) if (this[
|
|
6216
|
+
if (this[w] === false && h) if (t.length < 512) if (this[mt]) this.brotli = true;
|
|
6214
6217
|
else return this[p] = t, i?.(), true;
|
|
6215
6218
|
else try {
|
|
6216
6219
|
new F(t.subarray(0, 512)), this.brotli = false;
|
|
@@ -6218,13 +6221,13 @@ var rt = class extends Dn {
|
|
|
6218
6221
|
this.brotli = true;
|
|
6219
6222
|
}
|
|
6220
6223
|
if (this[w] === void 0 || this[w] === false && (this.brotli || o)) {
|
|
6221
|
-
let a = this[
|
|
6222
|
-
this[
|
|
6224
|
+
let a = this[mt];
|
|
6225
|
+
this[mt] = false, this[w] = this[w] === void 0 ? new Ue({}) : o ? new Ke({}) : new Ge({}), this[w].on("data", (c) => {
|
|
6223
6226
|
this[Xs](c) && this[Xe](c);
|
|
6224
6227
|
}), this[w].on("error", (c) => {
|
|
6225
|
-
this[
|
|
6228
|
+
this[V] || this.abort(c);
|
|
6226
6229
|
}), this[w].on("end", () => {
|
|
6227
|
-
this[
|
|
6230
|
+
this[mt] = true, this[Xe]();
|
|
6228
6231
|
}), this[Yt] = true, this[le] += t.length;
|
|
6229
6232
|
let l = !!this[w][a ? "end" : "write"](t);
|
|
6230
6233
|
return this[Yt] = false, i?.(), l;
|
|
@@ -6234,11 +6237,11 @@ var rt = class extends Dn {
|
|
|
6234
6237
|
let n = this[st].length > 0 ? false : this[it] ? this[it].flowing : true;
|
|
6235
6238
|
return !n && this[st].length === 0 && this[it]?.once("drain", () => this.emit("drain")), i?.(), n;
|
|
6236
6239
|
}
|
|
6237
|
-
[
|
|
6238
|
-
t && !this[
|
|
6240
|
+
[$i](t) {
|
|
6241
|
+
t && !this[V] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
|
|
6239
6242
|
}
|
|
6240
6243
|
[Qe]() {
|
|
6241
|
-
if (this[
|
|
6244
|
+
if (this[mt] && !this[Yi] && !this[V] && !this[ae]) {
|
|
6242
6245
|
this[Yi] = true;
|
|
6243
6246
|
let t = this[Nt];
|
|
6244
6247
|
if (t?.blockRemain) {
|
|
@@ -6249,28 +6252,28 @@ var rt = class extends Dn {
|
|
|
6249
6252
|
}
|
|
6250
6253
|
}
|
|
6251
6254
|
[Xe](t) {
|
|
6252
|
-
if (this[ae] && t) this[
|
|
6255
|
+
if (this[ae] && t) this[$i](t);
|
|
6253
6256
|
else if (!t && !this[p]) this[Qe]();
|
|
6254
6257
|
else if (t) {
|
|
6255
6258
|
if (this[ae] = true, this[p]) {
|
|
6256
|
-
this[
|
|
6259
|
+
this[$i](t);
|
|
6257
6260
|
let e = this[p];
|
|
6258
6261
|
this[p] = void 0, this[qe](e);
|
|
6259
6262
|
} else this[qe](t);
|
|
6260
|
-
for (; this[p] && this[p]?.length >= 512 && !this[
|
|
6263
|
+
for (; this[p] && this[p]?.length >= 512 && !this[V] && !this[ti]; ) {
|
|
6261
6264
|
let e = this[p];
|
|
6262
6265
|
this[p] = void 0, this[qe](e);
|
|
6263
6266
|
}
|
|
6264
6267
|
this[ae] = false;
|
|
6265
6268
|
}
|
|
6266
|
-
(!this[p] || this[
|
|
6269
|
+
(!this[p] || this[mt]) && this[Qe]();
|
|
6267
6270
|
}
|
|
6268
6271
|
[qe](t) {
|
|
6269
6272
|
let e = 0, i = t.length;
|
|
6270
|
-
for (; e + 512 <= i && !this[
|
|
6273
|
+
for (; e + 512 <= i && !this[V] && !this[ti]; ) switch (this[B]) {
|
|
6271
6274
|
case "begin":
|
|
6272
6275
|
case "header":
|
|
6273
|
-
this[
|
|
6276
|
+
this[$s](t, e), e += 512;
|
|
6274
6277
|
break;
|
|
6275
6278
|
case "ignore":
|
|
6276
6279
|
case "body":
|
|
@@ -6285,10 +6288,10 @@ var rt = class extends Dn {
|
|
|
6285
6288
|
e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
|
|
6286
6289
|
}
|
|
6287
6290
|
end(t, e, i) {
|
|
6288
|
-
return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[
|
|
6291
|
+
return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[V] || (this[w] ? (t && (this[le] += t.length, this[w].write(t)), this[w].end()) : (this[mt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Qe]())), this;
|
|
6289
6292
|
}
|
|
6290
6293
|
};
|
|
6291
|
-
var
|
|
6294
|
+
var ut = (s3) => {
|
|
6292
6295
|
let t = s3.length - 1, e = -1;
|
|
6293
6296
|
for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
|
|
6294
6297
|
return e === -1 ? s3 : s3.slice(0, e);
|
|
@@ -6300,19 +6303,19 @@ var vn = (s3) => {
|
|
|
6300
6303
|
} : (e) => e.resume();
|
|
6301
6304
|
};
|
|
6302
6305
|
var Qi = (s3, t) => {
|
|
6303
|
-
let e = new Map(t.map((o) => [
|
|
6306
|
+
let e = new Map(t.map((o) => [ut(o), true])), i = s3.filter, r = 100, n = (o, h = "", a = 0) => {
|
|
6304
6307
|
if (a >= r) return e.set(o, false), false;
|
|
6305
|
-
let l = h ||
|
|
6308
|
+
let l = h || Mn(o).root || ".", c;
|
|
6306
6309
|
if (o === l) c = false;
|
|
6307
6310
|
else {
|
|
6308
6311
|
let d = e.get(o);
|
|
6309
|
-
c = d !== void 0 ? d : n(
|
|
6312
|
+
c = d !== void 0 ? d : n(kn(o), l, a + 1);
|
|
6310
6313
|
}
|
|
6311
6314
|
return e.set(o, c), c;
|
|
6312
6315
|
};
|
|
6313
|
-
s3.filter = i ? (o, h) => i(o, h) && n(
|
|
6316
|
+
s3.filter = i ? (o, h) => i(o, h) && n(ut(o)) : (o) => n(ut(o));
|
|
6314
6317
|
};
|
|
6315
|
-
var
|
|
6318
|
+
var Bn = (s3) => {
|
|
6316
6319
|
let t = new rt(s3), e = s3.file, i;
|
|
6317
6320
|
try {
|
|
6318
6321
|
i = Kt.openSync(e, "r");
|
|
@@ -6336,7 +6339,7 @@ var Mn = (s3) => {
|
|
|
6336
6339
|
}
|
|
6337
6340
|
}
|
|
6338
6341
|
};
|
|
6339
|
-
var
|
|
6342
|
+
var Pn = (s3, t) => {
|
|
6340
6343
|
let e = new rt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
6341
6344
|
return new Promise((o, h) => {
|
|
6342
6345
|
e.on("error", h), e.on("end", o), Kt.stat(r, (a, l) => {
|
|
@@ -6348,14 +6351,14 @@ var Bn = (s3, t) => {
|
|
|
6348
6351
|
});
|
|
6349
6352
|
});
|
|
6350
6353
|
};
|
|
6351
|
-
var Ct = K(
|
|
6354
|
+
var Ct = K(Bn, Pn, (s3) => new rt(s3), (s3) => new rt(s3), (s3, t) => {
|
|
6352
6355
|
t?.length && Qi(s3, t), s3.noResume || vn(s3);
|
|
6353
6356
|
});
|
|
6354
6357
|
var Ji = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
|
|
6355
|
-
var { isAbsolute:
|
|
6358
|
+
var { isAbsolute: Un, parse: qs } = zn;
|
|
6356
6359
|
var ce = (s3) => {
|
|
6357
6360
|
let t = "", e = qs(s3);
|
|
6358
|
-
for (;
|
|
6361
|
+
for (; Un(s3) || e.root; ) {
|
|
6359
6362
|
let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
|
|
6360
6363
|
s3 = s3.slice(i.length), t += i, e = qs(s3);
|
|
6361
6364
|
}
|
|
@@ -6363,12 +6366,12 @@ var ce = (s3) => {
|
|
|
6363
6366
|
};
|
|
6364
6367
|
var ei = ["|", "<", ">", "?", ":"];
|
|
6365
6368
|
var ji = ei.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
|
|
6366
|
-
var
|
|
6367
|
-
var
|
|
6368
|
-
var ts = (s3) => ei.reduce((t, e) => t.split(e).join(
|
|
6369
|
-
var Qs = (s3) => ji.reduce((t, e) => t.split(e).join(
|
|
6370
|
-
var rr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""),
|
|
6371
|
-
var
|
|
6369
|
+
var Hn = new Map(ei.map((s3, t) => [s3, ji[t]]));
|
|
6370
|
+
var Wn = new Map(ji.map((s3, t) => [s3, ei[t]]));
|
|
6371
|
+
var ts = (s3) => ei.reduce((t, e) => t.split(e).join(Hn.get(e)), s3);
|
|
6372
|
+
var Qs = (s3) => ji.reduce((t, e) => t.split(e).join(Wn.get(e)), s3);
|
|
6373
|
+
var rr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), ut(t) + "/" + s3) : f(s3);
|
|
6374
|
+
var Gn = 16 * 1024 * 1024;
|
|
6372
6375
|
var tr = /* @__PURE__ */ Symbol("process");
|
|
6373
6376
|
var er = /* @__PURE__ */ Symbol("file");
|
|
6374
6377
|
var ir = /* @__PURE__ */ Symbol("directory");
|
|
@@ -6420,7 +6423,7 @@ var de = class extends A {
|
|
|
6420
6423
|
#t = false;
|
|
6421
6424
|
constructor(t, e = {}) {
|
|
6422
6425
|
let i = se(e);
|
|
6423
|
-
super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize ||
|
|
6426
|
+
super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || Gn, 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);
|
|
6424
6427
|
let r = false;
|
|
6425
6428
|
if (!this.preservePaths) {
|
|
6426
6429
|
let [o, h] = ce(this.path);
|
|
@@ -6443,7 +6446,7 @@ var de = class extends A {
|
|
|
6443
6446
|
});
|
|
6444
6447
|
}
|
|
6445
6448
|
[si](t) {
|
|
6446
|
-
this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type =
|
|
6449
|
+
this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Zn(t), this.emit("stat", t), this[tr]();
|
|
6447
6450
|
}
|
|
6448
6451
|
[tr]() {
|
|
6449
6452
|
switch (this.type) {
|
|
@@ -6649,7 +6652,7 @@ var oi = class extends A {
|
|
|
6649
6652
|
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;
|
|
6650
6653
|
}
|
|
6651
6654
|
};
|
|
6652
|
-
var
|
|
6655
|
+
var Zn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
|
|
6653
6656
|
var hi = class s2 {
|
|
6654
6657
|
tail;
|
|
6655
6658
|
head;
|
|
@@ -6681,11 +6684,11 @@ var hi = class s2 {
|
|
|
6681
6684
|
t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
|
|
6682
6685
|
}
|
|
6683
6686
|
push(...t) {
|
|
6684
|
-
for (let e = 0, i = t.length; e < i; e++)
|
|
6687
|
+
for (let e = 0, i = t.length; e < i; e++) Kn(this, t[e]);
|
|
6685
6688
|
return this.length;
|
|
6686
6689
|
}
|
|
6687
6690
|
unshift(...t) {
|
|
6688
|
-
for (var e = 0, i = t.length; e < i; e++)
|
|
6691
|
+
for (var e = 0, i = t.length; e < i; e++) $n(this, t[e]);
|
|
6689
6692
|
return this.length;
|
|
6690
6693
|
}
|
|
6691
6694
|
pop() {
|
|
@@ -6781,7 +6784,7 @@ var hi = class s2 {
|
|
|
6781
6784
|
let n = [];
|
|
6782
6785
|
for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
|
|
6783
6786
|
r ? r !== this.tail && (r = r.prev) : r = this.tail;
|
|
6784
|
-
for (let o of i) r =
|
|
6787
|
+
for (let o of i) r = Yn(this, r, o);
|
|
6785
6788
|
return n;
|
|
6786
6789
|
}
|
|
6787
6790
|
reverse() {
|
|
@@ -6793,17 +6796,17 @@ var hi = class s2 {
|
|
|
6793
6796
|
return this.head = e, this.tail = t, this;
|
|
6794
6797
|
}
|
|
6795
6798
|
};
|
|
6796
|
-
function
|
|
6797
|
-
let i = t, r = t ? t.next : s3.head, n = new
|
|
6799
|
+
function Yn(s3, t, e) {
|
|
6800
|
+
let i = t, r = t ? t.next : s3.head, n = new me(e, i, r, s3);
|
|
6798
6801
|
return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
|
|
6799
6802
|
}
|
|
6800
|
-
function Yn(s3, t) {
|
|
6801
|
-
s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
|
|
6802
|
-
}
|
|
6803
6803
|
function Kn(s3, t) {
|
|
6804
|
-
s3.
|
|
6804
|
+
s3.tail = new me(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
|
|
6805
|
+
}
|
|
6806
|
+
function $n(s3, t) {
|
|
6807
|
+
s3.head = new me(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
|
|
6805
6808
|
}
|
|
6806
|
-
var
|
|
6809
|
+
var me = class {
|
|
6807
6810
|
list;
|
|
6808
6811
|
next;
|
|
6809
6812
|
prev;
|
|
@@ -6828,7 +6831,7 @@ var pi = class {
|
|
|
6828
6831
|
};
|
|
6829
6832
|
var nr = Buffer.alloc(1024);
|
|
6830
6833
|
var li = /* @__PURE__ */ Symbol("onStat");
|
|
6831
|
-
var
|
|
6834
|
+
var ue = /* @__PURE__ */ Symbol("ended");
|
|
6832
6835
|
var W = /* @__PURE__ */ Symbol("queue");
|
|
6833
6836
|
var pe = /* @__PURE__ */ Symbol("pendingLinks");
|
|
6834
6837
|
var Et = /* @__PURE__ */ Symbol("current");
|
|
@@ -6840,12 +6843,12 @@ var ls = /* @__PURE__ */ Symbol("jobDone");
|
|
|
6840
6843
|
var ci = /* @__PURE__ */ Symbol("addFSEntry");
|
|
6841
6844
|
var or = /* @__PURE__ */ Symbol("addTarEntry");
|
|
6842
6845
|
var ds = /* @__PURE__ */ Symbol("stat");
|
|
6843
|
-
var
|
|
6846
|
+
var ms = /* @__PURE__ */ Symbol("readdir");
|
|
6844
6847
|
var fi = /* @__PURE__ */ Symbol("onreaddir");
|
|
6845
6848
|
var di = /* @__PURE__ */ Symbol("pipe");
|
|
6846
6849
|
var hr = /* @__PURE__ */ Symbol("entry");
|
|
6847
6850
|
var cs = /* @__PURE__ */ Symbol("entryOpt");
|
|
6848
|
-
var
|
|
6851
|
+
var mi = /* @__PURE__ */ Symbol("writeEntryClass");
|
|
6849
6852
|
var lr = /* @__PURE__ */ Symbol("write");
|
|
6850
6853
|
var fs2 = /* @__PURE__ */ Symbol("ondrain");
|
|
6851
6854
|
var wt = class extends A {
|
|
@@ -6869,21 +6872,21 @@ var wt = class extends A {
|
|
|
6869
6872
|
mtime;
|
|
6870
6873
|
filter;
|
|
6871
6874
|
jobs;
|
|
6872
|
-
[
|
|
6875
|
+
[mi];
|
|
6873
6876
|
onWriteEntry;
|
|
6874
6877
|
[W];
|
|
6875
6878
|
[pe] = /* @__PURE__ */ new Map();
|
|
6876
6879
|
[G] = 0;
|
|
6877
6880
|
[Ee] = false;
|
|
6878
|
-
[
|
|
6881
|
+
[ue] = false;
|
|
6879
6882
|
constructor(t = {}) {
|
|
6880
|
-
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[
|
|
6883
|
+
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[mi] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
|
|
6881
6884
|
if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
|
|
6882
6885
|
if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new ze(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new We(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ye(t.zstd)), !this.zip) throw new Error("impossible");
|
|
6883
6886
|
let e = this.zip;
|
|
6884
6887
|
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[fs2]()), this.on("resume", () => e.resume());
|
|
6885
6888
|
} else this.on("drain", this[fs2]);
|
|
6886
|
-
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 hi(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[Ee] = false, this[
|
|
6889
|
+
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 hi(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[Ee] = false, this[ue] = false;
|
|
6887
6890
|
}
|
|
6888
6891
|
[lr](t) {
|
|
6889
6892
|
return super.write(t);
|
|
@@ -6892,10 +6895,10 @@ var wt = class extends A {
|
|
|
6892
6895
|
return this.write(t), this;
|
|
6893
6896
|
}
|
|
6894
6897
|
end(t, e, i) {
|
|
6895
|
-
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[
|
|
6898
|
+
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[Ft](), i && i(), this;
|
|
6896
6899
|
}
|
|
6897
6900
|
write(t) {
|
|
6898
|
-
if (this[
|
|
6901
|
+
if (this[ue]) throw new Error("write after end");
|
|
6899
6902
|
return typeof t == "string" ? this[ci](t) : this[or](t), this.flowing;
|
|
6900
6903
|
}
|
|
6901
6904
|
[or](t) {
|
|
@@ -6914,7 +6917,7 @@ var wt = class extends A {
|
|
|
6914
6917
|
[ds](t) {
|
|
6915
6918
|
t.pending = true, this[G] += 1;
|
|
6916
6919
|
let e = this.follow ? "stat" : "lstat";
|
|
6917
|
-
|
|
6920
|
+
ui[e](t.absolute, (i, r) => {
|
|
6918
6921
|
t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[li](t, r);
|
|
6919
6922
|
});
|
|
6920
6923
|
}
|
|
@@ -6927,8 +6930,8 @@ var wt = class extends A {
|
|
|
6927
6930
|
}
|
|
6928
6931
|
this[Ft]();
|
|
6929
6932
|
}
|
|
6930
|
-
[
|
|
6931
|
-
t.pending = true, this[G] += 1,
|
|
6933
|
+
[ms](t) {
|
|
6934
|
+
t.pending = true, this[G] += 1, ui.readdir(t.absolute, (e, i) => {
|
|
6932
6935
|
if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
|
|
6933
6936
|
this[fi](t, i);
|
|
6934
6937
|
});
|
|
@@ -6943,7 +6946,7 @@ var wt = class extends A {
|
|
|
6943
6946
|
let e = t.next;
|
|
6944
6947
|
this[W].removeNode(t), t.next = e;
|
|
6945
6948
|
}
|
|
6946
|
-
this[Ee] = false, this[
|
|
6949
|
+
this[Ee] = false, this[ue] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(nr) : (super.write(nr), super.end()));
|
|
6947
6950
|
}
|
|
6948
6951
|
}
|
|
6949
6952
|
get [Et]() {
|
|
@@ -6974,7 +6977,7 @@ var wt = class extends A {
|
|
|
6974
6977
|
if (t.stat && !t.ignore) {
|
|
6975
6978
|
if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
|
|
6976
6979
|
let e = this.readdirCache.get(t.absolute);
|
|
6977
|
-
if (e ? this[fi](t, e) : this[
|
|
6980
|
+
if (e ? this[fi](t, e) : this[ms](t), !t.readdir) return;
|
|
6978
6981
|
}
|
|
6979
6982
|
if (t.entry = this[hr](t), !t.entry) {
|
|
6980
6983
|
t.ignore = true;
|
|
@@ -6990,7 +6993,7 @@ var wt = class extends A {
|
|
|
6990
6993
|
[hr](t) {
|
|
6991
6994
|
this[G] += 1;
|
|
6992
6995
|
try {
|
|
6993
|
-
return new this[
|
|
6996
|
+
return new this[mi](t.path, this[cs](t)).on("end", () => this[ls](t)).on("error", (i) => this.emit("error", i));
|
|
6994
6997
|
} catch (e) {
|
|
6995
6998
|
this.emit("error", e);
|
|
6996
6999
|
}
|
|
@@ -7021,7 +7024,7 @@ var wt = class extends A {
|
|
|
7021
7024
|
var kt = class extends wt {
|
|
7022
7025
|
sync = true;
|
|
7023
7026
|
constructor(t) {
|
|
7024
|
-
super(t), this[
|
|
7027
|
+
super(t), this[mi] = ni;
|
|
7025
7028
|
}
|
|
7026
7029
|
pause() {
|
|
7027
7030
|
}
|
|
@@ -7029,10 +7032,10 @@ var kt = class extends wt {
|
|
|
7029
7032
|
}
|
|
7030
7033
|
[ds](t) {
|
|
7031
7034
|
let e = this.follow ? "statSync" : "lstatSync";
|
|
7032
|
-
this[li](t,
|
|
7035
|
+
this[li](t, ui[e](t.absolute));
|
|
7033
7036
|
}
|
|
7034
|
-
[
|
|
7035
|
-
this[fi](t,
|
|
7037
|
+
[ms](t) {
|
|
7038
|
+
this[fi](t, ui.readdirSync(t.absolute));
|
|
7036
7039
|
}
|
|
7037
7040
|
[di](t) {
|
|
7038
7041
|
let e = t.entry, i = this.zip;
|
|
@@ -7051,7 +7054,7 @@ var Vn = (s3, t) => {
|
|
|
7051
7054
|
let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
|
|
7052
7055
|
e.pipe(i), fr(e, t);
|
|
7053
7056
|
};
|
|
7054
|
-
var
|
|
7057
|
+
var Xn = (s3, t) => {
|
|
7055
7058
|
let e = new wt(s3), i = new et(s3.file, { mode: s3.mode || 438 });
|
|
7056
7059
|
e.pipe(i);
|
|
7057
7060
|
let r = new Promise((n, o) => {
|
|
@@ -7070,26 +7073,26 @@ var dr = async (s3, t) => {
|
|
|
7070
7073
|
} }) : s3.add(e);
|
|
7071
7074
|
s3.end();
|
|
7072
7075
|
};
|
|
7073
|
-
var
|
|
7076
|
+
var qn = (s3, t) => {
|
|
7074
7077
|
let e = new kt(s3);
|
|
7075
7078
|
return fr(e, t), e;
|
|
7076
7079
|
};
|
|
7077
|
-
var
|
|
7080
|
+
var Qn = (s3, t) => {
|
|
7078
7081
|
let e = new wt(s3);
|
|
7079
7082
|
return dr(e, t).catch((i) => e.emit("error", i)), e;
|
|
7080
7083
|
};
|
|
7081
|
-
var
|
|
7084
|
+
var Jn = K(Vn, Xn, qn, Qn, (s3, t) => {
|
|
7082
7085
|
if (!t?.length) throw new TypeError("no paths specified to add to archive");
|
|
7083
7086
|
});
|
|
7084
|
-
var
|
|
7085
|
-
var Er =
|
|
7086
|
-
var { O_CREAT: wr, O_NOFOLLOW:
|
|
7087
|
+
var jn = process.env.__FAKE_PLATFORM__ || process.platform;
|
|
7088
|
+
var Er = jn === "win32";
|
|
7089
|
+
var { O_CREAT: wr, O_NOFOLLOW: mr, O_TRUNC: Sr, O_WRONLY: yr } = pr.constants;
|
|
7087
7090
|
var Rr = Number(process.env.__FAKE_FS_O_FILENAME__) || pr.constants.UV_FS_O_FILEMAP || 0;
|
|
7088
|
-
var
|
|
7089
|
-
var
|
|
7090
|
-
var
|
|
7091
|
-
var
|
|
7092
|
-
var
|
|
7091
|
+
var to = Er && !!Rr;
|
|
7092
|
+
var eo = 512 * 1024;
|
|
7093
|
+
var io = Rr | Sr | wr | yr;
|
|
7094
|
+
var ur = !Er && typeof mr == "number" ? mr | Sr | wr | yr : null;
|
|
7095
|
+
var us = ur !== null ? () => ur : to ? (s3) => s3 < eo ? io : "w" : () => "w";
|
|
7093
7096
|
var ps = (s3, t, e) => {
|
|
7094
7097
|
try {
|
|
7095
7098
|
return wi.lchownSync(s3, t, e);
|
|
@@ -7102,7 +7105,7 @@ var Ei = (s3, t, e, i) => {
|
|
|
7102
7105
|
i(r && r?.code !== "ENOENT" ? r : null);
|
|
7103
7106
|
});
|
|
7104
7107
|
};
|
|
7105
|
-
var
|
|
7108
|
+
var so = (s3, t, e, i, r) => {
|
|
7106
7109
|
if (t.isDirectory()) Es(we.resolve(s3, t.name), e, i, (n) => {
|
|
7107
7110
|
if (n) return r(n);
|
|
7108
7111
|
let o = we.resolve(s3, t.name);
|
|
@@ -7126,10 +7129,10 @@ var Es = (s3, t, e, i) => {
|
|
|
7126
7129
|
if (--o === 0) return Ei(s3, t, e, i);
|
|
7127
7130
|
}
|
|
7128
7131
|
};
|
|
7129
|
-
for (let l of n)
|
|
7132
|
+
for (let l of n) so(s3, l, t, e, a);
|
|
7130
7133
|
});
|
|
7131
7134
|
};
|
|
7132
|
-
var
|
|
7135
|
+
var ro = (s3, t, e, i) => {
|
|
7133
7136
|
t.isDirectory() && ws(we.resolve(s3, t.name), e, i), ps(we.resolve(s3, t.name), e, i);
|
|
7134
7137
|
};
|
|
7135
7138
|
var ws = (s3, t, e) => {
|
|
@@ -7142,7 +7145,7 @@ var ws = (s3, t, e) => {
|
|
|
7142
7145
|
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return ps(s3, t, e);
|
|
7143
7146
|
throw n;
|
|
7144
7147
|
}
|
|
7145
|
-
for (let r of i)
|
|
7148
|
+
for (let r of i) ro(s3, r, t, e);
|
|
7146
7149
|
return ps(s3, t, e);
|
|
7147
7150
|
};
|
|
7148
7151
|
var Se = class extends Error {
|
|
@@ -7168,7 +7171,7 @@ var St = class extends Error {
|
|
|
7168
7171
|
return "SymlinkError";
|
|
7169
7172
|
}
|
|
7170
7173
|
};
|
|
7171
|
-
var
|
|
7174
|
+
var oo = (s3, t) => {
|
|
7172
7175
|
k.stat(s3, (e, i) => {
|
|
7173
7176
|
(e || !i.isDirectory()) && (e = new Se(s3, e?.code || "ENOTDIR")), t(e);
|
|
7174
7177
|
});
|
|
@@ -7178,8 +7181,8 @@ var gr = (s3, t, e) => {
|
|
|
7178
7181
|
let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, h = t.gid, a = typeof o == "number" && typeof h == "number" && (o !== t.processUid || h !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), y = (E, x) => {
|
|
7179
7182
|
E ? e(E) : x && a ? Es(x, o, h, (Le) => y(Le)) : n ? k.chmod(s3, r, e) : e();
|
|
7180
7183
|
};
|
|
7181
|
-
if (s3 === d) return
|
|
7182
|
-
if (l) return
|
|
7184
|
+
if (s3 === d) return oo(s3, y);
|
|
7185
|
+
if (l) return no.mkdir(s3, { mode: r, recursive: true }).then((E) => y(null, E ?? void 0), y);
|
|
7183
7186
|
let D = f(Si.relative(d, s3)).split("/");
|
|
7184
7187
|
Ss(d, D, r, c, d, void 0, y);
|
|
7185
7188
|
};
|
|
@@ -7202,7 +7205,7 @@ var br = (s3, t, e, i, r, n, o) => (h) => {
|
|
|
7202
7205
|
}
|
|
7203
7206
|
}) : (n = n || s3, Ss(s3, t, e, i, r, n, o));
|
|
7204
7207
|
};
|
|
7205
|
-
var
|
|
7208
|
+
var ho = (s3) => {
|
|
7206
7209
|
let t = false, e;
|
|
7207
7210
|
try {
|
|
7208
7211
|
t = k.statSync(s3).isDirectory();
|
|
@@ -7217,7 +7220,7 @@ var _r = (s3, t) => {
|
|
|
7217
7220
|
let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid, h = typeof n == "number" && typeof o == "number" && (n !== t.processUid || o !== t.processGid), a = t.preserve, l = t.unlink, c = f(t.cwd), d = (E) => {
|
|
7218
7221
|
E && h && ws(E, n, o), r && k.chmodSync(s3, i);
|
|
7219
7222
|
};
|
|
7220
|
-
if (s3 === c) return
|
|
7223
|
+
if (s3 === c) return ho(c), d();
|
|
7221
7224
|
if (a) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
|
|
7222
7225
|
let T = f(Si.relative(c, s3)).split("/"), D;
|
|
7223
7226
|
for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
|
|
@@ -7237,18 +7240,18 @@ var _r = (s3, t) => {
|
|
|
7237
7240
|
};
|
|
7238
7241
|
var ys = /* @__PURE__ */ Object.create(null);
|
|
7239
7242
|
var Or = 1e4;
|
|
7240
|
-
var
|
|
7243
|
+
var $t = /* @__PURE__ */ new Set();
|
|
7241
7244
|
var Tr = (s3) => {
|
|
7242
|
-
|
|
7243
|
-
let t = ys[s3], e =
|
|
7245
|
+
$t.has(s3) ? $t.delete(s3) : ys[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
|
|
7246
|
+
let t = ys[s3], e = $t.size - Or;
|
|
7244
7247
|
if (e > Or / 10) {
|
|
7245
|
-
for (let i of
|
|
7248
|
+
for (let i of $t) if ($t.delete(i), delete ys[i], --e <= 0) break;
|
|
7246
7249
|
}
|
|
7247
7250
|
return t;
|
|
7248
7251
|
};
|
|
7249
|
-
var
|
|
7250
|
-
var
|
|
7251
|
-
var
|
|
7252
|
+
var ao = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
7253
|
+
var lo = ao === "win32";
|
|
7254
|
+
var co = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
|
|
7252
7255
|
let r = e.at(-1);
|
|
7253
7256
|
return r !== void 0 && (i = xr(r, i)), e.push(i || "/"), e;
|
|
7254
7257
|
}, []);
|
|
@@ -7257,8 +7260,8 @@ var yi = class {
|
|
|
7257
7260
|
#i = /* @__PURE__ */ new Map();
|
|
7258
7261
|
#s = /* @__PURE__ */ new Set();
|
|
7259
7262
|
reserve(t, e) {
|
|
7260
|
-
t =
|
|
7261
|
-
let i = new Set(t.map((r) =>
|
|
7263
|
+
t = lo ? ["win32 parallelization disabled"] : t.map((r) => ut(xr(Tr(r))));
|
|
7264
|
+
let i = new Set(t.map((r) => co(r)).reduce((r, n) => r.concat(n)));
|
|
7262
7265
|
this.#i.set(e, { dirs: i, paths: t });
|
|
7263
7266
|
for (let r of t) {
|
|
7264
7267
|
let n = this.#t.get(r);
|
|
@@ -7335,7 +7338,7 @@ var yt = /* @__PURE__ */ Symbol("mkdir");
|
|
|
7335
7338
|
var O = /* @__PURE__ */ Symbol("onError");
|
|
7336
7339
|
var Ri = /* @__PURE__ */ Symbol("pending");
|
|
7337
7340
|
var kr = /* @__PURE__ */ Symbol("pend");
|
|
7338
|
-
var
|
|
7341
|
+
var Vt = /* @__PURE__ */ Symbol("unpend");
|
|
7339
7342
|
var gs = /* @__PURE__ */ Symbol("ended");
|
|
7340
7343
|
var bs = /* @__PURE__ */ Symbol("maybeClose");
|
|
7341
7344
|
var Ls = /* @__PURE__ */ Symbol("skip");
|
|
@@ -7343,23 +7346,23 @@ var ge = /* @__PURE__ */ Symbol("doChown");
|
|
|
7343
7346
|
var be = /* @__PURE__ */ Symbol("uid");
|
|
7344
7347
|
var _e = /* @__PURE__ */ Symbol("gid");
|
|
7345
7348
|
var Oe = /* @__PURE__ */ Symbol("checkedCwd");
|
|
7346
|
-
var
|
|
7347
|
-
var Te =
|
|
7349
|
+
var mo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
7350
|
+
var Te = mo === "win32";
|
|
7348
7351
|
var uo = 1024;
|
|
7349
|
-
var
|
|
7350
|
-
if (!Te) return
|
|
7351
|
-
let e = s3 + ".DELETE." +
|
|
7352
|
-
|
|
7352
|
+
var po = (s3, t) => {
|
|
7353
|
+
if (!Te) return m.unlink(s3, t);
|
|
7354
|
+
let e = s3 + ".DELETE." + vr(16).toString("hex");
|
|
7355
|
+
m.rename(s3, e, (i) => {
|
|
7353
7356
|
if (i) return t(i);
|
|
7354
|
-
|
|
7357
|
+
m.unlink(e, t);
|
|
7355
7358
|
});
|
|
7356
7359
|
};
|
|
7357
|
-
var
|
|
7358
|
-
if (!Te) return
|
|
7359
|
-
let t = s3 + ".DELETE." +
|
|
7360
|
-
|
|
7360
|
+
var Eo = (s3) => {
|
|
7361
|
+
if (!Te) return m.unlinkSync(s3);
|
|
7362
|
+
let t = s3 + ".DELETE." + vr(16).toString("hex");
|
|
7363
|
+
m.renameSync(s3, t), m.unlinkSync(t);
|
|
7361
7364
|
};
|
|
7362
|
-
var
|
|
7365
|
+
var Mr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
|
|
7363
7366
|
var Xt = class extends rt {
|
|
7364
7367
|
[gs] = false;
|
|
7365
7368
|
[Oe] = false;
|
|
@@ -7441,7 +7444,7 @@ var Xt = class extends rt {
|
|
|
7441
7444
|
}
|
|
7442
7445
|
[Dr](t) {
|
|
7443
7446
|
if (!this[Fr](t)) return t.resume();
|
|
7444
|
-
switch (
|
|
7447
|
+
switch (fo.equal(typeof t.absolute, "string"), t.type) {
|
|
7445
7448
|
case "Directory":
|
|
7446
7449
|
case "GNUDumpDir":
|
|
7447
7450
|
t.mode && (t.mode = t.mode | 448);
|
|
@@ -7456,7 +7459,7 @@ var Xt = class extends rt {
|
|
|
7456
7459
|
}
|
|
7457
7460
|
}
|
|
7458
7461
|
[O](t, e) {
|
|
7459
|
-
t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[
|
|
7462
|
+
t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Vt](), e.resume());
|
|
7460
7463
|
}
|
|
7461
7464
|
[yt](t, e, i) {
|
|
7462
7465
|
gr(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);
|
|
@@ -7465,25 +7468,25 @@ var Xt = class extends rt {
|
|
|
7465
7468
|
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;
|
|
7466
7469
|
}
|
|
7467
7470
|
[be](t) {
|
|
7468
|
-
return
|
|
7471
|
+
return Mr(this.uid, t.uid, this.processUid);
|
|
7469
7472
|
}
|
|
7470
7473
|
[_e](t) {
|
|
7471
|
-
return
|
|
7474
|
+
return Mr(this.gid, t.gid, this.processGid);
|
|
7472
7475
|
}
|
|
7473
7476
|
[Ts](t, e) {
|
|
7474
|
-
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new et(String(t.absolute), { flags:
|
|
7477
|
+
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new et(String(t.absolute), { flags: us(t.size), mode: i, autoClose: false });
|
|
7475
7478
|
r.on("error", (a) => {
|
|
7476
|
-
r.fd &&
|
|
7479
|
+
r.fd && m.close(r.fd, () => {
|
|
7477
7480
|
}), r.write = () => true, this[O](a, t), e();
|
|
7478
7481
|
});
|
|
7479
7482
|
let n = 1, o = (a) => {
|
|
7480
7483
|
if (a) {
|
|
7481
|
-
r.fd &&
|
|
7484
|
+
r.fd && m.close(r.fd, () => {
|
|
7482
7485
|
}), this[O](a, t), e();
|
|
7483
7486
|
return;
|
|
7484
7487
|
}
|
|
7485
|
-
--n === 0 && r.fd !== void 0 &&
|
|
7486
|
-
l ? this[O](l, t) : this[
|
|
7488
|
+
--n === 0 && r.fd !== void 0 && m.close(r.fd, (l) => {
|
|
7489
|
+
l ? this[O](l, t) : this[Vt](), e();
|
|
7487
7490
|
});
|
|
7488
7491
|
};
|
|
7489
7492
|
r.on("finish", () => {
|
|
@@ -7491,12 +7494,12 @@ var Xt = class extends rt {
|
|
|
7491
7494
|
if (typeof l == "number" && t.mtime && !this.noMtime) {
|
|
7492
7495
|
n++;
|
|
7493
7496
|
let c = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
|
|
7494
|
-
|
|
7497
|
+
m.futimes(l, c, d, (y) => y ? m.utimes(a, c, d, (T) => o(T && y)) : o());
|
|
7495
7498
|
}
|
|
7496
7499
|
if (typeof l == "number" && this[ge](t)) {
|
|
7497
7500
|
n++;
|
|
7498
7501
|
let c = this[be](t), d = this[_e](t);
|
|
7499
|
-
typeof c == "number" && typeof d == "number" &&
|
|
7502
|
+
typeof c == "number" && typeof d == "number" && m.fchown(l, c, d, (y) => y ? m.chown(a, c, d, (T) => o(T && y)) : o());
|
|
7500
7503
|
}
|
|
7501
7504
|
o();
|
|
7502
7505
|
});
|
|
@@ -7513,9 +7516,9 @@ var Xt = class extends rt {
|
|
|
7513
7516
|
return;
|
|
7514
7517
|
}
|
|
7515
7518
|
let n = 1, o = () => {
|
|
7516
|
-
--n === 0 && (e(), this[
|
|
7519
|
+
--n === 0 && (e(), this[Vt](), t.resume());
|
|
7517
7520
|
};
|
|
7518
|
-
t.mtime && !this.noMtime && (n++,
|
|
7521
|
+
t.mtime && !this.noMtime && (n++, m.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[ge](t) && (n++, m.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
|
|
7519
7522
|
});
|
|
7520
7523
|
}
|
|
7521
7524
|
[Cr](t) {
|
|
@@ -7537,7 +7540,7 @@ var Xt = class extends rt {
|
|
|
7537
7540
|
let o = i.shift();
|
|
7538
7541
|
if (this.preservePaths || o === void 0) return r();
|
|
7539
7542
|
let h = R.resolve(e, o);
|
|
7540
|
-
|
|
7543
|
+
m.lstat(h, (a, l) => {
|
|
7541
7544
|
if (a) return r();
|
|
7542
7545
|
if (l?.isSymbolicLink()) return n(new St(h, R.resolve(h, i.join("/"))));
|
|
7543
7546
|
this[Re](t, h, i, r, n);
|
|
@@ -7546,11 +7549,11 @@ var Xt = class extends rt {
|
|
|
7546
7549
|
[kr]() {
|
|
7547
7550
|
this[Ri]++;
|
|
7548
7551
|
}
|
|
7549
|
-
[
|
|
7552
|
+
[Vt]() {
|
|
7550
7553
|
this[Ri]--, this[bs]();
|
|
7551
7554
|
}
|
|
7552
7555
|
[Ls](t) {
|
|
7553
|
-
this[
|
|
7556
|
+
this[Vt](), t.resume();
|
|
7554
7557
|
}
|
|
7555
7558
|
[Os](t, e) {
|
|
7556
7559
|
return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Te;
|
|
@@ -7584,7 +7587,7 @@ var Xt = class extends rt {
|
|
|
7584
7587
|
}
|
|
7585
7588
|
o();
|
|
7586
7589
|
}, o = () => {
|
|
7587
|
-
|
|
7590
|
+
m.lstat(String(t.absolute), (h, a) => {
|
|
7588
7591
|
if (a && (this.keep || this.newer && a.mtime > (t.mtime ?? a.mtime))) {
|
|
7589
7592
|
this[Ls](t), i();
|
|
7590
7593
|
return;
|
|
@@ -7593,12 +7596,12 @@ var Xt = class extends rt {
|
|
|
7593
7596
|
if (a.isDirectory()) {
|
|
7594
7597
|
if (t.type === "Directory") {
|
|
7595
7598
|
let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
|
|
7596
|
-
return l ?
|
|
7599
|
+
return l ? m.chmod(String(t.absolute), Number(t.mode), c) : c();
|
|
7597
7600
|
}
|
|
7598
|
-
if (t.absolute !== this.cwd) return
|
|
7601
|
+
if (t.absolute !== this.cwd) return m.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
7599
7602
|
}
|
|
7600
7603
|
if (t.absolute === this.cwd) return this[P](null, t, i);
|
|
7601
|
-
|
|
7604
|
+
po(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
7602
7605
|
});
|
|
7603
7606
|
};
|
|
7604
7607
|
this[Oe] ? n() : r();
|
|
@@ -7623,8 +7626,8 @@ var Xt = class extends rt {
|
|
|
7623
7626
|
}
|
|
7624
7627
|
}
|
|
7625
7628
|
[gi](t, e, i, r) {
|
|
7626
|
-
|
|
7627
|
-
n ? this[O](n, t) : (this[
|
|
7629
|
+
m[i](e, String(t.absolute), (n) => {
|
|
7630
|
+
n ? this[O](n, t) : (this[Vt](), t.resume()), r();
|
|
7628
7631
|
});
|
|
7629
7632
|
}
|
|
7630
7633
|
};
|
|
@@ -7654,41 +7657,41 @@ var xe = class extends Xt {
|
|
|
7654
7657
|
if (o) return this[O](o, t);
|
|
7655
7658
|
}
|
|
7656
7659
|
}
|
|
7657
|
-
let [e, i] = ye(() =>
|
|
7660
|
+
let [e, i] = ye(() => m.lstatSync(String(t.absolute)));
|
|
7658
7661
|
if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Ls](t);
|
|
7659
7662
|
if (e || this[Os](t, i)) return this[P](null, t);
|
|
7660
7663
|
if (i.isDirectory()) {
|
|
7661
7664
|
if (t.type === "Directory") {
|
|
7662
7665
|
let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? ye(() => {
|
|
7663
|
-
|
|
7666
|
+
m.chmodSync(String(t.absolute), Number(t.mode));
|
|
7664
7667
|
}) : [];
|
|
7665
7668
|
return this[P](h, t);
|
|
7666
7669
|
}
|
|
7667
|
-
let [n] = ye(() =>
|
|
7670
|
+
let [n] = ye(() => m.rmdirSync(String(t.absolute)));
|
|
7668
7671
|
this[P](n, t);
|
|
7669
7672
|
}
|
|
7670
|
-
let [r] = t.absolute === this.cwd ? [] : ye(() =>
|
|
7673
|
+
let [r] = t.absolute === this.cwd ? [] : ye(() => Eo(String(t.absolute)));
|
|
7671
7674
|
this[P](r, t);
|
|
7672
7675
|
}
|
|
7673
7676
|
[Ts](t, e) {
|
|
7674
7677
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
|
|
7675
7678
|
let a;
|
|
7676
7679
|
try {
|
|
7677
|
-
|
|
7680
|
+
m.closeSync(n);
|
|
7678
7681
|
} catch (l) {
|
|
7679
7682
|
a = l;
|
|
7680
7683
|
}
|
|
7681
7684
|
(h || a) && this[O](h || a, t), e();
|
|
7682
7685
|
}, n;
|
|
7683
7686
|
try {
|
|
7684
|
-
n =
|
|
7687
|
+
n = m.openSync(String(t.absolute), us(t.size), i);
|
|
7685
7688
|
} catch (h) {
|
|
7686
7689
|
return r(h);
|
|
7687
7690
|
}
|
|
7688
7691
|
let o = this.transform && this.transform(t) || t;
|
|
7689
7692
|
o !== t && (o.on("error", (h) => this[O](h, t)), t.pipe(o)), o.on("data", (h) => {
|
|
7690
7693
|
try {
|
|
7691
|
-
|
|
7694
|
+
m.writeSync(n, h, 0, h.length);
|
|
7692
7695
|
} catch (a) {
|
|
7693
7696
|
r(a);
|
|
7694
7697
|
}
|
|
@@ -7697,10 +7700,10 @@ var xe = class extends Xt {
|
|
|
7697
7700
|
if (t.mtime && !this.noMtime) {
|
|
7698
7701
|
let a = t.atime || /* @__PURE__ */ new Date(), l = t.mtime;
|
|
7699
7702
|
try {
|
|
7700
|
-
|
|
7703
|
+
m.futimesSync(n, a, l);
|
|
7701
7704
|
} catch (c) {
|
|
7702
7705
|
try {
|
|
7703
|
-
|
|
7706
|
+
m.utimesSync(String(t.absolute), a, l);
|
|
7704
7707
|
} catch {
|
|
7705
7708
|
h = c;
|
|
7706
7709
|
}
|
|
@@ -7709,10 +7712,10 @@ var xe = class extends Xt {
|
|
|
7709
7712
|
if (this[ge](t)) {
|
|
7710
7713
|
let a = this[be](t), l = this[_e](t);
|
|
7711
7714
|
try {
|
|
7712
|
-
|
|
7715
|
+
m.fchownSync(n, Number(a), Number(l));
|
|
7713
7716
|
} catch (c) {
|
|
7714
7717
|
try {
|
|
7715
|
-
|
|
7718
|
+
m.chownSync(String(t.absolute), Number(a), Number(l));
|
|
7716
7719
|
} catch {
|
|
7717
7720
|
h = h || c;
|
|
7718
7721
|
}
|
|
@@ -7728,11 +7731,11 @@ var xe = class extends Xt {
|
|
|
7728
7731
|
return;
|
|
7729
7732
|
}
|
|
7730
7733
|
if (t.mtime && !this.noMtime) try {
|
|
7731
|
-
|
|
7734
|
+
m.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
|
|
7732
7735
|
} catch {
|
|
7733
7736
|
}
|
|
7734
7737
|
if (this[ge](t)) try {
|
|
7735
|
-
|
|
7738
|
+
m.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
|
|
7736
7739
|
} catch {
|
|
7737
7740
|
}
|
|
7738
7741
|
e(), t.resume();
|
|
@@ -7749,7 +7752,7 @@ var xe = class extends Xt {
|
|
|
7749
7752
|
let o = e;
|
|
7750
7753
|
for (let h of i) {
|
|
7751
7754
|
o = R.resolve(o, h);
|
|
7752
|
-
let [a, l] = ye(() =>
|
|
7755
|
+
let [a, l] = ye(() => m.lstatSync(o));
|
|
7753
7756
|
if (a) return r();
|
|
7754
7757
|
if (l.isSymbolicLink()) return n(new St(o, R.resolve(e, i.join("/"))));
|
|
7755
7758
|
}
|
|
@@ -7758,17 +7761,17 @@ var xe = class extends Xt {
|
|
|
7758
7761
|
[gi](t, e, i, r) {
|
|
7759
7762
|
let n = `${i}Sync`;
|
|
7760
7763
|
try {
|
|
7761
|
-
|
|
7764
|
+
m[n](e, String(t.absolute)), r(), t.resume();
|
|
7762
7765
|
} catch (o) {
|
|
7763
7766
|
return this[O](o, t);
|
|
7764
7767
|
}
|
|
7765
7768
|
}
|
|
7766
7769
|
};
|
|
7767
|
-
var
|
|
7770
|
+
var wo = (s3) => {
|
|
7768
7771
|
let t = new xe(s3), e = s3.file, i = Br.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
|
|
7769
7772
|
new Be(e, { readSize: r, size: i.size }).pipe(t);
|
|
7770
7773
|
};
|
|
7771
|
-
var
|
|
7774
|
+
var So = (s3, t) => {
|
|
7772
7775
|
let e = new Xt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
7773
7776
|
return new Promise((o, h) => {
|
|
7774
7777
|
e.on("error", h), e.on("close", o), Br.stat(r, (a, l) => {
|
|
@@ -7780,22 +7783,22 @@ var wo = (s3, t) => {
|
|
|
7780
7783
|
});
|
|
7781
7784
|
});
|
|
7782
7785
|
};
|
|
7783
|
-
var
|
|
7786
|
+
var yo = K(wo, So, (s3) => new xe(s3), (s3) => new Xt(s3), (s3, t) => {
|
|
7784
7787
|
t?.length && Qi(s3, t);
|
|
7785
7788
|
});
|
|
7786
|
-
var
|
|
7789
|
+
var Ro = (s3, t) => {
|
|
7787
7790
|
let e = new kt(s3), i = true, r, n;
|
|
7788
7791
|
try {
|
|
7789
7792
|
try {
|
|
7790
|
-
r =
|
|
7793
|
+
r = M.openSync(s3.file, "r+");
|
|
7791
7794
|
} catch (a) {
|
|
7792
|
-
if (a?.code === "ENOENT") r =
|
|
7795
|
+
if (a?.code === "ENOENT") r = M.openSync(s3.file, "w+");
|
|
7793
7796
|
else throw a;
|
|
7794
7797
|
}
|
|
7795
|
-
let o =
|
|
7798
|
+
let o = M.fstatSync(r), h = Buffer.alloc(512);
|
|
7796
7799
|
t: for (n = 0; n < o.size; n += 512) {
|
|
7797
7800
|
for (let c = 0, d = 0; c < 512; c += d) {
|
|
7798
|
-
if (d =
|
|
7801
|
+
if (d = M.readSync(r, h, c, h.length - c, n + c), n === 0 && h[0] === 31 && h[1] === 139) throw new Error("cannot append to compressed archives");
|
|
7799
7802
|
if (!d) break t;
|
|
7800
7803
|
}
|
|
7801
7804
|
let a = new F(h);
|
|
@@ -7804,65 +7807,65 @@ var yo = (s3, t) => {
|
|
|
7804
7807
|
if (n + l + 512 > o.size) break;
|
|
7805
7808
|
n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
|
|
7806
7809
|
}
|
|
7807
|
-
i = false,
|
|
7810
|
+
i = false, go(s3, e, n, r, t);
|
|
7808
7811
|
} finally {
|
|
7809
7812
|
if (i) try {
|
|
7810
|
-
|
|
7813
|
+
M.closeSync(r);
|
|
7811
7814
|
} catch {
|
|
7812
7815
|
}
|
|
7813
7816
|
}
|
|
7814
7817
|
};
|
|
7815
|
-
var
|
|
7818
|
+
var go = (s3, t, e, i, r) => {
|
|
7816
7819
|
let n = new Wt(s3.file, { fd: i, start: e });
|
|
7817
|
-
t.pipe(n),
|
|
7820
|
+
t.pipe(n), _o(t, r);
|
|
7818
7821
|
};
|
|
7819
|
-
var
|
|
7822
|
+
var bo = (s3, t) => {
|
|
7820
7823
|
t = Array.from(t);
|
|
7821
7824
|
let e = new wt(s3), i = (n, o, h) => {
|
|
7822
7825
|
let a = (T, D) => {
|
|
7823
|
-
T ?
|
|
7826
|
+
T ? M.close(n, (E) => h(T)) : h(null, D);
|
|
7824
7827
|
}, l = 0;
|
|
7825
7828
|
if (o === 0) return a(null, 0);
|
|
7826
7829
|
let c = 0, d = Buffer.alloc(512), y = (T, D) => {
|
|
7827
7830
|
if (T || D === void 0) return a(T);
|
|
7828
|
-
if (c += D, c < 512 && D) return
|
|
7831
|
+
if (c += D, c < 512 && D) return M.read(n, d, c, d.length - c, l + c, y);
|
|
7829
7832
|
if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
|
|
7830
7833
|
if (c < 512) return a(null, l);
|
|
7831
7834
|
let E = new F(d);
|
|
7832
7835
|
if (!E.cksumValid) return a(null, l);
|
|
7833
7836
|
let x = 512 * Math.ceil((E.size ?? 0) / 512);
|
|
7834
7837
|
if (l + x + 512 > o || (l += x + 512, l >= o)) return a(null, l);
|
|
7835
|
-
s3.mtimeCache && E.mtime && s3.mtimeCache.set(String(E.path), E.mtime), c = 0,
|
|
7838
|
+
s3.mtimeCache && E.mtime && s3.mtimeCache.set(String(E.path), E.mtime), c = 0, M.read(n, d, 0, 512, l, y);
|
|
7836
7839
|
};
|
|
7837
|
-
|
|
7840
|
+
M.read(n, d, 0, 512, l, y);
|
|
7838
7841
|
};
|
|
7839
7842
|
return new Promise((n, o) => {
|
|
7840
7843
|
e.on("error", o);
|
|
7841
7844
|
let h = "r+", a = (l, c) => {
|
|
7842
|
-
if (l && l.code === "ENOENT" && h === "r+") return h = "w+",
|
|
7845
|
+
if (l && l.code === "ENOENT" && h === "r+") return h = "w+", M.open(s3.file, h, a);
|
|
7843
7846
|
if (l || !c) return o(l);
|
|
7844
|
-
|
|
7845
|
-
if (d) return
|
|
7847
|
+
M.fstat(c, (d, y) => {
|
|
7848
|
+
if (d) return M.close(c, () => o(d));
|
|
7846
7849
|
i(c, y.size, (T, D) => {
|
|
7847
7850
|
if (T) return o(T);
|
|
7848
7851
|
let E = new et(s3.file, { fd: c, start: D });
|
|
7849
|
-
e.pipe(E), E.on("error", o), E.on("close", n),
|
|
7852
|
+
e.pipe(E), E.on("error", o), E.on("close", n), Oo(e, t);
|
|
7850
7853
|
});
|
|
7851
7854
|
});
|
|
7852
7855
|
};
|
|
7853
|
-
|
|
7856
|
+
M.open(s3.file, h, a);
|
|
7854
7857
|
});
|
|
7855
7858
|
};
|
|
7856
|
-
var
|
|
7859
|
+
var _o = (s3, t) => {
|
|
7857
7860
|
t.forEach((e) => {
|
|
7858
7861
|
e.charAt(0) === "@" ? Ct({ file: Pr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
7859
7862
|
}), s3.end();
|
|
7860
7863
|
};
|
|
7861
|
-
var
|
|
7864
|
+
var Oo = async (s3, t) => {
|
|
7862
7865
|
for (let e of t) e.charAt(0) === "@" ? await Ct({ file: Pr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
7863
7866
|
s3.end();
|
|
7864
7867
|
};
|
|
7865
|
-
var
|
|
7868
|
+
var Mt = K(Ro, bo, () => {
|
|
7866
7869
|
throw new TypeError("file is required");
|
|
7867
7870
|
}, () => {
|
|
7868
7871
|
throw new TypeError("file is required");
|
|
@@ -7871,10 +7874,10 @@ var vt = K(yo, go, () => {
|
|
|
7871
7874
|
if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
|
|
7872
7875
|
if (!t?.length) throw new TypeError("no paths specified to add/replace");
|
|
7873
7876
|
});
|
|
7874
|
-
var
|
|
7875
|
-
|
|
7877
|
+
var To = K(Mt.syncFile, Mt.asyncFile, Mt.syncNoFile, Mt.asyncNoFile, (s3, t = []) => {
|
|
7878
|
+
Mt.validate?.(s3, t), xo(s3);
|
|
7876
7879
|
});
|
|
7877
|
-
var
|
|
7880
|
+
var xo = (s3) => {
|
|
7878
7881
|
let t = s3.filter;
|
|
7879
7882
|
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));
|
|
7880
7883
|
};
|