appwrite-cli 17.1.0 → 17.2.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 (56) hide show
  1. package/.github/workflows/ci.yml +1 -1
  2. package/.github/workflows/publish.yml +1 -1
  3. package/CHANGELOG.md +14 -0
  4. package/README.md +2 -2
  5. package/bun.lock +783 -0
  6. package/cli.ts +14 -2
  7. package/dist/bundle-win-arm64.mjs +1137 -733
  8. package/dist/cli.cjs +1137 -733
  9. package/dist/index.cjs +193 -79
  10. package/dist/index.js +193 -79
  11. package/dist/lib/client.d.ts +9 -0
  12. package/dist/lib/client.d.ts.map +1 -1
  13. package/dist/lib/commands/init.d.ts.map +1 -1
  14. package/dist/lib/constants.d.ts +1 -1
  15. package/dist/lib/emulation/docker.d.ts.map +1 -1
  16. package/dist/lib/parser.d.ts.map +1 -1
  17. package/dist/lib/questions.d.ts.map +1 -1
  18. package/dist/lib/types.d.ts +2 -0
  19. package/dist/lib/types.d.ts.map +1 -1
  20. package/dist/lib/utils.d.ts +12 -0
  21. package/dist/lib/utils.d.ts.map +1 -1
  22. package/install.ps1 +2 -2
  23. package/install.sh +1 -1
  24. package/lib/client.ts +12 -0
  25. package/lib/commands/init.ts +109 -2
  26. package/lib/commands/services/account.ts +110 -55
  27. package/lib/commands/services/activities.ts +4 -2
  28. package/lib/commands/services/backups.ts +24 -12
  29. package/lib/commands/services/databases.ts +150 -75
  30. package/lib/commands/services/functions.ts +60 -30
  31. package/lib/commands/services/graphql.ts +4 -2
  32. package/lib/commands/services/health.ts +46 -23
  33. package/lib/commands/services/locale.ts +16 -8
  34. package/lib/commands/services/messaging.ts +96 -48
  35. package/lib/commands/services/migrations.ts +28 -14
  36. package/lib/commands/services/organizations.ts +76 -38
  37. package/lib/commands/services/project.ts +12 -6
  38. package/lib/commands/services/projects.ts +103 -51
  39. package/lib/commands/services/proxy.ts +16 -8
  40. package/lib/commands/services/sites.ts +58 -29
  41. package/lib/commands/services/storage.ts +30 -15
  42. package/lib/commands/services/tables-db.ts +148 -74
  43. package/lib/commands/services/teams.ts +28 -14
  44. package/lib/commands/services/tokens.ts +10 -5
  45. package/lib/commands/services/users.ts +88 -44
  46. package/lib/commands/services/vcs.ts +20 -10
  47. package/lib/commands/services/webhooks.ts +12 -6
  48. package/lib/constants.ts +1 -1
  49. package/lib/emulation/docker.ts +1 -0
  50. package/lib/parser.ts +279 -122
  51. package/lib/questions.ts +8 -3
  52. package/lib/sdks.ts +0 -1
  53. package/lib/types.ts +2 -0
  54. package/lib/utils.ts +234 -0
  55. package/package.json +1 -1
  56. package/scoop/appwrite.config.json +3 -3
package/cli.ts CHANGED
@@ -98,19 +98,31 @@ if (process.argv.includes('-v') || process.argv.includes('--version')) {
98
98
  .helpOption('-h, --help', 'Display help for command')
99
99
  .version(version, '-v, --version', 'Output the version number')
100
100
  .option('-V, --verbose', 'Show complete error log')
101
- .option('-j, --json', 'Output in JSON format')
102
- .option('-R, --raw', 'Output full raw JSON (no filtering)')
101
+ .option('-j, --json', 'Output filtered JSON without empty values')
102
+ .option('-R, --raw', 'Output full JSON response (secrets still redacted unless --show-secrets is set)')
103
+ .option('--show-secrets', 'Display sensitive values like secrets and tokens in output')
103
104
  .hook('preAction', migrate)
104
105
  .option('-f,--force', 'Flag to confirm all warnings')
105
106
  .option('-a,--all', 'Flag to push all resources')
106
107
  .option('--id [id...]', 'Flag to pass a list of ids for a given action')
107
108
  .option('--report', 'Enable reporting in case of CLI errors')
109
+ .hook('preAction', (_thisCommand, actionCommand) => {
110
+ const commandConfig = actionCommand as typeof actionCommand & {
111
+ outputFields?: string[];
112
+ };
113
+ cliConfig.displayFields = Array.isArray(commandConfig.outputFields)
114
+ ? commandConfig.outputFields
115
+ : [];
116
+ })
108
117
  .on('option:json', () => {
109
118
  cliConfig.json = true;
110
119
  })
111
120
  .on('option:raw', () => {
112
121
  cliConfig.raw = true;
113
122
  })
123
+ .on('option:show-secrets', () => {
124
+ cliConfig.showSecrets = true;
125
+ })
114
126
  .on('option:verbose', () => {
115
127
  cliConfig.verbose = true;
116
128
  })