appwrite-cli 13.0.0-rc.1 → 13.0.0-rc.3
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.
- package/.github/workflows/publish.yml +68 -0
- package/CHANGELOG.md +10 -1
- package/LICENSE.md +1 -1
- package/README.md +3 -3
- package/cli.ts +152 -0
- package/dist/bundle.cjs +95813 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +145 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -142
- package/dist/index.js.map +1 -1
- package/dist/lib/client.d.ts +2 -3
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +57 -45
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/commands/config.d.ts +562 -0
- package/dist/lib/commands/config.d.ts.map +1 -0
- package/dist/lib/commands/config.js +416 -0
- package/dist/lib/commands/config.js.map +1 -0
- package/dist/lib/commands/db.d.ts +34 -0
- package/dist/lib/commands/db.d.ts.map +1 -0
- package/dist/lib/commands/db.js +247 -0
- package/dist/lib/commands/db.js.map +1 -0
- package/dist/lib/commands/errors.d.ts +68 -0
- package/dist/lib/commands/errors.d.ts.map +1 -0
- package/dist/lib/commands/errors.js +72 -0
- package/dist/lib/commands/errors.js.map +1 -0
- package/dist/lib/commands/generic.d.ts +2 -2
- package/dist/lib/commands/generic.d.ts.map +1 -1
- package/dist/lib/commands/generic.js +170 -157
- package/dist/lib/commands/generic.js.map +1 -1
- package/dist/lib/commands/init.d.ts +1 -1
- package/dist/lib/commands/init.d.ts.map +1 -1
- package/dist/lib/commands/init.js +201 -192
- package/dist/lib/commands/init.js.map +1 -1
- package/dist/lib/commands/pull.d.ts +105 -3
- package/dist/lib/commands/pull.d.ts.map +1 -1
- package/dist/lib/commands/pull.js +530 -370
- package/dist/lib/commands/pull.js.map +1 -1
- package/dist/lib/commands/push.d.ts +106 -0
- package/dist/lib/commands/push.d.ts.map +1 -1
- package/dist/lib/commands/push.js +1432 -1830
- package/dist/lib/commands/push.js.map +1 -1
- package/dist/lib/commands/run.d.ts +1 -1
- package/dist/lib/commands/run.d.ts.map +1 -1
- package/dist/lib/commands/run.js +129 -127
- package/dist/lib/commands/run.js.map +1 -1
- package/dist/lib/commands/schema.d.ts +59 -0
- package/dist/lib/commands/schema.d.ts.map +1 -0
- package/dist/lib/commands/schema.js +86 -0
- package/dist/lib/commands/schema.js.map +1 -0
- package/dist/lib/commands/services/account.d.ts +3 -0
- package/dist/lib/commands/services/account.d.ts.map +1 -0
- package/dist/lib/commands/services/account.js +328 -0
- package/dist/lib/commands/services/account.js.map +1 -0
- package/dist/lib/commands/services/console.d.ts +3 -0
- package/dist/lib/commands/services/console.d.ts.map +1 -0
- package/dist/lib/commands/services/console.js +28 -0
- package/dist/lib/commands/services/console.js.map +1 -0
- package/dist/lib/commands/services/databases.d.ts +3 -0
- package/dist/lib/commands/services/databases.d.ts.map +1 -0
- package/dist/lib/commands/services/databases.js +620 -0
- package/dist/lib/commands/services/databases.js.map +1 -0
- package/dist/lib/commands/services/functions.d.ts +3 -0
- package/dist/lib/commands/services/functions.d.ts.map +1 -0
- package/dist/lib/commands/services/functions.js +266 -0
- package/dist/lib/commands/services/functions.js.map +1 -0
- package/dist/lib/commands/services/graphql.d.ts +3 -0
- package/dist/lib/commands/services/graphql.d.ts.map +1 -0
- package/dist/lib/commands/services/graphql.js +28 -0
- package/dist/lib/commands/services/graphql.js.map +1 -0
- package/dist/lib/commands/services/health.d.ts +3 -0
- package/dist/lib/commands/services/health.d.ts.map +1 -0
- package/dist/lib/commands/services/health.js +123 -0
- package/dist/lib/commands/services/health.js.map +1 -0
- package/dist/lib/commands/services/locale.d.ts +3 -0
- package/dist/lib/commands/services/locale.d.ts.map +1 -0
- package/dist/lib/commands/services/locale.js +52 -0
- package/dist/lib/commands/services/locale.js.map +1 -0
- package/dist/lib/commands/services/messaging.d.ts +3 -0
- package/dist/lib/commands/services/messaging.d.ts.map +1 -0
- package/dist/lib/commands/services/messaging.js +505 -0
- package/dist/lib/commands/services/messaging.js.map +1 -0
- package/dist/lib/commands/services/migrations.d.ts +3 -0
- package/dist/lib/commands/services/migrations.d.ts.map +1 -0
- package/dist/lib/commands/services/migrations.js +135 -0
- package/dist/lib/commands/services/migrations.js.map +1 -0
- package/dist/lib/commands/services/project.d.ts +3 -0
- package/dist/lib/commands/services/project.d.ts.map +1 -0
- package/dist/lib/commands/services/project.js +54 -0
- package/dist/lib/commands/services/project.js.map +1 -0
- package/dist/lib/commands/services/projects.d.ts +3 -0
- package/dist/lib/commands/services/projects.d.ts.map +1 -0
- package/dist/lib/commands/services/projects.js +415 -0
- package/dist/lib/commands/services/projects.js.map +1 -0
- package/dist/lib/commands/services/proxy.d.ts +3 -0
- package/dist/lib/commands/services/proxy.d.ts.map +1 -0
- package/dist/lib/commands/services/proxy.js +68 -0
- package/dist/lib/commands/services/proxy.js.map +1 -0
- package/dist/lib/commands/services/sites.d.ts +3 -0
- package/dist/lib/commands/services/sites.d.ts.map +1 -0
- package/dist/lib/commands/services/sites.js +250 -0
- package/dist/lib/commands/services/sites.js.map +1 -0
- package/dist/lib/commands/services/storage.d.ts +3 -0
- package/dist/lib/commands/services/storage.d.ts.map +1 -0
- package/dist/lib/commands/services/storage.js +175 -0
- package/dist/lib/commands/services/storage.js.map +1 -0
- package/dist/lib/commands/services/tables-db.d.ts +3 -0
- package/dist/lib/commands/services/tables-db.d.ts.map +1 -0
- package/dist/lib/commands/services/tables-db.js +613 -0
- package/dist/lib/commands/services/tables-db.js.map +1 -0
- package/dist/lib/commands/services/teams.d.ts +3 -0
- package/dist/lib/commands/services/teams.d.ts.map +1 -0
- package/dist/lib/commands/services/teams.js +123 -0
- package/dist/lib/commands/services/teams.js.map +1 -0
- package/dist/lib/commands/services/tokens.d.ts +3 -0
- package/dist/lib/commands/services/tokens.d.ts.map +1 -0
- package/dist/lib/commands/services/tokens.js +49 -0
- package/dist/lib/commands/services/tokens.js.map +1 -0
- package/dist/lib/commands/services/users.d.ts +3 -0
- package/dist/lib/commands/services/users.d.ts.map +1 -0
- package/dist/lib/commands/services/users.js +312 -0
- package/dist/lib/commands/services/users.js.map +1 -0
- package/dist/lib/commands/services/vcs.d.ts +3 -0
- package/dist/lib/commands/services/vcs.d.ts.map +1 -0
- package/dist/lib/commands/services/vcs.js +87 -0
- package/dist/lib/commands/services/vcs.js.map +1 -0
- package/dist/lib/commands/types.d.ts +1 -1
- package/dist/lib/commands/types.d.ts.map +1 -1
- package/dist/lib/commands/types.js +53 -57
- package/dist/lib/commands/types.js.map +1 -1
- package/dist/lib/commands/update.d.ts +1 -1
- package/dist/lib/commands/update.d.ts.map +1 -1
- package/dist/lib/commands/update.js +69 -69
- package/dist/lib/commands/update.js.map +1 -1
- package/dist/lib/commands/utils/attributes.d.ts +47 -0
- package/dist/lib/commands/utils/attributes.d.ts.map +1 -0
- package/dist/lib/commands/utils/attributes.js +514 -0
- package/dist/lib/commands/utils/attributes.js.map +1 -0
- package/dist/lib/commands/utils/change-approval.d.ts +25 -0
- package/dist/lib/commands/utils/change-approval.d.ts.map +1 -0
- package/dist/lib/commands/utils/change-approval.js +129 -0
- package/dist/lib/commands/utils/change-approval.js.map +1 -0
- package/dist/lib/commands/utils/database-sync.d.ts +10 -0
- package/dist/lib/commands/utils/database-sync.d.ts.map +1 -0
- package/dist/lib/commands/utils/database-sync.js +136 -0
- package/dist/lib/commands/utils/database-sync.js.map +1 -0
- package/dist/lib/commands/utils/deployment.d.ts +34 -0
- package/dist/lib/commands/utils/deployment.d.ts.map +1 -0
- package/dist/lib/commands/utils/deployment.js +109 -0
- package/dist/lib/commands/utils/deployment.js.map +1 -0
- package/dist/lib/commands/utils/error-formatter.d.ts +19 -0
- package/dist/lib/commands/utils/error-formatter.d.ts.map +1 -0
- package/dist/lib/commands/utils/error-formatter.js +333 -0
- package/dist/lib/commands/utils/error-formatter.js.map +1 -0
- package/dist/lib/commands/utils/pools.d.ts +16 -0
- package/dist/lib/commands/utils/pools.d.ts.map +1 -0
- package/dist/lib/commands/utils/pools.js +198 -0
- package/dist/lib/commands/utils/pools.js.map +1 -0
- package/dist/lib/config.d.ts +41 -40
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +264 -239
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/constants.d.ts +14 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +19 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/emulation/docker.d.ts +4 -12
- package/dist/lib/emulation/docker.d.ts.map +1 -1
- package/dist/lib/emulation/docker.js +159 -142
- package/dist/lib/emulation/docker.js.map +1 -1
- package/dist/lib/emulation/utils.d.ts +1 -1
- package/dist/lib/emulation/utils.d.ts.map +1 -1
- package/dist/lib/emulation/utils.js +55 -58
- package/dist/lib/emulation/utils.js.map +1 -1
- package/dist/lib/id.d.ts +1 -1
- package/dist/lib/id.d.ts.map +1 -1
- package/dist/lib/id.js +13 -18
- package/dist/lib/id.js.map +1 -1
- package/dist/lib/paginate.d.ts +3 -4
- package/dist/lib/paginate.d.ts.map +1 -1
- package/dist/lib/paginate.js +7 -10
- package/dist/lib/paginate.js.map +1 -1
- package/dist/lib/parser.d.ts +1 -1
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/parser.js +92 -103
- package/dist/lib/parser.js.map +1 -1
- package/dist/lib/questions.d.ts +1 -1
- package/dist/lib/questions.d.ts.map +1 -1
- package/dist/lib/questions.js +381 -385
- package/dist/lib/questions.js.map +1 -1
- package/dist/lib/sdks.d.ts +1 -1
- package/dist/lib/sdks.d.ts.map +1 -1
- package/dist/lib/sdks.js +39 -30
- package/dist/lib/sdks.js.map +1 -1
- package/dist/lib/services.d.ts +13 -0
- package/dist/lib/services.d.ts.map +1 -0
- package/dist/lib/services.js +47 -0
- package/dist/lib/services.js.map +1 -0
- package/dist/lib/spinner.d.ts +1 -1
- package/dist/lib/spinner.d.ts.map +1 -1
- package/dist/lib/spinner.js +25 -27
- package/dist/lib/spinner.js.map +1 -1
- package/dist/lib/type-generation/attribute.d.ts +1 -1
- package/dist/lib/type-generation/attribute.d.ts.map +1 -1
- package/dist/lib/type-generation/attribute.js +14 -17
- package/dist/lib/type-generation/attribute.js.map +1 -1
- package/dist/lib/type-generation/languages/csharp.d.ts +1 -1
- package/dist/lib/type-generation/languages/csharp.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/csharp.js +34 -34
- package/dist/lib/type-generation/languages/csharp.js.map +1 -1
- package/dist/lib/type-generation/languages/dart.d.ts +1 -1
- package/dist/lib/type-generation/languages/dart.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/dart.js +57 -57
- package/dist/lib/type-generation/languages/dart.js.map +1 -1
- package/dist/lib/type-generation/languages/java.d.ts +1 -1
- package/dist/lib/type-generation/languages/java.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/java.js +35 -35
- package/dist/lib/type-generation/languages/java.js.map +1 -1
- package/dist/lib/type-generation/languages/javascript.d.ts +1 -1
- package/dist/lib/type-generation/languages/javascript.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/javascript.js +45 -44
- package/dist/lib/type-generation/languages/javascript.js.map +1 -1
- package/dist/lib/type-generation/languages/kotlin.d.ts +1 -1
- package/dist/lib/type-generation/languages/kotlin.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/kotlin.js +35 -35
- package/dist/lib/type-generation/languages/kotlin.js.map +1 -1
- package/dist/lib/type-generation/languages/language.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/language.js +32 -37
- package/dist/lib/type-generation/languages/language.js.map +1 -1
- package/dist/lib/type-generation/languages/php.d.ts +1 -1
- package/dist/lib/type-generation/languages/php.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/php.js +34 -34
- package/dist/lib/type-generation/languages/php.js.map +1 -1
- package/dist/lib/type-generation/languages/swift.d.ts +1 -1
- package/dist/lib/type-generation/languages/swift.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/swift.js +35 -35
- package/dist/lib/type-generation/languages/swift.js.map +1 -1
- package/dist/lib/type-generation/languages/typescript.d.ts +1 -1
- package/dist/lib/type-generation/languages/typescript.d.ts.map +1 -1
- package/dist/lib/type-generation/languages/typescript.js +49 -46
- package/dist/lib/type-generation/languages/typescript.js.map +1 -1
- package/dist/lib/types.d.ts +38 -108
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/types.js +1 -2
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +142 -98
- package/dist/lib/utils.js.map +1 -1
- package/dist/lib/validations.d.ts.map +1 -1
- package/dist/lib/validations.js +2 -6
- package/dist/lib/validations.js.map +1 -1
- package/dist/package.json +68 -0
- package/index.ts +25 -149
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.ts +261 -220
- package/lib/commands/config.ts +494 -0
- package/lib/commands/db.ts +324 -0
- package/lib/commands/errors.ts +93 -0
- package/lib/commands/generic.ts +371 -269
- package/lib/commands/init.ts +631 -519
- package/lib/commands/pull.ts +827 -453
- package/lib/commands/push.ts +2191 -2349
- package/lib/commands/run.ts +382 -302
- package/lib/commands/schema.ts +122 -0
- package/lib/commands/services/account.ts +647 -0
- package/lib/commands/services/console.ts +52 -0
- package/lib/commands/services/databases.ts +1163 -0
- package/lib/commands/services/functions.ts +536 -0
- package/lib/commands/services/graphql.ts +50 -0
- package/lib/commands/services/health.ts +260 -0
- package/lib/commands/services/locale.ts +102 -0
- package/lib/commands/services/messaging.ts +1052 -0
- package/lib/commands/services/migrations.ts +249 -0
- package/lib/commands/services/project.ts +112 -0
- package/lib/commands/services/projects.ts +785 -0
- package/lib/commands/services/proxy.ts +135 -0
- package/lib/commands/services/sites.ts +505 -0
- package/lib/commands/services/storage.ts +338 -0
- package/lib/commands/services/tables-db.ts +1150 -0
- package/lib/commands/services/teams.ts +232 -0
- package/lib/commands/services/tokens.ts +94 -0
- package/lib/commands/services/users.ts +616 -0
- package/lib/commands/services/vcs.ts +165 -0
- package/lib/commands/types.ts +145 -118
- package/lib/commands/update.ts +189 -159
- package/lib/commands/utils/attributes.ts +719 -0
- package/lib/commands/utils/change-approval.ts +186 -0
- package/lib/commands/utils/database-sync.ts +180 -0
- package/lib/commands/utils/deployment.ts +184 -0
- package/lib/commands/utils/error-formatter.ts +417 -0
- package/lib/commands/utils/pools.ts +355 -0
- package/lib/config.ts +766 -687
- package/lib/constants.ts +22 -0
- package/lib/emulation/docker.ts +277 -216
- package/lib/emulation/utils.ts +188 -174
- package/lib/id.ts +23 -23
- package/lib/paginate.ts +69 -55
- package/lib/parser.ts +220 -189
- package/lib/questions.ts +1024 -948
- package/lib/sdks.ts +84 -51
- package/lib/services.ts +72 -0
- package/lib/spinner.ts +112 -99
- package/lib/type-generation/attribute.ts +15 -14
- package/lib/type-generation/languages/csharp.ts +71 -60
- package/lib/type-generation/languages/dart.ts +106 -93
- package/lib/type-generation/languages/java.ts +69 -58
- package/lib/type-generation/languages/javascript.ts +84 -73
- package/lib/type-generation/languages/kotlin.ts +71 -60
- package/lib/type-generation/languages/language.ts +103 -95
- package/lib/type-generation/languages/php.ts +67 -56
- package/lib/type-generation/languages/swift.ts +71 -60
- package/lib/type-generation/languages/typescript.ts +93 -76
- package/lib/types.ts +50 -125
- package/lib/utils.ts +304 -233
- package/lib/validations.ts +17 -14
- package/package.json +31 -22
- package/scoop/appwrite.config.json +3 -3
- package/tsconfig.json +7 -13
- package/.github/workflows/autoclose.yml +0 -11
- package/.github/workflows/npm-publish.yml +0 -49
- package/dist/lib/commands/account.d.ts +0 -379
- package/dist/lib/commands/account.d.ts.map +0 -1
- package/dist/lib/commands/account.js +0 -1228
- package/dist/lib/commands/account.js.map +0 -1
- package/dist/lib/commands/console.d.ts +0 -20
- package/dist/lib/commands/console.d.ts.map +0 -1
- package/dist/lib/commands/console.js +0 -78
- package/dist/lib/commands/console.js.map +0 -1
- package/dist/lib/commands/databases.d.ts +0 -732
- package/dist/lib/commands/databases.d.ts.map +0 -1
- package/dist/lib/commands/databases.js +0 -2196
- package/dist/lib/commands/databases.js.map +0 -1
- package/dist/lib/commands/functions.d.ts +0 -310
- package/dist/lib/commands/functions.d.ts.map +0 -1
- package/dist/lib/commands/functions.js +0 -1100
- package/dist/lib/commands/functions.js.map +0 -1
- package/dist/lib/commands/graphql.d.ts +0 -19
- package/dist/lib/commands/graphql.d.ts.map +0 -1
- package/dist/lib/commands/graphql.js +0 -77
- package/dist/lib/commands/graphql.js.map +0 -1
- package/dist/lib/commands/health.d.ts +0 -153
- package/dist/lib/commands/health.d.ts.map +0 -1
- package/dist/lib/commands/health.js +0 -464
- package/dist/lib/commands/health.js.map +0 -1
- package/dist/lib/commands/locale.d.ts +0 -53
- package/dist/lib/commands/locale.d.ts.map +0 -1
- package/dist/lib/commands/locale.js +0 -165
- package/dist/lib/commands/locale.js.map +0 -1
- package/dist/lib/commands/messaging.d.ts +0 -588
- package/dist/lib/commands/messaging.d.ts.map +0 -1
- package/dist/lib/commands/messaging.js +0 -2042
- package/dist/lib/commands/messaging.js.map +0 -1
- package/dist/lib/commands/migrations.d.ts +0 -150
- package/dist/lib/commands/migrations.d.ts.map +0 -1
- package/dist/lib/commands/migrations.js +0 -524
- package/dist/lib/commands/migrations.js.map +0 -1
- package/dist/lib/commands/organizations.d.ts +0 -11
- package/dist/lib/commands/organizations.d.ts.map +0 -1
- package/dist/lib/commands/organizations.js +0 -31
- package/dist/lib/commands/organizations.js.map +0 -1
- package/dist/lib/commands/project.d.ts +0 -53
- package/dist/lib/commands/project.d.ts.map +0 -1
- package/dist/lib/commands/project.js +0 -176
- package/dist/lib/commands/project.js.map +0 -1
- package/dist/lib/commands/projects.d.ts +0 -516
- package/dist/lib/commands/projects.d.ts.map +0 -1
- package/dist/lib/commands/projects.js +0 -1590
- package/dist/lib/commands/projects.js.map +0 -1
- package/dist/lib/commands/proxy.d.ts +0 -71
- package/dist/lib/commands/proxy.d.ts.map +0 -1
- package/dist/lib/commands/proxy.js +0 -240
- package/dist/lib/commands/proxy.js.map +0 -1
- package/dist/lib/commands/sites.d.ts +0 -296
- package/dist/lib/commands/sites.d.ts.map +0 -1
- package/dist/lib/commands/sites.js +0 -1046
- package/dist/lib/commands/sites.js.map +0 -1
- package/dist/lib/commands/storage.d.ts +0 -170
- package/dist/lib/commands/storage.d.ts.map +0 -1
- package/dist/lib/commands/storage.js +0 -651
- package/dist/lib/commands/storage.js.map +0 -1
- package/dist/lib/commands/tables-db.d.ts +0 -728
- package/dist/lib/commands/tables-db.d.ts.map +0 -1
- package/dist/lib/commands/tables-db.js +0 -2198
- package/dist/lib/commands/tables-db.js.map +0 -1
- package/dist/lib/commands/teams.d.ts +0 -129
- package/dist/lib/commands/teams.d.ts.map +0 -1
- package/dist/lib/commands/teams.js +0 -403
- package/dist/lib/commands/teams.js.map +0 -1
- package/dist/lib/commands/tokens.d.ts +0 -48
- package/dist/lib/commands/tokens.d.ts.map +0 -1
- package/dist/lib/commands/tokens.js +0 -156
- package/dist/lib/commands/tokens.js.map +0 -1
- package/dist/lib/commands/users.d.ts +0 -382
- package/dist/lib/commands/users.d.ts.map +0 -1
- package/dist/lib/commands/users.js +0 -1195
- package/dist/lib/commands/users.js.map +0 -1
- package/dist/lib/commands/vcs.d.ts +0 -92
- package/dist/lib/commands/vcs.d.ts.map +0 -1
- package/dist/lib/commands/vcs.js +0 -276
- package/dist/lib/commands/vcs.js.map +0 -1
- package/dist/lib/exception.d.ts +0 -8
- package/dist/lib/exception.d.ts.map +0 -1
- package/dist/lib/exception.js +0 -16
- package/dist/lib/exception.js.map +0 -1
- package/lib/commands/account.ts +0 -1867
- package/lib/commands/console.ts +0 -112
- package/lib/commands/databases.ts +0 -3272
- package/lib/commands/functions.ts +0 -1587
- package/lib/commands/graphql.ts +0 -110
- package/lib/commands/health.ts +0 -753
- package/lib/commands/locale.ts +0 -270
- package/lib/commands/messaging.ts +0 -2878
- package/lib/commands/migrations.ts +0 -754
- package/lib/commands/organizations.ts +0 -46
- package/lib/commands/project.ts +0 -266
- package/lib/commands/projects.ts +0 -2370
- package/lib/commands/proxy.ts +0 -357
- package/lib/commands/sites.ts +0 -1514
- package/lib/commands/storage.ts +0 -919
- package/lib/commands/tables-db.ts +0 -3260
- package/lib/commands/teams.ts +0 -609
- package/lib/commands/tokens.ts +0 -232
- package/lib/commands/users.ts +0 -1804
- package/lib/commands/vcs.ts +0 -428
- package/lib/exception.ts +0 -20
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import { sdkForProject } from "../../sdks.js";
|
|
4
|
+
import { actionRunner, commandDescriptions, success, parse, parseBool, parseInteger, } from "../../parser.js";
|
|
5
|
+
import { Sites, } from "@appwrite.io/console";
|
|
6
|
+
let sitesClient = null;
|
|
7
|
+
const getSitesClient = async () => {
|
|
8
|
+
if (!sitesClient) {
|
|
9
|
+
const sdkClient = await sdkForProject();
|
|
10
|
+
sitesClient = new Sites(sdkClient);
|
|
11
|
+
}
|
|
12
|
+
return sitesClient;
|
|
13
|
+
};
|
|
14
|
+
export const sites = new Command("sites")
|
|
15
|
+
.description(commandDescriptions["sites"] ?? "")
|
|
16
|
+
.configureHelp({
|
|
17
|
+
helpWidth: process.stdout.columns || 80,
|
|
18
|
+
});
|
|
19
|
+
sites
|
|
20
|
+
.command(`list`)
|
|
21
|
+
.description(`Get a list of all the project's sites. You can use the query params to filter your results.`)
|
|
22
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId`)
|
|
23
|
+
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
24
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
25
|
+
.action(actionRunner(async ({ queries, search, total }) => parse(await (await getSitesClient()).list(queries, search, total))));
|
|
26
|
+
sites
|
|
27
|
+
.command(`create`)
|
|
28
|
+
.description(`Create a new site.`)
|
|
29
|
+
.requiredOption(`--site-id <site-id>`, `Site 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.`)
|
|
30
|
+
.requiredOption(`--name <name>`, `Site name. Max length: 128 chars.`)
|
|
31
|
+
.requiredOption(`--framework <framework>`, `Sites framework.`)
|
|
32
|
+
.requiredOption(`--build-runtime <build-runtime>`, `Runtime to use during build step.`)
|
|
33
|
+
.option(`--enabled [value]`, `Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
|
|
34
|
+
.option(`--logging [value]`, `When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.`, (value) => value === undefined ? true : parseBool(value))
|
|
35
|
+
.option(`--timeout <timeout>`, `Maximum request time in seconds.`, parseInteger)
|
|
36
|
+
.option(`--install-command <install-command>`, `Install Command.`)
|
|
37
|
+
.option(`--build-command <build-command>`, `Build Command.`)
|
|
38
|
+
.option(`--output-directory <output-directory>`, `Output Directory for site.`)
|
|
39
|
+
.option(`--adapter <adapter>`, `Framework adapter defining rendering strategy. Allowed values are: static, ssr`)
|
|
40
|
+
.option(`--installation-id <installation-id>`, `Appwrite Installation ID for VCS (Version Control System) deployment.`)
|
|
41
|
+
.option(`--fallback-file <fallback-file>`, `Fallback file for single page application sites.`)
|
|
42
|
+
.option(`--provider-repository-id <provider-repository-id>`, `Repository ID of the repo linked to the site.`)
|
|
43
|
+
.option(`--provider-branch <provider-branch>`, `Production branch for the repo linked to the site.`)
|
|
44
|
+
.option(`--provider-silent-mode [value]`, `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.`, (value) => value === undefined ? true : parseBool(value))
|
|
45
|
+
.option(`--provider-root-directory <provider-root-directory>`, `Path to site code in the linked repo.`)
|
|
46
|
+
.option(`--specification <specification>`, `Framework specification for the site and builds.`)
|
|
47
|
+
.action(actionRunner(async ({ siteId, name, framework, buildRuntime, enabled, logging, timeout, installCommand, buildCommand, outputDirectory, adapter, installationId, fallbackFile, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification }) => parse(await (await getSitesClient()).create(siteId, name, framework, buildRuntime, enabled, logging, timeout, installCommand, buildCommand, outputDirectory, adapter, installationId, fallbackFile, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification))));
|
|
48
|
+
sites
|
|
49
|
+
.command(`list-frameworks`)
|
|
50
|
+
.description(`Get a list of all frameworks that are currently available on the server instance.`)
|
|
51
|
+
.action(actionRunner(async () => parse(await (await getSitesClient()).listFrameworks())));
|
|
52
|
+
sites
|
|
53
|
+
.command(`list-specifications`)
|
|
54
|
+
.description(`List allowed site specifications for this instance.`)
|
|
55
|
+
.action(actionRunner(async () => parse(await (await getSitesClient()).listSpecifications())));
|
|
56
|
+
sites
|
|
57
|
+
.command(`list-templates`)
|
|
58
|
+
.description(`List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.`)
|
|
59
|
+
.option(`--frameworks [frameworks...]`, `List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.`)
|
|
60
|
+
.option(`--use-cases [use-cases...]`, `List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.`)
|
|
61
|
+
.option(`--limit <limit>`, `Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.`, parseInteger)
|
|
62
|
+
.option(`--offset <offset>`, `Offset the list of returned templates. Maximum offset is 5000.`, parseInteger)
|
|
63
|
+
.action(actionRunner(async ({ frameworks, useCases, limit, offset }) => parse(await (await getSitesClient()).listTemplates(frameworks, useCases, limit, offset))));
|
|
64
|
+
sites
|
|
65
|
+
.command(`get-template`)
|
|
66
|
+
.description(`Get a site template using ID. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.`)
|
|
67
|
+
.requiredOption(`--template-id <template-id>`, `Template ID.`)
|
|
68
|
+
.action(actionRunner(async ({ templateId }) => parse(await (await getSitesClient()).getTemplate(templateId))));
|
|
69
|
+
sites
|
|
70
|
+
.command(`list-usage`)
|
|
71
|
+
.description(`Get usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.`)
|
|
72
|
+
.option(`--range <range>`, `Date range.`)
|
|
73
|
+
.action(actionRunner(async ({ range }) => parse(await (await getSitesClient()).listUsage(range))));
|
|
74
|
+
sites
|
|
75
|
+
.command(`get`)
|
|
76
|
+
.description(`Get a site by its unique ID.`)
|
|
77
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
78
|
+
.action(actionRunner(async ({ siteId }) => parse(await (await getSitesClient()).get(siteId))));
|
|
79
|
+
sites
|
|
80
|
+
.command(`update`)
|
|
81
|
+
.description(`Update site by its unique ID.`)
|
|
82
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
83
|
+
.requiredOption(`--name <name>`, `Site name. Max length: 128 chars.`)
|
|
84
|
+
.requiredOption(`--framework <framework>`, `Sites framework.`)
|
|
85
|
+
.option(`--enabled [value]`, `Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
|
|
86
|
+
.option(`--logging [value]`, `When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.`, (value) => value === undefined ? true : parseBool(value))
|
|
87
|
+
.option(`--timeout <timeout>`, `Maximum request time in seconds.`, parseInteger)
|
|
88
|
+
.option(`--install-command <install-command>`, `Install Command.`)
|
|
89
|
+
.option(`--build-command <build-command>`, `Build Command.`)
|
|
90
|
+
.option(`--output-directory <output-directory>`, `Output Directory for site.`)
|
|
91
|
+
.option(`--build-runtime <build-runtime>`, `Runtime to use during build step.`)
|
|
92
|
+
.option(`--adapter <adapter>`, `Framework adapter defining rendering strategy. Allowed values are: static, ssr`)
|
|
93
|
+
.option(`--fallback-file <fallback-file>`, `Fallback file for single page application sites.`)
|
|
94
|
+
.option(`--installation-id <installation-id>`, `Appwrite Installation ID for VCS (Version Control System) deployment.`)
|
|
95
|
+
.option(`--provider-repository-id <provider-repository-id>`, `Repository ID of the repo linked to the site.`)
|
|
96
|
+
.option(`--provider-branch <provider-branch>`, `Production branch for the repo linked to the site.`)
|
|
97
|
+
.option(`--provider-silent-mode [value]`, `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.`, (value) => value === undefined ? true : parseBool(value))
|
|
98
|
+
.option(`--provider-root-directory <provider-root-directory>`, `Path to site code in the linked repo.`)
|
|
99
|
+
.option(`--specification <specification>`, `Framework specification for the site and builds.`)
|
|
100
|
+
.action(actionRunner(async ({ siteId, name, framework, enabled, logging, timeout, installCommand, buildCommand, outputDirectory, buildRuntime, adapter, fallbackFile, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification }) => parse(await (await getSitesClient()).update(siteId, name, framework, enabled, logging, timeout, installCommand, buildCommand, outputDirectory, buildRuntime, adapter, fallbackFile, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification))));
|
|
101
|
+
sites
|
|
102
|
+
.command(`delete`)
|
|
103
|
+
.description(`Delete a site by its unique ID.`)
|
|
104
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
105
|
+
.action(actionRunner(async ({ siteId }) => parse(await (await getSitesClient()).delete(siteId))));
|
|
106
|
+
sites
|
|
107
|
+
.command(`update-site-deployment`)
|
|
108
|
+
.description(`Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.`)
|
|
109
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
110
|
+
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
|
|
111
|
+
.action(actionRunner(async ({ siteId, deploymentId }) => parse(await (await getSitesClient()).updateSiteDeployment(siteId, deploymentId))));
|
|
112
|
+
sites
|
|
113
|
+
.command(`list-deployments`)
|
|
114
|
+
.description(`Get a list of all the site's code deployments. You can use the query params to filter your results.`)
|
|
115
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
116
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type`)
|
|
117
|
+
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
118
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
119
|
+
.action(actionRunner(async ({ siteId, queries, search, total }) => parse(await (await getSitesClient()).listDeployments(siteId, queries, search, total))));
|
|
120
|
+
sites
|
|
121
|
+
.command(`create-deployment`)
|
|
122
|
+
.description(`Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.`)
|
|
123
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
124
|
+
.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.`)
|
|
125
|
+
.requiredOption(`--activate <activate>`, `Automatically activate the deployment when it is finished building.`, parseBool)
|
|
126
|
+
.option(`--install-command <install-command>`, `Install Commands.`)
|
|
127
|
+
.option(`--build-command <build-command>`, `Build Commands.`)
|
|
128
|
+
.option(`--output-directory <output-directory>`, `Output Directory.`)
|
|
129
|
+
.action(actionRunner(async ({ siteId, code, activate, installCommand, buildCommand, outputDirectory }) => parse(await (await getSitesClient()).createDeployment(siteId, code, activate, installCommand, buildCommand, outputDirectory))));
|
|
130
|
+
sites
|
|
131
|
+
.command(`create-duplicate-deployment`)
|
|
132
|
+
.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.`)
|
|
133
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
134
|
+
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
|
|
135
|
+
.action(actionRunner(async ({ siteId, deploymentId }) => parse(await (await getSitesClient()).createDuplicateDeployment(siteId, deploymentId))));
|
|
136
|
+
sites
|
|
137
|
+
.command(`create-template-deployment`)
|
|
138
|
+
.description(`Create a deployment based on a template.
|
|
139
|
+
|
|
140
|
+
Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/sites/templates) to find the template details.`)
|
|
141
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
142
|
+
.requiredOption(`--repository <repository>`, `Repository name of the template.`)
|
|
143
|
+
.requiredOption(`--owner <owner>`, `The name of the owner of the template.`)
|
|
144
|
+
.requiredOption(`--root-directory <root-directory>`, `Path to site code in the template repo.`)
|
|
145
|
+
.requiredOption(`--type <type>`, `Type for the reference provided. Can be commit, branch, or tag`)
|
|
146
|
+
.requiredOption(`--reference <reference>`, `Reference value, can be a commit hash, branch name, or release tag`)
|
|
147
|
+
.option(`--activate [value]`, `Automatically activate the deployment when it is finished building.`, (value) => value === undefined ? true : parseBool(value))
|
|
148
|
+
.action(actionRunner(async ({ siteId, repository, owner, rootDirectory, type, reference, activate }) => parse(await (await getSitesClient()).createTemplateDeployment(siteId, repository, owner, rootDirectory, type, reference, activate))));
|
|
149
|
+
sites
|
|
150
|
+
.command(`create-vcs-deployment`)
|
|
151
|
+
.description(`Create a deployment when a site is connected to VCS.
|
|
152
|
+
|
|
153
|
+
This endpoint lets you create deployment from a branch, commit, or a tag.`)
|
|
154
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
155
|
+
.requiredOption(`--type <type>`, `Type of reference passed. Allowed values are: branch, commit`)
|
|
156
|
+
.requiredOption(`--reference <reference>`, `VCS reference to create deployment from. Depending on type this can be: branch name, commit hash`)
|
|
157
|
+
.option(`--activate [value]`, `Automatically activate the deployment when it is finished building.`, (value) => value === undefined ? true : parseBool(value))
|
|
158
|
+
.action(actionRunner(async ({ siteId, type, reference, activate }) => parse(await (await getSitesClient()).createVcsDeployment(siteId, type, reference, activate))));
|
|
159
|
+
sites
|
|
160
|
+
.command(`get-deployment`)
|
|
161
|
+
.description(`Get a site deployment by its unique ID.`)
|
|
162
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
163
|
+
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
|
|
164
|
+
.action(actionRunner(async ({ siteId, deploymentId }) => parse(await (await getSitesClient()).getDeployment(siteId, deploymentId))));
|
|
165
|
+
sites
|
|
166
|
+
.command(`delete-deployment`)
|
|
167
|
+
.description(`Delete a site deployment by its unique ID.`)
|
|
168
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
169
|
+
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
|
|
170
|
+
.action(actionRunner(async ({ siteId, deploymentId }) => parse(await (await getSitesClient()).deleteDeployment(siteId, deploymentId))));
|
|
171
|
+
sites
|
|
172
|
+
.command(`get-deployment-download`)
|
|
173
|
+
.description(`Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.`)
|
|
174
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
175
|
+
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
|
|
176
|
+
.option(`--type <type>`, `Deployment file to download. Can be: "source", "output".`)
|
|
177
|
+
.requiredOption(`--destination <destination>`, `Path to save the file to.`)
|
|
178
|
+
.action(actionRunner(async ({ siteId, deploymentId, type, destination }) => {
|
|
179
|
+
const url = await (await getSitesClient()).getDeploymentDownload(siteId, deploymentId, type);
|
|
180
|
+
const response = await fetch(url);
|
|
181
|
+
const buffer = Buffer.from(await response.arrayBuffer());
|
|
182
|
+
fs.writeFileSync(destination, buffer);
|
|
183
|
+
success(`File saved to ${destination}`);
|
|
184
|
+
}));
|
|
185
|
+
sites
|
|
186
|
+
.command(`update-deployment-status`)
|
|
187
|
+
.description(`Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.`)
|
|
188
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
189
|
+
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
|
|
190
|
+
.action(actionRunner(async ({ siteId, deploymentId }) => parse(await (await getSitesClient()).updateDeploymentStatus(siteId, deploymentId))));
|
|
191
|
+
sites
|
|
192
|
+
.command(`list-logs`)
|
|
193
|
+
.description(`Get a list of all site logs. You can use the query params to filter your results.`)
|
|
194
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
195
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId`)
|
|
196
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
197
|
+
.action(actionRunner(async ({ siteId, queries, total }) => parse(await (await getSitesClient()).listLogs(siteId, queries, total))));
|
|
198
|
+
sites
|
|
199
|
+
.command(`get-log`)
|
|
200
|
+
.description(`Get a site request log by its unique ID.`)
|
|
201
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
202
|
+
.requiredOption(`--log-id <log-id>`, `Log ID.`)
|
|
203
|
+
.action(actionRunner(async ({ siteId, logId }) => parse(await (await getSitesClient()).getLog(siteId, logId))));
|
|
204
|
+
sites
|
|
205
|
+
.command(`delete-log`)
|
|
206
|
+
.description(`Delete a site log by its unique ID.`)
|
|
207
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
208
|
+
.requiredOption(`--log-id <log-id>`, `Log ID.`)
|
|
209
|
+
.action(actionRunner(async ({ siteId, logId }) => parse(await (await getSitesClient()).deleteLog(siteId, logId))));
|
|
210
|
+
sites
|
|
211
|
+
.command(`get-usage`)
|
|
212
|
+
.description(`Get usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.`)
|
|
213
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
214
|
+
.option(`--range <range>`, `Date range.`)
|
|
215
|
+
.action(actionRunner(async ({ siteId, range }) => parse(await (await getSitesClient()).getUsage(siteId, range))));
|
|
216
|
+
sites
|
|
217
|
+
.command(`list-variables`)
|
|
218
|
+
.description(`Get a list of all variables of a specific site.`)
|
|
219
|
+
.requiredOption(`--site-id <site-id>`, `Site unique ID.`)
|
|
220
|
+
.action(actionRunner(async ({ siteId }) => parse(await (await getSitesClient()).listVariables(siteId))));
|
|
221
|
+
sites
|
|
222
|
+
.command(`create-variable`)
|
|
223
|
+
.description(`Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.`)
|
|
224
|
+
.requiredOption(`--site-id <site-id>`, `Site unique ID.`)
|
|
225
|
+
.requiredOption(`--key <key>`, `Variable key. Max length: 255 chars.`)
|
|
226
|
+
.requiredOption(`--value <value>`, `Variable value. Max length: 8192 chars.`)
|
|
227
|
+
.option(`--secret [value]`, `Secret variables can be updated or deleted, but only sites can read them during build and runtime.`, (value) => value === undefined ? true : parseBool(value))
|
|
228
|
+
.action(actionRunner(async ({ siteId, key, value, secret }) => parse(await (await getSitesClient()).createVariable(siteId, key, value, secret))));
|
|
229
|
+
sites
|
|
230
|
+
.command(`get-variable`)
|
|
231
|
+
.description(`Get a variable by its unique ID.`)
|
|
232
|
+
.requiredOption(`--site-id <site-id>`, `Site unique ID.`)
|
|
233
|
+
.requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`)
|
|
234
|
+
.action(actionRunner(async ({ siteId, variableId }) => parse(await (await getSitesClient()).getVariable(siteId, variableId))));
|
|
235
|
+
sites
|
|
236
|
+
.command(`update-variable`)
|
|
237
|
+
.description(`Update variable by its unique ID.`)
|
|
238
|
+
.requiredOption(`--site-id <site-id>`, `Site unique ID.`)
|
|
239
|
+
.requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`)
|
|
240
|
+
.requiredOption(`--key <key>`, `Variable key. Max length: 255 chars.`)
|
|
241
|
+
.option(`--value <value>`, `Variable value. Max length: 8192 chars.`)
|
|
242
|
+
.option(`--secret [value]`, `Secret variables can be updated or deleted, but only sites can read them during build and runtime.`, (value) => value === undefined ? true : parseBool(value))
|
|
243
|
+
.action(actionRunner(async ({ siteId, variableId, key, value, secret }) => parse(await (await getSitesClient()).updateVariable(siteId, variableId, key, value, secret))));
|
|
244
|
+
sites
|
|
245
|
+
.command(`delete-variable`)
|
|
246
|
+
.description(`Delete a variable by its unique ID.`)
|
|
247
|
+
.requiredOption(`--site-id <site-id>`, `Site unique ID.`)
|
|
248
|
+
.requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`)
|
|
249
|
+
.action(actionRunner(async ({ siteId, variableId }) => parse(await (await getSitesClient()).deleteVariable(siteId, variableId))));
|
|
250
|
+
//# sourceMappingURL=sites.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sites.js","sourceRoot":"","sources":["../../../../lib/commands/services/sites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,IAAI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E,CAC5B,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAChD;KACA,MAAM,CACL,YAAY,CACV,KAAK,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CACnD,KAAK,CAAC,MAAM,CAAC,MAAM,cAAc,EAAE,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAC/F,CACF,CAAC;AAEJ,KAAK;KACF,OAAO,CAAC,iBAAiB,CAAC;KAC1B,WAAW,CAAC,qCAAqC,CAAC;KAClD,cAAc,CAAC,qBAAqB,EAAE,iBAAiB,CAAC;KACxD,cAAc,CAAC,6BAA6B,EAAE,qBAAqB,CAAC;KACpE,MAAM,CACL,YAAY,CACV,KAAK,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE,CAC/B,KAAK,CAAC,MAAM,CAAC,MAAM,cAAc,EAAE,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAC3E,CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6BpC,eAAO,MAAM,OAAO,SAIhB,CAAC"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import { sdkForProject } from "../../sdks.js";
|
|
4
|
+
import { actionRunner, commandDescriptions, success, parse, parseBool, parseInteger, } from "../../parser.js";
|
|
5
|
+
import { Storage, } from "@appwrite.io/console";
|
|
6
|
+
let storageClient = null;
|
|
7
|
+
const getStorageClient = async () => {
|
|
8
|
+
if (!storageClient) {
|
|
9
|
+
const sdkClient = await sdkForProject();
|
|
10
|
+
storageClient = new Storage(sdkClient);
|
|
11
|
+
}
|
|
12
|
+
return storageClient;
|
|
13
|
+
};
|
|
14
|
+
export const storage = new Command("storage")
|
|
15
|
+
.description(commandDescriptions["storage"] ?? "")
|
|
16
|
+
.configureHelp({
|
|
17
|
+
helpWidth: process.stdout.columns || 80,
|
|
18
|
+
});
|
|
19
|
+
storage
|
|
20
|
+
.command(`list-buckets`)
|
|
21
|
+
.description(`Get a list of all the storage buckets. You can use the query params to filter your results.`)
|
|
22
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations`)
|
|
23
|
+
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
24
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
25
|
+
.action(actionRunner(async ({ queries, search, total }) => parse(await (await getStorageClient()).listBuckets(queries, search, total))));
|
|
26
|
+
storage
|
|
27
|
+
.command(`create-bucket`)
|
|
28
|
+
.description(`Create a new storage bucket.`)
|
|
29
|
+
.requiredOption(`--bucket-id <bucket-id>`, `Unique 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.`)
|
|
30
|
+
.requiredOption(`--name <name>`, `Bucket name`)
|
|
31
|
+
.option(`--permissions [permissions...]`, `An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
32
|
+
.option(`--file-security [value]`, `Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).`, (value) => value === undefined ? true : parseBool(value))
|
|
33
|
+
.option(`--enabled [value]`, `Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
|
|
34
|
+
.option(`--maximum-file-size <maximum-file-size>`, `Maximum file size allowed in bytes. Maximum allowed value is 30MB.`, parseInteger)
|
|
35
|
+
.option(`--allowed-file-extensions [allowed-file-extensions...]`, `Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.`)
|
|
36
|
+
.option(`--compression <compression>`, `Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled`)
|
|
37
|
+
.option(`--encryption [value]`, `Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled`, (value) => value === undefined ? true : parseBool(value))
|
|
38
|
+
.option(`--antivirus [value]`, `Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled`, (value) => value === undefined ? true : parseBool(value))
|
|
39
|
+
.option(`--transformations [value]`, `Are image transformations enabled?`, (value) => value === undefined ? true : parseBool(value))
|
|
40
|
+
.action(actionRunner(async ({ bucketId, name, permissions, fileSecurity, enabled, maximumFileSize, allowedFileExtensions, compression, encryption, antivirus, transformations }) => parse(await (await getStorageClient()).createBucket(bucketId, name, permissions, fileSecurity, enabled, maximumFileSize, allowedFileExtensions, compression, encryption, antivirus, transformations))));
|
|
41
|
+
storage
|
|
42
|
+
.command(`get-bucket`)
|
|
43
|
+
.description(`Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.`)
|
|
44
|
+
.requiredOption(`--bucket-id <bucket-id>`, `Bucket unique ID.`)
|
|
45
|
+
.action(actionRunner(async ({ bucketId }) => parse(await (await getStorageClient()).getBucket(bucketId))));
|
|
46
|
+
storage
|
|
47
|
+
.command(`update-bucket`)
|
|
48
|
+
.description(`Update a storage bucket by its unique ID.`)
|
|
49
|
+
.requiredOption(`--bucket-id <bucket-id>`, `Bucket unique ID.`)
|
|
50
|
+
.requiredOption(`--name <name>`, `Bucket name`)
|
|
51
|
+
.option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
52
|
+
.option(`--file-security [value]`, `Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).`, (value) => value === undefined ? true : parseBool(value))
|
|
53
|
+
.option(`--enabled [value]`, `Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.`, (value) => value === undefined ? true : parseBool(value))
|
|
54
|
+
.option(`--maximum-file-size <maximum-file-size>`, `Maximum file size allowed in bytes. Maximum allowed value is 30MB.`, parseInteger)
|
|
55
|
+
.option(`--allowed-file-extensions [allowed-file-extensions...]`, `Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.`)
|
|
56
|
+
.option(`--compression <compression>`, `Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled`)
|
|
57
|
+
.option(`--encryption [value]`, `Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled`, (value) => value === undefined ? true : parseBool(value))
|
|
58
|
+
.option(`--antivirus [value]`, `Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled`, (value) => value === undefined ? true : parseBool(value))
|
|
59
|
+
.option(`--transformations [value]`, `Are image transformations enabled?`, (value) => value === undefined ? true : parseBool(value))
|
|
60
|
+
.action(actionRunner(async ({ bucketId, name, permissions, fileSecurity, enabled, maximumFileSize, allowedFileExtensions, compression, encryption, antivirus, transformations }) => parse(await (await getStorageClient()).updateBucket(bucketId, name, permissions, fileSecurity, enabled, maximumFileSize, allowedFileExtensions, compression, encryption, antivirus, transformations))));
|
|
61
|
+
storage
|
|
62
|
+
.command(`delete-bucket`)
|
|
63
|
+
.description(`Delete a storage bucket by its unique ID.`)
|
|
64
|
+
.requiredOption(`--bucket-id <bucket-id>`, `Bucket unique ID.`)
|
|
65
|
+
.action(actionRunner(async ({ bucketId }) => parse(await (await getStorageClient()).deleteBucket(bucketId))));
|
|
66
|
+
storage
|
|
67
|
+
.command(`list-files`)
|
|
68
|
+
.description(`Get a list of all the user files. You can use the query params to filter your results.`)
|
|
69
|
+
.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).`)
|
|
70
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded`)
|
|
71
|
+
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
72
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
73
|
+
.action(actionRunner(async ({ bucketId, queries, search, total }) => parse(await (await getStorageClient()).listFiles(bucketId, queries, search, total))));
|
|
74
|
+
storage
|
|
75
|
+
.command(`create-file`)
|
|
76
|
+
.description(`Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.
|
|
77
|
+
|
|
78
|
+
Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of \`5MB\`. The \`content-range\` header values should always be in bytes.
|
|
79
|
+
|
|
80
|
+
When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in \`x-appwrite-id\` header to allow the server to know that the partial upload is for the existing file and not for a new one.
|
|
81
|
+
|
|
82
|
+
If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.
|
|
83
|
+
`)
|
|
84
|
+
.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).`)
|
|
85
|
+
.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.`)
|
|
86
|
+
.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).`)
|
|
87
|
+
.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).`)
|
|
88
|
+
.action(actionRunner(async ({ bucketId, fileId, file, permissions }) => parse(await (await getStorageClient()).createFile(bucketId, fileId, file, permissions))));
|
|
89
|
+
storage
|
|
90
|
+
.command(`get-file`)
|
|
91
|
+
.description(`Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.`)
|
|
92
|
+
.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).`)
|
|
93
|
+
.requiredOption(`--file-id <file-id>`, `File ID.`)
|
|
94
|
+
.action(actionRunner(async ({ bucketId, fileId }) => parse(await (await getStorageClient()).getFile(bucketId, fileId))));
|
|
95
|
+
storage
|
|
96
|
+
.command(`update-file`)
|
|
97
|
+
.description(`Update a file by its unique ID. Only users with write permissions have access to update this resource.`)
|
|
98
|
+
.requiredOption(`--bucket-id <bucket-id>`, `Bucket unique ID.`)
|
|
99
|
+
.requiredOption(`--file-id <file-id>`, `File ID.`)
|
|
100
|
+
.option(`--name <name>`, `File name.`)
|
|
101
|
+
.option(`--permissions [permissions...]`, `An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).`)
|
|
102
|
+
.action(actionRunner(async ({ bucketId, fileId, name, permissions }) => parse(await (await getStorageClient()).updateFile(bucketId, fileId, name, permissions))));
|
|
103
|
+
storage
|
|
104
|
+
.command(`delete-file`)
|
|
105
|
+
.description(`Delete a file by its unique ID. Only users with write permissions have access to delete this resource.`)
|
|
106
|
+
.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).`)
|
|
107
|
+
.requiredOption(`--file-id <file-id>`, `File ID.`)
|
|
108
|
+
.action(actionRunner(async ({ bucketId, fileId }) => parse(await (await getStorageClient()).deleteFile(bucketId, fileId))));
|
|
109
|
+
storage
|
|
110
|
+
.command(`get-file-download`)
|
|
111
|
+
.description(`Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.`)
|
|
112
|
+
.requiredOption(`--bucket-id <bucket-id>`, `Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`)
|
|
113
|
+
.requiredOption(`--file-id <file-id>`, `File ID.`)
|
|
114
|
+
.option(`--token <token>`, `File token for accessing this file.`)
|
|
115
|
+
.requiredOption(`--destination <destination>`, `Path to save the file to.`)
|
|
116
|
+
.action(actionRunner(async ({ bucketId, fileId, token, destination }) => {
|
|
117
|
+
const url = await (await getStorageClient()).getFileDownload(bucketId, fileId, token);
|
|
118
|
+
const response = await fetch(url);
|
|
119
|
+
const buffer = Buffer.from(await response.arrayBuffer());
|
|
120
|
+
fs.writeFileSync(destination, buffer);
|
|
121
|
+
success(`File saved to ${destination}`);
|
|
122
|
+
}));
|
|
123
|
+
storage
|
|
124
|
+
.command(`get-file-preview`)
|
|
125
|
+
.description(`Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.`)
|
|
126
|
+
.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).`)
|
|
127
|
+
.requiredOption(`--file-id <file-id>`, `File ID`)
|
|
128
|
+
.option(`--width <width>`, `Resize preview image width, Pass an integer between 0 to 4000.`, parseInteger)
|
|
129
|
+
.option(`--height <height>`, `Resize preview image height, Pass an integer between 0 to 4000.`, parseInteger)
|
|
130
|
+
.option(`--gravity <gravity>`, `Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right`)
|
|
131
|
+
.option(`--quality <quality>`, `Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.`, parseInteger)
|
|
132
|
+
.option(`--border-width <border-width>`, `Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.`, parseInteger)
|
|
133
|
+
.option(`--border-color <border-color>`, `Preview image border color. Use a valid HEX color, no # is needed for prefix.`)
|
|
134
|
+
.option(`--border-radius <border-radius>`, `Preview image border radius in pixels. Pass an integer between 0 to 4000.`, parseInteger)
|
|
135
|
+
.option(`--opacity <opacity>`, `Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.`, parseInteger)
|
|
136
|
+
.option(`--rotation <rotation>`, `Preview image rotation in degrees. Pass an integer between -360 and 360.`, parseInteger)
|
|
137
|
+
.option(`--background <background>`, `Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.`)
|
|
138
|
+
.option(`--output <output>`, `Output format type (jpeg, jpg, png, gif and webp).`)
|
|
139
|
+
.option(`--token <token>`, `File token for accessing this file.`)
|
|
140
|
+
.requiredOption(`--destination <destination>`, `Path to save the file to.`)
|
|
141
|
+
.action(actionRunner(async ({ bucketId, fileId, width, height, gravity, quality, borderWidth, borderColor, borderRadius, opacity, rotation, background, output, token, destination }) => {
|
|
142
|
+
const url = await (await getStorageClient()).getFilePreview(bucketId, fileId, width, height, gravity, quality, borderWidth, borderColor, borderRadius, opacity, rotation, background, output, token);
|
|
143
|
+
const response = await fetch(url);
|
|
144
|
+
const buffer = Buffer.from(await response.arrayBuffer());
|
|
145
|
+
fs.writeFileSync(destination, buffer);
|
|
146
|
+
success(`File saved to ${destination}`);
|
|
147
|
+
}));
|
|
148
|
+
storage
|
|
149
|
+
.command(`get-file-view`)
|
|
150
|
+
.description(`Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.`)
|
|
151
|
+
.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).`)
|
|
152
|
+
.requiredOption(`--file-id <file-id>`, `File ID.`)
|
|
153
|
+
.option(`--token <token>`, `File token for accessing this file.`)
|
|
154
|
+
.requiredOption(`--destination <destination>`, `Path to save the file to.`)
|
|
155
|
+
.action(actionRunner(async ({ bucketId, fileId, token, destination }) => {
|
|
156
|
+
const url = await (await getStorageClient()).getFileView(bucketId, fileId, token);
|
|
157
|
+
const response = await fetch(url);
|
|
158
|
+
const buffer = Buffer.from(await response.arrayBuffer());
|
|
159
|
+
fs.writeFileSync(destination, buffer);
|
|
160
|
+
success(`File saved to ${destination}`);
|
|
161
|
+
}));
|
|
162
|
+
storage
|
|
163
|
+
.command(`get-usage`)
|
|
164
|
+
.description(`Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
165
|
+
`)
|
|
166
|
+
.option(`--range <range>`, `Date range.`)
|
|
167
|
+
.action(actionRunner(async ({ range }) => parse(await (await getStorageClient()).getUsage(range))));
|
|
168
|
+
storage
|
|
169
|
+
.command(`get-bucket-usage`)
|
|
170
|
+
.description(`Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
171
|
+
`)
|
|
172
|
+
.requiredOption(`--bucket-id <bucket-id>`, `Bucket ID.`)
|
|
173
|
+
.option(`--range <range>`, `Date range.`)
|
|
174
|
+
.action(actionRunner(async ({ bucketId, range }) => parse(await (await getStorageClient()).getBucketUsage(bucketId, range))));
|
|
175
|
+
//# sourceMappingURL=storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../../lib/commands/services/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,OAAO,EACP,KAAK,EACL,SAAS,EACT,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,OAAO,GAKR,MAAM,sBAAsB,CAAC;AAE9B,IAAI,aAAa,GAAmB,IAAI,CAAC;AAEzC,MAAM,gBAAgB,GAAG,KAAK,IAAsB,EAAE;IACpD,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,SAAS,GAAG,MAAM,aAAa,EAAE,CAAC;QACxC,aAAa,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC;KAC1C,WAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;KACjD,aAAa,CAAC;IACb,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE;CACxC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,cAAc,CAAC;KACvB,WAAW,CAAC,6FAA6F,CAAC;KAC1G,MAAM,CAAC,w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