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/index.cjs CHANGED
@@ -102,7 +102,7 @@ var require_main = __commonJS({
102
102
  "node_modules/dotenv/lib/main.js"(exports2, module2) {
103
103
  var fs9 = require("fs");
104
104
  var path7 = require("path");
105
- var os5 = require("os");
105
+ var os6 = require("os");
106
106
  var crypto2 = require("crypto");
107
107
  var packageJson = require_package();
108
108
  var version2 = packageJson.version;
@@ -225,7 +225,7 @@ var require_main = __commonJS({
225
225
  return null;
226
226
  }
227
227
  function _resolveHome(envPath) {
228
- return envPath[0] === "~" ? path7.join(os5.homedir(), envPath.slice(1)) : envPath;
228
+ return envPath[0] === "~" ? path7.join(os6.homedir(), envPath.slice(1)) : envPath;
229
229
  }
230
230
  function _configVault(options) {
231
231
  const debug = Boolean(options && options.debug);
@@ -1505,7 +1505,7 @@ var require_has_flag = __commonJS({
1505
1505
  var require_supports_color = __commonJS({
1506
1506
  "node_modules/supports-color/index.js"(exports2, module2) {
1507
1507
  "use strict";
1508
- var os5 = require("os");
1508
+ var os6 = require("os");
1509
1509
  var tty = require("tty");
1510
1510
  var hasFlag = require_has_flag();
1511
1511
  var { env } = process;
@@ -1553,7 +1553,7 @@ var require_supports_color = __commonJS({
1553
1553
  return min;
1554
1554
  }
1555
1555
  if (process.platform === "win32") {
1556
- const osRelease = os5.release().split(".");
1556
+ const osRelease = os6.release().split(".");
1557
1557
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
1558
1558
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
1559
1559
  }
@@ -55545,7 +55545,7 @@ var require_has_flag2 = __commonJS({
55545
55545
  var require_supports_colors = __commonJS({
55546
55546
  "node_modules/@colors/colors/lib/system/supports-colors.js"(exports2, module2) {
55547
55547
  "use strict";
55548
- var os5 = require("os");
55548
+ var os6 = require("os");
55549
55549
  var hasFlag = require_has_flag2();
55550
55550
  var env = process.env;
55551
55551
  var forceColor = void 0;
@@ -55583,7 +55583,7 @@ var require_supports_colors = __commonJS({
55583
55583
  }
55584
55584
  var min = forceColor ? 1 : 0;
55585
55585
  if (process.platform === "win32") {
55586
- var osRelease = os5.release().split(".");
55586
+ var osRelease = os6.release().split(".");
55587
55587
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
55588
55588
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
55589
55589
  }
@@ -62747,7 +62747,7 @@ var id_default = ID;
62747
62747
  // lib/constants.ts
62748
62748
  var SDK_TITLE = "Appwrite";
62749
62749
  var SDK_TITLE_LOWER = "appwrite";
62750
- var SDK_VERSION = "14.0.1";
62750
+ var SDK_VERSION = "15.1.0";
62751
62751
  var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
62752
62752
  var EXECUTABLE_NAME = "appwrite";
62753
62753
  var NPM_PACKAGE_NAME = "appwrite-cli";
@@ -76739,7 +76739,10 @@ var SiteSchema = external_exports.object({
76739
76739
  buildCommand: external_exports.string().optional(),
76740
76740
  outputDirectory: external_exports.string().optional(),
76741
76741
  fallbackFile: external_exports.string().optional(),
76742
- specification: external_exports.string().optional(),
76742
+ buildSpecification: external_exports.string().optional(),
76743
+ runtimeSpecification: external_exports.string().optional(),
76744
+ deploymentRetention: external_exports.number().optional(),
76745
+ startCommand: external_exports.string().optional(),
76743
76746
  vars: external_exports.record(external_exports.string(), external_exports.string()).optional(),
76744
76747
  ignore: external_exports.string().optional()
76745
76748
  }).strict();
@@ -76751,7 +76754,9 @@ var FunctionSchema = external_exports.object({
76751
76754
  enabled: external_exports.boolean().optional(),
76752
76755
  logging: external_exports.boolean().optional(),
76753
76756
  runtime: external_exports.string(),
76754
- specification: external_exports.string().optional(),
76757
+ buildSpecification: external_exports.string().optional(),
76758
+ runtimeSpecification: external_exports.string().optional(),
76759
+ deploymentRetention: external_exports.number().optional(),
76755
76760
  scopes: external_exports.array(external_exports.string()).optional(),
76756
76761
  events: external_exports.array(external_exports.string()).optional(),
76757
76762
  schedule: external_exports.string().optional(),
@@ -78139,6 +78144,7 @@ async function paginate(action, args = {}, limit = 100, wrapper = "", queries =
78139
78144
 
78140
78145
  // lib/commands/utils/deployment.ts
78141
78146
  var import_fs6 = __toESM(require("fs"), 1);
78147
+ var import_os3 = __toESM(require("os"), 1);
78142
78148
  var import_path5 = __toESM(require("path"), 1);
78143
78149
 
78144
78150
  // node_modules/tar/dist/esm/index.min.js
@@ -80574,7 +80580,7 @@ var qt = class extends st {
80574
80580
  if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
80575
80581
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
80576
80582
  {
80577
- 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));
80583
+ 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("/")));
80578
80584
  if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
80579
80585
  }
80580
80586
  }
@@ -81232,7 +81238,7 @@ var Client = class _Client {
81232
81238
  "x-sdk-name": "Console",
81233
81239
  "x-sdk-platform": "console",
81234
81240
  "x-sdk-language": "web",
81235
- "x-sdk-version": "4.0.0",
81241
+ "x-sdk-version": "5.0.0",
81236
81242
  "X-Appwrite-Response-Format": "1.8.0"
81237
81243
  };
81238
81244
  this.realtime = {
@@ -81757,6 +81763,9 @@ var Client = class _Client {
81757
81763
  window.console.warn("Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint.");
81758
81764
  window.localStorage.setItem("cookieFallback", cookieFallback);
81759
81765
  }
81766
+ if (data && typeof data === "object") {
81767
+ data.toString = () => JSONbig.stringify(data);
81768
+ }
81760
81769
  return data;
81761
81770
  });
81762
81771
  }
@@ -85399,7 +85408,9 @@ var Functions = class {
85399
85408
  providerBranch: rest[13],
85400
85409
  providerSilentMode: rest[14],
85401
85410
  providerRootDirectory: rest[15],
85402
- specification: rest[16]
85411
+ buildSpecification: rest[16],
85412
+ runtimeSpecification: rest[17],
85413
+ deploymentRetention: rest[18]
85403
85414
  };
85404
85415
  }
85405
85416
  const functionId = params.functionId;
@@ -85419,7 +85430,9 @@ var Functions = class {
85419
85430
  const providerBranch = params.providerBranch;
85420
85431
  const providerSilentMode = params.providerSilentMode;
85421
85432
  const providerRootDirectory = params.providerRootDirectory;
85422
- const specification = params.specification;
85433
+ const buildSpecification = params.buildSpecification;
85434
+ const runtimeSpecification = params.runtimeSpecification;
85435
+ const deploymentRetention = params.deploymentRetention;
85423
85436
  if (typeof functionId === "undefined") {
85424
85437
  throw new AppwriteException('Missing required parameter: "functionId"');
85425
85438
  }
@@ -85482,8 +85495,14 @@ var Functions = class {
85482
85495
  if (typeof providerRootDirectory !== "undefined") {
85483
85496
  payload["providerRootDirectory"] = providerRootDirectory;
85484
85497
  }
85485
- if (typeof specification !== "undefined") {
85486
- payload["specification"] = specification;
85498
+ if (typeof buildSpecification !== "undefined") {
85499
+ payload["buildSpecification"] = buildSpecification;
85500
+ }
85501
+ if (typeof runtimeSpecification !== "undefined") {
85502
+ payload["runtimeSpecification"] = runtimeSpecification;
85503
+ }
85504
+ if (typeof deploymentRetention !== "undefined") {
85505
+ payload["deploymentRetention"] = deploymentRetention;
85487
85506
  }
85488
85507
  const uri = new URL(this.client.config.endpoint + apiPath);
85489
85508
  const apiHeaders = {
@@ -85636,7 +85655,9 @@ var Functions = class {
85636
85655
  providerBranch: rest[13],
85637
85656
  providerSilentMode: rest[14],
85638
85657
  providerRootDirectory: rest[15],
85639
- specification: rest[16]
85658
+ buildSpecification: rest[16],
85659
+ runtimeSpecification: rest[17],
85660
+ deploymentRetention: rest[18]
85640
85661
  };
85641
85662
  }
85642
85663
  const functionId = params.functionId;
@@ -85656,7 +85677,9 @@ var Functions = class {
85656
85677
  const providerBranch = params.providerBranch;
85657
85678
  const providerSilentMode = params.providerSilentMode;
85658
85679
  const providerRootDirectory = params.providerRootDirectory;
85659
- const specification = params.specification;
85680
+ const buildSpecification = params.buildSpecification;
85681
+ const runtimeSpecification = params.runtimeSpecification;
85682
+ const deploymentRetention = params.deploymentRetention;
85660
85683
  if (typeof functionId === "undefined") {
85661
85684
  throw new AppwriteException('Missing required parameter: "functionId"');
85662
85685
  }
@@ -85713,8 +85736,14 @@ var Functions = class {
85713
85736
  if (typeof providerRootDirectory !== "undefined") {
85714
85737
  payload["providerRootDirectory"] = providerRootDirectory;
85715
85738
  }
85716
- if (typeof specification !== "undefined") {
85717
- payload["specification"] = specification;
85739
+ if (typeof buildSpecification !== "undefined") {
85740
+ payload["buildSpecification"] = buildSpecification;
85741
+ }
85742
+ if (typeof runtimeSpecification !== "undefined") {
85743
+ payload["runtimeSpecification"] = runtimeSpecification;
85744
+ }
85745
+ if (typeof deploymentRetention !== "undefined") {
85746
+ payload["deploymentRetention"] = deploymentRetention;
85718
85747
  }
85719
85748
  const uri = new URL(this.client.config.endpoint + apiPath);
85720
85749
  const apiHeaders = {
@@ -93147,15 +93176,18 @@ var Sites = class {
93147
93176
  timeout: rest[5],
93148
93177
  installCommand: rest[6],
93149
93178
  buildCommand: rest[7],
93150
- outputDirectory: rest[8],
93151
- adapter: rest[9],
93152
- installationId: rest[10],
93153
- fallbackFile: rest[11],
93154
- providerRepositoryId: rest[12],
93155
- providerBranch: rest[13],
93156
- providerSilentMode: rest[14],
93157
- providerRootDirectory: rest[15],
93158
- specification: rest[16]
93179
+ startCommand: rest[8],
93180
+ outputDirectory: rest[9],
93181
+ adapter: rest[10],
93182
+ installationId: rest[11],
93183
+ fallbackFile: rest[12],
93184
+ providerRepositoryId: rest[13],
93185
+ providerBranch: rest[14],
93186
+ providerSilentMode: rest[15],
93187
+ providerRootDirectory: rest[16],
93188
+ buildSpecification: rest[17],
93189
+ runtimeSpecification: rest[18],
93190
+ deploymentRetention: rest[19]
93159
93191
  };
93160
93192
  }
93161
93193
  const siteId = params.siteId;
@@ -93167,6 +93199,7 @@ var Sites = class {
93167
93199
  const timeout = params.timeout;
93168
93200
  const installCommand = params.installCommand;
93169
93201
  const buildCommand = params.buildCommand;
93202
+ const startCommand = params.startCommand;
93170
93203
  const outputDirectory = params.outputDirectory;
93171
93204
  const adapter = params.adapter;
93172
93205
  const installationId = params.installationId;
@@ -93175,7 +93208,9 @@ var Sites = class {
93175
93208
  const providerBranch = params.providerBranch;
93176
93209
  const providerSilentMode = params.providerSilentMode;
93177
93210
  const providerRootDirectory = params.providerRootDirectory;
93178
- const specification = params.specification;
93211
+ const buildSpecification = params.buildSpecification;
93212
+ const runtimeSpecification = params.runtimeSpecification;
93213
+ const deploymentRetention = params.deploymentRetention;
93179
93214
  if (typeof siteId === "undefined") {
93180
93215
  throw new AppwriteException('Missing required parameter: "siteId"');
93181
93216
  }
@@ -93214,6 +93249,9 @@ var Sites = class {
93214
93249
  if (typeof buildCommand !== "undefined") {
93215
93250
  payload["buildCommand"] = buildCommand;
93216
93251
  }
93252
+ if (typeof startCommand !== "undefined") {
93253
+ payload["startCommand"] = startCommand;
93254
+ }
93217
93255
  if (typeof outputDirectory !== "undefined") {
93218
93256
  payload["outputDirectory"] = outputDirectory;
93219
93257
  }
@@ -93241,8 +93279,14 @@ var Sites = class {
93241
93279
  if (typeof providerRootDirectory !== "undefined") {
93242
93280
  payload["providerRootDirectory"] = providerRootDirectory;
93243
93281
  }
93244
- if (typeof specification !== "undefined") {
93245
- payload["specification"] = specification;
93282
+ if (typeof buildSpecification !== "undefined") {
93283
+ payload["buildSpecification"] = buildSpecification;
93284
+ }
93285
+ if (typeof runtimeSpecification !== "undefined") {
93286
+ payload["runtimeSpecification"] = runtimeSpecification;
93287
+ }
93288
+ if (typeof deploymentRetention !== "undefined") {
93289
+ payload["deploymentRetention"] = deploymentRetention;
93246
93290
  }
93247
93291
  const uri = new URL(this.client.config.endpoint + apiPath);
93248
93292
  const apiHeaders = {
@@ -93381,16 +93425,19 @@ var Sites = class {
93381
93425
  timeout: rest[4],
93382
93426
  installCommand: rest[5],
93383
93427
  buildCommand: rest[6],
93384
- outputDirectory: rest[7],
93385
- buildRuntime: rest[8],
93386
- adapter: rest[9],
93387
- fallbackFile: rest[10],
93388
- installationId: rest[11],
93389
- providerRepositoryId: rest[12],
93390
- providerBranch: rest[13],
93391
- providerSilentMode: rest[14],
93392
- providerRootDirectory: rest[15],
93393
- specification: rest[16]
93428
+ startCommand: rest[7],
93429
+ outputDirectory: rest[8],
93430
+ buildRuntime: rest[9],
93431
+ adapter: rest[10],
93432
+ fallbackFile: rest[11],
93433
+ installationId: rest[12],
93434
+ providerRepositoryId: rest[13],
93435
+ providerBranch: rest[14],
93436
+ providerSilentMode: rest[15],
93437
+ providerRootDirectory: rest[16],
93438
+ buildSpecification: rest[17],
93439
+ runtimeSpecification: rest[18],
93440
+ deploymentRetention: rest[19]
93394
93441
  };
93395
93442
  }
93396
93443
  const siteId = params.siteId;
@@ -93401,6 +93448,7 @@ var Sites = class {
93401
93448
  const timeout = params.timeout;
93402
93449
  const installCommand = params.installCommand;
93403
93450
  const buildCommand = params.buildCommand;
93451
+ const startCommand = params.startCommand;
93404
93452
  const outputDirectory = params.outputDirectory;
93405
93453
  const buildRuntime = params.buildRuntime;
93406
93454
  const adapter = params.adapter;
@@ -93410,7 +93458,9 @@ var Sites = class {
93410
93458
  const providerBranch = params.providerBranch;
93411
93459
  const providerSilentMode = params.providerSilentMode;
93412
93460
  const providerRootDirectory = params.providerRootDirectory;
93413
- const specification = params.specification;
93461
+ const buildSpecification = params.buildSpecification;
93462
+ const runtimeSpecification = params.runtimeSpecification;
93463
+ const deploymentRetention = params.deploymentRetention;
93414
93464
  if (typeof siteId === "undefined") {
93415
93465
  throw new AppwriteException('Missing required parameter: "siteId"');
93416
93466
  }
@@ -93443,6 +93493,9 @@ var Sites = class {
93443
93493
  if (typeof buildCommand !== "undefined") {
93444
93494
  payload["buildCommand"] = buildCommand;
93445
93495
  }
93496
+ if (typeof startCommand !== "undefined") {
93497
+ payload["startCommand"] = startCommand;
93498
+ }
93446
93499
  if (typeof outputDirectory !== "undefined") {
93447
93500
  payload["outputDirectory"] = outputDirectory;
93448
93501
  }
@@ -93470,8 +93523,14 @@ var Sites = class {
93470
93523
  if (typeof providerRootDirectory !== "undefined") {
93471
93524
  payload["providerRootDirectory"] = providerRootDirectory;
93472
93525
  }
93473
- if (typeof specification !== "undefined") {
93474
- payload["specification"] = specification;
93526
+ if (typeof buildSpecification !== "undefined") {
93527
+ payload["buildSpecification"] = buildSpecification;
93528
+ }
93529
+ if (typeof runtimeSpecification !== "undefined") {
93530
+ payload["runtimeSpecification"] = runtimeSpecification;
93531
+ }
93532
+ if (typeof deploymentRetention !== "undefined") {
93533
+ payload["deploymentRetention"] = deploymentRetention;
93475
93534
  }
93476
93535
  const uri = new URL(this.client.config.endpoint + apiPath);
93477
93536
  const apiHeaders = {
@@ -99459,6 +99518,9 @@ var Runtime;
99459
99518
  Runtime2["Pythonml311"] = "python-ml-3.11";
99460
99519
  Runtime2["Pythonml312"] = "python-ml-3.12";
99461
99520
  Runtime2["Pythonml313"] = "python-ml-3.13";
99521
+ Runtime2["Deno121"] = "deno-1.21";
99522
+ Runtime2["Deno124"] = "deno-1.24";
99523
+ Runtime2["Deno135"] = "deno-1.35";
99462
99524
  Runtime2["Deno140"] = "deno-1.40";
99463
99525
  Runtime2["Deno146"] = "deno-1.46";
99464
99526
  Runtime2["Deno20"] = "deno-2.0";
@@ -99548,6 +99610,9 @@ var Runtimes;
99548
99610
  Runtimes2["Pythonml311"] = "python-ml-3.11";
99549
99611
  Runtimes2["Pythonml312"] = "python-ml-3.12";
99550
99612
  Runtimes2["Pythonml313"] = "python-ml-3.13";
99613
+ Runtimes2["Deno121"] = "deno-1.21";
99614
+ Runtimes2["Deno124"] = "deno-1.24";
99615
+ Runtimes2["Deno135"] = "deno-1.35";
99551
99616
  Runtimes2["Deno140"] = "deno-1.40";
99552
99617
  Runtimes2["Deno146"] = "deno-1.46";
99553
99618
  Runtimes2["Deno20"] = "deno-2.0";
@@ -99688,6 +99753,10 @@ var AppwriteMigrationResource;
99688
99753
  AppwriteMigrationResource2["Function"] = "function";
99689
99754
  AppwriteMigrationResource2["Deployment"] = "deployment";
99690
99755
  AppwriteMigrationResource2["Environmentvariable"] = "environment-variable";
99756
+ AppwriteMigrationResource2["Provider"] = "provider";
99757
+ AppwriteMigrationResource2["Topic"] = "topic";
99758
+ AppwriteMigrationResource2["Subscriber"] = "subscriber";
99759
+ AppwriteMigrationResource2["Message"] = "message";
99691
99760
  AppwriteMigrationResource2["Site"] = "site";
99692
99761
  AppwriteMigrationResource2["Sitedeployment"] = "site-deployment";
99693
99762
  AppwriteMigrationResource2["Sitevariable"] = "site-variable";
@@ -100161,6 +100230,9 @@ var BuildRuntime;
100161
100230
  BuildRuntime2["Pythonml311"] = "python-ml-3.11";
100162
100231
  BuildRuntime2["Pythonml312"] = "python-ml-3.12";
100163
100232
  BuildRuntime2["Pythonml313"] = "python-ml-3.13";
100233
+ BuildRuntime2["Deno121"] = "deno-1.21";
100234
+ BuildRuntime2["Deno124"] = "deno-1.24";
100235
+ BuildRuntime2["Deno135"] = "deno-1.35";
100164
100236
  BuildRuntime2["Deno140"] = "deno-1.40";
100165
100237
  BuildRuntime2["Deno146"] = "deno-1.46";
100166
100238
  BuildRuntime2["Deno20"] = "deno-2.0";
@@ -100372,6 +100444,17 @@ var BillingPlanGroup;
100372
100444
  BillingPlanGroup2["Pro"] = "pro";
100373
100445
  BillingPlanGroup2["Scale"] = "scale";
100374
100446
  })(BillingPlanGroup || (BillingPlanGroup = {}));
100447
+ var DomainPurchasePaymentStatus;
100448
+ (function(DomainPurchasePaymentStatus2) {
100449
+ DomainPurchasePaymentStatus2["Pending"] = "pending";
100450
+ DomainPurchasePaymentStatus2["PendingConfirmation"] = "pending_confirmation";
100451
+ DomainPurchasePaymentStatus2["PendingPaymentProcessing"] = "pending_payment_processing";
100452
+ DomainPurchasePaymentStatus2["Authorized"] = "authorized";
100453
+ DomainPurchasePaymentStatus2["Captured"] = "captured";
100454
+ DomainPurchasePaymentStatus2["Failed"] = "failed";
100455
+ DomainPurchasePaymentStatus2["CaptureFailed"] = "capture_failed";
100456
+ DomainPurchasePaymentStatus2["RenewalCaptureFailed"] = "renewal_capture_failed";
100457
+ })(DomainPurchasePaymentStatus || (DomainPurchasePaymentStatus = {}));
100375
100458
  var DomainTransferStatusStatus;
100376
100459
  (function(DomainTransferStatusStatus2) {
100377
100460
  DomainTransferStatusStatus2["Transferrable"] = "transferrable";
@@ -100394,7 +100477,7 @@ var package_default = {
100394
100477
  type: "module",
100395
100478
  homepage: "https://appwrite.io/support",
100396
100479
  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",
100397
- version: "14.0.1",
100480
+ version: "15.1.0",
100398
100481
  license: "BSD-3-Clause",
100399
100482
  main: "dist/index.cjs",
100400
100483
  module: "dist/index.js",
@@ -100438,7 +100521,7 @@ var package_default = {
100438
100521
  "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"
100439
100522
  },
100440
100523
  dependencies: {
100441
- "@appwrite.io/console": "^4.0.0",
100524
+ "@appwrite.io/console": "^5.0.0",
100442
100525
  chalk: "4.1.2",
100443
100526
  chokidar: "^3.6.0",
100444
100527
  "cli-progress": "^3.12.0",
@@ -100695,7 +100778,7 @@ var commandDescriptions = {
100695
100778
  // lib/commands/utils/deployment.ts
100696
100779
  var POLL_DEBOUNCE = 2e3;
100697
100780
  async function packageDirectory(dirPath) {
100698
- const tempFile = `${dirPath.replace(/[^a-zA-Z0-9]/g, "_")}-${Date.now()}.tar.gz`;
100781
+ const tempFile = import_path5.default.join(import_os3.default.tmpdir(), `appwrite-deploy-${Date.now()}.tar.gz`);
100699
100782
  await zn(
100700
100783
  {
100701
100784
  gzip: true,
@@ -100704,11 +100787,16 @@ async function packageDirectory(dirPath) {
100704
100787
  },
100705
100788
  ["."]
100706
100789
  );
100707
- const buffer = import_fs6.default.readFileSync(tempFile);
100708
- import_fs6.default.unlinkSync(tempFile);
100709
- return new File([buffer], import_path5.default.basename(tempFile), {
100710
- type: "application/gzip"
100711
- });
100790
+ try {
100791
+ const buffer = import_fs6.default.readFileSync(tempFile);
100792
+ return new File([buffer], import_path5.default.basename(tempFile), {
100793
+ type: "application/gzip"
100794
+ });
100795
+ } finally {
100796
+ if (import_fs6.default.existsSync(tempFile)) {
100797
+ import_fs6.default.unlinkSync(tempFile);
100798
+ }
100799
+ }
100712
100800
  }
100713
100801
  async function downloadDeploymentCode(params) {
100714
100802
  const {
@@ -100819,7 +100907,7 @@ async function pushDeployment(params) {
100819
100907
  var import_chalk3 = __toESM(require_source(), 1);
100820
100908
 
100821
100909
  // lib/sdks.ts
100822
- var import_os3 = __toESM(require("os"), 1);
100910
+ var import_os4 = __toESM(require("os"), 1);
100823
100911
  var sdkForConsole = async (requiresAuth = true) => {
100824
100912
  const client = new Client();
100825
100913
  const endpoint = globalConfig2.getEndpoint() || DEFAULT_ENDPOINT;
@@ -100831,11 +100919,12 @@ var sdkForConsole = async (requiresAuth = true) => {
100831
100919
  );
100832
100920
  }
100833
100921
  client.headers = {
100922
+ ...client.headers,
100834
100923
  "x-sdk-name": "Command Line",
100835
100924
  "x-sdk-platform": "console",
100836
100925
  "x-sdk-language": "cli",
100837
100926
  "x-sdk-version": SDK_VERSION,
100838
- "user-agent": `AppwriteCLI/${SDK_VERSION} (${import_os3.default.type()} ${import_os3.default.version()}; ${import_os3.default.arch()})`
100927
+ "user-agent": `AppwriteCLI/${SDK_VERSION} (${import_os4.default.type()} ${import_os4.default.version()}; ${import_os4.default.arch()})`
100839
100928
  };
100840
100929
  client.setEndpoint(endpoint).setProject("console").setCookie(cookie).setSelfSigned(selfSigned).setLocale("en-US");
100841
100930
  return client;
@@ -100853,11 +100942,12 @@ var sdkForProject = async () => {
100853
100942
  );
100854
100943
  }
100855
100944
  client.headers = {
100945
+ ...client.headers,
100856
100946
  "x-sdk-name": "Command Line",
100857
100947
  "x-sdk-platform": "console",
100858
100948
  "x-sdk-language": "cli",
100859
100949
  "x-sdk-version": SDK_VERSION,
100860
- "user-agent": `AppwriteCLI/${SDK_VERSION} (${import_os3.default.type()} ${import_os3.default.version()}; ${import_os3.default.arch()})`
100950
+ "user-agent": `AppwriteCLI/${SDK_VERSION} (${import_os4.default.type()} ${import_os4.default.version()}; ${import_os4.default.arch()})`
100861
100951
  };
100862
100952
  client.setEndpoint(endpoint).setProject(project).setSelfSigned(selfSigned).setLocale("en-US");
100863
100953
  if (cookie) {
@@ -103018,7 +103108,9 @@ var Push = class {
103018
103108
  entrypoint: func.entrypoint,
103019
103109
  commands: func.commands,
103020
103110
  scopes: func.scopes,
103021
- specification: func.specification
103111
+ buildSpecification: func.buildSpecification,
103112
+ runtimeSpecification: func.runtimeSpecification,
103113
+ deploymentRetention: func.deploymentRetention
103022
103114
  });
103023
103115
  } catch (e) {
103024
103116
  if (Number(e.code) === 404) {
@@ -103047,7 +103139,9 @@ var Push = class {
103047
103139
  entrypoint: func.entrypoint,
103048
103140
  commands: func.commands,
103049
103141
  scopes: func.scopes,
103050
- specification: func.specification
103142
+ buildSpecification: func.buildSpecification,
103143
+ runtimeSpecification: func.runtimeSpecification,
103144
+ deploymentRetention: func.deploymentRetention
103051
103145
  });
103052
103146
  let domain2 = "";
103053
103147
  try {
@@ -103319,7 +103413,10 @@ var Push = class {
103319
103413
  outputDirectory: site.outputDirectory,
103320
103414
  buildRuntime: site.buildRuntime,
103321
103415
  adapter: site.adapter,
103322
- specification: site.specification
103416
+ startCommand: site.startCommand,
103417
+ buildSpecification: site.buildSpecification,
103418
+ runtimeSpecification: site.runtimeSpecification,
103419
+ deploymentRetention: site.deploymentRetention
103323
103420
  });
103324
103421
  } catch (e) {
103325
103422
  if (Number(e.code) === 404) {
@@ -103347,7 +103444,10 @@ var Push = class {
103347
103444
  outputDirectory: site.outputDirectory,
103348
103445
  buildRuntime: site.buildRuntime,
103349
103446
  adapter: site.adapter,
103350
- specification: site.specification
103447
+ startCommand: site.startCommand,
103448
+ buildSpecification: site.buildSpecification,
103449
+ runtimeSpecification: site.runtimeSpecification,
103450
+ deploymentRetention: site.deploymentRetention
103351
103451
  });
103352
103452
  let domain2 = "";
103353
103453
  try {
@@ -104783,7 +104883,9 @@ var Pull = class {
104783
104883
  timeout: func.timeout,
104784
104884
  commands: func.commands,
104785
104885
  scopes: func.scopes,
104786
- specification: func.specification
104886
+ buildSpecification: func.buildSpecification,
104887
+ runtimeSpecification: func.runtimeSpecification,
104888
+ deploymentRetention: func.deploymentRetention
104787
104889
  };
104788
104890
  result.push(functionConfig);
104789
104891
  if (!import_fs8.default.existsSync(absoluteFuncPath)) {
@@ -104865,7 +104967,10 @@ var Pull = class {
104865
104967
  buildCommand: site.buildCommand,
104866
104968
  outputDirectory: site.outputDirectory,
104867
104969
  fallbackFile: site.fallbackFile,
104868
- specification: site.specification
104970
+ startCommand: site.startCommand,
104971
+ buildSpecification: site.buildSpecification,
104972
+ runtimeSpecification: site.runtimeSpecification,
104973
+ deploymentRetention: site.deploymentRetention
104869
104974
  };
104870
104975
  result.push(siteConfig);
104871
104976
  if (!import_fs8.default.existsSync(absoluteSitePath)) {