npm-pkg-lint 5.4.2 → 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 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 Fn, parse as kn } from "path";
4922
- import { EventEmitter as Dn } from "events";
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 mi from "fs";
4929
+ import ui from "fs";
4930
4930
  import X from "fs";
4931
4931
  import js from "path";
4932
- import { win32 as Pn } from "node:path";
4932
+ import { win32 as zn } from "node:path";
4933
4933
  import ar from "path";
4934
4934
  import Br from "node:fs";
4935
- import co from "node:assert";
4936
- import { randomBytes as Mr } from "node:crypto";
4937
- import u from "node:fs";
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 ro from "node:fs/promises";
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 v from "node:fs";
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 Mt = /* @__PURE__ */ Symbol("decoder");
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 Vr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
4991
- var $r = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
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
- [Mt];
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[Mt] = 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] });
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 ($r(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
5088
- else if (Vr(t)) t = Buffer.from(t);
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[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z] && (t = this[Mt].write(t)), this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[bi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[g]);
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[Mt]) {
5218
- let e = this[Mt].end();
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 m = /* @__PURE__ */ Symbol("_fd");
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 vi = /* @__PURE__ */ Symbol("_makeBuf");
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 ve = /* @__PURE__ */ Symbol("_write");
5316
+ var Me = /* @__PURE__ */ Symbol("_write");
5317
5317
  var gt = /* @__PURE__ */ Symbol("_writing");
5318
- var Me = /* @__PURE__ */ Symbol("_defaultFlag");
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
- [m];
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[m] = 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[m] == "number" ? this[zt]() : this[at]();
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[m];
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[m] = e, this.emit("open", e), this[zt]());
5349
+ t ? this[Ut](t) : (this[u] = e, this.emit("open", e), this[zt]());
5350
5350
  }
5351
- [vi]() {
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[vi]();
5357
+ let t = this[Mi]();
5358
5358
  if (t.length === 0) return process.nextTick(() => this[Ii](null, 0, t));
5359
- I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ii](e, i, r));
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[m] == "number") {
5367
- let t = this[m];
5368
- this[m] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
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[m] == "number" && this[zt](), false;
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[vi](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
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[m] == "number") {
5419
- let t = this[m];
5420
- this[m] = void 0, I.closeSync(t), this.emit("close");
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
- [m];
5436
- [Me];
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[m] = 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;
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[Me] = e.flags === void 0, this[tt2] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[at]();
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[m];
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[Me] && this[tt2] === "r+" && t && t.code === "ENOENT" ? (this[tt2] = "w", this[at]()) : t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[gt] || this[Ai]());
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[m] == "number" && this[Pt](null, 0), 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[m] === void 0 || this[gt] || this[Y].length ? (this[Y].push(t), this[ke] = true, false) : (this[gt] = true, this[ve](t), true);
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
- [ve](t) {
5474
- I.write(this[m], t, 0, t.length, this[ot], (e, i) => this[Pt](e, i));
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[ve](this[Y].pop());
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[m], t, this[ot], (e, i) => this[Pt](e, i));
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[m] == "number") {
5489
- let t = this[m];
5490
- this[m] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
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[Me] && this[tt2] === "r+") try {
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[m] == "number") {
5508
- let t = this[m];
5509
- this[m] = void 0, I.closeSync(t), this.emit("close");
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
- [ve](t) {
5512
+ [Me](t) {
5513
5513
  let e = true;
5514
5514
  try {
5515
- this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[ot])), e = false;
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 vs = (s3) => !!s3.sync && !s3.file;
5528
- var Ms = (s3) => !s3.sync && !s3.file;
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 (vs(a)) {
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 (Ms(a)) {
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 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 }, sn));
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 || M.Z_NO_FLUSH, t.finishFlush = t.finishFlush || M.Z_FINISH, t.fullFlushFlag = M.Z_FULL_FLUSH, super(t, e), this.#t = t.level, this.#i = t.strategy;
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(M.Z_SYNC_FLUSH), zi(this.handle, "zlib binding closed");
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 || M.BROTLI_OPERATION_PROCESS, t.finishFlush = t.finishFlush || M.BROTLI_OPERATION_FINISH, t.fullFlushFlag = M.BROTLI_OPERATION_FLUSH, super(t, e);
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 || M.ZSTD_e_continue, t.finishFlush = t.finishFlush || M.ZSTD_e_end, t.fullFlushFlag = M.ZSTD_e_flush, super(t, e);
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: () => Ve, isCode: () => ne, isName: () => dn, name: () => oe, normalFsTypes: () => Ui });
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) => Ve.has(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 Ve = new Map(Array.from(oe).map((s3) => [s3[1], s3[0]]));
5774
- var un = (s3) => s3 === void 0 || s3 < 0 ? void 0 : s3;
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 = un(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) {
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 = mn(this.path || "", i), n = r[0], o = r[1];
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(Ve.get(t));
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 mn = (s3, t) => {
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(On(Tn(t), e), i);
5907
+ return new s(Tn(xn(t), e), i);
5907
5908
  }
5908
5909
  };
5909
- var On = (s3, t) => t ? Object.assign({}, t, s3) : s3;
5910
- var Tn = (s3) => s3.replace(/\n$/, "").split(`
5911
- `).reduce(xn, /* @__PURE__ */ Object.create(null));
5912
- var xn = (s3, t) => {
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
- h >= 0 && (s3[n] = h);
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 Ln = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
5950
- var f = Ln !== "win32" ? (s3) => String(s3) : (s3) => String(s3).replaceAll(/\\/g, "/");
5951
- var $e = class extends A {
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 Nn = 1024 * 1024;
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 An = Math.max(Xi.length, qi.length);
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 V = /* @__PURE__ */ Symbol("extendedHeader");
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 ut = /* @__PURE__ */ Symbol("ended");
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 Vs = /* @__PURE__ */ Symbol("consumeHeader");
6044
+ var $s = /* @__PURE__ */ Symbol("consumeHeader");
6042
6045
  var ae = /* @__PURE__ */ Symbol("consuming");
6043
- var Vi = /* @__PURE__ */ Symbol("bufferConcat");
6046
+ var $i = /* @__PURE__ */ Symbol("bufferConcat");
6044
6047
  var Qe = /* @__PURE__ */ Symbol("maybeEnd");
6045
6048
  var Yt = /* @__PURE__ */ Symbol("writing");
6046
- var $ = /* @__PURE__ */ Symbol("aborted");
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 $s = /* @__PURE__ */ Symbol("closeStream");
6052
- var In = 1e3;
6054
+ var Vs = /* @__PURE__ */ Symbol("closeStream");
6055
+ var Cn = 1e3;
6053
6056
  var le = /* @__PURE__ */ Symbol("compressedBytesRead");
6054
- var $i = /* @__PURE__ */ Symbol("decompressedBytesRead");
6057
+ var Vi = /* @__PURE__ */ Symbol("decompressedBytesRead");
6055
6058
  var Xs = /* @__PURE__ */ Symbol("checkDecompressionRatio");
6056
- var Cn = () => true;
6057
- var rt = class extends Dn {
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
- [V];
6076
+ [$];
6074
6077
  [he];
6075
- [ut] = false;
6078
+ [mt] = false;
6076
6079
  [w];
6077
- [$] = false;
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
- [$i] = 0;
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 : In, this.maxMetaEntrySize = t.maxMetaEntrySize || Nn, this.filter = typeof t.filter == "function" ? t.filter : Cn;
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[$s]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
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
- [Vs](t, e) {
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[V], this[he]);
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 $e(i, this[V], this[he]);
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[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[it] ? this[st].push(n) : (this[st].push(n), this[Zi]())));
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
- [$s]() {
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[V] = ft.parse(this[dt], this[V], false);
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[V] ?? /* @__PURE__ */ Object.create(null);
6173
- this[V] = e, e.path = this[dt].replace(/\0.*/, "");
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[V] || /* @__PURE__ */ Object.create(null);
6178
- this[V] = e, e.linkpath = this[dt].replace(/\0.*/, "");
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[$] = true, this.emit("abort", t), this.warn("TAR_ABORT", t, { recoverable: false });
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[$i] += t.length;
6196
- let e = this[$i] / this[le];
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[$]) return i?.(), false;
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 < An) return this[p] = t, i?.(), true;
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[ut]) this.brotli = true;
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[ut];
6222
- this[ut] = false, this[w] = this[w] === void 0 ? new Ue({}) : o ? new Ke({}) : new Ge({}), this[w].on("data", (c) => {
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[$] || this.abort(c);
6228
+ this[V] || this.abort(c);
6226
6229
  }), this[w].on("end", () => {
6227
- this[ut] = true, this[Xe]();
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
- [Vi](t) {
6238
- t && !this[$] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
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[ut] && !this[Yi] && !this[$] && !this[ae]) {
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[Vi](t);
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[Vi](t);
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[$] && !this[ti]; ) {
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[ut]) && this[Qe]();
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[$] && !this[ti]; ) switch (this[B]) {
6273
+ for (; e + 512 <= i && !this[V] && !this[ti]; ) switch (this[B]) {
6271
6274
  case "begin":
6272
6275
  case "header":
6273
- this[Vs](t, e), e += 512;
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[$] || (this[w] ? (t && (this[le] += t.length, this[w].write(t)), this[w].end()) : (this[ut] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Qe]())), 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 mt = (s3) => {
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) => [mt(o), true])), i = s3.filter, r = 100, n = (o, h = "", a = 0) => {
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 || kn(o).root || ".", c;
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(Fn(o), l, a + 1);
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(mt(o)) : (o) => n(mt(o));
6316
+ s3.filter = i ? (o, h) => i(o, h) && n(ut(o)) : (o) => n(ut(o));
6314
6317
  };
6315
- var Mn = (s3) => {
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 Bn = (s3, t) => {
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(Mn, Bn, (s3) => new rt(s3), (s3) => new rt(s3), (s3, t) => {
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: zn, parse: qs } = Pn;
6358
+ var { isAbsolute: Un, parse: qs } = zn;
6356
6359
  var ce = (s3) => {
6357
6360
  let t = "", e = qs(s3);
6358
- for (; zn(s3) || e.root; ) {
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 Un = new Map(ei.map((s3, t) => [s3, ji[t]]));
6367
- var Hn = new Map(ji.map((s3, t) => [s3, ei[t]]));
6368
- var ts = (s3) => ei.reduce((t, e) => t.split(e).join(Un.get(e)), s3);
6369
- var Qs = (s3) => ji.reduce((t, e) => t.split(e).join(Hn.get(e)), s3);
6370
- var rr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
6371
- var Wn = 16 * 1024 * 1024;
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 || Wn, 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);
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 = Gn(t), this.emit("stat", t), this[tr]();
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 Gn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
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++) Yn(this, t[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++) Kn(this, t[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 = Zn(this, r, o);
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 Zn(s3, t, e) {
6797
- let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
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.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
6804
+ s3.tail = new me(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
6805
6805
  }
6806
- var ue = class {
6806
+ function $n(s3, t) {
6807
+ s3.head = new me(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
6808
+ }
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 me = /* @__PURE__ */ Symbol("ended");
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 us = /* @__PURE__ */ Symbol("readdir");
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 ui = /* @__PURE__ */ Symbol("writeEntryClass");
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
- [ui];
6875
+ [mi];
6873
6876
  onWriteEntry;
6874
6877
  [W];
6875
6878
  [pe] = /* @__PURE__ */ new Map();
6876
6879
  [G] = 0;
6877
6880
  [Ee] = false;
6878
- [me] = false;
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[ui] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
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[me] = false;
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[me] = true, this[Ft](), i && i(), 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[me]) throw new Error("write after end");
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
- mi[e](t.absolute, (i, r) => {
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
- [us](t) {
6931
- t.pending = true, this[G] += 1, mi.readdir(t.absolute, (e, i) => {
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[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(nr) : (super.write(nr), super.end()));
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[us](t), !t.readdir) return;
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[ui](t.path, this[cs](t)).on("end", () => this[ls](t)).on("error", (i) => this.emit("error", i));
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[ui] = ni;
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, mi[e](t.absolute));
7035
+ this[li](t, ui[e](t.absolute));
7033
7036
  }
7034
- [us](t) {
7035
- this[fi](t, mi.readdirSync(t.absolute));
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 $n = (s3, t) => {
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 Xn = (s3, t) => {
7076
+ var qn = (s3, t) => {
7074
7077
  let e = new kt(s3);
7075
7078
  return fr(e, t), e;
7076
7079
  };
7077
- var qn = (s3, t) => {
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 Qn = K(Vn, $n, Xn, qn, (s3, t) => {
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 Jn = process.env.__FAKE_PLATFORM__ || process.platform;
7085
- var Er = Jn === "win32";
7086
- var { O_CREAT: wr, O_NOFOLLOW: ur, O_TRUNC: Sr, O_WRONLY: yr } = pr.constants;
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 jn = Er && !!Rr;
7089
- var to = 512 * 1024;
7090
- var eo = Rr | Sr | wr | yr;
7091
- var mr = !Er && typeof ur == "number" ? ur | Sr | wr | yr : null;
7092
- var ms = mr !== null ? () => mr : jn ? (s3) => s3 < to ? eo : "w" : () => "w";
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 io = (s3, t, e, i, r) => {
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) io(s3, l, t, e, a);
7132
+ for (let l of n) so(s3, l, t, e, a);
7130
7133
  });
7131
7134
  };
7132
- var so = (s3, t, e, i) => {
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) so(s3, r, t, e);
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 no = (s3, t) => {
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 no(s3, y);
7182
- if (l) return ro.mkdir(s3, { mode: r, recursive: true }).then((E) => y(null, E ?? void 0), y);
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 oo = (s3) => {
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 oo(c), d();
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 Vt = /* @__PURE__ */ new Set();
7243
+ var $t = /* @__PURE__ */ new Set();
7241
7244
  var Tr = (s3) => {
7242
- Vt.has(s3) ? Vt.delete(s3) : ys[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), Vt.add(s3);
7243
- let t = ys[s3], e = Vt.size - Or;
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 Vt) if (Vt.delete(i), delete ys[i], --e <= 0) break;
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 ho = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
7250
- var ao = ho === "win32";
7251
- var lo = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
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 = ao ? ["win32 parallelization disabled"] : t.map((r) => mt(xr(Tr(r))));
7261
- let i = new Set(t.map((r) => lo(r)).reduce((r, n) => r.concat(n)));
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 $t = /* @__PURE__ */ Symbol("unpend");
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 fo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
7347
- var Te = fo === "win32";
7349
+ var mo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
7350
+ var Te = mo === "win32";
7348
7351
  var uo = 1024;
7349
- var mo = (s3, t) => {
7350
- if (!Te) return u.unlink(s3, t);
7351
- let e = s3 + ".DELETE." + Mr(16).toString("hex");
7352
- u.rename(s3, e, (i) => {
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
- u.unlink(e, t);
7357
+ m.unlink(e, t);
7355
7358
  });
7356
7359
  };
7357
- var po = (s3) => {
7358
- if (!Te) return u.unlinkSync(s3);
7359
- let t = s3 + ".DELETE." + Mr(16).toString("hex");
7360
- u.renameSync(s3, t), u.unlinkSync(t);
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 vr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
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 (co.equal(typeof t.absolute, "string"), t.type) {
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[$t](), e.resume());
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 vr(this.uid, t.uid, this.processUid);
7471
+ return Mr(this.uid, t.uid, this.processUid);
7469
7472
  }
7470
7473
  [_e](t) {
7471
- return vr(this.gid, t.gid, this.processGid);
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: ms(t.size), mode: i, autoClose: false });
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 && u.close(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 && u.close(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 && u.close(r.fd, (l) => {
7486
- l ? this[O](l, t) : this[$t](), e();
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
- u.futimes(l, c, d, (y) => y ? u.utimes(a, c, d, (T) => o(T && y)) : o());
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" && u.fchown(l, c, d, (y) => y ? u.chown(a, c, d, (T) => o(T && y)) : o());
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[$t](), t.resume());
7519
+ --n === 0 && (e(), this[Vt](), t.resume());
7517
7520
  };
7518
- t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[ge](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
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
- u.lstat(h, (a, l) => {
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
- [$t]() {
7552
+ [Vt]() {
7550
7553
  this[Ri]--, this[bs]();
7551
7554
  }
7552
7555
  [Ls](t) {
7553
- this[$t](), t.resume();
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
- u.lstat(String(t.absolute), (h, a) => {
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 ? u.chmod(String(t.absolute), Number(t.mode), c) : c();
7599
+ return l ? m.chmod(String(t.absolute), Number(t.mode), c) : c();
7597
7600
  }
7598
- if (t.absolute !== this.cwd) return u.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
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
- mo(String(t.absolute), (l) => this[P](l ?? null, t, i));
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
- u[i](e, String(t.absolute), (n) => {
7627
- n ? this[O](n, t) : (this[$t](), t.resume()), r();
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(() => u.lstatSync(String(t.absolute)));
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
- u.chmodSync(String(t.absolute), Number(t.mode));
7666
+ m.chmodSync(String(t.absolute), Number(t.mode));
7664
7667
  }) : [];
7665
7668
  return this[P](h, t);
7666
7669
  }
7667
- let [n] = ye(() => u.rmdirSync(String(t.absolute)));
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(() => po(String(t.absolute)));
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
- u.closeSync(n);
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 = u.openSync(String(t.absolute), ms(t.size), i);
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
- u.writeSync(n, h, 0, h.length);
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
- u.futimesSync(n, a, l);
7703
+ m.futimesSync(n, a, l);
7701
7704
  } catch (c) {
7702
7705
  try {
7703
- u.utimesSync(String(t.absolute), a, l);
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
- u.fchownSync(n, Number(a), Number(l));
7715
+ m.fchownSync(n, Number(a), Number(l));
7713
7716
  } catch (c) {
7714
7717
  try {
7715
- u.chownSync(String(t.absolute), Number(a), Number(l));
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
- u.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
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
- u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
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(() => u.lstatSync(o));
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
- u[n](e, String(t.absolute)), r(), t.resume();
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 Eo = (s3) => {
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 wo = (s3, t) => {
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 So = K(Eo, wo, (s3) => new xe(s3), (s3) => new Xt(s3), (s3, t) => {
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 yo = (s3, t) => {
7789
+ var Ro = (s3, t) => {
7787
7790
  let e = new kt(s3), i = true, r, n;
7788
7791
  try {
7789
7792
  try {
7790
- r = v.openSync(s3.file, "r+");
7793
+ r = M.openSync(s3.file, "r+");
7791
7794
  } catch (a) {
7792
- if (a?.code === "ENOENT") r = v.openSync(s3.file, "w+");
7795
+ if (a?.code === "ENOENT") r = M.openSync(s3.file, "w+");
7793
7796
  else throw a;
7794
7797
  }
7795
- let o = v.fstatSync(r), h = Buffer.alloc(512);
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 = v.readSync(r, h, c, h.length - c, n + c), n === 0 && h[0] === 31 && h[1] === 139) throw new Error("cannot append to compressed archives");
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, Ro(s3, e, n, r, t);
7810
+ i = false, go(s3, e, n, r, t);
7808
7811
  } finally {
7809
7812
  if (i) try {
7810
- v.closeSync(r);
7813
+ M.closeSync(r);
7811
7814
  } catch {
7812
7815
  }
7813
7816
  }
7814
7817
  };
7815
- var Ro = (s3, t, e, i, r) => {
7818
+ var go = (s3, t, e, i, r) => {
7816
7819
  let n = new Wt(s3.file, { fd: i, start: e });
7817
- t.pipe(n), bo(t, r);
7820
+ t.pipe(n), _o(t, r);
7818
7821
  };
7819
- var go = (s3, t) => {
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 ? v.close(n, (E) => h(T)) : h(null, D);
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 v.read(n, d, c, d.length - c, l + c, y);
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, v.read(n, d, 0, 512, l, y);
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
- v.read(n, d, 0, 512, l, y);
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+", v.open(s3.file, h, a);
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
- v.fstat(c, (d, y) => {
7845
- if (d) return v.close(c, () => o(d));
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), _o(e, t);
7852
+ e.pipe(E), E.on("error", o), E.on("close", n), Oo(e, t);
7850
7853
  });
7851
7854
  });
7852
7855
  };
7853
- v.open(s3.file, h, a);
7856
+ M.open(s3.file, h, a);
7854
7857
  });
7855
7858
  };
7856
- var bo = (s3, t) => {
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 _o = async (s3, t) => {
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 vt = K(yo, go, () => {
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 Oo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
7875
- vt.validate?.(s3, t), To(s3);
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 To = (s3) => {
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
  };
@@ -8153,116 +8156,167 @@ import process3 from "node:process";
8153
8156
  import { stripVTControlCharacters } from "node:util";
8154
8157
  var getContext = (raw) => ({
8155
8158
  start: process3.hrtime.bigint(),
8156
- command: raw.map((part) => getCommandPart(stripVTControlCharacters(part))).join(" "),
8159
+ command: raw.map((part) => getCommandPart(part)).join(" "),
8157
8160
  state: {
8158
8161
  stdout: "",
8159
8162
  stderr: "",
8160
8163
  output: "",
8161
- isIterating: {},
8162
- nonIterable: [false, false]
8164
+ isIterating: { __proto__: null }
8163
8165
  }
8164
8166
  });
8165
- var getCommandPart = (part) => /[^\w./-]/.test(part) ? `'${part.replaceAll("'", "'\\''")}'` : part;
8167
+ var namedControlCharacters = /* @__PURE__ */ new Map([[9, "t"], [10, "n"], [13, "r"]]);
8168
+ var isControlCharacter = (codePoint) => codePoint < 32 || codePoint >= 127 && codePoint <= 159;
8169
+ var escapeControlCharacter = (codePoint) => "\\" + (namedControlCharacters.get(codePoint) ?? `x${codePoint.toString(16).padStart(2, "0")}`);
8170
+ var getCommandPart = (part) => {
8171
+ let escaped = "";
8172
+ for (const character of stripVTControlCharacters(part)) {
8173
+ const codePoint = character.codePointAt(0);
8174
+ escaped += isControlCharacter(codePoint) ? escapeControlCharacter(codePoint) : character;
8175
+ }
8176
+ return new RegExp("[^\\w\\-.\\/]", "v").test(escaped) ? `'${escaped.replaceAll("'", "'\\''")}'` : escaped;
8177
+ };
8166
8178
 
8167
8179
  // node_modules/nano-spawn/source/options.js
8168
8180
  import path7 from "node:path";
8169
8181
  import { fileURLToPath as fileURLToPath3 } from "node:url";
8170
8182
  import process4 from "node:process";
8171
8183
  var getOptions = ({
8184
+ input,
8172
8185
  stdin,
8173
8186
  stdout,
8174
8187
  stderr,
8175
- stdio = [stdin, stdout, stderr],
8188
+ stdio,
8176
8189
  env: envOption,
8177
8190
  preferLocal,
8178
8191
  cwd: cwdOption = ".",
8179
8192
  ...options
8180
8193
  }) => {
8194
+ for (const [optionName, value] of [["cwd", cwdOption], ["stdio", stdio]]) {
8195
+ if (value === null) {
8196
+ throw new TypeError(`The \`${optionName}\` option must not be \`null\`. Use \`undefined\` instead.`);
8197
+ }
8198
+ }
8199
+ validateStdin("stdin", stdin);
8200
+ if (input !== void 0 && (stdin !== void 0 || stdio !== void 0)) {
8201
+ throw new TypeError("The `input` option cannot be used with the `stdin` or `stdio` options.");
8202
+ }
8181
8203
  const cwd = cwdOption instanceof URL ? fileURLToPath3(cwdOption) : path7.resolve(cwdOption);
8182
- const env = envOption ? { ...process4.env, ...envOption } : void 0;
8183
- const input = stdio[0]?.string;
8204
+ const env = { __proto__: null, ...process4.env, ...envOption };
8205
+ const stdioOption = Array.isArray(stdio) ? [...stdio] : stdio ?? [stdin, stdout, stderr];
8206
+ if (Array.isArray(stdio)) {
8207
+ validateStdin("stdio", stdioOption[0]);
8208
+ }
8184
8209
  return {
8210
+ __proto__: null,
8185
8211
  ...options,
8186
8212
  input,
8187
- stdio: input === void 0 ? stdio : ["pipe", ...stdio.slice(1)],
8188
- env: preferLocal ? addLocalPath(env ?? process4.env, cwd) : env,
8213
+ stdio: stdioOption,
8214
+ env: preferLocal ? addLocalPath(env, cwd) : env,
8189
8215
  cwd
8190
8216
  };
8191
8217
  };
8218
+ var stdioDirectives = /* @__PURE__ */ new Set(["pipe", "inherit", "ignore", "ipc", "overlapped"]);
8219
+ var validateStdin = (optionName, value) => {
8220
+ if (typeof value === "string" && !stdioDirectives.has(value)) {
8221
+ throw new TypeError(`The \`${optionName}\` option must be "pipe", "inherit", "ignore", "ipc" or "overlapped", a \`Stream\`, or a file descriptor. To pass input as a string, use the \`input\` option instead.`);
8222
+ }
8223
+ if (typeof value === "object" && value !== null && "string" in value) {
8224
+ throw new TypeError(`The \`${optionName}\` option does not accept \`{string: ...}\` anymore. Use the \`input\` option instead.`);
8225
+ }
8226
+ };
8192
8227
  var addLocalPath = ({ Path = "", PATH = Path, ...env }, cwd) => {
8193
- const pathParts = PATH.split(path7.delimiter);
8194
- const localPaths = getLocalPaths([], path7.resolve(cwd)).map((localPath) => path7.join(localPath, "node_modules/.bin")).filter((localPath) => !pathParts.includes(localPath));
8195
- return { ...env, PATH: [...localPaths, PATH].filter(Boolean).join(path7.delimiter) };
8228
+ const pathParts = new Set(PATH.split(path7.delimiter));
8229
+ const localPaths = getLocalPaths([], path7.resolve(cwd)).map((localPath) => path7.join(localPath, "node_modules/.bin")).filter((localPath) => !pathParts.has(localPath));
8230
+ return { __proto__: null, ...env, PATH: [...localPaths, PATH].filter(Boolean).join(path7.delimiter) };
8196
8231
  };
8197
8232
  var getLocalPaths = (localPaths, localPath) => localPaths.at(-1) === localPath ? localPaths : getLocalPaths([...localPaths, localPath], path7.resolve(localPath, ".."));
8198
8233
 
8199
8234
  // node_modules/nano-spawn/source/spawn.js
8200
8235
  import { spawn } from "node:child_process";
8201
- import { once as once2 } from "node:events";
8236
+ import { once } from "node:events";
8202
8237
  import process7 from "node:process";
8203
8238
 
8204
8239
  // node_modules/nano-spawn/source/windows.js
8205
8240
  import fs5 from "node:fs/promises";
8206
8241
  import path8 from "node:path";
8207
8242
  import process5 from "node:process";
8208
- var applyForceShell = async (file, commandArguments, options) => await shouldForceShell(file, options) ? [escapeFile(file), commandArguments.map((argument) => escapeArgument(argument)), { ...options, shell: true }] : [file, commandArguments, options];
8209
- var shouldForceShell = async (file, { shell, cwd, env = process5.env }) => process5.platform === "win32" && !shell && !await isExe(file, cwd, env);
8243
+ var applyForceShell = async (file, commandArguments, options) => await shouldForceShell(file, options) ? [escapeFile(file), commandArguments.map((argument) => escapeArgument(argument)), { __proto__: null, ...options, shell: true }] : [file, commandArguments, options];
8244
+ var shouldForceShell = async (file, { shell, cwd, env }) => process5.platform === "win32" && !shell && !await isExe(file, cwd, env);
8210
8245
  var isExe = (file, cwd, { Path = "", PATH = Path }) => (
8211
8246
  // If the *.exe or *.com file extension was not omitted.
8212
8247
  // Windows common file systems are case-insensitive.
8213
- exeExtensions.some((extension2) => file.toLowerCase().endsWith(extension2)) || mIsExe(file, cwd, PATH)
8214
- );
8215
- var EXE_MEMO = {};
8216
- var memoize = (function_) => (...arguments_) => (
8217
- // Use returned assignment to keep code small
8218
- EXE_MEMO[arguments_.join("\0")] ??= function_(...arguments_)
8248
+ exeExtensions.some((extension2) => file.toLowerCase().endsWith(extension2)) || hasNativeExecutable(file, cwd, PATH)
8219
8249
  );
8220
- var access = memoize(fs5.access);
8221
- var mIsExe = memoize(async (file, cwd, PATH) => {
8222
- const parts = PATH.split(path8.delimiter).filter(Boolean).map((part) => part.replace(/^"(.*)"$/, "$1"));
8250
+ var hasNativeExecutable = async (file, cwd, PATH) => {
8251
+ const parts = PATH.split(path8.delimiter).filter(Boolean).map((part) => part.replace(new RegExp('^"(?<quoted>.*)"$', "v"), "$<quoted>"));
8223
8252
  try {
8224
8253
  await Promise.any(
8225
8254
  [cwd, ...parts].flatMap(
8226
- (part) => exeExtensions.map((extension2) => access(`${path8.resolve(part, file)}${extension2}`))
8255
+ (part) => exeExtensions.map((extension2) => fs5.access(`${path8.resolve(cwd, part, file)}${extension2}`))
8227
8256
  )
8228
8257
  );
8229
8258
  } catch {
8230
8259
  return false;
8231
8260
  }
8232
8261
  return true;
8233
- });
8262
+ };
8234
8263
  var exeExtensions = [".exe", ".com"];
8235
- var escapeArgument = (argument) => escapeFile(escapeFile(`"${argument.replaceAll(/(\\*)"/g, '$1$1\\"').replace(/(\\*)$/, "$1$1")}"`));
8236
- var escapeFile = (file) => file.replaceAll(/([()\][%!^"`<>&|;, *?])/g, "^$1");
8264
+ var escapeArgument = (argument) => {
8265
+ if (!shouldQuoteArgument(argument)) {
8266
+ return argument;
8267
+ }
8268
+ const escapedArgument = argument.replaceAll(new RegExp("\\\\+", "gv"), (backslashes, offset) => ['"', void 0].includes(argument[offset + backslashes.length]) ? backslashes.repeat(2) : backslashes).replaceAll('"', '""').replaceAll("%", "%%cd:~,%");
8269
+ return `"${escapedArgument}"`;
8270
+ };
8271
+ var shouldQuoteArgument = (argument) => argument === "" || argument.endsWith("\\") || new RegExp("[\\p{Control}[^\\w#$*+\\-.\\/:?@\\\\\\u{80}-\\u{10FFFF}]]", "v").test(argument);
8272
+ var escapeFile = (file) => file.replaceAll(new RegExp('(?<special>[ !"%&\\(\\)*,;<>?\\[\\]^`\\|])', "gv"), "^$<special>");
8237
8273
 
8238
8274
  // node_modules/nano-spawn/source/result.js
8239
- import { once, on } from "node:events";
8240
8275
  import process6 from "node:process";
8241
8276
  var getResult = async (nodeChildProcess, options, context) => {
8242
8277
  const instance = await nodeChildProcess;
8243
8278
  if (options.input !== void 0) {
8244
8279
  instance.stdin.end(options.input);
8245
8280
  }
8246
- const onClose = once(instance, "close");
8247
8281
  try {
8248
- await Promise.race([
8249
- onClose,
8250
- ...instance.stdio.filter(Boolean).map((stream) => onStreamError(stream))
8251
- ]);
8282
+ await waitForCompletion(instance);
8252
8283
  checkFailure(context, getErrorOutput(instance));
8253
8284
  return getOutputs(context);
8254
8285
  } catch (error) {
8255
- await Promise.allSettled([onClose]);
8256
8286
  throw getResultError(error, instance, context, options);
8257
8287
  }
8258
8288
  };
8259
- var onStreamError = async (stream) => {
8260
- for await (const [error] of on(stream, "error")) {
8261
- if (!["ERR_STREAM_PREMATURE_CLOSE", "EPIPE"].includes(error?.code)) {
8262
- throw error;
8289
+ var waitForCompletion = (instance) => new Promise((resolve, reject) => {
8290
+ let cancellationError;
8291
+ const onInstanceError = (error) => {
8292
+ if (error.code === "ABORT_ERR") {
8293
+ cancellationError = error;
8294
+ } else {
8295
+ reject(error);
8296
+ }
8297
+ };
8298
+ const streams = instance.stdio.filter(Boolean);
8299
+ const onStreamError = (error) => {
8300
+ if (!["ERR_STREAM_PREMATURE_CLOSE", "EPIPE", "EOF"].includes(error?.code)) {
8301
+ reject(error);
8263
8302
  }
8303
+ };
8304
+ for (const stream of streams) {
8305
+ stream.on("error", onStreamError);
8264
8306
  }
8265
- };
8307
+ instance.on("error", onInstanceError);
8308
+ instance.once("close", () => {
8309
+ instance.off("error", onInstanceError);
8310
+ for (const stream of streams) {
8311
+ stream.off("error", onStreamError);
8312
+ }
8313
+ if (cancellationError === void 0) {
8314
+ resolve();
8315
+ } else {
8316
+ reject(cancellationError);
8317
+ }
8318
+ });
8319
+ });
8266
8320
  var checkFailure = ({ command }, { exitCode, signalName }) => {
8267
8321
  if (signalName !== void 0) {
8268
8322
  throw new SubprocessError(`Command was terminated with ${signalName}: ${command}`);
@@ -8283,8 +8337,8 @@ var SubprocessError = class extends Error {
8283
8337
  };
8284
8338
  var getErrorOutput = ({ exitCode, signalCode }) => ({
8285
8339
  // `exitCode` can be a negative number (`errno`) when the `error` event is emitted on the `instance`
8286
- ...exitCode < 1 ? {} : { exitCode },
8287
- ...signalCode === null ? {} : { signalName: signalCode }
8340
+ ...!(exitCode < 1) && { exitCode },
8341
+ ...signalCode !== null && { signalName: signalCode }
8288
8342
  });
8289
8343
  var getOutputs = ({ state: { stdout, stderr, output }, command, start }) => ({
8290
8344
  stdout: getOutput(stdout),
@@ -8296,11 +8350,25 @@ var getOutputs = ({ state: { stdout, stderr, output }, command, start }) => ({
8296
8350
  var getOutput = (output) => output.at(-1) === "\n" ? output.slice(0, output.at(-2) === "\r" ? -2 : -1) : output;
8297
8351
 
8298
8352
  // node_modules/nano-spawn/source/spawn.js
8353
+ var inspectFlagsWithValue = /* @__PURE__ */ new Set(["--inspect-port", "--inspect-publish-uid"]);
8354
+ var withoutInspectFlags = (arguments_) => {
8355
+ const result = [];
8356
+ for (let index = 0; index < arguments_.length; index++) {
8357
+ const argument = arguments_[index];
8358
+ if (inspectFlagsWithValue.has(argument)) {
8359
+ index++;
8360
+ } else if (!argument.startsWith("--inspect")) {
8361
+ result.push(argument);
8362
+ }
8363
+ }
8364
+ return result;
8365
+ };
8366
+ var NODE_BINARIES = process7.platform === "win32" ? ["node", "node.exe"] : ["node"];
8299
8367
  var spawnSubprocess = async (file, commandArguments, options, context) => {
8300
8368
  try {
8301
- if (["node", "node.exe"].includes(file.toLowerCase())) {
8369
+ if (NODE_BINARIES.includes(process7.platform === "win32" ? file.toLowerCase() : file)) {
8302
8370
  file = process7.execPath;
8303
- commandArguments = [...process7.execArgv.filter((flag) => !flag.startsWith("--inspect")), ...commandArguments];
8371
+ commandArguments = [...withoutInspectFlags(process7.execArgv), ...commandArguments];
8304
8372
  }
8305
8373
  [file, commandArguments, options] = await applyForceShell(file, commandArguments, options);
8306
8374
  [file, commandArguments, options] = concatenateShell(file, commandArguments, options);
@@ -8309,7 +8377,7 @@ var spawnSubprocess = async (file, commandArguments, options, context) => {
8309
8377
  bufferOutput(instance.stderr, context, "stderr");
8310
8378
  instance.once("error", () => {
8311
8379
  });
8312
- await once2(instance, "spawn");
8380
+ await once(instance, "spawn");
8313
8381
  return instance;
8314
8382
  } catch (error) {
8315
8383
  throw getResultError(error, {}, context, options);
@@ -8317,40 +8385,47 @@ var spawnSubprocess = async (file, commandArguments, options, context) => {
8317
8385
  };
8318
8386
  var concatenateShell = (file, commandArguments, options) => options.shell && commandArguments.length > 0 ? [[file, ...commandArguments].join(" "), [], options] : [file, commandArguments, options];
8319
8387
  var bufferOutput = (stream, { state }, streamName) => {
8320
- if (stream) {
8321
- stream.setEncoding("utf8");
8322
- if (!state.isIterating[streamName]) {
8323
- state.isIterating[streamName] = false;
8324
- stream.on("data", (chunk) => {
8325
- state[streamName] += chunk;
8326
- state.output += chunk;
8327
- });
8328
- }
8388
+ if (!stream) {
8389
+ return;
8390
+ }
8391
+ stream.setEncoding("utf8");
8392
+ if (state.isIterating[streamName] === true) {
8393
+ return;
8329
8394
  }
8395
+ state.isIterating[streamName] = false;
8396
+ stream.on("data", (chunk) => {
8397
+ state[streamName] += chunk;
8398
+ state.output += chunk;
8399
+ });
8330
8400
  };
8331
8401
 
8332
8402
  // node_modules/nano-spawn/source/pipe.js
8333
8403
  import { pipeline } from "node:stream/promises";
8334
- var handlePipe = async (subprocesses) => {
8335
- const [[from, to2]] = await Promise.all([Promise.allSettled(subprocesses), pipeStreams(subprocesses)]);
8336
- if (to2.reason) {
8337
- to2.reason.pipedFrom = from.reason ?? from.value;
8404
+ var handlePipe = async (subprocesses, context, options) => {
8405
+ const [[from, to2]] = await Promise.all([Promise.allSettled(subprocesses), pipeStreams(subprocesses, context, options)]);
8406
+ const pipedFrom = from.status === "rejected" ? from.reason : from.value;
8407
+ if (to2.status === "rejected") {
8408
+ to2.reason.pipedFrom = pipedFrom;
8338
8409
  throw to2.reason;
8339
8410
  }
8340
- if (from.reason) {
8411
+ if (from.status === "rejected" && from.reason.signalName !== "SIGPIPE") {
8341
8412
  throw from.reason;
8342
8413
  }
8343
- return { ...to2.value, pipedFrom: from.value };
8414
+ return { ...to2.value, pipedFrom };
8344
8415
  };
8345
- var pipeStreams = async (subprocesses) => {
8416
+ var pipeStreams = async (subprocesses, context, options) => {
8346
8417
  try {
8418
+ if (options.input !== void 0) {
8419
+ throw invalidOptionsError('The "input" option must not be set on the destination of ".pipe()".', context, options);
8420
+ }
8347
8421
  const [{ stdout }, { stdin }] = await Promise.all(subprocesses.map(({ nodeChildProcess }) => nodeChildProcess));
8348
8422
  if (stdin === null) {
8349
- throw new Error('The "stdin" option must be set on the first "spawn()" call in the pipeline.');
8423
+ throw invalidOptionsError('The "stdin" option must be "pipe" on the destination of ".pipe()".', context, options);
8350
8424
  }
8351
8425
  if (stdout === null) {
8352
- throw new Error('The "stdout" option must be set on the last "spawn()" call in the pipeline.');
8426
+ throw invalidOptionsError('The "stdout" option must be "pipe" on the source of ".pipe()".', context, options);
8353
8427
  }
8428
+ stdout.setMaxListeners(0);
8354
8429
  pipeline(stdout, stdin).catch(() => {
8355
8430
  });
8356
8431
  } catch (error) {
@@ -8358,6 +8433,12 @@ var pipeStreams = async (subprocesses) => {
8358
8433
  throw error;
8359
8434
  }
8360
8435
  };
8436
+ var invalidOptionsError = (message, context, options) => getResultError(
8437
+ new SubprocessError(message),
8438
+ {},
8439
+ context,
8440
+ options
8441
+ );
8361
8442
  var closeStdin = async (nodeChildProcess) => {
8362
8443
  const { stdin } = await nodeChildProcess;
8363
8444
  stdin.end();
@@ -8365,76 +8446,101 @@ var closeStdin = async (nodeChildProcess) => {
8365
8446
 
8366
8447
  // node_modules/nano-spawn/source/iterable.js
8367
8448
  import * as readline from "node:readline/promises";
8368
- var lineIterator = async function* (subprocess, { state }, streamName, index) {
8449
+ import { on } from "node:events";
8450
+ var lineIterator = async function* (subprocess, { state }, streamName) {
8451
+ subprocess.catch(() => {
8452
+ });
8369
8453
  if (state.isIterating[streamName] === false) {
8370
8454
  throw new Error(`The subprocess must be iterated right away, for example:
8371
8455
  for await (const line of spawn(...)) { ... }`);
8372
8456
  }
8373
8457
  state.isIterating[streamName] = true;
8374
8458
  try {
8375
- const { [streamName]: stream } = await subprocess.nodeChildProcess;
8459
+ const nodeChildProcess = await subprocess.nodeChildProcess;
8460
+ const stream = nodeChildProcess[streamName];
8376
8461
  if (!stream) {
8377
- state.nonIterable[index] = true;
8378
- const message = state.nonIterable.every(Boolean) ? "either the option `stdout` or `stderr`" : `the option \`${streamName}\``;
8379
- throw new TypeError(
8380
- `The subprocess cannot be iterated unless ${message} is 'pipe'.`
8381
- );
8462
+ throw new NonIterableError(streamName);
8463
+ }
8464
+ const reader = readline.createInterface({ input: stream });
8465
+ subprocess.catch(() => reader.close());
8466
+ try {
8467
+ yield* reader;
8468
+ } finally {
8469
+ reader.close();
8470
+ stream.resume();
8382
8471
  }
8383
- handleErrors(subprocess);
8384
- yield* readline.createInterface({ input: stream });
8385
8472
  } finally {
8386
8473
  await subprocess;
8387
8474
  }
8388
8475
  };
8389
- var handleErrors = async (subprocess) => {
8390
- try {
8391
- await subprocess;
8392
- } catch {
8393
- }
8394
- };
8395
- var combineAsyncIterators = async function* ({ state }, ...iterators) {
8476
+ var combineAsyncIterators = async function* (...iterators) {
8477
+ const completions = new EventTarget();
8478
+ const results = on(completions, "result");
8479
+ const requestNext = (iterator, index) => getNext(iterator, index).then((result) => completions.dispatchEvent(new CustomEvent("result", { detail: result })));
8480
+ let remaining = iterators.length;
8481
+ const errors = [];
8396
8482
  try {
8397
- let promises = [];
8398
- while (iterators.length > 0) {
8399
- promises = iterators.map((iterator2, index2) => promises[index2] ?? getNext(iterator2, index2, state));
8400
- const [{ value, done }, index] = await Promise.race(promises.map((promise, index2) => Promise.all([promise, index2])));
8401
- const [iterator] = iterators.splice(index, 1);
8402
- promises.splice(index, 1);
8403
- if (!done) {
8404
- iterators.push(iterator);
8405
- yield value;
8483
+ for (const [index, iterator] of iterators.entries()) {
8484
+ requestNext(iterator, index);
8485
+ }
8486
+ while (remaining > 0) {
8487
+ const completion = await results.next();
8488
+ const [event] = completion.value;
8489
+ const { index, value, done, error } = event.detail;
8490
+ if (done) {
8491
+ remaining--;
8492
+ if (error !== void 0) {
8493
+ errors.push(error);
8494
+ }
8495
+ continue;
8406
8496
  }
8497
+ yield value;
8498
+ requestNext(iterators[index], index);
8407
8499
  }
8408
8500
  } finally {
8501
+ await results.return();
8409
8502
  await Promise.all(iterators.map((iterator) => iterator.return()));
8410
8503
  }
8504
+ const failure = errors.find((error) => !(error instanceof NonIterableError));
8505
+ if (failure !== void 0) {
8506
+ throw failure;
8507
+ }
8508
+ if (errors.length === iterators.length) {
8509
+ throw new NonIterableError();
8510
+ }
8411
8511
  };
8412
- var getNext = async (iterator, index, { nonIterable }) => {
8512
+ var getNext = async (iterator, index) => {
8413
8513
  try {
8414
- return await iterator.next();
8514
+ const { value, done } = await iterator.next();
8515
+ return { index, value, done };
8415
8516
  } catch (error) {
8416
- return shouldIgnoreError(nonIterable, index) ? iterator.return() : iterator.throw(error);
8517
+ return { index, done: true, error };
8518
+ }
8519
+ };
8520
+ var NonIterableError = class extends TypeError {
8521
+ constructor(streamName) {
8522
+ const message = streamName === void 0 ? "either the option `stdout` or `stderr`" : `the option \`${streamName}\``;
8523
+ super(`The subprocess cannot be iterated unless ${message} is 'pipe'.`);
8417
8524
  }
8418
8525
  };
8419
- var shouldIgnoreError = (nonIterable, index) => nonIterable.every(Boolean) ? index !== nonIterable.length - 1 : nonIterable[index];
8420
8526
 
8421
8527
  // node_modules/nano-spawn/source/index.js
8422
8528
  function spawn2(file, second, third, previous) {
8423
- const [commandArguments = [], options = {}] = Array.isArray(second) ? [second, third] : [[], second];
8529
+ const [commandArguments, options = {}] = Array.isArray(second) ? [[...second], third] : [[], second];
8424
8530
  const context = getContext([file, ...commandArguments]);
8425
8531
  const spawnOptions = getOptions(options);
8426
8532
  const nodeChildProcess = spawnSubprocess(file, commandArguments, spawnOptions, context);
8427
- let subprocess = getResult(nodeChildProcess, spawnOptions, context);
8533
+ let subprocess = getResult(nodeChildProcess, previous === void 0 ? spawnOptions : { ...spawnOptions, input: void 0 }, context);
8428
8534
  Object.assign(subprocess, { nodeChildProcess });
8429
- subprocess = previous ? handlePipe([previous, subprocess]) : subprocess;
8430
- const stdout = lineIterator(subprocess, context, "stdout", 0);
8431
- const stderr = lineIterator(subprocess, context, "stderr", 1);
8535
+ subprocess = previous ? handlePipe([previous, subprocess], context, spawnOptions) : subprocess;
8536
+ const stdout = lineIterator(subprocess, context, "stdout");
8537
+ const stderr = lineIterator(subprocess, context, "stderr");
8432
8538
  return Object.assign(subprocess, {
8433
8539
  nodeChildProcess,
8434
8540
  stdout,
8435
8541
  stderr,
8436
- [Symbol.asyncIterator]: () => combineAsyncIterators(context, stdout, stderr),
8437
- pipe: (file2, second2, third2) => spawn2(file2, second2, third2, subprocess)
8542
+ [Symbol.asyncIterator]: () => combineAsyncIterators(stdout, stderr),
8543
+ pipe: (nextFile, nextSecond, nextThird) => spawn2(nextFile, nextSecond, nextThird, subprocess)
8438
8544
  });
8439
8545
  }
8440
8546