appwrite-cli 15.1.0 → 16.0.0

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +3 -3
  3. package/cli.ts +2 -0
  4. package/dist/bundle-win-arm64.mjs +1328 -1046
  5. package/dist/cli.cjs +1272 -990
  6. package/dist/index.cjs +967 -929
  7. package/dist/index.js +1023 -985
  8. package/dist/lib/commands/generators/typescript/databases.d.ts +5 -0
  9. package/dist/lib/commands/generators/typescript/databases.d.ts.map +1 -1
  10. package/dist/lib/commands/pull.d.ts.map +1 -1
  11. package/dist/lib/commands/services/webhooks.d.ts +3 -0
  12. package/dist/lib/commands/services/webhooks.d.ts.map +1 -0
  13. package/dist/lib/commands/utils/deployment.d.ts.map +1 -1
  14. package/dist/lib/constants.d.ts +1 -1
  15. package/dist/lib/parser.d.ts.map +1 -1
  16. package/docs/examples/webhooks/create.md +7 -0
  17. package/docs/examples/webhooks/delete.md +4 -0
  18. package/docs/examples/webhooks/get.md +4 -0
  19. package/docs/examples/webhooks/list.md +3 -0
  20. package/docs/examples/webhooks/update-signature.md +4 -0
  21. package/docs/examples/webhooks/update.md +7 -0
  22. package/install.ps1 +2 -2
  23. package/install.sh +1 -1
  24. package/lib/commands/generators/typescript/databases.ts +36 -6
  25. package/lib/commands/pull.ts +30 -12
  26. package/lib/commands/services/projects.ts +0 -100
  27. package/lib/commands/services/webhooks.ts +134 -0
  28. package/lib/commands/utils/deployment.ts +4 -1
  29. package/lib/constants.ts +1 -1
  30. package/lib/parser.ts +1 -0
  31. package/package.json +2 -2
  32. package/scoop/appwrite.config.json +3 -3
  33. package/docs/examples/projects/create-webhook.md +0 -8
  34. package/docs/examples/projects/delete-webhook.md +0 -5
  35. package/docs/examples/projects/get-webhook.md +0 -5
  36. package/docs/examples/projects/list-webhooks.md +0 -4
  37. package/docs/examples/projects/update-webhook-signature.md +0 -5
  38. package/docs/examples/projects/update-webhook.md +0 -9
package/dist/index.cjs CHANGED
@@ -19581,9 +19581,9 @@ var require_stream_duplex = __commonJS({
19581
19581
  }
19582
19582
  });
19583
19583
 
19584
- // node_modules/safe-buffer/index.js
19584
+ // node_modules/string_decoder/node_modules/safe-buffer/index.js
19585
19585
  var require_safe_buffer = __commonJS({
19586
- "node_modules/safe-buffer/index.js"(exports2, module2) {
19586
+ "node_modules/string_decoder/node_modules/safe-buffer/index.js"(exports2, module2) {
19587
19587
  var buffer = require("buffer");
19588
19588
  var Buffer2 = buffer.Buffer;
19589
19589
  function copyProps(src, dst) {
@@ -53488,8 +53488,8 @@ var require_bignumber = __commonJS({
53488
53488
  y2.s = -b2;
53489
53489
  return x.plus(y2);
53490
53490
  }
53491
- var xe2 = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
53492
- if (!xe2 || !ye2) {
53491
+ var xe = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
53492
+ if (!xe || !ye2) {
53493
53493
  if (!xc || !yc) return xc ? (y2.s = -b2, y2) : new BigNumber2(yc ? x : NaN);
53494
53494
  if (!xc[0] || !yc[0]) {
53495
53495
  return yc[0] ? (y2.s = -b2, y2) : new BigNumber2(xc[0] ? x : (
@@ -53498,15 +53498,15 @@ var require_bignumber = __commonJS({
53498
53498
  ));
53499
53499
  }
53500
53500
  }
53501
- xe2 = bitFloor(xe2);
53501
+ xe = bitFloor(xe);
53502
53502
  ye2 = bitFloor(ye2);
53503
53503
  xc = xc.slice();
53504
- if (a = xe2 - ye2) {
53504
+ if (a = xe - ye2) {
53505
53505
  if (xLTy = a < 0) {
53506
53506
  a = -a;
53507
53507
  t = xc;
53508
53508
  } else {
53509
- ye2 = xe2;
53509
+ ye2 = xe;
53510
53510
  t = yc;
53511
53511
  }
53512
53512
  t.reverse();
@@ -53633,17 +53633,17 @@ var require_bignumber = __commonJS({
53633
53633
  y2.s = -b2;
53634
53634
  return x.minus(y2);
53635
53635
  }
53636
- var xe2 = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
53637
- if (!xe2 || !ye2) {
53636
+ var xe = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
53637
+ if (!xe || !ye2) {
53638
53638
  if (!xc || !yc) return new BigNumber2(a / 0);
53639
53639
  if (!xc[0] || !yc[0]) return yc[0] ? y2 : new BigNumber2(xc[0] ? x : a * 0);
53640
53640
  }
53641
- xe2 = bitFloor(xe2);
53641
+ xe = bitFloor(xe);
53642
53642
  ye2 = bitFloor(ye2);
53643
53643
  xc = xc.slice();
53644
- if (a = xe2 - ye2) {
53644
+ if (a = xe - ye2) {
53645
53645
  if (a > 0) {
53646
- ye2 = xe2;
53646
+ ye2 = xe;
53647
53647
  t = yc;
53648
53648
  } else {
53649
53649
  a = -a;
@@ -62747,7 +62747,7 @@ var id_default = ID;
62747
62747
  // lib/constants.ts
62748
62748
  var SDK_TITLE = "Appwrite";
62749
62749
  var SDK_TITLE_LOWER = "appwrite";
62750
- var SDK_VERSION = "15.1.0";
62750
+ var SDK_VERSION = "16.0.0";
62751
62751
  var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
62752
62752
  var EXECUTABLE_NAME = "appwrite";
62753
62753
  var NPM_PACKAGE_NAME = "appwrite-cli";
@@ -78159,7 +78159,7 @@ var import_path2 = require("path");
78159
78159
  var import_events2 = require("events");
78160
78160
  var import_assert = __toESM(require("assert"), 1);
78161
78161
  var import_buffer = require("buffer");
78162
- var vs = __toESM(require("zlib"), 1);
78162
+ var ks = __toESM(require("zlib"), 1);
78163
78163
  var import_zlib = __toESM(require("zlib"), 1);
78164
78164
  var import_node_path2 = require("node:path");
78165
78165
  var import_node_path3 = require("node:path");
@@ -78182,51 +78182,51 @@ var import_node_path7 = __toESM(require("node:path"), 1);
78182
78182
  var import_node_path8 = require("node:path");
78183
78183
  var import_node_fs6 = __toESM(require("node:fs"), 1);
78184
78184
  var import_node_path9 = __toESM(require("node:path"), 1);
78185
- var Dr = Object.defineProperty;
78185
+ var Nr = Object.defineProperty;
78186
78186
  var Ar = (s3, t) => {
78187
- for (var e in t) Dr(s3, e, { get: t[e], enumerable: true });
78187
+ for (var e in t) Nr(s3, e, { get: t[e], enumerable: true });
78188
78188
  };
78189
- var Ts = typeof process == "object" && process ? process : { stdout: null, stderr: null };
78190
- var Cr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof import_node_stream.default || Fr(s3) || kr(s3));
78191
- var Fr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.pipe == "function" && s3.pipe !== import_node_stream.default.Writable.prototype.pipe;
78192
- var kr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
78189
+ var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
78190
+ var Ir = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof import_node_stream.default || Cr(s3) || Fr(s3));
78191
+ var Cr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.pipe == "function" && s3.pipe !== import_node_stream.default.Writable.prototype.pipe;
78192
+ var Fr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
78193
78193
  var q = /* @__PURE__ */ Symbol("EOF");
78194
78194
  var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
78195
78195
  var rt = /* @__PURE__ */ Symbol("emittedEnd");
78196
- var xe = /* @__PURE__ */ Symbol("emittingEnd");
78196
+ var Le = /* @__PURE__ */ Symbol("emittingEnd");
78197
78197
  var jt = /* @__PURE__ */ Symbol("emittedError");
78198
- var Le = /* @__PURE__ */ Symbol("closed");
78199
- var xs = /* @__PURE__ */ Symbol("read");
78200
- var Ne = /* @__PURE__ */ Symbol("flush");
78201
- var Ls = /* @__PURE__ */ Symbol("flushChunk");
78198
+ var Ne = /* @__PURE__ */ Symbol("closed");
78199
+ var Ts = /* @__PURE__ */ Symbol("read");
78200
+ var Ae = /* @__PURE__ */ Symbol("flush");
78201
+ var xs = /* @__PURE__ */ Symbol("flushChunk");
78202
78202
  var z3 = /* @__PURE__ */ Symbol("encoding");
78203
78203
  var Mt = /* @__PURE__ */ Symbol("decoder");
78204
78204
  var b = /* @__PURE__ */ Symbol("flowing");
78205
78205
  var Qt = /* @__PURE__ */ Symbol("paused");
78206
78206
  var Bt = /* @__PURE__ */ Symbol("resume");
78207
- var g = /* @__PURE__ */ Symbol("buffer");
78208
- var D = /* @__PURE__ */ Symbol("pipes");
78209
- var _ = /* @__PURE__ */ Symbol("bufferLength");
78210
- var Si = /* @__PURE__ */ Symbol("bufferPush");
78207
+ var _ = /* @__PURE__ */ Symbol("buffer");
78208
+ var A = /* @__PURE__ */ Symbol("pipes");
78209
+ var g = /* @__PURE__ */ Symbol("bufferLength");
78210
+ var yi = /* @__PURE__ */ Symbol("bufferPush");
78211
78211
  var De = /* @__PURE__ */ Symbol("bufferShift");
78212
78212
  var L = /* @__PURE__ */ Symbol("objectMode");
78213
78213
  var w = /* @__PURE__ */ Symbol("destroyed");
78214
- var yi = /* @__PURE__ */ Symbol("error");
78215
- var Ri = /* @__PURE__ */ Symbol("emitData");
78216
- var Ns = /* @__PURE__ */ Symbol("emitEnd");
78217
- var bi = /* @__PURE__ */ Symbol("emitEnd2");
78214
+ var Ri = /* @__PURE__ */ Symbol("error");
78215
+ var bi = /* @__PURE__ */ Symbol("emitData");
78216
+ var Ls = /* @__PURE__ */ Symbol("emitEnd");
78217
+ var _i = /* @__PURE__ */ Symbol("emitEnd2");
78218
78218
  var Z = /* @__PURE__ */ Symbol("async");
78219
78219
  var gi = /* @__PURE__ */ Symbol("abort");
78220
- var Ae = /* @__PURE__ */ Symbol("aborted");
78220
+ var Ie = /* @__PURE__ */ Symbol("aborted");
78221
78221
  var Jt = /* @__PURE__ */ Symbol("signal");
78222
78222
  var yt = /* @__PURE__ */ Symbol("dataListeners");
78223
78223
  var C = /* @__PURE__ */ Symbol("discarded");
78224
78224
  var te = (s3) => Promise.resolve().then(s3);
78225
- var vr = (s3) => s3();
78226
- var Mr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
78227
- var Br = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
78228
- var Pr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
78229
- var Ie = class {
78225
+ var kr = (s3) => s3();
78226
+ var vr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
78227
+ var Mr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
78228
+ var Br = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
78229
+ var Ce = class {
78230
78230
  src;
78231
78231
  dest;
78232
78232
  opts;
@@ -78243,7 +78243,7 @@ var Ie = class {
78243
78243
  this.unpipe(), this.opts.end && this.dest.end();
78244
78244
  }
78245
78245
  };
78246
- var _i = class extends Ie {
78246
+ var Oi = class extends Ce {
78247
78247
  unpipe() {
78248
78248
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
78249
78249
  }
@@ -78251,26 +78251,26 @@ var _i = class extends Ie {
78251
78251
  super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
78252
78252
  }
78253
78253
  };
78254
- var zr = (s3) => !!s3.objectMode;
78255
- var Ur = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
78256
- var A = class extends import_node_events.EventEmitter {
78254
+ var Pr = (s3) => !!s3.objectMode;
78255
+ var zr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
78256
+ var D = class extends import_node_events.EventEmitter {
78257
78257
  [b] = false;
78258
78258
  [Qt] = false;
78259
- [D] = [];
78260
- [g] = [];
78259
+ [A] = [];
78260
+ [_] = [];
78261
78261
  [L];
78262
78262
  [z3];
78263
78263
  [Z];
78264
78264
  [Mt];
78265
78265
  [q] = false;
78266
78266
  [rt] = false;
78267
- [xe] = false;
78268
78267
  [Le] = false;
78268
+ [Ne] = false;
78269
78269
  [jt] = null;
78270
- [_] = 0;
78270
+ [g] = 0;
78271
78271
  [w] = false;
78272
78272
  [Jt];
78273
- [Ae] = false;
78273
+ [Ie] = false;
78274
78274
  [yt] = 0;
78275
78275
  [C] = false;
78276
78276
  writable = true;
@@ -78278,12 +78278,12 @@ var A = class extends import_node_events.EventEmitter {
78278
78278
  constructor(...t) {
78279
78279
  let e = t[0] || {};
78280
78280
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
78281
- zr(e) ? (this[L] = true, this[z3] = null) : Ur(e) ? (this[z3] = e.encoding, this[L] = false) : (this[L] = false, this[z3] = null), this[Z] = !!e.async, this[Mt] = this[z3] ? new import_node_string_decoder.StringDecoder(this[z3]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[g] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[D] });
78281
+ Pr(e) ? (this[L] = true, this[z3] = null) : zr(e) ? (this[z3] = e.encoding, this[L] = false) : (this[L] = false, this[z3] = null), this[Z] = !!e.async, this[Mt] = this[z3] ? new import_node_string_decoder.StringDecoder(this[z3]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
78282
78282
  let { signal: i } = e;
78283
78283
  i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
78284
78284
  }
78285
78285
  get bufferLength() {
78286
- return this[_];
78286
+ return this[g];
78287
78287
  }
78288
78288
  get encoding() {
78289
78289
  return this[z3];
@@ -78307,46 +78307,46 @@ var A = class extends import_node_events.EventEmitter {
78307
78307
  this[Z] = this[Z] || !!t;
78308
78308
  }
78309
78309
  [gi]() {
78310
- this[Ae] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
78310
+ this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
78311
78311
  }
78312
78312
  get aborted() {
78313
- return this[Ae];
78313
+ return this[Ie];
78314
78314
  }
78315
78315
  set aborted(t) {
78316
78316
  }
78317
78317
  write(t, e, i) {
78318
- if (this[Ae]) return false;
78318
+ if (this[Ie]) return false;
78319
78319
  if (this[q]) throw new Error("write after end");
78320
78320
  if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
78321
78321
  typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
78322
- let r = this[Z] ? te : vr;
78322
+ let r = this[Z] ? te : kr;
78323
78323
  if (!this[L] && !Buffer.isBuffer(t)) {
78324
- if (Pr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
78325
- else if (Br(t)) t = Buffer.from(t);
78324
+ if (Br(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
78325
+ else if (Mr(t)) t = Buffer.from(t);
78326
78326
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
78327
78327
  }
78328
- return this[L] ? (this[b] && this[_] !== 0 && this[Ne](true), this[b] ? this.emit("data", t) : this[Si](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[b]) : t.length ? (typeof t == "string" && !(e === this[z3] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z3] && (t = this[Mt].write(t)), this[b] && this[_] !== 0 && this[Ne](true), this[b] ? this.emit("data", t) : this[Si](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[b]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[b]);
78328
+ return this[L] ? (this[b] && this[g] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[yi](t), this[g] !== 0 && this.emit("readable"), i && r(i), this[b]) : t.length ? (typeof t == "string" && !(e === this[z3] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z3] && (t = this[Mt].write(t)), this[b] && this[g] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[yi](t), this[g] !== 0 && this.emit("readable"), i && r(i), this[b]) : (this[g] !== 0 && this.emit("readable"), i && r(i), this[b]);
78329
78329
  }
78330
78330
  read(t) {
78331
78331
  if (this[w]) return null;
78332
- if (this[C] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[j](), null;
78333
- this[L] && (t = null), this[g].length > 1 && !this[L] && (this[g] = [this[z3] ? this[g].join("") : Buffer.concat(this[g], this[_])]);
78334
- let e = this[xs](t || null, this[g][0]);
78332
+ if (this[C] = false, this[g] === 0 || t === 0 || t && t > this[g]) return this[j](), null;
78333
+ this[L] && (t = null), this[_].length > 1 && !this[L] && (this[_] = [this[z3] ? this[_].join("") : Buffer.concat(this[_], this[g])]);
78334
+ let e = this[Ts](t || null, this[_][0]);
78335
78335
  return this[j](), e;
78336
78336
  }
78337
- [xs](t, e) {
78337
+ [Ts](t, e) {
78338
78338
  if (this[L]) this[De]();
78339
78339
  else {
78340
78340
  let i = e;
78341
- t === i.length || t === null ? this[De]() : typeof i == "string" ? (this[g][0] = i.slice(t), e = i.slice(0, t), this[_] -= t) : (this[g][0] = i.subarray(t), e = i.subarray(0, t), this[_] -= t);
78341
+ t === i.length || t === null ? this[De]() : typeof i == "string" ? (this[_][0] = i.slice(t), e = i.slice(0, t), this[g] -= t) : (this[_][0] = i.subarray(t), e = i.subarray(0, t), this[g] -= t);
78342
78342
  }
78343
- return this.emit("data", e), !this[g].length && !this[q] && this.emit("drain"), e;
78343
+ return this.emit("data", e), !this[_].length && !this[q] && this.emit("drain"), e;
78344
78344
  }
78345
78345
  end(t, e, i) {
78346
78346
  return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = "utf8"), t !== void 0 && this.write(t, e), i && this.once("end", i), this[q] = true, this.writable = false, (this[b] || !this[Qt]) && this[j](), this;
78347
78347
  }
78348
78348
  [Bt]() {
78349
- this[w] || (!this[yt] && !this[D].length && (this[C] = true), this[Qt] = false, this[b] = true, this.emit("resume"), this[g].length ? this[Ne]() : this[q] ? this[j]() : this.emit("drain"));
78349
+ this[w] || (!this[yt] && !this[A].length && (this[C] = true), this[Qt] = false, this[b] = true, this.emit("resume"), this[_].length ? this[Ae]() : this[q] ? this[j]() : this.emit("drain"));
78350
78350
  }
78351
78351
  resume() {
78352
78352
  return this[Bt]();
@@ -78363,39 +78363,39 @@ var A = class extends import_node_events.EventEmitter {
78363
78363
  get paused() {
78364
78364
  return this[Qt];
78365
78365
  }
78366
- [Si](t) {
78367
- this[L] ? this[_] += 1 : this[_] += t.length, this[g].push(t);
78366
+ [yi](t) {
78367
+ this[L] ? this[g] += 1 : this[g] += t.length, this[_].push(t);
78368
78368
  }
78369
78369
  [De]() {
78370
- return this[L] ? this[_] -= 1 : this[_] -= this[g][0].length, this[g].shift();
78370
+ return this[L] ? this[g] -= 1 : this[g] -= this[_][0].length, this[_].shift();
78371
78371
  }
78372
- [Ne](t = false) {
78372
+ [Ae](t = false) {
78373
78373
  do
78374
78374
  ;
78375
- while (this[Ls](this[De]()) && this[g].length);
78376
- !t && !this[g].length && !this[q] && this.emit("drain");
78375
+ while (this[xs](this[De]()) && this[_].length);
78376
+ !t && !this[_].length && !this[q] && this.emit("drain");
78377
78377
  }
78378
- [Ls](t) {
78378
+ [xs](t) {
78379
78379
  return this.emit("data", t), this[b];
78380
78380
  }
78381
78381
  pipe(t, e) {
78382
78382
  if (this[w]) return t;
78383
78383
  this[C] = false;
78384
78384
  let i = this[rt];
78385
- return e = e || {}, t === Ts.stdout || t === Ts.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[D].push(e.proxyErrors ? new _i(this, t, e) : new Ie(this, t, e)), this[Z] ? te(() => this[Bt]()) : this[Bt]()), t;
78385
+ return e = e || {}, t === Os.stdout || t === Os.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[A].push(e.proxyErrors ? new Oi(this, t, e) : new Ce(this, t, e)), this[Z] ? te(() => this[Bt]()) : this[Bt]()), t;
78386
78386
  }
78387
78387
  unpipe(t) {
78388
- let e = this[D].find((i) => i.dest === t);
78389
- e && (this[D].length === 1 ? (this[b] && this[yt] === 0 && (this[b] = false), this[D] = []) : this[D].splice(this[D].indexOf(e), 1), e.unpipe());
78388
+ let e = this[A].find((i) => i.dest === t);
78389
+ e && (this[A].length === 1 ? (this[b] && this[yt] === 0 && (this[b] = false), this[A] = []) : this[A].splice(this[A].indexOf(e), 1), e.unpipe());
78390
78390
  }
78391
78391
  addListener(t, e) {
78392
78392
  return this.on(t, e);
78393
78393
  }
78394
78394
  on(t, e) {
78395
78395
  let i = super.on(t, e);
78396
- if (t === "data") this[C] = false, this[yt]++, !this[D].length && !this[b] && this[Bt]();
78397
- else if (t === "readable" && this[_] !== 0) super.emit("readable");
78398
- else if (Mr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
78396
+ if (t === "data") this[C] = false, this[yt]++, !this[A].length && !this[b] && this[Bt]();
78397
+ else if (t === "readable" && this[g] !== 0) super.emit("readable");
78398
+ else if (vr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
78399
78399
  else if (t === "error" && this[jt]) {
78400
78400
  let r = e;
78401
78401
  this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
@@ -78407,29 +78407,29 @@ var A = class extends import_node_events.EventEmitter {
78407
78407
  }
78408
78408
  off(t, e) {
78409
78409
  let i = super.off(t, e);
78410
- return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[D].length && (this[b] = false)), i;
78410
+ return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[A].length && (this[b] = false)), i;
78411
78411
  }
78412
78412
  removeAllListeners(t) {
78413
78413
  let e = super.removeAllListeners(t);
78414
- return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[D].length && (this[b] = false)), e;
78414
+ return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[A].length && (this[b] = false)), e;
78415
78415
  }
78416
78416
  get emittedEnd() {
78417
78417
  return this[rt];
78418
78418
  }
78419
78419
  [j]() {
78420
- !this[xe] && !this[rt] && !this[w] && this[g].length === 0 && this[q] && (this[xe] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Le] && this.emit("close"), this[xe] = false);
78420
+ !this[Le] && !this[rt] && !this[w] && this[_].length === 0 && this[q] && (this[Le] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[Le] = false);
78421
78421
  }
78422
78422
  emit(t, ...e) {
78423
78423
  let i = e[0];
78424
78424
  if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
78425
- if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[Ri](i)), true) : this[Ri](i);
78426
- if (t === "end") return this[Ns]();
78425
+ if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[bi](i)), true) : this[bi](i);
78426
+ if (t === "end") return this[Ls]();
78427
78427
  if (t === "close") {
78428
- if (this[Le] = true, !this[rt] && !this[w]) return false;
78428
+ if (this[Ne] = true, !this[rt] && !this[w]) return false;
78429
78429
  let n = super.emit("close");
78430
78430
  return this.removeAllListeners("close"), n;
78431
78431
  } else if (t === "error") {
78432
- this[jt] = i, super.emit(yi, i);
78432
+ this[jt] = i, super.emit(Ri, i);
78433
78433
  let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
78434
78434
  return this[j](), n;
78435
78435
  } else if (t === "resume") {
@@ -78442,23 +78442,23 @@ var A = class extends import_node_events.EventEmitter {
78442
78442
  let r = super.emit(t, ...e);
78443
78443
  return this[j](), r;
78444
78444
  }
78445
- [Ri](t) {
78446
- for (let i of this[D]) i.dest.write(t) === false && this.pause();
78445
+ [bi](t) {
78446
+ for (let i of this[A]) i.dest.write(t) === false && this.pause();
78447
78447
  let e = this[C] ? false : super.emit("data", t);
78448
78448
  return this[j](), e;
78449
78449
  }
78450
- [Ns]() {
78451
- return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[bi]()), true) : this[bi]());
78450
+ [Ls]() {
78451
+ return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[_i]()), true) : this[_i]());
78452
78452
  }
78453
- [bi]() {
78453
+ [_i]() {
78454
78454
  if (this[Mt]) {
78455
78455
  let e = this[Mt].end();
78456
78456
  if (e) {
78457
- for (let i of this[D]) i.dest.write(e);
78457
+ for (let i of this[A]) i.dest.write(e);
78458
78458
  this[C] || super.emit("data", e);
78459
78459
  }
78460
78460
  }
78461
- for (let e of this[D]) e.end();
78461
+ for (let e of this[A]) e.end();
78462
78462
  let t = super.emit("end");
78463
78463
  return this.removeAllListeners("end"), t;
78464
78464
  }
@@ -78505,67 +78505,67 @@ var A = class extends import_node_events.EventEmitter {
78505
78505
  }
78506
78506
  [Symbol.iterator]() {
78507
78507
  this[C] = false;
78508
- let t = false, e = () => (this.pause(), this.off(yi, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
78508
+ let t = false, e = () => (this.pause(), this.off(Ri, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
78509
78509
  if (t) return e();
78510
78510
  let r = this.read();
78511
78511
  return r === null ? e() : { done: false, value: r };
78512
78512
  };
78513
- return this.once("end", e), this.once(yi, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
78513
+ return this.once("end", e), this.once(Ri, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
78514
78514
  return this;
78515
78515
  }, [Symbol.dispose]: () => {
78516
78516
  } };
78517
78517
  }
78518
78518
  destroy(t) {
78519
78519
  if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
78520
- this[w] = true, this[C] = true, this[g].length = 0, this[_] = 0;
78520
+ this[w] = true, this[C] = true, this[_].length = 0, this[g] = 0;
78521
78521
  let e = this;
78522
- return typeof e.close == "function" && !this[Le] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
78522
+ return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
78523
78523
  }
78524
78524
  static get isStream() {
78525
- return Cr;
78525
+ return Ir;
78526
78526
  }
78527
78527
  };
78528
- var Wr = import_fs2.default.writev;
78528
+ var Hr = import_fs2.default.writev;
78529
78529
  var ot = /* @__PURE__ */ Symbol("_autoClose");
78530
78530
  var H = /* @__PURE__ */ Symbol("_close");
78531
78531
  var ee = /* @__PURE__ */ Symbol("_ended");
78532
78532
  var m = /* @__PURE__ */ Symbol("_fd");
78533
- var Ti = /* @__PURE__ */ Symbol("_finished");
78533
+ var xi = /* @__PURE__ */ Symbol("_finished");
78534
78534
  var J = /* @__PURE__ */ Symbol("_flags");
78535
- var xi = /* @__PURE__ */ Symbol("_flush");
78536
- var Ai = /* @__PURE__ */ Symbol("_handleChunk");
78537
- var Ii = /* @__PURE__ */ Symbol("_makeBuf");
78535
+ var Li = /* @__PURE__ */ Symbol("_flush");
78536
+ var Ii = /* @__PURE__ */ Symbol("_handleChunk");
78537
+ var Ci = /* @__PURE__ */ Symbol("_makeBuf");
78538
78538
  var se = /* @__PURE__ */ Symbol("_mode");
78539
- var Ce = /* @__PURE__ */ Symbol("_needDrain");
78539
+ var Fe = /* @__PURE__ */ Symbol("_needDrain");
78540
78540
  var Ut = /* @__PURE__ */ Symbol("_onerror");
78541
78541
  var Ht = /* @__PURE__ */ Symbol("_onopen");
78542
- var Li = /* @__PURE__ */ Symbol("_onread");
78542
+ var Ni = /* @__PURE__ */ Symbol("_onread");
78543
78543
  var Pt = /* @__PURE__ */ Symbol("_onwrite");
78544
78544
  var ht = /* @__PURE__ */ Symbol("_open");
78545
78545
  var U = /* @__PURE__ */ Symbol("_path");
78546
78546
  var nt = /* @__PURE__ */ Symbol("_pos");
78547
78547
  var Y = /* @__PURE__ */ Symbol("_queue");
78548
78548
  var zt = /* @__PURE__ */ Symbol("_read");
78549
- var Ni = /* @__PURE__ */ Symbol("_readSize");
78549
+ var Ai = /* @__PURE__ */ Symbol("_readSize");
78550
78550
  var Q = /* @__PURE__ */ Symbol("_reading");
78551
78551
  var ie = /* @__PURE__ */ Symbol("_remain");
78552
78552
  var Di = /* @__PURE__ */ Symbol("_size");
78553
- var Fe = /* @__PURE__ */ Symbol("_write");
78553
+ var ke = /* @__PURE__ */ Symbol("_write");
78554
78554
  var Rt = /* @__PURE__ */ Symbol("_writing");
78555
- var ke = /* @__PURE__ */ Symbol("_defaultFlag");
78555
+ var ve = /* @__PURE__ */ Symbol("_defaultFlag");
78556
78556
  var bt = /* @__PURE__ */ Symbol("_errored");
78557
- var gt = class extends A {
78557
+ var _t = class extends D {
78558
78558
  [bt] = false;
78559
78559
  [m];
78560
78560
  [U];
78561
- [Ni];
78561
+ [Ai];
78562
78562
  [Q] = false;
78563
78563
  [Di];
78564
78564
  [ie];
78565
78565
  [ot];
78566
78566
  constructor(t, e) {
78567
78567
  if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
78568
- this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ni] = e.readSize || 16 * 1024 * 1024, this[Q] = false, this[Di] = typeof e.size == "number" ? e.size : 1 / 0, this[ie] = this[Di], this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht]();
78568
+ this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ai] = e.readSize || 16 * 1024 * 1024, this[Q] = false, this[Di] = typeof e.size == "number" ? e.size : 1 / 0, this[ie] = this[Di], this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht]();
78569
78569
  }
78570
78570
  get fd() {
78571
78571
  return this[m];
@@ -78585,19 +78585,19 @@ var gt = class extends A {
78585
78585
  [Ht](t, e) {
78586
78586
  t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
78587
78587
  }
78588
- [Ii]() {
78589
- return Buffer.allocUnsafe(Math.min(this[Ni], this[ie]));
78588
+ [Ci]() {
78589
+ return Buffer.allocUnsafe(Math.min(this[Ai], this[ie]));
78590
78590
  }
78591
78591
  [zt]() {
78592
78592
  if (!this[Q]) {
78593
78593
  this[Q] = true;
78594
- let t = this[Ii]();
78595
- if (t.length === 0) return process.nextTick(() => this[Li](null, 0, t));
78596
- import_fs2.default.read(this[m], t, 0, t.length, null, (e, i, r) => this[Li](e, i, r));
78594
+ let t = this[Ci]();
78595
+ if (t.length === 0) return process.nextTick(() => this[Ni](null, 0, t));
78596
+ import_fs2.default.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ni](e, i, r));
78597
78597
  }
78598
78598
  }
78599
- [Li](t, e, i) {
78600
- this[Q] = false, t ? this[Ut](t) : this[Ai](e, i) && this[zt]();
78599
+ [Ni](t, e, i) {
78600
+ this[Q] = false, t ? this[Ut](t) : this[Ii](e, i) && this[zt]();
78601
78601
  }
78602
78602
  [H]() {
78603
78603
  if (this[ot] && typeof this[m] == "number") {
@@ -78608,7 +78608,7 @@ var gt = class extends A {
78608
78608
  [Ut](t) {
78609
78609
  this[Q] = true, this[H](), this.emit("error", t);
78610
78610
  }
78611
- [Ai](t, e) {
78611
+ [Ii](t, e) {
78612
78612
  let i = false;
78613
78613
  return this[ie] -= t, t > 0 && (i = super.write(t < e.length ? e.subarray(0, t) : e)), (t === 0 || this[ie] <= 0) && (i = false, this[H](), super.end()), i;
78614
78614
  }
@@ -78626,7 +78626,7 @@ var gt = class extends A {
78626
78626
  }
78627
78627
  }
78628
78628
  };
78629
- var ve = class extends gt {
78629
+ var Me = class extends _t {
78630
78630
  [ht]() {
78631
78631
  let t = true;
78632
78632
  try {
@@ -78641,8 +78641,8 @@ var ve = class extends gt {
78641
78641
  if (!this[Q]) {
78642
78642
  this[Q] = true;
78643
78643
  do {
78644
- let e = this[Ii](), i = e.length === 0 ? 0 : import_fs2.default.readSync(this[m], e, 0, e.length, null);
78645
- if (!this[Ai](i, e)) break;
78644
+ let e = this[Ci](), i = e.length === 0 ? 0 : import_fs2.default.readSync(this[m], e, 0, e.length, null);
78645
+ if (!this[Ii](i, e)) break;
78646
78646
  } while (true);
78647
78647
  this[Q] = false;
78648
78648
  }
@@ -78665,19 +78665,19 @@ var tt = class extends import_events.default {
78665
78665
  [Rt] = false;
78666
78666
  [ee] = false;
78667
78667
  [Y] = [];
78668
- [Ce] = false;
78668
+ [Fe] = false;
78669
78669
  [U];
78670
78670
  [se];
78671
78671
  [ot];
78672
78672
  [m];
78673
- [ke];
78673
+ [ve];
78674
78674
  [J];
78675
- [Ti] = false;
78675
+ [xi] = false;
78676
78676
  [nt];
78677
78677
  constructor(t, e) {
78678
78678
  e = e || {}, super(e), this[U] = t, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[se] = e.mode === void 0 ? 438 : e.mode, this[nt] = typeof e.start == "number" ? e.start : void 0, this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true;
78679
78679
  let i = this[nt] !== void 0 ? "r+" : "w";
78680
- this[ke] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
78680
+ this[ve] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
78681
78681
  }
78682
78682
  emit(t, ...e) {
78683
78683
  if (t === "error") {
@@ -78699,26 +78699,26 @@ var tt = class extends import_events.default {
78699
78699
  import_fs2.default.open(this[U], this[J], this[se], (t, e) => this[Ht](t, e));
78700
78700
  }
78701
78701
  [Ht](t, e) {
78702
- this[ke] && this[J] === "r+" && t && t.code === "ENOENT" ? (this[J] = "w", this[ht]()) : t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[Rt] || this[xi]());
78702
+ this[ve] && this[J] === "r+" && t && t.code === "ENOENT" ? (this[J] = "w", this[ht]()) : t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[Rt] || this[Li]());
78703
78703
  }
78704
78704
  end(t, e) {
78705
78705
  return t && this.write(t, e), this[ee] = true, !this[Rt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
78706
78706
  }
78707
78707
  write(t, e) {
78708
- return typeof t == "string" && (t = Buffer.from(t, e)), this[ee] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[Rt] || this[Y].length ? (this[Y].push(t), this[Ce] = true, false) : (this[Rt] = true, this[Fe](t), true);
78708
+ return typeof t == "string" && (t = Buffer.from(t, e)), this[ee] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[Rt] || this[Y].length ? (this[Y].push(t), this[Fe] = true, false) : (this[Rt] = true, this[ke](t), true);
78709
78709
  }
78710
- [Fe](t) {
78710
+ [ke](t) {
78711
78711
  import_fs2.default.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
78712
78712
  }
78713
78713
  [Pt](t, e) {
78714
- t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[xi]() : (this[Rt] = false, this[ee] && !this[Ti] ? (this[Ti] = true, this[H](), this.emit("finish")) : this[Ce] && (this[Ce] = false, this.emit("drain"))));
78714
+ t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Li]() : (this[Rt] = false, this[ee] && !this[xi] ? (this[xi] = true, this[H](), this.emit("finish")) : this[Fe] && (this[Fe] = false, this.emit("drain"))));
78715
78715
  }
78716
- [xi]() {
78716
+ [Li]() {
78717
78717
  if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
78718
- else if (this[Y].length === 1) this[Fe](this[Y].pop());
78718
+ else if (this[Y].length === 1) this[ke](this[Y].pop());
78719
78719
  else {
78720
78720
  let t = this[Y];
78721
- this[Y] = [], Wr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
78721
+ this[Y] = [], Hr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
78722
78722
  }
78723
78723
  }
78724
78724
  [H]() {
@@ -78731,7 +78731,7 @@ var tt = class extends import_events.default {
78731
78731
  var Wt = class extends tt {
78732
78732
  [ht]() {
78733
78733
  let t;
78734
- if (this[ke] && this[J] === "r+") try {
78734
+ if (this[ve] && this[J] === "r+") try {
78735
78735
  t = import_fs2.default.openSync(this[U], this[J], this[se]);
78736
78736
  } catch (e) {
78737
78737
  if (e?.code === "ENOENT") return this[J] = "w", this[ht]();
@@ -78746,7 +78746,7 @@ var Wt = class extends tt {
78746
78746
  this[m] = void 0, import_fs2.default.closeSync(t), this.emit("close");
78747
78747
  }
78748
78748
  }
78749
- [Fe](t) {
78749
+ [ke](t) {
78750
78750
  let e = true;
78751
78751
  try {
78752
78752
  this[Pt](null, import_fs2.default.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
@@ -78758,49 +78758,50 @@ var Wt = class extends tt {
78758
78758
  }
78759
78759
  }
78760
78760
  };
78761
- var Gr = /* @__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"]]);
78761
+ var Wr = /* @__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"]]);
78762
78762
  var As = (s3) => !!s3.sync && !!s3.file;
78763
- var Is = (s3) => !s3.sync && !!s3.file;
78764
- var Cs = (s3) => !!s3.sync && !s3.file;
78765
- var Fs = (s3) => !s3.sync && !s3.file;
78766
- var ks = (s3) => !!s3.file;
78767
- var Zr = (s3) => {
78768
- let t = Gr.get(s3);
78763
+ var Ds = (s3) => !s3.sync && !!s3.file;
78764
+ var Is = (s3) => !!s3.sync && !s3.file;
78765
+ var Cs = (s3) => !s3.sync && !s3.file;
78766
+ var Fs = (s3) => !!s3.file;
78767
+ var Gr = (s3) => {
78768
+ let t = Wr.get(s3);
78769
78769
  return t || s3;
78770
78770
  };
78771
78771
  var re = (s3 = {}) => {
78772
78772
  if (!s3) return {};
78773
78773
  let t = {};
78774
78774
  for (let [e, i] of Object.entries(s3)) {
78775
- let r = Zr(e);
78775
+ let r = Gr(e);
78776
78776
  t[r] = i;
78777
78777
  }
78778
78778
  return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
78779
78779
  };
78780
78780
  var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
78781
- Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o ? o = Array.from(o) : o = [];
78781
+ Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o = o ? Array.from(o) : [];
78782
78782
  let a = re(n);
78783
78783
  if (r?.(a, o), As(a)) {
78784
78784
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
78785
78785
  return s3(a, o);
78786
+ } else if (Ds(a)) {
78787
+ let l = t(a, o);
78788
+ return h ? l.then(() => h(), h) : l;
78786
78789
  } else if (Is(a)) {
78787
- let l = t(a, o), c = h || void 0;
78788
- return c ? l.then(() => c(), c) : l;
78789
- } else if (Cs(a)) {
78790
78790
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
78791
78791
  return e(a, o);
78792
- } else if (Fs(a)) {
78792
+ } else if (Cs(a)) {
78793
78793
  if (typeof h == "function") throw new TypeError("callback only supported with file option");
78794
78794
  return i(a, o);
78795
- } else throw new Error("impossible options??");
78795
+ }
78796
+ throw new Error("impossible options??");
78796
78797
  }, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
78797
- var Kr = import_zlib.default.constants || { ZLIB_VERNUM: 4736 };
78798
- 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 }, Kr));
78799
- var Vr = import_buffer.Buffer.concat;
78800
- var Ms = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat");
78801
- var $r = (s3) => s3;
78802
- var Fi = Ms?.writable === true || Ms?.set !== void 0 ? (s3) => {
78803
- import_buffer.Buffer.concat = s3 ? $r : Vr;
78798
+ var Yr = import_zlib.default.constants || { ZLIB_VERNUM: 4736 };
78799
+ 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 }, Yr));
78800
+ var Kr = import_buffer.Buffer.concat;
78801
+ var vs = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat");
78802
+ var Vr = (s3) => s3;
78803
+ var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
78804
+ import_buffer.Buffer.concat = s3 ? Vr : Kr;
78804
78805
  } : (s3) => {
78805
78806
  };
78806
78807
  var Ot = /* @__PURE__ */ Symbol("_superWrite");
@@ -78814,8 +78815,8 @@ var Gt = class extends Error {
78814
78815
  return "ZlibError";
78815
78816
  }
78816
78817
  };
78817
- var ki = /* @__PURE__ */ Symbol("flushFlag");
78818
- var ne = class extends A {
78818
+ var vi = /* @__PURE__ */ Symbol("flushFlag");
78819
+ var ne = class extends D {
78819
78820
  #t = false;
78820
78821
  #i = false;
78821
78822
  #s;
@@ -78834,9 +78835,9 @@ var ne = class extends A {
78834
78835
  }
78835
78836
  constructor(t, e) {
78836
78837
  if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
78837
- if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof vs[e] != "function") throw new TypeError("Compression method not supported: " + e);
78838
+ if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof ks[e] != "function") throw new TypeError("Compression method not supported: " + e);
78838
78839
  try {
78839
- this.#e = new vs[e](t);
78840
+ this.#e = new ks[e](t);
78840
78841
  } catch (i) {
78841
78842
  throw new Gt(i, this.constructor);
78842
78843
  }
@@ -78851,7 +78852,7 @@ var ne = class extends A {
78851
78852
  if (!this.#t) return (0, import_assert.default)(this.#e, "zlib binding closed"), this.#e.reset?.();
78852
78853
  }
78853
78854
  flush(t) {
78854
- this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(import_buffer.Buffer.alloc(0), { [ki]: t })));
78855
+ this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(import_buffer.Buffer.alloc(0), { [vi]: t })));
78855
78856
  }
78856
78857
  end(t, e, i) {
78857
78858
  return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), t && (e ? this.write(t, e) : this.write(t)), this.flush(this.#n), this.#i = true, super.end(i);
@@ -78870,13 +78871,13 @@ var ne = class extends A {
78870
78871
  };
78871
78872
  let o = this.#e.close;
78872
78873
  this.#e.close = () => {
78873
- }, Fi(true);
78874
+ }, ki(true);
78874
78875
  let h;
78875
78876
  try {
78876
- let l = typeof t[ki] == "number" ? t[ki] : this.#s;
78877
- h = this.#e._processChunk(t, l), Fi(false);
78877
+ let l = typeof t[vi] == "number" ? t[vi] : this.#s;
78878
+ h = this.#e._processChunk(t, l), ki(false);
78878
78879
  } catch (l) {
78879
- Fi(false), this.#o(new Gt(l, this.write));
78880
+ ki(false), this.#o(new Gt(l, this.write));
78880
78881
  } finally {
78881
78882
  this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
78882
78883
  }
@@ -78890,7 +78891,7 @@ var ne = class extends A {
78890
78891
  return i && i(), a;
78891
78892
  }
78892
78893
  };
78893
- var Me = class extends ne {
78894
+ var Be = class extends ne {
78894
78895
  #t;
78895
78896
  #i;
78896
78897
  constructor(t, e) {
@@ -78916,7 +78917,7 @@ var Me = class extends ne {
78916
78917
  }
78917
78918
  }
78918
78919
  };
78919
- var Be = class extends Me {
78920
+ var Pe = class extends Be {
78920
78921
  #t;
78921
78922
  constructor(t) {
78922
78923
  super(t, "Gzip"), this.#t = t && !!t.portable;
@@ -78925,87 +78926,87 @@ var Be = class extends Me {
78925
78926
  return this.#t ? (this.#t = false, t[9] = 255, super[Ot](t)) : super[Ot](t);
78926
78927
  }
78927
78928
  };
78928
- var Pe = class extends Me {
78929
+ var ze = class extends Be {
78929
78930
  constructor(t) {
78930
78931
  super(t, "Unzip");
78931
78932
  }
78932
78933
  };
78933
- var ze = class extends ne {
78934
+ var Ue = class extends ne {
78934
78935
  constructor(t, e) {
78935
78936
  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);
78936
78937
  }
78937
78938
  };
78938
- var Ue = class extends ze {
78939
+ var He = class extends Ue {
78939
78940
  constructor(t) {
78940
78941
  super(t, "BrotliCompress");
78941
78942
  }
78942
78943
  };
78943
- var He = class extends ze {
78944
+ var We = class extends Ue {
78944
78945
  constructor(t) {
78945
78946
  super(t, "BrotliDecompress");
78946
78947
  }
78947
78948
  };
78948
- var We = class extends ne {
78949
+ var Ge = class extends ne {
78949
78950
  constructor(t, e) {
78950
78951
  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);
78951
78952
  }
78952
78953
  };
78953
- var Ge = class extends We {
78954
+ var Ze = class extends Ge {
78954
78955
  constructor(t) {
78955
78956
  super(t, "ZstdCompress");
78956
78957
  }
78957
78958
  };
78958
- var Ze = class extends We {
78959
+ var Ye = class extends Ge {
78959
78960
  constructor(t) {
78960
78961
  super(t, "ZstdDecompress");
78961
78962
  }
78962
78963
  };
78963
- var Bs = (s3, t) => {
78964
- if (Number.isSafeInteger(s3)) s3 < 0 ? jr(s3, t) : qr(s3, t);
78964
+ var Ms = (s3, t) => {
78965
+ if (Number.isSafeInteger(s3)) s3 < 0 ? qr(s3, t) : Xr(s3, t);
78965
78966
  else throw Error("cannot encode number outside of javascript safe integer range");
78966
78967
  return t;
78967
78968
  };
78968
- var qr = (s3, t) => {
78969
+ var Xr = (s3, t) => {
78969
78970
  t[0] = 128;
78970
78971
  for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
78971
78972
  };
78972
- var jr = (s3, t) => {
78973
+ var qr = (s3, t) => {
78973
78974
  t[0] = 255;
78974
78975
  var e = false;
78975
78976
  s3 = s3 * -1;
78976
78977
  for (var i = t.length; i > 1; i--) {
78977
78978
  var r = s3 & 255;
78978
- s3 = Math.floor(s3 / 256), e ? t[i - 1] = zs(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = Us(r));
78979
+ s3 = Math.floor(s3 / 256), e ? t[i - 1] = Ps(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = zs(r));
78979
78980
  }
78980
78981
  };
78981
- var Ps = (s3) => {
78982
- let t = s3[0], e = t === 128 ? Jr(s3.subarray(1, s3.length)) : t === 255 ? Qr(s3) : null;
78982
+ var Bs = (s3) => {
78983
+ let t = s3[0], e = t === 128 ? Qr(s3.subarray(1, s3.length)) : t === 255 ? jr(s3) : null;
78983
78984
  if (e === null) throw Error("invalid base256 encoding");
78984
78985
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
78985
78986
  return e;
78986
78987
  };
78987
- var Qr = (s3) => {
78988
+ var jr = (s3) => {
78988
78989
  for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
78989
78990
  var n = Number(s3[r]), o;
78990
- i ? o = zs(n) : n === 0 ? o = n : (i = true, o = Us(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
78991
+ i ? o = Ps(n) : n === 0 ? o = n : (i = true, o = zs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
78991
78992
  }
78992
78993
  return e;
78993
78994
  };
78994
- var Jr = (s3) => {
78995
+ var Qr = (s3) => {
78995
78996
  for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
78996
78997
  var r = Number(s3[i]);
78997
78998
  r !== 0 && (e += r * Math.pow(256, t - i - 1));
78998
78999
  }
78999
79000
  return e;
79000
79001
  };
79001
- var zs = (s3) => (255 ^ s3) & 255;
79002
- var Us = (s3) => (255 ^ s3) + 1 & 255;
79003
- var Mi = {};
79004
- Ar(Mi, { code: () => Ye, isCode: () => oe, isName: () => en, name: () => he });
79002
+ var Ps = (s3) => (255 ^ s3) & 255;
79003
+ var zs = (s3) => (255 ^ s3) + 1 & 255;
79004
+ var Bi = {};
79005
+ Ar(Bi, { code: () => Ke, isCode: () => oe, isName: () => tn, name: () => he });
79005
79006
  var oe = (s3) => he.has(s3);
79006
- var en = (s3) => Ye.has(s3);
79007
+ var tn = (s3) => Ke.has(s3);
79007
79008
  var he = /* @__PURE__ */ new Map([["0", "File"], ["", "OldFile"], ["1", "Link"], ["2", "SymbolicLink"], ["3", "CharacterDevice"], ["4", "BlockDevice"], ["5", "Directory"], ["6", "FIFO"], ["7", "ContiguousFile"], ["g", "GlobalExtendedHeader"], ["x", "ExtendedHeader"], ["A", "SolarisACL"], ["D", "GNUDumpDir"], ["I", "Inode"], ["K", "NextFileHasLongLinkpath"], ["L", "NextFileHasLongPath"], ["M", "ContinuationFile"], ["N", "OldGnuLongPath"], ["S", "SparseFile"], ["V", "TapeVolumeHeader"], ["X", "OldExtendedHeader"]]);
79008
- var Ye = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
79009
+ var Ke = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
79009
79010
  var F = class {
79010
79011
  cksumValid = false;
79011
79012
  needPax = false;
@@ -79033,14 +79034,14 @@ var F = class {
79033
79034
  }
79034
79035
  decode(t, e, i, r) {
79035
79036
  if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
79036
- this.path = i?.path ?? Tt(t, e, 100), this.mode = i?.mode ?? r?.mode ?? at(t, e + 100, 8), this.uid = i?.uid ?? r?.uid ?? at(t, e + 108, 8), this.gid = i?.gid ?? r?.gid ?? at(t, e + 116, 8), this.size = i?.size ?? r?.size ?? at(t, e + 124, 12), this.mtime = i?.mtime ?? r?.mtime ?? Bi(t, e + 136, 12), this.cksum = at(t, e + 148, 12), r && this.#i(r, true), i && this.#i(i);
79037
+ this.path = i?.path ?? Tt(t, e, 100), this.mode = i?.mode ?? r?.mode ?? at(t, e + 100, 8), this.uid = i?.uid ?? r?.uid ?? at(t, e + 108, 8), this.gid = i?.gid ?? r?.gid ?? at(t, e + 116, 8), this.size = i?.size ?? r?.size ?? at(t, e + 124, 12), this.mtime = i?.mtime ?? r?.mtime ?? Pi(t, e + 136, 12), this.cksum = at(t, e + 148, 12), r && this.#i(r, true), i && this.#i(i);
79037
79038
  let n = Tt(t, e + 156, 1);
79038
79039
  if (oe(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = Tt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = i?.uname ?? r?.uname ?? Tt(t, e + 265, 32), this.gname = i?.gname ?? r?.gname ?? Tt(t, e + 297, 32), this.devmaj = i?.devmaj ?? r?.devmaj ?? at(t, e + 329, 8) ?? 0, this.devmin = i?.devmin ?? r?.devmin ?? at(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
79039
79040
  let h = Tt(t, e + 345, 155);
79040
79041
  this.path = h + "/" + this.path;
79041
79042
  } else {
79042
79043
  let h = Tt(t, e + 345, 130);
79043
- h && (this.path = h + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Bi(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Bi(t, e + 488, 12);
79044
+ h && (this.path = h + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Pi(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Pi(t, e + 488, 12);
79044
79045
  }
79045
79046
  let o = 256;
79046
79047
  for (let h = e; h < e + 148; h++) o += t[h];
@@ -79052,8 +79053,8 @@ var F = class {
79052
79053
  }
79053
79054
  encode(t, e = 0) {
79054
79055
  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");
79055
- let i = this.ctime || this.atime ? 130 : 155, r = sn(this.path || "", i), n = r[0], o = r[1];
79056
- this.needPax = !!r[2], this.needPax = xt(t, e, 100, n) || this.needPax, this.needPax = lt(t, e + 100, 8, this.mode) || this.needPax, this.needPax = lt(t, e + 108, 8, this.uid) || this.needPax, this.needPax = lt(t, e + 116, 8, this.gid) || this.needPax, this.needPax = lt(t, e + 124, 12, this.size) || this.needPax, this.needPax = Pi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = this.#t.charCodeAt(0), this.needPax = xt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = xt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = xt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = lt(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = lt(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = xt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = xt(t, e + 345, 155, o) || this.needPax : (this.needPax = xt(t, e + 345, 130, o) || this.needPax, this.needPax = Pi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Pi(t, e + 488, 12, this.ctime) || this.needPax);
79056
+ let i = this.ctime || this.atime ? 130 : 155, r = en(this.path || "", i), n = r[0], o = r[1];
79057
+ this.needPax = !!r[2], this.needPax = xt(t, e, 100, n) || this.needPax, this.needPax = lt(t, e + 100, 8, this.mode) || this.needPax, this.needPax = lt(t, e + 108, 8, this.uid) || this.needPax, this.needPax = lt(t, e + 116, 8, this.gid) || this.needPax, this.needPax = lt(t, e + 124, 12, this.size) || this.needPax, this.needPax = zi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = xt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = xt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = xt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = lt(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = lt(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = xt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = xt(t, e + 345, 155, o) || this.needPax : (this.needPax = xt(t, e + 345, 130, o) || this.needPax, this.needPax = zi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = zi(t, e + 488, 12, this.ctime) || this.needPax);
79057
79058
  let h = 256;
79058
79059
  for (let a = e; a < e + 148; a++) h += t[a];
79059
79060
  for (let a = e + 156; a < e + 512; a++) h += t[a];
@@ -79066,13 +79067,13 @@ var F = class {
79066
79067
  return this.#t;
79067
79068
  }
79068
79069
  set type(t) {
79069
- let e = String(Ye.get(t));
79070
+ let e = String(Ke.get(t));
79070
79071
  if (oe(e) || e === "Unsupported") this.#t = e;
79071
79072
  else if (oe(t)) this.#t = t;
79072
79073
  else throw new TypeError("invalid entry type: " + t);
79073
79074
  }
79074
79075
  };
79075
- var sn = (s3, t) => {
79076
+ var en = (s3, t) => {
79076
79077
  let i = s3, r = "", n, o = import_node_path2.posix.parse(s3).root || ".";
79077
79078
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
79078
79079
  else {
@@ -79085,19 +79086,19 @@ var sn = (s3, t) => {
79085
79086
  return n;
79086
79087
  };
79087
79088
  var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
79088
- var Bi = (s3, t, e) => rn(at(s3, t, e));
79089
- var rn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
79090
- var at = (s3, t, e) => Number(s3[t]) & 128 ? Ps(s3.subarray(t, t + e)) : on(s3, t, e);
79091
- var nn = (s3) => isNaN(s3) ? void 0 : s3;
79092
- var on = (s3, t, e) => nn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
79093
- var hn = { 12: 8589934591, 8: 2097151 };
79094
- var lt = (s3, t, e, i) => i === void 0 ? false : i > hn[e] || i < 0 ? (Bs(i, s3.subarray(t, t + e)), true) : (an(s3, t, e, i), false);
79095
- var an = (s3, t, e, i) => s3.write(ln(i, e), t, e, "ascii");
79096
- var ln = (s3, t) => cn(Math.floor(s3).toString(8), t);
79097
- var cn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
79098
- var Pi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
79099
- var fn = new Array(156).join("\0");
79100
- var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + fn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
79089
+ var Pi = (s3, t, e) => sn(at(s3, t, e));
79090
+ var sn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
79091
+ var at = (s3, t, e) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e)) : nn(s3, t, e);
79092
+ var rn = (s3) => isNaN(s3) ? void 0 : s3;
79093
+ var nn = (s3, t, e) => rn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
79094
+ var on = { 12: 8589934591, 8: 2097151 };
79095
+ var lt = (s3, t, e, i) => i === void 0 ? false : i > on[e] || i < 0 ? (Ms(i, s3.subarray(t, t + e)), true) : (hn(s3, t, e, i), false);
79096
+ var hn = (s3, t, e, i) => s3.write(an(i, e), t, e, "ascii");
79097
+ var an = (s3, t) => ln(Math.floor(s3).toString(8), t);
79098
+ var ln = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
79099
+ var zi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
79100
+ var cn = new Array(156).join("\0");
79101
+ var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + cn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
79101
79102
  var ct = class s {
79102
79103
  atime;
79103
79104
  mtime;
@@ -79138,13 +79139,13 @@ var ct = class s {
79138
79139
  return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
79139
79140
  }
79140
79141
  static parse(t, e, i = false) {
79141
- return new s(un(mn(t), e), i);
79142
+ return new s(dn(un(t), e), i);
79142
79143
  }
79143
79144
  };
79144
- var un = (s3, t) => t ? Object.assign({}, t, s3) : s3;
79145
- var mn = (s3) => s3.replace(/\n$/, "").split(`
79146
- `).reduce(pn, /* @__PURE__ */ Object.create(null));
79147
- var pn = (s3, t) => {
79145
+ var dn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
79146
+ var un = (s3) => s3.replace(/\n$/, "").split(`
79147
+ `).reduce(mn, /* @__PURE__ */ Object.create(null));
79148
+ var mn = (s3, t) => {
79148
79149
  let e = parseInt(t, 10);
79149
79150
  if (e !== Buffer.byteLength(t) + 1) return s3;
79150
79151
  t = t.slice((e + " ").length);
@@ -79153,9 +79154,9 @@ var pn = (s3, t) => {
79153
79154
  let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
79154
79155
  return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
79155
79156
  };
79156
- var En = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
79157
- var f = En !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replace(/\\/g, "/");
79158
- var Yt = class extends A {
79157
+ var pn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
79158
+ var f = pn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
79159
+ var Yt = class extends D {
79159
79160
  extended;
79160
79161
  globalExtended;
79161
79162
  header;
@@ -79222,41 +79223,41 @@ var Yt = class extends A {
79222
79223
  var Lt = (s3, t, e, i = {}) => {
79223
79224
  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));
79224
79225
  };
79225
- var Sn = 1024 * 1024;
79226
- var Gi = Buffer.from([31, 139]);
79227
- var Zi = Buffer.from([40, 181, 47, 253]);
79228
- var yn = Math.max(Gi.length, Zi.length);
79226
+ var wn = 1024 * 1024;
79227
+ var Zi = Buffer.from([31, 139]);
79228
+ var Yi = Buffer.from([40, 181, 47, 253]);
79229
+ var Sn = Math.max(Zi.length, Yi.length);
79229
79230
  var B = /* @__PURE__ */ Symbol("state");
79230
79231
  var Nt = /* @__PURE__ */ Symbol("writeEntry");
79231
79232
  var et = /* @__PURE__ */ Symbol("readEntry");
79232
- var zi = /* @__PURE__ */ Symbol("nextEntry");
79233
- var Hs = /* @__PURE__ */ Symbol("processEntry");
79233
+ var Ui = /* @__PURE__ */ Symbol("nextEntry");
79234
+ var Us = /* @__PURE__ */ Symbol("processEntry");
79234
79235
  var V = /* @__PURE__ */ Symbol("extendedHeader");
79235
79236
  var ae = /* @__PURE__ */ Symbol("globalExtendedHeader");
79236
79237
  var ft = /* @__PURE__ */ Symbol("meta");
79237
- var Ws = /* @__PURE__ */ Symbol("emitMeta");
79238
+ var Hs = /* @__PURE__ */ Symbol("emitMeta");
79238
79239
  var p = /* @__PURE__ */ Symbol("buffer");
79239
79240
  var it = /* @__PURE__ */ Symbol("queue");
79240
79241
  var dt = /* @__PURE__ */ Symbol("ended");
79241
- var Ui = /* @__PURE__ */ Symbol("emittedEnd");
79242
- var Dt = /* @__PURE__ */ Symbol("emit");
79242
+ var Hi = /* @__PURE__ */ Symbol("emittedEnd");
79243
+ var At = /* @__PURE__ */ Symbol("emit");
79243
79244
  var y = /* @__PURE__ */ Symbol("unzip");
79244
- var Ke = /* @__PURE__ */ Symbol("consumeChunk");
79245
- var Ve = /* @__PURE__ */ Symbol("consumeChunkSub");
79246
- var Hi = /* @__PURE__ */ Symbol("consumeBody");
79247
- var Gs = /* @__PURE__ */ Symbol("consumeMeta");
79248
- var Zs = /* @__PURE__ */ Symbol("consumeHeader");
79245
+ var Ve = /* @__PURE__ */ Symbol("consumeChunk");
79246
+ var $e = /* @__PURE__ */ Symbol("consumeChunkSub");
79247
+ var Wi = /* @__PURE__ */ Symbol("consumeBody");
79248
+ var Ws = /* @__PURE__ */ Symbol("consumeMeta");
79249
+ var Gs = /* @__PURE__ */ Symbol("consumeHeader");
79249
79250
  var le = /* @__PURE__ */ Symbol("consuming");
79250
- var Wi = /* @__PURE__ */ Symbol("bufferConcat");
79251
- var $e = /* @__PURE__ */ Symbol("maybeEnd");
79251
+ var Gi = /* @__PURE__ */ Symbol("bufferConcat");
79252
+ var Xe = /* @__PURE__ */ Symbol("maybeEnd");
79252
79253
  var Kt = /* @__PURE__ */ Symbol("writing");
79253
79254
  var ut = /* @__PURE__ */ Symbol("aborted");
79254
- var Xe = /* @__PURE__ */ Symbol("onDone");
79255
- var At = /* @__PURE__ */ Symbol("sawValidEntry");
79256
- var qe = /* @__PURE__ */ Symbol("sawNullBlock");
79257
- var je = /* @__PURE__ */ Symbol("sawEOF");
79258
- var Ys = /* @__PURE__ */ Symbol("closeStream");
79259
- var Rn = () => true;
79255
+ var qe = /* @__PURE__ */ Symbol("onDone");
79256
+ var Dt = /* @__PURE__ */ Symbol("sawValidEntry");
79257
+ var je = /* @__PURE__ */ Symbol("sawNullBlock");
79258
+ var Qe = /* @__PURE__ */ Symbol("sawEOF");
79259
+ var Zs = /* @__PURE__ */ Symbol("closeStream");
79260
+ var yn = () => true;
79260
79261
  var st = class extends import_events2.EventEmitter {
79261
79262
  file;
79262
79263
  strict;
@@ -79277,36 +79278,36 @@ var st = class extends import_events2.EventEmitter {
79277
79278
  [dt] = false;
79278
79279
  [y];
79279
79280
  [ut] = false;
79280
- [At];
79281
- [qe] = false;
79281
+ [Dt];
79282
79282
  [je] = false;
79283
+ [Qe] = false;
79283
79284
  [Kt] = false;
79284
79285
  [le] = false;
79285
- [Ui] = false;
79286
+ [Hi] = false;
79286
79287
  constructor(t = {}) {
79287
- super(), this.file = t.file || "", this.on(Xe, () => {
79288
- (this[B] === "begin" || this[At] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
79289
- }), t.ondone ? this.on(Xe, t.ondone) : this.on(Xe, () => {
79288
+ super(), this.file = t.file || "", this.on(qe, () => {
79289
+ (this[B] === "begin" || this[Dt] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
79290
+ }), t.ondone ? this.on(qe, t.ondone) : this.on(qe, () => {
79290
79291
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
79291
- }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || Sn, this.filter = typeof t.filter == "function" ? t.filter : Rn;
79292
+ }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || wn, this.filter = typeof t.filter == "function" ? t.filter : yn;
79292
79293
  let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
79293
79294
  this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
79294
79295
  let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
79295
- this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Ys]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
79296
+ this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Zs]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
79296
79297
  }
79297
79298
  warn(t, e, i = {}) {
79298
79299
  Lt(this, t, e, i);
79299
79300
  }
79300
- [Zs](t, e) {
79301
- this[At] === void 0 && (this[At] = false);
79301
+ [Gs](t, e) {
79302
+ this[Dt] === void 0 && (this[Dt] = false);
79302
79303
  let i;
79303
79304
  try {
79304
79305
  i = new F(t, e, this[V], this[ae]);
79305
79306
  } catch (r) {
79306
79307
  return this.warn("TAR_ENTRY_INVALID", r);
79307
79308
  }
79308
- if (i.nullBlock) this[qe] ? (this[je] = true, this[B] === "begin" && (this[B] = "header"), this[Dt]("eof")) : (this[qe] = true, this[Dt]("nullBlock"));
79309
- else if (this[qe] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
79309
+ if (i.nullBlock) this[je] ? (this[Qe] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
79310
+ else if (this[je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
79310
79311
  else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
79311
79312
  else {
79312
79313
  let r = i.type;
@@ -79314,52 +79315,52 @@ var st = class extends import_events2.EventEmitter {
79314
79315
  else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
79315
79316
  else {
79316
79317
  let n = this[Nt] = new Yt(i, this[V], this[ae]);
79317
- if (!this[At]) if (n.remain) {
79318
+ if (!this[Dt]) if (n.remain) {
79318
79319
  let o = () => {
79319
- n.invalid || (this[At] = true);
79320
+ n.invalid || (this[Dt] = true);
79320
79321
  };
79321
79322
  n.on("end", o);
79322
- } else this[At] = true;
79323
- n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[Dt]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[ft] = "", n.on("data", (o) => this[ft] += o), this[B] = "meta") : (this[V] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[Dt]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[et] ? this[it].push(n) : (this[it].push(n), this[zi]())));
79323
+ } else this[Dt] = true;
79324
+ n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[ft] = "", n.on("data", (o) => this[ft] += o), this[B] = "meta") : (this[V] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[et] ? this[it].push(n) : (this[it].push(n), this[Ui]())));
79324
79325
  }
79325
79326
  }
79326
79327
  }
79327
- [Ys]() {
79328
+ [Zs]() {
79328
79329
  queueMicrotask(() => this.emit("close"));
79329
79330
  }
79330
- [Hs](t) {
79331
+ [Us](t) {
79331
79332
  let e = true;
79332
79333
  if (!t) this[et] = void 0, e = false;
79333
79334
  else if (Array.isArray(t)) {
79334
79335
  let [i, ...r] = t;
79335
79336
  this.emit(i, ...r);
79336
- } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[zi]()), e = false);
79337
+ } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Ui]()), e = false);
79337
79338
  return e;
79338
79339
  }
79339
- [zi]() {
79340
+ [Ui]() {
79340
79341
  do
79341
79342
  ;
79342
- while (this[Hs](this[it].shift()));
79343
- if (!this[it].length) {
79343
+ while (this[Us](this[it].shift()));
79344
+ if (this[it].length === 0) {
79344
79345
  let t = this[et];
79345
79346
  !t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
79346
79347
  }
79347
79348
  }
79348
- [Hi](t, e) {
79349
+ [Wi](t, e) {
79349
79350
  let i = this[Nt];
79350
79351
  if (!i) throw new Error("attempt to consume body without entry??");
79351
79352
  let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
79352
79353
  return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
79353
79354
  }
79354
- [Gs](t, e) {
79355
- let i = this[Nt], r = this[Hi](t, e);
79356
- return !this[Nt] && i && this[Ws](i), r;
79355
+ [Ws](t, e) {
79356
+ let i = this[Nt], r = this[Wi](t, e);
79357
+ return !this[Nt] && i && this[Hs](i), r;
79357
79358
  }
79358
- [Dt](t, e, i) {
79359
- !this[it].length && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
79359
+ [At](t, e, i) {
79360
+ this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
79360
79361
  }
79361
- [Ws](t) {
79362
- switch (this[Dt]("meta", this[ft]), t.type) {
79362
+ [Hs](t) {
79363
+ switch (this[At]("meta", this[ft]), t.type) {
79363
79364
  case "ExtendedHeader":
79364
79365
  case "OldExtendedHeader":
79365
79366
  this[V] = ct.parse(this[ft], this[V], false);
@@ -79388,12 +79389,12 @@ var st = class extends import_events2.EventEmitter {
79388
79389
  write(t, e, i) {
79389
79390
  if (typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8")), this[ut]) return i?.(), false;
79390
79391
  if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
79391
- if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < yn) return this[p] = t, i?.(), true;
79392
- for (let a = 0; this[y] === void 0 && a < Gi.length; a++) t[a] !== Gi[a] && (this[y] = false);
79392
+ if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < Sn) return this[p] = t, i?.(), true;
79393
+ for (let a = 0; this[y] === void 0 && a < Zi.length; a++) t[a] !== Zi[a] && (this[y] = false);
79393
79394
  let o = false;
79394
79395
  if (this[y] === false && this.zstd !== false) {
79395
79396
  o = true;
79396
- for (let a = 0; a < Zi.length; a++) if (t[a] !== Zi[a]) {
79397
+ for (let a = 0; a < Yi.length; a++) if (t[a] !== Yi[a]) {
79397
79398
  o = false;
79398
79399
  break;
79399
79400
  }
@@ -79408,69 +79409,69 @@ var st = class extends import_events2.EventEmitter {
79408
79409
  }
79409
79410
  if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
79410
79411
  let a = this[dt];
79411
- this[dt] = false, this[y] = this[y] === void 0 ? new Pe({}) : o ? new Ze({}) : new He({}), this[y].on("data", (c) => this[Ke](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
79412
- this[dt] = true, this[Ke]();
79412
+ this[dt] = false, this[y] = this[y] === void 0 ? new ze({}) : o ? new Ye({}) : new We({}), this[y].on("data", (c) => this[Ve](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
79413
+ this[dt] = true, this[Ve]();
79413
79414
  }), this[Kt] = true;
79414
79415
  let l = !!this[y][a ? "end" : "write"](t);
79415
79416
  return this[Kt] = false, i?.(), l;
79416
79417
  }
79417
79418
  }
79418
- this[Kt] = true, this[y] ? this[y].write(t) : this[Ke](t), this[Kt] = false;
79419
- let n = this[it].length ? false : this[et] ? this[et].flowing : true;
79420
- return !n && !this[it].length && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
79419
+ this[Kt] = true, this[y] ? this[y].write(t) : this[Ve](t), this[Kt] = false;
79420
+ let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
79421
+ return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
79421
79422
  }
79422
- [Wi](t) {
79423
+ [Gi](t) {
79423
79424
  t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
79424
79425
  }
79425
- [$e]() {
79426
- if (this[dt] && !this[Ui] && !this[ut] && !this[le]) {
79427
- this[Ui] = true;
79426
+ [Xe]() {
79427
+ if (this[dt] && !this[Hi] && !this[ut] && !this[le]) {
79428
+ this[Hi] = true;
79428
79429
  let t = this[Nt];
79429
79430
  if (t && t.blockRemain) {
79430
79431
  let e = this[p] ? this[p].length : 0;
79431
79432
  this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`, { entry: t }), this[p] && t.write(this[p]), t.end();
79432
79433
  }
79433
- this[Dt](Xe);
79434
+ this[At](qe);
79434
79435
  }
79435
79436
  }
79436
- [Ke](t) {
79437
- if (this[le] && t) this[Wi](t);
79438
- else if (!t && !this[p]) this[$e]();
79437
+ [Ve](t) {
79438
+ if (this[le] && t) this[Gi](t);
79439
+ else if (!t && !this[p]) this[Xe]();
79439
79440
  else if (t) {
79440
79441
  if (this[le] = true, this[p]) {
79441
- this[Wi](t);
79442
+ this[Gi](t);
79442
79443
  let e = this[p];
79443
- this[p] = void 0, this[Ve](e);
79444
- } else this[Ve](t);
79445
- for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[je]; ) {
79444
+ this[p] = void 0, this[$e](e);
79445
+ } else this[$e](t);
79446
+ for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[Qe]; ) {
79446
79447
  let e = this[p];
79447
- this[p] = void 0, this[Ve](e);
79448
+ this[p] = void 0, this[$e](e);
79448
79449
  }
79449
79450
  this[le] = false;
79450
79451
  }
79451
- (!this[p] || this[dt]) && this[$e]();
79452
+ (!this[p] || this[dt]) && this[Xe]();
79452
79453
  }
79453
- [Ve](t) {
79454
+ [$e](t) {
79454
79455
  let e = 0, i = t.length;
79455
- for (; e + 512 <= i && !this[ut] && !this[je]; ) switch (this[B]) {
79456
+ for (; e + 512 <= i && !this[ut] && !this[Qe]; ) switch (this[B]) {
79456
79457
  case "begin":
79457
79458
  case "header":
79458
- this[Zs](t, e), e += 512;
79459
+ this[Gs](t, e), e += 512;
79459
79460
  break;
79460
79461
  case "ignore":
79461
79462
  case "body":
79462
- e += this[Hi](t, e);
79463
+ e += this[Wi](t, e);
79463
79464
  break;
79464
79465
  case "meta":
79465
- e += this[Gs](t, e);
79466
+ e += this[Ws](t, e);
79466
79467
  break;
79467
79468
  default:
79468
79469
  throw new Error("invalid state: " + this[B]);
79469
79470
  }
79470
- e < i && (this[p] ? this[p] = Buffer.concat([t.subarray(e), this[p]]) : this[p] = t.subarray(e));
79471
+ e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
79471
79472
  }
79472
79473
  end(t, e, i) {
79473
- 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[ut] || (this[y] ? (t && this[y].write(t), this[y].end()) : (this[dt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[$e]())), this;
79474
+ 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[ut] || (this[y] ? (t && this[y].write(t), this[y].end()) : (this[dt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Xe]())), this;
79474
79475
  }
79475
79476
  };
79476
79477
  var mt = (s3) => {
@@ -79484,19 +79485,19 @@ var _n = (s3) => {
79484
79485
  t(e), e.resume();
79485
79486
  } : (e) => e.resume();
79486
79487
  };
79487
- var Yi = (s3, t) => {
79488
+ var Ki = (s3, t) => {
79488
79489
  let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
79489
79490
  let h = o || (0, import_path2.parse)(n).root || ".", a;
79490
79491
  if (n === h) a = false;
79491
79492
  else {
79492
79493
  let l = e.get(n);
79493
- l !== void 0 ? a = l : a = r((0, import_path2.dirname)(n), h);
79494
+ a = l !== void 0 ? l : r((0, import_path2.dirname)(n), h);
79494
79495
  }
79495
79496
  return e.set(n, a), a;
79496
79497
  };
79497
79498
  s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
79498
79499
  };
79499
- var On = (s3) => {
79500
+ var gn = (s3) => {
79500
79501
  let t = new st(s3), e = s3.file, i;
79501
79502
  try {
79502
79503
  i = import_node_fs.default.openSync(e, "r");
@@ -79520,58 +79521,58 @@ var On = (s3) => {
79520
79521
  }
79521
79522
  }
79522
79523
  };
79523
- var Tn = (s3, t) => {
79524
+ var On = (s3, t) => {
79524
79525
  let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
79525
79526
  return new Promise((o, h) => {
79526
79527
  e.on("error", h), e.on("end", o), import_node_fs.default.stat(r, (a, l) => {
79527
79528
  if (a) h(a);
79528
79529
  else {
79529
- let c = new gt(r, { readSize: i, size: l.size });
79530
+ let c = new _t(r, { readSize: i, size: l.size });
79530
79531
  c.on("error", h), c.pipe(e);
79531
79532
  }
79532
79533
  });
79533
79534
  });
79534
79535
  };
79535
- var It = K(On, Tn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
79536
- t?.length && Yi(s3, t), s3.noResume || _n(s3);
79536
+ var It = K(gn, On, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
79537
+ t?.length && Ki(s3, t), s3.noResume || _n(s3);
79537
79538
  });
79538
- var Ki = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
79539
- var { isAbsolute: Ln, parse: Ks } = import_node_path4.win32;
79539
+ var Vi = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
79540
+ var { isAbsolute: xn, parse: Ys } = import_node_path4.win32;
79540
79541
  var ce = (s3) => {
79541
- let t = "", e = Ks(s3);
79542
- for (; Ln(s3) || e.root; ) {
79542
+ let t = "", e = Ys(s3);
79543
+ for (; xn(s3) || e.root; ) {
79543
79544
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
79544
- s3 = s3.slice(i.length), t += i, e = Ks(s3);
79545
+ s3 = s3.slice(i.length), t += i, e = Ys(s3);
79545
79546
  }
79546
79547
  return [t, s3];
79547
79548
  };
79548
- var Qe = ["|", "<", ">", "?", ":"];
79549
- var Vi = Qe.map((s3) => String.fromCharCode(61440 + s3.charCodeAt(0)));
79550
- var Nn = new Map(Qe.map((s3, t) => [s3, Vi[t]]));
79551
- var Dn = new Map(Vi.map((s3, t) => [s3, Qe[t]]));
79552
- var $i = (s3) => Qe.reduce((t, e) => t.split(e).join(Nn.get(e)), s3);
79553
- var Vs = (s3) => Vi.reduce((t, e) => t.split(e).join(Dn.get(e)), s3);
79554
- var tr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
79549
+ var Je = ["|", "<", ">", "?", ":"];
79550
+ var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
79551
+ var Ln = new Map(Je.map((s3, t) => [s3, $i[t]]));
79552
+ var Nn = new Map($i.map((s3, t) => [s3, Je[t]]));
79553
+ var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Ln.get(e)), s3);
79554
+ var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(Nn.get(e)), s3);
79555
+ var Js = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
79555
79556
  var An = 16 * 1024 * 1024;
79556
- var qs = /* @__PURE__ */ Symbol("process");
79557
- var js = /* @__PURE__ */ Symbol("file");
79558
- var Qs = /* @__PURE__ */ Symbol("directory");
79559
- var qi = /* @__PURE__ */ Symbol("symlink");
79560
- var Js = /* @__PURE__ */ Symbol("hardlink");
79557
+ var Xs = /* @__PURE__ */ Symbol("process");
79558
+ var qs = /* @__PURE__ */ Symbol("file");
79559
+ var js = /* @__PURE__ */ Symbol("directory");
79560
+ var ji = /* @__PURE__ */ Symbol("symlink");
79561
+ var Qs = /* @__PURE__ */ Symbol("hardlink");
79561
79562
  var fe = /* @__PURE__ */ Symbol("header");
79562
- var Je = /* @__PURE__ */ Symbol("read");
79563
- var ji = /* @__PURE__ */ Symbol("lstat");
79564
- var ti = /* @__PURE__ */ Symbol("onlstat");
79565
- var Qi = /* @__PURE__ */ Symbol("onread");
79566
- var Ji = /* @__PURE__ */ Symbol("onreadlink");
79567
- var ts = /* @__PURE__ */ Symbol("openfile");
79568
- var es = /* @__PURE__ */ Symbol("onopenfile");
79563
+ var ti = /* @__PURE__ */ Symbol("read");
79564
+ var Qi = /* @__PURE__ */ Symbol("lstat");
79565
+ var ei = /* @__PURE__ */ Symbol("onlstat");
79566
+ var Ji = /* @__PURE__ */ Symbol("onread");
79567
+ var ts = /* @__PURE__ */ Symbol("onreadlink");
79568
+ var es = /* @__PURE__ */ Symbol("openfile");
79569
+ var is = /* @__PURE__ */ Symbol("onopenfile");
79569
79570
  var pt = /* @__PURE__ */ Symbol("close");
79570
- var ei = /* @__PURE__ */ Symbol("mode");
79571
- var is = /* @__PURE__ */ Symbol("awaitDrain");
79572
- var Xi = /* @__PURE__ */ Symbol("ondrain");
79571
+ var ii = /* @__PURE__ */ Symbol("mode");
79572
+ var ss = /* @__PURE__ */ Symbol("awaitDrain");
79573
+ var qi = /* @__PURE__ */ Symbol("ondrain");
79573
79574
  var X = /* @__PURE__ */ Symbol("prefix");
79574
- var de = class extends A {
79575
+ var de = class extends D {
79575
79576
  path;
79576
79577
  portable;
79577
79578
  myuid = process.getuid && process.getuid() || 0;
@@ -79610,9 +79611,9 @@ var de = class extends A {
79610
79611
  let [o, h] = ce(this.path);
79611
79612
  o && typeof h == "string" && (this.path = h, r = o);
79612
79613
  }
79613
- this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Vs(this.path.replace(/\\/g, "/")), t = t.replace(/\\/g, "/")), this.absolute = f(i.absolute || import_path3.default.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
79614
+ this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Ks(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || import_path3.default.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
79614
79615
  let n = this.statCache.get(this.absolute);
79615
- n ? this[ti](n) : this[ji]();
79616
+ n ? this[ei](n) : this[Qi]();
79616
79617
  }
79617
79618
  warn(t, e, i = {}) {
79618
79619
  return Lt(this, t, e, i);
@@ -79620,93 +79621,93 @@ var de = class extends A {
79620
79621
  emit(t, ...e) {
79621
79622
  return t === "error" && (this.#t = true), super.emit(t, ...e);
79622
79623
  }
79623
- [ji]() {
79624
+ [Qi]() {
79624
79625
  import_fs4.default.lstat(this.absolute, (t, e) => {
79625
79626
  if (t) return this.emit("error", t);
79626
- this[ti](e);
79627
+ this[ei](e);
79627
79628
  });
79628
79629
  }
79629
- [ti](t) {
79630
- this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = In(t), this.emit("stat", t), this[qs]();
79630
+ [ei](t) {
79631
+ this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Dn(t), this.emit("stat", t), this[Xs]();
79631
79632
  }
79632
- [qs]() {
79633
+ [Xs]() {
79633
79634
  switch (this.type) {
79634
79635
  case "File":
79635
- return this[js]();
79636
+ return this[qs]();
79636
79637
  case "Directory":
79637
- return this[Qs]();
79638
+ return this[js]();
79638
79639
  case "SymbolicLink":
79639
- return this[qi]();
79640
+ return this[ji]();
79640
79641
  default:
79641
79642
  return this.end();
79642
79643
  }
79643
79644
  }
79644
- [ei](t) {
79645
- return Ki(t, this.type === "Directory", this.portable);
79645
+ [ii](t) {
79646
+ return Vi(t, this.type === "Directory", this.portable);
79646
79647
  }
79647
79648
  [X](t) {
79648
- return tr(t, this.prefix);
79649
+ return Js(t, this.prefix);
79649
79650
  }
79650
79651
  [fe]() {
79651
79652
  if (!this.stat) throw new Error("cannot write header before stat");
79652
- this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this[ei](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
79653
+ this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this[ii](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
79653
79654
  let t = this.header?.block;
79654
79655
  if (!t) throw new Error("failed to encode header");
79655
79656
  super.write(t);
79656
79657
  }
79657
- [Qs]() {
79658
+ [js]() {
79658
79659
  if (!this.stat) throw new Error("cannot create directory entry without stat");
79659
79660
  this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
79660
79661
  }
79661
- [qi]() {
79662
+ [ji]() {
79662
79663
  import_fs4.default.readlink(this.absolute, (t, e) => {
79663
79664
  if (t) return this.emit("error", t);
79664
- this[Ji](e);
79665
+ this[ts](e);
79665
79666
  });
79666
79667
  }
79667
- [Ji](t) {
79668
+ [ts](t) {
79668
79669
  this.linkpath = f(t), this[fe](), this.end();
79669
79670
  }
79670
- [Js](t) {
79671
+ [Qs](t) {
79671
79672
  if (!this.stat) throw new Error("cannot create link entry without stat");
79672
79673
  this.type = "Link", this.linkpath = f(import_path3.default.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
79673
79674
  }
79674
- [js]() {
79675
+ [qs]() {
79675
79676
  if (!this.stat) throw new Error("cannot create file entry without stat");
79676
79677
  if (this.stat.nlink > 1) {
79677
79678
  let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
79678
- if (e?.indexOf(this.cwd) === 0) return this[Js](e);
79679
+ if (e?.indexOf(this.cwd) === 0) return this[Qs](e);
79679
79680
  this.linkCache.set(t, this.absolute);
79680
79681
  }
79681
79682
  if (this[fe](), this.stat.size === 0) return this.end();
79682
- this[ts]();
79683
+ this[es]();
79683
79684
  }
79684
- [ts]() {
79685
+ [es]() {
79685
79686
  import_fs4.default.open(this.absolute, "r", (t, e) => {
79686
79687
  if (t) return this.emit("error", t);
79687
- this[es](e);
79688
+ this[is](e);
79688
79689
  });
79689
79690
  }
79690
- [es](t) {
79691
+ [is](t) {
79691
79692
  if (this.fd = t, this.#t) return this[pt]();
79692
79693
  if (!this.stat) throw new Error("should stat before calling onopenfile");
79693
79694
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
79694
79695
  let e = Math.min(this.blockLen, this.maxReadSize);
79695
- this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[Je]();
79696
+ this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ti]();
79696
79697
  }
79697
- [Je]() {
79698
+ [ti]() {
79698
79699
  let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
79699
79700
  if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
79700
79701
  import_fs4.default.read(t, e, i, r, n, (o, h) => {
79701
79702
  if (o) return this[pt](() => this.emit("error", o));
79702
- this[Qi](h);
79703
+ this[Ji](h);
79703
79704
  });
79704
79705
  }
79705
79706
  [pt](t = () => {
79706
79707
  }) {
79707
79708
  this.fd !== void 0 && import_fs4.default.close(this.fd, t);
79708
79709
  }
79709
- [Qi](t) {
79710
+ [Ji](t) {
79710
79711
  if (t <= 0 && this.remain > 0) {
79711
79712
  let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
79712
79713
  return this[pt](() => this.emit("error", r));
@@ -79718,9 +79719,9 @@ var de = class extends A {
79718
79719
  if (!this.buf) throw new Error("should have created buffer prior to reading");
79719
79720
  if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
79720
79721
  let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
79721
- this.write(e) ? this[Xi]() : this[is](() => this[Xi]());
79722
+ this.write(e) ? this[qi]() : this[ss](() => this[qi]());
79722
79723
  }
79723
- [is](t) {
79724
+ [ss](t) {
79724
79725
  this.once("drain", t);
79725
79726
  }
79726
79727
  write(t, e, i) {
@@ -79730,30 +79731,30 @@ var de = class extends A {
79730
79731
  }
79731
79732
  return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
79732
79733
  }
79733
- [Xi]() {
79734
+ [qi]() {
79734
79735
  if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
79735
79736
  if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
79736
- this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[Je]();
79737
+ this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ti]();
79737
79738
  }
79738
79739
  };
79739
- var ii = class extends de {
79740
+ var si = class extends de {
79740
79741
  sync = true;
79741
- [ji]() {
79742
- this[ti](import_fs4.default.lstatSync(this.absolute));
79742
+ [Qi]() {
79743
+ this[ei](import_fs4.default.lstatSync(this.absolute));
79743
79744
  }
79744
- [qi]() {
79745
- this[Ji](import_fs4.default.readlinkSync(this.absolute));
79745
+ [ji]() {
79746
+ this[ts](import_fs4.default.readlinkSync(this.absolute));
79746
79747
  }
79747
- [ts]() {
79748
- this[es](import_fs4.default.openSync(this.absolute, "r"));
79748
+ [es]() {
79749
+ this[is](import_fs4.default.openSync(this.absolute, "r"));
79749
79750
  }
79750
- [Je]() {
79751
+ [ti]() {
79751
79752
  let t = true;
79752
79753
  try {
79753
79754
  let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
79754
79755
  if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
79755
79756
  let h = import_fs4.default.readSync(e, i, r, n, o);
79756
- this[Qi](h), t = false;
79757
+ this[Ji](h), t = false;
79757
79758
  } finally {
79758
79759
  if (t) try {
79759
79760
  this[pt](() => {
@@ -79762,7 +79763,7 @@ var ii = class extends de {
79762
79763
  }
79763
79764
  }
79764
79765
  }
79765
- [is](t) {
79766
+ [ss](t) {
79766
79767
  t();
79767
79768
  }
79768
79769
  [pt](t = () => {
@@ -79770,7 +79771,7 @@ var ii = class extends de {
79770
79771
  this.fd !== void 0 && import_fs4.default.closeSync(this.fd), t();
79771
79772
  }
79772
79773
  };
79773
- var si = class extends A {
79774
+ var ri = class extends D {
79774
79775
  blockLen = 0;
79775
79776
  blockRemain = 0;
79776
79777
  buf = 0;
@@ -79806,7 +79807,7 @@ var si = class extends A {
79806
79807
  super(), this.preservePaths = !!i.preservePaths, this.portable = !!i.portable, this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.onWriteEntry = i.onWriteEntry, this.readEntry = t;
79807
79808
  let { type: r } = t;
79808
79809
  if (r === "Unsupported") throw new Error("writing entry that should be ignored");
79809
- this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[ei](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
79810
+ this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[ii](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
79810
79811
  let n = false;
79811
79812
  if (!this.preservePaths) {
79812
79813
  let [h, a] = ce(this.path);
@@ -79818,10 +79819,10 @@ var si = class extends A {
79818
79819
  super.write(o), t.pipe(this);
79819
79820
  }
79820
79821
  [X](t) {
79821
- return tr(t, this.prefix);
79822
+ return Js(t, this.prefix);
79822
79823
  }
79823
- [ei](t) {
79824
- return Ki(t, this.type === "Directory", this.portable);
79824
+ [ii](t) {
79825
+ return Vi(t, this.type === "Directory", this.portable);
79825
79826
  }
79826
79827
  write(t, e, i) {
79827
79828
  typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
@@ -79833,8 +79834,8 @@ var si = class extends A {
79833
79834
  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;
79834
79835
  }
79835
79836
  };
79836
- var In = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
79837
- var ri = class s2 {
79837
+ var Dn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
79838
+ var ni = class s2 {
79838
79839
  tail;
79839
79840
  head;
79840
79841
  length = 0;
@@ -79865,11 +79866,11 @@ var ri = class s2 {
79865
79866
  t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
79866
79867
  }
79867
79868
  push(...t) {
79868
- for (let e = 0, i = t.length; e < i; e++) Fn(this, t[e]);
79869
+ for (let e = 0, i = t.length; e < i; e++) Cn(this, t[e]);
79869
79870
  return this.length;
79870
79871
  }
79871
79872
  unshift(...t) {
79872
- for (var e = 0, i = t.length; e < i; e++) kn(this, t[e]);
79873
+ for (var e = 0, i = t.length; e < i; e++) Fn(this, t[e]);
79873
79874
  return this.length;
79874
79875
  }
79875
79876
  pop() {
@@ -79965,7 +79966,7 @@ var ri = class s2 {
79965
79966
  let n = [];
79966
79967
  for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
79967
79968
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
79968
- for (let o of i) r = Cn(this, r, o);
79969
+ for (let o of i) r = In(this, r, o);
79969
79970
  return n;
79970
79971
  }
79971
79972
  reverse() {
@@ -79977,14 +79978,14 @@ var ri = class s2 {
79977
79978
  return this.head = e, this.tail = t, this;
79978
79979
  }
79979
79980
  };
79980
- function Cn(s3, t, e) {
79981
+ function In(s3, t, e) {
79981
79982
  let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
79982
79983
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
79983
79984
  }
79984
- function Fn(s3, t) {
79985
+ function Cn(s3, t) {
79985
79986
  s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
79986
79987
  }
79987
- function kn(s3, t) {
79988
+ function Fn(s3, t) {
79988
79989
  s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
79989
79990
  }
79990
79991
  var ue = class {
@@ -79996,7 +79997,7 @@ var ue = class {
79996
79997
  this.list = r, this.value = t, e ? (e.next = this, this.prev = e) : this.prev = void 0, i ? (i.prev = this, this.next = i) : this.next = void 0;
79997
79998
  }
79998
79999
  };
79999
- var fi = class {
80000
+ var di = class {
80000
80001
  path;
80001
80002
  absolute;
80002
80003
  entry;
@@ -80009,28 +80010,28 @@ var fi = class {
80009
80010
  this.path = t || "./", this.absolute = e;
80010
80011
  }
80011
80012
  };
80012
- var er = Buffer.alloc(1024);
80013
- var ni = /* @__PURE__ */ Symbol("onStat");
80013
+ var tr = Buffer.alloc(1024);
80014
+ var oi = /* @__PURE__ */ Symbol("onStat");
80014
80015
  var me = /* @__PURE__ */ Symbol("ended");
80015
80016
  var W = /* @__PURE__ */ Symbol("queue");
80016
80017
  var Ct = /* @__PURE__ */ Symbol("current");
80017
80018
  var Ft = /* @__PURE__ */ Symbol("process");
80018
80019
  var pe = /* @__PURE__ */ Symbol("processing");
80019
- var ss = /* @__PURE__ */ Symbol("processJob");
80020
+ var rs = /* @__PURE__ */ Symbol("processJob");
80020
80021
  var G = /* @__PURE__ */ Symbol("jobs");
80021
- var rs = /* @__PURE__ */ Symbol("jobDone");
80022
- var oi = /* @__PURE__ */ Symbol("addFSEntry");
80023
- var ir = /* @__PURE__ */ Symbol("addTarEntry");
80024
- var hs = /* @__PURE__ */ Symbol("stat");
80025
- var as = /* @__PURE__ */ Symbol("readdir");
80026
- var hi = /* @__PURE__ */ Symbol("onreaddir");
80027
- var ai = /* @__PURE__ */ Symbol("pipe");
80028
- var sr = /* @__PURE__ */ Symbol("entry");
80029
- var ns = /* @__PURE__ */ Symbol("entryOpt");
80030
- var li = /* @__PURE__ */ Symbol("writeEntryClass");
80031
- var nr = /* @__PURE__ */ Symbol("write");
80032
- var os2 = /* @__PURE__ */ Symbol("ondrain");
80033
- var Et = class extends A {
80022
+ var ns = /* @__PURE__ */ Symbol("jobDone");
80023
+ var hi = /* @__PURE__ */ Symbol("addFSEntry");
80024
+ var er = /* @__PURE__ */ Symbol("addTarEntry");
80025
+ var as = /* @__PURE__ */ Symbol("stat");
80026
+ var ls = /* @__PURE__ */ Symbol("readdir");
80027
+ var ai = /* @__PURE__ */ Symbol("onreaddir");
80028
+ var li = /* @__PURE__ */ Symbol("pipe");
80029
+ var ir = /* @__PURE__ */ Symbol("entry");
80030
+ var os2 = /* @__PURE__ */ Symbol("entryOpt");
80031
+ var ci = /* @__PURE__ */ Symbol("writeEntryClass");
80032
+ var rr = /* @__PURE__ */ Symbol("write");
80033
+ var hs = /* @__PURE__ */ Symbol("ondrain");
80034
+ var Et = class extends D {
80034
80035
  sync = false;
80035
80036
  opt;
80036
80037
  cwd;
@@ -80051,22 +80052,22 @@ var Et = class extends A {
80051
80052
  mtime;
80052
80053
  filter;
80053
80054
  jobs;
80054
- [li];
80055
+ [ci];
80055
80056
  onWriteEntry;
80056
80057
  [W];
80057
80058
  [G] = 0;
80058
80059
  [pe] = false;
80059
80060
  [me] = false;
80060
80061
  constructor(t = {}) {
80061
- 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[li] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
80062
+ 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[ci] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
80062
80063
  if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
80063
- if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new Be(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new Ue(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ge(t.zstd)), !this.zip) throw new Error("impossible");
80064
+ if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new Pe(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new He(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ze(t.zstd)), !this.zip) throw new Error("impossible");
80064
80065
  let e = this.zip;
80065
- e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[os2]()), this.on("resume", () => e.resume());
80066
- } else this.on("drain", this[os2]);
80067
- 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 ri(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[pe] = false, this[me] = false;
80066
+ e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[hs]()), this.on("resume", () => e.resume());
80067
+ } else this.on("drain", this[hs]);
80068
+ 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 ni(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[pe] = false, this[me] = false;
80068
80069
  }
80069
- [nr](t) {
80070
+ [rr](t) {
80070
80071
  return super.write(t);
80071
80072
  }
80072
80073
  add(t) {
@@ -80077,97 +80078,97 @@ var Et = class extends A {
80077
80078
  }
80078
80079
  write(t) {
80079
80080
  if (this[me]) throw new Error("write after end");
80080
- return t instanceof Yt ? this[ir](t) : this[oi](t), this.flowing;
80081
+ return t instanceof Yt ? this[er](t) : this[hi](t), this.flowing;
80081
80082
  }
80082
- [ir](t) {
80083
+ [er](t) {
80083
80084
  let e = f(import_path4.default.resolve(this.cwd, t.path));
80084
80085
  if (!this.filter(t.path, t)) t.resume();
80085
80086
  else {
80086
- let i = new fi(t.path, e);
80087
- i.entry = new si(t, this[ns](i)), i.entry.on("end", () => this[rs](i)), this[G] += 1, this[W].push(i);
80087
+ let i = new di(t.path, e);
80088
+ i.entry = new ri(t, this[os2](i)), i.entry.on("end", () => this[ns](i)), this[G] += 1, this[W].push(i);
80088
80089
  }
80089
80090
  this[Ft]();
80090
80091
  }
80091
- [oi](t) {
80092
+ [hi](t) {
80092
80093
  let e = f(import_path4.default.resolve(this.cwd, t));
80093
- this[W].push(new fi(t, e)), this[Ft]();
80094
+ this[W].push(new di(t, e)), this[Ft]();
80094
80095
  }
80095
- [hs](t) {
80096
+ [as](t) {
80096
80097
  t.pending = true, this[G] += 1;
80097
80098
  let e = this.follow ? "stat" : "lstat";
80098
80099
  import_fs3.default[e](t.absolute, (i, r) => {
80099
- t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[ni](t, r);
80100
+ t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[oi](t, r);
80100
80101
  });
80101
80102
  }
80102
- [ni](t, e) {
80103
- this.statCache.set(t.absolute, e), t.stat = e, this.filter(t.path, e) ? e.isFile() && e.nlink > 1 && t === this[Ct] && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync && this[ss](t) : t.ignore = true, this[Ft]();
80103
+ [oi](t, e) {
80104
+ this.statCache.set(t.absolute, e), t.stat = e, this.filter(t.path, e) ? e.isFile() && e.nlink > 1 && t === this[Ct] && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync && this[rs](t) : t.ignore = true, this[Ft]();
80104
80105
  }
80105
- [as](t) {
80106
+ [ls](t) {
80106
80107
  t.pending = true, this[G] += 1, import_fs3.default.readdir(t.absolute, (e, i) => {
80107
80108
  if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
80108
- this[hi](t, i);
80109
+ this[ai](t, i);
80109
80110
  });
80110
80111
  }
80111
- [hi](t, e) {
80112
+ [ai](t, e) {
80112
80113
  this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
80113
80114
  }
80114
80115
  [Ft]() {
80115
80116
  if (!this[pe]) {
80116
80117
  this[pe] = true;
80117
- for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[ss](t.value), t.value.ignore) {
80118
+ for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[rs](t.value), t.value.ignore) {
80118
80119
  let e = t.next;
80119
80120
  this[W].removeNode(t), t.next = e;
80120
80121
  }
80121
- this[pe] = false, this[me] && !this[W].length && this[G] === 0 && (this.zip ? this.zip.end(er) : (super.write(er), super.end()));
80122
+ this[pe] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(tr) : (super.write(tr), super.end()));
80122
80123
  }
80123
80124
  }
80124
80125
  get [Ct]() {
80125
80126
  return this[W] && this[W].head && this[W].head.value;
80126
80127
  }
80127
- [rs](t) {
80128
+ [ns](t) {
80128
80129
  this[W].shift(), this[G] -= 1, this[Ft]();
80129
80130
  }
80130
- [ss](t) {
80131
+ [rs](t) {
80131
80132
  if (!t.pending) {
80132
80133
  if (t.entry) {
80133
- t === this[Ct] && !t.piped && this[ai](t);
80134
+ t === this[Ct] && !t.piped && this[li](t);
80134
80135
  return;
80135
80136
  }
80136
80137
  if (!t.stat) {
80137
80138
  let e = this.statCache.get(t.absolute);
80138
- e ? this[ni](t, e) : this[hs](t);
80139
+ e ? this[oi](t, e) : this[as](t);
80139
80140
  }
80140
80141
  if (t.stat && !t.ignore) {
80141
80142
  if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
80142
80143
  let e = this.readdirCache.get(t.absolute);
80143
- if (e ? this[hi](t, e) : this[as](t), !t.readdir) return;
80144
+ if (e ? this[ai](t, e) : this[ls](t), !t.readdir) return;
80144
80145
  }
80145
- if (t.entry = this[sr](t), !t.entry) {
80146
+ if (t.entry = this[ir](t), !t.entry) {
80146
80147
  t.ignore = true;
80147
80148
  return;
80148
80149
  }
80149
- t === this[Ct] && !t.piped && this[ai](t);
80150
+ t === this[Ct] && !t.piped && this[li](t);
80150
80151
  }
80151
80152
  }
80152
80153
  }
80153
- [ns](t) {
80154
+ [os2](t) {
80154
80155
  return { onwarn: (e, i, r) => this.warn(e, i, r), noPax: this.noPax, cwd: this.cwd, absolute: t.absolute, preservePaths: this.preservePaths, maxReadSize: this.maxReadSize, strict: this.strict, portable: this.portable, linkCache: this.linkCache, statCache: this.statCache, noMtime: this.noMtime, mtime: this.mtime, prefix: this.prefix, onWriteEntry: this.onWriteEntry };
80155
80156
  }
80156
- [sr](t) {
80157
+ [ir](t) {
80157
80158
  this[G] += 1;
80158
80159
  try {
80159
- return new this[li](t.path, this[ns](t)).on("end", () => this[rs](t)).on("error", (i) => this.emit("error", i));
80160
+ return new this[ci](t.path, this[os2](t)).on("end", () => this[ns](t)).on("error", (i) => this.emit("error", i));
80160
80161
  } catch (e) {
80161
80162
  this.emit("error", e);
80162
80163
  }
80163
80164
  }
80164
- [os2]() {
80165
+ [hs]() {
80165
80166
  this[Ct] && this[Ct].entry && this[Ct].entry.resume();
80166
80167
  }
80167
- [ai](t) {
80168
+ [li](t) {
80168
80169
  t.piped = true, t.readdir && t.readdir.forEach((r) => {
80169
80170
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
80170
- this[oi](o + r);
80171
+ this[hi](o + r);
80171
80172
  });
80172
80173
  let e = t.entry, i = this.zip;
80173
80174
  if (!e) throw new Error("cannot pipe without source");
@@ -80187,131 +80188,128 @@ var Et = class extends A {
80187
80188
  var kt = class extends Et {
80188
80189
  sync = true;
80189
80190
  constructor(t) {
80190
- super(t), this[li] = ii;
80191
+ super(t), this[ci] = si;
80191
80192
  }
80192
80193
  pause() {
80193
80194
  }
80194
80195
  resume() {
80195
80196
  }
80196
- [hs](t) {
80197
+ [as](t) {
80197
80198
  let e = this.follow ? "statSync" : "lstatSync";
80198
- this[ni](t, import_fs3.default[e](t.absolute));
80199
+ this[oi](t, import_fs3.default[e](t.absolute));
80199
80200
  }
80200
- [as](t) {
80201
- this[hi](t, import_fs3.default.readdirSync(t.absolute));
80201
+ [ls](t) {
80202
+ this[ai](t, import_fs3.default.readdirSync(t.absolute));
80202
80203
  }
80203
- [ai](t) {
80204
+ [li](t) {
80204
80205
  let e = t.entry, i = this.zip;
80205
80206
  if (t.readdir && t.readdir.forEach((r) => {
80206
80207
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
80207
- this[oi](o + r);
80208
+ this[hi](o + r);
80208
80209
  }), !e) throw new Error("Cannot pipe without source");
80209
80210
  i ? e.on("data", (r) => {
80210
80211
  i.write(r);
80211
80212
  }) : e.on("data", (r) => {
80212
- super[nr](r);
80213
+ super[rr](r);
80213
80214
  });
80214
80215
  }
80215
80216
  };
80216
- var vn = (s3, t) => {
80217
+ var kn = (s3, t) => {
80217
80218
  let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
80218
- e.pipe(i), hr(e, t);
80219
+ e.pipe(i), or(e, t);
80219
80220
  };
80220
- var Mn = (s3, t) => {
80221
+ var vn = (s3, t) => {
80221
80222
  let e = new Et(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
80222
80223
  e.pipe(i);
80223
80224
  let r = new Promise((n, o) => {
80224
80225
  i.on("error", o), i.on("close", n), e.on("error", o);
80225
80226
  });
80226
- return ar(e, t), r;
80227
+ return hr(e, t).catch((n) => e.emit("error", n)), r;
80227
80228
  };
80228
- var hr = (s3, t) => {
80229
+ var or = (s3, t) => {
80229
80230
  t.forEach((e) => {
80230
80231
  e.charAt(0) === "@" ? It({ file: import_node_path.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
80231
80232
  }), s3.end();
80232
80233
  };
80233
- var ar = async (s3, t) => {
80234
- for (let e = 0; e < t.length; e++) {
80235
- let i = String(t[e]);
80236
- i.charAt(0) === "@" ? await It({ file: import_node_path.default.resolve(String(s3.cwd), i.slice(1)), noResume: true, onReadEntry: (r) => {
80237
- s3.add(r);
80238
- } }) : s3.add(i);
80239
- }
80234
+ var hr = async (s3, t) => {
80235
+ for (let e of t) e.charAt(0) === "@" ? await It({ file: import_node_path.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
80236
+ s3.add(i);
80237
+ } }) : s3.add(e);
80240
80238
  s3.end();
80241
80239
  };
80242
- var Bn = (s3, t) => {
80240
+ var Mn = (s3, t) => {
80243
80241
  let e = new kt(s3);
80244
- return hr(e, t), e;
80242
+ return or(e, t), e;
80245
80243
  };
80246
- var Pn = (s3, t) => {
80244
+ var Bn = (s3, t) => {
80247
80245
  let e = new Et(s3);
80248
- return ar(e, t), e;
80246
+ return hr(e, t).catch((i) => e.emit("error", i)), e;
80249
80247
  };
80250
- var zn = K(vn, Mn, Bn, Pn, (s3, t) => {
80248
+ var Pn = K(kn, vn, Mn, Bn, (s3, t) => {
80251
80249
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
80252
80250
  });
80253
- var Un = process.env.__FAKE_PLATFORM__ || process.platform;
80254
- var Hn = Un === "win32";
80255
- var { O_CREAT: Wn, O_TRUNC: Gn, O_WRONLY: Zn } = import_fs5.default.constants;
80256
- var cr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs5.default.constants.UV_FS_O_FILEMAP || 0;
80257
- var Yn = Hn && !!cr;
80258
- var Kn = 512 * 1024;
80259
- var Vn = cr | Gn | Wn | Zn;
80260
- var ls = Yn ? (s3) => s3 < Kn ? Vn : "w" : () => "w";
80261
- var cs = (s3, t, e) => {
80251
+ var zn = process.env.__FAKE_PLATFORM__ || process.platform;
80252
+ var Un = zn === "win32";
80253
+ var { O_CREAT: Hn, O_TRUNC: Wn, O_WRONLY: Gn } = import_fs5.default.constants;
80254
+ var lr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs5.default.constants.UV_FS_O_FILEMAP || 0;
80255
+ var Zn = Un && !!lr;
80256
+ var Yn = 512 * 1024;
80257
+ var Kn = lr | Wn | Hn | Gn;
80258
+ var cs = Zn ? (s3) => s3 < Yn ? Kn : "w" : () => "w";
80259
+ var fs2 = (s3, t, e) => {
80262
80260
  try {
80263
80261
  return import_node_fs4.default.lchownSync(s3, t, e);
80264
80262
  } catch (i) {
80265
80263
  if (i?.code !== "ENOENT") throw i;
80266
80264
  }
80267
80265
  };
80268
- var di = (s3, t, e, i) => {
80266
+ var ui = (s3, t, e, i) => {
80269
80267
  import_node_fs4.default.lchown(s3, t, e, (r) => {
80270
80268
  i(r && r?.code !== "ENOENT" ? r : null);
80271
80269
  });
80272
80270
  };
80273
- var $n = (s3, t, e, i, r) => {
80274
- if (t.isDirectory()) fs2(import_node_path6.default.resolve(s3, t.name), e, i, (n) => {
80271
+ var Vn = (s3, t, e, i, r) => {
80272
+ if (t.isDirectory()) ds(import_node_path6.default.resolve(s3, t.name), e, i, (n) => {
80275
80273
  if (n) return r(n);
80276
80274
  let o = import_node_path6.default.resolve(s3, t.name);
80277
- di(o, e, i, r);
80275
+ ui(o, e, i, r);
80278
80276
  });
80279
80277
  else {
80280
80278
  let n = import_node_path6.default.resolve(s3, t.name);
80281
- di(n, e, i, r);
80279
+ ui(n, e, i, r);
80282
80280
  }
80283
80281
  };
80284
- var fs2 = (s3, t, e, i) => {
80282
+ var ds = (s3, t, e, i) => {
80285
80283
  import_node_fs4.default.readdir(s3, { withFileTypes: true }, (r, n) => {
80286
80284
  if (r) {
80287
80285
  if (r.code === "ENOENT") return i();
80288
80286
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
80289
80287
  }
80290
- if (r || !n.length) return di(s3, t, e, i);
80288
+ if (r || !n.length) return ui(s3, t, e, i);
80291
80289
  let o = n.length, h = null, a = (l) => {
80292
80290
  if (!h) {
80293
80291
  if (l) return i(h = l);
80294
- if (--o === 0) return di(s3, t, e, i);
80292
+ if (--o === 0) return ui(s3, t, e, i);
80295
80293
  }
80296
80294
  };
80297
- for (let l of n) $n(s3, l, t, e, a);
80295
+ for (let l of n) Vn(s3, l, t, e, a);
80298
80296
  });
80299
80297
  };
80300
- var Xn = (s3, t, e, i) => {
80301
- t.isDirectory() && ds(import_node_path6.default.resolve(s3, t.name), e, i), cs(import_node_path6.default.resolve(s3, t.name), e, i);
80298
+ var $n = (s3, t, e, i) => {
80299
+ t.isDirectory() && us(import_node_path6.default.resolve(s3, t.name), e, i), fs2(import_node_path6.default.resolve(s3, t.name), e, i);
80302
80300
  };
80303
- var ds = (s3, t, e) => {
80301
+ var us = (s3, t, e) => {
80304
80302
  let i;
80305
80303
  try {
80306
80304
  i = import_node_fs4.default.readdirSync(s3, { withFileTypes: true });
80307
80305
  } catch (r) {
80308
80306
  let n = r;
80309
80307
  if (n?.code === "ENOENT") return;
80310
- if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return cs(s3, t, e);
80308
+ if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs2(s3, t, e);
80311
80309
  throw n;
80312
80310
  }
80313
- for (let r of i) Xn(s3, r, t, e);
80314
- return cs(s3, t, e);
80311
+ for (let r of i) $n(s3, r, t, e);
80312
+ return fs2(s3, t, e);
80315
80313
  };
80316
80314
  var we = class extends Error {
80317
80315
  path;
@@ -80336,41 +80334,41 @@ var wt = class extends Error {
80336
80334
  return "SymlinkError";
80337
80335
  }
80338
80336
  };
80339
- var jn = (s3, t) => {
80337
+ var qn = (s3, t) => {
80340
80338
  import_node_fs5.default.stat(s3, (e, i) => {
80341
80339
  (e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
80342
80340
  });
80343
80341
  };
80344
- var fr = (s3, t, e) => {
80342
+ var cr = (s3, t, e) => {
80345
80343
  s3 = f(s3);
80346
80344
  let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, h = t.gid, a = typeof o == "number" && typeof h == "number" && (o !== t.processUid || h !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), S = (E, x) => {
80347
- E ? e(E) : x && a ? fs2(x, o, h, (_s) => S(_s)) : n ? import_node_fs5.default.chmod(s3, r, e) : e();
80345
+ E ? e(E) : x && a ? ds(x, o, h, (xe) => S(xe)) : n ? import_node_fs5.default.chmod(s3, r, e) : e();
80348
80346
  };
80349
- if (s3 === d) return jn(s3, S);
80347
+ if (s3 === d) return qn(s3, S);
80350
80348
  if (l) return import_promises.default.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
80351
80349
  let N = f(import_node_path7.default.relative(d, s3)).split("/");
80352
- us(d, N, r, c, d, void 0, S);
80350
+ ms(d, N, r, c, d, void 0, S);
80353
80351
  };
80354
- var us = (s3, t, e, i, r, n, o) => {
80355
- if (!t.length) return o(null, n);
80352
+ var ms = (s3, t, e, i, r, n, o) => {
80353
+ if (t.length === 0) return o(null, n);
80356
80354
  let h = t.shift(), a = f(import_node_path7.default.resolve(s3 + "/" + h));
80357
- import_node_fs5.default.mkdir(a, e, dr(a, t, e, i, r, n, o));
80355
+ import_node_fs5.default.mkdir(a, e, fr(a, t, e, i, r, n, o));
80358
80356
  };
80359
- var dr = (s3, t, e, i, r, n, o) => (h) => {
80357
+ var fr = (s3, t, e, i, r, n, o) => (h) => {
80360
80358
  h ? import_node_fs5.default.lstat(s3, (a, l) => {
80361
80359
  if (a) a.path = a.path && f(a.path), o(a);
80362
- else if (l.isDirectory()) us(s3, t, e, i, r, n, o);
80360
+ else if (l.isDirectory()) ms(s3, t, e, i, r, n, o);
80363
80361
  else if (i) import_node_fs5.default.unlink(s3, (c) => {
80364
80362
  if (c) return o(c);
80365
- import_node_fs5.default.mkdir(s3, e, dr(s3, t, e, i, r, n, o));
80363
+ import_node_fs5.default.mkdir(s3, e, fr(s3, t, e, i, r, n, o));
80366
80364
  });
80367
80365
  else {
80368
80366
  if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
80369
80367
  o(h);
80370
80368
  }
80371
- }) : (n = n || s3, us(s3, t, e, i, r, n, o));
80369
+ }) : (n = n || s3, ms(s3, t, e, i, r, n, o));
80372
80370
  };
80373
- var Qn = (s3) => {
80371
+ var jn = (s3) => {
80374
80372
  let t = false, e;
80375
80373
  try {
80376
80374
  t = import_node_fs5.default.statSync(s3).isDirectory();
@@ -80380,12 +80378,12 @@ var Qn = (s3) => {
80380
80378
  if (!t) throw new we(s3, e ?? "ENOTDIR");
80381
80379
  }
80382
80380
  };
80383
- var ur = (s3, t) => {
80381
+ var dr = (s3, t) => {
80384
80382
  s3 = f(s3);
80385
80383
  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) => {
80386
- E && h && ds(E, n, o), r && import_node_fs5.default.chmodSync(s3, i);
80384
+ E && h && us(E, n, o), r && import_node_fs5.default.chmodSync(s3, i);
80387
80385
  };
80388
- if (s3 === c) return Qn(c), d();
80386
+ if (s3 === c) return jn(c), d();
80389
80387
  if (a) return d(import_node_fs5.default.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
80390
80388
  let T = f(import_node_path7.default.relative(c, s3)).split("/"), N;
80391
80389
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
@@ -80393,40 +80391,40 @@ var ur = (s3, t) => {
80393
80391
  try {
80394
80392
  import_node_fs5.default.mkdirSync(x, i), N = N || x;
80395
80393
  } catch {
80396
- let Os = import_node_fs5.default.lstatSync(x);
80397
- if (Os.isDirectory()) continue;
80394
+ let xe = import_node_fs5.default.lstatSync(x);
80395
+ if (xe.isDirectory()) continue;
80398
80396
  if (l) {
80399
80397
  import_node_fs5.default.unlinkSync(x), import_node_fs5.default.mkdirSync(x, i), N = N || x;
80400
80398
  continue;
80401
- } else if (Os.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
80399
+ } else if (xe.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
80402
80400
  }
80403
80401
  }
80404
80402
  return d(N);
80405
80403
  };
80406
- var ms = /* @__PURE__ */ Object.create(null);
80407
- var mr = 1e4;
80404
+ var ps = /* @__PURE__ */ Object.create(null);
80405
+ var ur = 1e4;
80408
80406
  var $t = /* @__PURE__ */ new Set();
80409
- var pr = (s3) => {
80410
- $t.has(s3) ? $t.delete(s3) : ms[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
80411
- let t = ms[s3], e = $t.size - mr;
80412
- if (e > mr / 10) {
80413
- for (let i of $t) if ($t.delete(i), delete ms[i], --e <= 0) break;
80407
+ var mr = (s3) => {
80408
+ $t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
80409
+ let t = ps[s3], e = $t.size - ur;
80410
+ if (e > ur / 10) {
80411
+ for (let i of $t) if ($t.delete(i), delete ps[i], --e <= 0) break;
80414
80412
  }
80415
80413
  return t;
80416
80414
  };
80417
- var Jn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
80418
- var to = Jn === "win32";
80419
- var eo = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
80420
- let r = e[e.length - 1];
80415
+ var Qn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
80416
+ var Jn = Qn === "win32";
80417
+ var to = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
80418
+ let r = e.at(-1);
80421
80419
  return r !== void 0 && (i = (0, import_node_path8.join)(r, i)), e.push(i || "/"), e;
80422
80420
  }, []);
80423
- var pi = class {
80421
+ var Ei = class {
80424
80422
  #t = /* @__PURE__ */ new Map();
80425
80423
  #i = /* @__PURE__ */ new Map();
80426
80424
  #s = /* @__PURE__ */ new Set();
80427
80425
  reserve(t, e) {
80428
- t = to ? ["win32 parallelization disabled"] : t.map((r) => mt((0, import_node_path8.join)(pr(r))));
80429
- let i = new Set(t.map((r) => eo(r)).reduce((r, n) => r.concat(n)));
80426
+ t = Jn ? ["win32 parallelization disabled"] : t.map((r) => mt((0, import_node_path8.join)(mr(r))));
80427
+ let i = new Set(t.map((r) => to(r)).reduce((r, n) => r.concat(n)));
80430
80428
  this.#i.set(e, { dirs: i, paths: t });
80431
80429
  for (let r of t) {
80432
80430
  let n = this.#t.get(r);
@@ -80436,7 +80434,7 @@ var pi = class {
80436
80434
  let n = this.#t.get(r);
80437
80435
  if (!n) this.#t.set(r, [/* @__PURE__ */ new Set([e])]);
80438
80436
  else {
80439
- let o = n[n.length - 1];
80437
+ let o = n.at(-1);
80440
80438
  o instanceof Set ? o.add(e) : n.push(/* @__PURE__ */ new Set([e]));
80441
80439
  }
80442
80440
  }
@@ -80484,37 +80482,37 @@ var pi = class {
80484
80482
  return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
80485
80483
  }
80486
80484
  };
80487
- var wr = () => process.umask();
80488
- var Sr = /* @__PURE__ */ Symbol("onEntry");
80489
- var Ss = /* @__PURE__ */ Symbol("checkFs");
80490
- var yr = /* @__PURE__ */ Symbol("checkFs2");
80491
- var ys = /* @__PURE__ */ Symbol("isReusable");
80485
+ var Er = () => process.umask();
80486
+ var wr = /* @__PURE__ */ Symbol("onEntry");
80487
+ var ys = /* @__PURE__ */ Symbol("checkFs");
80488
+ var Sr = /* @__PURE__ */ Symbol("checkFs2");
80489
+ var Rs = /* @__PURE__ */ Symbol("isReusable");
80492
80490
  var P = /* @__PURE__ */ Symbol("makeFs");
80493
- var Rs = /* @__PURE__ */ Symbol("file");
80494
- var bs = /* @__PURE__ */ Symbol("directory");
80495
- var wi = /* @__PURE__ */ Symbol("link");
80496
- var Rr = /* @__PURE__ */ Symbol("symlink");
80497
- var br = /* @__PURE__ */ Symbol("hardlink");
80491
+ var bs = /* @__PURE__ */ Symbol("file");
80492
+ var _s = /* @__PURE__ */ Symbol("directory");
80493
+ var Si = /* @__PURE__ */ Symbol("link");
80494
+ var yr = /* @__PURE__ */ Symbol("symlink");
80495
+ var Rr = /* @__PURE__ */ Symbol("hardlink");
80498
80496
  var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
80499
- var gr = /* @__PURE__ */ Symbol("unsupported");
80497
+ var br = /* @__PURE__ */ Symbol("unsupported");
80500
80498
  var _r = /* @__PURE__ */ Symbol("checkPath");
80501
- var ps = /* @__PURE__ */ Symbol("stripAbsolutePath");
80499
+ var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
80502
80500
  var St = /* @__PURE__ */ Symbol("mkdir");
80503
80501
  var O = /* @__PURE__ */ Symbol("onError");
80504
- var Ei = /* @__PURE__ */ Symbol("pending");
80505
- var Or = /* @__PURE__ */ Symbol("pend");
80502
+ var wi = /* @__PURE__ */ Symbol("pending");
80503
+ var gr = /* @__PURE__ */ Symbol("pend");
80506
80504
  var Xt = /* @__PURE__ */ Symbol("unpend");
80507
- var Es = /* @__PURE__ */ Symbol("ended");
80508
- var ws = /* @__PURE__ */ Symbol("maybeClose");
80505
+ var ws = /* @__PURE__ */ Symbol("ended");
80506
+ var Ss = /* @__PURE__ */ Symbol("maybeClose");
80509
80507
  var gs = /* @__PURE__ */ Symbol("skip");
80510
80508
  var Re = /* @__PURE__ */ Symbol("doChown");
80511
80509
  var be = /* @__PURE__ */ Symbol("uid");
80512
- var ge = /* @__PURE__ */ Symbol("gid");
80513
- var _e = /* @__PURE__ */ Symbol("checkedCwd");
80514
- var so = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
80515
- var Oe = so === "win32";
80516
- var ro = 1024;
80517
- var no = (s3, t) => {
80510
+ var _e = /* @__PURE__ */ Symbol("gid");
80511
+ var ge = /* @__PURE__ */ Symbol("checkedCwd");
80512
+ var io = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
80513
+ var Oe = io === "win32";
80514
+ var so = 1024;
80515
+ var ro = (s3, t) => {
80518
80516
  if (!Oe) return import_node_fs3.default.unlink(s3, t);
80519
80517
  let e = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
80520
80518
  import_node_fs3.default.rename(s3, e, (i) => {
@@ -80522,17 +80520,17 @@ var no = (s3, t) => {
80522
80520
  import_node_fs3.default.unlink(e, t);
80523
80521
  });
80524
80522
  };
80525
- var oo = (s3) => {
80523
+ var no = (s3) => {
80526
80524
  if (!Oe) return import_node_fs3.default.unlinkSync(s3);
80527
80525
  let t = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
80528
80526
  import_node_fs3.default.renameSync(s3, t), import_node_fs3.default.unlinkSync(t);
80529
80527
  };
80530
- var Tr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
80528
+ var Or = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
80531
80529
  var qt = class extends st {
80532
- [Es] = false;
80533
- [_e] = false;
80534
- [Ei] = 0;
80535
- reservations = new pi();
80530
+ [ws] = false;
80531
+ [ge] = false;
80532
+ [wi] = 0;
80533
+ reservations = new Ei();
80536
80534
  transform;
80537
80535
  writable = true;
80538
80536
  readable = false;
@@ -80559,30 +80557,28 @@ var qt = class extends st {
80559
80557
  chmod;
80560
80558
  constructor(t = {}) {
80561
80559
  if (t.ondone = () => {
80562
- this[Es] = true, this[ws]();
80560
+ this[ws] = true, this[Ss]();
80563
80561
  }, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
80564
80562
  if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
80565
80563
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
80566
80564
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
80567
80565
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
80568
- t.preserveOwner === void 0 && typeof t.uid != "number" ? this.preserveOwner = !!(process.getuid && process.getuid() === 0) : this.preserveOwner = !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : ro, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(import_node_path5.default.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : wr() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Sr](e));
80566
+ this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : so, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(import_node_path5.default.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : Er() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[wr](e));
80569
80567
  }
80570
80568
  warn(t, e, i = {}) {
80571
80569
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
80572
80570
  }
80573
- [ws]() {
80574
- this[Es] && this[Ei] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
80571
+ [Ss]() {
80572
+ this[ws] && this[wi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
80575
80573
  }
80576
- [ps](t, e) {
80574
+ [Es](t, e) {
80577
80575
  let i = t[e], { type: r } = t;
80578
80576
  if (!i || this.preservePaths) return true;
80579
- let [n, o] = ce(i), h = o.replace(/\\/g, "/").split("/");
80577
+ let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
80580
80578
  if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
80581
80579
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
80582
- {
80583
- let a = import_node_path5.default.posix.dirname(t.path), l = import_node_path5.default.posix.normalize(import_node_path5.default.posix.join(a, h.join("/")));
80584
- if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
80585
- }
80580
+ let a = import_node_path5.default.posix.dirname(t.path), l = import_node_path5.default.posix.normalize(import_node_path5.default.posix.join(a, h.join("/")));
80581
+ if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
80586
80582
  }
80587
80583
  return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
80588
80584
  }
@@ -80598,18 +80594,18 @@ var qt = class extends st {
80598
80594
  i.splice(0, this.strip), t.path = i.join("/");
80599
80595
  }
80600
80596
  if (isFinite(this.maxDepth) && i.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", { entry: t, path: e, depth: i.length, maxDepth: this.maxDepth }), false;
80601
- if (!this[ps](t, "path") || !this[ps](t, "linkpath")) return false;
80602
- if (import_node_path5.default.isAbsolute(t.path) ? t.absolute = f(import_node_path5.default.resolve(t.path)) : t.absolute = f(import_node_path5.default.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
80597
+ if (!this[Es](t, "path") || !this[Es](t, "linkpath")) return false;
80598
+ if (t.absolute = import_node_path5.default.isAbsolute(t.path) ? f(import_node_path5.default.resolve(t.path)) : f(import_node_path5.default.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
80603
80599
  if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
80604
80600
  if (this.win32) {
80605
80601
  let { root: r } = import_node_path5.default.win32.parse(String(t.absolute));
80606
- t.absolute = r + $i(String(t.absolute).slice(r.length));
80602
+ t.absolute = r + Xi(String(t.absolute).slice(r.length));
80607
80603
  let { root: n } = import_node_path5.default.win32.parse(t.path);
80608
- t.path = n + $i(t.path.slice(n.length));
80604
+ t.path = n + Xi(t.path.slice(n.length));
80609
80605
  }
80610
80606
  return true;
80611
80607
  }
80612
- [Sr](t) {
80608
+ [wr](t) {
80613
80609
  if (!this[_r](t)) return t.resume();
80614
80610
  switch (import_node_assert.default.equal(typeof t.absolute, "string"), t.type) {
80615
80611
  case "Directory":
@@ -80620,28 +80616,28 @@ var qt = class extends st {
80620
80616
  case "ContiguousFile":
80621
80617
  case "Link":
80622
80618
  case "SymbolicLink":
80623
- return this[Ss](t);
80619
+ return this[ys](t);
80624
80620
  default:
80625
- return this[gr](t);
80621
+ return this[br](t);
80626
80622
  }
80627
80623
  }
80628
80624
  [O](t, e) {
80629
80625
  t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
80630
80626
  }
80631
80627
  [St](t, e, i) {
80632
- fr(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);
80628
+ cr(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);
80633
80629
  }
80634
80630
  [Re](t) {
80635
80631
  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;
80636
80632
  }
80637
80633
  [be](t) {
80638
- return Tr(this.uid, t.uid, this.processUid);
80634
+ return Or(this.uid, t.uid, this.processUid);
80639
80635
  }
80640
- [ge](t) {
80641
- return Tr(this.gid, t.gid, this.processGid);
80636
+ [_e](t) {
80637
+ return Or(this.gid, t.gid, this.processGid);
80642
80638
  }
80643
- [Rs](t, e) {
80644
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), { flags: ls(t.size), mode: i, autoClose: false });
80639
+ [bs](t, e) {
80640
+ let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), { flags: cs(t.size), mode: i, autoClose: false });
80645
80641
  r.on("error", (a) => {
80646
80642
  r.fd && import_node_fs3.default.close(r.fd, () => {
80647
80643
  }), r.write = () => true, this[O](a, t), e();
@@ -80665,7 +80661,7 @@ var qt = class extends st {
80665
80661
  }
80666
80662
  if (typeof l == "number" && this[Re](t)) {
80667
80663
  n++;
80668
- let c = this[be](t), d = this[ge](t);
80664
+ let c = this[be](t), d = this[_e](t);
80669
80665
  typeof c == "number" && typeof d == "number" && import_node_fs3.default.fchown(l, c, d, (S) => S ? import_node_fs3.default.chown(a, c, d, (T) => o(T && S)) : o());
80670
80666
  }
80671
80667
  o();
@@ -80675,7 +80671,7 @@ var qt = class extends st {
80675
80671
  this[O](a, t), e();
80676
80672
  }), t.pipe(h)), h.pipe(r);
80677
80673
  }
80678
- [bs](t, e) {
80674
+ [_s](t, e) {
80679
80675
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
80680
80676
  this[St](String(t.absolute), i, (r) => {
80681
80677
  if (r) {
@@ -80685,21 +80681,21 @@ var qt = class extends st {
80685
80681
  let n = 1, o = () => {
80686
80682
  --n === 0 && (e(), this[Xt](), t.resume());
80687
80683
  };
80688
- t.mtime && !this.noMtime && (n++, import_node_fs3.default.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, import_node_fs3.default.chown(String(t.absolute), Number(this[be](t)), Number(this[ge](t)), o)), o();
80684
+ t.mtime && !this.noMtime && (n++, import_node_fs3.default.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, import_node_fs3.default.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
80689
80685
  });
80690
80686
  }
80691
- [gr](t) {
80687
+ [br](t) {
80692
80688
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
80693
80689
  }
80694
- [Rr](t, e) {
80690
+ [yr](t, e) {
80695
80691
  let i = f(import_node_path5.default.relative(this.cwd, import_node_path5.default.resolve(import_node_path5.default.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
80696
- this[ye](t, this.cwd, i, () => this[wi](t, String(t.linkpath), "symlink", e), (r) => {
80692
+ this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
80697
80693
  this[O](r, t), e();
80698
80694
  });
80699
80695
  }
80700
- [br](t, e) {
80696
+ [Rr](t, e) {
80701
80697
  let i = f(import_node_path5.default.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
80702
- this[ye](t, this.cwd, r, () => this[wi](t, i, "link", e), (n) => {
80698
+ this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e), (n) => {
80703
80699
  this[O](n, t), e();
80704
80700
  });
80705
80701
  }
@@ -80713,24 +80709,24 @@ var qt = class extends st {
80713
80709
  this[ye](t, h, i, r, n);
80714
80710
  });
80715
80711
  }
80716
- [Or]() {
80717
- this[Ei]++;
80712
+ [gr]() {
80713
+ this[wi]++;
80718
80714
  }
80719
80715
  [Xt]() {
80720
- this[Ei]--, this[ws]();
80716
+ this[wi]--, this[Ss]();
80721
80717
  }
80722
80718
  [gs](t) {
80723
80719
  this[Xt](), t.resume();
80724
80720
  }
80725
- [ys](t, e) {
80721
+ [Rs](t, e) {
80726
80722
  return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
80727
80723
  }
80728
- [Ss](t) {
80729
- this[Or]();
80724
+ [ys](t) {
80725
+ this[gr]();
80730
80726
  let e = [t.path];
80731
- t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[yr](t, i));
80727
+ t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Sr](t, i));
80732
80728
  }
80733
- [yr](t, e) {
80729
+ [Sr](t, e) {
80734
80730
  let i = (h) => {
80735
80731
  e(h);
80736
80732
  }, r = () => {
@@ -80739,7 +80735,7 @@ var qt = class extends st {
80739
80735
  this[O](h, t), i();
80740
80736
  return;
80741
80737
  }
80742
- this[_e] = true, n();
80738
+ this[ge] = true, n();
80743
80739
  });
80744
80740
  }, n = () => {
80745
80741
  if (t.absolute !== this.cwd) {
@@ -80759,7 +80755,7 @@ var qt = class extends st {
80759
80755
  this[gs](t), i();
80760
80756
  return;
80761
80757
  }
80762
- if (h || this[ys](t, a)) return this[P](null, t, i);
80758
+ if (h || this[Rs](t, a)) return this[P](null, t, i);
80763
80759
  if (a.isDirectory()) {
80764
80760
  if (t.type === "Directory") {
80765
80761
  let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
@@ -80768,10 +80764,10 @@ var qt = class extends st {
80768
80764
  if (t.absolute !== this.cwd) return import_node_fs3.default.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
80769
80765
  }
80770
80766
  if (t.absolute === this.cwd) return this[P](null, t, i);
80771
- no(String(t.absolute), (l) => this[P](l ?? null, t, i));
80767
+ ro(String(t.absolute), (l) => this[P](l ?? null, t, i));
80772
80768
  });
80773
80769
  };
80774
- this[_e] ? n() : r();
80770
+ this[ge] ? n() : r();
80775
80771
  }
80776
80772
  [P](t, e, i) {
80777
80773
  if (t) {
@@ -80782,17 +80778,17 @@ var qt = class extends st {
80782
80778
  case "File":
80783
80779
  case "OldFile":
80784
80780
  case "ContiguousFile":
80785
- return this[Rs](e, i);
80781
+ return this[bs](e, i);
80786
80782
  case "Link":
80787
- return this[br](e, i);
80788
- case "SymbolicLink":
80789
80783
  return this[Rr](e, i);
80784
+ case "SymbolicLink":
80785
+ return this[yr](e, i);
80790
80786
  case "Directory":
80791
80787
  case "GNUDumpDir":
80792
- return this[bs](e, i);
80788
+ return this[_s](e, i);
80793
80789
  }
80794
80790
  }
80795
- [wi](t, e, i, r) {
80791
+ [Si](t, e, i, r) {
80796
80792
  import_node_fs3.default[i](e, String(t.absolute), (n) => {
80797
80793
  n ? this[O](n, t) : (this[Xt](), t.resume()), r();
80798
80794
  });
@@ -80811,11 +80807,11 @@ var Te = class extends qt {
80811
80807
  return super[P](t, e, () => {
80812
80808
  });
80813
80809
  }
80814
- [Ss](t) {
80815
- if (!this[_e]) {
80810
+ [ys](t) {
80811
+ if (!this[ge]) {
80816
80812
  let n = this[St](this.cwd, this.dmode);
80817
80813
  if (n) return this[O](n, t);
80818
- this[_e] = true;
80814
+ this[ge] = true;
80819
80815
  }
80820
80816
  if (t.absolute !== this.cwd) {
80821
80817
  let n = f(import_node_path5.default.dirname(String(t.absolute)));
@@ -80826,7 +80822,7 @@ var Te = class extends qt {
80826
80822
  }
80827
80823
  let [e, i] = Se(() => import_node_fs3.default.lstatSync(String(t.absolute)));
80828
80824
  if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[gs](t);
80829
- if (e || this[ys](t, i)) return this[P](null, t);
80825
+ if (e || this[Rs](t, i)) return this[P](null, t);
80830
80826
  if (i.isDirectory()) {
80831
80827
  if (t.type === "Directory") {
80832
80828
  let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? Se(() => {
@@ -80837,10 +80833,10 @@ var Te = class extends qt {
80837
80833
  let [n] = Se(() => import_node_fs3.default.rmdirSync(String(t.absolute)));
80838
80834
  this[P](n, t);
80839
80835
  }
80840
- let [r] = t.absolute === this.cwd ? [] : Se(() => oo(String(t.absolute)));
80836
+ let [r] = t.absolute === this.cwd ? [] : Se(() => no(String(t.absolute)));
80841
80837
  this[P](r, t);
80842
80838
  }
80843
- [Rs](t, e) {
80839
+ [bs](t, e) {
80844
80840
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
80845
80841
  let a;
80846
80842
  try {
@@ -80851,7 +80847,7 @@ var Te = class extends qt {
80851
80847
  (h || a) && this[O](h || a, t), e();
80852
80848
  }, n;
80853
80849
  try {
80854
- n = import_node_fs3.default.openSync(String(t.absolute), ls(t.size), i);
80850
+ n = import_node_fs3.default.openSync(String(t.absolute), cs(t.size), i);
80855
80851
  } catch (h) {
80856
80852
  return r(h);
80857
80853
  }
@@ -80877,7 +80873,7 @@ var Te = class extends qt {
80877
80873
  }
80878
80874
  }
80879
80875
  if (this[Re](t)) {
80880
- let a = this[be](t), l = this[ge](t);
80876
+ let a = this[be](t), l = this[_e](t);
80881
80877
  try {
80882
80878
  import_node_fs3.default.fchownSync(n, Number(a), Number(l));
80883
80879
  } catch (c) {
@@ -80891,7 +80887,7 @@ var Te = class extends qt {
80891
80887
  r(h);
80892
80888
  });
80893
80889
  }
80894
- [bs](t, e) {
80890
+ [_s](t, e) {
80895
80891
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[St](String(t.absolute), i);
80896
80892
  if (r) {
80897
80893
  this[O](r, t), e();
@@ -80902,20 +80898,20 @@ var Te = class extends qt {
80902
80898
  } catch {
80903
80899
  }
80904
80900
  if (this[Re](t)) try {
80905
- import_node_fs3.default.chownSync(String(t.absolute), Number(this[be](t)), Number(this[ge](t)));
80901
+ import_node_fs3.default.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
80906
80902
  } catch {
80907
80903
  }
80908
80904
  e(), t.resume();
80909
80905
  }
80910
80906
  [St](t, e) {
80911
80907
  try {
80912
- return ur(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 });
80908
+ return dr(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 });
80913
80909
  } catch (i) {
80914
80910
  return i;
80915
80911
  }
80916
80912
  }
80917
80913
  [ye](t, e, i, r, n) {
80918
- if (this.preservePaths || !i.length) return r();
80914
+ if (this.preservePaths || i.length === 0) return r();
80919
80915
  let o = e;
80920
80916
  for (let h of i) {
80921
80917
  o = import_node_path5.default.resolve(o, h);
@@ -80925,7 +80921,7 @@ var Te = class extends qt {
80925
80921
  }
80926
80922
  r();
80927
80923
  }
80928
- [wi](t, e, i, r) {
80924
+ [Si](t, e, i, r) {
80929
80925
  let n = `${i}Sync`;
80930
80926
  try {
80931
80927
  import_node_fs3.default[n](e, String(t.absolute)), r(), t.resume();
@@ -80934,26 +80930,26 @@ var Te = class extends qt {
80934
80930
  }
80935
80931
  }
80936
80932
  };
80937
- var ho = (s3) => {
80933
+ var oo = (s3) => {
80938
80934
  let t = new Te(s3), e = s3.file, i = import_node_fs2.default.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
80939
- new ve(e, { readSize: r, size: i.size }).pipe(t);
80935
+ new Me(e, { readSize: r, size: i.size }).pipe(t);
80940
80936
  };
80941
- var ao = (s3, t) => {
80937
+ var ho = (s3, t) => {
80942
80938
  let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
80943
80939
  return new Promise((o, h) => {
80944
80940
  e.on("error", h), e.on("close", o), import_node_fs2.default.stat(r, (a, l) => {
80945
80941
  if (a) h(a);
80946
80942
  else {
80947
- let c = new gt(r, { readSize: i, size: l.size });
80943
+ let c = new _t(r, { readSize: i, size: l.size });
80948
80944
  c.on("error", h), c.pipe(e);
80949
80945
  }
80950
80946
  });
80951
80947
  });
80952
80948
  };
80953
- var lo = K(ho, ao, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
80954
- t?.length && Yi(s3, t);
80949
+ var ao = K(oo, ho, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
80950
+ t?.length && Ki(s3, t);
80955
80951
  });
80956
- var co = (s3, t) => {
80952
+ var lo = (s3, t) => {
80957
80953
  let e = new kt(s3), i = true, r, n;
80958
80954
  try {
80959
80955
  try {
@@ -80974,7 +80970,7 @@ var co = (s3, t) => {
80974
80970
  if (n + l + 512 > o.size) break;
80975
80971
  n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
80976
80972
  }
80977
- i = false, fo(s3, e, n, r, t);
80973
+ i = false, co(s3, e, n, r, t);
80978
80974
  } finally {
80979
80975
  if (i) try {
80980
80976
  import_node_fs6.default.closeSync(r);
@@ -80982,11 +80978,11 @@ var co = (s3, t) => {
80982
80978
  }
80983
80979
  }
80984
80980
  };
80985
- var fo = (s3, t, e, i, r) => {
80981
+ var co = (s3, t, e, i, r) => {
80986
80982
  let n = new Wt(s3.file, { fd: i, start: e });
80987
- t.pipe(n), mo(t, r);
80983
+ t.pipe(n), uo(t, r);
80988
80984
  };
80989
- var uo = (s3, t) => {
80985
+ var fo = (s3, t) => {
80990
80986
  t = Array.from(t);
80991
80987
  let e = new Et(s3), i = (n, o, h) => {
80992
80988
  let a = (T, N) => {
@@ -80994,7 +80990,7 @@ var uo = (s3, t) => {
80994
80990
  }, l = 0;
80995
80991
  if (o === 0) return a(null, 0);
80996
80992
  let c = 0, d = Buffer.alloc(512), S = (T, N) => {
80997
- if (T || typeof N > "u") return a(T);
80993
+ if (T || N === void 0) return a(T);
80998
80994
  if (c += N, c < 512 && N) return import_node_fs6.default.read(n, d, c, d.length - c, l + c, S);
80999
80995
  if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
81000
80996
  if (c < 512) return a(null, l);
@@ -81016,38 +81012,35 @@ var uo = (s3, t) => {
81016
81012
  i(c, S.size, (T, N) => {
81017
81013
  if (T) return o(T);
81018
81014
  let E = new tt(s3.file, { fd: c, start: N });
81019
- e.pipe(E), E.on("error", o), E.on("close", n), po(e, t);
81015
+ e.pipe(E), E.on("error", o), E.on("close", n), mo(e, t);
81020
81016
  });
81021
81017
  });
81022
81018
  };
81023
81019
  import_node_fs6.default.open(s3.file, h, a);
81024
81020
  });
81025
81021
  };
81026
- var mo = (s3, t) => {
81022
+ var uo = (s3, t) => {
81027
81023
  t.forEach((e) => {
81028
81024
  e.charAt(0) === "@" ? It({ file: import_node_path9.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
81029
81025
  }), s3.end();
81030
81026
  };
81031
- var po = async (s3, t) => {
81032
- for (let e = 0; e < t.length; e++) {
81033
- let i = String(t[e]);
81034
- i.charAt(0) === "@" ? await It({ file: import_node_path9.default.resolve(String(s3.cwd), i.slice(1)), noResume: true, onReadEntry: (r) => s3.add(r) }) : s3.add(i);
81035
- }
81027
+ var mo = async (s3, t) => {
81028
+ for (let e of t) e.charAt(0) === "@" ? await It({ file: import_node_path9.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
81036
81029
  s3.end();
81037
81030
  };
81038
- var vt = K(co, uo, () => {
81031
+ var vt = K(lo, fo, () => {
81039
81032
  throw new TypeError("file is required");
81040
81033
  }, () => {
81041
81034
  throw new TypeError("file is required");
81042
81035
  }, (s3, t) => {
81043
- if (!ks(s3)) throw new TypeError("file is required");
81036
+ if (!Fs(s3)) throw new TypeError("file is required");
81044
81037
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
81045
81038
  if (!t?.length) throw new TypeError("no paths specified to add/replace");
81046
81039
  });
81047
- var Eo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
81048
- vt.validate?.(s3, t), wo(s3);
81040
+ var po = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
81041
+ vt.validate?.(s3, t), Eo(s3);
81049
81042
  });
81050
- var wo = (s3) => {
81043
+ var Eo = (s3) => {
81051
81044
  let t = s3.filter;
81052
81045
  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));
81053
81046
  };
@@ -81238,7 +81231,7 @@ var Client = class _Client {
81238
81231
  "x-sdk-name": "Console",
81239
81232
  "x-sdk-platform": "console",
81240
81233
  "x-sdk-language": "web",
81241
- "x-sdk-version": "5.0.0",
81234
+ "x-sdk-version": "6.0.0",
81242
81235
  "X-Appwrite-Response-Format": "1.8.0"
81243
81236
  };
81244
81237
  this.realtime = {
@@ -92637,247 +92630,6 @@ var Projects = class {
92637
92630
  };
92638
92631
  return this.client.call("delete", uri, apiHeaders, payload);
92639
92632
  }
92640
- listWebhooks(paramsOrFirst, ...rest) {
92641
- let params;
92642
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92643
- params = paramsOrFirst || {};
92644
- } else {
92645
- params = {
92646
- projectId: paramsOrFirst,
92647
- total: rest[0]
92648
- };
92649
- }
92650
- const projectId = params.projectId;
92651
- const total = params.total;
92652
- if (typeof projectId === "undefined") {
92653
- throw new AppwriteException('Missing required parameter: "projectId"');
92654
- }
92655
- const apiPath = "/projects/{projectId}/webhooks".replace("{projectId}", projectId);
92656
- const payload = {};
92657
- if (typeof total !== "undefined") {
92658
- payload["total"] = total;
92659
- }
92660
- const uri = new URL(this.client.config.endpoint + apiPath);
92661
- const apiHeaders = {};
92662
- return this.client.call("get", uri, apiHeaders, payload);
92663
- }
92664
- createWebhook(paramsOrFirst, ...rest) {
92665
- let params;
92666
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92667
- params = paramsOrFirst || {};
92668
- } else {
92669
- params = {
92670
- projectId: paramsOrFirst,
92671
- name: rest[0],
92672
- events: rest[1],
92673
- url: rest[2],
92674
- security: rest[3],
92675
- enabled: rest[4],
92676
- httpUser: rest[5],
92677
- httpPass: rest[6]
92678
- };
92679
- }
92680
- const projectId = params.projectId;
92681
- const name = params.name;
92682
- const events = params.events;
92683
- const url2 = params.url;
92684
- const security = params.security;
92685
- const enabled = params.enabled;
92686
- const httpUser = params.httpUser;
92687
- const httpPass = params.httpPass;
92688
- if (typeof projectId === "undefined") {
92689
- throw new AppwriteException('Missing required parameter: "projectId"');
92690
- }
92691
- if (typeof name === "undefined") {
92692
- throw new AppwriteException('Missing required parameter: "name"');
92693
- }
92694
- if (typeof events === "undefined") {
92695
- throw new AppwriteException('Missing required parameter: "events"');
92696
- }
92697
- if (typeof url2 === "undefined") {
92698
- throw new AppwriteException('Missing required parameter: "url"');
92699
- }
92700
- if (typeof security === "undefined") {
92701
- throw new AppwriteException('Missing required parameter: "security"');
92702
- }
92703
- const apiPath = "/projects/{projectId}/webhooks".replace("{projectId}", projectId);
92704
- const payload = {};
92705
- if (typeof name !== "undefined") {
92706
- payload["name"] = name;
92707
- }
92708
- if (typeof enabled !== "undefined") {
92709
- payload["enabled"] = enabled;
92710
- }
92711
- if (typeof events !== "undefined") {
92712
- payload["events"] = events;
92713
- }
92714
- if (typeof url2 !== "undefined") {
92715
- payload["url"] = url2;
92716
- }
92717
- if (typeof security !== "undefined") {
92718
- payload["security"] = security;
92719
- }
92720
- if (typeof httpUser !== "undefined") {
92721
- payload["httpUser"] = httpUser;
92722
- }
92723
- if (typeof httpPass !== "undefined") {
92724
- payload["httpPass"] = httpPass;
92725
- }
92726
- const uri = new URL(this.client.config.endpoint + apiPath);
92727
- const apiHeaders = {
92728
- "content-type": "application/json"
92729
- };
92730
- return this.client.call("post", uri, apiHeaders, payload);
92731
- }
92732
- getWebhook(paramsOrFirst, ...rest) {
92733
- let params;
92734
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92735
- params = paramsOrFirst || {};
92736
- } else {
92737
- params = {
92738
- projectId: paramsOrFirst,
92739
- webhookId: rest[0]
92740
- };
92741
- }
92742
- const projectId = params.projectId;
92743
- const webhookId = params.webhookId;
92744
- if (typeof projectId === "undefined") {
92745
- throw new AppwriteException('Missing required parameter: "projectId"');
92746
- }
92747
- if (typeof webhookId === "undefined") {
92748
- throw new AppwriteException('Missing required parameter: "webhookId"');
92749
- }
92750
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
92751
- const payload = {};
92752
- const uri = new URL(this.client.config.endpoint + apiPath);
92753
- const apiHeaders = {};
92754
- return this.client.call("get", uri, apiHeaders, payload);
92755
- }
92756
- updateWebhook(paramsOrFirst, ...rest) {
92757
- let params;
92758
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92759
- params = paramsOrFirst || {};
92760
- } else {
92761
- params = {
92762
- projectId: paramsOrFirst,
92763
- webhookId: rest[0],
92764
- name: rest[1],
92765
- events: rest[2],
92766
- url: rest[3],
92767
- security: rest[4],
92768
- enabled: rest[5],
92769
- httpUser: rest[6],
92770
- httpPass: rest[7]
92771
- };
92772
- }
92773
- const projectId = params.projectId;
92774
- const webhookId = params.webhookId;
92775
- const name = params.name;
92776
- const events = params.events;
92777
- const url2 = params.url;
92778
- const security = params.security;
92779
- const enabled = params.enabled;
92780
- const httpUser = params.httpUser;
92781
- const httpPass = params.httpPass;
92782
- if (typeof projectId === "undefined") {
92783
- throw new AppwriteException('Missing required parameter: "projectId"');
92784
- }
92785
- if (typeof webhookId === "undefined") {
92786
- throw new AppwriteException('Missing required parameter: "webhookId"');
92787
- }
92788
- if (typeof name === "undefined") {
92789
- throw new AppwriteException('Missing required parameter: "name"');
92790
- }
92791
- if (typeof events === "undefined") {
92792
- throw new AppwriteException('Missing required parameter: "events"');
92793
- }
92794
- if (typeof url2 === "undefined") {
92795
- throw new AppwriteException('Missing required parameter: "url"');
92796
- }
92797
- if (typeof security === "undefined") {
92798
- throw new AppwriteException('Missing required parameter: "security"');
92799
- }
92800
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
92801
- const payload = {};
92802
- if (typeof name !== "undefined") {
92803
- payload["name"] = name;
92804
- }
92805
- if (typeof enabled !== "undefined") {
92806
- payload["enabled"] = enabled;
92807
- }
92808
- if (typeof events !== "undefined") {
92809
- payload["events"] = events;
92810
- }
92811
- if (typeof url2 !== "undefined") {
92812
- payload["url"] = url2;
92813
- }
92814
- if (typeof security !== "undefined") {
92815
- payload["security"] = security;
92816
- }
92817
- if (typeof httpUser !== "undefined") {
92818
- payload["httpUser"] = httpUser;
92819
- }
92820
- if (typeof httpPass !== "undefined") {
92821
- payload["httpPass"] = httpPass;
92822
- }
92823
- const uri = new URL(this.client.config.endpoint + apiPath);
92824
- const apiHeaders = {
92825
- "content-type": "application/json"
92826
- };
92827
- return this.client.call("put", uri, apiHeaders, payload);
92828
- }
92829
- deleteWebhook(paramsOrFirst, ...rest) {
92830
- let params;
92831
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92832
- params = paramsOrFirst || {};
92833
- } else {
92834
- params = {
92835
- projectId: paramsOrFirst,
92836
- webhookId: rest[0]
92837
- };
92838
- }
92839
- const projectId = params.projectId;
92840
- const webhookId = params.webhookId;
92841
- if (typeof projectId === "undefined") {
92842
- throw new AppwriteException('Missing required parameter: "projectId"');
92843
- }
92844
- if (typeof webhookId === "undefined") {
92845
- throw new AppwriteException('Missing required parameter: "webhookId"');
92846
- }
92847
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
92848
- const payload = {};
92849
- const uri = new URL(this.client.config.endpoint + apiPath);
92850
- const apiHeaders = {
92851
- "content-type": "application/json"
92852
- };
92853
- return this.client.call("delete", uri, apiHeaders, payload);
92854
- }
92855
- updateWebhookSignature(paramsOrFirst, ...rest) {
92856
- let params;
92857
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92858
- params = paramsOrFirst || {};
92859
- } else {
92860
- params = {
92861
- projectId: paramsOrFirst,
92862
- webhookId: rest[0]
92863
- };
92864
- }
92865
- const projectId = params.projectId;
92866
- const webhookId = params.webhookId;
92867
- if (typeof projectId === "undefined") {
92868
- throw new AppwriteException('Missing required parameter: "projectId"');
92869
- }
92870
- if (typeof webhookId === "undefined") {
92871
- throw new AppwriteException('Missing required parameter: "webhookId"');
92872
- }
92873
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}/signature".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
92874
- const payload = {};
92875
- const uri = new URL(this.client.config.endpoint + apiPath);
92876
- const apiHeaders = {
92877
- "content-type": "application/json"
92878
- };
92879
- return this.client.call("patch", uri, apiHeaders, payload);
92880
- }
92881
92633
  };
92882
92634
  var Proxy2 = class {
92883
92635
  constructor(client) {
@@ -98669,6 +98421,8 @@ var Scopes;
98669
98421
  Scopes2["AssistantRead"] = "assistant.read";
98670
98422
  Scopes2["TokensRead"] = "tokens.read";
98671
98423
  Scopes2["TokensWrite"] = "tokens.write";
98424
+ Scopes2["WebhooksRead"] = "webhooks.read";
98425
+ Scopes2["WebhooksWrite"] = "webhooks.write";
98672
98426
  Scopes2["PoliciesWrite"] = "policies.write";
98673
98427
  Scopes2["PoliciesRead"] = "policies.read";
98674
98428
  Scopes2["ArchivesRead"] = "archives.read";
@@ -99518,9 +99272,6 @@ var Runtime;
99518
99272
  Runtime2["Pythonml311"] = "python-ml-3.11";
99519
99273
  Runtime2["Pythonml312"] = "python-ml-3.12";
99520
99274
  Runtime2["Pythonml313"] = "python-ml-3.13";
99521
- Runtime2["Deno121"] = "deno-1.21";
99522
- Runtime2["Deno124"] = "deno-1.24";
99523
- Runtime2["Deno135"] = "deno-1.35";
99524
99275
  Runtime2["Deno140"] = "deno-1.40";
99525
99276
  Runtime2["Deno146"] = "deno-1.46";
99526
99277
  Runtime2["Deno20"] = "deno-2.0";
@@ -99576,6 +99327,92 @@ var Runtime;
99576
99327
  Runtime2["Flutter332"] = "flutter-3.32";
99577
99328
  Runtime2["Flutter335"] = "flutter-3.35";
99578
99329
  Runtime2["Flutter338"] = "flutter-3.38";
99330
+ Runtime2["Node145rc"] = "node-14.5-rc";
99331
+ Runtime2["Node160rc"] = "node-16.0-rc";
99332
+ Runtime2["Node180rc"] = "node-18.0-rc";
99333
+ Runtime2["Node190rc"] = "node-19.0-rc";
99334
+ Runtime2["Node200rc"] = "node-20.0-rc";
99335
+ Runtime2["Node210rc"] = "node-21.0-rc";
99336
+ Runtime2["Node22rc"] = "node-22-rc";
99337
+ Runtime2["Node23rc"] = "node-23-rc";
99338
+ Runtime2["Node24rc"] = "node-24-rc";
99339
+ Runtime2["Node25rc"] = "node-25-rc";
99340
+ Runtime2["Php80rc"] = "php-8.0-rc";
99341
+ Runtime2["Php81rc"] = "php-8.1-rc";
99342
+ Runtime2["Php82rc"] = "php-8.2-rc";
99343
+ Runtime2["Php83rc"] = "php-8.3-rc";
99344
+ Runtime2["Php84rc"] = "php-8.4-rc";
99345
+ Runtime2["Ruby30rc"] = "ruby-3.0-rc";
99346
+ Runtime2["Ruby31rc"] = "ruby-3.1-rc";
99347
+ Runtime2["Ruby32rc"] = "ruby-3.2-rc";
99348
+ Runtime2["Ruby33rc"] = "ruby-3.3-rc";
99349
+ Runtime2["Ruby34rc"] = "ruby-3.4-rc";
99350
+ Runtime2["Ruby40rc"] = "ruby-4.0-rc";
99351
+ Runtime2["Python38rc"] = "python-3.8-rc";
99352
+ Runtime2["Python39rc"] = "python-3.9-rc";
99353
+ Runtime2["Python310rc"] = "python-3.10-rc";
99354
+ Runtime2["Python311rc"] = "python-3.11-rc";
99355
+ Runtime2["Python312rc"] = "python-3.12-rc";
99356
+ Runtime2["Python313rc"] = "python-3.13-rc";
99357
+ Runtime2["Python314rc"] = "python-3.14-rc";
99358
+ Runtime2["Pythonml311rc"] = "python-ml-3.11-rc";
99359
+ Runtime2["Pythonml312rc"] = "python-ml-3.12-rc";
99360
+ Runtime2["Pythonml313rc"] = "python-ml-3.13-rc";
99361
+ Runtime2["Deno140rc"] = "deno-1.40-rc";
99362
+ Runtime2["Deno146rc"] = "deno-1.46-rc";
99363
+ Runtime2["Deno20rc"] = "deno-2.0-rc";
99364
+ Runtime2["Deno25rc"] = "deno-2.5-rc";
99365
+ Runtime2["Deno26rc"] = "deno-2.6-rc";
99366
+ Runtime2["Dart215rc"] = "dart-2.15-rc";
99367
+ Runtime2["Dart216rc"] = "dart-2.16-rc";
99368
+ Runtime2["Dart217rc"] = "dart-2.17-rc";
99369
+ Runtime2["Dart218rc"] = "dart-2.18-rc";
99370
+ Runtime2["Dart219rc"] = "dart-2.19-rc";
99371
+ Runtime2["Dart30rc"] = "dart-3.0-rc";
99372
+ Runtime2["Dart31rc"] = "dart-3.1-rc";
99373
+ Runtime2["Dart33rc"] = "dart-3.3-rc";
99374
+ Runtime2["Dart35rc"] = "dart-3.5-rc";
99375
+ Runtime2["Dart38rc"] = "dart-3.8-rc";
99376
+ Runtime2["Dart39rc"] = "dart-3.9-rc";
99377
+ Runtime2["Dart310rc"] = "dart-3.10-rc";
99378
+ Runtime2["Dotnet60rc"] = "dotnet-6.0-rc";
99379
+ Runtime2["Dotnet70rc"] = "dotnet-7.0-rc";
99380
+ Runtime2["Dotnet80rc"] = "dotnet-8.0-rc";
99381
+ Runtime2["Dotnet10rc"] = "dotnet-10-rc";
99382
+ Runtime2["Java80rc"] = "java-8.0-rc";
99383
+ Runtime2["Java110rc"] = "java-11.0-rc";
99384
+ Runtime2["Java170rc"] = "java-17.0-rc";
99385
+ Runtime2["Java180rc"] = "java-18.0-rc";
99386
+ Runtime2["Java210rc"] = "java-21.0-rc";
99387
+ Runtime2["Java22rc"] = "java-22-rc";
99388
+ Runtime2["Java25rc"] = "java-25-rc";
99389
+ Runtime2["Swift55rc"] = "swift-5.5-rc";
99390
+ Runtime2["Swift58rc"] = "swift-5.8-rc";
99391
+ Runtime2["Swift59rc"] = "swift-5.9-rc";
99392
+ Runtime2["Swift510rc"] = "swift-5.10-rc";
99393
+ Runtime2["Swift62rc"] = "swift-6.2-rc";
99394
+ Runtime2["Kotlin16rc"] = "kotlin-1.6-rc";
99395
+ Runtime2["Kotlin18rc"] = "kotlin-1.8-rc";
99396
+ Runtime2["Kotlin19rc"] = "kotlin-1.9-rc";
99397
+ Runtime2["Kotlin20rc"] = "kotlin-2.0-rc";
99398
+ Runtime2["Kotlin23rc"] = "kotlin-2.3-rc";
99399
+ Runtime2["Cpp17rc"] = "cpp-17-rc";
99400
+ Runtime2["Cpp20rc"] = "cpp-20-rc";
99401
+ Runtime2["Bun10rc"] = "bun-1.0-rc";
99402
+ Runtime2["Bun11rc"] = "bun-1.1-rc";
99403
+ Runtime2["Bun12rc"] = "bun-1.2-rc";
99404
+ Runtime2["Bun13rc"] = "bun-1.3-rc";
99405
+ Runtime2["Go123rc"] = "go-1.23-rc";
99406
+ Runtime2["Go124rc"] = "go-1.24-rc";
99407
+ Runtime2["Go125rc"] = "go-1.25-rc";
99408
+ Runtime2["Go126rc"] = "go-1.26-rc";
99409
+ Runtime2["Static1rc"] = "static-1-rc";
99410
+ Runtime2["Flutter324rc"] = "flutter-3.24-rc";
99411
+ Runtime2["Flutter327rc"] = "flutter-3.27-rc";
99412
+ Runtime2["Flutter329rc"] = "flutter-3.29-rc";
99413
+ Runtime2["Flutter332rc"] = "flutter-3.32-rc";
99414
+ Runtime2["Flutter335rc"] = "flutter-3.35-rc";
99415
+ Runtime2["Flutter338rc"] = "flutter-3.38-rc";
99579
99416
  })(Runtime || (Runtime = {}));
99580
99417
  var Runtimes;
99581
99418
  (function(Runtimes2) {
@@ -99610,9 +99447,6 @@ var Runtimes;
99610
99447
  Runtimes2["Pythonml311"] = "python-ml-3.11";
99611
99448
  Runtimes2["Pythonml312"] = "python-ml-3.12";
99612
99449
  Runtimes2["Pythonml313"] = "python-ml-3.13";
99613
- Runtimes2["Deno121"] = "deno-1.21";
99614
- Runtimes2["Deno124"] = "deno-1.24";
99615
- Runtimes2["Deno135"] = "deno-1.35";
99616
99450
  Runtimes2["Deno140"] = "deno-1.40";
99617
99451
  Runtimes2["Deno146"] = "deno-1.46";
99618
99452
  Runtimes2["Deno20"] = "deno-2.0";
@@ -99668,6 +99502,92 @@ var Runtimes;
99668
99502
  Runtimes2["Flutter332"] = "flutter-3.32";
99669
99503
  Runtimes2["Flutter335"] = "flutter-3.35";
99670
99504
  Runtimes2["Flutter338"] = "flutter-3.38";
99505
+ Runtimes2["Node145rc"] = "node-14.5-rc";
99506
+ Runtimes2["Node160rc"] = "node-16.0-rc";
99507
+ Runtimes2["Node180rc"] = "node-18.0-rc";
99508
+ Runtimes2["Node190rc"] = "node-19.0-rc";
99509
+ Runtimes2["Node200rc"] = "node-20.0-rc";
99510
+ Runtimes2["Node210rc"] = "node-21.0-rc";
99511
+ Runtimes2["Node22rc"] = "node-22-rc";
99512
+ Runtimes2["Node23rc"] = "node-23-rc";
99513
+ Runtimes2["Node24rc"] = "node-24-rc";
99514
+ Runtimes2["Node25rc"] = "node-25-rc";
99515
+ Runtimes2["Php80rc"] = "php-8.0-rc";
99516
+ Runtimes2["Php81rc"] = "php-8.1-rc";
99517
+ Runtimes2["Php82rc"] = "php-8.2-rc";
99518
+ Runtimes2["Php83rc"] = "php-8.3-rc";
99519
+ Runtimes2["Php84rc"] = "php-8.4-rc";
99520
+ Runtimes2["Ruby30rc"] = "ruby-3.0-rc";
99521
+ Runtimes2["Ruby31rc"] = "ruby-3.1-rc";
99522
+ Runtimes2["Ruby32rc"] = "ruby-3.2-rc";
99523
+ Runtimes2["Ruby33rc"] = "ruby-3.3-rc";
99524
+ Runtimes2["Ruby34rc"] = "ruby-3.4-rc";
99525
+ Runtimes2["Ruby40rc"] = "ruby-4.0-rc";
99526
+ Runtimes2["Python38rc"] = "python-3.8-rc";
99527
+ Runtimes2["Python39rc"] = "python-3.9-rc";
99528
+ Runtimes2["Python310rc"] = "python-3.10-rc";
99529
+ Runtimes2["Python311rc"] = "python-3.11-rc";
99530
+ Runtimes2["Python312rc"] = "python-3.12-rc";
99531
+ Runtimes2["Python313rc"] = "python-3.13-rc";
99532
+ Runtimes2["Python314rc"] = "python-3.14-rc";
99533
+ Runtimes2["Pythonml311rc"] = "python-ml-3.11-rc";
99534
+ Runtimes2["Pythonml312rc"] = "python-ml-3.12-rc";
99535
+ Runtimes2["Pythonml313rc"] = "python-ml-3.13-rc";
99536
+ Runtimes2["Deno140rc"] = "deno-1.40-rc";
99537
+ Runtimes2["Deno146rc"] = "deno-1.46-rc";
99538
+ Runtimes2["Deno20rc"] = "deno-2.0-rc";
99539
+ Runtimes2["Deno25rc"] = "deno-2.5-rc";
99540
+ Runtimes2["Deno26rc"] = "deno-2.6-rc";
99541
+ Runtimes2["Dart215rc"] = "dart-2.15-rc";
99542
+ Runtimes2["Dart216rc"] = "dart-2.16-rc";
99543
+ Runtimes2["Dart217rc"] = "dart-2.17-rc";
99544
+ Runtimes2["Dart218rc"] = "dart-2.18-rc";
99545
+ Runtimes2["Dart219rc"] = "dart-2.19-rc";
99546
+ Runtimes2["Dart30rc"] = "dart-3.0-rc";
99547
+ Runtimes2["Dart31rc"] = "dart-3.1-rc";
99548
+ Runtimes2["Dart33rc"] = "dart-3.3-rc";
99549
+ Runtimes2["Dart35rc"] = "dart-3.5-rc";
99550
+ Runtimes2["Dart38rc"] = "dart-3.8-rc";
99551
+ Runtimes2["Dart39rc"] = "dart-3.9-rc";
99552
+ Runtimes2["Dart310rc"] = "dart-3.10-rc";
99553
+ Runtimes2["Dotnet60rc"] = "dotnet-6.0-rc";
99554
+ Runtimes2["Dotnet70rc"] = "dotnet-7.0-rc";
99555
+ Runtimes2["Dotnet80rc"] = "dotnet-8.0-rc";
99556
+ Runtimes2["Dotnet10rc"] = "dotnet-10-rc";
99557
+ Runtimes2["Java80rc"] = "java-8.0-rc";
99558
+ Runtimes2["Java110rc"] = "java-11.0-rc";
99559
+ Runtimes2["Java170rc"] = "java-17.0-rc";
99560
+ Runtimes2["Java180rc"] = "java-18.0-rc";
99561
+ Runtimes2["Java210rc"] = "java-21.0-rc";
99562
+ Runtimes2["Java22rc"] = "java-22-rc";
99563
+ Runtimes2["Java25rc"] = "java-25-rc";
99564
+ Runtimes2["Swift55rc"] = "swift-5.5-rc";
99565
+ Runtimes2["Swift58rc"] = "swift-5.8-rc";
99566
+ Runtimes2["Swift59rc"] = "swift-5.9-rc";
99567
+ Runtimes2["Swift510rc"] = "swift-5.10-rc";
99568
+ Runtimes2["Swift62rc"] = "swift-6.2-rc";
99569
+ Runtimes2["Kotlin16rc"] = "kotlin-1.6-rc";
99570
+ Runtimes2["Kotlin18rc"] = "kotlin-1.8-rc";
99571
+ Runtimes2["Kotlin19rc"] = "kotlin-1.9-rc";
99572
+ Runtimes2["Kotlin20rc"] = "kotlin-2.0-rc";
99573
+ Runtimes2["Kotlin23rc"] = "kotlin-2.3-rc";
99574
+ Runtimes2["Cpp17rc"] = "cpp-17-rc";
99575
+ Runtimes2["Cpp20rc"] = "cpp-20-rc";
99576
+ Runtimes2["Bun10rc"] = "bun-1.0-rc";
99577
+ Runtimes2["Bun11rc"] = "bun-1.1-rc";
99578
+ Runtimes2["Bun12rc"] = "bun-1.2-rc";
99579
+ Runtimes2["Bun13rc"] = "bun-1.3-rc";
99580
+ Runtimes2["Go123rc"] = "go-1.23-rc";
99581
+ Runtimes2["Go124rc"] = "go-1.24-rc";
99582
+ Runtimes2["Go125rc"] = "go-1.25-rc";
99583
+ Runtimes2["Go126rc"] = "go-1.26-rc";
99584
+ Runtimes2["Static1rc"] = "static-1-rc";
99585
+ Runtimes2["Flutter324rc"] = "flutter-3.24-rc";
99586
+ Runtimes2["Flutter327rc"] = "flutter-3.27-rc";
99587
+ Runtimes2["Flutter329rc"] = "flutter-3.29-rc";
99588
+ Runtimes2["Flutter332rc"] = "flutter-3.32-rc";
99589
+ Runtimes2["Flutter335rc"] = "flutter-3.35-rc";
99590
+ Runtimes2["Flutter338rc"] = "flutter-3.38-rc";
99671
99591
  })(Runtimes || (Runtimes = {}));
99672
99592
  var UseCases;
99673
99593
  (function(UseCases2) {
@@ -100230,9 +100150,6 @@ var BuildRuntime;
100230
100150
  BuildRuntime2["Pythonml311"] = "python-ml-3.11";
100231
100151
  BuildRuntime2["Pythonml312"] = "python-ml-3.12";
100232
100152
  BuildRuntime2["Pythonml313"] = "python-ml-3.13";
100233
- BuildRuntime2["Deno121"] = "deno-1.21";
100234
- BuildRuntime2["Deno124"] = "deno-1.24";
100235
- BuildRuntime2["Deno135"] = "deno-1.35";
100236
100153
  BuildRuntime2["Deno140"] = "deno-1.40";
100237
100154
  BuildRuntime2["Deno146"] = "deno-1.46";
100238
100155
  BuildRuntime2["Deno20"] = "deno-2.0";
@@ -100288,6 +100205,92 @@ var BuildRuntime;
100288
100205
  BuildRuntime2["Flutter332"] = "flutter-3.32";
100289
100206
  BuildRuntime2["Flutter335"] = "flutter-3.35";
100290
100207
  BuildRuntime2["Flutter338"] = "flutter-3.38";
100208
+ BuildRuntime2["Node145rc"] = "node-14.5-rc";
100209
+ BuildRuntime2["Node160rc"] = "node-16.0-rc";
100210
+ BuildRuntime2["Node180rc"] = "node-18.0-rc";
100211
+ BuildRuntime2["Node190rc"] = "node-19.0-rc";
100212
+ BuildRuntime2["Node200rc"] = "node-20.0-rc";
100213
+ BuildRuntime2["Node210rc"] = "node-21.0-rc";
100214
+ BuildRuntime2["Node22rc"] = "node-22-rc";
100215
+ BuildRuntime2["Node23rc"] = "node-23-rc";
100216
+ BuildRuntime2["Node24rc"] = "node-24-rc";
100217
+ BuildRuntime2["Node25rc"] = "node-25-rc";
100218
+ BuildRuntime2["Php80rc"] = "php-8.0-rc";
100219
+ BuildRuntime2["Php81rc"] = "php-8.1-rc";
100220
+ BuildRuntime2["Php82rc"] = "php-8.2-rc";
100221
+ BuildRuntime2["Php83rc"] = "php-8.3-rc";
100222
+ BuildRuntime2["Php84rc"] = "php-8.4-rc";
100223
+ BuildRuntime2["Ruby30rc"] = "ruby-3.0-rc";
100224
+ BuildRuntime2["Ruby31rc"] = "ruby-3.1-rc";
100225
+ BuildRuntime2["Ruby32rc"] = "ruby-3.2-rc";
100226
+ BuildRuntime2["Ruby33rc"] = "ruby-3.3-rc";
100227
+ BuildRuntime2["Ruby34rc"] = "ruby-3.4-rc";
100228
+ BuildRuntime2["Ruby40rc"] = "ruby-4.0-rc";
100229
+ BuildRuntime2["Python38rc"] = "python-3.8-rc";
100230
+ BuildRuntime2["Python39rc"] = "python-3.9-rc";
100231
+ BuildRuntime2["Python310rc"] = "python-3.10-rc";
100232
+ BuildRuntime2["Python311rc"] = "python-3.11-rc";
100233
+ BuildRuntime2["Python312rc"] = "python-3.12-rc";
100234
+ BuildRuntime2["Python313rc"] = "python-3.13-rc";
100235
+ BuildRuntime2["Python314rc"] = "python-3.14-rc";
100236
+ BuildRuntime2["Pythonml311rc"] = "python-ml-3.11-rc";
100237
+ BuildRuntime2["Pythonml312rc"] = "python-ml-3.12-rc";
100238
+ BuildRuntime2["Pythonml313rc"] = "python-ml-3.13-rc";
100239
+ BuildRuntime2["Deno140rc"] = "deno-1.40-rc";
100240
+ BuildRuntime2["Deno146rc"] = "deno-1.46-rc";
100241
+ BuildRuntime2["Deno20rc"] = "deno-2.0-rc";
100242
+ BuildRuntime2["Deno25rc"] = "deno-2.5-rc";
100243
+ BuildRuntime2["Deno26rc"] = "deno-2.6-rc";
100244
+ BuildRuntime2["Dart215rc"] = "dart-2.15-rc";
100245
+ BuildRuntime2["Dart216rc"] = "dart-2.16-rc";
100246
+ BuildRuntime2["Dart217rc"] = "dart-2.17-rc";
100247
+ BuildRuntime2["Dart218rc"] = "dart-2.18-rc";
100248
+ BuildRuntime2["Dart219rc"] = "dart-2.19-rc";
100249
+ BuildRuntime2["Dart30rc"] = "dart-3.0-rc";
100250
+ BuildRuntime2["Dart31rc"] = "dart-3.1-rc";
100251
+ BuildRuntime2["Dart33rc"] = "dart-3.3-rc";
100252
+ BuildRuntime2["Dart35rc"] = "dart-3.5-rc";
100253
+ BuildRuntime2["Dart38rc"] = "dart-3.8-rc";
100254
+ BuildRuntime2["Dart39rc"] = "dart-3.9-rc";
100255
+ BuildRuntime2["Dart310rc"] = "dart-3.10-rc";
100256
+ BuildRuntime2["Dotnet60rc"] = "dotnet-6.0-rc";
100257
+ BuildRuntime2["Dotnet70rc"] = "dotnet-7.0-rc";
100258
+ BuildRuntime2["Dotnet80rc"] = "dotnet-8.0-rc";
100259
+ BuildRuntime2["Dotnet10rc"] = "dotnet-10-rc";
100260
+ BuildRuntime2["Java80rc"] = "java-8.0-rc";
100261
+ BuildRuntime2["Java110rc"] = "java-11.0-rc";
100262
+ BuildRuntime2["Java170rc"] = "java-17.0-rc";
100263
+ BuildRuntime2["Java180rc"] = "java-18.0-rc";
100264
+ BuildRuntime2["Java210rc"] = "java-21.0-rc";
100265
+ BuildRuntime2["Java22rc"] = "java-22-rc";
100266
+ BuildRuntime2["Java25rc"] = "java-25-rc";
100267
+ BuildRuntime2["Swift55rc"] = "swift-5.5-rc";
100268
+ BuildRuntime2["Swift58rc"] = "swift-5.8-rc";
100269
+ BuildRuntime2["Swift59rc"] = "swift-5.9-rc";
100270
+ BuildRuntime2["Swift510rc"] = "swift-5.10-rc";
100271
+ BuildRuntime2["Swift62rc"] = "swift-6.2-rc";
100272
+ BuildRuntime2["Kotlin16rc"] = "kotlin-1.6-rc";
100273
+ BuildRuntime2["Kotlin18rc"] = "kotlin-1.8-rc";
100274
+ BuildRuntime2["Kotlin19rc"] = "kotlin-1.9-rc";
100275
+ BuildRuntime2["Kotlin20rc"] = "kotlin-2.0-rc";
100276
+ BuildRuntime2["Kotlin23rc"] = "kotlin-2.3-rc";
100277
+ BuildRuntime2["Cpp17rc"] = "cpp-17-rc";
100278
+ BuildRuntime2["Cpp20rc"] = "cpp-20-rc";
100279
+ BuildRuntime2["Bun10rc"] = "bun-1.0-rc";
100280
+ BuildRuntime2["Bun11rc"] = "bun-1.1-rc";
100281
+ BuildRuntime2["Bun12rc"] = "bun-1.2-rc";
100282
+ BuildRuntime2["Bun13rc"] = "bun-1.3-rc";
100283
+ BuildRuntime2["Go123rc"] = "go-1.23-rc";
100284
+ BuildRuntime2["Go124rc"] = "go-1.24-rc";
100285
+ BuildRuntime2["Go125rc"] = "go-1.25-rc";
100286
+ BuildRuntime2["Go126rc"] = "go-1.26-rc";
100287
+ BuildRuntime2["Static1rc"] = "static-1-rc";
100288
+ BuildRuntime2["Flutter324rc"] = "flutter-3.24-rc";
100289
+ BuildRuntime2["Flutter327rc"] = "flutter-3.27-rc";
100290
+ BuildRuntime2["Flutter329rc"] = "flutter-3.29-rc";
100291
+ BuildRuntime2["Flutter332rc"] = "flutter-3.32-rc";
100292
+ BuildRuntime2["Flutter335rc"] = "flutter-3.35-rc";
100293
+ BuildRuntime2["Flutter338rc"] = "flutter-3.38-rc";
100291
100294
  })(BuildRuntime || (BuildRuntime = {}));
100292
100295
  var Adapter;
100293
100296
  (function(Adapter2) {
@@ -100444,28 +100447,24 @@ var BillingPlanGroup;
100444
100447
  BillingPlanGroup2["Pro"] = "pro";
100445
100448
  BillingPlanGroup2["Scale"] = "scale";
100446
100449
  })(BillingPlanGroup || (BillingPlanGroup = {}));
100447
- var DomainPurchasePaymentStatus;
100448
- (function(DomainPurchasePaymentStatus2) {
100449
- DomainPurchasePaymentStatus2["Pending"] = "pending";
100450
- DomainPurchasePaymentStatus2["PendingConfirmation"] = "pending_confirmation";
100451
- DomainPurchasePaymentStatus2["PendingPaymentProcessing"] = "pending_payment_processing";
100452
- DomainPurchasePaymentStatus2["Authorized"] = "authorized";
100453
- DomainPurchasePaymentStatus2["Captured"] = "captured";
100454
- DomainPurchasePaymentStatus2["Failed"] = "failed";
100455
- DomainPurchasePaymentStatus2["CaptureFailed"] = "capture_failed";
100456
- DomainPurchasePaymentStatus2["RenewalCaptureFailed"] = "renewal_capture_failed";
100457
- })(DomainPurchasePaymentStatus || (DomainPurchasePaymentStatus = {}));
100458
- var DomainTransferStatusStatus;
100459
- (function(DomainTransferStatusStatus2) {
100460
- DomainTransferStatusStatus2["Transferrable"] = "transferrable";
100461
- DomainTransferStatusStatus2["NotTransferrable"] = "not_transferrable";
100462
- DomainTransferStatusStatus2["PendingOwner"] = "pending_owner";
100463
- DomainTransferStatusStatus2["PendingAdmin"] = "pending_admin";
100464
- DomainTransferStatusStatus2["PendingRegistry"] = "pending_registry";
100465
- DomainTransferStatusStatus2["Completed"] = "completed";
100466
- DomainTransferStatusStatus2["Cancelled"] = "cancelled";
100467
- DomainTransferStatusStatus2["ServiceUnavailable"] = "service_unavailable";
100468
- })(DomainTransferStatusStatus || (DomainTransferStatusStatus = {}));
100450
+ var DomainTransferStatusEnum;
100451
+ (function(DomainTransferStatusEnum2) {
100452
+ DomainTransferStatusEnum2["Transferrable"] = "transferrable";
100453
+ DomainTransferStatusEnum2["NotTransferrable"] = "not_transferrable";
100454
+ DomainTransferStatusEnum2["PendingOwner"] = "pending_owner";
100455
+ DomainTransferStatusEnum2["PendingAdmin"] = "pending_admin";
100456
+ DomainTransferStatusEnum2["PendingRegistry"] = "pending_registry";
100457
+ DomainTransferStatusEnum2["Completed"] = "completed";
100458
+ DomainTransferStatusEnum2["Cancelled"] = "cancelled";
100459
+ DomainTransferStatusEnum2["ServiceUnavailable"] = "service_unavailable";
100460
+ })(DomainTransferStatusEnum || (DomainTransferStatusEnum = {}));
100461
+ var DomainPurchaseStatus;
100462
+ (function(DomainPurchaseStatus2) {
100463
+ DomainPurchaseStatus2["Pending"] = "pending";
100464
+ DomainPurchaseStatus2["Succeeded"] = "succeeded";
100465
+ DomainPurchaseStatus2["Failed"] = "failed";
100466
+ DomainPurchaseStatus2["Cancelled"] = "cancelled";
100467
+ })(DomainPurchaseStatus || (DomainPurchaseStatus = {}));
100469
100468
 
100470
100469
  // lib/parser.ts
100471
100470
  var import_chalk2 = __toESM(require_source(), 1);
@@ -100477,7 +100476,7 @@ var package_default = {
100477
100476
  type: "module",
100478
100477
  homepage: "https://appwrite.io/support",
100479
100478
  description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
100480
- version: "15.1.0",
100479
+ version: "16.0.0",
100481
100480
  license: "BSD-3-Clause",
100482
100481
  main: "dist/index.cjs",
100483
100482
  module: "dist/index.js",
@@ -100521,7 +100520,7 @@ var package_default = {
100521
100520
  "windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
100522
100521
  },
100523
100522
  dependencies: {
100524
- "@appwrite.io/console": "^5.0.0",
100523
+ "@appwrite.io/console": "*",
100525
100524
  chalk: "4.1.2",
100526
100525
  chokidar: "^3.6.0",
100527
100526
  "cli-progress": "^3.12.0",
@@ -100772,14 +100771,18 @@ var commandDescriptions = {
100772
100771
  messaging: `The messaging command allows you to manage topics and targets and send messages.`,
100773
100772
  migrations: `The migrations command allows you to migrate data between services.`,
100774
100773
  vcs: `The vcs command allows you to interact with VCS providers and manage your code repositories.`,
100774
+ webhooks: `The webhooks command allows you to manage your project webhooks.`,
100775
100775
  main: import_chalk2.default.redBright(`${logo}${description}`)
100776
100776
  };
100777
100777
 
100778
100778
  // lib/commands/utils/deployment.ts
100779
100779
  var POLL_DEBOUNCE = 2e3;
100780
100780
  async function packageDirectory(dirPath) {
100781
- const tempFile = import_path5.default.join(import_os3.default.tmpdir(), `appwrite-deploy-${Date.now()}.tar.gz`);
100782
- await zn(
100781
+ const tempFile = import_path5.default.join(
100782
+ import_os3.default.tmpdir(),
100783
+ `appwrite-deploy-${Date.now()}.tar.gz`
100784
+ );
100785
+ await Pn(
100783
100786
  {
100784
100787
  gzip: true,
100785
100788
  file: tempFile,
@@ -100848,7 +100851,7 @@ async function downloadDeploymentCode(params) {
100848
100851
  `Failed to write deployment archive to "${compressedFileName}": ${message}`
100849
100852
  );
100850
100853
  }
100851
- lo({
100854
+ ao({
100852
100855
  sync: true,
100853
100856
  cwd: resourcePath,
100854
100857
  file: compressedFileName,
@@ -104856,7 +104859,7 @@ var Pull = class {
104856
104859
  return [];
104857
104860
  }
104858
104861
  const { functions: allFunctions } = await paginate(
104859
- async () => new Functions(this.projectClient).list(),
104862
+ async (args) => new Functions(this.projectClient).list(args.queries),
104860
104863
  {},
104861
104864
  100,
104862
104865
  "functions"
@@ -104940,7 +104943,7 @@ var Pull = class {
104940
104943
  return [];
104941
104944
  }
104942
104945
  const { sites: fetchedSites } = await paginate(
104943
- async () => new Sites(this.projectClient).list(),
104946
+ async (args) => new Sites(this.projectClient).list(args.queries),
104944
104947
  {},
104945
104948
  100,
104946
104949
  "sites"
@@ -105018,7 +105021,7 @@ var Pull = class {
105018
105021
  return { databases: [], collections: [] };
105019
105022
  }
105020
105023
  const { databases } = await paginate(
105021
- async () => new Databases(this.projectClient).list(),
105024
+ async (args) => new Databases(this.projectClient).list(args.queries),
105022
105025
  {},
105023
105026
  100,
105024
105027
  "databases"
@@ -105031,7 +105034,10 @@ var Pull = class {
105031
105034
  );
105032
105035
  allDatabases.push(database);
105033
105036
  const { collections } = await paginate(
105034
- async () => new Databases(this.projectClient).listCollections(database.$id),
105037
+ async (args) => new Databases(this.projectClient).listCollections(
105038
+ database.$id,
105039
+ args.queries
105040
+ ),
105035
105041
  {},
105036
105042
  100,
105037
105043
  "collections"
@@ -105069,7 +105075,9 @@ var Pull = class {
105069
105075
  return { databases: [], tables: [] };
105070
105076
  }
105071
105077
  const { databases } = await paginate(
105072
- async () => new TablesDB(this.projectClient).list(),
105078
+ async (args) => new TablesDB(this.projectClient).list({
105079
+ queries: args.queries
105080
+ }),
105073
105081
  {},
105074
105082
  100,
105075
105083
  "databases"
@@ -105082,7 +105090,10 @@ var Pull = class {
105082
105090
  );
105083
105091
  allDatabases.push(filterBySchema(database, DatabaseSchema));
105084
105092
  const { tables } = await paginate(
105085
- async () => new TablesDB(this.projectClient).listTables(database.$id),
105093
+ async (args) => new TablesDB(this.projectClient).listTables({
105094
+ databaseId: database.$id,
105095
+ queries: args.queries
105096
+ }),
105086
105097
  {},
105087
105098
  100,
105088
105099
  "tables"
@@ -105124,7 +105135,7 @@ var Pull = class {
105124
105135
  return [];
105125
105136
  }
105126
105137
  const { buckets } = await paginate(
105127
- async () => new Storage(this.projectClient).listBuckets(),
105138
+ async (args) => new Storage(this.projectClient).listBuckets(args.queries),
105128
105139
  {},
105129
105140
  100,
105130
105141
  "buckets"
@@ -105154,7 +105165,7 @@ var Pull = class {
105154
105165
  return [];
105155
105166
  }
105156
105167
  const { teams } = await paginate(
105157
- async () => new Teams(this.projectClient).list(),
105168
+ async (args) => new Teams(this.projectClient).list(args.queries),
105158
105169
  {},
105159
105170
  100,
105160
105171
  "teams"
@@ -105180,7 +105191,7 @@ var Pull = class {
105180
105191
  return [];
105181
105192
  }
105182
105193
  const { topics } = await paginate(
105183
- async () => new Messaging(this.projectClient).listTopics(),
105194
+ async (args) => new Messaging(this.projectClient).listTopics(args.queries),
105184
105195
  {},
105185
105196
  100,
105186
105197
  "topics"
@@ -105252,7 +105263,7 @@ var pullFunctions = async ({
105252
105263
  return;
105253
105264
  }
105254
105265
  const functionsToCheck = cliConfig.all ? (await paginate(
105255
- async () => (await getFunctionsService()).list(),
105266
+ async (args) => (await getFunctionsService()).list(args.queries),
105256
105267
  {},
105257
105268
  100,
105258
105269
  "functions"
@@ -105290,7 +105301,7 @@ var pullSites = async ({
105290
105301
  return;
105291
105302
  }
105292
105303
  const sitesToCheck = cliConfig.all ? (await paginate(
105293
- async () => (await getSitesService()).list(),
105304
+ async (args) => (await getSitesService()).list(args.queries),
105294
105305
  {},
105295
105306
  100,
105296
105307
  "sites"
@@ -106049,13 +106060,33 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
106049
106060
  requiresApiKey: supportsServerSide
106050
106061
  });
106051
106062
  }
106063
+ /**
106064
+ * Deduplicate entities by composite key ($id + databaseId).
106065
+ * Keeps the last occurrence to match addTable/addCollection semantics.
106066
+ */
106067
+ dedupeEntities(entities) {
106068
+ const seen = /* @__PURE__ */ new Map();
106069
+ for (const entity of entities) {
106070
+ seen.set(`${entity.databaseId}:${entity.$id}`, entity);
106071
+ }
106072
+ return Array.from(seen.values());
106073
+ }
106052
106074
  async generate(config2, options) {
106053
106075
  if (!config2.projectId) {
106054
106076
  throw new Error("Project ID is required in configuration");
106055
106077
  }
106056
106078
  const appwriteDep = options?.appwriteImportSource ?? getAppwriteDependency();
106057
106079
  const importExt = options?.importExtension ?? detectImportExtension();
106058
- const hasEntities = config2.tables && config2.tables.length > 0 || config2.collections && config2.collections.length > 0;
106080
+ const dedupedConfig = { ...config2 };
106081
+ if (dedupedConfig.tables && dedupedConfig.tables.length > 0) {
106082
+ dedupedConfig.tables = this.dedupeEntities(dedupedConfig.tables);
106083
+ }
106084
+ if (dedupedConfig.collections && dedupedConfig.collections.length > 0) {
106085
+ dedupedConfig.collections = this.dedupeEntities(
106086
+ dedupedConfig.collections
106087
+ );
106088
+ }
106089
+ const hasEntities = dedupedConfig.tables && dedupedConfig.tables.length > 0 || dedupedConfig.collections && dedupedConfig.collections.length > 0;
106059
106090
  if (!hasEntities) {
106060
106091
  console.log(
106061
106092
  "No tables or collections found in configuration. Skipping database generation."
@@ -106064,14 +106095,21 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
106064
106095
  dbContent: "// No tables or collections found in configuration\n",
106065
106096
  typesContent: "// No tables or collections found in configuration\n",
106066
106097
  indexContent: this.generateIndexFile(importExt),
106067
- constantsContent: this.generateConstantsFile(config2, appwriteDep)
106098
+ constantsContent: this.generateConstantsFile(
106099
+ dedupedConfig,
106100
+ appwriteDep
106101
+ )
106068
106102
  };
106069
106103
  }
106070
106104
  return {
106071
- dbContent: this.generateDatabasesFile(config2, importExt, appwriteDep),
106072
- typesContent: this.generateTypesFile(config2, appwriteDep),
106105
+ dbContent: this.generateDatabasesFile(
106106
+ dedupedConfig,
106107
+ importExt,
106108
+ appwriteDep
106109
+ ),
106110
+ typesContent: this.generateTypesFile(dedupedConfig, appwriteDep),
106073
106111
  indexContent: this.generateIndexFile(importExt),
106074
- constantsContent: this.generateConstantsFile(config2, appwriteDep)
106112
+ constantsContent: this.generateConstantsFile(dedupedConfig, appwriteDep)
106075
106113
  };
106076
106114
  }
106077
106115
  };