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
@@ -3886,7 +3886,7 @@ var require_has_flag = __commonJS({
3886
3886
  var require_supports_color = __commonJS({
3887
3887
  "node_modules/supports-color/index.js"(exports, module) {
3888
3888
  "use strict";
3889
- var os6 = __require("os");
3889
+ var os7 = __require("os");
3890
3890
  var tty = __require("tty");
3891
3891
  var hasFlag = require_has_flag();
3892
3892
  var { env } = process;
@@ -3934,7 +3934,7 @@ var require_supports_color = __commonJS({
3934
3934
  return min;
3935
3935
  }
3936
3936
  if (process.platform === "win32") {
3937
- const osRelease = os6.release().split(".");
3937
+ const osRelease = os7.release().split(".");
3938
3938
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
3939
3939
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
3940
3940
  }
@@ -35908,7 +35908,7 @@ var require_has_flag2 = __commonJS({
35908
35908
  var require_supports_colors = __commonJS({
35909
35909
  "node_modules/@colors/colors/lib/system/supports-colors.js"(exports, module) {
35910
35910
  "use strict";
35911
- var os6 = __require("os");
35911
+ var os7 = __require("os");
35912
35912
  var hasFlag = require_has_flag2();
35913
35913
  var env = process.env;
35914
35914
  var forceColor = void 0;
@@ -35946,7 +35946,7 @@ var require_supports_colors = __commonJS({
35946
35946
  }
35947
35947
  var min = forceColor ? 1 : 0;
35948
35948
  if (process.platform === "win32") {
35949
- var osRelease = os6.release().split(".");
35949
+ var osRelease = os7.release().split(".");
35950
35950
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
35951
35951
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
35952
35952
  }
@@ -62387,7 +62387,7 @@ var require_has_flag3 = __commonJS({
62387
62387
  var require_supports_color2 = __commonJS({
62388
62388
  "node_modules/inquirer-search-list/node_modules/chalk/node_modules/supports-color/index.js"(exports, module) {
62389
62389
  "use strict";
62390
- var os6 = __require("os");
62390
+ var os7 = __require("os");
62391
62391
  var hasFlag = require_has_flag3();
62392
62392
  var env = process.env;
62393
62393
  var forceColor;
@@ -62425,7 +62425,7 @@ var require_supports_color2 = __commonJS({
62425
62425
  }
62426
62426
  const min = forceColor ? 1 : 0;
62427
62427
  if (process.platform === "win32") {
62428
- const osRelease = os6.release().split(".");
62428
+ const osRelease = os7.release().split(".");
62429
62429
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
62430
62430
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
62431
62431
  }
@@ -68582,8 +68582,8 @@ var require_rx_lite = __commonJS({
68582
68582
  checkDisposed(this);
68583
68583
  if (!this.isStopped) {
68584
68584
  this.isStopped = true;
68585
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68586
- os6[i].onCompleted();
68585
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68586
+ os7[i].onCompleted();
68587
68587
  }
68588
68588
  this.observers.length = 0;
68589
68589
  }
@@ -68598,8 +68598,8 @@ var require_rx_lite = __commonJS({
68598
68598
  this.isStopped = true;
68599
68599
  this.error = error49;
68600
68600
  this.hasError = true;
68601
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68602
- os6[i].onError(error49);
68601
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68602
+ os7[i].onError(error49);
68603
68603
  }
68604
68604
  this.observers.length = 0;
68605
68605
  }
@@ -68611,8 +68611,8 @@ var require_rx_lite = __commonJS({
68611
68611
  onNext: function(value) {
68612
68612
  checkDisposed(this);
68613
68613
  if (!this.isStopped) {
68614
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68615
- os6[i].onNext(value);
68614
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68615
+ os7[i].onNext(value);
68616
68616
  }
68617
68617
  }
68618
68618
  },
@@ -68672,16 +68672,16 @@ var require_rx_lite = __commonJS({
68672
68672
  checkDisposed(this);
68673
68673
  if (!this.isStopped) {
68674
68674
  this.isStopped = true;
68675
- var os6 = cloneArray(this.observers), len = os6.length;
68675
+ var os7 = cloneArray(this.observers), len = os7.length;
68676
68676
  if (this.hasValue) {
68677
68677
  for (i = 0; i < len; i++) {
68678
- var o = os6[i];
68678
+ var o = os7[i];
68679
68679
  o.onNext(this.value);
68680
68680
  o.onCompleted();
68681
68681
  }
68682
68682
  } else {
68683
68683
  for (i = 0; i < len; i++) {
68684
- os6[i].onCompleted();
68684
+ os7[i].onCompleted();
68685
68685
  }
68686
68686
  }
68687
68687
  this.observers.length = 0;
@@ -68697,8 +68697,8 @@ var require_rx_lite = __commonJS({
68697
68697
  this.isStopped = true;
68698
68698
  this.hasError = true;
68699
68699
  this.error = error49;
68700
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68701
- os6[i].onError(error49);
68700
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68701
+ os7[i].onError(error49);
68702
68702
  }
68703
68703
  this.observers.length = 0;
68704
68704
  }
@@ -68806,8 +68806,8 @@ var require_rx_lite = __commonJS({
68806
68806
  return;
68807
68807
  }
68808
68808
  this.isStopped = true;
68809
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68810
- os6[i].onCompleted();
68809
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68810
+ os7[i].onCompleted();
68811
68811
  }
68812
68812
  this.observers.length = 0;
68813
68813
  },
@@ -68823,8 +68823,8 @@ var require_rx_lite = __commonJS({
68823
68823
  this.isStopped = true;
68824
68824
  this.hasError = true;
68825
68825
  this.error = error49;
68826
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68827
- os6[i].onError(error49);
68826
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68827
+ os7[i].onError(error49);
68828
68828
  }
68829
68829
  this.observers.length = 0;
68830
68830
  },
@@ -68838,8 +68838,8 @@ var require_rx_lite = __commonJS({
68838
68838
  return;
68839
68839
  }
68840
68840
  this.value = value;
68841
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68842
- os6[i].onNext(value);
68841
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68842
+ os7[i].onNext(value);
68843
68843
  }
68844
68844
  },
68845
68845
  /**
@@ -68920,8 +68920,8 @@ var require_rx_lite = __commonJS({
68920
68920
  var now = this.scheduler.now();
68921
68921
  this.q.push({ interval: now, value });
68922
68922
  this._trim(now);
68923
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68924
- var observer = os6[i];
68923
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68924
+ var observer = os7[i];
68925
68925
  observer.onNext(value);
68926
68926
  observer.ensureActive();
68927
68927
  }
@@ -68940,8 +68940,8 @@ var require_rx_lite = __commonJS({
68940
68940
  this.hasError = true;
68941
68941
  var now = this.scheduler.now();
68942
68942
  this._trim(now);
68943
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68944
- var observer = os6[i];
68943
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68944
+ var observer = os7[i];
68945
68945
  observer.onError(error49);
68946
68946
  observer.ensureActive();
68947
68947
  }
@@ -68958,8 +68958,8 @@ var require_rx_lite = __commonJS({
68958
68958
  this.isStopped = true;
68959
68959
  var now = this.scheduler.now();
68960
68960
  this._trim(now);
68961
- for (var i = 0, os6 = cloneArray(this.observers), len = os6.length; i < len; i++) {
68962
- var observer = os6[i];
68961
+ for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
68962
+ var observer = os7[i];
68963
68963
  observer.onCompleted();
68964
68964
  observer.ensureActive();
68965
68965
  }
@@ -71506,7 +71506,7 @@ var require_main2 = __commonJS({
71506
71506
  "node_modules/dotenv/lib/main.js"(exports, module) {
71507
71507
  var fs20 = __require("fs");
71508
71508
  var path16 = __require("path");
71509
- var os6 = __require("os");
71509
+ var os7 = __require("os");
71510
71510
  var crypto2 = __require("crypto");
71511
71511
  var packageJson = require_package2();
71512
71512
  var version4 = packageJson.version;
@@ -71629,7 +71629,7 @@ var require_main2 = __commonJS({
71629
71629
  return null;
71630
71630
  }
71631
71631
  function _resolveHome(envPath) {
71632
- return envPath[0] === "~" ? path16.join(os6.homedir(), envPath.slice(1)) : envPath;
71632
+ return envPath[0] === "~" ? path16.join(os7.homedir(), envPath.slice(1)) : envPath;
71633
71633
  }
71634
71634
  function _configVault(options) {
71635
71635
  const debug = Boolean(options && options.debug);
@@ -77144,7 +77144,7 @@ var require_constants9 = __commonJS({
77144
77144
  "use strict";
77145
77145
  var { sep } = __require("path");
77146
77146
  var { platform } = process;
77147
- var os6 = __require("os");
77147
+ var os7 = __require("os");
77148
77148
  exports.EV_ALL = "all";
77149
77149
  exports.EV_READY = "ready";
77150
77150
  exports.EV_ADD = "add";
@@ -77198,7 +77198,7 @@ var require_constants9 = __commonJS({
77198
77198
  exports.isWindows = platform === "win32";
77199
77199
  exports.isMacos = platform === "darwin";
77200
77200
  exports.isLinux = platform === "linux";
77201
- exports.isIBMi = os6.type() === "OS400";
77201
+ exports.isIBMi = os7.type() === "OS400";
77202
77202
  }
77203
77203
  });
77204
77204
 
@@ -85465,7 +85465,7 @@ var package_default = {
85465
85465
  type: "module",
85466
85466
  homepage: "https://appwrite.io/support",
85467
85467
  description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
85468
- version: "14.0.1",
85468
+ version: "15.1.0",
85469
85469
  license: "BSD-3-Clause",
85470
85470
  main: "dist/index.cjs",
85471
85471
  module: "dist/index.js",
@@ -85509,7 +85509,7 @@ var package_default = {
85509
85509
  "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"
85510
85510
  },
85511
85511
  dependencies: {
85512
- "@appwrite.io/console": "^4.0.0",
85512
+ "@appwrite.io/console": "^5.0.0",
85513
85513
  chalk: "4.1.2",
85514
85514
  chokidar: "^3.6.0",
85515
85515
  "cli-progress": "^3.12.0",
@@ -99540,7 +99540,10 @@ var SiteSchema = external_exports.object({
99540
99540
  buildCommand: external_exports.string().optional(),
99541
99541
  outputDirectory: external_exports.string().optional(),
99542
99542
  fallbackFile: external_exports.string().optional(),
99543
- specification: external_exports.string().optional(),
99543
+ buildSpecification: external_exports.string().optional(),
99544
+ runtimeSpecification: external_exports.string().optional(),
99545
+ deploymentRetention: external_exports.number().optional(),
99546
+ startCommand: external_exports.string().optional(),
99544
99547
  vars: external_exports.record(external_exports.string(), external_exports.string()).optional(),
99545
99548
  ignore: external_exports.string().optional()
99546
99549
  }).strict();
@@ -99552,7 +99555,9 @@ var FunctionSchema = external_exports.object({
99552
99555
  enabled: external_exports.boolean().optional(),
99553
99556
  logging: external_exports.boolean().optional(),
99554
99557
  runtime: external_exports.string(),
99555
- specification: external_exports.string().optional(),
99558
+ buildSpecification: external_exports.string().optional(),
99559
+ runtimeSpecification: external_exports.string().optional(),
99560
+ deploymentRetention: external_exports.number().optional(),
99556
99561
  scopes: external_exports.array(external_exports.string()).optional(),
99557
99562
  events: external_exports.array(external_exports.string()).optional(),
99558
99563
  schedule: external_exports.string().optional(),
@@ -99748,7 +99753,7 @@ import childProcess from "child_process";
99748
99753
  // lib/constants.ts
99749
99754
  var SDK_TITLE = "Appwrite";
99750
99755
  var SDK_TITLE_LOWER = "appwrite";
99751
- var SDK_VERSION = "14.0.1";
99756
+ var SDK_VERSION = "15.1.0";
99752
99757
  var SDK_NAME = "Command Line";
99753
99758
  var SDK_PLATFORM = "console";
99754
99759
  var SDK_LANGUAGE = "cli";
@@ -100787,7 +100792,7 @@ var Client = class _Client {
100787
100792
  "x-sdk-name": "Console",
100788
100793
  "x-sdk-platform": "console",
100789
100794
  "x-sdk-language": "web",
100790
- "x-sdk-version": "4.0.0",
100795
+ "x-sdk-version": "5.0.0",
100791
100796
  "X-Appwrite-Response-Format": "1.8.0"
100792
100797
  };
100793
100798
  this.realtime = {
@@ -101312,6 +101317,9 @@ var Client = class _Client {
101312
101317
  window.console.warn("Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint.");
101313
101318
  window.localStorage.setItem("cookieFallback", cookieFallback);
101314
101319
  }
101320
+ if (data && typeof data === "object") {
101321
+ data.toString = () => JSONbig.stringify(data);
101322
+ }
101315
101323
  return data;
101316
101324
  });
101317
101325
  }
@@ -107338,7 +107346,9 @@ var Functions = class {
107338
107346
  providerBranch: rest[13],
107339
107347
  providerSilentMode: rest[14],
107340
107348
  providerRootDirectory: rest[15],
107341
- specification: rest[16]
107349
+ buildSpecification: rest[16],
107350
+ runtimeSpecification: rest[17],
107351
+ deploymentRetention: rest[18]
107342
107352
  };
107343
107353
  }
107344
107354
  const functionId = params.functionId;
@@ -107358,7 +107368,9 @@ var Functions = class {
107358
107368
  const providerBranch = params.providerBranch;
107359
107369
  const providerSilentMode = params.providerSilentMode;
107360
107370
  const providerRootDirectory = params.providerRootDirectory;
107361
- const specification = params.specification;
107371
+ const buildSpecification = params.buildSpecification;
107372
+ const runtimeSpecification = params.runtimeSpecification;
107373
+ const deploymentRetention = params.deploymentRetention;
107362
107374
  if (typeof functionId === "undefined") {
107363
107375
  throw new AppwriteException('Missing required parameter: "functionId"');
107364
107376
  }
@@ -107421,8 +107433,14 @@ var Functions = class {
107421
107433
  if (typeof providerRootDirectory !== "undefined") {
107422
107434
  payload["providerRootDirectory"] = providerRootDirectory;
107423
107435
  }
107424
- if (typeof specification !== "undefined") {
107425
- payload["specification"] = specification;
107436
+ if (typeof buildSpecification !== "undefined") {
107437
+ payload["buildSpecification"] = buildSpecification;
107438
+ }
107439
+ if (typeof runtimeSpecification !== "undefined") {
107440
+ payload["runtimeSpecification"] = runtimeSpecification;
107441
+ }
107442
+ if (typeof deploymentRetention !== "undefined") {
107443
+ payload["deploymentRetention"] = deploymentRetention;
107426
107444
  }
107427
107445
  const uri = new URL(this.client.config.endpoint + apiPath);
107428
107446
  const apiHeaders = {
@@ -107575,7 +107593,9 @@ var Functions = class {
107575
107593
  providerBranch: rest[13],
107576
107594
  providerSilentMode: rest[14],
107577
107595
  providerRootDirectory: rest[15],
107578
- specification: rest[16]
107596
+ buildSpecification: rest[16],
107597
+ runtimeSpecification: rest[17],
107598
+ deploymentRetention: rest[18]
107579
107599
  };
107580
107600
  }
107581
107601
  const functionId = params.functionId;
@@ -107595,7 +107615,9 @@ var Functions = class {
107595
107615
  const providerBranch = params.providerBranch;
107596
107616
  const providerSilentMode = params.providerSilentMode;
107597
107617
  const providerRootDirectory = params.providerRootDirectory;
107598
- const specification = params.specification;
107618
+ const buildSpecification = params.buildSpecification;
107619
+ const runtimeSpecification = params.runtimeSpecification;
107620
+ const deploymentRetention = params.deploymentRetention;
107599
107621
  if (typeof functionId === "undefined") {
107600
107622
  throw new AppwriteException('Missing required parameter: "functionId"');
107601
107623
  }
@@ -107652,8 +107674,14 @@ var Functions = class {
107652
107674
  if (typeof providerRootDirectory !== "undefined") {
107653
107675
  payload["providerRootDirectory"] = providerRootDirectory;
107654
107676
  }
107655
- if (typeof specification !== "undefined") {
107656
- payload["specification"] = specification;
107677
+ if (typeof buildSpecification !== "undefined") {
107678
+ payload["buildSpecification"] = buildSpecification;
107679
+ }
107680
+ if (typeof runtimeSpecification !== "undefined") {
107681
+ payload["runtimeSpecification"] = runtimeSpecification;
107682
+ }
107683
+ if (typeof deploymentRetention !== "undefined") {
107684
+ payload["deploymentRetention"] = deploymentRetention;
107657
107685
  }
107658
107686
  const uri = new URL(this.client.config.endpoint + apiPath);
107659
107687
  const apiHeaders = {
@@ -116595,15 +116623,18 @@ var Sites = class {
116595
116623
  timeout: rest[5],
116596
116624
  installCommand: rest[6],
116597
116625
  buildCommand: rest[7],
116598
- outputDirectory: rest[8],
116599
- adapter: rest[9],
116600
- installationId: rest[10],
116601
- fallbackFile: rest[11],
116602
- providerRepositoryId: rest[12],
116603
- providerBranch: rest[13],
116604
- providerSilentMode: rest[14],
116605
- providerRootDirectory: rest[15],
116606
- specification: rest[16]
116626
+ startCommand: rest[8],
116627
+ outputDirectory: rest[9],
116628
+ adapter: rest[10],
116629
+ installationId: rest[11],
116630
+ fallbackFile: rest[12],
116631
+ providerRepositoryId: rest[13],
116632
+ providerBranch: rest[14],
116633
+ providerSilentMode: rest[15],
116634
+ providerRootDirectory: rest[16],
116635
+ buildSpecification: rest[17],
116636
+ runtimeSpecification: rest[18],
116637
+ deploymentRetention: rest[19]
116607
116638
  };
116608
116639
  }
116609
116640
  const siteId = params.siteId;
@@ -116615,6 +116646,7 @@ var Sites = class {
116615
116646
  const timeout = params.timeout;
116616
116647
  const installCommand = params.installCommand;
116617
116648
  const buildCommand = params.buildCommand;
116649
+ const startCommand = params.startCommand;
116618
116650
  const outputDirectory = params.outputDirectory;
116619
116651
  const adapter = params.adapter;
116620
116652
  const installationId = params.installationId;
@@ -116623,7 +116655,9 @@ var Sites = class {
116623
116655
  const providerBranch = params.providerBranch;
116624
116656
  const providerSilentMode = params.providerSilentMode;
116625
116657
  const providerRootDirectory = params.providerRootDirectory;
116626
- const specification = params.specification;
116658
+ const buildSpecification = params.buildSpecification;
116659
+ const runtimeSpecification = params.runtimeSpecification;
116660
+ const deploymentRetention = params.deploymentRetention;
116627
116661
  if (typeof siteId === "undefined") {
116628
116662
  throw new AppwriteException('Missing required parameter: "siteId"');
116629
116663
  }
@@ -116662,6 +116696,9 @@ var Sites = class {
116662
116696
  if (typeof buildCommand !== "undefined") {
116663
116697
  payload["buildCommand"] = buildCommand;
116664
116698
  }
116699
+ if (typeof startCommand !== "undefined") {
116700
+ payload["startCommand"] = startCommand;
116701
+ }
116665
116702
  if (typeof outputDirectory !== "undefined") {
116666
116703
  payload["outputDirectory"] = outputDirectory;
116667
116704
  }
@@ -116689,8 +116726,14 @@ var Sites = class {
116689
116726
  if (typeof providerRootDirectory !== "undefined") {
116690
116727
  payload["providerRootDirectory"] = providerRootDirectory;
116691
116728
  }
116692
- if (typeof specification !== "undefined") {
116693
- payload["specification"] = specification;
116729
+ if (typeof buildSpecification !== "undefined") {
116730
+ payload["buildSpecification"] = buildSpecification;
116731
+ }
116732
+ if (typeof runtimeSpecification !== "undefined") {
116733
+ payload["runtimeSpecification"] = runtimeSpecification;
116734
+ }
116735
+ if (typeof deploymentRetention !== "undefined") {
116736
+ payload["deploymentRetention"] = deploymentRetention;
116694
116737
  }
116695
116738
  const uri = new URL(this.client.config.endpoint + apiPath);
116696
116739
  const apiHeaders = {
@@ -116829,16 +116872,19 @@ var Sites = class {
116829
116872
  timeout: rest[4],
116830
116873
  installCommand: rest[5],
116831
116874
  buildCommand: rest[6],
116832
- outputDirectory: rest[7],
116833
- buildRuntime: rest[8],
116834
- adapter: rest[9],
116835
- fallbackFile: rest[10],
116836
- installationId: rest[11],
116837
- providerRepositoryId: rest[12],
116838
- providerBranch: rest[13],
116839
- providerSilentMode: rest[14],
116840
- providerRootDirectory: rest[15],
116841
- specification: rest[16]
116875
+ startCommand: rest[7],
116876
+ outputDirectory: rest[8],
116877
+ buildRuntime: rest[9],
116878
+ adapter: rest[10],
116879
+ fallbackFile: rest[11],
116880
+ installationId: rest[12],
116881
+ providerRepositoryId: rest[13],
116882
+ providerBranch: rest[14],
116883
+ providerSilentMode: rest[15],
116884
+ providerRootDirectory: rest[16],
116885
+ buildSpecification: rest[17],
116886
+ runtimeSpecification: rest[18],
116887
+ deploymentRetention: rest[19]
116842
116888
  };
116843
116889
  }
116844
116890
  const siteId = params.siteId;
@@ -116849,6 +116895,7 @@ var Sites = class {
116849
116895
  const timeout = params.timeout;
116850
116896
  const installCommand = params.installCommand;
116851
116897
  const buildCommand = params.buildCommand;
116898
+ const startCommand = params.startCommand;
116852
116899
  const outputDirectory = params.outputDirectory;
116853
116900
  const buildRuntime = params.buildRuntime;
116854
116901
  const adapter = params.adapter;
@@ -116858,7 +116905,9 @@ var Sites = class {
116858
116905
  const providerBranch = params.providerBranch;
116859
116906
  const providerSilentMode = params.providerSilentMode;
116860
116907
  const providerRootDirectory = params.providerRootDirectory;
116861
- const specification = params.specification;
116908
+ const buildSpecification = params.buildSpecification;
116909
+ const runtimeSpecification = params.runtimeSpecification;
116910
+ const deploymentRetention = params.deploymentRetention;
116862
116911
  if (typeof siteId === "undefined") {
116863
116912
  throw new AppwriteException('Missing required parameter: "siteId"');
116864
116913
  }
@@ -116891,6 +116940,9 @@ var Sites = class {
116891
116940
  if (typeof buildCommand !== "undefined") {
116892
116941
  payload["buildCommand"] = buildCommand;
116893
116942
  }
116943
+ if (typeof startCommand !== "undefined") {
116944
+ payload["startCommand"] = startCommand;
116945
+ }
116894
116946
  if (typeof outputDirectory !== "undefined") {
116895
116947
  payload["outputDirectory"] = outputDirectory;
116896
116948
  }
@@ -116918,8 +116970,14 @@ var Sites = class {
116918
116970
  if (typeof providerRootDirectory !== "undefined") {
116919
116971
  payload["providerRootDirectory"] = providerRootDirectory;
116920
116972
  }
116921
- if (typeof specification !== "undefined") {
116922
- payload["specification"] = specification;
116973
+ if (typeof buildSpecification !== "undefined") {
116974
+ payload["buildSpecification"] = buildSpecification;
116975
+ }
116976
+ if (typeof runtimeSpecification !== "undefined") {
116977
+ payload["runtimeSpecification"] = runtimeSpecification;
116978
+ }
116979
+ if (typeof deploymentRetention !== "undefined") {
116980
+ payload["deploymentRetention"] = deploymentRetention;
116923
116981
  }
116924
116982
  const uri = new URL(this.client.config.endpoint + apiPath);
116925
116983
  const apiHeaders = {
@@ -124862,6 +124920,9 @@ var Runtime;
124862
124920
  Runtime2["Pythonml311"] = "python-ml-3.11";
124863
124921
  Runtime2["Pythonml312"] = "python-ml-3.12";
124864
124922
  Runtime2["Pythonml313"] = "python-ml-3.13";
124923
+ Runtime2["Deno121"] = "deno-1.21";
124924
+ Runtime2["Deno124"] = "deno-1.24";
124925
+ Runtime2["Deno135"] = "deno-1.35";
124865
124926
  Runtime2["Deno140"] = "deno-1.40";
124866
124927
  Runtime2["Deno146"] = "deno-1.46";
124867
124928
  Runtime2["Deno20"] = "deno-2.0";
@@ -124951,6 +125012,9 @@ var Runtimes;
124951
125012
  Runtimes2["Pythonml311"] = "python-ml-3.11";
124952
125013
  Runtimes2["Pythonml312"] = "python-ml-3.12";
124953
125014
  Runtimes2["Pythonml313"] = "python-ml-3.13";
125015
+ Runtimes2["Deno121"] = "deno-1.21";
125016
+ Runtimes2["Deno124"] = "deno-1.24";
125017
+ Runtimes2["Deno135"] = "deno-1.35";
124954
125018
  Runtimes2["Deno140"] = "deno-1.40";
124955
125019
  Runtimes2["Deno146"] = "deno-1.46";
124956
125020
  Runtimes2["Deno20"] = "deno-2.0";
@@ -125091,6 +125155,10 @@ var AppwriteMigrationResource;
125091
125155
  AppwriteMigrationResource2["Function"] = "function";
125092
125156
  AppwriteMigrationResource2["Deployment"] = "deployment";
125093
125157
  AppwriteMigrationResource2["Environmentvariable"] = "environment-variable";
125158
+ AppwriteMigrationResource2["Provider"] = "provider";
125159
+ AppwriteMigrationResource2["Topic"] = "topic";
125160
+ AppwriteMigrationResource2["Subscriber"] = "subscriber";
125161
+ AppwriteMigrationResource2["Message"] = "message";
125094
125162
  AppwriteMigrationResource2["Site"] = "site";
125095
125163
  AppwriteMigrationResource2["Sitedeployment"] = "site-deployment";
125096
125164
  AppwriteMigrationResource2["Sitevariable"] = "site-variable";
@@ -125564,6 +125632,9 @@ var BuildRuntime;
125564
125632
  BuildRuntime2["Pythonml311"] = "python-ml-3.11";
125565
125633
  BuildRuntime2["Pythonml312"] = "python-ml-3.12";
125566
125634
  BuildRuntime2["Pythonml313"] = "python-ml-3.13";
125635
+ BuildRuntime2["Deno121"] = "deno-1.21";
125636
+ BuildRuntime2["Deno124"] = "deno-1.24";
125637
+ BuildRuntime2["Deno135"] = "deno-1.35";
125567
125638
  BuildRuntime2["Deno140"] = "deno-1.40";
125568
125639
  BuildRuntime2["Deno146"] = "deno-1.46";
125569
125640
  BuildRuntime2["Deno20"] = "deno-2.0";
@@ -125775,6 +125846,17 @@ var BillingPlanGroup;
125775
125846
  BillingPlanGroup2["Pro"] = "pro";
125776
125847
  BillingPlanGroup2["Scale"] = "scale";
125777
125848
  })(BillingPlanGroup || (BillingPlanGroup = {}));
125849
+ var DomainPurchasePaymentStatus;
125850
+ (function(DomainPurchasePaymentStatus2) {
125851
+ DomainPurchasePaymentStatus2["Pending"] = "pending";
125852
+ DomainPurchasePaymentStatus2["PendingConfirmation"] = "pending_confirmation";
125853
+ DomainPurchasePaymentStatus2["PendingPaymentProcessing"] = "pending_payment_processing";
125854
+ DomainPurchasePaymentStatus2["Authorized"] = "authorized";
125855
+ DomainPurchasePaymentStatus2["Captured"] = "captured";
125856
+ DomainPurchasePaymentStatus2["Failed"] = "failed";
125857
+ DomainPurchasePaymentStatus2["CaptureFailed"] = "capture_failed";
125858
+ DomainPurchasePaymentStatus2["RenewalCaptureFailed"] = "renewal_capture_failed";
125859
+ })(DomainPurchasePaymentStatus || (DomainPurchasePaymentStatus = {}));
125778
125860
  var DomainTransferStatusStatus;
125779
125861
  (function(DomainTransferStatusStatus2) {
125780
125862
  DomainTransferStatusStatus2["Transferrable"] = "transferrable";
@@ -126055,6 +126137,7 @@ var sdkForConsole = async (requiresAuth = true) => {
126055
126137
  );
126056
126138
  }
126057
126139
  client2.headers = {
126140
+ ...client2.headers,
126058
126141
  "x-sdk-name": "Command Line",
126059
126142
  "x-sdk-platform": "console",
126060
126143
  "x-sdk-language": "cli",
@@ -126077,6 +126160,7 @@ var sdkForProject = async () => {
126077
126160
  );
126078
126161
  }
126079
126162
  client2.headers = {
126163
+ ...client2.headers,
126080
126164
  "x-sdk-name": "Command Line",
126081
126165
  "x-sdk-platform": "console",
126082
126166
  "x-sdk-language": "cli",
@@ -126605,8 +126689,25 @@ var questionsCreateFunction = [
126605
126689
  },
126606
126690
  {
126607
126691
  type: "list",
126608
- name: "specification",
126609
- message: "What specification would you like to use?",
126692
+ name: "buildSpecification",
126693
+ message: "What build specification would you like to use?",
126694
+ choices: async () => {
126695
+ const response = await (await getFunctionsService()).listSpecifications();
126696
+ const specifications = response["specifications"];
126697
+ const choices = specifications.map((spec, _idx) => {
126698
+ return {
126699
+ name: `${spec.cpus} CPU, ${spec.memory}MB RAM`,
126700
+ value: spec.slug,
126701
+ disabled: spec.enabled === false ? "Upgrade to use" : false
126702
+ };
126703
+ });
126704
+ return choices;
126705
+ }
126706
+ },
126707
+ {
126708
+ type: "list",
126709
+ name: "runtimeSpecification",
126710
+ message: "What runtime specification would you like to use?",
126610
126711
  choices: async () => {
126611
126712
  const response = await (await getFunctionsService()).listSpecifications();
126612
126713
  const specifications = response["specifications"];
@@ -127225,8 +127326,25 @@ var questionsCreateSite = [
127225
127326
  },
127226
127327
  {
127227
127328
  type: "list",
127228
- name: "specification",
127229
- message: "What specification would you like to use?",
127329
+ name: "buildSpecification",
127330
+ message: "What build specification would you like to use?",
127331
+ choices: async () => {
127332
+ const response = await (await getSitesService()).listSpecifications();
127333
+ const specifications = response["specifications"];
127334
+ const choices = specifications.map((spec) => {
127335
+ return {
127336
+ name: `${spec.cpus} CPU, ${spec.memory}MB RAM`,
127337
+ value: spec.slug,
127338
+ disabled: spec.enabled === false ? "Upgrade to use" : false
127339
+ };
127340
+ });
127341
+ return choices;
127342
+ }
127343
+ },
127344
+ {
127345
+ type: "list",
127346
+ name: "runtimeSpecification",
127347
+ message: "What runtime specification would you like to use?",
127230
127348
  choices: async () => {
127231
127349
  const response = await (await getSitesService()).listSpecifications();
127232
127350
  const specifications = response["specifications"];
@@ -127425,6 +127543,15 @@ var Client3 = class _Client {
127425
127543
  globalConfig2.setCurrentSession("");
127426
127544
  globalConfig2.removeSession(current);
127427
127545
  }
127546
+ const isUnauthorized = json3.code === 401 && json3.type === "general_unauthorized_scope" && typeof json3.message === "string" && /role:\s*guests/i.test(json3.message);
127547
+ if (isUnauthorized) {
127548
+ throw new AppwriteException(
127549
+ `You are not authenticated. Run '${EXECUTABLE_NAME} login' to authenticate and try again.`,
127550
+ json3.code,
127551
+ json3.type,
127552
+ text2
127553
+ );
127554
+ }
127428
127555
  throw new AppwriteException(
127429
127556
  json3.message || text2,
127430
127557
  json3.code,
@@ -127898,6 +128025,7 @@ var ProjectNotInitializedError = class _ProjectNotInitializedError extends Error
127898
128025
 
127899
128026
  // lib/commands/utils/deployment.ts
127900
128027
  import fs4 from "fs";
128028
+ import os6 from "os";
127901
128029
  import path2 from "path";
127902
128030
 
127903
128031
  // node_modules/tar/dist/esm/index.min.js
@@ -130333,7 +130461,7 @@ var qt = class extends st {
130333
130461
  if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
130334
130462
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
130335
130463
  {
130336
- let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, i));
130464
+ let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, h.join("/")));
130337
130465
  if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
130338
130466
  }
130339
130467
  }
@@ -130808,7 +130936,7 @@ var wo = (s3) => {
130808
130936
  // lib/commands/utils/deployment.ts
130809
130937
  var POLL_DEBOUNCE = 2e3;
130810
130938
  async function packageDirectory(dirPath) {
130811
- const tempFile = `${dirPath.replace(/[^a-zA-Z0-9]/g, "_")}-${Date.now()}.tar.gz`;
130939
+ const tempFile = path2.join(os6.tmpdir(), `appwrite-deploy-${Date.now()}.tar.gz`);
130812
130940
  await zn(
130813
130941
  {
130814
130942
  gzip: true,
@@ -130817,11 +130945,28 @@ async function packageDirectory(dirPath) {
130817
130945
  },
130818
130946
  ["."]
130819
130947
  );
130820
- const buffer = fs4.readFileSync(tempFile);
130821
- fs4.unlinkSync(tempFile);
130822
- return new File([buffer], path2.basename(tempFile), {
130823
- type: "application/gzip"
130824
- });
130948
+ try {
130949
+ const buffer = fs4.readFileSync(tempFile);
130950
+ return new File([buffer], path2.basename(tempFile), {
130951
+ type: "application/gzip"
130952
+ });
130953
+ } finally {
130954
+ if (fs4.existsSync(tempFile)) {
130955
+ fs4.unlinkSync(tempFile);
130956
+ }
130957
+ }
130958
+ }
130959
+ async function resolveFileParam(filePath) {
130960
+ const resolved = path2.resolve(filePath);
130961
+ if (!fs4.existsSync(resolved)) {
130962
+ throw new Error(`File or directory not found: ${resolved}`);
130963
+ }
130964
+ const stat = fs4.statSync(resolved);
130965
+ if (stat.isDirectory()) {
130966
+ return packageDirectory(resolved);
130967
+ }
130968
+ const buffer = fs4.readFileSync(resolved);
130969
+ return new File([buffer], path2.basename(resolved));
130825
130970
  }
130826
130971
  async function downloadDeploymentCode(params) {
130827
130972
  const {
@@ -131216,7 +131361,9 @@ var Pull = class {
131216
131361
  timeout: func.timeout,
131217
131362
  commands: func.commands,
131218
131363
  scopes: func.scopes,
131219
- specification: func.specification
131364
+ buildSpecification: func.buildSpecification,
131365
+ runtimeSpecification: func.runtimeSpecification,
131366
+ deploymentRetention: func.deploymentRetention
131220
131367
  };
131221
131368
  result.push(functionConfig);
131222
131369
  if (!fs5.existsSync(absoluteFuncPath)) {
@@ -131298,7 +131445,10 @@ var Pull = class {
131298
131445
  buildCommand: site.buildCommand,
131299
131446
  outputDirectory: site.outputDirectory,
131300
131447
  fallbackFile: site.fallbackFile,
131301
- specification: site.specification
131448
+ startCommand: site.startCommand,
131449
+ buildSpecification: site.buildSpecification,
131450
+ runtimeSpecification: site.runtimeSpecification,
131451
+ deploymentRetention: site.deploymentRetention
131302
131452
  };
131303
131453
  result.push(siteConfig);
131304
131454
  if (!fs5.existsSync(absoluteSitePath)) {
@@ -132118,7 +132268,8 @@ Suggestion: It appears that git is not installed, try installing git then trying
132118
132268
  $id: functionId,
132119
132269
  name: answers.name,
132120
132270
  runtime: answers.runtime.id,
132121
- specification: answers.specification,
132271
+ buildSpecification: answers.buildSpecification,
132272
+ runtimeSpecification: answers.runtimeSpecification,
132122
132273
  execute: ["any"],
132123
132274
  events: [],
132124
132275
  scopes: ["users.read"],
@@ -132283,7 +132434,8 @@ Suggestion: It appears that git is not installed, try installing git then trying
132283
132434
  buildCommand: templateDetails.frameworks[0].buildCommand || "",
132284
132435
  outputDirectory: templateDetails.frameworks[0].outputDirectory || "",
132285
132436
  fallbackFile: templateDetails.frameworks[0].fallbackFile || "",
132286
- specification: answers.specification,
132437
+ buildSpecification: answers.buildSpecification,
132438
+ runtimeSpecification: answers.runtimeSpecification,
132287
132439
  enabled: true,
132288
132440
  timeout: 30,
132289
132441
  logging: true,
@@ -136471,7 +136623,9 @@ var Push = class {
136471
136623
  entrypoint: func.entrypoint,
136472
136624
  commands: func.commands,
136473
136625
  scopes: func.scopes,
136474
- specification: func.specification
136626
+ buildSpecification: func.buildSpecification,
136627
+ runtimeSpecification: func.runtimeSpecification,
136628
+ deploymentRetention: func.deploymentRetention
136475
136629
  });
136476
136630
  } catch (e) {
136477
136631
  if (Number(e.code) === 404) {
@@ -136500,7 +136654,9 @@ var Push = class {
136500
136654
  entrypoint: func.entrypoint,
136501
136655
  commands: func.commands,
136502
136656
  scopes: func.scopes,
136503
- specification: func.specification
136657
+ buildSpecification: func.buildSpecification,
136658
+ runtimeSpecification: func.runtimeSpecification,
136659
+ deploymentRetention: func.deploymentRetention
136504
136660
  });
136505
136661
  let domain2 = "";
136506
136662
  try {
@@ -136772,7 +136928,10 @@ var Push = class {
136772
136928
  outputDirectory: site.outputDirectory,
136773
136929
  buildRuntime: site.buildRuntime,
136774
136930
  adapter: site.adapter,
136775
- specification: site.specification
136931
+ startCommand: site.startCommand,
136932
+ buildSpecification: site.buildSpecification,
136933
+ runtimeSpecification: site.runtimeSpecification,
136934
+ deploymentRetention: site.deploymentRetention
136776
136935
  });
136777
136936
  } catch (e) {
136778
136937
  if (Number(e.code) === 404) {
@@ -136800,7 +136959,10 @@ var Push = class {
136800
136959
  outputDirectory: site.outputDirectory,
136801
136960
  buildRuntime: site.buildRuntime,
136802
136961
  adapter: site.adapter,
136803
- specification: site.specification
136962
+ startCommand: site.startCommand,
136963
+ buildSpecification: site.buildSpecification,
136964
+ runtimeSpecification: site.runtimeSpecification,
136965
+ deploymentRetention: site.deploymentRetention
136804
136966
  });
136805
136967
  let domain2 = "";
136806
136968
  try {
@@ -138965,7 +139127,7 @@ account.command(`delete-identity`).description(`Delete an identity by its unique
138965
139127
  async ({ identityId }) => parse3(await (await getAccountClient()).deleteIdentity(identityId))
138966
139128
  )
138967
139129
  );
138968
- 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(
139130
+ 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(
138969
139131
  actionRunner(
138970
139132
  async ({ queries }) => parse3(await (await getAccountClient()).listInvoices(queries))
138971
139133
  )
@@ -139987,9 +140149,9 @@ functions.command(`create`).description(`Create a new function. You can pass a l
139987
140149
  `--provider-silent-mode [value]`,
139988
140150
  `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.`,
139989
140151
  (value) => value === void 0 ? true : parseBool(value)
139990
- ).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(
140152
+ ).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(
139991
140153
  actionRunner(
139992
- 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))
140154
+ 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))
139993
140155
  )
139994
140156
  );
139995
140157
  functions.command(`list-runtimes`).description(`Get a list of all runtimes that are currently active on your instance.`).action(
@@ -140038,9 +140200,9 @@ functions.command(`update`).description(`Update function by its unique ID.`).req
140038
140200
  `--provider-silent-mode [value]`,
140039
140201
  `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.`,
140040
140202
  (value) => value === void 0 ? true : parseBool(value)
140041
- ).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(
140203
+ ).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(
140042
140204
  actionRunner(
140043
- 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))
140205
+ 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))
140044
140206
  )
140045
140207
  );
140046
140208
  functions.command(`delete`).description(`Delete a function by its unique ID.`).requiredOption(`--function-id <function-id>`, `Function ID.`).action(
@@ -140068,7 +140230,7 @@ This endpoint accepts a tar.gz file compressed with your code. Make sure to incl
140068
140230
 
140069
140231
  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(
140070
140232
  actionRunner(
140071
- async ({ functionId, code, activate, entrypoint, commands }) => parse3(await (await getFunctionsClient()).createDeployment(functionId, code, activate, entrypoint, commands))
140233
+ async ({ functionId, code, activate, entrypoint, commands }) => parse3(await (await getFunctionsClient()).createDeployment(functionId, code !== void 0 ? await resolveFileParam(code) : void 0, activate, entrypoint, commands))
140072
140234
  )
140073
140235
  );
140074
140236
  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(
@@ -141464,13 +141626,13 @@ sites.command(`create`).description(`Create a new site.`).requiredOption(`--site
141464
141626
  `--logging [value]`,
141465
141627
  `When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.`,
141466
141628
  (value) => value === void 0 ? true : parseBool(value)
141467
- ).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(
141629
+ ).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(
141468
141630
  `--provider-silent-mode [value]`,
141469
141631
  `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.`,
141470
141632
  (value) => value === void 0 ? true : parseBool(value)
141471
- ).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(
141633
+ ).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(
141472
141634
  actionRunner(
141473
- 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))
141635
+ 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))
141474
141636
  )
141475
141637
  );
141476
141638
  sites.command(`list-frameworks`).description(`Get a list of all frameworks that are currently available on the server instance.`).action(
@@ -141511,13 +141673,13 @@ sites.command(`update`).description(`Update site by its unique ID.`).requiredOpt
141511
141673
  `--logging [value]`,
141512
141674
  `When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.`,
141513
141675
  (value) => value === void 0 ? true : parseBool(value)
141514
- ).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(
141676
+ ).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(
141515
141677
  `--provider-silent-mode [value]`,
141516
141678
  `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.`,
141517
141679
  (value) => value === void 0 ? true : parseBool(value)
141518
- ).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(
141680
+ ).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(
141519
141681
  actionRunner(
141520
- 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))
141682
+ 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))
141521
141683
  )
141522
141684
  );
141523
141685
  sites.command(`delete`).description(`Delete a site by its unique ID.`).requiredOption(`--site-id <site-id>`, `Site ID.`).action(
@@ -141545,7 +141707,7 @@ sites.command(`create-deployment`).description(`Create a new site code deploymen
141545
141707
  (value) => value === void 0 ? true : parseBool(value)
141546
141708
  ).action(
141547
141709
  actionRunner(
141548
- async ({ siteId, code, installCommand, buildCommand, outputDirectory, activate }) => parse3(await (await getSitesClient()).createDeployment(siteId, code, installCommand, buildCommand, outputDirectory, activate))
141710
+ 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))
141549
141711
  )
141550
141712
  );
141551
141713
  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(
@@ -141759,7 +141921,7 @@ When the first request is sent, the server will return the **File** object, and
141759
141921
  If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.
141760
141922
  `).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(
141761
141923
  actionRunner(
141762
- async ({ bucketId, fileId, file: file2, permissions }) => parse3(await (await getStorageClient()).createFile(bucketId, fileId, file2, permissions))
141924
+ async ({ bucketId, fileId, file: file2, permissions }) => parse3(await (await getStorageClient()).createFile(bucketId, fileId, file2 !== void 0 ? await resolveFileParam(file2) : void 0, permissions))
141763
141925
  )
141764
141926
  );
141765
141927
  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(