appwrite-cli 13.0.0-rc.2 → 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/{npm-publish.yml → publish.yml} +1 -1
- package/CHANGELOG.md +106 -101
- package/LICENSE.md +2 -2
- package/README.md +36 -59
- package/cli.ts +152 -0
- package/dist/bundle.cjs +4613 -3653
- 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.map +1 -1
- package/dist/lib/client.js +7 -6
- 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/init.d.ts.map +1 -1
- package/dist/lib/commands/init.js +15 -14
- package/dist/lib/commands/init.js.map +1 -1
- package/dist/lib/commands/pull.d.ts +104 -2
- package/dist/lib/commands/pull.d.ts.map +1 -1
- package/dist/lib/commands/pull.js +470 -281
- 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 +1257 -1628
- package/dist/lib/commands/push.js.map +1 -1
- package/dist/lib/commands/run.js +1 -1
- 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.map +1 -1
- package/dist/lib/commands/services/account.js +86 -64
- package/dist/lib/commands/services/account.js.map +1 -1
- package/dist/lib/commands/services/console.d.ts.map +1 -1
- package/dist/lib/commands/services/console.js +4 -17
- package/dist/lib/commands/services/console.js.map +1 -1
- package/dist/lib/commands/services/databases.d.ts.map +1 -1
- package/dist/lib/commands/services/databases.js +160 -152
- package/dist/lib/commands/services/databases.js.map +1 -1
- package/dist/lib/commands/services/functions.d.ts.map +1 -1
- package/dist/lib/commands/services/functions.js +41 -33
- package/dist/lib/commands/services/functions.js.map +1 -1
- package/dist/lib/commands/services/graphql.d.ts.map +1 -1
- package/dist/lib/commands/services/graphql.js +3 -3
- package/dist/lib/commands/services/graphql.js.map +1 -1
- package/dist/lib/commands/services/health.d.ts.map +1 -1
- package/dist/lib/commands/services/health.js +24 -24
- package/dist/lib/commands/services/health.js.map +1 -1
- package/dist/lib/commands/services/locale.d.ts.map +1 -1
- package/dist/lib/commands/services/locale.js +9 -9
- package/dist/lib/commands/services/locale.js.map +1 -1
- package/dist/lib/commands/services/messaging.d.ts.map +1 -1
- package/dist/lib/commands/services/messaging.js +59 -59
- package/dist/lib/commands/services/messaging.js.map +1 -1
- package/dist/lib/commands/services/migrations.d.ts.map +1 -1
- package/dist/lib/commands/services/migrations.js +19 -19
- package/dist/lib/commands/services/migrations.js.map +1 -1
- package/dist/lib/commands/services/project.d.ts.map +1 -1
- package/dist/lib/commands/services/project.js +8 -8
- package/dist/lib/commands/services/project.js.map +1 -1
- package/dist/lib/commands/services/projects.d.ts.map +1 -1
- package/dist/lib/commands/services/projects.js +64 -64
- package/dist/lib/commands/services/projects.js.map +1 -1
- package/dist/lib/commands/services/proxy.d.ts.map +1 -1
- package/dist/lib/commands/services/proxy.js +11 -11
- package/dist/lib/commands/services/proxy.js.map +1 -1
- package/dist/lib/commands/services/sites.d.ts.map +1 -1
- package/dist/lib/commands/services/sites.js +41 -33
- package/dist/lib/commands/services/sites.js.map +1 -1
- package/dist/lib/commands/services/storage.d.ts.map +1 -1
- package/dist/lib/commands/services/storage.js +38 -16
- package/dist/lib/commands/services/storage.js.map +1 -1
- 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/{tablesdb.js → tables-db.js} +171 -163
- package/dist/lib/commands/services/tables-db.js.map +1 -0
- package/dist/lib/commands/services/teams.d.ts.map +1 -1
- package/dist/lib/commands/services/teams.js +16 -16
- package/dist/lib/commands/services/teams.js.map +1 -1
- package/dist/lib/commands/services/tokens.d.ts.map +1 -1
- package/dist/lib/commands/services/tokens.js +6 -6
- package/dist/lib/commands/services/tokens.js.map +1 -1
- package/dist/lib/commands/services/users.d.ts.map +1 -1
- package/dist/lib/commands/services/users.js +54 -54
- package/dist/lib/commands/services/users.js.map +1 -1
- package/dist/lib/commands/services/vcs.d.ts.map +1 -1
- package/dist/lib/commands/services/vcs.js +13 -13
- package/dist/lib/commands/services/vcs.js.map +1 -1
- package/dist/lib/commands/types.d.ts.map +1 -1
- package/dist/lib/commands/types.js +1 -1
- package/dist/lib/commands/types.js.map +1 -1
- package/dist/lib/commands/update.d.ts.map +1 -1
- package/dist/lib/commands/update.js +9 -8
- 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 +27 -26
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +8 -45
- 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 -4
- package/dist/lib/emulation/docker.d.ts.map +1 -1
- package/dist/lib/emulation/docker.js +80 -67
- package/dist/lib/emulation/docker.js.map +1 -1
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/parser.js +11 -10
- package/dist/lib/parser.js.map +1 -1
- package/dist/lib/questions.d.ts.map +1 -1
- package/dist/lib/questions.js +20 -20
- package/dist/lib/questions.js.map +1 -1
- package/dist/lib/sdks.d.ts.map +1 -1
- package/dist/lib/sdks.js +10 -11
- package/dist/lib/sdks.js.map +1 -1
- package/dist/lib/types.d.ts +0 -214
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +42 -2
- package/dist/lib/utils.js.map +1 -1
- package/dist/package.json +12 -11
- package/docs/examples/account/create-anonymous-session.md +1 -0
- package/docs/examples/account/create-email-password-session.md +3 -0
- package/docs/examples/account/create-email-token.md +3 -0
- package/docs/examples/account/create-email-verification.md +2 -0
- package/docs/examples/account/create-jwt.md +1 -0
- package/docs/examples/account/create-magic-url-token.md +3 -0
- package/docs/examples/account/create-mfa-authenticator.md +2 -0
- package/docs/examples/account/create-mfa-challenge.md +2 -0
- package/docs/examples/account/create-mfa-recovery-codes.md +1 -0
- package/docs/examples/account/create-o-auth-2-session.md +2 -0
- package/docs/examples/account/create-o-auth-2-token.md +2 -0
- package/docs/examples/account/create-phone-token.md +3 -0
- package/docs/examples/account/create-phone-verification.md +1 -0
- package/docs/examples/account/create-push-target.md +3 -0
- package/docs/examples/account/create-recovery.md +3 -0
- package/docs/examples/account/create-session.md +3 -0
- package/docs/examples/account/create-verification.md +2 -0
- package/docs/examples/account/create.md +4 -0
- package/docs/examples/account/delete-identity.md +2 -0
- package/docs/examples/account/delete-mfa-authenticator.md +2 -0
- package/docs/examples/account/delete-push-target.md +2 -0
- package/docs/examples/account/delete-session.md +2 -0
- package/docs/examples/account/delete-sessions.md +1 -0
- package/docs/examples/account/delete.md +1 -0
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -0
- package/docs/examples/account/get-prefs.md +1 -0
- package/docs/examples/account/get-session.md +2 -0
- package/docs/examples/account/get.md +1 -0
- package/docs/examples/account/list-identities.md +1 -0
- package/docs/examples/account/list-logs.md +1 -0
- package/docs/examples/account/list-mfa-factors.md +1 -0
- package/docs/examples/account/list-sessions.md +1 -0
- package/docs/examples/account/update-email-verification.md +3 -0
- package/docs/examples/account/update-email.md +3 -0
- package/docs/examples/account/update-magic-url-session.md +3 -0
- package/docs/examples/account/update-mfa-authenticator.md +3 -0
- package/docs/examples/account/update-mfa-challenge.md +3 -0
- package/docs/examples/account/update-mfa-recovery-codes.md +1 -0
- package/docs/examples/account/update-mfa.md +2 -0
- package/docs/examples/account/update-name.md +2 -0
- package/docs/examples/account/update-password.md +2 -0
- package/docs/examples/account/update-phone-session.md +3 -0
- package/docs/examples/account/update-phone-verification.md +3 -0
- package/docs/examples/account/update-phone.md +3 -0
- package/docs/examples/account/update-prefs.md +2 -0
- package/docs/examples/account/update-push-target.md +3 -0
- package/docs/examples/account/update-recovery.md +4 -0
- package/docs/examples/account/update-session.md +2 -0
- package/docs/examples/account/update-status.md +1 -0
- package/docs/examples/account/update-verification.md +3 -0
- package/docs/examples/console/get-resource.md +3 -0
- package/docs/examples/console/variables.md +1 -0
- package/docs/examples/databases/create-boolean-attribute.md +5 -0
- package/docs/examples/databases/create-collection.md +4 -0
- package/docs/examples/databases/create-datetime-attribute.md +5 -0
- package/docs/examples/databases/create-document.md +5 -0
- package/docs/examples/databases/create-documents.md +4 -0
- package/docs/examples/databases/create-email-attribute.md +5 -0
- package/docs/examples/databases/create-enum-attribute.md +6 -0
- package/docs/examples/databases/create-float-attribute.md +5 -0
- package/docs/examples/databases/create-index.md +6 -0
- package/docs/examples/databases/create-integer-attribute.md +5 -0
- package/docs/examples/databases/create-ip-attribute.md +5 -0
- package/docs/examples/databases/create-line-attribute.md +5 -0
- package/docs/examples/databases/create-operations.md +2 -0
- package/docs/examples/databases/create-point-attribute.md +5 -0
- package/docs/examples/databases/create-polygon-attribute.md +5 -0
- package/docs/examples/databases/create-relationship-attribute.md +5 -0
- package/docs/examples/databases/create-string-attribute.md +6 -0
- package/docs/examples/databases/create-transaction.md +1 -0
- package/docs/examples/databases/create-url-attribute.md +5 -0
- package/docs/examples/databases/create.md +3 -0
- package/docs/examples/databases/decrement-document-attribute.md +5 -0
- package/docs/examples/databases/delete-attribute.md +4 -0
- package/docs/examples/databases/delete-collection.md +3 -0
- package/docs/examples/databases/delete-document.md +4 -0
- package/docs/examples/databases/delete-documents.md +3 -0
- package/docs/examples/databases/delete-index.md +4 -0
- package/docs/examples/databases/delete-transaction.md +2 -0
- package/docs/examples/databases/delete.md +2 -0
- package/docs/examples/databases/get-attribute.md +4 -0
- package/docs/examples/databases/get-collection-usage.md +3 -0
- package/docs/examples/databases/get-collection.md +3 -0
- package/docs/examples/databases/get-document.md +4 -0
- package/docs/examples/databases/get-index.md +4 -0
- package/docs/examples/databases/get-transaction.md +2 -0
- package/docs/examples/databases/get-usage.md +2 -0
- package/docs/examples/databases/get.md +2 -0
- package/docs/examples/databases/increment-document-attribute.md +5 -0
- package/docs/examples/databases/list-attributes.md +3 -0
- package/docs/examples/databases/list-collection-logs.md +3 -0
- package/docs/examples/databases/list-collections.md +2 -0
- package/docs/examples/databases/list-document-logs.md +4 -0
- package/docs/examples/databases/list-documents.md +3 -0
- package/docs/examples/databases/list-indexes.md +3 -0
- package/docs/examples/databases/list-logs.md +2 -0
- package/docs/examples/databases/list-transactions.md +1 -0
- package/docs/examples/databases/list-usage.md +1 -0
- package/docs/examples/databases/list.md +1 -0
- package/docs/examples/databases/update-boolean-attribute.md +6 -0
- package/docs/examples/databases/update-collection.md +4 -0
- package/docs/examples/databases/update-datetime-attribute.md +6 -0
- package/docs/examples/databases/update-document.md +4 -0
- package/docs/examples/databases/update-documents.md +3 -0
- package/docs/examples/databases/update-email-attribute.md +6 -0
- package/docs/examples/databases/update-enum-attribute.md +7 -0
- package/docs/examples/databases/update-float-attribute.md +6 -0
- package/docs/examples/databases/update-integer-attribute.md +6 -0
- package/docs/examples/databases/update-ip-attribute.md +6 -0
- package/docs/examples/databases/update-line-attribute.md +5 -0
- package/docs/examples/databases/update-point-attribute.md +5 -0
- package/docs/examples/databases/update-polygon-attribute.md +5 -0
- package/docs/examples/databases/update-relationship-attribute.md +4 -0
- package/docs/examples/databases/update-string-attribute.md +6 -0
- package/docs/examples/databases/update-transaction.md +2 -0
- package/docs/examples/databases/update-url-attribute.md +6 -0
- package/docs/examples/databases/update.md +3 -0
- package/docs/examples/databases/upsert-document.md +4 -0
- package/docs/examples/databases/upsert-documents.md +4 -0
- package/docs/examples/functions/create-deployment.md +4 -0
- package/docs/examples/functions/create-duplicate-deployment.md +3 -0
- package/docs/examples/functions/create-execution.md +2 -0
- package/docs/examples/functions/create-template-deployment.md +7 -0
- package/docs/examples/functions/create-variable.md +4 -0
- package/docs/examples/functions/create-vcs-deployment.md +4 -0
- package/docs/examples/functions/create.md +4 -0
- package/docs/examples/functions/delete-deployment.md +3 -0
- package/docs/examples/functions/delete-execution.md +3 -0
- package/docs/examples/functions/delete-variable.md +3 -0
- package/docs/examples/functions/delete.md +2 -0
- package/docs/examples/functions/get-deployment-download.md +3 -0
- package/docs/examples/functions/get-deployment.md +3 -0
- package/docs/examples/functions/get-execution.md +3 -0
- package/docs/examples/functions/get-template.md +2 -0
- package/docs/examples/functions/get-usage.md +2 -0
- package/docs/examples/functions/get-variable.md +3 -0
- package/docs/examples/functions/get.md +2 -0
- package/docs/examples/functions/list-deployments.md +2 -0
- package/docs/examples/functions/list-executions.md +2 -0
- package/docs/examples/functions/list-runtimes.md +1 -0
- package/docs/examples/functions/list-specifications.md +1 -0
- package/docs/examples/functions/list-templates.md +1 -0
- package/docs/examples/functions/list-usage.md +1 -0
- package/docs/examples/functions/list-variables.md +2 -0
- package/docs/examples/functions/list.md +1 -0
- package/docs/examples/functions/update-deployment-status.md +3 -0
- package/docs/examples/functions/update-function-deployment.md +3 -0
- package/docs/examples/functions/update-variable.md +4 -0
- package/docs/examples/functions/update.md +3 -0
- package/docs/examples/graphql/mutation.md +2 -0
- package/docs/examples/graphql/query.md +2 -0
- package/docs/examples/health/get-antivirus.md +1 -0
- package/docs/examples/health/get-cache.md +1 -0
- package/docs/examples/health/get-certificate.md +1 -0
- package/docs/examples/health/get-db.md +1 -0
- package/docs/examples/health/get-failed-jobs.md +2 -0
- package/docs/examples/health/get-pub-sub.md +1 -0
- package/docs/examples/health/get-queue-builds.md +1 -0
- package/docs/examples/health/get-queue-certificates.md +1 -0
- package/docs/examples/health/get-queue-databases.md +1 -0
- package/docs/examples/health/get-queue-deletes.md +1 -0
- package/docs/examples/health/get-queue-functions.md +1 -0
- package/docs/examples/health/get-queue-logs.md +1 -0
- package/docs/examples/health/get-queue-mails.md +1 -0
- package/docs/examples/health/get-queue-messaging.md +1 -0
- package/docs/examples/health/get-queue-migrations.md +1 -0
- package/docs/examples/health/get-queue-stats-resources.md +1 -0
- package/docs/examples/health/get-queue-usage.md +1 -0
- package/docs/examples/health/get-queue-webhooks.md +1 -0
- package/docs/examples/health/get-storage-local.md +1 -0
- package/docs/examples/health/get-storage.md +1 -0
- package/docs/examples/health/get-time.md +1 -0
- package/docs/examples/health/get.md +1 -0
- package/docs/examples/locale/get.md +1 -0
- package/docs/examples/locale/list-codes.md +1 -0
- package/docs/examples/locale/list-continents.md +1 -0
- package/docs/examples/locale/list-countries-eu.md +1 -0
- package/docs/examples/locale/list-countries-phones.md +1 -0
- package/docs/examples/locale/list-countries.md +1 -0
- package/docs/examples/locale/list-currencies.md +1 -0
- package/docs/examples/locale/list-languages.md +1 -0
- package/docs/examples/messaging/create-apns-provider.md +3 -0
- package/docs/examples/messaging/create-email.md +4 -0
- package/docs/examples/messaging/create-fcm-provider.md +3 -0
- package/docs/examples/messaging/create-mailgun-provider.md +3 -0
- package/docs/examples/messaging/create-msg-91-provider.md +3 -0
- package/docs/examples/messaging/create-push.md +2 -0
- package/docs/examples/messaging/create-resend-provider.md +3 -0
- package/docs/examples/messaging/create-sendgrid-provider.md +3 -0
- package/docs/examples/messaging/create-sms.md +3 -0
- package/docs/examples/messaging/create-smtp-provider.md +4 -0
- package/docs/examples/messaging/create-subscriber.md +4 -0
- package/docs/examples/messaging/create-telesign-provider.md +3 -0
- package/docs/examples/messaging/create-textmagic-provider.md +3 -0
- package/docs/examples/messaging/create-topic.md +3 -0
- package/docs/examples/messaging/create-twilio-provider.md +3 -0
- package/docs/examples/messaging/create-vonage-provider.md +3 -0
- package/docs/examples/messaging/delete-provider.md +2 -0
- package/docs/examples/messaging/delete-subscriber.md +3 -0
- package/docs/examples/messaging/delete-topic.md +2 -0
- package/docs/examples/messaging/delete.md +2 -0
- package/docs/examples/messaging/get-message.md +2 -0
- package/docs/examples/messaging/get-provider.md +2 -0
- package/docs/examples/messaging/get-subscriber.md +3 -0
- package/docs/examples/messaging/get-topic.md +2 -0
- package/docs/examples/messaging/list-message-logs.md +2 -0
- package/docs/examples/messaging/list-messages.md +1 -0
- package/docs/examples/messaging/list-provider-logs.md +2 -0
- package/docs/examples/messaging/list-providers.md +1 -0
- package/docs/examples/messaging/list-subscriber-logs.md +2 -0
- package/docs/examples/messaging/list-subscribers.md +2 -0
- package/docs/examples/messaging/list-targets.md +2 -0
- package/docs/examples/messaging/list-topic-logs.md +2 -0
- package/docs/examples/messaging/list-topics.md +1 -0
- package/docs/examples/messaging/update-apns-provider.md +2 -0
- package/docs/examples/messaging/update-email.md +2 -0
- package/docs/examples/messaging/update-fcm-provider.md +2 -0
- package/docs/examples/messaging/update-mailgun-provider.md +2 -0
- package/docs/examples/messaging/update-msg-91-provider.md +2 -0
- package/docs/examples/messaging/update-push.md +2 -0
- package/docs/examples/messaging/update-resend-provider.md +2 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +2 -0
- package/docs/examples/messaging/update-sms.md +2 -0
- package/docs/examples/messaging/update-smtp-provider.md +2 -0
- package/docs/examples/messaging/update-telesign-provider.md +2 -0
- package/docs/examples/messaging/update-textmagic-provider.md +2 -0
- package/docs/examples/messaging/update-topic.md +2 -0
- package/docs/examples/messaging/update-twilio-provider.md +2 -0
- package/docs/examples/messaging/update-vonage-provider.md +2 -0
- package/docs/examples/migrations/create-appwrite-migration.md +5 -0
- package/docs/examples/migrations/create-csv-export.md +3 -0
- package/docs/examples/migrations/create-csv-import.md +4 -0
- package/docs/examples/migrations/create-firebase-migration.md +3 -0
- package/docs/examples/migrations/create-n-host-migration.md +8 -0
- package/docs/examples/migrations/create-supabase-migration.md +7 -0
- package/docs/examples/migrations/delete.md +2 -0
- package/docs/examples/migrations/get-appwrite-report.md +5 -0
- package/docs/examples/migrations/get-firebase-report.md +3 -0
- package/docs/examples/migrations/get-n-host-report.md +8 -0
- package/docs/examples/migrations/get-supabase-report.md +7 -0
- package/docs/examples/migrations/get.md +2 -0
- package/docs/examples/migrations/list.md +1 -0
- package/docs/examples/migrations/retry.md +2 -0
- package/docs/examples/project/create-variable.md +3 -0
- package/docs/examples/project/delete-variable.md +2 -0
- package/docs/examples/project/get-usage.md +3 -0
- package/docs/examples/project/get-variable.md +2 -0
- package/docs/examples/project/list-variables.md +1 -0
- package/docs/examples/project/update-variable.md +3 -0
- package/docs/examples/projects/create-dev-key.md +4 -0
- package/docs/examples/projects/create-jwt.md +3 -0
- package/docs/examples/projects/create-key.md +4 -0
- package/docs/examples/projects/create-platform.md +4 -0
- package/docs/examples/projects/create-smtp-test.md +6 -0
- package/docs/examples/projects/create-webhook.md +6 -0
- package/docs/examples/projects/create.md +4 -0
- package/docs/examples/projects/delete-dev-key.md +3 -0
- package/docs/examples/projects/delete-email-template.md +4 -0
- package/docs/examples/projects/delete-key.md +3 -0
- package/docs/examples/projects/delete-platform.md +3 -0
- package/docs/examples/projects/delete-sms-template.md +4 -0
- package/docs/examples/projects/delete-webhook.md +3 -0
- package/docs/examples/projects/delete.md +2 -0
- package/docs/examples/projects/get-dev-key.md +3 -0
- package/docs/examples/projects/get-email-template.md +4 -0
- package/docs/examples/projects/get-key.md +3 -0
- package/docs/examples/projects/get-platform.md +3 -0
- package/docs/examples/projects/get-sms-template.md +4 -0
- package/docs/examples/projects/get-webhook.md +3 -0
- package/docs/examples/projects/get.md +2 -0
- package/docs/examples/projects/list-dev-keys.md +2 -0
- package/docs/examples/projects/list-keys.md +2 -0
- package/docs/examples/projects/list-platforms.md +2 -0
- package/docs/examples/projects/list-webhooks.md +2 -0
- package/docs/examples/projects/list.md +1 -0
- package/docs/examples/projects/update-api-status-all.md +3 -0
- package/docs/examples/projects/update-api-status.md +4 -0
- package/docs/examples/projects/update-auth-duration.md +3 -0
- package/docs/examples/projects/update-auth-limit.md +3 -0
- package/docs/examples/projects/update-auth-password-dictionary.md +3 -0
- package/docs/examples/projects/update-auth-password-history.md +3 -0
- package/docs/examples/projects/update-auth-sessions-limit.md +3 -0
- package/docs/examples/projects/update-auth-status.md +4 -0
- package/docs/examples/projects/update-dev-key.md +5 -0
- package/docs/examples/projects/update-email-template.md +6 -0
- package/docs/examples/projects/update-key.md +5 -0
- package/docs/examples/projects/update-memberships-privacy.md +5 -0
- package/docs/examples/projects/update-mock-numbers.md +3 -0
- package/docs/examples/projects/update-o-auth-2.md +3 -0
- package/docs/examples/projects/update-personal-data-check.md +3 -0
- package/docs/examples/projects/update-platform.md +4 -0
- package/docs/examples/projects/update-service-status-all.md +3 -0
- package/docs/examples/projects/update-service-status.md +4 -0
- package/docs/examples/projects/update-session-alerts.md +3 -0
- package/docs/examples/projects/update-session-invalidation.md +3 -0
- package/docs/examples/projects/update-sms-template.md +5 -0
- package/docs/examples/projects/update-smtp.md +3 -0
- package/docs/examples/projects/update-team.md +3 -0
- package/docs/examples/projects/update-webhook-signature.md +3 -0
- package/docs/examples/projects/update-webhook.md +7 -0
- package/docs/examples/projects/update.md +3 -0
- package/docs/examples/proxy/create-api-rule.md +2 -0
- package/docs/examples/proxy/create-function-rule.md +3 -0
- package/docs/examples/proxy/create-redirect-rule.md +6 -0
- package/docs/examples/proxy/create-site-rule.md +3 -0
- package/docs/examples/proxy/delete-rule.md +2 -0
- package/docs/examples/proxy/get-rule.md +2 -0
- package/docs/examples/proxy/list-rules.md +1 -0
- package/docs/examples/proxy/update-rule-verification.md +2 -0
- package/docs/examples/sites/create-deployment.md +4 -0
- package/docs/examples/sites/create-duplicate-deployment.md +3 -0
- package/docs/examples/sites/create-template-deployment.md +7 -0
- package/docs/examples/sites/create-variable.md +4 -0
- package/docs/examples/sites/create-vcs-deployment.md +4 -0
- package/docs/examples/sites/create.md +5 -0
- package/docs/examples/sites/delete-deployment.md +3 -0
- package/docs/examples/sites/delete-log.md +3 -0
- package/docs/examples/sites/delete-variable.md +3 -0
- package/docs/examples/sites/delete.md +2 -0
- package/docs/examples/sites/get-deployment-download.md +3 -0
- package/docs/examples/sites/get-deployment.md +3 -0
- package/docs/examples/sites/get-log.md +3 -0
- package/docs/examples/sites/get-template.md +2 -0
- package/docs/examples/sites/get-usage.md +2 -0
- package/docs/examples/sites/get-variable.md +3 -0
- package/docs/examples/sites/get.md +2 -0
- package/docs/examples/sites/list-deployments.md +2 -0
- package/docs/examples/sites/list-frameworks.md +1 -0
- package/docs/examples/sites/list-logs.md +2 -0
- package/docs/examples/sites/list-specifications.md +1 -0
- package/docs/examples/sites/list-templates.md +1 -0
- package/docs/examples/sites/list-usage.md +1 -0
- package/docs/examples/sites/list-variables.md +2 -0
- package/docs/examples/sites/list.md +1 -0
- package/docs/examples/sites/update-deployment-status.md +3 -0
- package/docs/examples/sites/update-site-deployment.md +3 -0
- package/docs/examples/sites/update-variable.md +4 -0
- package/docs/examples/sites/update.md +4 -0
- package/docs/examples/storage/create-bucket.md +3 -0
- package/docs/examples/storage/create-file.md +4 -0
- package/docs/examples/storage/delete-bucket.md +2 -0
- package/docs/examples/storage/delete-file.md +3 -0
- package/docs/examples/storage/get-bucket-usage.md +2 -0
- package/docs/examples/storage/get-bucket.md +2 -0
- package/docs/examples/storage/get-file-download.md +3 -0
- package/docs/examples/storage/get-file-preview.md +3 -0
- package/docs/examples/storage/get-file-view.md +3 -0
- package/docs/examples/storage/get-file.md +3 -0
- package/docs/examples/storage/get-usage.md +1 -0
- package/docs/examples/storage/list-buckets.md +1 -0
- package/docs/examples/storage/list-files.md +2 -0
- package/docs/examples/storage/update-bucket.md +3 -0
- package/docs/examples/storage/update-file.md +3 -0
- package/docs/examples/tablesdb/create-boolean-column.md +5 -0
- package/docs/examples/tablesdb/create-datetime-column.md +5 -0
- package/docs/examples/tablesdb/create-email-column.md +5 -0
- package/docs/examples/tablesdb/create-enum-column.md +6 -0
- package/docs/examples/tablesdb/create-float-column.md +5 -0
- package/docs/examples/tablesdb/create-index.md +6 -0
- package/docs/examples/tablesdb/create-integer-column.md +5 -0
- package/docs/examples/tablesdb/create-ip-column.md +5 -0
- package/docs/examples/tablesdb/create-line-column.md +5 -0
- package/docs/examples/tablesdb/create-operations.md +2 -0
- package/docs/examples/tablesdb/create-point-column.md +5 -0
- package/docs/examples/tablesdb/create-polygon-column.md +5 -0
- package/docs/examples/tablesdb/create-relationship-column.md +5 -0
- package/docs/examples/tablesdb/create-row.md +5 -0
- package/docs/examples/tablesdb/create-rows.md +4 -0
- package/docs/examples/tablesdb/create-string-column.md +6 -0
- package/docs/examples/tablesdb/create-table.md +4 -0
- package/docs/examples/tablesdb/create-transaction.md +1 -0
- package/docs/examples/tablesdb/create-url-column.md +5 -0
- package/docs/examples/tablesdb/create.md +3 -0
- package/docs/examples/tablesdb/decrement-row-column.md +5 -0
- package/docs/examples/tablesdb/delete-column.md +4 -0
- package/docs/examples/tablesdb/delete-index.md +4 -0
- package/docs/examples/tablesdb/delete-row.md +4 -0
- package/docs/examples/tablesdb/delete-rows.md +3 -0
- package/docs/examples/tablesdb/delete-table.md +3 -0
- package/docs/examples/tablesdb/delete-transaction.md +2 -0
- package/docs/examples/tablesdb/delete.md +2 -0
- package/docs/examples/tablesdb/get-column.md +4 -0
- package/docs/examples/tablesdb/get-index.md +4 -0
- package/docs/examples/tablesdb/get-row.md +4 -0
- package/docs/examples/tablesdb/get-table-usage.md +3 -0
- package/docs/examples/tablesdb/get-table.md +3 -0
- package/docs/examples/tablesdb/get-transaction.md +2 -0
- package/docs/examples/tablesdb/get-usage.md +2 -0
- package/docs/examples/tablesdb/get.md +2 -0
- package/docs/examples/tablesdb/increment-row-column.md +5 -0
- package/docs/examples/tablesdb/list-columns.md +3 -0
- package/docs/examples/tablesdb/list-indexes.md +3 -0
- package/docs/examples/tablesdb/list-row-logs.md +4 -0
- package/docs/examples/tablesdb/list-rows.md +3 -0
- package/docs/examples/tablesdb/list-table-logs.md +3 -0
- package/docs/examples/tablesdb/list-tables.md +2 -0
- package/docs/examples/tablesdb/list-transactions.md +1 -0
- package/docs/examples/tablesdb/list-usage.md +1 -0
- package/docs/examples/tablesdb/list.md +1 -0
- package/docs/examples/tablesdb/update-boolean-column.md +6 -0
- package/docs/examples/tablesdb/update-datetime-column.md +6 -0
- package/docs/examples/tablesdb/update-email-column.md +6 -0
- package/docs/examples/tablesdb/update-enum-column.md +7 -0
- package/docs/examples/tablesdb/update-float-column.md +6 -0
- package/docs/examples/tablesdb/update-integer-column.md +6 -0
- package/docs/examples/tablesdb/update-ip-column.md +6 -0
- package/docs/examples/tablesdb/update-line-column.md +5 -0
- package/docs/examples/tablesdb/update-point-column.md +5 -0
- package/docs/examples/tablesdb/update-polygon-column.md +5 -0
- package/docs/examples/tablesdb/update-relationship-column.md +4 -0
- package/docs/examples/tablesdb/update-row.md +4 -0
- package/docs/examples/tablesdb/update-rows.md +3 -0
- package/docs/examples/tablesdb/update-string-column.md +6 -0
- package/docs/examples/tablesdb/update-table.md +4 -0
- package/docs/examples/tablesdb/update-transaction.md +2 -0
- package/docs/examples/tablesdb/update-url-column.md +6 -0
- package/docs/examples/tablesdb/update.md +3 -0
- package/docs/examples/tablesdb/upsert-row.md +4 -0
- package/docs/examples/tablesdb/upsert-rows.md +4 -0
- package/docs/examples/teams/create-membership.md +3 -0
- package/docs/examples/teams/create.md +3 -0
- package/docs/examples/teams/delete-membership.md +3 -0
- package/docs/examples/teams/delete.md +2 -0
- package/docs/examples/teams/get-membership.md +3 -0
- package/docs/examples/teams/get-prefs.md +2 -0
- package/docs/examples/teams/get.md +2 -0
- package/docs/examples/teams/list-logs.md +2 -0
- package/docs/examples/teams/list-memberships.md +2 -0
- package/docs/examples/teams/list.md +1 -0
- package/docs/examples/teams/update-membership-status.md +5 -0
- package/docs/examples/teams/update-membership.md +4 -0
- package/docs/examples/teams/update-name.md +3 -0
- package/docs/examples/teams/update-prefs.md +3 -0
- package/docs/examples/tokens/create-file-token.md +3 -0
- package/docs/examples/tokens/delete.md +2 -0
- package/docs/examples/tokens/get.md +2 -0
- package/docs/examples/tokens/list.md +3 -0
- package/docs/examples/tokens/update.md +2 -0
- package/docs/examples/users/create-argon-2-user.md +4 -0
- package/docs/examples/users/create-bcrypt-user.md +4 -0
- package/docs/examples/users/create-jwt.md +2 -0
- package/docs/examples/users/create-md-5-user.md +4 -0
- package/docs/examples/users/create-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/create-ph-pass-user.md +4 -0
- package/docs/examples/users/create-scrypt-modified-user.md +7 -0
- package/docs/examples/users/create-scrypt-user.md +9 -0
- package/docs/examples/users/create-session.md +2 -0
- package/docs/examples/users/create-sha-user.md +4 -0
- package/docs/examples/users/create-target.md +5 -0
- package/docs/examples/users/create-token.md +2 -0
- package/docs/examples/users/create.md +2 -0
- package/docs/examples/users/delete-identity.md +2 -0
- package/docs/examples/users/delete-mfa-authenticator.md +3 -0
- package/docs/examples/users/delete-session.md +3 -0
- package/docs/examples/users/delete-sessions.md +2 -0
- package/docs/examples/users/delete-target.md +3 -0
- package/docs/examples/users/delete.md +2 -0
- package/docs/examples/users/get-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/get-prefs.md +2 -0
- package/docs/examples/users/get-target.md +3 -0
- package/docs/examples/users/get-usage.md +1 -0
- package/docs/examples/users/get.md +2 -0
- package/docs/examples/users/list-identities.md +1 -0
- package/docs/examples/users/list-logs.md +2 -0
- package/docs/examples/users/list-memberships.md +2 -0
- package/docs/examples/users/list-mfa-factors.md +2 -0
- package/docs/examples/users/list-sessions.md +2 -0
- package/docs/examples/users/list-targets.md +2 -0
- package/docs/examples/users/list.md +1 -0
- package/docs/examples/users/update-email-verification.md +3 -0
- package/docs/examples/users/update-email.md +3 -0
- package/docs/examples/users/update-labels.md +3 -0
- package/docs/examples/users/update-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/update-mfa.md +3 -0
- package/docs/examples/users/update-name.md +3 -0
- package/docs/examples/users/update-password.md +3 -0
- package/docs/examples/users/update-phone-verification.md +3 -0
- package/docs/examples/users/update-phone.md +3 -0
- package/docs/examples/users/update-prefs.md +3 -0
- package/docs/examples/users/update-status.md +3 -0
- package/docs/examples/users/update-target.md +3 -0
- package/docs/examples/vcs/create-repository-detection.md +4 -0
- package/docs/examples/vcs/create-repository.md +4 -0
- package/docs/examples/vcs/delete-installation.md +2 -0
- package/docs/examples/vcs/get-installation.md +2 -0
- package/docs/examples/vcs/get-repository-contents.md +3 -0
- package/docs/examples/vcs/get-repository.md +3 -0
- package/docs/examples/vcs/list-installations.md +1 -0
- package/docs/examples/vcs/list-repositories.md +3 -0
- package/docs/examples/vcs/list-repository-branches.md +3 -0
- package/docs/examples/vcs/update-external-deployments.md +4 -0
- package/index.ts +25 -165
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.ts +14 -6
- package/lib/commands/config.ts +494 -0
- package/lib/commands/db.ts +324 -0
- package/lib/commands/errors.ts +93 -0
- package/lib/commands/init.ts +25 -14
- package/lib/commands/pull.ts +683 -420
- package/lib/commands/push.ts +1677 -2404
- package/lib/commands/run.ts +1 -1
- package/lib/commands/schema.ts +122 -0
- package/lib/commands/services/account.ts +200 -385
- package/lib/commands/services/console.ts +13 -34
- package/lib/commands/services/databases.ts +298 -1215
- package/lib/commands/services/functions.ts +115 -434
- package/lib/commands/services/graphql.ts +5 -2
- package/lib/commands/services/health.ts +87 -149
- package/lib/commands/services/locale.ts +36 -33
- package/lib/commands/services/messaging.ts +180 -999
- package/lib/commands/services/migrations.ts +54 -226
- package/lib/commands/services/project.ts +19 -23
- package/lib/commands/services/projects.ts +182 -714
- package/lib/commands/services/proxy.ts +30 -58
- package/lib/commands/services/sites.ts +107 -379
- package/lib/commands/services/storage.ts +93 -302
- package/lib/commands/services/tables-db.ts +1150 -0
- package/lib/commands/services/teams.ts +48 -110
- package/lib/commands/services/tokens.ts +16 -28
- package/lib/commands/services/users.ts +133 -403
- package/lib/commands/services/vcs.ts +48 -151
- package/lib/commands/types.ts +1 -1
- package/lib/commands/update.ts +13 -22
- 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 +46 -82
- package/lib/constants.ts +22 -0
- package/lib/emulation/docker.ts +101 -87
- package/lib/parser.ts +16 -11
- package/lib/questions.ts +20 -21
- package/lib/sdks.ts +15 -11
- package/lib/types.ts +0 -229
- package/lib/utils.ts +45 -4
- package/package.json +12 -11
- package/scoop/appwrite.config.json +29 -19
- package/.github/workflows/build-verify.yml +0 -71
- package/bun.lock +0 -625
- package/dist/lib/commands/services/avatars.d.ts +0 -3
- package/dist/lib/commands/services/avatars.d.ts.map +0 -1
- package/dist/lib/commands/services/avatars.js +0 -118
- package/dist/lib/commands/services/avatars.js.map +0 -1
- package/dist/lib/commands/services/tablesdb.d.ts +0 -3
- package/dist/lib/commands/services/tablesdb.d.ts.map +0 -1
- package/dist/lib/commands/services/tablesdb.js.map +0 -1
- package/dist/scripts/generate-commands.d.ts +0 -2
- package/dist/scripts/generate-commands.d.ts.map +0 -1
- package/dist/scripts/generate-commands.js +0 -398
- package/dist/scripts/generate-commands.js.map +0 -1
- package/lib/commands/services/avatars.ts +0 -400
- package/lib/commands/services/tablesdb.ts +0 -1928
- package/scripts/generate-commands.ts +0 -539
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
#! /usr/bin/env node
|
|
2
|
+
import { createRequire as _createRequire } from "module";
|
|
3
|
+
const __require = _createRequire(import.meta.url);
|
|
4
|
+
/** Required to set max width of the help commands */
|
|
5
|
+
const oldWidth = process.stdout.columns;
|
|
6
|
+
process.stdout.columns = 100;
|
|
7
|
+
/** ---------------------------------------------- */
|
|
8
|
+
import { program } from 'commander';
|
|
9
|
+
const chalk = __require("chalk");
|
|
10
|
+
const { version } = require('../package.json');
|
|
11
|
+
import { commandDescriptions, cliConfig } from './lib/parser.js';
|
|
12
|
+
import { client } from './lib/commands/generic.js';
|
|
13
|
+
import { getLatestVersion, compareVersions } from './lib/utils.js';
|
|
14
|
+
const inquirer = __require("inquirer");
|
|
15
|
+
import { login, logout, whoami, migrate, register } from './lib/commands/generic.js';
|
|
16
|
+
import { init } from './lib/commands/init.js';
|
|
17
|
+
import { types } from './lib/commands/types.js';
|
|
18
|
+
import { pull } from './lib/commands/pull.js';
|
|
19
|
+
import { run } from './lib/commands/run.js';
|
|
20
|
+
import { push, deploy } from './lib/commands/push.js';
|
|
21
|
+
import { update } from './lib/commands/update.js';
|
|
22
|
+
import { account } from './lib/commands/services/account.js';
|
|
23
|
+
import { console } from './lib/commands/services/console.js';
|
|
24
|
+
import { databases } from './lib/commands/services/databases.js';
|
|
25
|
+
import { functions } from './lib/commands/services/functions.js';
|
|
26
|
+
import { graphql } from './lib/commands/services/graphql.js';
|
|
27
|
+
import { health } from './lib/commands/services/health.js';
|
|
28
|
+
import { locale } from './lib/commands/services/locale.js';
|
|
29
|
+
import { messaging } from './lib/commands/services/messaging.js';
|
|
30
|
+
import { migrations } from './lib/commands/services/migrations.js';
|
|
31
|
+
import { project } from './lib/commands/services/project.js';
|
|
32
|
+
import { projects } from './lib/commands/services/projects.js';
|
|
33
|
+
import { proxy } from './lib/commands/services/proxy.js';
|
|
34
|
+
import { sites } from './lib/commands/services/sites.js';
|
|
35
|
+
import { storage } from './lib/commands/services/storage.js';
|
|
36
|
+
import { tablesDB } from './lib/commands/services/tables-db.js';
|
|
37
|
+
import { teams } from './lib/commands/services/teams.js';
|
|
38
|
+
import { tokens } from './lib/commands/services/tokens.js';
|
|
39
|
+
import { users } from './lib/commands/services/users.js';
|
|
40
|
+
import { vcs } from './lib/commands/services/vcs.js';
|
|
41
|
+
inquirer.registerPrompt('search-list', require('inquirer-search-list'));
|
|
42
|
+
/**
|
|
43
|
+
* Check for updates and show version information
|
|
44
|
+
*/
|
|
45
|
+
async function checkVersion() {
|
|
46
|
+
process.stdout.write(chalk.bold(`appwrite version ${version}`) + '\n');
|
|
47
|
+
try {
|
|
48
|
+
const latestVersion = await getLatestVersion();
|
|
49
|
+
const comparison = compareVersions(version, latestVersion);
|
|
50
|
+
if (comparison > 0) {
|
|
51
|
+
// Current version is older than latest
|
|
52
|
+
process.stdout.write(chalk.yellow(`\n⚠️ A newer version is available: ${chalk.bold(latestVersion)}`) + '\n');
|
|
53
|
+
process.stdout.write(chalk.cyan(`💡 Run '${chalk.bold('appwrite update')}' to update to the latest version.`) + '\n');
|
|
54
|
+
}
|
|
55
|
+
else if (comparison === 0) {
|
|
56
|
+
process.stdout.write(chalk.green('\n✅ You are running the latest version!') + '\n');
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
// Current version is newer than latest (pre-release/dev)
|
|
60
|
+
process.stdout.write(chalk.blue('\n🚀 You are running a pre-release or development version.') + '\n');
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
// Silently fail version check, just show current version
|
|
65
|
+
process.stdout.write(chalk.gray('\n(Unable to check for updates)') + '\n');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// Intercept version flag before Commander.js processes it
|
|
69
|
+
if (process.argv.includes('-v') || process.argv.includes('--version')) {
|
|
70
|
+
(async () => {
|
|
71
|
+
await checkVersion();
|
|
72
|
+
process.exit(0);
|
|
73
|
+
})();
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
program
|
|
77
|
+
.description(commandDescriptions['main'])
|
|
78
|
+
.configureHelp({
|
|
79
|
+
helpWidth: process.stdout.columns || 80,
|
|
80
|
+
sortSubcommands: true,
|
|
81
|
+
})
|
|
82
|
+
.helpOption('-h, --help', 'Display help for command')
|
|
83
|
+
.version(version, '-v, --version', 'Output the version number')
|
|
84
|
+
.option('-V, --verbose', 'Show complete error log')
|
|
85
|
+
.option('-j, --json', 'Output in JSON format')
|
|
86
|
+
.hook('preAction', migrate)
|
|
87
|
+
.option('-f,--force', 'Flag to confirm all warnings')
|
|
88
|
+
.option('-a,--all', 'Flag to push all resources')
|
|
89
|
+
.option('--id [id...]', 'Flag to pass a list of ids for a given action')
|
|
90
|
+
.option('--report', 'Enable reporting in case of CLI errors')
|
|
91
|
+
.on('option:json', () => {
|
|
92
|
+
cliConfig.json = true;
|
|
93
|
+
})
|
|
94
|
+
.on('option:verbose', () => {
|
|
95
|
+
cliConfig.verbose = true;
|
|
96
|
+
})
|
|
97
|
+
.on('option:report', function () {
|
|
98
|
+
cliConfig.report = true;
|
|
99
|
+
cliConfig.reportData = { data: this };
|
|
100
|
+
})
|
|
101
|
+
.on('option:force', () => {
|
|
102
|
+
cliConfig.force = true;
|
|
103
|
+
})
|
|
104
|
+
.on('option:all', () => {
|
|
105
|
+
cliConfig.all = true;
|
|
106
|
+
})
|
|
107
|
+
.on('option:id', function () {
|
|
108
|
+
cliConfig.ids = this.opts().id;
|
|
109
|
+
})
|
|
110
|
+
.showSuggestionAfterError()
|
|
111
|
+
.addCommand(whoami)
|
|
112
|
+
.addCommand(register)
|
|
113
|
+
.addCommand(login)
|
|
114
|
+
.addCommand(init)
|
|
115
|
+
.addCommand(pull)
|
|
116
|
+
.addCommand(push)
|
|
117
|
+
.addCommand(types)
|
|
118
|
+
.addCommand(deploy)
|
|
119
|
+
.addCommand(run)
|
|
120
|
+
.addCommand(update)
|
|
121
|
+
.addCommand(logout)
|
|
122
|
+
.addCommand(account)
|
|
123
|
+
.addCommand(console)
|
|
124
|
+
.addCommand(databases)
|
|
125
|
+
.addCommand(functions)
|
|
126
|
+
.addCommand(graphql)
|
|
127
|
+
.addCommand(health)
|
|
128
|
+
.addCommand(locale)
|
|
129
|
+
.addCommand(messaging)
|
|
130
|
+
.addCommand(migrations)
|
|
131
|
+
.addCommand(project)
|
|
132
|
+
.addCommand(projects)
|
|
133
|
+
.addCommand(proxy)
|
|
134
|
+
.addCommand(sites)
|
|
135
|
+
.addCommand(storage)
|
|
136
|
+
.addCommand(tablesDB)
|
|
137
|
+
.addCommand(teams)
|
|
138
|
+
.addCommand(tokens)
|
|
139
|
+
.addCommand(users)
|
|
140
|
+
.addCommand(vcs)
|
|
141
|
+
.addCommand(client)
|
|
142
|
+
.parse(process.argv);
|
|
143
|
+
process.stdout.columns = oldWidth;
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";;;AAEA,qDAAqD;AACrD,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;AACxC,OAAO,CAAC,MAAM,CAAC,OAAO,GAAG,GAAG,CAAC;AAC7B,qDAAqD;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,iCAAgC;AAChC,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACnE,uCAAsC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MA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
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Library exports for programmatic use of the Appwrite CLI
|
|
3
|
+
*
|
|
4
|
+
* For CLI usage, run the 'appwrite' command directly.
|
|
5
|
+
*/
|
|
6
|
+
import { Push } from "./lib/commands/push.js";
|
|
7
|
+
import { Pull } from "./lib/commands/pull.js";
|
|
8
|
+
import { Schema } from "./lib/commands/schema.js";
|
|
9
|
+
export { Schema, Push, Pull };
|
|
10
|
+
export type { ConfigType, SettingsType, FunctionType, SiteType, DatabaseType, CollectionType, TableType, TopicType, TeamType, MessageType, BucketType, AttributeType, IndexType, ColumnType, TableIndexType, } from "./lib/commands/config.js";
|
|
3
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC9B,YAAY,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,SAAS,EACT,SAAS,EACT,QAAQ,EACR,WAAW,EACX,UAAU,EACV,aAAa,EACb,SAAS,EACT,UAAU,EACV,cAAc,GACf,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,145 +1,10 @@
|
|
|
1
|
-
#! /usr/bin/env node
|
|
2
|
-
/** Required to set max width of the help commands */
|
|
3
|
-
const oldWidth = process.stdout.columns;
|
|
4
|
-
process.stdout.columns = 100;
|
|
5
|
-
/** ---------------------------------------------- */
|
|
6
|
-
import { program } from "commander";
|
|
7
|
-
import chalk from "chalk";
|
|
8
|
-
import packageJson from "./package.json" with { type: "json" };
|
|
9
|
-
const { version } = packageJson;
|
|
10
|
-
import { commandDescriptions, cliConfig } from "./lib/parser.js";
|
|
11
|
-
import { client } from "./lib/commands/generic.js";
|
|
12
|
-
import { getLatestVersion, compareVersions } from "./lib/utils.js";
|
|
13
|
-
import inquirer from "inquirer";
|
|
14
|
-
import { login, logout, whoami, migrate, register, } from "./lib/commands/generic.js";
|
|
15
|
-
import { init } from "./lib/commands/init.js";
|
|
16
|
-
import { types } from "./lib/commands/types.js";
|
|
17
|
-
import { pull } from "./lib/commands/pull.js";
|
|
18
|
-
import { run } from "./lib/commands/run.js";
|
|
19
|
-
import { push, deploy } from "./lib/commands/push.js";
|
|
20
|
-
import { update } from "./lib/commands/update.js";
|
|
21
|
-
import { account } from "./lib/commands/services/account.js";
|
|
22
|
-
import { console } from "./lib/commands/services/console.js";
|
|
23
|
-
import { databases } from "./lib/commands/services/databases.js";
|
|
24
|
-
import { functions } from "./lib/commands/services/functions.js";
|
|
25
|
-
import { graphql } from "./lib/commands/services/graphql.js";
|
|
26
|
-
import { health } from "./lib/commands/services/health.js";
|
|
27
|
-
import { locale } from "./lib/commands/services/locale.js";
|
|
28
|
-
import { messaging } from "./lib/commands/services/messaging.js";
|
|
29
|
-
import { migrations } from "./lib/commands/services/migrations.js";
|
|
30
|
-
import { project } from "./lib/commands/services/project.js";
|
|
31
|
-
import { projects } from "./lib/commands/services/projects.js";
|
|
32
|
-
import { proxy } from "./lib/commands/services/proxy.js";
|
|
33
|
-
import { sites } from "./lib/commands/services/sites.js";
|
|
34
|
-
import { storage } from "./lib/commands/services/storage.js";
|
|
35
|
-
import { tablesdb } from "./lib/commands/services/tablesdb.js";
|
|
36
|
-
import { teams } from "./lib/commands/services/teams.js";
|
|
37
|
-
import { tokens } from "./lib/commands/services/tokens.js";
|
|
38
|
-
import { users } from "./lib/commands/services/users.js";
|
|
39
|
-
import { vcs } from "./lib/commands/services/vcs.js";
|
|
40
|
-
import searchList from "inquirer-search-list";
|
|
41
|
-
inquirer.registerPrompt("search-list", searchList);
|
|
42
1
|
/**
|
|
43
|
-
*
|
|
2
|
+
* Library exports for programmatic use of the Appwrite CLI
|
|
3
|
+
*
|
|
4
|
+
* For CLI usage, run the 'appwrite' command directly.
|
|
44
5
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const comparison = compareVersions(version, latestVersion);
|
|
50
|
-
if (comparison > 0) {
|
|
51
|
-
// Current version is older than latest
|
|
52
|
-
process.stdout.write(chalk.yellow(`\n⚠️ A newer version is available: ${chalk.bold(latestVersion)}`) + "\n");
|
|
53
|
-
process.stdout.write(chalk.cyan(`💡 Run '${chalk.bold("appwrite update")}' to update to the latest version.`) + "\n");
|
|
54
|
-
}
|
|
55
|
-
else if (comparison === 0) {
|
|
56
|
-
process.stdout.write(chalk.green("\n✅ You are running the latest version!") + "\n");
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
// Current version is newer than latest (pre-release/dev)
|
|
60
|
-
process.stdout.write(chalk.blue("\n🚀 You are running a pre-release or development version.") + "\n");
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
catch (error) {
|
|
64
|
-
// Silently fail version check, just show current version
|
|
65
|
-
process.stdout.write(chalk.gray("\n(Unable to check for updates)") + "\n");
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
// Intercept version flag before Commander.js processes it
|
|
69
|
-
if (process.argv.includes("-v") || process.argv.includes("--version")) {
|
|
70
|
-
(async () => {
|
|
71
|
-
await checkVersion();
|
|
72
|
-
process.exit(0);
|
|
73
|
-
})();
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
program
|
|
77
|
-
.description(commandDescriptions["main"])
|
|
78
|
-
.configureHelp({
|
|
79
|
-
helpWidth: process.stdout.columns || 80,
|
|
80
|
-
sortSubcommands: true,
|
|
81
|
-
})
|
|
82
|
-
.helpOption("-h, --help", "Display help for command")
|
|
83
|
-
.version(version, "-v, --version", "Output the version number")
|
|
84
|
-
.option("-V, --verbose", "Show complete error log")
|
|
85
|
-
.option("-j, --json", "Output in JSON format")
|
|
86
|
-
.hook("preAction", migrate)
|
|
87
|
-
.option("-f,--force", "Flag to confirm all warnings")
|
|
88
|
-
.option("-a,--all", "Flag to push all resources")
|
|
89
|
-
.option("--id [id...]", "Flag to pass a list of ids for a given action")
|
|
90
|
-
.option("--report", "Enable reporting in case of CLI errors")
|
|
91
|
-
.on("option:json", () => {
|
|
92
|
-
cliConfig.json = true;
|
|
93
|
-
})
|
|
94
|
-
.on("option:verbose", () => {
|
|
95
|
-
cliConfig.verbose = true;
|
|
96
|
-
})
|
|
97
|
-
.on("option:report", function () {
|
|
98
|
-
cliConfig.report = true;
|
|
99
|
-
cliConfig.reportData = { data: this };
|
|
100
|
-
})
|
|
101
|
-
.on("option:force", () => {
|
|
102
|
-
cliConfig.force = true;
|
|
103
|
-
})
|
|
104
|
-
.on("option:all", () => {
|
|
105
|
-
cliConfig.all = true;
|
|
106
|
-
})
|
|
107
|
-
.on("option:id", function () {
|
|
108
|
-
cliConfig.ids = this.opts().id;
|
|
109
|
-
})
|
|
110
|
-
.showSuggestionAfterError()
|
|
111
|
-
.addCommand(whoami)
|
|
112
|
-
.addCommand(register)
|
|
113
|
-
.addCommand(login)
|
|
114
|
-
.addCommand(init)
|
|
115
|
-
.addCommand(pull)
|
|
116
|
-
.addCommand(push)
|
|
117
|
-
.addCommand(types)
|
|
118
|
-
.addCommand(deploy)
|
|
119
|
-
.addCommand(run)
|
|
120
|
-
.addCommand(update)
|
|
121
|
-
.addCommand(logout)
|
|
122
|
-
.addCommand(account)
|
|
123
|
-
.addCommand(console)
|
|
124
|
-
.addCommand(databases)
|
|
125
|
-
.addCommand(functions)
|
|
126
|
-
.addCommand(graphql)
|
|
127
|
-
.addCommand(health)
|
|
128
|
-
.addCommand(locale)
|
|
129
|
-
.addCommand(messaging)
|
|
130
|
-
.addCommand(migrations)
|
|
131
|
-
.addCommand(project)
|
|
132
|
-
.addCommand(projects)
|
|
133
|
-
.addCommand(proxy)
|
|
134
|
-
.addCommand(sites)
|
|
135
|
-
.addCommand(storage)
|
|
136
|
-
.addCommand(tablesdb)
|
|
137
|
-
.addCommand(teams)
|
|
138
|
-
.addCommand(tokens)
|
|
139
|
-
.addCommand(users)
|
|
140
|
-
.addCommand(vcs)
|
|
141
|
-
.addCommand(client)
|
|
142
|
-
.parse(process.argv);
|
|
143
|
-
process.stdout.columns = oldWidth;
|
|
144
|
-
}
|
|
6
|
+
import { Push } from "./lib/commands/push.js";
|
|
7
|
+
import { Pull } from "./lib/commands/pull.js";
|
|
8
|
+
import { Schema } from "./lib/commands/schema.js";
|
|
9
|
+
export { Schema, Push, Pull };
|
|
145
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC"}
|
package/dist/lib/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../lib/client.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,YAAY,EAEb,MA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AM,CAAC"}
|
package/dist/lib/client.js
CHANGED
|
@@ -4,21 +4,22 @@ import JSONbig from "json-bigint";
|
|
|
4
4
|
import { AppwriteException } from "@appwrite.io/console";
|
|
5
5
|
import { globalConfig } from "./config.js";
|
|
6
6
|
import chalk from "chalk";
|
|
7
|
+
import { DEFAULT_ENDPOINT, SDK_NAME, SDK_PLATFORM, SDK_LANGUAGE, SDK_VERSION, SDK_TITLE, } from "./constants.js";
|
|
7
8
|
const JSONBigInt = JSONbig({ storeAsString: false });
|
|
8
9
|
class Client {
|
|
9
10
|
endpoint;
|
|
10
11
|
headers;
|
|
11
12
|
selfSigned;
|
|
12
13
|
constructor() {
|
|
13
|
-
this.endpoint =
|
|
14
|
+
this.endpoint = DEFAULT_ENDPOINT;
|
|
14
15
|
this.selfSigned = false;
|
|
15
16
|
this.headers = {
|
|
16
17
|
"content-type": "",
|
|
17
|
-
"x-sdk-name":
|
|
18
|
-
"x-sdk-platform":
|
|
19
|
-
"x-sdk-language":
|
|
20
|
-
"x-sdk-version":
|
|
21
|
-
"user-agent":
|
|
18
|
+
"x-sdk-name": SDK_NAME,
|
|
19
|
+
"x-sdk-platform": SDK_PLATFORM,
|
|
20
|
+
"x-sdk-language": SDK_LANGUAGE,
|
|
21
|
+
"x-sdk-version": SDK_VERSION,
|
|
22
|
+
"user-agent": `${SDK_TITLE}CLI/${SDK_VERSION} (${os.type()} ${os.version()}; ${os.arch()})`,
|
|
22
23
|
"X-Appwrite-Response-Format": "1.8.1",
|
|
23
24
|
};
|
|
24
25
|
}
|
package/dist/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../lib/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EA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