appwrite-cli 13.6.0 → 14.0.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 (92) hide show
  1. package/.github/workflows/ci.yml +66 -0
  2. package/CHANGELOG.md +14 -0
  3. package/README.md +2 -2
  4. package/cli.ts +3 -3
  5. package/dist/bundle-win-arm64.mjs +608 -310
  6. package/dist/cli.cjs +608 -310
  7. package/dist/index.cjs +354 -183
  8. package/dist/index.js +354 -183
  9. package/dist/lib/commands/config-validations.d.ts +1 -1
  10. package/dist/lib/commands/config-validations.d.ts.map +1 -1
  11. package/dist/lib/commands/errors.d.ts +4 -4
  12. package/dist/lib/commands/errors.d.ts.map +1 -1
  13. package/dist/lib/commands/generate.d.ts +2 -0
  14. package/dist/lib/commands/generate.d.ts.map +1 -1
  15. package/dist/lib/commands/generators/base.d.ts +25 -2
  16. package/dist/lib/commands/generators/base.d.ts.map +1 -1
  17. package/dist/lib/commands/generators/index.d.ts +1 -1
  18. package/dist/lib/commands/generators/index.d.ts.map +1 -1
  19. package/dist/lib/commands/generators/typescript/databases.d.ts +2 -2
  20. package/dist/lib/commands/generators/typescript/databases.d.ts.map +1 -1
  21. package/dist/lib/commands/generic.d.ts.map +1 -1
  22. package/dist/lib/commands/init.d.ts.map +1 -1
  23. package/dist/lib/commands/run.d.ts.map +1 -1
  24. package/dist/lib/commands/types.d.ts.map +1 -1
  25. package/dist/lib/commands/update.d.ts.map +1 -1
  26. package/dist/lib/commands/utils/change-approval.d.ts +3 -3
  27. package/dist/lib/commands/utils/change-approval.d.ts.map +1 -1
  28. package/dist/lib/commands/utils/database-sync.d.ts.map +1 -1
  29. package/dist/lib/commands/utils/deployment.d.ts +16 -4
  30. package/dist/lib/commands/utils/deployment.d.ts.map +1 -1
  31. package/dist/lib/commands/utils/pools.d.ts.map +1 -1
  32. package/dist/lib/constants.d.ts +1 -1
  33. package/dist/lib/emulation/docker.d.ts.map +1 -1
  34. package/dist/lib/json.d.ts +1 -1
  35. package/dist/lib/json.d.ts.map +1 -1
  36. package/dist/lib/paginate.d.ts +5 -6
  37. package/dist/lib/paginate.d.ts.map +1 -1
  38. package/dist/lib/parser.d.ts +5 -4
  39. package/dist/lib/parser.d.ts.map +1 -1
  40. package/dist/lib/spinner.d.ts +1 -1
  41. package/dist/lib/spinner.d.ts.map +1 -1
  42. package/dist/lib/utils.d.ts +6 -1
  43. package/dist/lib/utils.d.ts.map +1 -1
  44. package/dist/lib/validations.d.ts +1 -1
  45. package/dist/lib/validations.d.ts.map +1 -1
  46. package/docs/examples/projects/update-status.md +5 -0
  47. package/docs/examples/sites/create-deployment.md +1 -2
  48. package/eslint.config.js +45 -0
  49. package/install.ps1 +2 -2
  50. package/install.sh +1 -1
  51. package/lib/client.ts +3 -3
  52. package/lib/commands/config-validations.ts +1 -1
  53. package/lib/commands/config.ts +2 -2
  54. package/lib/commands/errors.ts +2 -2
  55. package/lib/commands/generate.ts +23 -8
  56. package/lib/commands/generators/base.ts +33 -2
  57. package/lib/commands/generators/index.ts +1 -0
  58. package/lib/commands/generators/typescript/databases.ts +31 -21
  59. package/lib/commands/generators/typescript/templates/databases.ts.hbs +16 -16
  60. package/lib/commands/generic.ts +21 -16
  61. package/lib/commands/init.ts +147 -61
  62. package/lib/commands/pull.ts +1 -1
  63. package/lib/commands/push.ts +19 -19
  64. package/lib/commands/run.ts +15 -9
  65. package/lib/commands/services/account.ts +1 -1
  66. package/lib/commands/services/databases.ts +20 -19
  67. package/lib/commands/services/health.ts +13 -0
  68. package/lib/commands/services/messaging.ts +1 -1
  69. package/lib/commands/services/projects.ts +25 -0
  70. package/lib/commands/services/sites.ts +8 -3
  71. package/lib/commands/services/tables-db.ts +3 -2
  72. package/lib/commands/services/teams.ts +2 -2
  73. package/lib/commands/types.ts +18 -8
  74. package/lib/commands/update.ts +24 -16
  75. package/lib/commands/utils/attributes.ts +6 -6
  76. package/lib/commands/utils/change-approval.ts +26 -19
  77. package/lib/commands/utils/database-sync.ts +58 -18
  78. package/lib/commands/utils/deployment.ts +22 -5
  79. package/lib/commands/utils/pools.ts +11 -5
  80. package/lib/config.ts +1 -1
  81. package/lib/constants.ts +1 -1
  82. package/lib/emulation/docker.ts +5 -6
  83. package/lib/emulation/utils.ts +2 -2
  84. package/lib/json.ts +15 -7
  85. package/lib/paginate.ts +30 -20
  86. package/lib/parser.ts +46 -15
  87. package/lib/questions.ts +38 -38
  88. package/lib/spinner.ts +5 -1
  89. package/lib/utils.ts +15 -3
  90. package/lib/validations.ts +1 -1
  91. package/package.json +8 -2
  92. package/scoop/appwrite.config.json +3 -3
@@ -0,0 +1,66 @@
1
+ name: CI
2
+
3
+ concurrency:
4
+ group: ${{ github.workflow }}-${{ github.ref }}
5
+ cancel-in-progress: true
6
+
7
+ on:
8
+ pull_request:
9
+ push:
10
+ branches:
11
+ - master
12
+ workflow_dispatch:
13
+
14
+ jobs:
15
+ build-validation:
16
+ name: Build Validation
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - name: Checkout repository
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Setup Node.js
24
+ uses: actions/setup-node@v4
25
+ with:
26
+ node-version: "20"
27
+
28
+ - name: Setup Bun
29
+ uses: oven-sh/setup-bun@v2
30
+ with:
31
+ bun-version: "latest"
32
+
33
+ - name: Install Node dependencies
34
+ run: npm install
35
+
36
+ - name: Build project
37
+ run: npm run build
38
+
39
+ - name: Verify CLI runs with Node
40
+ run: node dist/cli.cjs -v
41
+
42
+ - name: Verify npm package can be built
43
+ run: npm pack
44
+
45
+ - name: Install dependencies
46
+ run: bun install
47
+
48
+ - name: Build all platform binaries
49
+ run: |
50
+ rm -rf build
51
+ mkdir -p build
52
+ bun run linux-x64
53
+ bun run linux-arm64
54
+ bun run windows-x64
55
+ bun run windows-arm64
56
+ bun run mac-x64
57
+ bun run mac-arm64
58
+
59
+ - name: Verify generated binaries
60
+ run: |
61
+ test -s build/appwrite-cli-linux-x64
62
+ test -s build/appwrite-cli-linux-arm64
63
+ test -s build/appwrite-cli-win-x64.exe
64
+ test -s build/appwrite-cli-win-arm64.exe
65
+ test -s build/appwrite-cli-darwin-x64
66
+ test -s build/appwrite-cli-darwin-arm64
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Change Log
2
2
 
3
+ ## 14.0.0
4
+
5
+ * Breaking: Changed createDeployment signature; activate option now optional with default true; parameter order updated
6
+ * Added TTL option for cached query results in listDocuments and listRows
7
+ * Added get-console-pausing health status command
8
+ * Added project management commands: update-console-access and update-status
9
+ * Updated site deployment docs to reflect new activate option
10
+ * Updated role length limit for teams to 81 characters
11
+ * Added appwriteImportSource and importExtension options to code generator
12
+
13
+ ## 13.6.1
14
+
15
+ * Fix ESLind warnings in generated files with `appwrite generate` command.
16
+
3
17
  ## 13.6.0
4
18
 
5
19
  * Fix large double values (e.g. `1.7976931348623157e+308`) being expanded into huge integer literals.
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.6.0
32
+ 14.0.0
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.6.0
63
+ 14.0.0
64
64
  ```
65
65
 
66
66
  ## Getting Started
package/cli.ts CHANGED
@@ -74,7 +74,7 @@ async function checkVersion(): Promise<void> {
74
74
  // Current version is newer than latest (pre-release/dev)
75
75
  process.stdout.write(chalk.blue('\nšŸš€ You are running a pre-release or development version.') + '\n');
76
76
  }
77
- } catch (error) {
77
+ } catch (_error) {
78
78
  // Silently fail version check, just show current version
79
79
  process.stdout.write(chalk.gray('\n(Unable to check for updates)') + '\n');
80
80
  }
@@ -82,7 +82,7 @@ async function checkVersion(): Promise<void> {
82
82
 
83
83
  // Intercept version flag before Commander.js processes it
84
84
  if (process.argv.includes('-v') || process.argv.includes('--version')) {
85
- (async () => {
85
+ void (async () => {
86
86
  await checkVersion();
87
87
  process.exit(0);
88
88
  })();
@@ -119,7 +119,7 @@ if (process.argv.includes('-v') || process.argv.includes('--version')) {
119
119
  cliConfig.all = true;
120
120
  })
121
121
  .on('option:id', function () {
122
- cliConfig.ids = (this as any).opts().id;
122
+ cliConfig.ids = (this.opts().id as string[]);
123
123
  })
124
124
  .showSuggestionAfterError()
125
125
  .addCommand(whoami)