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/cli.cjs CHANGED
@@ -3880,7 +3880,7 @@ var require_has_flag = __commonJS({
3880
3880
  var require_supports_color = __commonJS({
3881
3881
  "node_modules/supports-color/index.js"(exports2, module2) {
3882
3882
  "use strict";
3883
- var os6 = require("os");
3883
+ var os7 = require("os");
3884
3884
  var tty = require("tty");
3885
3885
  var hasFlag = require_has_flag();
3886
3886
  var { env } = process;
@@ -3928,7 +3928,7 @@ var require_supports_color = __commonJS({
3928
3928
  return min;
3929
3929
  }
3930
3930
  if (process.platform === "win32") {
3931
- const osRelease = os6.release().split(".");
3931
+ const osRelease = os7.release().split(".");
3932
3932
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
3933
3933
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
3934
3934
  }
@@ -21956,9 +21956,9 @@ var require_stream_duplex = __commonJS({
21956
21956
  }
21957
21957
  });
21958
21958
 
21959
- // node_modules/safe-buffer/index.js
21959
+ // node_modules/string_decoder/node_modules/safe-buffer/index.js
21960
21960
  var require_safe_buffer = __commonJS({
21961
- "node_modules/safe-buffer/index.js"(exports2, module2) {
21961
+ "node_modules/string_decoder/node_modules/safe-buffer/index.js"(exports2, module2) {
21962
21962
  var buffer = require("buffer");
21963
21963
  var Buffer2 = buffer.Buffer;
21964
21964
  function copyProps(src, dst) {
@@ -24518,16 +24518,16 @@ var require_base = __commonJS({
24518
24518
  }),
24519
24519
  share()
24520
24520
  );
24521
- const success20 = validation.pipe(
24521
+ const success21 = validation.pipe(
24522
24522
  filter((state) => state.isValid === true),
24523
24523
  take(1)
24524
24524
  );
24525
24525
  const error49 = validation.pipe(
24526
24526
  filter((state) => state.isValid !== true),
24527
- takeUntil(success20)
24527
+ takeUntil(success21)
24528
24528
  );
24529
24529
  return {
24530
- success: success20,
24530
+ success: success21,
24531
24531
  error: error49
24532
24532
  };
24533
24533
  }
@@ -35902,7 +35902,7 @@ var require_has_flag2 = __commonJS({
35902
35902
  var require_supports_colors = __commonJS({
35903
35903
  "node_modules/@colors/colors/lib/system/supports-colors.js"(exports2, module2) {
35904
35904
  "use strict";
35905
- var os6 = require("os");
35905
+ var os7 = require("os");
35906
35906
  var hasFlag = require_has_flag2();
35907
35907
  var env = process.env;
35908
35908
  var forceColor = void 0;
@@ -35940,7 +35940,7 @@ var require_supports_colors = __commonJS({
35940
35940
  }
35941
35941
  var min = forceColor ? 1 : 0;
35942
35942
  if (process.platform === "win32") {
35943
- var osRelease = os6.release().split(".");
35943
+ var osRelease = os7.release().split(".");
35944
35944
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
35945
35945
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
35946
35946
  }
@@ -54832,8 +54832,8 @@ var require_bignumber = __commonJS({
54832
54832
  y2.s = -b2;
54833
54833
  return x.plus(y2);
54834
54834
  }
54835
- var xe2 = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
54836
- if (!xe2 || !ye2) {
54835
+ var xe = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
54836
+ if (!xe || !ye2) {
54837
54837
  if (!xc || !yc) return xc ? (y2.s = -b2, y2) : new BigNumber2(yc ? x : NaN);
54838
54838
  if (!xc[0] || !yc[0]) {
54839
54839
  return yc[0] ? (y2.s = -b2, y2) : new BigNumber2(xc[0] ? x : (
@@ -54842,15 +54842,15 @@ var require_bignumber = __commonJS({
54842
54842
  ));
54843
54843
  }
54844
54844
  }
54845
- xe2 = bitFloor(xe2);
54845
+ xe = bitFloor(xe);
54846
54846
  ye2 = bitFloor(ye2);
54847
54847
  xc = xc.slice();
54848
- if (a = xe2 - ye2) {
54848
+ if (a = xe - ye2) {
54849
54849
  if (xLTy = a < 0) {
54850
54850
  a = -a;
54851
54851
  t = xc;
54852
54852
  } else {
54853
- ye2 = xe2;
54853
+ ye2 = xe;
54854
54854
  t = yc;
54855
54855
  }
54856
54856
  t.reverse();
@@ -54977,17 +54977,17 @@ var require_bignumber = __commonJS({
54977
54977
  y2.s = -b2;
54978
54978
  return x.minus(y2);
54979
54979
  }
54980
- var xe2 = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
54981
- if (!xe2 || !ye2) {
54980
+ var xe = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
54981
+ if (!xe || !ye2) {
54982
54982
  if (!xc || !yc) return new BigNumber2(a / 0);
54983
54983
  if (!xc[0] || !yc[0]) return yc[0] ? y2 : new BigNumber2(xc[0] ? x : a * 0);
54984
54984
  }
54985
- xe2 = bitFloor(xe2);
54985
+ xe = bitFloor(xe);
54986
54986
  ye2 = bitFloor(ye2);
54987
54987
  xc = xc.slice();
54988
- if (a = xe2 - ye2) {
54988
+ if (a = xe - ye2) {
54989
54989
  if (a > 0) {
54990
- ye2 = xe2;
54990
+ ye2 = xe;
54991
54991
  t = yc;
54992
54992
  } else {
54993
54993
  a = -a;
@@ -62381,7 +62381,7 @@ var require_has_flag3 = __commonJS({
62381
62381
  var require_supports_color2 = __commonJS({
62382
62382
  "node_modules/inquirer-search-list/node_modules/chalk/node_modules/supports-color/index.js"(exports2, module2) {
62383
62383
  "use strict";
62384
- var os6 = require("os");
62384
+ var os7 = require("os");
62385
62385
  var hasFlag = require_has_flag3();
62386
62386
  var env = process.env;
62387
62387
  var forceColor;
@@ -62419,7 +62419,7 @@ var require_supports_color2 = __commonJS({
62419
62419
  }
62420
62420
  const min = forceColor ? 1 : 0;
62421
62421
  if (process.platform === "win32") {
62422
- const osRelease = os6.release().split(".");
62422
+ const osRelease = os7.release().split(".");
62423
62423
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
62424
62424
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
62425
62425
  }
@@ -63453,14 +63453,14 @@ var require_base2 = __commonJS({
63453
63453
  return { isValid: err };
63454
63454
  });
63455
63455
  }).share();
63456
- var success20 = validation.filter(function(state) {
63456
+ var success21 = validation.filter(function(state) {
63457
63457
  return state.isValid === true;
63458
63458
  }).take(1);
63459
63459
  var error49 = validation.filter(function(state) {
63460
63460
  return state.isValid !== true;
63461
- }).takeUntil(success20);
63461
+ }).takeUntil(success21);
63462
63462
  return {
63463
- success: success20,
63463
+ success: success21,
63464
63464
  error: error49
63465
63465
  };
63466
63466
  };
@@ -68576,8 +68576,8 @@ var require_rx_lite = __commonJS({
68576
68576
  checkDisposed(this);
68577
68577
  if (!this.isStopped) {
68578
68578
  this.isStopped = true;
68579
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68580
- os6[i].onCompleted();
68579
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68580
+ os7[i].onCompleted();
68581
68581
  }
68582
68582
  this.observers.length = 0;
68583
68583
  }
@@ -68592,8 +68592,8 @@ var require_rx_lite = __commonJS({
68592
68592
  this.isStopped = true;
68593
68593
  this.error = error49;
68594
68594
  this.hasError = true;
68595
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68596
- os6[i].onError(error49);
68595
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68596
+ os7[i].onError(error49);
68597
68597
  }
68598
68598
  this.observers.length = 0;
68599
68599
  }
@@ -68605,8 +68605,8 @@ var require_rx_lite = __commonJS({
68605
68605
  onNext: function(value) {
68606
68606
  checkDisposed(this);
68607
68607
  if (!this.isStopped) {
68608
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68609
- os6[i].onNext(value);
68608
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68609
+ os7[i].onNext(value);
68610
68610
  }
68611
68611
  }
68612
68612
  },
@@ -68666,16 +68666,16 @@ var require_rx_lite = __commonJS({
68666
68666
  checkDisposed(this);
68667
68667
  if (!this.isStopped) {
68668
68668
  this.isStopped = true;
68669
- var os6 = cloneArray(this.observers), len = os6.length;
68669
+ var os7 = cloneArray(this.observers), len = os7.length;
68670
68670
  if (this.hasValue) {
68671
68671
  for (i = 0; i < len; i++) {
68672
- var o = os6[i];
68672
+ var o = os7[i];
68673
68673
  o.onNext(this.value);
68674
68674
  o.onCompleted();
68675
68675
  }
68676
68676
  } else {
68677
68677
  for (i = 0; i < len; i++) {
68678
- os6[i].onCompleted();
68678
+ os7[i].onCompleted();
68679
68679
  }
68680
68680
  }
68681
68681
  this.observers.length = 0;
@@ -68691,8 +68691,8 @@ var require_rx_lite = __commonJS({
68691
68691
  this.isStopped = true;
68692
68692
  this.hasError = true;
68693
68693
  this.error = error49;
68694
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68695
- os6[i].onError(error49);
68694
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68695
+ os7[i].onError(error49);
68696
68696
  }
68697
68697
  this.observers.length = 0;
68698
68698
  }
@@ -68800,8 +68800,8 @@ var require_rx_lite = __commonJS({
68800
68800
  return;
68801
68801
  }
68802
68802
  this.isStopped = true;
68803
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68804
- os6[i].onCompleted();
68803
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68804
+ os7[i].onCompleted();
68805
68805
  }
68806
68806
  this.observers.length = 0;
68807
68807
  },
@@ -68817,8 +68817,8 @@ var require_rx_lite = __commonJS({
68817
68817
  this.isStopped = true;
68818
68818
  this.hasError = true;
68819
68819
  this.error = error49;
68820
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68821
- os6[i].onError(error49);
68820
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68821
+ os7[i].onError(error49);
68822
68822
  }
68823
68823
  this.observers.length = 0;
68824
68824
  },
@@ -68832,8 +68832,8 @@ var require_rx_lite = __commonJS({
68832
68832
  return;
68833
68833
  }
68834
68834
  this.value = value;
68835
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68836
- os6[i].onNext(value);
68835
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68836
+ os7[i].onNext(value);
68837
68837
  }
68838
68838
  },
68839
68839
  /**
@@ -68914,8 +68914,8 @@ var require_rx_lite = __commonJS({
68914
68914
  var now = this.scheduler.now();
68915
68915
  this.q.push({ interval: now, value });
68916
68916
  this._trim(now);
68917
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68918
- var observer = os6[i];
68917
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68918
+ var observer = os7[i];
68919
68919
  observer.onNext(value);
68920
68920
  observer.ensureActive();
68921
68921
  }
@@ -68934,8 +68934,8 @@ var require_rx_lite = __commonJS({
68934
68934
  this.hasError = true;
68935
68935
  var now = this.scheduler.now();
68936
68936
  this._trim(now);
68937
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68938
- var observer = os6[i];
68937
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68938
+ var observer = os7[i];
68939
68939
  observer.onError(error49);
68940
68940
  observer.ensureActive();
68941
68941
  }
@@ -68952,8 +68952,8 @@ var require_rx_lite = __commonJS({
68952
68952
  this.isStopped = true;
68953
68953
  var now = this.scheduler.now();
68954
68954
  this._trim(now);
68955
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68956
- var observer = os6[i];
68955
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68956
+ var observer = os7[i];
68957
68957
  observer.onCompleted();
68958
68958
  observer.ensureActive();
68959
68959
  }
@@ -71500,7 +71500,7 @@ var require_main2 = __commonJS({
71500
71500
  "node_modules/dotenv/lib/main.js"(exports2, module2) {
71501
71501
  var fs20 = require("fs");
71502
71502
  var path16 = require("path");
71503
- var os6 = require("os");
71503
+ var os7 = require("os");
71504
71504
  var crypto2 = require("crypto");
71505
71505
  var packageJson = require_package2();
71506
71506
  var version4 = packageJson.version;
@@ -71623,7 +71623,7 @@ var require_main2 = __commonJS({
71623
71623
  return null;
71624
71624
  }
71625
71625
  function _resolveHome(envPath) {
71626
- return envPath[0] === "~" ? path16.join(os6.homedir(), envPath.slice(1)) : envPath;
71626
+ return envPath[0] === "~" ? path16.join(os7.homedir(), envPath.slice(1)) : envPath;
71627
71627
  }
71628
71628
  function _configVault(options) {
71629
71629
  const debug = Boolean(options && options.debug);
@@ -77138,7 +77138,7 @@ var require_constants9 = __commonJS({
77138
77138
  "use strict";
77139
77139
  var { sep } = require("path");
77140
77140
  var { platform } = process;
77141
- var os6 = require("os");
77141
+ var os7 = require("os");
77142
77142
  exports2.EV_ALL = "all";
77143
77143
  exports2.EV_READY = "ready";
77144
77144
  exports2.EV_ADD = "add";
@@ -77192,7 +77192,7 @@ var require_constants9 = __commonJS({
77192
77192
  exports2.isWindows = platform === "win32";
77193
77193
  exports2.isMacos = platform === "darwin";
77194
77194
  exports2.isLinux = platform === "linux";
77195
- exports2.isIBMi = os6.type() === "OS400";
77195
+ exports2.isIBMi = os7.type() === "OS400";
77196
77196
  }
77197
77197
  });
77198
77198
 
@@ -85459,7 +85459,7 @@ var package_default = {
85459
85459
  type: "module",
85460
85460
  homepage: "https://appwrite.io/support",
85461
85461
  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",
85462
- version: "15.0.0",
85462
+ version: "16.0.0",
85463
85463
  license: "BSD-3-Clause",
85464
85464
  main: "dist/index.cjs",
85465
85465
  module: "dist/index.js",
@@ -85503,7 +85503,7 @@ var package_default = {
85503
85503
  "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"
85504
85504
  },
85505
85505
  dependencies: {
85506
- "@appwrite.io/console": "^5.0.0",
85506
+ "@appwrite.io/console": "*",
85507
85507
  chalk: "4.1.2",
85508
85508
  chokidar: "^3.6.0",
85509
85509
  "cli-progress": "^3.12.0",
@@ -99747,7 +99747,7 @@ var import_undici = __toESM(require_undici(), 1);
99747
99747
  // lib/constants.ts
99748
99748
  var SDK_TITLE = "Appwrite";
99749
99749
  var SDK_TITLE_LOWER = "appwrite";
99750
- var SDK_VERSION = "15.0.0";
99750
+ var SDK_VERSION = "16.0.0";
99751
99751
  var SDK_NAME = "Command Line";
99752
99752
  var SDK_PLATFORM = "console";
99753
99753
  var SDK_LANGUAGE = "cli";
@@ -100786,7 +100786,7 @@ var Client = class _Client {
100786
100786
  "x-sdk-name": "Console",
100787
100787
  "x-sdk-platform": "console",
100788
100788
  "x-sdk-language": "web",
100789
- "x-sdk-version": "5.0.0",
100789
+ "x-sdk-version": "6.0.0",
100790
100790
  "X-Appwrite-Response-Format": "1.8.0"
100791
100791
  };
100792
100792
  this.realtime = {
@@ -102785,7 +102785,7 @@ var Account = class {
102785
102785
  };
102786
102786
  }
102787
102787
  const provider = params.provider;
102788
- const success20 = params.success;
102788
+ const success21 = params.success;
102789
102789
  const failure = params.failure;
102790
102790
  const scopes = params.scopes;
102791
102791
  if (typeof provider === "undefined") {
@@ -102793,8 +102793,8 @@ var Account = class {
102793
102793
  }
102794
102794
  const apiPath = "/account/sessions/oauth2/{provider}".replace("{provider}", provider);
102795
102795
  const payload = {};
102796
- if (typeof success20 !== "undefined") {
102797
- payload["success"] = success20;
102796
+ if (typeof success21 !== "undefined") {
102797
+ payload["success"] = success21;
102798
102798
  }
102799
102799
  if (typeof failure !== "undefined") {
102800
102800
  payload["failure"] = failure;
@@ -103133,7 +103133,7 @@ var Account = class {
103133
103133
  };
103134
103134
  }
103135
103135
  const provider = params.provider;
103136
- const success20 = params.success;
103136
+ const success21 = params.success;
103137
103137
  const failure = params.failure;
103138
103138
  const scopes = params.scopes;
103139
103139
  if (typeof provider === "undefined") {
@@ -103141,8 +103141,8 @@ var Account = class {
103141
103141
  }
103142
103142
  const apiPath = "/account/tokens/oauth2/{provider}".replace("{provider}", provider);
103143
103143
  const payload = {};
103144
- if (typeof success20 !== "undefined") {
103145
- payload["success"] = success20;
103144
+ if (typeof success21 !== "undefined") {
103145
+ payload["success"] = success21;
103146
103146
  }
103147
103147
  if (typeof failure !== "undefined") {
103148
103148
  payload["failure"] = failure;
@@ -116078,247 +116078,6 @@ var Projects = class {
116078
116078
  };
116079
116079
  return this.client.call("delete", uri, apiHeaders, payload);
116080
116080
  }
116081
- listWebhooks(paramsOrFirst, ...rest) {
116082
- let params;
116083
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
116084
- params = paramsOrFirst || {};
116085
- } else {
116086
- params = {
116087
- projectId: paramsOrFirst,
116088
- total: rest[0]
116089
- };
116090
- }
116091
- const projectId = params.projectId;
116092
- const total = params.total;
116093
- if (typeof projectId === "undefined") {
116094
- throw new AppwriteException('Missing required parameter: "projectId"');
116095
- }
116096
- const apiPath = "/projects/{projectId}/webhooks".replace("{projectId}", projectId);
116097
- const payload = {};
116098
- if (typeof total !== "undefined") {
116099
- payload["total"] = total;
116100
- }
116101
- const uri = new URL(this.client.config.endpoint + apiPath);
116102
- const apiHeaders = {};
116103
- return this.client.call("get", uri, apiHeaders, payload);
116104
- }
116105
- createWebhook(paramsOrFirst, ...rest) {
116106
- let params;
116107
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
116108
- params = paramsOrFirst || {};
116109
- } else {
116110
- params = {
116111
- projectId: paramsOrFirst,
116112
- name: rest[0],
116113
- events: rest[1],
116114
- url: rest[2],
116115
- security: rest[3],
116116
- enabled: rest[4],
116117
- httpUser: rest[5],
116118
- httpPass: rest[6]
116119
- };
116120
- }
116121
- const projectId = params.projectId;
116122
- const name = params.name;
116123
- const events = params.events;
116124
- const url2 = params.url;
116125
- const security = params.security;
116126
- const enabled = params.enabled;
116127
- const httpUser = params.httpUser;
116128
- const httpPass = params.httpPass;
116129
- if (typeof projectId === "undefined") {
116130
- throw new AppwriteException('Missing required parameter: "projectId"');
116131
- }
116132
- if (typeof name === "undefined") {
116133
- throw new AppwriteException('Missing required parameter: "name"');
116134
- }
116135
- if (typeof events === "undefined") {
116136
- throw new AppwriteException('Missing required parameter: "events"');
116137
- }
116138
- if (typeof url2 === "undefined") {
116139
- throw new AppwriteException('Missing required parameter: "url"');
116140
- }
116141
- if (typeof security === "undefined") {
116142
- throw new AppwriteException('Missing required parameter: "security"');
116143
- }
116144
- const apiPath = "/projects/{projectId}/webhooks".replace("{projectId}", projectId);
116145
- const payload = {};
116146
- if (typeof name !== "undefined") {
116147
- payload["name"] = name;
116148
- }
116149
- if (typeof enabled !== "undefined") {
116150
- payload["enabled"] = enabled;
116151
- }
116152
- if (typeof events !== "undefined") {
116153
- payload["events"] = events;
116154
- }
116155
- if (typeof url2 !== "undefined") {
116156
- payload["url"] = url2;
116157
- }
116158
- if (typeof security !== "undefined") {
116159
- payload["security"] = security;
116160
- }
116161
- if (typeof httpUser !== "undefined") {
116162
- payload["httpUser"] = httpUser;
116163
- }
116164
- if (typeof httpPass !== "undefined") {
116165
- payload["httpPass"] = httpPass;
116166
- }
116167
- const uri = new URL(this.client.config.endpoint + apiPath);
116168
- const apiHeaders = {
116169
- "content-type": "application/json"
116170
- };
116171
- return this.client.call("post", uri, apiHeaders, payload);
116172
- }
116173
- getWebhook(paramsOrFirst, ...rest) {
116174
- let params;
116175
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
116176
- params = paramsOrFirst || {};
116177
- } else {
116178
- params = {
116179
- projectId: paramsOrFirst,
116180
- webhookId: rest[0]
116181
- };
116182
- }
116183
- const projectId = params.projectId;
116184
- const webhookId = params.webhookId;
116185
- if (typeof projectId === "undefined") {
116186
- throw new AppwriteException('Missing required parameter: "projectId"');
116187
- }
116188
- if (typeof webhookId === "undefined") {
116189
- throw new AppwriteException('Missing required parameter: "webhookId"');
116190
- }
116191
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
116192
- const payload = {};
116193
- const uri = new URL(this.client.config.endpoint + apiPath);
116194
- const apiHeaders = {};
116195
- return this.client.call("get", uri, apiHeaders, payload);
116196
- }
116197
- updateWebhook(paramsOrFirst, ...rest) {
116198
- let params;
116199
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
116200
- params = paramsOrFirst || {};
116201
- } else {
116202
- params = {
116203
- projectId: paramsOrFirst,
116204
- webhookId: rest[0],
116205
- name: rest[1],
116206
- events: rest[2],
116207
- url: rest[3],
116208
- security: rest[4],
116209
- enabled: rest[5],
116210
- httpUser: rest[6],
116211
- httpPass: rest[7]
116212
- };
116213
- }
116214
- const projectId = params.projectId;
116215
- const webhookId = params.webhookId;
116216
- const name = params.name;
116217
- const events = params.events;
116218
- const url2 = params.url;
116219
- const security = params.security;
116220
- const enabled = params.enabled;
116221
- const httpUser = params.httpUser;
116222
- const httpPass = params.httpPass;
116223
- if (typeof projectId === "undefined") {
116224
- throw new AppwriteException('Missing required parameter: "projectId"');
116225
- }
116226
- if (typeof webhookId === "undefined") {
116227
- throw new AppwriteException('Missing required parameter: "webhookId"');
116228
- }
116229
- if (typeof name === "undefined") {
116230
- throw new AppwriteException('Missing required parameter: "name"');
116231
- }
116232
- if (typeof events === "undefined") {
116233
- throw new AppwriteException('Missing required parameter: "events"');
116234
- }
116235
- if (typeof url2 === "undefined") {
116236
- throw new AppwriteException('Missing required parameter: "url"');
116237
- }
116238
- if (typeof security === "undefined") {
116239
- throw new AppwriteException('Missing required parameter: "security"');
116240
- }
116241
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
116242
- const payload = {};
116243
- if (typeof name !== "undefined") {
116244
- payload["name"] = name;
116245
- }
116246
- if (typeof enabled !== "undefined") {
116247
- payload["enabled"] = enabled;
116248
- }
116249
- if (typeof events !== "undefined") {
116250
- payload["events"] = events;
116251
- }
116252
- if (typeof url2 !== "undefined") {
116253
- payload["url"] = url2;
116254
- }
116255
- if (typeof security !== "undefined") {
116256
- payload["security"] = security;
116257
- }
116258
- if (typeof httpUser !== "undefined") {
116259
- payload["httpUser"] = httpUser;
116260
- }
116261
- if (typeof httpPass !== "undefined") {
116262
- payload["httpPass"] = httpPass;
116263
- }
116264
- const uri = new URL(this.client.config.endpoint + apiPath);
116265
- const apiHeaders = {
116266
- "content-type": "application/json"
116267
- };
116268
- return this.client.call("put", uri, apiHeaders, payload);
116269
- }
116270
- deleteWebhook(paramsOrFirst, ...rest) {
116271
- let params;
116272
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
116273
- params = paramsOrFirst || {};
116274
- } else {
116275
- params = {
116276
- projectId: paramsOrFirst,
116277
- webhookId: rest[0]
116278
- };
116279
- }
116280
- const projectId = params.projectId;
116281
- const webhookId = params.webhookId;
116282
- if (typeof projectId === "undefined") {
116283
- throw new AppwriteException('Missing required parameter: "projectId"');
116284
- }
116285
- if (typeof webhookId === "undefined") {
116286
- throw new AppwriteException('Missing required parameter: "webhookId"');
116287
- }
116288
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
116289
- const payload = {};
116290
- const uri = new URL(this.client.config.endpoint + apiPath);
116291
- const apiHeaders = {
116292
- "content-type": "application/json"
116293
- };
116294
- return this.client.call("delete", uri, apiHeaders, payload);
116295
- }
116296
- updateWebhookSignature(paramsOrFirst, ...rest) {
116297
- let params;
116298
- if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
116299
- params = paramsOrFirst || {};
116300
- } else {
116301
- params = {
116302
- projectId: paramsOrFirst,
116303
- webhookId: rest[0]
116304
- };
116305
- }
116306
- const projectId = params.projectId;
116307
- const webhookId = params.webhookId;
116308
- if (typeof projectId === "undefined") {
116309
- throw new AppwriteException('Missing required parameter: "projectId"');
116310
- }
116311
- if (typeof webhookId === "undefined") {
116312
- throw new AppwriteException('Missing required parameter: "webhookId"');
116313
- }
116314
- const apiPath = "/projects/{projectId}/webhooks/{webhookId}/signature".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
116315
- const payload = {};
116316
- const uri = new URL(this.client.config.endpoint + apiPath);
116317
- const apiHeaders = {
116318
- "content-type": "application/json"
116319
- };
116320
- return this.client.call("patch", uri, apiHeaders, payload);
116321
- }
116322
116081
  };
116323
116082
  var Proxy2 = class {
116324
116083
  constructor(client2) {
@@ -123813,6 +123572,229 @@ var Vcs = class {
123813
123572
  return this.client.call("delete", uri, apiHeaders, payload);
123814
123573
  }
123815
123574
  };
123575
+ var Webhooks = class {
123576
+ constructor(client2) {
123577
+ this.client = client2;
123578
+ }
123579
+ list(paramsOrFirst, ...rest) {
123580
+ let params;
123581
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
123582
+ params = paramsOrFirst || {};
123583
+ } else {
123584
+ params = {
123585
+ queries: paramsOrFirst,
123586
+ total: rest[0]
123587
+ };
123588
+ }
123589
+ const queries = params.queries;
123590
+ const total = params.total;
123591
+ const apiPath = "/webhooks";
123592
+ const payload = {};
123593
+ if (typeof queries !== "undefined") {
123594
+ payload["queries"] = queries;
123595
+ }
123596
+ if (typeof total !== "undefined") {
123597
+ payload["total"] = total;
123598
+ }
123599
+ const uri = new URL(this.client.config.endpoint + apiPath);
123600
+ const apiHeaders = {};
123601
+ return this.client.call("get", uri, apiHeaders, payload);
123602
+ }
123603
+ create(paramsOrFirst, ...rest) {
123604
+ let params;
123605
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
123606
+ params = paramsOrFirst || {};
123607
+ } else {
123608
+ params = {
123609
+ webhookId: paramsOrFirst,
123610
+ url: rest[0],
123611
+ name: rest[1],
123612
+ events: rest[2],
123613
+ enabled: rest[3],
123614
+ security: rest[4],
123615
+ httpUser: rest[5],
123616
+ httpPass: rest[6]
123617
+ };
123618
+ }
123619
+ const webhookId = params.webhookId;
123620
+ const url2 = params.url;
123621
+ const name = params.name;
123622
+ const events = params.events;
123623
+ const enabled = params.enabled;
123624
+ const security = params.security;
123625
+ const httpUser = params.httpUser;
123626
+ const httpPass = params.httpPass;
123627
+ if (typeof webhookId === "undefined") {
123628
+ throw new AppwriteException('Missing required parameter: "webhookId"');
123629
+ }
123630
+ if (typeof url2 === "undefined") {
123631
+ throw new AppwriteException('Missing required parameter: "url"');
123632
+ }
123633
+ if (typeof name === "undefined") {
123634
+ throw new AppwriteException('Missing required parameter: "name"');
123635
+ }
123636
+ if (typeof events === "undefined") {
123637
+ throw new AppwriteException('Missing required parameter: "events"');
123638
+ }
123639
+ const apiPath = "/webhooks";
123640
+ const payload = {};
123641
+ if (typeof webhookId !== "undefined") {
123642
+ payload["webhookId"] = webhookId;
123643
+ }
123644
+ if (typeof url2 !== "undefined") {
123645
+ payload["url"] = url2;
123646
+ }
123647
+ if (typeof name !== "undefined") {
123648
+ payload["name"] = name;
123649
+ }
123650
+ if (typeof events !== "undefined") {
123651
+ payload["events"] = events;
123652
+ }
123653
+ if (typeof enabled !== "undefined") {
123654
+ payload["enabled"] = enabled;
123655
+ }
123656
+ if (typeof security !== "undefined") {
123657
+ payload["security"] = security;
123658
+ }
123659
+ if (typeof httpUser !== "undefined") {
123660
+ payload["httpUser"] = httpUser;
123661
+ }
123662
+ if (typeof httpPass !== "undefined") {
123663
+ payload["httpPass"] = httpPass;
123664
+ }
123665
+ const uri = new URL(this.client.config.endpoint + apiPath);
123666
+ const apiHeaders = {
123667
+ "content-type": "application/json"
123668
+ };
123669
+ return this.client.call("post", uri, apiHeaders, payload);
123670
+ }
123671
+ get(paramsOrFirst) {
123672
+ let params;
123673
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
123674
+ params = paramsOrFirst || {};
123675
+ } else {
123676
+ params = {
123677
+ webhookId: paramsOrFirst
123678
+ };
123679
+ }
123680
+ const webhookId = params.webhookId;
123681
+ if (typeof webhookId === "undefined") {
123682
+ throw new AppwriteException('Missing required parameter: "webhookId"');
123683
+ }
123684
+ const apiPath = "/webhooks/{webhookId}".replace("{webhookId}", webhookId);
123685
+ const payload = {};
123686
+ const uri = new URL(this.client.config.endpoint + apiPath);
123687
+ const apiHeaders = {};
123688
+ return this.client.call("get", uri, apiHeaders, payload);
123689
+ }
123690
+ update(paramsOrFirst, ...rest) {
123691
+ let params;
123692
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
123693
+ params = paramsOrFirst || {};
123694
+ } else {
123695
+ params = {
123696
+ webhookId: paramsOrFirst,
123697
+ name: rest[0],
123698
+ url: rest[1],
123699
+ events: rest[2],
123700
+ enabled: rest[3],
123701
+ security: rest[4],
123702
+ httpUser: rest[5],
123703
+ httpPass: rest[6]
123704
+ };
123705
+ }
123706
+ const webhookId = params.webhookId;
123707
+ const name = params.name;
123708
+ const url2 = params.url;
123709
+ const events = params.events;
123710
+ const enabled = params.enabled;
123711
+ const security = params.security;
123712
+ const httpUser = params.httpUser;
123713
+ const httpPass = params.httpPass;
123714
+ if (typeof webhookId === "undefined") {
123715
+ throw new AppwriteException('Missing required parameter: "webhookId"');
123716
+ }
123717
+ if (typeof name === "undefined") {
123718
+ throw new AppwriteException('Missing required parameter: "name"');
123719
+ }
123720
+ if (typeof url2 === "undefined") {
123721
+ throw new AppwriteException('Missing required parameter: "url"');
123722
+ }
123723
+ if (typeof events === "undefined") {
123724
+ throw new AppwriteException('Missing required parameter: "events"');
123725
+ }
123726
+ const apiPath = "/webhooks/{webhookId}".replace("{webhookId}", webhookId);
123727
+ const payload = {};
123728
+ if (typeof name !== "undefined") {
123729
+ payload["name"] = name;
123730
+ }
123731
+ if (typeof url2 !== "undefined") {
123732
+ payload["url"] = url2;
123733
+ }
123734
+ if (typeof events !== "undefined") {
123735
+ payload["events"] = events;
123736
+ }
123737
+ if (typeof enabled !== "undefined") {
123738
+ payload["enabled"] = enabled;
123739
+ }
123740
+ if (typeof security !== "undefined") {
123741
+ payload["security"] = security;
123742
+ }
123743
+ if (typeof httpUser !== "undefined") {
123744
+ payload["httpUser"] = httpUser;
123745
+ }
123746
+ if (typeof httpPass !== "undefined") {
123747
+ payload["httpPass"] = httpPass;
123748
+ }
123749
+ const uri = new URL(this.client.config.endpoint + apiPath);
123750
+ const apiHeaders = {
123751
+ "content-type": "application/json"
123752
+ };
123753
+ return this.client.call("put", uri, apiHeaders, payload);
123754
+ }
123755
+ delete(paramsOrFirst) {
123756
+ let params;
123757
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
123758
+ params = paramsOrFirst || {};
123759
+ } else {
123760
+ params = {
123761
+ webhookId: paramsOrFirst
123762
+ };
123763
+ }
123764
+ const webhookId = params.webhookId;
123765
+ if (typeof webhookId === "undefined") {
123766
+ throw new AppwriteException('Missing required parameter: "webhookId"');
123767
+ }
123768
+ const apiPath = "/webhooks/{webhookId}".replace("{webhookId}", webhookId);
123769
+ const payload = {};
123770
+ const uri = new URL(this.client.config.endpoint + apiPath);
123771
+ const apiHeaders = {
123772
+ "content-type": "application/json"
123773
+ };
123774
+ return this.client.call("delete", uri, apiHeaders, payload);
123775
+ }
123776
+ updateSignature(paramsOrFirst) {
123777
+ let params;
123778
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
123779
+ params = paramsOrFirst || {};
123780
+ } else {
123781
+ params = {
123782
+ webhookId: paramsOrFirst
123783
+ };
123784
+ }
123785
+ const webhookId = params.webhookId;
123786
+ if (typeof webhookId === "undefined") {
123787
+ throw new AppwriteException('Missing required parameter: "webhookId"');
123788
+ }
123789
+ const apiPath = "/webhooks/{webhookId}/signature".replace("{webhookId}", webhookId);
123790
+ const payload = {};
123791
+ const uri = new URL(this.client.config.endpoint + apiPath);
123792
+ const apiHeaders = {
123793
+ "content-type": "application/json"
123794
+ };
123795
+ return this.client.call("patch", uri, apiHeaders, payload);
123796
+ }
123797
+ };
123816
123798
  var RealtimeCode;
123817
123799
  (function(RealtimeCode2) {
123818
123800
  RealtimeCode2[RealtimeCode2["NORMAL_CLOSURE"] = 1e3] = "NORMAL_CLOSURE";
@@ -124065,6 +124047,8 @@ var Scopes;
124065
124047
  Scopes3["AssistantRead"] = "assistant.read";
124066
124048
  Scopes3["TokensRead"] = "tokens.read";
124067
124049
  Scopes3["TokensWrite"] = "tokens.write";
124050
+ Scopes3["WebhooksRead"] = "webhooks.read";
124051
+ Scopes3["WebhooksWrite"] = "webhooks.write";
124068
124052
  Scopes3["PoliciesWrite"] = "policies.write";
124069
124053
  Scopes3["PoliciesRead"] = "policies.read";
124070
124054
  Scopes3["ArchivesRead"] = "archives.read";
@@ -124914,9 +124898,6 @@ var Runtime;
124914
124898
  Runtime2["Pythonml311"] = "python-ml-3.11";
124915
124899
  Runtime2["Pythonml312"] = "python-ml-3.12";
124916
124900
  Runtime2["Pythonml313"] = "python-ml-3.13";
124917
- Runtime2["Deno121"] = "deno-1.21";
124918
- Runtime2["Deno124"] = "deno-1.24";
124919
- Runtime2["Deno135"] = "deno-1.35";
124920
124901
  Runtime2["Deno140"] = "deno-1.40";
124921
124902
  Runtime2["Deno146"] = "deno-1.46";
124922
124903
  Runtime2["Deno20"] = "deno-2.0";
@@ -124972,6 +124953,92 @@ var Runtime;
124972
124953
  Runtime2["Flutter332"] = "flutter-3.32";
124973
124954
  Runtime2["Flutter335"] = "flutter-3.35";
124974
124955
  Runtime2["Flutter338"] = "flutter-3.38";
124956
+ Runtime2["Node145rc"] = "node-14.5-rc";
124957
+ Runtime2["Node160rc"] = "node-16.0-rc";
124958
+ Runtime2["Node180rc"] = "node-18.0-rc";
124959
+ Runtime2["Node190rc"] = "node-19.0-rc";
124960
+ Runtime2["Node200rc"] = "node-20.0-rc";
124961
+ Runtime2["Node210rc"] = "node-21.0-rc";
124962
+ Runtime2["Node22rc"] = "node-22-rc";
124963
+ Runtime2["Node23rc"] = "node-23-rc";
124964
+ Runtime2["Node24rc"] = "node-24-rc";
124965
+ Runtime2["Node25rc"] = "node-25-rc";
124966
+ Runtime2["Php80rc"] = "php-8.0-rc";
124967
+ Runtime2["Php81rc"] = "php-8.1-rc";
124968
+ Runtime2["Php82rc"] = "php-8.2-rc";
124969
+ Runtime2["Php83rc"] = "php-8.3-rc";
124970
+ Runtime2["Php84rc"] = "php-8.4-rc";
124971
+ Runtime2["Ruby30rc"] = "ruby-3.0-rc";
124972
+ Runtime2["Ruby31rc"] = "ruby-3.1-rc";
124973
+ Runtime2["Ruby32rc"] = "ruby-3.2-rc";
124974
+ Runtime2["Ruby33rc"] = "ruby-3.3-rc";
124975
+ Runtime2["Ruby34rc"] = "ruby-3.4-rc";
124976
+ Runtime2["Ruby40rc"] = "ruby-4.0-rc";
124977
+ Runtime2["Python38rc"] = "python-3.8-rc";
124978
+ Runtime2["Python39rc"] = "python-3.9-rc";
124979
+ Runtime2["Python310rc"] = "python-3.10-rc";
124980
+ Runtime2["Python311rc"] = "python-3.11-rc";
124981
+ Runtime2["Python312rc"] = "python-3.12-rc";
124982
+ Runtime2["Python313rc"] = "python-3.13-rc";
124983
+ Runtime2["Python314rc"] = "python-3.14-rc";
124984
+ Runtime2["Pythonml311rc"] = "python-ml-3.11-rc";
124985
+ Runtime2["Pythonml312rc"] = "python-ml-3.12-rc";
124986
+ Runtime2["Pythonml313rc"] = "python-ml-3.13-rc";
124987
+ Runtime2["Deno140rc"] = "deno-1.40-rc";
124988
+ Runtime2["Deno146rc"] = "deno-1.46-rc";
124989
+ Runtime2["Deno20rc"] = "deno-2.0-rc";
124990
+ Runtime2["Deno25rc"] = "deno-2.5-rc";
124991
+ Runtime2["Deno26rc"] = "deno-2.6-rc";
124992
+ Runtime2["Dart215rc"] = "dart-2.15-rc";
124993
+ Runtime2["Dart216rc"] = "dart-2.16-rc";
124994
+ Runtime2["Dart217rc"] = "dart-2.17-rc";
124995
+ Runtime2["Dart218rc"] = "dart-2.18-rc";
124996
+ Runtime2["Dart219rc"] = "dart-2.19-rc";
124997
+ Runtime2["Dart30rc"] = "dart-3.0-rc";
124998
+ Runtime2["Dart31rc"] = "dart-3.1-rc";
124999
+ Runtime2["Dart33rc"] = "dart-3.3-rc";
125000
+ Runtime2["Dart35rc"] = "dart-3.5-rc";
125001
+ Runtime2["Dart38rc"] = "dart-3.8-rc";
125002
+ Runtime2["Dart39rc"] = "dart-3.9-rc";
125003
+ Runtime2["Dart310rc"] = "dart-3.10-rc";
125004
+ Runtime2["Dotnet60rc"] = "dotnet-6.0-rc";
125005
+ Runtime2["Dotnet70rc"] = "dotnet-7.0-rc";
125006
+ Runtime2["Dotnet80rc"] = "dotnet-8.0-rc";
125007
+ Runtime2["Dotnet10rc"] = "dotnet-10-rc";
125008
+ Runtime2["Java80rc"] = "java-8.0-rc";
125009
+ Runtime2["Java110rc"] = "java-11.0-rc";
125010
+ Runtime2["Java170rc"] = "java-17.0-rc";
125011
+ Runtime2["Java180rc"] = "java-18.0-rc";
125012
+ Runtime2["Java210rc"] = "java-21.0-rc";
125013
+ Runtime2["Java22rc"] = "java-22-rc";
125014
+ Runtime2["Java25rc"] = "java-25-rc";
125015
+ Runtime2["Swift55rc"] = "swift-5.5-rc";
125016
+ Runtime2["Swift58rc"] = "swift-5.8-rc";
125017
+ Runtime2["Swift59rc"] = "swift-5.9-rc";
125018
+ Runtime2["Swift510rc"] = "swift-5.10-rc";
125019
+ Runtime2["Swift62rc"] = "swift-6.2-rc";
125020
+ Runtime2["Kotlin16rc"] = "kotlin-1.6-rc";
125021
+ Runtime2["Kotlin18rc"] = "kotlin-1.8-rc";
125022
+ Runtime2["Kotlin19rc"] = "kotlin-1.9-rc";
125023
+ Runtime2["Kotlin20rc"] = "kotlin-2.0-rc";
125024
+ Runtime2["Kotlin23rc"] = "kotlin-2.3-rc";
125025
+ Runtime2["Cpp17rc"] = "cpp-17-rc";
125026
+ Runtime2["Cpp20rc"] = "cpp-20-rc";
125027
+ Runtime2["Bun10rc"] = "bun-1.0-rc";
125028
+ Runtime2["Bun11rc"] = "bun-1.1-rc";
125029
+ Runtime2["Bun12rc"] = "bun-1.2-rc";
125030
+ Runtime2["Bun13rc"] = "bun-1.3-rc";
125031
+ Runtime2["Go123rc"] = "go-1.23-rc";
125032
+ Runtime2["Go124rc"] = "go-1.24-rc";
125033
+ Runtime2["Go125rc"] = "go-1.25-rc";
125034
+ Runtime2["Go126rc"] = "go-1.26-rc";
125035
+ Runtime2["Static1rc"] = "static-1-rc";
125036
+ Runtime2["Flutter324rc"] = "flutter-3.24-rc";
125037
+ Runtime2["Flutter327rc"] = "flutter-3.27-rc";
125038
+ Runtime2["Flutter329rc"] = "flutter-3.29-rc";
125039
+ Runtime2["Flutter332rc"] = "flutter-3.32-rc";
125040
+ Runtime2["Flutter335rc"] = "flutter-3.35-rc";
125041
+ Runtime2["Flutter338rc"] = "flutter-3.38-rc";
124975
125042
  })(Runtime || (Runtime = {}));
124976
125043
  var Runtimes;
124977
125044
  (function(Runtimes2) {
@@ -125006,9 +125073,6 @@ var Runtimes;
125006
125073
  Runtimes2["Pythonml311"] = "python-ml-3.11";
125007
125074
  Runtimes2["Pythonml312"] = "python-ml-3.12";
125008
125075
  Runtimes2["Pythonml313"] = "python-ml-3.13";
125009
- Runtimes2["Deno121"] = "deno-1.21";
125010
- Runtimes2["Deno124"] = "deno-1.24";
125011
- Runtimes2["Deno135"] = "deno-1.35";
125012
125076
  Runtimes2["Deno140"] = "deno-1.40";
125013
125077
  Runtimes2["Deno146"] = "deno-1.46";
125014
125078
  Runtimes2["Deno20"] = "deno-2.0";
@@ -125064,6 +125128,92 @@ var Runtimes;
125064
125128
  Runtimes2["Flutter332"] = "flutter-3.32";
125065
125129
  Runtimes2["Flutter335"] = "flutter-3.35";
125066
125130
  Runtimes2["Flutter338"] = "flutter-3.38";
125131
+ Runtimes2["Node145rc"] = "node-14.5-rc";
125132
+ Runtimes2["Node160rc"] = "node-16.0-rc";
125133
+ Runtimes2["Node180rc"] = "node-18.0-rc";
125134
+ Runtimes2["Node190rc"] = "node-19.0-rc";
125135
+ Runtimes2["Node200rc"] = "node-20.0-rc";
125136
+ Runtimes2["Node210rc"] = "node-21.0-rc";
125137
+ Runtimes2["Node22rc"] = "node-22-rc";
125138
+ Runtimes2["Node23rc"] = "node-23-rc";
125139
+ Runtimes2["Node24rc"] = "node-24-rc";
125140
+ Runtimes2["Node25rc"] = "node-25-rc";
125141
+ Runtimes2["Php80rc"] = "php-8.0-rc";
125142
+ Runtimes2["Php81rc"] = "php-8.1-rc";
125143
+ Runtimes2["Php82rc"] = "php-8.2-rc";
125144
+ Runtimes2["Php83rc"] = "php-8.3-rc";
125145
+ Runtimes2["Php84rc"] = "php-8.4-rc";
125146
+ Runtimes2["Ruby30rc"] = "ruby-3.0-rc";
125147
+ Runtimes2["Ruby31rc"] = "ruby-3.1-rc";
125148
+ Runtimes2["Ruby32rc"] = "ruby-3.2-rc";
125149
+ Runtimes2["Ruby33rc"] = "ruby-3.3-rc";
125150
+ Runtimes2["Ruby34rc"] = "ruby-3.4-rc";
125151
+ Runtimes2["Ruby40rc"] = "ruby-4.0-rc";
125152
+ Runtimes2["Python38rc"] = "python-3.8-rc";
125153
+ Runtimes2["Python39rc"] = "python-3.9-rc";
125154
+ Runtimes2["Python310rc"] = "python-3.10-rc";
125155
+ Runtimes2["Python311rc"] = "python-3.11-rc";
125156
+ Runtimes2["Python312rc"] = "python-3.12-rc";
125157
+ Runtimes2["Python313rc"] = "python-3.13-rc";
125158
+ Runtimes2["Python314rc"] = "python-3.14-rc";
125159
+ Runtimes2["Pythonml311rc"] = "python-ml-3.11-rc";
125160
+ Runtimes2["Pythonml312rc"] = "python-ml-3.12-rc";
125161
+ Runtimes2["Pythonml313rc"] = "python-ml-3.13-rc";
125162
+ Runtimes2["Deno140rc"] = "deno-1.40-rc";
125163
+ Runtimes2["Deno146rc"] = "deno-1.46-rc";
125164
+ Runtimes2["Deno20rc"] = "deno-2.0-rc";
125165
+ Runtimes2["Deno25rc"] = "deno-2.5-rc";
125166
+ Runtimes2["Deno26rc"] = "deno-2.6-rc";
125167
+ Runtimes2["Dart215rc"] = "dart-2.15-rc";
125168
+ Runtimes2["Dart216rc"] = "dart-2.16-rc";
125169
+ Runtimes2["Dart217rc"] = "dart-2.17-rc";
125170
+ Runtimes2["Dart218rc"] = "dart-2.18-rc";
125171
+ Runtimes2["Dart219rc"] = "dart-2.19-rc";
125172
+ Runtimes2["Dart30rc"] = "dart-3.0-rc";
125173
+ Runtimes2["Dart31rc"] = "dart-3.1-rc";
125174
+ Runtimes2["Dart33rc"] = "dart-3.3-rc";
125175
+ Runtimes2["Dart35rc"] = "dart-3.5-rc";
125176
+ Runtimes2["Dart38rc"] = "dart-3.8-rc";
125177
+ Runtimes2["Dart39rc"] = "dart-3.9-rc";
125178
+ Runtimes2["Dart310rc"] = "dart-3.10-rc";
125179
+ Runtimes2["Dotnet60rc"] = "dotnet-6.0-rc";
125180
+ Runtimes2["Dotnet70rc"] = "dotnet-7.0-rc";
125181
+ Runtimes2["Dotnet80rc"] = "dotnet-8.0-rc";
125182
+ Runtimes2["Dotnet10rc"] = "dotnet-10-rc";
125183
+ Runtimes2["Java80rc"] = "java-8.0-rc";
125184
+ Runtimes2["Java110rc"] = "java-11.0-rc";
125185
+ Runtimes2["Java170rc"] = "java-17.0-rc";
125186
+ Runtimes2["Java180rc"] = "java-18.0-rc";
125187
+ Runtimes2["Java210rc"] = "java-21.0-rc";
125188
+ Runtimes2["Java22rc"] = "java-22-rc";
125189
+ Runtimes2["Java25rc"] = "java-25-rc";
125190
+ Runtimes2["Swift55rc"] = "swift-5.5-rc";
125191
+ Runtimes2["Swift58rc"] = "swift-5.8-rc";
125192
+ Runtimes2["Swift59rc"] = "swift-5.9-rc";
125193
+ Runtimes2["Swift510rc"] = "swift-5.10-rc";
125194
+ Runtimes2["Swift62rc"] = "swift-6.2-rc";
125195
+ Runtimes2["Kotlin16rc"] = "kotlin-1.6-rc";
125196
+ Runtimes2["Kotlin18rc"] = "kotlin-1.8-rc";
125197
+ Runtimes2["Kotlin19rc"] = "kotlin-1.9-rc";
125198
+ Runtimes2["Kotlin20rc"] = "kotlin-2.0-rc";
125199
+ Runtimes2["Kotlin23rc"] = "kotlin-2.3-rc";
125200
+ Runtimes2["Cpp17rc"] = "cpp-17-rc";
125201
+ Runtimes2["Cpp20rc"] = "cpp-20-rc";
125202
+ Runtimes2["Bun10rc"] = "bun-1.0-rc";
125203
+ Runtimes2["Bun11rc"] = "bun-1.1-rc";
125204
+ Runtimes2["Bun12rc"] = "bun-1.2-rc";
125205
+ Runtimes2["Bun13rc"] = "bun-1.3-rc";
125206
+ Runtimes2["Go123rc"] = "go-1.23-rc";
125207
+ Runtimes2["Go124rc"] = "go-1.24-rc";
125208
+ Runtimes2["Go125rc"] = "go-1.25-rc";
125209
+ Runtimes2["Go126rc"] = "go-1.26-rc";
125210
+ Runtimes2["Static1rc"] = "static-1-rc";
125211
+ Runtimes2["Flutter324rc"] = "flutter-3.24-rc";
125212
+ Runtimes2["Flutter327rc"] = "flutter-3.27-rc";
125213
+ Runtimes2["Flutter329rc"] = "flutter-3.29-rc";
125214
+ Runtimes2["Flutter332rc"] = "flutter-3.32-rc";
125215
+ Runtimes2["Flutter335rc"] = "flutter-3.35-rc";
125216
+ Runtimes2["Flutter338rc"] = "flutter-3.38-rc";
125067
125217
  })(Runtimes || (Runtimes = {}));
125068
125218
  var UseCases;
125069
125219
  (function(UseCases2) {
@@ -125626,9 +125776,6 @@ var BuildRuntime;
125626
125776
  BuildRuntime2["Pythonml311"] = "python-ml-3.11";
125627
125777
  BuildRuntime2["Pythonml312"] = "python-ml-3.12";
125628
125778
  BuildRuntime2["Pythonml313"] = "python-ml-3.13";
125629
- BuildRuntime2["Deno121"] = "deno-1.21";
125630
- BuildRuntime2["Deno124"] = "deno-1.24";
125631
- BuildRuntime2["Deno135"] = "deno-1.35";
125632
125779
  BuildRuntime2["Deno140"] = "deno-1.40";
125633
125780
  BuildRuntime2["Deno146"] = "deno-1.46";
125634
125781
  BuildRuntime2["Deno20"] = "deno-2.0";
@@ -125684,6 +125831,92 @@ var BuildRuntime;
125684
125831
  BuildRuntime2["Flutter332"] = "flutter-3.32";
125685
125832
  BuildRuntime2["Flutter335"] = "flutter-3.35";
125686
125833
  BuildRuntime2["Flutter338"] = "flutter-3.38";
125834
+ BuildRuntime2["Node145rc"] = "node-14.5-rc";
125835
+ BuildRuntime2["Node160rc"] = "node-16.0-rc";
125836
+ BuildRuntime2["Node180rc"] = "node-18.0-rc";
125837
+ BuildRuntime2["Node190rc"] = "node-19.0-rc";
125838
+ BuildRuntime2["Node200rc"] = "node-20.0-rc";
125839
+ BuildRuntime2["Node210rc"] = "node-21.0-rc";
125840
+ BuildRuntime2["Node22rc"] = "node-22-rc";
125841
+ BuildRuntime2["Node23rc"] = "node-23-rc";
125842
+ BuildRuntime2["Node24rc"] = "node-24-rc";
125843
+ BuildRuntime2["Node25rc"] = "node-25-rc";
125844
+ BuildRuntime2["Php80rc"] = "php-8.0-rc";
125845
+ BuildRuntime2["Php81rc"] = "php-8.1-rc";
125846
+ BuildRuntime2["Php82rc"] = "php-8.2-rc";
125847
+ BuildRuntime2["Php83rc"] = "php-8.3-rc";
125848
+ BuildRuntime2["Php84rc"] = "php-8.4-rc";
125849
+ BuildRuntime2["Ruby30rc"] = "ruby-3.0-rc";
125850
+ BuildRuntime2["Ruby31rc"] = "ruby-3.1-rc";
125851
+ BuildRuntime2["Ruby32rc"] = "ruby-3.2-rc";
125852
+ BuildRuntime2["Ruby33rc"] = "ruby-3.3-rc";
125853
+ BuildRuntime2["Ruby34rc"] = "ruby-3.4-rc";
125854
+ BuildRuntime2["Ruby40rc"] = "ruby-4.0-rc";
125855
+ BuildRuntime2["Python38rc"] = "python-3.8-rc";
125856
+ BuildRuntime2["Python39rc"] = "python-3.9-rc";
125857
+ BuildRuntime2["Python310rc"] = "python-3.10-rc";
125858
+ BuildRuntime2["Python311rc"] = "python-3.11-rc";
125859
+ BuildRuntime2["Python312rc"] = "python-3.12-rc";
125860
+ BuildRuntime2["Python313rc"] = "python-3.13-rc";
125861
+ BuildRuntime2["Python314rc"] = "python-3.14-rc";
125862
+ BuildRuntime2["Pythonml311rc"] = "python-ml-3.11-rc";
125863
+ BuildRuntime2["Pythonml312rc"] = "python-ml-3.12-rc";
125864
+ BuildRuntime2["Pythonml313rc"] = "python-ml-3.13-rc";
125865
+ BuildRuntime2["Deno140rc"] = "deno-1.40-rc";
125866
+ BuildRuntime2["Deno146rc"] = "deno-1.46-rc";
125867
+ BuildRuntime2["Deno20rc"] = "deno-2.0-rc";
125868
+ BuildRuntime2["Deno25rc"] = "deno-2.5-rc";
125869
+ BuildRuntime2["Deno26rc"] = "deno-2.6-rc";
125870
+ BuildRuntime2["Dart215rc"] = "dart-2.15-rc";
125871
+ BuildRuntime2["Dart216rc"] = "dart-2.16-rc";
125872
+ BuildRuntime2["Dart217rc"] = "dart-2.17-rc";
125873
+ BuildRuntime2["Dart218rc"] = "dart-2.18-rc";
125874
+ BuildRuntime2["Dart219rc"] = "dart-2.19-rc";
125875
+ BuildRuntime2["Dart30rc"] = "dart-3.0-rc";
125876
+ BuildRuntime2["Dart31rc"] = "dart-3.1-rc";
125877
+ BuildRuntime2["Dart33rc"] = "dart-3.3-rc";
125878
+ BuildRuntime2["Dart35rc"] = "dart-3.5-rc";
125879
+ BuildRuntime2["Dart38rc"] = "dart-3.8-rc";
125880
+ BuildRuntime2["Dart39rc"] = "dart-3.9-rc";
125881
+ BuildRuntime2["Dart310rc"] = "dart-3.10-rc";
125882
+ BuildRuntime2["Dotnet60rc"] = "dotnet-6.0-rc";
125883
+ BuildRuntime2["Dotnet70rc"] = "dotnet-7.0-rc";
125884
+ BuildRuntime2["Dotnet80rc"] = "dotnet-8.0-rc";
125885
+ BuildRuntime2["Dotnet10rc"] = "dotnet-10-rc";
125886
+ BuildRuntime2["Java80rc"] = "java-8.0-rc";
125887
+ BuildRuntime2["Java110rc"] = "java-11.0-rc";
125888
+ BuildRuntime2["Java170rc"] = "java-17.0-rc";
125889
+ BuildRuntime2["Java180rc"] = "java-18.0-rc";
125890
+ BuildRuntime2["Java210rc"] = "java-21.0-rc";
125891
+ BuildRuntime2["Java22rc"] = "java-22-rc";
125892
+ BuildRuntime2["Java25rc"] = "java-25-rc";
125893
+ BuildRuntime2["Swift55rc"] = "swift-5.5-rc";
125894
+ BuildRuntime2["Swift58rc"] = "swift-5.8-rc";
125895
+ BuildRuntime2["Swift59rc"] = "swift-5.9-rc";
125896
+ BuildRuntime2["Swift510rc"] = "swift-5.10-rc";
125897
+ BuildRuntime2["Swift62rc"] = "swift-6.2-rc";
125898
+ BuildRuntime2["Kotlin16rc"] = "kotlin-1.6-rc";
125899
+ BuildRuntime2["Kotlin18rc"] = "kotlin-1.8-rc";
125900
+ BuildRuntime2["Kotlin19rc"] = "kotlin-1.9-rc";
125901
+ BuildRuntime2["Kotlin20rc"] = "kotlin-2.0-rc";
125902
+ BuildRuntime2["Kotlin23rc"] = "kotlin-2.3-rc";
125903
+ BuildRuntime2["Cpp17rc"] = "cpp-17-rc";
125904
+ BuildRuntime2["Cpp20rc"] = "cpp-20-rc";
125905
+ BuildRuntime2["Bun10rc"] = "bun-1.0-rc";
125906
+ BuildRuntime2["Bun11rc"] = "bun-1.1-rc";
125907
+ BuildRuntime2["Bun12rc"] = "bun-1.2-rc";
125908
+ BuildRuntime2["Bun13rc"] = "bun-1.3-rc";
125909
+ BuildRuntime2["Go123rc"] = "go-1.23-rc";
125910
+ BuildRuntime2["Go124rc"] = "go-1.24-rc";
125911
+ BuildRuntime2["Go125rc"] = "go-1.25-rc";
125912
+ BuildRuntime2["Go126rc"] = "go-1.26-rc";
125913
+ BuildRuntime2["Static1rc"] = "static-1-rc";
125914
+ BuildRuntime2["Flutter324rc"] = "flutter-3.24-rc";
125915
+ BuildRuntime2["Flutter327rc"] = "flutter-3.27-rc";
125916
+ BuildRuntime2["Flutter329rc"] = "flutter-3.29-rc";
125917
+ BuildRuntime2["Flutter332rc"] = "flutter-3.32-rc";
125918
+ BuildRuntime2["Flutter335rc"] = "flutter-3.35-rc";
125919
+ BuildRuntime2["Flutter338rc"] = "flutter-3.38-rc";
125687
125920
  })(BuildRuntime || (BuildRuntime = {}));
125688
125921
  var Adapter;
125689
125922
  (function(Adapter2) {
@@ -125840,28 +126073,24 @@ var BillingPlanGroup;
125840
126073
  BillingPlanGroup2["Pro"] = "pro";
125841
126074
  BillingPlanGroup2["Scale"] = "scale";
125842
126075
  })(BillingPlanGroup || (BillingPlanGroup = {}));
125843
- var DomainPurchasePaymentStatus;
125844
- (function(DomainPurchasePaymentStatus2) {
125845
- DomainPurchasePaymentStatus2["Pending"] = "pending";
125846
- DomainPurchasePaymentStatus2["PendingConfirmation"] = "pending_confirmation";
125847
- DomainPurchasePaymentStatus2["PendingPaymentProcessing"] = "pending_payment_processing";
125848
- DomainPurchasePaymentStatus2["Authorized"] = "authorized";
125849
- DomainPurchasePaymentStatus2["Captured"] = "captured";
125850
- DomainPurchasePaymentStatus2["Failed"] = "failed";
125851
- DomainPurchasePaymentStatus2["CaptureFailed"] = "capture_failed";
125852
- DomainPurchasePaymentStatus2["RenewalCaptureFailed"] = "renewal_capture_failed";
125853
- })(DomainPurchasePaymentStatus || (DomainPurchasePaymentStatus = {}));
125854
- var DomainTransferStatusStatus;
125855
- (function(DomainTransferStatusStatus2) {
125856
- DomainTransferStatusStatus2["Transferrable"] = "transferrable";
125857
- DomainTransferStatusStatus2["NotTransferrable"] = "not_transferrable";
125858
- DomainTransferStatusStatus2["PendingOwner"] = "pending_owner";
125859
- DomainTransferStatusStatus2["PendingAdmin"] = "pending_admin";
125860
- DomainTransferStatusStatus2["PendingRegistry"] = "pending_registry";
125861
- DomainTransferStatusStatus2["Completed"] = "completed";
125862
- DomainTransferStatusStatus2["Cancelled"] = "cancelled";
125863
- DomainTransferStatusStatus2["ServiceUnavailable"] = "service_unavailable";
125864
- })(DomainTransferStatusStatus || (DomainTransferStatusStatus = {}));
126076
+ var DomainTransferStatusEnum;
126077
+ (function(DomainTransferStatusEnum2) {
126078
+ DomainTransferStatusEnum2["Transferrable"] = "transferrable";
126079
+ DomainTransferStatusEnum2["NotTransferrable"] = "not_transferrable";
126080
+ DomainTransferStatusEnum2["PendingOwner"] = "pending_owner";
126081
+ DomainTransferStatusEnum2["PendingAdmin"] = "pending_admin";
126082
+ DomainTransferStatusEnum2["PendingRegistry"] = "pending_registry";
126083
+ DomainTransferStatusEnum2["Completed"] = "completed";
126084
+ DomainTransferStatusEnum2["Cancelled"] = "cancelled";
126085
+ DomainTransferStatusEnum2["ServiceUnavailable"] = "service_unavailable";
126086
+ })(DomainTransferStatusEnum || (DomainTransferStatusEnum = {}));
126087
+ var DomainPurchaseStatus;
126088
+ (function(DomainPurchaseStatus2) {
126089
+ DomainPurchaseStatus2["Pending"] = "pending";
126090
+ DomainPurchaseStatus2["Succeeded"] = "succeeded";
126091
+ DomainPurchaseStatus2["Failed"] = "failed";
126092
+ DomainPurchaseStatus2["Cancelled"] = "cancelled";
126093
+ })(DomainPurchaseStatus || (DomainPurchaseStatus = {}));
125865
126094
 
125866
126095
  // lib/parser.ts
125867
126096
  var { description } = package_default;
@@ -126109,6 +126338,7 @@ var commandDescriptions = {
126109
126338
  messaging: `The messaging command allows you to manage topics and targets and send messages.`,
126110
126339
  migrations: `The migrations command allows you to migrate data between services.`,
126111
126340
  vcs: `The vcs command allows you to interact with VCS providers and manage your code repositories.`,
126341
+ webhooks: `The webhooks command allows you to manage your project webhooks.`,
126112
126342
  main: import_chalk.default.redBright(`${logo}${description}`)
126113
126343
  };
126114
126344
 
@@ -128019,6 +128249,7 @@ var ProjectNotInitializedError = class _ProjectNotInitializedError extends Error
128019
128249
 
128020
128250
  // lib/commands/utils/deployment.ts
128021
128251
  var import_fs7 = __toESM(require("fs"), 1);
128252
+ var import_os5 = __toESM(require("os"), 1);
128022
128253
  var import_path6 = __toESM(require("path"), 1);
128023
128254
 
128024
128255
  // node_modules/tar/dist/esm/index.min.js
@@ -128033,7 +128264,7 @@ var import_path3 = require("path");
128033
128264
  var import_events2 = require("events");
128034
128265
  var import_assert = __toESM(require("assert"), 1);
128035
128266
  var import_buffer = require("buffer");
128036
- var vs = __toESM(require("zlib"), 1);
128267
+ var ks = __toESM(require("zlib"), 1);
128037
128268
  var import_zlib = __toESM(require("zlib"), 1);
128038
128269
  var import_node_path2 = require("node:path");
128039
128270
  var import_node_path3 = require("node:path");
@@ -128056,51 +128287,51 @@ var import_node_path7 = __toESM(require("node:path"), 1);
128056
128287
  var import_node_path8 = require("node:path");
128057
128288
  var import_node_fs6 = __toESM(require("node:fs"), 1);
128058
128289
  var import_node_path9 = __toESM(require("node:path"), 1);
128059
- var Dr = Object.defineProperty;
128290
+ var Nr = Object.defineProperty;
128060
128291
  var Ar = (s3, t) => {
128061
- for (var e in t) Dr(s3, e, { get: t[e], enumerable: true });
128292
+ for (var e in t) Nr(s3, e, { get: t[e], enumerable: true });
128062
128293
  };
128063
- var Ts = typeof process == "object" && process ? process : { stdout: null, stderr: null };
128064
- var Cr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof import_node_stream.default || Fr(s3) || kr(s3));
128065
- var Fr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.pipe == "function" && s3.pipe !== import_node_stream.default.Writable.prototype.pipe;
128066
- var kr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
128294
+ var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
128295
+ var Ir = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof import_node_stream.default || Cr(s3) || Fr(s3));
128296
+ var Cr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.pipe == "function" && s3.pipe !== import_node_stream.default.Writable.prototype.pipe;
128297
+ var Fr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
128067
128298
  var q = /* @__PURE__ */ Symbol("EOF");
128068
128299
  var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
128069
128300
  var rt = /* @__PURE__ */ Symbol("emittedEnd");
128070
- var xe = /* @__PURE__ */ Symbol("emittingEnd");
128301
+ var Le = /* @__PURE__ */ Symbol("emittingEnd");
128071
128302
  var jt = /* @__PURE__ */ Symbol("emittedError");
128072
- var Le = /* @__PURE__ */ Symbol("closed");
128073
- var xs = /* @__PURE__ */ Symbol("read");
128074
- var Ne = /* @__PURE__ */ Symbol("flush");
128075
- var Ls = /* @__PURE__ */ Symbol("flushChunk");
128303
+ var Ne = /* @__PURE__ */ Symbol("closed");
128304
+ var Ts = /* @__PURE__ */ Symbol("read");
128305
+ var Ae = /* @__PURE__ */ Symbol("flush");
128306
+ var xs = /* @__PURE__ */ Symbol("flushChunk");
128076
128307
  var z2 = /* @__PURE__ */ Symbol("encoding");
128077
128308
  var Mt = /* @__PURE__ */ Symbol("decoder");
128078
128309
  var b = /* @__PURE__ */ Symbol("flowing");
128079
128310
  var Qt = /* @__PURE__ */ Symbol("paused");
128080
128311
  var Bt = /* @__PURE__ */ Symbol("resume");
128081
- var g = /* @__PURE__ */ Symbol("buffer");
128082
- var D = /* @__PURE__ */ Symbol("pipes");
128083
- var _ = /* @__PURE__ */ Symbol("bufferLength");
128084
- var Si = /* @__PURE__ */ Symbol("bufferPush");
128312
+ var _ = /* @__PURE__ */ Symbol("buffer");
128313
+ var A = /* @__PURE__ */ Symbol("pipes");
128314
+ var g = /* @__PURE__ */ Symbol("bufferLength");
128315
+ var yi = /* @__PURE__ */ Symbol("bufferPush");
128085
128316
  var De = /* @__PURE__ */ Symbol("bufferShift");
128086
128317
  var L = /* @__PURE__ */ Symbol("objectMode");
128087
128318
  var w = /* @__PURE__ */ Symbol("destroyed");
128088
- var yi = /* @__PURE__ */ Symbol("error");
128089
- var Ri = /* @__PURE__ */ Symbol("emitData");
128090
- var Ns = /* @__PURE__ */ Symbol("emitEnd");
128091
- var bi = /* @__PURE__ */ Symbol("emitEnd2");
128319
+ var Ri = /* @__PURE__ */ Symbol("error");
128320
+ var bi = /* @__PURE__ */ Symbol("emitData");
128321
+ var Ls = /* @__PURE__ */ Symbol("emitEnd");
128322
+ var _i = /* @__PURE__ */ Symbol("emitEnd2");
128092
128323
  var Z = /* @__PURE__ */ Symbol("async");
128093
128324
  var gi = /* @__PURE__ */ Symbol("abort");
128094
- var Ae = /* @__PURE__ */ Symbol("aborted");
128325
+ var Ie = /* @__PURE__ */ Symbol("aborted");
128095
128326
  var Jt = /* @__PURE__ */ Symbol("signal");
128096
128327
  var yt = /* @__PURE__ */ Symbol("dataListeners");
128097
128328
  var C = /* @__PURE__ */ Symbol("discarded");
128098
128329
  var te = (s3) => Promise.resolve().then(s3);
128099
- var vr = (s3) => s3();
128100
- var Mr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
128101
- var Br = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
128102
- var Pr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
128103
- var Ie = class {
128330
+ var kr = (s3) => s3();
128331
+ var vr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
128332
+ var Mr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
128333
+ var Br = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
128334
+ var Ce = class {
128104
128335
  src;
128105
128336
  dest;
128106
128337
  opts;
@@ -128117,7 +128348,7 @@ var Ie = class {
128117
128348
  this.unpipe(), this.opts.end && this.dest.end();
128118
128349
  }
128119
128350
  };
128120
- var _i = class extends Ie {
128351
+ var Oi = class extends Ce {
128121
128352
  unpipe() {
128122
128353
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
128123
128354
  }
@@ -128125,26 +128356,26 @@ var _i = class extends Ie {
128125
128356
  super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
128126
128357
  }
128127
128358
  };
128128
- var zr = (s3) => !!s3.objectMode;
128129
- var Ur = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
128130
- var A = class extends import_node_events.EventEmitter {
128359
+ var Pr = (s3) => !!s3.objectMode;
128360
+ var zr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
128361
+ var D = class extends import_node_events.EventEmitter {
128131
128362
  [b] = false;
128132
128363
  [Qt] = false;
128133
- [D] = [];
128134
- [g] = [];
128364
+ [A] = [];
128365
+ [_] = [];
128135
128366
  [L];
128136
128367
  [z2];
128137
128368
  [Z];
128138
128369
  [Mt];
128139
128370
  [q] = false;
128140
128371
  [rt] = false;
128141
- [xe] = false;
128142
128372
  [Le] = false;
128373
+ [Ne] = false;
128143
128374
  [jt] = null;
128144
- [_] = 0;
128375
+ [g] = 0;
128145
128376
  [w] = false;
128146
128377
  [Jt];
128147
- [Ae] = false;
128378
+ [Ie] = false;
128148
128379
  [yt] = 0;
128149
128380
  [C] = false;
128150
128381
  writable = true;
@@ -128152,12 +128383,12 @@ var A = class extends import_node_events.EventEmitter {
128152
128383
  constructor(...t) {
128153
128384
  let e = t[0] || {};
128154
128385
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
128155
- zr(e) ? (this[L] = true, this[z2] = null) : Ur(e) ? (this[z2] = e.encoding, this[L] = false) : (this[L] = false, this[z2] = null), this[Z] = !!e.async, this[Mt] = this[z2] ? new import_node_string_decoder.StringDecoder(this[z2]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[g] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[D] });
128386
+ Pr(e) ? (this[L] = true, this[z2] = null) : zr(e) ? (this[z2] = e.encoding, this[L] = false) : (this[L] = false, this[z2] = null), this[Z] = !!e.async, this[Mt] = this[z2] ? new import_node_string_decoder.StringDecoder(this[z2]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
128156
128387
  let { signal: i } = e;
128157
128388
  i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
128158
128389
  }
128159
128390
  get bufferLength() {
128160
- return this[_];
128391
+ return this[g];
128161
128392
  }
128162
128393
  get encoding() {
128163
128394
  return this[z2];
@@ -128181,46 +128412,46 @@ var A = class extends import_node_events.EventEmitter {
128181
128412
  this[Z] = this[Z] || !!t;
128182
128413
  }
128183
128414
  [gi]() {
128184
- this[Ae] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
128415
+ this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
128185
128416
  }
128186
128417
  get aborted() {
128187
- return this[Ae];
128418
+ return this[Ie];
128188
128419
  }
128189
128420
  set aborted(t) {
128190
128421
  }
128191
128422
  write(t, e, i) {
128192
- if (this[Ae]) return false;
128423
+ if (this[Ie]) return false;
128193
128424
  if (this[q]) throw new Error("write after end");
128194
128425
  if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
128195
128426
  typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
128196
- let r = this[Z] ? te : vr;
128427
+ let r = this[Z] ? te : kr;
128197
128428
  if (!this[L] && !Buffer.isBuffer(t)) {
128198
- if (Pr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
128199
- else if (Br(t)) t = Buffer.from(t);
128429
+ if (Br(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
128430
+ else if (Mr(t)) t = Buffer.from(t);
128200
128431
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
128201
128432
  }
128202
- 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[z2] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z2] && (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]);
128433
+ 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[z2] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z2] && (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]);
128203
128434
  }
128204
128435
  read(t) {
128205
128436
  if (this[w]) return null;
128206
- if (this[C] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[j](), null;
128207
- this[L] && (t = null), this[g].length > 1 && !this[L] && (this[g] = [this[z2] ? this[g].join("") : Buffer.concat(this[g], this[_])]);
128208
- let e = this[xs](t || null, this[g][0]);
128437
+ if (this[C] = false, this[g] === 0 || t === 0 || t && t > this[g]) return this[j](), null;
128438
+ this[L] && (t = null), this[_].length > 1 && !this[L] && (this[_] = [this[z2] ? this[_].join("") : Buffer.concat(this[_], this[g])]);
128439
+ let e = this[Ts](t || null, this[_][0]);
128209
128440
  return this[j](), e;
128210
128441
  }
128211
- [xs](t, e) {
128442
+ [Ts](t, e) {
128212
128443
  if (this[L]) this[De]();
128213
128444
  else {
128214
128445
  let i = e;
128215
- 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);
128446
+ 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);
128216
128447
  }
128217
- return this.emit("data", e), !this[g].length && !this[q] && this.emit("drain"), e;
128448
+ return this.emit("data", e), !this[_].length && !this[q] && this.emit("drain"), e;
128218
128449
  }
128219
128450
  end(t, e, i) {
128220
128451
  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;
128221
128452
  }
128222
128453
  [Bt]() {
128223
- 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"));
128454
+ 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"));
128224
128455
  }
128225
128456
  resume() {
128226
128457
  return this[Bt]();
@@ -128237,39 +128468,39 @@ var A = class extends import_node_events.EventEmitter {
128237
128468
  get paused() {
128238
128469
  return this[Qt];
128239
128470
  }
128240
- [Si](t) {
128241
- this[L] ? this[_] += 1 : this[_] += t.length, this[g].push(t);
128471
+ [yi](t) {
128472
+ this[L] ? this[g] += 1 : this[g] += t.length, this[_].push(t);
128242
128473
  }
128243
128474
  [De]() {
128244
- return this[L] ? this[_] -= 1 : this[_] -= this[g][0].length, this[g].shift();
128475
+ return this[L] ? this[g] -= 1 : this[g] -= this[_][0].length, this[_].shift();
128245
128476
  }
128246
- [Ne](t = false) {
128477
+ [Ae](t = false) {
128247
128478
  do
128248
128479
  ;
128249
- while (this[Ls](this[De]()) && this[g].length);
128250
- !t && !this[g].length && !this[q] && this.emit("drain");
128480
+ while (this[xs](this[De]()) && this[_].length);
128481
+ !t && !this[_].length && !this[q] && this.emit("drain");
128251
128482
  }
128252
- [Ls](t) {
128483
+ [xs](t) {
128253
128484
  return this.emit("data", t), this[b];
128254
128485
  }
128255
128486
  pipe(t, e) {
128256
128487
  if (this[w]) return t;
128257
128488
  this[C] = false;
128258
128489
  let i = this[rt];
128259
- 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;
128490
+ 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;
128260
128491
  }
128261
128492
  unpipe(t) {
128262
- let e = this[D].find((i) => i.dest === t);
128263
- 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());
128493
+ let e = this[A].find((i) => i.dest === t);
128494
+ 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());
128264
128495
  }
128265
128496
  addListener(t, e) {
128266
128497
  return this.on(t, e);
128267
128498
  }
128268
128499
  on(t, e) {
128269
128500
  let i = super.on(t, e);
128270
- if (t === "data") this[C] = false, this[yt]++, !this[D].length && !this[b] && this[Bt]();
128271
- else if (t === "readable" && this[_] !== 0) super.emit("readable");
128272
- else if (Mr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
128501
+ if (t === "data") this[C] = false, this[yt]++, !this[A].length && !this[b] && this[Bt]();
128502
+ else if (t === "readable" && this[g] !== 0) super.emit("readable");
128503
+ else if (vr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
128273
128504
  else if (t === "error" && this[jt]) {
128274
128505
  let r = e;
128275
128506
  this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
@@ -128281,29 +128512,29 @@ var A = class extends import_node_events.EventEmitter {
128281
128512
  }
128282
128513
  off(t, e) {
128283
128514
  let i = super.off(t, e);
128284
- return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[D].length && (this[b] = false)), i;
128515
+ return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[A].length && (this[b] = false)), i;
128285
128516
  }
128286
128517
  removeAllListeners(t) {
128287
128518
  let e = super.removeAllListeners(t);
128288
- return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[D].length && (this[b] = false)), e;
128519
+ return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[A].length && (this[b] = false)), e;
128289
128520
  }
128290
128521
  get emittedEnd() {
128291
128522
  return this[rt];
128292
128523
  }
128293
128524
  [j]() {
128294
- !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);
128525
+ !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);
128295
128526
  }
128296
128527
  emit(t, ...e) {
128297
128528
  let i = e[0];
128298
128529
  if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
128299
- if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[Ri](i)), true) : this[Ri](i);
128300
- if (t === "end") return this[Ns]();
128530
+ if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[bi](i)), true) : this[bi](i);
128531
+ if (t === "end") return this[Ls]();
128301
128532
  if (t === "close") {
128302
- if (this[Le] = true, !this[rt] && !this[w]) return false;
128533
+ if (this[Ne] = true, !this[rt] && !this[w]) return false;
128303
128534
  let n = super.emit("close");
128304
128535
  return this.removeAllListeners("close"), n;
128305
128536
  } else if (t === "error") {
128306
- this[jt] = i, super.emit(yi, i);
128537
+ this[jt] = i, super.emit(Ri, i);
128307
128538
  let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
128308
128539
  return this[j](), n;
128309
128540
  } else if (t === "resume") {
@@ -128316,23 +128547,23 @@ var A = class extends import_node_events.EventEmitter {
128316
128547
  let r = super.emit(t, ...e);
128317
128548
  return this[j](), r;
128318
128549
  }
128319
- [Ri](t) {
128320
- for (let i of this[D]) i.dest.write(t) === false && this.pause();
128550
+ [bi](t) {
128551
+ for (let i of this[A]) i.dest.write(t) === false && this.pause();
128321
128552
  let e = this[C] ? false : super.emit("data", t);
128322
128553
  return this[j](), e;
128323
128554
  }
128324
- [Ns]() {
128325
- return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[bi]()), true) : this[bi]());
128555
+ [Ls]() {
128556
+ return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[_i]()), true) : this[_i]());
128326
128557
  }
128327
- [bi]() {
128558
+ [_i]() {
128328
128559
  if (this[Mt]) {
128329
128560
  let e = this[Mt].end();
128330
128561
  if (e) {
128331
- for (let i of this[D]) i.dest.write(e);
128562
+ for (let i of this[A]) i.dest.write(e);
128332
128563
  this[C] || super.emit("data", e);
128333
128564
  }
128334
128565
  }
128335
- for (let e of this[D]) e.end();
128566
+ for (let e of this[A]) e.end();
128336
128567
  let t = super.emit("end");
128337
128568
  return this.removeAllListeners("end"), t;
128338
128569
  }
@@ -128379,67 +128610,67 @@ var A = class extends import_node_events.EventEmitter {
128379
128610
  }
128380
128611
  [Symbol.iterator]() {
128381
128612
  this[C] = false;
128382
- 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 = () => {
128613
+ 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 = () => {
128383
128614
  if (t) return e();
128384
128615
  let r = this.read();
128385
128616
  return r === null ? e() : { done: false, value: r };
128386
128617
  };
128387
- return this.once("end", e), this.once(yi, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
128618
+ return this.once("end", e), this.once(Ri, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
128388
128619
  return this;
128389
128620
  }, [Symbol.dispose]: () => {
128390
128621
  } };
128391
128622
  }
128392
128623
  destroy(t) {
128393
128624
  if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
128394
- this[w] = true, this[C] = true, this[g].length = 0, this[_] = 0;
128625
+ this[w] = true, this[C] = true, this[_].length = 0, this[g] = 0;
128395
128626
  let e = this;
128396
- return typeof e.close == "function" && !this[Le] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
128627
+ return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
128397
128628
  }
128398
128629
  static get isStream() {
128399
- return Cr;
128630
+ return Ir;
128400
128631
  }
128401
128632
  };
128402
- var Wr = import_fs3.default.writev;
128633
+ var Hr = import_fs3.default.writev;
128403
128634
  var ot = /* @__PURE__ */ Symbol("_autoClose");
128404
128635
  var H = /* @__PURE__ */ Symbol("_close");
128405
128636
  var ee = /* @__PURE__ */ Symbol("_ended");
128406
128637
  var m = /* @__PURE__ */ Symbol("_fd");
128407
- var Ti = /* @__PURE__ */ Symbol("_finished");
128638
+ var xi = /* @__PURE__ */ Symbol("_finished");
128408
128639
  var J = /* @__PURE__ */ Symbol("_flags");
128409
- var xi = /* @__PURE__ */ Symbol("_flush");
128410
- var Ai = /* @__PURE__ */ Symbol("_handleChunk");
128411
- var Ii = /* @__PURE__ */ Symbol("_makeBuf");
128640
+ var Li = /* @__PURE__ */ Symbol("_flush");
128641
+ var Ii = /* @__PURE__ */ Symbol("_handleChunk");
128642
+ var Ci = /* @__PURE__ */ Symbol("_makeBuf");
128412
128643
  var se = /* @__PURE__ */ Symbol("_mode");
128413
- var Ce = /* @__PURE__ */ Symbol("_needDrain");
128644
+ var Fe = /* @__PURE__ */ Symbol("_needDrain");
128414
128645
  var Ut = /* @__PURE__ */ Symbol("_onerror");
128415
128646
  var Ht = /* @__PURE__ */ Symbol("_onopen");
128416
- var Li = /* @__PURE__ */ Symbol("_onread");
128647
+ var Ni = /* @__PURE__ */ Symbol("_onread");
128417
128648
  var Pt = /* @__PURE__ */ Symbol("_onwrite");
128418
128649
  var ht = /* @__PURE__ */ Symbol("_open");
128419
128650
  var U = /* @__PURE__ */ Symbol("_path");
128420
128651
  var nt = /* @__PURE__ */ Symbol("_pos");
128421
128652
  var Y = /* @__PURE__ */ Symbol("_queue");
128422
128653
  var zt = /* @__PURE__ */ Symbol("_read");
128423
- var Ni = /* @__PURE__ */ Symbol("_readSize");
128654
+ var Ai = /* @__PURE__ */ Symbol("_readSize");
128424
128655
  var Q = /* @__PURE__ */ Symbol("_reading");
128425
128656
  var ie = /* @__PURE__ */ Symbol("_remain");
128426
128657
  var Di = /* @__PURE__ */ Symbol("_size");
128427
- var Fe = /* @__PURE__ */ Symbol("_write");
128658
+ var ke = /* @__PURE__ */ Symbol("_write");
128428
128659
  var Rt = /* @__PURE__ */ Symbol("_writing");
128429
- var ke = /* @__PURE__ */ Symbol("_defaultFlag");
128660
+ var ve = /* @__PURE__ */ Symbol("_defaultFlag");
128430
128661
  var bt = /* @__PURE__ */ Symbol("_errored");
128431
- var gt = class extends A {
128662
+ var _t = class extends D {
128432
128663
  [bt] = false;
128433
128664
  [m];
128434
128665
  [U];
128435
- [Ni];
128666
+ [Ai];
128436
128667
  [Q] = false;
128437
128668
  [Di];
128438
128669
  [ie];
128439
128670
  [ot];
128440
128671
  constructor(t, e) {
128441
128672
  if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
128442
- 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]();
128673
+ 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]();
128443
128674
  }
128444
128675
  get fd() {
128445
128676
  return this[m];
@@ -128459,19 +128690,19 @@ var gt = class extends A {
128459
128690
  [Ht](t, e) {
128460
128691
  t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
128461
128692
  }
128462
- [Ii]() {
128463
- return Buffer.allocUnsafe(Math.min(this[Ni], this[ie]));
128693
+ [Ci]() {
128694
+ return Buffer.allocUnsafe(Math.min(this[Ai], this[ie]));
128464
128695
  }
128465
128696
  [zt]() {
128466
128697
  if (!this[Q]) {
128467
128698
  this[Q] = true;
128468
- let t = this[Ii]();
128469
- if (t.length === 0) return process.nextTick(() => this[Li](null, 0, t));
128470
- import_fs3.default.read(this[m], t, 0, t.length, null, (e, i, r) => this[Li](e, i, r));
128699
+ let t = this[Ci]();
128700
+ if (t.length === 0) return process.nextTick(() => this[Ni](null, 0, t));
128701
+ import_fs3.default.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ni](e, i, r));
128471
128702
  }
128472
128703
  }
128473
- [Li](t, e, i) {
128474
- this[Q] = false, t ? this[Ut](t) : this[Ai](e, i) && this[zt]();
128704
+ [Ni](t, e, i) {
128705
+ this[Q] = false, t ? this[Ut](t) : this[Ii](e, i) && this[zt]();
128475
128706
  }
128476
128707
  [H]() {
128477
128708
  if (this[ot] && typeof this[m] == "number") {
@@ -128482,7 +128713,7 @@ var gt = class extends A {
128482
128713
  [Ut](t) {
128483
128714
  this[Q] = true, this[H](), this.emit("error", t);
128484
128715
  }
128485
- [Ai](t, e) {
128716
+ [Ii](t, e) {
128486
128717
  let i = false;
128487
128718
  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;
128488
128719
  }
@@ -128500,7 +128731,7 @@ var gt = class extends A {
128500
128731
  }
128501
128732
  }
128502
128733
  };
128503
- var ve = class extends gt {
128734
+ var Me = class extends _t {
128504
128735
  [ht]() {
128505
128736
  let t = true;
128506
128737
  try {
@@ -128515,8 +128746,8 @@ var ve = class extends gt {
128515
128746
  if (!this[Q]) {
128516
128747
  this[Q] = true;
128517
128748
  do {
128518
- let e = this[Ii](), i = e.length === 0 ? 0 : import_fs3.default.readSync(this[m], e, 0, e.length, null);
128519
- if (!this[Ai](i, e)) break;
128749
+ let e = this[Ci](), i = e.length === 0 ? 0 : import_fs3.default.readSync(this[m], e, 0, e.length, null);
128750
+ if (!this[Ii](i, e)) break;
128520
128751
  } while (true);
128521
128752
  this[Q] = false;
128522
128753
  }
@@ -128539,19 +128770,19 @@ var tt = class extends import_events.default {
128539
128770
  [Rt] = false;
128540
128771
  [ee] = false;
128541
128772
  [Y] = [];
128542
- [Ce] = false;
128773
+ [Fe] = false;
128543
128774
  [U];
128544
128775
  [se];
128545
128776
  [ot];
128546
128777
  [m];
128547
- [ke];
128778
+ [ve];
128548
128779
  [J];
128549
- [Ti] = false;
128780
+ [xi] = false;
128550
128781
  [nt];
128551
128782
  constructor(t, e) {
128552
128783
  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;
128553
128784
  let i = this[nt] !== void 0 ? "r+" : "w";
128554
- this[ke] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
128785
+ this[ve] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
128555
128786
  }
128556
128787
  emit(t, ...e) {
128557
128788
  if (t === "error") {
@@ -128573,26 +128804,26 @@ var tt = class extends import_events.default {
128573
128804
  import_fs3.default.open(this[U], this[J], this[se], (t, e) => this[Ht](t, e));
128574
128805
  }
128575
128806
  [Ht](t, e) {
128576
- 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]());
128807
+ 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]());
128577
128808
  }
128578
128809
  end(t, e) {
128579
128810
  return t && this.write(t, e), this[ee] = true, !this[Rt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
128580
128811
  }
128581
128812
  write(t, e) {
128582
- 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);
128813
+ 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);
128583
128814
  }
128584
- [Fe](t) {
128815
+ [ke](t) {
128585
128816
  import_fs3.default.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
128586
128817
  }
128587
128818
  [Pt](t, e) {
128588
- 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"))));
128819
+ 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"))));
128589
128820
  }
128590
- [xi]() {
128821
+ [Li]() {
128591
128822
  if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
128592
- else if (this[Y].length === 1) this[Fe](this[Y].pop());
128823
+ else if (this[Y].length === 1) this[ke](this[Y].pop());
128593
128824
  else {
128594
128825
  let t = this[Y];
128595
- this[Y] = [], Wr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
128826
+ this[Y] = [], Hr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
128596
128827
  }
128597
128828
  }
128598
128829
  [H]() {
@@ -128605,7 +128836,7 @@ var tt = class extends import_events.default {
128605
128836
  var Wt = class extends tt {
128606
128837
  [ht]() {
128607
128838
  let t;
128608
- if (this[ke] && this[J] === "r+") try {
128839
+ if (this[ve] && this[J] === "r+") try {
128609
128840
  t = import_fs3.default.openSync(this[U], this[J], this[se]);
128610
128841
  } catch (e) {
128611
128842
  if (e?.code === "ENOENT") return this[J] = "w", this[ht]();
@@ -128620,7 +128851,7 @@ var Wt = class extends tt {
128620
128851
  this[m] = void 0, import_fs3.default.closeSync(t), this.emit("close");
128621
128852
  }
128622
128853
  }
128623
- [Fe](t) {
128854
+ [ke](t) {
128624
128855
  let e = true;
128625
128856
  try {
128626
128857
  this[Pt](null, import_fs3.default.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
@@ -128632,49 +128863,50 @@ var Wt = class extends tt {
128632
128863
  }
128633
128864
  }
128634
128865
  };
128635
- 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"]]);
128866
+ 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"]]);
128636
128867
  var As = (s3) => !!s3.sync && !!s3.file;
128637
- var Is = (s3) => !s3.sync && !!s3.file;
128638
- var Cs = (s3) => !!s3.sync && !s3.file;
128639
- var Fs = (s3) => !s3.sync && !s3.file;
128640
- var ks = (s3) => !!s3.file;
128641
- var Zr = (s3) => {
128642
- let t = Gr.get(s3);
128868
+ var Ds = (s3) => !s3.sync && !!s3.file;
128869
+ var Is = (s3) => !!s3.sync && !s3.file;
128870
+ var Cs = (s3) => !s3.sync && !s3.file;
128871
+ var Fs = (s3) => !!s3.file;
128872
+ var Gr = (s3) => {
128873
+ let t = Wr.get(s3);
128643
128874
  return t || s3;
128644
128875
  };
128645
128876
  var re = (s3 = {}) => {
128646
128877
  if (!s3) return {};
128647
128878
  let t = {};
128648
128879
  for (let [e, i] of Object.entries(s3)) {
128649
- let r = Zr(e);
128880
+ let r = Gr(e);
128650
128881
  t[r] = i;
128651
128882
  }
128652
128883
  return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
128653
128884
  };
128654
128885
  var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
128655
- Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o ? o = Array.from(o) : o = [];
128886
+ Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o = o ? Array.from(o) : [];
128656
128887
  let a = re(n);
128657
128888
  if (r?.(a, o), As(a)) {
128658
128889
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
128659
128890
  return s3(a, o);
128891
+ } else if (Ds(a)) {
128892
+ let l = t(a, o);
128893
+ return h ? l.then(() => h(), h) : l;
128660
128894
  } else if (Is(a)) {
128661
- let l = t(a, o), c = h || void 0;
128662
- return c ? l.then(() => c(), c) : l;
128663
- } else if (Cs(a)) {
128664
128895
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
128665
128896
  return e(a, o);
128666
- } else if (Fs(a)) {
128897
+ } else if (Cs(a)) {
128667
128898
  if (typeof h == "function") throw new TypeError("callback only supported with file option");
128668
128899
  return i(a, o);
128669
- } else throw new Error("impossible options??");
128900
+ }
128901
+ throw new Error("impossible options??");
128670
128902
  }, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
128671
- var Kr = import_zlib.default.constants || { ZLIB_VERNUM: 4736 };
128672
- 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));
128673
- var Vr = import_buffer.Buffer.concat;
128674
- var Ms = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat");
128675
- var $r = (s3) => s3;
128676
- var Fi = Ms?.writable === true || Ms?.set !== void 0 ? (s3) => {
128677
- import_buffer.Buffer.concat = s3 ? $r : Vr;
128903
+ var Yr = import_zlib.default.constants || { ZLIB_VERNUM: 4736 };
128904
+ 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));
128905
+ var Kr = import_buffer.Buffer.concat;
128906
+ var vs = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat");
128907
+ var Vr = (s3) => s3;
128908
+ var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
128909
+ import_buffer.Buffer.concat = s3 ? Vr : Kr;
128678
128910
  } : (s3) => {
128679
128911
  };
128680
128912
  var Ot = /* @__PURE__ */ Symbol("_superWrite");
@@ -128688,8 +128920,8 @@ var Gt = class extends Error {
128688
128920
  return "ZlibError";
128689
128921
  }
128690
128922
  };
128691
- var ki = /* @__PURE__ */ Symbol("flushFlag");
128692
- var ne = class extends A {
128923
+ var vi = /* @__PURE__ */ Symbol("flushFlag");
128924
+ var ne = class extends D {
128693
128925
  #t = false;
128694
128926
  #i = false;
128695
128927
  #s;
@@ -128708,9 +128940,9 @@ var ne = class extends A {
128708
128940
  }
128709
128941
  constructor(t, e) {
128710
128942
  if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
128711
- 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);
128943
+ 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);
128712
128944
  try {
128713
- this.#e = new vs[e](t);
128945
+ this.#e = new ks[e](t);
128714
128946
  } catch (i) {
128715
128947
  throw new Gt(i, this.constructor);
128716
128948
  }
@@ -128725,7 +128957,7 @@ var ne = class extends A {
128725
128957
  if (!this.#t) return (0, import_assert.default)(this.#e, "zlib binding closed"), this.#e.reset?.();
128726
128958
  }
128727
128959
  flush(t) {
128728
- this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(import_buffer.Buffer.alloc(0), { [ki]: t })));
128960
+ this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(import_buffer.Buffer.alloc(0), { [vi]: t })));
128729
128961
  }
128730
128962
  end(t, e, i) {
128731
128963
  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);
@@ -128744,13 +128976,13 @@ var ne = class extends A {
128744
128976
  };
128745
128977
  let o = this.#e.close;
128746
128978
  this.#e.close = () => {
128747
- }, Fi(true);
128979
+ }, ki(true);
128748
128980
  let h;
128749
128981
  try {
128750
- let l = typeof t[ki] == "number" ? t[ki] : this.#s;
128751
- h = this.#e._processChunk(t, l), Fi(false);
128982
+ let l = typeof t[vi] == "number" ? t[vi] : this.#s;
128983
+ h = this.#e._processChunk(t, l), ki(false);
128752
128984
  } catch (l) {
128753
- Fi(false), this.#o(new Gt(l, this.write));
128985
+ ki(false), this.#o(new Gt(l, this.write));
128754
128986
  } finally {
128755
128987
  this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
128756
128988
  }
@@ -128764,7 +128996,7 @@ var ne = class extends A {
128764
128996
  return i && i(), a;
128765
128997
  }
128766
128998
  };
128767
- var Me = class extends ne {
128999
+ var Be = class extends ne {
128768
129000
  #t;
128769
129001
  #i;
128770
129002
  constructor(t, e) {
@@ -128790,7 +129022,7 @@ var Me = class extends ne {
128790
129022
  }
128791
129023
  }
128792
129024
  };
128793
- var Be = class extends Me {
129025
+ var Pe = class extends Be {
128794
129026
  #t;
128795
129027
  constructor(t) {
128796
129028
  super(t, "Gzip"), this.#t = t && !!t.portable;
@@ -128799,87 +129031,87 @@ var Be = class extends Me {
128799
129031
  return this.#t ? (this.#t = false, t[9] = 255, super[Ot](t)) : super[Ot](t);
128800
129032
  }
128801
129033
  };
128802
- var Pe = class extends Me {
129034
+ var ze = class extends Be {
128803
129035
  constructor(t) {
128804
129036
  super(t, "Unzip");
128805
129037
  }
128806
129038
  };
128807
- var ze = class extends ne {
129039
+ var Ue = class extends ne {
128808
129040
  constructor(t, e) {
128809
129041
  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);
128810
129042
  }
128811
129043
  };
128812
- var Ue = class extends ze {
129044
+ var He = class extends Ue {
128813
129045
  constructor(t) {
128814
129046
  super(t, "BrotliCompress");
128815
129047
  }
128816
129048
  };
128817
- var He = class extends ze {
129049
+ var We = class extends Ue {
128818
129050
  constructor(t) {
128819
129051
  super(t, "BrotliDecompress");
128820
129052
  }
128821
129053
  };
128822
- var We = class extends ne {
129054
+ var Ge = class extends ne {
128823
129055
  constructor(t, e) {
128824
129056
  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);
128825
129057
  }
128826
129058
  };
128827
- var Ge = class extends We {
129059
+ var Ze = class extends Ge {
128828
129060
  constructor(t) {
128829
129061
  super(t, "ZstdCompress");
128830
129062
  }
128831
129063
  };
128832
- var Ze = class extends We {
129064
+ var Ye = class extends Ge {
128833
129065
  constructor(t) {
128834
129066
  super(t, "ZstdDecompress");
128835
129067
  }
128836
129068
  };
128837
- var Bs = (s3, t) => {
128838
- if (Number.isSafeInteger(s3)) s3 < 0 ? jr(s3, t) : qr(s3, t);
129069
+ var Ms = (s3, t) => {
129070
+ if (Number.isSafeInteger(s3)) s3 < 0 ? qr(s3, t) : Xr(s3, t);
128839
129071
  else throw Error("cannot encode number outside of javascript safe integer range");
128840
129072
  return t;
128841
129073
  };
128842
- var qr = (s3, t) => {
129074
+ var Xr = (s3, t) => {
128843
129075
  t[0] = 128;
128844
129076
  for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
128845
129077
  };
128846
- var jr = (s3, t) => {
129078
+ var qr = (s3, t) => {
128847
129079
  t[0] = 255;
128848
129080
  var e = false;
128849
129081
  s3 = s3 * -1;
128850
129082
  for (var i = t.length; i > 1; i--) {
128851
129083
  var r = s3 & 255;
128852
- s3 = Math.floor(s3 / 256), e ? t[i - 1] = zs(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = Us(r));
129084
+ s3 = Math.floor(s3 / 256), e ? t[i - 1] = Ps(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = zs(r));
128853
129085
  }
128854
129086
  };
128855
- var Ps = (s3) => {
128856
- let t = s3[0], e = t === 128 ? Jr(s3.subarray(1, s3.length)) : t === 255 ? Qr(s3) : null;
129087
+ var Bs = (s3) => {
129088
+ let t = s3[0], e = t === 128 ? Qr(s3.subarray(1, s3.length)) : t === 255 ? jr(s3) : null;
128857
129089
  if (e === null) throw Error("invalid base256 encoding");
128858
129090
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
128859
129091
  return e;
128860
129092
  };
128861
- var Qr = (s3) => {
129093
+ var jr = (s3) => {
128862
129094
  for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
128863
129095
  var n = Number(s3[r]), o;
128864
- i ? o = zs(n) : n === 0 ? o = n : (i = true, o = Us(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
129096
+ i ? o = Ps(n) : n === 0 ? o = n : (i = true, o = zs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
128865
129097
  }
128866
129098
  return e;
128867
129099
  };
128868
- var Jr = (s3) => {
129100
+ var Qr = (s3) => {
128869
129101
  for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
128870
129102
  var r = Number(s3[i]);
128871
129103
  r !== 0 && (e += r * Math.pow(256, t - i - 1));
128872
129104
  }
128873
129105
  return e;
128874
129106
  };
128875
- var zs = (s3) => (255 ^ s3) & 255;
128876
- var Us = (s3) => (255 ^ s3) + 1 & 255;
128877
- var Mi = {};
128878
- Ar(Mi, { code: () => Ye, isCode: () => oe, isName: () => en, name: () => he });
129107
+ var Ps = (s3) => (255 ^ s3) & 255;
129108
+ var zs = (s3) => (255 ^ s3) + 1 & 255;
129109
+ var Bi = {};
129110
+ Ar(Bi, { code: () => Ke, isCode: () => oe, isName: () => tn, name: () => he });
128879
129111
  var oe = (s3) => he.has(s3);
128880
- var en = (s3) => Ye.has(s3);
129112
+ var tn = (s3) => Ke.has(s3);
128881
129113
  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"]]);
128882
- var Ye = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
129114
+ var Ke = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
128883
129115
  var F = class {
128884
129116
  cksumValid = false;
128885
129117
  needPax = false;
@@ -128907,14 +129139,14 @@ var F = class {
128907
129139
  }
128908
129140
  decode(t, e, i, r) {
128909
129141
  if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
128910
- 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);
129142
+ 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);
128911
129143
  let n = Tt(t, e + 156, 1);
128912
129144
  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) {
128913
129145
  let h = Tt(t, e + 345, 155);
128914
129146
  this.path = h + "/" + this.path;
128915
129147
  } else {
128916
129148
  let h = Tt(t, e + 345, 130);
128917
- 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);
129149
+ 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);
128918
129150
  }
128919
129151
  let o = 256;
128920
129152
  for (let h = e; h < e + 148; h++) o += t[h];
@@ -128926,8 +129158,8 @@ var F = class {
128926
129158
  }
128927
129159
  encode(t, e = 0) {
128928
129160
  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");
128929
- let i = this.ctime || this.atime ? 130 : 155, r = sn(this.path || "", i), n = r[0], o = r[1];
128930
- 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);
129161
+ let i = this.ctime || this.atime ? 130 : 155, r = en(this.path || "", i), n = r[0], o = r[1];
129162
+ 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);
128931
129163
  let h = 256;
128932
129164
  for (let a = e; a < e + 148; a++) h += t[a];
128933
129165
  for (let a = e + 156; a < e + 512; a++) h += t[a];
@@ -128940,13 +129172,13 @@ var F = class {
128940
129172
  return this.#t;
128941
129173
  }
128942
129174
  set type(t) {
128943
- let e = String(Ye.get(t));
129175
+ let e = String(Ke.get(t));
128944
129176
  if (oe(e) || e === "Unsupported") this.#t = e;
128945
129177
  else if (oe(t)) this.#t = t;
128946
129178
  else throw new TypeError("invalid entry type: " + t);
128947
129179
  }
128948
129180
  };
128949
- var sn = (s3, t) => {
129181
+ var en = (s3, t) => {
128950
129182
  let i = s3, r = "", n, o = import_node_path2.posix.parse(s3).root || ".";
128951
129183
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
128952
129184
  else {
@@ -128959,19 +129191,19 @@ var sn = (s3, t) => {
128959
129191
  return n;
128960
129192
  };
128961
129193
  var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
128962
- var Bi = (s3, t, e) => rn(at(s3, t, e));
128963
- var rn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
128964
- var at = (s3, t, e) => Number(s3[t]) & 128 ? Ps(s3.subarray(t, t + e)) : on(s3, t, e);
128965
- var nn = (s3) => isNaN(s3) ? void 0 : s3;
128966
- var on = (s3, t, e) => nn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
128967
- var hn = { 12: 8589934591, 8: 2097151 };
128968
- 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);
128969
- var an = (s3, t, e, i) => s3.write(ln(i, e), t, e, "ascii");
128970
- var ln = (s3, t) => cn(Math.floor(s3).toString(8), t);
128971
- var cn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
128972
- var Pi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
128973
- var fn = new Array(156).join("\0");
128974
- 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);
129194
+ var Pi = (s3, t, e) => sn(at(s3, t, e));
129195
+ var sn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
129196
+ var at = (s3, t, e) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e)) : nn(s3, t, e);
129197
+ var rn = (s3) => isNaN(s3) ? void 0 : s3;
129198
+ var nn = (s3, t, e) => rn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
129199
+ var on = { 12: 8589934591, 8: 2097151 };
129200
+ 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);
129201
+ var hn = (s3, t, e, i) => s3.write(an(i, e), t, e, "ascii");
129202
+ var an = (s3, t) => ln(Math.floor(s3).toString(8), t);
129203
+ var ln = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
129204
+ var zi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
129205
+ var cn = new Array(156).join("\0");
129206
+ 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);
128975
129207
  var ct = class s {
128976
129208
  atime;
128977
129209
  mtime;
@@ -129012,13 +129244,13 @@ var ct = class s {
129012
129244
  return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
129013
129245
  }
129014
129246
  static parse(t, e, i = false) {
129015
- return new s(un(mn(t), e), i);
129247
+ return new s(dn(un(t), e), i);
129016
129248
  }
129017
129249
  };
129018
- var un = (s3, t) => t ? Object.assign({}, t, s3) : s3;
129019
- var mn = (s3) => s3.replace(/\n$/, "").split(`
129020
- `).reduce(pn, /* @__PURE__ */ Object.create(null));
129021
- var pn = (s3, t) => {
129250
+ var dn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
129251
+ var un = (s3) => s3.replace(/\n$/, "").split(`
129252
+ `).reduce(mn, /* @__PURE__ */ Object.create(null));
129253
+ var mn = (s3, t) => {
129022
129254
  let e = parseInt(t, 10);
129023
129255
  if (e !== Buffer.byteLength(t) + 1) return s3;
129024
129256
  t = t.slice((e + " ").length);
@@ -129027,9 +129259,9 @@ var pn = (s3, t) => {
129027
129259
  let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
129028
129260
  return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
129029
129261
  };
129030
- var En = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
129031
- var f = En !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replace(/\\/g, "/");
129032
- var Yt = class extends A {
129262
+ var pn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
129263
+ var f = pn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
129264
+ var Yt = class extends D {
129033
129265
  extended;
129034
129266
  globalExtended;
129035
129267
  header;
@@ -129096,41 +129328,41 @@ var Yt = class extends A {
129096
129328
  var Lt = (s3, t, e, i = {}) => {
129097
129329
  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));
129098
129330
  };
129099
- var Sn = 1024 * 1024;
129100
- var Gi = Buffer.from([31, 139]);
129101
- var Zi = Buffer.from([40, 181, 47, 253]);
129102
- var yn = Math.max(Gi.length, Zi.length);
129331
+ var wn = 1024 * 1024;
129332
+ var Zi = Buffer.from([31, 139]);
129333
+ var Yi = Buffer.from([40, 181, 47, 253]);
129334
+ var Sn = Math.max(Zi.length, Yi.length);
129103
129335
  var B = /* @__PURE__ */ Symbol("state");
129104
129336
  var Nt = /* @__PURE__ */ Symbol("writeEntry");
129105
129337
  var et = /* @__PURE__ */ Symbol("readEntry");
129106
- var zi = /* @__PURE__ */ Symbol("nextEntry");
129107
- var Hs = /* @__PURE__ */ Symbol("processEntry");
129338
+ var Ui = /* @__PURE__ */ Symbol("nextEntry");
129339
+ var Us = /* @__PURE__ */ Symbol("processEntry");
129108
129340
  var V = /* @__PURE__ */ Symbol("extendedHeader");
129109
129341
  var ae = /* @__PURE__ */ Symbol("globalExtendedHeader");
129110
129342
  var ft = /* @__PURE__ */ Symbol("meta");
129111
- var Ws = /* @__PURE__ */ Symbol("emitMeta");
129343
+ var Hs = /* @__PURE__ */ Symbol("emitMeta");
129112
129344
  var p = /* @__PURE__ */ Symbol("buffer");
129113
129345
  var it = /* @__PURE__ */ Symbol("queue");
129114
129346
  var dt = /* @__PURE__ */ Symbol("ended");
129115
- var Ui = /* @__PURE__ */ Symbol("emittedEnd");
129116
- var Dt = /* @__PURE__ */ Symbol("emit");
129347
+ var Hi = /* @__PURE__ */ Symbol("emittedEnd");
129348
+ var At = /* @__PURE__ */ Symbol("emit");
129117
129349
  var y = /* @__PURE__ */ Symbol("unzip");
129118
- var Ke = /* @__PURE__ */ Symbol("consumeChunk");
129119
- var Ve = /* @__PURE__ */ Symbol("consumeChunkSub");
129120
- var Hi = /* @__PURE__ */ Symbol("consumeBody");
129121
- var Gs = /* @__PURE__ */ Symbol("consumeMeta");
129122
- var Zs = /* @__PURE__ */ Symbol("consumeHeader");
129350
+ var Ve = /* @__PURE__ */ Symbol("consumeChunk");
129351
+ var $e = /* @__PURE__ */ Symbol("consumeChunkSub");
129352
+ var Wi = /* @__PURE__ */ Symbol("consumeBody");
129353
+ var Ws = /* @__PURE__ */ Symbol("consumeMeta");
129354
+ var Gs = /* @__PURE__ */ Symbol("consumeHeader");
129123
129355
  var le = /* @__PURE__ */ Symbol("consuming");
129124
- var Wi = /* @__PURE__ */ Symbol("bufferConcat");
129125
- var $e = /* @__PURE__ */ Symbol("maybeEnd");
129356
+ var Gi = /* @__PURE__ */ Symbol("bufferConcat");
129357
+ var Xe = /* @__PURE__ */ Symbol("maybeEnd");
129126
129358
  var Kt = /* @__PURE__ */ Symbol("writing");
129127
129359
  var ut = /* @__PURE__ */ Symbol("aborted");
129128
- var Xe = /* @__PURE__ */ Symbol("onDone");
129129
- var At = /* @__PURE__ */ Symbol("sawValidEntry");
129130
- var qe = /* @__PURE__ */ Symbol("sawNullBlock");
129131
- var je = /* @__PURE__ */ Symbol("sawEOF");
129132
- var Ys = /* @__PURE__ */ Symbol("closeStream");
129133
- var Rn = () => true;
129360
+ var qe = /* @__PURE__ */ Symbol("onDone");
129361
+ var Dt = /* @__PURE__ */ Symbol("sawValidEntry");
129362
+ var je = /* @__PURE__ */ Symbol("sawNullBlock");
129363
+ var Qe = /* @__PURE__ */ Symbol("sawEOF");
129364
+ var Zs = /* @__PURE__ */ Symbol("closeStream");
129365
+ var yn = () => true;
129134
129366
  var st = class extends import_events2.EventEmitter {
129135
129367
  file;
129136
129368
  strict;
@@ -129151,36 +129383,36 @@ var st = class extends import_events2.EventEmitter {
129151
129383
  [dt] = false;
129152
129384
  [y];
129153
129385
  [ut] = false;
129154
- [At];
129155
- [qe] = false;
129386
+ [Dt];
129156
129387
  [je] = false;
129388
+ [Qe] = false;
129157
129389
  [Kt] = false;
129158
129390
  [le] = false;
129159
- [Ui] = false;
129391
+ [Hi] = false;
129160
129392
  constructor(t = {}) {
129161
- super(), this.file = t.file || "", this.on(Xe, () => {
129162
- (this[B] === "begin" || this[At] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
129163
- }), t.ondone ? this.on(Xe, t.ondone) : this.on(Xe, () => {
129393
+ super(), this.file = t.file || "", this.on(qe, () => {
129394
+ (this[B] === "begin" || this[Dt] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
129395
+ }), t.ondone ? this.on(qe, t.ondone) : this.on(qe, () => {
129164
129396
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
129165
- }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || Sn, this.filter = typeof t.filter == "function" ? t.filter : Rn;
129397
+ }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || wn, this.filter = typeof t.filter == "function" ? t.filter : yn;
129166
129398
  let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
129167
129399
  this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
129168
129400
  let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
129169
- 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);
129401
+ 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);
129170
129402
  }
129171
129403
  warn(t, e, i = {}) {
129172
129404
  Lt(this, t, e, i);
129173
129405
  }
129174
- [Zs](t, e) {
129175
- this[At] === void 0 && (this[At] = false);
129406
+ [Gs](t, e) {
129407
+ this[Dt] === void 0 && (this[Dt] = false);
129176
129408
  let i;
129177
129409
  try {
129178
129410
  i = new F(t, e, this[V], this[ae]);
129179
129411
  } catch (r) {
129180
129412
  return this.warn("TAR_ENTRY_INVALID", r);
129181
129413
  }
129182
- if (i.nullBlock) this[qe] ? (this[je] = true, this[B] === "begin" && (this[B] = "header"), this[Dt]("eof")) : (this[qe] = true, this[Dt]("nullBlock"));
129183
- else if (this[qe] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
129414
+ if (i.nullBlock) this[je] ? (this[Qe] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
129415
+ else if (this[je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
129184
129416
  else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
129185
129417
  else {
129186
129418
  let r = i.type;
@@ -129188,52 +129420,52 @@ var st = class extends import_events2.EventEmitter {
129188
129420
  else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
129189
129421
  else {
129190
129422
  let n = this[Nt] = new Yt(i, this[V], this[ae]);
129191
- if (!this[At]) if (n.remain) {
129423
+ if (!this[Dt]) if (n.remain) {
129192
129424
  let o = () => {
129193
- n.invalid || (this[At] = true);
129425
+ n.invalid || (this[Dt] = true);
129194
129426
  };
129195
129427
  n.on("end", o);
129196
- } else this[At] = true;
129197
- 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]())));
129428
+ } else this[Dt] = true;
129429
+ 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]())));
129198
129430
  }
129199
129431
  }
129200
129432
  }
129201
- [Ys]() {
129433
+ [Zs]() {
129202
129434
  queueMicrotask(() => this.emit("close"));
129203
129435
  }
129204
- [Hs](t) {
129436
+ [Us](t) {
129205
129437
  let e = true;
129206
129438
  if (!t) this[et] = void 0, e = false;
129207
129439
  else if (Array.isArray(t)) {
129208
129440
  let [i, ...r] = t;
129209
129441
  this.emit(i, ...r);
129210
- } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[zi]()), e = false);
129442
+ } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Ui]()), e = false);
129211
129443
  return e;
129212
129444
  }
129213
- [zi]() {
129445
+ [Ui]() {
129214
129446
  do
129215
129447
  ;
129216
- while (this[Hs](this[it].shift()));
129217
- if (!this[it].length) {
129448
+ while (this[Us](this[it].shift()));
129449
+ if (this[it].length === 0) {
129218
129450
  let t = this[et];
129219
129451
  !t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
129220
129452
  }
129221
129453
  }
129222
- [Hi](t, e) {
129454
+ [Wi](t, e) {
129223
129455
  let i = this[Nt];
129224
129456
  if (!i) throw new Error("attempt to consume body without entry??");
129225
129457
  let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
129226
129458
  return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
129227
129459
  }
129228
- [Gs](t, e) {
129229
- let i = this[Nt], r = this[Hi](t, e);
129230
- return !this[Nt] && i && this[Ws](i), r;
129460
+ [Ws](t, e) {
129461
+ let i = this[Nt], r = this[Wi](t, e);
129462
+ return !this[Nt] && i && this[Hs](i), r;
129231
129463
  }
129232
- [Dt](t, e, i) {
129233
- !this[it].length && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
129464
+ [At](t, e, i) {
129465
+ this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
129234
129466
  }
129235
- [Ws](t) {
129236
- switch (this[Dt]("meta", this[ft]), t.type) {
129467
+ [Hs](t) {
129468
+ switch (this[At]("meta", this[ft]), t.type) {
129237
129469
  case "ExtendedHeader":
129238
129470
  case "OldExtendedHeader":
129239
129471
  this[V] = ct.parse(this[ft], this[V], false);
@@ -129262,12 +129494,12 @@ var st = class extends import_events2.EventEmitter {
129262
129494
  write(t, e, i) {
129263
129495
  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;
129264
129496
  if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
129265
- if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < yn) return this[p] = t, i?.(), true;
129266
- for (let a = 0; this[y] === void 0 && a < Gi.length; a++) t[a] !== Gi[a] && (this[y] = false);
129497
+ if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < Sn) return this[p] = t, i?.(), true;
129498
+ for (let a = 0; this[y] === void 0 && a < Zi.length; a++) t[a] !== Zi[a] && (this[y] = false);
129267
129499
  let o = false;
129268
129500
  if (this[y] === false && this.zstd !== false) {
129269
129501
  o = true;
129270
- for (let a = 0; a < Zi.length; a++) if (t[a] !== Zi[a]) {
129502
+ for (let a = 0; a < Yi.length; a++) if (t[a] !== Yi[a]) {
129271
129503
  o = false;
129272
129504
  break;
129273
129505
  }
@@ -129282,69 +129514,69 @@ var st = class extends import_events2.EventEmitter {
129282
129514
  }
129283
129515
  if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
129284
129516
  let a = this[dt];
129285
- 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", () => {
129286
- this[dt] = true, this[Ke]();
129517
+ 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", () => {
129518
+ this[dt] = true, this[Ve]();
129287
129519
  }), this[Kt] = true;
129288
129520
  let l = !!this[y][a ? "end" : "write"](t);
129289
129521
  return this[Kt] = false, i?.(), l;
129290
129522
  }
129291
129523
  }
129292
- this[Kt] = true, this[y] ? this[y].write(t) : this[Ke](t), this[Kt] = false;
129293
- let n = this[it].length ? false : this[et] ? this[et].flowing : true;
129294
- return !n && !this[it].length && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
129524
+ this[Kt] = true, this[y] ? this[y].write(t) : this[Ve](t), this[Kt] = false;
129525
+ let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
129526
+ return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
129295
129527
  }
129296
- [Wi](t) {
129528
+ [Gi](t) {
129297
129529
  t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
129298
129530
  }
129299
- [$e]() {
129300
- if (this[dt] && !this[Ui] && !this[ut] && !this[le]) {
129301
- this[Ui] = true;
129531
+ [Xe]() {
129532
+ if (this[dt] && !this[Hi] && !this[ut] && !this[le]) {
129533
+ this[Hi] = true;
129302
129534
  let t = this[Nt];
129303
129535
  if (t && t.blockRemain) {
129304
129536
  let e = this[p] ? this[p].length : 0;
129305
129537
  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();
129306
129538
  }
129307
- this[Dt](Xe);
129539
+ this[At](qe);
129308
129540
  }
129309
129541
  }
129310
- [Ke](t) {
129311
- if (this[le] && t) this[Wi](t);
129312
- else if (!t && !this[p]) this[$e]();
129542
+ [Ve](t) {
129543
+ if (this[le] && t) this[Gi](t);
129544
+ else if (!t && !this[p]) this[Xe]();
129313
129545
  else if (t) {
129314
129546
  if (this[le] = true, this[p]) {
129315
- this[Wi](t);
129547
+ this[Gi](t);
129316
129548
  let e = this[p];
129317
- this[p] = void 0, this[Ve](e);
129318
- } else this[Ve](t);
129319
- for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[je]; ) {
129549
+ this[p] = void 0, this[$e](e);
129550
+ } else this[$e](t);
129551
+ for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[Qe]; ) {
129320
129552
  let e = this[p];
129321
- this[p] = void 0, this[Ve](e);
129553
+ this[p] = void 0, this[$e](e);
129322
129554
  }
129323
129555
  this[le] = false;
129324
129556
  }
129325
- (!this[p] || this[dt]) && this[$e]();
129557
+ (!this[p] || this[dt]) && this[Xe]();
129326
129558
  }
129327
- [Ve](t) {
129559
+ [$e](t) {
129328
129560
  let e = 0, i = t.length;
129329
- for (; e + 512 <= i && !this[ut] && !this[je]; ) switch (this[B]) {
129561
+ for (; e + 512 <= i && !this[ut] && !this[Qe]; ) switch (this[B]) {
129330
129562
  case "begin":
129331
129563
  case "header":
129332
- this[Zs](t, e), e += 512;
129564
+ this[Gs](t, e), e += 512;
129333
129565
  break;
129334
129566
  case "ignore":
129335
129567
  case "body":
129336
- e += this[Hi](t, e);
129568
+ e += this[Wi](t, e);
129337
129569
  break;
129338
129570
  case "meta":
129339
- e += this[Gs](t, e);
129571
+ e += this[Ws](t, e);
129340
129572
  break;
129341
129573
  default:
129342
129574
  throw new Error("invalid state: " + this[B]);
129343
129575
  }
129344
- e < i && (this[p] ? this[p] = Buffer.concat([t.subarray(e), this[p]]) : this[p] = t.subarray(e));
129576
+ e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
129345
129577
  }
129346
129578
  end(t, e, i) {
129347
- 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;
129579
+ 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;
129348
129580
  }
129349
129581
  };
129350
129582
  var mt = (s3) => {
@@ -129358,19 +129590,19 @@ var _n = (s3) => {
129358
129590
  t(e), e.resume();
129359
129591
  } : (e) => e.resume();
129360
129592
  };
129361
- var Yi = (s3, t) => {
129593
+ var Ki = (s3, t) => {
129362
129594
  let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
129363
129595
  let h = o || (0, import_path3.parse)(n).root || ".", a;
129364
129596
  if (n === h) a = false;
129365
129597
  else {
129366
129598
  let l = e.get(n);
129367
- l !== void 0 ? a = l : a = r((0, import_path3.dirname)(n), h);
129599
+ a = l !== void 0 ? l : r((0, import_path3.dirname)(n), h);
129368
129600
  }
129369
129601
  return e.set(n, a), a;
129370
129602
  };
129371
129603
  s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
129372
129604
  };
129373
- var On = (s3) => {
129605
+ var gn = (s3) => {
129374
129606
  let t = new st(s3), e = s3.file, i;
129375
129607
  try {
129376
129608
  i = import_node_fs.default.openSync(e, "r");
@@ -129394,58 +129626,58 @@ var On = (s3) => {
129394
129626
  }
129395
129627
  }
129396
129628
  };
129397
- var Tn = (s3, t) => {
129629
+ var On = (s3, t) => {
129398
129630
  let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
129399
129631
  return new Promise((o, h) => {
129400
129632
  e.on("error", h), e.on("end", o), import_node_fs.default.stat(r, (a, l) => {
129401
129633
  if (a) h(a);
129402
129634
  else {
129403
- let c = new gt(r, { readSize: i, size: l.size });
129635
+ let c = new _t(r, { readSize: i, size: l.size });
129404
129636
  c.on("error", h), c.pipe(e);
129405
129637
  }
129406
129638
  });
129407
129639
  });
129408
129640
  };
129409
- var It = K(On, Tn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
129410
- t?.length && Yi(s3, t), s3.noResume || _n(s3);
129641
+ var It = K(gn, On, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
129642
+ t?.length && Ki(s3, t), s3.noResume || _n(s3);
129411
129643
  });
129412
- 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);
129413
- var { isAbsolute: Ln, parse: Ks } = import_node_path4.win32;
129644
+ 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);
129645
+ var { isAbsolute: xn, parse: Ys } = import_node_path4.win32;
129414
129646
  var ce = (s3) => {
129415
- let t = "", e = Ks(s3);
129416
- for (; Ln(s3) || e.root; ) {
129647
+ let t = "", e = Ys(s3);
129648
+ for (; xn(s3) || e.root; ) {
129417
129649
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
129418
- s3 = s3.slice(i.length), t += i, e = Ks(s3);
129650
+ s3 = s3.slice(i.length), t += i, e = Ys(s3);
129419
129651
  }
129420
129652
  return [t, s3];
129421
129653
  };
129422
- var Qe = ["|", "<", ">", "?", ":"];
129423
- var Vi = Qe.map((s3) => String.fromCharCode(61440 + s3.charCodeAt(0)));
129424
- var Nn = new Map(Qe.map((s3, t) => [s3, Vi[t]]));
129425
- var Dn = new Map(Vi.map((s3, t) => [s3, Qe[t]]));
129426
- var $i = (s3) => Qe.reduce((t, e) => t.split(e).join(Nn.get(e)), s3);
129427
- var Vs = (s3) => Vi.reduce((t, e) => t.split(e).join(Dn.get(e)), s3);
129428
- var tr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
129654
+ var Je = ["|", "<", ">", "?", ":"];
129655
+ var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
129656
+ var Ln = new Map(Je.map((s3, t) => [s3, $i[t]]));
129657
+ var Nn = new Map($i.map((s3, t) => [s3, Je[t]]));
129658
+ var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Ln.get(e)), s3);
129659
+ var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(Nn.get(e)), s3);
129660
+ var Js = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
129429
129661
  var An = 16 * 1024 * 1024;
129430
- var qs = /* @__PURE__ */ Symbol("process");
129431
- var js = /* @__PURE__ */ Symbol("file");
129432
- var Qs = /* @__PURE__ */ Symbol("directory");
129433
- var qi = /* @__PURE__ */ Symbol("symlink");
129434
- var Js = /* @__PURE__ */ Symbol("hardlink");
129662
+ var Xs = /* @__PURE__ */ Symbol("process");
129663
+ var qs = /* @__PURE__ */ Symbol("file");
129664
+ var js = /* @__PURE__ */ Symbol("directory");
129665
+ var ji = /* @__PURE__ */ Symbol("symlink");
129666
+ var Qs = /* @__PURE__ */ Symbol("hardlink");
129435
129667
  var fe = /* @__PURE__ */ Symbol("header");
129436
- var Je = /* @__PURE__ */ Symbol("read");
129437
- var ji = /* @__PURE__ */ Symbol("lstat");
129438
- var ti = /* @__PURE__ */ Symbol("onlstat");
129439
- var Qi = /* @__PURE__ */ Symbol("onread");
129440
- var Ji = /* @__PURE__ */ Symbol("onreadlink");
129441
- var ts = /* @__PURE__ */ Symbol("openfile");
129442
- var es = /* @__PURE__ */ Symbol("onopenfile");
129668
+ var ti = /* @__PURE__ */ Symbol("read");
129669
+ var Qi = /* @__PURE__ */ Symbol("lstat");
129670
+ var ei = /* @__PURE__ */ Symbol("onlstat");
129671
+ var Ji = /* @__PURE__ */ Symbol("onread");
129672
+ var ts = /* @__PURE__ */ Symbol("onreadlink");
129673
+ var es = /* @__PURE__ */ Symbol("openfile");
129674
+ var is = /* @__PURE__ */ Symbol("onopenfile");
129443
129675
  var pt = /* @__PURE__ */ Symbol("close");
129444
- var ei = /* @__PURE__ */ Symbol("mode");
129445
- var is = /* @__PURE__ */ Symbol("awaitDrain");
129446
- var Xi = /* @__PURE__ */ Symbol("ondrain");
129676
+ var ii = /* @__PURE__ */ Symbol("mode");
129677
+ var ss = /* @__PURE__ */ Symbol("awaitDrain");
129678
+ var qi = /* @__PURE__ */ Symbol("ondrain");
129447
129679
  var X = /* @__PURE__ */ Symbol("prefix");
129448
- var de = class extends A {
129680
+ var de = class extends D {
129449
129681
  path;
129450
129682
  portable;
129451
129683
  myuid = process.getuid && process.getuid() || 0;
@@ -129484,9 +129716,9 @@ var de = class extends A {
129484
129716
  let [o, h] = ce(this.path);
129485
129717
  o && typeof h == "string" && (this.path = h, r = o);
129486
129718
  }
129487
- this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Vs(this.path.replace(/\\/g, "/")), t = t.replace(/\\/g, "/")), this.absolute = f(i.absolute || import_path4.default.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
129719
+ this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Ks(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || import_path4.default.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
129488
129720
  let n = this.statCache.get(this.absolute);
129489
- n ? this[ti](n) : this[ji]();
129721
+ n ? this[ei](n) : this[Qi]();
129490
129722
  }
129491
129723
  warn(t, e, i = {}) {
129492
129724
  return Lt(this, t, e, i);
@@ -129494,93 +129726,93 @@ var de = class extends A {
129494
129726
  emit(t, ...e) {
129495
129727
  return t === "error" && (this.#t = true), super.emit(t, ...e);
129496
129728
  }
129497
- [ji]() {
129729
+ [Qi]() {
129498
129730
  import_fs5.default.lstat(this.absolute, (t, e) => {
129499
129731
  if (t) return this.emit("error", t);
129500
- this[ti](e);
129732
+ this[ei](e);
129501
129733
  });
129502
129734
  }
129503
- [ti](t) {
129504
- this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = In(t), this.emit("stat", t), this[qs]();
129735
+ [ei](t) {
129736
+ this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Dn(t), this.emit("stat", t), this[Xs]();
129505
129737
  }
129506
- [qs]() {
129738
+ [Xs]() {
129507
129739
  switch (this.type) {
129508
129740
  case "File":
129509
- return this[js]();
129741
+ return this[qs]();
129510
129742
  case "Directory":
129511
- return this[Qs]();
129743
+ return this[js]();
129512
129744
  case "SymbolicLink":
129513
- return this[qi]();
129745
+ return this[ji]();
129514
129746
  default:
129515
129747
  return this.end();
129516
129748
  }
129517
129749
  }
129518
- [ei](t) {
129519
- return Ki(t, this.type === "Directory", this.portable);
129750
+ [ii](t) {
129751
+ return Vi(t, this.type === "Directory", this.portable);
129520
129752
  }
129521
129753
  [X](t) {
129522
- return tr(t, this.prefix);
129754
+ return Js(t, this.prefix);
129523
129755
  }
129524
129756
  [fe]() {
129525
129757
  if (!this.stat) throw new Error("cannot write header before stat");
129526
- 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());
129758
+ 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());
129527
129759
  let t = this.header?.block;
129528
129760
  if (!t) throw new Error("failed to encode header");
129529
129761
  super.write(t);
129530
129762
  }
129531
- [Qs]() {
129763
+ [js]() {
129532
129764
  if (!this.stat) throw new Error("cannot create directory entry without stat");
129533
129765
  this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
129534
129766
  }
129535
- [qi]() {
129767
+ [ji]() {
129536
129768
  import_fs5.default.readlink(this.absolute, (t, e) => {
129537
129769
  if (t) return this.emit("error", t);
129538
- this[Ji](e);
129770
+ this[ts](e);
129539
129771
  });
129540
129772
  }
129541
- [Ji](t) {
129773
+ [ts](t) {
129542
129774
  this.linkpath = f(t), this[fe](), this.end();
129543
129775
  }
129544
- [Js](t) {
129776
+ [Qs](t) {
129545
129777
  if (!this.stat) throw new Error("cannot create link entry without stat");
129546
129778
  this.type = "Link", this.linkpath = f(import_path4.default.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
129547
129779
  }
129548
- [js]() {
129780
+ [qs]() {
129549
129781
  if (!this.stat) throw new Error("cannot create file entry without stat");
129550
129782
  if (this.stat.nlink > 1) {
129551
129783
  let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
129552
- if (e?.indexOf(this.cwd) === 0) return this[Js](e);
129784
+ if (e?.indexOf(this.cwd) === 0) return this[Qs](e);
129553
129785
  this.linkCache.set(t, this.absolute);
129554
129786
  }
129555
129787
  if (this[fe](), this.stat.size === 0) return this.end();
129556
- this[ts]();
129788
+ this[es]();
129557
129789
  }
129558
- [ts]() {
129790
+ [es]() {
129559
129791
  import_fs5.default.open(this.absolute, "r", (t, e) => {
129560
129792
  if (t) return this.emit("error", t);
129561
- this[es](e);
129793
+ this[is](e);
129562
129794
  });
129563
129795
  }
129564
- [es](t) {
129796
+ [is](t) {
129565
129797
  if (this.fd = t, this.#t) return this[pt]();
129566
129798
  if (!this.stat) throw new Error("should stat before calling onopenfile");
129567
129799
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
129568
129800
  let e = Math.min(this.blockLen, this.maxReadSize);
129569
- this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[Je]();
129801
+ this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ti]();
129570
129802
  }
129571
- [Je]() {
129803
+ [ti]() {
129572
129804
  let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
129573
129805
  if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
129574
129806
  import_fs5.default.read(t, e, i, r, n, (o, h) => {
129575
129807
  if (o) return this[pt](() => this.emit("error", o));
129576
- this[Qi](h);
129808
+ this[Ji](h);
129577
129809
  });
129578
129810
  }
129579
129811
  [pt](t = () => {
129580
129812
  }) {
129581
129813
  this.fd !== void 0 && import_fs5.default.close(this.fd, t);
129582
129814
  }
129583
- [Qi](t) {
129815
+ [Ji](t) {
129584
129816
  if (t <= 0 && this.remain > 0) {
129585
129817
  let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
129586
129818
  return this[pt](() => this.emit("error", r));
@@ -129592,9 +129824,9 @@ var de = class extends A {
129592
129824
  if (!this.buf) throw new Error("should have created buffer prior to reading");
129593
129825
  if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
129594
129826
  let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
129595
- this.write(e) ? this[Xi]() : this[is](() => this[Xi]());
129827
+ this.write(e) ? this[qi]() : this[ss](() => this[qi]());
129596
129828
  }
129597
- [is](t) {
129829
+ [ss](t) {
129598
129830
  this.once("drain", t);
129599
129831
  }
129600
129832
  write(t, e, i) {
@@ -129604,30 +129836,30 @@ var de = class extends A {
129604
129836
  }
129605
129837
  return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
129606
129838
  }
129607
- [Xi]() {
129839
+ [qi]() {
129608
129840
  if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
129609
129841
  if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
129610
- 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]();
129842
+ 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]();
129611
129843
  }
129612
129844
  };
129613
- var ii = class extends de {
129845
+ var si = class extends de {
129614
129846
  sync = true;
129615
- [ji]() {
129616
- this[ti](import_fs5.default.lstatSync(this.absolute));
129847
+ [Qi]() {
129848
+ this[ei](import_fs5.default.lstatSync(this.absolute));
129617
129849
  }
129618
- [qi]() {
129619
- this[Ji](import_fs5.default.readlinkSync(this.absolute));
129850
+ [ji]() {
129851
+ this[ts](import_fs5.default.readlinkSync(this.absolute));
129620
129852
  }
129621
- [ts]() {
129622
- this[es](import_fs5.default.openSync(this.absolute, "r"));
129853
+ [es]() {
129854
+ this[is](import_fs5.default.openSync(this.absolute, "r"));
129623
129855
  }
129624
- [Je]() {
129856
+ [ti]() {
129625
129857
  let t = true;
129626
129858
  try {
129627
129859
  let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
129628
129860
  if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
129629
129861
  let h = import_fs5.default.readSync(e, i, r, n, o);
129630
- this[Qi](h), t = false;
129862
+ this[Ji](h), t = false;
129631
129863
  } finally {
129632
129864
  if (t) try {
129633
129865
  this[pt](() => {
@@ -129636,7 +129868,7 @@ var ii = class extends de {
129636
129868
  }
129637
129869
  }
129638
129870
  }
129639
- [is](t) {
129871
+ [ss](t) {
129640
129872
  t();
129641
129873
  }
129642
129874
  [pt](t = () => {
@@ -129644,7 +129876,7 @@ var ii = class extends de {
129644
129876
  this.fd !== void 0 && import_fs5.default.closeSync(this.fd), t();
129645
129877
  }
129646
129878
  };
129647
- var si = class extends A {
129879
+ var ri = class extends D {
129648
129880
  blockLen = 0;
129649
129881
  blockRemain = 0;
129650
129882
  buf = 0;
@@ -129680,7 +129912,7 @@ var si = class extends A {
129680
129912
  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;
129681
129913
  let { type: r } = t;
129682
129914
  if (r === "Unsupported") throw new Error("writing entry that should be ignored");
129683
- 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);
129915
+ 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);
129684
129916
  let n = false;
129685
129917
  if (!this.preservePaths) {
129686
129918
  let [h, a] = ce(this.path);
@@ -129692,10 +129924,10 @@ var si = class extends A {
129692
129924
  super.write(o), t.pipe(this);
129693
129925
  }
129694
129926
  [X](t) {
129695
- return tr(t, this.prefix);
129927
+ return Js(t, this.prefix);
129696
129928
  }
129697
- [ei](t) {
129698
- return Ki(t, this.type === "Directory", this.portable);
129929
+ [ii](t) {
129930
+ return Vi(t, this.type === "Directory", this.portable);
129699
129931
  }
129700
129932
  write(t, e, i) {
129701
129933
  typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
@@ -129707,8 +129939,8 @@ var si = class extends A {
129707
129939
  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;
129708
129940
  }
129709
129941
  };
129710
- var In = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
129711
- var ri = class s2 {
129942
+ var Dn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
129943
+ var ni = class s2 {
129712
129944
  tail;
129713
129945
  head;
129714
129946
  length = 0;
@@ -129739,11 +129971,11 @@ var ri = class s2 {
129739
129971
  t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
129740
129972
  }
129741
129973
  push(...t) {
129742
- for (let e = 0, i = t.length; e < i; e++) Fn(this, t[e]);
129974
+ for (let e = 0, i = t.length; e < i; e++) Cn(this, t[e]);
129743
129975
  return this.length;
129744
129976
  }
129745
129977
  unshift(...t) {
129746
- for (var e = 0, i = t.length; e < i; e++) kn(this, t[e]);
129978
+ for (var e = 0, i = t.length; e < i; e++) Fn(this, t[e]);
129747
129979
  return this.length;
129748
129980
  }
129749
129981
  pop() {
@@ -129839,7 +130071,7 @@ var ri = class s2 {
129839
130071
  let n = [];
129840
130072
  for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
129841
130073
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
129842
- for (let o of i) r = Cn(this, r, o);
130074
+ for (let o of i) r = In(this, r, o);
129843
130075
  return n;
129844
130076
  }
129845
130077
  reverse() {
@@ -129851,14 +130083,14 @@ var ri = class s2 {
129851
130083
  return this.head = e, this.tail = t, this;
129852
130084
  }
129853
130085
  };
129854
- function Cn(s3, t, e) {
130086
+ function In(s3, t, e) {
129855
130087
  let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
129856
130088
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
129857
130089
  }
129858
- function Fn(s3, t) {
130090
+ function Cn(s3, t) {
129859
130091
  s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
129860
130092
  }
129861
- function kn(s3, t) {
130093
+ function Fn(s3, t) {
129862
130094
  s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
129863
130095
  }
129864
130096
  var ue = class {
@@ -129870,7 +130102,7 @@ var ue = class {
129870
130102
  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;
129871
130103
  }
129872
130104
  };
129873
- var fi = class {
130105
+ var di = class {
129874
130106
  path;
129875
130107
  absolute;
129876
130108
  entry;
@@ -129883,28 +130115,28 @@ var fi = class {
129883
130115
  this.path = t || "./", this.absolute = e;
129884
130116
  }
129885
130117
  };
129886
- var er = Buffer.alloc(1024);
129887
- var ni = /* @__PURE__ */ Symbol("onStat");
130118
+ var tr = Buffer.alloc(1024);
130119
+ var oi = /* @__PURE__ */ Symbol("onStat");
129888
130120
  var me = /* @__PURE__ */ Symbol("ended");
129889
130121
  var W = /* @__PURE__ */ Symbol("queue");
129890
130122
  var Ct = /* @__PURE__ */ Symbol("current");
129891
130123
  var Ft = /* @__PURE__ */ Symbol("process");
129892
130124
  var pe = /* @__PURE__ */ Symbol("processing");
129893
- var ss = /* @__PURE__ */ Symbol("processJob");
130125
+ var rs = /* @__PURE__ */ Symbol("processJob");
129894
130126
  var G = /* @__PURE__ */ Symbol("jobs");
129895
- var rs = /* @__PURE__ */ Symbol("jobDone");
129896
- var oi = /* @__PURE__ */ Symbol("addFSEntry");
129897
- var ir = /* @__PURE__ */ Symbol("addTarEntry");
129898
- var hs = /* @__PURE__ */ Symbol("stat");
129899
- var as = /* @__PURE__ */ Symbol("readdir");
129900
- var hi = /* @__PURE__ */ Symbol("onreaddir");
129901
- var ai = /* @__PURE__ */ Symbol("pipe");
129902
- var sr = /* @__PURE__ */ Symbol("entry");
129903
- var ns = /* @__PURE__ */ Symbol("entryOpt");
129904
- var li = /* @__PURE__ */ Symbol("writeEntryClass");
129905
- var nr = /* @__PURE__ */ Symbol("write");
129906
- var os5 = /* @__PURE__ */ Symbol("ondrain");
129907
- var Et = class extends A {
130127
+ var ns = /* @__PURE__ */ Symbol("jobDone");
130128
+ var hi = /* @__PURE__ */ Symbol("addFSEntry");
130129
+ var er = /* @__PURE__ */ Symbol("addTarEntry");
130130
+ var as = /* @__PURE__ */ Symbol("stat");
130131
+ var ls = /* @__PURE__ */ Symbol("readdir");
130132
+ var ai = /* @__PURE__ */ Symbol("onreaddir");
130133
+ var li = /* @__PURE__ */ Symbol("pipe");
130134
+ var ir = /* @__PURE__ */ Symbol("entry");
130135
+ var os5 = /* @__PURE__ */ Symbol("entryOpt");
130136
+ var ci = /* @__PURE__ */ Symbol("writeEntryClass");
130137
+ var rr = /* @__PURE__ */ Symbol("write");
130138
+ var hs = /* @__PURE__ */ Symbol("ondrain");
130139
+ var Et = class extends D {
129908
130140
  sync = false;
129909
130141
  opt;
129910
130142
  cwd;
@@ -129925,22 +130157,22 @@ var Et = class extends A {
129925
130157
  mtime;
129926
130158
  filter;
129927
130159
  jobs;
129928
- [li];
130160
+ [ci];
129929
130161
  onWriteEntry;
129930
130162
  [W];
129931
130163
  [G] = 0;
129932
130164
  [pe] = false;
129933
130165
  [me] = false;
129934
130166
  constructor(t = {}) {
129935
- 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) {
130167
+ 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) {
129936
130168
  if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
129937
- 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");
130169
+ 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");
129938
130170
  let e = this.zip;
129939
- e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[os5]()), this.on("resume", () => e.resume());
129940
- } else this.on("drain", this[os5]);
129941
- 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;
130171
+ e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[hs]()), this.on("resume", () => e.resume());
130172
+ } else this.on("drain", this[hs]);
130173
+ 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;
129942
130174
  }
129943
- [nr](t) {
130175
+ [rr](t) {
129944
130176
  return super.write(t);
129945
130177
  }
129946
130178
  add(t) {
@@ -129951,97 +130183,97 @@ var Et = class extends A {
129951
130183
  }
129952
130184
  write(t) {
129953
130185
  if (this[me]) throw new Error("write after end");
129954
- return t instanceof Yt ? this[ir](t) : this[oi](t), this.flowing;
130186
+ return t instanceof Yt ? this[er](t) : this[hi](t), this.flowing;
129955
130187
  }
129956
- [ir](t) {
130188
+ [er](t) {
129957
130189
  let e = f(import_path5.default.resolve(this.cwd, t.path));
129958
130190
  if (!this.filter(t.path, t)) t.resume();
129959
130191
  else {
129960
- let i = new fi(t.path, e);
129961
- i.entry = new si(t, this[ns](i)), i.entry.on("end", () => this[rs](i)), this[G] += 1, this[W].push(i);
130192
+ let i = new di(t.path, e);
130193
+ i.entry = new ri(t, this[os5](i)), i.entry.on("end", () => this[ns](i)), this[G] += 1, this[W].push(i);
129962
130194
  }
129963
130195
  this[Ft]();
129964
130196
  }
129965
- [oi](t) {
130197
+ [hi](t) {
129966
130198
  let e = f(import_path5.default.resolve(this.cwd, t));
129967
- this[W].push(new fi(t, e)), this[Ft]();
130199
+ this[W].push(new di(t, e)), this[Ft]();
129968
130200
  }
129969
- [hs](t) {
130201
+ [as](t) {
129970
130202
  t.pending = true, this[G] += 1;
129971
130203
  let e = this.follow ? "stat" : "lstat";
129972
130204
  import_fs4.default[e](t.absolute, (i, r) => {
129973
- t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[ni](t, r);
130205
+ t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[oi](t, r);
129974
130206
  });
129975
130207
  }
129976
- [ni](t, e) {
129977
- 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]();
130208
+ [oi](t, e) {
130209
+ 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]();
129978
130210
  }
129979
- [as](t) {
130211
+ [ls](t) {
129980
130212
  t.pending = true, this[G] += 1, import_fs4.default.readdir(t.absolute, (e, i) => {
129981
130213
  if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
129982
- this[hi](t, i);
130214
+ this[ai](t, i);
129983
130215
  });
129984
130216
  }
129985
- [hi](t, e) {
130217
+ [ai](t, e) {
129986
130218
  this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
129987
130219
  }
129988
130220
  [Ft]() {
129989
130221
  if (!this[pe]) {
129990
130222
  this[pe] = true;
129991
- for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[ss](t.value), t.value.ignore) {
130223
+ for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[rs](t.value), t.value.ignore) {
129992
130224
  let e = t.next;
129993
130225
  this[W].removeNode(t), t.next = e;
129994
130226
  }
129995
- this[pe] = false, this[me] && !this[W].length && this[G] === 0 && (this.zip ? this.zip.end(er) : (super.write(er), super.end()));
130227
+ this[pe] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(tr) : (super.write(tr), super.end()));
129996
130228
  }
129997
130229
  }
129998
130230
  get [Ct]() {
129999
130231
  return this[W] && this[W].head && this[W].head.value;
130000
130232
  }
130001
- [rs](t) {
130233
+ [ns](t) {
130002
130234
  this[W].shift(), this[G] -= 1, this[Ft]();
130003
130235
  }
130004
- [ss](t) {
130236
+ [rs](t) {
130005
130237
  if (!t.pending) {
130006
130238
  if (t.entry) {
130007
- t === this[Ct] && !t.piped && this[ai](t);
130239
+ t === this[Ct] && !t.piped && this[li](t);
130008
130240
  return;
130009
130241
  }
130010
130242
  if (!t.stat) {
130011
130243
  let e = this.statCache.get(t.absolute);
130012
- e ? this[ni](t, e) : this[hs](t);
130244
+ e ? this[oi](t, e) : this[as](t);
130013
130245
  }
130014
130246
  if (t.stat && !t.ignore) {
130015
130247
  if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
130016
130248
  let e = this.readdirCache.get(t.absolute);
130017
- if (e ? this[hi](t, e) : this[as](t), !t.readdir) return;
130249
+ if (e ? this[ai](t, e) : this[ls](t), !t.readdir) return;
130018
130250
  }
130019
- if (t.entry = this[sr](t), !t.entry) {
130251
+ if (t.entry = this[ir](t), !t.entry) {
130020
130252
  t.ignore = true;
130021
130253
  return;
130022
130254
  }
130023
- t === this[Ct] && !t.piped && this[ai](t);
130255
+ t === this[Ct] && !t.piped && this[li](t);
130024
130256
  }
130025
130257
  }
130026
130258
  }
130027
- [ns](t) {
130259
+ [os5](t) {
130028
130260
  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 };
130029
130261
  }
130030
- [sr](t) {
130262
+ [ir](t) {
130031
130263
  this[G] += 1;
130032
130264
  try {
130033
- return new this[li](t.path, this[ns](t)).on("end", () => this[rs](t)).on("error", (i) => this.emit("error", i));
130265
+ return new this[ci](t.path, this[os5](t)).on("end", () => this[ns](t)).on("error", (i) => this.emit("error", i));
130034
130266
  } catch (e) {
130035
130267
  this.emit("error", e);
130036
130268
  }
130037
130269
  }
130038
- [os5]() {
130270
+ [hs]() {
130039
130271
  this[Ct] && this[Ct].entry && this[Ct].entry.resume();
130040
130272
  }
130041
- [ai](t) {
130273
+ [li](t) {
130042
130274
  t.piped = true, t.readdir && t.readdir.forEach((r) => {
130043
130275
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
130044
- this[oi](o + r);
130276
+ this[hi](o + r);
130045
130277
  });
130046
130278
  let e = t.entry, i = this.zip;
130047
130279
  if (!e) throw new Error("cannot pipe without source");
@@ -130061,131 +130293,128 @@ var Et = class extends A {
130061
130293
  var kt = class extends Et {
130062
130294
  sync = true;
130063
130295
  constructor(t) {
130064
- super(t), this[li] = ii;
130296
+ super(t), this[ci] = si;
130065
130297
  }
130066
130298
  pause() {
130067
130299
  }
130068
130300
  resume() {
130069
130301
  }
130070
- [hs](t) {
130302
+ [as](t) {
130071
130303
  let e = this.follow ? "statSync" : "lstatSync";
130072
- this[ni](t, import_fs4.default[e](t.absolute));
130304
+ this[oi](t, import_fs4.default[e](t.absolute));
130073
130305
  }
130074
- [as](t) {
130075
- this[hi](t, import_fs4.default.readdirSync(t.absolute));
130306
+ [ls](t) {
130307
+ this[ai](t, import_fs4.default.readdirSync(t.absolute));
130076
130308
  }
130077
- [ai](t) {
130309
+ [li](t) {
130078
130310
  let e = t.entry, i = this.zip;
130079
130311
  if (t.readdir && t.readdir.forEach((r) => {
130080
130312
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
130081
- this[oi](o + r);
130313
+ this[hi](o + r);
130082
130314
  }), !e) throw new Error("Cannot pipe without source");
130083
130315
  i ? e.on("data", (r) => {
130084
130316
  i.write(r);
130085
130317
  }) : e.on("data", (r) => {
130086
- super[nr](r);
130318
+ super[rr](r);
130087
130319
  });
130088
130320
  }
130089
130321
  };
130090
- var vn = (s3, t) => {
130322
+ var kn = (s3, t) => {
130091
130323
  let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
130092
- e.pipe(i), hr(e, t);
130324
+ e.pipe(i), or(e, t);
130093
130325
  };
130094
- var Mn = (s3, t) => {
130326
+ var vn = (s3, t) => {
130095
130327
  let e = new Et(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
130096
130328
  e.pipe(i);
130097
130329
  let r = new Promise((n, o) => {
130098
130330
  i.on("error", o), i.on("close", n), e.on("error", o);
130099
130331
  });
130100
- return ar(e, t), r;
130332
+ return hr(e, t).catch((n) => e.emit("error", n)), r;
130101
130333
  };
130102
- var hr = (s3, t) => {
130334
+ var or = (s3, t) => {
130103
130335
  t.forEach((e) => {
130104
130336
  e.charAt(0) === "@" ? It({ file: import_node_path.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
130105
130337
  }), s3.end();
130106
130338
  };
130107
- var ar = async (s3, t) => {
130108
- for (let e = 0; e < t.length; e++) {
130109
- let i = String(t[e]);
130110
- i.charAt(0) === "@" ? await It({ file: import_node_path.default.resolve(String(s3.cwd), i.slice(1)), noResume: true, onReadEntry: (r) => {
130111
- s3.add(r);
130112
- } }) : s3.add(i);
130113
- }
130339
+ var hr = async (s3, t) => {
130340
+ for (let e of t) e.charAt(0) === "@" ? await It({ file: import_node_path.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
130341
+ s3.add(i);
130342
+ } }) : s3.add(e);
130114
130343
  s3.end();
130115
130344
  };
130116
- var Bn = (s3, t) => {
130345
+ var Mn = (s3, t) => {
130117
130346
  let e = new kt(s3);
130118
- return hr(e, t), e;
130347
+ return or(e, t), e;
130119
130348
  };
130120
- var Pn = (s3, t) => {
130349
+ var Bn = (s3, t) => {
130121
130350
  let e = new Et(s3);
130122
- return ar(e, t), e;
130351
+ return hr(e, t).catch((i) => e.emit("error", i)), e;
130123
130352
  };
130124
- var zn = K(vn, Mn, Bn, Pn, (s3, t) => {
130353
+ var Pn = K(kn, vn, Mn, Bn, (s3, t) => {
130125
130354
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
130126
130355
  });
130127
- var Un = process.env.__FAKE_PLATFORM__ || process.platform;
130128
- var Hn = Un === "win32";
130129
- var { O_CREAT: Wn, O_TRUNC: Gn, O_WRONLY: Zn } = import_fs6.default.constants;
130130
- var cr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs6.default.constants.UV_FS_O_FILEMAP || 0;
130131
- var Yn = Hn && !!cr;
130132
- var Kn = 512 * 1024;
130133
- var Vn = cr | Gn | Wn | Zn;
130134
- var ls = Yn ? (s3) => s3 < Kn ? Vn : "w" : () => "w";
130135
- var cs = (s3, t, e) => {
130356
+ var zn = process.env.__FAKE_PLATFORM__ || process.platform;
130357
+ var Un = zn === "win32";
130358
+ var { O_CREAT: Hn, O_TRUNC: Wn, O_WRONLY: Gn } = import_fs6.default.constants;
130359
+ var lr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs6.default.constants.UV_FS_O_FILEMAP || 0;
130360
+ var Zn = Un && !!lr;
130361
+ var Yn = 512 * 1024;
130362
+ var Kn = lr | Wn | Hn | Gn;
130363
+ var cs = Zn ? (s3) => s3 < Yn ? Kn : "w" : () => "w";
130364
+ var fs3 = (s3, t, e) => {
130136
130365
  try {
130137
130366
  return import_node_fs4.default.lchownSync(s3, t, e);
130138
130367
  } catch (i) {
130139
130368
  if (i?.code !== "ENOENT") throw i;
130140
130369
  }
130141
130370
  };
130142
- var di = (s3, t, e, i) => {
130371
+ var ui = (s3, t, e, i) => {
130143
130372
  import_node_fs4.default.lchown(s3, t, e, (r) => {
130144
130373
  i(r && r?.code !== "ENOENT" ? r : null);
130145
130374
  });
130146
130375
  };
130147
- var $n = (s3, t, e, i, r) => {
130148
- if (t.isDirectory()) fs3(import_node_path6.default.resolve(s3, t.name), e, i, (n) => {
130376
+ var Vn = (s3, t, e, i, r) => {
130377
+ if (t.isDirectory()) ds(import_node_path6.default.resolve(s3, t.name), e, i, (n) => {
130149
130378
  if (n) return r(n);
130150
130379
  let o = import_node_path6.default.resolve(s3, t.name);
130151
- di(o, e, i, r);
130380
+ ui(o, e, i, r);
130152
130381
  });
130153
130382
  else {
130154
130383
  let n = import_node_path6.default.resolve(s3, t.name);
130155
- di(n, e, i, r);
130384
+ ui(n, e, i, r);
130156
130385
  }
130157
130386
  };
130158
- var fs3 = (s3, t, e, i) => {
130387
+ var ds = (s3, t, e, i) => {
130159
130388
  import_node_fs4.default.readdir(s3, { withFileTypes: true }, (r, n) => {
130160
130389
  if (r) {
130161
130390
  if (r.code === "ENOENT") return i();
130162
130391
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
130163
130392
  }
130164
- if (r || !n.length) return di(s3, t, e, i);
130393
+ if (r || !n.length) return ui(s3, t, e, i);
130165
130394
  let o = n.length, h = null, a = (l) => {
130166
130395
  if (!h) {
130167
130396
  if (l) return i(h = l);
130168
- if (--o === 0) return di(s3, t, e, i);
130397
+ if (--o === 0) return ui(s3, t, e, i);
130169
130398
  }
130170
130399
  };
130171
- for (let l of n) $n(s3, l, t, e, a);
130400
+ for (let l of n) Vn(s3, l, t, e, a);
130172
130401
  });
130173
130402
  };
130174
- var Xn = (s3, t, e, i) => {
130175
- t.isDirectory() && ds(import_node_path6.default.resolve(s3, t.name), e, i), cs(import_node_path6.default.resolve(s3, t.name), e, i);
130403
+ var $n = (s3, t, e, i) => {
130404
+ t.isDirectory() && us(import_node_path6.default.resolve(s3, t.name), e, i), fs3(import_node_path6.default.resolve(s3, t.name), e, i);
130176
130405
  };
130177
- var ds = (s3, t, e) => {
130406
+ var us = (s3, t, e) => {
130178
130407
  let i;
130179
130408
  try {
130180
130409
  i = import_node_fs4.default.readdirSync(s3, { withFileTypes: true });
130181
130410
  } catch (r) {
130182
130411
  let n = r;
130183
130412
  if (n?.code === "ENOENT") return;
130184
- if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return cs(s3, t, e);
130413
+ if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs3(s3, t, e);
130185
130414
  throw n;
130186
130415
  }
130187
- for (let r of i) Xn(s3, r, t, e);
130188
- return cs(s3, t, e);
130416
+ for (let r of i) $n(s3, r, t, e);
130417
+ return fs3(s3, t, e);
130189
130418
  };
130190
130419
  var we = class extends Error {
130191
130420
  path;
@@ -130210,41 +130439,41 @@ var wt = class extends Error {
130210
130439
  return "SymlinkError";
130211
130440
  }
130212
130441
  };
130213
- var jn = (s3, t) => {
130442
+ var qn = (s3, t) => {
130214
130443
  import_node_fs5.default.stat(s3, (e, i) => {
130215
130444
  (e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
130216
130445
  });
130217
130446
  };
130218
- var fr = (s3, t, e) => {
130447
+ var cr = (s3, t, e) => {
130219
130448
  s3 = f(s3);
130220
130449
  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) => {
130221
- E ? e(E) : x && a ? fs3(x, o, h, (_s) => S(_s)) : n ? import_node_fs5.default.chmod(s3, r, e) : e();
130450
+ E ? e(E) : x && a ? ds(x, o, h, (xe) => S(xe)) : n ? import_node_fs5.default.chmod(s3, r, e) : e();
130222
130451
  };
130223
- if (s3 === d) return jn(s3, S);
130452
+ if (s3 === d) return qn(s3, S);
130224
130453
  if (l) return import_promises.default.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
130225
130454
  let N = f(import_node_path7.default.relative(d, s3)).split("/");
130226
- us(d, N, r, c, d, void 0, S);
130455
+ ms(d, N, r, c, d, void 0, S);
130227
130456
  };
130228
- var us = (s3, t, e, i, r, n, o) => {
130229
- if (!t.length) return o(null, n);
130457
+ var ms = (s3, t, e, i, r, n, o) => {
130458
+ if (t.length === 0) return o(null, n);
130230
130459
  let h = t.shift(), a = f(import_node_path7.default.resolve(s3 + "/" + h));
130231
- import_node_fs5.default.mkdir(a, e, dr(a, t, e, i, r, n, o));
130460
+ import_node_fs5.default.mkdir(a, e, fr(a, t, e, i, r, n, o));
130232
130461
  };
130233
- var dr = (s3, t, e, i, r, n, o) => (h) => {
130462
+ var fr = (s3, t, e, i, r, n, o) => (h) => {
130234
130463
  h ? import_node_fs5.default.lstat(s3, (a, l) => {
130235
130464
  if (a) a.path = a.path && f(a.path), o(a);
130236
- else if (l.isDirectory()) us(s3, t, e, i, r, n, o);
130465
+ else if (l.isDirectory()) ms(s3, t, e, i, r, n, o);
130237
130466
  else if (i) import_node_fs5.default.unlink(s3, (c) => {
130238
130467
  if (c) return o(c);
130239
- import_node_fs5.default.mkdir(s3, e, dr(s3, t, e, i, r, n, o));
130468
+ import_node_fs5.default.mkdir(s3, e, fr(s3, t, e, i, r, n, o));
130240
130469
  });
130241
130470
  else {
130242
130471
  if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
130243
130472
  o(h);
130244
130473
  }
130245
- }) : (n = n || s3, us(s3, t, e, i, r, n, o));
130474
+ }) : (n = n || s3, ms(s3, t, e, i, r, n, o));
130246
130475
  };
130247
- var Qn = (s3) => {
130476
+ var jn = (s3) => {
130248
130477
  let t = false, e;
130249
130478
  try {
130250
130479
  t = import_node_fs5.default.statSync(s3).isDirectory();
@@ -130254,12 +130483,12 @@ var Qn = (s3) => {
130254
130483
  if (!t) throw new we(s3, e ?? "ENOTDIR");
130255
130484
  }
130256
130485
  };
130257
- var ur = (s3, t) => {
130486
+ var dr = (s3, t) => {
130258
130487
  s3 = f(s3);
130259
130488
  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) => {
130260
- E && h && ds(E, n, o), r && import_node_fs5.default.chmodSync(s3, i);
130489
+ E && h && us(E, n, o), r && import_node_fs5.default.chmodSync(s3, i);
130261
130490
  };
130262
- if (s3 === c) return Qn(c), d();
130491
+ if (s3 === c) return jn(c), d();
130263
130492
  if (a) return d(import_node_fs5.default.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
130264
130493
  let T = f(import_node_path7.default.relative(c, s3)).split("/"), N;
130265
130494
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
@@ -130267,40 +130496,40 @@ var ur = (s3, t) => {
130267
130496
  try {
130268
130497
  import_node_fs5.default.mkdirSync(x, i), N = N || x;
130269
130498
  } catch {
130270
- let Os = import_node_fs5.default.lstatSync(x);
130271
- if (Os.isDirectory()) continue;
130499
+ let xe = import_node_fs5.default.lstatSync(x);
130500
+ if (xe.isDirectory()) continue;
130272
130501
  if (l) {
130273
130502
  import_node_fs5.default.unlinkSync(x), import_node_fs5.default.mkdirSync(x, i), N = N || x;
130274
130503
  continue;
130275
- } else if (Os.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
130504
+ } else if (xe.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
130276
130505
  }
130277
130506
  }
130278
130507
  return d(N);
130279
130508
  };
130280
- var ms = /* @__PURE__ */ Object.create(null);
130281
- var mr = 1e4;
130509
+ var ps = /* @__PURE__ */ Object.create(null);
130510
+ var ur = 1e4;
130282
130511
  var $t = /* @__PURE__ */ new Set();
130283
- var pr = (s3) => {
130284
- $t.has(s3) ? $t.delete(s3) : ms[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
130285
- let t = ms[s3], e = $t.size - mr;
130286
- if (e > mr / 10) {
130287
- for (let i of $t) if ($t.delete(i), delete ms[i], --e <= 0) break;
130512
+ var mr = (s3) => {
130513
+ $t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
130514
+ let t = ps[s3], e = $t.size - ur;
130515
+ if (e > ur / 10) {
130516
+ for (let i of $t) if ($t.delete(i), delete ps[i], --e <= 0) break;
130288
130517
  }
130289
130518
  return t;
130290
130519
  };
130291
- var Jn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
130292
- var to = Jn === "win32";
130293
- var eo = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
130294
- let r = e[e.length - 1];
130520
+ var Qn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
130521
+ var Jn = Qn === "win32";
130522
+ var to = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
130523
+ let r = e.at(-1);
130295
130524
  return r !== void 0 && (i = (0, import_node_path8.join)(r, i)), e.push(i || "/"), e;
130296
130525
  }, []);
130297
- var pi = class {
130526
+ var Ei = class {
130298
130527
  #t = /* @__PURE__ */ new Map();
130299
130528
  #i = /* @__PURE__ */ new Map();
130300
130529
  #s = /* @__PURE__ */ new Set();
130301
130530
  reserve(t, e) {
130302
- t = to ? ["win32 parallelization disabled"] : t.map((r) => mt((0, import_node_path8.join)(pr(r))));
130303
- let i = new Set(t.map((r) => eo(r)).reduce((r, n) => r.concat(n)));
130531
+ t = Jn ? ["win32 parallelization disabled"] : t.map((r) => mt((0, import_node_path8.join)(mr(r))));
130532
+ let i = new Set(t.map((r) => to(r)).reduce((r, n) => r.concat(n)));
130304
130533
  this.#i.set(e, { dirs: i, paths: t });
130305
130534
  for (let r of t) {
130306
130535
  let n = this.#t.get(r);
@@ -130310,7 +130539,7 @@ var pi = class {
130310
130539
  let n = this.#t.get(r);
130311
130540
  if (!n) this.#t.set(r, [/* @__PURE__ */ new Set([e])]);
130312
130541
  else {
130313
- let o = n[n.length - 1];
130542
+ let o = n.at(-1);
130314
130543
  o instanceof Set ? o.add(e) : n.push(/* @__PURE__ */ new Set([e]));
130315
130544
  }
130316
130545
  }
@@ -130358,37 +130587,37 @@ var pi = class {
130358
130587
  return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
130359
130588
  }
130360
130589
  };
130361
- var wr = () => process.umask();
130362
- var Sr = /* @__PURE__ */ Symbol("onEntry");
130363
- var Ss = /* @__PURE__ */ Symbol("checkFs");
130364
- var yr = /* @__PURE__ */ Symbol("checkFs2");
130365
- var ys = /* @__PURE__ */ Symbol("isReusable");
130590
+ var Er = () => process.umask();
130591
+ var wr = /* @__PURE__ */ Symbol("onEntry");
130592
+ var ys = /* @__PURE__ */ Symbol("checkFs");
130593
+ var Sr = /* @__PURE__ */ Symbol("checkFs2");
130594
+ var Rs = /* @__PURE__ */ Symbol("isReusable");
130366
130595
  var P = /* @__PURE__ */ Symbol("makeFs");
130367
- var Rs = /* @__PURE__ */ Symbol("file");
130368
- var bs = /* @__PURE__ */ Symbol("directory");
130369
- var wi = /* @__PURE__ */ Symbol("link");
130370
- var Rr = /* @__PURE__ */ Symbol("symlink");
130371
- var br = /* @__PURE__ */ Symbol("hardlink");
130596
+ var bs = /* @__PURE__ */ Symbol("file");
130597
+ var _s = /* @__PURE__ */ Symbol("directory");
130598
+ var Si = /* @__PURE__ */ Symbol("link");
130599
+ var yr = /* @__PURE__ */ Symbol("symlink");
130600
+ var Rr = /* @__PURE__ */ Symbol("hardlink");
130372
130601
  var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
130373
- var gr = /* @__PURE__ */ Symbol("unsupported");
130602
+ var br = /* @__PURE__ */ Symbol("unsupported");
130374
130603
  var _r = /* @__PURE__ */ Symbol("checkPath");
130375
- var ps = /* @__PURE__ */ Symbol("stripAbsolutePath");
130604
+ var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
130376
130605
  var St = /* @__PURE__ */ Symbol("mkdir");
130377
130606
  var O = /* @__PURE__ */ Symbol("onError");
130378
- var Ei = /* @__PURE__ */ Symbol("pending");
130379
- var Or = /* @__PURE__ */ Symbol("pend");
130607
+ var wi = /* @__PURE__ */ Symbol("pending");
130608
+ var gr = /* @__PURE__ */ Symbol("pend");
130380
130609
  var Xt = /* @__PURE__ */ Symbol("unpend");
130381
- var Es = /* @__PURE__ */ Symbol("ended");
130382
- var ws = /* @__PURE__ */ Symbol("maybeClose");
130610
+ var ws = /* @__PURE__ */ Symbol("ended");
130611
+ var Ss = /* @__PURE__ */ Symbol("maybeClose");
130383
130612
  var gs = /* @__PURE__ */ Symbol("skip");
130384
130613
  var Re = /* @__PURE__ */ Symbol("doChown");
130385
130614
  var be = /* @__PURE__ */ Symbol("uid");
130386
- var ge = /* @__PURE__ */ Symbol("gid");
130387
- var _e = /* @__PURE__ */ Symbol("checkedCwd");
130388
- var so = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
130389
- var Oe = so === "win32";
130390
- var ro = 1024;
130391
- var no = (s3, t) => {
130615
+ var _e = /* @__PURE__ */ Symbol("gid");
130616
+ var ge = /* @__PURE__ */ Symbol("checkedCwd");
130617
+ var io = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
130618
+ var Oe = io === "win32";
130619
+ var so = 1024;
130620
+ var ro = (s3, t) => {
130392
130621
  if (!Oe) return import_node_fs3.default.unlink(s3, t);
130393
130622
  let e = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
130394
130623
  import_node_fs3.default.rename(s3, e, (i) => {
@@ -130396,17 +130625,17 @@ var no = (s3, t) => {
130396
130625
  import_node_fs3.default.unlink(e, t);
130397
130626
  });
130398
130627
  };
130399
- var oo = (s3) => {
130628
+ var no = (s3) => {
130400
130629
  if (!Oe) return import_node_fs3.default.unlinkSync(s3);
130401
130630
  let t = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
130402
130631
  import_node_fs3.default.renameSync(s3, t), import_node_fs3.default.unlinkSync(t);
130403
130632
  };
130404
- var Tr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
130633
+ var Or = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
130405
130634
  var qt = class extends st {
130406
- [Es] = false;
130407
- [_e] = false;
130408
- [Ei] = 0;
130409
- reservations = new pi();
130635
+ [ws] = false;
130636
+ [ge] = false;
130637
+ [wi] = 0;
130638
+ reservations = new Ei();
130410
130639
  transform;
130411
130640
  writable = true;
130412
130641
  readable = false;
@@ -130433,30 +130662,28 @@ var qt = class extends st {
130433
130662
  chmod;
130434
130663
  constructor(t = {}) {
130435
130664
  if (t.ondone = () => {
130436
- this[Es] = true, this[ws]();
130665
+ this[ws] = true, this[Ss]();
130437
130666
  }, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
130438
130667
  if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
130439
130668
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
130440
130669
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
130441
130670
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
130442
- t.preserveOwner === void 0 && typeof t.uid != "number" ? this.preserveOwner = !!(process.getuid && process.getuid() === 0) : this.preserveOwner = !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : ro, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(import_node_path5.default.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : wr() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Sr](e));
130671
+ this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : so, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(import_node_path5.default.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : Er() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[wr](e));
130443
130672
  }
130444
130673
  warn(t, e, i = {}) {
130445
130674
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
130446
130675
  }
130447
- [ws]() {
130448
- this[Es] && this[Ei] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
130676
+ [Ss]() {
130677
+ this[ws] && this[wi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
130449
130678
  }
130450
- [ps](t, e) {
130679
+ [Es](t, e) {
130451
130680
  let i = t[e], { type: r } = t;
130452
130681
  if (!i || this.preservePaths) return true;
130453
- let [n, o] = ce(i), h = o.replace(/\\/g, "/").split("/");
130682
+ let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
130454
130683
  if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
130455
130684
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
130456
- {
130457
- let a = import_node_path5.default.posix.dirname(t.path), l = import_node_path5.default.posix.normalize(import_node_path5.default.posix.join(a, h.join("/")));
130458
- if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
130459
- }
130685
+ let a = import_node_path5.default.posix.dirname(t.path), l = import_node_path5.default.posix.normalize(import_node_path5.default.posix.join(a, h.join("/")));
130686
+ if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
130460
130687
  }
130461
130688
  return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
130462
130689
  }
@@ -130472,18 +130699,18 @@ var qt = class extends st {
130472
130699
  i.splice(0, this.strip), t.path = i.join("/");
130473
130700
  }
130474
130701
  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;
130475
- if (!this[ps](t, "path") || !this[ps](t, "linkpath")) return false;
130476
- if (import_node_path5.default.isAbsolute(t.path) ? t.absolute = f(import_node_path5.default.resolve(t.path)) : t.absolute = f(import_node_path5.default.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
130702
+ if (!this[Es](t, "path") || !this[Es](t, "linkpath")) return false;
130703
+ if (t.absolute = import_node_path5.default.isAbsolute(t.path) ? f(import_node_path5.default.resolve(t.path)) : f(import_node_path5.default.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
130477
130704
  if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
130478
130705
  if (this.win32) {
130479
130706
  let { root: r } = import_node_path5.default.win32.parse(String(t.absolute));
130480
- t.absolute = r + $i(String(t.absolute).slice(r.length));
130707
+ t.absolute = r + Xi(String(t.absolute).slice(r.length));
130481
130708
  let { root: n } = import_node_path5.default.win32.parse(t.path);
130482
- t.path = n + $i(t.path.slice(n.length));
130709
+ t.path = n + Xi(t.path.slice(n.length));
130483
130710
  }
130484
130711
  return true;
130485
130712
  }
130486
- [Sr](t) {
130713
+ [wr](t) {
130487
130714
  if (!this[_r](t)) return t.resume();
130488
130715
  switch (import_node_assert.default.equal(typeof t.absolute, "string"), t.type) {
130489
130716
  case "Directory":
@@ -130494,28 +130721,28 @@ var qt = class extends st {
130494
130721
  case "ContiguousFile":
130495
130722
  case "Link":
130496
130723
  case "SymbolicLink":
130497
- return this[Ss](t);
130724
+ return this[ys](t);
130498
130725
  default:
130499
- return this[gr](t);
130726
+ return this[br](t);
130500
130727
  }
130501
130728
  }
130502
130729
  [O](t, e) {
130503
130730
  t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
130504
130731
  }
130505
130732
  [St](t, e, i) {
130506
- 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);
130733
+ 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);
130507
130734
  }
130508
130735
  [Re](t) {
130509
130736
  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;
130510
130737
  }
130511
130738
  [be](t) {
130512
- return Tr(this.uid, t.uid, this.processUid);
130739
+ return Or(this.uid, t.uid, this.processUid);
130513
130740
  }
130514
- [ge](t) {
130515
- return Tr(this.gid, t.gid, this.processGid);
130741
+ [_e](t) {
130742
+ return Or(this.gid, t.gid, this.processGid);
130516
130743
  }
130517
- [Rs](t, e) {
130518
- 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 });
130744
+ [bs](t, e) {
130745
+ 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 });
130519
130746
  r.on("error", (a) => {
130520
130747
  r.fd && import_node_fs3.default.close(r.fd, () => {
130521
130748
  }), r.write = () => true, this[O](a, t), e();
@@ -130539,7 +130766,7 @@ var qt = class extends st {
130539
130766
  }
130540
130767
  if (typeof l == "number" && this[Re](t)) {
130541
130768
  n++;
130542
- let c = this[be](t), d = this[ge](t);
130769
+ let c = this[be](t), d = this[_e](t);
130543
130770
  typeof c == "number" && typeof d == "number" && import_node_fs3.default.fchown(l, c, d, (S) => S ? import_node_fs3.default.chown(a, c, d, (T) => o(T && S)) : o());
130544
130771
  }
130545
130772
  o();
@@ -130549,7 +130776,7 @@ var qt = class extends st {
130549
130776
  this[O](a, t), e();
130550
130777
  }), t.pipe(h)), h.pipe(r);
130551
130778
  }
130552
- [bs](t, e) {
130779
+ [_s](t, e) {
130553
130780
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
130554
130781
  this[St](String(t.absolute), i, (r) => {
130555
130782
  if (r) {
@@ -130559,21 +130786,21 @@ var qt = class extends st {
130559
130786
  let n = 1, o = () => {
130560
130787
  --n === 0 && (e(), this[Xt](), t.resume());
130561
130788
  };
130562
- t.mtime && !this.noMtime && (n++, import_node_fs3.default.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, import_node_fs3.default.chown(String(t.absolute), Number(this[be](t)), Number(this[ge](t)), o)), o();
130789
+ t.mtime && !this.noMtime && (n++, import_node_fs3.default.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, import_node_fs3.default.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
130563
130790
  });
130564
130791
  }
130565
- [gr](t) {
130792
+ [br](t) {
130566
130793
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
130567
130794
  }
130568
- [Rr](t, e) {
130795
+ [yr](t, e) {
130569
130796
  let i = f(import_node_path5.default.relative(this.cwd, import_node_path5.default.resolve(import_node_path5.default.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
130570
- this[ye](t, this.cwd, i, () => this[wi](t, String(t.linkpath), "symlink", e), (r) => {
130797
+ this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
130571
130798
  this[O](r, t), e();
130572
130799
  });
130573
130800
  }
130574
- [br](t, e) {
130801
+ [Rr](t, e) {
130575
130802
  let i = f(import_node_path5.default.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
130576
- this[ye](t, this.cwd, r, () => this[wi](t, i, "link", e), (n) => {
130803
+ this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e), (n) => {
130577
130804
  this[O](n, t), e();
130578
130805
  });
130579
130806
  }
@@ -130587,24 +130814,24 @@ var qt = class extends st {
130587
130814
  this[ye](t, h, i, r, n);
130588
130815
  });
130589
130816
  }
130590
- [Or]() {
130591
- this[Ei]++;
130817
+ [gr]() {
130818
+ this[wi]++;
130592
130819
  }
130593
130820
  [Xt]() {
130594
- this[Ei]--, this[ws]();
130821
+ this[wi]--, this[Ss]();
130595
130822
  }
130596
130823
  [gs](t) {
130597
130824
  this[Xt](), t.resume();
130598
130825
  }
130599
- [ys](t, e) {
130826
+ [Rs](t, e) {
130600
130827
  return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
130601
130828
  }
130602
- [Ss](t) {
130603
- this[Or]();
130829
+ [ys](t) {
130830
+ this[gr]();
130604
130831
  let e = [t.path];
130605
- t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[yr](t, i));
130832
+ t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Sr](t, i));
130606
130833
  }
130607
- [yr](t, e) {
130834
+ [Sr](t, e) {
130608
130835
  let i = (h) => {
130609
130836
  e(h);
130610
130837
  }, r = () => {
@@ -130613,7 +130840,7 @@ var qt = class extends st {
130613
130840
  this[O](h, t), i();
130614
130841
  return;
130615
130842
  }
130616
- this[_e] = true, n();
130843
+ this[ge] = true, n();
130617
130844
  });
130618
130845
  }, n = () => {
130619
130846
  if (t.absolute !== this.cwd) {
@@ -130633,7 +130860,7 @@ var qt = class extends st {
130633
130860
  this[gs](t), i();
130634
130861
  return;
130635
130862
  }
130636
- if (h || this[ys](t, a)) return this[P](null, t, i);
130863
+ if (h || this[Rs](t, a)) return this[P](null, t, i);
130637
130864
  if (a.isDirectory()) {
130638
130865
  if (t.type === "Directory") {
130639
130866
  let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
@@ -130642,10 +130869,10 @@ var qt = class extends st {
130642
130869
  if (t.absolute !== this.cwd) return import_node_fs3.default.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
130643
130870
  }
130644
130871
  if (t.absolute === this.cwd) return this[P](null, t, i);
130645
- no(String(t.absolute), (l) => this[P](l ?? null, t, i));
130872
+ ro(String(t.absolute), (l) => this[P](l ?? null, t, i));
130646
130873
  });
130647
130874
  };
130648
- this[_e] ? n() : r();
130875
+ this[ge] ? n() : r();
130649
130876
  }
130650
130877
  [P](t, e, i) {
130651
130878
  if (t) {
@@ -130656,17 +130883,17 @@ var qt = class extends st {
130656
130883
  case "File":
130657
130884
  case "OldFile":
130658
130885
  case "ContiguousFile":
130659
- return this[Rs](e, i);
130886
+ return this[bs](e, i);
130660
130887
  case "Link":
130661
- return this[br](e, i);
130662
- case "SymbolicLink":
130663
130888
  return this[Rr](e, i);
130889
+ case "SymbolicLink":
130890
+ return this[yr](e, i);
130664
130891
  case "Directory":
130665
130892
  case "GNUDumpDir":
130666
- return this[bs](e, i);
130893
+ return this[_s](e, i);
130667
130894
  }
130668
130895
  }
130669
- [wi](t, e, i, r) {
130896
+ [Si](t, e, i, r) {
130670
130897
  import_node_fs3.default[i](e, String(t.absolute), (n) => {
130671
130898
  n ? this[O](n, t) : (this[Xt](), t.resume()), r();
130672
130899
  });
@@ -130685,11 +130912,11 @@ var Te = class extends qt {
130685
130912
  return super[P](t, e, () => {
130686
130913
  });
130687
130914
  }
130688
- [Ss](t) {
130689
- if (!this[_e]) {
130915
+ [ys](t) {
130916
+ if (!this[ge]) {
130690
130917
  let n = this[St](this.cwd, this.dmode);
130691
130918
  if (n) return this[O](n, t);
130692
- this[_e] = true;
130919
+ this[ge] = true;
130693
130920
  }
130694
130921
  if (t.absolute !== this.cwd) {
130695
130922
  let n = f(import_node_path5.default.dirname(String(t.absolute)));
@@ -130700,7 +130927,7 @@ var Te = class extends qt {
130700
130927
  }
130701
130928
  let [e, i] = Se(() => import_node_fs3.default.lstatSync(String(t.absolute)));
130702
130929
  if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[gs](t);
130703
- if (e || this[ys](t, i)) return this[P](null, t);
130930
+ if (e || this[Rs](t, i)) return this[P](null, t);
130704
130931
  if (i.isDirectory()) {
130705
130932
  if (t.type === "Directory") {
130706
130933
  let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? Se(() => {
@@ -130711,10 +130938,10 @@ var Te = class extends qt {
130711
130938
  let [n] = Se(() => import_node_fs3.default.rmdirSync(String(t.absolute)));
130712
130939
  this[P](n, t);
130713
130940
  }
130714
- let [r] = t.absolute === this.cwd ? [] : Se(() => oo(String(t.absolute)));
130941
+ let [r] = t.absolute === this.cwd ? [] : Se(() => no(String(t.absolute)));
130715
130942
  this[P](r, t);
130716
130943
  }
130717
- [Rs](t, e) {
130944
+ [bs](t, e) {
130718
130945
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
130719
130946
  let a;
130720
130947
  try {
@@ -130725,7 +130952,7 @@ var Te = class extends qt {
130725
130952
  (h || a) && this[O](h || a, t), e();
130726
130953
  }, n;
130727
130954
  try {
130728
- n = import_node_fs3.default.openSync(String(t.absolute), ls(t.size), i);
130955
+ n = import_node_fs3.default.openSync(String(t.absolute), cs(t.size), i);
130729
130956
  } catch (h) {
130730
130957
  return r(h);
130731
130958
  }
@@ -130751,7 +130978,7 @@ var Te = class extends qt {
130751
130978
  }
130752
130979
  }
130753
130980
  if (this[Re](t)) {
130754
- let a = this[be](t), l = this[ge](t);
130981
+ let a = this[be](t), l = this[_e](t);
130755
130982
  try {
130756
130983
  import_node_fs3.default.fchownSync(n, Number(a), Number(l));
130757
130984
  } catch (c) {
@@ -130765,7 +130992,7 @@ var Te = class extends qt {
130765
130992
  r(h);
130766
130993
  });
130767
130994
  }
130768
- [bs](t, e) {
130995
+ [_s](t, e) {
130769
130996
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[St](String(t.absolute), i);
130770
130997
  if (r) {
130771
130998
  this[O](r, t), e();
@@ -130776,20 +131003,20 @@ var Te = class extends qt {
130776
131003
  } catch {
130777
131004
  }
130778
131005
  if (this[Re](t)) try {
130779
- import_node_fs3.default.chownSync(String(t.absolute), Number(this[be](t)), Number(this[ge](t)));
131006
+ import_node_fs3.default.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
130780
131007
  } catch {
130781
131008
  }
130782
131009
  e(), t.resume();
130783
131010
  }
130784
131011
  [St](t, e) {
130785
131012
  try {
130786
- 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 });
131013
+ 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 });
130787
131014
  } catch (i) {
130788
131015
  return i;
130789
131016
  }
130790
131017
  }
130791
131018
  [ye](t, e, i, r, n) {
130792
- if (this.preservePaths || !i.length) return r();
131019
+ if (this.preservePaths || i.length === 0) return r();
130793
131020
  let o = e;
130794
131021
  for (let h of i) {
130795
131022
  o = import_node_path5.default.resolve(o, h);
@@ -130799,7 +131026,7 @@ var Te = class extends qt {
130799
131026
  }
130800
131027
  r();
130801
131028
  }
130802
- [wi](t, e, i, r) {
131029
+ [Si](t, e, i, r) {
130803
131030
  let n = `${i}Sync`;
130804
131031
  try {
130805
131032
  import_node_fs3.default[n](e, String(t.absolute)), r(), t.resume();
@@ -130808,26 +131035,26 @@ var Te = class extends qt {
130808
131035
  }
130809
131036
  }
130810
131037
  };
130811
- var ho = (s3) => {
131038
+ var oo = (s3) => {
130812
131039
  let t = new Te(s3), e = s3.file, i = import_node_fs2.default.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
130813
- new ve(e, { readSize: r, size: i.size }).pipe(t);
131040
+ new Me(e, { readSize: r, size: i.size }).pipe(t);
130814
131041
  };
130815
- var ao = (s3, t) => {
131042
+ var ho = (s3, t) => {
130816
131043
  let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
130817
131044
  return new Promise((o, h) => {
130818
131045
  e.on("error", h), e.on("close", o), import_node_fs2.default.stat(r, (a, l) => {
130819
131046
  if (a) h(a);
130820
131047
  else {
130821
- let c = new gt(r, { readSize: i, size: l.size });
131048
+ let c = new _t(r, { readSize: i, size: l.size });
130822
131049
  c.on("error", h), c.pipe(e);
130823
131050
  }
130824
131051
  });
130825
131052
  });
130826
131053
  };
130827
- var lo = K(ho, ao, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
130828
- t?.length && Yi(s3, t);
131054
+ var ao = K(oo, ho, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
131055
+ t?.length && Ki(s3, t);
130829
131056
  });
130830
- var co = (s3, t) => {
131057
+ var lo = (s3, t) => {
130831
131058
  let e = new kt(s3), i = true, r, n;
130832
131059
  try {
130833
131060
  try {
@@ -130848,7 +131075,7 @@ var co = (s3, t) => {
130848
131075
  if (n + l + 512 > o.size) break;
130849
131076
  n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
130850
131077
  }
130851
- i = false, fo(s3, e, n, r, t);
131078
+ i = false, co(s3, e, n, r, t);
130852
131079
  } finally {
130853
131080
  if (i) try {
130854
131081
  import_node_fs6.default.closeSync(r);
@@ -130856,11 +131083,11 @@ var co = (s3, t) => {
130856
131083
  }
130857
131084
  }
130858
131085
  };
130859
- var fo = (s3, t, e, i, r) => {
131086
+ var co = (s3, t, e, i, r) => {
130860
131087
  let n = new Wt(s3.file, { fd: i, start: e });
130861
- t.pipe(n), mo(t, r);
131088
+ t.pipe(n), uo(t, r);
130862
131089
  };
130863
- var uo = (s3, t) => {
131090
+ var fo = (s3, t) => {
130864
131091
  t = Array.from(t);
130865
131092
  let e = new Et(s3), i = (n, o, h) => {
130866
131093
  let a = (T, N) => {
@@ -130868,7 +131095,7 @@ var uo = (s3, t) => {
130868
131095
  }, l = 0;
130869
131096
  if (o === 0) return a(null, 0);
130870
131097
  let c = 0, d = Buffer.alloc(512), S = (T, N) => {
130871
- if (T || typeof N > "u") return a(T);
131098
+ if (T || N === void 0) return a(T);
130872
131099
  if (c += N, c < 512 && N) return import_node_fs6.default.read(n, d, c, d.length - c, l + c, S);
130873
131100
  if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
130874
131101
  if (c < 512) return a(null, l);
@@ -130890,38 +131117,35 @@ var uo = (s3, t) => {
130890
131117
  i(c, S.size, (T, N) => {
130891
131118
  if (T) return o(T);
130892
131119
  let E = new tt(s3.file, { fd: c, start: N });
130893
- e.pipe(E), E.on("error", o), E.on("close", n), po(e, t);
131120
+ e.pipe(E), E.on("error", o), E.on("close", n), mo(e, t);
130894
131121
  });
130895
131122
  });
130896
131123
  };
130897
131124
  import_node_fs6.default.open(s3.file, h, a);
130898
131125
  });
130899
131126
  };
130900
- var mo = (s3, t) => {
131127
+ var uo = (s3, t) => {
130901
131128
  t.forEach((e) => {
130902
131129
  e.charAt(0) === "@" ? It({ file: import_node_path9.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
130903
131130
  }), s3.end();
130904
131131
  };
130905
- var po = async (s3, t) => {
130906
- for (let e = 0; e < t.length; e++) {
130907
- let i = String(t[e]);
130908
- i.charAt(0) === "@" ? await It({ file: import_node_path9.default.resolve(String(s3.cwd), i.slice(1)), noResume: true, onReadEntry: (r) => s3.add(r) }) : s3.add(i);
130909
- }
131132
+ var mo = async (s3, t) => {
131133
+ for (let e of t) e.charAt(0) === "@" ? await It({ file: import_node_path9.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
130910
131134
  s3.end();
130911
131135
  };
130912
- var vt = K(co, uo, () => {
131136
+ var vt = K(lo, fo, () => {
130913
131137
  throw new TypeError("file is required");
130914
131138
  }, () => {
130915
131139
  throw new TypeError("file is required");
130916
131140
  }, (s3, t) => {
130917
- if (!ks(s3)) throw new TypeError("file is required");
131141
+ if (!Fs(s3)) throw new TypeError("file is required");
130918
131142
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
130919
131143
  if (!t?.length) throw new TypeError("no paths specified to add/replace");
130920
131144
  });
130921
- var Eo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
130922
- vt.validate?.(s3, t), wo(s3);
131145
+ var po = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
131146
+ vt.validate?.(s3, t), Eo(s3);
130923
131147
  });
130924
- var wo = (s3) => {
131148
+ var Eo = (s3) => {
130925
131149
  let t = s3.filter;
130926
131150
  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));
130927
131151
  };
@@ -130929,8 +131153,11 @@ var wo = (s3) => {
130929
131153
  // lib/commands/utils/deployment.ts
130930
131154
  var POLL_DEBOUNCE = 2e3;
130931
131155
  async function packageDirectory(dirPath) {
130932
- const tempFile = `${dirPath.replace(/[^a-zA-Z0-9]/g, "_")}-${Date.now()}.tar.gz`;
130933
- await zn(
131156
+ const tempFile = import_path6.default.join(
131157
+ import_os5.default.tmpdir(),
131158
+ `appwrite-deploy-${Date.now()}.tar.gz`
131159
+ );
131160
+ await Pn(
130934
131161
  {
130935
131162
  gzip: true,
130936
131163
  file: tempFile,
@@ -130938,11 +131165,28 @@ async function packageDirectory(dirPath) {
130938
131165
  },
130939
131166
  ["."]
130940
131167
  );
130941
- const buffer = import_fs7.default.readFileSync(tempFile);
130942
- import_fs7.default.unlinkSync(tempFile);
130943
- return new File([buffer], import_path6.default.basename(tempFile), {
130944
- type: "application/gzip"
130945
- });
131168
+ try {
131169
+ const buffer = import_fs7.default.readFileSync(tempFile);
131170
+ return new File([buffer], import_path6.default.basename(tempFile), {
131171
+ type: "application/gzip"
131172
+ });
131173
+ } finally {
131174
+ if (import_fs7.default.existsSync(tempFile)) {
131175
+ import_fs7.default.unlinkSync(tempFile);
131176
+ }
131177
+ }
131178
+ }
131179
+ async function resolveFileParam(filePath) {
131180
+ const resolved = import_path6.default.resolve(filePath);
131181
+ if (!import_fs7.default.existsSync(resolved)) {
131182
+ throw new Error(`File or directory not found: ${resolved}`);
131183
+ }
131184
+ const stat = import_fs7.default.statSync(resolved);
131185
+ if (stat.isDirectory()) {
131186
+ return packageDirectory(resolved);
131187
+ }
131188
+ const buffer = import_fs7.default.readFileSync(resolved);
131189
+ return new File([buffer], import_path6.default.basename(resolved));
130946
131190
  }
130947
131191
  async function downloadDeploymentCode(params) {
130948
131192
  const {
@@ -130994,7 +131238,7 @@ async function downloadDeploymentCode(params) {
130994
131238
  `Failed to write deployment archive to "${compressedFileName}": ${message}`
130995
131239
  );
130996
131240
  }
130997
- lo({
131241
+ ao({
130998
131242
  sync: true,
130999
131243
  cwd: resourcePath,
131000
131244
  file: compressedFileName,
@@ -131310,7 +131554,7 @@ var Pull = class {
131310
131554
  return [];
131311
131555
  }
131312
131556
  const { functions: allFunctions } = await paginate(
131313
- async () => new Functions(this.projectClient).list(),
131557
+ async (args) => new Functions(this.projectClient).list(args.queries),
131314
131558
  {},
131315
131559
  100,
131316
131560
  "functions"
@@ -131394,7 +131638,7 @@ var Pull = class {
131394
131638
  return [];
131395
131639
  }
131396
131640
  const { sites: fetchedSites } = await paginate(
131397
- async () => new Sites(this.projectClient).list(),
131641
+ async (args) => new Sites(this.projectClient).list(args.queries),
131398
131642
  {},
131399
131643
  100,
131400
131644
  "sites"
@@ -131472,7 +131716,7 @@ var Pull = class {
131472
131716
  return { databases: [], collections: [] };
131473
131717
  }
131474
131718
  const { databases: databases2 } = await paginate(
131475
- async () => new Databases(this.projectClient).list(),
131719
+ async (args) => new Databases(this.projectClient).list(args.queries),
131476
131720
  {},
131477
131721
  100,
131478
131722
  "databases"
@@ -131485,7 +131729,10 @@ var Pull = class {
131485
131729
  );
131486
131730
  allDatabases.push(database);
131487
131731
  const { collections } = await paginate(
131488
- async () => new Databases(this.projectClient).listCollections(database.$id),
131732
+ async (args) => new Databases(this.projectClient).listCollections(
131733
+ database.$id,
131734
+ args.queries
131735
+ ),
131489
131736
  {},
131490
131737
  100,
131491
131738
  "collections"
@@ -131523,7 +131770,9 @@ var Pull = class {
131523
131770
  return { databases: [], tables: [] };
131524
131771
  }
131525
131772
  const { databases: databases2 } = await paginate(
131526
- async () => new TablesDB(this.projectClient).list(),
131773
+ async (args) => new TablesDB(this.projectClient).list({
131774
+ queries: args.queries
131775
+ }),
131527
131776
  {},
131528
131777
  100,
131529
131778
  "databases"
@@ -131536,7 +131785,10 @@ var Pull = class {
131536
131785
  );
131537
131786
  allDatabases.push(filterBySchema(database, DatabaseSchema));
131538
131787
  const { tables } = await paginate(
131539
- async () => new TablesDB(this.projectClient).listTables(database.$id),
131788
+ async (args) => new TablesDB(this.projectClient).listTables({
131789
+ databaseId: database.$id,
131790
+ queries: args.queries
131791
+ }),
131540
131792
  {},
131541
131793
  100,
131542
131794
  "tables"
@@ -131578,7 +131830,7 @@ var Pull = class {
131578
131830
  return [];
131579
131831
  }
131580
131832
  const { buckets } = await paginate(
131581
- async () => new Storage(this.projectClient).listBuckets(),
131833
+ async (args) => new Storage(this.projectClient).listBuckets(args.queries),
131582
131834
  {},
131583
131835
  100,
131584
131836
  "buckets"
@@ -131608,7 +131860,7 @@ var Pull = class {
131608
131860
  return [];
131609
131861
  }
131610
131862
  const { teams: teams2 } = await paginate(
131611
- async () => new Teams(this.projectClient).list(),
131863
+ async (args) => new Teams(this.projectClient).list(args.queries),
131612
131864
  {},
131613
131865
  100,
131614
131866
  "teams"
@@ -131634,7 +131886,7 @@ var Pull = class {
131634
131886
  return [];
131635
131887
  }
131636
131888
  const { topics } = await paginate(
131637
- async () => new Messaging(this.projectClient).listTopics(),
131889
+ async (args) => new Messaging(this.projectClient).listTopics(args.queries),
131638
131890
  {},
131639
131891
  100,
131640
131892
  "topics"
@@ -131706,7 +131958,7 @@ var pullFunctions = async ({
131706
131958
  return;
131707
131959
  }
131708
131960
  const functionsToCheck = cliConfig.all ? (await paginate(
131709
- async () => (await getFunctionsService()).list(),
131961
+ async (args) => (await getFunctionsService()).list(args.queries),
131710
131962
  {},
131711
131963
  100,
131712
131964
  "functions"
@@ -131744,7 +131996,7 @@ var pullSites = async ({
131744
131996
  return;
131745
131997
  }
131746
131998
  const sitesToCheck = cliConfig.all ? (await paginate(
131747
- async () => (await getSitesService()).list(),
131999
+ async (args) => (await getSitesService()).list(args.queries),
131748
132000
  {},
131749
132001
  100,
131750
132002
  "sites"
@@ -134596,7 +134848,7 @@ var runFunction = async ({
134596
134848
  import_fs15.default.rmSync(hotSwapPath, { recursive: true, force: true });
134597
134849
  import_fs15.default.mkdirSync(hotSwapPath, { recursive: true });
134598
134850
  }
134599
- await lo({
134851
+ await ao({
134600
134852
  keep: true,
134601
134853
  sync: true,
134602
134854
  cwd: hotSwapPath,
@@ -134624,7 +134876,7 @@ var runFunction = async ({
134624
134876
  const sourcePath = import_path14.default.join(functionPath, f2);
134625
134877
  import_fs15.default.copyFileSync(sourcePath, filePath);
134626
134878
  }
134627
- await zn(
134879
+ await Pn(
134628
134880
  {
134629
134881
  gzip: true,
134630
134882
  sync: true,
@@ -138823,13 +139075,33 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
138823
139075
  requiresApiKey: supportsServerSide
138824
139076
  });
138825
139077
  }
139078
+ /**
139079
+ * Deduplicate entities by composite key ($id + databaseId).
139080
+ * Keeps the last occurrence to match addTable/addCollection semantics.
139081
+ */
139082
+ dedupeEntities(entities) {
139083
+ const seen = /* @__PURE__ */ new Map();
139084
+ for (const entity of entities) {
139085
+ seen.set(`${entity.databaseId}:${entity.$id}`, entity);
139086
+ }
139087
+ return Array.from(seen.values());
139088
+ }
138826
139089
  async generate(config2, options) {
138827
139090
  if (!config2.projectId) {
138828
139091
  throw new Error("Project ID is required in configuration");
138829
139092
  }
138830
139093
  const appwriteDep = options?.appwriteImportSource ?? getAppwriteDependency();
138831
139094
  const importExt = options?.importExtension ?? detectImportExtension();
138832
- const hasEntities = config2.tables && config2.tables.length > 0 || config2.collections && config2.collections.length > 0;
139095
+ const dedupedConfig = { ...config2 };
139096
+ if (dedupedConfig.tables && dedupedConfig.tables.length > 0) {
139097
+ dedupedConfig.tables = this.dedupeEntities(dedupedConfig.tables);
139098
+ }
139099
+ if (dedupedConfig.collections && dedupedConfig.collections.length > 0) {
139100
+ dedupedConfig.collections = this.dedupeEntities(
139101
+ dedupedConfig.collections
139102
+ );
139103
+ }
139104
+ const hasEntities = dedupedConfig.tables && dedupedConfig.tables.length > 0 || dedupedConfig.collections && dedupedConfig.collections.length > 0;
138833
139105
  if (!hasEntities) {
138834
139106
  console.log(
138835
139107
  "No tables or collections found in configuration. Skipping database generation."
@@ -138838,14 +139110,21 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
138838
139110
  dbContent: "// No tables or collections found in configuration\n",
138839
139111
  typesContent: "// No tables or collections found in configuration\n",
138840
139112
  indexContent: this.generateIndexFile(importExt),
138841
- constantsContent: this.generateConstantsFile(config2, appwriteDep)
139113
+ constantsContent: this.generateConstantsFile(
139114
+ dedupedConfig,
139115
+ appwriteDep
139116
+ )
138842
139117
  };
138843
139118
  }
138844
139119
  return {
138845
- dbContent: this.generateDatabasesFile(config2, importExt, appwriteDep),
138846
- typesContent: this.generateTypesFile(config2, appwriteDep),
139120
+ dbContent: this.generateDatabasesFile(
139121
+ dedupedConfig,
139122
+ importExt,
139123
+ appwriteDep
139124
+ ),
139125
+ typesContent: this.generateTypesFile(dedupedConfig, appwriteDep),
138847
139126
  indexContent: this.generateIndexFile(importExt),
138848
- constantsContent: this.generateConstantsFile(config2, appwriteDep)
139127
+ constantsContent: this.generateConstantsFile(dedupedConfig, appwriteDep)
138849
139128
  };
138850
139129
  }
138851
139130
  };
@@ -139307,8 +139586,8 @@ If there is already an active session, the new session will be attached to the l
139307
139586
  A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
139308
139587
  `).requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.`).option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`).action(
139309
139588
  actionRunner(
139310
- async ({ provider, success: success20, failure, scopes }) => {
139311
- const url2 = (await getAccountClient()).createOAuth2Session(provider, success20, failure, scopes);
139589
+ async ({ provider, success: success21, failure, scopes }) => {
139590
+ const url2 = (await getAccountClient()).createOAuth2Session(provider, success21, failure, scopes);
139312
139591
  if (url2) console.log(url2);
139313
139592
  }
139314
139593
  )
@@ -139388,8 +139667,8 @@ If authentication succeeds, \`userId\` and \`secret\` of a token will be appende
139388
139667
 
139389
139668
  A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`).requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.`).option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`).action(
139390
139669
  actionRunner(
139391
- async ({ provider, success: success20, failure, scopes }) => {
139392
- const url2 = (await getAccountClient()).createOAuth2Token(provider, success20, failure, scopes);
139670
+ async ({ provider, success: success21, failure, scopes }) => {
139671
+ const url2 = (await getAccountClient()).createOAuth2Token(provider, success21, failure, scopes);
139393
139672
  if (url2) console.log(url2);
139394
139673
  }
139395
139674
  )
@@ -140206,7 +140485,7 @@ This endpoint accepts a tar.gz file compressed with your code. Make sure to incl
140206
140485
 
140207
140486
  Use the "command" param to set the entrypoint used to execute your code.`).requiredOption(`--function-id <function-id>`, `Function ID.`).requiredOption(`--code <code>`, `Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.`).requiredOption(`--activate <activate>`, `Automatically activate the deployment when it is finished building.`, parseBool).option(`--entrypoint <entrypoint>`, `Entrypoint File.`).option(`--commands <commands>`, `Build Commands.`).action(
140208
140487
  actionRunner(
140209
- async ({ functionId, code, activate, entrypoint, commands }) => parse3(await (await getFunctionsClient()).createDeployment(functionId, code, activate, entrypoint, commands))
140488
+ async ({ functionId, code, activate, entrypoint, commands }) => parse3(await (await getFunctionsClient()).createDeployment(functionId, code !== void 0 ? await resolveFileParam(code) : void 0, activate, entrypoint, commands))
140210
140489
  )
140211
140490
  );
140212
140491
  functions.command(`create-duplicate-deployment`).description(`Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.`).requiredOption(`--function-id <function-id>`, `Function ID.`).requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`).option(`--build-id <build-id>`, `Build unique ID.`).action(
@@ -141472,48 +141751,6 @@ projects.command(`delete-sms-template`).description(`Reset a custom SMS template
141472
141751
  async ({ projectId, type, locale: locale2 }) => parse3(await (await getProjectsClient()).deleteSmsTemplate(projectId, type, locale2))
141473
141752
  )
141474
141753
  );
141475
- projects.command(`list-webhooks`).description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results. `).requiredOption(`--project-id <project-id>`, `Project unique ID.`).option(
141476
- `--total [value]`,
141477
- `When set to false, the total count returned will be 0 and will not be calculated.`,
141478
- (value) => value === void 0 ? true : parseBool(value)
141479
- ).action(
141480
- actionRunner(
141481
- async ({ projectId, total }) => parse3(await (await getProjectsClient()).listWebhooks(projectId, total))
141482
- )
141483
- );
141484
- projects.command(`create-webhook`).description(`Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. `).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`).requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`).requiredOption(`--url <url>`, `Webhook URL.`).requiredOption(`--security <security>`, `Certificate verification, false for disabled or true for enabled.`, parseBool).option(
141485
- `--enabled [value]`,
141486
- `Enable or disable a webhook.`,
141487
- (value) => value === void 0 ? true : parseBool(value)
141488
- ).option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`).option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`).action(
141489
- actionRunner(
141490
- async ({ projectId, name, events, url: url2, security, enabled, httpUser, httpPass }) => parse3(await (await getProjectsClient()).createWebhook(projectId, name, events, url2, security, enabled, httpUser, httpPass))
141491
- )
141492
- );
141493
- projects.command(`get-webhook`).description(`Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. `).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`).action(
141494
- actionRunner(
141495
- async ({ projectId, webhookId }) => parse3(await (await getProjectsClient()).getWebhook(projectId, webhookId))
141496
- )
141497
- );
141498
- projects.command(`update-webhook`).description(`Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. `).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`).requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`).requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`).requiredOption(`--url <url>`, `Webhook URL.`).requiredOption(`--security <security>`, `Certificate verification, false for disabled or true for enabled.`, parseBool).option(
141499
- `--enabled [value]`,
141500
- `Enable or disable a webhook.`,
141501
- (value) => value === void 0 ? true : parseBool(value)
141502
- ).option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`).option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`).action(
141503
- actionRunner(
141504
- async ({ projectId, webhookId, name, events, url: url2, security, enabled, httpUser, httpPass }) => parse3(await (await getProjectsClient()).updateWebhook(projectId, webhookId, name, events, url2, security, enabled, httpUser, httpPass))
141505
- )
141506
- );
141507
- projects.command(`delete-webhook`).description(`Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. `).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`).action(
141508
- actionRunner(
141509
- async ({ projectId, webhookId }) => parse3(await (await getProjectsClient()).deleteWebhook(projectId, webhookId))
141510
- )
141511
- );
141512
- projects.command(`update-webhook-signature`).description(`Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook. `).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`).action(
141513
- actionRunner(
141514
- async ({ projectId, webhookId }) => parse3(await (await getProjectsClient()).updateWebhookSignature(projectId, webhookId))
141515
- )
141516
- );
141517
141754
 
141518
141755
  // lib/commands/services/proxy.ts
141519
141756
  var proxyClient = null;
@@ -141683,7 +141920,7 @@ sites.command(`create-deployment`).description(`Create a new site code deploymen
141683
141920
  (value) => value === void 0 ? true : parseBool(value)
141684
141921
  ).action(
141685
141922
  actionRunner(
141686
- async ({ siteId, code, installCommand, buildCommand, outputDirectory, activate }) => parse3(await (await getSitesClient()).createDeployment(siteId, code, installCommand, buildCommand, outputDirectory, activate))
141923
+ async ({ siteId, code, installCommand, buildCommand, outputDirectory, activate }) => parse3(await (await getSitesClient()).createDeployment(siteId, code !== void 0 ? await resolveFileParam(code) : void 0, installCommand, buildCommand, outputDirectory, activate))
141687
141924
  )
141688
141925
  );
141689
141926
  sites.command(`create-duplicate-deployment`).description(`Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.`).requiredOption(`--site-id <site-id>`, `Site ID.`).requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`).action(
@@ -141897,7 +142134,7 @@ When the first request is sent, the server will return the **File** object, and
141897
142134
  If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.
141898
142135
  `).requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`).requiredOption(`--file-id <file-id>`, `File ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).requiredOption(`--file <file>`, `Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).`).option(`--permissions [permissions...]`, `An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`).action(
141899
142136
  actionRunner(
141900
- async ({ bucketId, fileId, file: file2, permissions }) => parse3(await (await getStorageClient()).createFile(bucketId, fileId, file2, permissions))
142137
+ async ({ bucketId, fileId, file: file2, permissions }) => parse3(await (await getStorageClient()).createFile(bucketId, fileId, file2 !== void 0 ? await resolveFileParam(file2) : void 0, permissions))
141901
142138
  )
141902
142139
  );
141903
142140
  storage.command(`get-file`).description(`Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.`).requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`).requiredOption(`--file-id <file-id>`, `File ID.`).action(
@@ -142978,6 +143215,69 @@ vcs.command(`delete-installation`).description(`Delete a VCS installation by its
142978
143215
  )
142979
143216
  );
142980
143217
 
143218
+ // lib/commands/services/webhooks.ts
143219
+ var webhooksClient = null;
143220
+ var getWebhooksClient = async () => {
143221
+ if (!webhooksClient) {
143222
+ const sdkClient = await sdkForProject();
143223
+ webhooksClient = new Webhooks(sdkClient);
143224
+ }
143225
+ return webhooksClient;
143226
+ };
143227
+ var webhooks = new Command("webhooks").description(commandDescriptions["webhooks"] ?? "").configureHelp({
143228
+ helpWidth: process.stdout.columns || 80
143229
+ });
143230
+ webhooks.command(`list`).description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, httpUser, security, events, enabled, logs, attempts`).option(
143231
+ `--total [value]`,
143232
+ `When set to false, the total count returned will be 0 and will not be calculated.`,
143233
+ (value) => value === void 0 ? true : parseBool(value)
143234
+ ).action(
143235
+ actionRunner(
143236
+ async ({ queries, total }) => parse3(await (await getWebhooksClient()).list(queries, total))
143237
+ )
143238
+ );
143239
+ webhooks.command(`create`).description(`Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).requiredOption(`--url <url>`, `Webhook URL.`).requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`).requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`).option(
143240
+ `--enabled [value]`,
143241
+ `Enable or disable a webhook.`,
143242
+ (value) => value === void 0 ? true : parseBool(value)
143243
+ ).option(
143244
+ `--security [value]`,
143245
+ `Certificate verification, false for disabled or true for enabled.`,
143246
+ (value) => value === void 0 ? true : parseBool(value)
143247
+ ).option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`).option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`).action(
143248
+ actionRunner(
143249
+ async ({ webhookId, url: url2, name, events, enabled, security, httpUser, httpPass }) => parse3(await (await getWebhooksClient()).create(webhookId, url2, name, events, enabled, security, httpUser, httpPass))
143250
+ )
143251
+ );
143252
+ webhooks.command(`get`).description(`Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. `).requiredOption(`--webhook-id <webhook-id>`, `Webhook ID.`).action(
143253
+ actionRunner(
143254
+ async ({ webhookId }) => parse3(await (await getWebhooksClient()).get(webhookId))
143255
+ )
143256
+ );
143257
+ webhooks.command(`update`).description(`Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook ID.`).requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`).requiredOption(`--url <url>`, `Webhook URL.`).requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`).option(
143258
+ `--enabled [value]`,
143259
+ `Enable or disable a webhook.`,
143260
+ (value) => value === void 0 ? true : parseBool(value)
143261
+ ).option(
143262
+ `--security [value]`,
143263
+ `Certificate verification, false for disabled or true for enabled.`,
143264
+ (value) => value === void 0 ? true : parseBool(value)
143265
+ ).option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`).option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`).action(
143266
+ actionRunner(
143267
+ async ({ webhookId, name, url: url2, events, enabled, security, httpUser, httpPass }) => parse3(await (await getWebhooksClient()).update(webhookId, name, url2, events, enabled, security, httpUser, httpPass))
143268
+ )
143269
+ );
143270
+ webhooks.command(`delete`).description(`Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. `).requiredOption(`--webhook-id <webhook-id>`, `Webhook ID.`).action(
143271
+ actionRunner(
143272
+ async ({ webhookId }) => parse3(await (await getWebhooksClient()).delete(webhookId))
143273
+ )
143274
+ );
143275
+ webhooks.command(`update-signature`).description(`Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook ID.`).action(
143276
+ actionRunner(
143277
+ async ({ webhookId }) => parse3(await (await getWebhooksClient()).updateSignature(webhookId))
143278
+ )
143279
+ );
143280
+
142981
143281
  // cli.ts
142982
143282
  var oldWidth = process.stdout.columns;
142983
143283
  process.stdout.columns = 100;
@@ -143029,7 +143329,7 @@ if (process.argv.includes("-v") || process.argv.includes("--version")) {
143029
143329
  cliConfig.all = true;
143030
143330
  }).on("option:id", function() {
143031
143331
  cliConfig.ids = this.opts().id;
143032
- }).showSuggestionAfterError().addCommand(whoami).addCommand(register).addCommand(login).addCommand(init).addCommand(pull).addCommand(push).addCommand(types).addCommand(deploy).addCommand(run).addCommand(update).addCommand(generate).addCommand(logout).addCommand(account).addCommand(activities).addCommand(backups).addCommand(databases).addCommand(functions).addCommand(graphql).addCommand(health).addCommand(locale).addCommand(messaging).addCommand(migrations).addCommand(project).addCommand(projects).addCommand(proxy).addCommand(sites).addCommand(storage).addCommand(tablesDB).addCommand(teams).addCommand(tokens).addCommand(users).addCommand(vcs).addCommand(client).parse(process.argv);
143332
+ }).showSuggestionAfterError().addCommand(whoami).addCommand(register).addCommand(login).addCommand(init).addCommand(pull).addCommand(push).addCommand(types).addCommand(deploy).addCommand(run).addCommand(update).addCommand(generate).addCommand(logout).addCommand(account).addCommand(activities).addCommand(backups).addCommand(databases).addCommand(functions).addCommand(graphql).addCommand(health).addCommand(locale).addCommand(messaging).addCommand(migrations).addCommand(project).addCommand(projects).addCommand(proxy).addCommand(sites).addCommand(storage).addCommand(tablesDB).addCommand(teams).addCommand(tokens).addCommand(users).addCommand(vcs).addCommand(webhooks).addCommand(client).parse(process.argv);
143033
143333
  process.stdout.columns = oldWidth;
143034
143334
  }
143035
143335
  /*! Bundled license information: