chirag-appwrite-cli 0.1.0 → 0.2.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.
- package/.github/workflows/build-verify.yml +71 -0
- package/.github/workflows/npm-publish.yml +41 -22
- package/CHANGELOG.md +190 -1
- package/LICENSE.md +12 -1
- package/README.md +182 -15
- package/bun.lock +627 -0
- package/dist/bundle.cjs +108228 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +149 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/client.d.ts +88 -0
- package/dist/lib/client.d.ts.map +1 -0
- package/dist/lib/client.js +238 -0
- package/dist/lib/client.js.map +1 -0
- package/dist/lib/commands/config.d.ts +557 -0
- package/dist/lib/commands/config.d.ts.map +1 -0
- package/dist/lib/commands/config.js +415 -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 +17 -0
- package/dist/lib/commands/generic.d.ts.map +1 -0
- package/dist/lib/commands/generic.js +292 -0
- package/dist/lib/commands/generic.js.map +1 -0
- package/dist/lib/commands/init.d.ts +3 -0
- package/dist/lib/commands/init.d.ts.map +1 -0
- package/dist/lib/commands/init.js +526 -0
- package/dist/lib/commands/init.js.map +1 -0
- package/dist/lib/commands/pull.d.ts +110 -0
- package/dist/lib/commands/pull.d.ts.map +1 -0
- package/dist/lib/commands/pull.js +626 -0
- package/dist/lib/commands/pull.js.map +1 -0
- package/dist/lib/commands/push.d.ts +82 -0
- package/dist/lib/commands/push.d.ts.map +1 -0
- package/dist/lib/commands/push.js +1666 -0
- package/dist/lib/commands/push.js.map +1 -0
- package/dist/lib/commands/run.d.ts +3 -0
- package/dist/lib/commands/run.d.ts.map +1 -0
- package/dist/lib/commands/run.js +289 -0
- package/dist/lib/commands/run.js.map +1 -0
- package/dist/lib/commands/schema.d.ts +57 -0
- package/dist/lib/commands/schema.d.ts.map +1 -0
- package/dist/lib/commands/schema.js +75 -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 +306 -0
- package/dist/lib/commands/services/account.js.map +1 -0
- package/dist/lib/commands/services/avatars.d.ts +3 -0
- package/dist/lib/commands/services/avatars.d.ts.map +1 -0
- package/dist/lib/commands/services/avatars.js +118 -0
- package/dist/lib/commands/services/avatars.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 +41 -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 +612 -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 +258 -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 +242 -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 +153 -0
- package/dist/lib/commands/services/storage.js.map +1 -0
- package/dist/lib/commands/services/tablesdb.d.ts +3 -0
- package/dist/lib/commands/services/tablesdb.d.ts.map +1 -0
- package/dist/lib/commands/services/tablesdb.js +605 -0
- package/dist/lib/commands/services/tablesdb.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 +3 -0
- package/dist/lib/commands/types.d.ts.map +1 -0
- package/dist/lib/commands/types.js +151 -0
- package/dist/lib/commands/types.js.map +1 -0
- package/dist/lib/commands/update.d.ts +3 -0
- package/dist/lib/commands/update.d.ts.map +1 -0
- package/dist/lib/commands/update.js +201 -0
- package/dist/lib/commands/update.js.map +1 -0
- package/dist/lib/commands/utils/attributes.d.ts +46 -0
- package/dist/lib/commands/utils/attributes.d.ts.map +1 -0
- package/dist/lib/commands/utils/attributes.js +521 -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 +108 -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 +197 -0
- package/dist/lib/commands/utils/pools.js.map +1 -0
- package/dist/lib/config.d.ts +119 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +728 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/emulation/docker.d.ts +7 -0
- package/dist/lib/emulation/docker.d.ts.map +1 -0
- package/dist/lib/emulation/docker.js +224 -0
- package/dist/lib/emulation/docker.js.map +1 -0
- package/dist/lib/emulation/utils.d.ts +29 -0
- package/dist/lib/emulation/utils.d.ts.map +1 -0
- package/dist/lib/emulation/utils.js +165 -0
- package/dist/lib/emulation/utils.js.map +1 -0
- package/dist/lib/id.d.ts +7 -0
- package/dist/lib/id.d.ts.map +1 -0
- package/dist/lib/id.js +27 -0
- package/dist/lib/id.js.map +1 -0
- package/dist/lib/paginate.d.ts +9 -0
- package/dist/lib/paginate.d.ts.map +1 -0
- package/dist/lib/paginate.js +43 -0
- package/dist/lib/paginate.js.map +1 -0
- package/dist/lib/parser.d.ts +18 -0
- package/dist/lib/parser.d.ts.map +1 -0
- package/dist/lib/parser.js +225 -0
- package/dist/lib/parser.js.map +1 -0
- package/dist/lib/questions.d.ts +59 -0
- package/dist/lib/questions.d.ts.map +1 -0
- package/dist/lib/questions.js +991 -0
- package/dist/lib/questions.js.map +1 -0
- package/dist/lib/sdks.d.ts +4 -0
- package/dist/lib/sdks.d.ts.map +1 -0
- package/dist/lib/sdks.js +61 -0
- package/dist/lib/sdks.js.map +1 -0
- 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 +28 -0
- package/dist/lib/spinner.d.ts.map +1 -0
- package/dist/lib/spinner.js +91 -0
- package/dist/lib/spinner.js.map +1 -0
- package/dist/lib/type-generation/attribute.d.ts +17 -0
- package/dist/lib/type-generation/attribute.d.ts.map +1 -0
- package/dist/lib/type-generation/attribute.js +16 -0
- package/dist/lib/type-generation/attribute.js.map +1 -0
- package/dist/lib/type-generation/languages/csharp.d.ts +7 -0
- package/dist/lib/type-generation/languages/csharp.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/csharp.js +180 -0
- package/dist/lib/type-generation/languages/csharp.js.map +1 -0
- package/dist/lib/type-generation/languages/dart.d.ts +8 -0
- package/dist/lib/type-generation/languages/dart.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/dart.js +197 -0
- package/dist/lib/type-generation/languages/dart.js.map +1 -0
- package/dist/lib/type-generation/languages/java.d.ts +7 -0
- package/dist/lib/type-generation/languages/java.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/java.js +140 -0
- package/dist/lib/type-generation/languages/java.js.map +1 -0
- package/dist/lib/type-generation/languages/javascript.d.ts +9 -0
- package/dist/lib/type-generation/languages/javascript.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/javascript.js +109 -0
- package/dist/lib/type-generation/languages/javascript.js.map +1 -0
- package/dist/lib/type-generation/languages/kotlin.d.ts +7 -0
- package/dist/lib/type-generation/languages/kotlin.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/kotlin.js +95 -0
- package/dist/lib/type-generation/languages/kotlin.js.map +1 -0
- package/dist/lib/type-generation/languages/language.d.ts +43 -0
- package/dist/lib/type-generation/languages/language.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/language.js +77 -0
- package/dist/lib/type-generation/languages/language.js.map +1 -0
- package/dist/lib/type-generation/languages/php.d.ts +7 -0
- package/dist/lib/type-generation/languages/php.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/php.js +116 -0
- package/dist/lib/type-generation/languages/php.js.map +1 -0
- package/dist/lib/type-generation/languages/swift.d.ts +7 -0
- package/dist/lib/type-generation/languages/swift.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/swift.js +179 -0
- package/dist/lib/type-generation/languages/swift.js.map +1 -0
- package/dist/lib/type-generation/languages/typescript.d.ts +9 -0
- package/dist/lib/type-generation/languages/typescript.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/typescript.js +115 -0
- package/dist/lib/type-generation/languages/typescript.js.map +1 -0
- package/dist/lib/types.d.ts +63 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utils.d.ts +18 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +323 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/validations.d.ts +2 -0
- package/dist/lib/validations.d.ts.map +1 -0
- package/dist/lib/validations.js +16 -0
- package/dist/lib/validations.js.map +1 -0
- package/dist/package.json +68 -0
- package/dist/scripts/generate-commands.d.ts +2 -0
- package/dist/scripts/generate-commands.d.ts.map +1 -0
- package/dist/scripts/generate-commands.js +398 -0
- package/dist/scripts/generate-commands.js.map +1 -0
- package/dist/sites/profile-website/src/lib/utils.d.ts +4 -0
- package/dist/sites/profile-website/src/lib/utils.d.ts.map +1 -0
- package/dist/sites/profile-website/src/lib/utils.js +32 -0
- package/dist/sites/profile-website/src/lib/utils.js.map +1 -0
- package/dist/sites/profile-website/tailwind.config.d.ts +3 -0
- package/dist/sites/profile-website/tailwind.config.d.ts.map +1 -0
- package/dist/sites/profile-website/tailwind.config.js +110 -0
- package/dist/sites/profile-website/tailwind.config.js.map +1 -0
- package/dist/test.d.ts +2 -0
- package/dist/test.d.ts.map +1 -0
- package/dist/test.js +38 -0
- package/dist/test.js.map +1 -0
- package/index.ts +190 -0
- package/install.ps1 +5 -8
- package/install.sh +4 -5
- package/lib/client.ts +292 -0
- package/lib/commands/config.ts +493 -0
- package/lib/commands/db.ts +324 -0
- package/lib/commands/errors.ts +93 -0
- package/lib/commands/generic.ts +440 -0
- package/lib/commands/init.ts +713 -0
- package/lib/commands/pull.ts +944 -0
- package/lib/commands/push.ts +2355 -0
- package/lib/commands/run.ts +416 -0
- package/lib/commands/schema.ts +103 -0
- package/lib/commands/services/account.ts +832 -0
- package/lib/commands/services/avatars.ts +400 -0
- package/lib/commands/services/console.ts +73 -0
- package/lib/commands/services/databases.ts +2080 -0
- package/lib/commands/services/functions.ts +855 -0
- package/lib/commands/services/graphql.ts +47 -0
- package/lib/commands/services/health.ts +322 -0
- package/lib/commands/services/locale.ts +99 -0
- package/lib/commands/services/messaging.ts +1871 -0
- package/lib/commands/services/migrations.ts +421 -0
- package/lib/commands/services/project.ts +116 -0
- package/lib/commands/services/projects.ts +1317 -0
- package/lib/commands/services/proxy.ts +163 -0
- package/lib/commands/services/sites.ts +777 -0
- package/lib/commands/services/storage.ts +547 -0
- package/lib/commands/services/tablesdb.ts +1928 -0
- package/lib/commands/services/teams.ts +294 -0
- package/lib/commands/services/tokens.ts +106 -0
- package/lib/commands/services/users.ts +886 -0
- package/lib/commands/services/vcs.ts +268 -0
- package/lib/commands/types.ts +220 -0
- package/lib/commands/update.ts +245 -0
- package/lib/commands/utils/attributes.ts +734 -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 +180 -0
- package/lib/commands/utils/error-formatter.ts +417 -0
- package/lib/commands/utils/pools.ts +354 -0
- package/lib/config.ts +932 -0
- package/lib/emulation/docker.ts +312 -0
- package/lib/emulation/utils.ts +207 -0
- package/lib/id.ts +30 -0
- package/lib/paginate.ts +77 -0
- package/lib/parser.ts +264 -0
- package/lib/questions.ts +1167 -0
- package/lib/sdks.ts +84 -0
- package/lib/services.ts +72 -0
- package/lib/spinner.ts +131 -0
- package/lib/type-generation/attribute.ts +18 -0
- package/lib/type-generation/languages/csharp.ts +192 -0
- package/lib/type-generation/languages/dart.ts +217 -0
- package/lib/type-generation/languages/java.ts +152 -0
- package/lib/type-generation/languages/javascript.ts +122 -0
- package/lib/type-generation/languages/kotlin.ts +107 -0
- package/lib/type-generation/languages/language.ts +127 -0
- package/lib/type-generation/languages/php.ts +128 -0
- package/lib/type-generation/languages/swift.ts +191 -0
- package/lib/type-generation/languages/typescript.ts +133 -0
- package/lib/types.ts +75 -0
- package/lib/utils.ts +394 -0
- package/lib/validations.ts +20 -0
- package/package.json +39 -21
- package/scoop/appwrite.config.json +20 -0
- package/scripts/generate-commands.ts +539 -0
- package/tsconfig.json +24 -0
- package/appwrite.json +0 -164
- package/docs/examples/account/create-anonymous-session.md +0 -1
- package/docs/examples/account/create-email-password-session.md +0 -3
- package/docs/examples/account/create-email-token.md +0 -4
- package/docs/examples/account/create-j-w-t.md +0 -1
- package/docs/examples/account/create-magic-u-r-l-token.md +0 -5
- package/docs/examples/account/create-mfa-authenticator.md +0 -2
- package/docs/examples/account/create-mfa-challenge.md +0 -2
- package/docs/examples/account/create-mfa-recovery-codes.md +0 -1
- package/docs/examples/account/create-o-auth2session.md +0 -5
- package/docs/examples/account/create-o-auth2token.md +0 -5
- package/docs/examples/account/create-phone-token.md +0 -3
- package/docs/examples/account/create-phone-verification.md +0 -1
- package/docs/examples/account/create-push-target.md +0 -4
- package/docs/examples/account/create-recovery.md +0 -3
- package/docs/examples/account/create-session.md +0 -3
- package/docs/examples/account/create-verification.md +0 -2
- package/docs/examples/account/create.md +0 -5
- package/docs/examples/account/delete-identity.md +0 -2
- package/docs/examples/account/delete-mfa-authenticator.md +0 -2
- package/docs/examples/account/delete-push-target.md +0 -2
- package/docs/examples/account/delete-session.md +0 -2
- package/docs/examples/account/delete-sessions.md +0 -1
- package/docs/examples/account/delete.md +0 -1
- package/docs/examples/account/get-mfa-recovery-codes.md +0 -1
- package/docs/examples/account/get-prefs.md +0 -1
- package/docs/examples/account/get-session.md +0 -2
- package/docs/examples/account/get.md +0 -1
- package/docs/examples/account/list-identities.md +0 -2
- package/docs/examples/account/list-logs.md +0 -2
- package/docs/examples/account/list-mfa-factors.md +0 -1
- package/docs/examples/account/list-sessions.md +0 -1
- package/docs/examples/account/update-email.md +0 -3
- package/docs/examples/account/update-m-f-a.md +0 -2
- package/docs/examples/account/update-magic-u-r-l-session.md +0 -3
- package/docs/examples/account/update-mfa-authenticator.md +0 -3
- package/docs/examples/account/update-mfa-challenge.md +0 -3
- package/docs/examples/account/update-mfa-recovery-codes.md +0 -1
- package/docs/examples/account/update-name.md +0 -2
- package/docs/examples/account/update-password.md +0 -3
- package/docs/examples/account/update-phone-session.md +0 -3
- package/docs/examples/account/update-phone-verification.md +0 -3
- package/docs/examples/account/update-phone.md +0 -3
- package/docs/examples/account/update-prefs.md +0 -2
- package/docs/examples/account/update-push-target.md +0 -3
- package/docs/examples/account/update-recovery.md +0 -4
- package/docs/examples/account/update-session.md +0 -2
- package/docs/examples/account/update-status.md +0 -1
- package/docs/examples/account/update-verification.md +0 -3
- package/docs/examples/avatars/get-browser.md +0 -5
- package/docs/examples/avatars/get-credit-card.md +0 -5
- package/docs/examples/avatars/get-favicon.md +0 -2
- package/docs/examples/avatars/get-flag.md +0 -5
- package/docs/examples/avatars/get-image.md +0 -4
- package/docs/examples/avatars/get-initials.md +0 -5
- package/docs/examples/avatars/get-q-r.md +0 -5
- package/docs/examples/console/get-resource.md +0 -3
- package/docs/examples/console/variables.md +0 -1
- package/docs/examples/databases/create-boolean-attribute.md +0 -7
- package/docs/examples/databases/create-collection.md +0 -7
- package/docs/examples/databases/create-datetime-attribute.md +0 -7
- package/docs/examples/databases/create-document.md +0 -6
- package/docs/examples/databases/create-documents.md +0 -4
- package/docs/examples/databases/create-email-attribute.md +0 -7
- package/docs/examples/databases/create-enum-attribute.md +0 -8
- package/docs/examples/databases/create-float-attribute.md +0 -9
- package/docs/examples/databases/create-index.md +0 -8
- package/docs/examples/databases/create-integer-attribute.md +0 -9
- package/docs/examples/databases/create-ip-attribute.md +0 -7
- package/docs/examples/databases/create-relationship-attribute.md +0 -9
- package/docs/examples/databases/create-string-attribute.md +0 -9
- package/docs/examples/databases/create-url-attribute.md +0 -7
- package/docs/examples/databases/create.md +0 -4
- package/docs/examples/databases/decrement-document-attribute.md +0 -7
- package/docs/examples/databases/delete-attribute.md +0 -4
- package/docs/examples/databases/delete-collection.md +0 -3
- package/docs/examples/databases/delete-document.md +0 -4
- package/docs/examples/databases/delete-documents.md +0 -4
- package/docs/examples/databases/delete-index.md +0 -4
- package/docs/examples/databases/delete.md +0 -2
- package/docs/examples/databases/get-attribute.md +0 -4
- package/docs/examples/databases/get-collection-usage.md +0 -4
- package/docs/examples/databases/get-collection.md +0 -3
- package/docs/examples/databases/get-database-usage.md +0 -3
- package/docs/examples/databases/get-document.md +0 -5
- package/docs/examples/databases/get-index.md +0 -4
- package/docs/examples/databases/get-usage.md +0 -2
- package/docs/examples/databases/get.md +0 -2
- package/docs/examples/databases/increment-document-attribute.md +0 -7
- package/docs/examples/databases/list-attributes.md +0 -4
- package/docs/examples/databases/list-collection-logs.md +0 -4
- package/docs/examples/databases/list-collections.md +0 -4
- package/docs/examples/databases/list-document-logs.md +0 -5
- package/docs/examples/databases/list-documents.md +0 -4
- package/docs/examples/databases/list-indexes.md +0 -4
- package/docs/examples/databases/list-logs.md +0 -3
- package/docs/examples/databases/list.md +0 -3
- package/docs/examples/databases/update-boolean-attribute.md +0 -7
- package/docs/examples/databases/update-collection.md +0 -7
- package/docs/examples/databases/update-datetime-attribute.md +0 -7
- package/docs/examples/databases/update-document.md +0 -6
- package/docs/examples/databases/update-documents.md +0 -5
- package/docs/examples/databases/update-email-attribute.md +0 -7
- package/docs/examples/databases/update-enum-attribute.md +0 -8
- package/docs/examples/databases/update-float-attribute.md +0 -9
- package/docs/examples/databases/update-integer-attribute.md +0 -9
- package/docs/examples/databases/update-ip-attribute.md +0 -7
- package/docs/examples/databases/update-relationship-attribute.md +0 -6
- package/docs/examples/databases/update-string-attribute.md +0 -8
- package/docs/examples/databases/update-url-attribute.md +0 -7
- package/docs/examples/databases/update.md +0 -4
- package/docs/examples/databases/upsert-document.md +0 -6
- package/docs/examples/databases/upsert-documents.md +0 -4
- package/docs/examples/functions/create-deployment.md +0 -6
- package/docs/examples/functions/create-duplicate-deployment.md +0 -4
- package/docs/examples/functions/create-execution.md +0 -8
- package/docs/examples/functions/create-template-deployment.md +0 -7
- package/docs/examples/functions/create-variable.md +0 -5
- package/docs/examples/functions/create-vcs-deployment.md +0 -5
- package/docs/examples/functions/create.md +0 -19
- package/docs/examples/functions/delete-deployment.md +0 -3
- package/docs/examples/functions/delete-execution.md +0 -3
- package/docs/examples/functions/delete-variable.md +0 -3
- package/docs/examples/functions/delete.md +0 -2
- package/docs/examples/functions/get-deployment-download.md +0 -4
- package/docs/examples/functions/get-deployment.md +0 -3
- package/docs/examples/functions/get-execution.md +0 -3
- package/docs/examples/functions/get-template.md +0 -2
- package/docs/examples/functions/get-usage.md +0 -3
- package/docs/examples/functions/get-variable.md +0 -3
- package/docs/examples/functions/get.md +0 -2
- package/docs/examples/functions/list-deployments.md +0 -4
- package/docs/examples/functions/list-executions.md +0 -3
- package/docs/examples/functions/list-runtimes.md +0 -1
- package/docs/examples/functions/list-specifications.md +0 -1
- package/docs/examples/functions/list-templates.md +0 -5
- package/docs/examples/functions/list-usage.md +0 -2
- package/docs/examples/functions/list-variables.md +0 -2
- package/docs/examples/functions/list.md +0 -3
- package/docs/examples/functions/update-deployment-status.md +0 -3
- package/docs/examples/functions/update-function-deployment.md +0 -3
- package/docs/examples/functions/update-variable.md +0 -6
- package/docs/examples/functions/update.md +0 -19
- package/docs/examples/graphql/mutation.md +0 -2
- package/docs/examples/graphql/query.md +0 -2
- package/docs/examples/health/get-antivirus.md +0 -1
- package/docs/examples/health/get-cache.md +0 -1
- package/docs/examples/health/get-certificate.md +0 -2
- package/docs/examples/health/get-d-b.md +0 -1
- package/docs/examples/health/get-failed-jobs.md +0 -3
- package/docs/examples/health/get-pub-sub.md +0 -1
- package/docs/examples/health/get-queue-builds.md +0 -2
- package/docs/examples/health/get-queue-certificates.md +0 -2
- package/docs/examples/health/get-queue-databases.md +0 -3
- package/docs/examples/health/get-queue-deletes.md +0 -2
- package/docs/examples/health/get-queue-functions.md +0 -2
- package/docs/examples/health/get-queue-logs.md +0 -2
- package/docs/examples/health/get-queue-mails.md +0 -2
- package/docs/examples/health/get-queue-messaging.md +0 -2
- package/docs/examples/health/get-queue-migrations.md +0 -2
- package/docs/examples/health/get-queue-stats-resources.md +0 -2
- package/docs/examples/health/get-queue-usage.md +0 -2
- package/docs/examples/health/get-queue-webhooks.md +0 -2
- package/docs/examples/health/get-storage-local.md +0 -1
- package/docs/examples/health/get-storage.md +0 -1
- package/docs/examples/health/get-time.md +0 -1
- package/docs/examples/health/get.md +0 -1
- package/docs/examples/locale/get.md +0 -1
- package/docs/examples/locale/list-codes.md +0 -1
- package/docs/examples/locale/list-continents.md +0 -1
- package/docs/examples/locale/list-countries-e-u.md +0 -1
- package/docs/examples/locale/list-countries-phones.md +0 -1
- package/docs/examples/locale/list-countries.md +0 -1
- package/docs/examples/locale/list-currencies.md +0 -1
- package/docs/examples/locale/list-languages.md +0 -1
- package/docs/examples/messaging/create-apns-provider.md +0 -9
- package/docs/examples/messaging/create-email.md +0 -13
- package/docs/examples/messaging/create-fcm-provider.md +0 -5
- package/docs/examples/messaging/create-mailgun-provider.md +0 -11
- package/docs/examples/messaging/create-msg91provider.md +0 -7
- package/docs/examples/messaging/create-push.md +0 -20
- package/docs/examples/messaging/create-sendgrid-provider.md +0 -9
- package/docs/examples/messaging/create-sms.md +0 -8
- package/docs/examples/messaging/create-smtp-provider.md +0 -15
- package/docs/examples/messaging/create-subscriber.md +0 -4
- package/docs/examples/messaging/create-telesign-provider.md +0 -7
- package/docs/examples/messaging/create-textmagic-provider.md +0 -7
- package/docs/examples/messaging/create-topic.md +0 -4
- package/docs/examples/messaging/create-twilio-provider.md +0 -7
- package/docs/examples/messaging/create-vonage-provider.md +0 -7
- package/docs/examples/messaging/delete-provider.md +0 -2
- package/docs/examples/messaging/delete-subscriber.md +0 -3
- package/docs/examples/messaging/delete-topic.md +0 -2
- package/docs/examples/messaging/delete.md +0 -2
- package/docs/examples/messaging/get-message.md +0 -2
- package/docs/examples/messaging/get-provider.md +0 -2
- package/docs/examples/messaging/get-subscriber.md +0 -3
- package/docs/examples/messaging/get-topic.md +0 -2
- package/docs/examples/messaging/list-message-logs.md +0 -3
- package/docs/examples/messaging/list-messages.md +0 -3
- package/docs/examples/messaging/list-provider-logs.md +0 -3
- package/docs/examples/messaging/list-providers.md +0 -3
- package/docs/examples/messaging/list-subscriber-logs.md +0 -3
- package/docs/examples/messaging/list-subscribers.md +0 -4
- package/docs/examples/messaging/list-targets.md +0 -3
- package/docs/examples/messaging/list-topic-logs.md +0 -3
- package/docs/examples/messaging/list-topics.md +0 -3
- package/docs/examples/messaging/update-apns-provider.md +0 -9
- package/docs/examples/messaging/update-email.md +0 -13
- package/docs/examples/messaging/update-fcm-provider.md +0 -5
- package/docs/examples/messaging/update-mailgun-provider.md +0 -11
- package/docs/examples/messaging/update-msg91provider.md +0 -7
- package/docs/examples/messaging/update-push.md +0 -20
- package/docs/examples/messaging/update-sendgrid-provider.md +0 -9
- package/docs/examples/messaging/update-sms.md +0 -8
- package/docs/examples/messaging/update-smtp-provider.md +0 -15
- package/docs/examples/messaging/update-telesign-provider.md +0 -7
- package/docs/examples/messaging/update-textmagic-provider.md +0 -7
- package/docs/examples/messaging/update-topic.md +0 -4
- package/docs/examples/messaging/update-twilio-provider.md +0 -7
- package/docs/examples/messaging/update-vonage-provider.md +0 -7
- package/docs/examples/migrations/create-appwrite-migration.md +0 -5
- package/docs/examples/migrations/create-csv-migration.md +0 -4
- package/docs/examples/migrations/create-firebase-migration.md +0 -3
- package/docs/examples/migrations/create-n-host-migration.md +0 -9
- package/docs/examples/migrations/create-supabase-migration.md +0 -8
- package/docs/examples/migrations/delete.md +0 -2
- package/docs/examples/migrations/get-appwrite-report.md +0 -5
- package/docs/examples/migrations/get-firebase-report.md +0 -3
- package/docs/examples/migrations/get-n-host-report.md +0 -9
- package/docs/examples/migrations/get-supabase-report.md +0 -8
- package/docs/examples/migrations/get.md +0 -2
- package/docs/examples/migrations/list.md +0 -3
- package/docs/examples/migrations/retry.md +0 -2
- package/docs/examples/project/create-variable.md +0 -4
- package/docs/examples/project/delete-variable.md +0 -2
- package/docs/examples/project/get-usage.md +0 -4
- package/docs/examples/project/get-variable.md +0 -2
- package/docs/examples/project/list-variables.md +0 -1
- package/docs/examples/project/update-variable.md +0 -5
- package/docs/examples/projects/create-dev-key.md +0 -4
- package/docs/examples/projects/create-j-w-t.md +0 -4
- package/docs/examples/projects/create-key.md +0 -5
- package/docs/examples/projects/create-platform.md +0 -7
- package/docs/examples/projects/create-smtp-test.md +0 -11
- package/docs/examples/projects/create-webhook.md +0 -9
- package/docs/examples/projects/create.md +0 -14
- package/docs/examples/projects/delete-dev-key.md +0 -3
- package/docs/examples/projects/delete-email-template.md +0 -4
- package/docs/examples/projects/delete-key.md +0 -3
- package/docs/examples/projects/delete-platform.md +0 -3
- package/docs/examples/projects/delete-sms-template.md +0 -4
- package/docs/examples/projects/delete-webhook.md +0 -3
- package/docs/examples/projects/delete.md +0 -2
- package/docs/examples/projects/get-dev-key.md +0 -3
- package/docs/examples/projects/get-email-template.md +0 -4
- package/docs/examples/projects/get-key.md +0 -3
- package/docs/examples/projects/get-platform.md +0 -3
- package/docs/examples/projects/get-sms-template.md +0 -4
- package/docs/examples/projects/get-webhook.md +0 -3
- package/docs/examples/projects/get.md +0 -2
- package/docs/examples/projects/list-dev-keys.md +0 -3
- package/docs/examples/projects/list-keys.md +0 -2
- package/docs/examples/projects/list-platforms.md +0 -2
- package/docs/examples/projects/list-webhooks.md +0 -2
- package/docs/examples/projects/list.md +0 -3
- package/docs/examples/projects/update-api-status-all.md +0 -3
- package/docs/examples/projects/update-api-status.md +0 -4
- package/docs/examples/projects/update-auth-duration.md +0 -3
- package/docs/examples/projects/update-auth-limit.md +0 -3
- package/docs/examples/projects/update-auth-password-dictionary.md +0 -3
- package/docs/examples/projects/update-auth-password-history.md +0 -3
- package/docs/examples/projects/update-auth-sessions-limit.md +0 -3
- package/docs/examples/projects/update-auth-status.md +0 -4
- package/docs/examples/projects/update-dev-key.md +0 -5
- package/docs/examples/projects/update-email-template.md +0 -9
- package/docs/examples/projects/update-key.md +0 -6
- package/docs/examples/projects/update-memberships-privacy.md +0 -5
- package/docs/examples/projects/update-mock-numbers.md +0 -3
- package/docs/examples/projects/update-o-auth2.md +0 -6
- package/docs/examples/projects/update-personal-data-check.md +0 -3
- package/docs/examples/projects/update-platform.md +0 -7
- package/docs/examples/projects/update-service-status-all.md +0 -3
- package/docs/examples/projects/update-service-status.md +0 -4
- package/docs/examples/projects/update-session-alerts.md +0 -3
- package/docs/examples/projects/update-sms-template.md +0 -5
- package/docs/examples/projects/update-smtp.md +0 -11
- package/docs/examples/projects/update-team.md +0 -3
- package/docs/examples/projects/update-webhook-signature.md +0 -3
- package/docs/examples/projects/update-webhook.md +0 -10
- package/docs/examples/projects/update.md +0 -12
- package/docs/examples/proxy/create-a-p-i-rule.md +0 -2
- package/docs/examples/proxy/create-function-rule.md +0 -4
- package/docs/examples/proxy/create-redirect-rule.md +0 -6
- package/docs/examples/proxy/create-site-rule.md +0 -4
- package/docs/examples/proxy/delete-rule.md +0 -2
- package/docs/examples/proxy/get-rule.md +0 -2
- package/docs/examples/proxy/list-rules.md +0 -3
- package/docs/examples/proxy/update-rule-verification.md +0 -2
- package/docs/examples/sites/create-deployment.md +0 -7
- package/docs/examples/sites/create-duplicate-deployment.md +0 -3
- package/docs/examples/sites/create-template-deployment.md +0 -7
- package/docs/examples/sites/create-variable.md +0 -5
- package/docs/examples/sites/create-vcs-deployment.md +0 -5
- package/docs/examples/sites/create.md +0 -19
- package/docs/examples/sites/delete-deployment.md +0 -3
- package/docs/examples/sites/delete-log.md +0 -3
- package/docs/examples/sites/delete-variable.md +0 -3
- package/docs/examples/sites/delete.md +0 -2
- package/docs/examples/sites/get-deployment-download.md +0 -4
- package/docs/examples/sites/get-deployment.md +0 -3
- package/docs/examples/sites/get-log.md +0 -3
- package/docs/examples/sites/get-template.md +0 -2
- package/docs/examples/sites/get-usage.md +0 -3
- package/docs/examples/sites/get-variable.md +0 -3
- package/docs/examples/sites/get.md +0 -2
- package/docs/examples/sites/list-deployments.md +0 -4
- package/docs/examples/sites/list-frameworks.md +0 -1
- package/docs/examples/sites/list-logs.md +0 -3
- package/docs/examples/sites/list-specifications.md +0 -1
- package/docs/examples/sites/list-templates.md +0 -5
- package/docs/examples/sites/list-usage.md +0 -2
- package/docs/examples/sites/list-variables.md +0 -2
- package/docs/examples/sites/list.md +0 -3
- package/docs/examples/sites/update-deployment-status.md +0 -3
- package/docs/examples/sites/update-site-deployment.md +0 -3
- package/docs/examples/sites/update-variable.md +0 -6
- package/docs/examples/sites/update.md +0 -19
- package/docs/examples/storage/create-bucket.md +0 -11
- package/docs/examples/storage/create-file.md +0 -5
- package/docs/examples/storage/delete-bucket.md +0 -2
- package/docs/examples/storage/delete-file.md +0 -3
- package/docs/examples/storage/get-bucket-usage.md +0 -3
- package/docs/examples/storage/get-bucket.md +0 -2
- package/docs/examples/storage/get-file-download.md +0 -4
- package/docs/examples/storage/get-file-preview.md +0 -15
- package/docs/examples/storage/get-file-view.md +0 -4
- package/docs/examples/storage/get-file.md +0 -3
- package/docs/examples/storage/get-usage.md +0 -2
- package/docs/examples/storage/list-buckets.md +0 -3
- package/docs/examples/storage/list-files.md +0 -4
- package/docs/examples/storage/update-bucket.md +0 -11
- package/docs/examples/storage/update-file.md +0 -5
- package/docs/examples/teams/create-membership.md +0 -8
- package/docs/examples/teams/create.md +0 -4
- package/docs/examples/teams/delete-membership.md +0 -3
- package/docs/examples/teams/delete.md +0 -2
- package/docs/examples/teams/get-membership.md +0 -3
- package/docs/examples/teams/get-prefs.md +0 -2
- package/docs/examples/teams/get.md +0 -2
- package/docs/examples/teams/list-logs.md +0 -3
- package/docs/examples/teams/list-memberships.md +0 -4
- package/docs/examples/teams/list.md +0 -3
- package/docs/examples/teams/update-membership-status.md +0 -5
- package/docs/examples/teams/update-membership.md +0 -4
- package/docs/examples/teams/update-name.md +0 -3
- package/docs/examples/teams/update-prefs.md +0 -3
- package/docs/examples/tokens/create-file-token.md +0 -4
- package/docs/examples/tokens/delete.md +0 -2
- package/docs/examples/tokens/get.md +0 -2
- package/docs/examples/tokens/list.md +0 -4
- package/docs/examples/tokens/update.md +0 -3
- package/docs/examples/users/create-argon2user.md +0 -5
- package/docs/examples/users/create-bcrypt-user.md +0 -5
- package/docs/examples/users/create-j-w-t.md +0 -4
- package/docs/examples/users/create-m-d5user.md +0 -5
- package/docs/examples/users/create-mfa-recovery-codes.md +0 -2
- package/docs/examples/users/create-p-h-pass-user.md +0 -5
- package/docs/examples/users/create-s-h-a-user.md +0 -6
- package/docs/examples/users/create-scrypt-modified-user.md +0 -8
- package/docs/examples/users/create-scrypt-user.md +0 -10
- package/docs/examples/users/create-session.md +0 -2
- package/docs/examples/users/create-target.md +0 -7
- package/docs/examples/users/create-token.md +0 -4
- package/docs/examples/users/create.md +0 -6
- package/docs/examples/users/delete-identity.md +0 -2
- package/docs/examples/users/delete-mfa-authenticator.md +0 -3
- package/docs/examples/users/delete-session.md +0 -3
- package/docs/examples/users/delete-sessions.md +0 -2
- package/docs/examples/users/delete-target.md +0 -3
- package/docs/examples/users/delete.md +0 -2
- package/docs/examples/users/get-mfa-recovery-codes.md +0 -2
- package/docs/examples/users/get-prefs.md +0 -2
- package/docs/examples/users/get-target.md +0 -3
- package/docs/examples/users/get-usage.md +0 -2
- package/docs/examples/users/get.md +0 -2
- package/docs/examples/users/list-identities.md +0 -3
- package/docs/examples/users/list-logs.md +0 -3
- package/docs/examples/users/list-memberships.md +0 -4
- package/docs/examples/users/list-mfa-factors.md +0 -2
- package/docs/examples/users/list-sessions.md +0 -2
- package/docs/examples/users/list-targets.md +0 -3
- package/docs/examples/users/list.md +0 -3
- package/docs/examples/users/update-email-verification.md +0 -3
- package/docs/examples/users/update-email.md +0 -3
- package/docs/examples/users/update-labels.md +0 -3
- package/docs/examples/users/update-mfa-recovery-codes.md +0 -2
- package/docs/examples/users/update-mfa.md +0 -3
- package/docs/examples/users/update-name.md +0 -3
- package/docs/examples/users/update-password.md +0 -3
- package/docs/examples/users/update-phone-verification.md +0 -3
- package/docs/examples/users/update-phone.md +0 -3
- package/docs/examples/users/update-prefs.md +0 -3
- package/docs/examples/users/update-status.md +0 -3
- package/docs/examples/users/update-target.md +0 -6
- package/docs/examples/vcs/create-repository-detection.md +0 -5
- package/docs/examples/vcs/create-repository.md +0 -4
- package/docs/examples/vcs/delete-installation.md +0 -2
- package/docs/examples/vcs/get-installation.md +0 -2
- package/docs/examples/vcs/get-repository-contents.md +0 -5
- package/docs/examples/vcs/get-repository.md +0 -3
- package/docs/examples/vcs/list-installations.md +0 -3
- package/docs/examples/vcs/list-repositories.md +0 -4
- package/docs/examples/vcs/list-repository-branches.md +0 -3
- package/docs/examples/vcs/update-external-deployments.md +0 -4
- package/functions/Starter function/.prettierrc.json +0 -6
- package/functions/Starter function/README.md +0 -48
- package/functions/Starter function/package-lock.json +0 -60
- package/functions/Starter function/package.json +0 -16
- package/functions/Starter function/src/main.js +0 -35
- package/generate/appwrite.d.ts +0 -18
- package/index.js +0 -109
- package/lib/client.js +0 -259
- package/lib/commands/account.js +0 -2074
- package/lib/commands/avatars.js +0 -491
- package/lib/commands/console.js +0 -129
- package/lib/commands/databases.js +0 -2972
- package/lib/commands/functions.js +0 -1737
- package/lib/commands/generic.js +0 -328
- package/lib/commands/graphql.js +0 -128
- package/lib/commands/health.js +0 -891
- package/lib/commands/init.js +0 -566
- package/lib/commands/locale.js +0 -324
- package/lib/commands/messaging.js +0 -2970
- package/lib/commands/migrations.js +0 -751
- package/lib/commands/organizations.js +0 -48
- package/lib/commands/project.js +0 -308
- package/lib/commands/projects.js +0 -2615
- package/lib/commands/proxy.js +0 -406
- package/lib/commands/pull.js +0 -474
- package/lib/commands/push.js +0 -2117
- package/lib/commands/run.js +0 -330
- package/lib/commands/sites.js +0 -1663
- package/lib/commands/storage.js +0 -990
- package/lib/commands/teams.js +0 -682
- package/lib/commands/tokens.js +0 -261
- package/lib/commands/types.js +0 -156
- package/lib/commands/users.js +0 -2035
- package/lib/commands/vcs.js +0 -484
- package/lib/config.js +0 -705
- package/lib/emulation/docker.js +0 -264
- package/lib/emulation/utils.js +0 -186
- package/lib/exception.js +0 -9
- package/lib/id.js +0 -30
- package/lib/paginate.js +0 -52
- package/lib/parser.js +0 -246
- package/lib/questions.js +0 -1006
- package/lib/sdks.js +0 -60
- package/lib/spinner.js +0 -104
- package/lib/type-generation/attribute.js +0 -16
- package/lib/type-generation/languages/dart.js +0 -196
- package/lib/type-generation/languages/java.js +0 -130
- package/lib/type-generation/languages/javascript.js +0 -102
- package/lib/type-generation/languages/kotlin.js +0 -84
- package/lib/type-generation/languages/language.js +0 -125
- package/lib/type-generation/languages/php.js +0 -109
- package/lib/type-generation/languages/swift.js +0 -169
- package/lib/type-generation/languages/typescript.js +0 -102
- package/lib/utils.js +0 -289
- package/lib/validations.js +0 -17
- package/scoop/appwrite.json +0 -30
- package/sites/JavaScript starter/.env.example +0 -3
- package/sites/JavaScript starter/LICENSE +0 -21
- package/sites/JavaScript starter/images/appwrite.svg +0 -8
- package/sites/JavaScript starter/images/javascript.svg +0 -5
- package/sites/JavaScript starter/index.html +0 -250
- package/sites/JavaScript starter/lib/appwrite.js +0 -10
- package/sites/JavaScript starter/package-lock.json +0 -1431
- package/sites/JavaScript starter/package.json +0 -21
- package/sites/JavaScript starter/readme.md +0 -26
- package/sites/JavaScript starter/src/javascript.svg +0 -1
- package/sites/JavaScript starter/style/app.css +0 -20
- package/sites/JavaScript starter/vite.config.js +0 -7
|
@@ -0,0 +1,777 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { sdkForProject } from "../../sdks.js";
|
|
3
|
+
import {
|
|
4
|
+
actionRunner,
|
|
5
|
+
commandDescriptions,
|
|
6
|
+
parseBool,
|
|
7
|
+
parseInteger,
|
|
8
|
+
} from "../../parser.js";
|
|
9
|
+
import {
|
|
10
|
+
Sites,
|
|
11
|
+
UsageRange,
|
|
12
|
+
TemplateReferenceType,
|
|
13
|
+
VCSReferenceType,
|
|
14
|
+
DeploymentDownloadType,
|
|
15
|
+
} from "@appwrite.io/console";
|
|
16
|
+
|
|
17
|
+
let sitesClient: Sites | null = null;
|
|
18
|
+
|
|
19
|
+
const getSitesClient = async (): Promise<Sites> => {
|
|
20
|
+
if (!sitesClient) {
|
|
21
|
+
const sdkClient = await sdkForProject();
|
|
22
|
+
sitesClient = new Sites(sdkClient);
|
|
23
|
+
}
|
|
24
|
+
return sitesClient;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const sites = new Command("sites")
|
|
28
|
+
.description(commandDescriptions["sites"] ?? "")
|
|
29
|
+
.configureHelp({
|
|
30
|
+
helpWidth: process.stdout.columns || 80,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
sites
|
|
34
|
+
.command(`list`)
|
|
35
|
+
.description(
|
|
36
|
+
`Get a list of all the project's sites. You can use the query params to filter your results.`,
|
|
37
|
+
)
|
|
38
|
+
.option(
|
|
39
|
+
`--queries [queries...]`,
|
|
40
|
+
`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`,
|
|
41
|
+
)
|
|
42
|
+
.option(
|
|
43
|
+
`--search <search>`,
|
|
44
|
+
`Search term to filter your list results. Max length: 256 chars.`,
|
|
45
|
+
)
|
|
46
|
+
.option(
|
|
47
|
+
`--total [value]`,
|
|
48
|
+
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
49
|
+
(value: string | undefined) =>
|
|
50
|
+
value === undefined ? true : parseBool(value),
|
|
51
|
+
)
|
|
52
|
+
.action(
|
|
53
|
+
actionRunner(
|
|
54
|
+
async ({ queries, search, total }) =>
|
|
55
|
+
await (await getSitesClient()).list(queries, search, total),
|
|
56
|
+
),
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
sites
|
|
60
|
+
.command(`create`)
|
|
61
|
+
.description(`Create a new site.`)
|
|
62
|
+
.requiredOption(
|
|
63
|
+
`--site-id <site-id>`,
|
|
64
|
+
`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.`,
|
|
65
|
+
)
|
|
66
|
+
.requiredOption(`--name <name>`, `Site name. Max length: 128 chars.`)
|
|
67
|
+
.requiredOption(`--framework <framework>`, `Sites framework.`)
|
|
68
|
+
.option(
|
|
69
|
+
`--enabled [value]`,
|
|
70
|
+
`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.`,
|
|
71
|
+
(value: string | undefined) =>
|
|
72
|
+
value === undefined ? true : parseBool(value),
|
|
73
|
+
)
|
|
74
|
+
.option(
|
|
75
|
+
`--logging [value]`,
|
|
76
|
+
`When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.`,
|
|
77
|
+
(value: string | undefined) =>
|
|
78
|
+
value === undefined ? true : parseBool(value),
|
|
79
|
+
)
|
|
80
|
+
.option(
|
|
81
|
+
`--timeout <timeout>`,
|
|
82
|
+
`Maximum request time in seconds.`,
|
|
83
|
+
parseInteger,
|
|
84
|
+
)
|
|
85
|
+
.option(`--install-command <install-command>`, `Install Command.`)
|
|
86
|
+
.option(`--build-command <build-command>`, `Build Command.`)
|
|
87
|
+
.option(`--output-directory <output-directory>`, `Output Directory for site.`)
|
|
88
|
+
.requiredOption(
|
|
89
|
+
`--build-runtime <build-runtime>`,
|
|
90
|
+
`Runtime to use during build step.`,
|
|
91
|
+
)
|
|
92
|
+
.option(
|
|
93
|
+
`--adapter <adapter>`,
|
|
94
|
+
`Framework adapter defining rendering strategy. Allowed values are: static, ssr`,
|
|
95
|
+
)
|
|
96
|
+
.option(
|
|
97
|
+
`--installation-id <installation-id>`,
|
|
98
|
+
`Appwrite Installation ID for VCS (Version Control System) deployment.`,
|
|
99
|
+
)
|
|
100
|
+
.option(
|
|
101
|
+
`--fallback-file <fallback-file>`,
|
|
102
|
+
`Fallback file for single page application sites.`,
|
|
103
|
+
)
|
|
104
|
+
.option(
|
|
105
|
+
`--provider-repository-id <provider-repository-id>`,
|
|
106
|
+
`Repository ID of the repo linked to the site.`,
|
|
107
|
+
)
|
|
108
|
+
.option(
|
|
109
|
+
`--provider-branch <provider-branch>`,
|
|
110
|
+
`Production branch for the repo linked to the site.`,
|
|
111
|
+
)
|
|
112
|
+
.option(
|
|
113
|
+
`--provider-silent-mode [value]`,
|
|
114
|
+
`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.`,
|
|
115
|
+
(value: string | undefined) =>
|
|
116
|
+
value === undefined ? true : parseBool(value),
|
|
117
|
+
)
|
|
118
|
+
.option(
|
|
119
|
+
`--provider-root-directory <provider-root-directory>`,
|
|
120
|
+
`Path to site code in the linked repo.`,
|
|
121
|
+
)
|
|
122
|
+
.option(
|
|
123
|
+
`--specification <specification>`,
|
|
124
|
+
`Framework specification for the site and builds.`,
|
|
125
|
+
)
|
|
126
|
+
.action(
|
|
127
|
+
actionRunner(
|
|
128
|
+
async ({
|
|
129
|
+
siteId,
|
|
130
|
+
name,
|
|
131
|
+
framework,
|
|
132
|
+
enabled,
|
|
133
|
+
logging,
|
|
134
|
+
timeout,
|
|
135
|
+
installCommand,
|
|
136
|
+
buildCommand,
|
|
137
|
+
outputDirectory,
|
|
138
|
+
buildRuntime,
|
|
139
|
+
adapter,
|
|
140
|
+
installationId,
|
|
141
|
+
fallbackFile,
|
|
142
|
+
providerRepositoryId,
|
|
143
|
+
providerBranch,
|
|
144
|
+
providerSilentMode,
|
|
145
|
+
providerRootDirectory,
|
|
146
|
+
specification,
|
|
147
|
+
}) =>
|
|
148
|
+
await (
|
|
149
|
+
await getSitesClient()
|
|
150
|
+
).create(
|
|
151
|
+
siteId,
|
|
152
|
+
name,
|
|
153
|
+
framework,
|
|
154
|
+
enabled,
|
|
155
|
+
logging,
|
|
156
|
+
timeout,
|
|
157
|
+
installCommand,
|
|
158
|
+
buildCommand,
|
|
159
|
+
outputDirectory,
|
|
160
|
+
buildRuntime,
|
|
161
|
+
adapter,
|
|
162
|
+
installationId,
|
|
163
|
+
fallbackFile,
|
|
164
|
+
providerRepositoryId,
|
|
165
|
+
providerBranch,
|
|
166
|
+
providerSilentMode,
|
|
167
|
+
providerRootDirectory,
|
|
168
|
+
specification,
|
|
169
|
+
),
|
|
170
|
+
),
|
|
171
|
+
);
|
|
172
|
+
|
|
173
|
+
sites
|
|
174
|
+
.command(`list-frameworks`)
|
|
175
|
+
.description(
|
|
176
|
+
`Get a list of all frameworks that are currently available on the server instance.`,
|
|
177
|
+
)
|
|
178
|
+
.action(
|
|
179
|
+
actionRunner(async () => await (await getSitesClient()).listFrameworks()),
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
sites
|
|
183
|
+
.command(`list-specifications`)
|
|
184
|
+
.description(`List allowed site specifications for this instance.`)
|
|
185
|
+
.action(
|
|
186
|
+
actionRunner(
|
|
187
|
+
async () => await (await getSitesClient()).listSpecifications(),
|
|
188
|
+
),
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
sites
|
|
192
|
+
.command(`list-templates`)
|
|
193
|
+
.description(
|
|
194
|
+
`List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.`,
|
|
195
|
+
)
|
|
196
|
+
.option(
|
|
197
|
+
`--frameworks [frameworks...]`,
|
|
198
|
+
`List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.`,
|
|
199
|
+
)
|
|
200
|
+
.option(
|
|
201
|
+
`--use-cases [use-cases...]`,
|
|
202
|
+
`List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.`,
|
|
203
|
+
)
|
|
204
|
+
.option(
|
|
205
|
+
`--limit <limit>`,
|
|
206
|
+
`Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.`,
|
|
207
|
+
parseInteger,
|
|
208
|
+
)
|
|
209
|
+
.option(
|
|
210
|
+
`--offset <offset>`,
|
|
211
|
+
`Offset the list of returned templates. Maximum offset is 5000.`,
|
|
212
|
+
parseInteger,
|
|
213
|
+
)
|
|
214
|
+
.action(
|
|
215
|
+
actionRunner(
|
|
216
|
+
async ({ frameworks, useCases, limit, offset }) =>
|
|
217
|
+
await (
|
|
218
|
+
await getSitesClient()
|
|
219
|
+
).listTemplates(frameworks, useCases, limit, offset),
|
|
220
|
+
),
|
|
221
|
+
);
|
|
222
|
+
|
|
223
|
+
sites
|
|
224
|
+
.command(`get-template`)
|
|
225
|
+
.description(
|
|
226
|
+
`Get a site template using ID. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.`,
|
|
227
|
+
)
|
|
228
|
+
.requiredOption(`--template-id <template-id>`, `Template ID.`)
|
|
229
|
+
.action(
|
|
230
|
+
actionRunner(
|
|
231
|
+
async ({ templateId }) =>
|
|
232
|
+
await (await getSitesClient()).getTemplate(templateId),
|
|
233
|
+
),
|
|
234
|
+
);
|
|
235
|
+
|
|
236
|
+
sites
|
|
237
|
+
.command(`list-usage`)
|
|
238
|
+
.description(
|
|
239
|
+
`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.`,
|
|
240
|
+
)
|
|
241
|
+
.option(`--range <range>`, `Date range.`)
|
|
242
|
+
.action(
|
|
243
|
+
actionRunner(
|
|
244
|
+
async ({ range }) =>
|
|
245
|
+
await (await getSitesClient()).listUsage(range as UsageRange),
|
|
246
|
+
),
|
|
247
|
+
);
|
|
248
|
+
|
|
249
|
+
sites
|
|
250
|
+
.command(`get`)
|
|
251
|
+
.description(`Get a site by its unique ID.`)
|
|
252
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
253
|
+
.action(
|
|
254
|
+
actionRunner(
|
|
255
|
+
async ({ siteId }) => await (await getSitesClient()).get(siteId),
|
|
256
|
+
),
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
sites
|
|
260
|
+
.command(`update`)
|
|
261
|
+
.description(`Update site by its unique ID.`)
|
|
262
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
263
|
+
.requiredOption(`--name <name>`, `Site name. Max length: 128 chars.`)
|
|
264
|
+
.requiredOption(`--framework <framework>`, `Sites framework.`)
|
|
265
|
+
.option(
|
|
266
|
+
`--enabled [value]`,
|
|
267
|
+
`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.`,
|
|
268
|
+
(value: string | undefined) =>
|
|
269
|
+
value === undefined ? true : parseBool(value),
|
|
270
|
+
)
|
|
271
|
+
.option(
|
|
272
|
+
`--logging [value]`,
|
|
273
|
+
`When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.`,
|
|
274
|
+
(value: string | undefined) =>
|
|
275
|
+
value === undefined ? true : parseBool(value),
|
|
276
|
+
)
|
|
277
|
+
.option(
|
|
278
|
+
`--timeout <timeout>`,
|
|
279
|
+
`Maximum request time in seconds.`,
|
|
280
|
+
parseInteger,
|
|
281
|
+
)
|
|
282
|
+
.option(`--install-command <install-command>`, `Install Command.`)
|
|
283
|
+
.option(`--build-command <build-command>`, `Build Command.`)
|
|
284
|
+
.option(`--output-directory <output-directory>`, `Output Directory for site.`)
|
|
285
|
+
.option(
|
|
286
|
+
`--build-runtime <build-runtime>`,
|
|
287
|
+
`Runtime to use during build step.`,
|
|
288
|
+
)
|
|
289
|
+
.option(
|
|
290
|
+
`--adapter <adapter>`,
|
|
291
|
+
`Framework adapter defining rendering strategy. Allowed values are: static, ssr`,
|
|
292
|
+
)
|
|
293
|
+
.option(
|
|
294
|
+
`--fallback-file <fallback-file>`,
|
|
295
|
+
`Fallback file for single page application sites.`,
|
|
296
|
+
)
|
|
297
|
+
.option(
|
|
298
|
+
`--installation-id <installation-id>`,
|
|
299
|
+
`Appwrite Installation ID for VCS (Version Control System) deployment.`,
|
|
300
|
+
)
|
|
301
|
+
.option(
|
|
302
|
+
`--provider-repository-id <provider-repository-id>`,
|
|
303
|
+
`Repository ID of the repo linked to the site.`,
|
|
304
|
+
)
|
|
305
|
+
.option(
|
|
306
|
+
`--provider-branch <provider-branch>`,
|
|
307
|
+
`Production branch for the repo linked to the site.`,
|
|
308
|
+
)
|
|
309
|
+
.option(
|
|
310
|
+
`--provider-silent-mode [value]`,
|
|
311
|
+
`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.`,
|
|
312
|
+
(value: string | undefined) =>
|
|
313
|
+
value === undefined ? true : parseBool(value),
|
|
314
|
+
)
|
|
315
|
+
.option(
|
|
316
|
+
`--provider-root-directory <provider-root-directory>`,
|
|
317
|
+
`Path to site code in the linked repo.`,
|
|
318
|
+
)
|
|
319
|
+
.option(
|
|
320
|
+
`--specification <specification>`,
|
|
321
|
+
`Framework specification for the site and builds.`,
|
|
322
|
+
)
|
|
323
|
+
.action(
|
|
324
|
+
actionRunner(
|
|
325
|
+
async ({
|
|
326
|
+
siteId,
|
|
327
|
+
name,
|
|
328
|
+
framework,
|
|
329
|
+
enabled,
|
|
330
|
+
logging,
|
|
331
|
+
timeout,
|
|
332
|
+
installCommand,
|
|
333
|
+
buildCommand,
|
|
334
|
+
outputDirectory,
|
|
335
|
+
buildRuntime,
|
|
336
|
+
adapter,
|
|
337
|
+
fallbackFile,
|
|
338
|
+
installationId,
|
|
339
|
+
providerRepositoryId,
|
|
340
|
+
providerBranch,
|
|
341
|
+
providerSilentMode,
|
|
342
|
+
providerRootDirectory,
|
|
343
|
+
specification,
|
|
344
|
+
}) =>
|
|
345
|
+
await (
|
|
346
|
+
await getSitesClient()
|
|
347
|
+
).update(
|
|
348
|
+
siteId,
|
|
349
|
+
name,
|
|
350
|
+
framework,
|
|
351
|
+
enabled,
|
|
352
|
+
logging,
|
|
353
|
+
timeout,
|
|
354
|
+
installCommand,
|
|
355
|
+
buildCommand,
|
|
356
|
+
outputDirectory,
|
|
357
|
+
buildRuntime,
|
|
358
|
+
adapter,
|
|
359
|
+
fallbackFile,
|
|
360
|
+
installationId,
|
|
361
|
+
providerRepositoryId,
|
|
362
|
+
providerBranch,
|
|
363
|
+
providerSilentMode,
|
|
364
|
+
providerRootDirectory,
|
|
365
|
+
specification,
|
|
366
|
+
),
|
|
367
|
+
),
|
|
368
|
+
);
|
|
369
|
+
|
|
370
|
+
sites
|
|
371
|
+
.command(`delete`)
|
|
372
|
+
.description(`Delete a site by its unique ID.`)
|
|
373
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
374
|
+
.action(
|
|
375
|
+
actionRunner(
|
|
376
|
+
async ({ siteId }) => await (await getSitesClient()).delete(siteId),
|
|
377
|
+
),
|
|
378
|
+
);
|
|
379
|
+
|
|
380
|
+
sites
|
|
381
|
+
.command(`update-site-deployment`)
|
|
382
|
+
.description(
|
|
383
|
+
`Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.`,
|
|
384
|
+
)
|
|
385
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
386
|
+
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
|
|
387
|
+
.action(
|
|
388
|
+
actionRunner(
|
|
389
|
+
async ({ siteId, deploymentId }) =>
|
|
390
|
+
await (
|
|
391
|
+
await getSitesClient()
|
|
392
|
+
).updateSiteDeployment(siteId, deploymentId),
|
|
393
|
+
),
|
|
394
|
+
);
|
|
395
|
+
|
|
396
|
+
sites
|
|
397
|
+
.command(`list-deployments`)
|
|
398
|
+
.description(
|
|
399
|
+
`Get a list of all the site's code deployments. You can use the query params to filter your results.`,
|
|
400
|
+
)
|
|
401
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
402
|
+
.option(
|
|
403
|
+
`--queries [queries...]`,
|
|
404
|
+
`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`,
|
|
405
|
+
)
|
|
406
|
+
.option(
|
|
407
|
+
`--search <search>`,
|
|
408
|
+
`Search term to filter your list results. Max length: 256 chars.`,
|
|
409
|
+
)
|
|
410
|
+
.option(
|
|
411
|
+
`--total [value]`,
|
|
412
|
+
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
413
|
+
(value: string | undefined) =>
|
|
414
|
+
value === undefined ? true : parseBool(value),
|
|
415
|
+
)
|
|
416
|
+
.action(
|
|
417
|
+
actionRunner(
|
|
418
|
+
async ({ siteId, queries, search, total }) =>
|
|
419
|
+
await (
|
|
420
|
+
await getSitesClient()
|
|
421
|
+
).listDeployments(siteId, queries, search, total),
|
|
422
|
+
),
|
|
423
|
+
);
|
|
424
|
+
|
|
425
|
+
sites
|
|
426
|
+
.command(`create-deployment`)
|
|
427
|
+
.description(
|
|
428
|
+
`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.`,
|
|
429
|
+
)
|
|
430
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
431
|
+
.option(`--install-command <install-command>`, `Install Commands.`)
|
|
432
|
+
.option(`--build-command <build-command>`, `Build Commands.`)
|
|
433
|
+
.option(`--output-directory <output-directory>`, `Output Directory.`)
|
|
434
|
+
.requiredOption(
|
|
435
|
+
`--code <code>`,
|
|
436
|
+
`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.`,
|
|
437
|
+
)
|
|
438
|
+
.requiredOption(
|
|
439
|
+
`--activate <activate>`,
|
|
440
|
+
`Automatically activate the deployment when it is finished building.`,
|
|
441
|
+
parseBool,
|
|
442
|
+
)
|
|
443
|
+
.action(
|
|
444
|
+
actionRunner(
|
|
445
|
+
async ({
|
|
446
|
+
siteId,
|
|
447
|
+
installCommand,
|
|
448
|
+
buildCommand,
|
|
449
|
+
outputDirectory,
|
|
450
|
+
code,
|
|
451
|
+
activate,
|
|
452
|
+
}) =>
|
|
453
|
+
await (
|
|
454
|
+
await getSitesClient()
|
|
455
|
+
).createDeployment(
|
|
456
|
+
siteId,
|
|
457
|
+
installCommand,
|
|
458
|
+
buildCommand,
|
|
459
|
+
outputDirectory,
|
|
460
|
+
code,
|
|
461
|
+
activate,
|
|
462
|
+
),
|
|
463
|
+
),
|
|
464
|
+
);
|
|
465
|
+
|
|
466
|
+
sites
|
|
467
|
+
.command(`create-duplicate-deployment`)
|
|
468
|
+
.description(
|
|
469
|
+
`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.`,
|
|
470
|
+
)
|
|
471
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
472
|
+
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
|
|
473
|
+
.action(
|
|
474
|
+
actionRunner(
|
|
475
|
+
async ({ siteId, deploymentId }) =>
|
|
476
|
+
await (
|
|
477
|
+
await getSitesClient()
|
|
478
|
+
).createDuplicateDeployment(siteId, deploymentId),
|
|
479
|
+
),
|
|
480
|
+
);
|
|
481
|
+
|
|
482
|
+
sites
|
|
483
|
+
.command(`create-template-deployment`)
|
|
484
|
+
.description(
|
|
485
|
+
`Create a deployment based on a template.
|
|
486
|
+
|
|
487
|
+
Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/sites/templates) to find the template details.`,
|
|
488
|
+
)
|
|
489
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
490
|
+
.requiredOption(
|
|
491
|
+
`--repository <repository>`,
|
|
492
|
+
`Repository name of the template.`,
|
|
493
|
+
)
|
|
494
|
+
.requiredOption(`--owner <owner>`, `The name of the owner of the template.`)
|
|
495
|
+
.requiredOption(
|
|
496
|
+
`--root-directory <root-directory>`,
|
|
497
|
+
`Path to site code in the template repo.`,
|
|
498
|
+
)
|
|
499
|
+
.requiredOption(
|
|
500
|
+
`--type <type>`,
|
|
501
|
+
`Type for the reference provided. Can be commit, branch, or tag`,
|
|
502
|
+
)
|
|
503
|
+
.requiredOption(
|
|
504
|
+
`--reference <reference>`,
|
|
505
|
+
`Reference value, can be a commit hash, branch name, or release tag`,
|
|
506
|
+
)
|
|
507
|
+
.option(
|
|
508
|
+
`--activate [value]`,
|
|
509
|
+
`Automatically activate the deployment when it is finished building.`,
|
|
510
|
+
(value: string | undefined) =>
|
|
511
|
+
value === undefined ? true : parseBool(value),
|
|
512
|
+
)
|
|
513
|
+
.action(
|
|
514
|
+
actionRunner(
|
|
515
|
+
async ({
|
|
516
|
+
siteId,
|
|
517
|
+
repository,
|
|
518
|
+
owner,
|
|
519
|
+
rootDirectory,
|
|
520
|
+
xType,
|
|
521
|
+
reference,
|
|
522
|
+
activate,
|
|
523
|
+
}) =>
|
|
524
|
+
await (
|
|
525
|
+
await getSitesClient()
|
|
526
|
+
).createTemplateDeployment(
|
|
527
|
+
siteId,
|
|
528
|
+
repository,
|
|
529
|
+
owner,
|
|
530
|
+
rootDirectory,
|
|
531
|
+
xType as TemplateReferenceType,
|
|
532
|
+
reference,
|
|
533
|
+
activate,
|
|
534
|
+
),
|
|
535
|
+
),
|
|
536
|
+
);
|
|
537
|
+
|
|
538
|
+
sites
|
|
539
|
+
.command(`create-vcs-deployment`)
|
|
540
|
+
.description(
|
|
541
|
+
`Create a deployment when a site is connected to VCS.
|
|
542
|
+
|
|
543
|
+
This endpoint lets you create deployment from a branch, commit, or a tag.`,
|
|
544
|
+
)
|
|
545
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
546
|
+
.requiredOption(
|
|
547
|
+
`--type <type>`,
|
|
548
|
+
`Type of reference passed. Allowed values are: branch, commit`,
|
|
549
|
+
)
|
|
550
|
+
.requiredOption(
|
|
551
|
+
`--reference <reference>`,
|
|
552
|
+
`VCS reference to create deployment from. Depending on type this can be: branch name, commit hash`,
|
|
553
|
+
)
|
|
554
|
+
.option(
|
|
555
|
+
`--activate [value]`,
|
|
556
|
+
`Automatically activate the deployment when it is finished building.`,
|
|
557
|
+
(value: string | undefined) =>
|
|
558
|
+
value === undefined ? true : parseBool(value),
|
|
559
|
+
)
|
|
560
|
+
.action(
|
|
561
|
+
actionRunner(
|
|
562
|
+
async ({ siteId, xType, reference, activate }) =>
|
|
563
|
+
await (
|
|
564
|
+
await getSitesClient()
|
|
565
|
+
).createVcsDeployment(
|
|
566
|
+
siteId,
|
|
567
|
+
xType as VCSReferenceType,
|
|
568
|
+
reference,
|
|
569
|
+
activate,
|
|
570
|
+
),
|
|
571
|
+
),
|
|
572
|
+
);
|
|
573
|
+
|
|
574
|
+
sites
|
|
575
|
+
.command(`get-deployment`)
|
|
576
|
+
.description(`Get a site deployment by its unique ID.`)
|
|
577
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
578
|
+
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
|
|
579
|
+
.action(
|
|
580
|
+
actionRunner(
|
|
581
|
+
async ({ siteId, deploymentId }) =>
|
|
582
|
+
await (await getSitesClient()).getDeployment(siteId, deploymentId),
|
|
583
|
+
),
|
|
584
|
+
);
|
|
585
|
+
|
|
586
|
+
sites
|
|
587
|
+
.command(`delete-deployment`)
|
|
588
|
+
.description(`Delete a site deployment by its unique ID.`)
|
|
589
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
590
|
+
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
|
|
591
|
+
.action(
|
|
592
|
+
actionRunner(
|
|
593
|
+
async ({ siteId, deploymentId }) =>
|
|
594
|
+
await (await getSitesClient()).deleteDeployment(siteId, deploymentId),
|
|
595
|
+
),
|
|
596
|
+
);
|
|
597
|
+
|
|
598
|
+
sites
|
|
599
|
+
.command(`get-deployment-download`)
|
|
600
|
+
.description(
|
|
601
|
+
`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.`,
|
|
602
|
+
)
|
|
603
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
604
|
+
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
|
|
605
|
+
.option(
|
|
606
|
+
`--type <type>`,
|
|
607
|
+
`Deployment file to download. Can be: "source", "output".`,
|
|
608
|
+
)
|
|
609
|
+
.action(
|
|
610
|
+
actionRunner(
|
|
611
|
+
async ({ siteId, deploymentId, xType }) =>
|
|
612
|
+
await (
|
|
613
|
+
await getSitesClient()
|
|
614
|
+
).getDeploymentDownload(
|
|
615
|
+
siteId,
|
|
616
|
+
deploymentId,
|
|
617
|
+
xType as DeploymentDownloadType,
|
|
618
|
+
),
|
|
619
|
+
),
|
|
620
|
+
);
|
|
621
|
+
|
|
622
|
+
sites
|
|
623
|
+
.command(`update-deployment-status`)
|
|
624
|
+
.description(
|
|
625
|
+
`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.`,
|
|
626
|
+
)
|
|
627
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
628
|
+
.requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
|
|
629
|
+
.action(
|
|
630
|
+
actionRunner(
|
|
631
|
+
async ({ siteId, deploymentId }) =>
|
|
632
|
+
await (
|
|
633
|
+
await getSitesClient()
|
|
634
|
+
).updateDeploymentStatus(siteId, deploymentId),
|
|
635
|
+
),
|
|
636
|
+
);
|
|
637
|
+
|
|
638
|
+
sites
|
|
639
|
+
.command(`list-logs`)
|
|
640
|
+
.description(
|
|
641
|
+
`Get a list of all site logs. You can use the query params to filter your results.`,
|
|
642
|
+
)
|
|
643
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
644
|
+
.option(
|
|
645
|
+
`--queries [queries...]`,
|
|
646
|
+
`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`,
|
|
647
|
+
)
|
|
648
|
+
.option(
|
|
649
|
+
`--total [value]`,
|
|
650
|
+
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
651
|
+
(value: string | undefined) =>
|
|
652
|
+
value === undefined ? true : parseBool(value),
|
|
653
|
+
)
|
|
654
|
+
.action(
|
|
655
|
+
actionRunner(
|
|
656
|
+
async ({ siteId, queries, total }) =>
|
|
657
|
+
await (await getSitesClient()).listLogs(siteId, queries, total),
|
|
658
|
+
),
|
|
659
|
+
);
|
|
660
|
+
|
|
661
|
+
sites
|
|
662
|
+
.command(`get-log`)
|
|
663
|
+
.description(`Get a site request log by its unique ID.`)
|
|
664
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
665
|
+
.requiredOption(`--log-id <log-id>`, `Log ID.`)
|
|
666
|
+
.action(
|
|
667
|
+
actionRunner(
|
|
668
|
+
async ({ siteId, logId }) =>
|
|
669
|
+
await (await getSitesClient()).getLog(siteId, logId),
|
|
670
|
+
),
|
|
671
|
+
);
|
|
672
|
+
|
|
673
|
+
sites
|
|
674
|
+
.command(`delete-log`)
|
|
675
|
+
.description(`Delete a site log by its unique ID.`)
|
|
676
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
677
|
+
.requiredOption(`--log-id <log-id>`, `Log ID.`)
|
|
678
|
+
.action(
|
|
679
|
+
actionRunner(
|
|
680
|
+
async ({ siteId, logId }) =>
|
|
681
|
+
await (await getSitesClient()).deleteLog(siteId, logId),
|
|
682
|
+
),
|
|
683
|
+
);
|
|
684
|
+
|
|
685
|
+
sites
|
|
686
|
+
.command(`get-usage`)
|
|
687
|
+
.description(
|
|
688
|
+
`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.`,
|
|
689
|
+
)
|
|
690
|
+
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
691
|
+
.option(`--range <range>`, `Date range.`)
|
|
692
|
+
.action(
|
|
693
|
+
actionRunner(
|
|
694
|
+
async ({ siteId, range }) =>
|
|
695
|
+
await (await getSitesClient()).getUsage(siteId, range as UsageRange),
|
|
696
|
+
),
|
|
697
|
+
);
|
|
698
|
+
|
|
699
|
+
sites
|
|
700
|
+
.command(`list-variables`)
|
|
701
|
+
.description(`Get a list of all variables of a specific site.`)
|
|
702
|
+
.requiredOption(`--site-id <site-id>`, `Site unique ID.`)
|
|
703
|
+
.action(
|
|
704
|
+
actionRunner(
|
|
705
|
+
async ({ siteId }) =>
|
|
706
|
+
await (await getSitesClient()).listVariables(siteId),
|
|
707
|
+
),
|
|
708
|
+
);
|
|
709
|
+
|
|
710
|
+
sites
|
|
711
|
+
.command(`create-variable`)
|
|
712
|
+
.description(
|
|
713
|
+
`Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.`,
|
|
714
|
+
)
|
|
715
|
+
.requiredOption(`--site-id <site-id>`, `Site unique ID.`)
|
|
716
|
+
.requiredOption(`--key <key>`, `Variable key. Max length: 255 chars.`)
|
|
717
|
+
.requiredOption(`--value <value>`, `Variable value. Max length: 8192 chars.`)
|
|
718
|
+
.option(
|
|
719
|
+
`--secret [value]`,
|
|
720
|
+
`Secret variables can be updated or deleted, but only sites can read them during build and runtime.`,
|
|
721
|
+
(value: string | undefined) =>
|
|
722
|
+
value === undefined ? true : parseBool(value),
|
|
723
|
+
)
|
|
724
|
+
.action(
|
|
725
|
+
actionRunner(
|
|
726
|
+
async ({ siteId, key, value, secret }) =>
|
|
727
|
+
await (
|
|
728
|
+
await getSitesClient()
|
|
729
|
+
).createVariable(siteId, key, value, secret),
|
|
730
|
+
),
|
|
731
|
+
);
|
|
732
|
+
|
|
733
|
+
sites
|
|
734
|
+
.command(`get-variable`)
|
|
735
|
+
.description(`Get a variable by its unique ID.`)
|
|
736
|
+
.requiredOption(`--site-id <site-id>`, `Site unique ID.`)
|
|
737
|
+
.requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`)
|
|
738
|
+
.action(
|
|
739
|
+
actionRunner(
|
|
740
|
+
async ({ siteId, variableId }) =>
|
|
741
|
+
await (await getSitesClient()).getVariable(siteId, variableId),
|
|
742
|
+
),
|
|
743
|
+
);
|
|
744
|
+
|
|
745
|
+
sites
|
|
746
|
+
.command(`update-variable`)
|
|
747
|
+
.description(`Update variable by its unique ID.`)
|
|
748
|
+
.requiredOption(`--site-id <site-id>`, `Site unique ID.`)
|
|
749
|
+
.requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`)
|
|
750
|
+
.requiredOption(`--key <key>`, `Variable key. Max length: 255 chars.`)
|
|
751
|
+
.option(`--value <value>`, `Variable value. Max length: 8192 chars.`)
|
|
752
|
+
.option(
|
|
753
|
+
`--secret [value]`,
|
|
754
|
+
`Secret variables can be updated or deleted, but only sites can read them during build and runtime.`,
|
|
755
|
+
(value: string | undefined) =>
|
|
756
|
+
value === undefined ? true : parseBool(value),
|
|
757
|
+
)
|
|
758
|
+
.action(
|
|
759
|
+
actionRunner(
|
|
760
|
+
async ({ siteId, variableId, key, value, secret }) =>
|
|
761
|
+
await (
|
|
762
|
+
await getSitesClient()
|
|
763
|
+
).updateVariable(siteId, variableId, key, value, secret),
|
|
764
|
+
),
|
|
765
|
+
);
|
|
766
|
+
|
|
767
|
+
sites
|
|
768
|
+
.command(`delete-variable`)
|
|
769
|
+
.description(`Delete a variable by its unique ID.`)
|
|
770
|
+
.requiredOption(`--site-id <site-id>`, `Site unique ID.`)
|
|
771
|
+
.requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`)
|
|
772
|
+
.action(
|
|
773
|
+
actionRunner(
|
|
774
|
+
async ({ siteId, variableId }) =>
|
|
775
|
+
await (await getSitesClient()).deleteVariable(siteId, variableId),
|
|
776
|
+
),
|
|
777
|
+
);
|