appwrite-cli 15.1.0 → 17.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 (51) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +4 -4
  3. package/cli.ts +2 -0
  4. package/dist/bundle-win-arm64.mjs +1785 -1288
  5. package/dist/cli.cjs +1729 -1232
  6. package/dist/index.cjs +836 -994
  7. package/dist/index.js +892 -1050
  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/push.d.ts.map +1 -1
  12. package/dist/lib/commands/run.d.ts.map +1 -1
  13. package/dist/lib/commands/services/webhooks.d.ts +3 -0
  14. package/dist/lib/commands/services/webhooks.d.ts.map +1 -0
  15. package/dist/lib/commands/utils/deployment.d.ts.map +1 -1
  16. package/dist/lib/constants.d.ts +1 -1
  17. package/dist/lib/parser.d.ts.map +1 -1
  18. package/dist/lib/questions.d.ts.map +1 -1
  19. package/docs/examples/project/create-variable.md +1 -0
  20. package/docs/examples/project/update-variable.md +1 -2
  21. package/docs/examples/users/update-impersonator.md +5 -0
  22. package/docs/examples/webhooks/create.md +7 -0
  23. package/docs/examples/webhooks/delete.md +4 -0
  24. package/docs/examples/webhooks/get.md +4 -0
  25. package/docs/examples/webhooks/list.md +3 -0
  26. package/docs/examples/webhooks/update-signature.md +4 -0
  27. package/docs/examples/webhooks/update.md +7 -0
  28. package/install.ps1 +2 -2
  29. package/install.sh +1 -1
  30. package/lib/commands/generators/typescript/databases.ts +36 -6
  31. package/lib/commands/pull.ts +30 -12
  32. package/lib/commands/push.ts +6 -24
  33. package/lib/commands/run.ts +5 -7
  34. package/lib/commands/services/account.ts +0 -169
  35. package/lib/commands/services/health.ts +0 -68
  36. package/lib/commands/services/project.ts +21 -12
  37. package/lib/commands/services/projects.ts +0 -112
  38. package/lib/commands/services/users.ts +14 -1
  39. package/lib/commands/services/webhooks.ts +134 -0
  40. package/lib/commands/utils/deployment.ts +4 -1
  41. package/lib/constants.ts +1 -1
  42. package/lib/parser.ts +1 -0
  43. package/lib/questions.ts +13 -7
  44. package/package.json +2 -2
  45. package/scoop/appwrite.config.json +3 -3
  46. package/docs/examples/projects/create-webhook.md +0 -8
  47. package/docs/examples/projects/delete-webhook.md +0 -5
  48. package/docs/examples/projects/get-webhook.md +0 -5
  49. package/docs/examples/projects/list-webhooks.md +0 -4
  50. package/docs/examples/projects/update-webhook-signature.md +0 -5
  51. package/docs/examples/projects/update-webhook.md +0 -9
package/dist/index.js CHANGED
@@ -11205,16 +11205,16 @@ var require_share = __commonJS({
11205
11205
  };
11206
11206
  }
11207
11207
  exports.share = share;
11208
- function handleReset(reset, on2) {
11208
+ function handleReset(reset, on) {
11209
11209
  var args = [];
11210
11210
  for (var _i2 = 2; _i2 < arguments.length; _i2++) {
11211
11211
  args[_i2 - 2] = arguments[_i2];
11212
11212
  }
11213
- if (on2 === true) {
11213
+ if (on === true) {
11214
11214
  reset();
11215
11215
  return;
11216
11216
  }
11217
- if (on2 === false) {
11217
+ if (on === false) {
11218
11218
  return;
11219
11219
  }
11220
11220
  var onSubscriber = new Subscriber_1.SafeSubscriber({
@@ -11223,7 +11223,7 @@ var require_share = __commonJS({
11223
11223
  reset();
11224
11224
  }
11225
11225
  });
11226
- return innerFrom_1.innerFrom(on2.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);
11226
+ return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);
11227
11227
  }
11228
11228
  }
11229
11229
  });
@@ -19586,9 +19586,9 @@ var require_stream_duplex = __commonJS({
19586
19586
  }
19587
19587
  });
19588
19588
 
19589
- // node_modules/safe-buffer/index.js
19589
+ // node_modules/string_decoder/node_modules/safe-buffer/index.js
19590
19590
  var require_safe_buffer = __commonJS({
19591
- "node_modules/safe-buffer/index.js"(exports, module) {
19591
+ "node_modules/string_decoder/node_modules/safe-buffer/index.js"(exports, module) {
19592
19592
  var buffer = __require("buffer");
19593
19593
  var Buffer2 = buffer.Buffer;
19594
19594
  function copyProps(src, dst) {
@@ -53493,8 +53493,8 @@ var require_bignumber = __commonJS({
53493
53493
  y2.s = -b2;
53494
53494
  return x.plus(y2);
53495
53495
  }
53496
- var xe2 = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
53497
- if (!xe2 || !ye2) {
53496
+ var xe = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
53497
+ if (!xe || !ye2) {
53498
53498
  if (!xc || !yc) return xc ? (y2.s = -b2, y2) : new BigNumber2(yc ? x : NaN);
53499
53499
  if (!xc[0] || !yc[0]) {
53500
53500
  return yc[0] ? (y2.s = -b2, y2) : new BigNumber2(xc[0] ? x : (
@@ -53503,15 +53503,15 @@ var require_bignumber = __commonJS({
53503
53503
  ));
53504
53504
  }
53505
53505
  }
53506
- xe2 = bitFloor(xe2);
53506
+ xe = bitFloor(xe);
53507
53507
  ye2 = bitFloor(ye2);
53508
53508
  xc = xc.slice();
53509
- if (a = xe2 - ye2) {
53509
+ if (a = xe - ye2) {
53510
53510
  if (xLTy = a < 0) {
53511
53511
  a = -a;
53512
53512
  t = xc;
53513
53513
  } else {
53514
- ye2 = xe2;
53514
+ ye2 = xe;
53515
53515
  t = yc;
53516
53516
  }
53517
53517
  t.reverse();
@@ -53638,17 +53638,17 @@ var require_bignumber = __commonJS({
53638
53638
  y2.s = -b2;
53639
53639
  return x.minus(y2);
53640
53640
  }
53641
- var xe2 = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
53642
- if (!xe2 || !ye2) {
53641
+ var xe = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
53642
+ if (!xe || !ye2) {
53643
53643
  if (!xc || !yc) return new BigNumber2(a / 0);
53644
53644
  if (!xc[0] || !yc[0]) return yc[0] ? y2 : new BigNumber2(xc[0] ? x : a * 0);
53645
53645
  }
53646
- xe2 = bitFloor(xe2);
53646
+ xe = bitFloor(xe);
53647
53647
  ye2 = bitFloor(ye2);
53648
53648
  xc = xc.slice();
53649
- if (a = xe2 - ye2) {
53649
+ if (a = xe - ye2) {
53650
53650
  if (a > 0) {
53651
- ye2 = xe2;
53651
+ ye2 = xe;
53652
53652
  t = yc;
53653
53653
  } else {
53654
53654
  a = -a;
@@ -55205,12 +55205,12 @@ var require_utils4 = __commonJS({
55205
55205
  return str;
55206
55206
  }
55207
55207
  var codeCache = {};
55208
- function addToCodeCache(name, on2, off) {
55209
- on2 = "\x1B[" + on2 + "m";
55208
+ function addToCodeCache(name, on, off) {
55209
+ on = "\x1B[" + on + "m";
55210
55210
  off = "\x1B[" + off + "m";
55211
- codeCache[on2] = { set: name, to: true };
55211
+ codeCache[on] = { set: name, to: true };
55212
55212
  codeCache[off] = { set: name, to: false };
55213
- codeCache[name] = { on: on2, off };
55213
+ codeCache[name] = { on, off };
55214
55214
  }
55215
55215
  addToCodeCache("bold", 1, 22);
55216
55216
  addToCodeCache("italics", 3, 23);
@@ -62727,7 +62727,7 @@ var id_default = ID;
62727
62727
  // lib/constants.ts
62728
62728
  var SDK_TITLE = "Appwrite";
62729
62729
  var SDK_TITLE_LOWER = "appwrite";
62730
- var SDK_VERSION = "15.1.0";
62730
+ var SDK_VERSION = "17.0.0";
62731
62731
  var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
62732
62732
  var EXECUTABLE_NAME = "appwrite";
62733
62733
  var NPM_PACKAGE_NAME = "appwrite-cli";
@@ -78128,85 +78128,85 @@ import os4 from "os";
78128
78128
  import path from "path";
78129
78129
 
78130
78130
  // node_modules/tar/dist/esm/index.min.js
78131
- import Hr from "events";
78131
+ import Kr from "events";
78132
78132
  import I from "fs";
78133
- import { EventEmitter as Oi } from "node:events";
78134
- import Ds from "node:stream";
78135
- import { StringDecoder as Ir } from "node:string_decoder";
78136
- import or from "node:path";
78133
+ import { EventEmitter as Ti } from "node:events";
78134
+ import Ns from "node:stream";
78135
+ import { StringDecoder as Mr } from "node:string_decoder";
78136
+ import nr from "node:path";
78137
78137
  import Vt from "node:fs";
78138
- import { dirname as bn, parse as gn } from "path";
78139
- import { EventEmitter as wn } from "events";
78140
- import vi from "assert";
78141
- import { Buffer as _t } from "buffer";
78142
- import * as vs from "zlib";
78143
- import Yr from "zlib";
78138
+ import { dirname as xn, parse as Ln } from "path";
78139
+ import { EventEmitter as _n } from "events";
78140
+ import Mi from "assert";
78141
+ import { Buffer as gt } from "buffer";
78142
+ import * as ks from "zlib";
78143
+ import qr from "zlib";
78144
78144
  import { posix as Zt } from "node:path";
78145
- import { basename as dn } from "node:path";
78146
- import ci from "fs";
78145
+ import { basename as wn } from "node:path";
78146
+ import fi from "fs";
78147
78147
  import $ from "fs";
78148
- import Xs from "path";
78149
- import { win32 as xn } from "node:path";
78150
- import rr from "path";
78151
- import Lr from "node:fs";
78152
- import io from "node:assert";
78153
- import { randomBytes as xr } from "node:crypto";
78148
+ import $s from "path";
78149
+ import { win32 as In } from "node:path";
78150
+ import sr from "path";
78151
+ import Cr from "node:fs";
78152
+ import so from "node:assert";
78153
+ import { randomBytes as Ir } from "node:crypto";
78154
78154
  import u from "node:fs";
78155
78155
  import R from "node:path";
78156
- import lr from "fs";
78157
- import ui from "node:fs";
78156
+ import cr from "fs";
78157
+ import mi from "node:fs";
78158
78158
  import Ee from "node:path";
78159
78159
  import k from "node:fs";
78160
- import qn from "node:fs/promises";
78161
- import mi from "node:path";
78162
- import { join as Er } from "node:path";
78160
+ import jn from "node:fs/promises";
78161
+ import pi from "node:path";
78162
+ import { join as br } from "node:path";
78163
78163
  import v from "node:fs";
78164
- import Nr from "node:path";
78165
- var Dr = Object.defineProperty;
78166
- var Ar = (s3, t) => {
78167
- for (var e in t) Dr(s3, e, { get: t[e], enumerable: true });
78164
+ import Fr from "node:path";
78165
+ var kr = Object.defineProperty;
78166
+ var vr = (s3, t) => {
78167
+ for (var e in t) kr(s3, e, { get: t[e], enumerable: true });
78168
78168
  };
78169
- var Ts = typeof process == "object" && process ? process : { stdout: null, stderr: null };
78170
- var Cr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof Ds || Fr(s3) || kr(s3));
78171
- var Fr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Oi && typeof s3.pipe == "function" && s3.pipe !== Ds.Writable.prototype.pipe;
78172
- var kr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Oi && typeof s3.write == "function" && typeof s3.end == "function";
78169
+ var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
78170
+ var Br = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof Ns || Pr(s3) || zr(s3));
78171
+ var Pr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.pipe == "function" && s3.pipe !== Ns.Writable.prototype.pipe;
78172
+ var zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.write == "function" && typeof s3.end == "function";
78173
78173
  var q = /* @__PURE__ */ Symbol("EOF");
78174
78174
  var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
78175
78175
  var rt = /* @__PURE__ */ Symbol("emittedEnd");
78176
- var xe = /* @__PURE__ */ Symbol("emittingEnd");
78176
+ var Le = /* @__PURE__ */ Symbol("emittingEnd");
78177
78177
  var jt = /* @__PURE__ */ Symbol("emittedError");
78178
- var Le = /* @__PURE__ */ Symbol("closed");
78179
- var xs = /* @__PURE__ */ Symbol("read");
78180
- var Ne = /* @__PURE__ */ Symbol("flush");
78181
- var Ls = /* @__PURE__ */ Symbol("flushChunk");
78178
+ var Ne = /* @__PURE__ */ Symbol("closed");
78179
+ var Ts = /* @__PURE__ */ Symbol("read");
78180
+ var Ae = /* @__PURE__ */ Symbol("flush");
78181
+ var xs = /* @__PURE__ */ Symbol("flushChunk");
78182
78182
  var z3 = /* @__PURE__ */ Symbol("encoding");
78183
78183
  var Mt = /* @__PURE__ */ Symbol("decoder");
78184
78184
  var b = /* @__PURE__ */ Symbol("flowing");
78185
78185
  var Qt = /* @__PURE__ */ Symbol("paused");
78186
78186
  var Bt = /* @__PURE__ */ Symbol("resume");
78187
- var g = /* @__PURE__ */ Symbol("buffer");
78188
- var D = /* @__PURE__ */ Symbol("pipes");
78189
- var _ = /* @__PURE__ */ Symbol("bufferLength");
78190
- var Si = /* @__PURE__ */ Symbol("bufferPush");
78187
+ var _ = /* @__PURE__ */ Symbol("buffer");
78188
+ var A = /* @__PURE__ */ Symbol("pipes");
78189
+ var g = /* @__PURE__ */ Symbol("bufferLength");
78190
+ var yi = /* @__PURE__ */ Symbol("bufferPush");
78191
78191
  var De = /* @__PURE__ */ Symbol("bufferShift");
78192
78192
  var L = /* @__PURE__ */ Symbol("objectMode");
78193
78193
  var w = /* @__PURE__ */ Symbol("destroyed");
78194
- var yi = /* @__PURE__ */ Symbol("error");
78195
- var Ri = /* @__PURE__ */ Symbol("emitData");
78196
- var Ns = /* @__PURE__ */ Symbol("emitEnd");
78197
- var bi = /* @__PURE__ */ Symbol("emitEnd2");
78194
+ var Ri = /* @__PURE__ */ Symbol("error");
78195
+ var bi = /* @__PURE__ */ Symbol("emitData");
78196
+ var Ls = /* @__PURE__ */ Symbol("emitEnd");
78197
+ var _i = /* @__PURE__ */ Symbol("emitEnd2");
78198
78198
  var Z = /* @__PURE__ */ Symbol("async");
78199
78199
  var gi = /* @__PURE__ */ Symbol("abort");
78200
- var Ae = /* @__PURE__ */ Symbol("aborted");
78200
+ var Ie = /* @__PURE__ */ Symbol("aborted");
78201
78201
  var Jt = /* @__PURE__ */ Symbol("signal");
78202
78202
  var yt = /* @__PURE__ */ Symbol("dataListeners");
78203
78203
  var C = /* @__PURE__ */ Symbol("discarded");
78204
78204
  var te = (s3) => Promise.resolve().then(s3);
78205
- var vr = (s3) => s3();
78206
- var Mr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
78207
- var Br = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
78208
- var Pr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
78209
- var Ie = class {
78205
+ var Ur = (s3) => s3();
78206
+ var Hr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
78207
+ var Wr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
78208
+ var Gr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
78209
+ var Ce = class {
78210
78210
  src;
78211
78211
  dest;
78212
78212
  opts;
@@ -78223,7 +78223,7 @@ var Ie = class {
78223
78223
  this.unpipe(), this.opts.end && this.dest.end();
78224
78224
  }
78225
78225
  };
78226
- var _i = class extends Ie {
78226
+ var Oi = class extends Ce {
78227
78227
  unpipe() {
78228
78228
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
78229
78229
  }
@@ -78231,26 +78231,26 @@ var _i = class extends Ie {
78231
78231
  super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
78232
78232
  }
78233
78233
  };
78234
- var zr = (s3) => !!s3.objectMode;
78235
- var Ur = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
78236
- var A = class extends Oi {
78234
+ var Zr = (s3) => !!s3.objectMode;
78235
+ var Yr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
78236
+ var D = class extends Ti {
78237
78237
  [b] = false;
78238
78238
  [Qt] = false;
78239
- [D] = [];
78240
- [g] = [];
78239
+ [A] = [];
78240
+ [_] = [];
78241
78241
  [L];
78242
78242
  [z3];
78243
78243
  [Z];
78244
78244
  [Mt];
78245
78245
  [q] = false;
78246
78246
  [rt] = false;
78247
- [xe] = false;
78248
78247
  [Le] = false;
78248
+ [Ne] = false;
78249
78249
  [jt] = null;
78250
- [_] = 0;
78250
+ [g] = 0;
78251
78251
  [w] = false;
78252
78252
  [Jt];
78253
- [Ae] = false;
78253
+ [Ie] = false;
78254
78254
  [yt] = 0;
78255
78255
  [C] = false;
78256
78256
  writable = true;
@@ -78258,12 +78258,12 @@ var A = class extends Oi {
78258
78258
  constructor(...t) {
78259
78259
  let e = t[0] || {};
78260
78260
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
78261
- 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 Ir(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] });
78261
+ Zr(e) ? (this[L] = true, this[z3] = null) : Yr(e) ? (this[z3] = e.encoding, this[L] = false) : (this[L] = false, this[z3] = null), this[Z] = !!e.async, this[Mt] = this[z3] ? new Mr(this[z3]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
78262
78262
  let { signal: i } = e;
78263
78263
  i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
78264
78264
  }
78265
78265
  get bufferLength() {
78266
- return this[_];
78266
+ return this[g];
78267
78267
  }
78268
78268
  get encoding() {
78269
78269
  return this[z3];
@@ -78287,46 +78287,46 @@ var A = class extends Oi {
78287
78287
  this[Z] = this[Z] || !!t;
78288
78288
  }
78289
78289
  [gi]() {
78290
- this[Ae] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
78290
+ this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
78291
78291
  }
78292
78292
  get aborted() {
78293
- return this[Ae];
78293
+ return this[Ie];
78294
78294
  }
78295
78295
  set aborted(t) {
78296
78296
  }
78297
78297
  write(t, e, i) {
78298
- if (this[Ae]) return false;
78298
+ if (this[Ie]) return false;
78299
78299
  if (this[q]) throw new Error("write after end");
78300
78300
  if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
78301
78301
  typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
78302
- let r = this[Z] ? te : vr;
78302
+ let r = this[Z] ? te : Ur;
78303
78303
  if (!this[L] && !Buffer.isBuffer(t)) {
78304
- if (Pr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
78305
- else if (Br(t)) t = Buffer.from(t);
78304
+ if (Gr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
78305
+ else if (Wr(t)) t = Buffer.from(t);
78306
78306
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
78307
78307
  }
78308
- 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]);
78308
+ 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]);
78309
78309
  }
78310
78310
  read(t) {
78311
78311
  if (this[w]) return null;
78312
- if (this[C] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[j](), null;
78313
- this[L] && (t = null), this[g].length > 1 && !this[L] && (this[g] = [this[z3] ? this[g].join("") : Buffer.concat(this[g], this[_])]);
78314
- let e = this[xs](t || null, this[g][0]);
78312
+ if (this[C] = false, this[g] === 0 || t === 0 || t && t > this[g]) return this[j](), null;
78313
+ this[L] && (t = null), this[_].length > 1 && !this[L] && (this[_] = [this[z3] ? this[_].join("") : Buffer.concat(this[_], this[g])]);
78314
+ let e = this[Ts](t || null, this[_][0]);
78315
78315
  return this[j](), e;
78316
78316
  }
78317
- [xs](t, e) {
78317
+ [Ts](t, e) {
78318
78318
  if (this[L]) this[De]();
78319
78319
  else {
78320
78320
  let i = e;
78321
- 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);
78321
+ 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);
78322
78322
  }
78323
- return this.emit("data", e), !this[g].length && !this[q] && this.emit("drain"), e;
78323
+ return this.emit("data", e), !this[_].length && !this[q] && this.emit("drain"), e;
78324
78324
  }
78325
78325
  end(t, e, i) {
78326
78326
  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;
78327
78327
  }
78328
78328
  [Bt]() {
78329
- 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"));
78329
+ 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"));
78330
78330
  }
78331
78331
  resume() {
78332
78332
  return this[Bt]();
@@ -78343,39 +78343,39 @@ var A = class extends Oi {
78343
78343
  get paused() {
78344
78344
  return this[Qt];
78345
78345
  }
78346
- [Si](t) {
78347
- this[L] ? this[_] += 1 : this[_] += t.length, this[g].push(t);
78346
+ [yi](t) {
78347
+ this[L] ? this[g] += 1 : this[g] += t.length, this[_].push(t);
78348
78348
  }
78349
78349
  [De]() {
78350
- return this[L] ? this[_] -= 1 : this[_] -= this[g][0].length, this[g].shift();
78350
+ return this[L] ? this[g] -= 1 : this[g] -= this[_][0].length, this[_].shift();
78351
78351
  }
78352
- [Ne](t = false) {
78352
+ [Ae](t = false) {
78353
78353
  do
78354
78354
  ;
78355
- while (this[Ls](this[De]()) && this[g].length);
78356
- !t && !this[g].length && !this[q] && this.emit("drain");
78355
+ while (this[xs](this[De]()) && this[_].length);
78356
+ !t && !this[_].length && !this[q] && this.emit("drain");
78357
78357
  }
78358
- [Ls](t) {
78358
+ [xs](t) {
78359
78359
  return this.emit("data", t), this[b];
78360
78360
  }
78361
78361
  pipe(t, e) {
78362
78362
  if (this[w]) return t;
78363
78363
  this[C] = false;
78364
78364
  let i = this[rt];
78365
- 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;
78365
+ 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;
78366
78366
  }
78367
78367
  unpipe(t) {
78368
- let e = this[D].find((i) => i.dest === t);
78369
- 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());
78368
+ let e = this[A].find((i) => i.dest === t);
78369
+ 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());
78370
78370
  }
78371
78371
  addListener(t, e) {
78372
78372
  return this.on(t, e);
78373
78373
  }
78374
78374
  on(t, e) {
78375
78375
  let i = super.on(t, e);
78376
- if (t === "data") this[C] = false, this[yt]++, !this[D].length && !this[b] && this[Bt]();
78377
- else if (t === "readable" && this[_] !== 0) super.emit("readable");
78378
- else if (Mr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
78376
+ if (t === "data") this[C] = false, this[yt]++, !this[A].length && !this[b] && this[Bt]();
78377
+ else if (t === "readable" && this[g] !== 0) super.emit("readable");
78378
+ else if (Hr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
78379
78379
  else if (t === "error" && this[jt]) {
78380
78380
  let r = e;
78381
78381
  this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
@@ -78387,29 +78387,29 @@ var A = class extends Oi {
78387
78387
  }
78388
78388
  off(t, e) {
78389
78389
  let i = super.off(t, e);
78390
- return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[D].length && (this[b] = false)), i;
78390
+ return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[A].length && (this[b] = false)), i;
78391
78391
  }
78392
78392
  removeAllListeners(t) {
78393
78393
  let e = super.removeAllListeners(t);
78394
- return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[D].length && (this[b] = false)), e;
78394
+ return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[A].length && (this[b] = false)), e;
78395
78395
  }
78396
78396
  get emittedEnd() {
78397
78397
  return this[rt];
78398
78398
  }
78399
78399
  [j]() {
78400
- !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);
78400
+ !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);
78401
78401
  }
78402
78402
  emit(t, ...e) {
78403
78403
  let i = e[0];
78404
78404
  if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
78405
- if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[Ri](i)), true) : this[Ri](i);
78406
- if (t === "end") return this[Ns]();
78405
+ if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[bi](i)), true) : this[bi](i);
78406
+ if (t === "end") return this[Ls]();
78407
78407
  if (t === "close") {
78408
- if (this[Le] = true, !this[rt] && !this[w]) return false;
78408
+ if (this[Ne] = true, !this[rt] && !this[w]) return false;
78409
78409
  let n = super.emit("close");
78410
78410
  return this.removeAllListeners("close"), n;
78411
78411
  } else if (t === "error") {
78412
- this[jt] = i, super.emit(yi, i);
78412
+ this[jt] = i, super.emit(Ri, i);
78413
78413
  let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
78414
78414
  return this[j](), n;
78415
78415
  } else if (t === "resume") {
@@ -78422,23 +78422,23 @@ var A = class extends Oi {
78422
78422
  let r = super.emit(t, ...e);
78423
78423
  return this[j](), r;
78424
78424
  }
78425
- [Ri](t) {
78426
- for (let i of this[D]) i.dest.write(t) === false && this.pause();
78425
+ [bi](t) {
78426
+ for (let i of this[A]) i.dest.write(t) === false && this.pause();
78427
78427
  let e = this[C] ? false : super.emit("data", t);
78428
78428
  return this[j](), e;
78429
78429
  }
78430
- [Ns]() {
78431
- return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[bi]()), true) : this[bi]());
78430
+ [Ls]() {
78431
+ return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[_i]()), true) : this[_i]());
78432
78432
  }
78433
- [bi]() {
78433
+ [_i]() {
78434
78434
  if (this[Mt]) {
78435
78435
  let e = this[Mt].end();
78436
78436
  if (e) {
78437
- for (let i of this[D]) i.dest.write(e);
78437
+ for (let i of this[A]) i.dest.write(e);
78438
78438
  this[C] || super.emit("data", e);
78439
78439
  }
78440
78440
  }
78441
- for (let e of this[D]) e.end();
78441
+ for (let e of this[A]) e.end();
78442
78442
  let t = super.emit("end");
78443
78443
  return this.removeAllListeners("end"), t;
78444
78444
  }
@@ -78485,67 +78485,67 @@ var A = class extends Oi {
78485
78485
  }
78486
78486
  [Symbol.iterator]() {
78487
78487
  this[C] = false;
78488
- 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 = () => {
78488
+ 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 = () => {
78489
78489
  if (t) return e();
78490
78490
  let r = this.read();
78491
78491
  return r === null ? e() : { done: false, value: r };
78492
78492
  };
78493
- return this.once("end", e), this.once(yi, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
78493
+ return this.once("end", e), this.once(Ri, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
78494
78494
  return this;
78495
78495
  }, [Symbol.dispose]: () => {
78496
78496
  } };
78497
78497
  }
78498
78498
  destroy(t) {
78499
78499
  if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
78500
- this[w] = true, this[C] = true, this[g].length = 0, this[_] = 0;
78500
+ this[w] = true, this[C] = true, this[_].length = 0, this[g] = 0;
78501
78501
  let e = this;
78502
- return typeof e.close == "function" && !this[Le] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
78502
+ return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
78503
78503
  }
78504
78504
  static get isStream() {
78505
- return Cr;
78505
+ return Br;
78506
78506
  }
78507
78507
  };
78508
- var Wr = I.writev;
78508
+ var Vr = I.writev;
78509
78509
  var ot = /* @__PURE__ */ Symbol("_autoClose");
78510
78510
  var H = /* @__PURE__ */ Symbol("_close");
78511
78511
  var ee = /* @__PURE__ */ Symbol("_ended");
78512
78512
  var m = /* @__PURE__ */ Symbol("_fd");
78513
- var Ti = /* @__PURE__ */ Symbol("_finished");
78513
+ var xi = /* @__PURE__ */ Symbol("_finished");
78514
78514
  var J = /* @__PURE__ */ Symbol("_flags");
78515
- var xi = /* @__PURE__ */ Symbol("_flush");
78516
- var Ai = /* @__PURE__ */ Symbol("_handleChunk");
78517
- var Ii = /* @__PURE__ */ Symbol("_makeBuf");
78515
+ var Li = /* @__PURE__ */ Symbol("_flush");
78516
+ var Ii = /* @__PURE__ */ Symbol("_handleChunk");
78517
+ var Ci = /* @__PURE__ */ Symbol("_makeBuf");
78518
78518
  var se = /* @__PURE__ */ Symbol("_mode");
78519
- var Ce = /* @__PURE__ */ Symbol("_needDrain");
78519
+ var Fe = /* @__PURE__ */ Symbol("_needDrain");
78520
78520
  var Ut = /* @__PURE__ */ Symbol("_onerror");
78521
78521
  var Ht = /* @__PURE__ */ Symbol("_onopen");
78522
- var Li = /* @__PURE__ */ Symbol("_onread");
78522
+ var Ni = /* @__PURE__ */ Symbol("_onread");
78523
78523
  var Pt = /* @__PURE__ */ Symbol("_onwrite");
78524
78524
  var ht = /* @__PURE__ */ Symbol("_open");
78525
78525
  var U = /* @__PURE__ */ Symbol("_path");
78526
78526
  var nt = /* @__PURE__ */ Symbol("_pos");
78527
78527
  var Y = /* @__PURE__ */ Symbol("_queue");
78528
78528
  var zt = /* @__PURE__ */ Symbol("_read");
78529
- var Ni = /* @__PURE__ */ Symbol("_readSize");
78529
+ var Ai = /* @__PURE__ */ Symbol("_readSize");
78530
78530
  var Q = /* @__PURE__ */ Symbol("_reading");
78531
78531
  var ie = /* @__PURE__ */ Symbol("_remain");
78532
78532
  var Di = /* @__PURE__ */ Symbol("_size");
78533
- var Fe = /* @__PURE__ */ Symbol("_write");
78533
+ var ke = /* @__PURE__ */ Symbol("_write");
78534
78534
  var Rt = /* @__PURE__ */ Symbol("_writing");
78535
- var ke = /* @__PURE__ */ Symbol("_defaultFlag");
78535
+ var ve = /* @__PURE__ */ Symbol("_defaultFlag");
78536
78536
  var bt = /* @__PURE__ */ Symbol("_errored");
78537
- var gt = class extends A {
78537
+ var _t = class extends D {
78538
78538
  [bt] = false;
78539
78539
  [m];
78540
78540
  [U];
78541
- [Ni];
78541
+ [Ai];
78542
78542
  [Q] = false;
78543
78543
  [Di];
78544
78544
  [ie];
78545
78545
  [ot];
78546
78546
  constructor(t, e) {
78547
78547
  if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
78548
- 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]();
78548
+ 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]();
78549
78549
  }
78550
78550
  get fd() {
78551
78551
  return this[m];
@@ -78565,19 +78565,19 @@ var gt = class extends A {
78565
78565
  [Ht](t, e) {
78566
78566
  t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
78567
78567
  }
78568
- [Ii]() {
78569
- return Buffer.allocUnsafe(Math.min(this[Ni], this[ie]));
78568
+ [Ci]() {
78569
+ return Buffer.allocUnsafe(Math.min(this[Ai], this[ie]));
78570
78570
  }
78571
78571
  [zt]() {
78572
78572
  if (!this[Q]) {
78573
78573
  this[Q] = true;
78574
- let t = this[Ii]();
78575
- if (t.length === 0) return process.nextTick(() => this[Li](null, 0, t));
78576
- I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Li](e, i, r));
78574
+ let t = this[Ci]();
78575
+ if (t.length === 0) return process.nextTick(() => this[Ni](null, 0, t));
78576
+ I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ni](e, i, r));
78577
78577
  }
78578
78578
  }
78579
- [Li](t, e, i) {
78580
- this[Q] = false, t ? this[Ut](t) : this[Ai](e, i) && this[zt]();
78579
+ [Ni](t, e, i) {
78580
+ this[Q] = false, t ? this[Ut](t) : this[Ii](e, i) && this[zt]();
78581
78581
  }
78582
78582
  [H]() {
78583
78583
  if (this[ot] && typeof this[m] == "number") {
@@ -78588,7 +78588,7 @@ var gt = class extends A {
78588
78588
  [Ut](t) {
78589
78589
  this[Q] = true, this[H](), this.emit("error", t);
78590
78590
  }
78591
- [Ai](t, e) {
78591
+ [Ii](t, e) {
78592
78592
  let i = false;
78593
78593
  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;
78594
78594
  }
@@ -78606,7 +78606,7 @@ var gt = class extends A {
78606
78606
  }
78607
78607
  }
78608
78608
  };
78609
- var ve = class extends gt {
78609
+ var Me = class extends _t {
78610
78610
  [ht]() {
78611
78611
  let t = true;
78612
78612
  try {
@@ -78621,8 +78621,8 @@ var ve = class extends gt {
78621
78621
  if (!this[Q]) {
78622
78622
  this[Q] = true;
78623
78623
  do {
78624
- let e = this[Ii](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
78625
- if (!this[Ai](i, e)) break;
78624
+ let e = this[Ci](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
78625
+ if (!this[Ii](i, e)) break;
78626
78626
  } while (true);
78627
78627
  this[Q] = false;
78628
78628
  }
@@ -78638,26 +78638,26 @@ var ve = class extends gt {
78638
78638
  }
78639
78639
  }
78640
78640
  };
78641
- var tt = class extends Hr {
78641
+ var tt = class extends Kr {
78642
78642
  readable = false;
78643
78643
  writable = true;
78644
78644
  [bt] = false;
78645
78645
  [Rt] = false;
78646
78646
  [ee] = false;
78647
78647
  [Y] = [];
78648
- [Ce] = false;
78648
+ [Fe] = false;
78649
78649
  [U];
78650
78650
  [se];
78651
78651
  [ot];
78652
78652
  [m];
78653
- [ke];
78653
+ [ve];
78654
78654
  [J];
78655
- [Ti] = false;
78655
+ [xi] = false;
78656
78656
  [nt];
78657
78657
  constructor(t, e) {
78658
78658
  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;
78659
78659
  let i = this[nt] !== void 0 ? "r+" : "w";
78660
- this[ke] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
78660
+ this[ve] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
78661
78661
  }
78662
78662
  emit(t, ...e) {
78663
78663
  if (t === "error") {
@@ -78679,26 +78679,26 @@ var tt = class extends Hr {
78679
78679
  I.open(this[U], this[J], this[se], (t, e) => this[Ht](t, e));
78680
78680
  }
78681
78681
  [Ht](t, e) {
78682
- 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]());
78682
+ 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]());
78683
78683
  }
78684
78684
  end(t, e) {
78685
78685
  return t && this.write(t, e), this[ee] = true, !this[Rt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
78686
78686
  }
78687
78687
  write(t, e) {
78688
- 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);
78688
+ 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);
78689
78689
  }
78690
- [Fe](t) {
78690
+ [ke](t) {
78691
78691
  I.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
78692
78692
  }
78693
78693
  [Pt](t, e) {
78694
- 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"))));
78694
+ 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"))));
78695
78695
  }
78696
- [xi]() {
78696
+ [Li]() {
78697
78697
  if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
78698
- else if (this[Y].length === 1) this[Fe](this[Y].pop());
78698
+ else if (this[Y].length === 1) this[ke](this[Y].pop());
78699
78699
  else {
78700
78700
  let t = this[Y];
78701
- this[Y] = [], Wr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
78701
+ this[Y] = [], Vr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
78702
78702
  }
78703
78703
  }
78704
78704
  [H]() {
@@ -78711,7 +78711,7 @@ var tt = class extends Hr {
78711
78711
  var Wt = class extends tt {
78712
78712
  [ht]() {
78713
78713
  let t;
78714
- if (this[ke] && this[J] === "r+") try {
78714
+ if (this[ve] && this[J] === "r+") try {
78715
78715
  t = I.openSync(this[U], this[J], this[se]);
78716
78716
  } catch (e) {
78717
78717
  if (e?.code === "ENOENT") return this[J] = "w", this[ht]();
@@ -78726,7 +78726,7 @@ var Wt = class extends tt {
78726
78726
  this[m] = void 0, I.closeSync(t), this.emit("close");
78727
78727
  }
78728
78728
  }
78729
- [Fe](t) {
78729
+ [ke](t) {
78730
78730
  let e = true;
78731
78731
  try {
78732
78732
  this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
@@ -78738,49 +78738,50 @@ var Wt = class extends tt {
78738
78738
  }
78739
78739
  }
78740
78740
  };
78741
- 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"]]);
78741
+ var $r = /* @__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"]]);
78742
78742
  var As = (s3) => !!s3.sync && !!s3.file;
78743
- var Is = (s3) => !s3.sync && !!s3.file;
78744
- var Cs = (s3) => !!s3.sync && !s3.file;
78745
- var Fs = (s3) => !s3.sync && !s3.file;
78746
- var ks = (s3) => !!s3.file;
78747
- var Zr = (s3) => {
78748
- let t = Gr.get(s3);
78743
+ var Ds = (s3) => !s3.sync && !!s3.file;
78744
+ var Is = (s3) => !!s3.sync && !s3.file;
78745
+ var Cs = (s3) => !s3.sync && !s3.file;
78746
+ var Fs = (s3) => !!s3.file;
78747
+ var Xr = (s3) => {
78748
+ let t = $r.get(s3);
78749
78749
  return t || s3;
78750
78750
  };
78751
78751
  var re = (s3 = {}) => {
78752
78752
  if (!s3) return {};
78753
78753
  let t = {};
78754
78754
  for (let [e, i] of Object.entries(s3)) {
78755
- let r = Zr(e);
78755
+ let r = Xr(e);
78756
78756
  t[r] = i;
78757
78757
  }
78758
78758
  return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
78759
78759
  };
78760
78760
  var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
78761
- Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o ? o = Array.from(o) : o = [];
78761
+ Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o = o ? Array.from(o) : [];
78762
78762
  let a = re(n);
78763
78763
  if (r?.(a, o), As(a)) {
78764
78764
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
78765
78765
  return s3(a, o);
78766
+ } else if (Ds(a)) {
78767
+ let l = t(a, o);
78768
+ return h ? l.then(() => h(), h) : l;
78766
78769
  } else if (Is(a)) {
78767
- let l = t(a, o), c = h || void 0;
78768
- return c ? l.then(() => c(), c) : l;
78769
- } else if (Cs(a)) {
78770
78770
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
78771
78771
  return e(a, o);
78772
- } else if (Fs(a)) {
78772
+ } else if (Cs(a)) {
78773
78773
  if (typeof h == "function") throw new TypeError("callback only supported with file option");
78774
78774
  return i(a, o);
78775
- } else throw new Error("impossible options??");
78775
+ }
78776
+ throw new Error("impossible options??");
78776
78777
  }, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
78777
- var Kr = Yr.constants || { ZLIB_VERNUM: 4736 };
78778
- 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));
78779
- var Vr = _t.concat;
78780
- var Ms = Object.getOwnPropertyDescriptor(_t, "concat");
78781
- var $r = (s3) => s3;
78782
- var Fi = Ms?.writable === true || Ms?.set !== void 0 ? (s3) => {
78783
- _t.concat = s3 ? $r : Vr;
78778
+ var jr = qr.constants || { ZLIB_VERNUM: 4736 };
78779
+ var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, jr));
78780
+ var Qr = gt.concat;
78781
+ var vs = Object.getOwnPropertyDescriptor(gt, "concat");
78782
+ var Jr = (s3) => s3;
78783
+ var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
78784
+ gt.concat = s3 ? Jr : Qr;
78784
78785
  } : (s3) => {
78785
78786
  };
78786
78787
  var Ot = /* @__PURE__ */ Symbol("_superWrite");
@@ -78794,8 +78795,8 @@ var Gt = class extends Error {
78794
78795
  return "ZlibError";
78795
78796
  }
78796
78797
  };
78797
- var ki = /* @__PURE__ */ Symbol("flushFlag");
78798
- var ne = class extends A {
78798
+ var vi = /* @__PURE__ */ Symbol("flushFlag");
78799
+ var ne = class extends D {
78799
78800
  #t = false;
78800
78801
  #i = false;
78801
78802
  #s;
@@ -78814,9 +78815,9 @@ var ne = class extends A {
78814
78815
  }
78815
78816
  constructor(t, e) {
78816
78817
  if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
78817
- 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);
78818
+ 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);
78818
78819
  try {
78819
- this.#e = new vs[e](t);
78820
+ this.#e = new ks[e](t);
78820
78821
  } catch (i) {
78821
78822
  throw new Gt(i, this.constructor);
78822
78823
  }
@@ -78828,10 +78829,10 @@ var ne = class extends A {
78828
78829
  this.#e && (this.#e.close(), this.#e = void 0, this.emit("close"));
78829
78830
  }
78830
78831
  reset() {
78831
- if (!this.#t) return vi(this.#e, "zlib binding closed"), this.#e.reset?.();
78832
+ if (!this.#t) return Mi(this.#e, "zlib binding closed"), this.#e.reset?.();
78832
78833
  }
78833
78834
  flush(t) {
78834
- this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(_t.alloc(0), { [ki]: t })));
78835
+ this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(gt.alloc(0), { [vi]: t })));
78835
78836
  }
78836
78837
  end(t, e, i) {
78837
78838
  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);
@@ -78843,20 +78844,20 @@ var ne = class extends A {
78843
78844
  return super.write(t);
78844
78845
  }
78845
78846
  write(t, e, i) {
78846
- if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = _t.from(t, e)), this.#t) return;
78847
- vi(this.#e, "zlib binding closed");
78847
+ if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = gt.from(t, e)), this.#t) return;
78848
+ Mi(this.#e, "zlib binding closed");
78848
78849
  let r = this.#e._handle, n = r.close;
78849
78850
  r.close = () => {
78850
78851
  };
78851
78852
  let o = this.#e.close;
78852
78853
  this.#e.close = () => {
78853
- }, Fi(true);
78854
+ }, ki(true);
78854
78855
  let h;
78855
78856
  try {
78856
- let l = typeof t[ki] == "number" ? t[ki] : this.#s;
78857
- h = this.#e._processChunk(t, l), Fi(false);
78857
+ let l = typeof t[vi] == "number" ? t[vi] : this.#s;
78858
+ h = this.#e._processChunk(t, l), ki(false);
78858
78859
  } catch (l) {
78859
- Fi(false), this.#o(new Gt(l, this.write));
78860
+ ki(false), this.#o(new Gt(l, this.write));
78860
78861
  } finally {
78861
78862
  this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
78862
78863
  }
@@ -78864,13 +78865,13 @@ var ne = class extends A {
78864
78865
  let a;
78865
78866
  if (h) if (Array.isArray(h) && h.length > 0) {
78866
78867
  let l = h[0];
78867
- a = this[Ot](_t.from(l));
78868
+ a = this[Ot](gt.from(l));
78868
78869
  for (let c = 1; c < h.length; c++) a = this[Ot](h[c]);
78869
- } else a = this[Ot](_t.from(h));
78870
+ } else a = this[Ot](gt.from(h));
78870
78871
  return i && i(), a;
78871
78872
  }
78872
78873
  };
78873
- var Me = class extends ne {
78874
+ var Be = class extends ne {
78874
78875
  #t;
78875
78876
  #i;
78876
78877
  constructor(t, e) {
@@ -78881,7 +78882,7 @@ var Me = class extends ne {
78881
78882
  if (!this.handle) throw new Error("cannot switch params when binding is closed");
78882
78883
  if (!this.handle.params) throw new Error("not supported in this implementation");
78883
78884
  if (this.#t !== t || this.#i !== e) {
78884
- this.flush(M.Z_SYNC_FLUSH), vi(this.handle, "zlib binding closed");
78885
+ this.flush(M.Z_SYNC_FLUSH), Mi(this.handle, "zlib binding closed");
78885
78886
  let i = this.handle.flush;
78886
78887
  this.handle.flush = (r, n) => {
78887
78888
  typeof r == "function" && (n = r, r = this.flushFlag), this.flush(r), n?.();
@@ -78896,7 +78897,7 @@ var Me = class extends ne {
78896
78897
  }
78897
78898
  }
78898
78899
  };
78899
- var Be = class extends Me {
78900
+ var Pe = class extends Be {
78900
78901
  #t;
78901
78902
  constructor(t) {
78902
78903
  super(t, "Gzip"), this.#t = t && !!t.portable;
@@ -78905,87 +78906,87 @@ var Be = class extends Me {
78905
78906
  return this.#t ? (this.#t = false, t[9] = 255, super[Ot](t)) : super[Ot](t);
78906
78907
  }
78907
78908
  };
78908
- var Pe = class extends Me {
78909
+ var ze = class extends Be {
78909
78910
  constructor(t) {
78910
78911
  super(t, "Unzip");
78911
78912
  }
78912
78913
  };
78913
- var ze = class extends ne {
78914
+ var Ue = class extends ne {
78914
78915
  constructor(t, e) {
78915
78916
  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);
78916
78917
  }
78917
78918
  };
78918
- var Ue = class extends ze {
78919
+ var He = class extends Ue {
78919
78920
  constructor(t) {
78920
78921
  super(t, "BrotliCompress");
78921
78922
  }
78922
78923
  };
78923
- var He = class extends ze {
78924
+ var We = class extends Ue {
78924
78925
  constructor(t) {
78925
78926
  super(t, "BrotliDecompress");
78926
78927
  }
78927
78928
  };
78928
- var We = class extends ne {
78929
+ var Ge = class extends ne {
78929
78930
  constructor(t, e) {
78930
78931
  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);
78931
78932
  }
78932
78933
  };
78933
- var Ge = class extends We {
78934
+ var Ze = class extends Ge {
78934
78935
  constructor(t) {
78935
78936
  super(t, "ZstdCompress");
78936
78937
  }
78937
78938
  };
78938
- var Ze = class extends We {
78939
+ var Ye = class extends Ge {
78939
78940
  constructor(t) {
78940
78941
  super(t, "ZstdDecompress");
78941
78942
  }
78942
78943
  };
78943
- var Bs = (s3, t) => {
78944
- if (Number.isSafeInteger(s3)) s3 < 0 ? jr(s3, t) : qr(s3, t);
78944
+ var Ms = (s3, t) => {
78945
+ if (Number.isSafeInteger(s3)) s3 < 0 ? sn(s3, t) : en(s3, t);
78945
78946
  else throw Error("cannot encode number outside of javascript safe integer range");
78946
78947
  return t;
78947
78948
  };
78948
- var qr = (s3, t) => {
78949
+ var en = (s3, t) => {
78949
78950
  t[0] = 128;
78950
78951
  for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
78951
78952
  };
78952
- var jr = (s3, t) => {
78953
+ var sn = (s3, t) => {
78953
78954
  t[0] = 255;
78954
78955
  var e = false;
78955
78956
  s3 = s3 * -1;
78956
78957
  for (var i = t.length; i > 1; i--) {
78957
78958
  var r = s3 & 255;
78958
- s3 = Math.floor(s3 / 256), e ? t[i - 1] = zs(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = Us(r));
78959
+ s3 = Math.floor(s3 / 256), e ? t[i - 1] = Ps(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = zs(r));
78959
78960
  }
78960
78961
  };
78961
- var Ps = (s3) => {
78962
- let t = s3[0], e = t === 128 ? Jr(s3.subarray(1, s3.length)) : t === 255 ? Qr(s3) : null;
78962
+ var Bs = (s3) => {
78963
+ let t = s3[0], e = t === 128 ? nn(s3.subarray(1, s3.length)) : t === 255 ? rn(s3) : null;
78963
78964
  if (e === null) throw Error("invalid base256 encoding");
78964
78965
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
78965
78966
  return e;
78966
78967
  };
78967
- var Qr = (s3) => {
78968
+ var rn = (s3) => {
78968
78969
  for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
78969
78970
  var n = Number(s3[r]), o;
78970
- i ? o = zs(n) : n === 0 ? o = n : (i = true, o = Us(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
78971
+ i ? o = Ps(n) : n === 0 ? o = n : (i = true, o = zs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
78971
78972
  }
78972
78973
  return e;
78973
78974
  };
78974
- var Jr = (s3) => {
78975
+ var nn = (s3) => {
78975
78976
  for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
78976
78977
  var r = Number(s3[i]);
78977
78978
  r !== 0 && (e += r * Math.pow(256, t - i - 1));
78978
78979
  }
78979
78980
  return e;
78980
78981
  };
78981
- var zs = (s3) => (255 ^ s3) & 255;
78982
- var Us = (s3) => (255 ^ s3) + 1 & 255;
78983
- var Mi = {};
78984
- Ar(Mi, { code: () => Ye, isCode: () => oe, isName: () => en, name: () => he });
78982
+ var Ps = (s3) => (255 ^ s3) & 255;
78983
+ var zs = (s3) => (255 ^ s3) + 1 & 255;
78984
+ var Bi = {};
78985
+ vr(Bi, { code: () => Ke, isCode: () => oe, isName: () => hn, name: () => he });
78985
78986
  var oe = (s3) => he.has(s3);
78986
- var en = (s3) => Ye.has(s3);
78987
+ var hn = (s3) => Ke.has(s3);
78987
78988
  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"]]);
78988
- var Ye = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
78989
+ var Ke = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
78989
78990
  var F = class {
78990
78991
  cksumValid = false;
78991
78992
  needPax = false;
@@ -79013,14 +79014,14 @@ var F = class {
79013
79014
  }
79014
79015
  decode(t, e, i, r) {
79015
79016
  if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
79016
- 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);
79017
+ 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);
79017
79018
  let n = Tt(t, e + 156, 1);
79018
79019
  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) {
79019
79020
  let h = Tt(t, e + 345, 155);
79020
79021
  this.path = h + "/" + this.path;
79021
79022
  } else {
79022
79023
  let h = Tt(t, e + 345, 130);
79023
- 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);
79024
+ 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);
79024
79025
  }
79025
79026
  let o = 256;
79026
79027
  for (let h = e; h < e + 148; h++) o += t[h];
@@ -79032,8 +79033,8 @@ var F = class {
79032
79033
  }
79033
79034
  encode(t, e = 0) {
79034
79035
  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");
79035
- let i = this.ctime || this.atime ? 130 : 155, r = sn(this.path || "", i), n = r[0], o = r[1];
79036
- 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);
79036
+ let i = this.ctime || this.atime ? 130 : 155, r = an(this.path || "", i), n = r[0], o = r[1];
79037
+ 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);
79037
79038
  let h = 256;
79038
79039
  for (let a = e; a < e + 148; a++) h += t[a];
79039
79040
  for (let a = e + 156; a < e + 512; a++) h += t[a];
@@ -79046,13 +79047,13 @@ var F = class {
79046
79047
  return this.#t;
79047
79048
  }
79048
79049
  set type(t) {
79049
- let e = String(Ye.get(t));
79050
+ let e = String(Ke.get(t));
79050
79051
  if (oe(e) || e === "Unsupported") this.#t = e;
79051
79052
  else if (oe(t)) this.#t = t;
79052
79053
  else throw new TypeError("invalid entry type: " + t);
79053
79054
  }
79054
79055
  };
79055
- var sn = (s3, t) => {
79056
+ var an = (s3, t) => {
79056
79057
  let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
79057
79058
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
79058
79059
  else {
@@ -79065,19 +79066,19 @@ var sn = (s3, t) => {
79065
79066
  return n;
79066
79067
  };
79067
79068
  var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
79068
- var Bi = (s3, t, e) => rn(at(s3, t, e));
79069
- var rn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
79070
- var at = (s3, t, e) => Number(s3[t]) & 128 ? Ps(s3.subarray(t, t + e)) : on(s3, t, e);
79071
- var nn = (s3) => isNaN(s3) ? void 0 : s3;
79072
- var on = (s3, t, e) => nn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
79073
- var hn = { 12: 8589934591, 8: 2097151 };
79074
- 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);
79075
- var an = (s3, t, e, i) => s3.write(ln(i, e), t, e, "ascii");
79076
- var ln = (s3, t) => cn(Math.floor(s3).toString(8), t);
79077
- var cn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
79078
- var Pi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
79079
- var fn = new Array(156).join("\0");
79080
- 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);
79069
+ var Pi = (s3, t, e) => ln(at(s3, t, e));
79070
+ var ln = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
79071
+ var at = (s3, t, e) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e)) : fn(s3, t, e);
79072
+ var cn = (s3) => isNaN(s3) ? void 0 : s3;
79073
+ var fn = (s3, t, e) => cn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
79074
+ var dn = { 12: 8589934591, 8: 2097151 };
79075
+ var lt = (s3, t, e, i) => i === void 0 ? false : i > dn[e] || i < 0 ? (Ms(i, s3.subarray(t, t + e)), true) : (un(s3, t, e, i), false);
79076
+ var un = (s3, t, e, i) => s3.write(mn(i, e), t, e, "ascii");
79077
+ var mn = (s3, t) => pn(Math.floor(s3).toString(8), t);
79078
+ var pn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
79079
+ var zi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
79080
+ var En = new Array(156).join("\0");
79081
+ var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + En, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
79081
79082
  var ct = class s {
79082
79083
  atime;
79083
79084
  mtime;
@@ -79104,7 +79105,7 @@ var ct = class s {
79104
79105
  if (t === "") return Buffer.allocUnsafe(0);
79105
79106
  let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
79106
79107
  for (let n = 0; n < 512; n++) r[n] = 0;
79107
- new F({ path: ("PaxHeader/" + dn(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
79108
+ new F({ path: ("PaxHeader/" + wn(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
79108
79109
  for (let n = e + 512; n < r.length; n++) r[n] = 0;
79109
79110
  return r;
79110
79111
  }
@@ -79118,13 +79119,13 @@ var ct = class s {
79118
79119
  return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
79119
79120
  }
79120
79121
  static parse(t, e, i = false) {
79121
- return new s(un(mn(t), e), i);
79122
+ return new s(Sn(yn(t), e), i);
79122
79123
  }
79123
79124
  };
79124
- var un = (s3, t) => t ? Object.assign({}, t, s3) : s3;
79125
- var mn = (s3) => s3.replace(/\n$/, "").split(`
79126
- `).reduce(pn, /* @__PURE__ */ Object.create(null));
79127
- var pn = (s3, t) => {
79125
+ var Sn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
79126
+ var yn = (s3) => s3.replace(/\n$/, "").split(`
79127
+ `).reduce(Rn, /* @__PURE__ */ Object.create(null));
79128
+ var Rn = (s3, t) => {
79128
79129
  let e = parseInt(t, 10);
79129
79130
  if (e !== Buffer.byteLength(t) + 1) return s3;
79130
79131
  t = t.slice((e + " ").length);
@@ -79133,9 +79134,9 @@ var pn = (s3, t) => {
79133
79134
  let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
79134
79135
  return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
79135
79136
  };
79136
- var En = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
79137
- var f = En !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replace(/\\/g, "/");
79138
- var Yt = class extends A {
79137
+ var bn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
79138
+ var f = bn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
79139
+ var Yt = class extends D {
79139
79140
  extended;
79140
79141
  globalExtended;
79141
79142
  header;
@@ -79202,42 +79203,42 @@ var Yt = class extends A {
79202
79203
  var Lt = (s3, t, e, i = {}) => {
79203
79204
  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));
79204
79205
  };
79205
- var Sn = 1024 * 1024;
79206
- var Gi = Buffer.from([31, 139]);
79207
- var Zi = Buffer.from([40, 181, 47, 253]);
79208
- var yn = Math.max(Gi.length, Zi.length);
79206
+ var gn = 1024 * 1024;
79207
+ var Zi = Buffer.from([31, 139]);
79208
+ var Yi = Buffer.from([40, 181, 47, 253]);
79209
+ var On = Math.max(Zi.length, Yi.length);
79209
79210
  var B = /* @__PURE__ */ Symbol("state");
79210
79211
  var Nt = /* @__PURE__ */ Symbol("writeEntry");
79211
79212
  var et = /* @__PURE__ */ Symbol("readEntry");
79212
- var zi = /* @__PURE__ */ Symbol("nextEntry");
79213
- var Hs = /* @__PURE__ */ Symbol("processEntry");
79213
+ var Ui = /* @__PURE__ */ Symbol("nextEntry");
79214
+ var Us = /* @__PURE__ */ Symbol("processEntry");
79214
79215
  var V = /* @__PURE__ */ Symbol("extendedHeader");
79215
79216
  var ae = /* @__PURE__ */ Symbol("globalExtendedHeader");
79216
79217
  var ft = /* @__PURE__ */ Symbol("meta");
79217
- var Ws = /* @__PURE__ */ Symbol("emitMeta");
79218
+ var Hs = /* @__PURE__ */ Symbol("emitMeta");
79218
79219
  var p = /* @__PURE__ */ Symbol("buffer");
79219
79220
  var it = /* @__PURE__ */ Symbol("queue");
79220
79221
  var dt = /* @__PURE__ */ Symbol("ended");
79221
- var Ui = /* @__PURE__ */ Symbol("emittedEnd");
79222
- var Dt = /* @__PURE__ */ Symbol("emit");
79222
+ var Hi = /* @__PURE__ */ Symbol("emittedEnd");
79223
+ var At = /* @__PURE__ */ Symbol("emit");
79223
79224
  var y = /* @__PURE__ */ Symbol("unzip");
79224
- var Ke = /* @__PURE__ */ Symbol("consumeChunk");
79225
- var Ve = /* @__PURE__ */ Symbol("consumeChunkSub");
79226
- var Hi = /* @__PURE__ */ Symbol("consumeBody");
79227
- var Gs = /* @__PURE__ */ Symbol("consumeMeta");
79228
- var Zs = /* @__PURE__ */ Symbol("consumeHeader");
79225
+ var Ve = /* @__PURE__ */ Symbol("consumeChunk");
79226
+ var $e = /* @__PURE__ */ Symbol("consumeChunkSub");
79227
+ var Wi = /* @__PURE__ */ Symbol("consumeBody");
79228
+ var Ws = /* @__PURE__ */ Symbol("consumeMeta");
79229
+ var Gs = /* @__PURE__ */ Symbol("consumeHeader");
79229
79230
  var le = /* @__PURE__ */ Symbol("consuming");
79230
- var Wi = /* @__PURE__ */ Symbol("bufferConcat");
79231
- var $e = /* @__PURE__ */ Symbol("maybeEnd");
79231
+ var Gi = /* @__PURE__ */ Symbol("bufferConcat");
79232
+ var Xe = /* @__PURE__ */ Symbol("maybeEnd");
79232
79233
  var Kt = /* @__PURE__ */ Symbol("writing");
79233
79234
  var ut = /* @__PURE__ */ Symbol("aborted");
79234
- var Xe = /* @__PURE__ */ Symbol("onDone");
79235
- var At = /* @__PURE__ */ Symbol("sawValidEntry");
79236
- var qe = /* @__PURE__ */ Symbol("sawNullBlock");
79237
- var je = /* @__PURE__ */ Symbol("sawEOF");
79238
- var Ys = /* @__PURE__ */ Symbol("closeStream");
79239
- var Rn = () => true;
79240
- var st = class extends wn {
79235
+ var qe = /* @__PURE__ */ Symbol("onDone");
79236
+ var Dt = /* @__PURE__ */ Symbol("sawValidEntry");
79237
+ var je = /* @__PURE__ */ Symbol("sawNullBlock");
79238
+ var Qe = /* @__PURE__ */ Symbol("sawEOF");
79239
+ var Zs = /* @__PURE__ */ Symbol("closeStream");
79240
+ var Tn = () => true;
79241
+ var st = class extends _n {
79241
79242
  file;
79242
79243
  strict;
79243
79244
  maxMetaEntrySize;
@@ -79257,36 +79258,36 @@ var st = class extends wn {
79257
79258
  [dt] = false;
79258
79259
  [y];
79259
79260
  [ut] = false;
79260
- [At];
79261
- [qe] = false;
79261
+ [Dt];
79262
79262
  [je] = false;
79263
+ [Qe] = false;
79263
79264
  [Kt] = false;
79264
79265
  [le] = false;
79265
- [Ui] = false;
79266
+ [Hi] = false;
79266
79267
  constructor(t = {}) {
79267
- super(), this.file = t.file || "", this.on(Xe, () => {
79268
- (this[B] === "begin" || this[At] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
79269
- }), t.ondone ? this.on(Xe, t.ondone) : this.on(Xe, () => {
79268
+ super(), this.file = t.file || "", this.on(qe, () => {
79269
+ (this[B] === "begin" || this[Dt] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
79270
+ }), t.ondone ? this.on(qe, t.ondone) : this.on(qe, () => {
79270
79271
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
79271
- }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || Sn, this.filter = typeof t.filter == "function" ? t.filter : Rn;
79272
+ }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || gn, this.filter = typeof t.filter == "function" ? t.filter : Tn;
79272
79273
  let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
79273
79274
  this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
79274
79275
  let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
79275
- 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);
79276
+ 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);
79276
79277
  }
79277
79278
  warn(t, e, i = {}) {
79278
79279
  Lt(this, t, e, i);
79279
79280
  }
79280
- [Zs](t, e) {
79281
- this[At] === void 0 && (this[At] = false);
79281
+ [Gs](t, e) {
79282
+ this[Dt] === void 0 && (this[Dt] = false);
79282
79283
  let i;
79283
79284
  try {
79284
79285
  i = new F(t, e, this[V], this[ae]);
79285
79286
  } catch (r) {
79286
79287
  return this.warn("TAR_ENTRY_INVALID", r);
79287
79288
  }
79288
- if (i.nullBlock) this[qe] ? (this[je] = true, this[B] === "begin" && (this[B] = "header"), this[Dt]("eof")) : (this[qe] = true, this[Dt]("nullBlock"));
79289
- else if (this[qe] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
79289
+ if (i.nullBlock) this[je] ? (this[Qe] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
79290
+ else if (this[je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
79290
79291
  else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
79291
79292
  else {
79292
79293
  let r = i.type;
@@ -79294,52 +79295,52 @@ var st = class extends wn {
79294
79295
  else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
79295
79296
  else {
79296
79297
  let n = this[Nt] = new Yt(i, this[V], this[ae]);
79297
- if (!this[At]) if (n.remain) {
79298
+ if (!this[Dt]) if (n.remain) {
79298
79299
  let o = () => {
79299
- n.invalid || (this[At] = true);
79300
+ n.invalid || (this[Dt] = true);
79300
79301
  };
79301
79302
  n.on("end", o);
79302
- } else this[At] = true;
79303
- 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]())));
79303
+ } else this[Dt] = true;
79304
+ 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]())));
79304
79305
  }
79305
79306
  }
79306
79307
  }
79307
- [Ys]() {
79308
+ [Zs]() {
79308
79309
  queueMicrotask(() => this.emit("close"));
79309
79310
  }
79310
- [Hs](t) {
79311
+ [Us](t) {
79311
79312
  let e = true;
79312
79313
  if (!t) this[et] = void 0, e = false;
79313
79314
  else if (Array.isArray(t)) {
79314
79315
  let [i, ...r] = t;
79315
79316
  this.emit(i, ...r);
79316
- } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[zi]()), e = false);
79317
+ } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Ui]()), e = false);
79317
79318
  return e;
79318
79319
  }
79319
- [zi]() {
79320
+ [Ui]() {
79320
79321
  do
79321
79322
  ;
79322
- while (this[Hs](this[it].shift()));
79323
- if (!this[it].length) {
79323
+ while (this[Us](this[it].shift()));
79324
+ if (this[it].length === 0) {
79324
79325
  let t = this[et];
79325
79326
  !t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
79326
79327
  }
79327
79328
  }
79328
- [Hi](t, e) {
79329
+ [Wi](t, e) {
79329
79330
  let i = this[Nt];
79330
79331
  if (!i) throw new Error("attempt to consume body without entry??");
79331
79332
  let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
79332
79333
  return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
79333
79334
  }
79334
- [Gs](t, e) {
79335
- let i = this[Nt], r = this[Hi](t, e);
79336
- return !this[Nt] && i && this[Ws](i), r;
79335
+ [Ws](t, e) {
79336
+ let i = this[Nt], r = this[Wi](t, e);
79337
+ return !this[Nt] && i && this[Hs](i), r;
79337
79338
  }
79338
- [Dt](t, e, i) {
79339
- !this[it].length && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
79339
+ [At](t, e, i) {
79340
+ this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
79340
79341
  }
79341
- [Ws](t) {
79342
- switch (this[Dt]("meta", this[ft]), t.type) {
79342
+ [Hs](t) {
79343
+ switch (this[At]("meta", this[ft]), t.type) {
79343
79344
  case "ExtendedHeader":
79344
79345
  case "OldExtendedHeader":
79345
79346
  this[V] = ct.parse(this[ft], this[V], false);
@@ -79368,12 +79369,12 @@ var st = class extends wn {
79368
79369
  write(t, e, i) {
79369
79370
  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;
79370
79371
  if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
79371
- if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < yn) return this[p] = t, i?.(), true;
79372
- for (let a = 0; this[y] === void 0 && a < Gi.length; a++) t[a] !== Gi[a] && (this[y] = false);
79372
+ if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < On) return this[p] = t, i?.(), true;
79373
+ for (let a = 0; this[y] === void 0 && a < Zi.length; a++) t[a] !== Zi[a] && (this[y] = false);
79373
79374
  let o = false;
79374
79375
  if (this[y] === false && this.zstd !== false) {
79375
79376
  o = true;
79376
- for (let a = 0; a < Zi.length; a++) if (t[a] !== Zi[a]) {
79377
+ for (let a = 0; a < Yi.length; a++) if (t[a] !== Yi[a]) {
79377
79378
  o = false;
79378
79379
  break;
79379
79380
  }
@@ -79388,69 +79389,69 @@ var st = class extends wn {
79388
79389
  }
79389
79390
  if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
79390
79391
  let a = this[dt];
79391
- 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", () => {
79392
- this[dt] = true, this[Ke]();
79392
+ 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", () => {
79393
+ this[dt] = true, this[Ve]();
79393
79394
  }), this[Kt] = true;
79394
79395
  let l = !!this[y][a ? "end" : "write"](t);
79395
79396
  return this[Kt] = false, i?.(), l;
79396
79397
  }
79397
79398
  }
79398
- this[Kt] = true, this[y] ? this[y].write(t) : this[Ke](t), this[Kt] = false;
79399
- let n = this[it].length ? false : this[et] ? this[et].flowing : true;
79400
- return !n && !this[it].length && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
79399
+ this[Kt] = true, this[y] ? this[y].write(t) : this[Ve](t), this[Kt] = false;
79400
+ let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
79401
+ return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
79401
79402
  }
79402
- [Wi](t) {
79403
+ [Gi](t) {
79403
79404
  t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
79404
79405
  }
79405
- [$e]() {
79406
- if (this[dt] && !this[Ui] && !this[ut] && !this[le]) {
79407
- this[Ui] = true;
79406
+ [Xe]() {
79407
+ if (this[dt] && !this[Hi] && !this[ut] && !this[le]) {
79408
+ this[Hi] = true;
79408
79409
  let t = this[Nt];
79409
79410
  if (t && t.blockRemain) {
79410
79411
  let e = this[p] ? this[p].length : 0;
79411
79412
  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();
79412
79413
  }
79413
- this[Dt](Xe);
79414
+ this[At](qe);
79414
79415
  }
79415
79416
  }
79416
- [Ke](t) {
79417
- if (this[le] && t) this[Wi](t);
79418
- else if (!t && !this[p]) this[$e]();
79417
+ [Ve](t) {
79418
+ if (this[le] && t) this[Gi](t);
79419
+ else if (!t && !this[p]) this[Xe]();
79419
79420
  else if (t) {
79420
79421
  if (this[le] = true, this[p]) {
79421
- this[Wi](t);
79422
+ this[Gi](t);
79422
79423
  let e = this[p];
79423
- this[p] = void 0, this[Ve](e);
79424
- } else this[Ve](t);
79425
- for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[je]; ) {
79424
+ this[p] = void 0, this[$e](e);
79425
+ } else this[$e](t);
79426
+ for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[Qe]; ) {
79426
79427
  let e = this[p];
79427
- this[p] = void 0, this[Ve](e);
79428
+ this[p] = void 0, this[$e](e);
79428
79429
  }
79429
79430
  this[le] = false;
79430
79431
  }
79431
- (!this[p] || this[dt]) && this[$e]();
79432
+ (!this[p] || this[dt]) && this[Xe]();
79432
79433
  }
79433
- [Ve](t) {
79434
+ [$e](t) {
79434
79435
  let e = 0, i = t.length;
79435
- for (; e + 512 <= i && !this[ut] && !this[je]; ) switch (this[B]) {
79436
+ for (; e + 512 <= i && !this[ut] && !this[Qe]; ) switch (this[B]) {
79436
79437
  case "begin":
79437
79438
  case "header":
79438
- this[Zs](t, e), e += 512;
79439
+ this[Gs](t, e), e += 512;
79439
79440
  break;
79440
79441
  case "ignore":
79441
79442
  case "body":
79442
- e += this[Hi](t, e);
79443
+ e += this[Wi](t, e);
79443
79444
  break;
79444
79445
  case "meta":
79445
- e += this[Gs](t, e);
79446
+ e += this[Ws](t, e);
79446
79447
  break;
79447
79448
  default:
79448
79449
  throw new Error("invalid state: " + this[B]);
79449
79450
  }
79450
- e < i && (this[p] ? this[p] = Buffer.concat([t.subarray(e), this[p]]) : this[p] = t.subarray(e));
79451
+ e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
79451
79452
  }
79452
79453
  end(t, e, i) {
79453
- 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;
79454
+ 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;
79454
79455
  }
79455
79456
  };
79456
79457
  var mt = (s3) => {
@@ -79458,25 +79459,25 @@ var mt = (s3) => {
79458
79459
  for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
79459
79460
  return e === -1 ? s3 : s3.slice(0, e);
79460
79461
  };
79461
- var _n = (s3) => {
79462
+ var Nn = (s3) => {
79462
79463
  let t = s3.onReadEntry;
79463
79464
  s3.onReadEntry = t ? (e) => {
79464
79465
  t(e), e.resume();
79465
79466
  } : (e) => e.resume();
79466
79467
  };
79467
- var Yi = (s3, t) => {
79468
+ var Ki = (s3, t) => {
79468
79469
  let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
79469
- let h = o || gn(n).root || ".", a;
79470
+ let h = o || Ln(n).root || ".", a;
79470
79471
  if (n === h) a = false;
79471
79472
  else {
79472
79473
  let l = e.get(n);
79473
- l !== void 0 ? a = l : a = r(bn(n), h);
79474
+ a = l !== void 0 ? l : r(xn(n), h);
79474
79475
  }
79475
79476
  return e.set(n, a), a;
79476
79477
  };
79477
79478
  s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
79478
79479
  };
79479
- var On = (s3) => {
79480
+ var An = (s3) => {
79480
79481
  let t = new st(s3), e = s3.file, i;
79481
79482
  try {
79482
79483
  i = Vt.openSync(e, "r");
@@ -79500,58 +79501,58 @@ var On = (s3) => {
79500
79501
  }
79501
79502
  }
79502
79503
  };
79503
- var Tn = (s3, t) => {
79504
+ var Dn = (s3, t) => {
79504
79505
  let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
79505
79506
  return new Promise((o, h) => {
79506
79507
  e.on("error", h), e.on("end", o), Vt.stat(r, (a, l) => {
79507
79508
  if (a) h(a);
79508
79509
  else {
79509
- let c = new gt(r, { readSize: i, size: l.size });
79510
+ let c = new _t(r, { readSize: i, size: l.size });
79510
79511
  c.on("error", h), c.pipe(e);
79511
79512
  }
79512
79513
  });
79513
79514
  });
79514
79515
  };
79515
- var It = K(On, Tn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
79516
- t?.length && Yi(s3, t), s3.noResume || _n(s3);
79516
+ var It = K(An, Dn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
79517
+ t?.length && Ki(s3, t), s3.noResume || Nn(s3);
79517
79518
  });
79518
- 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);
79519
- var { isAbsolute: Ln, parse: Ks } = xn;
79519
+ 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);
79520
+ var { isAbsolute: Cn, parse: Ys } = In;
79520
79521
  var ce = (s3) => {
79521
- let t = "", e = Ks(s3);
79522
- for (; Ln(s3) || e.root; ) {
79522
+ let t = "", e = Ys(s3);
79523
+ for (; Cn(s3) || e.root; ) {
79523
79524
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
79524
- s3 = s3.slice(i.length), t += i, e = Ks(s3);
79525
+ s3 = s3.slice(i.length), t += i, e = Ys(s3);
79525
79526
  }
79526
79527
  return [t, s3];
79527
79528
  };
79528
- var Qe = ["|", "<", ">", "?", ":"];
79529
- var Vi = Qe.map((s3) => String.fromCharCode(61440 + s3.charCodeAt(0)));
79530
- var Nn = new Map(Qe.map((s3, t) => [s3, Vi[t]]));
79531
- var Dn = new Map(Vi.map((s3, t) => [s3, Qe[t]]));
79532
- var $i = (s3) => Qe.reduce((t, e) => t.split(e).join(Nn.get(e)), s3);
79533
- var Vs = (s3) => Vi.reduce((t, e) => t.split(e).join(Dn.get(e)), s3);
79534
- var tr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
79535
- var An = 16 * 1024 * 1024;
79536
- var qs = /* @__PURE__ */ Symbol("process");
79537
- var js = /* @__PURE__ */ Symbol("file");
79538
- var Qs = /* @__PURE__ */ Symbol("directory");
79539
- var qi = /* @__PURE__ */ Symbol("symlink");
79540
- var Js = /* @__PURE__ */ Symbol("hardlink");
79529
+ var Je = ["|", "<", ">", "?", ":"];
79530
+ var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
79531
+ var Fn = new Map(Je.map((s3, t) => [s3, $i[t]]));
79532
+ var kn = new Map($i.map((s3, t) => [s3, Je[t]]));
79533
+ var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Fn.get(e)), s3);
79534
+ var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(kn.get(e)), s3);
79535
+ var Js = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
79536
+ var vn = 16 * 1024 * 1024;
79537
+ var Xs = /* @__PURE__ */ Symbol("process");
79538
+ var qs = /* @__PURE__ */ Symbol("file");
79539
+ var js = /* @__PURE__ */ Symbol("directory");
79540
+ var ji = /* @__PURE__ */ Symbol("symlink");
79541
+ var Qs = /* @__PURE__ */ Symbol("hardlink");
79541
79542
  var fe = /* @__PURE__ */ Symbol("header");
79542
- var Je = /* @__PURE__ */ Symbol("read");
79543
- var ji = /* @__PURE__ */ Symbol("lstat");
79544
- var ti = /* @__PURE__ */ Symbol("onlstat");
79545
- var Qi = /* @__PURE__ */ Symbol("onread");
79546
- var Ji = /* @__PURE__ */ Symbol("onreadlink");
79547
- var ts = /* @__PURE__ */ Symbol("openfile");
79548
- var es = /* @__PURE__ */ Symbol("onopenfile");
79543
+ var ti = /* @__PURE__ */ Symbol("read");
79544
+ var Qi = /* @__PURE__ */ Symbol("lstat");
79545
+ var ei = /* @__PURE__ */ Symbol("onlstat");
79546
+ var Ji = /* @__PURE__ */ Symbol("onread");
79547
+ var ts = /* @__PURE__ */ Symbol("onreadlink");
79548
+ var es = /* @__PURE__ */ Symbol("openfile");
79549
+ var is = /* @__PURE__ */ Symbol("onopenfile");
79549
79550
  var pt = /* @__PURE__ */ Symbol("close");
79550
- var ei = /* @__PURE__ */ Symbol("mode");
79551
- var is = /* @__PURE__ */ Symbol("awaitDrain");
79552
- var Xi = /* @__PURE__ */ Symbol("ondrain");
79551
+ var ii = /* @__PURE__ */ Symbol("mode");
79552
+ var ss = /* @__PURE__ */ Symbol("awaitDrain");
79553
+ var qi = /* @__PURE__ */ Symbol("ondrain");
79553
79554
  var X = /* @__PURE__ */ Symbol("prefix");
79554
- var de = class extends A {
79555
+ var de = class extends D {
79555
79556
  path;
79556
79557
  portable;
79557
79558
  myuid = process.getuid && process.getuid() || 0;
@@ -79584,15 +79585,15 @@ var de = class extends A {
79584
79585
  #t = false;
79585
79586
  constructor(t, e = {}) {
79586
79587
  let i = re(e);
79587
- super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || An, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
79588
+ super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || vn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
79588
79589
  let r = false;
79589
79590
  if (!this.preservePaths) {
79590
79591
  let [o, h] = ce(this.path);
79591
79592
  o && typeof h == "string" && (this.path = h, r = o);
79592
79593
  }
79593
- 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 || Xs.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 });
79594
+ 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 || $s.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 });
79594
79595
  let n = this.statCache.get(this.absolute);
79595
- n ? this[ti](n) : this[ji]();
79596
+ n ? this[ei](n) : this[Qi]();
79596
79597
  }
79597
79598
  warn(t, e, i = {}) {
79598
79599
  return Lt(this, t, e, i);
@@ -79600,93 +79601,93 @@ var de = class extends A {
79600
79601
  emit(t, ...e) {
79601
79602
  return t === "error" && (this.#t = true), super.emit(t, ...e);
79602
79603
  }
79603
- [ji]() {
79604
+ [Qi]() {
79604
79605
  $.lstat(this.absolute, (t, e) => {
79605
79606
  if (t) return this.emit("error", t);
79606
- this[ti](e);
79607
+ this[ei](e);
79607
79608
  });
79608
79609
  }
79609
- [ti](t) {
79610
- this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = In(t), this.emit("stat", t), this[qs]();
79610
+ [ei](t) {
79611
+ this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Mn(t), this.emit("stat", t), this[Xs]();
79611
79612
  }
79612
- [qs]() {
79613
+ [Xs]() {
79613
79614
  switch (this.type) {
79614
79615
  case "File":
79615
- return this[js]();
79616
+ return this[qs]();
79616
79617
  case "Directory":
79617
- return this[Qs]();
79618
+ return this[js]();
79618
79619
  case "SymbolicLink":
79619
- return this[qi]();
79620
+ return this[ji]();
79620
79621
  default:
79621
79622
  return this.end();
79622
79623
  }
79623
79624
  }
79624
- [ei](t) {
79625
- return Ki(t, this.type === "Directory", this.portable);
79625
+ [ii](t) {
79626
+ return Vi(t, this.type === "Directory", this.portable);
79626
79627
  }
79627
79628
  [X](t) {
79628
- return tr(t, this.prefix);
79629
+ return Js(t, this.prefix);
79629
79630
  }
79630
79631
  [fe]() {
79631
79632
  if (!this.stat) throw new Error("cannot write header before stat");
79632
- 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());
79633
+ 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());
79633
79634
  let t = this.header?.block;
79634
79635
  if (!t) throw new Error("failed to encode header");
79635
79636
  super.write(t);
79636
79637
  }
79637
- [Qs]() {
79638
+ [js]() {
79638
79639
  if (!this.stat) throw new Error("cannot create directory entry without stat");
79639
79640
  this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
79640
79641
  }
79641
- [qi]() {
79642
+ [ji]() {
79642
79643
  $.readlink(this.absolute, (t, e) => {
79643
79644
  if (t) return this.emit("error", t);
79644
- this[Ji](e);
79645
+ this[ts](e);
79645
79646
  });
79646
79647
  }
79647
- [Ji](t) {
79648
+ [ts](t) {
79648
79649
  this.linkpath = f(t), this[fe](), this.end();
79649
79650
  }
79650
- [Js](t) {
79651
+ [Qs](t) {
79651
79652
  if (!this.stat) throw new Error("cannot create link entry without stat");
79652
- this.type = "Link", this.linkpath = f(Xs.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
79653
+ this.type = "Link", this.linkpath = f($s.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
79653
79654
  }
79654
- [js]() {
79655
+ [qs]() {
79655
79656
  if (!this.stat) throw new Error("cannot create file entry without stat");
79656
79657
  if (this.stat.nlink > 1) {
79657
79658
  let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
79658
- if (e?.indexOf(this.cwd) === 0) return this[Js](e);
79659
+ if (e?.indexOf(this.cwd) === 0) return this[Qs](e);
79659
79660
  this.linkCache.set(t, this.absolute);
79660
79661
  }
79661
79662
  if (this[fe](), this.stat.size === 0) return this.end();
79662
- this[ts]();
79663
+ this[es]();
79663
79664
  }
79664
- [ts]() {
79665
+ [es]() {
79665
79666
  $.open(this.absolute, "r", (t, e) => {
79666
79667
  if (t) return this.emit("error", t);
79667
- this[es](e);
79668
+ this[is](e);
79668
79669
  });
79669
79670
  }
79670
- [es](t) {
79671
+ [is](t) {
79671
79672
  if (this.fd = t, this.#t) return this[pt]();
79672
79673
  if (!this.stat) throw new Error("should stat before calling onopenfile");
79673
79674
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
79674
79675
  let e = Math.min(this.blockLen, this.maxReadSize);
79675
- this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[Je]();
79676
+ this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ti]();
79676
79677
  }
79677
- [Je]() {
79678
+ [ti]() {
79678
79679
  let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
79679
79680
  if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
79680
79681
  $.read(t, e, i, r, n, (o, h) => {
79681
79682
  if (o) return this[pt](() => this.emit("error", o));
79682
- this[Qi](h);
79683
+ this[Ji](h);
79683
79684
  });
79684
79685
  }
79685
79686
  [pt](t = () => {
79686
79687
  }) {
79687
79688
  this.fd !== void 0 && $.close(this.fd, t);
79688
79689
  }
79689
- [Qi](t) {
79690
+ [Ji](t) {
79690
79691
  if (t <= 0 && this.remain > 0) {
79691
79692
  let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
79692
79693
  return this[pt](() => this.emit("error", r));
@@ -79698,9 +79699,9 @@ var de = class extends A {
79698
79699
  if (!this.buf) throw new Error("should have created buffer prior to reading");
79699
79700
  if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
79700
79701
  let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
79701
- this.write(e) ? this[Xi]() : this[is](() => this[Xi]());
79702
+ this.write(e) ? this[qi]() : this[ss](() => this[qi]());
79702
79703
  }
79703
- [is](t) {
79704
+ [ss](t) {
79704
79705
  this.once("drain", t);
79705
79706
  }
79706
79707
  write(t, e, i) {
@@ -79710,30 +79711,30 @@ var de = class extends A {
79710
79711
  }
79711
79712
  return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
79712
79713
  }
79713
- [Xi]() {
79714
+ [qi]() {
79714
79715
  if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
79715
79716
  if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
79716
- 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]();
79717
+ 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]();
79717
79718
  }
79718
79719
  };
79719
- var ii = class extends de {
79720
+ var si = class extends de {
79720
79721
  sync = true;
79721
- [ji]() {
79722
- this[ti]($.lstatSync(this.absolute));
79722
+ [Qi]() {
79723
+ this[ei]($.lstatSync(this.absolute));
79723
79724
  }
79724
- [qi]() {
79725
- this[Ji]($.readlinkSync(this.absolute));
79725
+ [ji]() {
79726
+ this[ts]($.readlinkSync(this.absolute));
79726
79727
  }
79727
- [ts]() {
79728
- this[es]($.openSync(this.absolute, "r"));
79728
+ [es]() {
79729
+ this[is]($.openSync(this.absolute, "r"));
79729
79730
  }
79730
- [Je]() {
79731
+ [ti]() {
79731
79732
  let t = true;
79732
79733
  try {
79733
79734
  let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
79734
79735
  if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
79735
79736
  let h = $.readSync(e, i, r, n, o);
79736
- this[Qi](h), t = false;
79737
+ this[Ji](h), t = false;
79737
79738
  } finally {
79738
79739
  if (t) try {
79739
79740
  this[pt](() => {
@@ -79742,7 +79743,7 @@ var ii = class extends de {
79742
79743
  }
79743
79744
  }
79744
79745
  }
79745
- [is](t) {
79746
+ [ss](t) {
79746
79747
  t();
79747
79748
  }
79748
79749
  [pt](t = () => {
@@ -79750,7 +79751,7 @@ var ii = class extends de {
79750
79751
  this.fd !== void 0 && $.closeSync(this.fd), t();
79751
79752
  }
79752
79753
  };
79753
- var si = class extends A {
79754
+ var ri = class extends D {
79754
79755
  blockLen = 0;
79755
79756
  blockRemain = 0;
79756
79757
  buf = 0;
@@ -79786,7 +79787,7 @@ var si = class extends A {
79786
79787
  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;
79787
79788
  let { type: r } = t;
79788
79789
  if (r === "Unsupported") throw new Error("writing entry that should be ignored");
79789
- 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);
79790
+ 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);
79790
79791
  let n = false;
79791
79792
  if (!this.preservePaths) {
79792
79793
  let [h, a] = ce(this.path);
@@ -79798,10 +79799,10 @@ var si = class extends A {
79798
79799
  super.write(o), t.pipe(this);
79799
79800
  }
79800
79801
  [X](t) {
79801
- return tr(t, this.prefix);
79802
+ return Js(t, this.prefix);
79802
79803
  }
79803
- [ei](t) {
79804
- return Ki(t, this.type === "Directory", this.portable);
79804
+ [ii](t) {
79805
+ return Vi(t, this.type === "Directory", this.portable);
79805
79806
  }
79806
79807
  write(t, e, i) {
79807
79808
  typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
@@ -79813,8 +79814,8 @@ var si = class extends A {
79813
79814
  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;
79814
79815
  }
79815
79816
  };
79816
- var In = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
79817
- var ri = class s2 {
79817
+ var Mn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
79818
+ var ni = class s2 {
79818
79819
  tail;
79819
79820
  head;
79820
79821
  length = 0;
@@ -79845,11 +79846,11 @@ var ri = class s2 {
79845
79846
  t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
79846
79847
  }
79847
79848
  push(...t) {
79848
- for (let e = 0, i = t.length; e < i; e++) Fn(this, t[e]);
79849
+ for (let e = 0, i = t.length; e < i; e++) Pn(this, t[e]);
79849
79850
  return this.length;
79850
79851
  }
79851
79852
  unshift(...t) {
79852
- for (var e = 0, i = t.length; e < i; e++) kn(this, t[e]);
79853
+ for (var e = 0, i = t.length; e < i; e++) zn(this, t[e]);
79853
79854
  return this.length;
79854
79855
  }
79855
79856
  pop() {
@@ -79945,7 +79946,7 @@ var ri = class s2 {
79945
79946
  let n = [];
79946
79947
  for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
79947
79948
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
79948
- for (let o of i) r = Cn(this, r, o);
79949
+ for (let o of i) r = Bn(this, r, o);
79949
79950
  return n;
79950
79951
  }
79951
79952
  reverse() {
@@ -79957,14 +79958,14 @@ var ri = class s2 {
79957
79958
  return this.head = e, this.tail = t, this;
79958
79959
  }
79959
79960
  };
79960
- function Cn(s3, t, e) {
79961
+ function Bn(s3, t, e) {
79961
79962
  let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
79962
79963
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
79963
79964
  }
79964
- function Fn(s3, t) {
79965
+ function Pn(s3, t) {
79965
79966
  s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
79966
79967
  }
79967
- function kn(s3, t) {
79968
+ function zn(s3, t) {
79968
79969
  s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
79969
79970
  }
79970
79971
  var ue = class {
@@ -79976,7 +79977,7 @@ var ue = class {
79976
79977
  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;
79977
79978
  }
79978
79979
  };
79979
- var fi = class {
79980
+ var di = class {
79980
79981
  path;
79981
79982
  absolute;
79982
79983
  entry;
@@ -79989,28 +79990,28 @@ var fi = class {
79989
79990
  this.path = t || "./", this.absolute = e;
79990
79991
  }
79991
79992
  };
79992
- var er = Buffer.alloc(1024);
79993
- var ni = /* @__PURE__ */ Symbol("onStat");
79993
+ var tr = Buffer.alloc(1024);
79994
+ var oi = /* @__PURE__ */ Symbol("onStat");
79994
79995
  var me = /* @__PURE__ */ Symbol("ended");
79995
79996
  var W = /* @__PURE__ */ Symbol("queue");
79996
79997
  var Ct = /* @__PURE__ */ Symbol("current");
79997
79998
  var Ft = /* @__PURE__ */ Symbol("process");
79998
79999
  var pe = /* @__PURE__ */ Symbol("processing");
79999
- var ss = /* @__PURE__ */ Symbol("processJob");
80000
+ var rs = /* @__PURE__ */ Symbol("processJob");
80000
80001
  var G = /* @__PURE__ */ Symbol("jobs");
80001
- var rs = /* @__PURE__ */ Symbol("jobDone");
80002
- var oi = /* @__PURE__ */ Symbol("addFSEntry");
80003
- var ir = /* @__PURE__ */ Symbol("addTarEntry");
80004
- var hs = /* @__PURE__ */ Symbol("stat");
80005
- var as = /* @__PURE__ */ Symbol("readdir");
80006
- var hi = /* @__PURE__ */ Symbol("onreaddir");
80007
- var ai = /* @__PURE__ */ Symbol("pipe");
80008
- var sr = /* @__PURE__ */ Symbol("entry");
80009
- var ns = /* @__PURE__ */ Symbol("entryOpt");
80010
- var li = /* @__PURE__ */ Symbol("writeEntryClass");
80011
- var nr = /* @__PURE__ */ Symbol("write");
80012
- var os2 = /* @__PURE__ */ Symbol("ondrain");
80013
- var Et = class extends A {
80002
+ var ns = /* @__PURE__ */ Symbol("jobDone");
80003
+ var hi = /* @__PURE__ */ Symbol("addFSEntry");
80004
+ var er = /* @__PURE__ */ Symbol("addTarEntry");
80005
+ var as = /* @__PURE__ */ Symbol("stat");
80006
+ var ls = /* @__PURE__ */ Symbol("readdir");
80007
+ var ai = /* @__PURE__ */ Symbol("onreaddir");
80008
+ var li = /* @__PURE__ */ Symbol("pipe");
80009
+ var ir = /* @__PURE__ */ Symbol("entry");
80010
+ var os2 = /* @__PURE__ */ Symbol("entryOpt");
80011
+ var ci = /* @__PURE__ */ Symbol("writeEntryClass");
80012
+ var rr = /* @__PURE__ */ Symbol("write");
80013
+ var hs = /* @__PURE__ */ Symbol("ondrain");
80014
+ var Et = class extends D {
80014
80015
  sync = false;
80015
80016
  opt;
80016
80017
  cwd;
@@ -80031,22 +80032,22 @@ var Et = class extends A {
80031
80032
  mtime;
80032
80033
  filter;
80033
80034
  jobs;
80034
- [li];
80035
+ [ci];
80035
80036
  onWriteEntry;
80036
80037
  [W];
80037
80038
  [G] = 0;
80038
80039
  [pe] = false;
80039
80040
  [me] = false;
80040
80041
  constructor(t = {}) {
80041
- 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) {
80042
+ 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) {
80042
80043
  if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
80043
- 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");
80044
+ 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");
80044
80045
  let e = this.zip;
80045
- e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[os2]()), this.on("resume", () => e.resume());
80046
- } else this.on("drain", this[os2]);
80047
- 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;
80046
+ e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[hs]()), this.on("resume", () => e.resume());
80047
+ } else this.on("drain", this[hs]);
80048
+ 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;
80048
80049
  }
80049
- [nr](t) {
80050
+ [rr](t) {
80050
80051
  return super.write(t);
80051
80052
  }
80052
80053
  add(t) {
@@ -80057,97 +80058,97 @@ var Et = class extends A {
80057
80058
  }
80058
80059
  write(t) {
80059
80060
  if (this[me]) throw new Error("write after end");
80060
- return t instanceof Yt ? this[ir](t) : this[oi](t), this.flowing;
80061
+ return t instanceof Yt ? this[er](t) : this[hi](t), this.flowing;
80061
80062
  }
80062
- [ir](t) {
80063
- let e = f(rr.resolve(this.cwd, t.path));
80063
+ [er](t) {
80064
+ let e = f(sr.resolve(this.cwd, t.path));
80064
80065
  if (!this.filter(t.path, t)) t.resume();
80065
80066
  else {
80066
- let i = new fi(t.path, e);
80067
- i.entry = new si(t, this[ns](i)), i.entry.on("end", () => this[rs](i)), this[G] += 1, this[W].push(i);
80067
+ let i = new di(t.path, e);
80068
+ i.entry = new ri(t, this[os2](i)), i.entry.on("end", () => this[ns](i)), this[G] += 1, this[W].push(i);
80068
80069
  }
80069
80070
  this[Ft]();
80070
80071
  }
80071
- [oi](t) {
80072
- let e = f(rr.resolve(this.cwd, t));
80073
- this[W].push(new fi(t, e)), this[Ft]();
80072
+ [hi](t) {
80073
+ let e = f(sr.resolve(this.cwd, t));
80074
+ this[W].push(new di(t, e)), this[Ft]();
80074
80075
  }
80075
- [hs](t) {
80076
+ [as](t) {
80076
80077
  t.pending = true, this[G] += 1;
80077
80078
  let e = this.follow ? "stat" : "lstat";
80078
- ci[e](t.absolute, (i, r) => {
80079
- t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[ni](t, r);
80079
+ fi[e](t.absolute, (i, r) => {
80080
+ t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[oi](t, r);
80080
80081
  });
80081
80082
  }
80082
- [ni](t, e) {
80083
- 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]();
80083
+ [oi](t, e) {
80084
+ 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]();
80084
80085
  }
80085
- [as](t) {
80086
- t.pending = true, this[G] += 1, ci.readdir(t.absolute, (e, i) => {
80086
+ [ls](t) {
80087
+ t.pending = true, this[G] += 1, fi.readdir(t.absolute, (e, i) => {
80087
80088
  if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
80088
- this[hi](t, i);
80089
+ this[ai](t, i);
80089
80090
  });
80090
80091
  }
80091
- [hi](t, e) {
80092
+ [ai](t, e) {
80092
80093
  this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
80093
80094
  }
80094
80095
  [Ft]() {
80095
80096
  if (!this[pe]) {
80096
80097
  this[pe] = true;
80097
- for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[ss](t.value), t.value.ignore) {
80098
+ for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[rs](t.value), t.value.ignore) {
80098
80099
  let e = t.next;
80099
80100
  this[W].removeNode(t), t.next = e;
80100
80101
  }
80101
- this[pe] = false, this[me] && !this[W].length && this[G] === 0 && (this.zip ? this.zip.end(er) : (super.write(er), super.end()));
80102
+ this[pe] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(tr) : (super.write(tr), super.end()));
80102
80103
  }
80103
80104
  }
80104
80105
  get [Ct]() {
80105
80106
  return this[W] && this[W].head && this[W].head.value;
80106
80107
  }
80107
- [rs](t) {
80108
+ [ns](t) {
80108
80109
  this[W].shift(), this[G] -= 1, this[Ft]();
80109
80110
  }
80110
- [ss](t) {
80111
+ [rs](t) {
80111
80112
  if (!t.pending) {
80112
80113
  if (t.entry) {
80113
- t === this[Ct] && !t.piped && this[ai](t);
80114
+ t === this[Ct] && !t.piped && this[li](t);
80114
80115
  return;
80115
80116
  }
80116
80117
  if (!t.stat) {
80117
80118
  let e = this.statCache.get(t.absolute);
80118
- e ? this[ni](t, e) : this[hs](t);
80119
+ e ? this[oi](t, e) : this[as](t);
80119
80120
  }
80120
80121
  if (t.stat && !t.ignore) {
80121
80122
  if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
80122
80123
  let e = this.readdirCache.get(t.absolute);
80123
- if (e ? this[hi](t, e) : this[as](t), !t.readdir) return;
80124
+ if (e ? this[ai](t, e) : this[ls](t), !t.readdir) return;
80124
80125
  }
80125
- if (t.entry = this[sr](t), !t.entry) {
80126
+ if (t.entry = this[ir](t), !t.entry) {
80126
80127
  t.ignore = true;
80127
80128
  return;
80128
80129
  }
80129
- t === this[Ct] && !t.piped && this[ai](t);
80130
+ t === this[Ct] && !t.piped && this[li](t);
80130
80131
  }
80131
80132
  }
80132
80133
  }
80133
- [ns](t) {
80134
+ [os2](t) {
80134
80135
  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 };
80135
80136
  }
80136
- [sr](t) {
80137
+ [ir](t) {
80137
80138
  this[G] += 1;
80138
80139
  try {
80139
- return new this[li](t.path, this[ns](t)).on("end", () => this[rs](t)).on("error", (i) => this.emit("error", i));
80140
+ return new this[ci](t.path, this[os2](t)).on("end", () => this[ns](t)).on("error", (i) => this.emit("error", i));
80140
80141
  } catch (e) {
80141
80142
  this.emit("error", e);
80142
80143
  }
80143
80144
  }
80144
- [os2]() {
80145
+ [hs]() {
80145
80146
  this[Ct] && this[Ct].entry && this[Ct].entry.resume();
80146
80147
  }
80147
- [ai](t) {
80148
+ [li](t) {
80148
80149
  t.piped = true, t.readdir && t.readdir.forEach((r) => {
80149
80150
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
80150
- this[oi](o + r);
80151
+ this[hi](o + r);
80151
80152
  });
80152
80153
  let e = t.entry, i = this.zip;
80153
80154
  if (!e) throw new Error("cannot pipe without source");
@@ -80167,131 +80168,129 @@ var Et = class extends A {
80167
80168
  var kt = class extends Et {
80168
80169
  sync = true;
80169
80170
  constructor(t) {
80170
- super(t), this[li] = ii;
80171
+ super(t), this[ci] = si;
80171
80172
  }
80172
80173
  pause() {
80173
80174
  }
80174
80175
  resume() {
80175
80176
  }
80176
- [hs](t) {
80177
+ [as](t) {
80177
80178
  let e = this.follow ? "statSync" : "lstatSync";
80178
- this[ni](t, ci[e](t.absolute));
80179
+ this[oi](t, fi[e](t.absolute));
80179
80180
  }
80180
- [as](t) {
80181
- this[hi](t, ci.readdirSync(t.absolute));
80181
+ [ls](t) {
80182
+ this[ai](t, fi.readdirSync(t.absolute));
80182
80183
  }
80183
- [ai](t) {
80184
+ [li](t) {
80184
80185
  let e = t.entry, i = this.zip;
80185
80186
  if (t.readdir && t.readdir.forEach((r) => {
80186
80187
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
80187
- this[oi](o + r);
80188
+ this[hi](o + r);
80188
80189
  }), !e) throw new Error("Cannot pipe without source");
80189
80190
  i ? e.on("data", (r) => {
80190
80191
  i.write(r);
80191
80192
  }) : e.on("data", (r) => {
80192
- super[nr](r);
80193
+ super[rr](r);
80193
80194
  });
80194
80195
  }
80195
80196
  };
80196
- var vn = (s3, t) => {
80197
+ var Un = (s3, t) => {
80197
80198
  let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
80198
- e.pipe(i), hr(e, t);
80199
+ e.pipe(i), or(e, t);
80199
80200
  };
80200
- var Mn = (s3, t) => {
80201
+ var Hn = (s3, t) => {
80201
80202
  let e = new Et(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
80202
80203
  e.pipe(i);
80203
80204
  let r = new Promise((n, o) => {
80204
80205
  i.on("error", o), i.on("close", n), e.on("error", o);
80205
80206
  });
80206
- return ar(e, t), r;
80207
+ return hr(e, t).catch((n) => e.emit("error", n)), r;
80207
80208
  };
80208
- var hr = (s3, t) => {
80209
+ var or = (s3, t) => {
80209
80210
  t.forEach((e) => {
80210
- e.charAt(0) === "@" ? It({ file: or.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
80211
+ e.charAt(0) === "@" ? It({ file: nr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
80211
80212
  }), s3.end();
80212
80213
  };
80213
- var ar = async (s3, t) => {
80214
- for (let e = 0; e < t.length; e++) {
80215
- let i = String(t[e]);
80216
- i.charAt(0) === "@" ? await It({ file: or.resolve(String(s3.cwd), i.slice(1)), noResume: true, onReadEntry: (r) => {
80217
- s3.add(r);
80218
- } }) : s3.add(i);
80219
- }
80214
+ var hr = async (s3, t) => {
80215
+ for (let e of t) e.charAt(0) === "@" ? await It({ file: nr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
80216
+ s3.add(i);
80217
+ } }) : s3.add(e);
80220
80218
  s3.end();
80221
80219
  };
80222
- var Bn = (s3, t) => {
80220
+ var Wn = (s3, t) => {
80223
80221
  let e = new kt(s3);
80224
- return hr(e, t), e;
80222
+ return or(e, t), e;
80225
80223
  };
80226
- var Pn = (s3, t) => {
80224
+ var Gn = (s3, t) => {
80227
80225
  let e = new Et(s3);
80228
- return ar(e, t), e;
80226
+ return hr(e, t).catch((i) => e.emit("error", i)), e;
80229
80227
  };
80230
- var zn = K(vn, Mn, Bn, Pn, (s3, t) => {
80228
+ var Zn = K(Un, Hn, Wn, Gn, (s3, t) => {
80231
80229
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
80232
80230
  });
80233
- var Un = process.env.__FAKE_PLATFORM__ || process.platform;
80234
- var Hn = Un === "win32";
80235
- var { O_CREAT: Wn, O_TRUNC: Gn, O_WRONLY: Zn } = lr.constants;
80236
- var cr = Number(process.env.__FAKE_FS_O_FILENAME__) || lr.constants.UV_FS_O_FILEMAP || 0;
80237
- var Yn = Hn && !!cr;
80238
- var Kn = 512 * 1024;
80239
- var Vn = cr | Gn | Wn | Zn;
80240
- var ls = Yn ? (s3) => s3 < Kn ? Vn : "w" : () => "w";
80241
- var cs = (s3, t, e) => {
80231
+ var Yn = process.env.__FAKE_PLATFORM__ || process.platform;
80232
+ var fr = Yn === "win32";
80233
+ var { O_CREAT: dr, O_NOFOLLOW: ar, O_TRUNC: ur, O_WRONLY: mr } = cr.constants;
80234
+ var pr = Number(process.env.__FAKE_FS_O_FILENAME__) || cr.constants.UV_FS_O_FILEMAP || 0;
80235
+ var Kn = fr && !!pr;
80236
+ var Vn = 512 * 1024;
80237
+ var $n = pr | ur | dr | mr;
80238
+ var lr = !fr && typeof ar == "number" ? ar | ur | dr | mr : null;
80239
+ var cs = lr !== null ? () => lr : Kn ? (s3) => s3 < Vn ? $n : "w" : () => "w";
80240
+ var fs2 = (s3, t, e) => {
80242
80241
  try {
80243
- return ui.lchownSync(s3, t, e);
80242
+ return mi.lchownSync(s3, t, e);
80244
80243
  } catch (i) {
80245
80244
  if (i?.code !== "ENOENT") throw i;
80246
80245
  }
80247
80246
  };
80248
- var di = (s3, t, e, i) => {
80249
- ui.lchown(s3, t, e, (r) => {
80247
+ var ui = (s3, t, e, i) => {
80248
+ mi.lchown(s3, t, e, (r) => {
80250
80249
  i(r && r?.code !== "ENOENT" ? r : null);
80251
80250
  });
80252
80251
  };
80253
- var $n = (s3, t, e, i, r) => {
80254
- if (t.isDirectory()) fs2(Ee.resolve(s3, t.name), e, i, (n) => {
80252
+ var Xn = (s3, t, e, i, r) => {
80253
+ if (t.isDirectory()) ds(Ee.resolve(s3, t.name), e, i, (n) => {
80255
80254
  if (n) return r(n);
80256
80255
  let o = Ee.resolve(s3, t.name);
80257
- di(o, e, i, r);
80256
+ ui(o, e, i, r);
80258
80257
  });
80259
80258
  else {
80260
80259
  let n = Ee.resolve(s3, t.name);
80261
- di(n, e, i, r);
80260
+ ui(n, e, i, r);
80262
80261
  }
80263
80262
  };
80264
- var fs2 = (s3, t, e, i) => {
80265
- ui.readdir(s3, { withFileTypes: true }, (r, n) => {
80263
+ var ds = (s3, t, e, i) => {
80264
+ mi.readdir(s3, { withFileTypes: true }, (r, n) => {
80266
80265
  if (r) {
80267
80266
  if (r.code === "ENOENT") return i();
80268
80267
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
80269
80268
  }
80270
- if (r || !n.length) return di(s3, t, e, i);
80269
+ if (r || !n.length) return ui(s3, t, e, i);
80271
80270
  let o = n.length, h = null, a = (l) => {
80272
80271
  if (!h) {
80273
80272
  if (l) return i(h = l);
80274
- if (--o === 0) return di(s3, t, e, i);
80273
+ if (--o === 0) return ui(s3, t, e, i);
80275
80274
  }
80276
80275
  };
80277
- for (let l of n) $n(s3, l, t, e, a);
80276
+ for (let l of n) Xn(s3, l, t, e, a);
80278
80277
  });
80279
80278
  };
80280
- var Xn = (s3, t, e, i) => {
80281
- t.isDirectory() && ds(Ee.resolve(s3, t.name), e, i), cs(Ee.resolve(s3, t.name), e, i);
80279
+ var qn = (s3, t, e, i) => {
80280
+ t.isDirectory() && us(Ee.resolve(s3, t.name), e, i), fs2(Ee.resolve(s3, t.name), e, i);
80282
80281
  };
80283
- var ds = (s3, t, e) => {
80282
+ var us = (s3, t, e) => {
80284
80283
  let i;
80285
80284
  try {
80286
- i = ui.readdirSync(s3, { withFileTypes: true });
80285
+ i = mi.readdirSync(s3, { withFileTypes: true });
80287
80286
  } catch (r) {
80288
80287
  let n = r;
80289
80288
  if (n?.code === "ENOENT") return;
80290
- if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return cs(s3, t, e);
80289
+ if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs2(s3, t, e);
80291
80290
  throw n;
80292
80291
  }
80293
- for (let r of i) Xn(s3, r, t, e);
80294
- return cs(s3, t, e);
80292
+ for (let r of i) qn(s3, r, t, e);
80293
+ return fs2(s3, t, e);
80295
80294
  };
80296
80295
  var we = class extends Error {
80297
80296
  path;
@@ -80316,41 +80315,41 @@ var wt = class extends Error {
80316
80315
  return "SymlinkError";
80317
80316
  }
80318
80317
  };
80319
- var jn = (s3, t) => {
80318
+ var Qn = (s3, t) => {
80320
80319
  k.stat(s3, (e, i) => {
80321
80320
  (e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
80322
80321
  });
80323
80322
  };
80324
- var fr = (s3, t, e) => {
80323
+ var Er = (s3, t, e) => {
80325
80324
  s3 = f(s3);
80326
80325
  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) => {
80327
- E ? e(E) : x && a ? fs2(x, o, h, (_s) => S(_s)) : n ? k.chmod(s3, r, e) : e();
80326
+ E ? e(E) : x && a ? ds(x, o, h, (xe) => S(xe)) : n ? k.chmod(s3, r, e) : e();
80328
80327
  };
80329
- if (s3 === d) return jn(s3, S);
80330
- if (l) return qn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
80331
- let N = f(mi.relative(d, s3)).split("/");
80332
- us(d, N, r, c, d, void 0, S);
80328
+ if (s3 === d) return Qn(s3, S);
80329
+ if (l) return jn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
80330
+ let N = f(pi.relative(d, s3)).split("/");
80331
+ ms(d, N, r, c, d, void 0, S);
80333
80332
  };
80334
- var us = (s3, t, e, i, r, n, o) => {
80335
- if (!t.length) return o(null, n);
80336
- let h = t.shift(), a = f(mi.resolve(s3 + "/" + h));
80337
- k.mkdir(a, e, dr(a, t, e, i, r, n, o));
80333
+ var ms = (s3, t, e, i, r, n, o) => {
80334
+ if (t.length === 0) return o(null, n);
80335
+ let h = t.shift(), a = f(pi.resolve(s3 + "/" + h));
80336
+ k.mkdir(a, e, wr(a, t, e, i, r, n, o));
80338
80337
  };
80339
- var dr = (s3, t, e, i, r, n, o) => (h) => {
80338
+ var wr = (s3, t, e, i, r, n, o) => (h) => {
80340
80339
  h ? k.lstat(s3, (a, l) => {
80341
80340
  if (a) a.path = a.path && f(a.path), o(a);
80342
- else if (l.isDirectory()) us(s3, t, e, i, r, n, o);
80341
+ else if (l.isDirectory()) ms(s3, t, e, i, r, n, o);
80343
80342
  else if (i) k.unlink(s3, (c) => {
80344
80343
  if (c) return o(c);
80345
- k.mkdir(s3, e, dr(s3, t, e, i, r, n, o));
80344
+ k.mkdir(s3, e, wr(s3, t, e, i, r, n, o));
80346
80345
  });
80347
80346
  else {
80348
80347
  if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
80349
80348
  o(h);
80350
80349
  }
80351
- }) : (n = n || s3, us(s3, t, e, i, r, n, o));
80350
+ }) : (n = n || s3, ms(s3, t, e, i, r, n, o));
80352
80351
  };
80353
- var Qn = (s3) => {
80352
+ var Jn = (s3) => {
80354
80353
  let t = false, e;
80355
80354
  try {
80356
80355
  t = k.statSync(s3).isDirectory();
@@ -80360,53 +80359,53 @@ var Qn = (s3) => {
80360
80359
  if (!t) throw new we(s3, e ?? "ENOTDIR");
80361
80360
  }
80362
80361
  };
80363
- var ur = (s3, t) => {
80362
+ var Sr = (s3, t) => {
80364
80363
  s3 = f(s3);
80365
80364
  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) => {
80366
- E && h && ds(E, n, o), r && k.chmodSync(s3, i);
80365
+ E && h && us(E, n, o), r && k.chmodSync(s3, i);
80367
80366
  };
80368
- if (s3 === c) return Qn(c), d();
80367
+ if (s3 === c) return Jn(c), d();
80369
80368
  if (a) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
80370
- let T = f(mi.relative(c, s3)).split("/"), N;
80369
+ let T = f(pi.relative(c, s3)).split("/"), N;
80371
80370
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
80372
- x = f(mi.resolve(x));
80371
+ x = f(pi.resolve(x));
80373
80372
  try {
80374
80373
  k.mkdirSync(x, i), N = N || x;
80375
80374
  } catch {
80376
- let Os = k.lstatSync(x);
80377
- if (Os.isDirectory()) continue;
80375
+ let xe = k.lstatSync(x);
80376
+ if (xe.isDirectory()) continue;
80378
80377
  if (l) {
80379
80378
  k.unlinkSync(x), k.mkdirSync(x, i), N = N || x;
80380
80379
  continue;
80381
- } else if (Os.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
80380
+ } else if (xe.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
80382
80381
  }
80383
80382
  }
80384
80383
  return d(N);
80385
80384
  };
80386
- var ms = /* @__PURE__ */ Object.create(null);
80387
- var mr = 1e4;
80385
+ var ps = /* @__PURE__ */ Object.create(null);
80386
+ var yr = 1e4;
80388
80387
  var $t = /* @__PURE__ */ new Set();
80389
- var pr = (s3) => {
80390
- $t.has(s3) ? $t.delete(s3) : ms[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
80391
- let t = ms[s3], e = $t.size - mr;
80392
- if (e > mr / 10) {
80393
- for (let i of $t) if ($t.delete(i), delete ms[i], --e <= 0) break;
80388
+ var Rr = (s3) => {
80389
+ $t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
80390
+ let t = ps[s3], e = $t.size - yr;
80391
+ if (e > yr / 10) {
80392
+ for (let i of $t) if ($t.delete(i), delete ps[i], --e <= 0) break;
80394
80393
  }
80395
80394
  return t;
80396
80395
  };
80397
- var Jn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
80398
- var to = Jn === "win32";
80399
- var eo = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
80400
- let r = e[e.length - 1];
80401
- return r !== void 0 && (i = Er(r, i)), e.push(i || "/"), e;
80396
+ var to = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
80397
+ var eo = to === "win32";
80398
+ var io = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
80399
+ let r = e.at(-1);
80400
+ return r !== void 0 && (i = br(r, i)), e.push(i || "/"), e;
80402
80401
  }, []);
80403
- var pi = class {
80402
+ var Ei = class {
80404
80403
  #t = /* @__PURE__ */ new Map();
80405
80404
  #i = /* @__PURE__ */ new Map();
80406
80405
  #s = /* @__PURE__ */ new Set();
80407
80406
  reserve(t, e) {
80408
- t = to ? ["win32 parallelization disabled"] : t.map((r) => mt(Er(pr(r))));
80409
- let i = new Set(t.map((r) => eo(r)).reduce((r, n) => r.concat(n)));
80407
+ t = eo ? ["win32 parallelization disabled"] : t.map((r) => mt(br(Rr(r))));
80408
+ let i = new Set(t.map((r) => io(r)).reduce((r, n) => r.concat(n)));
80410
80409
  this.#i.set(e, { dirs: i, paths: t });
80411
80410
  for (let r of t) {
80412
80411
  let n = this.#t.get(r);
@@ -80416,7 +80415,7 @@ var pi = class {
80416
80415
  let n = this.#t.get(r);
80417
80416
  if (!n) this.#t.set(r, [/* @__PURE__ */ new Set([e])]);
80418
80417
  else {
80419
- let o = n[n.length - 1];
80418
+ let o = n.at(-1);
80420
80419
  o instanceof Set ? o.add(e) : n.push(/* @__PURE__ */ new Set([e]));
80421
80420
  }
80422
80421
  }
@@ -80464,55 +80463,55 @@ var pi = class {
80464
80463
  return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
80465
80464
  }
80466
80465
  };
80467
- var wr = () => process.umask();
80468
- var Sr = /* @__PURE__ */ Symbol("onEntry");
80469
- var Ss = /* @__PURE__ */ Symbol("checkFs");
80470
- var yr = /* @__PURE__ */ Symbol("checkFs2");
80471
- var ys = /* @__PURE__ */ Symbol("isReusable");
80466
+ var _r = () => process.umask();
80467
+ var gr = /* @__PURE__ */ Symbol("onEntry");
80468
+ var ys = /* @__PURE__ */ Symbol("checkFs");
80469
+ var Or = /* @__PURE__ */ Symbol("checkFs2");
80470
+ var Rs = /* @__PURE__ */ Symbol("isReusable");
80472
80471
  var P = /* @__PURE__ */ Symbol("makeFs");
80473
- var Rs = /* @__PURE__ */ Symbol("file");
80474
- var bs = /* @__PURE__ */ Symbol("directory");
80475
- var wi = /* @__PURE__ */ Symbol("link");
80476
- var Rr = /* @__PURE__ */ Symbol("symlink");
80477
- var br = /* @__PURE__ */ Symbol("hardlink");
80472
+ var bs = /* @__PURE__ */ Symbol("file");
80473
+ var _s = /* @__PURE__ */ Symbol("directory");
80474
+ var Si = /* @__PURE__ */ Symbol("link");
80475
+ var Tr = /* @__PURE__ */ Symbol("symlink");
80476
+ var xr = /* @__PURE__ */ Symbol("hardlink");
80478
80477
  var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
80479
- var gr = /* @__PURE__ */ Symbol("unsupported");
80480
- var _r = /* @__PURE__ */ Symbol("checkPath");
80481
- var ps = /* @__PURE__ */ Symbol("stripAbsolutePath");
80478
+ var Lr = /* @__PURE__ */ Symbol("unsupported");
80479
+ var Nr = /* @__PURE__ */ Symbol("checkPath");
80480
+ var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
80482
80481
  var St = /* @__PURE__ */ Symbol("mkdir");
80483
80482
  var O = /* @__PURE__ */ Symbol("onError");
80484
- var Ei = /* @__PURE__ */ Symbol("pending");
80485
- var Or = /* @__PURE__ */ Symbol("pend");
80483
+ var wi = /* @__PURE__ */ Symbol("pending");
80484
+ var Ar = /* @__PURE__ */ Symbol("pend");
80486
80485
  var Xt = /* @__PURE__ */ Symbol("unpend");
80487
- var Es = /* @__PURE__ */ Symbol("ended");
80488
- var ws = /* @__PURE__ */ Symbol("maybeClose");
80486
+ var ws = /* @__PURE__ */ Symbol("ended");
80487
+ var Ss = /* @__PURE__ */ Symbol("maybeClose");
80489
80488
  var gs = /* @__PURE__ */ Symbol("skip");
80490
80489
  var Re = /* @__PURE__ */ Symbol("doChown");
80491
80490
  var be = /* @__PURE__ */ Symbol("uid");
80492
- var ge = /* @__PURE__ */ Symbol("gid");
80493
- var _e = /* @__PURE__ */ Symbol("checkedCwd");
80494
- var so = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
80495
- var Oe = so === "win32";
80496
- var ro = 1024;
80497
- var no = (s3, t) => {
80491
+ var _e = /* @__PURE__ */ Symbol("gid");
80492
+ var ge = /* @__PURE__ */ Symbol("checkedCwd");
80493
+ var ro = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
80494
+ var Oe = ro === "win32";
80495
+ var no = 1024;
80496
+ var oo = (s3, t) => {
80498
80497
  if (!Oe) return u.unlink(s3, t);
80499
- let e = s3 + ".DELETE." + xr(16).toString("hex");
80498
+ let e = s3 + ".DELETE." + Ir(16).toString("hex");
80500
80499
  u.rename(s3, e, (i) => {
80501
80500
  if (i) return t(i);
80502
80501
  u.unlink(e, t);
80503
80502
  });
80504
80503
  };
80505
- var oo = (s3) => {
80504
+ var ho = (s3) => {
80506
80505
  if (!Oe) return u.unlinkSync(s3);
80507
- let t = s3 + ".DELETE." + xr(16).toString("hex");
80506
+ let t = s3 + ".DELETE." + Ir(16).toString("hex");
80508
80507
  u.renameSync(s3, t), u.unlinkSync(t);
80509
80508
  };
80510
- var Tr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
80509
+ var Dr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
80511
80510
  var qt = class extends st {
80512
- [Es] = false;
80513
- [_e] = false;
80514
- [Ei] = 0;
80515
- reservations = new pi();
80511
+ [ws] = false;
80512
+ [ge] = false;
80513
+ [wi] = 0;
80514
+ reservations = new Ei();
80516
80515
  transform;
80517
80516
  writable = true;
80518
80517
  readable = false;
@@ -80539,34 +80538,32 @@ var qt = class extends st {
80539
80538
  chmod;
80540
80539
  constructor(t = {}) {
80541
80540
  if (t.ondone = () => {
80542
- this[Es] = true, this[ws]();
80541
+ this[ws] = true, this[Ss]();
80543
80542
  }, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
80544
80543
  if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
80545
80544
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
80546
80545
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
80547
80546
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
80548
- 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(R.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));
80547
+ 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 : no, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : _r() : 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[gr](e));
80549
80548
  }
80550
80549
  warn(t, e, i = {}) {
80551
80550
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
80552
80551
  }
80553
- [ws]() {
80554
- this[Es] && this[Ei] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
80552
+ [Ss]() {
80553
+ this[ws] && this[wi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
80555
80554
  }
80556
- [ps](t, e) {
80555
+ [Es](t, e) {
80557
80556
  let i = t[e], { type: r } = t;
80558
80557
  if (!i || this.preservePaths) return true;
80559
- let [n, o] = ce(i), h = o.replace(/\\/g, "/").split("/");
80558
+ let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
80560
80559
  if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
80561
80560
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
80562
- {
80563
- let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, h.join("/")));
80564
- if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
80565
- }
80561
+ let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, h.join("/")));
80562
+ if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
80566
80563
  }
80567
80564
  return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
80568
80565
  }
80569
- [_r](t) {
80566
+ [Nr](t) {
80570
80567
  let e = f(t.path), i = e.split("/");
80571
80568
  if (this.strip) {
80572
80569
  if (i.length < this.strip) return false;
@@ -80578,20 +80575,20 @@ var qt = class extends st {
80578
80575
  i.splice(0, this.strip), t.path = i.join("/");
80579
80576
  }
80580
80577
  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;
80581
- if (!this[ps](t, "path") || !this[ps](t, "linkpath")) return false;
80582
- if (R.isAbsolute(t.path) ? t.absolute = f(R.resolve(t.path)) : t.absolute = f(R.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
80578
+ if (!this[Es](t, "path") || !this[Es](t, "linkpath")) return false;
80579
+ if (t.absolute = R.isAbsolute(t.path) ? f(R.resolve(t.path)) : f(R.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
80583
80580
  if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
80584
80581
  if (this.win32) {
80585
80582
  let { root: r } = R.win32.parse(String(t.absolute));
80586
- t.absolute = r + $i(String(t.absolute).slice(r.length));
80583
+ t.absolute = r + Xi(String(t.absolute).slice(r.length));
80587
80584
  let { root: n } = R.win32.parse(t.path);
80588
- t.path = n + $i(t.path.slice(n.length));
80585
+ t.path = n + Xi(t.path.slice(n.length));
80589
80586
  }
80590
80587
  return true;
80591
80588
  }
80592
- [Sr](t) {
80593
- if (!this[_r](t)) return t.resume();
80594
- switch (io.equal(typeof t.absolute, "string"), t.type) {
80589
+ [gr](t) {
80590
+ if (!this[Nr](t)) return t.resume();
80591
+ switch (so.equal(typeof t.absolute, "string"), t.type) {
80595
80592
  case "Directory":
80596
80593
  case "GNUDumpDir":
80597
80594
  t.mode && (t.mode = t.mode | 448);
@@ -80600,28 +80597,28 @@ var qt = class extends st {
80600
80597
  case "ContiguousFile":
80601
80598
  case "Link":
80602
80599
  case "SymbolicLink":
80603
- return this[Ss](t);
80600
+ return this[ys](t);
80604
80601
  default:
80605
- return this[gr](t);
80602
+ return this[Lr](t);
80606
80603
  }
80607
80604
  }
80608
80605
  [O](t, e) {
80609
80606
  t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
80610
80607
  }
80611
80608
  [St](t, e, i) {
80612
- 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);
80609
+ Er(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);
80613
80610
  }
80614
80611
  [Re](t) {
80615
80612
  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;
80616
80613
  }
80617
80614
  [be](t) {
80618
- return Tr(this.uid, t.uid, this.processUid);
80615
+ return Dr(this.uid, t.uid, this.processUid);
80619
80616
  }
80620
- [ge](t) {
80621
- return Tr(this.gid, t.gid, this.processGid);
80617
+ [_e](t) {
80618
+ return Dr(this.gid, t.gid, this.processGid);
80622
80619
  }
80623
- [Rs](t, e) {
80624
- 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 });
80620
+ [bs](t, e) {
80621
+ 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 });
80625
80622
  r.on("error", (a) => {
80626
80623
  r.fd && u.close(r.fd, () => {
80627
80624
  }), r.write = () => true, this[O](a, t), e();
@@ -80645,7 +80642,7 @@ var qt = class extends st {
80645
80642
  }
80646
80643
  if (typeof l == "number" && this[Re](t)) {
80647
80644
  n++;
80648
- let c = this[be](t), d = this[ge](t);
80645
+ let c = this[be](t), d = this[_e](t);
80649
80646
  typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (S) => S ? u.chown(a, c, d, (T) => o(T && S)) : o());
80650
80647
  }
80651
80648
  o();
@@ -80655,7 +80652,7 @@ var qt = class extends st {
80655
80652
  this[O](a, t), e();
80656
80653
  }), t.pipe(h)), h.pipe(r);
80657
80654
  }
80658
- [bs](t, e) {
80655
+ [_s](t, e) {
80659
80656
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
80660
80657
  this[St](String(t.absolute), i, (r) => {
80661
80658
  if (r) {
@@ -80665,21 +80662,21 @@ var qt = class extends st {
80665
80662
  let n = 1, o = () => {
80666
80663
  --n === 0 && (e(), this[Xt](), t.resume());
80667
80664
  };
80668
- t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[ge](t)), o)), o();
80665
+ t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
80669
80666
  });
80670
80667
  }
80671
- [gr](t) {
80668
+ [Lr](t) {
80672
80669
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
80673
80670
  }
80674
- [Rr](t, e) {
80671
+ [Tr](t, e) {
80675
80672
  let i = f(R.relative(this.cwd, R.resolve(R.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
80676
- this[ye](t, this.cwd, i, () => this[wi](t, String(t.linkpath), "symlink", e), (r) => {
80673
+ this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
80677
80674
  this[O](r, t), e();
80678
80675
  });
80679
80676
  }
80680
- [br](t, e) {
80677
+ [xr](t, e) {
80681
80678
  let i = f(R.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
80682
- this[ye](t, this.cwd, r, () => this[wi](t, i, "link", e), (n) => {
80679
+ this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e), (n) => {
80683
80680
  this[O](n, t), e();
80684
80681
  });
80685
80682
  }
@@ -80693,24 +80690,24 @@ var qt = class extends st {
80693
80690
  this[ye](t, h, i, r, n);
80694
80691
  });
80695
80692
  }
80696
- [Or]() {
80697
- this[Ei]++;
80693
+ [Ar]() {
80694
+ this[wi]++;
80698
80695
  }
80699
80696
  [Xt]() {
80700
- this[Ei]--, this[ws]();
80697
+ this[wi]--, this[Ss]();
80701
80698
  }
80702
80699
  [gs](t) {
80703
80700
  this[Xt](), t.resume();
80704
80701
  }
80705
- [ys](t, e) {
80702
+ [Rs](t, e) {
80706
80703
  return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
80707
80704
  }
80708
- [Ss](t) {
80709
- this[Or]();
80705
+ [ys](t) {
80706
+ this[Ar]();
80710
80707
  let e = [t.path];
80711
- t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[yr](t, i));
80708
+ t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Or](t, i));
80712
80709
  }
80713
- [yr](t, e) {
80710
+ [Or](t, e) {
80714
80711
  let i = (h) => {
80715
80712
  e(h);
80716
80713
  }, r = () => {
@@ -80719,7 +80716,7 @@ var qt = class extends st {
80719
80716
  this[O](h, t), i();
80720
80717
  return;
80721
80718
  }
80722
- this[_e] = true, n();
80719
+ this[ge] = true, n();
80723
80720
  });
80724
80721
  }, n = () => {
80725
80722
  if (t.absolute !== this.cwd) {
@@ -80739,7 +80736,7 @@ var qt = class extends st {
80739
80736
  this[gs](t), i();
80740
80737
  return;
80741
80738
  }
80742
- if (h || this[ys](t, a)) return this[P](null, t, i);
80739
+ if (h || this[Rs](t, a)) return this[P](null, t, i);
80743
80740
  if (a.isDirectory()) {
80744
80741
  if (t.type === "Directory") {
80745
80742
  let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
@@ -80748,10 +80745,10 @@ var qt = class extends st {
80748
80745
  if (t.absolute !== this.cwd) return u.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
80749
80746
  }
80750
80747
  if (t.absolute === this.cwd) return this[P](null, t, i);
80751
- no(String(t.absolute), (l) => this[P](l ?? null, t, i));
80748
+ oo(String(t.absolute), (l) => this[P](l ?? null, t, i));
80752
80749
  });
80753
80750
  };
80754
- this[_e] ? n() : r();
80751
+ this[ge] ? n() : r();
80755
80752
  }
80756
80753
  [P](t, e, i) {
80757
80754
  if (t) {
@@ -80762,17 +80759,17 @@ var qt = class extends st {
80762
80759
  case "File":
80763
80760
  case "OldFile":
80764
80761
  case "ContiguousFile":
80765
- return this[Rs](e, i);
80762
+ return this[bs](e, i);
80766
80763
  case "Link":
80767
- return this[br](e, i);
80764
+ return this[xr](e, i);
80768
80765
  case "SymbolicLink":
80769
- return this[Rr](e, i);
80766
+ return this[Tr](e, i);
80770
80767
  case "Directory":
80771
80768
  case "GNUDumpDir":
80772
- return this[bs](e, i);
80769
+ return this[_s](e, i);
80773
80770
  }
80774
80771
  }
80775
- [wi](t, e, i, r) {
80772
+ [Si](t, e, i, r) {
80776
80773
  u[i](e, String(t.absolute), (n) => {
80777
80774
  n ? this[O](n, t) : (this[Xt](), t.resume()), r();
80778
80775
  });
@@ -80791,11 +80788,11 @@ var Te = class extends qt {
80791
80788
  return super[P](t, e, () => {
80792
80789
  });
80793
80790
  }
80794
- [Ss](t) {
80795
- if (!this[_e]) {
80791
+ [ys](t) {
80792
+ if (!this[ge]) {
80796
80793
  let n = this[St](this.cwd, this.dmode);
80797
80794
  if (n) return this[O](n, t);
80798
- this[_e] = true;
80795
+ this[ge] = true;
80799
80796
  }
80800
80797
  if (t.absolute !== this.cwd) {
80801
80798
  let n = f(R.dirname(String(t.absolute)));
@@ -80806,7 +80803,7 @@ var Te = class extends qt {
80806
80803
  }
80807
80804
  let [e, i] = Se(() => u.lstatSync(String(t.absolute)));
80808
80805
  if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[gs](t);
80809
- if (e || this[ys](t, i)) return this[P](null, t);
80806
+ if (e || this[Rs](t, i)) return this[P](null, t);
80810
80807
  if (i.isDirectory()) {
80811
80808
  if (t.type === "Directory") {
80812
80809
  let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? Se(() => {
@@ -80817,10 +80814,10 @@ var Te = class extends qt {
80817
80814
  let [n] = Se(() => u.rmdirSync(String(t.absolute)));
80818
80815
  this[P](n, t);
80819
80816
  }
80820
- let [r] = t.absolute === this.cwd ? [] : Se(() => oo(String(t.absolute)));
80817
+ let [r] = t.absolute === this.cwd ? [] : Se(() => ho(String(t.absolute)));
80821
80818
  this[P](r, t);
80822
80819
  }
80823
- [Rs](t, e) {
80820
+ [bs](t, e) {
80824
80821
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
80825
80822
  let a;
80826
80823
  try {
@@ -80831,7 +80828,7 @@ var Te = class extends qt {
80831
80828
  (h || a) && this[O](h || a, t), e();
80832
80829
  }, n;
80833
80830
  try {
80834
- n = u.openSync(String(t.absolute), ls(t.size), i);
80831
+ n = u.openSync(String(t.absolute), cs(t.size), i);
80835
80832
  } catch (h) {
80836
80833
  return r(h);
80837
80834
  }
@@ -80857,7 +80854,7 @@ var Te = class extends qt {
80857
80854
  }
80858
80855
  }
80859
80856
  if (this[Re](t)) {
80860
- let a = this[be](t), l = this[ge](t);
80857
+ let a = this[be](t), l = this[_e](t);
80861
80858
  try {
80862
80859
  u.fchownSync(n, Number(a), Number(l));
80863
80860
  } catch (c) {
@@ -80871,7 +80868,7 @@ var Te = class extends qt {
80871
80868
  r(h);
80872
80869
  });
80873
80870
  }
80874
- [bs](t, e) {
80871
+ [_s](t, e) {
80875
80872
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[St](String(t.absolute), i);
80876
80873
  if (r) {
80877
80874
  this[O](r, t), e();
@@ -80882,20 +80879,20 @@ var Te = class extends qt {
80882
80879
  } catch {
80883
80880
  }
80884
80881
  if (this[Re](t)) try {
80885
- u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[ge](t)));
80882
+ u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
80886
80883
  } catch {
80887
80884
  }
80888
80885
  e(), t.resume();
80889
80886
  }
80890
80887
  [St](t, e) {
80891
80888
  try {
80892
- 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 });
80889
+ return Sr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
80893
80890
  } catch (i) {
80894
80891
  return i;
80895
80892
  }
80896
80893
  }
80897
80894
  [ye](t, e, i, r, n) {
80898
- if (this.preservePaths || !i.length) return r();
80895
+ if (this.preservePaths || i.length === 0) return r();
80899
80896
  let o = e;
80900
80897
  for (let h of i) {
80901
80898
  o = R.resolve(o, h);
@@ -80905,7 +80902,7 @@ var Te = class extends qt {
80905
80902
  }
80906
80903
  r();
80907
80904
  }
80908
- [wi](t, e, i, r) {
80905
+ [Si](t, e, i, r) {
80909
80906
  let n = `${i}Sync`;
80910
80907
  try {
80911
80908
  u[n](e, String(t.absolute)), r(), t.resume();
@@ -80914,26 +80911,26 @@ var Te = class extends qt {
80914
80911
  }
80915
80912
  }
80916
80913
  };
80917
- var ho = (s3) => {
80918
- let t = new Te(s3), e = s3.file, i = Lr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
80919
- new ve(e, { readSize: r, size: i.size }).pipe(t);
80914
+ var ao = (s3) => {
80915
+ let t = new Te(s3), e = s3.file, i = Cr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
80916
+ new Me(e, { readSize: r, size: i.size }).pipe(t);
80920
80917
  };
80921
- var ao = (s3, t) => {
80918
+ var lo = (s3, t) => {
80922
80919
  let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
80923
80920
  return new Promise((o, h) => {
80924
- e.on("error", h), e.on("close", o), Lr.stat(r, (a, l) => {
80921
+ e.on("error", h), e.on("close", o), Cr.stat(r, (a, l) => {
80925
80922
  if (a) h(a);
80926
80923
  else {
80927
- let c = new gt(r, { readSize: i, size: l.size });
80924
+ let c = new _t(r, { readSize: i, size: l.size });
80928
80925
  c.on("error", h), c.pipe(e);
80929
80926
  }
80930
80927
  });
80931
80928
  });
80932
80929
  };
80933
- var lo = K(ho, ao, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
80934
- t?.length && Yi(s3, t);
80930
+ var co = K(ao, lo, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
80931
+ t?.length && Ki(s3, t);
80935
80932
  });
80936
- var co = (s3, t) => {
80933
+ var fo = (s3, t) => {
80937
80934
  let e = new kt(s3), i = true, r, n;
80938
80935
  try {
80939
80936
  try {
@@ -80954,7 +80951,7 @@ var co = (s3, t) => {
80954
80951
  if (n + l + 512 > o.size) break;
80955
80952
  n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
80956
80953
  }
80957
- i = false, fo(s3, e, n, r, t);
80954
+ i = false, uo(s3, e, n, r, t);
80958
80955
  } finally {
80959
80956
  if (i) try {
80960
80957
  v.closeSync(r);
@@ -80962,11 +80959,11 @@ var co = (s3, t) => {
80962
80959
  }
80963
80960
  }
80964
80961
  };
80965
- var fo = (s3, t, e, i, r) => {
80962
+ var uo = (s3, t, e, i, r) => {
80966
80963
  let n = new Wt(s3.file, { fd: i, start: e });
80967
- t.pipe(n), mo(t, r);
80964
+ t.pipe(n), po(t, r);
80968
80965
  };
80969
- var uo = (s3, t) => {
80966
+ var mo = (s3, t) => {
80970
80967
  t = Array.from(t);
80971
80968
  let e = new Et(s3), i = (n, o, h) => {
80972
80969
  let a = (T, N) => {
@@ -80974,7 +80971,7 @@ var uo = (s3, t) => {
80974
80971
  }, l = 0;
80975
80972
  if (o === 0) return a(null, 0);
80976
80973
  let c = 0, d = Buffer.alloc(512), S = (T, N) => {
80977
- if (T || typeof N > "u") return a(T);
80974
+ if (T || N === void 0) return a(T);
80978
80975
  if (c += N, c < 512 && N) return v.read(n, d, c, d.length - c, l + c, S);
80979
80976
  if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
80980
80977
  if (c < 512) return a(null, l);
@@ -80996,38 +80993,35 @@ var uo = (s3, t) => {
80996
80993
  i(c, S.size, (T, N) => {
80997
80994
  if (T) return o(T);
80998
80995
  let E = new tt(s3.file, { fd: c, start: N });
80999
- e.pipe(E), E.on("error", o), E.on("close", n), po(e, t);
80996
+ e.pipe(E), E.on("error", o), E.on("close", n), Eo(e, t);
81000
80997
  });
81001
80998
  });
81002
80999
  };
81003
81000
  v.open(s3.file, h, a);
81004
81001
  });
81005
81002
  };
81006
- var mo = (s3, t) => {
81003
+ var po = (s3, t) => {
81007
81004
  t.forEach((e) => {
81008
- e.charAt(0) === "@" ? It({ file: Nr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
81005
+ e.charAt(0) === "@" ? It({ file: Fr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
81009
81006
  }), s3.end();
81010
81007
  };
81011
- var po = async (s3, t) => {
81012
- for (let e = 0; e < t.length; e++) {
81013
- let i = String(t[e]);
81014
- i.charAt(0) === "@" ? await It({ file: Nr.resolve(String(s3.cwd), i.slice(1)), noResume: true, onReadEntry: (r) => s3.add(r) }) : s3.add(i);
81015
- }
81008
+ var Eo = async (s3, t) => {
81009
+ for (let e of t) e.charAt(0) === "@" ? await It({ file: Fr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
81016
81010
  s3.end();
81017
81011
  };
81018
- var vt = K(co, uo, () => {
81012
+ var vt = K(fo, mo, () => {
81019
81013
  throw new TypeError("file is required");
81020
81014
  }, () => {
81021
81015
  throw new TypeError("file is required");
81022
81016
  }, (s3, t) => {
81023
- if (!ks(s3)) throw new TypeError("file is required");
81017
+ if (!Fs(s3)) throw new TypeError("file is required");
81024
81018
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
81025
81019
  if (!t?.length) throw new TypeError("no paths specified to add/replace");
81026
81020
  });
81027
- var Eo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
81028
- vt.validate?.(s3, t), wo(s3);
81021
+ var wo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
81022
+ vt.validate?.(s3, t), So(s3);
81029
81023
  });
81030
- var wo = (s3) => {
81024
+ var So = (s3) => {
81031
81025
  let t = s3.filter;
81032
81026
  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));
81033
81027
  };
@@ -81210,6 +81204,9 @@ var Client = class _Client {
81210
81204
  locale: "",
81211
81205
  mode: "",
81212
81206
  cookie: "",
81207
+ impersonateuserid: "",
81208
+ impersonateuseremail: "",
81209
+ impersonateuserphone: "",
81213
81210
  platform: "",
81214
81211
  selfSigned: false,
81215
81212
  session: void 0
@@ -81218,8 +81215,8 @@ var Client = class _Client {
81218
81215
  "x-sdk-name": "Console",
81219
81216
  "x-sdk-platform": "console",
81220
81217
  "x-sdk-language": "web",
81221
- "x-sdk-version": "5.0.0",
81222
- "X-Appwrite-Response-Format": "1.8.0"
81218
+ "x-sdk-version": "8.0.0",
81219
+ "X-Appwrite-Response-Format": "1.9.0"
81223
81220
  };
81224
81221
  this.realtime = {
81225
81222
  socket: void 0,
@@ -81542,6 +81539,48 @@ var Client = class _Client {
81542
81539
  this.config.cookie = value;
81543
81540
  return this;
81544
81541
  }
81542
+ /**
81543
+ * Set ImpersonateUserId
81544
+ *
81545
+ * Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
81546
+ *
81547
+ * @param value string
81548
+ *
81549
+ * @return {this}
81550
+ */
81551
+ setImpersonateUserId(value) {
81552
+ this.headers["X-Appwrite-Impersonate-User-Id"] = value;
81553
+ this.config.impersonateuserid = value;
81554
+ return this;
81555
+ }
81556
+ /**
81557
+ * Set ImpersonateUserEmail
81558
+ *
81559
+ * Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
81560
+ *
81561
+ * @param value string
81562
+ *
81563
+ * @return {this}
81564
+ */
81565
+ setImpersonateUserEmail(value) {
81566
+ this.headers["X-Appwrite-Impersonate-User-Email"] = value;
81567
+ this.config.impersonateuseremail = value;
81568
+ return this;
81569
+ }
81570
+ /**
81571
+ * Set ImpersonateUserPhone
81572
+ *
81573
+ * Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
81574
+ *
81575
+ * @param value string
81576
+ *
81577
+ * @return {this}
81578
+ */
81579
+ setImpersonateUserPhone(value) {
81580
+ this.headers["X-Appwrite-Impersonate-User-Phone"] = value;
81581
+ this.config.impersonateuserphone = value;
81582
+ return this;
81583
+ }
81545
81584
  /**
81546
81585
  * Set Platform
81547
81586
  *
@@ -81663,9 +81702,9 @@ var Client = class _Client {
81663
81702
  }
81664
81703
  return { uri: url2.toString(), options };
81665
81704
  }
81666
- chunkedUpload(method, url2, headers = {}, originalPayload = {}, onProgress) {
81667
- var _a3;
81668
- return __awaiter(this, void 0, void 0, function* () {
81705
+ chunkedUpload(method_1, url_1) {
81706
+ return __awaiter(this, arguments, void 0, function* (method, url2, headers = {}, originalPayload = {}, onProgress) {
81707
+ var _a3;
81669
81708
  const [fileParam, file2] = (_a3 = Object.entries(originalPayload).find(([_2, value]) => value instanceof File)) !== null && _a3 !== void 0 ? _a3 : [];
81670
81709
  if (!file2 || !fileParam) {
81671
81710
  throw new Error("File not found in payload");
@@ -81707,9 +81746,9 @@ var Client = class _Client {
81707
81746
  return this.call("GET", new URL(this.config.endpoint + "/ping"));
81708
81747
  });
81709
81748
  }
81710
- call(method, url2, headers = {}, params = {}, responseType = "json") {
81711
- var _a3, _b;
81712
- return __awaiter(this, void 0, void 0, function* () {
81749
+ call(method_1, url_1) {
81750
+ return __awaiter(this, arguments, void 0, function* (method, url2, headers = {}, params = {}, responseType = "json") {
81751
+ var _a3, _b;
81713
81752
  const { uri, options } = this.prepareRequest(method, url2, headers, params);
81714
81753
  let data = null;
81715
81754
  const response = yield fetch(uri, options);
@@ -92617,247 +92656,6 @@ var Projects = class {
92617
92656
  };
92618
92657
  return this.client.call("delete", uri, apiHeaders, payload);
92619
92658
  }
92620
- listWebhooks(paramsOrFirst, ...rest) {
92621
- let params;
92622
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92623
- params = paramsOrFirst || {};
92624
- } else {
92625
- params = {
92626
- projectId: paramsOrFirst,
92627
- total: rest[0]
92628
- };
92629
- }
92630
- const projectId = params.projectId;
92631
- const total = params.total;
92632
- if (typeof projectId === "undefined") {
92633
- throw new AppwriteException('Missing required parameter: "projectId"');
92634
- }
92635
- const apiPath = "/projects/{projectId}/webhooks".replace("{projectId}", projectId);
92636
- const payload = {};
92637
- if (typeof total !== "undefined") {
92638
- payload["total"] = total;
92639
- }
92640
- const uri = new URL(this.client.config.endpoint + apiPath);
92641
- const apiHeaders = {};
92642
- return this.client.call("get", uri, apiHeaders, payload);
92643
- }
92644
- createWebhook(paramsOrFirst, ...rest) {
92645
- let params;
92646
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92647
- params = paramsOrFirst || {};
92648
- } else {
92649
- params = {
92650
- projectId: paramsOrFirst,
92651
- name: rest[0],
92652
- events: rest[1],
92653
- url: rest[2],
92654
- security: rest[3],
92655
- enabled: rest[4],
92656
- httpUser: rest[5],
92657
- httpPass: rest[6]
92658
- };
92659
- }
92660
- const projectId = params.projectId;
92661
- const name = params.name;
92662
- const events = params.events;
92663
- const url2 = params.url;
92664
- const security = params.security;
92665
- const enabled = params.enabled;
92666
- const httpUser = params.httpUser;
92667
- const httpPass = params.httpPass;
92668
- if (typeof projectId === "undefined") {
92669
- throw new AppwriteException('Missing required parameter: "projectId"');
92670
- }
92671
- if (typeof name === "undefined") {
92672
- throw new AppwriteException('Missing required parameter: "name"');
92673
- }
92674
- if (typeof events === "undefined") {
92675
- throw new AppwriteException('Missing required parameter: "events"');
92676
- }
92677
- if (typeof url2 === "undefined") {
92678
- throw new AppwriteException('Missing required parameter: "url"');
92679
- }
92680
- if (typeof security === "undefined") {
92681
- throw new AppwriteException('Missing required parameter: "security"');
92682
- }
92683
- const apiPath = "/projects/{projectId}/webhooks".replace("{projectId}", projectId);
92684
- const payload = {};
92685
- if (typeof name !== "undefined") {
92686
- payload["name"] = name;
92687
- }
92688
- if (typeof enabled !== "undefined") {
92689
- payload["enabled"] = enabled;
92690
- }
92691
- if (typeof events !== "undefined") {
92692
- payload["events"] = events;
92693
- }
92694
- if (typeof url2 !== "undefined") {
92695
- payload["url"] = url2;
92696
- }
92697
- if (typeof security !== "undefined") {
92698
- payload["security"] = security;
92699
- }
92700
- if (typeof httpUser !== "undefined") {
92701
- payload["httpUser"] = httpUser;
92702
- }
92703
- if (typeof httpPass !== "undefined") {
92704
- payload["httpPass"] = httpPass;
92705
- }
92706
- const uri = new URL(this.client.config.endpoint + apiPath);
92707
- const apiHeaders = {
92708
- "content-type": "application/json"
92709
- };
92710
- return this.client.call("post", uri, apiHeaders, payload);
92711
- }
92712
- getWebhook(paramsOrFirst, ...rest) {
92713
- let params;
92714
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92715
- params = paramsOrFirst || {};
92716
- } else {
92717
- params = {
92718
- projectId: paramsOrFirst,
92719
- webhookId: rest[0]
92720
- };
92721
- }
92722
- const projectId = params.projectId;
92723
- const webhookId = params.webhookId;
92724
- if (typeof projectId === "undefined") {
92725
- throw new AppwriteException('Missing required parameter: "projectId"');
92726
- }
92727
- if (typeof webhookId === "undefined") {
92728
- throw new AppwriteException('Missing required parameter: "webhookId"');
92729
- }
92730
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
92731
- const payload = {};
92732
- const uri = new URL(this.client.config.endpoint + apiPath);
92733
- const apiHeaders = {};
92734
- return this.client.call("get", uri, apiHeaders, payload);
92735
- }
92736
- updateWebhook(paramsOrFirst, ...rest) {
92737
- let params;
92738
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92739
- params = paramsOrFirst || {};
92740
- } else {
92741
- params = {
92742
- projectId: paramsOrFirst,
92743
- webhookId: rest[0],
92744
- name: rest[1],
92745
- events: rest[2],
92746
- url: rest[3],
92747
- security: rest[4],
92748
- enabled: rest[5],
92749
- httpUser: rest[6],
92750
- httpPass: rest[7]
92751
- };
92752
- }
92753
- const projectId = params.projectId;
92754
- const webhookId = params.webhookId;
92755
- const name = params.name;
92756
- const events = params.events;
92757
- const url2 = params.url;
92758
- const security = params.security;
92759
- const enabled = params.enabled;
92760
- const httpUser = params.httpUser;
92761
- const httpPass = params.httpPass;
92762
- if (typeof projectId === "undefined") {
92763
- throw new AppwriteException('Missing required parameter: "projectId"');
92764
- }
92765
- if (typeof webhookId === "undefined") {
92766
- throw new AppwriteException('Missing required parameter: "webhookId"');
92767
- }
92768
- if (typeof name === "undefined") {
92769
- throw new AppwriteException('Missing required parameter: "name"');
92770
- }
92771
- if (typeof events === "undefined") {
92772
- throw new AppwriteException('Missing required parameter: "events"');
92773
- }
92774
- if (typeof url2 === "undefined") {
92775
- throw new AppwriteException('Missing required parameter: "url"');
92776
- }
92777
- if (typeof security === "undefined") {
92778
- throw new AppwriteException('Missing required parameter: "security"');
92779
- }
92780
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
92781
- const payload = {};
92782
- if (typeof name !== "undefined") {
92783
- payload["name"] = name;
92784
- }
92785
- if (typeof enabled !== "undefined") {
92786
- payload["enabled"] = enabled;
92787
- }
92788
- if (typeof events !== "undefined") {
92789
- payload["events"] = events;
92790
- }
92791
- if (typeof url2 !== "undefined") {
92792
- payload["url"] = url2;
92793
- }
92794
- if (typeof security !== "undefined") {
92795
- payload["security"] = security;
92796
- }
92797
- if (typeof httpUser !== "undefined") {
92798
- payload["httpUser"] = httpUser;
92799
- }
92800
- if (typeof httpPass !== "undefined") {
92801
- payload["httpPass"] = httpPass;
92802
- }
92803
- const uri = new URL(this.client.config.endpoint + apiPath);
92804
- const apiHeaders = {
92805
- "content-type": "application/json"
92806
- };
92807
- return this.client.call("put", uri, apiHeaders, payload);
92808
- }
92809
- deleteWebhook(paramsOrFirst, ...rest) {
92810
- let params;
92811
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92812
- params = paramsOrFirst || {};
92813
- } else {
92814
- params = {
92815
- projectId: paramsOrFirst,
92816
- webhookId: rest[0]
92817
- };
92818
- }
92819
- const projectId = params.projectId;
92820
- const webhookId = params.webhookId;
92821
- if (typeof projectId === "undefined") {
92822
- throw new AppwriteException('Missing required parameter: "projectId"');
92823
- }
92824
- if (typeof webhookId === "undefined") {
92825
- throw new AppwriteException('Missing required parameter: "webhookId"');
92826
- }
92827
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
92828
- const payload = {};
92829
- const uri = new URL(this.client.config.endpoint + apiPath);
92830
- const apiHeaders = {
92831
- "content-type": "application/json"
92832
- };
92833
- return this.client.call("delete", uri, apiHeaders, payload);
92834
- }
92835
- updateWebhookSignature(paramsOrFirst, ...rest) {
92836
- let params;
92837
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92838
- params = paramsOrFirst || {};
92839
- } else {
92840
- params = {
92841
- projectId: paramsOrFirst,
92842
- webhookId: rest[0]
92843
- };
92844
- }
92845
- const projectId = params.projectId;
92846
- const webhookId = params.webhookId;
92847
- if (typeof projectId === "undefined") {
92848
- throw new AppwriteException('Missing required parameter: "projectId"');
92849
- }
92850
- if (typeof webhookId === "undefined") {
92851
- throw new AppwriteException('Missing required parameter: "webhookId"');
92852
- }
92853
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}/signature".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
92854
- const payload = {};
92855
- const uri = new URL(this.client.config.endpoint + apiPath);
92856
- const apiHeaders = {
92857
- "content-type": "application/json"
92858
- };
92859
- return this.client.call("patch", uri, apiHeaders, payload);
92860
- }
92861
92659
  };
92862
92660
  var Proxy2 = class {
92863
92661
  constructor(client) {
@@ -98422,7 +98220,7 @@ Permission.delete = (role) => {
98422
98220
  };
98423
98221
  var _a2;
98424
98222
  var _ID_hexTimestamp;
98425
- var ID2 = class _ID {
98223
+ var ID2 = class {
98426
98224
  /**
98427
98225
  * Uses the provided ID as the ID for the resource.
98428
98226
  *
@@ -98439,7 +98237,7 @@ var ID2 = class _ID {
98439
98237
  * @returns {string}
98440
98238
  */
98441
98239
  static unique(padding = 7) {
98442
- const baseId = __classPrivateFieldGet(_ID, _a2, "m", _ID_hexTimestamp).call(_ID);
98240
+ const baseId = __classPrivateFieldGet(_a2, _a2, "m", _ID_hexTimestamp).call(_a2);
98443
98241
  let randomPadding = "";
98444
98242
  for (let i = 0; i < padding; i++) {
98445
98243
  const randomHexDigit = Math.floor(Math.random() * 16).toString(16);
@@ -98592,11 +98390,12 @@ Operator.dateSubDays = (days) => new Operator("dateSubDays", [days]).toString();
98592
98390
  Operator.dateSetNow = () => new Operator("dateSetNow", []).toString();
98593
98391
  var Scopes;
98594
98392
  (function(Scopes2) {
98393
+ Scopes2["Account"] = "account";
98394
+ Scopes2["TeamsRead"] = "teams.read";
98395
+ Scopes2["TeamsWrite"] = "teams.write";
98595
98396
  Scopes2["SessionsWrite"] = "sessions.write";
98596
98397
  Scopes2["UsersRead"] = "users.read";
98597
98398
  Scopes2["UsersWrite"] = "users.write";
98598
- Scopes2["TeamsRead"] = "teams.read";
98599
- Scopes2["TeamsWrite"] = "teams.write";
98600
98399
  Scopes2["DatabasesRead"] = "databases.read";
98601
98400
  Scopes2["DatabasesWrite"] = "databases.write";
98602
98401
  Scopes2["CollectionsRead"] = "collections.read";
@@ -98649,6 +98448,10 @@ var Scopes;
98649
98448
  Scopes2["AssistantRead"] = "assistant.read";
98650
98449
  Scopes2["TokensRead"] = "tokens.read";
98651
98450
  Scopes2["TokensWrite"] = "tokens.write";
98451
+ Scopes2["WebhooksRead"] = "webhooks.read";
98452
+ Scopes2["WebhooksWrite"] = "webhooks.write";
98453
+ Scopes2["ProjectRead"] = "project.read";
98454
+ Scopes2["ProjectWrite"] = "project.write";
98652
98455
  Scopes2["PoliciesWrite"] = "policies.write";
98653
98456
  Scopes2["PoliciesRead"] = "policies.read";
98654
98457
  Scopes2["ArchivesRead"] = "archives.read";
@@ -98658,6 +98461,14 @@ var Scopes;
98658
98461
  Scopes2["DomainsRead"] = "domains.read";
98659
98462
  Scopes2["DomainsWrite"] = "domains.write";
98660
98463
  Scopes2["EventsRead"] = "events.read";
98464
+ Scopes2["PlatformsRead"] = "platforms.read";
98465
+ Scopes2["PlatformsWrite"] = "platforms.write";
98466
+ Scopes2["ProjectsRead"] = "projects.read";
98467
+ Scopes2["ProjectsWrite"] = "projects.write";
98468
+ Scopes2["KeysRead"] = "keys.read";
98469
+ Scopes2["KeysWrite"] = "keys.write";
98470
+ Scopes2["DevKeysRead"] = "devKeys.read";
98471
+ Scopes2["DevKeysWrite"] = "devKeys.write";
98661
98472
  })(Scopes || (Scopes = {}));
98662
98473
  var AuthenticatorType;
98663
98474
  (function(AuthenticatorType2) {
@@ -99410,6 +99221,9 @@ var ImageFormat;
99410
99221
  var BackupServices;
99411
99222
  (function(BackupServices2) {
99412
99223
  BackupServices2["Databases"] = "databases";
99224
+ BackupServices2["Tablesdb"] = "tablesdb";
99225
+ BackupServices2["Documentsdb"] = "documentsdb";
99226
+ BackupServices2["Vectorsdb"] = "vectorsdb";
99413
99227
  BackupServices2["Functions"] = "functions";
99414
99228
  BackupServices2["Storage"] = "storage";
99415
99229
  })(BackupServices || (BackupServices = {}));
@@ -99441,13 +99255,13 @@ var RelationMutate;
99441
99255
  RelationMutate2["Restrict"] = "restrict";
99442
99256
  RelationMutate2["SetNull"] = "setNull";
99443
99257
  })(RelationMutate || (RelationMutate = {}));
99444
- var IndexType;
99445
- (function(IndexType2) {
99446
- IndexType2["Key"] = "key";
99447
- IndexType2["Fulltext"] = "fulltext";
99448
- IndexType2["Unique"] = "unique";
99449
- IndexType2["Spatial"] = "spatial";
99450
- })(IndexType || (IndexType = {}));
99258
+ var DatabasesIndexType;
99259
+ (function(DatabasesIndexType2) {
99260
+ DatabasesIndexType2["Key"] = "key";
99261
+ DatabasesIndexType2["Fulltext"] = "fulltext";
99262
+ DatabasesIndexType2["Unique"] = "unique";
99263
+ DatabasesIndexType2["Spatial"] = "spatial";
99264
+ })(DatabasesIndexType || (DatabasesIndexType = {}));
99451
99265
  var OrderBy;
99452
99266
  (function(OrderBy2) {
99453
99267
  OrderBy2["Asc"] = "asc";
@@ -99498,9 +99312,6 @@ var Runtime;
99498
99312
  Runtime2["Pythonml311"] = "python-ml-3.11";
99499
99313
  Runtime2["Pythonml312"] = "python-ml-3.12";
99500
99314
  Runtime2["Pythonml313"] = "python-ml-3.13";
99501
- Runtime2["Deno121"] = "deno-1.21";
99502
- Runtime2["Deno124"] = "deno-1.24";
99503
- Runtime2["Deno135"] = "deno-1.35";
99504
99315
  Runtime2["Deno140"] = "deno-1.40";
99505
99316
  Runtime2["Deno146"] = "deno-1.46";
99506
99317
  Runtime2["Deno20"] = "deno-2.0";
@@ -99590,9 +99401,6 @@ var Runtimes;
99590
99401
  Runtimes2["Pythonml311"] = "python-ml-3.11";
99591
99402
  Runtimes2["Pythonml312"] = "python-ml-3.12";
99592
99403
  Runtimes2["Pythonml313"] = "python-ml-3.13";
99593
- Runtimes2["Deno121"] = "deno-1.21";
99594
- Runtimes2["Deno124"] = "deno-1.24";
99595
- Runtimes2["Deno135"] = "deno-1.35";
99596
99404
  Runtimes2["Deno140"] = "deno-1.40";
99597
99405
  Runtimes2["Deno146"] = "deno-1.46";
99598
99406
  Runtimes2["Deno20"] = "deno-2.0";
@@ -99651,20 +99459,25 @@ var Runtimes;
99651
99459
  })(Runtimes || (Runtimes = {}));
99652
99460
  var UseCases;
99653
99461
  (function(UseCases2) {
99654
- UseCases2["Portfolio"] = "portfolio";
99655
99462
  UseCases2["Starter"] = "starter";
99463
+ UseCases2["Databases"] = "databases";
99464
+ UseCases2["Ai"] = "ai";
99465
+ UseCases2["Messaging"] = "messaging";
99466
+ UseCases2["Utilities"] = "utilities";
99467
+ UseCases2["Devtools"] = "dev-tools";
99468
+ UseCases2["Auth"] = "auth";
99469
+ UseCases2["Portfolio"] = "portfolio";
99656
99470
  UseCases2["Events"] = "events";
99657
99471
  UseCases2["Ecommerce"] = "ecommerce";
99658
99472
  UseCases2["Documentation"] = "documentation";
99659
99473
  UseCases2["Blog"] = "blog";
99660
- UseCases2["Ai"] = "ai";
99661
99474
  UseCases2["Forms"] = "forms";
99662
99475
  UseCases2["Dashboard"] = "dashboard";
99663
99476
  })(UseCases || (UseCases = {}));
99664
99477
  var TemplateReferenceType;
99665
99478
  (function(TemplateReferenceType2) {
99666
- TemplateReferenceType2["Branch"] = "branch";
99667
99479
  TemplateReferenceType2["Commit"] = "commit";
99480
+ TemplateReferenceType2["Branch"] = "branch";
99668
99481
  TemplateReferenceType2["Tag"] = "tag";
99669
99482
  })(TemplateReferenceType || (TemplateReferenceType = {}));
99670
99483
  var VCSReferenceType;
@@ -99728,6 +99541,8 @@ var AppwriteMigrationResource;
99728
99541
  AppwriteMigrationResource2["Document"] = "document";
99729
99542
  AppwriteMigrationResource2["Attribute"] = "attribute";
99730
99543
  AppwriteMigrationResource2["Collection"] = "collection";
99544
+ AppwriteMigrationResource2["Documentsdb"] = "documentsdb";
99545
+ AppwriteMigrationResource2["Vectorsdb"] = "vectorsdb";
99731
99546
  AppwriteMigrationResource2["Bucket"] = "bucket";
99732
99547
  AppwriteMigrationResource2["File"] = "file";
99733
99548
  AppwriteMigrationResource2["Function"] = "function";
@@ -100210,9 +100025,6 @@ var BuildRuntime;
100210
100025
  BuildRuntime2["Pythonml311"] = "python-ml-3.11";
100211
100026
  BuildRuntime2["Pythonml312"] = "python-ml-3.12";
100212
100027
  BuildRuntime2["Pythonml313"] = "python-ml-3.13";
100213
- BuildRuntime2["Deno121"] = "deno-1.21";
100214
- BuildRuntime2["Deno124"] = "deno-1.24";
100215
- BuildRuntime2["Deno135"] = "deno-1.35";
100216
100028
  BuildRuntime2["Deno140"] = "deno-1.40";
100217
100029
  BuildRuntime2["Deno146"] = "deno-1.46";
100218
100030
  BuildRuntime2["Deno20"] = "deno-2.0";
@@ -100310,6 +100122,13 @@ var ImageGravity;
100310
100122
  ImageGravity2["Bottom"] = "bottom";
100311
100123
  ImageGravity2["Bottomright"] = "bottom-right";
100312
100124
  })(ImageGravity || (ImageGravity = {}));
100125
+ var TablesDBIndexType;
100126
+ (function(TablesDBIndexType2) {
100127
+ TablesDBIndexType2["Key"] = "key";
100128
+ TablesDBIndexType2["Fulltext"] = "fulltext";
100129
+ TablesDBIndexType2["Unique"] = "unique";
100130
+ TablesDBIndexType2["Spatial"] = "spatial";
100131
+ })(TablesDBIndexType || (TablesDBIndexType = {}));
100313
100132
  var PasswordHash;
100314
100133
  (function(PasswordHash2) {
100315
100134
  PasswordHash2["Sha1"] = "sha1";
@@ -100339,6 +100158,8 @@ var DatabaseType;
100339
100158
  (function(DatabaseType2) {
100340
100159
  DatabaseType2["Legacy"] = "legacy";
100341
100160
  DatabaseType2["Tablesdb"] = "tablesdb";
100161
+ DatabaseType2["Documentsdb"] = "documentsdb";
100162
+ DatabaseType2["Vectorsdb"] = "vectorsdb";
100342
100163
  })(DatabaseType || (DatabaseType = {}));
100343
100164
  var AttributeStatus;
100344
100165
  (function(AttributeStatus2) {
@@ -100424,28 +100245,24 @@ var BillingPlanGroup;
100424
100245
  BillingPlanGroup2["Pro"] = "pro";
100425
100246
  BillingPlanGroup2["Scale"] = "scale";
100426
100247
  })(BillingPlanGroup || (BillingPlanGroup = {}));
100427
- var DomainPurchasePaymentStatus;
100428
- (function(DomainPurchasePaymentStatus2) {
100429
- DomainPurchasePaymentStatus2["Pending"] = "pending";
100430
- DomainPurchasePaymentStatus2["PendingConfirmation"] = "pending_confirmation";
100431
- DomainPurchasePaymentStatus2["PendingPaymentProcessing"] = "pending_payment_processing";
100432
- DomainPurchasePaymentStatus2["Authorized"] = "authorized";
100433
- DomainPurchasePaymentStatus2["Captured"] = "captured";
100434
- DomainPurchasePaymentStatus2["Failed"] = "failed";
100435
- DomainPurchasePaymentStatus2["CaptureFailed"] = "capture_failed";
100436
- DomainPurchasePaymentStatus2["RenewalCaptureFailed"] = "renewal_capture_failed";
100437
- })(DomainPurchasePaymentStatus || (DomainPurchasePaymentStatus = {}));
100438
- var DomainTransferStatusStatus;
100439
- (function(DomainTransferStatusStatus2) {
100440
- DomainTransferStatusStatus2["Transferrable"] = "transferrable";
100441
- DomainTransferStatusStatus2["NotTransferrable"] = "not_transferrable";
100442
- DomainTransferStatusStatus2["PendingOwner"] = "pending_owner";
100443
- DomainTransferStatusStatus2["PendingAdmin"] = "pending_admin";
100444
- DomainTransferStatusStatus2["PendingRegistry"] = "pending_registry";
100445
- DomainTransferStatusStatus2["Completed"] = "completed";
100446
- DomainTransferStatusStatus2["Cancelled"] = "cancelled";
100447
- DomainTransferStatusStatus2["ServiceUnavailable"] = "service_unavailable";
100448
- })(DomainTransferStatusStatus || (DomainTransferStatusStatus = {}));
100248
+ var DomainTransferStatusEnum;
100249
+ (function(DomainTransferStatusEnum2) {
100250
+ DomainTransferStatusEnum2["Transferrable"] = "transferrable";
100251
+ DomainTransferStatusEnum2["NotTransferrable"] = "not_transferrable";
100252
+ DomainTransferStatusEnum2["PendingOwner"] = "pending_owner";
100253
+ DomainTransferStatusEnum2["PendingAdmin"] = "pending_admin";
100254
+ DomainTransferStatusEnum2["PendingRegistry"] = "pending_registry";
100255
+ DomainTransferStatusEnum2["Completed"] = "completed";
100256
+ DomainTransferStatusEnum2["Cancelled"] = "cancelled";
100257
+ DomainTransferStatusEnum2["ServiceUnavailable"] = "service_unavailable";
100258
+ })(DomainTransferStatusEnum || (DomainTransferStatusEnum = {}));
100259
+ var DomainPurchaseStatus;
100260
+ (function(DomainPurchaseStatus2) {
100261
+ DomainPurchaseStatus2["Pending"] = "pending";
100262
+ DomainPurchaseStatus2["Succeeded"] = "succeeded";
100263
+ DomainPurchaseStatus2["Failed"] = "failed";
100264
+ DomainPurchaseStatus2["Cancelled"] = "cancelled";
100265
+ })(DomainPurchaseStatus || (DomainPurchaseStatus = {}));
100449
100266
 
100450
100267
  // lib/parser.ts
100451
100268
  var import_chalk2 = __toESM(require_source(), 1);
@@ -100457,7 +100274,7 @@ var package_default = {
100457
100274
  type: "module",
100458
100275
  homepage: "https://appwrite.io/support",
100459
100276
  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",
100460
- version: "15.1.0",
100277
+ version: "17.0.0",
100461
100278
  license: "BSD-3-Clause",
100462
100279
  main: "dist/index.cjs",
100463
100280
  module: "dist/index.js",
@@ -100501,7 +100318,7 @@ var package_default = {
100501
100318
  "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"
100502
100319
  },
100503
100320
  dependencies: {
100504
- "@appwrite.io/console": "^5.0.0",
100321
+ "@appwrite.io/console": "*",
100505
100322
  chalk: "4.1.2",
100506
100323
  chokidar: "^3.6.0",
100507
100324
  "cli-progress": "^3.12.0",
@@ -100752,14 +100569,18 @@ var commandDescriptions = {
100752
100569
  messaging: `The messaging command allows you to manage topics and targets and send messages.`,
100753
100570
  migrations: `The migrations command allows you to migrate data between services.`,
100754
100571
  vcs: `The vcs command allows you to interact with VCS providers and manage your code repositories.`,
100572
+ webhooks: `The webhooks command allows you to manage your project webhooks.`,
100755
100573
  main: import_chalk2.default.redBright(`${logo}${description}`)
100756
100574
  };
100757
100575
 
100758
100576
  // lib/commands/utils/deployment.ts
100759
100577
  var POLL_DEBOUNCE = 2e3;
100760
100578
  async function packageDirectory(dirPath) {
100761
- const tempFile = path.join(os4.tmpdir(), `appwrite-deploy-${Date.now()}.tar.gz`);
100762
- await zn(
100579
+ const tempFile = path.join(
100580
+ os4.tmpdir(),
100581
+ `appwrite-deploy-${Date.now()}.tar.gz`
100582
+ );
100583
+ await Zn(
100763
100584
  {
100764
100585
  gzip: true,
100765
100586
  file: tempFile,
@@ -100828,7 +100649,7 @@ async function downloadDeploymentCode(params) {
100828
100649
  `Failed to write deployment archive to "${compressedFileName}": ${message}`
100829
100650
  );
100830
100651
  }
100831
- lo({
100652
+ co({
100832
100653
  sync: true,
100833
100654
  cwd: resourcePath,
100834
100655
  file: compressedFileName,
@@ -101035,12 +100856,16 @@ var questionsInitProject = [
101035
100856
  choices: async () => {
101036
100857
  const client = await sdkForConsole(true);
101037
100858
  const { teams } = isCloud() ? await paginate(
101038
- async (opts = {}) => (await getOrganizationsService(opts.sdk)).list(),
100859
+ async (args) => (await getOrganizationsService(args.sdk)).list({
100860
+ queries: args.queries
100861
+ }),
101039
100862
  { sdk: client },
101040
100863
  100,
101041
100864
  "teams"
101042
100865
  ) : await paginate(
101043
- async (opts = {}) => (await getTeamsService(opts.sdk)).list(),
100866
+ async (args) => (await getTeamsService(args.sdk)).list({
100867
+ queries: args.queries
100868
+ }),
101044
100869
  { parseOutput: false, sdk: client },
101045
100870
  100,
101046
100871
  "teams"
@@ -101088,7 +100913,7 @@ var questionsInitProject = [
101088
100913
  JSON.stringify({ method: "orderDesc", attribute: "$id" })
101089
100914
  ];
101090
100915
  const { projects } = await paginate(
101091
- async () => (await getProjectsService()).list(queries),
100916
+ async (args) => (await getProjectsService()).list(args.queries),
101092
100917
  { parseOutput: false },
101093
100918
  100,
101094
100919
  "projects",
@@ -101168,7 +100993,7 @@ var questionsPullFunctions = [
101168
100993
  validate: (value) => validateRequired("function", value),
101169
100994
  choices: async () => {
101170
100995
  const { functions } = await paginate(
101171
- async () => (await getFunctionsService()).list(),
100996
+ async (args) => (await getFunctionsService()).list(args.queries),
101172
100997
  { parseOutput: false },
101173
100998
  100,
101174
100999
  "functions"
@@ -101207,7 +101032,7 @@ var questionsPullSites = [
101207
101032
  validate: (value) => validateRequired("site", value),
101208
101033
  choices: async () => {
101209
101034
  const { sites } = await paginate(
101210
- async () => (await getSitesService()).list(),
101035
+ async (args) => (await getSitesService()).list(args.queries),
101211
101036
  { parseOutput: false },
101212
101037
  100,
101213
101038
  "sites"
@@ -103155,18 +102980,9 @@ var Push = class {
103155
102980
  const functionsServiceForVars = await getFunctionsService(
103156
102981
  this.projectClient
103157
102982
  );
103158
- const { variables } = await paginate(
103159
- async (args) => {
103160
- return await functionsServiceForVars.listVariables({
103161
- functionId: args.functionId
103162
- });
103163
- },
103164
- {
103165
- functionId: func["$id"]
103166
- },
103167
- 100,
103168
- "variables"
103169
- );
102983
+ const { variables } = await functionsServiceForVars.listVariables({
102984
+ functionId: func["$id"]
102985
+ });
103170
102986
  await Promise.all(
103171
102987
  variables.map(async (variable) => {
103172
102988
  const functionsServiceDel = await getFunctionsService(
@@ -103460,18 +103276,9 @@ var Push = class {
103460
103276
  if (withVariables) {
103461
103277
  updaterRow.update({ status: "Creating variables" }).replaceSpinner(SPINNER_DOTS);
103462
103278
  const sitesServiceForVars = await getSitesService(this.projectClient);
103463
- const { variables } = await paginate(
103464
- async (args) => {
103465
- return await sitesServiceForVars.listVariables({
103466
- siteId: args.siteId
103467
- });
103468
- },
103469
- {
103470
- siteId: site["$id"]
103471
- },
103472
- 100,
103473
- "variables"
103474
- );
103279
+ const { variables } = await sitesServiceForVars.listVariables({
103280
+ siteId: site["$id"]
103281
+ });
103475
103282
  await Promise.all(
103476
103283
  variables.map(async (variable) => {
103477
103284
  const sitesServiceDel = await getSitesService(this.projectClient);
@@ -104836,7 +104643,7 @@ var Pull = class {
104836
104643
  return [];
104837
104644
  }
104838
104645
  const { functions: allFunctions } = await paginate(
104839
- async () => new Functions(this.projectClient).list(),
104646
+ async (args) => new Functions(this.projectClient).list(args.queries),
104840
104647
  {},
104841
104648
  100,
104842
104649
  "functions"
@@ -104920,7 +104727,7 @@ var Pull = class {
104920
104727
  return [];
104921
104728
  }
104922
104729
  const { sites: fetchedSites } = await paginate(
104923
- async () => new Sites(this.projectClient).list(),
104730
+ async (args) => new Sites(this.projectClient).list(args.queries),
104924
104731
  {},
104925
104732
  100,
104926
104733
  "sites"
@@ -104998,7 +104805,7 @@ var Pull = class {
104998
104805
  return { databases: [], collections: [] };
104999
104806
  }
105000
104807
  const { databases } = await paginate(
105001
- async () => new Databases(this.projectClient).list(),
104808
+ async (args) => new Databases(this.projectClient).list(args.queries),
105002
104809
  {},
105003
104810
  100,
105004
104811
  "databases"
@@ -105011,7 +104818,10 @@ var Pull = class {
105011
104818
  );
105012
104819
  allDatabases.push(database);
105013
104820
  const { collections } = await paginate(
105014
- async () => new Databases(this.projectClient).listCollections(database.$id),
104821
+ async (args) => new Databases(this.projectClient).listCollections(
104822
+ database.$id,
104823
+ args.queries
104824
+ ),
105015
104825
  {},
105016
104826
  100,
105017
104827
  "collections"
@@ -105049,7 +104859,9 @@ var Pull = class {
105049
104859
  return { databases: [], tables: [] };
105050
104860
  }
105051
104861
  const { databases } = await paginate(
105052
- async () => new TablesDB(this.projectClient).list(),
104862
+ async (args) => new TablesDB(this.projectClient).list({
104863
+ queries: args.queries
104864
+ }),
105053
104865
  {},
105054
104866
  100,
105055
104867
  "databases"
@@ -105062,7 +104874,10 @@ var Pull = class {
105062
104874
  );
105063
104875
  allDatabases.push(filterBySchema(database, DatabaseSchema));
105064
104876
  const { tables } = await paginate(
105065
- async () => new TablesDB(this.projectClient).listTables(database.$id),
104877
+ async (args) => new TablesDB(this.projectClient).listTables({
104878
+ databaseId: database.$id,
104879
+ queries: args.queries
104880
+ }),
105066
104881
  {},
105067
104882
  100,
105068
104883
  "tables"
@@ -105104,7 +104919,7 @@ var Pull = class {
105104
104919
  return [];
105105
104920
  }
105106
104921
  const { buckets } = await paginate(
105107
- async () => new Storage(this.projectClient).listBuckets(),
104922
+ async (args) => new Storage(this.projectClient).listBuckets(args.queries),
105108
104923
  {},
105109
104924
  100,
105110
104925
  "buckets"
@@ -105134,7 +104949,7 @@ var Pull = class {
105134
104949
  return [];
105135
104950
  }
105136
104951
  const { teams } = await paginate(
105137
- async () => new Teams(this.projectClient).list(),
104952
+ async (args) => new Teams(this.projectClient).list(args.queries),
105138
104953
  {},
105139
104954
  100,
105140
104955
  "teams"
@@ -105160,7 +104975,7 @@ var Pull = class {
105160
104975
  return [];
105161
104976
  }
105162
104977
  const { topics } = await paginate(
105163
- async () => new Messaging(this.projectClient).listTopics(),
104978
+ async (args) => new Messaging(this.projectClient).listTopics(args.queries),
105164
104979
  {},
105165
104980
  100,
105166
104981
  "topics"
@@ -105232,7 +105047,7 @@ var pullFunctions = async ({
105232
105047
  return;
105233
105048
  }
105234
105049
  const functionsToCheck = cliConfig.all ? (await paginate(
105235
- async () => (await getFunctionsService()).list(),
105050
+ async (args) => (await getFunctionsService()).list(args.queries),
105236
105051
  {},
105237
105052
  100,
105238
105053
  "functions"
@@ -105270,7 +105085,7 @@ var pullSites = async ({
105270
105085
  return;
105271
105086
  }
105272
105087
  const sitesToCheck = cliConfig.all ? (await paginate(
105273
- async () => (await getSitesService()).list(),
105088
+ async (args) => (await getSitesService()).list(args.queries),
105274
105089
  {},
105275
105090
  100,
105276
105091
  "sites"
@@ -106029,13 +105844,33 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
106029
105844
  requiresApiKey: supportsServerSide
106030
105845
  });
106031
105846
  }
105847
+ /**
105848
+ * Deduplicate entities by composite key ($id + databaseId).
105849
+ * Keeps the last occurrence to match addTable/addCollection semantics.
105850
+ */
105851
+ dedupeEntities(entities) {
105852
+ const seen = /* @__PURE__ */ new Map();
105853
+ for (const entity of entities) {
105854
+ seen.set(`${entity.databaseId}:${entity.$id}`, entity);
105855
+ }
105856
+ return Array.from(seen.values());
105857
+ }
106032
105858
  async generate(config2, options) {
106033
105859
  if (!config2.projectId) {
106034
105860
  throw new Error("Project ID is required in configuration");
106035
105861
  }
106036
105862
  const appwriteDep = options?.appwriteImportSource ?? getAppwriteDependency();
106037
105863
  const importExt = options?.importExtension ?? detectImportExtension();
106038
- const hasEntities = config2.tables && config2.tables.length > 0 || config2.collections && config2.collections.length > 0;
105864
+ const dedupedConfig = { ...config2 };
105865
+ if (dedupedConfig.tables && dedupedConfig.tables.length > 0) {
105866
+ dedupedConfig.tables = this.dedupeEntities(dedupedConfig.tables);
105867
+ }
105868
+ if (dedupedConfig.collections && dedupedConfig.collections.length > 0) {
105869
+ dedupedConfig.collections = this.dedupeEntities(
105870
+ dedupedConfig.collections
105871
+ );
105872
+ }
105873
+ const hasEntities = dedupedConfig.tables && dedupedConfig.tables.length > 0 || dedupedConfig.collections && dedupedConfig.collections.length > 0;
106039
105874
  if (!hasEntities) {
106040
105875
  console.log(
106041
105876
  "No tables or collections found in configuration. Skipping database generation."
@@ -106044,14 +105879,21 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
106044
105879
  dbContent: "// No tables or collections found in configuration\n",
106045
105880
  typesContent: "// No tables or collections found in configuration\n",
106046
105881
  indexContent: this.generateIndexFile(importExt),
106047
- constantsContent: this.generateConstantsFile(config2, appwriteDep)
105882
+ constantsContent: this.generateConstantsFile(
105883
+ dedupedConfig,
105884
+ appwriteDep
105885
+ )
106048
105886
  };
106049
105887
  }
106050
105888
  return {
106051
- dbContent: this.generateDatabasesFile(config2, importExt, appwriteDep),
106052
- typesContent: this.generateTypesFile(config2, appwriteDep),
105889
+ dbContent: this.generateDatabasesFile(
105890
+ dedupedConfig,
105891
+ importExt,
105892
+ appwriteDep
105893
+ ),
105894
+ typesContent: this.generateTypesFile(dedupedConfig, appwriteDep),
106053
105895
  indexContent: this.generateIndexFile(importExt),
106054
- constantsContent: this.generateConstantsFile(config2, appwriteDep)
105896
+ constantsContent: this.generateConstantsFile(dedupedConfig, appwriteDep)
106055
105897
  };
106056
105898
  }
106057
105899
  };