appwrite-cli 15.0.0 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +3 -3
  3. package/cli.ts +2 -0
  4. package/dist/bundle-win-arm64.mjs +1387 -1087
  5. package/dist/cli.cjs +1331 -1031
  6. package/dist/index.cjs +987 -943
  7. package/dist/index.js +1043 -999
  8. package/dist/lib/commands/generators/typescript/databases.d.ts +5 -0
  9. package/dist/lib/commands/generators/typescript/databases.d.ts.map +1 -1
  10. package/dist/lib/commands/pull.d.ts.map +1 -1
  11. package/dist/lib/commands/services/functions.d.ts.map +1 -1
  12. package/dist/lib/commands/services/sites.d.ts.map +1 -1
  13. package/dist/lib/commands/services/storage.d.ts.map +1 -1
  14. package/dist/lib/commands/services/webhooks.d.ts +3 -0
  15. package/dist/lib/commands/services/webhooks.d.ts.map +1 -0
  16. package/dist/lib/commands/utils/deployment.d.ts +5 -0
  17. package/dist/lib/commands/utils/deployment.d.ts.map +1 -1
  18. package/dist/lib/constants.d.ts +1 -1
  19. package/dist/lib/parser.d.ts.map +1 -1
  20. package/docs/examples/webhooks/create.md +7 -0
  21. package/docs/examples/webhooks/delete.md +4 -0
  22. package/docs/examples/webhooks/get.md +4 -0
  23. package/docs/examples/webhooks/list.md +3 -0
  24. package/docs/examples/webhooks/update-signature.md +4 -0
  25. package/docs/examples/webhooks/update.md +7 -0
  26. package/install.ps1 +2 -2
  27. package/install.sh +1 -1
  28. package/lib/commands/generators/typescript/databases.ts +36 -6
  29. package/lib/commands/pull.ts +30 -12
  30. package/lib/commands/services/functions.ts +2 -1
  31. package/lib/commands/services/projects.ts +0 -100
  32. package/lib/commands/services/sites.ts +2 -1
  33. package/lib/commands/services/storage.ts +2 -1
  34. package/lib/commands/services/webhooks.ts +134 -0
  35. package/lib/commands/utils/deployment.ts +31 -7
  36. package/lib/constants.ts +1 -1
  37. package/lib/parser.ts +1 -0
  38. package/package.json +2 -2
  39. package/scoop/appwrite.config.json +3 -3
  40. package/docs/examples/projects/create-webhook.md +0 -8
  41. package/docs/examples/projects/delete-webhook.md +0 -5
  42. package/docs/examples/projects/get-webhook.md +0 -5
  43. package/docs/examples/projects/list-webhooks.md +0 -4
  44. package/docs/examples/projects/update-webhook-signature.md +0 -5
  45. package/docs/examples/projects/update-webhook.md +0 -9
package/dist/index.js CHANGED
@@ -107,7 +107,7 @@ var require_main = __commonJS({
107
107
  "node_modules/dotenv/lib/main.js"(exports, module) {
108
108
  var fs9 = __require("fs");
109
109
  var path7 = __require("path");
110
- var os5 = __require("os");
110
+ var os6 = __require("os");
111
111
  var crypto2 = __require("crypto");
112
112
  var packageJson = require_package();
113
113
  var version2 = packageJson.version;
@@ -230,7 +230,7 @@ var require_main = __commonJS({
230
230
  return null;
231
231
  }
232
232
  function _resolveHome(envPath) {
233
- return envPath[0] === "~" ? path7.join(os5.homedir(), envPath.slice(1)) : envPath;
233
+ return envPath[0] === "~" ? path7.join(os6.homedir(), envPath.slice(1)) : envPath;
234
234
  }
235
235
  function _configVault(options) {
236
236
  const debug = Boolean(options && options.debug);
@@ -1510,7 +1510,7 @@ var require_has_flag = __commonJS({
1510
1510
  var require_supports_color = __commonJS({
1511
1511
  "node_modules/supports-color/index.js"(exports, module) {
1512
1512
  "use strict";
1513
- var os5 = __require("os");
1513
+ var os6 = __require("os");
1514
1514
  var tty = __require("tty");
1515
1515
  var hasFlag = require_has_flag();
1516
1516
  var { env } = process;
@@ -1558,7 +1558,7 @@ var require_supports_color = __commonJS({
1558
1558
  return min;
1559
1559
  }
1560
1560
  if (process.platform === "win32") {
1561
- const osRelease = os5.release().split(".");
1561
+ const osRelease = os6.release().split(".");
1562
1562
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
1563
1563
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
1564
1564
  }
@@ -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;
@@ -55550,7 +55550,7 @@ var require_has_flag2 = __commonJS({
55550
55550
  var require_supports_colors = __commonJS({
55551
55551
  "node_modules/@colors/colors/lib/system/supports-colors.js"(exports, module) {
55552
55552
  "use strict";
55553
- var os5 = __require("os");
55553
+ var os6 = __require("os");
55554
55554
  var hasFlag = require_has_flag2();
55555
55555
  var env = process.env;
55556
55556
  var forceColor = void 0;
@@ -55588,7 +55588,7 @@ var require_supports_colors = __commonJS({
55588
55588
  }
55589
55589
  var min = forceColor ? 1 : 0;
55590
55590
  if (process.platform === "win32") {
55591
- var osRelease = os5.release().split(".");
55591
+ var osRelease = os6.release().split(".");
55592
55592
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
55593
55593
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
55594
55594
  }
@@ -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.0.0";
62730
+ var SDK_VERSION = "16.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";
@@ -78124,88 +78124,89 @@ async function paginate(action, args = {}, limit = 100, wrapper = "", queries =
78124
78124
 
78125
78125
  // lib/commands/utils/deployment.ts
78126
78126
  import fs3 from "fs";
78127
+ import os4 from "os";
78127
78128
  import path from "path";
78128
78129
 
78129
78130
  // node_modules/tar/dist/esm/index.min.js
78130
- import Hr from "events";
78131
+ import Ur from "events";
78131
78132
  import I from "fs";
78132
- import { EventEmitter as Oi } from "node:events";
78133
- import Ds from "node:stream";
78134
- import { StringDecoder as Ir } from "node:string_decoder";
78135
- import or from "node:path";
78133
+ import { EventEmitter as Ti } from "node:events";
78134
+ import Ns from "node:stream";
78135
+ import { StringDecoder as Dr } from "node:string_decoder";
78136
+ import nr from "node:path";
78136
78137
  import Vt from "node:fs";
78137
- import { dirname as bn, parse as gn } from "path";
78138
- import { EventEmitter as wn } from "events";
78139
- import vi from "assert";
78140
- import { Buffer as _t } from "buffer";
78141
- import * as vs from "zlib";
78142
- import Yr from "zlib";
78138
+ import { dirname as Rn, parse as bn } from "path";
78139
+ import { EventEmitter as En } from "events";
78140
+ import Mi from "assert";
78141
+ import { Buffer as gt } from "buffer";
78142
+ import * as ks from "zlib";
78143
+ import Zr from "zlib";
78143
78144
  import { posix as Zt } from "node:path";
78144
- import { basename as dn } from "node:path";
78145
- import ci from "fs";
78145
+ import { basename as fn } from "node:path";
78146
+ import fi from "fs";
78146
78147
  import $ from "fs";
78147
- import Xs from "path";
78148
- import { win32 as xn } from "node:path";
78149
- import rr from "path";
78150
- import Lr from "node:fs";
78151
- import io from "node:assert";
78152
- import { randomBytes as xr } from "node:crypto";
78148
+ import $s from "path";
78149
+ import { win32 as Tn } from "node:path";
78150
+ import sr from "path";
78151
+ import xr from "node:fs";
78152
+ import eo from "node:assert";
78153
+ import { randomBytes as Tr } from "node:crypto";
78153
78154
  import u from "node:fs";
78154
78155
  import R from "node:path";
78155
- import lr from "fs";
78156
- import ui from "node:fs";
78156
+ import ar from "fs";
78157
+ import mi from "node:fs";
78157
78158
  import Ee from "node:path";
78158
78159
  import k from "node:fs";
78159
- import qn from "node:fs/promises";
78160
- import mi from "node:path";
78161
- import { join as Er } from "node:path";
78160
+ import Xn from "node:fs/promises";
78161
+ import pi from "node:path";
78162
+ import { join as pr } from "node:path";
78162
78163
  import v from "node:fs";
78163
- import Nr from "node:path";
78164
- var Dr = Object.defineProperty;
78164
+ import Lr from "node:path";
78165
+ var Nr = Object.defineProperty;
78165
78166
  var Ar = (s3, t) => {
78166
- for (var e in t) Dr(s3, e, { get: t[e], enumerable: true });
78167
+ for (var e in t) Nr(s3, e, { get: t[e], enumerable: true });
78167
78168
  };
78168
- var Ts = typeof process == "object" && process ? process : { stdout: null, stderr: null };
78169
- var Cr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof Ds || Fr(s3) || kr(s3));
78170
- var Fr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Oi && typeof s3.pipe == "function" && s3.pipe !== Ds.Writable.prototype.pipe;
78171
- 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 Ir = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof Ns || Cr(s3) || Fr(s3));
78171
+ var Cr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.pipe == "function" && s3.pipe !== Ns.Writable.prototype.pipe;
78172
+ var Fr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.write == "function" && typeof s3.end == "function";
78172
78173
  var q = /* @__PURE__ */ Symbol("EOF");
78173
78174
  var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
78174
78175
  var rt = /* @__PURE__ */ Symbol("emittedEnd");
78175
- var xe = /* @__PURE__ */ Symbol("emittingEnd");
78176
+ var Le = /* @__PURE__ */ Symbol("emittingEnd");
78176
78177
  var jt = /* @__PURE__ */ Symbol("emittedError");
78177
- var Le = /* @__PURE__ */ Symbol("closed");
78178
- var xs = /* @__PURE__ */ Symbol("read");
78179
- var Ne = /* @__PURE__ */ Symbol("flush");
78180
- 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");
78181
78182
  var z3 = /* @__PURE__ */ Symbol("encoding");
78182
78183
  var Mt = /* @__PURE__ */ Symbol("decoder");
78183
78184
  var b = /* @__PURE__ */ Symbol("flowing");
78184
78185
  var Qt = /* @__PURE__ */ Symbol("paused");
78185
78186
  var Bt = /* @__PURE__ */ Symbol("resume");
78186
- var g = /* @__PURE__ */ Symbol("buffer");
78187
- var D = /* @__PURE__ */ Symbol("pipes");
78188
- var _ = /* @__PURE__ */ Symbol("bufferLength");
78189
- 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");
78190
78191
  var De = /* @__PURE__ */ Symbol("bufferShift");
78191
78192
  var L = /* @__PURE__ */ Symbol("objectMode");
78192
78193
  var w = /* @__PURE__ */ Symbol("destroyed");
78193
- var yi = /* @__PURE__ */ Symbol("error");
78194
- var Ri = /* @__PURE__ */ Symbol("emitData");
78195
- var Ns = /* @__PURE__ */ Symbol("emitEnd");
78196
- 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");
78197
78198
  var Z = /* @__PURE__ */ Symbol("async");
78198
78199
  var gi = /* @__PURE__ */ Symbol("abort");
78199
- var Ae = /* @__PURE__ */ Symbol("aborted");
78200
+ var Ie = /* @__PURE__ */ Symbol("aborted");
78200
78201
  var Jt = /* @__PURE__ */ Symbol("signal");
78201
78202
  var yt = /* @__PURE__ */ Symbol("dataListeners");
78202
78203
  var C = /* @__PURE__ */ Symbol("discarded");
78203
78204
  var te = (s3) => Promise.resolve().then(s3);
78204
- var vr = (s3) => s3();
78205
- var Mr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
78206
- var Br = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
78207
- var Pr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
78208
- var Ie = class {
78205
+ var kr = (s3) => s3();
78206
+ var vr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
78207
+ var Mr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
78208
+ var Br = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
78209
+ var Ce = class {
78209
78210
  src;
78210
78211
  dest;
78211
78212
  opts;
@@ -78222,7 +78223,7 @@ var Ie = class {
78222
78223
  this.unpipe(), this.opts.end && this.dest.end();
78223
78224
  }
78224
78225
  };
78225
- var _i = class extends Ie {
78226
+ var Oi = class extends Ce {
78226
78227
  unpipe() {
78227
78228
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
78228
78229
  }
@@ -78230,26 +78231,26 @@ var _i = class extends Ie {
78230
78231
  super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
78231
78232
  }
78232
78233
  };
78233
- var zr = (s3) => !!s3.objectMode;
78234
- var Ur = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
78235
- var A = class extends Oi {
78234
+ var Pr = (s3) => !!s3.objectMode;
78235
+ var zr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
78236
+ var D = class extends Ti {
78236
78237
  [b] = false;
78237
78238
  [Qt] = false;
78238
- [D] = [];
78239
- [g] = [];
78239
+ [A] = [];
78240
+ [_] = [];
78240
78241
  [L];
78241
78242
  [z3];
78242
78243
  [Z];
78243
78244
  [Mt];
78244
78245
  [q] = false;
78245
78246
  [rt] = false;
78246
- [xe] = false;
78247
78247
  [Le] = false;
78248
+ [Ne] = false;
78248
78249
  [jt] = null;
78249
- [_] = 0;
78250
+ [g] = 0;
78250
78251
  [w] = false;
78251
78252
  [Jt];
78252
- [Ae] = false;
78253
+ [Ie] = false;
78253
78254
  [yt] = 0;
78254
78255
  [C] = false;
78255
78256
  writable = true;
@@ -78257,12 +78258,12 @@ var A = class extends Oi {
78257
78258
  constructor(...t) {
78258
78259
  let e = t[0] || {};
78259
78260
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
78260
- 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
+ Pr(e) ? (this[L] = true, this[z3] = null) : zr(e) ? (this[z3] = e.encoding, this[L] = false) : (this[L] = false, this[z3] = null), this[Z] = !!e.async, this[Mt] = this[z3] ? new Dr(this[z3]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
78261
78262
  let { signal: i } = e;
78262
78263
  i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
78263
78264
  }
78264
78265
  get bufferLength() {
78265
- return this[_];
78266
+ return this[g];
78266
78267
  }
78267
78268
  get encoding() {
78268
78269
  return this[z3];
@@ -78286,46 +78287,46 @@ var A = class extends Oi {
78286
78287
  this[Z] = this[Z] || !!t;
78287
78288
  }
78288
78289
  [gi]() {
78289
- 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);
78290
78291
  }
78291
78292
  get aborted() {
78292
- return this[Ae];
78293
+ return this[Ie];
78293
78294
  }
78294
78295
  set aborted(t) {
78295
78296
  }
78296
78297
  write(t, e, i) {
78297
- if (this[Ae]) return false;
78298
+ if (this[Ie]) return false;
78298
78299
  if (this[q]) throw new Error("write after end");
78299
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;
78300
78301
  typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
78301
- let r = this[Z] ? te : vr;
78302
+ let r = this[Z] ? te : kr;
78302
78303
  if (!this[L] && !Buffer.isBuffer(t)) {
78303
- if (Pr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
78304
- else if (Br(t)) t = Buffer.from(t);
78304
+ if (Br(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
78305
+ else if (Mr(t)) t = Buffer.from(t);
78305
78306
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
78306
78307
  }
78307
- 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]);
78308
78309
  }
78309
78310
  read(t) {
78310
78311
  if (this[w]) return null;
78311
- if (this[C] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[j](), null;
78312
- this[L] && (t = null), this[g].length > 1 && !this[L] && (this[g] = [this[z3] ? this[g].join("") : Buffer.concat(this[g], this[_])]);
78313
- 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]);
78314
78315
  return this[j](), e;
78315
78316
  }
78316
- [xs](t, e) {
78317
+ [Ts](t, e) {
78317
78318
  if (this[L]) this[De]();
78318
78319
  else {
78319
78320
  let i = e;
78320
- 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);
78321
78322
  }
78322
- 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;
78323
78324
  }
78324
78325
  end(t, e, i) {
78325
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;
78326
78327
  }
78327
78328
  [Bt]() {
78328
- 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"));
78329
78330
  }
78330
78331
  resume() {
78331
78332
  return this[Bt]();
@@ -78342,39 +78343,39 @@ var A = class extends Oi {
78342
78343
  get paused() {
78343
78344
  return this[Qt];
78344
78345
  }
78345
- [Si](t) {
78346
- 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);
78347
78348
  }
78348
78349
  [De]() {
78349
- 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();
78350
78351
  }
78351
- [Ne](t = false) {
78352
+ [Ae](t = false) {
78352
78353
  do
78353
78354
  ;
78354
- while (this[Ls](this[De]()) && this[g].length);
78355
- !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");
78356
78357
  }
78357
- [Ls](t) {
78358
+ [xs](t) {
78358
78359
  return this.emit("data", t), this[b];
78359
78360
  }
78360
78361
  pipe(t, e) {
78361
78362
  if (this[w]) return t;
78362
78363
  this[C] = false;
78363
78364
  let i = this[rt];
78364
- 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;
78365
78366
  }
78366
78367
  unpipe(t) {
78367
- let e = this[D].find((i) => i.dest === t);
78368
- 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());
78369
78370
  }
78370
78371
  addListener(t, e) {
78371
78372
  return this.on(t, e);
78372
78373
  }
78373
78374
  on(t, e) {
78374
78375
  let i = super.on(t, e);
78375
- if (t === "data") this[C] = false, this[yt]++, !this[D].length && !this[b] && this[Bt]();
78376
- else if (t === "readable" && this[_] !== 0) super.emit("readable");
78377
- 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 (vr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
78378
78379
  else if (t === "error" && this[jt]) {
78379
78380
  let r = e;
78380
78381
  this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
@@ -78386,29 +78387,29 @@ var A = class extends Oi {
78386
78387
  }
78387
78388
  off(t, e) {
78388
78389
  let i = super.off(t, e);
78389
- 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;
78390
78391
  }
78391
78392
  removeAllListeners(t) {
78392
78393
  let e = super.removeAllListeners(t);
78393
- 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;
78394
78395
  }
78395
78396
  get emittedEnd() {
78396
78397
  return this[rt];
78397
78398
  }
78398
78399
  [j]() {
78399
- !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);
78400
78401
  }
78401
78402
  emit(t, ...e) {
78402
78403
  let i = e[0];
78403
78404
  if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
78404
- if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[Ri](i)), true) : this[Ri](i);
78405
- 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]();
78406
78407
  if (t === "close") {
78407
- if (this[Le] = true, !this[rt] && !this[w]) return false;
78408
+ if (this[Ne] = true, !this[rt] && !this[w]) return false;
78408
78409
  let n = super.emit("close");
78409
78410
  return this.removeAllListeners("close"), n;
78410
78411
  } else if (t === "error") {
78411
- this[jt] = i, super.emit(yi, i);
78412
+ this[jt] = i, super.emit(Ri, i);
78412
78413
  let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
78413
78414
  return this[j](), n;
78414
78415
  } else if (t === "resume") {
@@ -78421,23 +78422,23 @@ var A = class extends Oi {
78421
78422
  let r = super.emit(t, ...e);
78422
78423
  return this[j](), r;
78423
78424
  }
78424
- [Ri](t) {
78425
- 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();
78426
78427
  let e = this[C] ? false : super.emit("data", t);
78427
78428
  return this[j](), e;
78428
78429
  }
78429
- [Ns]() {
78430
- 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]());
78431
78432
  }
78432
- [bi]() {
78433
+ [_i]() {
78433
78434
  if (this[Mt]) {
78434
78435
  let e = this[Mt].end();
78435
78436
  if (e) {
78436
- for (let i of this[D]) i.dest.write(e);
78437
+ for (let i of this[A]) i.dest.write(e);
78437
78438
  this[C] || super.emit("data", e);
78438
78439
  }
78439
78440
  }
78440
- for (let e of this[D]) e.end();
78441
+ for (let e of this[A]) e.end();
78441
78442
  let t = super.emit("end");
78442
78443
  return this.removeAllListeners("end"), t;
78443
78444
  }
@@ -78484,67 +78485,67 @@ var A = class extends Oi {
78484
78485
  }
78485
78486
  [Symbol.iterator]() {
78486
78487
  this[C] = false;
78487
- 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 = () => {
78488
78489
  if (t) return e();
78489
78490
  let r = this.read();
78490
78491
  return r === null ? e() : { done: false, value: r };
78491
78492
  };
78492
- 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]() {
78493
78494
  return this;
78494
78495
  }, [Symbol.dispose]: () => {
78495
78496
  } };
78496
78497
  }
78497
78498
  destroy(t) {
78498
78499
  if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
78499
- 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;
78500
78501
  let e = this;
78501
- 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;
78502
78503
  }
78503
78504
  static get isStream() {
78504
- return Cr;
78505
+ return Ir;
78505
78506
  }
78506
78507
  };
78507
- var Wr = I.writev;
78508
+ var Hr = I.writev;
78508
78509
  var ot = /* @__PURE__ */ Symbol("_autoClose");
78509
78510
  var H = /* @__PURE__ */ Symbol("_close");
78510
78511
  var ee = /* @__PURE__ */ Symbol("_ended");
78511
78512
  var m = /* @__PURE__ */ Symbol("_fd");
78512
- var Ti = /* @__PURE__ */ Symbol("_finished");
78513
+ var xi = /* @__PURE__ */ Symbol("_finished");
78513
78514
  var J = /* @__PURE__ */ Symbol("_flags");
78514
- var xi = /* @__PURE__ */ Symbol("_flush");
78515
- var Ai = /* @__PURE__ */ Symbol("_handleChunk");
78516
- var Ii = /* @__PURE__ */ Symbol("_makeBuf");
78515
+ var Li = /* @__PURE__ */ Symbol("_flush");
78516
+ var Ii = /* @__PURE__ */ Symbol("_handleChunk");
78517
+ var Ci = /* @__PURE__ */ Symbol("_makeBuf");
78517
78518
  var se = /* @__PURE__ */ Symbol("_mode");
78518
- var Ce = /* @__PURE__ */ Symbol("_needDrain");
78519
+ var Fe = /* @__PURE__ */ Symbol("_needDrain");
78519
78520
  var Ut = /* @__PURE__ */ Symbol("_onerror");
78520
78521
  var Ht = /* @__PURE__ */ Symbol("_onopen");
78521
- var Li = /* @__PURE__ */ Symbol("_onread");
78522
+ var Ni = /* @__PURE__ */ Symbol("_onread");
78522
78523
  var Pt = /* @__PURE__ */ Symbol("_onwrite");
78523
78524
  var ht = /* @__PURE__ */ Symbol("_open");
78524
78525
  var U = /* @__PURE__ */ Symbol("_path");
78525
78526
  var nt = /* @__PURE__ */ Symbol("_pos");
78526
78527
  var Y = /* @__PURE__ */ Symbol("_queue");
78527
78528
  var zt = /* @__PURE__ */ Symbol("_read");
78528
- var Ni = /* @__PURE__ */ Symbol("_readSize");
78529
+ var Ai = /* @__PURE__ */ Symbol("_readSize");
78529
78530
  var Q = /* @__PURE__ */ Symbol("_reading");
78530
78531
  var ie = /* @__PURE__ */ Symbol("_remain");
78531
78532
  var Di = /* @__PURE__ */ Symbol("_size");
78532
- var Fe = /* @__PURE__ */ Symbol("_write");
78533
+ var ke = /* @__PURE__ */ Symbol("_write");
78533
78534
  var Rt = /* @__PURE__ */ Symbol("_writing");
78534
- var ke = /* @__PURE__ */ Symbol("_defaultFlag");
78535
+ var ve = /* @__PURE__ */ Symbol("_defaultFlag");
78535
78536
  var bt = /* @__PURE__ */ Symbol("_errored");
78536
- var gt = class extends A {
78537
+ var _t = class extends D {
78537
78538
  [bt] = false;
78538
78539
  [m];
78539
78540
  [U];
78540
- [Ni];
78541
+ [Ai];
78541
78542
  [Q] = false;
78542
78543
  [Di];
78543
78544
  [ie];
78544
78545
  [ot];
78545
78546
  constructor(t, e) {
78546
78547
  if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
78547
- 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]();
78548
78549
  }
78549
78550
  get fd() {
78550
78551
  return this[m];
@@ -78564,19 +78565,19 @@ var gt = class extends A {
78564
78565
  [Ht](t, e) {
78565
78566
  t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
78566
78567
  }
78567
- [Ii]() {
78568
- return Buffer.allocUnsafe(Math.min(this[Ni], this[ie]));
78568
+ [Ci]() {
78569
+ return Buffer.allocUnsafe(Math.min(this[Ai], this[ie]));
78569
78570
  }
78570
78571
  [zt]() {
78571
78572
  if (!this[Q]) {
78572
78573
  this[Q] = true;
78573
- let t = this[Ii]();
78574
- if (t.length === 0) return process.nextTick(() => this[Li](null, 0, t));
78575
- 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));
78576
78577
  }
78577
78578
  }
78578
- [Li](t, e, i) {
78579
- 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]();
78580
78581
  }
78581
78582
  [H]() {
78582
78583
  if (this[ot] && typeof this[m] == "number") {
@@ -78587,7 +78588,7 @@ var gt = class extends A {
78587
78588
  [Ut](t) {
78588
78589
  this[Q] = true, this[H](), this.emit("error", t);
78589
78590
  }
78590
- [Ai](t, e) {
78591
+ [Ii](t, e) {
78591
78592
  let i = false;
78592
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;
78593
78594
  }
@@ -78605,7 +78606,7 @@ var gt = class extends A {
78605
78606
  }
78606
78607
  }
78607
78608
  };
78608
- var ve = class extends gt {
78609
+ var Me = class extends _t {
78609
78610
  [ht]() {
78610
78611
  let t = true;
78611
78612
  try {
@@ -78620,8 +78621,8 @@ var ve = class extends gt {
78620
78621
  if (!this[Q]) {
78621
78622
  this[Q] = true;
78622
78623
  do {
78623
- let e = this[Ii](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
78624
- 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;
78625
78626
  } while (true);
78626
78627
  this[Q] = false;
78627
78628
  }
@@ -78637,26 +78638,26 @@ var ve = class extends gt {
78637
78638
  }
78638
78639
  }
78639
78640
  };
78640
- var tt = class extends Hr {
78641
+ var tt = class extends Ur {
78641
78642
  readable = false;
78642
78643
  writable = true;
78643
78644
  [bt] = false;
78644
78645
  [Rt] = false;
78645
78646
  [ee] = false;
78646
78647
  [Y] = [];
78647
- [Ce] = false;
78648
+ [Fe] = false;
78648
78649
  [U];
78649
78650
  [se];
78650
78651
  [ot];
78651
78652
  [m];
78652
- [ke];
78653
+ [ve];
78653
78654
  [J];
78654
- [Ti] = false;
78655
+ [xi] = false;
78655
78656
  [nt];
78656
78657
  constructor(t, e) {
78657
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;
78658
78659
  let i = this[nt] !== void 0 ? "r+" : "w";
78659
- 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]();
78660
78661
  }
78661
78662
  emit(t, ...e) {
78662
78663
  if (t === "error") {
@@ -78678,26 +78679,26 @@ var tt = class extends Hr {
78678
78679
  I.open(this[U], this[J], this[se], (t, e) => this[Ht](t, e));
78679
78680
  }
78680
78681
  [Ht](t, e) {
78681
- 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]());
78682
78683
  }
78683
78684
  end(t, e) {
78684
78685
  return t && this.write(t, e), this[ee] = true, !this[Rt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
78685
78686
  }
78686
78687
  write(t, e) {
78687
- 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);
78688
78689
  }
78689
- [Fe](t) {
78690
+ [ke](t) {
78690
78691
  I.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
78691
78692
  }
78692
78693
  [Pt](t, e) {
78693
- 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"))));
78694
78695
  }
78695
- [xi]() {
78696
+ [Li]() {
78696
78697
  if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
78697
- else if (this[Y].length === 1) this[Fe](this[Y].pop());
78698
+ else if (this[Y].length === 1) this[ke](this[Y].pop());
78698
78699
  else {
78699
78700
  let t = this[Y];
78700
- this[Y] = [], Wr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
78701
+ this[Y] = [], Hr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
78701
78702
  }
78702
78703
  }
78703
78704
  [H]() {
@@ -78710,7 +78711,7 @@ var tt = class extends Hr {
78710
78711
  var Wt = class extends tt {
78711
78712
  [ht]() {
78712
78713
  let t;
78713
- if (this[ke] && this[J] === "r+") try {
78714
+ if (this[ve] && this[J] === "r+") try {
78714
78715
  t = I.openSync(this[U], this[J], this[se]);
78715
78716
  } catch (e) {
78716
78717
  if (e?.code === "ENOENT") return this[J] = "w", this[ht]();
@@ -78725,7 +78726,7 @@ var Wt = class extends tt {
78725
78726
  this[m] = void 0, I.closeSync(t), this.emit("close");
78726
78727
  }
78727
78728
  }
78728
- [Fe](t) {
78729
+ [ke](t) {
78729
78730
  let e = true;
78730
78731
  try {
78731
78732
  this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
@@ -78737,49 +78738,50 @@ var Wt = class extends tt {
78737
78738
  }
78738
78739
  }
78739
78740
  };
78740
- 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 Wr = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
78741
78742
  var As = (s3) => !!s3.sync && !!s3.file;
78742
- var Is = (s3) => !s3.sync && !!s3.file;
78743
- var Cs = (s3) => !!s3.sync && !s3.file;
78744
- var Fs = (s3) => !s3.sync && !s3.file;
78745
- var ks = (s3) => !!s3.file;
78746
- var Zr = (s3) => {
78747
- 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 Gr = (s3) => {
78748
+ let t = Wr.get(s3);
78748
78749
  return t || s3;
78749
78750
  };
78750
78751
  var re = (s3 = {}) => {
78751
78752
  if (!s3) return {};
78752
78753
  let t = {};
78753
78754
  for (let [e, i] of Object.entries(s3)) {
78754
- let r = Zr(e);
78755
+ let r = Gr(e);
78755
78756
  t[r] = i;
78756
78757
  }
78757
78758
  return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
78758
78759
  };
78759
78760
  var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
78760
- 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) : [];
78761
78762
  let a = re(n);
78762
78763
  if (r?.(a, o), As(a)) {
78763
78764
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
78764
78765
  return s3(a, o);
78766
+ } else if (Ds(a)) {
78767
+ let l = t(a, o);
78768
+ return h ? l.then(() => h(), h) : l;
78765
78769
  } else if (Is(a)) {
78766
- let l = t(a, o), c = h || void 0;
78767
- return c ? l.then(() => c(), c) : l;
78768
- } else if (Cs(a)) {
78769
78770
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
78770
78771
  return e(a, o);
78771
- } else if (Fs(a)) {
78772
+ } else if (Cs(a)) {
78772
78773
  if (typeof h == "function") throw new TypeError("callback only supported with file option");
78773
78774
  return i(a, o);
78774
- } else throw new Error("impossible options??");
78775
+ }
78776
+ throw new Error("impossible options??");
78775
78777
  }, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
78776
- var Kr = Yr.constants || { ZLIB_VERNUM: 4736 };
78777
- 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));
78778
- var Vr = _t.concat;
78779
- var Ms = Object.getOwnPropertyDescriptor(_t, "concat");
78780
- var $r = (s3) => s3;
78781
- var Fi = Ms?.writable === true || Ms?.set !== void 0 ? (s3) => {
78782
- _t.concat = s3 ? $r : Vr;
78778
+ var Yr = Zr.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 }, Yr));
78780
+ var Kr = gt.concat;
78781
+ var vs = Object.getOwnPropertyDescriptor(gt, "concat");
78782
+ var Vr = (s3) => s3;
78783
+ var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
78784
+ gt.concat = s3 ? Vr : Kr;
78783
78785
  } : (s3) => {
78784
78786
  };
78785
78787
  var Ot = /* @__PURE__ */ Symbol("_superWrite");
@@ -78793,8 +78795,8 @@ var Gt = class extends Error {
78793
78795
  return "ZlibError";
78794
78796
  }
78795
78797
  };
78796
- var ki = /* @__PURE__ */ Symbol("flushFlag");
78797
- var ne = class extends A {
78798
+ var vi = /* @__PURE__ */ Symbol("flushFlag");
78799
+ var ne = class extends D {
78798
78800
  #t = false;
78799
78801
  #i = false;
78800
78802
  #s;
@@ -78813,9 +78815,9 @@ var ne = class extends A {
78813
78815
  }
78814
78816
  constructor(t, e) {
78815
78817
  if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
78816
- 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);
78817
78819
  try {
78818
- this.#e = new vs[e](t);
78820
+ this.#e = new ks[e](t);
78819
78821
  } catch (i) {
78820
78822
  throw new Gt(i, this.constructor);
78821
78823
  }
@@ -78827,10 +78829,10 @@ var ne = class extends A {
78827
78829
  this.#e && (this.#e.close(), this.#e = void 0, this.emit("close"));
78828
78830
  }
78829
78831
  reset() {
78830
- 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?.();
78831
78833
  }
78832
78834
  flush(t) {
78833
- 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 })));
78834
78836
  }
78835
78837
  end(t, e, i) {
78836
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);
@@ -78842,20 +78844,20 @@ var ne = class extends A {
78842
78844
  return super.write(t);
78843
78845
  }
78844
78846
  write(t, e, i) {
78845
- if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = _t.from(t, e)), this.#t) return;
78846
- 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");
78847
78849
  let r = this.#e._handle, n = r.close;
78848
78850
  r.close = () => {
78849
78851
  };
78850
78852
  let o = this.#e.close;
78851
78853
  this.#e.close = () => {
78852
- }, Fi(true);
78854
+ }, ki(true);
78853
78855
  let h;
78854
78856
  try {
78855
- let l = typeof t[ki] == "number" ? t[ki] : this.#s;
78856
- 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);
78857
78859
  } catch (l) {
78858
- Fi(false), this.#o(new Gt(l, this.write));
78860
+ ki(false), this.#o(new Gt(l, this.write));
78859
78861
  } finally {
78860
78862
  this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
78861
78863
  }
@@ -78863,13 +78865,13 @@ var ne = class extends A {
78863
78865
  let a;
78864
78866
  if (h) if (Array.isArray(h) && h.length > 0) {
78865
78867
  let l = h[0];
78866
- a = this[Ot](_t.from(l));
78868
+ a = this[Ot](gt.from(l));
78867
78869
  for (let c = 1; c < h.length; c++) a = this[Ot](h[c]);
78868
- } else a = this[Ot](_t.from(h));
78870
+ } else a = this[Ot](gt.from(h));
78869
78871
  return i && i(), a;
78870
78872
  }
78871
78873
  };
78872
- var Me = class extends ne {
78874
+ var Be = class extends ne {
78873
78875
  #t;
78874
78876
  #i;
78875
78877
  constructor(t, e) {
@@ -78880,7 +78882,7 @@ var Me = class extends ne {
78880
78882
  if (!this.handle) throw new Error("cannot switch params when binding is closed");
78881
78883
  if (!this.handle.params) throw new Error("not supported in this implementation");
78882
78884
  if (this.#t !== t || this.#i !== e) {
78883
- 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");
78884
78886
  let i = this.handle.flush;
78885
78887
  this.handle.flush = (r, n) => {
78886
78888
  typeof r == "function" && (n = r, r = this.flushFlag), this.flush(r), n?.();
@@ -78895,7 +78897,7 @@ var Me = class extends ne {
78895
78897
  }
78896
78898
  }
78897
78899
  };
78898
- var Be = class extends Me {
78900
+ var Pe = class extends Be {
78899
78901
  #t;
78900
78902
  constructor(t) {
78901
78903
  super(t, "Gzip"), this.#t = t && !!t.portable;
@@ -78904,87 +78906,87 @@ var Be = class extends Me {
78904
78906
  return this.#t ? (this.#t = false, t[9] = 255, super[Ot](t)) : super[Ot](t);
78905
78907
  }
78906
78908
  };
78907
- var Pe = class extends Me {
78909
+ var ze = class extends Be {
78908
78910
  constructor(t) {
78909
78911
  super(t, "Unzip");
78910
78912
  }
78911
78913
  };
78912
- var ze = class extends ne {
78914
+ var Ue = class extends ne {
78913
78915
  constructor(t, e) {
78914
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);
78915
78917
  }
78916
78918
  };
78917
- var Ue = class extends ze {
78919
+ var He = class extends Ue {
78918
78920
  constructor(t) {
78919
78921
  super(t, "BrotliCompress");
78920
78922
  }
78921
78923
  };
78922
- var He = class extends ze {
78924
+ var We = class extends Ue {
78923
78925
  constructor(t) {
78924
78926
  super(t, "BrotliDecompress");
78925
78927
  }
78926
78928
  };
78927
- var We = class extends ne {
78929
+ var Ge = class extends ne {
78928
78930
  constructor(t, e) {
78929
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);
78930
78932
  }
78931
78933
  };
78932
- var Ge = class extends We {
78934
+ var Ze = class extends Ge {
78933
78935
  constructor(t) {
78934
78936
  super(t, "ZstdCompress");
78935
78937
  }
78936
78938
  };
78937
- var Ze = class extends We {
78939
+ var Ye = class extends Ge {
78938
78940
  constructor(t) {
78939
78941
  super(t, "ZstdDecompress");
78940
78942
  }
78941
78943
  };
78942
- var Bs = (s3, t) => {
78943
- if (Number.isSafeInteger(s3)) s3 < 0 ? jr(s3, t) : qr(s3, t);
78944
+ var Ms = (s3, t) => {
78945
+ if (Number.isSafeInteger(s3)) s3 < 0 ? qr(s3, t) : Xr(s3, t);
78944
78946
  else throw Error("cannot encode number outside of javascript safe integer range");
78945
78947
  return t;
78946
78948
  };
78947
- var qr = (s3, t) => {
78949
+ var Xr = (s3, t) => {
78948
78950
  t[0] = 128;
78949
78951
  for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
78950
78952
  };
78951
- var jr = (s3, t) => {
78953
+ var qr = (s3, t) => {
78952
78954
  t[0] = 255;
78953
78955
  var e = false;
78954
78956
  s3 = s3 * -1;
78955
78957
  for (var i = t.length; i > 1; i--) {
78956
78958
  var r = s3 & 255;
78957
- 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));
78958
78960
  }
78959
78961
  };
78960
- var Ps = (s3) => {
78961
- 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 ? Qr(s3.subarray(1, s3.length)) : t === 255 ? jr(s3) : null;
78962
78964
  if (e === null) throw Error("invalid base256 encoding");
78963
78965
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
78964
78966
  return e;
78965
78967
  };
78966
- var Qr = (s3) => {
78968
+ var jr = (s3) => {
78967
78969
  for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
78968
78970
  var n = Number(s3[r]), o;
78969
- 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));
78970
78972
  }
78971
78973
  return e;
78972
78974
  };
78973
- var Jr = (s3) => {
78975
+ var Qr = (s3) => {
78974
78976
  for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
78975
78977
  var r = Number(s3[i]);
78976
78978
  r !== 0 && (e += r * Math.pow(256, t - i - 1));
78977
78979
  }
78978
78980
  return e;
78979
78981
  };
78980
- var zs = (s3) => (255 ^ s3) & 255;
78981
- var Us = (s3) => (255 ^ s3) + 1 & 255;
78982
- var Mi = {};
78983
- 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
+ Ar(Bi, { code: () => Ke, isCode: () => oe, isName: () => tn, name: () => he });
78984
78986
  var oe = (s3) => he.has(s3);
78985
- var en = (s3) => Ye.has(s3);
78987
+ var tn = (s3) => Ke.has(s3);
78986
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"]]);
78987
- 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]]));
78988
78990
  var F = class {
78989
78991
  cksumValid = false;
78990
78992
  needPax = false;
@@ -79012,14 +79014,14 @@ var F = class {
79012
79014
  }
79013
79015
  decode(t, e, i, r) {
79014
79016
  if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
79015
- 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);
79016
79018
  let n = Tt(t, e + 156, 1);
79017
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) {
79018
79020
  let h = Tt(t, e + 345, 155);
79019
79021
  this.path = h + "/" + this.path;
79020
79022
  } else {
79021
79023
  let h = Tt(t, e + 345, 130);
79022
- 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);
79023
79025
  }
79024
79026
  let o = 256;
79025
79027
  for (let h = e; h < e + 148; h++) o += t[h];
@@ -79031,8 +79033,8 @@ var F = class {
79031
79033
  }
79032
79034
  encode(t, e = 0) {
79033
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");
79034
- let i = this.ctime || this.atime ? 130 : 155, r = sn(this.path || "", i), n = r[0], o = r[1];
79035
- 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 = en(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);
79036
79038
  let h = 256;
79037
79039
  for (let a = e; a < e + 148; a++) h += t[a];
79038
79040
  for (let a = e + 156; a < e + 512; a++) h += t[a];
@@ -79045,13 +79047,13 @@ var F = class {
79045
79047
  return this.#t;
79046
79048
  }
79047
79049
  set type(t) {
79048
- let e = String(Ye.get(t));
79050
+ let e = String(Ke.get(t));
79049
79051
  if (oe(e) || e === "Unsupported") this.#t = e;
79050
79052
  else if (oe(t)) this.#t = t;
79051
79053
  else throw new TypeError("invalid entry type: " + t);
79052
79054
  }
79053
79055
  };
79054
- var sn = (s3, t) => {
79056
+ var en = (s3, t) => {
79055
79057
  let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
79056
79058
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
79057
79059
  else {
@@ -79064,19 +79066,19 @@ var sn = (s3, t) => {
79064
79066
  return n;
79065
79067
  };
79066
79068
  var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
79067
- var Bi = (s3, t, e) => rn(at(s3, t, e));
79068
- var rn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
79069
- var at = (s3, t, e) => Number(s3[t]) & 128 ? Ps(s3.subarray(t, t + e)) : on(s3, t, e);
79070
- var nn = (s3) => isNaN(s3) ? void 0 : s3;
79071
- var on = (s3, t, e) => nn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
79072
- var hn = { 12: 8589934591, 8: 2097151 };
79073
- 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);
79074
- var an = (s3, t, e, i) => s3.write(ln(i, e), t, e, "ascii");
79075
- var ln = (s3, t) => cn(Math.floor(s3).toString(8), t);
79076
- var cn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
79077
- var Pi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
79078
- var fn = new Array(156).join("\0");
79079
- 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) => sn(at(s3, t, e));
79070
+ var sn = (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)) : nn(s3, t, e);
79072
+ var rn = (s3) => isNaN(s3) ? void 0 : s3;
79073
+ var nn = (s3, t, e) => rn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
79074
+ var on = { 12: 8589934591, 8: 2097151 };
79075
+ var lt = (s3, t, e, i) => i === void 0 ? false : i > on[e] || i < 0 ? (Ms(i, s3.subarray(t, t + e)), true) : (hn(s3, t, e, i), false);
79076
+ var hn = (s3, t, e, i) => s3.write(an(i, e), t, e, "ascii");
79077
+ var an = (s3, t) => ln(Math.floor(s3).toString(8), t);
79078
+ var ln = (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 cn = new Array(156).join("\0");
79081
+ var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + cn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
79080
79082
  var ct = class s {
79081
79083
  atime;
79082
79084
  mtime;
@@ -79103,7 +79105,7 @@ var ct = class s {
79103
79105
  if (t === "") return Buffer.allocUnsafe(0);
79104
79106
  let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
79105
79107
  for (let n = 0; n < 512; n++) r[n] = 0;
79106
- 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/" + fn(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");
79107
79109
  for (let n = e + 512; n < r.length; n++) r[n] = 0;
79108
79110
  return r;
79109
79111
  }
@@ -79117,13 +79119,13 @@ var ct = class s {
79117
79119
  return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
79118
79120
  }
79119
79121
  static parse(t, e, i = false) {
79120
- return new s(un(mn(t), e), i);
79122
+ return new s(dn(un(t), e), i);
79121
79123
  }
79122
79124
  };
79123
- var un = (s3, t) => t ? Object.assign({}, t, s3) : s3;
79124
- var mn = (s3) => s3.replace(/\n$/, "").split(`
79125
- `).reduce(pn, /* @__PURE__ */ Object.create(null));
79126
- var pn = (s3, t) => {
79125
+ var dn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
79126
+ var un = (s3) => s3.replace(/\n$/, "").split(`
79127
+ `).reduce(mn, /* @__PURE__ */ Object.create(null));
79128
+ var mn = (s3, t) => {
79127
79129
  let e = parseInt(t, 10);
79128
79130
  if (e !== Buffer.byteLength(t) + 1) return s3;
79129
79131
  t = t.slice((e + " ").length);
@@ -79132,9 +79134,9 @@ var pn = (s3, t) => {
79132
79134
  let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
79133
79135
  return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
79134
79136
  };
79135
- var En = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
79136
- var f = En !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replace(/\\/g, "/");
79137
- var Yt = class extends A {
79137
+ var pn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
79138
+ var f = pn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
79139
+ var Yt = class extends D {
79138
79140
  extended;
79139
79141
  globalExtended;
79140
79142
  header;
@@ -79201,42 +79203,42 @@ var Yt = class extends A {
79201
79203
  var Lt = (s3, t, e, i = {}) => {
79202
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));
79203
79205
  };
79204
- var Sn = 1024 * 1024;
79205
- var Gi = Buffer.from([31, 139]);
79206
- var Zi = Buffer.from([40, 181, 47, 253]);
79207
- var yn = Math.max(Gi.length, Zi.length);
79206
+ var wn = 1024 * 1024;
79207
+ var Zi = Buffer.from([31, 139]);
79208
+ var Yi = Buffer.from([40, 181, 47, 253]);
79209
+ var Sn = Math.max(Zi.length, Yi.length);
79208
79210
  var B = /* @__PURE__ */ Symbol("state");
79209
79211
  var Nt = /* @__PURE__ */ Symbol("writeEntry");
79210
79212
  var et = /* @__PURE__ */ Symbol("readEntry");
79211
- var zi = /* @__PURE__ */ Symbol("nextEntry");
79212
- var Hs = /* @__PURE__ */ Symbol("processEntry");
79213
+ var Ui = /* @__PURE__ */ Symbol("nextEntry");
79214
+ var Us = /* @__PURE__ */ Symbol("processEntry");
79213
79215
  var V = /* @__PURE__ */ Symbol("extendedHeader");
79214
79216
  var ae = /* @__PURE__ */ Symbol("globalExtendedHeader");
79215
79217
  var ft = /* @__PURE__ */ Symbol("meta");
79216
- var Ws = /* @__PURE__ */ Symbol("emitMeta");
79218
+ var Hs = /* @__PURE__ */ Symbol("emitMeta");
79217
79219
  var p = /* @__PURE__ */ Symbol("buffer");
79218
79220
  var it = /* @__PURE__ */ Symbol("queue");
79219
79221
  var dt = /* @__PURE__ */ Symbol("ended");
79220
- var Ui = /* @__PURE__ */ Symbol("emittedEnd");
79221
- var Dt = /* @__PURE__ */ Symbol("emit");
79222
+ var Hi = /* @__PURE__ */ Symbol("emittedEnd");
79223
+ var At = /* @__PURE__ */ Symbol("emit");
79222
79224
  var y = /* @__PURE__ */ Symbol("unzip");
79223
- var Ke = /* @__PURE__ */ Symbol("consumeChunk");
79224
- var Ve = /* @__PURE__ */ Symbol("consumeChunkSub");
79225
- var Hi = /* @__PURE__ */ Symbol("consumeBody");
79226
- var Gs = /* @__PURE__ */ Symbol("consumeMeta");
79227
- 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");
79228
79230
  var le = /* @__PURE__ */ Symbol("consuming");
79229
- var Wi = /* @__PURE__ */ Symbol("bufferConcat");
79230
- var $e = /* @__PURE__ */ Symbol("maybeEnd");
79231
+ var Gi = /* @__PURE__ */ Symbol("bufferConcat");
79232
+ var Xe = /* @__PURE__ */ Symbol("maybeEnd");
79231
79233
  var Kt = /* @__PURE__ */ Symbol("writing");
79232
79234
  var ut = /* @__PURE__ */ Symbol("aborted");
79233
- var Xe = /* @__PURE__ */ Symbol("onDone");
79234
- var At = /* @__PURE__ */ Symbol("sawValidEntry");
79235
- var qe = /* @__PURE__ */ Symbol("sawNullBlock");
79236
- var je = /* @__PURE__ */ Symbol("sawEOF");
79237
- var Ys = /* @__PURE__ */ Symbol("closeStream");
79238
- var Rn = () => true;
79239
- 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 yn = () => true;
79241
+ var st = class extends En {
79240
79242
  file;
79241
79243
  strict;
79242
79244
  maxMetaEntrySize;
@@ -79256,36 +79258,36 @@ var st = class extends wn {
79256
79258
  [dt] = false;
79257
79259
  [y];
79258
79260
  [ut] = false;
79259
- [At];
79260
- [qe] = false;
79261
+ [Dt];
79261
79262
  [je] = false;
79263
+ [Qe] = false;
79262
79264
  [Kt] = false;
79263
79265
  [le] = false;
79264
- [Ui] = false;
79266
+ [Hi] = false;
79265
79267
  constructor(t = {}) {
79266
- super(), this.file = t.file || "", this.on(Xe, () => {
79267
- (this[B] === "begin" || this[At] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
79268
- }), 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, () => {
79269
79271
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
79270
- }), 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 || wn, this.filter = typeof t.filter == "function" ? t.filter : yn;
79271
79273
  let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
79272
79274
  this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
79273
79275
  let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
79274
- 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);
79275
79277
  }
79276
79278
  warn(t, e, i = {}) {
79277
79279
  Lt(this, t, e, i);
79278
79280
  }
79279
- [Zs](t, e) {
79280
- this[At] === void 0 && (this[At] = false);
79281
+ [Gs](t, e) {
79282
+ this[Dt] === void 0 && (this[Dt] = false);
79281
79283
  let i;
79282
79284
  try {
79283
79285
  i = new F(t, e, this[V], this[ae]);
79284
79286
  } catch (r) {
79285
79287
  return this.warn("TAR_ENTRY_INVALID", r);
79286
79288
  }
79287
- if (i.nullBlock) this[qe] ? (this[je] = true, this[B] === "begin" && (this[B] = "header"), this[Dt]("eof")) : (this[qe] = true, this[Dt]("nullBlock"));
79288
- 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 });
79289
79291
  else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
79290
79292
  else {
79291
79293
  let r = i.type;
@@ -79293,52 +79295,52 @@ var st = class extends wn {
79293
79295
  else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
79294
79296
  else {
79295
79297
  let n = this[Nt] = new Yt(i, this[V], this[ae]);
79296
- if (!this[At]) if (n.remain) {
79298
+ if (!this[Dt]) if (n.remain) {
79297
79299
  let o = () => {
79298
- n.invalid || (this[At] = true);
79300
+ n.invalid || (this[Dt] = true);
79299
79301
  };
79300
79302
  n.on("end", o);
79301
- } else this[At] = true;
79302
- 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]())));
79303
79305
  }
79304
79306
  }
79305
79307
  }
79306
- [Ys]() {
79308
+ [Zs]() {
79307
79309
  queueMicrotask(() => this.emit("close"));
79308
79310
  }
79309
- [Hs](t) {
79311
+ [Us](t) {
79310
79312
  let e = true;
79311
79313
  if (!t) this[et] = void 0, e = false;
79312
79314
  else if (Array.isArray(t)) {
79313
79315
  let [i, ...r] = t;
79314
79316
  this.emit(i, ...r);
79315
- } 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);
79316
79318
  return e;
79317
79319
  }
79318
- [zi]() {
79320
+ [Ui]() {
79319
79321
  do
79320
79322
  ;
79321
- while (this[Hs](this[it].shift()));
79322
- if (!this[it].length) {
79323
+ while (this[Us](this[it].shift()));
79324
+ if (this[it].length === 0) {
79323
79325
  let t = this[et];
79324
79326
  !t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
79325
79327
  }
79326
79328
  }
79327
- [Hi](t, e) {
79329
+ [Wi](t, e) {
79328
79330
  let i = this[Nt];
79329
79331
  if (!i) throw new Error("attempt to consume body without entry??");
79330
79332
  let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
79331
79333
  return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
79332
79334
  }
79333
- [Gs](t, e) {
79334
- let i = this[Nt], r = this[Hi](t, e);
79335
- 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;
79336
79338
  }
79337
- [Dt](t, e, i) {
79338
- !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]);
79339
79341
  }
79340
- [Ws](t) {
79341
- switch (this[Dt]("meta", this[ft]), t.type) {
79342
+ [Hs](t) {
79343
+ switch (this[At]("meta", this[ft]), t.type) {
79342
79344
  case "ExtendedHeader":
79343
79345
  case "OldExtendedHeader":
79344
79346
  this[V] = ct.parse(this[ft], this[V], false);
@@ -79367,12 +79369,12 @@ var st = class extends wn {
79367
79369
  write(t, e, i) {
79368
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;
79369
79371
  if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
79370
- if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < yn) return this[p] = t, i?.(), true;
79371
- 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 < Sn) 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);
79372
79374
  let o = false;
79373
79375
  if (this[y] === false && this.zstd !== false) {
79374
79376
  o = true;
79375
- 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]) {
79376
79378
  o = false;
79377
79379
  break;
79378
79380
  }
@@ -79387,69 +79389,69 @@ var st = class extends wn {
79387
79389
  }
79388
79390
  if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
79389
79391
  let a = this[dt];
79390
- 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", () => {
79391
- 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]();
79392
79394
  }), this[Kt] = true;
79393
79395
  let l = !!this[y][a ? "end" : "write"](t);
79394
79396
  return this[Kt] = false, i?.(), l;
79395
79397
  }
79396
79398
  }
79397
- this[Kt] = true, this[y] ? this[y].write(t) : this[Ke](t), this[Kt] = false;
79398
- let n = this[it].length ? false : this[et] ? this[et].flowing : true;
79399
- 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;
79400
79402
  }
79401
- [Wi](t) {
79403
+ [Gi](t) {
79402
79404
  t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
79403
79405
  }
79404
- [$e]() {
79405
- if (this[dt] && !this[Ui] && !this[ut] && !this[le]) {
79406
- this[Ui] = true;
79406
+ [Xe]() {
79407
+ if (this[dt] && !this[Hi] && !this[ut] && !this[le]) {
79408
+ this[Hi] = true;
79407
79409
  let t = this[Nt];
79408
79410
  if (t && t.blockRemain) {
79409
79411
  let e = this[p] ? this[p].length : 0;
79410
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();
79411
79413
  }
79412
- this[Dt](Xe);
79414
+ this[At](qe);
79413
79415
  }
79414
79416
  }
79415
- [Ke](t) {
79416
- if (this[le] && t) this[Wi](t);
79417
- 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]();
79418
79420
  else if (t) {
79419
79421
  if (this[le] = true, this[p]) {
79420
- this[Wi](t);
79422
+ this[Gi](t);
79421
79423
  let e = this[p];
79422
- this[p] = void 0, this[Ve](e);
79423
- } else this[Ve](t);
79424
- 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]; ) {
79425
79427
  let e = this[p];
79426
- this[p] = void 0, this[Ve](e);
79428
+ this[p] = void 0, this[$e](e);
79427
79429
  }
79428
79430
  this[le] = false;
79429
79431
  }
79430
- (!this[p] || this[dt]) && this[$e]();
79432
+ (!this[p] || this[dt]) && this[Xe]();
79431
79433
  }
79432
- [Ve](t) {
79434
+ [$e](t) {
79433
79435
  let e = 0, i = t.length;
79434
- for (; e + 512 <= i && !this[ut] && !this[je]; ) switch (this[B]) {
79436
+ for (; e + 512 <= i && !this[ut] && !this[Qe]; ) switch (this[B]) {
79435
79437
  case "begin":
79436
79438
  case "header":
79437
- this[Zs](t, e), e += 512;
79439
+ this[Gs](t, e), e += 512;
79438
79440
  break;
79439
79441
  case "ignore":
79440
79442
  case "body":
79441
- e += this[Hi](t, e);
79443
+ e += this[Wi](t, e);
79442
79444
  break;
79443
79445
  case "meta":
79444
- e += this[Gs](t, e);
79446
+ e += this[Ws](t, e);
79445
79447
  break;
79446
79448
  default:
79447
79449
  throw new Error("invalid state: " + this[B]);
79448
79450
  }
79449
- 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));
79450
79452
  }
79451
79453
  end(t, e, i) {
79452
- 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;
79453
79455
  }
79454
79456
  };
79455
79457
  var mt = (s3) => {
@@ -79463,19 +79465,19 @@ var _n = (s3) => {
79463
79465
  t(e), e.resume();
79464
79466
  } : (e) => e.resume();
79465
79467
  };
79466
- var Yi = (s3, t) => {
79468
+ var Ki = (s3, t) => {
79467
79469
  let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
79468
- let h = o || gn(n).root || ".", a;
79470
+ let h = o || bn(n).root || ".", a;
79469
79471
  if (n === h) a = false;
79470
79472
  else {
79471
79473
  let l = e.get(n);
79472
- l !== void 0 ? a = l : a = r(bn(n), h);
79474
+ a = l !== void 0 ? l : r(Rn(n), h);
79473
79475
  }
79474
79476
  return e.set(n, a), a;
79475
79477
  };
79476
79478
  s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
79477
79479
  };
79478
- var On = (s3) => {
79480
+ var gn = (s3) => {
79479
79481
  let t = new st(s3), e = s3.file, i;
79480
79482
  try {
79481
79483
  i = Vt.openSync(e, "r");
@@ -79499,58 +79501,58 @@ var On = (s3) => {
79499
79501
  }
79500
79502
  }
79501
79503
  };
79502
- var Tn = (s3, t) => {
79504
+ var On = (s3, t) => {
79503
79505
  let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
79504
79506
  return new Promise((o, h) => {
79505
79507
  e.on("error", h), e.on("end", o), Vt.stat(r, (a, l) => {
79506
79508
  if (a) h(a);
79507
79509
  else {
79508
- let c = new gt(r, { readSize: i, size: l.size });
79510
+ let c = new _t(r, { readSize: i, size: l.size });
79509
79511
  c.on("error", h), c.pipe(e);
79510
79512
  }
79511
79513
  });
79512
79514
  });
79513
79515
  };
79514
- var It = K(On, Tn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
79515
- t?.length && Yi(s3, t), s3.noResume || _n(s3);
79516
+ var It = K(gn, On, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
79517
+ t?.length && Ki(s3, t), s3.noResume || _n(s3);
79516
79518
  });
79517
- 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);
79518
- 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: xn, parse: Ys } = Tn;
79519
79521
  var ce = (s3) => {
79520
- let t = "", e = Ks(s3);
79521
- for (; Ln(s3) || e.root; ) {
79522
+ let t = "", e = Ys(s3);
79523
+ for (; xn(s3) || e.root; ) {
79522
79524
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
79523
- s3 = s3.slice(i.length), t += i, e = Ks(s3);
79525
+ s3 = s3.slice(i.length), t += i, e = Ys(s3);
79524
79526
  }
79525
79527
  return [t, s3];
79526
79528
  };
79527
- var Qe = ["|", "<", ">", "?", ":"];
79528
- var Vi = Qe.map((s3) => String.fromCharCode(61440 + s3.charCodeAt(0)));
79529
- var Nn = new Map(Qe.map((s3, t) => [s3, Vi[t]]));
79530
- var Dn = new Map(Vi.map((s3, t) => [s3, Qe[t]]));
79531
- var $i = (s3) => Qe.reduce((t, e) => t.split(e).join(Nn.get(e)), s3);
79532
- var Vs = (s3) => Vi.reduce((t, e) => t.split(e).join(Dn.get(e)), s3);
79533
- var tr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
79529
+ var Je = ["|", "<", ">", "?", ":"];
79530
+ var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
79531
+ var Ln = new Map(Je.map((s3, t) => [s3, $i[t]]));
79532
+ var Nn = new Map($i.map((s3, t) => [s3, Je[t]]));
79533
+ var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Ln.get(e)), s3);
79534
+ var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(Nn.get(e)), s3);
79535
+ var Js = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
79534
79536
  var An = 16 * 1024 * 1024;
79535
- var qs = /* @__PURE__ */ Symbol("process");
79536
- var js = /* @__PURE__ */ Symbol("file");
79537
- var Qs = /* @__PURE__ */ Symbol("directory");
79538
- var qi = /* @__PURE__ */ Symbol("symlink");
79539
- var Js = /* @__PURE__ */ Symbol("hardlink");
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");
79540
79542
  var fe = /* @__PURE__ */ Symbol("header");
79541
- var Je = /* @__PURE__ */ Symbol("read");
79542
- var ji = /* @__PURE__ */ Symbol("lstat");
79543
- var ti = /* @__PURE__ */ Symbol("onlstat");
79544
- var Qi = /* @__PURE__ */ Symbol("onread");
79545
- var Ji = /* @__PURE__ */ Symbol("onreadlink");
79546
- var ts = /* @__PURE__ */ Symbol("openfile");
79547
- 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");
79548
79550
  var pt = /* @__PURE__ */ Symbol("close");
79549
- var ei = /* @__PURE__ */ Symbol("mode");
79550
- var is = /* @__PURE__ */ Symbol("awaitDrain");
79551
- var Xi = /* @__PURE__ */ Symbol("ondrain");
79551
+ var ii = /* @__PURE__ */ Symbol("mode");
79552
+ var ss = /* @__PURE__ */ Symbol("awaitDrain");
79553
+ var qi = /* @__PURE__ */ Symbol("ondrain");
79552
79554
  var X = /* @__PURE__ */ Symbol("prefix");
79553
- var de = class extends A {
79555
+ var de = class extends D {
79554
79556
  path;
79555
79557
  portable;
79556
79558
  myuid = process.getuid && process.getuid() || 0;
@@ -79589,9 +79591,9 @@ var de = class extends A {
79589
79591
  let [o, h] = ce(this.path);
79590
79592
  o && typeof h == "string" && (this.path = h, r = o);
79591
79593
  }
79592
- 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 });
79593
79595
  let n = this.statCache.get(this.absolute);
79594
- n ? this[ti](n) : this[ji]();
79596
+ n ? this[ei](n) : this[Qi]();
79595
79597
  }
79596
79598
  warn(t, e, i = {}) {
79597
79599
  return Lt(this, t, e, i);
@@ -79599,93 +79601,93 @@ var de = class extends A {
79599
79601
  emit(t, ...e) {
79600
79602
  return t === "error" && (this.#t = true), super.emit(t, ...e);
79601
79603
  }
79602
- [ji]() {
79604
+ [Qi]() {
79603
79605
  $.lstat(this.absolute, (t, e) => {
79604
79606
  if (t) return this.emit("error", t);
79605
- this[ti](e);
79607
+ this[ei](e);
79606
79608
  });
79607
79609
  }
79608
- [ti](t) {
79609
- 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 = Dn(t), this.emit("stat", t), this[Xs]();
79610
79612
  }
79611
- [qs]() {
79613
+ [Xs]() {
79612
79614
  switch (this.type) {
79613
79615
  case "File":
79614
- return this[js]();
79616
+ return this[qs]();
79615
79617
  case "Directory":
79616
- return this[Qs]();
79618
+ return this[js]();
79617
79619
  case "SymbolicLink":
79618
- return this[qi]();
79620
+ return this[ji]();
79619
79621
  default:
79620
79622
  return this.end();
79621
79623
  }
79622
79624
  }
79623
- [ei](t) {
79624
- return Ki(t, this.type === "Directory", this.portable);
79625
+ [ii](t) {
79626
+ return Vi(t, this.type === "Directory", this.portable);
79625
79627
  }
79626
79628
  [X](t) {
79627
- return tr(t, this.prefix);
79629
+ return Js(t, this.prefix);
79628
79630
  }
79629
79631
  [fe]() {
79630
79632
  if (!this.stat) throw new Error("cannot write header before stat");
79631
- 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());
79632
79634
  let t = this.header?.block;
79633
79635
  if (!t) throw new Error("failed to encode header");
79634
79636
  super.write(t);
79635
79637
  }
79636
- [Qs]() {
79638
+ [js]() {
79637
79639
  if (!this.stat) throw new Error("cannot create directory entry without stat");
79638
79640
  this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
79639
79641
  }
79640
- [qi]() {
79642
+ [ji]() {
79641
79643
  $.readlink(this.absolute, (t, e) => {
79642
79644
  if (t) return this.emit("error", t);
79643
- this[Ji](e);
79645
+ this[ts](e);
79644
79646
  });
79645
79647
  }
79646
- [Ji](t) {
79648
+ [ts](t) {
79647
79649
  this.linkpath = f(t), this[fe](), this.end();
79648
79650
  }
79649
- [Js](t) {
79651
+ [Qs](t) {
79650
79652
  if (!this.stat) throw new Error("cannot create link entry without stat");
79651
- 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();
79652
79654
  }
79653
- [js]() {
79655
+ [qs]() {
79654
79656
  if (!this.stat) throw new Error("cannot create file entry without stat");
79655
79657
  if (this.stat.nlink > 1) {
79656
79658
  let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
79657
- if (e?.indexOf(this.cwd) === 0) return this[Js](e);
79659
+ if (e?.indexOf(this.cwd) === 0) return this[Qs](e);
79658
79660
  this.linkCache.set(t, this.absolute);
79659
79661
  }
79660
79662
  if (this[fe](), this.stat.size === 0) return this.end();
79661
- this[ts]();
79663
+ this[es]();
79662
79664
  }
79663
- [ts]() {
79665
+ [es]() {
79664
79666
  $.open(this.absolute, "r", (t, e) => {
79665
79667
  if (t) return this.emit("error", t);
79666
- this[es](e);
79668
+ this[is](e);
79667
79669
  });
79668
79670
  }
79669
- [es](t) {
79671
+ [is](t) {
79670
79672
  if (this.fd = t, this.#t) return this[pt]();
79671
79673
  if (!this.stat) throw new Error("should stat before calling onopenfile");
79672
79674
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
79673
79675
  let e = Math.min(this.blockLen, this.maxReadSize);
79674
- 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]();
79675
79677
  }
79676
- [Je]() {
79678
+ [ti]() {
79677
79679
  let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
79678
79680
  if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
79679
79681
  $.read(t, e, i, r, n, (o, h) => {
79680
79682
  if (o) return this[pt](() => this.emit("error", o));
79681
- this[Qi](h);
79683
+ this[Ji](h);
79682
79684
  });
79683
79685
  }
79684
79686
  [pt](t = () => {
79685
79687
  }) {
79686
79688
  this.fd !== void 0 && $.close(this.fd, t);
79687
79689
  }
79688
- [Qi](t) {
79690
+ [Ji](t) {
79689
79691
  if (t <= 0 && this.remain > 0) {
79690
79692
  let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
79691
79693
  return this[pt](() => this.emit("error", r));
@@ -79697,9 +79699,9 @@ var de = class extends A {
79697
79699
  if (!this.buf) throw new Error("should have created buffer prior to reading");
79698
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++;
79699
79701
  let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
79700
- this.write(e) ? this[Xi]() : this[is](() => this[Xi]());
79702
+ this.write(e) ? this[qi]() : this[ss](() => this[qi]());
79701
79703
  }
79702
- [is](t) {
79704
+ [ss](t) {
79703
79705
  this.once("drain", t);
79704
79706
  }
79705
79707
  write(t, e, i) {
@@ -79709,30 +79711,30 @@ var de = class extends A {
79709
79711
  }
79710
79712
  return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
79711
79713
  }
79712
- [Xi]() {
79714
+ [qi]() {
79713
79715
  if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
79714
79716
  if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
79715
- 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]();
79716
79718
  }
79717
79719
  };
79718
- var ii = class extends de {
79720
+ var si = class extends de {
79719
79721
  sync = true;
79720
- [ji]() {
79721
- this[ti]($.lstatSync(this.absolute));
79722
+ [Qi]() {
79723
+ this[ei]($.lstatSync(this.absolute));
79722
79724
  }
79723
- [qi]() {
79724
- this[Ji]($.readlinkSync(this.absolute));
79725
+ [ji]() {
79726
+ this[ts]($.readlinkSync(this.absolute));
79725
79727
  }
79726
- [ts]() {
79727
- this[es]($.openSync(this.absolute, "r"));
79728
+ [es]() {
79729
+ this[is]($.openSync(this.absolute, "r"));
79728
79730
  }
79729
- [Je]() {
79731
+ [ti]() {
79730
79732
  let t = true;
79731
79733
  try {
79732
79734
  let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
79733
79735
  if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
79734
79736
  let h = $.readSync(e, i, r, n, o);
79735
- this[Qi](h), t = false;
79737
+ this[Ji](h), t = false;
79736
79738
  } finally {
79737
79739
  if (t) try {
79738
79740
  this[pt](() => {
@@ -79741,7 +79743,7 @@ var ii = class extends de {
79741
79743
  }
79742
79744
  }
79743
79745
  }
79744
- [is](t) {
79746
+ [ss](t) {
79745
79747
  t();
79746
79748
  }
79747
79749
  [pt](t = () => {
@@ -79749,7 +79751,7 @@ var ii = class extends de {
79749
79751
  this.fd !== void 0 && $.closeSync(this.fd), t();
79750
79752
  }
79751
79753
  };
79752
- var si = class extends A {
79754
+ var ri = class extends D {
79753
79755
  blockLen = 0;
79754
79756
  blockRemain = 0;
79755
79757
  buf = 0;
@@ -79785,7 +79787,7 @@ var si = class extends A {
79785
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;
79786
79788
  let { type: r } = t;
79787
79789
  if (r === "Unsupported") throw new Error("writing entry that should be ignored");
79788
- 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);
79789
79791
  let n = false;
79790
79792
  if (!this.preservePaths) {
79791
79793
  let [h, a] = ce(this.path);
@@ -79797,10 +79799,10 @@ var si = class extends A {
79797
79799
  super.write(o), t.pipe(this);
79798
79800
  }
79799
79801
  [X](t) {
79800
- return tr(t, this.prefix);
79802
+ return Js(t, this.prefix);
79801
79803
  }
79802
- [ei](t) {
79803
- return Ki(t, this.type === "Directory", this.portable);
79804
+ [ii](t) {
79805
+ return Vi(t, this.type === "Directory", this.portable);
79804
79806
  }
79805
79807
  write(t, e, i) {
79806
79808
  typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
@@ -79812,8 +79814,8 @@ var si = class extends A {
79812
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;
79813
79815
  }
79814
79816
  };
79815
- var In = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
79816
- var ri = class s2 {
79817
+ var Dn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
79818
+ var ni = class s2 {
79817
79819
  tail;
79818
79820
  head;
79819
79821
  length = 0;
@@ -79844,11 +79846,11 @@ var ri = class s2 {
79844
79846
  t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
79845
79847
  }
79846
79848
  push(...t) {
79847
- 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++) Cn(this, t[e]);
79848
79850
  return this.length;
79849
79851
  }
79850
79852
  unshift(...t) {
79851
- 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++) Fn(this, t[e]);
79852
79854
  return this.length;
79853
79855
  }
79854
79856
  pop() {
@@ -79944,7 +79946,7 @@ var ri = class s2 {
79944
79946
  let n = [];
79945
79947
  for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
79946
79948
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
79947
- for (let o of i) r = Cn(this, r, o);
79949
+ for (let o of i) r = In(this, r, o);
79948
79950
  return n;
79949
79951
  }
79950
79952
  reverse() {
@@ -79956,14 +79958,14 @@ var ri = class s2 {
79956
79958
  return this.head = e, this.tail = t, this;
79957
79959
  }
79958
79960
  };
79959
- function Cn(s3, t, e) {
79961
+ function In(s3, t, e) {
79960
79962
  let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
79961
79963
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
79962
79964
  }
79963
- function Fn(s3, t) {
79965
+ function Cn(s3, t) {
79964
79966
  s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
79965
79967
  }
79966
- function kn(s3, t) {
79968
+ function Fn(s3, t) {
79967
79969
  s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
79968
79970
  }
79969
79971
  var ue = class {
@@ -79975,7 +79977,7 @@ var ue = class {
79975
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;
79976
79978
  }
79977
79979
  };
79978
- var fi = class {
79980
+ var di = class {
79979
79981
  path;
79980
79982
  absolute;
79981
79983
  entry;
@@ -79988,28 +79990,28 @@ var fi = class {
79988
79990
  this.path = t || "./", this.absolute = e;
79989
79991
  }
79990
79992
  };
79991
- var er = Buffer.alloc(1024);
79992
- var ni = /* @__PURE__ */ Symbol("onStat");
79993
+ var tr = Buffer.alloc(1024);
79994
+ var oi = /* @__PURE__ */ Symbol("onStat");
79993
79995
  var me = /* @__PURE__ */ Symbol("ended");
79994
79996
  var W = /* @__PURE__ */ Symbol("queue");
79995
79997
  var Ct = /* @__PURE__ */ Symbol("current");
79996
79998
  var Ft = /* @__PURE__ */ Symbol("process");
79997
79999
  var pe = /* @__PURE__ */ Symbol("processing");
79998
- var ss = /* @__PURE__ */ Symbol("processJob");
80000
+ var rs = /* @__PURE__ */ Symbol("processJob");
79999
80001
  var G = /* @__PURE__ */ Symbol("jobs");
80000
- var rs = /* @__PURE__ */ Symbol("jobDone");
80001
- var oi = /* @__PURE__ */ Symbol("addFSEntry");
80002
- var ir = /* @__PURE__ */ Symbol("addTarEntry");
80003
- var hs = /* @__PURE__ */ Symbol("stat");
80004
- var as = /* @__PURE__ */ Symbol("readdir");
80005
- var hi = /* @__PURE__ */ Symbol("onreaddir");
80006
- var ai = /* @__PURE__ */ Symbol("pipe");
80007
- var sr = /* @__PURE__ */ Symbol("entry");
80008
- var ns = /* @__PURE__ */ Symbol("entryOpt");
80009
- var li = /* @__PURE__ */ Symbol("writeEntryClass");
80010
- var nr = /* @__PURE__ */ Symbol("write");
80011
- var os2 = /* @__PURE__ */ Symbol("ondrain");
80012
- 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 {
80013
80015
  sync = false;
80014
80016
  opt;
80015
80017
  cwd;
@@ -80030,22 +80032,22 @@ var Et = class extends A {
80030
80032
  mtime;
80031
80033
  filter;
80032
80034
  jobs;
80033
- [li];
80035
+ [ci];
80034
80036
  onWriteEntry;
80035
80037
  [W];
80036
80038
  [G] = 0;
80037
80039
  [pe] = false;
80038
80040
  [me] = false;
80039
80041
  constructor(t = {}) {
80040
- 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) {
80041
80043
  if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
80042
- 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");
80043
80045
  let e = this.zip;
80044
- e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[os2]()), this.on("resume", () => e.resume());
80045
- } else this.on("drain", this[os2]);
80046
- 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;
80047
80049
  }
80048
- [nr](t) {
80050
+ [rr](t) {
80049
80051
  return super.write(t);
80050
80052
  }
80051
80053
  add(t) {
@@ -80056,97 +80058,97 @@ var Et = class extends A {
80056
80058
  }
80057
80059
  write(t) {
80058
80060
  if (this[me]) throw new Error("write after end");
80059
- 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;
80060
80062
  }
80061
- [ir](t) {
80062
- let e = f(rr.resolve(this.cwd, t.path));
80063
+ [er](t) {
80064
+ let e = f(sr.resolve(this.cwd, t.path));
80063
80065
  if (!this.filter(t.path, t)) t.resume();
80064
80066
  else {
80065
- let i = new fi(t.path, e);
80066
- 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);
80067
80069
  }
80068
80070
  this[Ft]();
80069
80071
  }
80070
- [oi](t) {
80071
- let e = f(rr.resolve(this.cwd, t));
80072
- 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]();
80073
80075
  }
80074
- [hs](t) {
80076
+ [as](t) {
80075
80077
  t.pending = true, this[G] += 1;
80076
80078
  let e = this.follow ? "stat" : "lstat";
80077
- ci[e](t.absolute, (i, r) => {
80078
- 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);
80079
80081
  });
80080
80082
  }
80081
- [ni](t, e) {
80082
- 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]();
80083
80085
  }
80084
- [as](t) {
80085
- 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) => {
80086
80088
  if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
80087
- this[hi](t, i);
80089
+ this[ai](t, i);
80088
80090
  });
80089
80091
  }
80090
- [hi](t, e) {
80092
+ [ai](t, e) {
80091
80093
  this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
80092
80094
  }
80093
80095
  [Ft]() {
80094
80096
  if (!this[pe]) {
80095
80097
  this[pe] = true;
80096
- 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) {
80097
80099
  let e = t.next;
80098
80100
  this[W].removeNode(t), t.next = e;
80099
80101
  }
80100
- 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()));
80101
80103
  }
80102
80104
  }
80103
80105
  get [Ct]() {
80104
80106
  return this[W] && this[W].head && this[W].head.value;
80105
80107
  }
80106
- [rs](t) {
80108
+ [ns](t) {
80107
80109
  this[W].shift(), this[G] -= 1, this[Ft]();
80108
80110
  }
80109
- [ss](t) {
80111
+ [rs](t) {
80110
80112
  if (!t.pending) {
80111
80113
  if (t.entry) {
80112
- t === this[Ct] && !t.piped && this[ai](t);
80114
+ t === this[Ct] && !t.piped && this[li](t);
80113
80115
  return;
80114
80116
  }
80115
80117
  if (!t.stat) {
80116
80118
  let e = this.statCache.get(t.absolute);
80117
- e ? this[ni](t, e) : this[hs](t);
80119
+ e ? this[oi](t, e) : this[as](t);
80118
80120
  }
80119
80121
  if (t.stat && !t.ignore) {
80120
80122
  if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
80121
80123
  let e = this.readdirCache.get(t.absolute);
80122
- 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;
80123
80125
  }
80124
- if (t.entry = this[sr](t), !t.entry) {
80126
+ if (t.entry = this[ir](t), !t.entry) {
80125
80127
  t.ignore = true;
80126
80128
  return;
80127
80129
  }
80128
- t === this[Ct] && !t.piped && this[ai](t);
80130
+ t === this[Ct] && !t.piped && this[li](t);
80129
80131
  }
80130
80132
  }
80131
80133
  }
80132
- [ns](t) {
80134
+ [os2](t) {
80133
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 };
80134
80136
  }
80135
- [sr](t) {
80137
+ [ir](t) {
80136
80138
  this[G] += 1;
80137
80139
  try {
80138
- 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));
80139
80141
  } catch (e) {
80140
80142
  this.emit("error", e);
80141
80143
  }
80142
80144
  }
80143
- [os2]() {
80145
+ [hs]() {
80144
80146
  this[Ct] && this[Ct].entry && this[Ct].entry.resume();
80145
80147
  }
80146
- [ai](t) {
80148
+ [li](t) {
80147
80149
  t.piped = true, t.readdir && t.readdir.forEach((r) => {
80148
80150
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
80149
- this[oi](o + r);
80151
+ this[hi](o + r);
80150
80152
  });
80151
80153
  let e = t.entry, i = this.zip;
80152
80154
  if (!e) throw new Error("cannot pipe without source");
@@ -80166,131 +80168,128 @@ var Et = class extends A {
80166
80168
  var kt = class extends Et {
80167
80169
  sync = true;
80168
80170
  constructor(t) {
80169
- super(t), this[li] = ii;
80171
+ super(t), this[ci] = si;
80170
80172
  }
80171
80173
  pause() {
80172
80174
  }
80173
80175
  resume() {
80174
80176
  }
80175
- [hs](t) {
80177
+ [as](t) {
80176
80178
  let e = this.follow ? "statSync" : "lstatSync";
80177
- this[ni](t, ci[e](t.absolute));
80179
+ this[oi](t, fi[e](t.absolute));
80178
80180
  }
80179
- [as](t) {
80180
- this[hi](t, ci.readdirSync(t.absolute));
80181
+ [ls](t) {
80182
+ this[ai](t, fi.readdirSync(t.absolute));
80181
80183
  }
80182
- [ai](t) {
80184
+ [li](t) {
80183
80185
  let e = t.entry, i = this.zip;
80184
80186
  if (t.readdir && t.readdir.forEach((r) => {
80185
80187
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
80186
- this[oi](o + r);
80188
+ this[hi](o + r);
80187
80189
  }), !e) throw new Error("Cannot pipe without source");
80188
80190
  i ? e.on("data", (r) => {
80189
80191
  i.write(r);
80190
80192
  }) : e.on("data", (r) => {
80191
- super[nr](r);
80193
+ super[rr](r);
80192
80194
  });
80193
80195
  }
80194
80196
  };
80195
- var vn = (s3, t) => {
80197
+ var kn = (s3, t) => {
80196
80198
  let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
80197
- e.pipe(i), hr(e, t);
80199
+ e.pipe(i), or(e, t);
80198
80200
  };
80199
- var Mn = (s3, t) => {
80201
+ var vn = (s3, t) => {
80200
80202
  let e = new Et(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
80201
80203
  e.pipe(i);
80202
80204
  let r = new Promise((n, o) => {
80203
80205
  i.on("error", o), i.on("close", n), e.on("error", o);
80204
80206
  });
80205
- return ar(e, t), r;
80207
+ return hr(e, t).catch((n) => e.emit("error", n)), r;
80206
80208
  };
80207
- var hr = (s3, t) => {
80209
+ var or = (s3, t) => {
80208
80210
  t.forEach((e) => {
80209
- 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);
80210
80212
  }), s3.end();
80211
80213
  };
80212
- var ar = async (s3, t) => {
80213
- for (let e = 0; e < t.length; e++) {
80214
- let i = String(t[e]);
80215
- i.charAt(0) === "@" ? await It({ file: or.resolve(String(s3.cwd), i.slice(1)), noResume: true, onReadEntry: (r) => {
80216
- s3.add(r);
80217
- } }) : s3.add(i);
80218
- }
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);
80219
80218
  s3.end();
80220
80219
  };
80221
- var Bn = (s3, t) => {
80220
+ var Mn = (s3, t) => {
80222
80221
  let e = new kt(s3);
80223
- return hr(e, t), e;
80222
+ return or(e, t), e;
80224
80223
  };
80225
- var Pn = (s3, t) => {
80224
+ var Bn = (s3, t) => {
80226
80225
  let e = new Et(s3);
80227
- return ar(e, t), e;
80226
+ return hr(e, t).catch((i) => e.emit("error", i)), e;
80228
80227
  };
80229
- var zn = K(vn, Mn, Bn, Pn, (s3, t) => {
80228
+ var Pn = K(kn, vn, Mn, Bn, (s3, t) => {
80230
80229
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
80231
80230
  });
80232
- var Un = process.env.__FAKE_PLATFORM__ || process.platform;
80233
- var Hn = Un === "win32";
80234
- var { O_CREAT: Wn, O_TRUNC: Gn, O_WRONLY: Zn } = lr.constants;
80235
- var cr = Number(process.env.__FAKE_FS_O_FILENAME__) || lr.constants.UV_FS_O_FILEMAP || 0;
80236
- var Yn = Hn && !!cr;
80237
- var Kn = 512 * 1024;
80238
- var Vn = cr | Gn | Wn | Zn;
80239
- var ls = Yn ? (s3) => s3 < Kn ? Vn : "w" : () => "w";
80240
- var cs = (s3, t, e) => {
80231
+ var zn = process.env.__FAKE_PLATFORM__ || process.platform;
80232
+ var Un = zn === "win32";
80233
+ var { O_CREAT: Hn, O_TRUNC: Wn, O_WRONLY: Gn } = ar.constants;
80234
+ var lr = Number(process.env.__FAKE_FS_O_FILENAME__) || ar.constants.UV_FS_O_FILEMAP || 0;
80235
+ var Zn = Un && !!lr;
80236
+ var Yn = 512 * 1024;
80237
+ var Kn = lr | Wn | Hn | Gn;
80238
+ var cs = Zn ? (s3) => s3 < Yn ? Kn : "w" : () => "w";
80239
+ var fs2 = (s3, t, e) => {
80241
80240
  try {
80242
- return ui.lchownSync(s3, t, e);
80241
+ return mi.lchownSync(s3, t, e);
80243
80242
  } catch (i) {
80244
80243
  if (i?.code !== "ENOENT") throw i;
80245
80244
  }
80246
80245
  };
80247
- var di = (s3, t, e, i) => {
80248
- ui.lchown(s3, t, e, (r) => {
80246
+ var ui = (s3, t, e, i) => {
80247
+ mi.lchown(s3, t, e, (r) => {
80249
80248
  i(r && r?.code !== "ENOENT" ? r : null);
80250
80249
  });
80251
80250
  };
80252
- var $n = (s3, t, e, i, r) => {
80253
- if (t.isDirectory()) fs2(Ee.resolve(s3, t.name), e, i, (n) => {
80251
+ var Vn = (s3, t, e, i, r) => {
80252
+ if (t.isDirectory()) ds(Ee.resolve(s3, t.name), e, i, (n) => {
80254
80253
  if (n) return r(n);
80255
80254
  let o = Ee.resolve(s3, t.name);
80256
- di(o, e, i, r);
80255
+ ui(o, e, i, r);
80257
80256
  });
80258
80257
  else {
80259
80258
  let n = Ee.resolve(s3, t.name);
80260
- di(n, e, i, r);
80259
+ ui(n, e, i, r);
80261
80260
  }
80262
80261
  };
80263
- var fs2 = (s3, t, e, i) => {
80264
- ui.readdir(s3, { withFileTypes: true }, (r, n) => {
80262
+ var ds = (s3, t, e, i) => {
80263
+ mi.readdir(s3, { withFileTypes: true }, (r, n) => {
80265
80264
  if (r) {
80266
80265
  if (r.code === "ENOENT") return i();
80267
80266
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
80268
80267
  }
80269
- if (r || !n.length) return di(s3, t, e, i);
80268
+ if (r || !n.length) return ui(s3, t, e, i);
80270
80269
  let o = n.length, h = null, a = (l) => {
80271
80270
  if (!h) {
80272
80271
  if (l) return i(h = l);
80273
- if (--o === 0) return di(s3, t, e, i);
80272
+ if (--o === 0) return ui(s3, t, e, i);
80274
80273
  }
80275
80274
  };
80276
- for (let l of n) $n(s3, l, t, e, a);
80275
+ for (let l of n) Vn(s3, l, t, e, a);
80277
80276
  });
80278
80277
  };
80279
- var Xn = (s3, t, e, i) => {
80280
- t.isDirectory() && ds(Ee.resolve(s3, t.name), e, i), cs(Ee.resolve(s3, t.name), e, i);
80278
+ var $n = (s3, t, e, i) => {
80279
+ t.isDirectory() && us(Ee.resolve(s3, t.name), e, i), fs2(Ee.resolve(s3, t.name), e, i);
80281
80280
  };
80282
- var ds = (s3, t, e) => {
80281
+ var us = (s3, t, e) => {
80283
80282
  let i;
80284
80283
  try {
80285
- i = ui.readdirSync(s3, { withFileTypes: true });
80284
+ i = mi.readdirSync(s3, { withFileTypes: true });
80286
80285
  } catch (r) {
80287
80286
  let n = r;
80288
80287
  if (n?.code === "ENOENT") return;
80289
- if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return cs(s3, t, e);
80288
+ if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs2(s3, t, e);
80290
80289
  throw n;
80291
80290
  }
80292
- for (let r of i) Xn(s3, r, t, e);
80293
- return cs(s3, t, e);
80291
+ for (let r of i) $n(s3, r, t, e);
80292
+ return fs2(s3, t, e);
80294
80293
  };
80295
80294
  var we = class extends Error {
80296
80295
  path;
@@ -80315,41 +80314,41 @@ var wt = class extends Error {
80315
80314
  return "SymlinkError";
80316
80315
  }
80317
80316
  };
80318
- var jn = (s3, t) => {
80317
+ var qn = (s3, t) => {
80319
80318
  k.stat(s3, (e, i) => {
80320
80319
  (e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
80321
80320
  });
80322
80321
  };
80323
- var fr = (s3, t, e) => {
80322
+ var cr = (s3, t, e) => {
80324
80323
  s3 = f(s3);
80325
80324
  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) => {
80326
- E ? e(E) : x && a ? fs2(x, o, h, (_s) => S(_s)) : n ? k.chmod(s3, r, e) : e();
80325
+ E ? e(E) : x && a ? ds(x, o, h, (xe) => S(xe)) : n ? k.chmod(s3, r, e) : e();
80327
80326
  };
80328
- if (s3 === d) return jn(s3, S);
80329
- if (l) return qn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
80330
- let N = f(mi.relative(d, s3)).split("/");
80331
- us(d, N, r, c, d, void 0, S);
80327
+ if (s3 === d) return qn(s3, S);
80328
+ if (l) return Xn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
80329
+ let N = f(pi.relative(d, s3)).split("/");
80330
+ ms(d, N, r, c, d, void 0, S);
80332
80331
  };
80333
- var us = (s3, t, e, i, r, n, o) => {
80334
- if (!t.length) return o(null, n);
80335
- let h = t.shift(), a = f(mi.resolve(s3 + "/" + h));
80336
- k.mkdir(a, e, dr(a, t, e, i, r, n, o));
80332
+ var ms = (s3, t, e, i, r, n, o) => {
80333
+ if (t.length === 0) return o(null, n);
80334
+ let h = t.shift(), a = f(pi.resolve(s3 + "/" + h));
80335
+ k.mkdir(a, e, fr(a, t, e, i, r, n, o));
80337
80336
  };
80338
- var dr = (s3, t, e, i, r, n, o) => (h) => {
80337
+ var fr = (s3, t, e, i, r, n, o) => (h) => {
80339
80338
  h ? k.lstat(s3, (a, l) => {
80340
80339
  if (a) a.path = a.path && f(a.path), o(a);
80341
- else if (l.isDirectory()) us(s3, t, e, i, r, n, o);
80340
+ else if (l.isDirectory()) ms(s3, t, e, i, r, n, o);
80342
80341
  else if (i) k.unlink(s3, (c) => {
80343
80342
  if (c) return o(c);
80344
- k.mkdir(s3, e, dr(s3, t, e, i, r, n, o));
80343
+ k.mkdir(s3, e, fr(s3, t, e, i, r, n, o));
80345
80344
  });
80346
80345
  else {
80347
80346
  if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
80348
80347
  o(h);
80349
80348
  }
80350
- }) : (n = n || s3, us(s3, t, e, i, r, n, o));
80349
+ }) : (n = n || s3, ms(s3, t, e, i, r, n, o));
80351
80350
  };
80352
- var Qn = (s3) => {
80351
+ var jn = (s3) => {
80353
80352
  let t = false, e;
80354
80353
  try {
80355
80354
  t = k.statSync(s3).isDirectory();
@@ -80359,53 +80358,53 @@ var Qn = (s3) => {
80359
80358
  if (!t) throw new we(s3, e ?? "ENOTDIR");
80360
80359
  }
80361
80360
  };
80362
- var ur = (s3, t) => {
80361
+ var dr = (s3, t) => {
80363
80362
  s3 = f(s3);
80364
80363
  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) => {
80365
- E && h && ds(E, n, o), r && k.chmodSync(s3, i);
80364
+ E && h && us(E, n, o), r && k.chmodSync(s3, i);
80366
80365
  };
80367
- if (s3 === c) return Qn(c), d();
80366
+ if (s3 === c) return jn(c), d();
80368
80367
  if (a) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
80369
- let T = f(mi.relative(c, s3)).split("/"), N;
80368
+ let T = f(pi.relative(c, s3)).split("/"), N;
80370
80369
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
80371
- x = f(mi.resolve(x));
80370
+ x = f(pi.resolve(x));
80372
80371
  try {
80373
80372
  k.mkdirSync(x, i), N = N || x;
80374
80373
  } catch {
80375
- let Os = k.lstatSync(x);
80376
- if (Os.isDirectory()) continue;
80374
+ let xe = k.lstatSync(x);
80375
+ if (xe.isDirectory()) continue;
80377
80376
  if (l) {
80378
80377
  k.unlinkSync(x), k.mkdirSync(x, i), N = N || x;
80379
80378
  continue;
80380
- } else if (Os.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
80379
+ } else if (xe.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
80381
80380
  }
80382
80381
  }
80383
80382
  return d(N);
80384
80383
  };
80385
- var ms = /* @__PURE__ */ Object.create(null);
80386
- var mr = 1e4;
80384
+ var ps = /* @__PURE__ */ Object.create(null);
80385
+ var ur = 1e4;
80387
80386
  var $t = /* @__PURE__ */ new Set();
80388
- var pr = (s3) => {
80389
- $t.has(s3) ? $t.delete(s3) : ms[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
80390
- let t = ms[s3], e = $t.size - mr;
80391
- if (e > mr / 10) {
80392
- for (let i of $t) if ($t.delete(i), delete ms[i], --e <= 0) break;
80387
+ var mr = (s3) => {
80388
+ $t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
80389
+ let t = ps[s3], e = $t.size - ur;
80390
+ if (e > ur / 10) {
80391
+ for (let i of $t) if ($t.delete(i), delete ps[i], --e <= 0) break;
80393
80392
  }
80394
80393
  return t;
80395
80394
  };
80396
- var Jn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
80397
- var to = Jn === "win32";
80398
- var eo = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
80399
- let r = e[e.length - 1];
80400
- return r !== void 0 && (i = Er(r, i)), e.push(i || "/"), e;
80395
+ var Qn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
80396
+ var Jn = Qn === "win32";
80397
+ var to = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
80398
+ let r = e.at(-1);
80399
+ return r !== void 0 && (i = pr(r, i)), e.push(i || "/"), e;
80401
80400
  }, []);
80402
- var pi = class {
80401
+ var Ei = class {
80403
80402
  #t = /* @__PURE__ */ new Map();
80404
80403
  #i = /* @__PURE__ */ new Map();
80405
80404
  #s = /* @__PURE__ */ new Set();
80406
80405
  reserve(t, e) {
80407
- t = to ? ["win32 parallelization disabled"] : t.map((r) => mt(Er(pr(r))));
80408
- let i = new Set(t.map((r) => eo(r)).reduce((r, n) => r.concat(n)));
80406
+ t = Jn ? ["win32 parallelization disabled"] : t.map((r) => mt(pr(mr(r))));
80407
+ let i = new Set(t.map((r) => to(r)).reduce((r, n) => r.concat(n)));
80409
80408
  this.#i.set(e, { dirs: i, paths: t });
80410
80409
  for (let r of t) {
80411
80410
  let n = this.#t.get(r);
@@ -80415,7 +80414,7 @@ var pi = class {
80415
80414
  let n = this.#t.get(r);
80416
80415
  if (!n) this.#t.set(r, [/* @__PURE__ */ new Set([e])]);
80417
80416
  else {
80418
- let o = n[n.length - 1];
80417
+ let o = n.at(-1);
80419
80418
  o instanceof Set ? o.add(e) : n.push(/* @__PURE__ */ new Set([e]));
80420
80419
  }
80421
80420
  }
@@ -80463,55 +80462,55 @@ var pi = class {
80463
80462
  return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
80464
80463
  }
80465
80464
  };
80466
- var wr = () => process.umask();
80467
- var Sr = /* @__PURE__ */ Symbol("onEntry");
80468
- var Ss = /* @__PURE__ */ Symbol("checkFs");
80469
- var yr = /* @__PURE__ */ Symbol("checkFs2");
80470
- var ys = /* @__PURE__ */ Symbol("isReusable");
80465
+ var Er = () => process.umask();
80466
+ var wr = /* @__PURE__ */ Symbol("onEntry");
80467
+ var ys = /* @__PURE__ */ Symbol("checkFs");
80468
+ var Sr = /* @__PURE__ */ Symbol("checkFs2");
80469
+ var Rs = /* @__PURE__ */ Symbol("isReusable");
80471
80470
  var P = /* @__PURE__ */ Symbol("makeFs");
80472
- var Rs = /* @__PURE__ */ Symbol("file");
80473
- var bs = /* @__PURE__ */ Symbol("directory");
80474
- var wi = /* @__PURE__ */ Symbol("link");
80475
- var Rr = /* @__PURE__ */ Symbol("symlink");
80476
- var br = /* @__PURE__ */ Symbol("hardlink");
80471
+ var bs = /* @__PURE__ */ Symbol("file");
80472
+ var _s = /* @__PURE__ */ Symbol("directory");
80473
+ var Si = /* @__PURE__ */ Symbol("link");
80474
+ var yr = /* @__PURE__ */ Symbol("symlink");
80475
+ var Rr = /* @__PURE__ */ Symbol("hardlink");
80477
80476
  var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
80478
- var gr = /* @__PURE__ */ Symbol("unsupported");
80477
+ var br = /* @__PURE__ */ Symbol("unsupported");
80479
80478
  var _r = /* @__PURE__ */ Symbol("checkPath");
80480
- var ps = /* @__PURE__ */ Symbol("stripAbsolutePath");
80479
+ var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
80481
80480
  var St = /* @__PURE__ */ Symbol("mkdir");
80482
80481
  var O = /* @__PURE__ */ Symbol("onError");
80483
- var Ei = /* @__PURE__ */ Symbol("pending");
80484
- var Or = /* @__PURE__ */ Symbol("pend");
80482
+ var wi = /* @__PURE__ */ Symbol("pending");
80483
+ var gr = /* @__PURE__ */ Symbol("pend");
80485
80484
  var Xt = /* @__PURE__ */ Symbol("unpend");
80486
- var Es = /* @__PURE__ */ Symbol("ended");
80487
- var ws = /* @__PURE__ */ Symbol("maybeClose");
80485
+ var ws = /* @__PURE__ */ Symbol("ended");
80486
+ var Ss = /* @__PURE__ */ Symbol("maybeClose");
80488
80487
  var gs = /* @__PURE__ */ Symbol("skip");
80489
80488
  var Re = /* @__PURE__ */ Symbol("doChown");
80490
80489
  var be = /* @__PURE__ */ Symbol("uid");
80491
- var ge = /* @__PURE__ */ Symbol("gid");
80492
- var _e = /* @__PURE__ */ Symbol("checkedCwd");
80493
- var so = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
80494
- var Oe = so === "win32";
80495
- var ro = 1024;
80496
- var no = (s3, t) => {
80490
+ var _e = /* @__PURE__ */ Symbol("gid");
80491
+ var ge = /* @__PURE__ */ Symbol("checkedCwd");
80492
+ var io = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
80493
+ var Oe = io === "win32";
80494
+ var so = 1024;
80495
+ var ro = (s3, t) => {
80497
80496
  if (!Oe) return u.unlink(s3, t);
80498
- let e = s3 + ".DELETE." + xr(16).toString("hex");
80497
+ let e = s3 + ".DELETE." + Tr(16).toString("hex");
80499
80498
  u.rename(s3, e, (i) => {
80500
80499
  if (i) return t(i);
80501
80500
  u.unlink(e, t);
80502
80501
  });
80503
80502
  };
80504
- var oo = (s3) => {
80503
+ var no = (s3) => {
80505
80504
  if (!Oe) return u.unlinkSync(s3);
80506
- let t = s3 + ".DELETE." + xr(16).toString("hex");
80505
+ let t = s3 + ".DELETE." + Tr(16).toString("hex");
80507
80506
  u.renameSync(s3, t), u.unlinkSync(t);
80508
80507
  };
80509
- var Tr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
80508
+ var Or = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
80510
80509
  var qt = class extends st {
80511
- [Es] = false;
80512
- [_e] = false;
80513
- [Ei] = 0;
80514
- reservations = new pi();
80510
+ [ws] = false;
80511
+ [ge] = false;
80512
+ [wi] = 0;
80513
+ reservations = new Ei();
80515
80514
  transform;
80516
80515
  writable = true;
80517
80516
  readable = false;
@@ -80538,30 +80537,28 @@ var qt = class extends st {
80538
80537
  chmod;
80539
80538
  constructor(t = {}) {
80540
80539
  if (t.ondone = () => {
80541
- this[Es] = true, this[ws]();
80540
+ this[ws] = true, this[Ss]();
80542
80541
  }, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
80543
80542
  if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
80544
80543
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
80545
80544
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
80546
80545
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
80547
- 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));
80546
+ this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : so, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : Er() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[wr](e));
80548
80547
  }
80549
80548
  warn(t, e, i = {}) {
80550
80549
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
80551
80550
  }
80552
- [ws]() {
80553
- this[Es] && this[Ei] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
80551
+ [Ss]() {
80552
+ this[ws] && this[wi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
80554
80553
  }
80555
- [ps](t, e) {
80554
+ [Es](t, e) {
80556
80555
  let i = t[e], { type: r } = t;
80557
80556
  if (!i || this.preservePaths) return true;
80558
- let [n, o] = ce(i), h = o.replace(/\\/g, "/").split("/");
80557
+ let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
80559
80558
  if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
80560
80559
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
80561
- {
80562
- let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, h.join("/")));
80563
- if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
80564
- }
80560
+ let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, h.join("/")));
80561
+ if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
80565
80562
  }
80566
80563
  return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
80567
80564
  }
@@ -80577,20 +80574,20 @@ var qt = class extends st {
80577
80574
  i.splice(0, this.strip), t.path = i.join("/");
80578
80575
  }
80579
80576
  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;
80580
- if (!this[ps](t, "path") || !this[ps](t, "linkpath")) return false;
80581
- 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;
80577
+ if (!this[Es](t, "path") || !this[Es](t, "linkpath")) return false;
80578
+ 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;
80582
80579
  if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
80583
80580
  if (this.win32) {
80584
80581
  let { root: r } = R.win32.parse(String(t.absolute));
80585
- t.absolute = r + $i(String(t.absolute).slice(r.length));
80582
+ t.absolute = r + Xi(String(t.absolute).slice(r.length));
80586
80583
  let { root: n } = R.win32.parse(t.path);
80587
- t.path = n + $i(t.path.slice(n.length));
80584
+ t.path = n + Xi(t.path.slice(n.length));
80588
80585
  }
80589
80586
  return true;
80590
80587
  }
80591
- [Sr](t) {
80588
+ [wr](t) {
80592
80589
  if (!this[_r](t)) return t.resume();
80593
- switch (io.equal(typeof t.absolute, "string"), t.type) {
80590
+ switch (eo.equal(typeof t.absolute, "string"), t.type) {
80594
80591
  case "Directory":
80595
80592
  case "GNUDumpDir":
80596
80593
  t.mode && (t.mode = t.mode | 448);
@@ -80599,28 +80596,28 @@ var qt = class extends st {
80599
80596
  case "ContiguousFile":
80600
80597
  case "Link":
80601
80598
  case "SymbolicLink":
80602
- return this[Ss](t);
80599
+ return this[ys](t);
80603
80600
  default:
80604
- return this[gr](t);
80601
+ return this[br](t);
80605
80602
  }
80606
80603
  }
80607
80604
  [O](t, e) {
80608
80605
  t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
80609
80606
  }
80610
80607
  [St](t, e, i) {
80611
- 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);
80608
+ cr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
80612
80609
  }
80613
80610
  [Re](t) {
80614
80611
  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;
80615
80612
  }
80616
80613
  [be](t) {
80617
- return Tr(this.uid, t.uid, this.processUid);
80614
+ return Or(this.uid, t.uid, this.processUid);
80618
80615
  }
80619
- [ge](t) {
80620
- return Tr(this.gid, t.gid, this.processGid);
80616
+ [_e](t) {
80617
+ return Or(this.gid, t.gid, this.processGid);
80621
80618
  }
80622
- [Rs](t, e) {
80623
- 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 });
80619
+ [bs](t, e) {
80620
+ 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 });
80624
80621
  r.on("error", (a) => {
80625
80622
  r.fd && u.close(r.fd, () => {
80626
80623
  }), r.write = () => true, this[O](a, t), e();
@@ -80644,7 +80641,7 @@ var qt = class extends st {
80644
80641
  }
80645
80642
  if (typeof l == "number" && this[Re](t)) {
80646
80643
  n++;
80647
- let c = this[be](t), d = this[ge](t);
80644
+ let c = this[be](t), d = this[_e](t);
80648
80645
  typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (S) => S ? u.chown(a, c, d, (T) => o(T && S)) : o());
80649
80646
  }
80650
80647
  o();
@@ -80654,7 +80651,7 @@ var qt = class extends st {
80654
80651
  this[O](a, t), e();
80655
80652
  }), t.pipe(h)), h.pipe(r);
80656
80653
  }
80657
- [bs](t, e) {
80654
+ [_s](t, e) {
80658
80655
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
80659
80656
  this[St](String(t.absolute), i, (r) => {
80660
80657
  if (r) {
@@ -80664,21 +80661,21 @@ var qt = class extends st {
80664
80661
  let n = 1, o = () => {
80665
80662
  --n === 0 && (e(), this[Xt](), t.resume());
80666
80663
  };
80667
- 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();
80664
+ 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();
80668
80665
  });
80669
80666
  }
80670
- [gr](t) {
80667
+ [br](t) {
80671
80668
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
80672
80669
  }
80673
- [Rr](t, e) {
80670
+ [yr](t, e) {
80674
80671
  let i = f(R.relative(this.cwd, R.resolve(R.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
80675
- this[ye](t, this.cwd, i, () => this[wi](t, String(t.linkpath), "symlink", e), (r) => {
80672
+ this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
80676
80673
  this[O](r, t), e();
80677
80674
  });
80678
80675
  }
80679
- [br](t, e) {
80676
+ [Rr](t, e) {
80680
80677
  let i = f(R.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
80681
- this[ye](t, this.cwd, r, () => this[wi](t, i, "link", e), (n) => {
80678
+ this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e), (n) => {
80682
80679
  this[O](n, t), e();
80683
80680
  });
80684
80681
  }
@@ -80692,24 +80689,24 @@ var qt = class extends st {
80692
80689
  this[ye](t, h, i, r, n);
80693
80690
  });
80694
80691
  }
80695
- [Or]() {
80696
- this[Ei]++;
80692
+ [gr]() {
80693
+ this[wi]++;
80697
80694
  }
80698
80695
  [Xt]() {
80699
- this[Ei]--, this[ws]();
80696
+ this[wi]--, this[Ss]();
80700
80697
  }
80701
80698
  [gs](t) {
80702
80699
  this[Xt](), t.resume();
80703
80700
  }
80704
- [ys](t, e) {
80701
+ [Rs](t, e) {
80705
80702
  return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
80706
80703
  }
80707
- [Ss](t) {
80708
- this[Or]();
80704
+ [ys](t) {
80705
+ this[gr]();
80709
80706
  let e = [t.path];
80710
- t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[yr](t, i));
80707
+ t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Sr](t, i));
80711
80708
  }
80712
- [yr](t, e) {
80709
+ [Sr](t, e) {
80713
80710
  let i = (h) => {
80714
80711
  e(h);
80715
80712
  }, r = () => {
@@ -80718,7 +80715,7 @@ var qt = class extends st {
80718
80715
  this[O](h, t), i();
80719
80716
  return;
80720
80717
  }
80721
- this[_e] = true, n();
80718
+ this[ge] = true, n();
80722
80719
  });
80723
80720
  }, n = () => {
80724
80721
  if (t.absolute !== this.cwd) {
@@ -80738,7 +80735,7 @@ var qt = class extends st {
80738
80735
  this[gs](t), i();
80739
80736
  return;
80740
80737
  }
80741
- if (h || this[ys](t, a)) return this[P](null, t, i);
80738
+ if (h || this[Rs](t, a)) return this[P](null, t, i);
80742
80739
  if (a.isDirectory()) {
80743
80740
  if (t.type === "Directory") {
80744
80741
  let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
@@ -80747,10 +80744,10 @@ var qt = class extends st {
80747
80744
  if (t.absolute !== this.cwd) return u.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
80748
80745
  }
80749
80746
  if (t.absolute === this.cwd) return this[P](null, t, i);
80750
- no(String(t.absolute), (l) => this[P](l ?? null, t, i));
80747
+ ro(String(t.absolute), (l) => this[P](l ?? null, t, i));
80751
80748
  });
80752
80749
  };
80753
- this[_e] ? n() : r();
80750
+ this[ge] ? n() : r();
80754
80751
  }
80755
80752
  [P](t, e, i) {
80756
80753
  if (t) {
@@ -80761,17 +80758,17 @@ var qt = class extends st {
80761
80758
  case "File":
80762
80759
  case "OldFile":
80763
80760
  case "ContiguousFile":
80764
- return this[Rs](e, i);
80761
+ return this[bs](e, i);
80765
80762
  case "Link":
80766
- return this[br](e, i);
80767
- case "SymbolicLink":
80768
80763
  return this[Rr](e, i);
80764
+ case "SymbolicLink":
80765
+ return this[yr](e, i);
80769
80766
  case "Directory":
80770
80767
  case "GNUDumpDir":
80771
- return this[bs](e, i);
80768
+ return this[_s](e, i);
80772
80769
  }
80773
80770
  }
80774
- [wi](t, e, i, r) {
80771
+ [Si](t, e, i, r) {
80775
80772
  u[i](e, String(t.absolute), (n) => {
80776
80773
  n ? this[O](n, t) : (this[Xt](), t.resume()), r();
80777
80774
  });
@@ -80790,11 +80787,11 @@ var Te = class extends qt {
80790
80787
  return super[P](t, e, () => {
80791
80788
  });
80792
80789
  }
80793
- [Ss](t) {
80794
- if (!this[_e]) {
80790
+ [ys](t) {
80791
+ if (!this[ge]) {
80795
80792
  let n = this[St](this.cwd, this.dmode);
80796
80793
  if (n) return this[O](n, t);
80797
- this[_e] = true;
80794
+ this[ge] = true;
80798
80795
  }
80799
80796
  if (t.absolute !== this.cwd) {
80800
80797
  let n = f(R.dirname(String(t.absolute)));
@@ -80805,7 +80802,7 @@ var Te = class extends qt {
80805
80802
  }
80806
80803
  let [e, i] = Se(() => u.lstatSync(String(t.absolute)));
80807
80804
  if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[gs](t);
80808
- if (e || this[ys](t, i)) return this[P](null, t);
80805
+ if (e || this[Rs](t, i)) return this[P](null, t);
80809
80806
  if (i.isDirectory()) {
80810
80807
  if (t.type === "Directory") {
80811
80808
  let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? Se(() => {
@@ -80816,10 +80813,10 @@ var Te = class extends qt {
80816
80813
  let [n] = Se(() => u.rmdirSync(String(t.absolute)));
80817
80814
  this[P](n, t);
80818
80815
  }
80819
- let [r] = t.absolute === this.cwd ? [] : Se(() => oo(String(t.absolute)));
80816
+ let [r] = t.absolute === this.cwd ? [] : Se(() => no(String(t.absolute)));
80820
80817
  this[P](r, t);
80821
80818
  }
80822
- [Rs](t, e) {
80819
+ [bs](t, e) {
80823
80820
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
80824
80821
  let a;
80825
80822
  try {
@@ -80830,7 +80827,7 @@ var Te = class extends qt {
80830
80827
  (h || a) && this[O](h || a, t), e();
80831
80828
  }, n;
80832
80829
  try {
80833
- n = u.openSync(String(t.absolute), ls(t.size), i);
80830
+ n = u.openSync(String(t.absolute), cs(t.size), i);
80834
80831
  } catch (h) {
80835
80832
  return r(h);
80836
80833
  }
@@ -80856,7 +80853,7 @@ var Te = class extends qt {
80856
80853
  }
80857
80854
  }
80858
80855
  if (this[Re](t)) {
80859
- let a = this[be](t), l = this[ge](t);
80856
+ let a = this[be](t), l = this[_e](t);
80860
80857
  try {
80861
80858
  u.fchownSync(n, Number(a), Number(l));
80862
80859
  } catch (c) {
@@ -80870,7 +80867,7 @@ var Te = class extends qt {
80870
80867
  r(h);
80871
80868
  });
80872
80869
  }
80873
- [bs](t, e) {
80870
+ [_s](t, e) {
80874
80871
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[St](String(t.absolute), i);
80875
80872
  if (r) {
80876
80873
  this[O](r, t), e();
@@ -80881,20 +80878,20 @@ var Te = class extends qt {
80881
80878
  } catch {
80882
80879
  }
80883
80880
  if (this[Re](t)) try {
80884
- u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[ge](t)));
80881
+ u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
80885
80882
  } catch {
80886
80883
  }
80887
80884
  e(), t.resume();
80888
80885
  }
80889
80886
  [St](t, e) {
80890
80887
  try {
80891
- 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 });
80888
+ return dr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
80892
80889
  } catch (i) {
80893
80890
  return i;
80894
80891
  }
80895
80892
  }
80896
80893
  [ye](t, e, i, r, n) {
80897
- if (this.preservePaths || !i.length) return r();
80894
+ if (this.preservePaths || i.length === 0) return r();
80898
80895
  let o = e;
80899
80896
  for (let h of i) {
80900
80897
  o = R.resolve(o, h);
@@ -80904,7 +80901,7 @@ var Te = class extends qt {
80904
80901
  }
80905
80902
  r();
80906
80903
  }
80907
- [wi](t, e, i, r) {
80904
+ [Si](t, e, i, r) {
80908
80905
  let n = `${i}Sync`;
80909
80906
  try {
80910
80907
  u[n](e, String(t.absolute)), r(), t.resume();
@@ -80913,26 +80910,26 @@ var Te = class extends qt {
80913
80910
  }
80914
80911
  }
80915
80912
  };
80916
- var ho = (s3) => {
80917
- let t = new Te(s3), e = s3.file, i = Lr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
80918
- new ve(e, { readSize: r, size: i.size }).pipe(t);
80913
+ var oo = (s3) => {
80914
+ let t = new Te(s3), e = s3.file, i = xr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
80915
+ new Me(e, { readSize: r, size: i.size }).pipe(t);
80919
80916
  };
80920
- var ao = (s3, t) => {
80917
+ var ho = (s3, t) => {
80921
80918
  let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
80922
80919
  return new Promise((o, h) => {
80923
- e.on("error", h), e.on("close", o), Lr.stat(r, (a, l) => {
80920
+ e.on("error", h), e.on("close", o), xr.stat(r, (a, l) => {
80924
80921
  if (a) h(a);
80925
80922
  else {
80926
- let c = new gt(r, { readSize: i, size: l.size });
80923
+ let c = new _t(r, { readSize: i, size: l.size });
80927
80924
  c.on("error", h), c.pipe(e);
80928
80925
  }
80929
80926
  });
80930
80927
  });
80931
80928
  };
80932
- var lo = K(ho, ao, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
80933
- t?.length && Yi(s3, t);
80929
+ var ao = K(oo, ho, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
80930
+ t?.length && Ki(s3, t);
80934
80931
  });
80935
- var co = (s3, t) => {
80932
+ var lo = (s3, t) => {
80936
80933
  let e = new kt(s3), i = true, r, n;
80937
80934
  try {
80938
80935
  try {
@@ -80953,7 +80950,7 @@ var co = (s3, t) => {
80953
80950
  if (n + l + 512 > o.size) break;
80954
80951
  n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
80955
80952
  }
80956
- i = false, fo(s3, e, n, r, t);
80953
+ i = false, co(s3, e, n, r, t);
80957
80954
  } finally {
80958
80955
  if (i) try {
80959
80956
  v.closeSync(r);
@@ -80961,11 +80958,11 @@ var co = (s3, t) => {
80961
80958
  }
80962
80959
  }
80963
80960
  };
80964
- var fo = (s3, t, e, i, r) => {
80961
+ var co = (s3, t, e, i, r) => {
80965
80962
  let n = new Wt(s3.file, { fd: i, start: e });
80966
- t.pipe(n), mo(t, r);
80963
+ t.pipe(n), uo(t, r);
80967
80964
  };
80968
- var uo = (s3, t) => {
80965
+ var fo = (s3, t) => {
80969
80966
  t = Array.from(t);
80970
80967
  let e = new Et(s3), i = (n, o, h) => {
80971
80968
  let a = (T, N) => {
@@ -80973,7 +80970,7 @@ var uo = (s3, t) => {
80973
80970
  }, l = 0;
80974
80971
  if (o === 0) return a(null, 0);
80975
80972
  let c = 0, d = Buffer.alloc(512), S = (T, N) => {
80976
- if (T || typeof N > "u") return a(T);
80973
+ if (T || N === void 0) return a(T);
80977
80974
  if (c += N, c < 512 && N) return v.read(n, d, c, d.length - c, l + c, S);
80978
80975
  if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
80979
80976
  if (c < 512) return a(null, l);
@@ -80995,38 +80992,35 @@ var uo = (s3, t) => {
80995
80992
  i(c, S.size, (T, N) => {
80996
80993
  if (T) return o(T);
80997
80994
  let E = new tt(s3.file, { fd: c, start: N });
80998
- e.pipe(E), E.on("error", o), E.on("close", n), po(e, t);
80995
+ e.pipe(E), E.on("error", o), E.on("close", n), mo(e, t);
80999
80996
  });
81000
80997
  });
81001
80998
  };
81002
80999
  v.open(s3.file, h, a);
81003
81000
  });
81004
81001
  };
81005
- var mo = (s3, t) => {
81002
+ var uo = (s3, t) => {
81006
81003
  t.forEach((e) => {
81007
- e.charAt(0) === "@" ? It({ file: Nr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
81004
+ e.charAt(0) === "@" ? It({ file: Lr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
81008
81005
  }), s3.end();
81009
81006
  };
81010
- var po = async (s3, t) => {
81011
- for (let e = 0; e < t.length; e++) {
81012
- let i = String(t[e]);
81013
- i.charAt(0) === "@" ? await It({ file: Nr.resolve(String(s3.cwd), i.slice(1)), noResume: true, onReadEntry: (r) => s3.add(r) }) : s3.add(i);
81014
- }
81007
+ var mo = async (s3, t) => {
81008
+ for (let e of t) e.charAt(0) === "@" ? await It({ file: Lr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
81015
81009
  s3.end();
81016
81010
  };
81017
- var vt = K(co, uo, () => {
81011
+ var vt = K(lo, fo, () => {
81018
81012
  throw new TypeError("file is required");
81019
81013
  }, () => {
81020
81014
  throw new TypeError("file is required");
81021
81015
  }, (s3, t) => {
81022
- if (!ks(s3)) throw new TypeError("file is required");
81016
+ if (!Fs(s3)) throw new TypeError("file is required");
81023
81017
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
81024
81018
  if (!t?.length) throw new TypeError("no paths specified to add/replace");
81025
81019
  });
81026
- var Eo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
81027
- vt.validate?.(s3, t), wo(s3);
81020
+ var po = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
81021
+ vt.validate?.(s3, t), Eo(s3);
81028
81022
  });
81029
- var wo = (s3) => {
81023
+ var Eo = (s3) => {
81030
81024
  let t = s3.filter;
81031
81025
  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));
81032
81026
  };
@@ -81217,7 +81211,7 @@ var Client = class _Client {
81217
81211
  "x-sdk-name": "Console",
81218
81212
  "x-sdk-platform": "console",
81219
81213
  "x-sdk-language": "web",
81220
- "x-sdk-version": "5.0.0",
81214
+ "x-sdk-version": "6.0.0",
81221
81215
  "X-Appwrite-Response-Format": "1.8.0"
81222
81216
  };
81223
81217
  this.realtime = {
@@ -92616,247 +92610,6 @@ var Projects = class {
92616
92610
  };
92617
92611
  return this.client.call("delete", uri, apiHeaders, payload);
92618
92612
  }
92619
- listWebhooks(paramsOrFirst, ...rest) {
92620
- let params;
92621
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92622
- params = paramsOrFirst || {};
92623
- } else {
92624
- params = {
92625
- projectId: paramsOrFirst,
92626
- total: rest[0]
92627
- };
92628
- }
92629
- const projectId = params.projectId;
92630
- const total = params.total;
92631
- if (typeof projectId === "undefined") {
92632
- throw new AppwriteException('Missing required parameter: "projectId"');
92633
- }
92634
- const apiPath = "/projects/{projectId}/webhooks".replace("{projectId}", projectId);
92635
- const payload = {};
92636
- if (typeof total !== "undefined") {
92637
- payload["total"] = total;
92638
- }
92639
- const uri = new URL(this.client.config.endpoint + apiPath);
92640
- const apiHeaders = {};
92641
- return this.client.call("get", uri, apiHeaders, payload);
92642
- }
92643
- createWebhook(paramsOrFirst, ...rest) {
92644
- let params;
92645
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92646
- params = paramsOrFirst || {};
92647
- } else {
92648
- params = {
92649
- projectId: paramsOrFirst,
92650
- name: rest[0],
92651
- events: rest[1],
92652
- url: rest[2],
92653
- security: rest[3],
92654
- enabled: rest[4],
92655
- httpUser: rest[5],
92656
- httpPass: rest[6]
92657
- };
92658
- }
92659
- const projectId = params.projectId;
92660
- const name = params.name;
92661
- const events = params.events;
92662
- const url2 = params.url;
92663
- const security = params.security;
92664
- const enabled = params.enabled;
92665
- const httpUser = params.httpUser;
92666
- const httpPass = params.httpPass;
92667
- if (typeof projectId === "undefined") {
92668
- throw new AppwriteException('Missing required parameter: "projectId"');
92669
- }
92670
- if (typeof name === "undefined") {
92671
- throw new AppwriteException('Missing required parameter: "name"');
92672
- }
92673
- if (typeof events === "undefined") {
92674
- throw new AppwriteException('Missing required parameter: "events"');
92675
- }
92676
- if (typeof url2 === "undefined") {
92677
- throw new AppwriteException('Missing required parameter: "url"');
92678
- }
92679
- if (typeof security === "undefined") {
92680
- throw new AppwriteException('Missing required parameter: "security"');
92681
- }
92682
- const apiPath = "/projects/{projectId}/webhooks".replace("{projectId}", projectId);
92683
- const payload = {};
92684
- if (typeof name !== "undefined") {
92685
- payload["name"] = name;
92686
- }
92687
- if (typeof enabled !== "undefined") {
92688
- payload["enabled"] = enabled;
92689
- }
92690
- if (typeof events !== "undefined") {
92691
- payload["events"] = events;
92692
- }
92693
- if (typeof url2 !== "undefined") {
92694
- payload["url"] = url2;
92695
- }
92696
- if (typeof security !== "undefined") {
92697
- payload["security"] = security;
92698
- }
92699
- if (typeof httpUser !== "undefined") {
92700
- payload["httpUser"] = httpUser;
92701
- }
92702
- if (typeof httpPass !== "undefined") {
92703
- payload["httpPass"] = httpPass;
92704
- }
92705
- const uri = new URL(this.client.config.endpoint + apiPath);
92706
- const apiHeaders = {
92707
- "content-type": "application/json"
92708
- };
92709
- return this.client.call("post", uri, apiHeaders, payload);
92710
- }
92711
- getWebhook(paramsOrFirst, ...rest) {
92712
- let params;
92713
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92714
- params = paramsOrFirst || {};
92715
- } else {
92716
- params = {
92717
- projectId: paramsOrFirst,
92718
- webhookId: rest[0]
92719
- };
92720
- }
92721
- const projectId = params.projectId;
92722
- const webhookId = params.webhookId;
92723
- if (typeof projectId === "undefined") {
92724
- throw new AppwriteException('Missing required parameter: "projectId"');
92725
- }
92726
- if (typeof webhookId === "undefined") {
92727
- throw new AppwriteException('Missing required parameter: "webhookId"');
92728
- }
92729
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
92730
- const payload = {};
92731
- const uri = new URL(this.client.config.endpoint + apiPath);
92732
- const apiHeaders = {};
92733
- return this.client.call("get", uri, apiHeaders, payload);
92734
- }
92735
- updateWebhook(paramsOrFirst, ...rest) {
92736
- let params;
92737
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92738
- params = paramsOrFirst || {};
92739
- } else {
92740
- params = {
92741
- projectId: paramsOrFirst,
92742
- webhookId: rest[0],
92743
- name: rest[1],
92744
- events: rest[2],
92745
- url: rest[3],
92746
- security: rest[4],
92747
- enabled: rest[5],
92748
- httpUser: rest[6],
92749
- httpPass: rest[7]
92750
- };
92751
- }
92752
- const projectId = params.projectId;
92753
- const webhookId = params.webhookId;
92754
- const name = params.name;
92755
- const events = params.events;
92756
- const url2 = params.url;
92757
- const security = params.security;
92758
- const enabled = params.enabled;
92759
- const httpUser = params.httpUser;
92760
- const httpPass = params.httpPass;
92761
- if (typeof projectId === "undefined") {
92762
- throw new AppwriteException('Missing required parameter: "projectId"');
92763
- }
92764
- if (typeof webhookId === "undefined") {
92765
- throw new AppwriteException('Missing required parameter: "webhookId"');
92766
- }
92767
- if (typeof name === "undefined") {
92768
- throw new AppwriteException('Missing required parameter: "name"');
92769
- }
92770
- if (typeof events === "undefined") {
92771
- throw new AppwriteException('Missing required parameter: "events"');
92772
- }
92773
- if (typeof url2 === "undefined") {
92774
- throw new AppwriteException('Missing required parameter: "url"');
92775
- }
92776
- if (typeof security === "undefined") {
92777
- throw new AppwriteException('Missing required parameter: "security"');
92778
- }
92779
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
92780
- const payload = {};
92781
- if (typeof name !== "undefined") {
92782
- payload["name"] = name;
92783
- }
92784
- if (typeof enabled !== "undefined") {
92785
- payload["enabled"] = enabled;
92786
- }
92787
- if (typeof events !== "undefined") {
92788
- payload["events"] = events;
92789
- }
92790
- if (typeof url2 !== "undefined") {
92791
- payload["url"] = url2;
92792
- }
92793
- if (typeof security !== "undefined") {
92794
- payload["security"] = security;
92795
- }
92796
- if (typeof httpUser !== "undefined") {
92797
- payload["httpUser"] = httpUser;
92798
- }
92799
- if (typeof httpPass !== "undefined") {
92800
- payload["httpPass"] = httpPass;
92801
- }
92802
- const uri = new URL(this.client.config.endpoint + apiPath);
92803
- const apiHeaders = {
92804
- "content-type": "application/json"
92805
- };
92806
- return this.client.call("put", uri, apiHeaders, payload);
92807
- }
92808
- deleteWebhook(paramsOrFirst, ...rest) {
92809
- let params;
92810
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92811
- params = paramsOrFirst || {};
92812
- } else {
92813
- params = {
92814
- projectId: paramsOrFirst,
92815
- webhookId: rest[0]
92816
- };
92817
- }
92818
- const projectId = params.projectId;
92819
- const webhookId = params.webhookId;
92820
- if (typeof projectId === "undefined") {
92821
- throw new AppwriteException('Missing required parameter: "projectId"');
92822
- }
92823
- if (typeof webhookId === "undefined") {
92824
- throw new AppwriteException('Missing required parameter: "webhookId"');
92825
- }
92826
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
92827
- const payload = {};
92828
- const uri = new URL(this.client.config.endpoint + apiPath);
92829
- const apiHeaders = {
92830
- "content-type": "application/json"
92831
- };
92832
- return this.client.call("delete", uri, apiHeaders, payload);
92833
- }
92834
- updateWebhookSignature(paramsOrFirst, ...rest) {
92835
- let params;
92836
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
92837
- params = paramsOrFirst || {};
92838
- } else {
92839
- params = {
92840
- projectId: paramsOrFirst,
92841
- webhookId: rest[0]
92842
- };
92843
- }
92844
- const projectId = params.projectId;
92845
- const webhookId = params.webhookId;
92846
- if (typeof projectId === "undefined") {
92847
- throw new AppwriteException('Missing required parameter: "projectId"');
92848
- }
92849
- if (typeof webhookId === "undefined") {
92850
- throw new AppwriteException('Missing required parameter: "webhookId"');
92851
- }
92852
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}/signature".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
92853
- const payload = {};
92854
- const uri = new URL(this.client.config.endpoint + apiPath);
92855
- const apiHeaders = {
92856
- "content-type": "application/json"
92857
- };
92858
- return this.client.call("patch", uri, apiHeaders, payload);
92859
- }
92860
92613
  };
92861
92614
  var Proxy2 = class {
92862
92615
  constructor(client) {
@@ -98648,6 +98401,8 @@ var Scopes;
98648
98401
  Scopes2["AssistantRead"] = "assistant.read";
98649
98402
  Scopes2["TokensRead"] = "tokens.read";
98650
98403
  Scopes2["TokensWrite"] = "tokens.write";
98404
+ Scopes2["WebhooksRead"] = "webhooks.read";
98405
+ Scopes2["WebhooksWrite"] = "webhooks.write";
98651
98406
  Scopes2["PoliciesWrite"] = "policies.write";
98652
98407
  Scopes2["PoliciesRead"] = "policies.read";
98653
98408
  Scopes2["ArchivesRead"] = "archives.read";
@@ -99497,9 +99252,6 @@ var Runtime;
99497
99252
  Runtime2["Pythonml311"] = "python-ml-3.11";
99498
99253
  Runtime2["Pythonml312"] = "python-ml-3.12";
99499
99254
  Runtime2["Pythonml313"] = "python-ml-3.13";
99500
- Runtime2["Deno121"] = "deno-1.21";
99501
- Runtime2["Deno124"] = "deno-1.24";
99502
- Runtime2["Deno135"] = "deno-1.35";
99503
99255
  Runtime2["Deno140"] = "deno-1.40";
99504
99256
  Runtime2["Deno146"] = "deno-1.46";
99505
99257
  Runtime2["Deno20"] = "deno-2.0";
@@ -99555,6 +99307,92 @@ var Runtime;
99555
99307
  Runtime2["Flutter332"] = "flutter-3.32";
99556
99308
  Runtime2["Flutter335"] = "flutter-3.35";
99557
99309
  Runtime2["Flutter338"] = "flutter-3.38";
99310
+ Runtime2["Node145rc"] = "node-14.5-rc";
99311
+ Runtime2["Node160rc"] = "node-16.0-rc";
99312
+ Runtime2["Node180rc"] = "node-18.0-rc";
99313
+ Runtime2["Node190rc"] = "node-19.0-rc";
99314
+ Runtime2["Node200rc"] = "node-20.0-rc";
99315
+ Runtime2["Node210rc"] = "node-21.0-rc";
99316
+ Runtime2["Node22rc"] = "node-22-rc";
99317
+ Runtime2["Node23rc"] = "node-23-rc";
99318
+ Runtime2["Node24rc"] = "node-24-rc";
99319
+ Runtime2["Node25rc"] = "node-25-rc";
99320
+ Runtime2["Php80rc"] = "php-8.0-rc";
99321
+ Runtime2["Php81rc"] = "php-8.1-rc";
99322
+ Runtime2["Php82rc"] = "php-8.2-rc";
99323
+ Runtime2["Php83rc"] = "php-8.3-rc";
99324
+ Runtime2["Php84rc"] = "php-8.4-rc";
99325
+ Runtime2["Ruby30rc"] = "ruby-3.0-rc";
99326
+ Runtime2["Ruby31rc"] = "ruby-3.1-rc";
99327
+ Runtime2["Ruby32rc"] = "ruby-3.2-rc";
99328
+ Runtime2["Ruby33rc"] = "ruby-3.3-rc";
99329
+ Runtime2["Ruby34rc"] = "ruby-3.4-rc";
99330
+ Runtime2["Ruby40rc"] = "ruby-4.0-rc";
99331
+ Runtime2["Python38rc"] = "python-3.8-rc";
99332
+ Runtime2["Python39rc"] = "python-3.9-rc";
99333
+ Runtime2["Python310rc"] = "python-3.10-rc";
99334
+ Runtime2["Python311rc"] = "python-3.11-rc";
99335
+ Runtime2["Python312rc"] = "python-3.12-rc";
99336
+ Runtime2["Python313rc"] = "python-3.13-rc";
99337
+ Runtime2["Python314rc"] = "python-3.14-rc";
99338
+ Runtime2["Pythonml311rc"] = "python-ml-3.11-rc";
99339
+ Runtime2["Pythonml312rc"] = "python-ml-3.12-rc";
99340
+ Runtime2["Pythonml313rc"] = "python-ml-3.13-rc";
99341
+ Runtime2["Deno140rc"] = "deno-1.40-rc";
99342
+ Runtime2["Deno146rc"] = "deno-1.46-rc";
99343
+ Runtime2["Deno20rc"] = "deno-2.0-rc";
99344
+ Runtime2["Deno25rc"] = "deno-2.5-rc";
99345
+ Runtime2["Deno26rc"] = "deno-2.6-rc";
99346
+ Runtime2["Dart215rc"] = "dart-2.15-rc";
99347
+ Runtime2["Dart216rc"] = "dart-2.16-rc";
99348
+ Runtime2["Dart217rc"] = "dart-2.17-rc";
99349
+ Runtime2["Dart218rc"] = "dart-2.18-rc";
99350
+ Runtime2["Dart219rc"] = "dart-2.19-rc";
99351
+ Runtime2["Dart30rc"] = "dart-3.0-rc";
99352
+ Runtime2["Dart31rc"] = "dart-3.1-rc";
99353
+ Runtime2["Dart33rc"] = "dart-3.3-rc";
99354
+ Runtime2["Dart35rc"] = "dart-3.5-rc";
99355
+ Runtime2["Dart38rc"] = "dart-3.8-rc";
99356
+ Runtime2["Dart39rc"] = "dart-3.9-rc";
99357
+ Runtime2["Dart310rc"] = "dart-3.10-rc";
99358
+ Runtime2["Dotnet60rc"] = "dotnet-6.0-rc";
99359
+ Runtime2["Dotnet70rc"] = "dotnet-7.0-rc";
99360
+ Runtime2["Dotnet80rc"] = "dotnet-8.0-rc";
99361
+ Runtime2["Dotnet10rc"] = "dotnet-10-rc";
99362
+ Runtime2["Java80rc"] = "java-8.0-rc";
99363
+ Runtime2["Java110rc"] = "java-11.0-rc";
99364
+ Runtime2["Java170rc"] = "java-17.0-rc";
99365
+ Runtime2["Java180rc"] = "java-18.0-rc";
99366
+ Runtime2["Java210rc"] = "java-21.0-rc";
99367
+ Runtime2["Java22rc"] = "java-22-rc";
99368
+ Runtime2["Java25rc"] = "java-25-rc";
99369
+ Runtime2["Swift55rc"] = "swift-5.5-rc";
99370
+ Runtime2["Swift58rc"] = "swift-5.8-rc";
99371
+ Runtime2["Swift59rc"] = "swift-5.9-rc";
99372
+ Runtime2["Swift510rc"] = "swift-5.10-rc";
99373
+ Runtime2["Swift62rc"] = "swift-6.2-rc";
99374
+ Runtime2["Kotlin16rc"] = "kotlin-1.6-rc";
99375
+ Runtime2["Kotlin18rc"] = "kotlin-1.8-rc";
99376
+ Runtime2["Kotlin19rc"] = "kotlin-1.9-rc";
99377
+ Runtime2["Kotlin20rc"] = "kotlin-2.0-rc";
99378
+ Runtime2["Kotlin23rc"] = "kotlin-2.3-rc";
99379
+ Runtime2["Cpp17rc"] = "cpp-17-rc";
99380
+ Runtime2["Cpp20rc"] = "cpp-20-rc";
99381
+ Runtime2["Bun10rc"] = "bun-1.0-rc";
99382
+ Runtime2["Bun11rc"] = "bun-1.1-rc";
99383
+ Runtime2["Bun12rc"] = "bun-1.2-rc";
99384
+ Runtime2["Bun13rc"] = "bun-1.3-rc";
99385
+ Runtime2["Go123rc"] = "go-1.23-rc";
99386
+ Runtime2["Go124rc"] = "go-1.24-rc";
99387
+ Runtime2["Go125rc"] = "go-1.25-rc";
99388
+ Runtime2["Go126rc"] = "go-1.26-rc";
99389
+ Runtime2["Static1rc"] = "static-1-rc";
99390
+ Runtime2["Flutter324rc"] = "flutter-3.24-rc";
99391
+ Runtime2["Flutter327rc"] = "flutter-3.27-rc";
99392
+ Runtime2["Flutter329rc"] = "flutter-3.29-rc";
99393
+ Runtime2["Flutter332rc"] = "flutter-3.32-rc";
99394
+ Runtime2["Flutter335rc"] = "flutter-3.35-rc";
99395
+ Runtime2["Flutter338rc"] = "flutter-3.38-rc";
99558
99396
  })(Runtime || (Runtime = {}));
99559
99397
  var Runtimes;
99560
99398
  (function(Runtimes2) {
@@ -99589,9 +99427,6 @@ var Runtimes;
99589
99427
  Runtimes2["Pythonml311"] = "python-ml-3.11";
99590
99428
  Runtimes2["Pythonml312"] = "python-ml-3.12";
99591
99429
  Runtimes2["Pythonml313"] = "python-ml-3.13";
99592
- Runtimes2["Deno121"] = "deno-1.21";
99593
- Runtimes2["Deno124"] = "deno-1.24";
99594
- Runtimes2["Deno135"] = "deno-1.35";
99595
99430
  Runtimes2["Deno140"] = "deno-1.40";
99596
99431
  Runtimes2["Deno146"] = "deno-1.46";
99597
99432
  Runtimes2["Deno20"] = "deno-2.0";
@@ -99647,6 +99482,92 @@ var Runtimes;
99647
99482
  Runtimes2["Flutter332"] = "flutter-3.32";
99648
99483
  Runtimes2["Flutter335"] = "flutter-3.35";
99649
99484
  Runtimes2["Flutter338"] = "flutter-3.38";
99485
+ Runtimes2["Node145rc"] = "node-14.5-rc";
99486
+ Runtimes2["Node160rc"] = "node-16.0-rc";
99487
+ Runtimes2["Node180rc"] = "node-18.0-rc";
99488
+ Runtimes2["Node190rc"] = "node-19.0-rc";
99489
+ Runtimes2["Node200rc"] = "node-20.0-rc";
99490
+ Runtimes2["Node210rc"] = "node-21.0-rc";
99491
+ Runtimes2["Node22rc"] = "node-22-rc";
99492
+ Runtimes2["Node23rc"] = "node-23-rc";
99493
+ Runtimes2["Node24rc"] = "node-24-rc";
99494
+ Runtimes2["Node25rc"] = "node-25-rc";
99495
+ Runtimes2["Php80rc"] = "php-8.0-rc";
99496
+ Runtimes2["Php81rc"] = "php-8.1-rc";
99497
+ Runtimes2["Php82rc"] = "php-8.2-rc";
99498
+ Runtimes2["Php83rc"] = "php-8.3-rc";
99499
+ Runtimes2["Php84rc"] = "php-8.4-rc";
99500
+ Runtimes2["Ruby30rc"] = "ruby-3.0-rc";
99501
+ Runtimes2["Ruby31rc"] = "ruby-3.1-rc";
99502
+ Runtimes2["Ruby32rc"] = "ruby-3.2-rc";
99503
+ Runtimes2["Ruby33rc"] = "ruby-3.3-rc";
99504
+ Runtimes2["Ruby34rc"] = "ruby-3.4-rc";
99505
+ Runtimes2["Ruby40rc"] = "ruby-4.0-rc";
99506
+ Runtimes2["Python38rc"] = "python-3.8-rc";
99507
+ Runtimes2["Python39rc"] = "python-3.9-rc";
99508
+ Runtimes2["Python310rc"] = "python-3.10-rc";
99509
+ Runtimes2["Python311rc"] = "python-3.11-rc";
99510
+ Runtimes2["Python312rc"] = "python-3.12-rc";
99511
+ Runtimes2["Python313rc"] = "python-3.13-rc";
99512
+ Runtimes2["Python314rc"] = "python-3.14-rc";
99513
+ Runtimes2["Pythonml311rc"] = "python-ml-3.11-rc";
99514
+ Runtimes2["Pythonml312rc"] = "python-ml-3.12-rc";
99515
+ Runtimes2["Pythonml313rc"] = "python-ml-3.13-rc";
99516
+ Runtimes2["Deno140rc"] = "deno-1.40-rc";
99517
+ Runtimes2["Deno146rc"] = "deno-1.46-rc";
99518
+ Runtimes2["Deno20rc"] = "deno-2.0-rc";
99519
+ Runtimes2["Deno25rc"] = "deno-2.5-rc";
99520
+ Runtimes2["Deno26rc"] = "deno-2.6-rc";
99521
+ Runtimes2["Dart215rc"] = "dart-2.15-rc";
99522
+ Runtimes2["Dart216rc"] = "dart-2.16-rc";
99523
+ Runtimes2["Dart217rc"] = "dart-2.17-rc";
99524
+ Runtimes2["Dart218rc"] = "dart-2.18-rc";
99525
+ Runtimes2["Dart219rc"] = "dart-2.19-rc";
99526
+ Runtimes2["Dart30rc"] = "dart-3.0-rc";
99527
+ Runtimes2["Dart31rc"] = "dart-3.1-rc";
99528
+ Runtimes2["Dart33rc"] = "dart-3.3-rc";
99529
+ Runtimes2["Dart35rc"] = "dart-3.5-rc";
99530
+ Runtimes2["Dart38rc"] = "dart-3.8-rc";
99531
+ Runtimes2["Dart39rc"] = "dart-3.9-rc";
99532
+ Runtimes2["Dart310rc"] = "dart-3.10-rc";
99533
+ Runtimes2["Dotnet60rc"] = "dotnet-6.0-rc";
99534
+ Runtimes2["Dotnet70rc"] = "dotnet-7.0-rc";
99535
+ Runtimes2["Dotnet80rc"] = "dotnet-8.0-rc";
99536
+ Runtimes2["Dotnet10rc"] = "dotnet-10-rc";
99537
+ Runtimes2["Java80rc"] = "java-8.0-rc";
99538
+ Runtimes2["Java110rc"] = "java-11.0-rc";
99539
+ Runtimes2["Java170rc"] = "java-17.0-rc";
99540
+ Runtimes2["Java180rc"] = "java-18.0-rc";
99541
+ Runtimes2["Java210rc"] = "java-21.0-rc";
99542
+ Runtimes2["Java22rc"] = "java-22-rc";
99543
+ Runtimes2["Java25rc"] = "java-25-rc";
99544
+ Runtimes2["Swift55rc"] = "swift-5.5-rc";
99545
+ Runtimes2["Swift58rc"] = "swift-5.8-rc";
99546
+ Runtimes2["Swift59rc"] = "swift-5.9-rc";
99547
+ Runtimes2["Swift510rc"] = "swift-5.10-rc";
99548
+ Runtimes2["Swift62rc"] = "swift-6.2-rc";
99549
+ Runtimes2["Kotlin16rc"] = "kotlin-1.6-rc";
99550
+ Runtimes2["Kotlin18rc"] = "kotlin-1.8-rc";
99551
+ Runtimes2["Kotlin19rc"] = "kotlin-1.9-rc";
99552
+ Runtimes2["Kotlin20rc"] = "kotlin-2.0-rc";
99553
+ Runtimes2["Kotlin23rc"] = "kotlin-2.3-rc";
99554
+ Runtimes2["Cpp17rc"] = "cpp-17-rc";
99555
+ Runtimes2["Cpp20rc"] = "cpp-20-rc";
99556
+ Runtimes2["Bun10rc"] = "bun-1.0-rc";
99557
+ Runtimes2["Bun11rc"] = "bun-1.1-rc";
99558
+ Runtimes2["Bun12rc"] = "bun-1.2-rc";
99559
+ Runtimes2["Bun13rc"] = "bun-1.3-rc";
99560
+ Runtimes2["Go123rc"] = "go-1.23-rc";
99561
+ Runtimes2["Go124rc"] = "go-1.24-rc";
99562
+ Runtimes2["Go125rc"] = "go-1.25-rc";
99563
+ Runtimes2["Go126rc"] = "go-1.26-rc";
99564
+ Runtimes2["Static1rc"] = "static-1-rc";
99565
+ Runtimes2["Flutter324rc"] = "flutter-3.24-rc";
99566
+ Runtimes2["Flutter327rc"] = "flutter-3.27-rc";
99567
+ Runtimes2["Flutter329rc"] = "flutter-3.29-rc";
99568
+ Runtimes2["Flutter332rc"] = "flutter-3.32-rc";
99569
+ Runtimes2["Flutter335rc"] = "flutter-3.35-rc";
99570
+ Runtimes2["Flutter338rc"] = "flutter-3.38-rc";
99650
99571
  })(Runtimes || (Runtimes = {}));
99651
99572
  var UseCases;
99652
99573
  (function(UseCases2) {
@@ -100209,9 +100130,6 @@ var BuildRuntime;
100209
100130
  BuildRuntime2["Pythonml311"] = "python-ml-3.11";
100210
100131
  BuildRuntime2["Pythonml312"] = "python-ml-3.12";
100211
100132
  BuildRuntime2["Pythonml313"] = "python-ml-3.13";
100212
- BuildRuntime2["Deno121"] = "deno-1.21";
100213
- BuildRuntime2["Deno124"] = "deno-1.24";
100214
- BuildRuntime2["Deno135"] = "deno-1.35";
100215
100133
  BuildRuntime2["Deno140"] = "deno-1.40";
100216
100134
  BuildRuntime2["Deno146"] = "deno-1.46";
100217
100135
  BuildRuntime2["Deno20"] = "deno-2.0";
@@ -100267,6 +100185,92 @@ var BuildRuntime;
100267
100185
  BuildRuntime2["Flutter332"] = "flutter-3.32";
100268
100186
  BuildRuntime2["Flutter335"] = "flutter-3.35";
100269
100187
  BuildRuntime2["Flutter338"] = "flutter-3.38";
100188
+ BuildRuntime2["Node145rc"] = "node-14.5-rc";
100189
+ BuildRuntime2["Node160rc"] = "node-16.0-rc";
100190
+ BuildRuntime2["Node180rc"] = "node-18.0-rc";
100191
+ BuildRuntime2["Node190rc"] = "node-19.0-rc";
100192
+ BuildRuntime2["Node200rc"] = "node-20.0-rc";
100193
+ BuildRuntime2["Node210rc"] = "node-21.0-rc";
100194
+ BuildRuntime2["Node22rc"] = "node-22-rc";
100195
+ BuildRuntime2["Node23rc"] = "node-23-rc";
100196
+ BuildRuntime2["Node24rc"] = "node-24-rc";
100197
+ BuildRuntime2["Node25rc"] = "node-25-rc";
100198
+ BuildRuntime2["Php80rc"] = "php-8.0-rc";
100199
+ BuildRuntime2["Php81rc"] = "php-8.1-rc";
100200
+ BuildRuntime2["Php82rc"] = "php-8.2-rc";
100201
+ BuildRuntime2["Php83rc"] = "php-8.3-rc";
100202
+ BuildRuntime2["Php84rc"] = "php-8.4-rc";
100203
+ BuildRuntime2["Ruby30rc"] = "ruby-3.0-rc";
100204
+ BuildRuntime2["Ruby31rc"] = "ruby-3.1-rc";
100205
+ BuildRuntime2["Ruby32rc"] = "ruby-3.2-rc";
100206
+ BuildRuntime2["Ruby33rc"] = "ruby-3.3-rc";
100207
+ BuildRuntime2["Ruby34rc"] = "ruby-3.4-rc";
100208
+ BuildRuntime2["Ruby40rc"] = "ruby-4.0-rc";
100209
+ BuildRuntime2["Python38rc"] = "python-3.8-rc";
100210
+ BuildRuntime2["Python39rc"] = "python-3.9-rc";
100211
+ BuildRuntime2["Python310rc"] = "python-3.10-rc";
100212
+ BuildRuntime2["Python311rc"] = "python-3.11-rc";
100213
+ BuildRuntime2["Python312rc"] = "python-3.12-rc";
100214
+ BuildRuntime2["Python313rc"] = "python-3.13-rc";
100215
+ BuildRuntime2["Python314rc"] = "python-3.14-rc";
100216
+ BuildRuntime2["Pythonml311rc"] = "python-ml-3.11-rc";
100217
+ BuildRuntime2["Pythonml312rc"] = "python-ml-3.12-rc";
100218
+ BuildRuntime2["Pythonml313rc"] = "python-ml-3.13-rc";
100219
+ BuildRuntime2["Deno140rc"] = "deno-1.40-rc";
100220
+ BuildRuntime2["Deno146rc"] = "deno-1.46-rc";
100221
+ BuildRuntime2["Deno20rc"] = "deno-2.0-rc";
100222
+ BuildRuntime2["Deno25rc"] = "deno-2.5-rc";
100223
+ BuildRuntime2["Deno26rc"] = "deno-2.6-rc";
100224
+ BuildRuntime2["Dart215rc"] = "dart-2.15-rc";
100225
+ BuildRuntime2["Dart216rc"] = "dart-2.16-rc";
100226
+ BuildRuntime2["Dart217rc"] = "dart-2.17-rc";
100227
+ BuildRuntime2["Dart218rc"] = "dart-2.18-rc";
100228
+ BuildRuntime2["Dart219rc"] = "dart-2.19-rc";
100229
+ BuildRuntime2["Dart30rc"] = "dart-3.0-rc";
100230
+ BuildRuntime2["Dart31rc"] = "dart-3.1-rc";
100231
+ BuildRuntime2["Dart33rc"] = "dart-3.3-rc";
100232
+ BuildRuntime2["Dart35rc"] = "dart-3.5-rc";
100233
+ BuildRuntime2["Dart38rc"] = "dart-3.8-rc";
100234
+ BuildRuntime2["Dart39rc"] = "dart-3.9-rc";
100235
+ BuildRuntime2["Dart310rc"] = "dart-3.10-rc";
100236
+ BuildRuntime2["Dotnet60rc"] = "dotnet-6.0-rc";
100237
+ BuildRuntime2["Dotnet70rc"] = "dotnet-7.0-rc";
100238
+ BuildRuntime2["Dotnet80rc"] = "dotnet-8.0-rc";
100239
+ BuildRuntime2["Dotnet10rc"] = "dotnet-10-rc";
100240
+ BuildRuntime2["Java80rc"] = "java-8.0-rc";
100241
+ BuildRuntime2["Java110rc"] = "java-11.0-rc";
100242
+ BuildRuntime2["Java170rc"] = "java-17.0-rc";
100243
+ BuildRuntime2["Java180rc"] = "java-18.0-rc";
100244
+ BuildRuntime2["Java210rc"] = "java-21.0-rc";
100245
+ BuildRuntime2["Java22rc"] = "java-22-rc";
100246
+ BuildRuntime2["Java25rc"] = "java-25-rc";
100247
+ BuildRuntime2["Swift55rc"] = "swift-5.5-rc";
100248
+ BuildRuntime2["Swift58rc"] = "swift-5.8-rc";
100249
+ BuildRuntime2["Swift59rc"] = "swift-5.9-rc";
100250
+ BuildRuntime2["Swift510rc"] = "swift-5.10-rc";
100251
+ BuildRuntime2["Swift62rc"] = "swift-6.2-rc";
100252
+ BuildRuntime2["Kotlin16rc"] = "kotlin-1.6-rc";
100253
+ BuildRuntime2["Kotlin18rc"] = "kotlin-1.8-rc";
100254
+ BuildRuntime2["Kotlin19rc"] = "kotlin-1.9-rc";
100255
+ BuildRuntime2["Kotlin20rc"] = "kotlin-2.0-rc";
100256
+ BuildRuntime2["Kotlin23rc"] = "kotlin-2.3-rc";
100257
+ BuildRuntime2["Cpp17rc"] = "cpp-17-rc";
100258
+ BuildRuntime2["Cpp20rc"] = "cpp-20-rc";
100259
+ BuildRuntime2["Bun10rc"] = "bun-1.0-rc";
100260
+ BuildRuntime2["Bun11rc"] = "bun-1.1-rc";
100261
+ BuildRuntime2["Bun12rc"] = "bun-1.2-rc";
100262
+ BuildRuntime2["Bun13rc"] = "bun-1.3-rc";
100263
+ BuildRuntime2["Go123rc"] = "go-1.23-rc";
100264
+ BuildRuntime2["Go124rc"] = "go-1.24-rc";
100265
+ BuildRuntime2["Go125rc"] = "go-1.25-rc";
100266
+ BuildRuntime2["Go126rc"] = "go-1.26-rc";
100267
+ BuildRuntime2["Static1rc"] = "static-1-rc";
100268
+ BuildRuntime2["Flutter324rc"] = "flutter-3.24-rc";
100269
+ BuildRuntime2["Flutter327rc"] = "flutter-3.27-rc";
100270
+ BuildRuntime2["Flutter329rc"] = "flutter-3.29-rc";
100271
+ BuildRuntime2["Flutter332rc"] = "flutter-3.32-rc";
100272
+ BuildRuntime2["Flutter335rc"] = "flutter-3.35-rc";
100273
+ BuildRuntime2["Flutter338rc"] = "flutter-3.38-rc";
100270
100274
  })(BuildRuntime || (BuildRuntime = {}));
100271
100275
  var Adapter;
100272
100276
  (function(Adapter2) {
@@ -100423,28 +100427,24 @@ var BillingPlanGroup;
100423
100427
  BillingPlanGroup2["Pro"] = "pro";
100424
100428
  BillingPlanGroup2["Scale"] = "scale";
100425
100429
  })(BillingPlanGroup || (BillingPlanGroup = {}));
100426
- var DomainPurchasePaymentStatus;
100427
- (function(DomainPurchasePaymentStatus2) {
100428
- DomainPurchasePaymentStatus2["Pending"] = "pending";
100429
- DomainPurchasePaymentStatus2["PendingConfirmation"] = "pending_confirmation";
100430
- DomainPurchasePaymentStatus2["PendingPaymentProcessing"] = "pending_payment_processing";
100431
- DomainPurchasePaymentStatus2["Authorized"] = "authorized";
100432
- DomainPurchasePaymentStatus2["Captured"] = "captured";
100433
- DomainPurchasePaymentStatus2["Failed"] = "failed";
100434
- DomainPurchasePaymentStatus2["CaptureFailed"] = "capture_failed";
100435
- DomainPurchasePaymentStatus2["RenewalCaptureFailed"] = "renewal_capture_failed";
100436
- })(DomainPurchasePaymentStatus || (DomainPurchasePaymentStatus = {}));
100437
- var DomainTransferStatusStatus;
100438
- (function(DomainTransferStatusStatus2) {
100439
- DomainTransferStatusStatus2["Transferrable"] = "transferrable";
100440
- DomainTransferStatusStatus2["NotTransferrable"] = "not_transferrable";
100441
- DomainTransferStatusStatus2["PendingOwner"] = "pending_owner";
100442
- DomainTransferStatusStatus2["PendingAdmin"] = "pending_admin";
100443
- DomainTransferStatusStatus2["PendingRegistry"] = "pending_registry";
100444
- DomainTransferStatusStatus2["Completed"] = "completed";
100445
- DomainTransferStatusStatus2["Cancelled"] = "cancelled";
100446
- DomainTransferStatusStatus2["ServiceUnavailable"] = "service_unavailable";
100447
- })(DomainTransferStatusStatus || (DomainTransferStatusStatus = {}));
100430
+ var DomainTransferStatusEnum;
100431
+ (function(DomainTransferStatusEnum2) {
100432
+ DomainTransferStatusEnum2["Transferrable"] = "transferrable";
100433
+ DomainTransferStatusEnum2["NotTransferrable"] = "not_transferrable";
100434
+ DomainTransferStatusEnum2["PendingOwner"] = "pending_owner";
100435
+ DomainTransferStatusEnum2["PendingAdmin"] = "pending_admin";
100436
+ DomainTransferStatusEnum2["PendingRegistry"] = "pending_registry";
100437
+ DomainTransferStatusEnum2["Completed"] = "completed";
100438
+ DomainTransferStatusEnum2["Cancelled"] = "cancelled";
100439
+ DomainTransferStatusEnum2["ServiceUnavailable"] = "service_unavailable";
100440
+ })(DomainTransferStatusEnum || (DomainTransferStatusEnum = {}));
100441
+ var DomainPurchaseStatus;
100442
+ (function(DomainPurchaseStatus2) {
100443
+ DomainPurchaseStatus2["Pending"] = "pending";
100444
+ DomainPurchaseStatus2["Succeeded"] = "succeeded";
100445
+ DomainPurchaseStatus2["Failed"] = "failed";
100446
+ DomainPurchaseStatus2["Cancelled"] = "cancelled";
100447
+ })(DomainPurchaseStatus || (DomainPurchaseStatus = {}));
100448
100448
 
100449
100449
  // lib/parser.ts
100450
100450
  var import_chalk2 = __toESM(require_source(), 1);
@@ -100456,7 +100456,7 @@ var package_default = {
100456
100456
  type: "module",
100457
100457
  homepage: "https://appwrite.io/support",
100458
100458
  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",
100459
- version: "15.0.0",
100459
+ version: "16.0.0",
100460
100460
  license: "BSD-3-Clause",
100461
100461
  main: "dist/index.cjs",
100462
100462
  module: "dist/index.js",
@@ -100500,7 +100500,7 @@ var package_default = {
100500
100500
  "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"
100501
100501
  },
100502
100502
  dependencies: {
100503
- "@appwrite.io/console": "^5.0.0",
100503
+ "@appwrite.io/console": "*",
100504
100504
  chalk: "4.1.2",
100505
100505
  chokidar: "^3.6.0",
100506
100506
  "cli-progress": "^3.12.0",
@@ -100751,14 +100751,18 @@ var commandDescriptions = {
100751
100751
  messaging: `The messaging command allows you to manage topics and targets and send messages.`,
100752
100752
  migrations: `The migrations command allows you to migrate data between services.`,
100753
100753
  vcs: `The vcs command allows you to interact with VCS providers and manage your code repositories.`,
100754
+ webhooks: `The webhooks command allows you to manage your project webhooks.`,
100754
100755
  main: import_chalk2.default.redBright(`${logo}${description}`)
100755
100756
  };
100756
100757
 
100757
100758
  // lib/commands/utils/deployment.ts
100758
100759
  var POLL_DEBOUNCE = 2e3;
100759
100760
  async function packageDirectory(dirPath) {
100760
- const tempFile = `${dirPath.replace(/[^a-zA-Z0-9]/g, "_")}-${Date.now()}.tar.gz`;
100761
- await zn(
100761
+ const tempFile = path.join(
100762
+ os4.tmpdir(),
100763
+ `appwrite-deploy-${Date.now()}.tar.gz`
100764
+ );
100765
+ await Pn(
100762
100766
  {
100763
100767
  gzip: true,
100764
100768
  file: tempFile,
@@ -100766,11 +100770,16 @@ async function packageDirectory(dirPath) {
100766
100770
  },
100767
100771
  ["."]
100768
100772
  );
100769
- const buffer = fs3.readFileSync(tempFile);
100770
- fs3.unlinkSync(tempFile);
100771
- return new File([buffer], path.basename(tempFile), {
100772
- type: "application/gzip"
100773
- });
100773
+ try {
100774
+ const buffer = fs3.readFileSync(tempFile);
100775
+ return new File([buffer], path.basename(tempFile), {
100776
+ type: "application/gzip"
100777
+ });
100778
+ } finally {
100779
+ if (fs3.existsSync(tempFile)) {
100780
+ fs3.unlinkSync(tempFile);
100781
+ }
100782
+ }
100774
100783
  }
100775
100784
  async function downloadDeploymentCode(params) {
100776
100785
  const {
@@ -100822,7 +100831,7 @@ async function downloadDeploymentCode(params) {
100822
100831
  `Failed to write deployment archive to "${compressedFileName}": ${message}`
100823
100832
  );
100824
100833
  }
100825
- lo({
100834
+ ao({
100826
100835
  sync: true,
100827
100836
  cwd: resourcePath,
100828
100837
  file: compressedFileName,
@@ -100881,7 +100890,7 @@ async function pushDeployment(params) {
100881
100890
  var import_chalk3 = __toESM(require_source(), 1);
100882
100891
 
100883
100892
  // lib/sdks.ts
100884
- import os4 from "os";
100893
+ import os5 from "os";
100885
100894
  var sdkForConsole = async (requiresAuth = true) => {
100886
100895
  const client = new Client();
100887
100896
  const endpoint = globalConfig2.getEndpoint() || DEFAULT_ENDPOINT;
@@ -100898,7 +100907,7 @@ var sdkForConsole = async (requiresAuth = true) => {
100898
100907
  "x-sdk-platform": "console",
100899
100908
  "x-sdk-language": "cli",
100900
100909
  "x-sdk-version": SDK_VERSION,
100901
- "user-agent": `AppwriteCLI/${SDK_VERSION} (${os4.type()} ${os4.version()}; ${os4.arch()})`
100910
+ "user-agent": `AppwriteCLI/${SDK_VERSION} (${os5.type()} ${os5.version()}; ${os5.arch()})`
100902
100911
  };
100903
100912
  client.setEndpoint(endpoint).setProject("console").setCookie(cookie).setSelfSigned(selfSigned).setLocale("en-US");
100904
100913
  return client;
@@ -100921,7 +100930,7 @@ var sdkForProject = async () => {
100921
100930
  "x-sdk-platform": "console",
100922
100931
  "x-sdk-language": "cli",
100923
100932
  "x-sdk-version": SDK_VERSION,
100924
- "user-agent": `AppwriteCLI/${SDK_VERSION} (${os4.type()} ${os4.version()}; ${os4.arch()})`
100933
+ "user-agent": `AppwriteCLI/${SDK_VERSION} (${os5.type()} ${os5.version()}; ${os5.arch()})`
100925
100934
  };
100926
100935
  client.setEndpoint(endpoint).setProject(project).setSelfSigned(selfSigned).setLocale("en-US");
100927
100936
  if (cookie) {
@@ -104830,7 +104839,7 @@ var Pull = class {
104830
104839
  return [];
104831
104840
  }
104832
104841
  const { functions: allFunctions } = await paginate(
104833
- async () => new Functions(this.projectClient).list(),
104842
+ async (args) => new Functions(this.projectClient).list(args.queries),
104834
104843
  {},
104835
104844
  100,
104836
104845
  "functions"
@@ -104914,7 +104923,7 @@ var Pull = class {
104914
104923
  return [];
104915
104924
  }
104916
104925
  const { sites: fetchedSites } = await paginate(
104917
- async () => new Sites(this.projectClient).list(),
104926
+ async (args) => new Sites(this.projectClient).list(args.queries),
104918
104927
  {},
104919
104928
  100,
104920
104929
  "sites"
@@ -104992,7 +105001,7 @@ var Pull = class {
104992
105001
  return { databases: [], collections: [] };
104993
105002
  }
104994
105003
  const { databases } = await paginate(
104995
- async () => new Databases(this.projectClient).list(),
105004
+ async (args) => new Databases(this.projectClient).list(args.queries),
104996
105005
  {},
104997
105006
  100,
104998
105007
  "databases"
@@ -105005,7 +105014,10 @@ var Pull = class {
105005
105014
  );
105006
105015
  allDatabases.push(database);
105007
105016
  const { collections } = await paginate(
105008
- async () => new Databases(this.projectClient).listCollections(database.$id),
105017
+ async (args) => new Databases(this.projectClient).listCollections(
105018
+ database.$id,
105019
+ args.queries
105020
+ ),
105009
105021
  {},
105010
105022
  100,
105011
105023
  "collections"
@@ -105043,7 +105055,9 @@ var Pull = class {
105043
105055
  return { databases: [], tables: [] };
105044
105056
  }
105045
105057
  const { databases } = await paginate(
105046
- async () => new TablesDB(this.projectClient).list(),
105058
+ async (args) => new TablesDB(this.projectClient).list({
105059
+ queries: args.queries
105060
+ }),
105047
105061
  {},
105048
105062
  100,
105049
105063
  "databases"
@@ -105056,7 +105070,10 @@ var Pull = class {
105056
105070
  );
105057
105071
  allDatabases.push(filterBySchema(database, DatabaseSchema));
105058
105072
  const { tables } = await paginate(
105059
- async () => new TablesDB(this.projectClient).listTables(database.$id),
105073
+ async (args) => new TablesDB(this.projectClient).listTables({
105074
+ databaseId: database.$id,
105075
+ queries: args.queries
105076
+ }),
105060
105077
  {},
105061
105078
  100,
105062
105079
  "tables"
@@ -105098,7 +105115,7 @@ var Pull = class {
105098
105115
  return [];
105099
105116
  }
105100
105117
  const { buckets } = await paginate(
105101
- async () => new Storage(this.projectClient).listBuckets(),
105118
+ async (args) => new Storage(this.projectClient).listBuckets(args.queries),
105102
105119
  {},
105103
105120
  100,
105104
105121
  "buckets"
@@ -105128,7 +105145,7 @@ var Pull = class {
105128
105145
  return [];
105129
105146
  }
105130
105147
  const { teams } = await paginate(
105131
- async () => new Teams(this.projectClient).list(),
105148
+ async (args) => new Teams(this.projectClient).list(args.queries),
105132
105149
  {},
105133
105150
  100,
105134
105151
  "teams"
@@ -105154,7 +105171,7 @@ var Pull = class {
105154
105171
  return [];
105155
105172
  }
105156
105173
  const { topics } = await paginate(
105157
- async () => new Messaging(this.projectClient).listTopics(),
105174
+ async (args) => new Messaging(this.projectClient).listTopics(args.queries),
105158
105175
  {},
105159
105176
  100,
105160
105177
  "topics"
@@ -105226,7 +105243,7 @@ var pullFunctions = async ({
105226
105243
  return;
105227
105244
  }
105228
105245
  const functionsToCheck = cliConfig.all ? (await paginate(
105229
- async () => (await getFunctionsService()).list(),
105246
+ async (args) => (await getFunctionsService()).list(args.queries),
105230
105247
  {},
105231
105248
  100,
105232
105249
  "functions"
@@ -105264,7 +105281,7 @@ var pullSites = async ({
105264
105281
  return;
105265
105282
  }
105266
105283
  const sitesToCheck = cliConfig.all ? (await paginate(
105267
- async () => (await getSitesService()).list(),
105284
+ async (args) => (await getSitesService()).list(args.queries),
105268
105285
  {},
105269
105286
  100,
105270
105287
  "sites"
@@ -106023,13 +106040,33 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
106023
106040
  requiresApiKey: supportsServerSide
106024
106041
  });
106025
106042
  }
106043
+ /**
106044
+ * Deduplicate entities by composite key ($id + databaseId).
106045
+ * Keeps the last occurrence to match addTable/addCollection semantics.
106046
+ */
106047
+ dedupeEntities(entities) {
106048
+ const seen = /* @__PURE__ */ new Map();
106049
+ for (const entity of entities) {
106050
+ seen.set(`${entity.databaseId}:${entity.$id}`, entity);
106051
+ }
106052
+ return Array.from(seen.values());
106053
+ }
106026
106054
  async generate(config2, options) {
106027
106055
  if (!config2.projectId) {
106028
106056
  throw new Error("Project ID is required in configuration");
106029
106057
  }
106030
106058
  const appwriteDep = options?.appwriteImportSource ?? getAppwriteDependency();
106031
106059
  const importExt = options?.importExtension ?? detectImportExtension();
106032
- const hasEntities = config2.tables && config2.tables.length > 0 || config2.collections && config2.collections.length > 0;
106060
+ const dedupedConfig = { ...config2 };
106061
+ if (dedupedConfig.tables && dedupedConfig.tables.length > 0) {
106062
+ dedupedConfig.tables = this.dedupeEntities(dedupedConfig.tables);
106063
+ }
106064
+ if (dedupedConfig.collections && dedupedConfig.collections.length > 0) {
106065
+ dedupedConfig.collections = this.dedupeEntities(
106066
+ dedupedConfig.collections
106067
+ );
106068
+ }
106069
+ const hasEntities = dedupedConfig.tables && dedupedConfig.tables.length > 0 || dedupedConfig.collections && dedupedConfig.collections.length > 0;
106033
106070
  if (!hasEntities) {
106034
106071
  console.log(
106035
106072
  "No tables or collections found in configuration. Skipping database generation."
@@ -106038,14 +106075,21 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
106038
106075
  dbContent: "// No tables or collections found in configuration\n",
106039
106076
  typesContent: "// No tables or collections found in configuration\n",
106040
106077
  indexContent: this.generateIndexFile(importExt),
106041
- constantsContent: this.generateConstantsFile(config2, appwriteDep)
106078
+ constantsContent: this.generateConstantsFile(
106079
+ dedupedConfig,
106080
+ appwriteDep
106081
+ )
106042
106082
  };
106043
106083
  }
106044
106084
  return {
106045
- dbContent: this.generateDatabasesFile(config2, importExt, appwriteDep),
106046
- typesContent: this.generateTypesFile(config2, appwriteDep),
106085
+ dbContent: this.generateDatabasesFile(
106086
+ dedupedConfig,
106087
+ importExt,
106088
+ appwriteDep
106089
+ ),
106090
+ typesContent: this.generateTypesFile(dedupedConfig, appwriteDep),
106047
106091
  indexContent: this.generateIndexFile(importExt),
106048
- constantsContent: this.generateConstantsFile(config2, appwriteDep)
106092
+ constantsContent: this.generateConstantsFile(dedupedConfig, appwriteDep)
106049
106093
  };
106050
106094
  }
106051
106095
  };