appwrite-cli 16.0.0 → 17.1.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 (81) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +4 -4
  3. package/cli.ts +6 -0
  4. package/dist/bundle-win-arm64.mjs +1355 -773
  5. package/dist/cli.cjs +1327 -745
  6. package/dist/index.cjs +466 -572
  7. package/dist/index.js +494 -600
  8. package/dist/lib/commands/push.d.ts.map +1 -1
  9. package/dist/lib/commands/run.d.ts.map +1 -1
  10. package/dist/lib/commands/services/organizations.d.ts +3 -0
  11. package/dist/lib/commands/services/organizations.d.ts.map +1 -0
  12. package/dist/lib/commands/services/teams.d.ts.map +1 -1
  13. package/dist/lib/constants.d.ts +1 -1
  14. package/dist/lib/emulation/utils.d.ts.map +1 -1
  15. package/dist/lib/parser.d.ts.map +1 -1
  16. package/dist/lib/questions.d.ts.map +1 -1
  17. package/dist/lib/types.d.ts +1 -0
  18. package/dist/lib/types.d.ts.map +1 -1
  19. package/docs/examples/organizations/add-credit.md +5 -0
  20. package/docs/examples/organizations/cancel-downgrade.md +4 -0
  21. package/docs/examples/organizations/create-downgrade-feedback.md +8 -0
  22. package/docs/examples/organizations/create-invoice-payment.md +6 -0
  23. package/docs/examples/organizations/create-key.md +6 -0
  24. package/docs/examples/organizations/create.md +6 -0
  25. package/docs/examples/organizations/delete-backup-payment-method.md +4 -0
  26. package/docs/examples/organizations/delete-default-payment-method.md +4 -0
  27. package/docs/examples/organizations/delete-key.md +5 -0
  28. package/docs/examples/organizations/delete.md +4 -0
  29. package/docs/examples/organizations/estimation-create-organization.md +4 -0
  30. package/docs/examples/organizations/estimation-delete-organization.md +4 -0
  31. package/docs/examples/organizations/estimation-update-plan.md +5 -0
  32. package/docs/examples/organizations/get-aggregation.md +5 -0
  33. package/docs/examples/organizations/get-available-credits.md +4 -0
  34. package/docs/examples/organizations/get-credit.md +5 -0
  35. package/docs/examples/organizations/get-invoice-download.md +5 -0
  36. package/docs/examples/organizations/get-invoice-view.md +5 -0
  37. package/docs/examples/organizations/get-invoice.md +5 -0
  38. package/docs/examples/organizations/get-key.md +5 -0
  39. package/docs/examples/organizations/get-plan.md +4 -0
  40. package/docs/examples/organizations/get-scopes.md +4 -0
  41. package/docs/examples/organizations/get-usage.md +4 -0
  42. package/docs/examples/organizations/list-aggregations.md +4 -0
  43. package/docs/examples/organizations/list-credits.md +4 -0
  44. package/docs/examples/organizations/list-keys.md +4 -0
  45. package/docs/examples/organizations/list-regions.md +4 -0
  46. package/docs/examples/organizations/list.md +3 -0
  47. package/docs/examples/organizations/set-backup-payment-method.md +5 -0
  48. package/docs/examples/organizations/set-billing-address.md +5 -0
  49. package/docs/examples/organizations/set-billing-email.md +5 -0
  50. package/docs/examples/organizations/set-billing-tax-id.md +5 -0
  51. package/docs/examples/organizations/set-default-payment-method.md +5 -0
  52. package/docs/examples/organizations/update-budget.md +5 -0
  53. package/docs/examples/organizations/update-key.md +7 -0
  54. package/docs/examples/organizations/update-plan.md +5 -0
  55. package/docs/examples/organizations/validate-invoice.md +5 -0
  56. package/docs/examples/organizations/validate-payment.md +4 -0
  57. package/docs/examples/project/create-variable.md +1 -0
  58. package/docs/examples/project/update-variable.md +1 -2
  59. package/docs/examples/users/update-impersonator.md +5 -0
  60. package/install.ps1 +2 -2
  61. package/install.sh +1 -1
  62. package/lib/commands/push.ts +6 -24
  63. package/lib/commands/run.ts +5 -7
  64. package/lib/commands/services/account.ts +0 -169
  65. package/lib/commands/services/health.ts +0 -68
  66. package/lib/commands/services/migrations.ts +2 -2
  67. package/lib/commands/services/organizations.ts +517 -0
  68. package/lib/commands/services/project.ts +21 -12
  69. package/lib/commands/services/projects.ts +2 -14
  70. package/lib/commands/services/proxy.ts +2 -2
  71. package/lib/commands/services/teams.ts +10 -1
  72. package/lib/commands/services/users.ts +14 -1
  73. package/lib/commands/services/vcs.ts +2 -2
  74. package/lib/constants.ts +1 -1
  75. package/lib/emulation/utils.ts +3 -2
  76. package/lib/parser.ts +149 -27
  77. package/lib/questions.ts +15 -9
  78. package/lib/sdks.ts +1 -0
  79. package/lib/types.ts +1 -0
  80. package/package.json +1 -1
  81. package/scoop/appwrite.config.json +3 -3
@@ -13581,16 +13581,16 @@ var require_share = __commonJS({
13581
13581
  };
13582
13582
  }
13583
13583
  exports.share = share;
13584
- function handleReset(reset, on2) {
13584
+ function handleReset(reset, on) {
13585
13585
  var args = [];
13586
13586
  for (var _i2 = 2; _i2 < arguments.length; _i2++) {
13587
13587
  args[_i2 - 2] = arguments[_i2];
13588
13588
  }
13589
- if (on2 === true) {
13589
+ if (on === true) {
13590
13590
  reset();
13591
13591
  return;
13592
13592
  }
13593
- if (on2 === false) {
13593
+ if (on === false) {
13594
13594
  return;
13595
13595
  }
13596
13596
  var onSubscriber = new Subscriber_1.SafeSubscriber({
@@ -13599,7 +13599,7 @@ var require_share = __commonJS({
13599
13599
  reset();
13600
13600
  }
13601
13601
  });
13602
- return innerFrom_1.innerFrom(on2.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);
13602
+ return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);
13603
13603
  }
13604
13604
  }
13605
13605
  });
@@ -21981,7 +21981,6 @@ var require_safe_buffer = __commonJS({
21981
21981
  function SafeBuffer(arg, encodingOrOffset, length) {
21982
21982
  return Buffer2(arg, encodingOrOffset, length);
21983
21983
  }
21984
- SafeBuffer.prototype = Object.create(Buffer2.prototype);
21985
21984
  copyProps(Buffer2, SafeBuffer);
21986
21985
  SafeBuffer.from = function(arg, encodingOrOffset, length) {
21987
21986
  if (typeof arg === "number") {
@@ -24524,16 +24523,16 @@ var require_base = __commonJS({
24524
24523
  }),
24525
24524
  share()
24526
24525
  );
24527
- const success21 = validation.pipe(
24526
+ const success22 = validation.pipe(
24528
24527
  filter((state) => state.isValid === true),
24529
24528
  take(1)
24530
24529
  );
24531
24530
  const error49 = validation.pipe(
24532
24531
  filter((state) => state.isValid !== true),
24533
- takeUntil(success21)
24532
+ takeUntil(success22)
24534
24533
  );
24535
24534
  return {
24536
- success: success21,
24535
+ success: success22,
24537
24536
  error: error49
24538
24537
  };
24539
24538
  }
@@ -35563,12 +35562,12 @@ var require_utils3 = __commonJS({
35563
35562
  return str;
35564
35563
  }
35565
35564
  var codeCache = {};
35566
- function addToCodeCache(name, on2, off) {
35567
- on2 = "\x1B[" + on2 + "m";
35565
+ function addToCodeCache(name, on, off) {
35566
+ on = "\x1B[" + on + "m";
35568
35567
  off = "\x1B[" + off + "m";
35569
- codeCache[on2] = { set: name, to: true };
35568
+ codeCache[on] = { set: name, to: true };
35570
35569
  codeCache[off] = { set: name, to: false };
35571
- codeCache[name] = { on: on2, off };
35570
+ codeCache[name] = { on, off };
35572
35571
  }
35573
35572
  addToCodeCache("bold", 1, 22);
35574
35573
  addToCodeCache("italics", 3, 23);
@@ -63459,14 +63458,14 @@ var require_base2 = __commonJS({
63459
63458
  return { isValid: err };
63460
63459
  });
63461
63460
  }).share();
63462
- var success21 = validation.filter(function(state) {
63461
+ var success22 = validation.filter(function(state) {
63463
63462
  return state.isValid === true;
63464
63463
  }).take(1);
63465
63464
  var error49 = validation.filter(function(state) {
63466
63465
  return state.isValid !== true;
63467
- }).takeUntil(success21);
63466
+ }).takeUntil(success22);
63468
63467
  return {
63469
- success: success21,
63468
+ success: success22,
63470
63469
  error: error49
63471
63470
  };
63472
63471
  };
@@ -72255,6 +72254,7 @@ var require_constants6 = __commonJS({
72255
72254
  var path16 = __require("path");
72256
72255
  var WIN_SLASH = "\\\\/";
72257
72256
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
72257
+ var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
72258
72258
  var DOT_LITERAL = "\\.";
72259
72259
  var PLUS_LITERAL = "\\+";
72260
72260
  var QMARK_LITERAL = "\\?";
@@ -72302,6 +72302,7 @@ var require_constants6 = __commonJS({
72302
72302
  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
72303
72303
  };
72304
72304
  var POSIX_REGEX_SOURCE = {
72305
+ __proto__: null,
72305
72306
  alnum: "a-zA-Z0-9",
72306
72307
  alpha: "a-zA-Z",
72307
72308
  ascii: "\\x00-\\x7F",
@@ -72318,6 +72319,7 @@ var require_constants6 = __commonJS({
72318
72319
  xdigit: "A-Fa-f0-9"
72319
72320
  };
72320
72321
  module.exports = {
72322
+ DEFAULT_MAX_EXTGLOB_RECURSION,
72321
72323
  MAX_LENGTH: 1024 * 64,
72322
72324
  POSIX_REGEX_SOURCE,
72323
72325
  // regular expressions
@@ -72329,6 +72331,7 @@ var require_constants6 = __commonJS({
72329
72331
  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
72330
72332
  // Replace globs with equivalent patterns to reduce parsing time.
72331
72333
  REPLACEMENTS: {
72334
+ __proto__: null,
72332
72335
  "***": "*",
72333
72336
  "**/**": "**",
72334
72337
  "**/**/**": "**"
@@ -72865,6 +72868,213 @@ var require_parse3 = __commonJS({
72865
72868
  var syntaxError = (type, char) => {
72866
72869
  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
72867
72870
  };
72871
+ var splitTopLevel = (input) => {
72872
+ const parts = [];
72873
+ let bracket = 0;
72874
+ let paren = 0;
72875
+ let quote = 0;
72876
+ let value = "";
72877
+ let escaped = false;
72878
+ for (const ch of input) {
72879
+ if (escaped === true) {
72880
+ value += ch;
72881
+ escaped = false;
72882
+ continue;
72883
+ }
72884
+ if (ch === "\\") {
72885
+ value += ch;
72886
+ escaped = true;
72887
+ continue;
72888
+ }
72889
+ if (ch === '"') {
72890
+ quote = quote === 1 ? 0 : 1;
72891
+ value += ch;
72892
+ continue;
72893
+ }
72894
+ if (quote === 0) {
72895
+ if (ch === "[") {
72896
+ bracket++;
72897
+ } else if (ch === "]" && bracket > 0) {
72898
+ bracket--;
72899
+ } else if (bracket === 0) {
72900
+ if (ch === "(") {
72901
+ paren++;
72902
+ } else if (ch === ")" && paren > 0) {
72903
+ paren--;
72904
+ } else if (ch === "|" && paren === 0) {
72905
+ parts.push(value);
72906
+ value = "";
72907
+ continue;
72908
+ }
72909
+ }
72910
+ }
72911
+ value += ch;
72912
+ }
72913
+ parts.push(value);
72914
+ return parts;
72915
+ };
72916
+ var isPlainBranch = (branch) => {
72917
+ let escaped = false;
72918
+ for (const ch of branch) {
72919
+ if (escaped === true) {
72920
+ escaped = false;
72921
+ continue;
72922
+ }
72923
+ if (ch === "\\") {
72924
+ escaped = true;
72925
+ continue;
72926
+ }
72927
+ if (/[?*+@!()[\]{}]/.test(ch)) {
72928
+ return false;
72929
+ }
72930
+ }
72931
+ return true;
72932
+ };
72933
+ var normalizeSimpleBranch = (branch) => {
72934
+ let value = branch.trim();
72935
+ let changed = true;
72936
+ while (changed === true) {
72937
+ changed = false;
72938
+ if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
72939
+ value = value.slice(2, -1);
72940
+ changed = true;
72941
+ }
72942
+ }
72943
+ if (!isPlainBranch(value)) {
72944
+ return;
72945
+ }
72946
+ return value.replace(/\\(.)/g, "$1");
72947
+ };
72948
+ var hasRepeatedCharPrefixOverlap = (branches) => {
72949
+ const values = branches.map(normalizeSimpleBranch).filter(Boolean);
72950
+ for (let i = 0; i < values.length; i++) {
72951
+ for (let j2 = i + 1; j2 < values.length; j2++) {
72952
+ const a = values[i];
72953
+ const b2 = values[j2];
72954
+ const char = a[0];
72955
+ if (!char || a !== char.repeat(a.length) || b2 !== char.repeat(b2.length)) {
72956
+ continue;
72957
+ }
72958
+ if (a === b2 || a.startsWith(b2) || b2.startsWith(a)) {
72959
+ return true;
72960
+ }
72961
+ }
72962
+ }
72963
+ return false;
72964
+ };
72965
+ var parseRepeatedExtglob = (pattern, requireEnd = true) => {
72966
+ if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") {
72967
+ return;
72968
+ }
72969
+ let bracket = 0;
72970
+ let paren = 0;
72971
+ let quote = 0;
72972
+ let escaped = false;
72973
+ for (let i = 1; i < pattern.length; i++) {
72974
+ const ch = pattern[i];
72975
+ if (escaped === true) {
72976
+ escaped = false;
72977
+ continue;
72978
+ }
72979
+ if (ch === "\\") {
72980
+ escaped = true;
72981
+ continue;
72982
+ }
72983
+ if (ch === '"') {
72984
+ quote = quote === 1 ? 0 : 1;
72985
+ continue;
72986
+ }
72987
+ if (quote === 1) {
72988
+ continue;
72989
+ }
72990
+ if (ch === "[") {
72991
+ bracket++;
72992
+ continue;
72993
+ }
72994
+ if (ch === "]" && bracket > 0) {
72995
+ bracket--;
72996
+ continue;
72997
+ }
72998
+ if (bracket > 0) {
72999
+ continue;
73000
+ }
73001
+ if (ch === "(") {
73002
+ paren++;
73003
+ continue;
73004
+ }
73005
+ if (ch === ")") {
73006
+ paren--;
73007
+ if (paren === 0) {
73008
+ if (requireEnd === true && i !== pattern.length - 1) {
73009
+ return;
73010
+ }
73011
+ return {
73012
+ type: pattern[0],
73013
+ body: pattern.slice(2, i),
73014
+ end: i
73015
+ };
73016
+ }
73017
+ }
73018
+ }
73019
+ };
73020
+ var getStarExtglobSequenceOutput = (pattern) => {
73021
+ let index = 0;
73022
+ const chars = [];
73023
+ while (index < pattern.length) {
73024
+ const match = parseRepeatedExtglob(pattern.slice(index), false);
73025
+ if (!match || match.type !== "*") {
73026
+ return;
73027
+ }
73028
+ const branches = splitTopLevel(match.body).map((branch2) => branch2.trim());
73029
+ if (branches.length !== 1) {
73030
+ return;
73031
+ }
73032
+ const branch = normalizeSimpleBranch(branches[0]);
73033
+ if (!branch || branch.length !== 1) {
73034
+ return;
73035
+ }
73036
+ chars.push(branch);
73037
+ index += match.end + 1;
73038
+ }
73039
+ if (chars.length < 1) {
73040
+ return;
73041
+ }
73042
+ const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
73043
+ return `${source}*`;
73044
+ };
73045
+ var repeatedExtglobRecursion = (pattern) => {
73046
+ let depth = 0;
73047
+ let value = pattern.trim();
73048
+ let match = parseRepeatedExtglob(value);
73049
+ while (match) {
73050
+ depth++;
73051
+ value = match.body.trim();
73052
+ match = parseRepeatedExtglob(value);
73053
+ }
73054
+ return depth;
73055
+ };
73056
+ var analyzeRepeatedExtglob = (body, options) => {
73057
+ if (options.maxExtglobRecursion === false) {
73058
+ return { risky: false };
73059
+ }
73060
+ const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
73061
+ const branches = splitTopLevel(body).map((branch) => branch.trim());
73062
+ if (branches.length > 1) {
73063
+ if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) {
73064
+ return { risky: true };
73065
+ }
73066
+ }
73067
+ for (const branch of branches) {
73068
+ const safeOutput = getStarExtglobSequenceOutput(branch);
73069
+ if (safeOutput) {
73070
+ return { risky: true, safeOutput };
73071
+ }
73072
+ if (repeatedExtglobRecursion(branch) > max) {
73073
+ return { risky: true };
73074
+ }
73075
+ }
73076
+ return { risky: false };
73077
+ };
72868
73078
  var parse4 = (input, options) => {
72869
73079
  if (typeof input !== "string") {
72870
73080
  throw new TypeError("Expected a string");
@@ -72996,6 +73206,8 @@ var require_parse3 = __commonJS({
72996
73206
  token.prev = prev;
72997
73207
  token.parens = state.parens;
72998
73208
  token.output = state.output;
73209
+ token.startIndex = state.index;
73210
+ token.tokensIndex = tokens2.length;
72999
73211
  const output = (opts.capture ? "(" : "") + token.open;
73000
73212
  increment("parens");
73001
73213
  push2({ type, value: value2, output: state.output ? "" : ONE_CHAR });
@@ -73003,6 +73215,26 @@ var require_parse3 = __commonJS({
73003
73215
  extglobs.push(token);
73004
73216
  };
73005
73217
  const extglobClose = (token) => {
73218
+ const literal2 = input.slice(token.startIndex, state.index + 1);
73219
+ const body = input.slice(token.startIndex + 2, state.index);
73220
+ const analysis = analyzeRepeatedExtglob(body, opts);
73221
+ if ((token.type === "plus" || token.type === "star") && analysis.risky) {
73222
+ const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
73223
+ const open = tokens2[token.tokensIndex];
73224
+ open.type = "text";
73225
+ open.value = literal2;
73226
+ open.output = safeOutput || utils.escapeRegex(literal2);
73227
+ for (let i = token.tokensIndex + 1; i < tokens2.length; i++) {
73228
+ tokens2[i].value = "";
73229
+ tokens2[i].output = "";
73230
+ delete tokens2[i].suffix;
73231
+ }
73232
+ state.output = token.output + open.output;
73233
+ state.backtrack = true;
73234
+ push2({ type: "paren", extglob: true, value, output: "" });
73235
+ decrement("parens");
73236
+ return;
73237
+ }
73006
73238
  let output = token.close + (opts.capture ? ")" : "");
73007
73239
  let rest;
73008
73240
  if (token.type === "negate") {
@@ -73995,6 +74227,7 @@ var require_constants7 = __commonJS({
73995
74227
  var path16 = __require("path");
73996
74228
  var WIN_SLASH = "\\\\/";
73997
74229
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
74230
+ var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
73998
74231
  var DOT_LITERAL = "\\.";
73999
74232
  var PLUS_LITERAL = "\\+";
74000
74233
  var QMARK_LITERAL = "\\?";
@@ -74042,6 +74275,7 @@ var require_constants7 = __commonJS({
74042
74275
  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
74043
74276
  };
74044
74277
  var POSIX_REGEX_SOURCE = {
74278
+ __proto__: null,
74045
74279
  alnum: "a-zA-Z0-9",
74046
74280
  alpha: "a-zA-Z",
74047
74281
  ascii: "\\x00-\\x7F",
@@ -74058,6 +74292,7 @@ var require_constants7 = __commonJS({
74058
74292
  xdigit: "A-Fa-f0-9"
74059
74293
  };
74060
74294
  module.exports = {
74295
+ DEFAULT_MAX_EXTGLOB_RECURSION,
74061
74296
  MAX_LENGTH: 1024 * 64,
74062
74297
  POSIX_REGEX_SOURCE,
74063
74298
  // regular expressions
@@ -74069,6 +74304,7 @@ var require_constants7 = __commonJS({
74069
74304
  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
74070
74305
  // Replace globs with equivalent patterns to reduce parsing time.
74071
74306
  REPLACEMENTS: {
74307
+ __proto__: null,
74072
74308
  "***": "*",
74073
74309
  "**/**": "**",
74074
74310
  "**/**/**": "**"
@@ -74605,6 +74841,213 @@ var require_parse4 = __commonJS({
74605
74841
  var syntaxError = (type, char) => {
74606
74842
  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
74607
74843
  };
74844
+ var splitTopLevel = (input) => {
74845
+ const parts = [];
74846
+ let bracket = 0;
74847
+ let paren = 0;
74848
+ let quote = 0;
74849
+ let value = "";
74850
+ let escaped = false;
74851
+ for (const ch of input) {
74852
+ if (escaped === true) {
74853
+ value += ch;
74854
+ escaped = false;
74855
+ continue;
74856
+ }
74857
+ if (ch === "\\") {
74858
+ value += ch;
74859
+ escaped = true;
74860
+ continue;
74861
+ }
74862
+ if (ch === '"') {
74863
+ quote = quote === 1 ? 0 : 1;
74864
+ value += ch;
74865
+ continue;
74866
+ }
74867
+ if (quote === 0) {
74868
+ if (ch === "[") {
74869
+ bracket++;
74870
+ } else if (ch === "]" && bracket > 0) {
74871
+ bracket--;
74872
+ } else if (bracket === 0) {
74873
+ if (ch === "(") {
74874
+ paren++;
74875
+ } else if (ch === ")" && paren > 0) {
74876
+ paren--;
74877
+ } else if (ch === "|" && paren === 0) {
74878
+ parts.push(value);
74879
+ value = "";
74880
+ continue;
74881
+ }
74882
+ }
74883
+ }
74884
+ value += ch;
74885
+ }
74886
+ parts.push(value);
74887
+ return parts;
74888
+ };
74889
+ var isPlainBranch = (branch) => {
74890
+ let escaped = false;
74891
+ for (const ch of branch) {
74892
+ if (escaped === true) {
74893
+ escaped = false;
74894
+ continue;
74895
+ }
74896
+ if (ch === "\\") {
74897
+ escaped = true;
74898
+ continue;
74899
+ }
74900
+ if (/[?*+@!()[\]{}]/.test(ch)) {
74901
+ return false;
74902
+ }
74903
+ }
74904
+ return true;
74905
+ };
74906
+ var normalizeSimpleBranch = (branch) => {
74907
+ let value = branch.trim();
74908
+ let changed = true;
74909
+ while (changed === true) {
74910
+ changed = false;
74911
+ if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
74912
+ value = value.slice(2, -1);
74913
+ changed = true;
74914
+ }
74915
+ }
74916
+ if (!isPlainBranch(value)) {
74917
+ return;
74918
+ }
74919
+ return value.replace(/\\(.)/g, "$1");
74920
+ };
74921
+ var hasRepeatedCharPrefixOverlap = (branches) => {
74922
+ const values = branches.map(normalizeSimpleBranch).filter(Boolean);
74923
+ for (let i = 0; i < values.length; i++) {
74924
+ for (let j2 = i + 1; j2 < values.length; j2++) {
74925
+ const a = values[i];
74926
+ const b2 = values[j2];
74927
+ const char = a[0];
74928
+ if (!char || a !== char.repeat(a.length) || b2 !== char.repeat(b2.length)) {
74929
+ continue;
74930
+ }
74931
+ if (a === b2 || a.startsWith(b2) || b2.startsWith(a)) {
74932
+ return true;
74933
+ }
74934
+ }
74935
+ }
74936
+ return false;
74937
+ };
74938
+ var parseRepeatedExtglob = (pattern, requireEnd = true) => {
74939
+ if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") {
74940
+ return;
74941
+ }
74942
+ let bracket = 0;
74943
+ let paren = 0;
74944
+ let quote = 0;
74945
+ let escaped = false;
74946
+ for (let i = 1; i < pattern.length; i++) {
74947
+ const ch = pattern[i];
74948
+ if (escaped === true) {
74949
+ escaped = false;
74950
+ continue;
74951
+ }
74952
+ if (ch === "\\") {
74953
+ escaped = true;
74954
+ continue;
74955
+ }
74956
+ if (ch === '"') {
74957
+ quote = quote === 1 ? 0 : 1;
74958
+ continue;
74959
+ }
74960
+ if (quote === 1) {
74961
+ continue;
74962
+ }
74963
+ if (ch === "[") {
74964
+ bracket++;
74965
+ continue;
74966
+ }
74967
+ if (ch === "]" && bracket > 0) {
74968
+ bracket--;
74969
+ continue;
74970
+ }
74971
+ if (bracket > 0) {
74972
+ continue;
74973
+ }
74974
+ if (ch === "(") {
74975
+ paren++;
74976
+ continue;
74977
+ }
74978
+ if (ch === ")") {
74979
+ paren--;
74980
+ if (paren === 0) {
74981
+ if (requireEnd === true && i !== pattern.length - 1) {
74982
+ return;
74983
+ }
74984
+ return {
74985
+ type: pattern[0],
74986
+ body: pattern.slice(2, i),
74987
+ end: i
74988
+ };
74989
+ }
74990
+ }
74991
+ }
74992
+ };
74993
+ var getStarExtglobSequenceOutput = (pattern) => {
74994
+ let index = 0;
74995
+ const chars = [];
74996
+ while (index < pattern.length) {
74997
+ const match = parseRepeatedExtglob(pattern.slice(index), false);
74998
+ if (!match || match.type !== "*") {
74999
+ return;
75000
+ }
75001
+ const branches = splitTopLevel(match.body).map((branch2) => branch2.trim());
75002
+ if (branches.length !== 1) {
75003
+ return;
75004
+ }
75005
+ const branch = normalizeSimpleBranch(branches[0]);
75006
+ if (!branch || branch.length !== 1) {
75007
+ return;
75008
+ }
75009
+ chars.push(branch);
75010
+ index += match.end + 1;
75011
+ }
75012
+ if (chars.length < 1) {
75013
+ return;
75014
+ }
75015
+ const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
75016
+ return `${source}*`;
75017
+ };
75018
+ var repeatedExtglobRecursion = (pattern) => {
75019
+ let depth = 0;
75020
+ let value = pattern.trim();
75021
+ let match = parseRepeatedExtglob(value);
75022
+ while (match) {
75023
+ depth++;
75024
+ value = match.body.trim();
75025
+ match = parseRepeatedExtglob(value);
75026
+ }
75027
+ return depth;
75028
+ };
75029
+ var analyzeRepeatedExtglob = (body, options) => {
75030
+ if (options.maxExtglobRecursion === false) {
75031
+ return { risky: false };
75032
+ }
75033
+ const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
75034
+ const branches = splitTopLevel(body).map((branch) => branch.trim());
75035
+ if (branches.length > 1) {
75036
+ if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) {
75037
+ return { risky: true };
75038
+ }
75039
+ }
75040
+ for (const branch of branches) {
75041
+ const safeOutput = getStarExtglobSequenceOutput(branch);
75042
+ if (safeOutput) {
75043
+ return { risky: true, safeOutput };
75044
+ }
75045
+ if (repeatedExtglobRecursion(branch) > max) {
75046
+ return { risky: true };
75047
+ }
75048
+ }
75049
+ return { risky: false };
75050
+ };
74608
75051
  var parse4 = (input, options) => {
74609
75052
  if (typeof input !== "string") {
74610
75053
  throw new TypeError("Expected a string");
@@ -74736,6 +75179,8 @@ var require_parse4 = __commonJS({
74736
75179
  token.prev = prev;
74737
75180
  token.parens = state.parens;
74738
75181
  token.output = state.output;
75182
+ token.startIndex = state.index;
75183
+ token.tokensIndex = tokens2.length;
74739
75184
  const output = (opts.capture ? "(" : "") + token.open;
74740
75185
  increment("parens");
74741
75186
  push2({ type, value: value2, output: state.output ? "" : ONE_CHAR });
@@ -74743,6 +75188,26 @@ var require_parse4 = __commonJS({
74743
75188
  extglobs.push(token);
74744
75189
  };
74745
75190
  const extglobClose = (token) => {
75191
+ const literal2 = input.slice(token.startIndex, state.index + 1);
75192
+ const body = input.slice(token.startIndex + 2, state.index);
75193
+ const analysis = analyzeRepeatedExtglob(body, opts);
75194
+ if ((token.type === "plus" || token.type === "star") && analysis.risky) {
75195
+ const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
75196
+ const open = tokens2[token.tokensIndex];
75197
+ open.type = "text";
75198
+ open.value = literal2;
75199
+ open.output = safeOutput || utils.escapeRegex(literal2);
75200
+ for (let i = token.tokensIndex + 1; i < tokens2.length; i++) {
75201
+ tokens2[i].value = "";
75202
+ tokens2[i].output = "";
75203
+ delete tokens2[i].suffix;
75204
+ }
75205
+ state.output = token.output + open.output;
75206
+ state.backtrack = true;
75207
+ push2({ type: "paren", extglob: true, value, output: "" });
75208
+ decrement("parens");
75209
+ return;
75210
+ }
74746
75211
  let output = token.close + (opts.capture ? ")" : "");
74747
75212
  let rest;
74748
75213
  if (token.type === "negate") {
@@ -80051,7 +80516,7 @@ var require_helpers = __commonJS({
80051
80516
  if (instance.helpers[helperName]) {
80052
80517
  instance.hooks[helperName] = instance.helpers[helperName];
80053
80518
  if (!keepHelper) {
80054
- delete instance.helpers[helperName];
80519
+ instance.helpers[helperName] = void 0;
80055
80520
  }
80056
80521
  }
80057
80522
  }
@@ -80143,22 +80608,6 @@ var require_logger = __commonJS({
80143
80608
  }
80144
80609
  });
80145
80610
 
80146
- // node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js
80147
- var require_create_new_lookup_object = __commonJS({
80148
- "node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js"(exports) {
80149
- "use strict";
80150
- exports.__esModule = true;
80151
- exports.createNewLookupObject = createNewLookupObject;
80152
- var _utils = require_utils9();
80153
- function createNewLookupObject() {
80154
- for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {
80155
- sources[_key] = arguments[_key];
80156
- }
80157
- return _utils.extend.apply(void 0, [/* @__PURE__ */ Object.create(null)].concat(sources));
80158
- }
80159
- }
80160
- });
80161
-
80162
80611
  // node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js
80163
80612
  var require_proto_access = __commonJS({
80164
80613
  "node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js"(exports) {
@@ -80170,25 +80619,28 @@ var require_proto_access = __commonJS({
80170
80619
  function _interopRequireDefault(obj) {
80171
80620
  return obj && obj.__esModule ? obj : { "default": obj };
80172
80621
  }
80173
- var _createNewLookupObject = require_create_new_lookup_object();
80622
+ var _utils = require_utils9();
80174
80623
  var _logger = require_logger();
80175
80624
  var _logger2 = _interopRequireDefault(_logger);
80176
80625
  var loggedProperties = /* @__PURE__ */ Object.create(null);
80177
80626
  function createProtoAccessControl(runtimeOptions) {
80178
- var defaultMethodWhiteList = /* @__PURE__ */ Object.create(null);
80179
- defaultMethodWhiteList["constructor"] = false;
80180
- defaultMethodWhiteList["__defineGetter__"] = false;
80181
- defaultMethodWhiteList["__defineSetter__"] = false;
80182
- defaultMethodWhiteList["__lookupGetter__"] = false;
80183
- var defaultPropertyWhiteList = /* @__PURE__ */ Object.create(null);
80184
- defaultPropertyWhiteList["__proto__"] = false;
80627
+ var propertyWhiteList = /* @__PURE__ */ Object.create(null);
80628
+ propertyWhiteList["__proto__"] = false;
80629
+ _utils.extend(propertyWhiteList, runtimeOptions.allowedProtoProperties);
80630
+ var methodWhiteList = /* @__PURE__ */ Object.create(null);
80631
+ methodWhiteList["constructor"] = false;
80632
+ methodWhiteList["__defineGetter__"] = false;
80633
+ methodWhiteList["__defineSetter__"] = false;
80634
+ methodWhiteList["__lookupGetter__"] = false;
80635
+ methodWhiteList["__lookupSetter__"] = false;
80636
+ _utils.extend(methodWhiteList, runtimeOptions.allowedProtoMethods);
80185
80637
  return {
80186
80638
  properties: {
80187
- whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties),
80639
+ whitelist: propertyWhiteList,
80188
80640
  defaultValue: runtimeOptions.allowProtoPropertiesByDefault
80189
80641
  },
80190
80642
  methods: {
80191
- whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods),
80643
+ whitelist: methodWhiteList,
80192
80644
  defaultValue: runtimeOptions.allowProtoMethodsByDefault
80193
80645
  }
80194
80646
  };
@@ -80241,7 +80693,7 @@ var require_base3 = __commonJS({
80241
80693
  var _logger = require_logger();
80242
80694
  var _logger2 = _interopRequireDefault(_logger);
80243
80695
  var _internalProtoAccess = require_proto_access();
80244
- var VERSION = "4.7.8";
80696
+ var VERSION = "4.7.9";
80245
80697
  exports.VERSION = VERSION;
80246
80698
  var COMPILER_REVISION = 8;
80247
80699
  exports.COMPILER_REVISION = COMPILER_REVISION;
@@ -80427,14 +80879,12 @@ var require_runtime = __commonJS({
80427
80879
  }
80428
80880
  }
80429
80881
  partial2 = env.VM.resolvePartial.call(this, partial2, context, options);
80430
- var extendedOptions = Utils.extend({}, options, {
80431
- hooks: this.hooks,
80432
- protoAccessControl: this.protoAccessControl
80433
- });
80434
- var result = env.VM.invokePartial.call(this, partial2, context, extendedOptions);
80882
+ options.hooks = this.hooks;
80883
+ options.protoAccessControl = this.protoAccessControl;
80884
+ var result = env.VM.invokePartial.call(this, partial2, context, options);
80435
80885
  if (result == null && env.compile) {
80436
80886
  options.partials[options.name] = env.compile(partial2, templateSpec.compilerOptions, env);
80437
- result = options.partials[options.name](context, extendedOptions);
80887
+ result = options.partials[options.name](context, options);
80438
80888
  }
80439
80889
  if (result != null) {
80440
80890
  if (options.indent) {
@@ -80479,7 +80929,7 @@ var require_runtime = __commonJS({
80479
80929
  for (var i = 0; i < len; i++) {
80480
80930
  var result = depths[i] && container.lookupProperty(depths[i], name);
80481
80931
  if (result != null) {
80482
- return depths[i][name];
80932
+ return result;
80483
80933
  }
80484
80934
  }
80485
80935
  },
@@ -80545,8 +80995,9 @@ var require_runtime = __commonJS({
80545
80995
  ret.isTop = true;
80546
80996
  ret._setup = function(options) {
80547
80997
  if (!options.partial) {
80548
- var mergedHelpers = Utils.extend({}, env.helpers, options.helpers);
80549
- wrapHelpersToPassLookupProperty(mergedHelpers, container);
80998
+ var mergedHelpers = {};
80999
+ addHelpers(mergedHelpers, env.helpers, container);
81000
+ addHelpers(mergedHelpers, options.helpers, container);
80550
81001
  container.helpers = mergedHelpers;
80551
81002
  if (templateSpec.usePartial) {
80552
81003
  container.partials = container.mergeIfNeeded(options.partials, env.partials);
@@ -80596,18 +81047,18 @@ var require_runtime = __commonJS({
80596
81047
  function resolvePartial(partial2, context, options) {
80597
81048
  if (!partial2) {
80598
81049
  if (options.name === "@partial-block") {
80599
- partial2 = options.data["partial-block"];
81050
+ partial2 = lookupOwnProperty(options.data, "partial-block");
80600
81051
  } else {
80601
- partial2 = options.partials[options.name];
81052
+ partial2 = lookupOwnProperty(options.partials, options.name);
80602
81053
  }
80603
81054
  } else if (!partial2.call && !options.name) {
80604
81055
  options.name = partial2;
80605
- partial2 = options.partials[partial2];
81056
+ partial2 = lookupOwnProperty(options.partials, partial2);
80606
81057
  }
80607
81058
  return partial2;
80608
81059
  }
80609
81060
  function invokePartial(partial2, context, options) {
80610
- var currentPartialBlock = options.data && options.data["partial-block"];
81061
+ var currentPartialBlock = lookupOwnProperty(options.data, "partial-block");
80611
81062
  options.partial = true;
80612
81063
  if (options.ids) {
80613
81064
  options.data.contextPath = options.ids[0] || options.data.contextPath;
@@ -80640,6 +81091,11 @@ var require_runtime = __commonJS({
80640
81091
  function noop() {
80641
81092
  return "";
80642
81093
  }
81094
+ function lookupOwnProperty(obj, name) {
81095
+ if (obj && Object.prototype.hasOwnProperty.call(obj, name)) {
81096
+ return obj[name];
81097
+ }
81098
+ }
80643
81099
  function initData(context, data) {
80644
81100
  if (!data || !("root" in data)) {
80645
81101
  data = data ? _base.createFrame(data) : {};
@@ -80655,16 +81111,18 @@ var require_runtime = __commonJS({
80655
81111
  }
80656
81112
  return prog;
80657
81113
  }
80658
- function wrapHelpersToPassLookupProperty(mergedHelpers, container) {
80659
- Object.keys(mergedHelpers).forEach(function(helperName) {
80660
- var helper = mergedHelpers[helperName];
81114
+ function addHelpers(mergedHelpers, helpers, container) {
81115
+ if (!helpers) return;
81116
+ Object.keys(helpers).forEach(function(helperName) {
81117
+ var helper = helpers[helperName];
80661
81118
  mergedHelpers[helperName] = passLookupPropertyOption(helper, container);
80662
81119
  });
80663
81120
  }
80664
81121
  function passLookupPropertyOption(helper, container) {
80665
81122
  var lookupProperty = container.lookupProperty;
80666
81123
  return _internalWrapHelper.wrapHelper(helper, function(options) {
80667
- return Utils.extend({ lookupProperty }, options);
81124
+ options.lookupProperty = lookupProperty;
81125
+ return options;
80668
81126
  });
80669
81127
  }
80670
81128
  }
@@ -81474,7 +81932,7 @@ var require_parser = __commonJS({
81474
81932
  break;
81475
81933
  }
81476
81934
  };
81477
- lexer2.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
81935
+ lexer2.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
81478
81936
  lexer2.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } };
81479
81937
  return lexer2;
81480
81938
  })();
@@ -81981,12 +82439,15 @@ var require_base4 = __commonJS({
81981
82439
  var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
81982
82440
  var _helpers = require_helpers2();
81983
82441
  var Helpers = _interopRequireWildcard(_helpers);
82442
+ var _exception = require_exception();
82443
+ var _exception2 = _interopRequireDefault(_exception);
81984
82444
  var _utils = require_utils9();
81985
82445
  exports.parser = _parser2["default"];
81986
82446
  var yy = {};
81987
82447
  _utils.extend(yy, Helpers);
81988
82448
  function parseWithoutProcessing(input, options) {
81989
82449
  if (input.type === "Program") {
82450
+ validateInputAst(input);
81990
82451
  return input;
81991
82452
  }
81992
82453
  _parser2["default"].yy = yy;
@@ -82001,6 +82462,51 @@ var require_base4 = __commonJS({
82001
82462
  var strip = new _whitespaceControl2["default"](options);
82002
82463
  return strip.accept(ast);
82003
82464
  }
82465
+ function validateInputAst(ast) {
82466
+ validateAstNode(ast);
82467
+ }
82468
+ function validateAstNode(node) {
82469
+ if (node == null) {
82470
+ return;
82471
+ }
82472
+ if (Array.isArray(node)) {
82473
+ node.forEach(validateAstNode);
82474
+ return;
82475
+ }
82476
+ if (typeof node !== "object") {
82477
+ return;
82478
+ }
82479
+ if (node.type === "PathExpression") {
82480
+ if (!isValidDepth(node.depth)) {
82481
+ throw new _exception2["default"]("Invalid AST: PathExpression.depth must be an integer");
82482
+ }
82483
+ if (!Array.isArray(node.parts)) {
82484
+ throw new _exception2["default"]("Invalid AST: PathExpression.parts must be an array");
82485
+ }
82486
+ for (var i = 0; i < node.parts.length; i++) {
82487
+ if (typeof node.parts[i] !== "string") {
82488
+ throw new _exception2["default"]("Invalid AST: PathExpression.parts must only contain strings");
82489
+ }
82490
+ }
82491
+ } else if (node.type === "NumberLiteral") {
82492
+ if (typeof node.value !== "number" || !isFinite(node.value)) {
82493
+ throw new _exception2["default"]("Invalid AST: NumberLiteral.value must be a number");
82494
+ }
82495
+ } else if (node.type === "BooleanLiteral") {
82496
+ if (typeof node.value !== "boolean") {
82497
+ throw new _exception2["default"]("Invalid AST: BooleanLiteral.value must be a boolean");
82498
+ }
82499
+ }
82500
+ Object.keys(node).forEach(function(propertyName) {
82501
+ if (propertyName === "loc") {
82502
+ return;
82503
+ }
82504
+ validateAstNode(node[propertyName]);
82505
+ });
82506
+ }
82507
+ function isValidDepth(depth) {
82508
+ return typeof depth === "number" && isFinite(depth) && Math.floor(depth) === depth && depth >= 0;
82509
+ }
82004
82510
  }
82005
82511
  });
82006
82512
 
@@ -84429,12 +84935,10 @@ var require_javascript_compiler = __commonJS({
84429
84935
  var programs = _context.programs;
84430
84936
  var decorators = _context.decorators;
84431
84937
  for (i = 0, l = programs.length; i < l; i++) {
84432
- if (programs[i]) {
84433
- ret[i] = programs[i];
84434
- if (decorators[i]) {
84435
- ret[i + "_d"] = decorators[i];
84436
- ret.useDecorators = true;
84437
- }
84938
+ ret[i] = programs[i];
84939
+ if (decorators[i]) {
84940
+ ret[i + "_d"] = decorators[i];
84941
+ ret.useDecorators = true;
84438
84942
  }
84439
84943
  }
84440
84944
  if (this.environment.usePartial) {
@@ -84695,22 +85199,25 @@ var require_javascript_compiler = __commonJS({
84695
85199
  }
84696
85200
  this.resolvePath("data", parts, 0, true, strict);
84697
85201
  },
84698
- resolvePath: function resolvePath(type, parts, i, falsy, strict) {
85202
+ resolvePath: function resolvePath(type, parts, startPartIndex, falsy, strict) {
84699
85203
  var _this2 = this;
84700
85204
  if (this.options.strict || this.options.assumeObjects) {
84701
- this.push(strictLookup(this.options.strict && strict, this, parts, i, type));
85205
+ this.push(strictLookup(this.options.strict && strict, this, parts, startPartIndex, type));
84702
85206
  return;
84703
85207
  }
84704
85208
  var len = parts.length;
84705
- for (; i < len; i++) {
84706
- this.replaceStack(function(current) {
84707
- var lookup = _this2.nameLookup(current, parts[i], type);
85209
+ var _loop = function(i2) {
85210
+ _this2.replaceStack(function(current) {
85211
+ var lookup = _this2.nameLookup(current, parts[i2], type);
84708
85212
  if (!falsy) {
84709
85213
  return [" != null ? ", lookup, " : ", current];
84710
85214
  } else {
84711
85215
  return [" && ", lookup];
84712
85216
  }
84713
85217
  });
85218
+ };
85219
+ for (var i = startPartIndex; i < len; i++) {
85220
+ _loop(i);
84714
85221
  }
84715
85222
  },
84716
85223
  // [resolvePossibleLambda]
@@ -84814,7 +85321,9 @@ var require_javascript_compiler = __commonJS({
84814
85321
  // and inserts the decorator into the decorators list.
84815
85322
  registerDecorator: function registerDecorator(paramSize, name) {
84816
85323
  var foundDecorator = this.nameLookup("decorators", name, "decorator"), options = this.setupHelperArgs(name, paramSize);
84817
- this.decorators.push(["fn = ", this.decorators.functionCall(foundDecorator, "", ["fn", "props", "container", options]), " || fn;"]);
85324
+ this.decorators.push(["var decorator = ", foundDecorator, ";"]);
85325
+ this.decorators.push(['if (typeof decorator !== "function") { throw new Error(', this.quotedString('Missing decorator: "' + name + '"'), "); }"]);
85326
+ this.decorators.push(["fn = ", this.decorators.functionCall("decorator", "", ["fn", "props", "container", options]), " || fn;"]);
84818
85327
  },
84819
85328
  // [invokeHelper]
84820
85329
  //
@@ -84961,8 +85470,7 @@ var require_javascript_compiler = __commonJS({
84961
85470
  compiler = new this.compiler();
84962
85471
  var existing = this.matchExistingProgram(child);
84963
85472
  if (existing == null) {
84964
- this.context.programs.push("");
84965
- var index = this.context.programs.length;
85473
+ var index = this.context.programs.push("") - 1;
84966
85474
  child.index = index;
84967
85475
  child.name = "program" + index;
84968
85476
  this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
@@ -85206,16 +85714,16 @@ var require_javascript_compiler = __commonJS({
85206
85714
  JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
85207
85715
  return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
85208
85716
  };
85209
- function strictLookup(requireTerminal, compiler, parts, i, type) {
85717
+ function strictLookup(requireTerminal, compiler, parts, startPartIndex, type) {
85210
85718
  var stack = compiler.popStack(), len = parts.length;
85211
85719
  if (requireTerminal) {
85212
85720
  len--;
85213
85721
  }
85214
- for (; i < len; i++) {
85722
+ for (var i = startPartIndex; i < len; i++) {
85215
85723
  stack = compiler.nameLookup(stack, parts[i], type);
85216
85724
  }
85217
85725
  if (requireTerminal) {
85218
- return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[i]), ", ", JSON.stringify(compiler.source.currentLocation), " )"];
85726
+ return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[len]), ", ", JSON.stringify(compiler.source.currentLocation), " )"];
85219
85727
  } else {
85220
85728
  return stack;
85221
85729
  }
@@ -85465,7 +85973,7 @@ var package_default = {
85465
85973
  type: "module",
85466
85974
  homepage: "https://appwrite.io/support",
85467
85975
  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",
85468
- version: "16.0.0",
85976
+ version: "17.1.0",
85469
85977
  license: "BSD-3-Clause",
85470
85978
  main: "dist/index.cjs",
85471
85979
  module: "dist/index.js",
@@ -99753,7 +100261,7 @@ import childProcess from "child_process";
99753
100261
  // lib/constants.ts
99754
100262
  var SDK_TITLE = "Appwrite";
99755
100263
  var SDK_TITLE_LOWER = "appwrite";
99756
- var SDK_VERSION = "16.0.0";
100264
+ var SDK_VERSION = "17.1.0";
99757
100265
  var SDK_NAME = "Command Line";
99758
100266
  var SDK_PLATFORM = "console";
99759
100267
  var SDK_LANGUAGE = "cli";
@@ -100784,6 +101292,9 @@ var Client = class _Client {
100784
101292
  locale: "",
100785
101293
  mode: "",
100786
101294
  cookie: "",
101295
+ impersonateuserid: "",
101296
+ impersonateuseremail: "",
101297
+ impersonateuserphone: "",
100787
101298
  platform: "",
100788
101299
  selfSigned: false,
100789
101300
  session: void 0
@@ -100792,8 +101303,8 @@ var Client = class _Client {
100792
101303
  "x-sdk-name": "Console",
100793
101304
  "x-sdk-platform": "console",
100794
101305
  "x-sdk-language": "web",
100795
- "x-sdk-version": "6.0.0",
100796
- "X-Appwrite-Response-Format": "1.8.0"
101306
+ "x-sdk-version": "8.0.0",
101307
+ "X-Appwrite-Response-Format": "1.9.0"
100797
101308
  };
100798
101309
  this.realtime = {
100799
101310
  socket: void 0,
@@ -101116,6 +101627,48 @@ var Client = class _Client {
101116
101627
  this.config.cookie = value;
101117
101628
  return this;
101118
101629
  }
101630
+ /**
101631
+ * Set ImpersonateUserId
101632
+ *
101633
+ * Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
101634
+ *
101635
+ * @param value string
101636
+ *
101637
+ * @return {this}
101638
+ */
101639
+ setImpersonateUserId(value) {
101640
+ this.headers["X-Appwrite-Impersonate-User-Id"] = value;
101641
+ this.config.impersonateuserid = value;
101642
+ return this;
101643
+ }
101644
+ /**
101645
+ * Set ImpersonateUserEmail
101646
+ *
101647
+ * Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
101648
+ *
101649
+ * @param value string
101650
+ *
101651
+ * @return {this}
101652
+ */
101653
+ setImpersonateUserEmail(value) {
101654
+ this.headers["X-Appwrite-Impersonate-User-Email"] = value;
101655
+ this.config.impersonateuseremail = value;
101656
+ return this;
101657
+ }
101658
+ /**
101659
+ * Set ImpersonateUserPhone
101660
+ *
101661
+ * Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
101662
+ *
101663
+ * @param value string
101664
+ *
101665
+ * @return {this}
101666
+ */
101667
+ setImpersonateUserPhone(value) {
101668
+ this.headers["X-Appwrite-Impersonate-User-Phone"] = value;
101669
+ this.config.impersonateuserphone = value;
101670
+ return this;
101671
+ }
101119
101672
  /**
101120
101673
  * Set Platform
101121
101674
  *
@@ -101237,9 +101790,9 @@ var Client = class _Client {
101237
101790
  }
101238
101791
  return { uri: url2.toString(), options };
101239
101792
  }
101240
- chunkedUpload(method, url2, headers = {}, originalPayload = {}, onProgress) {
101241
- var _a3;
101242
- return __awaiter(this, void 0, void 0, function* () {
101793
+ chunkedUpload(method_1, url_1) {
101794
+ return __awaiter(this, arguments, void 0, function* (method, url2, headers = {}, originalPayload = {}, onProgress) {
101795
+ var _a3;
101243
101796
  const [fileParam, file2] = (_a3 = Object.entries(originalPayload).find(([_2, value]) => value instanceof File)) !== null && _a3 !== void 0 ? _a3 : [];
101244
101797
  if (!file2 || !fileParam) {
101245
101798
  throw new Error("File not found in payload");
@@ -101281,9 +101834,9 @@ var Client = class _Client {
101281
101834
  return this.call("GET", new URL(this.config.endpoint + "/ping"));
101282
101835
  });
101283
101836
  }
101284
- call(method, url2, headers = {}, params = {}, responseType = "json") {
101285
- var _a3, _b;
101286
- return __awaiter(this, void 0, void 0, function* () {
101837
+ call(method_1, url_1) {
101838
+ return __awaiter(this, arguments, void 0, function* (method, url2, headers = {}, params = {}, responseType = "json") {
101839
+ var _a3, _b;
101287
101840
  const { uri, options } = this.prepareRequest(method, url2, headers, params);
101288
101841
  let data = null;
101289
101842
  const response = yield fetch(uri, options);
@@ -102791,7 +103344,7 @@ var Account = class {
102791
103344
  };
102792
103345
  }
102793
103346
  const provider = params.provider;
102794
- const success21 = params.success;
103347
+ const success22 = params.success;
102795
103348
  const failure = params.failure;
102796
103349
  const scopes = params.scopes;
102797
103350
  if (typeof provider === "undefined") {
@@ -102799,8 +103352,8 @@ var Account = class {
102799
103352
  }
102800
103353
  const apiPath = "/account/sessions/oauth2/{provider}".replace("{provider}", provider);
102801
103354
  const payload = {};
102802
- if (typeof success21 !== "undefined") {
102803
- payload["success"] = success21;
103355
+ if (typeof success22 !== "undefined") {
103356
+ payload["success"] = success22;
102804
103357
  }
102805
103358
  if (typeof failure !== "undefined") {
102806
103359
  payload["failure"] = failure;
@@ -103139,7 +103692,7 @@ var Account = class {
103139
103692
  };
103140
103693
  }
103141
103694
  const provider = params.provider;
103142
- const success21 = params.success;
103695
+ const success22 = params.success;
103143
103696
  const failure = params.failure;
103144
103697
  const scopes = params.scopes;
103145
103698
  if (typeof provider === "undefined") {
@@ -103147,8 +103700,8 @@ var Account = class {
103147
103700
  }
103148
103701
  const apiPath = "/account/tokens/oauth2/{provider}".replace("{provider}", provider);
103149
103702
  const payload = {};
103150
- if (typeof success21 !== "undefined") {
103151
- payload["success"] = success21;
103703
+ if (typeof success22 !== "undefined") {
103704
+ payload["success"] = success22;
103152
103705
  }
103153
103706
  if (typeof failure !== "undefined") {
103154
103707
  payload["failure"] = failure;
@@ -113770,15 +114323,26 @@ var Project = class {
113770
114323
  const apiHeaders = {};
113771
114324
  return this.client.call("get", uri, apiHeaders, payload);
113772
114325
  }
113773
- /**
113774
- * Get a list of all project variables. These variables will be accessible in all Appwrite Functions at runtime.
113775
- *
113776
- * @throws {AppwriteException}
113777
- * @returns {Promise<Models.VariableList>}
113778
- */
113779
- listVariables() {
114326
+ listVariables(paramsOrFirst, ...rest) {
114327
+ let params;
114328
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
114329
+ params = paramsOrFirst || {};
114330
+ } else {
114331
+ params = {
114332
+ queries: paramsOrFirst,
114333
+ total: rest[0]
114334
+ };
114335
+ }
114336
+ const queries = params.queries;
114337
+ const total = params.total;
113780
114338
  const apiPath = "/project/variables";
113781
114339
  const payload = {};
114340
+ if (typeof queries !== "undefined") {
114341
+ payload["queries"] = queries;
114342
+ }
114343
+ if (typeof total !== "undefined") {
114344
+ payload["total"] = total;
114345
+ }
113782
114346
  const uri = new URL(this.client.config.endpoint + apiPath);
113783
114347
  const apiHeaders = {};
113784
114348
  return this.client.call("get", uri, apiHeaders, payload);
@@ -113789,14 +114353,19 @@ var Project = class {
113789
114353
  params = paramsOrFirst || {};
113790
114354
  } else {
113791
114355
  params = {
113792
- key: paramsOrFirst,
113793
- value: rest[0],
113794
- secret: rest[1]
114356
+ variableId: paramsOrFirst,
114357
+ key: rest[0],
114358
+ value: rest[1],
114359
+ secret: rest[2]
113795
114360
  };
113796
114361
  }
114362
+ const variableId = params.variableId;
113797
114363
  const key = params.key;
113798
114364
  const value = params.value;
113799
114365
  const secret = params.secret;
114366
+ if (typeof variableId === "undefined") {
114367
+ throw new AppwriteException('Missing required parameter: "variableId"');
114368
+ }
113800
114369
  if (typeof key === "undefined") {
113801
114370
  throw new AppwriteException('Missing required parameter: "key"');
113802
114371
  }
@@ -113805,6 +114374,9 @@ var Project = class {
113805
114374
  }
113806
114375
  const apiPath = "/project/variables";
113807
114376
  const payload = {};
114377
+ if (typeof variableId !== "undefined") {
114378
+ payload["variableId"] = variableId;
114379
+ }
113808
114380
  if (typeof key !== "undefined") {
113809
114381
  payload["key"] = key;
113810
114382
  }
@@ -113858,9 +114430,6 @@ var Project = class {
113858
114430
  if (typeof variableId === "undefined") {
113859
114431
  throw new AppwriteException('Missing required parameter: "variableId"');
113860
114432
  }
113861
- if (typeof key === "undefined") {
113862
- throw new AppwriteException('Missing required parameter: "key"');
113863
- }
113864
114433
  const apiPath = "/project/variables/{variableId}".replace("{variableId}", variableId);
113865
114434
  const payload = {};
113866
114435
  if (typeof key !== "undefined") {
@@ -122358,6 +122927,35 @@ var Users = class {
122358
122927
  };
122359
122928
  return this.client.call("patch", uri, apiHeaders, payload);
122360
122929
  }
122930
+ updateImpersonator(paramsOrFirst, ...rest) {
122931
+ let params;
122932
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
122933
+ params = paramsOrFirst || {};
122934
+ } else {
122935
+ params = {
122936
+ userId: paramsOrFirst,
122937
+ impersonator: rest[0]
122938
+ };
122939
+ }
122940
+ const userId = params.userId;
122941
+ const impersonator = params.impersonator;
122942
+ if (typeof userId === "undefined") {
122943
+ throw new AppwriteException('Missing required parameter: "userId"');
122944
+ }
122945
+ if (typeof impersonator === "undefined") {
122946
+ throw new AppwriteException('Missing required parameter: "impersonator"');
122947
+ }
122948
+ const apiPath = "/users/{userId}/impersonator".replace("{userId}", userId);
122949
+ const payload = {};
122950
+ if (typeof impersonator !== "undefined") {
122951
+ payload["impersonator"] = impersonator;
122952
+ }
122953
+ const uri = new URL(this.client.config.endpoint + apiPath);
122954
+ const apiHeaders = {
122955
+ "content-type": "application/json"
122956
+ };
122957
+ return this.client.call("patch", uri, apiHeaders, payload);
122958
+ }
122361
122959
  createJWT(paramsOrFirst, ...rest) {
122362
122960
  let params;
122363
122961
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -123826,7 +124424,7 @@ Permission.delete = (role) => {
123826
124424
  };
123827
124425
  var _a2;
123828
124426
  var _ID_hexTimestamp;
123829
- var ID = class _ID {
124427
+ var ID = class {
123830
124428
  /**
123831
124429
  * Uses the provided ID as the ID for the resource.
123832
124430
  *
@@ -123843,7 +124441,7 @@ var ID = class _ID {
123843
124441
  * @returns {string}
123844
124442
  */
123845
124443
  static unique(padding = 7) {
123846
- const baseId = __classPrivateFieldGet(_ID, _a2, "m", _ID_hexTimestamp).call(_ID);
124444
+ const baseId = __classPrivateFieldGet(_a2, _a2, "m", _ID_hexTimestamp).call(_a2);
123847
124445
  let randomPadding = "";
123848
124446
  for (let i = 0; i < padding; i++) {
123849
124447
  const randomHexDigit = Math.floor(Math.random() * 16).toString(16);
@@ -123996,11 +124594,12 @@ Operator.dateSubDays = (days) => new Operator("dateSubDays", [days]).toString();
123996
124594
  Operator.dateSetNow = () => new Operator("dateSetNow", []).toString();
123997
124595
  var Scopes;
123998
124596
  (function(Scopes3) {
124597
+ Scopes3["Account"] = "account";
124598
+ Scopes3["TeamsRead"] = "teams.read";
124599
+ Scopes3["TeamsWrite"] = "teams.write";
123999
124600
  Scopes3["SessionsWrite"] = "sessions.write";
124000
124601
  Scopes3["UsersRead"] = "users.read";
124001
124602
  Scopes3["UsersWrite"] = "users.write";
124002
- Scopes3["TeamsRead"] = "teams.read";
124003
- Scopes3["TeamsWrite"] = "teams.write";
124004
124603
  Scopes3["DatabasesRead"] = "databases.read";
124005
124604
  Scopes3["DatabasesWrite"] = "databases.write";
124006
124605
  Scopes3["CollectionsRead"] = "collections.read";
@@ -124055,6 +124654,8 @@ var Scopes;
124055
124654
  Scopes3["TokensWrite"] = "tokens.write";
124056
124655
  Scopes3["WebhooksRead"] = "webhooks.read";
124057
124656
  Scopes3["WebhooksWrite"] = "webhooks.write";
124657
+ Scopes3["ProjectRead"] = "project.read";
124658
+ Scopes3["ProjectWrite"] = "project.write";
124058
124659
  Scopes3["PoliciesWrite"] = "policies.write";
124059
124660
  Scopes3["PoliciesRead"] = "policies.read";
124060
124661
  Scopes3["ArchivesRead"] = "archives.read";
@@ -124064,6 +124665,14 @@ var Scopes;
124064
124665
  Scopes3["DomainsRead"] = "domains.read";
124065
124666
  Scopes3["DomainsWrite"] = "domains.write";
124066
124667
  Scopes3["EventsRead"] = "events.read";
124668
+ Scopes3["PlatformsRead"] = "platforms.read";
124669
+ Scopes3["PlatformsWrite"] = "platforms.write";
124670
+ Scopes3["ProjectsRead"] = "projects.read";
124671
+ Scopes3["ProjectsWrite"] = "projects.write";
124672
+ Scopes3["KeysRead"] = "keys.read";
124673
+ Scopes3["KeysWrite"] = "keys.write";
124674
+ Scopes3["DevKeysRead"] = "devKeys.read";
124675
+ Scopes3["DevKeysWrite"] = "devKeys.write";
124067
124676
  })(Scopes || (Scopes = {}));
124068
124677
  var AuthenticatorType;
124069
124678
  (function(AuthenticatorType2) {
@@ -124816,6 +125425,9 @@ var ImageFormat;
124816
125425
  var BackupServices;
124817
125426
  (function(BackupServices2) {
124818
125427
  BackupServices2["Databases"] = "databases";
125428
+ BackupServices2["Tablesdb"] = "tablesdb";
125429
+ BackupServices2["Documentsdb"] = "documentsdb";
125430
+ BackupServices2["Vectorsdb"] = "vectorsdb";
124819
125431
  BackupServices2["Functions"] = "functions";
124820
125432
  BackupServices2["Storage"] = "storage";
124821
125433
  })(BackupServices || (BackupServices = {}));
@@ -124847,13 +125459,13 @@ var RelationMutate;
124847
125459
  RelationMutate2["Restrict"] = "restrict";
124848
125460
  RelationMutate2["SetNull"] = "setNull";
124849
125461
  })(RelationMutate || (RelationMutate = {}));
124850
- var IndexType;
124851
- (function(IndexType2) {
124852
- IndexType2["Key"] = "key";
124853
- IndexType2["Fulltext"] = "fulltext";
124854
- IndexType2["Unique"] = "unique";
124855
- IndexType2["Spatial"] = "spatial";
124856
- })(IndexType || (IndexType = {}));
125462
+ var DatabasesIndexType;
125463
+ (function(DatabasesIndexType2) {
125464
+ DatabasesIndexType2["Key"] = "key";
125465
+ DatabasesIndexType2["Fulltext"] = "fulltext";
125466
+ DatabasesIndexType2["Unique"] = "unique";
125467
+ DatabasesIndexType2["Spatial"] = "spatial";
125468
+ })(DatabasesIndexType || (DatabasesIndexType = {}));
124857
125469
  var OrderBy;
124858
125470
  (function(OrderBy2) {
124859
125471
  OrderBy2["Asc"] = "asc";
@@ -124959,92 +125571,6 @@ var Runtime;
124959
125571
  Runtime2["Flutter332"] = "flutter-3.32";
124960
125572
  Runtime2["Flutter335"] = "flutter-3.35";
124961
125573
  Runtime2["Flutter338"] = "flutter-3.38";
124962
- Runtime2["Node145rc"] = "node-14.5-rc";
124963
- Runtime2["Node160rc"] = "node-16.0-rc";
124964
- Runtime2["Node180rc"] = "node-18.0-rc";
124965
- Runtime2["Node190rc"] = "node-19.0-rc";
124966
- Runtime2["Node200rc"] = "node-20.0-rc";
124967
- Runtime2["Node210rc"] = "node-21.0-rc";
124968
- Runtime2["Node22rc"] = "node-22-rc";
124969
- Runtime2["Node23rc"] = "node-23-rc";
124970
- Runtime2["Node24rc"] = "node-24-rc";
124971
- Runtime2["Node25rc"] = "node-25-rc";
124972
- Runtime2["Php80rc"] = "php-8.0-rc";
124973
- Runtime2["Php81rc"] = "php-8.1-rc";
124974
- Runtime2["Php82rc"] = "php-8.2-rc";
124975
- Runtime2["Php83rc"] = "php-8.3-rc";
124976
- Runtime2["Php84rc"] = "php-8.4-rc";
124977
- Runtime2["Ruby30rc"] = "ruby-3.0-rc";
124978
- Runtime2["Ruby31rc"] = "ruby-3.1-rc";
124979
- Runtime2["Ruby32rc"] = "ruby-3.2-rc";
124980
- Runtime2["Ruby33rc"] = "ruby-3.3-rc";
124981
- Runtime2["Ruby34rc"] = "ruby-3.4-rc";
124982
- Runtime2["Ruby40rc"] = "ruby-4.0-rc";
124983
- Runtime2["Python38rc"] = "python-3.8-rc";
124984
- Runtime2["Python39rc"] = "python-3.9-rc";
124985
- Runtime2["Python310rc"] = "python-3.10-rc";
124986
- Runtime2["Python311rc"] = "python-3.11-rc";
124987
- Runtime2["Python312rc"] = "python-3.12-rc";
124988
- Runtime2["Python313rc"] = "python-3.13-rc";
124989
- Runtime2["Python314rc"] = "python-3.14-rc";
124990
- Runtime2["Pythonml311rc"] = "python-ml-3.11-rc";
124991
- Runtime2["Pythonml312rc"] = "python-ml-3.12-rc";
124992
- Runtime2["Pythonml313rc"] = "python-ml-3.13-rc";
124993
- Runtime2["Deno140rc"] = "deno-1.40-rc";
124994
- Runtime2["Deno146rc"] = "deno-1.46-rc";
124995
- Runtime2["Deno20rc"] = "deno-2.0-rc";
124996
- Runtime2["Deno25rc"] = "deno-2.5-rc";
124997
- Runtime2["Deno26rc"] = "deno-2.6-rc";
124998
- Runtime2["Dart215rc"] = "dart-2.15-rc";
124999
- Runtime2["Dart216rc"] = "dart-2.16-rc";
125000
- Runtime2["Dart217rc"] = "dart-2.17-rc";
125001
- Runtime2["Dart218rc"] = "dart-2.18-rc";
125002
- Runtime2["Dart219rc"] = "dart-2.19-rc";
125003
- Runtime2["Dart30rc"] = "dart-3.0-rc";
125004
- Runtime2["Dart31rc"] = "dart-3.1-rc";
125005
- Runtime2["Dart33rc"] = "dart-3.3-rc";
125006
- Runtime2["Dart35rc"] = "dart-3.5-rc";
125007
- Runtime2["Dart38rc"] = "dart-3.8-rc";
125008
- Runtime2["Dart39rc"] = "dart-3.9-rc";
125009
- Runtime2["Dart310rc"] = "dart-3.10-rc";
125010
- Runtime2["Dotnet60rc"] = "dotnet-6.0-rc";
125011
- Runtime2["Dotnet70rc"] = "dotnet-7.0-rc";
125012
- Runtime2["Dotnet80rc"] = "dotnet-8.0-rc";
125013
- Runtime2["Dotnet10rc"] = "dotnet-10-rc";
125014
- Runtime2["Java80rc"] = "java-8.0-rc";
125015
- Runtime2["Java110rc"] = "java-11.0-rc";
125016
- Runtime2["Java170rc"] = "java-17.0-rc";
125017
- Runtime2["Java180rc"] = "java-18.0-rc";
125018
- Runtime2["Java210rc"] = "java-21.0-rc";
125019
- Runtime2["Java22rc"] = "java-22-rc";
125020
- Runtime2["Java25rc"] = "java-25-rc";
125021
- Runtime2["Swift55rc"] = "swift-5.5-rc";
125022
- Runtime2["Swift58rc"] = "swift-5.8-rc";
125023
- Runtime2["Swift59rc"] = "swift-5.9-rc";
125024
- Runtime2["Swift510rc"] = "swift-5.10-rc";
125025
- Runtime2["Swift62rc"] = "swift-6.2-rc";
125026
- Runtime2["Kotlin16rc"] = "kotlin-1.6-rc";
125027
- Runtime2["Kotlin18rc"] = "kotlin-1.8-rc";
125028
- Runtime2["Kotlin19rc"] = "kotlin-1.9-rc";
125029
- Runtime2["Kotlin20rc"] = "kotlin-2.0-rc";
125030
- Runtime2["Kotlin23rc"] = "kotlin-2.3-rc";
125031
- Runtime2["Cpp17rc"] = "cpp-17-rc";
125032
- Runtime2["Cpp20rc"] = "cpp-20-rc";
125033
- Runtime2["Bun10rc"] = "bun-1.0-rc";
125034
- Runtime2["Bun11rc"] = "bun-1.1-rc";
125035
- Runtime2["Bun12rc"] = "bun-1.2-rc";
125036
- Runtime2["Bun13rc"] = "bun-1.3-rc";
125037
- Runtime2["Go123rc"] = "go-1.23-rc";
125038
- Runtime2["Go124rc"] = "go-1.24-rc";
125039
- Runtime2["Go125rc"] = "go-1.25-rc";
125040
- Runtime2["Go126rc"] = "go-1.26-rc";
125041
- Runtime2["Static1rc"] = "static-1-rc";
125042
- Runtime2["Flutter324rc"] = "flutter-3.24-rc";
125043
- Runtime2["Flutter327rc"] = "flutter-3.27-rc";
125044
- Runtime2["Flutter329rc"] = "flutter-3.29-rc";
125045
- Runtime2["Flutter332rc"] = "flutter-3.32-rc";
125046
- Runtime2["Flutter335rc"] = "flutter-3.35-rc";
125047
- Runtime2["Flutter338rc"] = "flutter-3.38-rc";
125048
125574
  })(Runtime || (Runtime = {}));
125049
125575
  var Runtimes;
125050
125576
  (function(Runtimes2) {
@@ -125134,109 +125660,28 @@ var Runtimes;
125134
125660
  Runtimes2["Flutter332"] = "flutter-3.32";
125135
125661
  Runtimes2["Flutter335"] = "flutter-3.35";
125136
125662
  Runtimes2["Flutter338"] = "flutter-3.38";
125137
- Runtimes2["Node145rc"] = "node-14.5-rc";
125138
- Runtimes2["Node160rc"] = "node-16.0-rc";
125139
- Runtimes2["Node180rc"] = "node-18.0-rc";
125140
- Runtimes2["Node190rc"] = "node-19.0-rc";
125141
- Runtimes2["Node200rc"] = "node-20.0-rc";
125142
- Runtimes2["Node210rc"] = "node-21.0-rc";
125143
- Runtimes2["Node22rc"] = "node-22-rc";
125144
- Runtimes2["Node23rc"] = "node-23-rc";
125145
- Runtimes2["Node24rc"] = "node-24-rc";
125146
- Runtimes2["Node25rc"] = "node-25-rc";
125147
- Runtimes2["Php80rc"] = "php-8.0-rc";
125148
- Runtimes2["Php81rc"] = "php-8.1-rc";
125149
- Runtimes2["Php82rc"] = "php-8.2-rc";
125150
- Runtimes2["Php83rc"] = "php-8.3-rc";
125151
- Runtimes2["Php84rc"] = "php-8.4-rc";
125152
- Runtimes2["Ruby30rc"] = "ruby-3.0-rc";
125153
- Runtimes2["Ruby31rc"] = "ruby-3.1-rc";
125154
- Runtimes2["Ruby32rc"] = "ruby-3.2-rc";
125155
- Runtimes2["Ruby33rc"] = "ruby-3.3-rc";
125156
- Runtimes2["Ruby34rc"] = "ruby-3.4-rc";
125157
- Runtimes2["Ruby40rc"] = "ruby-4.0-rc";
125158
- Runtimes2["Python38rc"] = "python-3.8-rc";
125159
- Runtimes2["Python39rc"] = "python-3.9-rc";
125160
- Runtimes2["Python310rc"] = "python-3.10-rc";
125161
- Runtimes2["Python311rc"] = "python-3.11-rc";
125162
- Runtimes2["Python312rc"] = "python-3.12-rc";
125163
- Runtimes2["Python313rc"] = "python-3.13-rc";
125164
- Runtimes2["Python314rc"] = "python-3.14-rc";
125165
- Runtimes2["Pythonml311rc"] = "python-ml-3.11-rc";
125166
- Runtimes2["Pythonml312rc"] = "python-ml-3.12-rc";
125167
- Runtimes2["Pythonml313rc"] = "python-ml-3.13-rc";
125168
- Runtimes2["Deno140rc"] = "deno-1.40-rc";
125169
- Runtimes2["Deno146rc"] = "deno-1.46-rc";
125170
- Runtimes2["Deno20rc"] = "deno-2.0-rc";
125171
- Runtimes2["Deno25rc"] = "deno-2.5-rc";
125172
- Runtimes2["Deno26rc"] = "deno-2.6-rc";
125173
- Runtimes2["Dart215rc"] = "dart-2.15-rc";
125174
- Runtimes2["Dart216rc"] = "dart-2.16-rc";
125175
- Runtimes2["Dart217rc"] = "dart-2.17-rc";
125176
- Runtimes2["Dart218rc"] = "dart-2.18-rc";
125177
- Runtimes2["Dart219rc"] = "dart-2.19-rc";
125178
- Runtimes2["Dart30rc"] = "dart-3.0-rc";
125179
- Runtimes2["Dart31rc"] = "dart-3.1-rc";
125180
- Runtimes2["Dart33rc"] = "dart-3.3-rc";
125181
- Runtimes2["Dart35rc"] = "dart-3.5-rc";
125182
- Runtimes2["Dart38rc"] = "dart-3.8-rc";
125183
- Runtimes2["Dart39rc"] = "dart-3.9-rc";
125184
- Runtimes2["Dart310rc"] = "dart-3.10-rc";
125185
- Runtimes2["Dotnet60rc"] = "dotnet-6.0-rc";
125186
- Runtimes2["Dotnet70rc"] = "dotnet-7.0-rc";
125187
- Runtimes2["Dotnet80rc"] = "dotnet-8.0-rc";
125188
- Runtimes2["Dotnet10rc"] = "dotnet-10-rc";
125189
- Runtimes2["Java80rc"] = "java-8.0-rc";
125190
- Runtimes2["Java110rc"] = "java-11.0-rc";
125191
- Runtimes2["Java170rc"] = "java-17.0-rc";
125192
- Runtimes2["Java180rc"] = "java-18.0-rc";
125193
- Runtimes2["Java210rc"] = "java-21.0-rc";
125194
- Runtimes2["Java22rc"] = "java-22-rc";
125195
- Runtimes2["Java25rc"] = "java-25-rc";
125196
- Runtimes2["Swift55rc"] = "swift-5.5-rc";
125197
- Runtimes2["Swift58rc"] = "swift-5.8-rc";
125198
- Runtimes2["Swift59rc"] = "swift-5.9-rc";
125199
- Runtimes2["Swift510rc"] = "swift-5.10-rc";
125200
- Runtimes2["Swift62rc"] = "swift-6.2-rc";
125201
- Runtimes2["Kotlin16rc"] = "kotlin-1.6-rc";
125202
- Runtimes2["Kotlin18rc"] = "kotlin-1.8-rc";
125203
- Runtimes2["Kotlin19rc"] = "kotlin-1.9-rc";
125204
- Runtimes2["Kotlin20rc"] = "kotlin-2.0-rc";
125205
- Runtimes2["Kotlin23rc"] = "kotlin-2.3-rc";
125206
- Runtimes2["Cpp17rc"] = "cpp-17-rc";
125207
- Runtimes2["Cpp20rc"] = "cpp-20-rc";
125208
- Runtimes2["Bun10rc"] = "bun-1.0-rc";
125209
- Runtimes2["Bun11rc"] = "bun-1.1-rc";
125210
- Runtimes2["Bun12rc"] = "bun-1.2-rc";
125211
- Runtimes2["Bun13rc"] = "bun-1.3-rc";
125212
- Runtimes2["Go123rc"] = "go-1.23-rc";
125213
- Runtimes2["Go124rc"] = "go-1.24-rc";
125214
- Runtimes2["Go125rc"] = "go-1.25-rc";
125215
- Runtimes2["Go126rc"] = "go-1.26-rc";
125216
- Runtimes2["Static1rc"] = "static-1-rc";
125217
- Runtimes2["Flutter324rc"] = "flutter-3.24-rc";
125218
- Runtimes2["Flutter327rc"] = "flutter-3.27-rc";
125219
- Runtimes2["Flutter329rc"] = "flutter-3.29-rc";
125220
- Runtimes2["Flutter332rc"] = "flutter-3.32-rc";
125221
- Runtimes2["Flutter335rc"] = "flutter-3.35-rc";
125222
- Runtimes2["Flutter338rc"] = "flutter-3.38-rc";
125223
125663
  })(Runtimes || (Runtimes = {}));
125224
125664
  var UseCases;
125225
125665
  (function(UseCases2) {
125226
- UseCases2["Portfolio"] = "portfolio";
125227
125666
  UseCases2["Starter"] = "starter";
125667
+ UseCases2["Databases"] = "databases";
125668
+ UseCases2["Ai"] = "ai";
125669
+ UseCases2["Messaging"] = "messaging";
125670
+ UseCases2["Utilities"] = "utilities";
125671
+ UseCases2["Devtools"] = "dev-tools";
125672
+ UseCases2["Auth"] = "auth";
125673
+ UseCases2["Portfolio"] = "portfolio";
125228
125674
  UseCases2["Events"] = "events";
125229
125675
  UseCases2["Ecommerce"] = "ecommerce";
125230
125676
  UseCases2["Documentation"] = "documentation";
125231
125677
  UseCases2["Blog"] = "blog";
125232
- UseCases2["Ai"] = "ai";
125233
125678
  UseCases2["Forms"] = "forms";
125234
125679
  UseCases2["Dashboard"] = "dashboard";
125235
125680
  })(UseCases || (UseCases = {}));
125236
125681
  var TemplateReferenceType;
125237
125682
  (function(TemplateReferenceType2) {
125238
- TemplateReferenceType2["Branch"] = "branch";
125239
125683
  TemplateReferenceType2["Commit"] = "commit";
125684
+ TemplateReferenceType2["Branch"] = "branch";
125240
125685
  TemplateReferenceType2["Tag"] = "tag";
125241
125686
  })(TemplateReferenceType || (TemplateReferenceType = {}));
125242
125687
  var VCSReferenceType;
@@ -125300,6 +125745,8 @@ var AppwriteMigrationResource;
125300
125745
  AppwriteMigrationResource2["Document"] = "document";
125301
125746
  AppwriteMigrationResource2["Attribute"] = "attribute";
125302
125747
  AppwriteMigrationResource2["Collection"] = "collection";
125748
+ AppwriteMigrationResource2["Documentsdb"] = "documentsdb";
125749
+ AppwriteMigrationResource2["Vectorsdb"] = "vectorsdb";
125303
125750
  AppwriteMigrationResource2["Bucket"] = "bucket";
125304
125751
  AppwriteMigrationResource2["File"] = "file";
125305
125752
  AppwriteMigrationResource2["Function"] = "function";
@@ -125837,92 +126284,6 @@ var BuildRuntime;
125837
126284
  BuildRuntime2["Flutter332"] = "flutter-3.32";
125838
126285
  BuildRuntime2["Flutter335"] = "flutter-3.35";
125839
126286
  BuildRuntime2["Flutter338"] = "flutter-3.38";
125840
- BuildRuntime2["Node145rc"] = "node-14.5-rc";
125841
- BuildRuntime2["Node160rc"] = "node-16.0-rc";
125842
- BuildRuntime2["Node180rc"] = "node-18.0-rc";
125843
- BuildRuntime2["Node190rc"] = "node-19.0-rc";
125844
- BuildRuntime2["Node200rc"] = "node-20.0-rc";
125845
- BuildRuntime2["Node210rc"] = "node-21.0-rc";
125846
- BuildRuntime2["Node22rc"] = "node-22-rc";
125847
- BuildRuntime2["Node23rc"] = "node-23-rc";
125848
- BuildRuntime2["Node24rc"] = "node-24-rc";
125849
- BuildRuntime2["Node25rc"] = "node-25-rc";
125850
- BuildRuntime2["Php80rc"] = "php-8.0-rc";
125851
- BuildRuntime2["Php81rc"] = "php-8.1-rc";
125852
- BuildRuntime2["Php82rc"] = "php-8.2-rc";
125853
- BuildRuntime2["Php83rc"] = "php-8.3-rc";
125854
- BuildRuntime2["Php84rc"] = "php-8.4-rc";
125855
- BuildRuntime2["Ruby30rc"] = "ruby-3.0-rc";
125856
- BuildRuntime2["Ruby31rc"] = "ruby-3.1-rc";
125857
- BuildRuntime2["Ruby32rc"] = "ruby-3.2-rc";
125858
- BuildRuntime2["Ruby33rc"] = "ruby-3.3-rc";
125859
- BuildRuntime2["Ruby34rc"] = "ruby-3.4-rc";
125860
- BuildRuntime2["Ruby40rc"] = "ruby-4.0-rc";
125861
- BuildRuntime2["Python38rc"] = "python-3.8-rc";
125862
- BuildRuntime2["Python39rc"] = "python-3.9-rc";
125863
- BuildRuntime2["Python310rc"] = "python-3.10-rc";
125864
- BuildRuntime2["Python311rc"] = "python-3.11-rc";
125865
- BuildRuntime2["Python312rc"] = "python-3.12-rc";
125866
- BuildRuntime2["Python313rc"] = "python-3.13-rc";
125867
- BuildRuntime2["Python314rc"] = "python-3.14-rc";
125868
- BuildRuntime2["Pythonml311rc"] = "python-ml-3.11-rc";
125869
- BuildRuntime2["Pythonml312rc"] = "python-ml-3.12-rc";
125870
- BuildRuntime2["Pythonml313rc"] = "python-ml-3.13-rc";
125871
- BuildRuntime2["Deno140rc"] = "deno-1.40-rc";
125872
- BuildRuntime2["Deno146rc"] = "deno-1.46-rc";
125873
- BuildRuntime2["Deno20rc"] = "deno-2.0-rc";
125874
- BuildRuntime2["Deno25rc"] = "deno-2.5-rc";
125875
- BuildRuntime2["Deno26rc"] = "deno-2.6-rc";
125876
- BuildRuntime2["Dart215rc"] = "dart-2.15-rc";
125877
- BuildRuntime2["Dart216rc"] = "dart-2.16-rc";
125878
- BuildRuntime2["Dart217rc"] = "dart-2.17-rc";
125879
- BuildRuntime2["Dart218rc"] = "dart-2.18-rc";
125880
- BuildRuntime2["Dart219rc"] = "dart-2.19-rc";
125881
- BuildRuntime2["Dart30rc"] = "dart-3.0-rc";
125882
- BuildRuntime2["Dart31rc"] = "dart-3.1-rc";
125883
- BuildRuntime2["Dart33rc"] = "dart-3.3-rc";
125884
- BuildRuntime2["Dart35rc"] = "dart-3.5-rc";
125885
- BuildRuntime2["Dart38rc"] = "dart-3.8-rc";
125886
- BuildRuntime2["Dart39rc"] = "dart-3.9-rc";
125887
- BuildRuntime2["Dart310rc"] = "dart-3.10-rc";
125888
- BuildRuntime2["Dotnet60rc"] = "dotnet-6.0-rc";
125889
- BuildRuntime2["Dotnet70rc"] = "dotnet-7.0-rc";
125890
- BuildRuntime2["Dotnet80rc"] = "dotnet-8.0-rc";
125891
- BuildRuntime2["Dotnet10rc"] = "dotnet-10-rc";
125892
- BuildRuntime2["Java80rc"] = "java-8.0-rc";
125893
- BuildRuntime2["Java110rc"] = "java-11.0-rc";
125894
- BuildRuntime2["Java170rc"] = "java-17.0-rc";
125895
- BuildRuntime2["Java180rc"] = "java-18.0-rc";
125896
- BuildRuntime2["Java210rc"] = "java-21.0-rc";
125897
- BuildRuntime2["Java22rc"] = "java-22-rc";
125898
- BuildRuntime2["Java25rc"] = "java-25-rc";
125899
- BuildRuntime2["Swift55rc"] = "swift-5.5-rc";
125900
- BuildRuntime2["Swift58rc"] = "swift-5.8-rc";
125901
- BuildRuntime2["Swift59rc"] = "swift-5.9-rc";
125902
- BuildRuntime2["Swift510rc"] = "swift-5.10-rc";
125903
- BuildRuntime2["Swift62rc"] = "swift-6.2-rc";
125904
- BuildRuntime2["Kotlin16rc"] = "kotlin-1.6-rc";
125905
- BuildRuntime2["Kotlin18rc"] = "kotlin-1.8-rc";
125906
- BuildRuntime2["Kotlin19rc"] = "kotlin-1.9-rc";
125907
- BuildRuntime2["Kotlin20rc"] = "kotlin-2.0-rc";
125908
- BuildRuntime2["Kotlin23rc"] = "kotlin-2.3-rc";
125909
- BuildRuntime2["Cpp17rc"] = "cpp-17-rc";
125910
- BuildRuntime2["Cpp20rc"] = "cpp-20-rc";
125911
- BuildRuntime2["Bun10rc"] = "bun-1.0-rc";
125912
- BuildRuntime2["Bun11rc"] = "bun-1.1-rc";
125913
- BuildRuntime2["Bun12rc"] = "bun-1.2-rc";
125914
- BuildRuntime2["Bun13rc"] = "bun-1.3-rc";
125915
- BuildRuntime2["Go123rc"] = "go-1.23-rc";
125916
- BuildRuntime2["Go124rc"] = "go-1.24-rc";
125917
- BuildRuntime2["Go125rc"] = "go-1.25-rc";
125918
- BuildRuntime2["Go126rc"] = "go-1.26-rc";
125919
- BuildRuntime2["Static1rc"] = "static-1-rc";
125920
- BuildRuntime2["Flutter324rc"] = "flutter-3.24-rc";
125921
- BuildRuntime2["Flutter327rc"] = "flutter-3.27-rc";
125922
- BuildRuntime2["Flutter329rc"] = "flutter-3.29-rc";
125923
- BuildRuntime2["Flutter332rc"] = "flutter-3.32-rc";
125924
- BuildRuntime2["Flutter335rc"] = "flutter-3.35-rc";
125925
- BuildRuntime2["Flutter338rc"] = "flutter-3.38-rc";
125926
126287
  })(BuildRuntime || (BuildRuntime = {}));
125927
126288
  var Adapter;
125928
126289
  (function(Adapter2) {
@@ -125965,6 +126326,13 @@ var ImageGravity;
125965
126326
  ImageGravity2["Bottom"] = "bottom";
125966
126327
  ImageGravity2["Bottomright"] = "bottom-right";
125967
126328
  })(ImageGravity || (ImageGravity = {}));
126329
+ var TablesDBIndexType;
126330
+ (function(TablesDBIndexType2) {
126331
+ TablesDBIndexType2["Key"] = "key";
126332
+ TablesDBIndexType2["Fulltext"] = "fulltext";
126333
+ TablesDBIndexType2["Unique"] = "unique";
126334
+ TablesDBIndexType2["Spatial"] = "spatial";
126335
+ })(TablesDBIndexType || (TablesDBIndexType = {}));
125968
126336
  var PasswordHash;
125969
126337
  (function(PasswordHash2) {
125970
126338
  PasswordHash2["Sha1"] = "sha1";
@@ -125994,6 +126362,8 @@ var DatabaseType;
125994
126362
  (function(DatabaseType2) {
125995
126363
  DatabaseType2["Legacy"] = "legacy";
125996
126364
  DatabaseType2["Tablesdb"] = "tablesdb";
126365
+ DatabaseType2["Documentsdb"] = "documentsdb";
126366
+ DatabaseType2["Vectorsdb"] = "vectorsdb";
125997
126367
  })(DatabaseType || (DatabaseType = {}));
125998
126368
  var AttributeStatus;
125999
126369
  (function(AttributeStatus2) {
@@ -126099,10 +126469,14 @@ var DomainPurchaseStatus;
126099
126469
  })(DomainPurchaseStatus || (DomainPurchaseStatus = {}));
126100
126470
 
126101
126471
  // lib/parser.ts
126472
+ BigInt.prototype.toJSON = function() {
126473
+ return this.toString();
126474
+ };
126102
126475
  var { description } = package_default;
126103
126476
  var cliConfig = {
126104
126477
  verbose: false,
126105
126478
  json: false,
126479
+ raw: false,
126106
126480
  force: false,
126107
126481
  all: false,
126108
126482
  ids: [],
@@ -126125,34 +126499,108 @@ var extractReportCommandArgs = (value) => {
126125
126499
  }
126126
126500
  return reportData.data.args;
126127
126501
  };
126502
+ var filterObject = (obj) => {
126503
+ const result = {};
126504
+ for (const key of Object.keys(obj)) {
126505
+ const value = obj[key];
126506
+ if (typeof value === "function") continue;
126507
+ if (value == null) continue;
126508
+ if (value?.constructor?.name === "BigNumber") {
126509
+ result[key] = String(value);
126510
+ continue;
126511
+ }
126512
+ if (typeof value === "object") continue;
126513
+ if (typeof value === "string" && value.trim() === "") continue;
126514
+ result[key] = value;
126515
+ }
126516
+ return result;
126517
+ };
126518
+ var filterData = (data) => {
126519
+ const result = {};
126520
+ for (const key of Object.keys(data)) {
126521
+ const value = data[key];
126522
+ if (typeof value === "function") continue;
126523
+ if (value == null) continue;
126524
+ if (value?.constructor?.name === "BigNumber") {
126525
+ result[key] = String(value);
126526
+ continue;
126527
+ }
126528
+ if (Array.isArray(value)) {
126529
+ result[key] = value.map((item) => {
126530
+ if (item?.constructor?.name === "BigNumber") return String(item);
126531
+ return item && typeof item === "object" && !Array.isArray(item) ? filterObject(item) : item;
126532
+ });
126533
+ } else if (typeof value === "object") {
126534
+ continue;
126535
+ } else if (typeof value === "string" && value.trim() === "") {
126536
+ continue;
126537
+ } else {
126538
+ result[key] = value;
126539
+ }
126540
+ }
126541
+ return result;
126542
+ };
126128
126543
  var parse3 = (data) => {
126129
- if (cliConfig.json) {
126544
+ if (cliConfig.raw) {
126130
126545
  drawJSON(data);
126131
126546
  return;
126132
126547
  }
126133
- for (const key in data) {
126134
- if (data[key] === null) {
126548
+ if (cliConfig.json) {
126549
+ drawJSON(filterData(data));
126550
+ return;
126551
+ }
126552
+ const keys = Object.keys(data).filter((k2) => typeof data[k2] !== "function");
126553
+ let printedScalar = false;
126554
+ for (const key of keys) {
126555
+ const value = data[key];
126556
+ if (value === null) {
126135
126557
  console.log(`${import_chalk.default.yellow.bold(key)} : null`);
126136
- } else if (Array.isArray(data[key])) {
126558
+ printedScalar = true;
126559
+ } else if (Array.isArray(value)) {
126560
+ if (printedScalar) console.log("");
126137
126561
  console.log(`${import_chalk.default.yellow.bold.underline(key)}`);
126138
- if (typeof data[key][0] === "object") {
126139
- drawTable(data[key]);
126562
+ if (typeof value[0] === "object") {
126563
+ drawTable(value);
126140
126564
  } else {
126141
- drawJSON(data[key]);
126142
- }
126143
- } else if (typeof data[key] === "object") {
126144
- if (data[key]?.constructor?.name === "BigNumber") {
126145
- console.log(`${import_chalk.default.yellow.bold(key)} : ${data[key]}`);
126565
+ drawJSON(value);
126566
+ }
126567
+ printedScalar = false;
126568
+ } else if (typeof value === "object") {
126569
+ if (printedScalar) console.log("");
126570
+ if (value?.constructor?.name === "BigNumber") {
126571
+ console.log(`${import_chalk.default.yellow.bold(key)} : ${value}`);
126572
+ printedScalar = true;
126146
126573
  } else {
126147
126574
  console.log(`${import_chalk.default.yellow.bold.underline(key)}`);
126148
- const tableRow = toJsonObject(data[key]) ?? {};
126575
+ const tableRow = toJsonObject(value) ?? {};
126149
126576
  drawTable([tableRow]);
126577
+ printedScalar = false;
126150
126578
  }
126151
126579
  } else {
126152
- console.log(`${import_chalk.default.yellow.bold(key)} : ${data[key]}`);
126580
+ console.log(`${import_chalk.default.yellow.bold(key)} : ${value}`);
126581
+ printedScalar = true;
126153
126582
  }
126154
126583
  }
126155
126584
  };
126585
+ var MAX_COL_WIDTH = 40;
126586
+ var formatCellValue = (value) => {
126587
+ if (value == null) return "-";
126588
+ if (Array.isArray(value)) {
126589
+ if (value.length === 0) return "[]";
126590
+ return `[${value.length} items]`;
126591
+ }
126592
+ if (typeof value === "object") {
126593
+ if (value?.constructor?.name === "BigNumber") return String(value);
126594
+ const keys = Object.keys(value);
126595
+ if (keys.length === 0) return "{}";
126596
+ return `{${keys.length} keys}`;
126597
+ }
126598
+ const str = String(value);
126599
+ if (str.length > MAX_COL_WIDTH) {
126600
+ return str.slice(0, MAX_COL_WIDTH - 1) + "\u2026";
126601
+ }
126602
+ return str;
126603
+ };
126156
126604
  var drawTable = (data) => {
126157
126605
  if (data.length == 0) {
126158
126606
  console.log("[]");
@@ -126160,19 +126608,55 @@ var drawTable = (data) => {
126160
126608
  }
126161
126609
  const rows = data.map((item) => toJsonObject(item) ?? {});
126162
126610
  const obj = rows.reduce((res, item) => ({ ...res, ...item }), {});
126163
- const keys = Object.keys(obj);
126164
- if (keys.length === 0) {
126611
+ const allKeys = Object.keys(obj);
126612
+ if (allKeys.length === 0) {
126165
126613
  drawJSON(data);
126166
126614
  return;
126167
126615
  }
126168
- const def = keys.reduce((result, key) => {
126616
+ const maxColumns = 6;
126617
+ if (allKeys.length > maxColumns) {
126618
+ const rowEntries = rows.map((row) => {
126619
+ const entries = [];
126620
+ for (const key of Object.keys(row)) {
126621
+ const value = row[key];
126622
+ if (typeof value === "function") continue;
126623
+ if (value == null) continue;
126624
+ if (value?.constructor?.name === "BigNumber") {
126625
+ entries.push([key, String(value)]);
126626
+ continue;
126627
+ }
126628
+ if (typeof value === "object") continue;
126629
+ if (typeof value === "string" && value.trim() === "") continue;
126630
+ entries.push([key, String(value)]);
126631
+ }
126632
+ return entries;
126633
+ });
126634
+ const flatEntries = rowEntries.flat();
126635
+ if (flatEntries.length === 0) {
126636
+ drawJSON(data);
126637
+ return;
126638
+ }
126639
+ const maxKeyLen = Math.max(...flatEntries.map(([key]) => key.length));
126640
+ const separatorLen = Math.min(maxKeyLen + 2 + MAX_COL_WIDTH, process.stdout.columns || 80);
126641
+ rowEntries.forEach((entries, idx) => {
126642
+ if (idx > 0) console.log(import_chalk.default.cyan("\u2500".repeat(separatorLen)));
126643
+ for (const [key, value] of entries) {
126644
+ const paddedKey = key.padEnd(maxKeyLen);
126645
+ console.log(`${import_chalk.default.yellow.bold(paddedKey)} ${value}`);
126646
+ }
126647
+ });
126648
+ return;
126649
+ }
126650
+ const columns = allKeys;
126651
+ const def = allKeys.reduce((result, key) => {
126169
126652
  result[key] = "-";
126170
126653
  return result;
126171
126654
  }, {});
126172
126655
  const normalizedData = rows.map((item) => ({ ...def, ...item }));
126173
- const columns = Object.keys(normalizedData[0]);
126174
126656
  const table = new import_cli_table3.default({
126175
126657
  head: columns.map((c) => import_chalk.default.cyan.italic.bold(c)),
126658
+ colWidths: columns.map(() => null),
126659
+ wordWrap: false,
126176
126660
  chars: {
126177
126661
  top: " ",
126178
126662
  "top-mid": " ",
@@ -126194,15 +126678,7 @@ var drawTable = (data) => {
126194
126678
  normalizedData.forEach((row) => {
126195
126679
  const rowValues = [];
126196
126680
  for (const key of columns) {
126197
- if (row[key] == null) {
126198
- rowValues.push("-");
126199
- } else if (Array.isArray(row[key])) {
126200
- rowValues.push(JSON.stringify(row[key]));
126201
- } else if (typeof row[key] === "object") {
126202
- rowValues.push(JSON.stringify(row[key]));
126203
- } else {
126204
- rowValues.push(String(row[key]));
126205
- }
126681
+ rowValues.push(formatCellValue(row[key]));
126206
126682
  }
126207
126683
  table.push(rowValues);
126208
126684
  });
@@ -126330,7 +126806,7 @@ var commandDescriptions = {
126330
126806
  locale: `The locale command allows you to customize your app based on your users' location.`,
126331
126807
  sites: `The sites command allows you to view, create and manage your Appwrite Sites.`,
126332
126808
  storage: `The storage command allows you to manage your project files.`,
126333
- teams: `The teams command allows you to group users of your project to enable them to share read and write access to your project resources.`,
126809
+ teams: `The teams command allows you to group users of your project to enable them to share read and write access to your project resources. Requires a linked project. To manage console-level teams, use the 'organizations' command instead.`,
126334
126810
  update: `The update command allows you to update the ${SDK_TITLE} CLI to the latest version.`,
126335
126811
  users: `The users command allows you to manage your project users.`,
126336
126812
  projects: `The projects command allows you to manage your projects, add platforms, manage API keys, Dev Keys etc.`,
@@ -126672,12 +127148,16 @@ var questionsInitProject = [
126672
127148
  choices: async () => {
126673
127149
  const client2 = await sdkForConsole(true);
126674
127150
  const { teams: teams2 } = isCloud() ? await paginate(
126675
- async (opts = {}) => (await getOrganizationsService(opts.sdk)).list(),
127151
+ async (args) => (await getOrganizationsService(args.sdk)).list({
127152
+ queries: args.queries
127153
+ }),
126676
127154
  { sdk: client2 },
126677
127155
  100,
126678
127156
  "teams"
126679
127157
  ) : await paginate(
126680
- async (opts = {}) => (await getTeamsService(opts.sdk)).list(),
127158
+ async (args) => (await getTeamsService(args.sdk)).list({
127159
+ queries: args.queries
127160
+ }),
126681
127161
  { parseOutput: false, sdk: client2 },
126682
127162
  100,
126683
127163
  "teams"
@@ -126702,14 +127182,14 @@ var questionsInitProject = [
126702
127182
  name: "project",
126703
127183
  message: "What would you like to name your project?",
126704
127184
  default: "My Awesome Project",
126705
- when: (answer) => answer.start !== "existing"
127185
+ when: (answer) => whenOverride(answer) && answer.start !== "existing"
126706
127186
  },
126707
127187
  {
126708
127188
  type: "input",
126709
127189
  name: "id",
126710
127190
  message: "What ID would you like to have for your project?",
126711
127191
  default: "unique()",
126712
- when: (answer) => answer.start !== "existing"
127192
+ when: (answer) => whenOverride(answer) && answer.start !== "existing"
126713
127193
  },
126714
127194
  {
126715
127195
  type: "search-list",
@@ -126725,7 +127205,7 @@ var questionsInitProject = [
126725
127205
  JSON.stringify({ method: "orderDesc", attribute: "$id" })
126726
127206
  ];
126727
127207
  const { projects: projects2 } = await paginate(
126728
- async () => (await getProjectsService()).list(queries),
127208
+ async (args) => (await getProjectsService()).list(args.queries),
126729
127209
  { parseOutput: false },
126730
127210
  100,
126731
127211
  "projects",
@@ -126812,7 +127292,7 @@ var questionsPullFunctions = [
126812
127292
  validate: (value) => validateRequired("function", value),
126813
127293
  choices: async () => {
126814
127294
  const { functions: functions2 } = await paginate(
126815
- async () => (await getFunctionsService()).list(),
127295
+ async (args) => (await getFunctionsService()).list(args.queries),
126816
127296
  { parseOutput: false },
126817
127297
  100,
126818
127298
  "functions"
@@ -126851,7 +127331,7 @@ var questionsPullSites = [
126851
127331
  validate: (value) => validateRequired("site", value),
126852
127332
  choices: async () => {
126853
127333
  const { sites: sites2 } = await paginate(
126854
- async () => (await getSitesService()).list(),
127334
+ async (args) => (await getSitesService()).list(args.queries),
126855
127335
  { parseOutput: false },
126856
127336
  100,
126857
127337
  "sites"
@@ -128259,48 +128739,48 @@ import os6 from "os";
128259
128739
  import path2 from "path";
128260
128740
 
128261
128741
  // node_modules/tar/dist/esm/index.min.js
128262
- import Ur from "events";
128742
+ import Kr from "events";
128263
128743
  import I from "fs";
128264
128744
  import { EventEmitter as Ti } from "node:events";
128265
128745
  import Ns from "node:stream";
128266
- import { StringDecoder as Dr } from "node:string_decoder";
128746
+ import { StringDecoder as Mr } from "node:string_decoder";
128267
128747
  import nr from "node:path";
128268
128748
  import Vt from "node:fs";
128269
- import { dirname as Rn, parse as bn } from "path";
128270
- import { EventEmitter as En } from "events";
128749
+ import { dirname as xn, parse as Ln } from "path";
128750
+ import { EventEmitter as _n } from "events";
128271
128751
  import Mi from "assert";
128272
128752
  import { Buffer as gt } from "buffer";
128273
128753
  import * as ks from "zlib";
128274
- import Zr from "zlib";
128754
+ import qr from "zlib";
128275
128755
  import { posix as Zt } from "node:path";
128276
- import { basename as fn } from "node:path";
128756
+ import { basename as wn } from "node:path";
128277
128757
  import fi from "fs";
128278
128758
  import $ from "fs";
128279
128759
  import $s from "path";
128280
- import { win32 as Tn } from "node:path";
128760
+ import { win32 as In } from "node:path";
128281
128761
  import sr from "path";
128282
- import xr from "node:fs";
128283
- import eo from "node:assert";
128284
- import { randomBytes as Tr } from "node:crypto";
128762
+ import Cr from "node:fs";
128763
+ import so from "node:assert";
128764
+ import { randomBytes as Ir } from "node:crypto";
128285
128765
  import u from "node:fs";
128286
128766
  import R from "node:path";
128287
- import ar from "fs";
128767
+ import cr from "fs";
128288
128768
  import mi from "node:fs";
128289
128769
  import Ee from "node:path";
128290
128770
  import k from "node:fs";
128291
- import Xn from "node:fs/promises";
128771
+ import jn from "node:fs/promises";
128292
128772
  import pi from "node:path";
128293
- import { join as pr } from "node:path";
128773
+ import { join as br } from "node:path";
128294
128774
  import v from "node:fs";
128295
- import Lr from "node:path";
128296
- var Nr = Object.defineProperty;
128297
- var Ar = (s3, t) => {
128298
- for (var e in t) Nr(s3, e, { get: t[e], enumerable: true });
128775
+ import Fr from "node:path";
128776
+ var kr = Object.defineProperty;
128777
+ var vr = (s3, t) => {
128778
+ for (var e in t) kr(s3, e, { get: t[e], enumerable: true });
128299
128779
  };
128300
128780
  var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
128301
- var Ir = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof Ns || Cr(s3) || Fr(s3));
128302
- var Cr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.pipe == "function" && s3.pipe !== Ns.Writable.prototype.pipe;
128303
- var Fr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.write == "function" && typeof s3.end == "function";
128781
+ var Br = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof Ns || Pr(s3) || zr(s3));
128782
+ var Pr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.pipe == "function" && s3.pipe !== Ns.Writable.prototype.pipe;
128783
+ var zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.write == "function" && typeof s3.end == "function";
128304
128784
  var q = /* @__PURE__ */ Symbol("EOF");
128305
128785
  var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
128306
128786
  var rt = /* @__PURE__ */ Symbol("emittedEnd");
@@ -128333,10 +128813,10 @@ var Jt = /* @__PURE__ */ Symbol("signal");
128333
128813
  var yt = /* @__PURE__ */ Symbol("dataListeners");
128334
128814
  var C = /* @__PURE__ */ Symbol("discarded");
128335
128815
  var te = (s3) => Promise.resolve().then(s3);
128336
- var kr = (s3) => s3();
128337
- var vr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
128338
- var Mr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
128339
- var Br = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
128816
+ var Ur = (s3) => s3();
128817
+ var Hr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
128818
+ var Wr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
128819
+ var Gr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
128340
128820
  var Ce = class {
128341
128821
  src;
128342
128822
  dest;
@@ -128362,8 +128842,8 @@ var Oi = class extends Ce {
128362
128842
  super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
128363
128843
  }
128364
128844
  };
128365
- var Pr = (s3) => !!s3.objectMode;
128366
- var zr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
128845
+ var Zr = (s3) => !!s3.objectMode;
128846
+ var Yr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
128367
128847
  var D = class extends Ti {
128368
128848
  [b] = false;
128369
128849
  [Qt] = false;
@@ -128389,7 +128869,7 @@ var D = class extends Ti {
128389
128869
  constructor(...t) {
128390
128870
  let e = t[0] || {};
128391
128871
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
128392
- 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 Dr(this[z2]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
128872
+ Zr(e) ? (this[L] = true, this[z2] = null) : Yr(e) ? (this[z2] = e.encoding, this[L] = false) : (this[L] = false, this[z2] = null), this[Z] = !!e.async, this[Mt] = this[z2] ? new Mr(this[z2]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
128393
128873
  let { signal: i } = e;
128394
128874
  i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
128395
128875
  }
@@ -128430,10 +128910,10 @@ var D = class extends Ti {
128430
128910
  if (this[q]) throw new Error("write after end");
128431
128911
  if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
128432
128912
  typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
128433
- let r = this[Z] ? te : kr;
128913
+ let r = this[Z] ? te : Ur;
128434
128914
  if (!this[L] && !Buffer.isBuffer(t)) {
128435
- if (Br(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
128436
- else if (Mr(t)) t = Buffer.from(t);
128915
+ if (Gr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
128916
+ else if (Wr(t)) t = Buffer.from(t);
128437
128917
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
128438
128918
  }
128439
128919
  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]);
@@ -128506,7 +128986,7 @@ var D = class extends Ti {
128506
128986
  let i = super.on(t, e);
128507
128987
  if (t === "data") this[C] = false, this[yt]++, !this[A].length && !this[b] && this[Bt]();
128508
128988
  else if (t === "readable" && this[g] !== 0) super.emit("readable");
128509
- else if (vr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
128989
+ else if (Hr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
128510
128990
  else if (t === "error" && this[jt]) {
128511
128991
  let r = e;
128512
128992
  this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
@@ -128633,10 +129113,10 @@ var D = class extends Ti {
128633
129113
  return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
128634
129114
  }
128635
129115
  static get isStream() {
128636
- return Ir;
129116
+ return Br;
128637
129117
  }
128638
129118
  };
128639
- var Hr = I.writev;
129119
+ var Vr = I.writev;
128640
129120
  var ot = /* @__PURE__ */ Symbol("_autoClose");
128641
129121
  var H = /* @__PURE__ */ Symbol("_close");
128642
129122
  var ee = /* @__PURE__ */ Symbol("_ended");
@@ -128769,7 +129249,7 @@ var Me = class extends _t {
128769
129249
  }
128770
129250
  }
128771
129251
  };
128772
- var tt = class extends Ur {
129252
+ var tt = class extends Kr {
128773
129253
  readable = false;
128774
129254
  writable = true;
128775
129255
  [bt] = false;
@@ -128829,7 +129309,7 @@ var tt = class extends Ur {
128829
129309
  else if (this[Y].length === 1) this[ke](this[Y].pop());
128830
129310
  else {
128831
129311
  let t = this[Y];
128832
- this[Y] = [], Hr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
129312
+ this[Y] = [], Vr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
128833
129313
  }
128834
129314
  }
128835
129315
  [H]() {
@@ -128869,21 +129349,21 @@ var Wt = class extends tt {
128869
129349
  }
128870
129350
  }
128871
129351
  };
128872
- 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"]]);
129352
+ var $r = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
128873
129353
  var As = (s3) => !!s3.sync && !!s3.file;
128874
129354
  var Ds = (s3) => !s3.sync && !!s3.file;
128875
129355
  var Is = (s3) => !!s3.sync && !s3.file;
128876
129356
  var Cs = (s3) => !s3.sync && !s3.file;
128877
129357
  var Fs = (s3) => !!s3.file;
128878
- var Gr = (s3) => {
128879
- let t = Wr.get(s3);
129358
+ var Xr = (s3) => {
129359
+ let t = $r.get(s3);
128880
129360
  return t || s3;
128881
129361
  };
128882
129362
  var re = (s3 = {}) => {
128883
129363
  if (!s3) return {};
128884
129364
  let t = {};
128885
129365
  for (let [e, i] of Object.entries(s3)) {
128886
- let r = Gr(e);
129366
+ let r = Xr(e);
128887
129367
  t[r] = i;
128888
129368
  }
128889
129369
  return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
@@ -128906,13 +129386,13 @@ var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
128906
129386
  }
128907
129387
  throw new Error("impossible options??");
128908
129388
  }, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
128909
- var Yr = Zr.constants || { ZLIB_VERNUM: 4736 };
128910
- 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));
128911
- var Kr = gt.concat;
129389
+ var jr = qr.constants || { ZLIB_VERNUM: 4736 };
129390
+ var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, jr));
129391
+ var Qr = gt.concat;
128912
129392
  var vs = Object.getOwnPropertyDescriptor(gt, "concat");
128913
- var Vr = (s3) => s3;
129393
+ var Jr = (s3) => s3;
128914
129394
  var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
128915
- gt.concat = s3 ? Vr : Kr;
129395
+ gt.concat = s3 ? Jr : Qr;
128916
129396
  } : (s3) => {
128917
129397
  };
128918
129398
  var Ot = /* @__PURE__ */ Symbol("_superWrite");
@@ -129073,15 +129553,15 @@ var Ye = class extends Ge {
129073
129553
  }
129074
129554
  };
129075
129555
  var Ms = (s3, t) => {
129076
- if (Number.isSafeInteger(s3)) s3 < 0 ? qr(s3, t) : Xr(s3, t);
129556
+ if (Number.isSafeInteger(s3)) s3 < 0 ? sn(s3, t) : en(s3, t);
129077
129557
  else throw Error("cannot encode number outside of javascript safe integer range");
129078
129558
  return t;
129079
129559
  };
129080
- var Xr = (s3, t) => {
129560
+ var en = (s3, t) => {
129081
129561
  t[0] = 128;
129082
129562
  for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
129083
129563
  };
129084
- var qr = (s3, t) => {
129564
+ var sn = (s3, t) => {
129085
129565
  t[0] = 255;
129086
129566
  var e = false;
129087
129567
  s3 = s3 * -1;
@@ -129091,19 +129571,19 @@ var qr = (s3, t) => {
129091
129571
  }
129092
129572
  };
129093
129573
  var Bs = (s3) => {
129094
- let t = s3[0], e = t === 128 ? Qr(s3.subarray(1, s3.length)) : t === 255 ? jr(s3) : null;
129574
+ let t = s3[0], e = t === 128 ? nn(s3.subarray(1, s3.length)) : t === 255 ? rn(s3) : null;
129095
129575
  if (e === null) throw Error("invalid base256 encoding");
129096
129576
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
129097
129577
  return e;
129098
129578
  };
129099
- var jr = (s3) => {
129579
+ var rn = (s3) => {
129100
129580
  for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
129101
129581
  var n = Number(s3[r]), o;
129102
129582
  i ? o = Ps(n) : n === 0 ? o = n : (i = true, o = zs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
129103
129583
  }
129104
129584
  return e;
129105
129585
  };
129106
- var Qr = (s3) => {
129586
+ var nn = (s3) => {
129107
129587
  for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
129108
129588
  var r = Number(s3[i]);
129109
129589
  r !== 0 && (e += r * Math.pow(256, t - i - 1));
@@ -129113,9 +129593,9 @@ var Qr = (s3) => {
129113
129593
  var Ps = (s3) => (255 ^ s3) & 255;
129114
129594
  var zs = (s3) => (255 ^ s3) + 1 & 255;
129115
129595
  var Bi = {};
129116
- Ar(Bi, { code: () => Ke, isCode: () => oe, isName: () => tn, name: () => he });
129596
+ vr(Bi, { code: () => Ke, isCode: () => oe, isName: () => hn, name: () => he });
129117
129597
  var oe = (s3) => he.has(s3);
129118
- var tn = (s3) => Ke.has(s3);
129598
+ var hn = (s3) => Ke.has(s3);
129119
129599
  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"]]);
129120
129600
  var Ke = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
129121
129601
  var F = class {
@@ -129164,7 +129644,7 @@ var F = class {
129164
129644
  }
129165
129645
  encode(t, e = 0) {
129166
129646
  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");
129167
- let i = this.ctime || this.atime ? 130 : 155, r = en(this.path || "", i), n = r[0], o = r[1];
129647
+ let i = this.ctime || this.atime ? 130 : 155, r = an(this.path || "", i), n = r[0], o = r[1];
129168
129648
  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);
129169
129649
  let h = 256;
129170
129650
  for (let a = e; a < e + 148; a++) h += t[a];
@@ -129184,7 +129664,7 @@ var F = class {
129184
129664
  else throw new TypeError("invalid entry type: " + t);
129185
129665
  }
129186
129666
  };
129187
- var en = (s3, t) => {
129667
+ var an = (s3, t) => {
129188
129668
  let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
129189
129669
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
129190
129670
  else {
@@ -129197,19 +129677,19 @@ var en = (s3, t) => {
129197
129677
  return n;
129198
129678
  };
129199
129679
  var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
129200
- var Pi = (s3, t, e) => sn(at(s3, t, e));
129201
- var sn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
129202
- var at = (s3, t, e) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e)) : nn(s3, t, e);
129203
- var rn = (s3) => isNaN(s3) ? void 0 : s3;
129204
- var nn = (s3, t, e) => rn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
129205
- var on = { 12: 8589934591, 8: 2097151 };
129206
- 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);
129207
- var hn = (s3, t, e, i) => s3.write(an(i, e), t, e, "ascii");
129208
- var an = (s3, t) => ln(Math.floor(s3).toString(8), t);
129209
- var ln = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
129680
+ var Pi = (s3, t, e) => ln(at(s3, t, e));
129681
+ var ln = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
129682
+ var at = (s3, t, e) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e)) : fn(s3, t, e);
129683
+ var cn = (s3) => isNaN(s3) ? void 0 : s3;
129684
+ var fn = (s3, t, e) => cn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
129685
+ var dn = { 12: 8589934591, 8: 2097151 };
129686
+ var lt = (s3, t, e, i) => i === void 0 ? false : i > dn[e] || i < 0 ? (Ms(i, s3.subarray(t, t + e)), true) : (un(s3, t, e, i), false);
129687
+ var un = (s3, t, e, i) => s3.write(mn(i, e), t, e, "ascii");
129688
+ var mn = (s3, t) => pn(Math.floor(s3).toString(8), t);
129689
+ var pn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
129210
129690
  var zi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
129211
- var cn = new Array(156).join("\0");
129212
- 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);
129691
+ var En = new Array(156).join("\0");
129692
+ var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + En, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
129213
129693
  var ct = class s {
129214
129694
  atime;
129215
129695
  mtime;
@@ -129236,7 +129716,7 @@ var ct = class s {
129236
129716
  if (t === "") return Buffer.allocUnsafe(0);
129237
129717
  let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
129238
129718
  for (let n = 0; n < 512; n++) r[n] = 0;
129239
- new F({ path: ("PaxHeader/" + fn(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
129719
+ new F({ path: ("PaxHeader/" + wn(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
129240
129720
  for (let n = e + 512; n < r.length; n++) r[n] = 0;
129241
129721
  return r;
129242
129722
  }
@@ -129250,13 +129730,13 @@ var ct = class s {
129250
129730
  return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
129251
129731
  }
129252
129732
  static parse(t, e, i = false) {
129253
- return new s(dn(un(t), e), i);
129733
+ return new s(Sn(yn(t), e), i);
129254
129734
  }
129255
129735
  };
129256
- var dn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
129257
- var un = (s3) => s3.replace(/\n$/, "").split(`
129258
- `).reduce(mn, /* @__PURE__ */ Object.create(null));
129259
- var mn = (s3, t) => {
129736
+ var Sn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
129737
+ var yn = (s3) => s3.replace(/\n$/, "").split(`
129738
+ `).reduce(Rn, /* @__PURE__ */ Object.create(null));
129739
+ var Rn = (s3, t) => {
129260
129740
  let e = parseInt(t, 10);
129261
129741
  if (e !== Buffer.byteLength(t) + 1) return s3;
129262
129742
  t = t.slice((e + " ").length);
@@ -129265,8 +129745,8 @@ var mn = (s3, t) => {
129265
129745
  let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
129266
129746
  return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
129267
129747
  };
129268
- var pn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
129269
- var f = pn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
129748
+ var bn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
129749
+ var f = bn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
129270
129750
  var Yt = class extends D {
129271
129751
  extended;
129272
129752
  globalExtended;
@@ -129334,10 +129814,10 @@ var Yt = class extends D {
129334
129814
  var Lt = (s3, t, e, i = {}) => {
129335
129815
  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));
129336
129816
  };
129337
- var wn = 1024 * 1024;
129817
+ var gn = 1024 * 1024;
129338
129818
  var Zi = Buffer.from([31, 139]);
129339
129819
  var Yi = Buffer.from([40, 181, 47, 253]);
129340
- var Sn = Math.max(Zi.length, Yi.length);
129820
+ var On = Math.max(Zi.length, Yi.length);
129341
129821
  var B = /* @__PURE__ */ Symbol("state");
129342
129822
  var Nt = /* @__PURE__ */ Symbol("writeEntry");
129343
129823
  var et = /* @__PURE__ */ Symbol("readEntry");
@@ -129368,8 +129848,8 @@ var Dt = /* @__PURE__ */ Symbol("sawValidEntry");
129368
129848
  var je = /* @__PURE__ */ Symbol("sawNullBlock");
129369
129849
  var Qe = /* @__PURE__ */ Symbol("sawEOF");
129370
129850
  var Zs = /* @__PURE__ */ Symbol("closeStream");
129371
- var yn = () => true;
129372
- var st = class extends En {
129851
+ var Tn = () => true;
129852
+ var st = class extends _n {
129373
129853
  file;
129374
129854
  strict;
129375
129855
  maxMetaEntrySize;
@@ -129400,7 +129880,7 @@ var st = class extends En {
129400
129880
  (this[B] === "begin" || this[Dt] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
129401
129881
  }), t.ondone ? this.on(qe, t.ondone) : this.on(qe, () => {
129402
129882
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
129403
- }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || wn, this.filter = typeof t.filter == "function" ? t.filter : yn;
129883
+ }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || gn, this.filter = typeof t.filter == "function" ? t.filter : Tn;
129404
129884
  let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
129405
129885
  this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
129406
129886
  let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
@@ -129500,7 +129980,7 @@ var st = class extends En {
129500
129980
  write(t, e, i) {
129501
129981
  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;
129502
129982
  if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
129503
- if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < Sn) return this[p] = t, i?.(), true;
129983
+ if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < On) return this[p] = t, i?.(), true;
129504
129984
  for (let a = 0; this[y] === void 0 && a < Zi.length; a++) t[a] !== Zi[a] && (this[y] = false);
129505
129985
  let o = false;
129506
129986
  if (this[y] === false && this.zstd !== false) {
@@ -129590,7 +130070,7 @@ var mt = (s3) => {
129590
130070
  for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
129591
130071
  return e === -1 ? s3 : s3.slice(0, e);
129592
130072
  };
129593
- var _n = (s3) => {
130073
+ var Nn = (s3) => {
129594
130074
  let t = s3.onReadEntry;
129595
130075
  s3.onReadEntry = t ? (e) => {
129596
130076
  t(e), e.resume();
@@ -129598,17 +130078,17 @@ var _n = (s3) => {
129598
130078
  };
129599
130079
  var Ki = (s3, t) => {
129600
130080
  let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
129601
- let h = o || bn(n).root || ".", a;
130081
+ let h = o || Ln(n).root || ".", a;
129602
130082
  if (n === h) a = false;
129603
130083
  else {
129604
130084
  let l = e.get(n);
129605
- a = l !== void 0 ? l : r(Rn(n), h);
130085
+ a = l !== void 0 ? l : r(xn(n), h);
129606
130086
  }
129607
130087
  return e.set(n, a), a;
129608
130088
  };
129609
130089
  s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
129610
130090
  };
129611
- var gn = (s3) => {
130091
+ var An = (s3) => {
129612
130092
  let t = new st(s3), e = s3.file, i;
129613
130093
  try {
129614
130094
  i = Vt.openSync(e, "r");
@@ -129632,7 +130112,7 @@ var gn = (s3) => {
129632
130112
  }
129633
130113
  }
129634
130114
  };
129635
- var On = (s3, t) => {
130115
+ var Dn = (s3, t) => {
129636
130116
  let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
129637
130117
  return new Promise((o, h) => {
129638
130118
  e.on("error", h), e.on("end", o), Vt.stat(r, (a, l) => {
@@ -129644,14 +130124,14 @@ var On = (s3, t) => {
129644
130124
  });
129645
130125
  });
129646
130126
  };
129647
- var It = K(gn, On, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
129648
- t?.length && Ki(s3, t), s3.noResume || _n(s3);
130127
+ var It = K(An, Dn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
130128
+ t?.length && Ki(s3, t), s3.noResume || Nn(s3);
129649
130129
  });
129650
130130
  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);
129651
- var { isAbsolute: xn, parse: Ys } = Tn;
130131
+ var { isAbsolute: Cn, parse: Ys } = In;
129652
130132
  var ce = (s3) => {
129653
130133
  let t = "", e = Ys(s3);
129654
- for (; xn(s3) || e.root; ) {
130134
+ for (; Cn(s3) || e.root; ) {
129655
130135
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
129656
130136
  s3 = s3.slice(i.length), t += i, e = Ys(s3);
129657
130137
  }
@@ -129659,12 +130139,12 @@ var ce = (s3) => {
129659
130139
  };
129660
130140
  var Je = ["|", "<", ">", "?", ":"];
129661
130141
  var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
129662
- var Ln = new Map(Je.map((s3, t) => [s3, $i[t]]));
129663
- var Nn = new Map($i.map((s3, t) => [s3, Je[t]]));
129664
- var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Ln.get(e)), s3);
129665
- var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(Nn.get(e)), s3);
130142
+ var Fn = new Map(Je.map((s3, t) => [s3, $i[t]]));
130143
+ var kn = new Map($i.map((s3, t) => [s3, Je[t]]));
130144
+ var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Fn.get(e)), s3);
130145
+ var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(kn.get(e)), s3);
129666
130146
  var Js = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
129667
- var An = 16 * 1024 * 1024;
130147
+ var vn = 16 * 1024 * 1024;
129668
130148
  var Xs = /* @__PURE__ */ Symbol("process");
129669
130149
  var qs = /* @__PURE__ */ Symbol("file");
129670
130150
  var js = /* @__PURE__ */ Symbol("directory");
@@ -129716,7 +130196,7 @@ var de = class extends D {
129716
130196
  #t = false;
129717
130197
  constructor(t, e = {}) {
129718
130198
  let i = re(e);
129719
- super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || An, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
130199
+ super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || vn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
129720
130200
  let r = false;
129721
130201
  if (!this.preservePaths) {
129722
130202
  let [o, h] = ce(this.path);
@@ -129739,7 +130219,7 @@ var de = class extends D {
129739
130219
  });
129740
130220
  }
129741
130221
  [ei](t) {
129742
- this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Dn(t), this.emit("stat", t), this[Xs]();
130222
+ this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Mn(t), this.emit("stat", t), this[Xs]();
129743
130223
  }
129744
130224
  [Xs]() {
129745
130225
  switch (this.type) {
@@ -129945,7 +130425,7 @@ var ri = class extends D {
129945
130425
  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;
129946
130426
  }
129947
130427
  };
129948
- var Dn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
130428
+ var Mn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
129949
130429
  var ni = class s2 {
129950
130430
  tail;
129951
130431
  head;
@@ -129977,11 +130457,11 @@ var ni = class s2 {
129977
130457
  t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
129978
130458
  }
129979
130459
  push(...t) {
129980
- for (let e = 0, i = t.length; e < i; e++) Cn(this, t[e]);
130460
+ for (let e = 0, i = t.length; e < i; e++) Pn(this, t[e]);
129981
130461
  return this.length;
129982
130462
  }
129983
130463
  unshift(...t) {
129984
- for (var e = 0, i = t.length; e < i; e++) Fn(this, t[e]);
130464
+ for (var e = 0, i = t.length; e < i; e++) zn(this, t[e]);
129985
130465
  return this.length;
129986
130466
  }
129987
130467
  pop() {
@@ -130077,7 +130557,7 @@ var ni = class s2 {
130077
130557
  let n = [];
130078
130558
  for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
130079
130559
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
130080
- for (let o of i) r = In(this, r, o);
130560
+ for (let o of i) r = Bn(this, r, o);
130081
130561
  return n;
130082
130562
  }
130083
130563
  reverse() {
@@ -130089,14 +130569,14 @@ var ni = class s2 {
130089
130569
  return this.head = e, this.tail = t, this;
130090
130570
  }
130091
130571
  };
130092
- function In(s3, t, e) {
130572
+ function Bn(s3, t, e) {
130093
130573
  let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
130094
130574
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
130095
130575
  }
130096
- function Cn(s3, t) {
130576
+ function Pn(s3, t) {
130097
130577
  s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
130098
130578
  }
130099
- function Fn(s3, t) {
130579
+ function zn(s3, t) {
130100
130580
  s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
130101
130581
  }
130102
130582
  var ue = class {
@@ -130325,11 +130805,11 @@ var kt = class extends Et {
130325
130805
  });
130326
130806
  }
130327
130807
  };
130328
- var kn = (s3, t) => {
130808
+ var Un = (s3, t) => {
130329
130809
  let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
130330
130810
  e.pipe(i), or(e, t);
130331
130811
  };
130332
- var vn = (s3, t) => {
130812
+ var Hn = (s3, t) => {
130333
130813
  let e = new Et(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
130334
130814
  e.pipe(i);
130335
130815
  let r = new Promise((n, o) => {
@@ -130348,25 +130828,26 @@ var hr = async (s3, t) => {
130348
130828
  } }) : s3.add(e);
130349
130829
  s3.end();
130350
130830
  };
130351
- var Mn = (s3, t) => {
130831
+ var Wn = (s3, t) => {
130352
130832
  let e = new kt(s3);
130353
130833
  return or(e, t), e;
130354
130834
  };
130355
- var Bn = (s3, t) => {
130835
+ var Gn = (s3, t) => {
130356
130836
  let e = new Et(s3);
130357
130837
  return hr(e, t).catch((i) => e.emit("error", i)), e;
130358
130838
  };
130359
- var Pn = K(kn, vn, Mn, Bn, (s3, t) => {
130839
+ var Zn = K(Un, Hn, Wn, Gn, (s3, t) => {
130360
130840
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
130361
130841
  });
130362
- var zn = process.env.__FAKE_PLATFORM__ || process.platform;
130363
- var Un = zn === "win32";
130364
- var { O_CREAT: Hn, O_TRUNC: Wn, O_WRONLY: Gn } = ar.constants;
130365
- var lr = Number(process.env.__FAKE_FS_O_FILENAME__) || ar.constants.UV_FS_O_FILEMAP || 0;
130366
- var Zn = Un && !!lr;
130367
- var Yn = 512 * 1024;
130368
- var Kn = lr | Wn | Hn | Gn;
130369
- var cs = Zn ? (s3) => s3 < Yn ? Kn : "w" : () => "w";
130842
+ var Yn = process.env.__FAKE_PLATFORM__ || process.platform;
130843
+ var fr = Yn === "win32";
130844
+ var { O_CREAT: dr, O_NOFOLLOW: ar, O_TRUNC: ur, O_WRONLY: mr } = cr.constants;
130845
+ var pr = Number(process.env.__FAKE_FS_O_FILENAME__) || cr.constants.UV_FS_O_FILEMAP || 0;
130846
+ var Kn = fr && !!pr;
130847
+ var Vn = 512 * 1024;
130848
+ var $n = pr | ur | dr | mr;
130849
+ var lr = !fr && typeof ar == "number" ? ar | ur | dr | mr : null;
130850
+ var cs = lr !== null ? () => lr : Kn ? (s3) => s3 < Vn ? $n : "w" : () => "w";
130370
130851
  var fs3 = (s3, t, e) => {
130371
130852
  try {
130372
130853
  return mi.lchownSync(s3, t, e);
@@ -130379,7 +130860,7 @@ var ui = (s3, t, e, i) => {
130379
130860
  i(r && r?.code !== "ENOENT" ? r : null);
130380
130861
  });
130381
130862
  };
130382
- var Vn = (s3, t, e, i, r) => {
130863
+ var Xn = (s3, t, e, i, r) => {
130383
130864
  if (t.isDirectory()) ds(Ee.resolve(s3, t.name), e, i, (n) => {
130384
130865
  if (n) return r(n);
130385
130866
  let o = Ee.resolve(s3, t.name);
@@ -130403,10 +130884,10 @@ var ds = (s3, t, e, i) => {
130403
130884
  if (--o === 0) return ui(s3, t, e, i);
130404
130885
  }
130405
130886
  };
130406
- for (let l of n) Vn(s3, l, t, e, a);
130887
+ for (let l of n) Xn(s3, l, t, e, a);
130407
130888
  });
130408
130889
  };
130409
- var $n = (s3, t, e, i) => {
130890
+ var qn = (s3, t, e, i) => {
130410
130891
  t.isDirectory() && us(Ee.resolve(s3, t.name), e, i), fs3(Ee.resolve(s3, t.name), e, i);
130411
130892
  };
130412
130893
  var us = (s3, t, e) => {
@@ -130419,7 +130900,7 @@ var us = (s3, t, e) => {
130419
130900
  if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs3(s3, t, e);
130420
130901
  throw n;
130421
130902
  }
130422
- for (let r of i) $n(s3, r, t, e);
130903
+ for (let r of i) qn(s3, r, t, e);
130423
130904
  return fs3(s3, t, e);
130424
130905
  };
130425
130906
  var we = class extends Error {
@@ -130445,33 +130926,33 @@ var wt = class extends Error {
130445
130926
  return "SymlinkError";
130446
130927
  }
130447
130928
  };
130448
- var qn = (s3, t) => {
130929
+ var Qn = (s3, t) => {
130449
130930
  k.stat(s3, (e, i) => {
130450
130931
  (e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
130451
130932
  });
130452
130933
  };
130453
- var cr = (s3, t, e) => {
130934
+ var Er = (s3, t, e) => {
130454
130935
  s3 = f(s3);
130455
130936
  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) => {
130456
130937
  E ? e(E) : x && a ? ds(x, o, h, (xe) => S(xe)) : n ? k.chmod(s3, r, e) : e();
130457
130938
  };
130458
- if (s3 === d) return qn(s3, S);
130459
- if (l) return Xn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
130939
+ if (s3 === d) return Qn(s3, S);
130940
+ if (l) return jn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
130460
130941
  let N = f(pi.relative(d, s3)).split("/");
130461
130942
  ms(d, N, r, c, d, void 0, S);
130462
130943
  };
130463
130944
  var ms = (s3, t, e, i, r, n, o) => {
130464
130945
  if (t.length === 0) return o(null, n);
130465
130946
  let h = t.shift(), a = f(pi.resolve(s3 + "/" + h));
130466
- k.mkdir(a, e, fr(a, t, e, i, r, n, o));
130947
+ k.mkdir(a, e, wr(a, t, e, i, r, n, o));
130467
130948
  };
130468
- var fr = (s3, t, e, i, r, n, o) => (h) => {
130949
+ var wr = (s3, t, e, i, r, n, o) => (h) => {
130469
130950
  h ? k.lstat(s3, (a, l) => {
130470
130951
  if (a) a.path = a.path && f(a.path), o(a);
130471
130952
  else if (l.isDirectory()) ms(s3, t, e, i, r, n, o);
130472
130953
  else if (i) k.unlink(s3, (c) => {
130473
130954
  if (c) return o(c);
130474
- k.mkdir(s3, e, fr(s3, t, e, i, r, n, o));
130955
+ k.mkdir(s3, e, wr(s3, t, e, i, r, n, o));
130475
130956
  });
130476
130957
  else {
130477
130958
  if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
@@ -130479,7 +130960,7 @@ var fr = (s3, t, e, i, r, n, o) => (h) => {
130479
130960
  }
130480
130961
  }) : (n = n || s3, ms(s3, t, e, i, r, n, o));
130481
130962
  };
130482
- var jn = (s3) => {
130963
+ var Jn = (s3) => {
130483
130964
  let t = false, e;
130484
130965
  try {
130485
130966
  t = k.statSync(s3).isDirectory();
@@ -130489,12 +130970,12 @@ var jn = (s3) => {
130489
130970
  if (!t) throw new we(s3, e ?? "ENOTDIR");
130490
130971
  }
130491
130972
  };
130492
- var dr = (s3, t) => {
130973
+ var Sr = (s3, t) => {
130493
130974
  s3 = f(s3);
130494
130975
  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) => {
130495
130976
  E && h && us(E, n, o), r && k.chmodSync(s3, i);
130496
130977
  };
130497
- if (s3 === c) return jn(c), d();
130978
+ if (s3 === c) return Jn(c), d();
130498
130979
  if (a) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
130499
130980
  let T = f(pi.relative(c, s3)).split("/"), N;
130500
130981
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
@@ -130513,29 +130994,29 @@ var dr = (s3, t) => {
130513
130994
  return d(N);
130514
130995
  };
130515
130996
  var ps = /* @__PURE__ */ Object.create(null);
130516
- var ur = 1e4;
130997
+ var yr = 1e4;
130517
130998
  var $t = /* @__PURE__ */ new Set();
130518
- var mr = (s3) => {
130999
+ var Rr = (s3) => {
130519
131000
  $t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
130520
- let t = ps[s3], e = $t.size - ur;
130521
- if (e > ur / 10) {
131001
+ let t = ps[s3], e = $t.size - yr;
131002
+ if (e > yr / 10) {
130522
131003
  for (let i of $t) if ($t.delete(i), delete ps[i], --e <= 0) break;
130523
131004
  }
130524
131005
  return t;
130525
131006
  };
130526
- var Qn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
130527
- var Jn = Qn === "win32";
130528
- var to = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
131007
+ var to = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
131008
+ var eo = to === "win32";
131009
+ var io = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
130529
131010
  let r = e.at(-1);
130530
- return r !== void 0 && (i = pr(r, i)), e.push(i || "/"), e;
131011
+ return r !== void 0 && (i = br(r, i)), e.push(i || "/"), e;
130531
131012
  }, []);
130532
131013
  var Ei = class {
130533
131014
  #t = /* @__PURE__ */ new Map();
130534
131015
  #i = /* @__PURE__ */ new Map();
130535
131016
  #s = /* @__PURE__ */ new Set();
130536
131017
  reserve(t, e) {
130537
- t = Jn ? ["win32 parallelization disabled"] : t.map((r) => mt(pr(mr(r))));
130538
- let i = new Set(t.map((r) => to(r)).reduce((r, n) => r.concat(n)));
131018
+ t = eo ? ["win32 parallelization disabled"] : t.map((r) => mt(br(Rr(r))));
131019
+ let i = new Set(t.map((r) => io(r)).reduce((r, n) => r.concat(n)));
130539
131020
  this.#i.set(e, { dirs: i, paths: t });
130540
131021
  for (let r of t) {
130541
131022
  let n = this.#t.get(r);
@@ -130593,25 +131074,25 @@ var Ei = class {
130593
131074
  return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
130594
131075
  }
130595
131076
  };
130596
- var Er = () => process.umask();
130597
- var wr = /* @__PURE__ */ Symbol("onEntry");
131077
+ var _r = () => process.umask();
131078
+ var gr = /* @__PURE__ */ Symbol("onEntry");
130598
131079
  var ys = /* @__PURE__ */ Symbol("checkFs");
130599
- var Sr = /* @__PURE__ */ Symbol("checkFs2");
131080
+ var Or = /* @__PURE__ */ Symbol("checkFs2");
130600
131081
  var Rs = /* @__PURE__ */ Symbol("isReusable");
130601
131082
  var P = /* @__PURE__ */ Symbol("makeFs");
130602
131083
  var bs = /* @__PURE__ */ Symbol("file");
130603
131084
  var _s = /* @__PURE__ */ Symbol("directory");
130604
131085
  var Si = /* @__PURE__ */ Symbol("link");
130605
- var yr = /* @__PURE__ */ Symbol("symlink");
130606
- var Rr = /* @__PURE__ */ Symbol("hardlink");
131086
+ var Tr = /* @__PURE__ */ Symbol("symlink");
131087
+ var xr = /* @__PURE__ */ Symbol("hardlink");
130607
131088
  var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
130608
- var br = /* @__PURE__ */ Symbol("unsupported");
130609
- var _r = /* @__PURE__ */ Symbol("checkPath");
131089
+ var Lr = /* @__PURE__ */ Symbol("unsupported");
131090
+ var Nr = /* @__PURE__ */ Symbol("checkPath");
130610
131091
  var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
130611
131092
  var St = /* @__PURE__ */ Symbol("mkdir");
130612
131093
  var O = /* @__PURE__ */ Symbol("onError");
130613
131094
  var wi = /* @__PURE__ */ Symbol("pending");
130614
- var gr = /* @__PURE__ */ Symbol("pend");
131095
+ var Ar = /* @__PURE__ */ Symbol("pend");
130615
131096
  var Xt = /* @__PURE__ */ Symbol("unpend");
130616
131097
  var ws = /* @__PURE__ */ Symbol("ended");
130617
131098
  var Ss = /* @__PURE__ */ Symbol("maybeClose");
@@ -130620,23 +131101,23 @@ var Re = /* @__PURE__ */ Symbol("doChown");
130620
131101
  var be = /* @__PURE__ */ Symbol("uid");
130621
131102
  var _e = /* @__PURE__ */ Symbol("gid");
130622
131103
  var ge = /* @__PURE__ */ Symbol("checkedCwd");
130623
- var io = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
130624
- var Oe = io === "win32";
130625
- var so = 1024;
130626
- var ro = (s3, t) => {
131104
+ var ro = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
131105
+ var Oe = ro === "win32";
131106
+ var no = 1024;
131107
+ var oo = (s3, t) => {
130627
131108
  if (!Oe) return u.unlink(s3, t);
130628
- let e = s3 + ".DELETE." + Tr(16).toString("hex");
131109
+ let e = s3 + ".DELETE." + Ir(16).toString("hex");
130629
131110
  u.rename(s3, e, (i) => {
130630
131111
  if (i) return t(i);
130631
131112
  u.unlink(e, t);
130632
131113
  });
130633
131114
  };
130634
- var no = (s3) => {
131115
+ var ho = (s3) => {
130635
131116
  if (!Oe) return u.unlinkSync(s3);
130636
- let t = s3 + ".DELETE." + Tr(16).toString("hex");
131117
+ let t = s3 + ".DELETE." + Ir(16).toString("hex");
130637
131118
  u.renameSync(s3, t), u.unlinkSync(t);
130638
131119
  };
130639
- var Or = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
131120
+ var Dr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
130640
131121
  var qt = class extends st {
130641
131122
  [ws] = false;
130642
131123
  [ge] = false;
@@ -130674,7 +131155,7 @@ var qt = class extends st {
130674
131155
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
130675
131156
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
130676
131157
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
130677
- this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : so, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : Er() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[wr](e));
131158
+ this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : no, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : _r() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[gr](e));
130678
131159
  }
130679
131160
  warn(t, e, i = {}) {
130680
131161
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
@@ -130693,7 +131174,7 @@ var qt = class extends st {
130693
131174
  }
130694
131175
  return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
130695
131176
  }
130696
- [_r](t) {
131177
+ [Nr](t) {
130697
131178
  let e = f(t.path), i = e.split("/");
130698
131179
  if (this.strip) {
130699
131180
  if (i.length < this.strip) return false;
@@ -130716,9 +131197,9 @@ var qt = class extends st {
130716
131197
  }
130717
131198
  return true;
130718
131199
  }
130719
- [wr](t) {
130720
- if (!this[_r](t)) return t.resume();
130721
- switch (eo.equal(typeof t.absolute, "string"), t.type) {
131200
+ [gr](t) {
131201
+ if (!this[Nr](t)) return t.resume();
131202
+ switch (so.equal(typeof t.absolute, "string"), t.type) {
130722
131203
  case "Directory":
130723
131204
  case "GNUDumpDir":
130724
131205
  t.mode && (t.mode = t.mode | 448);
@@ -130729,23 +131210,23 @@ var qt = class extends st {
130729
131210
  case "SymbolicLink":
130730
131211
  return this[ys](t);
130731
131212
  default:
130732
- return this[br](t);
131213
+ return this[Lr](t);
130733
131214
  }
130734
131215
  }
130735
131216
  [O](t, e) {
130736
131217
  t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
130737
131218
  }
130738
131219
  [St](t, e, i) {
130739
- 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);
131220
+ Er(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
130740
131221
  }
130741
131222
  [Re](t) {
130742
131223
  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;
130743
131224
  }
130744
131225
  [be](t) {
130745
- return Or(this.uid, t.uid, this.processUid);
131226
+ return Dr(this.uid, t.uid, this.processUid);
130746
131227
  }
130747
131228
  [_e](t) {
130748
- return Or(this.gid, t.gid, this.processGid);
131229
+ return Dr(this.gid, t.gid, this.processGid);
130749
131230
  }
130750
131231
  [bs](t, e) {
130751
131232
  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 });
@@ -130795,16 +131276,16 @@ var qt = class extends st {
130795
131276
  t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
130796
131277
  });
130797
131278
  }
130798
- [br](t) {
131279
+ [Lr](t) {
130799
131280
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
130800
131281
  }
130801
- [yr](t, e) {
131282
+ [Tr](t, e) {
130802
131283
  let i = f(R.relative(this.cwd, R.resolve(R.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
130803
131284
  this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
130804
131285
  this[O](r, t), e();
130805
131286
  });
130806
131287
  }
130807
- [Rr](t, e) {
131288
+ [xr](t, e) {
130808
131289
  let i = f(R.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
130809
131290
  this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e), (n) => {
130810
131291
  this[O](n, t), e();
@@ -130820,7 +131301,7 @@ var qt = class extends st {
130820
131301
  this[ye](t, h, i, r, n);
130821
131302
  });
130822
131303
  }
130823
- [gr]() {
131304
+ [Ar]() {
130824
131305
  this[wi]++;
130825
131306
  }
130826
131307
  [Xt]() {
@@ -130833,11 +131314,11 @@ var qt = class extends st {
130833
131314
  return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
130834
131315
  }
130835
131316
  [ys](t) {
130836
- this[gr]();
131317
+ this[Ar]();
130837
131318
  let e = [t.path];
130838
- t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Sr](t, i));
131319
+ t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Or](t, i));
130839
131320
  }
130840
- [Sr](t, e) {
131321
+ [Or](t, e) {
130841
131322
  let i = (h) => {
130842
131323
  e(h);
130843
131324
  }, r = () => {
@@ -130875,7 +131356,7 @@ var qt = class extends st {
130875
131356
  if (t.absolute !== this.cwd) return u.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
130876
131357
  }
130877
131358
  if (t.absolute === this.cwd) return this[P](null, t, i);
130878
- ro(String(t.absolute), (l) => this[P](l ?? null, t, i));
131359
+ oo(String(t.absolute), (l) => this[P](l ?? null, t, i));
130879
131360
  });
130880
131361
  };
130881
131362
  this[ge] ? n() : r();
@@ -130891,9 +131372,9 @@ var qt = class extends st {
130891
131372
  case "ContiguousFile":
130892
131373
  return this[bs](e, i);
130893
131374
  case "Link":
130894
- return this[Rr](e, i);
131375
+ return this[xr](e, i);
130895
131376
  case "SymbolicLink":
130896
- return this[yr](e, i);
131377
+ return this[Tr](e, i);
130897
131378
  case "Directory":
130898
131379
  case "GNUDumpDir":
130899
131380
  return this[_s](e, i);
@@ -130944,7 +131425,7 @@ var Te = class extends qt {
130944
131425
  let [n] = Se(() => u.rmdirSync(String(t.absolute)));
130945
131426
  this[P](n, t);
130946
131427
  }
130947
- let [r] = t.absolute === this.cwd ? [] : Se(() => no(String(t.absolute)));
131428
+ let [r] = t.absolute === this.cwd ? [] : Se(() => ho(String(t.absolute)));
130948
131429
  this[P](r, t);
130949
131430
  }
130950
131431
  [bs](t, e) {
@@ -131016,7 +131497,7 @@ var Te = class extends qt {
131016
131497
  }
131017
131498
  [St](t, e) {
131018
131499
  try {
131019
- 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 });
131500
+ return Sr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
131020
131501
  } catch (i) {
131021
131502
  return i;
131022
131503
  }
@@ -131041,14 +131522,14 @@ var Te = class extends qt {
131041
131522
  }
131042
131523
  }
131043
131524
  };
131044
- var oo = (s3) => {
131045
- let t = new Te(s3), e = s3.file, i = xr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
131525
+ var ao = (s3) => {
131526
+ let t = new Te(s3), e = s3.file, i = Cr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
131046
131527
  new Me(e, { readSize: r, size: i.size }).pipe(t);
131047
131528
  };
131048
- var ho = (s3, t) => {
131529
+ var lo = (s3, t) => {
131049
131530
  let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
131050
131531
  return new Promise((o, h) => {
131051
- e.on("error", h), e.on("close", o), xr.stat(r, (a, l) => {
131532
+ e.on("error", h), e.on("close", o), Cr.stat(r, (a, l) => {
131052
131533
  if (a) h(a);
131053
131534
  else {
131054
131535
  let c = new _t(r, { readSize: i, size: l.size });
@@ -131057,10 +131538,10 @@ var ho = (s3, t) => {
131057
131538
  });
131058
131539
  });
131059
131540
  };
131060
- var ao = K(oo, ho, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
131541
+ var co = K(ao, lo, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
131061
131542
  t?.length && Ki(s3, t);
131062
131543
  });
131063
- var lo = (s3, t) => {
131544
+ var fo = (s3, t) => {
131064
131545
  let e = new kt(s3), i = true, r, n;
131065
131546
  try {
131066
131547
  try {
@@ -131081,7 +131562,7 @@ var lo = (s3, t) => {
131081
131562
  if (n + l + 512 > o.size) break;
131082
131563
  n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
131083
131564
  }
131084
- i = false, co(s3, e, n, r, t);
131565
+ i = false, uo(s3, e, n, r, t);
131085
131566
  } finally {
131086
131567
  if (i) try {
131087
131568
  v.closeSync(r);
@@ -131089,11 +131570,11 @@ var lo = (s3, t) => {
131089
131570
  }
131090
131571
  }
131091
131572
  };
131092
- var co = (s3, t, e, i, r) => {
131573
+ var uo = (s3, t, e, i, r) => {
131093
131574
  let n = new Wt(s3.file, { fd: i, start: e });
131094
- t.pipe(n), uo(t, r);
131575
+ t.pipe(n), po(t, r);
131095
131576
  };
131096
- var fo = (s3, t) => {
131577
+ var mo = (s3, t) => {
131097
131578
  t = Array.from(t);
131098
131579
  let e = new Et(s3), i = (n, o, h) => {
131099
131580
  let a = (T, N) => {
@@ -131123,23 +131604,23 @@ var fo = (s3, t) => {
131123
131604
  i(c, S.size, (T, N) => {
131124
131605
  if (T) return o(T);
131125
131606
  let E = new tt(s3.file, { fd: c, start: N });
131126
- e.pipe(E), E.on("error", o), E.on("close", n), mo(e, t);
131607
+ e.pipe(E), E.on("error", o), E.on("close", n), Eo(e, t);
131127
131608
  });
131128
131609
  });
131129
131610
  };
131130
131611
  v.open(s3.file, h, a);
131131
131612
  });
131132
131613
  };
131133
- var uo = (s3, t) => {
131614
+ var po = (s3, t) => {
131134
131615
  t.forEach((e) => {
131135
- e.charAt(0) === "@" ? It({ file: Lr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
131616
+ e.charAt(0) === "@" ? It({ file: Fr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
131136
131617
  }), s3.end();
131137
131618
  };
131138
- var mo = async (s3, t) => {
131139
- for (let e of t) e.charAt(0) === "@" ? await It({ file: Lr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
131619
+ var Eo = async (s3, t) => {
131620
+ for (let e of t) e.charAt(0) === "@" ? await It({ file: Fr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
131140
131621
  s3.end();
131141
131622
  };
131142
- var vt = K(lo, fo, () => {
131623
+ var vt = K(fo, mo, () => {
131143
131624
  throw new TypeError("file is required");
131144
131625
  }, () => {
131145
131626
  throw new TypeError("file is required");
@@ -131148,10 +131629,10 @@ var vt = K(lo, fo, () => {
131148
131629
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
131149
131630
  if (!t?.length) throw new TypeError("no paths specified to add/replace");
131150
131631
  });
131151
- var po = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
131152
- vt.validate?.(s3, t), Eo(s3);
131632
+ var wo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
131633
+ vt.validate?.(s3, t), So(s3);
131153
131634
  });
131154
- var Eo = (s3) => {
131635
+ var So = (s3) => {
131155
131636
  let t = s3.filter;
131156
131637
  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));
131157
131638
  };
@@ -131163,7 +131644,7 @@ async function packageDirectory(dirPath) {
131163
131644
  os6.tmpdir(),
131164
131645
  `appwrite-deploy-${Date.now()}.tar.gz`
131165
131646
  );
131166
- await Pn(
131647
+ await Zn(
131167
131648
  {
131168
131649
  gzip: true,
131169
131650
  file: tempFile,
@@ -131244,7 +131725,7 @@ async function downloadDeploymentCode(params) {
131244
131725
  `Failed to write deployment archive to "${compressedFileName}": ${message}`
131245
131726
  );
131246
131727
  }
131247
- ao({
131728
+ co({
131248
131729
  sync: true,
131249
131730
  cwd: resourcePath,
131250
131731
  file: compressedFileName,
@@ -134301,7 +134782,6 @@ var JwtManager = {
134301
134782
  timerError: null,
134302
134783
  async setup(userId = null, projectScopes = []) {
134303
134784
  const consoleClient = await sdkForConsole();
134304
- const usersClient2 = new Users(consoleClient);
134305
134785
  const projectsClient2 = new Projects(consoleClient);
134306
134786
  if (this.timerWarn) {
134307
134787
  clearTimeout(this.timerWarn);
@@ -134327,6 +134807,8 @@ var JwtManager = {
134327
134807
  1e3 * 60 * 60
134328
134808
  );
134329
134809
  if (userId) {
134810
+ const projectClient2 = await sdkForProject();
134811
+ const usersClient2 = new Users(projectClient2);
134330
134812
  await usersClient2.get({
134331
134813
  userId
134332
134814
  });
@@ -134739,12 +135221,9 @@ var runFunction = async ({
134739
135221
  const allVariables = {};
134740
135222
  if (withVariables) {
134741
135223
  try {
134742
- const { variables: remoteVariables } = await paginate(
134743
- async () => (await getFunctionsService()).listVariables(func["$id"]),
134744
- {},
134745
- 100,
134746
- "variables"
134747
- );
135224
+ const { variables: remoteVariables } = await (await getFunctionsService()).listVariables({
135225
+ functionId: func["$id"]
135226
+ });
134748
135227
  remoteVariables.forEach((v2) => {
134749
135228
  allVariables[v2.key] = v2.value;
134750
135229
  userVariables[v2.key] = v2.value;
@@ -134854,7 +135333,7 @@ var runFunction = async ({
134854
135333
  fs13.rmSync(hotSwapPath, { recursive: true, force: true });
134855
135334
  fs13.mkdirSync(hotSwapPath, { recursive: true });
134856
135335
  }
134857
- await ao({
135336
+ await co({
134858
135337
  keep: true,
134859
135338
  sync: true,
134860
135339
  cwd: hotSwapPath,
@@ -134882,7 +135361,7 @@ var runFunction = async ({
134882
135361
  const sourcePath = path11.join(functionPath, f2);
134883
135362
  fs13.copyFileSync(sourcePath, filePath);
134884
135363
  }
134885
- await Pn(
135364
+ await Zn(
134886
135365
  {
134887
135366
  gzip: true,
134888
135367
  sync: true,
@@ -136924,18 +137403,9 @@ var Push = class {
136924
137403
  const functionsServiceForVars = await getFunctionsService(
136925
137404
  this.projectClient
136926
137405
  );
136927
- const { variables } = await paginate(
136928
- async (args) => {
136929
- return await functionsServiceForVars.listVariables({
136930
- functionId: args.functionId
136931
- });
136932
- },
136933
- {
136934
- functionId: func["$id"]
136935
- },
136936
- 100,
136937
- "variables"
136938
- );
137406
+ const { variables } = await functionsServiceForVars.listVariables({
137407
+ functionId: func["$id"]
137408
+ });
136939
137409
  await Promise.all(
136940
137410
  variables.map(async (variable) => {
136941
137411
  const functionsServiceDel = await getFunctionsService(
@@ -137229,18 +137699,9 @@ var Push = class {
137229
137699
  if (withVariables) {
137230
137700
  updaterRow.update({ status: "Creating variables" }).replaceSpinner(SPINNER_DOTS);
137231
137701
  const sitesServiceForVars = await getSitesService(this.projectClient);
137232
- const { variables } = await paginate(
137233
- async (args) => {
137234
- return await sitesServiceForVars.listVariables({
137235
- siteId: args.siteId
137236
- });
137237
- },
137238
- {
137239
- siteId: site["$id"]
137240
- },
137241
- 100,
137242
- "variables"
137243
- );
137702
+ const { variables } = await sitesServiceForVars.listVariables({
137703
+ siteId: site["$id"]
137704
+ });
137244
137705
  await Promise.all(
137245
137706
  variables.map(async (variable) => {
137246
137707
  const sitesServiceDel = await getSitesService(this.projectClient);
@@ -139337,36 +139798,6 @@ account.command(`delete`).description(`Delete the currently logged in user.`).ac
139337
139798
  async () => parse3(await (await getAccountClient()).delete())
139338
139799
  )
139339
139800
  );
139340
- account.command(`list-billing-addresses`).description(`List all billing addresses for a user.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, expired, failed`).action(
139341
- actionRunner(
139342
- async ({ queries }) => parse3(await (await getAccountClient()).listBillingAddresses(queries))
139343
- )
139344
- );
139345
- account.command(`create-billing-address`).description(`Add a new billing address to a user's account.`).requiredOption(`--country <country>`, `Country`).requiredOption(`--city <city>`, `City`).requiredOption(`--street-address <street-address>`, `Street address`).option(`--address-line-2 <address-line-2>`, `Address line 2`).option(`--state <state>`, `State or province`).option(`--postal-code <postal-code>`, `Postal code`).action(
139346
- actionRunner(
139347
- async ({ country, city, streetAddress, addressLine2, state, postalCode }) => parse3(await (await getAccountClient()).createBillingAddress(country, city, streetAddress, addressLine2, state, postalCode))
139348
- )
139349
- );
139350
- account.command(`get-billing-address`).description(`Get a specific billing address for a user using it's ID.`).requiredOption(`--billing-address-id <billing-address-id>`, `Unique ID of billing address`).action(
139351
- actionRunner(
139352
- async ({ billingAddressId }) => parse3(await (await getAccountClient()).getBillingAddress(billingAddressId))
139353
- )
139354
- );
139355
- account.command(`update-billing-address`).description(`Update a specific billing address using it's ID.`).requiredOption(`--billing-address-id <billing-address-id>`, `Unique ID of billing address`).requiredOption(`--country <country>`, `Country`).requiredOption(`--city <city>`, `City`).requiredOption(`--street-address <street-address>`, `Street address`).option(`--address-line-2 <address-line-2>`, `Address line 2`).option(`--state <state>`, `State or province`).option(`--postal-code <postal-code>`, `Postal code`).action(
139356
- actionRunner(
139357
- async ({ billingAddressId, country, city, streetAddress, addressLine2, state, postalCode }) => parse3(await (await getAccountClient()).updateBillingAddress(billingAddressId, country, city, streetAddress, addressLine2, state, postalCode))
139358
- )
139359
- );
139360
- account.command(`delete-billing-address`).description(`Delete a specific billing address using it's ID.`).requiredOption(`--billing-address-id <billing-address-id>`, `Billing address unique ID`).action(
139361
- actionRunner(
139362
- async ({ billingAddressId }) => parse3(await (await getAccountClient()).deleteBillingAddress(billingAddressId))
139363
- )
139364
- );
139365
- account.command(`get-coupon`).description(`Get coupon details for an account.`).requiredOption(`--coupon-id <coupon-id>`, `ID of the coupon`).action(
139366
- actionRunner(
139367
- async ({ couponId }) => parse3(await (await getAccountClient()).getCoupon(couponId))
139368
- )
139369
- );
139370
139801
  account.command(`update-email`).description(`Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.
139371
139802
  This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
139372
139803
  `).requiredOption(`--email <email>`, `User email.`).requiredOption(`--password <password>`, `User password. Must be at least 8 chars.`).action(
@@ -139388,11 +139819,6 @@ account.command(`delete-identity`).description(`Delete an identity by its unique
139388
139819
  async ({ identityId }) => parse3(await (await getAccountClient()).deleteIdentity(identityId))
139389
139820
  )
139390
139821
  );
139391
- account.command(`list-invoices`).description(`List all invoices tied to an account.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount`).action(
139392
- actionRunner(
139393
- async ({ queries }) => parse3(await (await getAccountClient()).listInvoices(queries))
139394
- )
139395
- );
139396
139822
  account.command(`create-jwt`).description(`Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.`).option(`--duration <duration>`, `Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.`, parseInteger).action(
139397
139823
  actionRunner(
139398
139824
  async ({ duration: duration3 }) => parse3(await (await getAccountClient()).createJWT(duration3))
@@ -139496,41 +139922,6 @@ account.command(`update-password`).description(`Update currently logged in user
139496
139922
  async ({ password, oldPassword }) => parse3(await (await getAccountClient()).updatePassword(password, oldPassword))
139497
139923
  )
139498
139924
  );
139499
- account.command(`list-payment-methods`).description(`List payment methods for this account.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, expired, failed`).action(
139500
- actionRunner(
139501
- async ({ queries }) => parse3(await (await getAccountClient()).listPaymentMethods(queries))
139502
- )
139503
- );
139504
- account.command(`create-payment-method`).description(`Create a new payment method for the current user account.`).action(
139505
- actionRunner(
139506
- async () => parse3(await (await getAccountClient()).createPaymentMethod())
139507
- )
139508
- );
139509
- account.command(`get-payment-method`).description(`Get a specific payment method for the user.`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).action(
139510
- actionRunner(
139511
- async ({ paymentMethodId }) => parse3(await (await getAccountClient()).getPaymentMethod(paymentMethodId))
139512
- )
139513
- );
139514
- account.command(`update-payment-method`).description(`Update a new payment method for the current user account.`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).requiredOption(`--expiry-month <expiry-month>`, `Payment expiry month`, parseInteger).requiredOption(`--expiry-year <expiry-year>`, `Expiry year`, parseInteger).option(`--state <state>`, `State of the payment method country`).action(
139515
- actionRunner(
139516
- async ({ paymentMethodId, expiryMonth, expiryYear, state }) => parse3(await (await getAccountClient()).updatePaymentMethod(paymentMethodId, expiryMonth, expiryYear, state))
139517
- )
139518
- );
139519
- account.command(`delete-payment-method`).description(`Delete a specific payment method from a user's account.`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).action(
139520
- actionRunner(
139521
- async ({ paymentMethodId }) => parse3(await (await getAccountClient()).deletePaymentMethod(paymentMethodId))
139522
- )
139523
- );
139524
- account.command(`update-payment-method-provider`).description(`Update payment method provider.`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).requiredOption(`--provider-method-id <provider-method-id>`, `Payment method ID from the payment provider`).requiredOption(`--name <name>`, `Name in the payment method`).option(`--state <state>`, `State of the payment method country`).action(
139525
- actionRunner(
139526
- async ({ paymentMethodId, providerMethodId, name, state }) => parse3(await (await getAccountClient()).updatePaymentMethodProvider(paymentMethodId, providerMethodId, name, state))
139527
- )
139528
- );
139529
- account.command(`update-payment-method-mandate-options`).description(`Update payment method mandate options.`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).action(
139530
- actionRunner(
139531
- async ({ paymentMethodId }) => parse3(await (await getAccountClient()).updatePaymentMethodMandateOptions(paymentMethodId))
139532
- )
139533
- );
139534
139925
  account.command(`update-phone`).description(`Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.`).requiredOption(`--phone <phone>`, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`).requiredOption(`--password <password>`, `User password. Must be at least 8 chars.`).action(
139535
139926
  actionRunner(
139536
139927
  async ({ phone, password }) => parse3(await (await getAccountClient()).updatePhone(phone, password))
@@ -139592,8 +139983,8 @@ If there is already an active session, the new session will be attached to the l
139592
139983
  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).
139593
139984
  `).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(
139594
139985
  actionRunner(
139595
- async ({ provider, success: success21, failure, scopes }) => {
139596
- const url2 = (await getAccountClient()).createOAuth2Session(provider, success21, failure, scopes);
139986
+ async ({ provider, success: success22, failure, scopes }) => {
139987
+ const url2 = (await getAccountClient()).createOAuth2Session(provider, success22, failure, scopes);
139597
139988
  if (url2) console.log(url2);
139598
139989
  }
139599
139990
  )
@@ -139673,8 +140064,8 @@ If authentication succeeds, \`userId\` and \`secret\` of a token will be appende
139673
140064
 
139674
140065
  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(
139675
140066
  actionRunner(
139676
- async ({ provider, success: success21, failure, scopes }) => {
139677
- const url2 = (await getAccountClient()).createOAuth2Token(provider, success21, failure, scopes);
140067
+ async ({ provider, success: success22, failure, scopes }) => {
140068
+ const url2 = (await getAccountClient()).createOAuth2Token(provider, success22, failure, scopes);
139678
140069
  if (url2) console.log(url2);
139679
140070
  }
139680
140071
  )
@@ -140669,12 +141060,6 @@ health.command(`get-certificate`).description(`Get the SSL certificate for a dom
140669
141060
  async ({ domain: domain2 }) => parse3(await (await getHealthClient()).getCertificate(domain2))
140670
141061
  )
140671
141062
  );
140672
- health.command(`get-console-pausing`).description(`Get console pausing health status. Monitors projects approaching the pause threshold to detect potential issues with console access tracking.
140673
- `).option(`--threshold <threshold>`, `Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10.`, parseInteger).option(`--inactivity-days <inactivity-days>`, `Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7.`, parseInteger).action(
140674
- actionRunner(
140675
- async ({ threshold, inactivityDays }) => parse3(await (await getHealthClient()).getConsolePausing(threshold, inactivityDays))
140676
- )
140677
- );
140678
141063
  health.command(`get-db`).description(`Check the Appwrite database servers are up and connection is successful.`).action(
140679
141064
  actionRunner(
140680
141065
  async () => parse3(await (await getHealthClient()).getDB())
@@ -140690,26 +141075,11 @@ health.command(`get-queue-audits`).description(`Get the number of audit logs tha
140690
141075
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueAudits(threshold))
140691
141076
  )
140692
141077
  );
140693
- health.command(`get-queue-billing-project-aggregation`).description(`Get billing project aggregation queue.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger).action(
140694
- actionRunner(
140695
- async ({ threshold }) => parse3(await (await getHealthClient()).getQueueBillingProjectAggregation(threshold))
140696
- )
140697
- );
140698
- health.command(`get-queue-billing-team-aggregation`).description(`Get billing team aggregation queue.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger).action(
140699
- actionRunner(
140700
- async ({ threshold }) => parse3(await (await getHealthClient()).getQueueBillingTeamAggregation(threshold))
140701
- )
140702
- );
140703
141078
  health.command(`get-queue-builds`).description(`Get the number of builds that are waiting to be processed in the Appwrite internal queue server.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger).action(
140704
141079
  actionRunner(
140705
141080
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueBuilds(threshold))
140706
141081
  )
140707
141082
  );
140708
- health.command(`get-queue-priority-builds`).description(`Get the priority builds queue size.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 500.`, parseInteger).action(
140709
- actionRunner(
140710
- async ({ threshold }) => parse3(await (await getHealthClient()).getQueuePriorityBuilds(threshold))
140711
- )
140712
- );
140713
141083
  health.command(`get-queue-certificates`).description(`Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger).action(
140714
141084
  actionRunner(
140715
141085
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueCertificates(threshold))
@@ -140756,11 +141126,6 @@ health.command(`get-queue-migrations`).description(`Get the number of migrations
140756
141126
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueMigrations(threshold))
140757
141127
  )
140758
141128
  );
140759
- health.command(`get-queue-region-manager`).description(`Get region manager queue.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 100.`, parseInteger).action(
140760
- actionRunner(
140761
- async ({ threshold }) => parse3(await (await getHealthClient()).getQueueRegionManager(threshold))
140762
- )
140763
- );
140764
141129
  health.command(`get-queue-stats-resources`).description(`Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger).action(
140765
141130
  actionRunner(
140766
141131
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueStatsResources(threshold))
@@ -140771,11 +141136,6 @@ health.command(`get-queue-usage`).description(`Get the number of metrics that ar
140771
141136
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueUsage(threshold))
140772
141137
  )
140773
141138
  );
140774
- health.command(`get-queue-threats`).description(`Get threats queue.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 100.`, parseInteger).action(
140775
- actionRunner(
140776
- async ({ threshold }) => parse3(await (await getHealthClient()).getQueueThreats(threshold))
140777
- )
140778
- );
140779
141139
  health.command(`get-queue-webhooks`).description(`Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger).action(
140780
141140
  actionRunner(
140781
141141
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueWebhooks(threshold))
@@ -141313,7 +141673,7 @@ messaging.command(`delete-subscriber`).description(`Delete a subscriber by its u
141313
141673
  var migrationsClient = null;
141314
141674
  var getMigrationsClient = async () => {
141315
141675
  if (!migrationsClient) {
141316
- const sdkClient = await sdkForProject();
141676
+ const sdkClient = await sdkForConsole();
141317
141677
  migrationsClient = new Migrations(sdkClient);
141318
141678
  }
141319
141679
  return migrationsClient;
@@ -141408,6 +141768,217 @@ migrations.command(`delete`).description(`Delete a migration by its unique ID. T
141408
141768
  )
141409
141769
  );
141410
141770
 
141771
+ // lib/commands/services/organizations.ts
141772
+ var organizationsClient = null;
141773
+ var getOrganizationsClient = async () => {
141774
+ if (!organizationsClient) {
141775
+ const sdkClient = await sdkForConsole();
141776
+ organizationsClient = new Organizations(sdkClient);
141777
+ }
141778
+ return organizationsClient;
141779
+ };
141780
+ var organizations = new Command("organizations").description(commandDescriptions["organizations"] ?? "").configureHelp({
141781
+ helpWidth: process.stdout.columns || 80
141782
+ });
141783
+ organizations.command(`list`).description(`Get a list of all the teams in which the current user is a member. You can use the parameters 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, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).action(
141784
+ actionRunner(
141785
+ async ({ queries, search }) => parse3(await (await getOrganizationsClient()).list(queries, search))
141786
+ )
141787
+ );
141788
+ organizations.command(`create`).description(`Create a new organization.
141789
+ `).requiredOption(`--organization-id <organization-id>`, `Organization 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(`--name <name>`, `Organization name. Max length: 128 chars.`).requiredOption(`--billing-plan <billing-plan>`, `Organization billing plan chosen`).option(`--payment-method-id <payment-method-id>`, `Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.`).option(`--billing-address-id <billing-address-id>`, `Unique ID of billing address`).option(`--invites [invites...]`, `Additional member invites`).option(`--coupon-id <coupon-id>`, `Coupon id`).option(`--tax-id <tax-id>`, `Tax Id associated to billing.`).option(`--budget <budget>`, `Budget limit for additional usage set for the organization`, parseInteger).option(`--platform <platform>`, `Platform type`).action(
141790
+ actionRunner(
141791
+ async ({ organizationId, name, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget, platform }) => parse3(await (await getOrganizationsClient()).create(organizationId, name, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget, platform))
141792
+ )
141793
+ );
141794
+ organizations.command(`estimation-create-organization`).description(`Get estimation for creating an organization.`).requiredOption(`--billing-plan <billing-plan>`, `Organization billing plan chosen`).option(`--payment-method-id <payment-method-id>`, `Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.`).option(`--invites [invites...]`, `Additional member invites`).option(`--coupon-id <coupon-id>`, `Coupon id`).option(`--platform <platform>`, `Platform type`).action(
141795
+ actionRunner(
141796
+ async ({ billingPlan, paymentMethodId, invites, couponId, platform }) => parse3(await (await getOrganizationsClient()).estimationCreateOrganization(billingPlan, paymentMethodId, invites, couponId, platform))
141797
+ )
141798
+ );
141799
+ organizations.command(`delete`).description(`Delete an organization.`).requiredOption(`--organization-id <organization-id>`, `Team ID.`).action(
141800
+ actionRunner(
141801
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).delete(organizationId))
141802
+ )
141803
+ );
141804
+ organizations.command(`list-aggregations`).description(`Get a list of all aggregations for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, from, to`).action(
141805
+ actionRunner(
141806
+ async ({ organizationId, queries }) => parse3(await (await getOrganizationsClient()).listAggregations(organizationId, queries))
141807
+ )
141808
+ );
141809
+ organizations.command(`get-aggregation`).description(`Get a specific aggregation using it's aggregation ID.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--aggregation-id <aggregation-id>`, `Invoice unique ID`).option(`--limit <limit>`, `Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.`, parseInteger).option(`--offset <offset>`, `Offset value. The default value is 0. Use this param to manage pagination.`, parseInteger).action(
141810
+ actionRunner(
141811
+ async ({ organizationId, aggregationId, limit, offset }) => parse3(await (await getOrganizationsClient()).getAggregation(organizationId, aggregationId, limit, offset))
141812
+ )
141813
+ );
141814
+ organizations.command(`set-billing-address`).description(`Set a billing address for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--billing-address-id <billing-address-id>`, `Unique ID of billing address`).action(
141815
+ actionRunner(
141816
+ async ({ organizationId, billingAddressId }) => parse3(await (await getOrganizationsClient()).setBillingAddress(organizationId, billingAddressId))
141817
+ )
141818
+ );
141819
+ organizations.command(`set-billing-email`).description(`Set the current billing email for the organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--billing-email <billing-email>`, `Billing email for the organization.`).action(
141820
+ actionRunner(
141821
+ async ({ organizationId, billingEmail }) => parse3(await (await getOrganizationsClient()).setBillingEmail(organizationId, billingEmail))
141822
+ )
141823
+ );
141824
+ organizations.command(`update-budget`).description(`Update the budget limit for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--budget <budget>`, `Budget limit for additional usage set for the organization`, parseInteger).option(`--alerts [alerts...]`, `Budget alert limit percentage`).action(
141825
+ actionRunner(
141826
+ async ({ organizationId, budget, alerts }) => parse3(await (await getOrganizationsClient()).updateBudget(organizationId, budget, alerts))
141827
+ )
141828
+ );
141829
+ organizations.command(`list-credits`).description(`List all credits for an organization.
141830
+ `).requiredOption(`--organization-id <organization-id>`, `Organization ID`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, couponId, credits, expiration, status`).action(
141831
+ actionRunner(
141832
+ async ({ organizationId, queries }) => parse3(await (await getOrganizationsClient()).listCredits(organizationId, queries))
141833
+ )
141834
+ );
141835
+ organizations.command(`add-credit`).description(`Add credit to an organization using a coupon.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--coupon-id <coupon-id>`, `ID of the coupon`).action(
141836
+ actionRunner(
141837
+ async ({ organizationId, couponId }) => parse3(await (await getOrganizationsClient()).addCredit(organizationId, couponId))
141838
+ )
141839
+ );
141840
+ organizations.command(`get-available-credits`).description(`Get total available valid credits for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).action(
141841
+ actionRunner(
141842
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).getAvailableCredits(organizationId))
141843
+ )
141844
+ );
141845
+ organizations.command(`get-credit`).description(`Get credit details.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--credit-id <credit-id>`, `Credit Unique ID`).action(
141846
+ actionRunner(
141847
+ async ({ organizationId, creditId }) => parse3(await (await getOrganizationsClient()).getCredit(organizationId, creditId))
141848
+ )
141849
+ );
141850
+ organizations.command(`estimation-delete-organization`).description(`Get estimation for deleting an organization.`).requiredOption(`--organization-id <organization-id>`, `Team ID.`).action(
141851
+ actionRunner(
141852
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).estimationDeleteOrganization(organizationId))
141853
+ )
141854
+ );
141855
+ organizations.command(`estimation-update-plan`).description(`Get estimation for updating the organization plan.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--billing-plan <billing-plan>`, `Organization billing plan chosen`).option(`--invites [invites...]`, `Additional member invites`).option(`--coupon-id <coupon-id>`, `Coupon id`).action(
141856
+ actionRunner(
141857
+ async ({ organizationId, billingPlan, invites, couponId }) => parse3(await (await getOrganizationsClient()).estimationUpdatePlan(organizationId, billingPlan, invites, couponId))
141858
+ )
141859
+ );
141860
+ organizations.command(`create-downgrade-feedback`).description(`Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform.
141861
+ `).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--reason <reason>`, `Feedback reason`).requiredOption(`--message <message>`, `Feedback message`).requiredOption(`--from-plan-id <from-plan-id>`, `Plan downgrading from`).requiredOption(`--to-plan-id <to-plan-id>`, `Plan downgrading to`).action(
141862
+ actionRunner(
141863
+ async ({ organizationId, reason, message, fromPlanId, toPlanId }) => parse3(await (await getOrganizationsClient()).createDowngradeFeedback(organizationId, reason, message, fromPlanId, toPlanId))
141864
+ )
141865
+ );
141866
+ organizations.command(`get-invoice`).description(`Get an invoice by its unique ID.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).action(
141867
+ actionRunner(
141868
+ async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).getInvoice(organizationId, invoiceId))
141869
+ )
141870
+ );
141871
+ organizations.command(`get-invoice-download`).description(`Download invoice in PDF`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).action(
141872
+ actionRunner(
141873
+ async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).getInvoiceDownload(organizationId, invoiceId))
141874
+ )
141875
+ );
141876
+ organizations.command(`create-invoice-payment`).description(`Initiate payment for failed invoice to pay live from console`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).requiredOption(`--payment-method-id <payment-method-id>`, `Payment method ID`).action(
141877
+ actionRunner(
141878
+ async ({ organizationId, invoiceId, paymentMethodId }) => parse3(await (await getOrganizationsClient()).createInvoicePayment(organizationId, invoiceId, paymentMethodId))
141879
+ )
141880
+ );
141881
+ organizations.command(`validate-invoice`).description(`Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).action(
141882
+ actionRunner(
141883
+ async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).validateInvoice(organizationId, invoiceId))
141884
+ )
141885
+ );
141886
+ organizations.command(`get-invoice-view`).description(`View invoice in PDF`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).action(
141887
+ actionRunner(
141888
+ async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).getInvoiceView(organizationId, invoiceId))
141889
+ )
141890
+ );
141891
+ organizations.command(`list-keys`).description(`Get a list of all API keys from the current organization. `).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).option(
141892
+ `--total [value]`,
141893
+ `When set to false, the total count returned will be 0 and will not be calculated.`,
141894
+ (value) => value === void 0 ? true : parseBool(value)
141895
+ ).action(
141896
+ actionRunner(
141897
+ async ({ organizationId, total }) => parse3(await (await getOrganizationsClient()).listKeys(organizationId, total))
141898
+ )
141899
+ );
141900
+ organizations.command(`create-key`).description(`Create a new organization API key.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`).action(
141901
+ actionRunner(
141902
+ async ({ organizationId, name, scopes, expire }) => parse3(await (await getOrganizationsClient()).createKey(organizationId, name, scopes, expire))
141903
+ )
141904
+ );
141905
+ organizations.command(`get-key`).description(`Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).action(
141906
+ actionRunner(
141907
+ async ({ organizationId, keyId }) => parse3(await (await getOrganizationsClient()).getKey(organizationId, keyId))
141908
+ )
141909
+ );
141910
+ organizations.command(`update-key`).description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`).action(
141911
+ actionRunner(
141912
+ async ({ organizationId, keyId, name, scopes, expire }) => parse3(await (await getOrganizationsClient()).updateKey(organizationId, keyId, name, scopes, expire))
141913
+ )
141914
+ );
141915
+ organizations.command(`delete-key`).description(`Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).action(
141916
+ actionRunner(
141917
+ async ({ organizationId, keyId }) => parse3(await (await getOrganizationsClient()).deleteKey(organizationId, keyId))
141918
+ )
141919
+ );
141920
+ organizations.command(`set-default-payment-method`).description(`Set a organization's default payment method.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).action(
141921
+ actionRunner(
141922
+ async ({ organizationId, paymentMethodId }) => parse3(await (await getOrganizationsClient()).setDefaultPaymentMethod(organizationId, paymentMethodId))
141923
+ )
141924
+ );
141925
+ organizations.command(`delete-default-payment-method`).description(`Delete the default payment method for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).action(
141926
+ actionRunner(
141927
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).deleteDefaultPaymentMethod(organizationId))
141928
+ )
141929
+ );
141930
+ organizations.command(`set-backup-payment-method`).description(`Set an organization's backup payment method.
141931
+ `).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).action(
141932
+ actionRunner(
141933
+ async ({ organizationId, paymentMethodId }) => parse3(await (await getOrganizationsClient()).setBackupPaymentMethod(organizationId, paymentMethodId))
141934
+ )
141935
+ );
141936
+ organizations.command(`delete-backup-payment-method`).description(`Delete a backup payment method for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).action(
141937
+ actionRunner(
141938
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).deleteBackupPaymentMethod(organizationId))
141939
+ )
141940
+ );
141941
+ organizations.command(`get-plan`).description(`Get the details of the current billing plan for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).action(
141942
+ actionRunner(
141943
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).getPlan(organizationId))
141944
+ )
141945
+ );
141946
+ organizations.command(`update-plan`).description(`Update the billing plan for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--billing-plan <billing-plan>`, `Organization billing plan chosen`).option(`--payment-method-id <payment-method-id>`, `Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.`).option(`--billing-address-id <billing-address-id>`, `Unique ID of billing address`).option(`--invites [invites...]`, `Additional member invites`).option(`--coupon-id <coupon-id>`, `Coupon id`).option(`--tax-id <tax-id>`, `Tax Id associated to billing.`).option(`--budget <budget>`, `Budget limit for additional usage set for the organization`, parseInteger).action(
141947
+ actionRunner(
141948
+ async ({ organizationId, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget }) => parse3(await (await getOrganizationsClient()).updatePlan(organizationId, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget))
141949
+ )
141950
+ );
141951
+ organizations.command(`cancel-downgrade`).description(`Cancel the downgrade initiated for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).action(
141952
+ actionRunner(
141953
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).cancelDowngrade(organizationId))
141954
+ )
141955
+ );
141956
+ organizations.command(`list-regions`).description(`Get all available regions for an organization.`).requiredOption(`--organization-id <organization-id>`, `Team ID.`).action(
141957
+ actionRunner(
141958
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).listRegions(organizationId))
141959
+ )
141960
+ );
141961
+ organizations.command(`get-scopes`).description(`Get Scopes`).requiredOption(`--organization-id <organization-id>`, `Organization id`).option(`--project-id <project-id>`, `Project id`).action(
141962
+ actionRunner(
141963
+ async ({ organizationId, projectId }) => parse3(await (await getOrganizationsClient()).getScopes(organizationId, projectId))
141964
+ )
141965
+ );
141966
+ organizations.command(`set-billing-tax-id`).description(`Set an organization's billing tax ID.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--tax-id <tax-id>`, `Tax Id associated to billing.`).action(
141967
+ actionRunner(
141968
+ async ({ organizationId, taxId }) => parse3(await (await getOrganizationsClient()).setBillingTaxId(organizationId, taxId))
141969
+ )
141970
+ );
141971
+ organizations.command(`get-usage`).description(`Get the usage data for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).option(`--start-date <start-date>`, `Starting date for the usage`).option(`--end-date <end-date>`, `End date for the usage`).action(
141972
+ actionRunner(
141973
+ async ({ organizationId, startDate, endDate }) => parse3(await (await getOrganizationsClient()).getUsage(organizationId, startDate, endDate))
141974
+ )
141975
+ );
141976
+ organizations.command(`validate-payment`).description(`Validate payment for team after creation or upgrade.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).option(`--invites [invites...]`, `Additional member invites`).action(
141977
+ actionRunner(
141978
+ async ({ organizationId, invites }) => parse3(await (await getOrganizationsClient()).validatePayment(organizationId, invites))
141979
+ )
141980
+ );
141981
+
141411
141982
  // lib/commands/services/project.ts
141412
141983
  var projectClient = null;
141413
141984
  var getProjectClient = async () => {
@@ -141425,26 +141996,30 @@ project.command(`get-usage`).description(`Get comprehensive usage statistics for
141425
141996
  async ({ startDate, endDate, period }) => parse3(await (await getProjectClient()).getUsage(startDate, endDate, period))
141426
141997
  )
141427
141998
  );
141428
- project.command(`list-variables`).description(`Get a list of all project variables. These variables will be accessible in all Appwrite Functions at runtime.`).action(
141999
+ project.command(`list-variables`).description(`Get a list of all project environment variables.`).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: key, resourceType, resourceId, secret`).option(
142000
+ `--total [value]`,
142001
+ `When set to false, the total count returned will be 0 and will not be calculated.`,
142002
+ (value) => value === void 0 ? true : parseBool(value)
142003
+ ).action(
141429
142004
  actionRunner(
141430
- async () => parse3(await (await getProjectClient()).listVariables())
142005
+ async ({ queries, total }) => parse3(await (await getProjectClient()).listVariables(queries, total))
141431
142006
  )
141432
142007
  );
141433
- project.command(`create-variable`).description(`Create a new project variable. This variable will be accessible in all Appwrite Functions at runtime.`).requiredOption(`--key <key>`, `Variable key. Max length: 255 chars.`).requiredOption(`--value <value>`, `Variable value. Max length: 8192 chars.`).option(
142008
+ project.command(`create-variable`).description(`Create a new project environment variable. These variables can be accessed by all functions and sites in the project.`).requiredOption(`--variable-id <variable-id>`, `Variable 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(`--key <key>`, `Variable key. Max length: 255 chars.`).requiredOption(`--value <value>`, `Variable value. Max length: 8192 chars.`).option(
141434
142009
  `--secret [value]`,
141435
142010
  `Secret variables can be updated or deleted, but only projects can read them during build and runtime.`,
141436
142011
  (value) => value === void 0 ? true : parseBool(value)
141437
142012
  ).action(
141438
142013
  actionRunner(
141439
- async ({ key, value, secret }) => parse3(await (await getProjectClient()).createVariable(key, value, secret))
142014
+ async ({ variableId, key, value, secret }) => parse3(await (await getProjectClient()).createVariable(variableId, key, value, secret))
141440
142015
  )
141441
142016
  );
141442
- project.command(`get-variable`).description(`Get a project variable by its unique ID.`).requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`).action(
142017
+ project.command(`get-variable`).description(`Get a variable by its unique ID. `).requiredOption(`--variable-id <variable-id>`, `Variable ID.`).action(
141443
142018
  actionRunner(
141444
142019
  async ({ variableId }) => parse3(await (await getProjectClient()).getVariable(variableId))
141445
142020
  )
141446
142021
  );
141447
- project.command(`update-variable`).description(`Update project variable by its unique ID. This variable will be accessible in all Appwrite Functions at runtime.`).requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`).requiredOption(`--key <key>`, `Variable key. Max length: 255 chars.`).option(`--value <value>`, `Variable value. Max length: 8192 chars.`).option(
142022
+ project.command(`update-variable`).description(`Update variable by its unique ID.`).requiredOption(`--variable-id <variable-id>`, `Variable ID.`).option(`--key <key>`, `Variable key. Max length: 255 chars.`).option(`--value <value>`, `Variable value. Max length: 8192 chars.`).option(
141448
142023
  `--secret [value]`,
141449
142024
  `Secret variables can be updated or deleted, but only projects can read them during build and runtime.`,
141450
142025
  (value) => value === void 0 ? true : parseBool(value)
@@ -141453,7 +142028,7 @@ project.command(`update-variable`).description(`Update project variable by its u
141453
142028
  async ({ variableId, key, value, secret }) => parse3(await (await getProjectClient()).updateVariable(variableId, key, value, secret))
141454
142029
  )
141455
142030
  );
141456
- project.command(`delete-variable`).description(`Delete a project variable by its unique ID. `).requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`).action(
142031
+ project.command(`delete-variable`).description(`Delete a variable by its unique ID. `).requiredOption(`--variable-id <variable-id>`, `Variable ID.`).action(
141457
142032
  actionRunner(
141458
142033
  async ({ variableId }) => parse3(await (await getProjectClient()).deleteVariable(variableId))
141459
142034
  )
@@ -141463,7 +142038,7 @@ project.command(`delete-variable`).description(`Delete a project variable by its
141463
142038
  var projectsClient = null;
141464
142039
  var getProjectsClient = async () => {
141465
142040
  if (!projectsClient) {
141466
- const sdkClient = await sdkForProject();
142041
+ const sdkClient = await sdkForConsole();
141467
142042
  projectsClient = new Projects(sdkClient);
141468
142043
  }
141469
142044
  return projectsClient;
@@ -141565,12 +142140,6 @@ projects.command(`update-auth-status`).description(`Update the status of a speci
141565
142140
  async ({ projectId, method, status }) => parse3(await (await getProjectsClient()).updateAuthStatus(projectId, method, status))
141566
142141
  )
141567
142142
  );
141568
- projects.command(`update-console-access`).description(`Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.
141569
- `).requiredOption(`--project-id <project-id>`, `Project ID`).action(
141570
- actionRunner(
141571
- async ({ projectId }) => parse3(await (await getProjectsClient()).updateConsoleAccess(projectId))
141572
- )
141573
- );
141574
142143
  projects.command(`list-dev-keys`).description(`List all the project's dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'`).requiredOption(`--project-id <project-id>`, `Project unique ID.`).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: accessedAt, expire`).action(
141575
142144
  actionRunner(
141576
142145
  async ({ projectId, queries }) => parse3(await (await getProjectsClient()).listDevKeys(projectId, queries))
@@ -141762,7 +142331,7 @@ projects.command(`delete-sms-template`).description(`Reset a custom SMS template
141762
142331
  var proxyClient = null;
141763
142332
  var getProxyClient = async () => {
141764
142333
  if (!proxyClient) {
141765
- const sdkClient = await sdkForProject();
142334
+ const sdkClient = await sdkForConsole();
141766
142335
  proxyClient = new Proxy2(sdkClient);
141767
142336
  }
141768
142337
  return proxyClient;
@@ -142750,7 +143319,15 @@ tablesDB.command(`get-usage`).description(`Get usage metrics and statistics for
142750
143319
  var teamsClient = null;
142751
143320
  var getTeamsClient = async () => {
142752
143321
  if (!teamsClient) {
142753
- const sdkClient = await sdkForProject();
143322
+ let sdkClient;
143323
+ try {
143324
+ sdkClient = await sdkForProject();
143325
+ } catch (e) {
143326
+ if (e instanceof Error && e.message.includes("Project is not set")) {
143327
+ hint(`To manage console-level teams, use the 'organizations' command instead.`);
143328
+ }
143329
+ throw e;
143330
+ }
142754
143331
  teamsClient = new Teams(sdkClient);
142755
143332
  }
142756
143333
  return teamsClient;
@@ -142906,7 +143483,7 @@ var getUsersClient = async () => {
142906
143483
  var users = new Command("users").description(commandDescriptions["users"] ?? "").configureHelp({
142907
143484
  helpWidth: process.stdout.columns || 80
142908
143485
  });
142909
- users.command(`list`).description(`Get a list of all the project's users. 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, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
143486
+ users.command(`list`).description(`Get a list of all the project's users. 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, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
142910
143487
  `--total [value]`,
142911
143488
  `When set to false, the total count returned will be 0 and will not be calculated.`,
142912
143489
  (value) => value === void 0 ? true : parseBool(value)
@@ -142990,6 +143567,12 @@ users.command(`update-email`).description(`Update the user email by its unique I
142990
143567
  async ({ userId, email: email3 }) => parse3(await (await getUsersClient()).updateEmail(userId, email3))
142991
143568
  )
142992
143569
  );
143570
+ users.command(`update-impersonator`).description(`Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.
143571
+ `).requiredOption(`--user-id <user-id>`, `User ID.`).requiredOption(`--impersonator <impersonator>`, `Whether the user can impersonate other users. When true, the user can browse project users to choose a target and can pass impersonation headers to act as that user. Internal audit logs still attribute impersonated actions to the original impersonator and store the target user details only in internal audit payload data.`, parseBool).action(
143572
+ actionRunner(
143573
+ async ({ userId, impersonator }) => parse3(await (await getUsersClient()).updateImpersonator(userId, impersonator))
143574
+ )
143575
+ );
142993
143576
  users.command(`create-jwt`).description(`Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.`).requiredOption(`--user-id <user-id>`, `User ID.`).option(`--session-id <session-id>`, `Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.`).option(`--duration <duration>`, `Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.`, parseInteger).action(
142994
143577
  actionRunner(
142995
143578
  async ({ userId, sessionId, duration: duration3 }) => parse3(await (await getUsersClient()).createJWT(userId, sessionId, duration3))
@@ -143156,7 +143739,7 @@ users.command(`update-phone-verification`).description(`Update the user phone ve
143156
143739
  var vcsClient = null;
143157
143740
  var getVcsClient = async () => {
143158
143741
  if (!vcsClient) {
143159
- const sdkClient = await sdkForProject();
143742
+ const sdkClient = await sdkForConsole();
143160
143743
  vcsClient = new Vcs(sdkClient);
143161
143744
  }
143162
143745
  return vcsClient;
@@ -143322,8 +143905,10 @@ if (process.argv.includes("-v") || process.argv.includes("--version")) {
143322
143905
  program.description(commandDescriptions["main"]).configureHelp({
143323
143906
  helpWidth: process.stdout.columns || 80,
143324
143907
  sortSubcommands: true
143325
- }).helpOption("-h, --help", "Display help for command").version(version3, "-v, --version", "Output the version number").option("-V, --verbose", "Show complete error log").option("-j, --json", "Output in JSON format").hook("preAction", migrate).option("-f,--force", "Flag to confirm all warnings").option("-a,--all", "Flag to push all resources").option("--id [id...]", "Flag to pass a list of ids for a given action").option("--report", "Enable reporting in case of CLI errors").on("option:json", () => {
143908
+ }).helpOption("-h, --help", "Display help for command").version(version3, "-v, --version", "Output the version number").option("-V, --verbose", "Show complete error log").option("-j, --json", "Output in JSON format").option("-R, --raw", "Output full raw JSON (no filtering)").hook("preAction", migrate).option("-f,--force", "Flag to confirm all warnings").option("-a,--all", "Flag to push all resources").option("--id [id...]", "Flag to pass a list of ids for a given action").option("--report", "Enable reporting in case of CLI errors").on("option:json", () => {
143326
143909
  cliConfig.json = true;
143910
+ }).on("option:raw", () => {
143911
+ cliConfig.raw = true;
143327
143912
  }).on("option:verbose", () => {
143328
143913
  cliConfig.verbose = true;
143329
143914
  }).on("option:report", function() {
@@ -143335,14 +143920,11 @@ if (process.argv.includes("-v") || process.argv.includes("--version")) {
143335
143920
  cliConfig.all = true;
143336
143921
  }).on("option:id", function() {
143337
143922
  cliConfig.ids = this.opts().id;
143338
- }).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);
143923
+ }).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(organizations).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);
143339
143924
  process.stdout.columns = oldWidth;
143340
143925
  }
143341
143926
  /*! Bundled license information:
143342
143927
 
143343
- safe-buffer/index.js:
143344
- (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
143345
-
143346
143928
  undici/lib/fetch/body.js:
143347
143929
  (*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
143348
143930