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
package/dist/cli.cjs CHANGED
@@ -13575,16 +13575,16 @@ var require_share = __commonJS({
13575
13575
  };
13576
13576
  }
13577
13577
  exports2.share = share;
13578
- function handleReset(reset, on2) {
13578
+ function handleReset(reset, on) {
13579
13579
  var args = [];
13580
13580
  for (var _i2 = 2; _i2 < arguments.length; _i2++) {
13581
13581
  args[_i2 - 2] = arguments[_i2];
13582
13582
  }
13583
- if (on2 === true) {
13583
+ if (on === true) {
13584
13584
  reset();
13585
13585
  return;
13586
13586
  }
13587
- if (on2 === false) {
13587
+ if (on === false) {
13588
13588
  return;
13589
13589
  }
13590
13590
  var onSubscriber = new Subscriber_1.SafeSubscriber({
@@ -13593,7 +13593,7 @@ var require_share = __commonJS({
13593
13593
  reset();
13594
13594
  }
13595
13595
  });
13596
- return innerFrom_1.innerFrom(on2.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);
13596
+ return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);
13597
13597
  }
13598
13598
  }
13599
13599
  });
@@ -21975,7 +21975,6 @@ var require_safe_buffer = __commonJS({
21975
21975
  function SafeBuffer(arg, encodingOrOffset, length) {
21976
21976
  return Buffer2(arg, encodingOrOffset, length);
21977
21977
  }
21978
- SafeBuffer.prototype = Object.create(Buffer2.prototype);
21979
21978
  copyProps(Buffer2, SafeBuffer);
21980
21979
  SafeBuffer.from = function(arg, encodingOrOffset, length) {
21981
21980
  if (typeof arg === "number") {
@@ -24518,16 +24517,16 @@ var require_base = __commonJS({
24518
24517
  }),
24519
24518
  share()
24520
24519
  );
24521
- const success21 = validation.pipe(
24520
+ const success22 = validation.pipe(
24522
24521
  filter((state) => state.isValid === true),
24523
24522
  take(1)
24524
24523
  );
24525
24524
  const error49 = validation.pipe(
24526
24525
  filter((state) => state.isValid !== true),
24527
- takeUntil(success21)
24526
+ takeUntil(success22)
24528
24527
  );
24529
24528
  return {
24530
- success: success21,
24529
+ success: success22,
24531
24530
  error: error49
24532
24531
  };
24533
24532
  }
@@ -35557,12 +35556,12 @@ var require_utils3 = __commonJS({
35557
35556
  return str;
35558
35557
  }
35559
35558
  var codeCache = {};
35560
- function addToCodeCache(name, on2, off) {
35561
- on2 = "\x1B[" + on2 + "m";
35559
+ function addToCodeCache(name, on, off) {
35560
+ on = "\x1B[" + on + "m";
35562
35561
  off = "\x1B[" + off + "m";
35563
- codeCache[on2] = { set: name, to: true };
35562
+ codeCache[on] = { set: name, to: true };
35564
35563
  codeCache[off] = { set: name, to: false };
35565
- codeCache[name] = { on: on2, off };
35564
+ codeCache[name] = { on, off };
35566
35565
  }
35567
35566
  addToCodeCache("bold", 1, 22);
35568
35567
  addToCodeCache("italics", 3, 23);
@@ -63453,14 +63452,14 @@ var require_base2 = __commonJS({
63453
63452
  return { isValid: err };
63454
63453
  });
63455
63454
  }).share();
63456
- var success21 = validation.filter(function(state) {
63455
+ var success22 = validation.filter(function(state) {
63457
63456
  return state.isValid === true;
63458
63457
  }).take(1);
63459
63458
  var error49 = validation.filter(function(state) {
63460
63459
  return state.isValid !== true;
63461
- }).takeUntil(success21);
63460
+ }).takeUntil(success22);
63462
63461
  return {
63463
- success: success21,
63462
+ success: success22,
63464
63463
  error: error49
63465
63464
  };
63466
63465
  };
@@ -72249,6 +72248,7 @@ var require_constants6 = __commonJS({
72249
72248
  var path16 = require("path");
72250
72249
  var WIN_SLASH = "\\\\/";
72251
72250
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
72251
+ var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
72252
72252
  var DOT_LITERAL = "\\.";
72253
72253
  var PLUS_LITERAL = "\\+";
72254
72254
  var QMARK_LITERAL = "\\?";
@@ -72296,6 +72296,7 @@ var require_constants6 = __commonJS({
72296
72296
  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
72297
72297
  };
72298
72298
  var POSIX_REGEX_SOURCE = {
72299
+ __proto__: null,
72299
72300
  alnum: "a-zA-Z0-9",
72300
72301
  alpha: "a-zA-Z",
72301
72302
  ascii: "\\x00-\\x7F",
@@ -72312,6 +72313,7 @@ var require_constants6 = __commonJS({
72312
72313
  xdigit: "A-Fa-f0-9"
72313
72314
  };
72314
72315
  module2.exports = {
72316
+ DEFAULT_MAX_EXTGLOB_RECURSION,
72315
72317
  MAX_LENGTH: 1024 * 64,
72316
72318
  POSIX_REGEX_SOURCE,
72317
72319
  // regular expressions
@@ -72323,6 +72325,7 @@ var require_constants6 = __commonJS({
72323
72325
  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
72324
72326
  // Replace globs with equivalent patterns to reduce parsing time.
72325
72327
  REPLACEMENTS: {
72328
+ __proto__: null,
72326
72329
  "***": "*",
72327
72330
  "**/**": "**",
72328
72331
  "**/**/**": "**"
@@ -72859,6 +72862,213 @@ var require_parse3 = __commonJS({
72859
72862
  var syntaxError = (type, char) => {
72860
72863
  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
72861
72864
  };
72865
+ var splitTopLevel = (input) => {
72866
+ const parts = [];
72867
+ let bracket = 0;
72868
+ let paren = 0;
72869
+ let quote = 0;
72870
+ let value = "";
72871
+ let escaped = false;
72872
+ for (const ch of input) {
72873
+ if (escaped === true) {
72874
+ value += ch;
72875
+ escaped = false;
72876
+ continue;
72877
+ }
72878
+ if (ch === "\\") {
72879
+ value += ch;
72880
+ escaped = true;
72881
+ continue;
72882
+ }
72883
+ if (ch === '"') {
72884
+ quote = quote === 1 ? 0 : 1;
72885
+ value += ch;
72886
+ continue;
72887
+ }
72888
+ if (quote === 0) {
72889
+ if (ch === "[") {
72890
+ bracket++;
72891
+ } else if (ch === "]" && bracket > 0) {
72892
+ bracket--;
72893
+ } else if (bracket === 0) {
72894
+ if (ch === "(") {
72895
+ paren++;
72896
+ } else if (ch === ")" && paren > 0) {
72897
+ paren--;
72898
+ } else if (ch === "|" && paren === 0) {
72899
+ parts.push(value);
72900
+ value = "";
72901
+ continue;
72902
+ }
72903
+ }
72904
+ }
72905
+ value += ch;
72906
+ }
72907
+ parts.push(value);
72908
+ return parts;
72909
+ };
72910
+ var isPlainBranch = (branch) => {
72911
+ let escaped = false;
72912
+ for (const ch of branch) {
72913
+ if (escaped === true) {
72914
+ escaped = false;
72915
+ continue;
72916
+ }
72917
+ if (ch === "\\") {
72918
+ escaped = true;
72919
+ continue;
72920
+ }
72921
+ if (/[?*+@!()[\]{}]/.test(ch)) {
72922
+ return false;
72923
+ }
72924
+ }
72925
+ return true;
72926
+ };
72927
+ var normalizeSimpleBranch = (branch) => {
72928
+ let value = branch.trim();
72929
+ let changed = true;
72930
+ while (changed === true) {
72931
+ changed = false;
72932
+ if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
72933
+ value = value.slice(2, -1);
72934
+ changed = true;
72935
+ }
72936
+ }
72937
+ if (!isPlainBranch(value)) {
72938
+ return;
72939
+ }
72940
+ return value.replace(/\\(.)/g, "$1");
72941
+ };
72942
+ var hasRepeatedCharPrefixOverlap = (branches) => {
72943
+ const values = branches.map(normalizeSimpleBranch).filter(Boolean);
72944
+ for (let i = 0; i < values.length; i++) {
72945
+ for (let j2 = i + 1; j2 < values.length; j2++) {
72946
+ const a = values[i];
72947
+ const b2 = values[j2];
72948
+ const char = a[0];
72949
+ if (!char || a !== char.repeat(a.length) || b2 !== char.repeat(b2.length)) {
72950
+ continue;
72951
+ }
72952
+ if (a === b2 || a.startsWith(b2) || b2.startsWith(a)) {
72953
+ return true;
72954
+ }
72955
+ }
72956
+ }
72957
+ return false;
72958
+ };
72959
+ var parseRepeatedExtglob = (pattern, requireEnd = true) => {
72960
+ if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") {
72961
+ return;
72962
+ }
72963
+ let bracket = 0;
72964
+ let paren = 0;
72965
+ let quote = 0;
72966
+ let escaped = false;
72967
+ for (let i = 1; i < pattern.length; i++) {
72968
+ const ch = pattern[i];
72969
+ if (escaped === true) {
72970
+ escaped = false;
72971
+ continue;
72972
+ }
72973
+ if (ch === "\\") {
72974
+ escaped = true;
72975
+ continue;
72976
+ }
72977
+ if (ch === '"') {
72978
+ quote = quote === 1 ? 0 : 1;
72979
+ continue;
72980
+ }
72981
+ if (quote === 1) {
72982
+ continue;
72983
+ }
72984
+ if (ch === "[") {
72985
+ bracket++;
72986
+ continue;
72987
+ }
72988
+ if (ch === "]" && bracket > 0) {
72989
+ bracket--;
72990
+ continue;
72991
+ }
72992
+ if (bracket > 0) {
72993
+ continue;
72994
+ }
72995
+ if (ch === "(") {
72996
+ paren++;
72997
+ continue;
72998
+ }
72999
+ if (ch === ")") {
73000
+ paren--;
73001
+ if (paren === 0) {
73002
+ if (requireEnd === true && i !== pattern.length - 1) {
73003
+ return;
73004
+ }
73005
+ return {
73006
+ type: pattern[0],
73007
+ body: pattern.slice(2, i),
73008
+ end: i
73009
+ };
73010
+ }
73011
+ }
73012
+ }
73013
+ };
73014
+ var getStarExtglobSequenceOutput = (pattern) => {
73015
+ let index = 0;
73016
+ const chars = [];
73017
+ while (index < pattern.length) {
73018
+ const match = parseRepeatedExtglob(pattern.slice(index), false);
73019
+ if (!match || match.type !== "*") {
73020
+ return;
73021
+ }
73022
+ const branches = splitTopLevel(match.body).map((branch2) => branch2.trim());
73023
+ if (branches.length !== 1) {
73024
+ return;
73025
+ }
73026
+ const branch = normalizeSimpleBranch(branches[0]);
73027
+ if (!branch || branch.length !== 1) {
73028
+ return;
73029
+ }
73030
+ chars.push(branch);
73031
+ index += match.end + 1;
73032
+ }
73033
+ if (chars.length < 1) {
73034
+ return;
73035
+ }
73036
+ const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
73037
+ return `${source}*`;
73038
+ };
73039
+ var repeatedExtglobRecursion = (pattern) => {
73040
+ let depth = 0;
73041
+ let value = pattern.trim();
73042
+ let match = parseRepeatedExtglob(value);
73043
+ while (match) {
73044
+ depth++;
73045
+ value = match.body.trim();
73046
+ match = parseRepeatedExtglob(value);
73047
+ }
73048
+ return depth;
73049
+ };
73050
+ var analyzeRepeatedExtglob = (body, options) => {
73051
+ if (options.maxExtglobRecursion === false) {
73052
+ return { risky: false };
73053
+ }
73054
+ const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
73055
+ const branches = splitTopLevel(body).map((branch) => branch.trim());
73056
+ if (branches.length > 1) {
73057
+ if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) {
73058
+ return { risky: true };
73059
+ }
73060
+ }
73061
+ for (const branch of branches) {
73062
+ const safeOutput = getStarExtglobSequenceOutput(branch);
73063
+ if (safeOutput) {
73064
+ return { risky: true, safeOutput };
73065
+ }
73066
+ if (repeatedExtglobRecursion(branch) > max) {
73067
+ return { risky: true };
73068
+ }
73069
+ }
73070
+ return { risky: false };
73071
+ };
72862
73072
  var parse4 = (input, options) => {
72863
73073
  if (typeof input !== "string") {
72864
73074
  throw new TypeError("Expected a string");
@@ -72990,6 +73200,8 @@ var require_parse3 = __commonJS({
72990
73200
  token.prev = prev;
72991
73201
  token.parens = state.parens;
72992
73202
  token.output = state.output;
73203
+ token.startIndex = state.index;
73204
+ token.tokensIndex = tokens2.length;
72993
73205
  const output = (opts.capture ? "(" : "") + token.open;
72994
73206
  increment("parens");
72995
73207
  push2({ type, value: value2, output: state.output ? "" : ONE_CHAR });
@@ -72997,6 +73209,26 @@ var require_parse3 = __commonJS({
72997
73209
  extglobs.push(token);
72998
73210
  };
72999
73211
  const extglobClose = (token) => {
73212
+ const literal2 = input.slice(token.startIndex, state.index + 1);
73213
+ const body = input.slice(token.startIndex + 2, state.index);
73214
+ const analysis = analyzeRepeatedExtglob(body, opts);
73215
+ if ((token.type === "plus" || token.type === "star") && analysis.risky) {
73216
+ const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
73217
+ const open = tokens2[token.tokensIndex];
73218
+ open.type = "text";
73219
+ open.value = literal2;
73220
+ open.output = safeOutput || utils.escapeRegex(literal2);
73221
+ for (let i = token.tokensIndex + 1; i < tokens2.length; i++) {
73222
+ tokens2[i].value = "";
73223
+ tokens2[i].output = "";
73224
+ delete tokens2[i].suffix;
73225
+ }
73226
+ state.output = token.output + open.output;
73227
+ state.backtrack = true;
73228
+ push2({ type: "paren", extglob: true, value, output: "" });
73229
+ decrement("parens");
73230
+ return;
73231
+ }
73000
73232
  let output = token.close + (opts.capture ? ")" : "");
73001
73233
  let rest;
73002
73234
  if (token.type === "negate") {
@@ -73989,6 +74221,7 @@ var require_constants7 = __commonJS({
73989
74221
  var path16 = require("path");
73990
74222
  var WIN_SLASH = "\\\\/";
73991
74223
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
74224
+ var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
73992
74225
  var DOT_LITERAL = "\\.";
73993
74226
  var PLUS_LITERAL = "\\+";
73994
74227
  var QMARK_LITERAL = "\\?";
@@ -74036,6 +74269,7 @@ var require_constants7 = __commonJS({
74036
74269
  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
74037
74270
  };
74038
74271
  var POSIX_REGEX_SOURCE = {
74272
+ __proto__: null,
74039
74273
  alnum: "a-zA-Z0-9",
74040
74274
  alpha: "a-zA-Z",
74041
74275
  ascii: "\\x00-\\x7F",
@@ -74052,6 +74286,7 @@ var require_constants7 = __commonJS({
74052
74286
  xdigit: "A-Fa-f0-9"
74053
74287
  };
74054
74288
  module2.exports = {
74289
+ DEFAULT_MAX_EXTGLOB_RECURSION,
74055
74290
  MAX_LENGTH: 1024 * 64,
74056
74291
  POSIX_REGEX_SOURCE,
74057
74292
  // regular expressions
@@ -74063,6 +74298,7 @@ var require_constants7 = __commonJS({
74063
74298
  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
74064
74299
  // Replace globs with equivalent patterns to reduce parsing time.
74065
74300
  REPLACEMENTS: {
74301
+ __proto__: null,
74066
74302
  "***": "*",
74067
74303
  "**/**": "**",
74068
74304
  "**/**/**": "**"
@@ -74599,6 +74835,213 @@ var require_parse4 = __commonJS({
74599
74835
  var syntaxError = (type, char) => {
74600
74836
  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
74601
74837
  };
74838
+ var splitTopLevel = (input) => {
74839
+ const parts = [];
74840
+ let bracket = 0;
74841
+ let paren = 0;
74842
+ let quote = 0;
74843
+ let value = "";
74844
+ let escaped = false;
74845
+ for (const ch of input) {
74846
+ if (escaped === true) {
74847
+ value += ch;
74848
+ escaped = false;
74849
+ continue;
74850
+ }
74851
+ if (ch === "\\") {
74852
+ value += ch;
74853
+ escaped = true;
74854
+ continue;
74855
+ }
74856
+ if (ch === '"') {
74857
+ quote = quote === 1 ? 0 : 1;
74858
+ value += ch;
74859
+ continue;
74860
+ }
74861
+ if (quote === 0) {
74862
+ if (ch === "[") {
74863
+ bracket++;
74864
+ } else if (ch === "]" && bracket > 0) {
74865
+ bracket--;
74866
+ } else if (bracket === 0) {
74867
+ if (ch === "(") {
74868
+ paren++;
74869
+ } else if (ch === ")" && paren > 0) {
74870
+ paren--;
74871
+ } else if (ch === "|" && paren === 0) {
74872
+ parts.push(value);
74873
+ value = "";
74874
+ continue;
74875
+ }
74876
+ }
74877
+ }
74878
+ value += ch;
74879
+ }
74880
+ parts.push(value);
74881
+ return parts;
74882
+ };
74883
+ var isPlainBranch = (branch) => {
74884
+ let escaped = false;
74885
+ for (const ch of branch) {
74886
+ if (escaped === true) {
74887
+ escaped = false;
74888
+ continue;
74889
+ }
74890
+ if (ch === "\\") {
74891
+ escaped = true;
74892
+ continue;
74893
+ }
74894
+ if (/[?*+@!()[\]{}]/.test(ch)) {
74895
+ return false;
74896
+ }
74897
+ }
74898
+ return true;
74899
+ };
74900
+ var normalizeSimpleBranch = (branch) => {
74901
+ let value = branch.trim();
74902
+ let changed = true;
74903
+ while (changed === true) {
74904
+ changed = false;
74905
+ if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
74906
+ value = value.slice(2, -1);
74907
+ changed = true;
74908
+ }
74909
+ }
74910
+ if (!isPlainBranch(value)) {
74911
+ return;
74912
+ }
74913
+ return value.replace(/\\(.)/g, "$1");
74914
+ };
74915
+ var hasRepeatedCharPrefixOverlap = (branches) => {
74916
+ const values = branches.map(normalizeSimpleBranch).filter(Boolean);
74917
+ for (let i = 0; i < values.length; i++) {
74918
+ for (let j2 = i + 1; j2 < values.length; j2++) {
74919
+ const a = values[i];
74920
+ const b2 = values[j2];
74921
+ const char = a[0];
74922
+ if (!char || a !== char.repeat(a.length) || b2 !== char.repeat(b2.length)) {
74923
+ continue;
74924
+ }
74925
+ if (a === b2 || a.startsWith(b2) || b2.startsWith(a)) {
74926
+ return true;
74927
+ }
74928
+ }
74929
+ }
74930
+ return false;
74931
+ };
74932
+ var parseRepeatedExtglob = (pattern, requireEnd = true) => {
74933
+ if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") {
74934
+ return;
74935
+ }
74936
+ let bracket = 0;
74937
+ let paren = 0;
74938
+ let quote = 0;
74939
+ let escaped = false;
74940
+ for (let i = 1; i < pattern.length; i++) {
74941
+ const ch = pattern[i];
74942
+ if (escaped === true) {
74943
+ escaped = false;
74944
+ continue;
74945
+ }
74946
+ if (ch === "\\") {
74947
+ escaped = true;
74948
+ continue;
74949
+ }
74950
+ if (ch === '"') {
74951
+ quote = quote === 1 ? 0 : 1;
74952
+ continue;
74953
+ }
74954
+ if (quote === 1) {
74955
+ continue;
74956
+ }
74957
+ if (ch === "[") {
74958
+ bracket++;
74959
+ continue;
74960
+ }
74961
+ if (ch === "]" && bracket > 0) {
74962
+ bracket--;
74963
+ continue;
74964
+ }
74965
+ if (bracket > 0) {
74966
+ continue;
74967
+ }
74968
+ if (ch === "(") {
74969
+ paren++;
74970
+ continue;
74971
+ }
74972
+ if (ch === ")") {
74973
+ paren--;
74974
+ if (paren === 0) {
74975
+ if (requireEnd === true && i !== pattern.length - 1) {
74976
+ return;
74977
+ }
74978
+ return {
74979
+ type: pattern[0],
74980
+ body: pattern.slice(2, i),
74981
+ end: i
74982
+ };
74983
+ }
74984
+ }
74985
+ }
74986
+ };
74987
+ var getStarExtglobSequenceOutput = (pattern) => {
74988
+ let index = 0;
74989
+ const chars = [];
74990
+ while (index < pattern.length) {
74991
+ const match = parseRepeatedExtglob(pattern.slice(index), false);
74992
+ if (!match || match.type !== "*") {
74993
+ return;
74994
+ }
74995
+ const branches = splitTopLevel(match.body).map((branch2) => branch2.trim());
74996
+ if (branches.length !== 1) {
74997
+ return;
74998
+ }
74999
+ const branch = normalizeSimpleBranch(branches[0]);
75000
+ if (!branch || branch.length !== 1) {
75001
+ return;
75002
+ }
75003
+ chars.push(branch);
75004
+ index += match.end + 1;
75005
+ }
75006
+ if (chars.length < 1) {
75007
+ return;
75008
+ }
75009
+ const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
75010
+ return `${source}*`;
75011
+ };
75012
+ var repeatedExtglobRecursion = (pattern) => {
75013
+ let depth = 0;
75014
+ let value = pattern.trim();
75015
+ let match = parseRepeatedExtglob(value);
75016
+ while (match) {
75017
+ depth++;
75018
+ value = match.body.trim();
75019
+ match = parseRepeatedExtglob(value);
75020
+ }
75021
+ return depth;
75022
+ };
75023
+ var analyzeRepeatedExtglob = (body, options) => {
75024
+ if (options.maxExtglobRecursion === false) {
75025
+ return { risky: false };
75026
+ }
75027
+ const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
75028
+ const branches = splitTopLevel(body).map((branch) => branch.trim());
75029
+ if (branches.length > 1) {
75030
+ if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) {
75031
+ return { risky: true };
75032
+ }
75033
+ }
75034
+ for (const branch of branches) {
75035
+ const safeOutput = getStarExtglobSequenceOutput(branch);
75036
+ if (safeOutput) {
75037
+ return { risky: true, safeOutput };
75038
+ }
75039
+ if (repeatedExtglobRecursion(branch) > max) {
75040
+ return { risky: true };
75041
+ }
75042
+ }
75043
+ return { risky: false };
75044
+ };
74602
75045
  var parse4 = (input, options) => {
74603
75046
  if (typeof input !== "string") {
74604
75047
  throw new TypeError("Expected a string");
@@ -74730,6 +75173,8 @@ var require_parse4 = __commonJS({
74730
75173
  token.prev = prev;
74731
75174
  token.parens = state.parens;
74732
75175
  token.output = state.output;
75176
+ token.startIndex = state.index;
75177
+ token.tokensIndex = tokens2.length;
74733
75178
  const output = (opts.capture ? "(" : "") + token.open;
74734
75179
  increment("parens");
74735
75180
  push2({ type, value: value2, output: state.output ? "" : ONE_CHAR });
@@ -74737,6 +75182,26 @@ var require_parse4 = __commonJS({
74737
75182
  extglobs.push(token);
74738
75183
  };
74739
75184
  const extglobClose = (token) => {
75185
+ const literal2 = input.slice(token.startIndex, state.index + 1);
75186
+ const body = input.slice(token.startIndex + 2, state.index);
75187
+ const analysis = analyzeRepeatedExtglob(body, opts);
75188
+ if ((token.type === "plus" || token.type === "star") && analysis.risky) {
75189
+ const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
75190
+ const open = tokens2[token.tokensIndex];
75191
+ open.type = "text";
75192
+ open.value = literal2;
75193
+ open.output = safeOutput || utils.escapeRegex(literal2);
75194
+ for (let i = token.tokensIndex + 1; i < tokens2.length; i++) {
75195
+ tokens2[i].value = "";
75196
+ tokens2[i].output = "";
75197
+ delete tokens2[i].suffix;
75198
+ }
75199
+ state.output = token.output + open.output;
75200
+ state.backtrack = true;
75201
+ push2({ type: "paren", extglob: true, value, output: "" });
75202
+ decrement("parens");
75203
+ return;
75204
+ }
74740
75205
  let output = token.close + (opts.capture ? ")" : "");
74741
75206
  let rest;
74742
75207
  if (token.type === "negate") {
@@ -80045,7 +80510,7 @@ var require_helpers = __commonJS({
80045
80510
  if (instance.helpers[helperName]) {
80046
80511
  instance.hooks[helperName] = instance.helpers[helperName];
80047
80512
  if (!keepHelper) {
80048
- delete instance.helpers[helperName];
80513
+ instance.helpers[helperName] = void 0;
80049
80514
  }
80050
80515
  }
80051
80516
  }
@@ -80137,22 +80602,6 @@ var require_logger = __commonJS({
80137
80602
  }
80138
80603
  });
80139
80604
 
80140
- // node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js
80141
- var require_create_new_lookup_object = __commonJS({
80142
- "node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js"(exports2) {
80143
- "use strict";
80144
- exports2.__esModule = true;
80145
- exports2.createNewLookupObject = createNewLookupObject;
80146
- var _utils = require_utils9();
80147
- function createNewLookupObject() {
80148
- for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {
80149
- sources[_key] = arguments[_key];
80150
- }
80151
- return _utils.extend.apply(void 0, [/* @__PURE__ */ Object.create(null)].concat(sources));
80152
- }
80153
- }
80154
- });
80155
-
80156
80605
  // node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js
80157
80606
  var require_proto_access = __commonJS({
80158
80607
  "node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js"(exports2) {
@@ -80164,25 +80613,28 @@ var require_proto_access = __commonJS({
80164
80613
  function _interopRequireDefault(obj) {
80165
80614
  return obj && obj.__esModule ? obj : { "default": obj };
80166
80615
  }
80167
- var _createNewLookupObject = require_create_new_lookup_object();
80616
+ var _utils = require_utils9();
80168
80617
  var _logger = require_logger();
80169
80618
  var _logger2 = _interopRequireDefault(_logger);
80170
80619
  var loggedProperties = /* @__PURE__ */ Object.create(null);
80171
80620
  function createProtoAccessControl(runtimeOptions) {
80172
- var defaultMethodWhiteList = /* @__PURE__ */ Object.create(null);
80173
- defaultMethodWhiteList["constructor"] = false;
80174
- defaultMethodWhiteList["__defineGetter__"] = false;
80175
- defaultMethodWhiteList["__defineSetter__"] = false;
80176
- defaultMethodWhiteList["__lookupGetter__"] = false;
80177
- var defaultPropertyWhiteList = /* @__PURE__ */ Object.create(null);
80178
- defaultPropertyWhiteList["__proto__"] = false;
80621
+ var propertyWhiteList = /* @__PURE__ */ Object.create(null);
80622
+ propertyWhiteList["__proto__"] = false;
80623
+ _utils.extend(propertyWhiteList, runtimeOptions.allowedProtoProperties);
80624
+ var methodWhiteList = /* @__PURE__ */ Object.create(null);
80625
+ methodWhiteList["constructor"] = false;
80626
+ methodWhiteList["__defineGetter__"] = false;
80627
+ methodWhiteList["__defineSetter__"] = false;
80628
+ methodWhiteList["__lookupGetter__"] = false;
80629
+ methodWhiteList["__lookupSetter__"] = false;
80630
+ _utils.extend(methodWhiteList, runtimeOptions.allowedProtoMethods);
80179
80631
  return {
80180
80632
  properties: {
80181
- whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties),
80633
+ whitelist: propertyWhiteList,
80182
80634
  defaultValue: runtimeOptions.allowProtoPropertiesByDefault
80183
80635
  },
80184
80636
  methods: {
80185
- whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods),
80637
+ whitelist: methodWhiteList,
80186
80638
  defaultValue: runtimeOptions.allowProtoMethodsByDefault
80187
80639
  }
80188
80640
  };
@@ -80235,7 +80687,7 @@ var require_base3 = __commonJS({
80235
80687
  var _logger = require_logger();
80236
80688
  var _logger2 = _interopRequireDefault(_logger);
80237
80689
  var _internalProtoAccess = require_proto_access();
80238
- var VERSION = "4.7.8";
80690
+ var VERSION = "4.7.9";
80239
80691
  exports2.VERSION = VERSION;
80240
80692
  var COMPILER_REVISION = 8;
80241
80693
  exports2.COMPILER_REVISION = COMPILER_REVISION;
@@ -80421,14 +80873,12 @@ var require_runtime = __commonJS({
80421
80873
  }
80422
80874
  }
80423
80875
  partial2 = env.VM.resolvePartial.call(this, partial2, context, options);
80424
- var extendedOptions = Utils.extend({}, options, {
80425
- hooks: this.hooks,
80426
- protoAccessControl: this.protoAccessControl
80427
- });
80428
- var result = env.VM.invokePartial.call(this, partial2, context, extendedOptions);
80876
+ options.hooks = this.hooks;
80877
+ options.protoAccessControl = this.protoAccessControl;
80878
+ var result = env.VM.invokePartial.call(this, partial2, context, options);
80429
80879
  if (result == null && env.compile) {
80430
80880
  options.partials[options.name] = env.compile(partial2, templateSpec.compilerOptions, env);
80431
- result = options.partials[options.name](context, extendedOptions);
80881
+ result = options.partials[options.name](context, options);
80432
80882
  }
80433
80883
  if (result != null) {
80434
80884
  if (options.indent) {
@@ -80473,7 +80923,7 @@ var require_runtime = __commonJS({
80473
80923
  for (var i = 0; i < len; i++) {
80474
80924
  var result = depths[i] && container.lookupProperty(depths[i], name);
80475
80925
  if (result != null) {
80476
- return depths[i][name];
80926
+ return result;
80477
80927
  }
80478
80928
  }
80479
80929
  },
@@ -80539,8 +80989,9 @@ var require_runtime = __commonJS({
80539
80989
  ret.isTop = true;
80540
80990
  ret._setup = function(options) {
80541
80991
  if (!options.partial) {
80542
- var mergedHelpers = Utils.extend({}, env.helpers, options.helpers);
80543
- wrapHelpersToPassLookupProperty(mergedHelpers, container);
80992
+ var mergedHelpers = {};
80993
+ addHelpers(mergedHelpers, env.helpers, container);
80994
+ addHelpers(mergedHelpers, options.helpers, container);
80544
80995
  container.helpers = mergedHelpers;
80545
80996
  if (templateSpec.usePartial) {
80546
80997
  container.partials = container.mergeIfNeeded(options.partials, env.partials);
@@ -80590,18 +81041,18 @@ var require_runtime = __commonJS({
80590
81041
  function resolvePartial(partial2, context, options) {
80591
81042
  if (!partial2) {
80592
81043
  if (options.name === "@partial-block") {
80593
- partial2 = options.data["partial-block"];
81044
+ partial2 = lookupOwnProperty(options.data, "partial-block");
80594
81045
  } else {
80595
- partial2 = options.partials[options.name];
81046
+ partial2 = lookupOwnProperty(options.partials, options.name);
80596
81047
  }
80597
81048
  } else if (!partial2.call && !options.name) {
80598
81049
  options.name = partial2;
80599
- partial2 = options.partials[partial2];
81050
+ partial2 = lookupOwnProperty(options.partials, partial2);
80600
81051
  }
80601
81052
  return partial2;
80602
81053
  }
80603
81054
  function invokePartial(partial2, context, options) {
80604
- var currentPartialBlock = options.data && options.data["partial-block"];
81055
+ var currentPartialBlock = lookupOwnProperty(options.data, "partial-block");
80605
81056
  options.partial = true;
80606
81057
  if (options.ids) {
80607
81058
  options.data.contextPath = options.ids[0] || options.data.contextPath;
@@ -80634,6 +81085,11 @@ var require_runtime = __commonJS({
80634
81085
  function noop() {
80635
81086
  return "";
80636
81087
  }
81088
+ function lookupOwnProperty(obj, name) {
81089
+ if (obj && Object.prototype.hasOwnProperty.call(obj, name)) {
81090
+ return obj[name];
81091
+ }
81092
+ }
80637
81093
  function initData(context, data) {
80638
81094
  if (!data || !("root" in data)) {
80639
81095
  data = data ? _base.createFrame(data) : {};
@@ -80649,16 +81105,18 @@ var require_runtime = __commonJS({
80649
81105
  }
80650
81106
  return prog;
80651
81107
  }
80652
- function wrapHelpersToPassLookupProperty(mergedHelpers, container) {
80653
- Object.keys(mergedHelpers).forEach(function(helperName) {
80654
- var helper = mergedHelpers[helperName];
81108
+ function addHelpers(mergedHelpers, helpers, container) {
81109
+ if (!helpers) return;
81110
+ Object.keys(helpers).forEach(function(helperName) {
81111
+ var helper = helpers[helperName];
80655
81112
  mergedHelpers[helperName] = passLookupPropertyOption(helper, container);
80656
81113
  });
80657
81114
  }
80658
81115
  function passLookupPropertyOption(helper, container) {
80659
81116
  var lookupProperty = container.lookupProperty;
80660
81117
  return _internalWrapHelper.wrapHelper(helper, function(options) {
80661
- return Utils.extend({ lookupProperty }, options);
81118
+ options.lookupProperty = lookupProperty;
81119
+ return options;
80662
81120
  });
80663
81121
  }
80664
81122
  }
@@ -81468,7 +81926,7 @@ var require_parser = __commonJS({
81468
81926
  break;
81469
81927
  }
81470
81928
  };
81471
- 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\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
81929
+ 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\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
81472
81930
  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 } };
81473
81931
  return lexer2;
81474
81932
  })();
@@ -81975,12 +82433,15 @@ var require_base4 = __commonJS({
81975
82433
  var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
81976
82434
  var _helpers = require_helpers2();
81977
82435
  var Helpers = _interopRequireWildcard(_helpers);
82436
+ var _exception = require_exception();
82437
+ var _exception2 = _interopRequireDefault(_exception);
81978
82438
  var _utils = require_utils9();
81979
82439
  exports2.parser = _parser2["default"];
81980
82440
  var yy = {};
81981
82441
  _utils.extend(yy, Helpers);
81982
82442
  function parseWithoutProcessing(input, options) {
81983
82443
  if (input.type === "Program") {
82444
+ validateInputAst(input);
81984
82445
  return input;
81985
82446
  }
81986
82447
  _parser2["default"].yy = yy;
@@ -81995,6 +82456,51 @@ var require_base4 = __commonJS({
81995
82456
  var strip = new _whitespaceControl2["default"](options);
81996
82457
  return strip.accept(ast);
81997
82458
  }
82459
+ function validateInputAst(ast) {
82460
+ validateAstNode(ast);
82461
+ }
82462
+ function validateAstNode(node) {
82463
+ if (node == null) {
82464
+ return;
82465
+ }
82466
+ if (Array.isArray(node)) {
82467
+ node.forEach(validateAstNode);
82468
+ return;
82469
+ }
82470
+ if (typeof node !== "object") {
82471
+ return;
82472
+ }
82473
+ if (node.type === "PathExpression") {
82474
+ if (!isValidDepth(node.depth)) {
82475
+ throw new _exception2["default"]("Invalid AST: PathExpression.depth must be an integer");
82476
+ }
82477
+ if (!Array.isArray(node.parts)) {
82478
+ throw new _exception2["default"]("Invalid AST: PathExpression.parts must be an array");
82479
+ }
82480
+ for (var i = 0; i < node.parts.length; i++) {
82481
+ if (typeof node.parts[i] !== "string") {
82482
+ throw new _exception2["default"]("Invalid AST: PathExpression.parts must only contain strings");
82483
+ }
82484
+ }
82485
+ } else if (node.type === "NumberLiteral") {
82486
+ if (typeof node.value !== "number" || !isFinite(node.value)) {
82487
+ throw new _exception2["default"]("Invalid AST: NumberLiteral.value must be a number");
82488
+ }
82489
+ } else if (node.type === "BooleanLiteral") {
82490
+ if (typeof node.value !== "boolean") {
82491
+ throw new _exception2["default"]("Invalid AST: BooleanLiteral.value must be a boolean");
82492
+ }
82493
+ }
82494
+ Object.keys(node).forEach(function(propertyName) {
82495
+ if (propertyName === "loc") {
82496
+ return;
82497
+ }
82498
+ validateAstNode(node[propertyName]);
82499
+ });
82500
+ }
82501
+ function isValidDepth(depth) {
82502
+ return typeof depth === "number" && isFinite(depth) && Math.floor(depth) === depth && depth >= 0;
82503
+ }
81998
82504
  }
81999
82505
  });
82000
82506
 
@@ -84423,12 +84929,10 @@ var require_javascript_compiler = __commonJS({
84423
84929
  var programs = _context.programs;
84424
84930
  var decorators = _context.decorators;
84425
84931
  for (i = 0, l = programs.length; i < l; i++) {
84426
- if (programs[i]) {
84427
- ret[i] = programs[i];
84428
- if (decorators[i]) {
84429
- ret[i + "_d"] = decorators[i];
84430
- ret.useDecorators = true;
84431
- }
84932
+ ret[i] = programs[i];
84933
+ if (decorators[i]) {
84934
+ ret[i + "_d"] = decorators[i];
84935
+ ret.useDecorators = true;
84432
84936
  }
84433
84937
  }
84434
84938
  if (this.environment.usePartial) {
@@ -84689,22 +85193,25 @@ var require_javascript_compiler = __commonJS({
84689
85193
  }
84690
85194
  this.resolvePath("data", parts, 0, true, strict);
84691
85195
  },
84692
- resolvePath: function resolvePath(type, parts, i, falsy, strict) {
85196
+ resolvePath: function resolvePath(type, parts, startPartIndex, falsy, strict) {
84693
85197
  var _this2 = this;
84694
85198
  if (this.options.strict || this.options.assumeObjects) {
84695
- this.push(strictLookup(this.options.strict && strict, this, parts, i, type));
85199
+ this.push(strictLookup(this.options.strict && strict, this, parts, startPartIndex, type));
84696
85200
  return;
84697
85201
  }
84698
85202
  var len = parts.length;
84699
- for (; i < len; i++) {
84700
- this.replaceStack(function(current) {
84701
- var lookup = _this2.nameLookup(current, parts[i], type);
85203
+ var _loop = function(i2) {
85204
+ _this2.replaceStack(function(current) {
85205
+ var lookup = _this2.nameLookup(current, parts[i2], type);
84702
85206
  if (!falsy) {
84703
85207
  return [" != null ? ", lookup, " : ", current];
84704
85208
  } else {
84705
85209
  return [" && ", lookup];
84706
85210
  }
84707
85211
  });
85212
+ };
85213
+ for (var i = startPartIndex; i < len; i++) {
85214
+ _loop(i);
84708
85215
  }
84709
85216
  },
84710
85217
  // [resolvePossibleLambda]
@@ -84808,7 +85315,9 @@ var require_javascript_compiler = __commonJS({
84808
85315
  // and inserts the decorator into the decorators list.
84809
85316
  registerDecorator: function registerDecorator(paramSize, name) {
84810
85317
  var foundDecorator = this.nameLookup("decorators", name, "decorator"), options = this.setupHelperArgs(name, paramSize);
84811
- this.decorators.push(["fn = ", this.decorators.functionCall(foundDecorator, "", ["fn", "props", "container", options]), " || fn;"]);
85318
+ this.decorators.push(["var decorator = ", foundDecorator, ";"]);
85319
+ this.decorators.push(['if (typeof decorator !== "function") { throw new Error(', this.quotedString('Missing decorator: "' + name + '"'), "); }"]);
85320
+ this.decorators.push(["fn = ", this.decorators.functionCall("decorator", "", ["fn", "props", "container", options]), " || fn;"]);
84812
85321
  },
84813
85322
  // [invokeHelper]
84814
85323
  //
@@ -84955,8 +85464,7 @@ var require_javascript_compiler = __commonJS({
84955
85464
  compiler = new this.compiler();
84956
85465
  var existing = this.matchExistingProgram(child);
84957
85466
  if (existing == null) {
84958
- this.context.programs.push("");
84959
- var index = this.context.programs.length;
85467
+ var index = this.context.programs.push("") - 1;
84960
85468
  child.index = index;
84961
85469
  child.name = "program" + index;
84962
85470
  this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
@@ -85200,16 +85708,16 @@ var require_javascript_compiler = __commonJS({
85200
85708
  JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
85201
85709
  return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
85202
85710
  };
85203
- function strictLookup(requireTerminal, compiler, parts, i, type) {
85711
+ function strictLookup(requireTerminal, compiler, parts, startPartIndex, type) {
85204
85712
  var stack = compiler.popStack(), len = parts.length;
85205
85713
  if (requireTerminal) {
85206
85714
  len--;
85207
85715
  }
85208
- for (; i < len; i++) {
85716
+ for (var i = startPartIndex; i < len; i++) {
85209
85717
  stack = compiler.nameLookup(stack, parts[i], type);
85210
85718
  }
85211
85719
  if (requireTerminal) {
85212
- return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[i]), ", ", JSON.stringify(compiler.source.currentLocation), " )"];
85720
+ return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[len]), ", ", JSON.stringify(compiler.source.currentLocation), " )"];
85213
85721
  } else {
85214
85722
  return stack;
85215
85723
  }
@@ -85459,7 +85967,7 @@ var package_default = {
85459
85967
  type: "module",
85460
85968
  homepage: "https://appwrite.io/support",
85461
85969
  description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
85462
- version: "16.0.0",
85970
+ version: "17.1.0",
85463
85971
  license: "BSD-3-Clause",
85464
85972
  main: "dist/index.cjs",
85465
85973
  module: "dist/index.js",
@@ -99747,7 +100255,7 @@ var import_undici = __toESM(require_undici(), 1);
99747
100255
  // lib/constants.ts
99748
100256
  var SDK_TITLE = "Appwrite";
99749
100257
  var SDK_TITLE_LOWER = "appwrite";
99750
- var SDK_VERSION = "16.0.0";
100258
+ var SDK_VERSION = "17.1.0";
99751
100259
  var SDK_NAME = "Command Line";
99752
100260
  var SDK_PLATFORM = "console";
99753
100261
  var SDK_LANGUAGE = "cli";
@@ -100778,6 +101286,9 @@ var Client = class _Client {
100778
101286
  locale: "",
100779
101287
  mode: "",
100780
101288
  cookie: "",
101289
+ impersonateuserid: "",
101290
+ impersonateuseremail: "",
101291
+ impersonateuserphone: "",
100781
101292
  platform: "",
100782
101293
  selfSigned: false,
100783
101294
  session: void 0
@@ -100786,8 +101297,8 @@ var Client = class _Client {
100786
101297
  "x-sdk-name": "Console",
100787
101298
  "x-sdk-platform": "console",
100788
101299
  "x-sdk-language": "web",
100789
- "x-sdk-version": "6.0.0",
100790
- "X-Appwrite-Response-Format": "1.8.0"
101300
+ "x-sdk-version": "8.0.0",
101301
+ "X-Appwrite-Response-Format": "1.9.0"
100791
101302
  };
100792
101303
  this.realtime = {
100793
101304
  socket: void 0,
@@ -101110,6 +101621,48 @@ var Client = class _Client {
101110
101621
  this.config.cookie = value;
101111
101622
  return this;
101112
101623
  }
101624
+ /**
101625
+ * Set ImpersonateUserId
101626
+ *
101627
+ * 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.
101628
+ *
101629
+ * @param value string
101630
+ *
101631
+ * @return {this}
101632
+ */
101633
+ setImpersonateUserId(value) {
101634
+ this.headers["X-Appwrite-Impersonate-User-Id"] = value;
101635
+ this.config.impersonateuserid = value;
101636
+ return this;
101637
+ }
101638
+ /**
101639
+ * Set ImpersonateUserEmail
101640
+ *
101641
+ * 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.
101642
+ *
101643
+ * @param value string
101644
+ *
101645
+ * @return {this}
101646
+ */
101647
+ setImpersonateUserEmail(value) {
101648
+ this.headers["X-Appwrite-Impersonate-User-Email"] = value;
101649
+ this.config.impersonateuseremail = value;
101650
+ return this;
101651
+ }
101652
+ /**
101653
+ * Set ImpersonateUserPhone
101654
+ *
101655
+ * 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.
101656
+ *
101657
+ * @param value string
101658
+ *
101659
+ * @return {this}
101660
+ */
101661
+ setImpersonateUserPhone(value) {
101662
+ this.headers["X-Appwrite-Impersonate-User-Phone"] = value;
101663
+ this.config.impersonateuserphone = value;
101664
+ return this;
101665
+ }
101113
101666
  /**
101114
101667
  * Set Platform
101115
101668
  *
@@ -101231,9 +101784,9 @@ var Client = class _Client {
101231
101784
  }
101232
101785
  return { uri: url2.toString(), options };
101233
101786
  }
101234
- chunkedUpload(method, url2, headers = {}, originalPayload = {}, onProgress) {
101235
- var _a3;
101236
- return __awaiter(this, void 0, void 0, function* () {
101787
+ chunkedUpload(method_1, url_1) {
101788
+ return __awaiter(this, arguments, void 0, function* (method, url2, headers = {}, originalPayload = {}, onProgress) {
101789
+ var _a3;
101237
101790
  const [fileParam, file2] = (_a3 = Object.entries(originalPayload).find(([_2, value]) => value instanceof File)) !== null && _a3 !== void 0 ? _a3 : [];
101238
101791
  if (!file2 || !fileParam) {
101239
101792
  throw new Error("File not found in payload");
@@ -101275,9 +101828,9 @@ var Client = class _Client {
101275
101828
  return this.call("GET", new URL(this.config.endpoint + "/ping"));
101276
101829
  });
101277
101830
  }
101278
- call(method, url2, headers = {}, params = {}, responseType = "json") {
101279
- var _a3, _b;
101280
- return __awaiter(this, void 0, void 0, function* () {
101831
+ call(method_1, url_1) {
101832
+ return __awaiter(this, arguments, void 0, function* (method, url2, headers = {}, params = {}, responseType = "json") {
101833
+ var _a3, _b;
101281
101834
  const { uri, options } = this.prepareRequest(method, url2, headers, params);
101282
101835
  let data = null;
101283
101836
  const response = yield fetch(uri, options);
@@ -102785,7 +103338,7 @@ var Account = class {
102785
103338
  };
102786
103339
  }
102787
103340
  const provider = params.provider;
102788
- const success21 = params.success;
103341
+ const success22 = params.success;
102789
103342
  const failure = params.failure;
102790
103343
  const scopes = params.scopes;
102791
103344
  if (typeof provider === "undefined") {
@@ -102793,8 +103346,8 @@ var Account = class {
102793
103346
  }
102794
103347
  const apiPath = "/account/sessions/oauth2/{provider}".replace("{provider}", provider);
102795
103348
  const payload = {};
102796
- if (typeof success21 !== "undefined") {
102797
- payload["success"] = success21;
103349
+ if (typeof success22 !== "undefined") {
103350
+ payload["success"] = success22;
102798
103351
  }
102799
103352
  if (typeof failure !== "undefined") {
102800
103353
  payload["failure"] = failure;
@@ -103133,7 +103686,7 @@ var Account = class {
103133
103686
  };
103134
103687
  }
103135
103688
  const provider = params.provider;
103136
- const success21 = params.success;
103689
+ const success22 = params.success;
103137
103690
  const failure = params.failure;
103138
103691
  const scopes = params.scopes;
103139
103692
  if (typeof provider === "undefined") {
@@ -103141,8 +103694,8 @@ var Account = class {
103141
103694
  }
103142
103695
  const apiPath = "/account/tokens/oauth2/{provider}".replace("{provider}", provider);
103143
103696
  const payload = {};
103144
- if (typeof success21 !== "undefined") {
103145
- payload["success"] = success21;
103697
+ if (typeof success22 !== "undefined") {
103698
+ payload["success"] = success22;
103146
103699
  }
103147
103700
  if (typeof failure !== "undefined") {
103148
103701
  payload["failure"] = failure;
@@ -113764,15 +114317,26 @@ var Project = class {
113764
114317
  const apiHeaders = {};
113765
114318
  return this.client.call("get", uri, apiHeaders, payload);
113766
114319
  }
113767
- /**
113768
- * Get a list of all project variables. These variables will be accessible in all Appwrite Functions at runtime.
113769
- *
113770
- * @throws {AppwriteException}
113771
- * @returns {Promise<Models.VariableList>}
113772
- */
113773
- listVariables() {
114320
+ listVariables(paramsOrFirst, ...rest) {
114321
+ let params;
114322
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
114323
+ params = paramsOrFirst || {};
114324
+ } else {
114325
+ params = {
114326
+ queries: paramsOrFirst,
114327
+ total: rest[0]
114328
+ };
114329
+ }
114330
+ const queries = params.queries;
114331
+ const total = params.total;
113774
114332
  const apiPath = "/project/variables";
113775
114333
  const payload = {};
114334
+ if (typeof queries !== "undefined") {
114335
+ payload["queries"] = queries;
114336
+ }
114337
+ if (typeof total !== "undefined") {
114338
+ payload["total"] = total;
114339
+ }
113776
114340
  const uri = new URL(this.client.config.endpoint + apiPath);
113777
114341
  const apiHeaders = {};
113778
114342
  return this.client.call("get", uri, apiHeaders, payload);
@@ -113783,14 +114347,19 @@ var Project = class {
113783
114347
  params = paramsOrFirst || {};
113784
114348
  } else {
113785
114349
  params = {
113786
- key: paramsOrFirst,
113787
- value: rest[0],
113788
- secret: rest[1]
114350
+ variableId: paramsOrFirst,
114351
+ key: rest[0],
114352
+ value: rest[1],
114353
+ secret: rest[2]
113789
114354
  };
113790
114355
  }
114356
+ const variableId = params.variableId;
113791
114357
  const key = params.key;
113792
114358
  const value = params.value;
113793
114359
  const secret = params.secret;
114360
+ if (typeof variableId === "undefined") {
114361
+ throw new AppwriteException('Missing required parameter: "variableId"');
114362
+ }
113794
114363
  if (typeof key === "undefined") {
113795
114364
  throw new AppwriteException('Missing required parameter: "key"');
113796
114365
  }
@@ -113799,6 +114368,9 @@ var Project = class {
113799
114368
  }
113800
114369
  const apiPath = "/project/variables";
113801
114370
  const payload = {};
114371
+ if (typeof variableId !== "undefined") {
114372
+ payload["variableId"] = variableId;
114373
+ }
113802
114374
  if (typeof key !== "undefined") {
113803
114375
  payload["key"] = key;
113804
114376
  }
@@ -113852,9 +114424,6 @@ var Project = class {
113852
114424
  if (typeof variableId === "undefined") {
113853
114425
  throw new AppwriteException('Missing required parameter: "variableId"');
113854
114426
  }
113855
- if (typeof key === "undefined") {
113856
- throw new AppwriteException('Missing required parameter: "key"');
113857
- }
113858
114427
  const apiPath = "/project/variables/{variableId}".replace("{variableId}", variableId);
113859
114428
  const payload = {};
113860
114429
  if (typeof key !== "undefined") {
@@ -122352,6 +122921,35 @@ var Users = class {
122352
122921
  };
122353
122922
  return this.client.call("patch", uri, apiHeaders, payload);
122354
122923
  }
122924
+ updateImpersonator(paramsOrFirst, ...rest) {
122925
+ let params;
122926
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
122927
+ params = paramsOrFirst || {};
122928
+ } else {
122929
+ params = {
122930
+ userId: paramsOrFirst,
122931
+ impersonator: rest[0]
122932
+ };
122933
+ }
122934
+ const userId = params.userId;
122935
+ const impersonator = params.impersonator;
122936
+ if (typeof userId === "undefined") {
122937
+ throw new AppwriteException('Missing required parameter: "userId"');
122938
+ }
122939
+ if (typeof impersonator === "undefined") {
122940
+ throw new AppwriteException('Missing required parameter: "impersonator"');
122941
+ }
122942
+ const apiPath = "/users/{userId}/impersonator".replace("{userId}", userId);
122943
+ const payload = {};
122944
+ if (typeof impersonator !== "undefined") {
122945
+ payload["impersonator"] = impersonator;
122946
+ }
122947
+ const uri = new URL(this.client.config.endpoint + apiPath);
122948
+ const apiHeaders = {
122949
+ "content-type": "application/json"
122950
+ };
122951
+ return this.client.call("patch", uri, apiHeaders, payload);
122952
+ }
122355
122953
  createJWT(paramsOrFirst, ...rest) {
122356
122954
  let params;
122357
122955
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -123820,7 +124418,7 @@ Permission.delete = (role) => {
123820
124418
  };
123821
124419
  var _a2;
123822
124420
  var _ID_hexTimestamp;
123823
- var ID = class _ID {
124421
+ var ID = class {
123824
124422
  /**
123825
124423
  * Uses the provided ID as the ID for the resource.
123826
124424
  *
@@ -123837,7 +124435,7 @@ var ID = class _ID {
123837
124435
  * @returns {string}
123838
124436
  */
123839
124437
  static unique(padding = 7) {
123840
- const baseId = __classPrivateFieldGet(_ID, _a2, "m", _ID_hexTimestamp).call(_ID);
124438
+ const baseId = __classPrivateFieldGet(_a2, _a2, "m", _ID_hexTimestamp).call(_a2);
123841
124439
  let randomPadding = "";
123842
124440
  for (let i = 0; i < padding; i++) {
123843
124441
  const randomHexDigit = Math.floor(Math.random() * 16).toString(16);
@@ -123990,11 +124588,12 @@ Operator.dateSubDays = (days) => new Operator("dateSubDays", [days]).toString();
123990
124588
  Operator.dateSetNow = () => new Operator("dateSetNow", []).toString();
123991
124589
  var Scopes;
123992
124590
  (function(Scopes3) {
124591
+ Scopes3["Account"] = "account";
124592
+ Scopes3["TeamsRead"] = "teams.read";
124593
+ Scopes3["TeamsWrite"] = "teams.write";
123993
124594
  Scopes3["SessionsWrite"] = "sessions.write";
123994
124595
  Scopes3["UsersRead"] = "users.read";
123995
124596
  Scopes3["UsersWrite"] = "users.write";
123996
- Scopes3["TeamsRead"] = "teams.read";
123997
- Scopes3["TeamsWrite"] = "teams.write";
123998
124597
  Scopes3["DatabasesRead"] = "databases.read";
123999
124598
  Scopes3["DatabasesWrite"] = "databases.write";
124000
124599
  Scopes3["CollectionsRead"] = "collections.read";
@@ -124049,6 +124648,8 @@ var Scopes;
124049
124648
  Scopes3["TokensWrite"] = "tokens.write";
124050
124649
  Scopes3["WebhooksRead"] = "webhooks.read";
124051
124650
  Scopes3["WebhooksWrite"] = "webhooks.write";
124651
+ Scopes3["ProjectRead"] = "project.read";
124652
+ Scopes3["ProjectWrite"] = "project.write";
124052
124653
  Scopes3["PoliciesWrite"] = "policies.write";
124053
124654
  Scopes3["PoliciesRead"] = "policies.read";
124054
124655
  Scopes3["ArchivesRead"] = "archives.read";
@@ -124058,6 +124659,14 @@ var Scopes;
124058
124659
  Scopes3["DomainsRead"] = "domains.read";
124059
124660
  Scopes3["DomainsWrite"] = "domains.write";
124060
124661
  Scopes3["EventsRead"] = "events.read";
124662
+ Scopes3["PlatformsRead"] = "platforms.read";
124663
+ Scopes3["PlatformsWrite"] = "platforms.write";
124664
+ Scopes3["ProjectsRead"] = "projects.read";
124665
+ Scopes3["ProjectsWrite"] = "projects.write";
124666
+ Scopes3["KeysRead"] = "keys.read";
124667
+ Scopes3["KeysWrite"] = "keys.write";
124668
+ Scopes3["DevKeysRead"] = "devKeys.read";
124669
+ Scopes3["DevKeysWrite"] = "devKeys.write";
124061
124670
  })(Scopes || (Scopes = {}));
124062
124671
  var AuthenticatorType;
124063
124672
  (function(AuthenticatorType2) {
@@ -124810,6 +125419,9 @@ var ImageFormat;
124810
125419
  var BackupServices;
124811
125420
  (function(BackupServices2) {
124812
125421
  BackupServices2["Databases"] = "databases";
125422
+ BackupServices2["Tablesdb"] = "tablesdb";
125423
+ BackupServices2["Documentsdb"] = "documentsdb";
125424
+ BackupServices2["Vectorsdb"] = "vectorsdb";
124813
125425
  BackupServices2["Functions"] = "functions";
124814
125426
  BackupServices2["Storage"] = "storage";
124815
125427
  })(BackupServices || (BackupServices = {}));
@@ -124841,13 +125453,13 @@ var RelationMutate;
124841
125453
  RelationMutate2["Restrict"] = "restrict";
124842
125454
  RelationMutate2["SetNull"] = "setNull";
124843
125455
  })(RelationMutate || (RelationMutate = {}));
124844
- var IndexType;
124845
- (function(IndexType2) {
124846
- IndexType2["Key"] = "key";
124847
- IndexType2["Fulltext"] = "fulltext";
124848
- IndexType2["Unique"] = "unique";
124849
- IndexType2["Spatial"] = "spatial";
124850
- })(IndexType || (IndexType = {}));
125456
+ var DatabasesIndexType;
125457
+ (function(DatabasesIndexType2) {
125458
+ DatabasesIndexType2["Key"] = "key";
125459
+ DatabasesIndexType2["Fulltext"] = "fulltext";
125460
+ DatabasesIndexType2["Unique"] = "unique";
125461
+ DatabasesIndexType2["Spatial"] = "spatial";
125462
+ })(DatabasesIndexType || (DatabasesIndexType = {}));
124851
125463
  var OrderBy;
124852
125464
  (function(OrderBy2) {
124853
125465
  OrderBy2["Asc"] = "asc";
@@ -124953,92 +125565,6 @@ var Runtime;
124953
125565
  Runtime2["Flutter332"] = "flutter-3.32";
124954
125566
  Runtime2["Flutter335"] = "flutter-3.35";
124955
125567
  Runtime2["Flutter338"] = "flutter-3.38";
124956
- Runtime2["Node145rc"] = "node-14.5-rc";
124957
- Runtime2["Node160rc"] = "node-16.0-rc";
124958
- Runtime2["Node180rc"] = "node-18.0-rc";
124959
- Runtime2["Node190rc"] = "node-19.0-rc";
124960
- Runtime2["Node200rc"] = "node-20.0-rc";
124961
- Runtime2["Node210rc"] = "node-21.0-rc";
124962
- Runtime2["Node22rc"] = "node-22-rc";
124963
- Runtime2["Node23rc"] = "node-23-rc";
124964
- Runtime2["Node24rc"] = "node-24-rc";
124965
- Runtime2["Node25rc"] = "node-25-rc";
124966
- Runtime2["Php80rc"] = "php-8.0-rc";
124967
- Runtime2["Php81rc"] = "php-8.1-rc";
124968
- Runtime2["Php82rc"] = "php-8.2-rc";
124969
- Runtime2["Php83rc"] = "php-8.3-rc";
124970
- Runtime2["Php84rc"] = "php-8.4-rc";
124971
- Runtime2["Ruby30rc"] = "ruby-3.0-rc";
124972
- Runtime2["Ruby31rc"] = "ruby-3.1-rc";
124973
- Runtime2["Ruby32rc"] = "ruby-3.2-rc";
124974
- Runtime2["Ruby33rc"] = "ruby-3.3-rc";
124975
- Runtime2["Ruby34rc"] = "ruby-3.4-rc";
124976
- Runtime2["Ruby40rc"] = "ruby-4.0-rc";
124977
- Runtime2["Python38rc"] = "python-3.8-rc";
124978
- Runtime2["Python39rc"] = "python-3.9-rc";
124979
- Runtime2["Python310rc"] = "python-3.10-rc";
124980
- Runtime2["Python311rc"] = "python-3.11-rc";
124981
- Runtime2["Python312rc"] = "python-3.12-rc";
124982
- Runtime2["Python313rc"] = "python-3.13-rc";
124983
- Runtime2["Python314rc"] = "python-3.14-rc";
124984
- Runtime2["Pythonml311rc"] = "python-ml-3.11-rc";
124985
- Runtime2["Pythonml312rc"] = "python-ml-3.12-rc";
124986
- Runtime2["Pythonml313rc"] = "python-ml-3.13-rc";
124987
- Runtime2["Deno140rc"] = "deno-1.40-rc";
124988
- Runtime2["Deno146rc"] = "deno-1.46-rc";
124989
- Runtime2["Deno20rc"] = "deno-2.0-rc";
124990
- Runtime2["Deno25rc"] = "deno-2.5-rc";
124991
- Runtime2["Deno26rc"] = "deno-2.6-rc";
124992
- Runtime2["Dart215rc"] = "dart-2.15-rc";
124993
- Runtime2["Dart216rc"] = "dart-2.16-rc";
124994
- Runtime2["Dart217rc"] = "dart-2.17-rc";
124995
- Runtime2["Dart218rc"] = "dart-2.18-rc";
124996
- Runtime2["Dart219rc"] = "dart-2.19-rc";
124997
- Runtime2["Dart30rc"] = "dart-3.0-rc";
124998
- Runtime2["Dart31rc"] = "dart-3.1-rc";
124999
- Runtime2["Dart33rc"] = "dart-3.3-rc";
125000
- Runtime2["Dart35rc"] = "dart-3.5-rc";
125001
- Runtime2["Dart38rc"] = "dart-3.8-rc";
125002
- Runtime2["Dart39rc"] = "dart-3.9-rc";
125003
- Runtime2["Dart310rc"] = "dart-3.10-rc";
125004
- Runtime2["Dotnet60rc"] = "dotnet-6.0-rc";
125005
- Runtime2["Dotnet70rc"] = "dotnet-7.0-rc";
125006
- Runtime2["Dotnet80rc"] = "dotnet-8.0-rc";
125007
- Runtime2["Dotnet10rc"] = "dotnet-10-rc";
125008
- Runtime2["Java80rc"] = "java-8.0-rc";
125009
- Runtime2["Java110rc"] = "java-11.0-rc";
125010
- Runtime2["Java170rc"] = "java-17.0-rc";
125011
- Runtime2["Java180rc"] = "java-18.0-rc";
125012
- Runtime2["Java210rc"] = "java-21.0-rc";
125013
- Runtime2["Java22rc"] = "java-22-rc";
125014
- Runtime2["Java25rc"] = "java-25-rc";
125015
- Runtime2["Swift55rc"] = "swift-5.5-rc";
125016
- Runtime2["Swift58rc"] = "swift-5.8-rc";
125017
- Runtime2["Swift59rc"] = "swift-5.9-rc";
125018
- Runtime2["Swift510rc"] = "swift-5.10-rc";
125019
- Runtime2["Swift62rc"] = "swift-6.2-rc";
125020
- Runtime2["Kotlin16rc"] = "kotlin-1.6-rc";
125021
- Runtime2["Kotlin18rc"] = "kotlin-1.8-rc";
125022
- Runtime2["Kotlin19rc"] = "kotlin-1.9-rc";
125023
- Runtime2["Kotlin20rc"] = "kotlin-2.0-rc";
125024
- Runtime2["Kotlin23rc"] = "kotlin-2.3-rc";
125025
- Runtime2["Cpp17rc"] = "cpp-17-rc";
125026
- Runtime2["Cpp20rc"] = "cpp-20-rc";
125027
- Runtime2["Bun10rc"] = "bun-1.0-rc";
125028
- Runtime2["Bun11rc"] = "bun-1.1-rc";
125029
- Runtime2["Bun12rc"] = "bun-1.2-rc";
125030
- Runtime2["Bun13rc"] = "bun-1.3-rc";
125031
- Runtime2["Go123rc"] = "go-1.23-rc";
125032
- Runtime2["Go124rc"] = "go-1.24-rc";
125033
- Runtime2["Go125rc"] = "go-1.25-rc";
125034
- Runtime2["Go126rc"] = "go-1.26-rc";
125035
- Runtime2["Static1rc"] = "static-1-rc";
125036
- Runtime2["Flutter324rc"] = "flutter-3.24-rc";
125037
- Runtime2["Flutter327rc"] = "flutter-3.27-rc";
125038
- Runtime2["Flutter329rc"] = "flutter-3.29-rc";
125039
- Runtime2["Flutter332rc"] = "flutter-3.32-rc";
125040
- Runtime2["Flutter335rc"] = "flutter-3.35-rc";
125041
- Runtime2["Flutter338rc"] = "flutter-3.38-rc";
125042
125568
  })(Runtime || (Runtime = {}));
125043
125569
  var Runtimes;
125044
125570
  (function(Runtimes2) {
@@ -125128,109 +125654,28 @@ var Runtimes;
125128
125654
  Runtimes2["Flutter332"] = "flutter-3.32";
125129
125655
  Runtimes2["Flutter335"] = "flutter-3.35";
125130
125656
  Runtimes2["Flutter338"] = "flutter-3.38";
125131
- Runtimes2["Node145rc"] = "node-14.5-rc";
125132
- Runtimes2["Node160rc"] = "node-16.0-rc";
125133
- Runtimes2["Node180rc"] = "node-18.0-rc";
125134
- Runtimes2["Node190rc"] = "node-19.0-rc";
125135
- Runtimes2["Node200rc"] = "node-20.0-rc";
125136
- Runtimes2["Node210rc"] = "node-21.0-rc";
125137
- Runtimes2["Node22rc"] = "node-22-rc";
125138
- Runtimes2["Node23rc"] = "node-23-rc";
125139
- Runtimes2["Node24rc"] = "node-24-rc";
125140
- Runtimes2["Node25rc"] = "node-25-rc";
125141
- Runtimes2["Php80rc"] = "php-8.0-rc";
125142
- Runtimes2["Php81rc"] = "php-8.1-rc";
125143
- Runtimes2["Php82rc"] = "php-8.2-rc";
125144
- Runtimes2["Php83rc"] = "php-8.3-rc";
125145
- Runtimes2["Php84rc"] = "php-8.4-rc";
125146
- Runtimes2["Ruby30rc"] = "ruby-3.0-rc";
125147
- Runtimes2["Ruby31rc"] = "ruby-3.1-rc";
125148
- Runtimes2["Ruby32rc"] = "ruby-3.2-rc";
125149
- Runtimes2["Ruby33rc"] = "ruby-3.3-rc";
125150
- Runtimes2["Ruby34rc"] = "ruby-3.4-rc";
125151
- Runtimes2["Ruby40rc"] = "ruby-4.0-rc";
125152
- Runtimes2["Python38rc"] = "python-3.8-rc";
125153
- Runtimes2["Python39rc"] = "python-3.9-rc";
125154
- Runtimes2["Python310rc"] = "python-3.10-rc";
125155
- Runtimes2["Python311rc"] = "python-3.11-rc";
125156
- Runtimes2["Python312rc"] = "python-3.12-rc";
125157
- Runtimes2["Python313rc"] = "python-3.13-rc";
125158
- Runtimes2["Python314rc"] = "python-3.14-rc";
125159
- Runtimes2["Pythonml311rc"] = "python-ml-3.11-rc";
125160
- Runtimes2["Pythonml312rc"] = "python-ml-3.12-rc";
125161
- Runtimes2["Pythonml313rc"] = "python-ml-3.13-rc";
125162
- Runtimes2["Deno140rc"] = "deno-1.40-rc";
125163
- Runtimes2["Deno146rc"] = "deno-1.46-rc";
125164
- Runtimes2["Deno20rc"] = "deno-2.0-rc";
125165
- Runtimes2["Deno25rc"] = "deno-2.5-rc";
125166
- Runtimes2["Deno26rc"] = "deno-2.6-rc";
125167
- Runtimes2["Dart215rc"] = "dart-2.15-rc";
125168
- Runtimes2["Dart216rc"] = "dart-2.16-rc";
125169
- Runtimes2["Dart217rc"] = "dart-2.17-rc";
125170
- Runtimes2["Dart218rc"] = "dart-2.18-rc";
125171
- Runtimes2["Dart219rc"] = "dart-2.19-rc";
125172
- Runtimes2["Dart30rc"] = "dart-3.0-rc";
125173
- Runtimes2["Dart31rc"] = "dart-3.1-rc";
125174
- Runtimes2["Dart33rc"] = "dart-3.3-rc";
125175
- Runtimes2["Dart35rc"] = "dart-3.5-rc";
125176
- Runtimes2["Dart38rc"] = "dart-3.8-rc";
125177
- Runtimes2["Dart39rc"] = "dart-3.9-rc";
125178
- Runtimes2["Dart310rc"] = "dart-3.10-rc";
125179
- Runtimes2["Dotnet60rc"] = "dotnet-6.0-rc";
125180
- Runtimes2["Dotnet70rc"] = "dotnet-7.0-rc";
125181
- Runtimes2["Dotnet80rc"] = "dotnet-8.0-rc";
125182
- Runtimes2["Dotnet10rc"] = "dotnet-10-rc";
125183
- Runtimes2["Java80rc"] = "java-8.0-rc";
125184
- Runtimes2["Java110rc"] = "java-11.0-rc";
125185
- Runtimes2["Java170rc"] = "java-17.0-rc";
125186
- Runtimes2["Java180rc"] = "java-18.0-rc";
125187
- Runtimes2["Java210rc"] = "java-21.0-rc";
125188
- Runtimes2["Java22rc"] = "java-22-rc";
125189
- Runtimes2["Java25rc"] = "java-25-rc";
125190
- Runtimes2["Swift55rc"] = "swift-5.5-rc";
125191
- Runtimes2["Swift58rc"] = "swift-5.8-rc";
125192
- Runtimes2["Swift59rc"] = "swift-5.9-rc";
125193
- Runtimes2["Swift510rc"] = "swift-5.10-rc";
125194
- Runtimes2["Swift62rc"] = "swift-6.2-rc";
125195
- Runtimes2["Kotlin16rc"] = "kotlin-1.6-rc";
125196
- Runtimes2["Kotlin18rc"] = "kotlin-1.8-rc";
125197
- Runtimes2["Kotlin19rc"] = "kotlin-1.9-rc";
125198
- Runtimes2["Kotlin20rc"] = "kotlin-2.0-rc";
125199
- Runtimes2["Kotlin23rc"] = "kotlin-2.3-rc";
125200
- Runtimes2["Cpp17rc"] = "cpp-17-rc";
125201
- Runtimes2["Cpp20rc"] = "cpp-20-rc";
125202
- Runtimes2["Bun10rc"] = "bun-1.0-rc";
125203
- Runtimes2["Bun11rc"] = "bun-1.1-rc";
125204
- Runtimes2["Bun12rc"] = "bun-1.2-rc";
125205
- Runtimes2["Bun13rc"] = "bun-1.3-rc";
125206
- Runtimes2["Go123rc"] = "go-1.23-rc";
125207
- Runtimes2["Go124rc"] = "go-1.24-rc";
125208
- Runtimes2["Go125rc"] = "go-1.25-rc";
125209
- Runtimes2["Go126rc"] = "go-1.26-rc";
125210
- Runtimes2["Static1rc"] = "static-1-rc";
125211
- Runtimes2["Flutter324rc"] = "flutter-3.24-rc";
125212
- Runtimes2["Flutter327rc"] = "flutter-3.27-rc";
125213
- Runtimes2["Flutter329rc"] = "flutter-3.29-rc";
125214
- Runtimes2["Flutter332rc"] = "flutter-3.32-rc";
125215
- Runtimes2["Flutter335rc"] = "flutter-3.35-rc";
125216
- Runtimes2["Flutter338rc"] = "flutter-3.38-rc";
125217
125657
  })(Runtimes || (Runtimes = {}));
125218
125658
  var UseCases;
125219
125659
  (function(UseCases2) {
125220
- UseCases2["Portfolio"] = "portfolio";
125221
125660
  UseCases2["Starter"] = "starter";
125661
+ UseCases2["Databases"] = "databases";
125662
+ UseCases2["Ai"] = "ai";
125663
+ UseCases2["Messaging"] = "messaging";
125664
+ UseCases2["Utilities"] = "utilities";
125665
+ UseCases2["Devtools"] = "dev-tools";
125666
+ UseCases2["Auth"] = "auth";
125667
+ UseCases2["Portfolio"] = "portfolio";
125222
125668
  UseCases2["Events"] = "events";
125223
125669
  UseCases2["Ecommerce"] = "ecommerce";
125224
125670
  UseCases2["Documentation"] = "documentation";
125225
125671
  UseCases2["Blog"] = "blog";
125226
- UseCases2["Ai"] = "ai";
125227
125672
  UseCases2["Forms"] = "forms";
125228
125673
  UseCases2["Dashboard"] = "dashboard";
125229
125674
  })(UseCases || (UseCases = {}));
125230
125675
  var TemplateReferenceType;
125231
125676
  (function(TemplateReferenceType2) {
125232
- TemplateReferenceType2["Branch"] = "branch";
125233
125677
  TemplateReferenceType2["Commit"] = "commit";
125678
+ TemplateReferenceType2["Branch"] = "branch";
125234
125679
  TemplateReferenceType2["Tag"] = "tag";
125235
125680
  })(TemplateReferenceType || (TemplateReferenceType = {}));
125236
125681
  var VCSReferenceType;
@@ -125294,6 +125739,8 @@ var AppwriteMigrationResource;
125294
125739
  AppwriteMigrationResource2["Document"] = "document";
125295
125740
  AppwriteMigrationResource2["Attribute"] = "attribute";
125296
125741
  AppwriteMigrationResource2["Collection"] = "collection";
125742
+ AppwriteMigrationResource2["Documentsdb"] = "documentsdb";
125743
+ AppwriteMigrationResource2["Vectorsdb"] = "vectorsdb";
125297
125744
  AppwriteMigrationResource2["Bucket"] = "bucket";
125298
125745
  AppwriteMigrationResource2["File"] = "file";
125299
125746
  AppwriteMigrationResource2["Function"] = "function";
@@ -125831,92 +126278,6 @@ var BuildRuntime;
125831
126278
  BuildRuntime2["Flutter332"] = "flutter-3.32";
125832
126279
  BuildRuntime2["Flutter335"] = "flutter-3.35";
125833
126280
  BuildRuntime2["Flutter338"] = "flutter-3.38";
125834
- BuildRuntime2["Node145rc"] = "node-14.5-rc";
125835
- BuildRuntime2["Node160rc"] = "node-16.0-rc";
125836
- BuildRuntime2["Node180rc"] = "node-18.0-rc";
125837
- BuildRuntime2["Node190rc"] = "node-19.0-rc";
125838
- BuildRuntime2["Node200rc"] = "node-20.0-rc";
125839
- BuildRuntime2["Node210rc"] = "node-21.0-rc";
125840
- BuildRuntime2["Node22rc"] = "node-22-rc";
125841
- BuildRuntime2["Node23rc"] = "node-23-rc";
125842
- BuildRuntime2["Node24rc"] = "node-24-rc";
125843
- BuildRuntime2["Node25rc"] = "node-25-rc";
125844
- BuildRuntime2["Php80rc"] = "php-8.0-rc";
125845
- BuildRuntime2["Php81rc"] = "php-8.1-rc";
125846
- BuildRuntime2["Php82rc"] = "php-8.2-rc";
125847
- BuildRuntime2["Php83rc"] = "php-8.3-rc";
125848
- BuildRuntime2["Php84rc"] = "php-8.4-rc";
125849
- BuildRuntime2["Ruby30rc"] = "ruby-3.0-rc";
125850
- BuildRuntime2["Ruby31rc"] = "ruby-3.1-rc";
125851
- BuildRuntime2["Ruby32rc"] = "ruby-3.2-rc";
125852
- BuildRuntime2["Ruby33rc"] = "ruby-3.3-rc";
125853
- BuildRuntime2["Ruby34rc"] = "ruby-3.4-rc";
125854
- BuildRuntime2["Ruby40rc"] = "ruby-4.0-rc";
125855
- BuildRuntime2["Python38rc"] = "python-3.8-rc";
125856
- BuildRuntime2["Python39rc"] = "python-3.9-rc";
125857
- BuildRuntime2["Python310rc"] = "python-3.10-rc";
125858
- BuildRuntime2["Python311rc"] = "python-3.11-rc";
125859
- BuildRuntime2["Python312rc"] = "python-3.12-rc";
125860
- BuildRuntime2["Python313rc"] = "python-3.13-rc";
125861
- BuildRuntime2["Python314rc"] = "python-3.14-rc";
125862
- BuildRuntime2["Pythonml311rc"] = "python-ml-3.11-rc";
125863
- BuildRuntime2["Pythonml312rc"] = "python-ml-3.12-rc";
125864
- BuildRuntime2["Pythonml313rc"] = "python-ml-3.13-rc";
125865
- BuildRuntime2["Deno140rc"] = "deno-1.40-rc";
125866
- BuildRuntime2["Deno146rc"] = "deno-1.46-rc";
125867
- BuildRuntime2["Deno20rc"] = "deno-2.0-rc";
125868
- BuildRuntime2["Deno25rc"] = "deno-2.5-rc";
125869
- BuildRuntime2["Deno26rc"] = "deno-2.6-rc";
125870
- BuildRuntime2["Dart215rc"] = "dart-2.15-rc";
125871
- BuildRuntime2["Dart216rc"] = "dart-2.16-rc";
125872
- BuildRuntime2["Dart217rc"] = "dart-2.17-rc";
125873
- BuildRuntime2["Dart218rc"] = "dart-2.18-rc";
125874
- BuildRuntime2["Dart219rc"] = "dart-2.19-rc";
125875
- BuildRuntime2["Dart30rc"] = "dart-3.0-rc";
125876
- BuildRuntime2["Dart31rc"] = "dart-3.1-rc";
125877
- BuildRuntime2["Dart33rc"] = "dart-3.3-rc";
125878
- BuildRuntime2["Dart35rc"] = "dart-3.5-rc";
125879
- BuildRuntime2["Dart38rc"] = "dart-3.8-rc";
125880
- BuildRuntime2["Dart39rc"] = "dart-3.9-rc";
125881
- BuildRuntime2["Dart310rc"] = "dart-3.10-rc";
125882
- BuildRuntime2["Dotnet60rc"] = "dotnet-6.0-rc";
125883
- BuildRuntime2["Dotnet70rc"] = "dotnet-7.0-rc";
125884
- BuildRuntime2["Dotnet80rc"] = "dotnet-8.0-rc";
125885
- BuildRuntime2["Dotnet10rc"] = "dotnet-10-rc";
125886
- BuildRuntime2["Java80rc"] = "java-8.0-rc";
125887
- BuildRuntime2["Java110rc"] = "java-11.0-rc";
125888
- BuildRuntime2["Java170rc"] = "java-17.0-rc";
125889
- BuildRuntime2["Java180rc"] = "java-18.0-rc";
125890
- BuildRuntime2["Java210rc"] = "java-21.0-rc";
125891
- BuildRuntime2["Java22rc"] = "java-22-rc";
125892
- BuildRuntime2["Java25rc"] = "java-25-rc";
125893
- BuildRuntime2["Swift55rc"] = "swift-5.5-rc";
125894
- BuildRuntime2["Swift58rc"] = "swift-5.8-rc";
125895
- BuildRuntime2["Swift59rc"] = "swift-5.9-rc";
125896
- BuildRuntime2["Swift510rc"] = "swift-5.10-rc";
125897
- BuildRuntime2["Swift62rc"] = "swift-6.2-rc";
125898
- BuildRuntime2["Kotlin16rc"] = "kotlin-1.6-rc";
125899
- BuildRuntime2["Kotlin18rc"] = "kotlin-1.8-rc";
125900
- BuildRuntime2["Kotlin19rc"] = "kotlin-1.9-rc";
125901
- BuildRuntime2["Kotlin20rc"] = "kotlin-2.0-rc";
125902
- BuildRuntime2["Kotlin23rc"] = "kotlin-2.3-rc";
125903
- BuildRuntime2["Cpp17rc"] = "cpp-17-rc";
125904
- BuildRuntime2["Cpp20rc"] = "cpp-20-rc";
125905
- BuildRuntime2["Bun10rc"] = "bun-1.0-rc";
125906
- BuildRuntime2["Bun11rc"] = "bun-1.1-rc";
125907
- BuildRuntime2["Bun12rc"] = "bun-1.2-rc";
125908
- BuildRuntime2["Bun13rc"] = "bun-1.3-rc";
125909
- BuildRuntime2["Go123rc"] = "go-1.23-rc";
125910
- BuildRuntime2["Go124rc"] = "go-1.24-rc";
125911
- BuildRuntime2["Go125rc"] = "go-1.25-rc";
125912
- BuildRuntime2["Go126rc"] = "go-1.26-rc";
125913
- BuildRuntime2["Static1rc"] = "static-1-rc";
125914
- BuildRuntime2["Flutter324rc"] = "flutter-3.24-rc";
125915
- BuildRuntime2["Flutter327rc"] = "flutter-3.27-rc";
125916
- BuildRuntime2["Flutter329rc"] = "flutter-3.29-rc";
125917
- BuildRuntime2["Flutter332rc"] = "flutter-3.32-rc";
125918
- BuildRuntime2["Flutter335rc"] = "flutter-3.35-rc";
125919
- BuildRuntime2["Flutter338rc"] = "flutter-3.38-rc";
125920
126281
  })(BuildRuntime || (BuildRuntime = {}));
125921
126282
  var Adapter;
125922
126283
  (function(Adapter2) {
@@ -125959,6 +126320,13 @@ var ImageGravity;
125959
126320
  ImageGravity2["Bottom"] = "bottom";
125960
126321
  ImageGravity2["Bottomright"] = "bottom-right";
125961
126322
  })(ImageGravity || (ImageGravity = {}));
126323
+ var TablesDBIndexType;
126324
+ (function(TablesDBIndexType2) {
126325
+ TablesDBIndexType2["Key"] = "key";
126326
+ TablesDBIndexType2["Fulltext"] = "fulltext";
126327
+ TablesDBIndexType2["Unique"] = "unique";
126328
+ TablesDBIndexType2["Spatial"] = "spatial";
126329
+ })(TablesDBIndexType || (TablesDBIndexType = {}));
125962
126330
  var PasswordHash;
125963
126331
  (function(PasswordHash2) {
125964
126332
  PasswordHash2["Sha1"] = "sha1";
@@ -125988,6 +126356,8 @@ var DatabaseType;
125988
126356
  (function(DatabaseType2) {
125989
126357
  DatabaseType2["Legacy"] = "legacy";
125990
126358
  DatabaseType2["Tablesdb"] = "tablesdb";
126359
+ DatabaseType2["Documentsdb"] = "documentsdb";
126360
+ DatabaseType2["Vectorsdb"] = "vectorsdb";
125991
126361
  })(DatabaseType || (DatabaseType = {}));
125992
126362
  var AttributeStatus;
125993
126363
  (function(AttributeStatus2) {
@@ -126093,10 +126463,14 @@ var DomainPurchaseStatus;
126093
126463
  })(DomainPurchaseStatus || (DomainPurchaseStatus = {}));
126094
126464
 
126095
126465
  // lib/parser.ts
126466
+ BigInt.prototype.toJSON = function() {
126467
+ return this.toString();
126468
+ };
126096
126469
  var { description } = package_default;
126097
126470
  var cliConfig = {
126098
126471
  verbose: false,
126099
126472
  json: false,
126473
+ raw: false,
126100
126474
  force: false,
126101
126475
  all: false,
126102
126476
  ids: [],
@@ -126119,34 +126493,108 @@ var extractReportCommandArgs = (value) => {
126119
126493
  }
126120
126494
  return reportData.data.args;
126121
126495
  };
126496
+ var filterObject = (obj) => {
126497
+ const result = {};
126498
+ for (const key of Object.keys(obj)) {
126499
+ const value = obj[key];
126500
+ if (typeof value === "function") continue;
126501
+ if (value == null) continue;
126502
+ if (value?.constructor?.name === "BigNumber") {
126503
+ result[key] = String(value);
126504
+ continue;
126505
+ }
126506
+ if (typeof value === "object") continue;
126507
+ if (typeof value === "string" && value.trim() === "") continue;
126508
+ result[key] = value;
126509
+ }
126510
+ return result;
126511
+ };
126512
+ var filterData = (data) => {
126513
+ const result = {};
126514
+ for (const key of Object.keys(data)) {
126515
+ const value = data[key];
126516
+ if (typeof value === "function") continue;
126517
+ if (value == null) continue;
126518
+ if (value?.constructor?.name === "BigNumber") {
126519
+ result[key] = String(value);
126520
+ continue;
126521
+ }
126522
+ if (Array.isArray(value)) {
126523
+ result[key] = value.map((item) => {
126524
+ if (item?.constructor?.name === "BigNumber") return String(item);
126525
+ return item && typeof item === "object" && !Array.isArray(item) ? filterObject(item) : item;
126526
+ });
126527
+ } else if (typeof value === "object") {
126528
+ continue;
126529
+ } else if (typeof value === "string" && value.trim() === "") {
126530
+ continue;
126531
+ } else {
126532
+ result[key] = value;
126533
+ }
126534
+ }
126535
+ return result;
126536
+ };
126122
126537
  var parse3 = (data) => {
126123
- if (cliConfig.json) {
126538
+ if (cliConfig.raw) {
126124
126539
  drawJSON(data);
126125
126540
  return;
126126
126541
  }
126127
- for (const key in data) {
126128
- if (data[key] === null) {
126542
+ if (cliConfig.json) {
126543
+ drawJSON(filterData(data));
126544
+ return;
126545
+ }
126546
+ const keys = Object.keys(data).filter((k2) => typeof data[k2] !== "function");
126547
+ let printedScalar = false;
126548
+ for (const key of keys) {
126549
+ const value = data[key];
126550
+ if (value === null) {
126129
126551
  console.log(`${import_chalk.default.yellow.bold(key)} : null`);
126130
- } else if (Array.isArray(data[key])) {
126552
+ printedScalar = true;
126553
+ } else if (Array.isArray(value)) {
126554
+ if (printedScalar) console.log("");
126131
126555
  console.log(`${import_chalk.default.yellow.bold.underline(key)}`);
126132
- if (typeof data[key][0] === "object") {
126133
- drawTable(data[key]);
126556
+ if (typeof value[0] === "object") {
126557
+ drawTable(value);
126134
126558
  } else {
126135
- drawJSON(data[key]);
126136
- }
126137
- } else if (typeof data[key] === "object") {
126138
- if (data[key]?.constructor?.name === "BigNumber") {
126139
- console.log(`${import_chalk.default.yellow.bold(key)} : ${data[key]}`);
126559
+ drawJSON(value);
126560
+ }
126561
+ printedScalar = false;
126562
+ } else if (typeof value === "object") {
126563
+ if (printedScalar) console.log("");
126564
+ if (value?.constructor?.name === "BigNumber") {
126565
+ console.log(`${import_chalk.default.yellow.bold(key)} : ${value}`);
126566
+ printedScalar = true;
126140
126567
  } else {
126141
126568
  console.log(`${import_chalk.default.yellow.bold.underline(key)}`);
126142
- const tableRow = toJsonObject(data[key]) ?? {};
126569
+ const tableRow = toJsonObject(value) ?? {};
126143
126570
  drawTable([tableRow]);
126571
+ printedScalar = false;
126144
126572
  }
126145
126573
  } else {
126146
- console.log(`${import_chalk.default.yellow.bold(key)} : ${data[key]}`);
126574
+ console.log(`${import_chalk.default.yellow.bold(key)} : ${value}`);
126575
+ printedScalar = true;
126147
126576
  }
126148
126577
  }
126149
126578
  };
126579
+ var MAX_COL_WIDTH = 40;
126580
+ var formatCellValue = (value) => {
126581
+ if (value == null) return "-";
126582
+ if (Array.isArray(value)) {
126583
+ if (value.length === 0) return "[]";
126584
+ return `[${value.length} items]`;
126585
+ }
126586
+ if (typeof value === "object") {
126587
+ if (value?.constructor?.name === "BigNumber") return String(value);
126588
+ const keys = Object.keys(value);
126589
+ if (keys.length === 0) return "{}";
126590
+ return `{${keys.length} keys}`;
126591
+ }
126592
+ const str = String(value);
126593
+ if (str.length > MAX_COL_WIDTH) {
126594
+ return str.slice(0, MAX_COL_WIDTH - 1) + "\u2026";
126595
+ }
126596
+ return str;
126597
+ };
126150
126598
  var drawTable = (data) => {
126151
126599
  if (data.length == 0) {
126152
126600
  console.log("[]");
@@ -126154,19 +126602,55 @@ var drawTable = (data) => {
126154
126602
  }
126155
126603
  const rows = data.map((item) => toJsonObject(item) ?? {});
126156
126604
  const obj = rows.reduce((res, item) => ({ ...res, ...item }), {});
126157
- const keys = Object.keys(obj);
126158
- if (keys.length === 0) {
126605
+ const allKeys = Object.keys(obj);
126606
+ if (allKeys.length === 0) {
126159
126607
  drawJSON(data);
126160
126608
  return;
126161
126609
  }
126162
- const def = keys.reduce((result, key) => {
126610
+ const maxColumns = 6;
126611
+ if (allKeys.length > maxColumns) {
126612
+ const rowEntries = rows.map((row) => {
126613
+ const entries = [];
126614
+ for (const key of Object.keys(row)) {
126615
+ const value = row[key];
126616
+ if (typeof value === "function") continue;
126617
+ if (value == null) continue;
126618
+ if (value?.constructor?.name === "BigNumber") {
126619
+ entries.push([key, String(value)]);
126620
+ continue;
126621
+ }
126622
+ if (typeof value === "object") continue;
126623
+ if (typeof value === "string" && value.trim() === "") continue;
126624
+ entries.push([key, String(value)]);
126625
+ }
126626
+ return entries;
126627
+ });
126628
+ const flatEntries = rowEntries.flat();
126629
+ if (flatEntries.length === 0) {
126630
+ drawJSON(data);
126631
+ return;
126632
+ }
126633
+ const maxKeyLen = Math.max(...flatEntries.map(([key]) => key.length));
126634
+ const separatorLen = Math.min(maxKeyLen + 2 + MAX_COL_WIDTH, process.stdout.columns || 80);
126635
+ rowEntries.forEach((entries, idx) => {
126636
+ if (idx > 0) console.log(import_chalk.default.cyan("\u2500".repeat(separatorLen)));
126637
+ for (const [key, value] of entries) {
126638
+ const paddedKey = key.padEnd(maxKeyLen);
126639
+ console.log(`${import_chalk.default.yellow.bold(paddedKey)} ${value}`);
126640
+ }
126641
+ });
126642
+ return;
126643
+ }
126644
+ const columns = allKeys;
126645
+ const def = allKeys.reduce((result, key) => {
126163
126646
  result[key] = "-";
126164
126647
  return result;
126165
126648
  }, {});
126166
126649
  const normalizedData = rows.map((item) => ({ ...def, ...item }));
126167
- const columns = Object.keys(normalizedData[0]);
126168
126650
  const table = new import_cli_table3.default({
126169
126651
  head: columns.map((c) => import_chalk.default.cyan.italic.bold(c)),
126652
+ colWidths: columns.map(() => null),
126653
+ wordWrap: false,
126170
126654
  chars: {
126171
126655
  top: " ",
126172
126656
  "top-mid": " ",
@@ -126188,15 +126672,7 @@ var drawTable = (data) => {
126188
126672
  normalizedData.forEach((row) => {
126189
126673
  const rowValues = [];
126190
126674
  for (const key of columns) {
126191
- if (row[key] == null) {
126192
- rowValues.push("-");
126193
- } else if (Array.isArray(row[key])) {
126194
- rowValues.push(JSON.stringify(row[key]));
126195
- } else if (typeof row[key] === "object") {
126196
- rowValues.push(JSON.stringify(row[key]));
126197
- } else {
126198
- rowValues.push(String(row[key]));
126199
- }
126675
+ rowValues.push(formatCellValue(row[key]));
126200
126676
  }
126201
126677
  table.push(rowValues);
126202
126678
  });
@@ -126324,7 +126800,7 @@ var commandDescriptions = {
126324
126800
  locale: `The locale command allows you to customize your app based on your users' location.`,
126325
126801
  sites: `The sites command allows you to view, create and manage your Appwrite Sites.`,
126326
126802
  storage: `The storage command allows you to manage your project files.`,
126327
- 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.`,
126803
+ 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.`,
126328
126804
  update: `The update command allows you to update the ${SDK_TITLE} CLI to the latest version.`,
126329
126805
  users: `The users command allows you to manage your project users.`,
126330
126806
  projects: `The projects command allows you to manage your projects, add platforms, manage API keys, Dev Keys etc.`,
@@ -126666,12 +127142,16 @@ var questionsInitProject = [
126666
127142
  choices: async () => {
126667
127143
  const client2 = await sdkForConsole(true);
126668
127144
  const { teams: teams2 } = isCloud() ? await paginate(
126669
- async (opts = {}) => (await getOrganizationsService(opts.sdk)).list(),
127145
+ async (args) => (await getOrganizationsService(args.sdk)).list({
127146
+ queries: args.queries
127147
+ }),
126670
127148
  { sdk: client2 },
126671
127149
  100,
126672
127150
  "teams"
126673
127151
  ) : await paginate(
126674
- async (opts = {}) => (await getTeamsService(opts.sdk)).list(),
127152
+ async (args) => (await getTeamsService(args.sdk)).list({
127153
+ queries: args.queries
127154
+ }),
126675
127155
  { parseOutput: false, sdk: client2 },
126676
127156
  100,
126677
127157
  "teams"
@@ -126696,14 +127176,14 @@ var questionsInitProject = [
126696
127176
  name: "project",
126697
127177
  message: "What would you like to name your project?",
126698
127178
  default: "My Awesome Project",
126699
- when: (answer) => answer.start !== "existing"
127179
+ when: (answer) => whenOverride(answer) && answer.start !== "existing"
126700
127180
  },
126701
127181
  {
126702
127182
  type: "input",
126703
127183
  name: "id",
126704
127184
  message: "What ID would you like to have for your project?",
126705
127185
  default: "unique()",
126706
- when: (answer) => answer.start !== "existing"
127186
+ when: (answer) => whenOverride(answer) && answer.start !== "existing"
126707
127187
  },
126708
127188
  {
126709
127189
  type: "search-list",
@@ -126719,7 +127199,7 @@ var questionsInitProject = [
126719
127199
  JSON.stringify({ method: "orderDesc", attribute: "$id" })
126720
127200
  ];
126721
127201
  const { projects: projects2 } = await paginate(
126722
- async () => (await getProjectsService()).list(queries),
127202
+ async (args) => (await getProjectsService()).list(args.queries),
126723
127203
  { parseOutput: false },
126724
127204
  100,
126725
127205
  "projects",
@@ -126806,7 +127286,7 @@ var questionsPullFunctions = [
126806
127286
  validate: (value) => validateRequired("function", value),
126807
127287
  choices: async () => {
126808
127288
  const { functions: functions2 } = await paginate(
126809
- async () => (await getFunctionsService()).list(),
127289
+ async (args) => (await getFunctionsService()).list(args.queries),
126810
127290
  { parseOutput: false },
126811
127291
  100,
126812
127292
  "functions"
@@ -126845,7 +127325,7 @@ var questionsPullSites = [
126845
127325
  validate: (value) => validateRequired("site", value),
126846
127326
  choices: async () => {
126847
127327
  const { sites: sites2 } = await paginate(
126848
- async () => (await getSitesService()).list(),
127328
+ async (args) => (await getSitesService()).list(args.queries),
126849
127329
  { parseOutput: false },
126850
127330
  100,
126851
127331
  "sites"
@@ -128287,14 +128767,14 @@ var import_node_path7 = __toESM(require("node:path"), 1);
128287
128767
  var import_node_path8 = require("node:path");
128288
128768
  var import_node_fs6 = __toESM(require("node:fs"), 1);
128289
128769
  var import_node_path9 = __toESM(require("node:path"), 1);
128290
- var Nr = Object.defineProperty;
128291
- var Ar = (s3, t) => {
128292
- for (var e in t) Nr(s3, e, { get: t[e], enumerable: true });
128770
+ var kr = Object.defineProperty;
128771
+ var vr = (s3, t) => {
128772
+ for (var e in t) kr(s3, e, { get: t[e], enumerable: true });
128293
128773
  };
128294
128774
  var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
128295
- var Ir = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof import_node_stream.default || Cr(s3) || Fr(s3));
128296
- var Cr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.pipe == "function" && s3.pipe !== import_node_stream.default.Writable.prototype.pipe;
128297
- var Fr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
128775
+ var Br = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof import_node_stream.default || Pr(s3) || zr(s3));
128776
+ var Pr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.pipe == "function" && s3.pipe !== import_node_stream.default.Writable.prototype.pipe;
128777
+ var zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
128298
128778
  var q = /* @__PURE__ */ Symbol("EOF");
128299
128779
  var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
128300
128780
  var rt = /* @__PURE__ */ Symbol("emittedEnd");
@@ -128327,10 +128807,10 @@ var Jt = /* @__PURE__ */ Symbol("signal");
128327
128807
  var yt = /* @__PURE__ */ Symbol("dataListeners");
128328
128808
  var C = /* @__PURE__ */ Symbol("discarded");
128329
128809
  var te = (s3) => Promise.resolve().then(s3);
128330
- var kr = (s3) => s3();
128331
- var vr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
128332
- var Mr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
128333
- var Br = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
128810
+ var Ur = (s3) => s3();
128811
+ var Hr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
128812
+ var Wr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
128813
+ var Gr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
128334
128814
  var Ce = class {
128335
128815
  src;
128336
128816
  dest;
@@ -128356,8 +128836,8 @@ var Oi = class extends Ce {
128356
128836
  super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
128357
128837
  }
128358
128838
  };
128359
- var Pr = (s3) => !!s3.objectMode;
128360
- var zr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
128839
+ var Zr = (s3) => !!s3.objectMode;
128840
+ var Yr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
128361
128841
  var D = class extends import_node_events.EventEmitter {
128362
128842
  [b] = false;
128363
128843
  [Qt] = false;
@@ -128383,7 +128863,7 @@ var D = class extends import_node_events.EventEmitter {
128383
128863
  constructor(...t) {
128384
128864
  let e = t[0] || {};
128385
128865
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
128386
- Pr(e) ? (this[L] = true, this[z2] = null) : zr(e) ? (this[z2] = e.encoding, this[L] = false) : (this[L] = false, this[z2] = null), this[Z] = !!e.async, this[Mt] = this[z2] ? new import_node_string_decoder.StringDecoder(this[z2]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
128866
+ 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 import_node_string_decoder.StringDecoder(this[z2]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
128387
128867
  let { signal: i } = e;
128388
128868
  i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
128389
128869
  }
@@ -128424,10 +128904,10 @@ var D = class extends import_node_events.EventEmitter {
128424
128904
  if (this[q]) throw new Error("write after end");
128425
128905
  if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
128426
128906
  typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
128427
- let r = this[Z] ? te : kr;
128907
+ let r = this[Z] ? te : Ur;
128428
128908
  if (!this[L] && !Buffer.isBuffer(t)) {
128429
- if (Br(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
128430
- else if (Mr(t)) t = Buffer.from(t);
128909
+ if (Gr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
128910
+ else if (Wr(t)) t = Buffer.from(t);
128431
128911
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
128432
128912
  }
128433
128913
  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]);
@@ -128500,7 +128980,7 @@ var D = class extends import_node_events.EventEmitter {
128500
128980
  let i = super.on(t, e);
128501
128981
  if (t === "data") this[C] = false, this[yt]++, !this[A].length && !this[b] && this[Bt]();
128502
128982
  else if (t === "readable" && this[g] !== 0) super.emit("readable");
128503
- else if (vr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
128983
+ else if (Hr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
128504
128984
  else if (t === "error" && this[jt]) {
128505
128985
  let r = e;
128506
128986
  this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
@@ -128627,10 +129107,10 @@ var D = class extends import_node_events.EventEmitter {
128627
129107
  return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
128628
129108
  }
128629
129109
  static get isStream() {
128630
- return Ir;
129110
+ return Br;
128631
129111
  }
128632
129112
  };
128633
- var Hr = import_fs3.default.writev;
129113
+ var Vr = import_fs3.default.writev;
128634
129114
  var ot = /* @__PURE__ */ Symbol("_autoClose");
128635
129115
  var H = /* @__PURE__ */ Symbol("_close");
128636
129116
  var ee = /* @__PURE__ */ Symbol("_ended");
@@ -128823,7 +129303,7 @@ var tt = class extends import_events.default {
128823
129303
  else if (this[Y].length === 1) this[ke](this[Y].pop());
128824
129304
  else {
128825
129305
  let t = this[Y];
128826
- this[Y] = [], Hr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
129306
+ this[Y] = [], Vr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
128827
129307
  }
128828
129308
  }
128829
129309
  [H]() {
@@ -128863,21 +129343,21 @@ var Wt = class extends tt {
128863
129343
  }
128864
129344
  }
128865
129345
  };
128866
- var Wr = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
129346
+ 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"]]);
128867
129347
  var As = (s3) => !!s3.sync && !!s3.file;
128868
129348
  var Ds = (s3) => !s3.sync && !!s3.file;
128869
129349
  var Is = (s3) => !!s3.sync && !s3.file;
128870
129350
  var Cs = (s3) => !s3.sync && !s3.file;
128871
129351
  var Fs = (s3) => !!s3.file;
128872
- var Gr = (s3) => {
128873
- let t = Wr.get(s3);
129352
+ var Xr = (s3) => {
129353
+ let t = $r.get(s3);
128874
129354
  return t || s3;
128875
129355
  };
128876
129356
  var re = (s3 = {}) => {
128877
129357
  if (!s3) return {};
128878
129358
  let t = {};
128879
129359
  for (let [e, i] of Object.entries(s3)) {
128880
- let r = Gr(e);
129360
+ let r = Xr(e);
128881
129361
  t[r] = i;
128882
129362
  }
128883
129363
  return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
@@ -128900,13 +129380,13 @@ var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
128900
129380
  }
128901
129381
  throw new Error("impossible options??");
128902
129382
  }, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
128903
- var Yr = import_zlib.default.constants || { ZLIB_VERNUM: 4736 };
128904
- var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, Yr));
128905
- var Kr = import_buffer.Buffer.concat;
129383
+ var jr = import_zlib.default.constants || { ZLIB_VERNUM: 4736 };
129384
+ 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));
129385
+ var Qr = import_buffer.Buffer.concat;
128906
129386
  var vs = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat");
128907
- var Vr = (s3) => s3;
129387
+ var Jr = (s3) => s3;
128908
129388
  var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
128909
- import_buffer.Buffer.concat = s3 ? Vr : Kr;
129389
+ import_buffer.Buffer.concat = s3 ? Jr : Qr;
128910
129390
  } : (s3) => {
128911
129391
  };
128912
129392
  var Ot = /* @__PURE__ */ Symbol("_superWrite");
@@ -129067,15 +129547,15 @@ var Ye = class extends Ge {
129067
129547
  }
129068
129548
  };
129069
129549
  var Ms = (s3, t) => {
129070
- if (Number.isSafeInteger(s3)) s3 < 0 ? qr(s3, t) : Xr(s3, t);
129550
+ if (Number.isSafeInteger(s3)) s3 < 0 ? sn(s3, t) : en(s3, t);
129071
129551
  else throw Error("cannot encode number outside of javascript safe integer range");
129072
129552
  return t;
129073
129553
  };
129074
- var Xr = (s3, t) => {
129554
+ var en = (s3, t) => {
129075
129555
  t[0] = 128;
129076
129556
  for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
129077
129557
  };
129078
- var qr = (s3, t) => {
129558
+ var sn = (s3, t) => {
129079
129559
  t[0] = 255;
129080
129560
  var e = false;
129081
129561
  s3 = s3 * -1;
@@ -129085,19 +129565,19 @@ var qr = (s3, t) => {
129085
129565
  }
129086
129566
  };
129087
129567
  var Bs = (s3) => {
129088
- let t = s3[0], e = t === 128 ? Qr(s3.subarray(1, s3.length)) : t === 255 ? jr(s3) : null;
129568
+ let t = s3[0], e = t === 128 ? nn(s3.subarray(1, s3.length)) : t === 255 ? rn(s3) : null;
129089
129569
  if (e === null) throw Error("invalid base256 encoding");
129090
129570
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
129091
129571
  return e;
129092
129572
  };
129093
- var jr = (s3) => {
129573
+ var rn = (s3) => {
129094
129574
  for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
129095
129575
  var n = Number(s3[r]), o;
129096
129576
  i ? o = Ps(n) : n === 0 ? o = n : (i = true, o = zs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
129097
129577
  }
129098
129578
  return e;
129099
129579
  };
129100
- var Qr = (s3) => {
129580
+ var nn = (s3) => {
129101
129581
  for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
129102
129582
  var r = Number(s3[i]);
129103
129583
  r !== 0 && (e += r * Math.pow(256, t - i - 1));
@@ -129107,9 +129587,9 @@ var Qr = (s3) => {
129107
129587
  var Ps = (s3) => (255 ^ s3) & 255;
129108
129588
  var zs = (s3) => (255 ^ s3) + 1 & 255;
129109
129589
  var Bi = {};
129110
- Ar(Bi, { code: () => Ke, isCode: () => oe, isName: () => tn, name: () => he });
129590
+ vr(Bi, { code: () => Ke, isCode: () => oe, isName: () => hn, name: () => he });
129111
129591
  var oe = (s3) => he.has(s3);
129112
- var tn = (s3) => Ke.has(s3);
129592
+ var hn = (s3) => Ke.has(s3);
129113
129593
  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"]]);
129114
129594
  var Ke = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
129115
129595
  var F = class {
@@ -129158,7 +129638,7 @@ var F = class {
129158
129638
  }
129159
129639
  encode(t, e = 0) {
129160
129640
  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");
129161
- let i = this.ctime || this.atime ? 130 : 155, r = en(this.path || "", i), n = r[0], o = r[1];
129641
+ let i = this.ctime || this.atime ? 130 : 155, r = an(this.path || "", i), n = r[0], o = r[1];
129162
129642
  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);
129163
129643
  let h = 256;
129164
129644
  for (let a = e; a < e + 148; a++) h += t[a];
@@ -129178,7 +129658,7 @@ var F = class {
129178
129658
  else throw new TypeError("invalid entry type: " + t);
129179
129659
  }
129180
129660
  };
129181
- var en = (s3, t) => {
129661
+ var an = (s3, t) => {
129182
129662
  let i = s3, r = "", n, o = import_node_path2.posix.parse(s3).root || ".";
129183
129663
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
129184
129664
  else {
@@ -129191,19 +129671,19 @@ var en = (s3, t) => {
129191
129671
  return n;
129192
129672
  };
129193
129673
  var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
129194
- var Pi = (s3, t, e) => sn(at(s3, t, e));
129195
- var sn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
129196
- var at = (s3, t, e) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e)) : nn(s3, t, e);
129197
- var rn = (s3) => isNaN(s3) ? void 0 : s3;
129198
- var nn = (s3, t, e) => rn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
129199
- var on = { 12: 8589934591, 8: 2097151 };
129200
- var lt = (s3, t, e, i) => i === void 0 ? false : i > on[e] || i < 0 ? (Ms(i, s3.subarray(t, t + e)), true) : (hn(s3, t, e, i), false);
129201
- var hn = (s3, t, e, i) => s3.write(an(i, e), t, e, "ascii");
129202
- var an = (s3, t) => ln(Math.floor(s3).toString(8), t);
129203
- var ln = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
129674
+ var Pi = (s3, t, e) => ln(at(s3, t, e));
129675
+ var ln = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
129676
+ var at = (s3, t, e) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e)) : fn(s3, t, e);
129677
+ var cn = (s3) => isNaN(s3) ? void 0 : s3;
129678
+ var fn = (s3, t, e) => cn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
129679
+ var dn = { 12: 8589934591, 8: 2097151 };
129680
+ 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);
129681
+ var un = (s3, t, e, i) => s3.write(mn(i, e), t, e, "ascii");
129682
+ var mn = (s3, t) => pn(Math.floor(s3).toString(8), t);
129683
+ var pn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
129204
129684
  var zi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
129205
- var cn = new Array(156).join("\0");
129206
- var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + cn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
129685
+ var En = new Array(156).join("\0");
129686
+ 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);
129207
129687
  var ct = class s {
129208
129688
  atime;
129209
129689
  mtime;
@@ -129244,13 +129724,13 @@ var ct = class s {
129244
129724
  return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
129245
129725
  }
129246
129726
  static parse(t, e, i = false) {
129247
- return new s(dn(un(t), e), i);
129727
+ return new s(Sn(yn(t), e), i);
129248
129728
  }
129249
129729
  };
129250
- var dn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
129251
- var un = (s3) => s3.replace(/\n$/, "").split(`
129252
- `).reduce(mn, /* @__PURE__ */ Object.create(null));
129253
- var mn = (s3, t) => {
129730
+ var Sn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
129731
+ var yn = (s3) => s3.replace(/\n$/, "").split(`
129732
+ `).reduce(Rn, /* @__PURE__ */ Object.create(null));
129733
+ var Rn = (s3, t) => {
129254
129734
  let e = parseInt(t, 10);
129255
129735
  if (e !== Buffer.byteLength(t) + 1) return s3;
129256
129736
  t = t.slice((e + " ").length);
@@ -129259,8 +129739,8 @@ var mn = (s3, t) => {
129259
129739
  let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
129260
129740
  return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
129261
129741
  };
129262
- var pn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
129263
- var f = pn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
129742
+ var bn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
129743
+ var f = bn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
129264
129744
  var Yt = class extends D {
129265
129745
  extended;
129266
129746
  globalExtended;
@@ -129328,10 +129808,10 @@ var Yt = class extends D {
129328
129808
  var Lt = (s3, t, e, i = {}) => {
129329
129809
  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));
129330
129810
  };
129331
- var wn = 1024 * 1024;
129811
+ var gn = 1024 * 1024;
129332
129812
  var Zi = Buffer.from([31, 139]);
129333
129813
  var Yi = Buffer.from([40, 181, 47, 253]);
129334
- var Sn = Math.max(Zi.length, Yi.length);
129814
+ var On = Math.max(Zi.length, Yi.length);
129335
129815
  var B = /* @__PURE__ */ Symbol("state");
129336
129816
  var Nt = /* @__PURE__ */ Symbol("writeEntry");
129337
129817
  var et = /* @__PURE__ */ Symbol("readEntry");
@@ -129362,7 +129842,7 @@ var Dt = /* @__PURE__ */ Symbol("sawValidEntry");
129362
129842
  var je = /* @__PURE__ */ Symbol("sawNullBlock");
129363
129843
  var Qe = /* @__PURE__ */ Symbol("sawEOF");
129364
129844
  var Zs = /* @__PURE__ */ Symbol("closeStream");
129365
- var yn = () => true;
129845
+ var Tn = () => true;
129366
129846
  var st = class extends import_events2.EventEmitter {
129367
129847
  file;
129368
129848
  strict;
@@ -129394,7 +129874,7 @@ var st = class extends import_events2.EventEmitter {
129394
129874
  (this[B] === "begin" || this[Dt] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
129395
129875
  }), t.ondone ? this.on(qe, t.ondone) : this.on(qe, () => {
129396
129876
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
129397
- }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || wn, this.filter = typeof t.filter == "function" ? t.filter : yn;
129877
+ }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || gn, this.filter = typeof t.filter == "function" ? t.filter : Tn;
129398
129878
  let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
129399
129879
  this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
129400
129880
  let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
@@ -129494,7 +129974,7 @@ var st = class extends import_events2.EventEmitter {
129494
129974
  write(t, e, i) {
129495
129975
  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;
129496
129976
  if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
129497
- if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < Sn) return this[p] = t, i?.(), true;
129977
+ if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < On) return this[p] = t, i?.(), true;
129498
129978
  for (let a = 0; this[y] === void 0 && a < Zi.length; a++) t[a] !== Zi[a] && (this[y] = false);
129499
129979
  let o = false;
129500
129980
  if (this[y] === false && this.zstd !== false) {
@@ -129584,7 +130064,7 @@ var mt = (s3) => {
129584
130064
  for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
129585
130065
  return e === -1 ? s3 : s3.slice(0, e);
129586
130066
  };
129587
- var _n = (s3) => {
130067
+ var Nn = (s3) => {
129588
130068
  let t = s3.onReadEntry;
129589
130069
  s3.onReadEntry = t ? (e) => {
129590
130070
  t(e), e.resume();
@@ -129602,7 +130082,7 @@ var Ki = (s3, t) => {
129602
130082
  };
129603
130083
  s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
129604
130084
  };
129605
- var gn = (s3) => {
130085
+ var An = (s3) => {
129606
130086
  let t = new st(s3), e = s3.file, i;
129607
130087
  try {
129608
130088
  i = import_node_fs.default.openSync(e, "r");
@@ -129626,7 +130106,7 @@ var gn = (s3) => {
129626
130106
  }
129627
130107
  }
129628
130108
  };
129629
- var On = (s3, t) => {
130109
+ var Dn = (s3, t) => {
129630
130110
  let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
129631
130111
  return new Promise((o, h) => {
129632
130112
  e.on("error", h), e.on("end", o), import_node_fs.default.stat(r, (a, l) => {
@@ -129638,14 +130118,14 @@ var On = (s3, t) => {
129638
130118
  });
129639
130119
  });
129640
130120
  };
129641
- var It = K(gn, On, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
129642
- t?.length && Ki(s3, t), s3.noResume || _n(s3);
130121
+ var It = K(An, Dn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
130122
+ t?.length && Ki(s3, t), s3.noResume || Nn(s3);
129643
130123
  });
129644
130124
  var Vi = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
129645
- var { isAbsolute: xn, parse: Ys } = import_node_path4.win32;
130125
+ var { isAbsolute: Cn, parse: Ys } = import_node_path4.win32;
129646
130126
  var ce = (s3) => {
129647
130127
  let t = "", e = Ys(s3);
129648
- for (; xn(s3) || e.root; ) {
130128
+ for (; Cn(s3) || e.root; ) {
129649
130129
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
129650
130130
  s3 = s3.slice(i.length), t += i, e = Ys(s3);
129651
130131
  }
@@ -129653,12 +130133,12 @@ var ce = (s3) => {
129653
130133
  };
129654
130134
  var Je = ["|", "<", ">", "?", ":"];
129655
130135
  var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
129656
- var Ln = new Map(Je.map((s3, t) => [s3, $i[t]]));
129657
- var Nn = new Map($i.map((s3, t) => [s3, Je[t]]));
129658
- var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Ln.get(e)), s3);
129659
- var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(Nn.get(e)), s3);
130136
+ var Fn = new Map(Je.map((s3, t) => [s3, $i[t]]));
130137
+ var kn = new Map($i.map((s3, t) => [s3, Je[t]]));
130138
+ var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Fn.get(e)), s3);
130139
+ var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(kn.get(e)), s3);
129660
130140
  var Js = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
129661
- var An = 16 * 1024 * 1024;
130141
+ var vn = 16 * 1024 * 1024;
129662
130142
  var Xs = /* @__PURE__ */ Symbol("process");
129663
130143
  var qs = /* @__PURE__ */ Symbol("file");
129664
130144
  var js = /* @__PURE__ */ Symbol("directory");
@@ -129710,7 +130190,7 @@ var de = class extends D {
129710
130190
  #t = false;
129711
130191
  constructor(t, e = {}) {
129712
130192
  let i = re(e);
129713
- 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);
130193
+ 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);
129714
130194
  let r = false;
129715
130195
  if (!this.preservePaths) {
129716
130196
  let [o, h] = ce(this.path);
@@ -129733,7 +130213,7 @@ var de = class extends D {
129733
130213
  });
129734
130214
  }
129735
130215
  [ei](t) {
129736
- this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Dn(t), this.emit("stat", t), this[Xs]();
130216
+ this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Mn(t), this.emit("stat", t), this[Xs]();
129737
130217
  }
129738
130218
  [Xs]() {
129739
130219
  switch (this.type) {
@@ -129939,7 +130419,7 @@ var ri = class extends D {
129939
130419
  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;
129940
130420
  }
129941
130421
  };
129942
- var Dn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
130422
+ var Mn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
129943
130423
  var ni = class s2 {
129944
130424
  tail;
129945
130425
  head;
@@ -129971,11 +130451,11 @@ var ni = class s2 {
129971
130451
  t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
129972
130452
  }
129973
130453
  push(...t) {
129974
- for (let e = 0, i = t.length; e < i; e++) Cn(this, t[e]);
130454
+ for (let e = 0, i = t.length; e < i; e++) Pn(this, t[e]);
129975
130455
  return this.length;
129976
130456
  }
129977
130457
  unshift(...t) {
129978
- for (var e = 0, i = t.length; e < i; e++) Fn(this, t[e]);
130458
+ for (var e = 0, i = t.length; e < i; e++) zn(this, t[e]);
129979
130459
  return this.length;
129980
130460
  }
129981
130461
  pop() {
@@ -130071,7 +130551,7 @@ var ni = class s2 {
130071
130551
  let n = [];
130072
130552
  for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
130073
130553
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
130074
- for (let o of i) r = In(this, r, o);
130554
+ for (let o of i) r = Bn(this, r, o);
130075
130555
  return n;
130076
130556
  }
130077
130557
  reverse() {
@@ -130083,14 +130563,14 @@ var ni = class s2 {
130083
130563
  return this.head = e, this.tail = t, this;
130084
130564
  }
130085
130565
  };
130086
- function In(s3, t, e) {
130566
+ function Bn(s3, t, e) {
130087
130567
  let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
130088
130568
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
130089
130569
  }
130090
- function Cn(s3, t) {
130570
+ function Pn(s3, t) {
130091
130571
  s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
130092
130572
  }
130093
- function Fn(s3, t) {
130573
+ function zn(s3, t) {
130094
130574
  s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
130095
130575
  }
130096
130576
  var ue = class {
@@ -130319,11 +130799,11 @@ var kt = class extends Et {
130319
130799
  });
130320
130800
  }
130321
130801
  };
130322
- var kn = (s3, t) => {
130802
+ var Un = (s3, t) => {
130323
130803
  let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
130324
130804
  e.pipe(i), or(e, t);
130325
130805
  };
130326
- var vn = (s3, t) => {
130806
+ var Hn = (s3, t) => {
130327
130807
  let e = new Et(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
130328
130808
  e.pipe(i);
130329
130809
  let r = new Promise((n, o) => {
@@ -130342,25 +130822,26 @@ var hr = async (s3, t) => {
130342
130822
  } }) : s3.add(e);
130343
130823
  s3.end();
130344
130824
  };
130345
- var Mn = (s3, t) => {
130825
+ var Wn = (s3, t) => {
130346
130826
  let e = new kt(s3);
130347
130827
  return or(e, t), e;
130348
130828
  };
130349
- var Bn = (s3, t) => {
130829
+ var Gn = (s3, t) => {
130350
130830
  let e = new Et(s3);
130351
130831
  return hr(e, t).catch((i) => e.emit("error", i)), e;
130352
130832
  };
130353
- var Pn = K(kn, vn, Mn, Bn, (s3, t) => {
130833
+ var Zn = K(Un, Hn, Wn, Gn, (s3, t) => {
130354
130834
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
130355
130835
  });
130356
- var zn = process.env.__FAKE_PLATFORM__ || process.platform;
130357
- var Un = zn === "win32";
130358
- var { O_CREAT: Hn, O_TRUNC: Wn, O_WRONLY: Gn } = import_fs6.default.constants;
130359
- var lr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs6.default.constants.UV_FS_O_FILEMAP || 0;
130360
- var Zn = Un && !!lr;
130361
- var Yn = 512 * 1024;
130362
- var Kn = lr | Wn | Hn | Gn;
130363
- var cs = Zn ? (s3) => s3 < Yn ? Kn : "w" : () => "w";
130836
+ var Yn = process.env.__FAKE_PLATFORM__ || process.platform;
130837
+ var fr = Yn === "win32";
130838
+ var { O_CREAT: dr, O_NOFOLLOW: ar, O_TRUNC: ur, O_WRONLY: mr } = import_fs6.default.constants;
130839
+ var pr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs6.default.constants.UV_FS_O_FILEMAP || 0;
130840
+ var Kn = fr && !!pr;
130841
+ var Vn = 512 * 1024;
130842
+ var $n = pr | ur | dr | mr;
130843
+ var lr = !fr && typeof ar == "number" ? ar | ur | dr | mr : null;
130844
+ var cs = lr !== null ? () => lr : Kn ? (s3) => s3 < Vn ? $n : "w" : () => "w";
130364
130845
  var fs3 = (s3, t, e) => {
130365
130846
  try {
130366
130847
  return import_node_fs4.default.lchownSync(s3, t, e);
@@ -130373,7 +130854,7 @@ var ui = (s3, t, e, i) => {
130373
130854
  i(r && r?.code !== "ENOENT" ? r : null);
130374
130855
  });
130375
130856
  };
130376
- var Vn = (s3, t, e, i, r) => {
130857
+ var Xn = (s3, t, e, i, r) => {
130377
130858
  if (t.isDirectory()) ds(import_node_path6.default.resolve(s3, t.name), e, i, (n) => {
130378
130859
  if (n) return r(n);
130379
130860
  let o = import_node_path6.default.resolve(s3, t.name);
@@ -130397,10 +130878,10 @@ var ds = (s3, t, e, i) => {
130397
130878
  if (--o === 0) return ui(s3, t, e, i);
130398
130879
  }
130399
130880
  };
130400
- for (let l of n) Vn(s3, l, t, e, a);
130881
+ for (let l of n) Xn(s3, l, t, e, a);
130401
130882
  });
130402
130883
  };
130403
- var $n = (s3, t, e, i) => {
130884
+ var qn = (s3, t, e, i) => {
130404
130885
  t.isDirectory() && us(import_node_path6.default.resolve(s3, t.name), e, i), fs3(import_node_path6.default.resolve(s3, t.name), e, i);
130405
130886
  };
130406
130887
  var us = (s3, t, e) => {
@@ -130413,7 +130894,7 @@ var us = (s3, t, e) => {
130413
130894
  if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs3(s3, t, e);
130414
130895
  throw n;
130415
130896
  }
130416
- for (let r of i) $n(s3, r, t, e);
130897
+ for (let r of i) qn(s3, r, t, e);
130417
130898
  return fs3(s3, t, e);
130418
130899
  };
130419
130900
  var we = class extends Error {
@@ -130439,17 +130920,17 @@ var wt = class extends Error {
130439
130920
  return "SymlinkError";
130440
130921
  }
130441
130922
  };
130442
- var qn = (s3, t) => {
130923
+ var Qn = (s3, t) => {
130443
130924
  import_node_fs5.default.stat(s3, (e, i) => {
130444
130925
  (e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
130445
130926
  });
130446
130927
  };
130447
- var cr = (s3, t, e) => {
130928
+ var Er = (s3, t, e) => {
130448
130929
  s3 = f(s3);
130449
130930
  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) => {
130450
130931
  E ? e(E) : x && a ? ds(x, o, h, (xe) => S(xe)) : n ? import_node_fs5.default.chmod(s3, r, e) : e();
130451
130932
  };
130452
- if (s3 === d) return qn(s3, S);
130933
+ if (s3 === d) return Qn(s3, S);
130453
130934
  if (l) return import_promises.default.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
130454
130935
  let N = f(import_node_path7.default.relative(d, s3)).split("/");
130455
130936
  ms(d, N, r, c, d, void 0, S);
@@ -130457,15 +130938,15 @@ var cr = (s3, t, e) => {
130457
130938
  var ms = (s3, t, e, i, r, n, o) => {
130458
130939
  if (t.length === 0) return o(null, n);
130459
130940
  let h = t.shift(), a = f(import_node_path7.default.resolve(s3 + "/" + h));
130460
- import_node_fs5.default.mkdir(a, e, fr(a, t, e, i, r, n, o));
130941
+ import_node_fs5.default.mkdir(a, e, wr(a, t, e, i, r, n, o));
130461
130942
  };
130462
- var fr = (s3, t, e, i, r, n, o) => (h) => {
130943
+ var wr = (s3, t, e, i, r, n, o) => (h) => {
130463
130944
  h ? import_node_fs5.default.lstat(s3, (a, l) => {
130464
130945
  if (a) a.path = a.path && f(a.path), o(a);
130465
130946
  else if (l.isDirectory()) ms(s3, t, e, i, r, n, o);
130466
130947
  else if (i) import_node_fs5.default.unlink(s3, (c) => {
130467
130948
  if (c) return o(c);
130468
- import_node_fs5.default.mkdir(s3, e, fr(s3, t, e, i, r, n, o));
130949
+ import_node_fs5.default.mkdir(s3, e, wr(s3, t, e, i, r, n, o));
130469
130950
  });
130470
130951
  else {
130471
130952
  if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
@@ -130473,7 +130954,7 @@ var fr = (s3, t, e, i, r, n, o) => (h) => {
130473
130954
  }
130474
130955
  }) : (n = n || s3, ms(s3, t, e, i, r, n, o));
130475
130956
  };
130476
- var jn = (s3) => {
130957
+ var Jn = (s3) => {
130477
130958
  let t = false, e;
130478
130959
  try {
130479
130960
  t = import_node_fs5.default.statSync(s3).isDirectory();
@@ -130483,12 +130964,12 @@ var jn = (s3) => {
130483
130964
  if (!t) throw new we(s3, e ?? "ENOTDIR");
130484
130965
  }
130485
130966
  };
130486
- var dr = (s3, t) => {
130967
+ var Sr = (s3, t) => {
130487
130968
  s3 = f(s3);
130488
130969
  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) => {
130489
130970
  E && h && us(E, n, o), r && import_node_fs5.default.chmodSync(s3, i);
130490
130971
  };
130491
- if (s3 === c) return jn(c), d();
130972
+ if (s3 === c) return Jn(c), d();
130492
130973
  if (a) return d(import_node_fs5.default.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
130493
130974
  let T = f(import_node_path7.default.relative(c, s3)).split("/"), N;
130494
130975
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
@@ -130507,19 +130988,19 @@ var dr = (s3, t) => {
130507
130988
  return d(N);
130508
130989
  };
130509
130990
  var ps = /* @__PURE__ */ Object.create(null);
130510
- var ur = 1e4;
130991
+ var yr = 1e4;
130511
130992
  var $t = /* @__PURE__ */ new Set();
130512
- var mr = (s3) => {
130993
+ var Rr = (s3) => {
130513
130994
  $t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
130514
- let t = ps[s3], e = $t.size - ur;
130515
- if (e > ur / 10) {
130995
+ let t = ps[s3], e = $t.size - yr;
130996
+ if (e > yr / 10) {
130516
130997
  for (let i of $t) if ($t.delete(i), delete ps[i], --e <= 0) break;
130517
130998
  }
130518
130999
  return t;
130519
131000
  };
130520
- var Qn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
130521
- var Jn = Qn === "win32";
130522
- var to = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
131001
+ var to = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
131002
+ var eo = to === "win32";
131003
+ var io = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
130523
131004
  let r = e.at(-1);
130524
131005
  return r !== void 0 && (i = (0, import_node_path8.join)(r, i)), e.push(i || "/"), e;
130525
131006
  }, []);
@@ -130528,8 +131009,8 @@ var Ei = class {
130528
131009
  #i = /* @__PURE__ */ new Map();
130529
131010
  #s = /* @__PURE__ */ new Set();
130530
131011
  reserve(t, e) {
130531
- t = Jn ? ["win32 parallelization disabled"] : t.map((r) => mt((0, import_node_path8.join)(mr(r))));
130532
- let i = new Set(t.map((r) => to(r)).reduce((r, n) => r.concat(n)));
131012
+ t = eo ? ["win32 parallelization disabled"] : t.map((r) => mt((0, import_node_path8.join)(Rr(r))));
131013
+ let i = new Set(t.map((r) => io(r)).reduce((r, n) => r.concat(n)));
130533
131014
  this.#i.set(e, { dirs: i, paths: t });
130534
131015
  for (let r of t) {
130535
131016
  let n = this.#t.get(r);
@@ -130587,25 +131068,25 @@ var Ei = class {
130587
131068
  return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
130588
131069
  }
130589
131070
  };
130590
- var Er = () => process.umask();
130591
- var wr = /* @__PURE__ */ Symbol("onEntry");
131071
+ var _r = () => process.umask();
131072
+ var gr = /* @__PURE__ */ Symbol("onEntry");
130592
131073
  var ys = /* @__PURE__ */ Symbol("checkFs");
130593
- var Sr = /* @__PURE__ */ Symbol("checkFs2");
131074
+ var Or = /* @__PURE__ */ Symbol("checkFs2");
130594
131075
  var Rs = /* @__PURE__ */ Symbol("isReusable");
130595
131076
  var P = /* @__PURE__ */ Symbol("makeFs");
130596
131077
  var bs = /* @__PURE__ */ Symbol("file");
130597
131078
  var _s = /* @__PURE__ */ Symbol("directory");
130598
131079
  var Si = /* @__PURE__ */ Symbol("link");
130599
- var yr = /* @__PURE__ */ Symbol("symlink");
130600
- var Rr = /* @__PURE__ */ Symbol("hardlink");
131080
+ var Tr = /* @__PURE__ */ Symbol("symlink");
131081
+ var xr = /* @__PURE__ */ Symbol("hardlink");
130601
131082
  var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
130602
- var br = /* @__PURE__ */ Symbol("unsupported");
130603
- var _r = /* @__PURE__ */ Symbol("checkPath");
131083
+ var Lr = /* @__PURE__ */ Symbol("unsupported");
131084
+ var Nr = /* @__PURE__ */ Symbol("checkPath");
130604
131085
  var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
130605
131086
  var St = /* @__PURE__ */ Symbol("mkdir");
130606
131087
  var O = /* @__PURE__ */ Symbol("onError");
130607
131088
  var wi = /* @__PURE__ */ Symbol("pending");
130608
- var gr = /* @__PURE__ */ Symbol("pend");
131089
+ var Ar = /* @__PURE__ */ Symbol("pend");
130609
131090
  var Xt = /* @__PURE__ */ Symbol("unpend");
130610
131091
  var ws = /* @__PURE__ */ Symbol("ended");
130611
131092
  var Ss = /* @__PURE__ */ Symbol("maybeClose");
@@ -130614,10 +131095,10 @@ var Re = /* @__PURE__ */ Symbol("doChown");
130614
131095
  var be = /* @__PURE__ */ Symbol("uid");
130615
131096
  var _e = /* @__PURE__ */ Symbol("gid");
130616
131097
  var ge = /* @__PURE__ */ Symbol("checkedCwd");
130617
- var io = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
130618
- var Oe = io === "win32";
130619
- var so = 1024;
130620
- var ro = (s3, t) => {
131098
+ var ro = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
131099
+ var Oe = ro === "win32";
131100
+ var no = 1024;
131101
+ var oo = (s3, t) => {
130621
131102
  if (!Oe) return import_node_fs3.default.unlink(s3, t);
130622
131103
  let e = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
130623
131104
  import_node_fs3.default.rename(s3, e, (i) => {
@@ -130625,12 +131106,12 @@ var ro = (s3, t) => {
130625
131106
  import_node_fs3.default.unlink(e, t);
130626
131107
  });
130627
131108
  };
130628
- var no = (s3) => {
131109
+ var ho = (s3) => {
130629
131110
  if (!Oe) return import_node_fs3.default.unlinkSync(s3);
130630
131111
  let t = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
130631
131112
  import_node_fs3.default.renameSync(s3, t), import_node_fs3.default.unlinkSync(t);
130632
131113
  };
130633
- var Or = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
131114
+ var Dr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
130634
131115
  var qt = class extends st {
130635
131116
  [ws] = false;
130636
131117
  [ge] = false;
@@ -130668,7 +131149,7 @@ var qt = class extends st {
130668
131149
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
130669
131150
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
130670
131151
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
130671
- this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : so, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(import_node_path5.default.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : Er() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[wr](e));
131152
+ 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(import_node_path5.default.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : _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));
130672
131153
  }
130673
131154
  warn(t, e, i = {}) {
130674
131155
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
@@ -130687,7 +131168,7 @@ var qt = class extends st {
130687
131168
  }
130688
131169
  return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
130689
131170
  }
130690
- [_r](t) {
131171
+ [Nr](t) {
130691
131172
  let e = f(t.path), i = e.split("/");
130692
131173
  if (this.strip) {
130693
131174
  if (i.length < this.strip) return false;
@@ -130710,8 +131191,8 @@ var qt = class extends st {
130710
131191
  }
130711
131192
  return true;
130712
131193
  }
130713
- [wr](t) {
130714
- if (!this[_r](t)) return t.resume();
131194
+ [gr](t) {
131195
+ if (!this[Nr](t)) return t.resume();
130715
131196
  switch (import_node_assert.default.equal(typeof t.absolute, "string"), t.type) {
130716
131197
  case "Directory":
130717
131198
  case "GNUDumpDir":
@@ -130723,23 +131204,23 @@ var qt = class extends st {
130723
131204
  case "SymbolicLink":
130724
131205
  return this[ys](t);
130725
131206
  default:
130726
- return this[br](t);
131207
+ return this[Lr](t);
130727
131208
  }
130728
131209
  }
130729
131210
  [O](t, e) {
130730
131211
  t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
130731
131212
  }
130732
131213
  [St](t, e, i) {
130733
- cr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
131214
+ 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);
130734
131215
  }
130735
131216
  [Re](t) {
130736
131217
  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;
130737
131218
  }
130738
131219
  [be](t) {
130739
- return Or(this.uid, t.uid, this.processUid);
131220
+ return Dr(this.uid, t.uid, this.processUid);
130740
131221
  }
130741
131222
  [_e](t) {
130742
- return Or(this.gid, t.gid, this.processGid);
131223
+ return Dr(this.gid, t.gid, this.processGid);
130743
131224
  }
130744
131225
  [bs](t, e) {
130745
131226
  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 });
@@ -130789,16 +131270,16 @@ var qt = class extends st {
130789
131270
  t.mtime && !this.noMtime && (n++, import_node_fs3.default.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, import_node_fs3.default.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
130790
131271
  });
130791
131272
  }
130792
- [br](t) {
131273
+ [Lr](t) {
130793
131274
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
130794
131275
  }
130795
- [yr](t, e) {
131276
+ [Tr](t, e) {
130796
131277
  let i = f(import_node_path5.default.relative(this.cwd, import_node_path5.default.resolve(import_node_path5.default.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
130797
131278
  this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
130798
131279
  this[O](r, t), e();
130799
131280
  });
130800
131281
  }
130801
- [Rr](t, e) {
131282
+ [xr](t, e) {
130802
131283
  let i = f(import_node_path5.default.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
130803
131284
  this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e), (n) => {
130804
131285
  this[O](n, t), e();
@@ -130814,7 +131295,7 @@ var qt = class extends st {
130814
131295
  this[ye](t, h, i, r, n);
130815
131296
  });
130816
131297
  }
130817
- [gr]() {
131298
+ [Ar]() {
130818
131299
  this[wi]++;
130819
131300
  }
130820
131301
  [Xt]() {
@@ -130827,11 +131308,11 @@ var qt = class extends st {
130827
131308
  return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
130828
131309
  }
130829
131310
  [ys](t) {
130830
- this[gr]();
131311
+ this[Ar]();
130831
131312
  let e = [t.path];
130832
- t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Sr](t, i));
131313
+ t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Or](t, i));
130833
131314
  }
130834
- [Sr](t, e) {
131315
+ [Or](t, e) {
130835
131316
  let i = (h) => {
130836
131317
  e(h);
130837
131318
  }, r = () => {
@@ -130869,7 +131350,7 @@ var qt = class extends st {
130869
131350
  if (t.absolute !== this.cwd) return import_node_fs3.default.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
130870
131351
  }
130871
131352
  if (t.absolute === this.cwd) return this[P](null, t, i);
130872
- ro(String(t.absolute), (l) => this[P](l ?? null, t, i));
131353
+ oo(String(t.absolute), (l) => this[P](l ?? null, t, i));
130873
131354
  });
130874
131355
  };
130875
131356
  this[ge] ? n() : r();
@@ -130885,9 +131366,9 @@ var qt = class extends st {
130885
131366
  case "ContiguousFile":
130886
131367
  return this[bs](e, i);
130887
131368
  case "Link":
130888
- return this[Rr](e, i);
131369
+ return this[xr](e, i);
130889
131370
  case "SymbolicLink":
130890
- return this[yr](e, i);
131371
+ return this[Tr](e, i);
130891
131372
  case "Directory":
130892
131373
  case "GNUDumpDir":
130893
131374
  return this[_s](e, i);
@@ -130938,7 +131419,7 @@ var Te = class extends qt {
130938
131419
  let [n] = Se(() => import_node_fs3.default.rmdirSync(String(t.absolute)));
130939
131420
  this[P](n, t);
130940
131421
  }
130941
- let [r] = t.absolute === this.cwd ? [] : Se(() => no(String(t.absolute)));
131422
+ let [r] = t.absolute === this.cwd ? [] : Se(() => ho(String(t.absolute)));
130942
131423
  this[P](r, t);
130943
131424
  }
130944
131425
  [bs](t, e) {
@@ -131010,7 +131491,7 @@ var Te = class extends qt {
131010
131491
  }
131011
131492
  [St](t, e) {
131012
131493
  try {
131013
- return dr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
131494
+ 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 });
131014
131495
  } catch (i) {
131015
131496
  return i;
131016
131497
  }
@@ -131035,11 +131516,11 @@ var Te = class extends qt {
131035
131516
  }
131036
131517
  }
131037
131518
  };
131038
- var oo = (s3) => {
131519
+ var ao = (s3) => {
131039
131520
  let t = new Te(s3), e = s3.file, i = import_node_fs2.default.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
131040
131521
  new Me(e, { readSize: r, size: i.size }).pipe(t);
131041
131522
  };
131042
- var ho = (s3, t) => {
131523
+ var lo = (s3, t) => {
131043
131524
  let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
131044
131525
  return new Promise((o, h) => {
131045
131526
  e.on("error", h), e.on("close", o), import_node_fs2.default.stat(r, (a, l) => {
@@ -131051,10 +131532,10 @@ var ho = (s3, t) => {
131051
131532
  });
131052
131533
  });
131053
131534
  };
131054
- var ao = K(oo, ho, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
131535
+ var co = K(ao, lo, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
131055
131536
  t?.length && Ki(s3, t);
131056
131537
  });
131057
- var lo = (s3, t) => {
131538
+ var fo = (s3, t) => {
131058
131539
  let e = new kt(s3), i = true, r, n;
131059
131540
  try {
131060
131541
  try {
@@ -131075,7 +131556,7 @@ var lo = (s3, t) => {
131075
131556
  if (n + l + 512 > o.size) break;
131076
131557
  n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
131077
131558
  }
131078
- i = false, co(s3, e, n, r, t);
131559
+ i = false, uo(s3, e, n, r, t);
131079
131560
  } finally {
131080
131561
  if (i) try {
131081
131562
  import_node_fs6.default.closeSync(r);
@@ -131083,11 +131564,11 @@ var lo = (s3, t) => {
131083
131564
  }
131084
131565
  }
131085
131566
  };
131086
- var co = (s3, t, e, i, r) => {
131567
+ var uo = (s3, t, e, i, r) => {
131087
131568
  let n = new Wt(s3.file, { fd: i, start: e });
131088
- t.pipe(n), uo(t, r);
131569
+ t.pipe(n), po(t, r);
131089
131570
  };
131090
- var fo = (s3, t) => {
131571
+ var mo = (s3, t) => {
131091
131572
  t = Array.from(t);
131092
131573
  let e = new Et(s3), i = (n, o, h) => {
131093
131574
  let a = (T, N) => {
@@ -131117,23 +131598,23 @@ var fo = (s3, t) => {
131117
131598
  i(c, S.size, (T, N) => {
131118
131599
  if (T) return o(T);
131119
131600
  let E = new tt(s3.file, { fd: c, start: N });
131120
- e.pipe(E), E.on("error", o), E.on("close", n), mo(e, t);
131601
+ e.pipe(E), E.on("error", o), E.on("close", n), Eo(e, t);
131121
131602
  });
131122
131603
  });
131123
131604
  };
131124
131605
  import_node_fs6.default.open(s3.file, h, a);
131125
131606
  });
131126
131607
  };
131127
- var uo = (s3, t) => {
131608
+ var po = (s3, t) => {
131128
131609
  t.forEach((e) => {
131129
131610
  e.charAt(0) === "@" ? It({ file: import_node_path9.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
131130
131611
  }), s3.end();
131131
131612
  };
131132
- var mo = async (s3, t) => {
131613
+ var Eo = async (s3, t) => {
131133
131614
  for (let e of t) e.charAt(0) === "@" ? await It({ file: import_node_path9.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
131134
131615
  s3.end();
131135
131616
  };
131136
- var vt = K(lo, fo, () => {
131617
+ var vt = K(fo, mo, () => {
131137
131618
  throw new TypeError("file is required");
131138
131619
  }, () => {
131139
131620
  throw new TypeError("file is required");
@@ -131142,10 +131623,10 @@ var vt = K(lo, fo, () => {
131142
131623
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
131143
131624
  if (!t?.length) throw new TypeError("no paths specified to add/replace");
131144
131625
  });
131145
- var po = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
131146
- vt.validate?.(s3, t), Eo(s3);
131626
+ var wo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
131627
+ vt.validate?.(s3, t), So(s3);
131147
131628
  });
131148
- var Eo = (s3) => {
131629
+ var So = (s3) => {
131149
131630
  let t = s3.filter;
131150
131631
  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));
131151
131632
  };
@@ -131157,7 +131638,7 @@ async function packageDirectory(dirPath) {
131157
131638
  import_os5.default.tmpdir(),
131158
131639
  `appwrite-deploy-${Date.now()}.tar.gz`
131159
131640
  );
131160
- await Pn(
131641
+ await Zn(
131161
131642
  {
131162
131643
  gzip: true,
131163
131644
  file: tempFile,
@@ -131238,7 +131719,7 @@ async function downloadDeploymentCode(params) {
131238
131719
  `Failed to write deployment archive to "${compressedFileName}": ${message}`
131239
131720
  );
131240
131721
  }
131241
- ao({
131722
+ co({
131242
131723
  sync: true,
131243
131724
  cwd: resourcePath,
131244
131725
  file: compressedFileName,
@@ -134295,7 +134776,6 @@ var JwtManager = {
134295
134776
  timerError: null,
134296
134777
  async setup(userId = null, projectScopes = []) {
134297
134778
  const consoleClient = await sdkForConsole();
134298
- const usersClient2 = new Users(consoleClient);
134299
134779
  const projectsClient2 = new Projects(consoleClient);
134300
134780
  if (this.timerWarn) {
134301
134781
  clearTimeout(this.timerWarn);
@@ -134321,6 +134801,8 @@ var JwtManager = {
134321
134801
  1e3 * 60 * 60
134322
134802
  );
134323
134803
  if (userId) {
134804
+ const projectClient2 = await sdkForProject();
134805
+ const usersClient2 = new Users(projectClient2);
134324
134806
  await usersClient2.get({
134325
134807
  userId
134326
134808
  });
@@ -134733,12 +135215,9 @@ var runFunction = async ({
134733
135215
  const allVariables = {};
134734
135216
  if (withVariables) {
134735
135217
  try {
134736
- const { variables: remoteVariables } = await paginate(
134737
- async () => (await getFunctionsService()).listVariables(func["$id"]),
134738
- {},
134739
- 100,
134740
- "variables"
134741
- );
135218
+ const { variables: remoteVariables } = await (await getFunctionsService()).listVariables({
135219
+ functionId: func["$id"]
135220
+ });
134742
135221
  remoteVariables.forEach((v2) => {
134743
135222
  allVariables[v2.key] = v2.value;
134744
135223
  userVariables[v2.key] = v2.value;
@@ -134848,7 +135327,7 @@ var runFunction = async ({
134848
135327
  import_fs15.default.rmSync(hotSwapPath, { recursive: true, force: true });
134849
135328
  import_fs15.default.mkdirSync(hotSwapPath, { recursive: true });
134850
135329
  }
134851
- await ao({
135330
+ await co({
134852
135331
  keep: true,
134853
135332
  sync: true,
134854
135333
  cwd: hotSwapPath,
@@ -134876,7 +135355,7 @@ var runFunction = async ({
134876
135355
  const sourcePath = import_path14.default.join(functionPath, f2);
134877
135356
  import_fs15.default.copyFileSync(sourcePath, filePath);
134878
135357
  }
134879
- await Pn(
135358
+ await Zn(
134880
135359
  {
134881
135360
  gzip: true,
134882
135361
  sync: true,
@@ -136918,18 +137397,9 @@ var Push = class {
136918
137397
  const functionsServiceForVars = await getFunctionsService(
136919
137398
  this.projectClient
136920
137399
  );
136921
- const { variables } = await paginate(
136922
- async (args) => {
136923
- return await functionsServiceForVars.listVariables({
136924
- functionId: args.functionId
136925
- });
136926
- },
136927
- {
136928
- functionId: func["$id"]
136929
- },
136930
- 100,
136931
- "variables"
136932
- );
137400
+ const { variables } = await functionsServiceForVars.listVariables({
137401
+ functionId: func["$id"]
137402
+ });
136933
137403
  await Promise.all(
136934
137404
  variables.map(async (variable) => {
136935
137405
  const functionsServiceDel = await getFunctionsService(
@@ -137223,18 +137693,9 @@ var Push = class {
137223
137693
  if (withVariables) {
137224
137694
  updaterRow.update({ status: "Creating variables" }).replaceSpinner(SPINNER_DOTS);
137225
137695
  const sitesServiceForVars = await getSitesService(this.projectClient);
137226
- const { variables } = await paginate(
137227
- async (args) => {
137228
- return await sitesServiceForVars.listVariables({
137229
- siteId: args.siteId
137230
- });
137231
- },
137232
- {
137233
- siteId: site["$id"]
137234
- },
137235
- 100,
137236
- "variables"
137237
- );
137696
+ const { variables } = await sitesServiceForVars.listVariables({
137697
+ siteId: site["$id"]
137698
+ });
137238
137699
  await Promise.all(
137239
137700
  variables.map(async (variable) => {
137240
137701
  const sitesServiceDel = await getSitesService(this.projectClient);
@@ -139331,36 +139792,6 @@ account.command(`delete`).description(`Delete the currently logged in user.`).ac
139331
139792
  async () => parse3(await (await getAccountClient()).delete())
139332
139793
  )
139333
139794
  );
139334
- 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(
139335
- actionRunner(
139336
- async ({ queries }) => parse3(await (await getAccountClient()).listBillingAddresses(queries))
139337
- )
139338
- );
139339
- 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(
139340
- actionRunner(
139341
- async ({ country, city, streetAddress, addressLine2, state, postalCode }) => parse3(await (await getAccountClient()).createBillingAddress(country, city, streetAddress, addressLine2, state, postalCode))
139342
- )
139343
- );
139344
- 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(
139345
- actionRunner(
139346
- async ({ billingAddressId }) => parse3(await (await getAccountClient()).getBillingAddress(billingAddressId))
139347
- )
139348
- );
139349
- 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(
139350
- actionRunner(
139351
- async ({ billingAddressId, country, city, streetAddress, addressLine2, state, postalCode }) => parse3(await (await getAccountClient()).updateBillingAddress(billingAddressId, country, city, streetAddress, addressLine2, state, postalCode))
139352
- )
139353
- );
139354
- 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(
139355
- actionRunner(
139356
- async ({ billingAddressId }) => parse3(await (await getAccountClient()).deleteBillingAddress(billingAddressId))
139357
- )
139358
- );
139359
- account.command(`get-coupon`).description(`Get coupon details for an account.`).requiredOption(`--coupon-id <coupon-id>`, `ID of the coupon`).action(
139360
- actionRunner(
139361
- async ({ couponId }) => parse3(await (await getAccountClient()).getCoupon(couponId))
139362
- )
139363
- );
139364
139795
  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.
139365
139796
  This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
139366
139797
  `).requiredOption(`--email <email>`, `User email.`).requiredOption(`--password <password>`, `User password. Must be at least 8 chars.`).action(
@@ -139382,11 +139813,6 @@ account.command(`delete-identity`).description(`Delete an identity by its unique
139382
139813
  async ({ identityId }) => parse3(await (await getAccountClient()).deleteIdentity(identityId))
139383
139814
  )
139384
139815
  );
139385
- 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(
139386
- actionRunner(
139387
- async ({ queries }) => parse3(await (await getAccountClient()).listInvoices(queries))
139388
- )
139389
- );
139390
139816
  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(
139391
139817
  actionRunner(
139392
139818
  async ({ duration: duration3 }) => parse3(await (await getAccountClient()).createJWT(duration3))
@@ -139490,41 +139916,6 @@ account.command(`update-password`).description(`Update currently logged in user
139490
139916
  async ({ password, oldPassword }) => parse3(await (await getAccountClient()).updatePassword(password, oldPassword))
139491
139917
  )
139492
139918
  );
139493
- 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(
139494
- actionRunner(
139495
- async ({ queries }) => parse3(await (await getAccountClient()).listPaymentMethods(queries))
139496
- )
139497
- );
139498
- account.command(`create-payment-method`).description(`Create a new payment method for the current user account.`).action(
139499
- actionRunner(
139500
- async () => parse3(await (await getAccountClient()).createPaymentMethod())
139501
- )
139502
- );
139503
- 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(
139504
- actionRunner(
139505
- async ({ paymentMethodId }) => parse3(await (await getAccountClient()).getPaymentMethod(paymentMethodId))
139506
- )
139507
- );
139508
- 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(
139509
- actionRunner(
139510
- async ({ paymentMethodId, expiryMonth, expiryYear, state }) => parse3(await (await getAccountClient()).updatePaymentMethod(paymentMethodId, expiryMonth, expiryYear, state))
139511
- )
139512
- );
139513
- 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(
139514
- actionRunner(
139515
- async ({ paymentMethodId }) => parse3(await (await getAccountClient()).deletePaymentMethod(paymentMethodId))
139516
- )
139517
- );
139518
- 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(
139519
- actionRunner(
139520
- async ({ paymentMethodId, providerMethodId, name, state }) => parse3(await (await getAccountClient()).updatePaymentMethodProvider(paymentMethodId, providerMethodId, name, state))
139521
- )
139522
- );
139523
- 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(
139524
- actionRunner(
139525
- async ({ paymentMethodId }) => parse3(await (await getAccountClient()).updatePaymentMethodMandateOptions(paymentMethodId))
139526
- )
139527
- );
139528
139919
  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(
139529
139920
  actionRunner(
139530
139921
  async ({ phone, password }) => parse3(await (await getAccountClient()).updatePhone(phone, password))
@@ -139586,8 +139977,8 @@ If there is already an active session, the new session will be attached to the l
139586
139977
  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).
139587
139978
  `).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(
139588
139979
  actionRunner(
139589
- async ({ provider, success: success21, failure, scopes }) => {
139590
- const url2 = (await getAccountClient()).createOAuth2Session(provider, success21, failure, scopes);
139980
+ async ({ provider, success: success22, failure, scopes }) => {
139981
+ const url2 = (await getAccountClient()).createOAuth2Session(provider, success22, failure, scopes);
139591
139982
  if (url2) console.log(url2);
139592
139983
  }
139593
139984
  )
@@ -139667,8 +140058,8 @@ If authentication succeeds, \`userId\` and \`secret\` of a token will be appende
139667
140058
 
139668
140059
  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(
139669
140060
  actionRunner(
139670
- async ({ provider, success: success21, failure, scopes }) => {
139671
- const url2 = (await getAccountClient()).createOAuth2Token(provider, success21, failure, scopes);
140061
+ async ({ provider, success: success22, failure, scopes }) => {
140062
+ const url2 = (await getAccountClient()).createOAuth2Token(provider, success22, failure, scopes);
139672
140063
  if (url2) console.log(url2);
139673
140064
  }
139674
140065
  )
@@ -140663,12 +141054,6 @@ health.command(`get-certificate`).description(`Get the SSL certificate for a dom
140663
141054
  async ({ domain: domain2 }) => parse3(await (await getHealthClient()).getCertificate(domain2))
140664
141055
  )
140665
141056
  );
140666
- 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.
140667
- `).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(
140668
- actionRunner(
140669
- async ({ threshold, inactivityDays }) => parse3(await (await getHealthClient()).getConsolePausing(threshold, inactivityDays))
140670
- )
140671
- );
140672
141057
  health.command(`get-db`).description(`Check the Appwrite database servers are up and connection is successful.`).action(
140673
141058
  actionRunner(
140674
141059
  async () => parse3(await (await getHealthClient()).getDB())
@@ -140684,26 +141069,11 @@ health.command(`get-queue-audits`).description(`Get the number of audit logs tha
140684
141069
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueAudits(threshold))
140685
141070
  )
140686
141071
  );
140687
- 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(
140688
- actionRunner(
140689
- async ({ threshold }) => parse3(await (await getHealthClient()).getQueueBillingProjectAggregation(threshold))
140690
- )
140691
- );
140692
- 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(
140693
- actionRunner(
140694
- async ({ threshold }) => parse3(await (await getHealthClient()).getQueueBillingTeamAggregation(threshold))
140695
- )
140696
- );
140697
141072
  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(
140698
141073
  actionRunner(
140699
141074
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueBuilds(threshold))
140700
141075
  )
140701
141076
  );
140702
- 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(
140703
- actionRunner(
140704
- async ({ threshold }) => parse3(await (await getHealthClient()).getQueuePriorityBuilds(threshold))
140705
- )
140706
- );
140707
141077
  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(
140708
141078
  actionRunner(
140709
141079
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueCertificates(threshold))
@@ -140750,11 +141120,6 @@ health.command(`get-queue-migrations`).description(`Get the number of migrations
140750
141120
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueMigrations(threshold))
140751
141121
  )
140752
141122
  );
140753
- 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(
140754
- actionRunner(
140755
- async ({ threshold }) => parse3(await (await getHealthClient()).getQueueRegionManager(threshold))
140756
- )
140757
- );
140758
141123
  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(
140759
141124
  actionRunner(
140760
141125
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueStatsResources(threshold))
@@ -140765,11 +141130,6 @@ health.command(`get-queue-usage`).description(`Get the number of metrics that ar
140765
141130
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueUsage(threshold))
140766
141131
  )
140767
141132
  );
140768
- 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(
140769
- actionRunner(
140770
- async ({ threshold }) => parse3(await (await getHealthClient()).getQueueThreats(threshold))
140771
- )
140772
- );
140773
141133
  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(
140774
141134
  actionRunner(
140775
141135
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueWebhooks(threshold))
@@ -141307,7 +141667,7 @@ messaging.command(`delete-subscriber`).description(`Delete a subscriber by its u
141307
141667
  var migrationsClient = null;
141308
141668
  var getMigrationsClient = async () => {
141309
141669
  if (!migrationsClient) {
141310
- const sdkClient = await sdkForProject();
141670
+ const sdkClient = await sdkForConsole();
141311
141671
  migrationsClient = new Migrations(sdkClient);
141312
141672
  }
141313
141673
  return migrationsClient;
@@ -141402,6 +141762,217 @@ migrations.command(`delete`).description(`Delete a migration by its unique ID. T
141402
141762
  )
141403
141763
  );
141404
141764
 
141765
+ // lib/commands/services/organizations.ts
141766
+ var organizationsClient = null;
141767
+ var getOrganizationsClient = async () => {
141768
+ if (!organizationsClient) {
141769
+ const sdkClient = await sdkForConsole();
141770
+ organizationsClient = new Organizations(sdkClient);
141771
+ }
141772
+ return organizationsClient;
141773
+ };
141774
+ var organizations = new Command("organizations").description(commandDescriptions["organizations"] ?? "").configureHelp({
141775
+ helpWidth: process.stdout.columns || 80
141776
+ });
141777
+ 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(
141778
+ actionRunner(
141779
+ async ({ queries, search }) => parse3(await (await getOrganizationsClient()).list(queries, search))
141780
+ )
141781
+ );
141782
+ organizations.command(`create`).description(`Create a new organization.
141783
+ `).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(
141784
+ actionRunner(
141785
+ 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))
141786
+ )
141787
+ );
141788
+ 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(
141789
+ actionRunner(
141790
+ async ({ billingPlan, paymentMethodId, invites, couponId, platform }) => parse3(await (await getOrganizationsClient()).estimationCreateOrganization(billingPlan, paymentMethodId, invites, couponId, platform))
141791
+ )
141792
+ );
141793
+ organizations.command(`delete`).description(`Delete an organization.`).requiredOption(`--organization-id <organization-id>`, `Team ID.`).action(
141794
+ actionRunner(
141795
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).delete(organizationId))
141796
+ )
141797
+ );
141798
+ 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(
141799
+ actionRunner(
141800
+ async ({ organizationId, queries }) => parse3(await (await getOrganizationsClient()).listAggregations(organizationId, queries))
141801
+ )
141802
+ );
141803
+ 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(
141804
+ actionRunner(
141805
+ async ({ organizationId, aggregationId, limit, offset }) => parse3(await (await getOrganizationsClient()).getAggregation(organizationId, aggregationId, limit, offset))
141806
+ )
141807
+ );
141808
+ 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(
141809
+ actionRunner(
141810
+ async ({ organizationId, billingAddressId }) => parse3(await (await getOrganizationsClient()).setBillingAddress(organizationId, billingAddressId))
141811
+ )
141812
+ );
141813
+ 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(
141814
+ actionRunner(
141815
+ async ({ organizationId, billingEmail }) => parse3(await (await getOrganizationsClient()).setBillingEmail(organizationId, billingEmail))
141816
+ )
141817
+ );
141818
+ 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(
141819
+ actionRunner(
141820
+ async ({ organizationId, budget, alerts }) => parse3(await (await getOrganizationsClient()).updateBudget(organizationId, budget, alerts))
141821
+ )
141822
+ );
141823
+ organizations.command(`list-credits`).description(`List all credits for an organization.
141824
+ `).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(
141825
+ actionRunner(
141826
+ async ({ organizationId, queries }) => parse3(await (await getOrganizationsClient()).listCredits(organizationId, queries))
141827
+ )
141828
+ );
141829
+ 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(
141830
+ actionRunner(
141831
+ async ({ organizationId, couponId }) => parse3(await (await getOrganizationsClient()).addCredit(organizationId, couponId))
141832
+ )
141833
+ );
141834
+ organizations.command(`get-available-credits`).description(`Get total available valid credits for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).action(
141835
+ actionRunner(
141836
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).getAvailableCredits(organizationId))
141837
+ )
141838
+ );
141839
+ organizations.command(`get-credit`).description(`Get credit details.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--credit-id <credit-id>`, `Credit Unique ID`).action(
141840
+ actionRunner(
141841
+ async ({ organizationId, creditId }) => parse3(await (await getOrganizationsClient()).getCredit(organizationId, creditId))
141842
+ )
141843
+ );
141844
+ organizations.command(`estimation-delete-organization`).description(`Get estimation for deleting an organization.`).requiredOption(`--organization-id <organization-id>`, `Team ID.`).action(
141845
+ actionRunner(
141846
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).estimationDeleteOrganization(organizationId))
141847
+ )
141848
+ );
141849
+ 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(
141850
+ actionRunner(
141851
+ async ({ organizationId, billingPlan, invites, couponId }) => parse3(await (await getOrganizationsClient()).estimationUpdatePlan(organizationId, billingPlan, invites, couponId))
141852
+ )
141853
+ );
141854
+ 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.
141855
+ `).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(
141856
+ actionRunner(
141857
+ async ({ organizationId, reason, message, fromPlanId, toPlanId }) => parse3(await (await getOrganizationsClient()).createDowngradeFeedback(organizationId, reason, message, fromPlanId, toPlanId))
141858
+ )
141859
+ );
141860
+ 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(
141861
+ actionRunner(
141862
+ async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).getInvoice(organizationId, invoiceId))
141863
+ )
141864
+ );
141865
+ 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(
141866
+ actionRunner(
141867
+ async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).getInvoiceDownload(organizationId, invoiceId))
141868
+ )
141869
+ );
141870
+ 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(
141871
+ actionRunner(
141872
+ async ({ organizationId, invoiceId, paymentMethodId }) => parse3(await (await getOrganizationsClient()).createInvoicePayment(organizationId, invoiceId, paymentMethodId))
141873
+ )
141874
+ );
141875
+ 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(
141876
+ actionRunner(
141877
+ async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).validateInvoice(organizationId, invoiceId))
141878
+ )
141879
+ );
141880
+ 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(
141881
+ actionRunner(
141882
+ async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).getInvoiceView(organizationId, invoiceId))
141883
+ )
141884
+ );
141885
+ 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(
141886
+ `--total [value]`,
141887
+ `When set to false, the total count returned will be 0 and will not be calculated.`,
141888
+ (value) => value === void 0 ? true : parseBool(value)
141889
+ ).action(
141890
+ actionRunner(
141891
+ async ({ organizationId, total }) => parse3(await (await getOrganizationsClient()).listKeys(organizationId, total))
141892
+ )
141893
+ );
141894
+ 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(
141895
+ actionRunner(
141896
+ async ({ organizationId, name, scopes, expire }) => parse3(await (await getOrganizationsClient()).createKey(organizationId, name, scopes, expire))
141897
+ )
141898
+ );
141899
+ 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(
141900
+ actionRunner(
141901
+ async ({ organizationId, keyId }) => parse3(await (await getOrganizationsClient()).getKey(organizationId, keyId))
141902
+ )
141903
+ );
141904
+ 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(
141905
+ actionRunner(
141906
+ async ({ organizationId, keyId, name, scopes, expire }) => parse3(await (await getOrganizationsClient()).updateKey(organizationId, keyId, name, scopes, expire))
141907
+ )
141908
+ );
141909
+ 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(
141910
+ actionRunner(
141911
+ async ({ organizationId, keyId }) => parse3(await (await getOrganizationsClient()).deleteKey(organizationId, keyId))
141912
+ )
141913
+ );
141914
+ 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(
141915
+ actionRunner(
141916
+ async ({ organizationId, paymentMethodId }) => parse3(await (await getOrganizationsClient()).setDefaultPaymentMethod(organizationId, paymentMethodId))
141917
+ )
141918
+ );
141919
+ organizations.command(`delete-default-payment-method`).description(`Delete the default payment method for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).action(
141920
+ actionRunner(
141921
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).deleteDefaultPaymentMethod(organizationId))
141922
+ )
141923
+ );
141924
+ organizations.command(`set-backup-payment-method`).description(`Set an organization's backup payment method.
141925
+ `).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).action(
141926
+ actionRunner(
141927
+ async ({ organizationId, paymentMethodId }) => parse3(await (await getOrganizationsClient()).setBackupPaymentMethod(organizationId, paymentMethodId))
141928
+ )
141929
+ );
141930
+ organizations.command(`delete-backup-payment-method`).description(`Delete a backup payment method for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).action(
141931
+ actionRunner(
141932
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).deleteBackupPaymentMethod(organizationId))
141933
+ )
141934
+ );
141935
+ 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(
141936
+ actionRunner(
141937
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).getPlan(organizationId))
141938
+ )
141939
+ );
141940
+ 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(
141941
+ actionRunner(
141942
+ async ({ organizationId, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget }) => parse3(await (await getOrganizationsClient()).updatePlan(organizationId, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget))
141943
+ )
141944
+ );
141945
+ organizations.command(`cancel-downgrade`).description(`Cancel the downgrade initiated for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).action(
141946
+ actionRunner(
141947
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).cancelDowngrade(organizationId))
141948
+ )
141949
+ );
141950
+ organizations.command(`list-regions`).description(`Get all available regions for an organization.`).requiredOption(`--organization-id <organization-id>`, `Team ID.`).action(
141951
+ actionRunner(
141952
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).listRegions(organizationId))
141953
+ )
141954
+ );
141955
+ organizations.command(`get-scopes`).description(`Get Scopes`).requiredOption(`--organization-id <organization-id>`, `Organization id`).option(`--project-id <project-id>`, `Project id`).action(
141956
+ actionRunner(
141957
+ async ({ organizationId, projectId }) => parse3(await (await getOrganizationsClient()).getScopes(organizationId, projectId))
141958
+ )
141959
+ );
141960
+ 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(
141961
+ actionRunner(
141962
+ async ({ organizationId, taxId }) => parse3(await (await getOrganizationsClient()).setBillingTaxId(organizationId, taxId))
141963
+ )
141964
+ );
141965
+ 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(
141966
+ actionRunner(
141967
+ async ({ organizationId, startDate, endDate }) => parse3(await (await getOrganizationsClient()).getUsage(organizationId, startDate, endDate))
141968
+ )
141969
+ );
141970
+ 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(
141971
+ actionRunner(
141972
+ async ({ organizationId, invites }) => parse3(await (await getOrganizationsClient()).validatePayment(organizationId, invites))
141973
+ )
141974
+ );
141975
+
141405
141976
  // lib/commands/services/project.ts
141406
141977
  var projectClient = null;
141407
141978
  var getProjectClient = async () => {
@@ -141419,26 +141990,30 @@ project.command(`get-usage`).description(`Get comprehensive usage statistics for
141419
141990
  async ({ startDate, endDate, period }) => parse3(await (await getProjectClient()).getUsage(startDate, endDate, period))
141420
141991
  )
141421
141992
  );
141422
- project.command(`list-variables`).description(`Get a list of all project variables. These variables will be accessible in all Appwrite Functions at runtime.`).action(
141993
+ 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(
141994
+ `--total [value]`,
141995
+ `When set to false, the total count returned will be 0 and will not be calculated.`,
141996
+ (value) => value === void 0 ? true : parseBool(value)
141997
+ ).action(
141423
141998
  actionRunner(
141424
- async () => parse3(await (await getProjectClient()).listVariables())
141999
+ async ({ queries, total }) => parse3(await (await getProjectClient()).listVariables(queries, total))
141425
142000
  )
141426
142001
  );
141427
- 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(
142002
+ 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(
141428
142003
  `--secret [value]`,
141429
142004
  `Secret variables can be updated or deleted, but only projects can read them during build and runtime.`,
141430
142005
  (value) => value === void 0 ? true : parseBool(value)
141431
142006
  ).action(
141432
142007
  actionRunner(
141433
- async ({ key, value, secret }) => parse3(await (await getProjectClient()).createVariable(key, value, secret))
142008
+ async ({ variableId, key, value, secret }) => parse3(await (await getProjectClient()).createVariable(variableId, key, value, secret))
141434
142009
  )
141435
142010
  );
141436
- project.command(`get-variable`).description(`Get a project variable by its unique ID.`).requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`).action(
142011
+ project.command(`get-variable`).description(`Get a variable by its unique ID. `).requiredOption(`--variable-id <variable-id>`, `Variable ID.`).action(
141437
142012
  actionRunner(
141438
142013
  async ({ variableId }) => parse3(await (await getProjectClient()).getVariable(variableId))
141439
142014
  )
141440
142015
  );
141441
- 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(
142016
+ 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(
141442
142017
  `--secret [value]`,
141443
142018
  `Secret variables can be updated or deleted, but only projects can read them during build and runtime.`,
141444
142019
  (value) => value === void 0 ? true : parseBool(value)
@@ -141447,7 +142022,7 @@ project.command(`update-variable`).description(`Update project variable by its u
141447
142022
  async ({ variableId, key, value, secret }) => parse3(await (await getProjectClient()).updateVariable(variableId, key, value, secret))
141448
142023
  )
141449
142024
  );
141450
- project.command(`delete-variable`).description(`Delete a project variable by its unique ID. `).requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`).action(
142025
+ project.command(`delete-variable`).description(`Delete a variable by its unique ID. `).requiredOption(`--variable-id <variable-id>`, `Variable ID.`).action(
141451
142026
  actionRunner(
141452
142027
  async ({ variableId }) => parse3(await (await getProjectClient()).deleteVariable(variableId))
141453
142028
  )
@@ -141457,7 +142032,7 @@ project.command(`delete-variable`).description(`Delete a project variable by its
141457
142032
  var projectsClient = null;
141458
142033
  var getProjectsClient = async () => {
141459
142034
  if (!projectsClient) {
141460
- const sdkClient = await sdkForProject();
142035
+ const sdkClient = await sdkForConsole();
141461
142036
  projectsClient = new Projects(sdkClient);
141462
142037
  }
141463
142038
  return projectsClient;
@@ -141559,12 +142134,6 @@ projects.command(`update-auth-status`).description(`Update the status of a speci
141559
142134
  async ({ projectId, method, status }) => parse3(await (await getProjectsClient()).updateAuthStatus(projectId, method, status))
141560
142135
  )
141561
142136
  );
141562
- 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.
141563
- `).requiredOption(`--project-id <project-id>`, `Project ID`).action(
141564
- actionRunner(
141565
- async ({ projectId }) => parse3(await (await getProjectsClient()).updateConsoleAccess(projectId))
141566
- )
141567
- );
141568
142137
  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(
141569
142138
  actionRunner(
141570
142139
  async ({ projectId, queries }) => parse3(await (await getProjectsClient()).listDevKeys(projectId, queries))
@@ -141756,7 +142325,7 @@ projects.command(`delete-sms-template`).description(`Reset a custom SMS template
141756
142325
  var proxyClient = null;
141757
142326
  var getProxyClient = async () => {
141758
142327
  if (!proxyClient) {
141759
- const sdkClient = await sdkForProject();
142328
+ const sdkClient = await sdkForConsole();
141760
142329
  proxyClient = new Proxy2(sdkClient);
141761
142330
  }
141762
142331
  return proxyClient;
@@ -142744,7 +143313,15 @@ tablesDB.command(`get-usage`).description(`Get usage metrics and statistics for
142744
143313
  var teamsClient = null;
142745
143314
  var getTeamsClient = async () => {
142746
143315
  if (!teamsClient) {
142747
- const sdkClient = await sdkForProject();
143316
+ let sdkClient;
143317
+ try {
143318
+ sdkClient = await sdkForProject();
143319
+ } catch (e) {
143320
+ if (e instanceof Error && e.message.includes("Project is not set")) {
143321
+ hint(`To manage console-level teams, use the 'organizations' command instead.`);
143322
+ }
143323
+ throw e;
143324
+ }
142748
143325
  teamsClient = new Teams(sdkClient);
142749
143326
  }
142750
143327
  return teamsClient;
@@ -142900,7 +143477,7 @@ var getUsersClient = async () => {
142900
143477
  var users = new Command("users").description(commandDescriptions["users"] ?? "").configureHelp({
142901
143478
  helpWidth: process.stdout.columns || 80
142902
143479
  });
142903
- 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(
143480
+ 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(
142904
143481
  `--total [value]`,
142905
143482
  `When set to false, the total count returned will be 0 and will not be calculated.`,
142906
143483
  (value) => value === void 0 ? true : parseBool(value)
@@ -142984,6 +143561,12 @@ users.command(`update-email`).description(`Update the user email by its unique I
142984
143561
  async ({ userId, email: email3 }) => parse3(await (await getUsersClient()).updateEmail(userId, email3))
142985
143562
  )
142986
143563
  );
143564
+ 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.
143565
+ `).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(
143566
+ actionRunner(
143567
+ async ({ userId, impersonator }) => parse3(await (await getUsersClient()).updateImpersonator(userId, impersonator))
143568
+ )
143569
+ );
142987
143570
  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(
142988
143571
  actionRunner(
142989
143572
  async ({ userId, sessionId, duration: duration3 }) => parse3(await (await getUsersClient()).createJWT(userId, sessionId, duration3))
@@ -143150,7 +143733,7 @@ users.command(`update-phone-verification`).description(`Update the user phone ve
143150
143733
  var vcsClient = null;
143151
143734
  var getVcsClient = async () => {
143152
143735
  if (!vcsClient) {
143153
- const sdkClient = await sdkForProject();
143736
+ const sdkClient = await sdkForConsole();
143154
143737
  vcsClient = new Vcs(sdkClient);
143155
143738
  }
143156
143739
  return vcsClient;
@@ -143316,8 +143899,10 @@ if (process.argv.includes("-v") || process.argv.includes("--version")) {
143316
143899
  program.description(commandDescriptions["main"]).configureHelp({
143317
143900
  helpWidth: process.stdout.columns || 80,
143318
143901
  sortSubcommands: true
143319
- }).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", () => {
143902
+ }).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", () => {
143320
143903
  cliConfig.json = true;
143904
+ }).on("option:raw", () => {
143905
+ cliConfig.raw = true;
143321
143906
  }).on("option:verbose", () => {
143322
143907
  cliConfig.verbose = true;
143323
143908
  }).on("option:report", function() {
@@ -143329,14 +143914,11 @@ if (process.argv.includes("-v") || process.argv.includes("--version")) {
143329
143914
  cliConfig.all = true;
143330
143915
  }).on("option:id", function() {
143331
143916
  cliConfig.ids = this.opts().id;
143332
- }).showSuggestionAfterError().addCommand(whoami).addCommand(register).addCommand(login).addCommand(init).addCommand(pull).addCommand(push).addCommand(types).addCommand(deploy).addCommand(run).addCommand(update).addCommand(generate).addCommand(logout).addCommand(account).addCommand(activities).addCommand(backups).addCommand(databases).addCommand(functions).addCommand(graphql).addCommand(health).addCommand(locale).addCommand(messaging).addCommand(migrations).addCommand(project).addCommand(projects).addCommand(proxy).addCommand(sites).addCommand(storage).addCommand(tablesDB).addCommand(teams).addCommand(tokens).addCommand(users).addCommand(vcs).addCommand(webhooks).addCommand(client).parse(process.argv);
143917
+ }).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);
143333
143918
  process.stdout.columns = oldWidth;
143334
143919
  }
143335
143920
  /*! Bundled license information:
143336
143921
 
143337
- safe-buffer/index.js:
143338
- (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
143339
-
143340
143922
  undici/lib/fetch/body.js:
143341
143923
  (*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
143342
143924