appwrite-cli 14.0.1 → 15.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 (37) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +2 -2
  3. package/dist/bundle-win-arm64.mjs +267 -105
  4. package/dist/cli.cjs +267 -105
  5. package/dist/index.cjs +166 -61
  6. package/dist/index.js +166 -61
  7. package/dist/lib/client.d.ts.map +1 -1
  8. package/dist/lib/commands/config.d.ts +14 -4
  9. package/dist/lib/commands/config.d.ts.map +1 -1
  10. package/dist/lib/commands/init.d.ts.map +1 -1
  11. package/dist/lib/commands/pull.d.ts.map +1 -1
  12. package/dist/lib/commands/push.d.ts.map +1 -1
  13. package/dist/lib/commands/services/functions.d.ts.map +1 -1
  14. package/dist/lib/commands/services/sites.d.ts.map +1 -1
  15. package/dist/lib/commands/services/storage.d.ts.map +1 -1
  16. package/dist/lib/commands/utils/deployment.d.ts +5 -0
  17. package/dist/lib/commands/utils/deployment.d.ts.map +1 -1
  18. package/dist/lib/constants.d.ts +1 -1
  19. package/dist/lib/questions.d.ts.map +1 -1
  20. package/dist/lib/sdks.d.ts.map +1 -1
  21. package/install.ps1 +2 -2
  22. package/install.sh +1 -1
  23. package/lib/client.ts +17 -0
  24. package/lib/commands/config.ts +7 -2
  25. package/lib/commands/init.ts +4 -2
  26. package/lib/commands/pull.ts +7 -2
  27. package/lib/commands/push.ts +14 -4
  28. package/lib/commands/services/account.ts +1 -1
  29. package/lib/commands/services/functions.ts +12 -7
  30. package/lib/commands/services/sites.ts +14 -7
  31. package/lib/commands/services/storage.ts +2 -1
  32. package/lib/commands/utils/deployment.ts +28 -7
  33. package/lib/constants.ts +1 -1
  34. package/lib/questions.ts +38 -4
  35. package/lib/sdks.ts +2 -0
  36. package/package.json +2 -2
  37. package/scoop/appwrite.config.json +3 -3
package/dist/cli.cjs CHANGED
@@ -3880,7 +3880,7 @@ var require_has_flag = __commonJS({
3880
3880
  var require_supports_color = __commonJS({
3881
3881
  "node_modules/supports-color/index.js"(exports2, module2) {
3882
3882
  "use strict";
3883
- var os6 = require("os");
3883
+ var os7 = require("os");
3884
3884
  var tty = require("tty");
3885
3885
  var hasFlag = require_has_flag();
3886
3886
  var { env } = process;
@@ -3928,7 +3928,7 @@ var require_supports_color = __commonJS({
3928
3928
  return min;
3929
3929
  }
3930
3930
  if (process.platform === "win32") {
3931
- const osRelease = os6.release().split(".");
3931
+ const osRelease = os7.release().split(".");
3932
3932
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
3933
3933
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
3934
3934
  }
@@ -35902,7 +35902,7 @@ var require_has_flag2 = __commonJS({
35902
35902
  var require_supports_colors = __commonJS({
35903
35903
  "node_modules/@colors/colors/lib/system/supports-colors.js"(exports2, module2) {
35904
35904
  "use strict";
35905
- var os6 = require("os");
35905
+ var os7 = require("os");
35906
35906
  var hasFlag = require_has_flag2();
35907
35907
  var env = process.env;
35908
35908
  var forceColor = void 0;
@@ -35940,7 +35940,7 @@ var require_supports_colors = __commonJS({
35940
35940
  }
35941
35941
  var min = forceColor ? 1 : 0;
35942
35942
  if (process.platform === "win32") {
35943
- var osRelease = os6.release().split(".");
35943
+ var osRelease = os7.release().split(".");
35944
35944
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
35945
35945
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
35946
35946
  }
@@ -62381,7 +62381,7 @@ var require_has_flag3 = __commonJS({
62381
62381
  var require_supports_color2 = __commonJS({
62382
62382
  "node_modules/inquirer-search-list/node_modules/chalk/node_modules/supports-color/index.js"(exports2, module2) {
62383
62383
  "use strict";
62384
- var os6 = require("os");
62384
+ var os7 = require("os");
62385
62385
  var hasFlag = require_has_flag3();
62386
62386
  var env = process.env;
62387
62387
  var forceColor;
@@ -62419,7 +62419,7 @@ var require_supports_color2 = __commonJS({
62419
62419
  }
62420
62420
  const min = forceColor ? 1 : 0;
62421
62421
  if (process.platform === "win32") {
62422
- const osRelease = os6.release().split(".");
62422
+ const osRelease = os7.release().split(".");
62423
62423
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
62424
62424
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
62425
62425
  }
@@ -68576,8 +68576,8 @@ var require_rx_lite = __commonJS({
68576
68576
  checkDisposed(this);
68577
68577
  if (!this.isStopped) {
68578
68578
  this.isStopped = true;
68579
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68580
- os6[i].onCompleted();
68579
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68580
+ os7[i].onCompleted();
68581
68581
  }
68582
68582
  this.observers.length = 0;
68583
68583
  }
@@ -68592,8 +68592,8 @@ var require_rx_lite = __commonJS({
68592
68592
  this.isStopped = true;
68593
68593
  this.error = error49;
68594
68594
  this.hasError = true;
68595
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68596
- os6[i].onError(error49);
68595
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68596
+ os7[i].onError(error49);
68597
68597
  }
68598
68598
  this.observers.length = 0;
68599
68599
  }
@@ -68605,8 +68605,8 @@ var require_rx_lite = __commonJS({
68605
68605
  onNext: function(value) {
68606
68606
  checkDisposed(this);
68607
68607
  if (!this.isStopped) {
68608
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68609
- os6[i].onNext(value);
68608
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68609
+ os7[i].onNext(value);
68610
68610
  }
68611
68611
  }
68612
68612
  },
@@ -68666,16 +68666,16 @@ var require_rx_lite = __commonJS({
68666
68666
  checkDisposed(this);
68667
68667
  if (!this.isStopped) {
68668
68668
  this.isStopped = true;
68669
- var os6 = cloneArray(this.observers), len = os6.length;
68669
+ var os7 = cloneArray(this.observers), len = os7.length;
68670
68670
  if (this.hasValue) {
68671
68671
  for (i = 0; i < len; i++) {
68672
- var o = os6[i];
68672
+ var o = os7[i];
68673
68673
  o.onNext(this.value);
68674
68674
  o.onCompleted();
68675
68675
  }
68676
68676
  } else {
68677
68677
  for (i = 0; i < len; i++) {
68678
- os6[i].onCompleted();
68678
+ os7[i].onCompleted();
68679
68679
  }
68680
68680
  }
68681
68681
  this.observers.length = 0;
@@ -68691,8 +68691,8 @@ var require_rx_lite = __commonJS({
68691
68691
  this.isStopped = true;
68692
68692
  this.hasError = true;
68693
68693
  this.error = error49;
68694
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68695
- os6[i].onError(error49);
68694
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68695
+ os7[i].onError(error49);
68696
68696
  }
68697
68697
  this.observers.length = 0;
68698
68698
  }
@@ -68800,8 +68800,8 @@ var require_rx_lite = __commonJS({
68800
68800
  return;
68801
68801
  }
68802
68802
  this.isStopped = true;
68803
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68804
- os6[i].onCompleted();
68803
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68804
+ os7[i].onCompleted();
68805
68805
  }
68806
68806
  this.observers.length = 0;
68807
68807
  },
@@ -68817,8 +68817,8 @@ var require_rx_lite = __commonJS({
68817
68817
  this.isStopped = true;
68818
68818
  this.hasError = true;
68819
68819
  this.error = error49;
68820
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68821
- os6[i].onError(error49);
68820
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68821
+ os7[i].onError(error49);
68822
68822
  }
68823
68823
  this.observers.length = 0;
68824
68824
  },
@@ -68832,8 +68832,8 @@ var require_rx_lite = __commonJS({
68832
68832
  return;
68833
68833
  }
68834
68834
  this.value = value;
68835
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68836
- os6[i].onNext(value);
68835
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68836
+ os7[i].onNext(value);
68837
68837
  }
68838
68838
  },
68839
68839
  /**
@@ -68914,8 +68914,8 @@ var require_rx_lite = __commonJS({
68914
68914
  var now = this.scheduler.now();
68915
68915
  this.q.push({ interval: now, value });
68916
68916
  this._trim(now);
68917
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68918
- var observer = os6[i];
68917
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68918
+ var observer = os7[i];
68919
68919
  observer.onNext(value);
68920
68920
  observer.ensureActive();
68921
68921
  }
@@ -68934,8 +68934,8 @@ var require_rx_lite = __commonJS({
68934
68934
  this.hasError = true;
68935
68935
  var now = this.scheduler.now();
68936
68936
  this._trim(now);
68937
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68938
- var observer = os6[i];
68937
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68938
+ var observer = os7[i];
68939
68939
  observer.onError(error49);
68940
68940
  observer.ensureActive();
68941
68941
  }
@@ -68952,8 +68952,8 @@ var require_rx_lite = __commonJS({
68952
68952
  this.isStopped = true;
68953
68953
  var now = this.scheduler.now();
68954
68954
  this._trim(now);
68955
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68956
- var observer = os6[i];
68955
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68956
+ var observer = os7[i];
68957
68957
  observer.onCompleted();
68958
68958
  observer.ensureActive();
68959
68959
  }
@@ -71500,7 +71500,7 @@ var require_main2 = __commonJS({
71500
71500
  "node_modules/dotenv/lib/main.js"(exports2, module2) {
71501
71501
  var fs20 = require("fs");
71502
71502
  var path16 = require("path");
71503
- var os6 = require("os");
71503
+ var os7 = require("os");
71504
71504
  var crypto2 = require("crypto");
71505
71505
  var packageJson = require_package2();
71506
71506
  var version4 = packageJson.version;
@@ -71623,7 +71623,7 @@ var require_main2 = __commonJS({
71623
71623
  return null;
71624
71624
  }
71625
71625
  function _resolveHome(envPath) {
71626
- return envPath[0] === "~" ? path16.join(os6.homedir(), envPath.slice(1)) : envPath;
71626
+ return envPath[0] === "~" ? path16.join(os7.homedir(), envPath.slice(1)) : envPath;
71627
71627
  }
71628
71628
  function _configVault(options) {
71629
71629
  const debug = Boolean(options && options.debug);
@@ -77138,7 +77138,7 @@ var require_constants9 = __commonJS({
77138
77138
  "use strict";
77139
77139
  var { sep } = require("path");
77140
77140
  var { platform } = process;
77141
- var os6 = require("os");
77141
+ var os7 = require("os");
77142
77142
  exports2.EV_ALL = "all";
77143
77143
  exports2.EV_READY = "ready";
77144
77144
  exports2.EV_ADD = "add";
@@ -77192,7 +77192,7 @@ var require_constants9 = __commonJS({
77192
77192
  exports2.isWindows = platform === "win32";
77193
77193
  exports2.isMacos = platform === "darwin";
77194
77194
  exports2.isLinux = platform === "linux";
77195
- exports2.isIBMi = os6.type() === "OS400";
77195
+ exports2.isIBMi = os7.type() === "OS400";
77196
77196
  }
77197
77197
  });
77198
77198
 
@@ -85459,7 +85459,7 @@ var package_default = {
85459
85459
  type: "module",
85460
85460
  homepage: "https://appwrite.io/support",
85461
85461
  description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
85462
- version: "14.0.1",
85462
+ version: "15.1.0",
85463
85463
  license: "BSD-3-Clause",
85464
85464
  main: "dist/index.cjs",
85465
85465
  module: "dist/index.js",
@@ -85503,7 +85503,7 @@ var package_default = {
85503
85503
  "windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
85504
85504
  },
85505
85505
  dependencies: {
85506
- "@appwrite.io/console": "^4.0.0",
85506
+ "@appwrite.io/console": "^5.0.0",
85507
85507
  chalk: "4.1.2",
85508
85508
  chokidar: "^3.6.0",
85509
85509
  "cli-progress": "^3.12.0",
@@ -99534,7 +99534,10 @@ var SiteSchema = external_exports.object({
99534
99534
  buildCommand: external_exports.string().optional(),
99535
99535
  outputDirectory: external_exports.string().optional(),
99536
99536
  fallbackFile: external_exports.string().optional(),
99537
- specification: external_exports.string().optional(),
99537
+ buildSpecification: external_exports.string().optional(),
99538
+ runtimeSpecification: external_exports.string().optional(),
99539
+ deploymentRetention: external_exports.number().optional(),
99540
+ startCommand: external_exports.string().optional(),
99538
99541
  vars: external_exports.record(external_exports.string(), external_exports.string()).optional(),
99539
99542
  ignore: external_exports.string().optional()
99540
99543
  }).strict();
@@ -99546,7 +99549,9 @@ var FunctionSchema = external_exports.object({
99546
99549
  enabled: external_exports.boolean().optional(),
99547
99550
  logging: external_exports.boolean().optional(),
99548
99551
  runtime: external_exports.string(),
99549
- specification: external_exports.string().optional(),
99552
+ buildSpecification: external_exports.string().optional(),
99553
+ runtimeSpecification: external_exports.string().optional(),
99554
+ deploymentRetention: external_exports.number().optional(),
99550
99555
  scopes: external_exports.array(external_exports.string()).optional(),
99551
99556
  events: external_exports.array(external_exports.string()).optional(),
99552
99557
  schedule: external_exports.string().optional(),
@@ -99742,7 +99747,7 @@ var import_undici = __toESM(require_undici(), 1);
99742
99747
  // lib/constants.ts
99743
99748
  var SDK_TITLE = "Appwrite";
99744
99749
  var SDK_TITLE_LOWER = "appwrite";
99745
- var SDK_VERSION = "14.0.1";
99750
+ var SDK_VERSION = "15.1.0";
99746
99751
  var SDK_NAME = "Command Line";
99747
99752
  var SDK_PLATFORM = "console";
99748
99753
  var SDK_LANGUAGE = "cli";
@@ -100781,7 +100786,7 @@ var Client = class _Client {
100781
100786
  "x-sdk-name": "Console",
100782
100787
  "x-sdk-platform": "console",
100783
100788
  "x-sdk-language": "web",
100784
- "x-sdk-version": "4.0.0",
100789
+ "x-sdk-version": "5.0.0",
100785
100790
  "X-Appwrite-Response-Format": "1.8.0"
100786
100791
  };
100787
100792
  this.realtime = {
@@ -101306,6 +101311,9 @@ var Client = class _Client {
101306
101311
  window.console.warn("Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint.");
101307
101312
  window.localStorage.setItem("cookieFallback", cookieFallback);
101308
101313
  }
101314
+ if (data && typeof data === "object") {
101315
+ data.toString = () => JSONbig.stringify(data);
101316
+ }
101309
101317
  return data;
101310
101318
  });
101311
101319
  }
@@ -107332,7 +107340,9 @@ var Functions = class {
107332
107340
  providerBranch: rest[13],
107333
107341
  providerSilentMode: rest[14],
107334
107342
  providerRootDirectory: rest[15],
107335
- specification: rest[16]
107343
+ buildSpecification: rest[16],
107344
+ runtimeSpecification: rest[17],
107345
+ deploymentRetention: rest[18]
107336
107346
  };
107337
107347
  }
107338
107348
  const functionId = params.functionId;
@@ -107352,7 +107362,9 @@ var Functions = class {
107352
107362
  const providerBranch = params.providerBranch;
107353
107363
  const providerSilentMode = params.providerSilentMode;
107354
107364
  const providerRootDirectory = params.providerRootDirectory;
107355
- const specification = params.specification;
107365
+ const buildSpecification = params.buildSpecification;
107366
+ const runtimeSpecification = params.runtimeSpecification;
107367
+ const deploymentRetention = params.deploymentRetention;
107356
107368
  if (typeof functionId === "undefined") {
107357
107369
  throw new AppwriteException('Missing required parameter: "functionId"');
107358
107370
  }
@@ -107415,8 +107427,14 @@ var Functions = class {
107415
107427
  if (typeof providerRootDirectory !== "undefined") {
107416
107428
  payload["providerRootDirectory"] = providerRootDirectory;
107417
107429
  }
107418
- if (typeof specification !== "undefined") {
107419
- payload["specification"] = specification;
107430
+ if (typeof buildSpecification !== "undefined") {
107431
+ payload["buildSpecification"] = buildSpecification;
107432
+ }
107433
+ if (typeof runtimeSpecification !== "undefined") {
107434
+ payload["runtimeSpecification"] = runtimeSpecification;
107435
+ }
107436
+ if (typeof deploymentRetention !== "undefined") {
107437
+ payload["deploymentRetention"] = deploymentRetention;
107420
107438
  }
107421
107439
  const uri = new URL(this.client.config.endpoint + apiPath);
107422
107440
  const apiHeaders = {
@@ -107569,7 +107587,9 @@ var Functions = class {
107569
107587
  providerBranch: rest[13],
107570
107588
  providerSilentMode: rest[14],
107571
107589
  providerRootDirectory: rest[15],
107572
- specification: rest[16]
107590
+ buildSpecification: rest[16],
107591
+ runtimeSpecification: rest[17],
107592
+ deploymentRetention: rest[18]
107573
107593
  };
107574
107594
  }
107575
107595
  const functionId = params.functionId;
@@ -107589,7 +107609,9 @@ var Functions = class {
107589
107609
  const providerBranch = params.providerBranch;
107590
107610
  const providerSilentMode = params.providerSilentMode;
107591
107611
  const providerRootDirectory = params.providerRootDirectory;
107592
- const specification = params.specification;
107612
+ const buildSpecification = params.buildSpecification;
107613
+ const runtimeSpecification = params.runtimeSpecification;
107614
+ const deploymentRetention = params.deploymentRetention;
107593
107615
  if (typeof functionId === "undefined") {
107594
107616
  throw new AppwriteException('Missing required parameter: "functionId"');
107595
107617
  }
@@ -107646,8 +107668,14 @@ var Functions = class {
107646
107668
  if (typeof providerRootDirectory !== "undefined") {
107647
107669
  payload["providerRootDirectory"] = providerRootDirectory;
107648
107670
  }
107649
- if (typeof specification !== "undefined") {
107650
- payload["specification"] = specification;
107671
+ if (typeof buildSpecification !== "undefined") {
107672
+ payload["buildSpecification"] = buildSpecification;
107673
+ }
107674
+ if (typeof runtimeSpecification !== "undefined") {
107675
+ payload["runtimeSpecification"] = runtimeSpecification;
107676
+ }
107677
+ if (typeof deploymentRetention !== "undefined") {
107678
+ payload["deploymentRetention"] = deploymentRetention;
107651
107679
  }
107652
107680
  const uri = new URL(this.client.config.endpoint + apiPath);
107653
107681
  const apiHeaders = {
@@ -116589,15 +116617,18 @@ var Sites = class {
116589
116617
  timeout: rest[5],
116590
116618
  installCommand: rest[6],
116591
116619
  buildCommand: rest[7],
116592
- outputDirectory: rest[8],
116593
- adapter: rest[9],
116594
- installationId: rest[10],
116595
- fallbackFile: rest[11],
116596
- providerRepositoryId: rest[12],
116597
- providerBranch: rest[13],
116598
- providerSilentMode: rest[14],
116599
- providerRootDirectory: rest[15],
116600
- specification: rest[16]
116620
+ startCommand: rest[8],
116621
+ outputDirectory: rest[9],
116622
+ adapter: rest[10],
116623
+ installationId: rest[11],
116624
+ fallbackFile: rest[12],
116625
+ providerRepositoryId: rest[13],
116626
+ providerBranch: rest[14],
116627
+ providerSilentMode: rest[15],
116628
+ providerRootDirectory: rest[16],
116629
+ buildSpecification: rest[17],
116630
+ runtimeSpecification: rest[18],
116631
+ deploymentRetention: rest[19]
116601
116632
  };
116602
116633
  }
116603
116634
  const siteId = params.siteId;
@@ -116609,6 +116640,7 @@ var Sites = class {
116609
116640
  const timeout = params.timeout;
116610
116641
  const installCommand = params.installCommand;
116611
116642
  const buildCommand = params.buildCommand;
116643
+ const startCommand = params.startCommand;
116612
116644
  const outputDirectory = params.outputDirectory;
116613
116645
  const adapter = params.adapter;
116614
116646
  const installationId = params.installationId;
@@ -116617,7 +116649,9 @@ var Sites = class {
116617
116649
  const providerBranch = params.providerBranch;
116618
116650
  const providerSilentMode = params.providerSilentMode;
116619
116651
  const providerRootDirectory = params.providerRootDirectory;
116620
- const specification = params.specification;
116652
+ const buildSpecification = params.buildSpecification;
116653
+ const runtimeSpecification = params.runtimeSpecification;
116654
+ const deploymentRetention = params.deploymentRetention;
116621
116655
  if (typeof siteId === "undefined") {
116622
116656
  throw new AppwriteException('Missing required parameter: "siteId"');
116623
116657
  }
@@ -116656,6 +116690,9 @@ var Sites = class {
116656
116690
  if (typeof buildCommand !== "undefined") {
116657
116691
  payload["buildCommand"] = buildCommand;
116658
116692
  }
116693
+ if (typeof startCommand !== "undefined") {
116694
+ payload["startCommand"] = startCommand;
116695
+ }
116659
116696
  if (typeof outputDirectory !== "undefined") {
116660
116697
  payload["outputDirectory"] = outputDirectory;
116661
116698
  }
@@ -116683,8 +116720,14 @@ var Sites = class {
116683
116720
  if (typeof providerRootDirectory !== "undefined") {
116684
116721
  payload["providerRootDirectory"] = providerRootDirectory;
116685
116722
  }
116686
- if (typeof specification !== "undefined") {
116687
- payload["specification"] = specification;
116723
+ if (typeof buildSpecification !== "undefined") {
116724
+ payload["buildSpecification"] = buildSpecification;
116725
+ }
116726
+ if (typeof runtimeSpecification !== "undefined") {
116727
+ payload["runtimeSpecification"] = runtimeSpecification;
116728
+ }
116729
+ if (typeof deploymentRetention !== "undefined") {
116730
+ payload["deploymentRetention"] = deploymentRetention;
116688
116731
  }
116689
116732
  const uri = new URL(this.client.config.endpoint + apiPath);
116690
116733
  const apiHeaders = {
@@ -116823,16 +116866,19 @@ var Sites = class {
116823
116866
  timeout: rest[4],
116824
116867
  installCommand: rest[5],
116825
116868
  buildCommand: rest[6],
116826
- outputDirectory: rest[7],
116827
- buildRuntime: rest[8],
116828
- adapter: rest[9],
116829
- fallbackFile: rest[10],
116830
- installationId: rest[11],
116831
- providerRepositoryId: rest[12],
116832
- providerBranch: rest[13],
116833
- providerSilentMode: rest[14],
116834
- providerRootDirectory: rest[15],
116835
- specification: rest[16]
116869
+ startCommand: rest[7],
116870
+ outputDirectory: rest[8],
116871
+ buildRuntime: rest[9],
116872
+ adapter: rest[10],
116873
+ fallbackFile: rest[11],
116874
+ installationId: rest[12],
116875
+ providerRepositoryId: rest[13],
116876
+ providerBranch: rest[14],
116877
+ providerSilentMode: rest[15],
116878
+ providerRootDirectory: rest[16],
116879
+ buildSpecification: rest[17],
116880
+ runtimeSpecification: rest[18],
116881
+ deploymentRetention: rest[19]
116836
116882
  };
116837
116883
  }
116838
116884
  const siteId = params.siteId;
@@ -116843,6 +116889,7 @@ var Sites = class {
116843
116889
  const timeout = params.timeout;
116844
116890
  const installCommand = params.installCommand;
116845
116891
  const buildCommand = params.buildCommand;
116892
+ const startCommand = params.startCommand;
116846
116893
  const outputDirectory = params.outputDirectory;
116847
116894
  const buildRuntime = params.buildRuntime;
116848
116895
  const adapter = params.adapter;
@@ -116852,7 +116899,9 @@ var Sites = class {
116852
116899
  const providerBranch = params.providerBranch;
116853
116900
  const providerSilentMode = params.providerSilentMode;
116854
116901
  const providerRootDirectory = params.providerRootDirectory;
116855
- const specification = params.specification;
116902
+ const buildSpecification = params.buildSpecification;
116903
+ const runtimeSpecification = params.runtimeSpecification;
116904
+ const deploymentRetention = params.deploymentRetention;
116856
116905
  if (typeof siteId === "undefined") {
116857
116906
  throw new AppwriteException('Missing required parameter: "siteId"');
116858
116907
  }
@@ -116885,6 +116934,9 @@ var Sites = class {
116885
116934
  if (typeof buildCommand !== "undefined") {
116886
116935
  payload["buildCommand"] = buildCommand;
116887
116936
  }
116937
+ if (typeof startCommand !== "undefined") {
116938
+ payload["startCommand"] = startCommand;
116939
+ }
116888
116940
  if (typeof outputDirectory !== "undefined") {
116889
116941
  payload["outputDirectory"] = outputDirectory;
116890
116942
  }
@@ -116912,8 +116964,14 @@ var Sites = class {
116912
116964
  if (typeof providerRootDirectory !== "undefined") {
116913
116965
  payload["providerRootDirectory"] = providerRootDirectory;
116914
116966
  }
116915
- if (typeof specification !== "undefined") {
116916
- payload["specification"] = specification;
116967
+ if (typeof buildSpecification !== "undefined") {
116968
+ payload["buildSpecification"] = buildSpecification;
116969
+ }
116970
+ if (typeof runtimeSpecification !== "undefined") {
116971
+ payload["runtimeSpecification"] = runtimeSpecification;
116972
+ }
116973
+ if (typeof deploymentRetention !== "undefined") {
116974
+ payload["deploymentRetention"] = deploymentRetention;
116917
116975
  }
116918
116976
  const uri = new URL(this.client.config.endpoint + apiPath);
116919
116977
  const apiHeaders = {
@@ -124856,6 +124914,9 @@ var Runtime;
124856
124914
  Runtime2["Pythonml311"] = "python-ml-3.11";
124857
124915
  Runtime2["Pythonml312"] = "python-ml-3.12";
124858
124916
  Runtime2["Pythonml313"] = "python-ml-3.13";
124917
+ Runtime2["Deno121"] = "deno-1.21";
124918
+ Runtime2["Deno124"] = "deno-1.24";
124919
+ Runtime2["Deno135"] = "deno-1.35";
124859
124920
  Runtime2["Deno140"] = "deno-1.40";
124860
124921
  Runtime2["Deno146"] = "deno-1.46";
124861
124922
  Runtime2["Deno20"] = "deno-2.0";
@@ -124945,6 +125006,9 @@ var Runtimes;
124945
125006
  Runtimes2["Pythonml311"] = "python-ml-3.11";
124946
125007
  Runtimes2["Pythonml312"] = "python-ml-3.12";
124947
125008
  Runtimes2["Pythonml313"] = "python-ml-3.13";
125009
+ Runtimes2["Deno121"] = "deno-1.21";
125010
+ Runtimes2["Deno124"] = "deno-1.24";
125011
+ Runtimes2["Deno135"] = "deno-1.35";
124948
125012
  Runtimes2["Deno140"] = "deno-1.40";
124949
125013
  Runtimes2["Deno146"] = "deno-1.46";
124950
125014
  Runtimes2["Deno20"] = "deno-2.0";
@@ -125085,6 +125149,10 @@ var AppwriteMigrationResource;
125085
125149
  AppwriteMigrationResource2["Function"] = "function";
125086
125150
  AppwriteMigrationResource2["Deployment"] = "deployment";
125087
125151
  AppwriteMigrationResource2["Environmentvariable"] = "environment-variable";
125152
+ AppwriteMigrationResource2["Provider"] = "provider";
125153
+ AppwriteMigrationResource2["Topic"] = "topic";
125154
+ AppwriteMigrationResource2["Subscriber"] = "subscriber";
125155
+ AppwriteMigrationResource2["Message"] = "message";
125088
125156
  AppwriteMigrationResource2["Site"] = "site";
125089
125157
  AppwriteMigrationResource2["Sitedeployment"] = "site-deployment";
125090
125158
  AppwriteMigrationResource2["Sitevariable"] = "site-variable";
@@ -125558,6 +125626,9 @@ var BuildRuntime;
125558
125626
  BuildRuntime2["Pythonml311"] = "python-ml-3.11";
125559
125627
  BuildRuntime2["Pythonml312"] = "python-ml-3.12";
125560
125628
  BuildRuntime2["Pythonml313"] = "python-ml-3.13";
125629
+ BuildRuntime2["Deno121"] = "deno-1.21";
125630
+ BuildRuntime2["Deno124"] = "deno-1.24";
125631
+ BuildRuntime2["Deno135"] = "deno-1.35";
125561
125632
  BuildRuntime2["Deno140"] = "deno-1.40";
125562
125633
  BuildRuntime2["Deno146"] = "deno-1.46";
125563
125634
  BuildRuntime2["Deno20"] = "deno-2.0";
@@ -125769,6 +125840,17 @@ var BillingPlanGroup;
125769
125840
  BillingPlanGroup2["Pro"] = "pro";
125770
125841
  BillingPlanGroup2["Scale"] = "scale";
125771
125842
  })(BillingPlanGroup || (BillingPlanGroup = {}));
125843
+ var DomainPurchasePaymentStatus;
125844
+ (function(DomainPurchasePaymentStatus2) {
125845
+ DomainPurchasePaymentStatus2["Pending"] = "pending";
125846
+ DomainPurchasePaymentStatus2["PendingConfirmation"] = "pending_confirmation";
125847
+ DomainPurchasePaymentStatus2["PendingPaymentProcessing"] = "pending_payment_processing";
125848
+ DomainPurchasePaymentStatus2["Authorized"] = "authorized";
125849
+ DomainPurchasePaymentStatus2["Captured"] = "captured";
125850
+ DomainPurchasePaymentStatus2["Failed"] = "failed";
125851
+ DomainPurchasePaymentStatus2["CaptureFailed"] = "capture_failed";
125852
+ DomainPurchasePaymentStatus2["RenewalCaptureFailed"] = "renewal_capture_failed";
125853
+ })(DomainPurchasePaymentStatus || (DomainPurchasePaymentStatus = {}));
125772
125854
  var DomainTransferStatusStatus;
125773
125855
  (function(DomainTransferStatusStatus2) {
125774
125856
  DomainTransferStatusStatus2["Transferrable"] = "transferrable";
@@ -126049,6 +126131,7 @@ var sdkForConsole = async (requiresAuth = true) => {
126049
126131
  );
126050
126132
  }
126051
126133
  client2.headers = {
126134
+ ...client2.headers,
126052
126135
  "x-sdk-name": "Command Line",
126053
126136
  "x-sdk-platform": "console",
126054
126137
  "x-sdk-language": "cli",
@@ -126071,6 +126154,7 @@ var sdkForProject = async () => {
126071
126154
  );
126072
126155
  }
126073
126156
  client2.headers = {
126157
+ ...client2.headers,
126074
126158
  "x-sdk-name": "Command Line",
126075
126159
  "x-sdk-platform": "console",
126076
126160
  "x-sdk-language": "cli",
@@ -126599,8 +126683,25 @@ var questionsCreateFunction = [
126599
126683
  },
126600
126684
  {
126601
126685
  type: "list",
126602
- name: "specification",
126603
- message: "What specification would you like to use?",
126686
+ name: "buildSpecification",
126687
+ message: "What build specification would you like to use?",
126688
+ choices: async () => {
126689
+ const response = await (await getFunctionsService()).listSpecifications();
126690
+ const specifications = response["specifications"];
126691
+ const choices = specifications.map((spec, _idx) => {
126692
+ return {
126693
+ name: `${spec.cpus} CPU, ${spec.memory}MB RAM`,
126694
+ value: spec.slug,
126695
+ disabled: spec.enabled === false ? "Upgrade to use" : false
126696
+ };
126697
+ });
126698
+ return choices;
126699
+ }
126700
+ },
126701
+ {
126702
+ type: "list",
126703
+ name: "runtimeSpecification",
126704
+ message: "What runtime specification would you like to use?",
126604
126705
  choices: async () => {
126605
126706
  const response = await (await getFunctionsService()).listSpecifications();
126606
126707
  const specifications = response["specifications"];
@@ -127219,8 +127320,25 @@ var questionsCreateSite = [
127219
127320
  },
127220
127321
  {
127221
127322
  type: "list",
127222
- name: "specification",
127223
- message: "What specification would you like to use?",
127323
+ name: "buildSpecification",
127324
+ message: "What build specification would you like to use?",
127325
+ choices: async () => {
127326
+ const response = await (await getSitesService()).listSpecifications();
127327
+ const specifications = response["specifications"];
127328
+ const choices = specifications.map((spec) => {
127329
+ return {
127330
+ name: `${spec.cpus} CPU, ${spec.memory}MB RAM`,
127331
+ value: spec.slug,
127332
+ disabled: spec.enabled === false ? "Upgrade to use" : false
127333
+ };
127334
+ });
127335
+ return choices;
127336
+ }
127337
+ },
127338
+ {
127339
+ type: "list",
127340
+ name: "runtimeSpecification",
127341
+ message: "What runtime specification would you like to use?",
127224
127342
  choices: async () => {
127225
127343
  const response = await (await getSitesService()).listSpecifications();
127226
127344
  const specifications = response["specifications"];
@@ -127419,6 +127537,15 @@ var Client3 = class _Client {
127419
127537
  globalConfig2.setCurrentSession("");
127420
127538
  globalConfig2.removeSession(current);
127421
127539
  }
127540
+ const isUnauthorized = json3.code === 401 && json3.type === "general_unauthorized_scope" && typeof json3.message === "string" && /role:\s*guests/i.test(json3.message);
127541
+ if (isUnauthorized) {
127542
+ throw new AppwriteException(
127543
+ `You are not authenticated. Run '${EXECUTABLE_NAME} login' to authenticate and try again.`,
127544
+ json3.code,
127545
+ json3.type,
127546
+ text2
127547
+ );
127548
+ }
127422
127549
  throw new AppwriteException(
127423
127550
  json3.message || text2,
127424
127551
  json3.code,
@@ -127892,6 +128019,7 @@ var ProjectNotInitializedError = class _ProjectNotInitializedError extends Error
127892
128019
 
127893
128020
  // lib/commands/utils/deployment.ts
127894
128021
  var import_fs7 = __toESM(require("fs"), 1);
128022
+ var import_os5 = __toESM(require("os"), 1);
127895
128023
  var import_path6 = __toESM(require("path"), 1);
127896
128024
 
127897
128025
  // node_modules/tar/dist/esm/index.min.js
@@ -130327,7 +130455,7 @@ var qt = class extends st {
130327
130455
  if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
130328
130456
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
130329
130457
  {
130330
- let a = import_node_path5.default.posix.dirname(t.path), l = import_node_path5.default.posix.normalize(import_node_path5.default.posix.join(a, i));
130458
+ let a = import_node_path5.default.posix.dirname(t.path), l = import_node_path5.default.posix.normalize(import_node_path5.default.posix.join(a, h.join("/")));
130331
130459
  if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
130332
130460
  }
130333
130461
  }
@@ -130802,7 +130930,7 @@ var wo = (s3) => {
130802
130930
  // lib/commands/utils/deployment.ts
130803
130931
  var POLL_DEBOUNCE = 2e3;
130804
130932
  async function packageDirectory(dirPath) {
130805
- const tempFile = `${dirPath.replace(/[^a-zA-Z0-9]/g, "_")}-${Date.now()}.tar.gz`;
130933
+ const tempFile = import_path6.default.join(import_os5.default.tmpdir(), `appwrite-deploy-${Date.now()}.tar.gz`);
130806
130934
  await zn(
130807
130935
  {
130808
130936
  gzip: true,
@@ -130811,11 +130939,28 @@ async function packageDirectory(dirPath) {
130811
130939
  },
130812
130940
  ["."]
130813
130941
  );
130814
- const buffer = import_fs7.default.readFileSync(tempFile);
130815
- import_fs7.default.unlinkSync(tempFile);
130816
- return new File([buffer], import_path6.default.basename(tempFile), {
130817
- type: "application/gzip"
130818
- });
130942
+ try {
130943
+ const buffer = import_fs7.default.readFileSync(tempFile);
130944
+ return new File([buffer], import_path6.default.basename(tempFile), {
130945
+ type: "application/gzip"
130946
+ });
130947
+ } finally {
130948
+ if (import_fs7.default.existsSync(tempFile)) {
130949
+ import_fs7.default.unlinkSync(tempFile);
130950
+ }
130951
+ }
130952
+ }
130953
+ async function resolveFileParam(filePath) {
130954
+ const resolved = import_path6.default.resolve(filePath);
130955
+ if (!import_fs7.default.existsSync(resolved)) {
130956
+ throw new Error(`File or directory not found: ${resolved}`);
130957
+ }
130958
+ const stat = import_fs7.default.statSync(resolved);
130959
+ if (stat.isDirectory()) {
130960
+ return packageDirectory(resolved);
130961
+ }
130962
+ const buffer = import_fs7.default.readFileSync(resolved);
130963
+ return new File([buffer], import_path6.default.basename(resolved));
130819
130964
  }
130820
130965
  async function downloadDeploymentCode(params) {
130821
130966
  const {
@@ -131210,7 +131355,9 @@ var Pull = class {
131210
131355
  timeout: func.timeout,
131211
131356
  commands: func.commands,
131212
131357
  scopes: func.scopes,
131213
- specification: func.specification
131358
+ buildSpecification: func.buildSpecification,
131359
+ runtimeSpecification: func.runtimeSpecification,
131360
+ deploymentRetention: func.deploymentRetention
131214
131361
  };
131215
131362
  result.push(functionConfig);
131216
131363
  if (!import_fs8.default.existsSync(absoluteFuncPath)) {
@@ -131292,7 +131439,10 @@ var Pull = class {
131292
131439
  buildCommand: site.buildCommand,
131293
131440
  outputDirectory: site.outputDirectory,
131294
131441
  fallbackFile: site.fallbackFile,
131295
- specification: site.specification
131442
+ startCommand: site.startCommand,
131443
+ buildSpecification: site.buildSpecification,
131444
+ runtimeSpecification: site.runtimeSpecification,
131445
+ deploymentRetention: site.deploymentRetention
131296
131446
  };
131297
131447
  result.push(siteConfig);
131298
131448
  if (!import_fs8.default.existsSync(absoluteSitePath)) {
@@ -132112,7 +132262,8 @@ Suggestion: It appears that git is not installed, try installing git then trying
132112
132262
  $id: functionId,
132113
132263
  name: answers.name,
132114
132264
  runtime: answers.runtime.id,
132115
- specification: answers.specification,
132265
+ buildSpecification: answers.buildSpecification,
132266
+ runtimeSpecification: answers.runtimeSpecification,
132116
132267
  execute: ["any"],
132117
132268
  events: [],
132118
132269
  scopes: ["users.read"],
@@ -132277,7 +132428,8 @@ Suggestion: It appears that git is not installed, try installing git then trying
132277
132428
  buildCommand: templateDetails.frameworks[0].buildCommand || "",
132278
132429
  outputDirectory: templateDetails.frameworks[0].outputDirectory || "",
132279
132430
  fallbackFile: templateDetails.frameworks[0].fallbackFile || "",
132280
- specification: answers.specification,
132431
+ buildSpecification: answers.buildSpecification,
132432
+ runtimeSpecification: answers.runtimeSpecification,
132281
132433
  enabled: true,
132282
132434
  timeout: 30,
132283
132435
  logging: true,
@@ -136465,7 +136617,9 @@ var Push = class {
136465
136617
  entrypoint: func.entrypoint,
136466
136618
  commands: func.commands,
136467
136619
  scopes: func.scopes,
136468
- specification: func.specification
136620
+ buildSpecification: func.buildSpecification,
136621
+ runtimeSpecification: func.runtimeSpecification,
136622
+ deploymentRetention: func.deploymentRetention
136469
136623
  });
136470
136624
  } catch (e) {
136471
136625
  if (Number(e.code) === 404) {
@@ -136494,7 +136648,9 @@ var Push = class {
136494
136648
  entrypoint: func.entrypoint,
136495
136649
  commands: func.commands,
136496
136650
  scopes: func.scopes,
136497
- specification: func.specification
136651
+ buildSpecification: func.buildSpecification,
136652
+ runtimeSpecification: func.runtimeSpecification,
136653
+ deploymentRetention: func.deploymentRetention
136498
136654
  });
136499
136655
  let domain2 = "";
136500
136656
  try {
@@ -136766,7 +136922,10 @@ var Push = class {
136766
136922
  outputDirectory: site.outputDirectory,
136767
136923
  buildRuntime: site.buildRuntime,
136768
136924
  adapter: site.adapter,
136769
- specification: site.specification
136925
+ startCommand: site.startCommand,
136926
+ buildSpecification: site.buildSpecification,
136927
+ runtimeSpecification: site.runtimeSpecification,
136928
+ deploymentRetention: site.deploymentRetention
136770
136929
  });
136771
136930
  } catch (e) {
136772
136931
  if (Number(e.code) === 404) {
@@ -136794,7 +136953,10 @@ var Push = class {
136794
136953
  outputDirectory: site.outputDirectory,
136795
136954
  buildRuntime: site.buildRuntime,
136796
136955
  adapter: site.adapter,
136797
- specification: site.specification
136956
+ startCommand: site.startCommand,
136957
+ buildSpecification: site.buildSpecification,
136958
+ runtimeSpecification: site.runtimeSpecification,
136959
+ deploymentRetention: site.deploymentRetention
136798
136960
  });
136799
136961
  let domain2 = "";
136800
136962
  try {
@@ -138959,7 +139121,7 @@ account.command(`delete-identity`).description(`Delete an identity by its unique
138959
139121
  async ({ identityId }) => parse3(await (await getAccountClient()).deleteIdentity(identityId))
138960
139122
  )
138961
139123
  );
138962
- 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, amount, currency, from, to, dueAt, attempts, status, grossAmount`).action(
139124
+ 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(
138963
139125
  actionRunner(
138964
139126
  async ({ queries }) => parse3(await (await getAccountClient()).listInvoices(queries))
138965
139127
  )
@@ -139981,9 +140143,9 @@ functions.command(`create`).description(`Create a new function. You can pass a l
139981
140143
  `--provider-silent-mode [value]`,
139982
140144
  `Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.`,
139983
140145
  (value) => value === void 0 ? true : parseBool(value)
139984
- ).option(`--provider-root-directory <provider-root-directory>`, `Path to function code in the linked repo.`).option(`--specification <specification>`, `Runtime specification for the function and builds.`).action(
140146
+ ).option(`--provider-root-directory <provider-root-directory>`, `Path to function code in the linked repo.`).option(`--build-specification <build-specification>`, `Build specification for the function deployments.`).option(`--runtime-specification <runtime-specification>`, `Runtime specification for the function executions.`).option(`--deployment-retention <deployment-retention>`, `Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.`, parseInteger).action(
139985
140147
  actionRunner(
139986
- async ({ functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification }) => parse3(await (await getFunctionsClient()).create(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification))
140148
+ async ({ functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention }) => parse3(await (await getFunctionsClient()).create(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention))
139987
140149
  )
139988
140150
  );
139989
140151
  functions.command(`list-runtimes`).description(`Get a list of all runtimes that are currently active on your instance.`).action(
@@ -140032,9 +140194,9 @@ functions.command(`update`).description(`Update function by its unique ID.`).req
140032
140194
  `--provider-silent-mode [value]`,
140033
140195
  `Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.`,
140034
140196
  (value) => value === void 0 ? true : parseBool(value)
140035
- ).option(`--provider-root-directory <provider-root-directory>`, `Path to function code in the linked repo.`).option(`--specification <specification>`, `Runtime specification for the function and builds.`).action(
140197
+ ).option(`--provider-root-directory <provider-root-directory>`, `Path to function code in the linked repo.`).option(`--build-specification <build-specification>`, `Build specification for the function deployments.`).option(`--runtime-specification <runtime-specification>`, `Runtime specification for the function executions.`).option(`--deployment-retention <deployment-retention>`, `Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.`, parseInteger).action(
140036
140198
  actionRunner(
140037
- async ({ functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification }) => parse3(await (await getFunctionsClient()).update(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification))
140199
+ async ({ functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention }) => parse3(await (await getFunctionsClient()).update(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention))
140038
140200
  )
140039
140201
  );
140040
140202
  functions.command(`delete`).description(`Delete a function by its unique ID.`).requiredOption(`--function-id <function-id>`, `Function ID.`).action(
@@ -140062,7 +140224,7 @@ This endpoint accepts a tar.gz file compressed with your code. Make sure to incl
140062
140224
 
140063
140225
  Use the "command" param to set the entrypoint used to execute your code.`).requiredOption(`--function-id <function-id>`, `Function ID.`).requiredOption(`--code <code>`, `Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.`).requiredOption(`--activate <activate>`, `Automatically activate the deployment when it is finished building.`, parseBool).option(`--entrypoint <entrypoint>`, `Entrypoint File.`).option(`--commands <commands>`, `Build Commands.`).action(
140064
140226
  actionRunner(
140065
- async ({ functionId, code, activate, entrypoint, commands }) => parse3(await (await getFunctionsClient()).createDeployment(functionId, code, activate, entrypoint, commands))
140227
+ async ({ functionId, code, activate, entrypoint, commands }) => parse3(await (await getFunctionsClient()).createDeployment(functionId, code !== void 0 ? await resolveFileParam(code) : void 0, activate, entrypoint, commands))
140066
140228
  )
140067
140229
  );
140068
140230
  functions.command(`create-duplicate-deployment`).description(`Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.`).requiredOption(`--function-id <function-id>`, `Function ID.`).requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`).option(`--build-id <build-id>`, `Build unique ID.`).action(
@@ -141458,13 +141620,13 @@ sites.command(`create`).description(`Create a new site.`).requiredOption(`--site
141458
141620
  `--logging [value]`,
141459
141621
  `When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.`,
141460
141622
  (value) => value === void 0 ? true : parseBool(value)
141461
- ).option(`--timeout <timeout>`, `Maximum request time in seconds.`, parseInteger).option(`--install-command <install-command>`, `Install Command.`).option(`--build-command <build-command>`, `Build Command.`).option(`--output-directory <output-directory>`, `Output Directory for site.`).option(`--adapter <adapter>`, `Framework adapter defining rendering strategy. Allowed values are: static, ssr`).option(`--installation-id <installation-id>`, `Appwrite Installation ID for VCS (Version Control System) deployment.`).option(`--fallback-file <fallback-file>`, `Fallback file for single page application sites.`).option(`--provider-repository-id <provider-repository-id>`, `Repository ID of the repo linked to the site.`).option(`--provider-branch <provider-branch>`, `Production branch for the repo linked to the site.`).option(
141623
+ ).option(`--timeout <timeout>`, `Maximum request time in seconds.`, parseInteger).option(`--install-command <install-command>`, `Install Command.`).option(`--build-command <build-command>`, `Build Command.`).option(`--start-command <start-command>`, `Custom start command. Leave empty to use default.`).option(`--output-directory <output-directory>`, `Output Directory for site.`).option(`--adapter <adapter>`, `Framework adapter defining rendering strategy. Allowed values are: static, ssr`).option(`--installation-id <installation-id>`, `Appwrite Installation ID for VCS (Version Control System) deployment.`).option(`--fallback-file <fallback-file>`, `Fallback file for single page application sites.`).option(`--provider-repository-id <provider-repository-id>`, `Repository ID of the repo linked to the site.`).option(`--provider-branch <provider-branch>`, `Production branch for the repo linked to the site.`).option(
141462
141624
  `--provider-silent-mode [value]`,
141463
141625
  `Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.`,
141464
141626
  (value) => value === void 0 ? true : parseBool(value)
141465
- ).option(`--provider-root-directory <provider-root-directory>`, `Path to site code in the linked repo.`).option(`--specification <specification>`, `Framework specification for the site and builds.`).action(
141627
+ ).option(`--provider-root-directory <provider-root-directory>`, `Path to site code in the linked repo.`).option(`--build-specification <build-specification>`, `Build specification for the site deployments.`).option(`--runtime-specification <runtime-specification>`, `Runtime specification for the SSR executions.`).option(`--deployment-retention <deployment-retention>`, `Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.`, parseInteger).action(
141466
141628
  actionRunner(
141467
- async ({ siteId, name, framework, buildRuntime, enabled, logging, timeout, installCommand, buildCommand, outputDirectory, adapter, installationId, fallbackFile, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification }) => parse3(await (await getSitesClient()).create(siteId, name, framework, buildRuntime, enabled, logging, timeout, installCommand, buildCommand, outputDirectory, adapter, installationId, fallbackFile, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification))
141629
+ async ({ siteId, name, framework, buildRuntime, enabled, logging, timeout, installCommand, buildCommand, startCommand, outputDirectory, adapter, installationId, fallbackFile, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention }) => parse3(await (await getSitesClient()).create(siteId, name, framework, buildRuntime, enabled, logging, timeout, installCommand, buildCommand, startCommand, outputDirectory, adapter, installationId, fallbackFile, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention))
141468
141630
  )
141469
141631
  );
141470
141632
  sites.command(`list-frameworks`).description(`Get a list of all frameworks that are currently available on the server instance.`).action(
@@ -141505,13 +141667,13 @@ sites.command(`update`).description(`Update site by its unique ID.`).requiredOpt
141505
141667
  `--logging [value]`,
141506
141668
  `When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.`,
141507
141669
  (value) => value === void 0 ? true : parseBool(value)
141508
- ).option(`--timeout <timeout>`, `Maximum request time in seconds.`, parseInteger).option(`--install-command <install-command>`, `Install Command.`).option(`--build-command <build-command>`, `Build Command.`).option(`--output-directory <output-directory>`, `Output Directory for site.`).option(`--build-runtime <build-runtime>`, `Runtime to use during build step.`).option(`--adapter <adapter>`, `Framework adapter defining rendering strategy. Allowed values are: static, ssr`).option(`--fallback-file <fallback-file>`, `Fallback file for single page application sites.`).option(`--installation-id <installation-id>`, `Appwrite Installation ID for VCS (Version Control System) deployment.`).option(`--provider-repository-id <provider-repository-id>`, `Repository ID of the repo linked to the site.`).option(`--provider-branch <provider-branch>`, `Production branch for the repo linked to the site.`).option(
141670
+ ).option(`--timeout <timeout>`, `Maximum request time in seconds.`, parseInteger).option(`--install-command <install-command>`, `Install Command.`).option(`--build-command <build-command>`, `Build Command.`).option(`--start-command <start-command>`, `Custom start command. Leave empty to use default.`).option(`--output-directory <output-directory>`, `Output Directory for site.`).option(`--build-runtime <build-runtime>`, `Runtime to use during build step.`).option(`--adapter <adapter>`, `Framework adapter defining rendering strategy. Allowed values are: static, ssr`).option(`--fallback-file <fallback-file>`, `Fallback file for single page application sites.`).option(`--installation-id <installation-id>`, `Appwrite Installation ID for VCS (Version Control System) deployment.`).option(`--provider-repository-id <provider-repository-id>`, `Repository ID of the repo linked to the site.`).option(`--provider-branch <provider-branch>`, `Production branch for the repo linked to the site.`).option(
141509
141671
  `--provider-silent-mode [value]`,
141510
141672
  `Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.`,
141511
141673
  (value) => value === void 0 ? true : parseBool(value)
141512
- ).option(`--provider-root-directory <provider-root-directory>`, `Path to site code in the linked repo.`).option(`--specification <specification>`, `Framework specification for the site and builds.`).action(
141674
+ ).option(`--provider-root-directory <provider-root-directory>`, `Path to site code in the linked repo.`).option(`--build-specification <build-specification>`, `Build specification for the site deployments.`).option(`--runtime-specification <runtime-specification>`, `Runtime specification for the SSR executions.`).option(`--deployment-retention <deployment-retention>`, `Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.`, parseInteger).action(
141513
141675
  actionRunner(
141514
- async ({ siteId, name, framework, enabled, logging, timeout, installCommand, buildCommand, outputDirectory, buildRuntime, adapter, fallbackFile, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification }) => parse3(await (await getSitesClient()).update(siteId, name, framework, enabled, logging, timeout, installCommand, buildCommand, outputDirectory, buildRuntime, adapter, fallbackFile, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification))
141676
+ async ({ siteId, name, framework, enabled, logging, timeout, installCommand, buildCommand, startCommand, outputDirectory, buildRuntime, adapter, fallbackFile, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention }) => parse3(await (await getSitesClient()).update(siteId, name, framework, enabled, logging, timeout, installCommand, buildCommand, startCommand, outputDirectory, buildRuntime, adapter, fallbackFile, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention))
141515
141677
  )
141516
141678
  );
141517
141679
  sites.command(`delete`).description(`Delete a site by its unique ID.`).requiredOption(`--site-id <site-id>`, `Site ID.`).action(
@@ -141539,7 +141701,7 @@ sites.command(`create-deployment`).description(`Create a new site code deploymen
141539
141701
  (value) => value === void 0 ? true : parseBool(value)
141540
141702
  ).action(
141541
141703
  actionRunner(
141542
- async ({ siteId, code, installCommand, buildCommand, outputDirectory, activate }) => parse3(await (await getSitesClient()).createDeployment(siteId, code, installCommand, buildCommand, outputDirectory, activate))
141704
+ async ({ siteId, code, installCommand, buildCommand, outputDirectory, activate }) => parse3(await (await getSitesClient()).createDeployment(siteId, code !== void 0 ? await resolveFileParam(code) : void 0, installCommand, buildCommand, outputDirectory, activate))
141543
141705
  )
141544
141706
  );
141545
141707
  sites.command(`create-duplicate-deployment`).description(`Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.`).requiredOption(`--site-id <site-id>`, `Site ID.`).requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`).action(
@@ -141753,7 +141915,7 @@ When the first request is sent, the server will return the **File** object, and
141753
141915
  If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.
141754
141916
  `).requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`).requiredOption(`--file-id <file-id>`, `File ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).requiredOption(`--file <file>`, `Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).`).option(`--permissions [permissions...]`, `An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`).action(
141755
141917
  actionRunner(
141756
- async ({ bucketId, fileId, file: file2, permissions }) => parse3(await (await getStorageClient()).createFile(bucketId, fileId, file2, permissions))
141918
+ async ({ bucketId, fileId, file: file2, permissions }) => parse3(await (await getStorageClient()).createFile(bucketId, fileId, file2 !== void 0 ? await resolveFileParam(file2) : void 0, permissions))
141757
141919
  )
141758
141920
  );
141759
141921
  storage.command(`get-file`).description(`Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.`).requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`).requiredOption(`--file-id <file-id>`, `File ID.`).action(