appwrite-cli 13.5.0 → 13.6.1

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 (111) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +2 -2
  3. package/cli.ts +7 -5
  4. package/dist/bundle-win-arm64.mjs +988 -258
  5. package/dist/cli.cjs +988 -258
  6. package/dist/index.cjs +183 -112
  7. package/dist/index.js +183 -112
  8. package/dist/lib/commands/config-validations.d.ts +1 -1
  9. package/dist/lib/commands/config-validations.d.ts.map +1 -1
  10. package/dist/lib/commands/errors.d.ts +4 -4
  11. package/dist/lib/commands/errors.d.ts.map +1 -1
  12. package/dist/lib/commands/generate.d.ts.map +1 -1
  13. package/dist/lib/commands/generators/base.d.ts +5 -0
  14. package/dist/lib/commands/generators/base.d.ts.map +1 -1
  15. package/dist/lib/commands/generic.d.ts.map +1 -1
  16. package/dist/lib/commands/init.d.ts.map +1 -1
  17. package/dist/lib/commands/run.d.ts.map +1 -1
  18. package/dist/lib/commands/schema.d.ts.map +1 -1
  19. package/dist/lib/commands/services/activities.d.ts +3 -0
  20. package/dist/lib/commands/services/activities.d.ts.map +1 -0
  21. package/dist/lib/commands/services/backups.d.ts +3 -0
  22. package/dist/lib/commands/services/backups.d.ts.map +1 -0
  23. package/dist/lib/commands/types.d.ts.map +1 -1
  24. package/dist/lib/commands/update.d.ts.map +1 -1
  25. package/dist/lib/commands/utils/change-approval.d.ts +3 -3
  26. package/dist/lib/commands/utils/change-approval.d.ts.map +1 -1
  27. package/dist/lib/commands/utils/database-sync.d.ts.map +1 -1
  28. package/dist/lib/commands/utils/deployment.d.ts +16 -4
  29. package/dist/lib/commands/utils/deployment.d.ts.map +1 -1
  30. package/dist/lib/commands/utils/pools.d.ts.map +1 -1
  31. package/dist/lib/constants.d.ts +1 -1
  32. package/dist/lib/emulation/docker.d.ts.map +1 -1
  33. package/dist/lib/json.d.ts +1 -1
  34. package/dist/lib/json.d.ts.map +1 -1
  35. package/dist/lib/paginate.d.ts +5 -6
  36. package/dist/lib/paginate.d.ts.map +1 -1
  37. package/dist/lib/parser.d.ts +5 -4
  38. package/dist/lib/parser.d.ts.map +1 -1
  39. package/dist/lib/spinner.d.ts +1 -1
  40. package/dist/lib/spinner.d.ts.map +1 -1
  41. package/dist/lib/utils.d.ts +6 -1
  42. package/dist/lib/utils.d.ts.map +1 -1
  43. package/dist/lib/validations.d.ts +1 -1
  44. package/dist/lib/validations.d.ts.map +1 -1
  45. package/docs/examples/account/create-key.md +5 -0
  46. package/docs/examples/account/delete-key.md +4 -0
  47. package/docs/examples/account/get-key.md +4 -0
  48. package/docs/examples/account/list-keys.md +3 -0
  49. package/docs/examples/account/update-key.md +6 -0
  50. package/docs/examples/activities/get-event.md +4 -0
  51. package/docs/examples/activities/list-events.md +3 -0
  52. package/docs/examples/backups/create-archive.md +4 -0
  53. package/docs/examples/backups/create-policy.md +7 -0
  54. package/docs/examples/backups/create-restoration.md +5 -0
  55. package/docs/examples/backups/delete-archive.md +4 -0
  56. package/docs/examples/backups/delete-policy.md +4 -0
  57. package/docs/examples/backups/get-archive.md +4 -0
  58. package/docs/examples/backups/get-policy.md +4 -0
  59. package/docs/examples/backups/get-restoration.md +4 -0
  60. package/docs/examples/backups/list-archives.md +3 -0
  61. package/docs/examples/backups/list-policies.md +3 -0
  62. package/docs/examples/backups/list-restorations.md +3 -0
  63. package/docs/examples/backups/update-policy.md +4 -0
  64. package/eslint.config.js +45 -0
  65. package/install.ps1 +2 -2
  66. package/install.sh +1 -1
  67. package/lib/client.ts +3 -3
  68. package/lib/commands/config-validations.ts +1 -1
  69. package/lib/commands/config.ts +2 -2
  70. package/lib/commands/errors.ts +2 -2
  71. package/lib/commands/generate.ts +8 -6
  72. package/lib/commands/generators/base.ts +6 -0
  73. package/lib/commands/generators/typescript/databases.ts +9 -9
  74. package/lib/commands/generators/typescript/templates/databases.ts.hbs +16 -16
  75. package/lib/commands/generic.ts +21 -16
  76. package/lib/commands/init.ts +147 -61
  77. package/lib/commands/pull.ts +1 -1
  78. package/lib/commands/push.ts +19 -19
  79. package/lib/commands/run.ts +15 -9
  80. package/lib/commands/schema.ts +1 -3
  81. package/lib/commands/services/account.ts +234 -0
  82. package/lib/commands/services/activities.ts +51 -0
  83. package/lib/commands/services/backups.ts +184 -0
  84. package/lib/commands/services/health.ts +55 -0
  85. package/lib/commands/services/projects.ts +1 -1
  86. package/lib/commands/services/storage.ts +2 -2
  87. package/lib/commands/types.ts +18 -8
  88. package/lib/commands/update.ts +24 -16
  89. package/lib/commands/utils/attributes.ts +6 -6
  90. package/lib/commands/utils/change-approval.ts +26 -19
  91. package/lib/commands/utils/database-sync.ts +58 -18
  92. package/lib/commands/utils/deployment.ts +22 -5
  93. package/lib/commands/utils/pools.ts +11 -5
  94. package/lib/config.ts +1 -1
  95. package/lib/constants.ts +1 -1
  96. package/lib/emulation/docker.ts +5 -6
  97. package/lib/emulation/utils.ts +2 -2
  98. package/lib/json.ts +21 -8
  99. package/lib/paginate.ts +30 -20
  100. package/lib/parser.ts +46 -15
  101. package/lib/questions.ts +38 -38
  102. package/lib/spinner.ts +5 -1
  103. package/lib/utils.ts +15 -3
  104. package/lib/validations.ts +1 -1
  105. package/package.json +8 -2
  106. package/scoop/appwrite.config.json +3 -3
  107. package/dist/lib/commands/services/console.d.ts +0 -3
  108. package/dist/lib/commands/services/console.d.ts.map +0 -1
  109. package/docs/examples/console/get-resource.md +0 -5
  110. package/docs/examples/console/variables.md +0 -3
  111. package/lib/commands/services/console.ts +0 -49
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Change Log
2
2
 
3
+ ## 13.6.1
4
+
5
+ * Fix ESLind warnings in generated files with `appwrite generate` command.
6
+
7
+ ## 13.6.0
8
+
9
+ * Fix large double values (e.g. `1.7976931348623157e+308`) being expanded into huge integer literals.
10
+ * Added `activities` command with `list-events` and `get-event`.
11
+ * Added `backups` command with full support for archives, policies, and restorations.
12
+ * Added account billing commands (addresses, coupons, invoices).
13
+ * Added account API key management commands.
14
+ * Added account payment method management commands (including provider and mandate updates).
15
+
3
16
  ## 13.5.0
4
17
 
5
18
  * New: Added CLI commands under projects: `list-schedules`, `create-schedule`, and `get-schedule` for managing project schedules.
@@ -9,6 +22,7 @@
9
22
 
10
23
  * Add `--queries` option to `list-keys` command
11
24
  * Add `--key-id` option to `create-key` command
25
+ * Add support for the new `Backups` service
12
26
  * Add `encrypt` param support to new string type attributes
13
27
  * Fix `bignumber.js` bundler conflict by removing direct dependency in favor of transitive dependency from `json-bigint`
14
28
  * Fix missing region in console failUrl for failed deployments
package/README.md CHANGED
@@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using
29
29
 
30
30
  ```sh
31
31
  $ appwrite -v
32
- 13.5.0
32
+ 13.6.1
33
33
  ```
34
34
 
35
35
  ### Install using prebuilt binaries
@@ -60,7 +60,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
60
60
  Once the installation completes, you can verify your install using
61
61
  ```
62
62
  $ appwrite -v
63
- 13.5.0
63
+ 13.6.1
64
64
  ```
65
65
 
66
66
  ## Getting Started
package/cli.ts CHANGED
@@ -25,7 +25,8 @@ import { update } from './lib/commands/update.js';
25
25
  import { generate } from './lib/commands/generate.js';
26
26
 
27
27
  import { account } from './lib/commands/services/account.js';
28
- import { console } from './lib/commands/services/console.js';
28
+ import { activities } from './lib/commands/services/activities.js';
29
+ import { backups } from './lib/commands/services/backups.js';
29
30
  import { databases } from './lib/commands/services/databases.js';
30
31
  import { functions } from './lib/commands/services/functions.js';
31
32
  import { graphql } from './lib/commands/services/graphql.js';
@@ -73,7 +74,7 @@ async function checkVersion(): Promise<void> {
73
74
  // Current version is newer than latest (pre-release/dev)
74
75
  process.stdout.write(chalk.blue('\nšŸš€ You are running a pre-release or development version.') + '\n');
75
76
  }
76
- } catch (error) {
77
+ } catch (_error) {
77
78
  // Silently fail version check, just show current version
78
79
  process.stdout.write(chalk.gray('\n(Unable to check for updates)') + '\n');
79
80
  }
@@ -81,7 +82,7 @@ async function checkVersion(): Promise<void> {
81
82
 
82
83
  // Intercept version flag before Commander.js processes it
83
84
  if (process.argv.includes('-v') || process.argv.includes('--version')) {
84
- (async () => {
85
+ void (async () => {
85
86
  await checkVersion();
86
87
  process.exit(0);
87
88
  })();
@@ -118,7 +119,7 @@ if (process.argv.includes('-v') || process.argv.includes('--version')) {
118
119
  cliConfig.all = true;
119
120
  })
120
121
  .on('option:id', function () {
121
- cliConfig.ids = (this as any).opts().id;
122
+ cliConfig.ids = (this.opts().id as string[]);
122
123
  })
123
124
  .showSuggestionAfterError()
124
125
  .addCommand(whoami)
@@ -134,7 +135,8 @@ if (process.argv.includes('-v') || process.argv.includes('--version')) {
134
135
  .addCommand(generate)
135
136
  .addCommand(logout)
136
137
  .addCommand(account)
137
- .addCommand(console)
138
+ .addCommand(activities)
139
+ .addCommand(backups)
138
140
  .addCommand(databases)
139
141
  .addCommand(functions)
140
142
  .addCommand(graphql)