appwrite-cli 17.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 (69) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +2 -2
  3. package/cli.ts +6 -0
  4. package/dist/bundle-win-arm64.mjs +489 -122
  5. package/dist/cli.cjs +489 -122
  6. package/dist/index.cjs +175 -85
  7. package/dist/index.js +175 -85
  8. package/dist/lib/commands/services/organizations.d.ts +3 -0
  9. package/dist/lib/commands/services/organizations.d.ts.map +1 -0
  10. package/dist/lib/commands/services/teams.d.ts.map +1 -1
  11. package/dist/lib/constants.d.ts +1 -1
  12. package/dist/lib/emulation/utils.d.ts.map +1 -1
  13. package/dist/lib/parser.d.ts.map +1 -1
  14. package/dist/lib/types.d.ts +1 -0
  15. package/dist/lib/types.d.ts.map +1 -1
  16. package/docs/examples/organizations/add-credit.md +5 -0
  17. package/docs/examples/organizations/cancel-downgrade.md +4 -0
  18. package/docs/examples/organizations/create-downgrade-feedback.md +8 -0
  19. package/docs/examples/organizations/create-invoice-payment.md +6 -0
  20. package/docs/examples/organizations/create-key.md +6 -0
  21. package/docs/examples/organizations/create.md +6 -0
  22. package/docs/examples/organizations/delete-backup-payment-method.md +4 -0
  23. package/docs/examples/organizations/delete-default-payment-method.md +4 -0
  24. package/docs/examples/organizations/delete-key.md +5 -0
  25. package/docs/examples/organizations/delete.md +4 -0
  26. package/docs/examples/organizations/estimation-create-organization.md +4 -0
  27. package/docs/examples/organizations/estimation-delete-organization.md +4 -0
  28. package/docs/examples/organizations/estimation-update-plan.md +5 -0
  29. package/docs/examples/organizations/get-aggregation.md +5 -0
  30. package/docs/examples/organizations/get-available-credits.md +4 -0
  31. package/docs/examples/organizations/get-credit.md +5 -0
  32. package/docs/examples/organizations/get-invoice-download.md +5 -0
  33. package/docs/examples/organizations/get-invoice-view.md +5 -0
  34. package/docs/examples/organizations/get-invoice.md +5 -0
  35. package/docs/examples/organizations/get-key.md +5 -0
  36. package/docs/examples/organizations/get-plan.md +4 -0
  37. package/docs/examples/organizations/get-scopes.md +4 -0
  38. package/docs/examples/organizations/get-usage.md +4 -0
  39. package/docs/examples/organizations/list-aggregations.md +4 -0
  40. package/docs/examples/organizations/list-credits.md +4 -0
  41. package/docs/examples/organizations/list-keys.md +4 -0
  42. package/docs/examples/organizations/list-regions.md +4 -0
  43. package/docs/examples/organizations/list.md +3 -0
  44. package/docs/examples/organizations/set-backup-payment-method.md +5 -0
  45. package/docs/examples/organizations/set-billing-address.md +5 -0
  46. package/docs/examples/organizations/set-billing-email.md +5 -0
  47. package/docs/examples/organizations/set-billing-tax-id.md +5 -0
  48. package/docs/examples/organizations/set-default-payment-method.md +5 -0
  49. package/docs/examples/organizations/update-budget.md +5 -0
  50. package/docs/examples/organizations/update-key.md +7 -0
  51. package/docs/examples/organizations/update-plan.md +5 -0
  52. package/docs/examples/organizations/validate-invoice.md +5 -0
  53. package/docs/examples/organizations/validate-payment.md +4 -0
  54. package/install.ps1 +2 -2
  55. package/install.sh +1 -1
  56. package/lib/commands/services/migrations.ts +2 -2
  57. package/lib/commands/services/organizations.ts +517 -0
  58. package/lib/commands/services/projects.ts +2 -2
  59. package/lib/commands/services/proxy.ts +2 -2
  60. package/lib/commands/services/teams.ts +10 -1
  61. package/lib/commands/services/vcs.ts +2 -2
  62. package/lib/constants.ts +1 -1
  63. package/lib/emulation/utils.ts +3 -2
  64. package/lib/parser.ts +149 -27
  65. package/lib/questions.ts +2 -2
  66. package/lib/sdks.ts +1 -0
  67. package/lib/types.ts +1 -0
  68. package/package.json +1 -1
  69. package/scoop/appwrite.config.json +3 -3
@@ -21981,7 +21981,6 @@ var require_safe_buffer = __commonJS({
21981
21981
  function SafeBuffer(arg, encodingOrOffset, length) {
21982
21982
  return Buffer2(arg, encodingOrOffset, length);
21983
21983
  }
21984
- SafeBuffer.prototype = Object.create(Buffer2.prototype);
21985
21984
  copyProps(Buffer2, SafeBuffer);
21986
21985
  SafeBuffer.from = function(arg, encodingOrOffset, length) {
21987
21986
  if (typeof arg === "number") {
@@ -24524,16 +24523,16 @@ var require_base = __commonJS({
24524
24523
  }),
24525
24524
  share()
24526
24525
  );
24527
- const success21 = validation.pipe(
24526
+ const success22 = validation.pipe(
24528
24527
  filter((state) => state.isValid === true),
24529
24528
  take(1)
24530
24529
  );
24531
24530
  const error49 = validation.pipe(
24532
24531
  filter((state) => state.isValid !== true),
24533
- takeUntil(success21)
24532
+ takeUntil(success22)
24534
24533
  );
24535
24534
  return {
24536
- success: success21,
24535
+ success: success22,
24537
24536
  error: error49
24538
24537
  };
24539
24538
  }
@@ -63459,14 +63458,14 @@ var require_base2 = __commonJS({
63459
63458
  return { isValid: err };
63460
63459
  });
63461
63460
  }).share();
63462
- var success21 = validation.filter(function(state) {
63461
+ var success22 = validation.filter(function(state) {
63463
63462
  return state.isValid === true;
63464
63463
  }).take(1);
63465
63464
  var error49 = validation.filter(function(state) {
63466
63465
  return state.isValid !== true;
63467
- }).takeUntil(success21);
63466
+ }).takeUntil(success22);
63468
63467
  return {
63469
- success: success21,
63468
+ success: success22,
63470
63469
  error: error49
63471
63470
  };
63472
63471
  };
@@ -80517,7 +80516,7 @@ var require_helpers = __commonJS({
80517
80516
  if (instance.helpers[helperName]) {
80518
80517
  instance.hooks[helperName] = instance.helpers[helperName];
80519
80518
  if (!keepHelper) {
80520
- delete instance.helpers[helperName];
80519
+ instance.helpers[helperName] = void 0;
80521
80520
  }
80522
80521
  }
80523
80522
  }
@@ -80609,22 +80608,6 @@ var require_logger = __commonJS({
80609
80608
  }
80610
80609
  });
80611
80610
 
80612
- // node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js
80613
- var require_create_new_lookup_object = __commonJS({
80614
- "node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js"(exports) {
80615
- "use strict";
80616
- exports.__esModule = true;
80617
- exports.createNewLookupObject = createNewLookupObject;
80618
- var _utils = require_utils9();
80619
- function createNewLookupObject() {
80620
- for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {
80621
- sources[_key] = arguments[_key];
80622
- }
80623
- return _utils.extend.apply(void 0, [/* @__PURE__ */ Object.create(null)].concat(sources));
80624
- }
80625
- }
80626
- });
80627
-
80628
80611
  // node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js
80629
80612
  var require_proto_access = __commonJS({
80630
80613
  "node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js"(exports) {
@@ -80636,25 +80619,28 @@ var require_proto_access = __commonJS({
80636
80619
  function _interopRequireDefault(obj) {
80637
80620
  return obj && obj.__esModule ? obj : { "default": obj };
80638
80621
  }
80639
- var _createNewLookupObject = require_create_new_lookup_object();
80622
+ var _utils = require_utils9();
80640
80623
  var _logger = require_logger();
80641
80624
  var _logger2 = _interopRequireDefault(_logger);
80642
80625
  var loggedProperties = /* @__PURE__ */ Object.create(null);
80643
80626
  function createProtoAccessControl(runtimeOptions) {
80644
- var defaultMethodWhiteList = /* @__PURE__ */ Object.create(null);
80645
- defaultMethodWhiteList["constructor"] = false;
80646
- defaultMethodWhiteList["__defineGetter__"] = false;
80647
- defaultMethodWhiteList["__defineSetter__"] = false;
80648
- defaultMethodWhiteList["__lookupGetter__"] = false;
80649
- var defaultPropertyWhiteList = /* @__PURE__ */ Object.create(null);
80650
- defaultPropertyWhiteList["__proto__"] = false;
80627
+ var propertyWhiteList = /* @__PURE__ */ Object.create(null);
80628
+ propertyWhiteList["__proto__"] = false;
80629
+ _utils.extend(propertyWhiteList, runtimeOptions.allowedProtoProperties);
80630
+ var methodWhiteList = /* @__PURE__ */ Object.create(null);
80631
+ methodWhiteList["constructor"] = false;
80632
+ methodWhiteList["__defineGetter__"] = false;
80633
+ methodWhiteList["__defineSetter__"] = false;
80634
+ methodWhiteList["__lookupGetter__"] = false;
80635
+ methodWhiteList["__lookupSetter__"] = false;
80636
+ _utils.extend(methodWhiteList, runtimeOptions.allowedProtoMethods);
80651
80637
  return {
80652
80638
  properties: {
80653
- whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties),
80639
+ whitelist: propertyWhiteList,
80654
80640
  defaultValue: runtimeOptions.allowProtoPropertiesByDefault
80655
80641
  },
80656
80642
  methods: {
80657
- whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods),
80643
+ whitelist: methodWhiteList,
80658
80644
  defaultValue: runtimeOptions.allowProtoMethodsByDefault
80659
80645
  }
80660
80646
  };
@@ -80707,7 +80693,7 @@ var require_base3 = __commonJS({
80707
80693
  var _logger = require_logger();
80708
80694
  var _logger2 = _interopRequireDefault(_logger);
80709
80695
  var _internalProtoAccess = require_proto_access();
80710
- var VERSION = "4.7.8";
80696
+ var VERSION = "4.7.9";
80711
80697
  exports.VERSION = VERSION;
80712
80698
  var COMPILER_REVISION = 8;
80713
80699
  exports.COMPILER_REVISION = COMPILER_REVISION;
@@ -80893,14 +80879,12 @@ var require_runtime = __commonJS({
80893
80879
  }
80894
80880
  }
80895
80881
  partial2 = env.VM.resolvePartial.call(this, partial2, context, options);
80896
- var extendedOptions = Utils.extend({}, options, {
80897
- hooks: this.hooks,
80898
- protoAccessControl: this.protoAccessControl
80899
- });
80900
- var result = env.VM.invokePartial.call(this, partial2, context, extendedOptions);
80882
+ options.hooks = this.hooks;
80883
+ options.protoAccessControl = this.protoAccessControl;
80884
+ var result = env.VM.invokePartial.call(this, partial2, context, options);
80901
80885
  if (result == null && env.compile) {
80902
80886
  options.partials[options.name] = env.compile(partial2, templateSpec.compilerOptions, env);
80903
- result = options.partials[options.name](context, extendedOptions);
80887
+ result = options.partials[options.name](context, options);
80904
80888
  }
80905
80889
  if (result != null) {
80906
80890
  if (options.indent) {
@@ -80945,7 +80929,7 @@ var require_runtime = __commonJS({
80945
80929
  for (var i = 0; i < len; i++) {
80946
80930
  var result = depths[i] && container.lookupProperty(depths[i], name);
80947
80931
  if (result != null) {
80948
- return depths[i][name];
80932
+ return result;
80949
80933
  }
80950
80934
  }
80951
80935
  },
@@ -81011,8 +80995,9 @@ var require_runtime = __commonJS({
81011
80995
  ret.isTop = true;
81012
80996
  ret._setup = function(options) {
81013
80997
  if (!options.partial) {
81014
- var mergedHelpers = Utils.extend({}, env.helpers, options.helpers);
81015
- wrapHelpersToPassLookupProperty(mergedHelpers, container);
80998
+ var mergedHelpers = {};
80999
+ addHelpers(mergedHelpers, env.helpers, container);
81000
+ addHelpers(mergedHelpers, options.helpers, container);
81016
81001
  container.helpers = mergedHelpers;
81017
81002
  if (templateSpec.usePartial) {
81018
81003
  container.partials = container.mergeIfNeeded(options.partials, env.partials);
@@ -81062,18 +81047,18 @@ var require_runtime = __commonJS({
81062
81047
  function resolvePartial(partial2, context, options) {
81063
81048
  if (!partial2) {
81064
81049
  if (options.name === "@partial-block") {
81065
- partial2 = options.data["partial-block"];
81050
+ partial2 = lookupOwnProperty(options.data, "partial-block");
81066
81051
  } else {
81067
- partial2 = options.partials[options.name];
81052
+ partial2 = lookupOwnProperty(options.partials, options.name);
81068
81053
  }
81069
81054
  } else if (!partial2.call && !options.name) {
81070
81055
  options.name = partial2;
81071
- partial2 = options.partials[partial2];
81056
+ partial2 = lookupOwnProperty(options.partials, partial2);
81072
81057
  }
81073
81058
  return partial2;
81074
81059
  }
81075
81060
  function invokePartial(partial2, context, options) {
81076
- var currentPartialBlock = options.data && options.data["partial-block"];
81061
+ var currentPartialBlock = lookupOwnProperty(options.data, "partial-block");
81077
81062
  options.partial = true;
81078
81063
  if (options.ids) {
81079
81064
  options.data.contextPath = options.ids[0] || options.data.contextPath;
@@ -81106,6 +81091,11 @@ var require_runtime = __commonJS({
81106
81091
  function noop() {
81107
81092
  return "";
81108
81093
  }
81094
+ function lookupOwnProperty(obj, name) {
81095
+ if (obj && Object.prototype.hasOwnProperty.call(obj, name)) {
81096
+ return obj[name];
81097
+ }
81098
+ }
81109
81099
  function initData(context, data) {
81110
81100
  if (!data || !("root" in data)) {
81111
81101
  data = data ? _base.createFrame(data) : {};
@@ -81121,16 +81111,18 @@ var require_runtime = __commonJS({
81121
81111
  }
81122
81112
  return prog;
81123
81113
  }
81124
- function wrapHelpersToPassLookupProperty(mergedHelpers, container) {
81125
- Object.keys(mergedHelpers).forEach(function(helperName) {
81126
- var helper = mergedHelpers[helperName];
81114
+ function addHelpers(mergedHelpers, helpers, container) {
81115
+ if (!helpers) return;
81116
+ Object.keys(helpers).forEach(function(helperName) {
81117
+ var helper = helpers[helperName];
81127
81118
  mergedHelpers[helperName] = passLookupPropertyOption(helper, container);
81128
81119
  });
81129
81120
  }
81130
81121
  function passLookupPropertyOption(helper, container) {
81131
81122
  var lookupProperty = container.lookupProperty;
81132
81123
  return _internalWrapHelper.wrapHelper(helper, function(options) {
81133
- return Utils.extend({ lookupProperty }, options);
81124
+ options.lookupProperty = lookupProperty;
81125
+ return options;
81134
81126
  });
81135
81127
  }
81136
81128
  }
@@ -81940,7 +81932,7 @@ var require_parser = __commonJS({
81940
81932
  break;
81941
81933
  }
81942
81934
  };
81943
- lexer2.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
81935
+ lexer2.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
81944
81936
  lexer2.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } };
81945
81937
  return lexer2;
81946
81938
  })();
@@ -82447,12 +82439,15 @@ var require_base4 = __commonJS({
82447
82439
  var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
82448
82440
  var _helpers = require_helpers2();
82449
82441
  var Helpers = _interopRequireWildcard(_helpers);
82442
+ var _exception = require_exception();
82443
+ var _exception2 = _interopRequireDefault(_exception);
82450
82444
  var _utils = require_utils9();
82451
82445
  exports.parser = _parser2["default"];
82452
82446
  var yy = {};
82453
82447
  _utils.extend(yy, Helpers);
82454
82448
  function parseWithoutProcessing(input, options) {
82455
82449
  if (input.type === "Program") {
82450
+ validateInputAst(input);
82456
82451
  return input;
82457
82452
  }
82458
82453
  _parser2["default"].yy = yy;
@@ -82467,6 +82462,51 @@ var require_base4 = __commonJS({
82467
82462
  var strip = new _whitespaceControl2["default"](options);
82468
82463
  return strip.accept(ast);
82469
82464
  }
82465
+ function validateInputAst(ast) {
82466
+ validateAstNode(ast);
82467
+ }
82468
+ function validateAstNode(node) {
82469
+ if (node == null) {
82470
+ return;
82471
+ }
82472
+ if (Array.isArray(node)) {
82473
+ node.forEach(validateAstNode);
82474
+ return;
82475
+ }
82476
+ if (typeof node !== "object") {
82477
+ return;
82478
+ }
82479
+ if (node.type === "PathExpression") {
82480
+ if (!isValidDepth(node.depth)) {
82481
+ throw new _exception2["default"]("Invalid AST: PathExpression.depth must be an integer");
82482
+ }
82483
+ if (!Array.isArray(node.parts)) {
82484
+ throw new _exception2["default"]("Invalid AST: PathExpression.parts must be an array");
82485
+ }
82486
+ for (var i = 0; i < node.parts.length; i++) {
82487
+ if (typeof node.parts[i] !== "string") {
82488
+ throw new _exception2["default"]("Invalid AST: PathExpression.parts must only contain strings");
82489
+ }
82490
+ }
82491
+ } else if (node.type === "NumberLiteral") {
82492
+ if (typeof node.value !== "number" || !isFinite(node.value)) {
82493
+ throw new _exception2["default"]("Invalid AST: NumberLiteral.value must be a number");
82494
+ }
82495
+ } else if (node.type === "BooleanLiteral") {
82496
+ if (typeof node.value !== "boolean") {
82497
+ throw new _exception2["default"]("Invalid AST: BooleanLiteral.value must be a boolean");
82498
+ }
82499
+ }
82500
+ Object.keys(node).forEach(function(propertyName) {
82501
+ if (propertyName === "loc") {
82502
+ return;
82503
+ }
82504
+ validateAstNode(node[propertyName]);
82505
+ });
82506
+ }
82507
+ function isValidDepth(depth) {
82508
+ return typeof depth === "number" && isFinite(depth) && Math.floor(depth) === depth && depth >= 0;
82509
+ }
82470
82510
  }
82471
82511
  });
82472
82512
 
@@ -84895,12 +84935,10 @@ var require_javascript_compiler = __commonJS({
84895
84935
  var programs = _context.programs;
84896
84936
  var decorators = _context.decorators;
84897
84937
  for (i = 0, l = programs.length; i < l; i++) {
84898
- if (programs[i]) {
84899
- ret[i] = programs[i];
84900
- if (decorators[i]) {
84901
- ret[i + "_d"] = decorators[i];
84902
- ret.useDecorators = true;
84903
- }
84938
+ ret[i] = programs[i];
84939
+ if (decorators[i]) {
84940
+ ret[i + "_d"] = decorators[i];
84941
+ ret.useDecorators = true;
84904
84942
  }
84905
84943
  }
84906
84944
  if (this.environment.usePartial) {
@@ -85161,22 +85199,25 @@ var require_javascript_compiler = __commonJS({
85161
85199
  }
85162
85200
  this.resolvePath("data", parts, 0, true, strict);
85163
85201
  },
85164
- resolvePath: function resolvePath(type, parts, i, falsy, strict) {
85202
+ resolvePath: function resolvePath(type, parts, startPartIndex, falsy, strict) {
85165
85203
  var _this2 = this;
85166
85204
  if (this.options.strict || this.options.assumeObjects) {
85167
- this.push(strictLookup(this.options.strict && strict, this, parts, i, type));
85205
+ this.push(strictLookup(this.options.strict && strict, this, parts, startPartIndex, type));
85168
85206
  return;
85169
85207
  }
85170
85208
  var len = parts.length;
85171
- for (; i < len; i++) {
85172
- this.replaceStack(function(current) {
85173
- var lookup = _this2.nameLookup(current, parts[i], type);
85209
+ var _loop = function(i2) {
85210
+ _this2.replaceStack(function(current) {
85211
+ var lookup = _this2.nameLookup(current, parts[i2], type);
85174
85212
  if (!falsy) {
85175
85213
  return [" != null ? ", lookup, " : ", current];
85176
85214
  } else {
85177
85215
  return [" && ", lookup];
85178
85216
  }
85179
85217
  });
85218
+ };
85219
+ for (var i = startPartIndex; i < len; i++) {
85220
+ _loop(i);
85180
85221
  }
85181
85222
  },
85182
85223
  // [resolvePossibleLambda]
@@ -85280,7 +85321,9 @@ var require_javascript_compiler = __commonJS({
85280
85321
  // and inserts the decorator into the decorators list.
85281
85322
  registerDecorator: function registerDecorator(paramSize, name) {
85282
85323
  var foundDecorator = this.nameLookup("decorators", name, "decorator"), options = this.setupHelperArgs(name, paramSize);
85283
- this.decorators.push(["fn = ", this.decorators.functionCall(foundDecorator, "", ["fn", "props", "container", options]), " || fn;"]);
85324
+ this.decorators.push(["var decorator = ", foundDecorator, ";"]);
85325
+ this.decorators.push(['if (typeof decorator !== "function") { throw new Error(', this.quotedString('Missing decorator: "' + name + '"'), "); }"]);
85326
+ this.decorators.push(["fn = ", this.decorators.functionCall("decorator", "", ["fn", "props", "container", options]), " || fn;"]);
85284
85327
  },
85285
85328
  // [invokeHelper]
85286
85329
  //
@@ -85427,8 +85470,7 @@ var require_javascript_compiler = __commonJS({
85427
85470
  compiler = new this.compiler();
85428
85471
  var existing = this.matchExistingProgram(child);
85429
85472
  if (existing == null) {
85430
- this.context.programs.push("");
85431
- var index = this.context.programs.length;
85473
+ var index = this.context.programs.push("") - 1;
85432
85474
  child.index = index;
85433
85475
  child.name = "program" + index;
85434
85476
  this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
@@ -85672,16 +85714,16 @@ var require_javascript_compiler = __commonJS({
85672
85714
  JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
85673
85715
  return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
85674
85716
  };
85675
- function strictLookup(requireTerminal, compiler, parts, i, type) {
85717
+ function strictLookup(requireTerminal, compiler, parts, startPartIndex, type) {
85676
85718
  var stack = compiler.popStack(), len = parts.length;
85677
85719
  if (requireTerminal) {
85678
85720
  len--;
85679
85721
  }
85680
- for (; i < len; i++) {
85722
+ for (var i = startPartIndex; i < len; i++) {
85681
85723
  stack = compiler.nameLookup(stack, parts[i], type);
85682
85724
  }
85683
85725
  if (requireTerminal) {
85684
- return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[i]), ", ", JSON.stringify(compiler.source.currentLocation), " )"];
85726
+ return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[len]), ", ", JSON.stringify(compiler.source.currentLocation), " )"];
85685
85727
  } else {
85686
85728
  return stack;
85687
85729
  }
@@ -85931,7 +85973,7 @@ var package_default = {
85931
85973
  type: "module",
85932
85974
  homepage: "https://appwrite.io/support",
85933
85975
  description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
85934
- version: "17.0.0",
85976
+ version: "17.1.0",
85935
85977
  license: "BSD-3-Clause",
85936
85978
  main: "dist/index.cjs",
85937
85979
  module: "dist/index.js",
@@ -100219,7 +100261,7 @@ import childProcess from "child_process";
100219
100261
  // lib/constants.ts
100220
100262
  var SDK_TITLE = "Appwrite";
100221
100263
  var SDK_TITLE_LOWER = "appwrite";
100222
- var SDK_VERSION = "17.0.0";
100264
+ var SDK_VERSION = "17.1.0";
100223
100265
  var SDK_NAME = "Command Line";
100224
100266
  var SDK_PLATFORM = "console";
100225
100267
  var SDK_LANGUAGE = "cli";
@@ -103302,7 +103344,7 @@ var Account = class {
103302
103344
  };
103303
103345
  }
103304
103346
  const provider = params.provider;
103305
- const success21 = params.success;
103347
+ const success22 = params.success;
103306
103348
  const failure = params.failure;
103307
103349
  const scopes = params.scopes;
103308
103350
  if (typeof provider === "undefined") {
@@ -103310,8 +103352,8 @@ var Account = class {
103310
103352
  }
103311
103353
  const apiPath = "/account/sessions/oauth2/{provider}".replace("{provider}", provider);
103312
103354
  const payload = {};
103313
- if (typeof success21 !== "undefined") {
103314
- payload["success"] = success21;
103355
+ if (typeof success22 !== "undefined") {
103356
+ payload["success"] = success22;
103315
103357
  }
103316
103358
  if (typeof failure !== "undefined") {
103317
103359
  payload["failure"] = failure;
@@ -103650,7 +103692,7 @@ var Account = class {
103650
103692
  };
103651
103693
  }
103652
103694
  const provider = params.provider;
103653
- const success21 = params.success;
103695
+ const success22 = params.success;
103654
103696
  const failure = params.failure;
103655
103697
  const scopes = params.scopes;
103656
103698
  if (typeof provider === "undefined") {
@@ -103658,8 +103700,8 @@ var Account = class {
103658
103700
  }
103659
103701
  const apiPath = "/account/tokens/oauth2/{provider}".replace("{provider}", provider);
103660
103702
  const payload = {};
103661
- if (typeof success21 !== "undefined") {
103662
- payload["success"] = success21;
103703
+ if (typeof success22 !== "undefined") {
103704
+ payload["success"] = success22;
103663
103705
  }
103664
103706
  if (typeof failure !== "undefined") {
103665
103707
  payload["failure"] = failure;
@@ -126427,10 +126469,14 @@ var DomainPurchaseStatus;
126427
126469
  })(DomainPurchaseStatus || (DomainPurchaseStatus = {}));
126428
126470
 
126429
126471
  // lib/parser.ts
126472
+ BigInt.prototype.toJSON = function() {
126473
+ return this.toString();
126474
+ };
126430
126475
  var { description } = package_default;
126431
126476
  var cliConfig = {
126432
126477
  verbose: false,
126433
126478
  json: false,
126479
+ raw: false,
126434
126480
  force: false,
126435
126481
  all: false,
126436
126482
  ids: [],
@@ -126453,34 +126499,108 @@ var extractReportCommandArgs = (value) => {
126453
126499
  }
126454
126500
  return reportData.data.args;
126455
126501
  };
126502
+ var filterObject = (obj) => {
126503
+ const result = {};
126504
+ for (const key of Object.keys(obj)) {
126505
+ const value = obj[key];
126506
+ if (typeof value === "function") continue;
126507
+ if (value == null) continue;
126508
+ if (value?.constructor?.name === "BigNumber") {
126509
+ result[key] = String(value);
126510
+ continue;
126511
+ }
126512
+ if (typeof value === "object") continue;
126513
+ if (typeof value === "string" && value.trim() === "") continue;
126514
+ result[key] = value;
126515
+ }
126516
+ return result;
126517
+ };
126518
+ var filterData = (data) => {
126519
+ const result = {};
126520
+ for (const key of Object.keys(data)) {
126521
+ const value = data[key];
126522
+ if (typeof value === "function") continue;
126523
+ if (value == null) continue;
126524
+ if (value?.constructor?.name === "BigNumber") {
126525
+ result[key] = String(value);
126526
+ continue;
126527
+ }
126528
+ if (Array.isArray(value)) {
126529
+ result[key] = value.map((item) => {
126530
+ if (item?.constructor?.name === "BigNumber") return String(item);
126531
+ return item && typeof item === "object" && !Array.isArray(item) ? filterObject(item) : item;
126532
+ });
126533
+ } else if (typeof value === "object") {
126534
+ continue;
126535
+ } else if (typeof value === "string" && value.trim() === "") {
126536
+ continue;
126537
+ } else {
126538
+ result[key] = value;
126539
+ }
126540
+ }
126541
+ return result;
126542
+ };
126456
126543
  var parse3 = (data) => {
126457
- if (cliConfig.json) {
126544
+ if (cliConfig.raw) {
126458
126545
  drawJSON(data);
126459
126546
  return;
126460
126547
  }
126461
- for (const key in data) {
126462
- if (data[key] === null) {
126548
+ if (cliConfig.json) {
126549
+ drawJSON(filterData(data));
126550
+ return;
126551
+ }
126552
+ const keys = Object.keys(data).filter((k2) => typeof data[k2] !== "function");
126553
+ let printedScalar = false;
126554
+ for (const key of keys) {
126555
+ const value = data[key];
126556
+ if (value === null) {
126463
126557
  console.log(`${import_chalk.default.yellow.bold(key)} : null`);
126464
- } else if (Array.isArray(data[key])) {
126558
+ printedScalar = true;
126559
+ } else if (Array.isArray(value)) {
126560
+ if (printedScalar) console.log("");
126465
126561
  console.log(`${import_chalk.default.yellow.bold.underline(key)}`);
126466
- if (typeof data[key][0] === "object") {
126467
- drawTable(data[key]);
126562
+ if (typeof value[0] === "object") {
126563
+ drawTable(value);
126468
126564
  } else {
126469
- drawJSON(data[key]);
126470
- }
126471
- } else if (typeof data[key] === "object") {
126472
- if (data[key]?.constructor?.name === "BigNumber") {
126473
- console.log(`${import_chalk.default.yellow.bold(key)} : ${data[key]}`);
126565
+ drawJSON(value);
126566
+ }
126567
+ printedScalar = false;
126568
+ } else if (typeof value === "object") {
126569
+ if (printedScalar) console.log("");
126570
+ if (value?.constructor?.name === "BigNumber") {
126571
+ console.log(`${import_chalk.default.yellow.bold(key)} : ${value}`);
126572
+ printedScalar = true;
126474
126573
  } else {
126475
126574
  console.log(`${import_chalk.default.yellow.bold.underline(key)}`);
126476
- const tableRow = toJsonObject(data[key]) ?? {};
126575
+ const tableRow = toJsonObject(value) ?? {};
126477
126576
  drawTable([tableRow]);
126577
+ printedScalar = false;
126478
126578
  }
126479
126579
  } else {
126480
- console.log(`${import_chalk.default.yellow.bold(key)} : ${data[key]}`);
126580
+ console.log(`${import_chalk.default.yellow.bold(key)} : ${value}`);
126581
+ printedScalar = true;
126481
126582
  }
126482
126583
  }
126483
126584
  };
126585
+ var MAX_COL_WIDTH = 40;
126586
+ var formatCellValue = (value) => {
126587
+ if (value == null) return "-";
126588
+ if (Array.isArray(value)) {
126589
+ if (value.length === 0) return "[]";
126590
+ return `[${value.length} items]`;
126591
+ }
126592
+ if (typeof value === "object") {
126593
+ if (value?.constructor?.name === "BigNumber") return String(value);
126594
+ const keys = Object.keys(value);
126595
+ if (keys.length === 0) return "{}";
126596
+ return `{${keys.length} keys}`;
126597
+ }
126598
+ const str = String(value);
126599
+ if (str.length > MAX_COL_WIDTH) {
126600
+ return str.slice(0, MAX_COL_WIDTH - 1) + "\u2026";
126601
+ }
126602
+ return str;
126603
+ };
126484
126604
  var drawTable = (data) => {
126485
126605
  if (data.length == 0) {
126486
126606
  console.log("[]");
@@ -126488,19 +126608,55 @@ var drawTable = (data) => {
126488
126608
  }
126489
126609
  const rows = data.map((item) => toJsonObject(item) ?? {});
126490
126610
  const obj = rows.reduce((res, item) => ({ ...res, ...item }), {});
126491
- const keys = Object.keys(obj);
126492
- if (keys.length === 0) {
126611
+ const allKeys = Object.keys(obj);
126612
+ if (allKeys.length === 0) {
126493
126613
  drawJSON(data);
126494
126614
  return;
126495
126615
  }
126496
- const def = keys.reduce((result, key) => {
126616
+ const maxColumns = 6;
126617
+ if (allKeys.length > maxColumns) {
126618
+ const rowEntries = rows.map((row) => {
126619
+ const entries = [];
126620
+ for (const key of Object.keys(row)) {
126621
+ const value = row[key];
126622
+ if (typeof value === "function") continue;
126623
+ if (value == null) continue;
126624
+ if (value?.constructor?.name === "BigNumber") {
126625
+ entries.push([key, String(value)]);
126626
+ continue;
126627
+ }
126628
+ if (typeof value === "object") continue;
126629
+ if (typeof value === "string" && value.trim() === "") continue;
126630
+ entries.push([key, String(value)]);
126631
+ }
126632
+ return entries;
126633
+ });
126634
+ const flatEntries = rowEntries.flat();
126635
+ if (flatEntries.length === 0) {
126636
+ drawJSON(data);
126637
+ return;
126638
+ }
126639
+ const maxKeyLen = Math.max(...flatEntries.map(([key]) => key.length));
126640
+ const separatorLen = Math.min(maxKeyLen + 2 + MAX_COL_WIDTH, process.stdout.columns || 80);
126641
+ rowEntries.forEach((entries, idx) => {
126642
+ if (idx > 0) console.log(import_chalk.default.cyan("\u2500".repeat(separatorLen)));
126643
+ for (const [key, value] of entries) {
126644
+ const paddedKey = key.padEnd(maxKeyLen);
126645
+ console.log(`${import_chalk.default.yellow.bold(paddedKey)} ${value}`);
126646
+ }
126647
+ });
126648
+ return;
126649
+ }
126650
+ const columns = allKeys;
126651
+ const def = allKeys.reduce((result, key) => {
126497
126652
  result[key] = "-";
126498
126653
  return result;
126499
126654
  }, {});
126500
126655
  const normalizedData = rows.map((item) => ({ ...def, ...item }));
126501
- const columns = Object.keys(normalizedData[0]);
126502
126656
  const table = new import_cli_table3.default({
126503
126657
  head: columns.map((c) => import_chalk.default.cyan.italic.bold(c)),
126658
+ colWidths: columns.map(() => null),
126659
+ wordWrap: false,
126504
126660
  chars: {
126505
126661
  top: " ",
126506
126662
  "top-mid": " ",
@@ -126522,15 +126678,7 @@ var drawTable = (data) => {
126522
126678
  normalizedData.forEach((row) => {
126523
126679
  const rowValues = [];
126524
126680
  for (const key of columns) {
126525
- if (row[key] == null) {
126526
- rowValues.push("-");
126527
- } else if (Array.isArray(row[key])) {
126528
- rowValues.push(JSON.stringify(row[key]));
126529
- } else if (typeof row[key] === "object") {
126530
- rowValues.push(JSON.stringify(row[key]));
126531
- } else {
126532
- rowValues.push(String(row[key]));
126533
- }
126681
+ rowValues.push(formatCellValue(row[key]));
126534
126682
  }
126535
126683
  table.push(rowValues);
126536
126684
  });
@@ -126658,7 +126806,7 @@ var commandDescriptions = {
126658
126806
  locale: `The locale command allows you to customize your app based on your users' location.`,
126659
126807
  sites: `The sites command allows you to view, create and manage your Appwrite Sites.`,
126660
126808
  storage: `The storage command allows you to manage your project files.`,
126661
- teams: `The teams command allows you to group users of your project to enable them to share read and write access to your project resources.`,
126809
+ teams: `The teams command allows you to group users of your project to enable them to share read and write access to your project resources. Requires a linked project. To manage console-level teams, use the 'organizations' command instead.`,
126662
126810
  update: `The update command allows you to update the ${SDK_TITLE} CLI to the latest version.`,
126663
126811
  users: `The users command allows you to manage your project users.`,
126664
126812
  projects: `The projects command allows you to manage your projects, add platforms, manage API keys, Dev Keys etc.`,
@@ -127034,14 +127182,14 @@ var questionsInitProject = [
127034
127182
  name: "project",
127035
127183
  message: "What would you like to name your project?",
127036
127184
  default: "My Awesome Project",
127037
- when: (answer) => answer.start !== "existing"
127185
+ when: (answer) => whenOverride(answer) && answer.start !== "existing"
127038
127186
  },
127039
127187
  {
127040
127188
  type: "input",
127041
127189
  name: "id",
127042
127190
  message: "What ID would you like to have for your project?",
127043
127191
  default: "unique()",
127044
- when: (answer) => answer.start !== "existing"
127192
+ when: (answer) => whenOverride(answer) && answer.start !== "existing"
127045
127193
  },
127046
127194
  {
127047
127195
  type: "search-list",
@@ -134634,7 +134782,6 @@ var JwtManager = {
134634
134782
  timerError: null,
134635
134783
  async setup(userId = null, projectScopes = []) {
134636
134784
  const consoleClient = await sdkForConsole();
134637
- const usersClient2 = new Users(consoleClient);
134638
134785
  const projectsClient2 = new Projects(consoleClient);
134639
134786
  if (this.timerWarn) {
134640
134787
  clearTimeout(this.timerWarn);
@@ -134660,6 +134807,8 @@ var JwtManager = {
134660
134807
  1e3 * 60 * 60
134661
134808
  );
134662
134809
  if (userId) {
134810
+ const projectClient2 = await sdkForProject();
134811
+ const usersClient2 = new Users(projectClient2);
134663
134812
  await usersClient2.get({
134664
134813
  userId
134665
134814
  });
@@ -139834,8 +139983,8 @@ If there is already an active session, the new session will be attached to the l
139834
139983
  A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
139835
139984
  `).requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.`).option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`).action(
139836
139985
  actionRunner(
139837
- async ({ provider, success: success21, failure, scopes }) => {
139838
- const url2 = (await getAccountClient()).createOAuth2Session(provider, success21, failure, scopes);
139986
+ async ({ provider, success: success22, failure, scopes }) => {
139987
+ const url2 = (await getAccountClient()).createOAuth2Session(provider, success22, failure, scopes);
139839
139988
  if (url2) console.log(url2);
139840
139989
  }
139841
139990
  )
@@ -139915,8 +140064,8 @@ If authentication succeeds, \`userId\` and \`secret\` of a token will be appende
139915
140064
 
139916
140065
  A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`).requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.`).option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`).action(
139917
140066
  actionRunner(
139918
- async ({ provider, success: success21, failure, scopes }) => {
139919
- const url2 = (await getAccountClient()).createOAuth2Token(provider, success21, failure, scopes);
140067
+ async ({ provider, success: success22, failure, scopes }) => {
140068
+ const url2 = (await getAccountClient()).createOAuth2Token(provider, success22, failure, scopes);
139920
140069
  if (url2) console.log(url2);
139921
140070
  }
139922
140071
  )
@@ -141524,7 +141673,7 @@ messaging.command(`delete-subscriber`).description(`Delete a subscriber by its u
141524
141673
  var migrationsClient = null;
141525
141674
  var getMigrationsClient = async () => {
141526
141675
  if (!migrationsClient) {
141527
- const sdkClient = await sdkForProject();
141676
+ const sdkClient = await sdkForConsole();
141528
141677
  migrationsClient = new Migrations(sdkClient);
141529
141678
  }
141530
141679
  return migrationsClient;
@@ -141619,6 +141768,217 @@ migrations.command(`delete`).description(`Delete a migration by its unique ID. T
141619
141768
  )
141620
141769
  );
141621
141770
 
141771
+ // lib/commands/services/organizations.ts
141772
+ var organizationsClient = null;
141773
+ var getOrganizationsClient = async () => {
141774
+ if (!organizationsClient) {
141775
+ const sdkClient = await sdkForConsole();
141776
+ organizationsClient = new Organizations(sdkClient);
141777
+ }
141778
+ return organizationsClient;
141779
+ };
141780
+ var organizations = new Command("organizations").description(commandDescriptions["organizations"] ?? "").configureHelp({
141781
+ helpWidth: process.stdout.columns || 80
141782
+ });
141783
+ organizations.command(`list`).description(`Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).action(
141784
+ actionRunner(
141785
+ async ({ queries, search }) => parse3(await (await getOrganizationsClient()).list(queries, search))
141786
+ )
141787
+ );
141788
+ organizations.command(`create`).description(`Create a new organization.
141789
+ `).requiredOption(`--organization-id <organization-id>`, `Organization ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).requiredOption(`--name <name>`, `Organization name. Max length: 128 chars.`).requiredOption(`--billing-plan <billing-plan>`, `Organization billing plan chosen`).option(`--payment-method-id <payment-method-id>`, `Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.`).option(`--billing-address-id <billing-address-id>`, `Unique ID of billing address`).option(`--invites [invites...]`, `Additional member invites`).option(`--coupon-id <coupon-id>`, `Coupon id`).option(`--tax-id <tax-id>`, `Tax Id associated to billing.`).option(`--budget <budget>`, `Budget limit for additional usage set for the organization`, parseInteger).option(`--platform <platform>`, `Platform type`).action(
141790
+ actionRunner(
141791
+ async ({ organizationId, name, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget, platform }) => parse3(await (await getOrganizationsClient()).create(organizationId, name, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget, platform))
141792
+ )
141793
+ );
141794
+ organizations.command(`estimation-create-organization`).description(`Get estimation for creating an organization.`).requiredOption(`--billing-plan <billing-plan>`, `Organization billing plan chosen`).option(`--payment-method-id <payment-method-id>`, `Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.`).option(`--invites [invites...]`, `Additional member invites`).option(`--coupon-id <coupon-id>`, `Coupon id`).option(`--platform <platform>`, `Platform type`).action(
141795
+ actionRunner(
141796
+ async ({ billingPlan, paymentMethodId, invites, couponId, platform }) => parse3(await (await getOrganizationsClient()).estimationCreateOrganization(billingPlan, paymentMethodId, invites, couponId, platform))
141797
+ )
141798
+ );
141799
+ organizations.command(`delete`).description(`Delete an organization.`).requiredOption(`--organization-id <organization-id>`, `Team ID.`).action(
141800
+ actionRunner(
141801
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).delete(organizationId))
141802
+ )
141803
+ );
141804
+ organizations.command(`list-aggregations`).description(`Get a list of all aggregations for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, from, to`).action(
141805
+ actionRunner(
141806
+ async ({ organizationId, queries }) => parse3(await (await getOrganizationsClient()).listAggregations(organizationId, queries))
141807
+ )
141808
+ );
141809
+ organizations.command(`get-aggregation`).description(`Get a specific aggregation using it's aggregation ID.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--aggregation-id <aggregation-id>`, `Invoice unique ID`).option(`--limit <limit>`, `Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.`, parseInteger).option(`--offset <offset>`, `Offset value. The default value is 0. Use this param to manage pagination.`, parseInteger).action(
141810
+ actionRunner(
141811
+ async ({ organizationId, aggregationId, limit, offset }) => parse3(await (await getOrganizationsClient()).getAggregation(organizationId, aggregationId, limit, offset))
141812
+ )
141813
+ );
141814
+ organizations.command(`set-billing-address`).description(`Set a billing address for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--billing-address-id <billing-address-id>`, `Unique ID of billing address`).action(
141815
+ actionRunner(
141816
+ async ({ organizationId, billingAddressId }) => parse3(await (await getOrganizationsClient()).setBillingAddress(organizationId, billingAddressId))
141817
+ )
141818
+ );
141819
+ organizations.command(`set-billing-email`).description(`Set the current billing email for the organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--billing-email <billing-email>`, `Billing email for the organization.`).action(
141820
+ actionRunner(
141821
+ async ({ organizationId, billingEmail }) => parse3(await (await getOrganizationsClient()).setBillingEmail(organizationId, billingEmail))
141822
+ )
141823
+ );
141824
+ organizations.command(`update-budget`).description(`Update the budget limit for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--budget <budget>`, `Budget limit for additional usage set for the organization`, parseInteger).option(`--alerts [alerts...]`, `Budget alert limit percentage`).action(
141825
+ actionRunner(
141826
+ async ({ organizationId, budget, alerts }) => parse3(await (await getOrganizationsClient()).updateBudget(organizationId, budget, alerts))
141827
+ )
141828
+ );
141829
+ organizations.command(`list-credits`).description(`List all credits for an organization.
141830
+ `).requiredOption(`--organization-id <organization-id>`, `Organization ID`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, couponId, credits, expiration, status`).action(
141831
+ actionRunner(
141832
+ async ({ organizationId, queries }) => parse3(await (await getOrganizationsClient()).listCredits(organizationId, queries))
141833
+ )
141834
+ );
141835
+ organizations.command(`add-credit`).description(`Add credit to an organization using a coupon.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--coupon-id <coupon-id>`, `ID of the coupon`).action(
141836
+ actionRunner(
141837
+ async ({ organizationId, couponId }) => parse3(await (await getOrganizationsClient()).addCredit(organizationId, couponId))
141838
+ )
141839
+ );
141840
+ organizations.command(`get-available-credits`).description(`Get total available valid credits for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).action(
141841
+ actionRunner(
141842
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).getAvailableCredits(organizationId))
141843
+ )
141844
+ );
141845
+ organizations.command(`get-credit`).description(`Get credit details.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--credit-id <credit-id>`, `Credit Unique ID`).action(
141846
+ actionRunner(
141847
+ async ({ organizationId, creditId }) => parse3(await (await getOrganizationsClient()).getCredit(organizationId, creditId))
141848
+ )
141849
+ );
141850
+ organizations.command(`estimation-delete-organization`).description(`Get estimation for deleting an organization.`).requiredOption(`--organization-id <organization-id>`, `Team ID.`).action(
141851
+ actionRunner(
141852
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).estimationDeleteOrganization(organizationId))
141853
+ )
141854
+ );
141855
+ organizations.command(`estimation-update-plan`).description(`Get estimation for updating the organization plan.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--billing-plan <billing-plan>`, `Organization billing plan chosen`).option(`--invites [invites...]`, `Additional member invites`).option(`--coupon-id <coupon-id>`, `Coupon id`).action(
141856
+ actionRunner(
141857
+ async ({ organizationId, billingPlan, invites, couponId }) => parse3(await (await getOrganizationsClient()).estimationUpdatePlan(organizationId, billingPlan, invites, couponId))
141858
+ )
141859
+ );
141860
+ organizations.command(`create-downgrade-feedback`).description(`Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform.
141861
+ `).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--reason <reason>`, `Feedback reason`).requiredOption(`--message <message>`, `Feedback message`).requiredOption(`--from-plan-id <from-plan-id>`, `Plan downgrading from`).requiredOption(`--to-plan-id <to-plan-id>`, `Plan downgrading to`).action(
141862
+ actionRunner(
141863
+ async ({ organizationId, reason, message, fromPlanId, toPlanId }) => parse3(await (await getOrganizationsClient()).createDowngradeFeedback(organizationId, reason, message, fromPlanId, toPlanId))
141864
+ )
141865
+ );
141866
+ organizations.command(`get-invoice`).description(`Get an invoice by its unique ID.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).action(
141867
+ actionRunner(
141868
+ async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).getInvoice(organizationId, invoiceId))
141869
+ )
141870
+ );
141871
+ organizations.command(`get-invoice-download`).description(`Download invoice in PDF`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).action(
141872
+ actionRunner(
141873
+ async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).getInvoiceDownload(organizationId, invoiceId))
141874
+ )
141875
+ );
141876
+ organizations.command(`create-invoice-payment`).description(`Initiate payment for failed invoice to pay live from console`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).requiredOption(`--payment-method-id <payment-method-id>`, `Payment method ID`).action(
141877
+ actionRunner(
141878
+ async ({ organizationId, invoiceId, paymentMethodId }) => parse3(await (await getOrganizationsClient()).createInvoicePayment(organizationId, invoiceId, paymentMethodId))
141879
+ )
141880
+ );
141881
+ organizations.command(`validate-invoice`).description(`Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).action(
141882
+ actionRunner(
141883
+ async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).validateInvoice(organizationId, invoiceId))
141884
+ )
141885
+ );
141886
+ organizations.command(`get-invoice-view`).description(`View invoice in PDF`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).action(
141887
+ actionRunner(
141888
+ async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).getInvoiceView(organizationId, invoiceId))
141889
+ )
141890
+ );
141891
+ organizations.command(`list-keys`).description(`Get a list of all API keys from the current organization. `).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).option(
141892
+ `--total [value]`,
141893
+ `When set to false, the total count returned will be 0 and will not be calculated.`,
141894
+ (value) => value === void 0 ? true : parseBool(value)
141895
+ ).action(
141896
+ actionRunner(
141897
+ async ({ organizationId, total }) => parse3(await (await getOrganizationsClient()).listKeys(organizationId, total))
141898
+ )
141899
+ );
141900
+ organizations.command(`create-key`).description(`Create a new organization API key.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`).action(
141901
+ actionRunner(
141902
+ async ({ organizationId, name, scopes, expire }) => parse3(await (await getOrganizationsClient()).createKey(organizationId, name, scopes, expire))
141903
+ )
141904
+ );
141905
+ organizations.command(`get-key`).description(`Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).action(
141906
+ actionRunner(
141907
+ async ({ organizationId, keyId }) => parse3(await (await getOrganizationsClient()).getKey(organizationId, keyId))
141908
+ )
141909
+ );
141910
+ organizations.command(`update-key`).description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`).action(
141911
+ actionRunner(
141912
+ async ({ organizationId, keyId, name, scopes, expire }) => parse3(await (await getOrganizationsClient()).updateKey(organizationId, keyId, name, scopes, expire))
141913
+ )
141914
+ );
141915
+ organizations.command(`delete-key`).description(`Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).action(
141916
+ actionRunner(
141917
+ async ({ organizationId, keyId }) => parse3(await (await getOrganizationsClient()).deleteKey(organizationId, keyId))
141918
+ )
141919
+ );
141920
+ organizations.command(`set-default-payment-method`).description(`Set a organization's default payment method.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).action(
141921
+ actionRunner(
141922
+ async ({ organizationId, paymentMethodId }) => parse3(await (await getOrganizationsClient()).setDefaultPaymentMethod(organizationId, paymentMethodId))
141923
+ )
141924
+ );
141925
+ organizations.command(`delete-default-payment-method`).description(`Delete the default payment method for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).action(
141926
+ actionRunner(
141927
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).deleteDefaultPaymentMethod(organizationId))
141928
+ )
141929
+ );
141930
+ organizations.command(`set-backup-payment-method`).description(`Set an organization's backup payment method.
141931
+ `).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).action(
141932
+ actionRunner(
141933
+ async ({ organizationId, paymentMethodId }) => parse3(await (await getOrganizationsClient()).setBackupPaymentMethod(organizationId, paymentMethodId))
141934
+ )
141935
+ );
141936
+ organizations.command(`delete-backup-payment-method`).description(`Delete a backup payment method for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).action(
141937
+ actionRunner(
141938
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).deleteBackupPaymentMethod(organizationId))
141939
+ )
141940
+ );
141941
+ organizations.command(`get-plan`).description(`Get the details of the current billing plan for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).action(
141942
+ actionRunner(
141943
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).getPlan(organizationId))
141944
+ )
141945
+ );
141946
+ organizations.command(`update-plan`).description(`Update the billing plan for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--billing-plan <billing-plan>`, `Organization billing plan chosen`).option(`--payment-method-id <payment-method-id>`, `Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.`).option(`--billing-address-id <billing-address-id>`, `Unique ID of billing address`).option(`--invites [invites...]`, `Additional member invites`).option(`--coupon-id <coupon-id>`, `Coupon id`).option(`--tax-id <tax-id>`, `Tax Id associated to billing.`).option(`--budget <budget>`, `Budget limit for additional usage set for the organization`, parseInteger).action(
141947
+ actionRunner(
141948
+ async ({ organizationId, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget }) => parse3(await (await getOrganizationsClient()).updatePlan(organizationId, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget))
141949
+ )
141950
+ );
141951
+ organizations.command(`cancel-downgrade`).description(`Cancel the downgrade initiated for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).action(
141952
+ actionRunner(
141953
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).cancelDowngrade(organizationId))
141954
+ )
141955
+ );
141956
+ organizations.command(`list-regions`).description(`Get all available regions for an organization.`).requiredOption(`--organization-id <organization-id>`, `Team ID.`).action(
141957
+ actionRunner(
141958
+ async ({ organizationId }) => parse3(await (await getOrganizationsClient()).listRegions(organizationId))
141959
+ )
141960
+ );
141961
+ organizations.command(`get-scopes`).description(`Get Scopes`).requiredOption(`--organization-id <organization-id>`, `Organization id`).option(`--project-id <project-id>`, `Project id`).action(
141962
+ actionRunner(
141963
+ async ({ organizationId, projectId }) => parse3(await (await getOrganizationsClient()).getScopes(organizationId, projectId))
141964
+ )
141965
+ );
141966
+ organizations.command(`set-billing-tax-id`).description(`Set an organization's billing tax ID.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--tax-id <tax-id>`, `Tax Id associated to billing.`).action(
141967
+ actionRunner(
141968
+ async ({ organizationId, taxId }) => parse3(await (await getOrganizationsClient()).setBillingTaxId(organizationId, taxId))
141969
+ )
141970
+ );
141971
+ organizations.command(`get-usage`).description(`Get the usage data for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).option(`--start-date <start-date>`, `Starting date for the usage`).option(`--end-date <end-date>`, `End date for the usage`).action(
141972
+ actionRunner(
141973
+ async ({ organizationId, startDate, endDate }) => parse3(await (await getOrganizationsClient()).getUsage(organizationId, startDate, endDate))
141974
+ )
141975
+ );
141976
+ organizations.command(`validate-payment`).description(`Validate payment for team after creation or upgrade.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).option(`--invites [invites...]`, `Additional member invites`).action(
141977
+ actionRunner(
141978
+ async ({ organizationId, invites }) => parse3(await (await getOrganizationsClient()).validatePayment(organizationId, invites))
141979
+ )
141980
+ );
141981
+
141622
141982
  // lib/commands/services/project.ts
141623
141983
  var projectClient = null;
141624
141984
  var getProjectClient = async () => {
@@ -141678,7 +142038,7 @@ project.command(`delete-variable`).description(`Delete a variable by its unique
141678
142038
  var projectsClient = null;
141679
142039
  var getProjectsClient = async () => {
141680
142040
  if (!projectsClient) {
141681
- const sdkClient = await sdkForProject();
142041
+ const sdkClient = await sdkForConsole();
141682
142042
  projectsClient = new Projects(sdkClient);
141683
142043
  }
141684
142044
  return projectsClient;
@@ -141971,7 +142331,7 @@ projects.command(`delete-sms-template`).description(`Reset a custom SMS template
141971
142331
  var proxyClient = null;
141972
142332
  var getProxyClient = async () => {
141973
142333
  if (!proxyClient) {
141974
- const sdkClient = await sdkForProject();
142334
+ const sdkClient = await sdkForConsole();
141975
142335
  proxyClient = new Proxy2(sdkClient);
141976
142336
  }
141977
142337
  return proxyClient;
@@ -142959,7 +143319,15 @@ tablesDB.command(`get-usage`).description(`Get usage metrics and statistics for
142959
143319
  var teamsClient = null;
142960
143320
  var getTeamsClient = async () => {
142961
143321
  if (!teamsClient) {
142962
- const sdkClient = await sdkForProject();
143322
+ let sdkClient;
143323
+ try {
143324
+ sdkClient = await sdkForProject();
143325
+ } catch (e) {
143326
+ if (e instanceof Error && e.message.includes("Project is not set")) {
143327
+ hint(`To manage console-level teams, use the 'organizations' command instead.`);
143328
+ }
143329
+ throw e;
143330
+ }
142963
143331
  teamsClient = new Teams(sdkClient);
142964
143332
  }
142965
143333
  return teamsClient;
@@ -143371,7 +143739,7 @@ users.command(`update-phone-verification`).description(`Update the user phone ve
143371
143739
  var vcsClient = null;
143372
143740
  var getVcsClient = async () => {
143373
143741
  if (!vcsClient) {
143374
- const sdkClient = await sdkForProject();
143742
+ const sdkClient = await sdkForConsole();
143375
143743
  vcsClient = new Vcs(sdkClient);
143376
143744
  }
143377
143745
  return vcsClient;
@@ -143537,8 +143905,10 @@ if (process.argv.includes("-v") || process.argv.includes("--version")) {
143537
143905
  program.description(commandDescriptions["main"]).configureHelp({
143538
143906
  helpWidth: process.stdout.columns || 80,
143539
143907
  sortSubcommands: true
143540
- }).helpOption("-h, --help", "Display help for command").version(version3, "-v, --version", "Output the version number").option("-V, --verbose", "Show complete error log").option("-j, --json", "Output in JSON format").hook("preAction", migrate).option("-f,--force", "Flag to confirm all warnings").option("-a,--all", "Flag to push all resources").option("--id [id...]", "Flag to pass a list of ids for a given action").option("--report", "Enable reporting in case of CLI errors").on("option:json", () => {
143908
+ }).helpOption("-h, --help", "Display help for command").version(version3, "-v, --version", "Output the version number").option("-V, --verbose", "Show complete error log").option("-j, --json", "Output in JSON format").option("-R, --raw", "Output full raw JSON (no filtering)").hook("preAction", migrate).option("-f,--force", "Flag to confirm all warnings").option("-a,--all", "Flag to push all resources").option("--id [id...]", "Flag to pass a list of ids for a given action").option("--report", "Enable reporting in case of CLI errors").on("option:json", () => {
143541
143909
  cliConfig.json = true;
143910
+ }).on("option:raw", () => {
143911
+ cliConfig.raw = true;
143542
143912
  }).on("option:verbose", () => {
143543
143913
  cliConfig.verbose = true;
143544
143914
  }).on("option:report", function() {
@@ -143550,14 +143920,11 @@ if (process.argv.includes("-v") || process.argv.includes("--version")) {
143550
143920
  cliConfig.all = true;
143551
143921
  }).on("option:id", function() {
143552
143922
  cliConfig.ids = this.opts().id;
143553
- }).showSuggestionAfterError().addCommand(whoami).addCommand(register).addCommand(login).addCommand(init).addCommand(pull).addCommand(push).addCommand(types).addCommand(deploy).addCommand(run).addCommand(update).addCommand(generate).addCommand(logout).addCommand(account).addCommand(activities).addCommand(backups).addCommand(databases).addCommand(functions).addCommand(graphql).addCommand(health).addCommand(locale).addCommand(messaging).addCommand(migrations).addCommand(project).addCommand(projects).addCommand(proxy).addCommand(sites).addCommand(storage).addCommand(tablesDB).addCommand(teams).addCommand(tokens).addCommand(users).addCommand(vcs).addCommand(webhooks).addCommand(client).parse(process.argv);
143923
+ }).showSuggestionAfterError().addCommand(whoami).addCommand(register).addCommand(login).addCommand(init).addCommand(pull).addCommand(push).addCommand(types).addCommand(deploy).addCommand(run).addCommand(update).addCommand(generate).addCommand(logout).addCommand(account).addCommand(activities).addCommand(backups).addCommand(databases).addCommand(functions).addCommand(graphql).addCommand(health).addCommand(locale).addCommand(messaging).addCommand(migrations).addCommand(organizations).addCommand(project).addCommand(projects).addCommand(proxy).addCommand(sites).addCommand(storage).addCommand(tablesDB).addCommand(teams).addCommand(tokens).addCommand(users).addCommand(vcs).addCommand(webhooks).addCommand(client).parse(process.argv);
143554
143924
  process.stdout.columns = oldWidth;
143555
143925
  }
143556
143926
  /*! Bundled license information:
143557
143927
 
143558
- safe-buffer/index.js:
143559
- (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
143560
-
143561
143928
  undici/lib/fetch/body.js:
143562
143929
  (*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
143563
143930