chirag-appwrite-cli 0.1.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/npm-publish.yml +49 -0
- package/CHANGELOG.md +1 -0
- package/Formula/appwrite.rb +19 -0
- package/LICENSE.md +1 -0
- package/README.md +104 -0
- package/appwrite.json +164 -0
- 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 +4 -0
- package/docs/examples/account/create-j-w-t.md +1 -0
- package/docs/examples/account/create-magic-u-r-l-token.md +5 -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-auth2session.md +5 -0
- package/docs/examples/account/create-o-auth2token.md +5 -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 +4 -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 +5 -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 +2 -0
- package/docs/examples/account/list-logs.md +2 -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.md +3 -0
- package/docs/examples/account/update-m-f-a.md +2 -0
- package/docs/examples/account/update-magic-u-r-l-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-name.md +2 -0
- package/docs/examples/account/update-password.md +3 -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/avatars/get-browser.md +5 -0
- package/docs/examples/avatars/get-credit-card.md +5 -0
- package/docs/examples/avatars/get-favicon.md +2 -0
- package/docs/examples/avatars/get-flag.md +5 -0
- package/docs/examples/avatars/get-image.md +4 -0
- package/docs/examples/avatars/get-initials.md +5 -0
- package/docs/examples/avatars/get-q-r.md +5 -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 +7 -0
- package/docs/examples/databases/create-collection.md +7 -0
- package/docs/examples/databases/create-datetime-attribute.md +7 -0
- package/docs/examples/databases/create-document.md +6 -0
- package/docs/examples/databases/create-documents.md +4 -0
- package/docs/examples/databases/create-email-attribute.md +7 -0
- package/docs/examples/databases/create-enum-attribute.md +8 -0
- package/docs/examples/databases/create-float-attribute.md +9 -0
- package/docs/examples/databases/create-index.md +8 -0
- package/docs/examples/databases/create-integer-attribute.md +9 -0
- package/docs/examples/databases/create-ip-attribute.md +7 -0
- package/docs/examples/databases/create-relationship-attribute.md +9 -0
- package/docs/examples/databases/create-string-attribute.md +9 -0
- package/docs/examples/databases/create-url-attribute.md +7 -0
- package/docs/examples/databases/create.md +4 -0
- package/docs/examples/databases/decrement-document-attribute.md +7 -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 +4 -0
- package/docs/examples/databases/delete-index.md +4 -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 +4 -0
- package/docs/examples/databases/get-collection.md +3 -0
- package/docs/examples/databases/get-database-usage.md +3 -0
- package/docs/examples/databases/get-document.md +5 -0
- package/docs/examples/databases/get-index.md +4 -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 +7 -0
- package/docs/examples/databases/list-attributes.md +4 -0
- package/docs/examples/databases/list-collection-logs.md +4 -0
- package/docs/examples/databases/list-collections.md +4 -0
- package/docs/examples/databases/list-document-logs.md +5 -0
- package/docs/examples/databases/list-documents.md +4 -0
- package/docs/examples/databases/list-indexes.md +4 -0
- package/docs/examples/databases/list-logs.md +3 -0
- package/docs/examples/databases/list.md +3 -0
- package/docs/examples/databases/update-boolean-attribute.md +7 -0
- package/docs/examples/databases/update-collection.md +7 -0
- package/docs/examples/databases/update-datetime-attribute.md +7 -0
- package/docs/examples/databases/update-document.md +6 -0
- package/docs/examples/databases/update-documents.md +5 -0
- package/docs/examples/databases/update-email-attribute.md +7 -0
- package/docs/examples/databases/update-enum-attribute.md +8 -0
- package/docs/examples/databases/update-float-attribute.md +9 -0
- package/docs/examples/databases/update-integer-attribute.md +9 -0
- package/docs/examples/databases/update-ip-attribute.md +7 -0
- package/docs/examples/databases/update-relationship-attribute.md +6 -0
- package/docs/examples/databases/update-string-attribute.md +8 -0
- package/docs/examples/databases/update-url-attribute.md +7 -0
- package/docs/examples/databases/update.md +4 -0
- package/docs/examples/databases/upsert-document.md +6 -0
- package/docs/examples/databases/upsert-documents.md +4 -0
- package/docs/examples/functions/create-deployment.md +6 -0
- package/docs/examples/functions/create-duplicate-deployment.md +4 -0
- package/docs/examples/functions/create-execution.md +8 -0
- package/docs/examples/functions/create-template-deployment.md +7 -0
- package/docs/examples/functions/create-variable.md +5 -0
- package/docs/examples/functions/create-vcs-deployment.md +5 -0
- package/docs/examples/functions/create.md +19 -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 +4 -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 +3 -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 +4 -0
- package/docs/examples/functions/list-executions.md +3 -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 +5 -0
- package/docs/examples/functions/list-usage.md +2 -0
- package/docs/examples/functions/list-variables.md +2 -0
- package/docs/examples/functions/list.md +3 -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 +6 -0
- package/docs/examples/functions/update.md +19 -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 +2 -0
- package/docs/examples/health/get-d-b.md +1 -0
- package/docs/examples/health/get-failed-jobs.md +3 -0
- package/docs/examples/health/get-pub-sub.md +1 -0
- package/docs/examples/health/get-queue-builds.md +2 -0
- package/docs/examples/health/get-queue-certificates.md +2 -0
- package/docs/examples/health/get-queue-databases.md +3 -0
- package/docs/examples/health/get-queue-deletes.md +2 -0
- package/docs/examples/health/get-queue-functions.md +2 -0
- package/docs/examples/health/get-queue-logs.md +2 -0
- package/docs/examples/health/get-queue-mails.md +2 -0
- package/docs/examples/health/get-queue-messaging.md +2 -0
- package/docs/examples/health/get-queue-migrations.md +2 -0
- package/docs/examples/health/get-queue-stats-resources.md +2 -0
- package/docs/examples/health/get-queue-usage.md +2 -0
- package/docs/examples/health/get-queue-webhooks.md +2 -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-e-u.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 +9 -0
- package/docs/examples/messaging/create-email.md +13 -0
- package/docs/examples/messaging/create-fcm-provider.md +5 -0
- package/docs/examples/messaging/create-mailgun-provider.md +11 -0
- package/docs/examples/messaging/create-msg91provider.md +7 -0
- package/docs/examples/messaging/create-push.md +20 -0
- package/docs/examples/messaging/create-sendgrid-provider.md +9 -0
- package/docs/examples/messaging/create-sms.md +8 -0
- package/docs/examples/messaging/create-smtp-provider.md +15 -0
- package/docs/examples/messaging/create-subscriber.md +4 -0
- package/docs/examples/messaging/create-telesign-provider.md +7 -0
- package/docs/examples/messaging/create-textmagic-provider.md +7 -0
- package/docs/examples/messaging/create-topic.md +4 -0
- package/docs/examples/messaging/create-twilio-provider.md +7 -0
- package/docs/examples/messaging/create-vonage-provider.md +7 -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 +3 -0
- package/docs/examples/messaging/list-messages.md +3 -0
- package/docs/examples/messaging/list-provider-logs.md +3 -0
- package/docs/examples/messaging/list-providers.md +3 -0
- package/docs/examples/messaging/list-subscriber-logs.md +3 -0
- package/docs/examples/messaging/list-subscribers.md +4 -0
- package/docs/examples/messaging/list-targets.md +3 -0
- package/docs/examples/messaging/list-topic-logs.md +3 -0
- package/docs/examples/messaging/list-topics.md +3 -0
- package/docs/examples/messaging/update-apns-provider.md +9 -0
- package/docs/examples/messaging/update-email.md +13 -0
- package/docs/examples/messaging/update-fcm-provider.md +5 -0
- package/docs/examples/messaging/update-mailgun-provider.md +11 -0
- package/docs/examples/messaging/update-msg91provider.md +7 -0
- package/docs/examples/messaging/update-push.md +20 -0
- package/docs/examples/messaging/update-sendgrid-provider.md +9 -0
- package/docs/examples/messaging/update-sms.md +8 -0
- package/docs/examples/messaging/update-smtp-provider.md +15 -0
- package/docs/examples/messaging/update-telesign-provider.md +7 -0
- package/docs/examples/messaging/update-textmagic-provider.md +7 -0
- package/docs/examples/messaging/update-topic.md +4 -0
- package/docs/examples/messaging/update-twilio-provider.md +7 -0
- package/docs/examples/messaging/update-vonage-provider.md +7 -0
- package/docs/examples/migrations/create-appwrite-migration.md +5 -0
- package/docs/examples/migrations/create-csv-migration.md +4 -0
- package/docs/examples/migrations/create-firebase-migration.md +3 -0
- package/docs/examples/migrations/create-n-host-migration.md +9 -0
- package/docs/examples/migrations/create-supabase-migration.md +8 -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 +9 -0
- package/docs/examples/migrations/get-supabase-report.md +8 -0
- package/docs/examples/migrations/get.md +2 -0
- package/docs/examples/migrations/list.md +3 -0
- package/docs/examples/migrations/retry.md +2 -0
- package/docs/examples/project/create-variable.md +4 -0
- package/docs/examples/project/delete-variable.md +2 -0
- package/docs/examples/project/get-usage.md +4 -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 +5 -0
- package/docs/examples/projects/create-dev-key.md +4 -0
- package/docs/examples/projects/create-j-w-t.md +4 -0
- package/docs/examples/projects/create-key.md +5 -0
- package/docs/examples/projects/create-platform.md +7 -0
- package/docs/examples/projects/create-smtp-test.md +11 -0
- package/docs/examples/projects/create-webhook.md +9 -0
- package/docs/examples/projects/create.md +14 -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 +3 -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 +3 -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 +9 -0
- package/docs/examples/projects/update-key.md +6 -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-auth2.md +6 -0
- package/docs/examples/projects/update-personal-data-check.md +3 -0
- package/docs/examples/projects/update-platform.md +7 -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-sms-template.md +5 -0
- package/docs/examples/projects/update-smtp.md +11 -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 +10 -0
- package/docs/examples/projects/update.md +12 -0
- package/docs/examples/proxy/create-a-p-i-rule.md +2 -0
- package/docs/examples/proxy/create-function-rule.md +4 -0
- package/docs/examples/proxy/create-redirect-rule.md +6 -0
- package/docs/examples/proxy/create-site-rule.md +4 -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 +3 -0
- package/docs/examples/proxy/update-rule-verification.md +2 -0
- package/docs/examples/sites/create-deployment.md +7 -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 +5 -0
- package/docs/examples/sites/create-vcs-deployment.md +5 -0
- package/docs/examples/sites/create.md +19 -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 +4 -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 +3 -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 +4 -0
- package/docs/examples/sites/list-frameworks.md +1 -0
- package/docs/examples/sites/list-logs.md +3 -0
- package/docs/examples/sites/list-specifications.md +1 -0
- package/docs/examples/sites/list-templates.md +5 -0
- package/docs/examples/sites/list-usage.md +2 -0
- package/docs/examples/sites/list-variables.md +2 -0
- package/docs/examples/sites/list.md +3 -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 +6 -0
- package/docs/examples/sites/update.md +19 -0
- package/docs/examples/storage/create-bucket.md +11 -0
- package/docs/examples/storage/create-file.md +5 -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 +3 -0
- package/docs/examples/storage/get-bucket.md +2 -0
- package/docs/examples/storage/get-file-download.md +4 -0
- package/docs/examples/storage/get-file-preview.md +15 -0
- package/docs/examples/storage/get-file-view.md +4 -0
- package/docs/examples/storage/get-file.md +3 -0
- package/docs/examples/storage/get-usage.md +2 -0
- package/docs/examples/storage/list-buckets.md +3 -0
- package/docs/examples/storage/list-files.md +4 -0
- package/docs/examples/storage/update-bucket.md +11 -0
- package/docs/examples/storage/update-file.md +5 -0
- package/docs/examples/teams/create-membership.md +8 -0
- package/docs/examples/teams/create.md +4 -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 +3 -0
- package/docs/examples/teams/list-memberships.md +4 -0
- package/docs/examples/teams/list.md +3 -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 +4 -0
- package/docs/examples/tokens/delete.md +2 -0
- package/docs/examples/tokens/get.md +2 -0
- package/docs/examples/tokens/list.md +4 -0
- package/docs/examples/tokens/update.md +3 -0
- package/docs/examples/users/create-argon2user.md +5 -0
- package/docs/examples/users/create-bcrypt-user.md +5 -0
- package/docs/examples/users/create-j-w-t.md +4 -0
- package/docs/examples/users/create-m-d5user.md +5 -0
- package/docs/examples/users/create-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/create-p-h-pass-user.md +5 -0
- package/docs/examples/users/create-s-h-a-user.md +6 -0
- package/docs/examples/users/create-scrypt-modified-user.md +8 -0
- package/docs/examples/users/create-scrypt-user.md +10 -0
- package/docs/examples/users/create-session.md +2 -0
- package/docs/examples/users/create-target.md +7 -0
- package/docs/examples/users/create-token.md +4 -0
- package/docs/examples/users/create.md +6 -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 +2 -0
- package/docs/examples/users/get.md +2 -0
- package/docs/examples/users/list-identities.md +3 -0
- package/docs/examples/users/list-logs.md +3 -0
- package/docs/examples/users/list-memberships.md +4 -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 +3 -0
- package/docs/examples/users/list.md +3 -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 +6 -0
- package/docs/examples/vcs/create-repository-detection.md +5 -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 +5 -0
- package/docs/examples/vcs/get-repository.md +3 -0
- package/docs/examples/vcs/list-installations.md +3 -0
- package/docs/examples/vcs/list-repositories.md +4 -0
- package/docs/examples/vcs/list-repository-branches.md +3 -0
- package/docs/examples/vcs/update-external-deployments.md +4 -0
- package/functions/Starter function/.prettierrc.json +6 -0
- package/functions/Starter function/README.md +48 -0
- package/functions/Starter function/package-lock.json +60 -0
- package/functions/Starter function/package.json +16 -0
- package/functions/Starter function/src/main.js +35 -0
- package/generate/appwrite.d.ts +18 -0
- package/index.js +109 -0
- package/install.ps1 +98 -0
- package/install.sh +157 -0
- package/lib/client.js +259 -0
- package/lib/commands/account.js +2074 -0
- package/lib/commands/avatars.js +491 -0
- package/lib/commands/console.js +129 -0
- package/lib/commands/databases.js +2972 -0
- package/lib/commands/functions.js +1737 -0
- package/lib/commands/generic.js +328 -0
- package/lib/commands/graphql.js +128 -0
- package/lib/commands/health.js +891 -0
- package/lib/commands/init.js +566 -0
- package/lib/commands/locale.js +324 -0
- package/lib/commands/messaging.js +2970 -0
- package/lib/commands/migrations.js +751 -0
- package/lib/commands/organizations.js +48 -0
- package/lib/commands/project.js +308 -0
- package/lib/commands/projects.js +2615 -0
- package/lib/commands/proxy.js +406 -0
- package/lib/commands/pull.js +474 -0
- package/lib/commands/push.js +2117 -0
- package/lib/commands/run.js +330 -0
- package/lib/commands/sites.js +1663 -0
- package/lib/commands/storage.js +990 -0
- package/lib/commands/teams.js +682 -0
- package/lib/commands/tokens.js +261 -0
- package/lib/commands/types.js +156 -0
- package/lib/commands/users.js +2035 -0
- package/lib/commands/vcs.js +484 -0
- package/lib/config.js +705 -0
- package/lib/emulation/docker.js +264 -0
- package/lib/emulation/utils.js +186 -0
- package/lib/exception.js +9 -0
- package/lib/id.js +30 -0
- package/lib/paginate.js +52 -0
- package/lib/parser.js +246 -0
- package/lib/questions.js +1006 -0
- package/lib/sdks.js +60 -0
- package/lib/spinner.js +104 -0
- package/lib/type-generation/attribute.js +16 -0
- package/lib/type-generation/languages/dart.js +196 -0
- package/lib/type-generation/languages/java.js +130 -0
- package/lib/type-generation/languages/javascript.js +102 -0
- package/lib/type-generation/languages/kotlin.js +84 -0
- package/lib/type-generation/languages/language.js +125 -0
- package/lib/type-generation/languages/php.js +109 -0
- package/lib/type-generation/languages/swift.js +169 -0
- package/lib/type-generation/languages/typescript.js +102 -0
- package/lib/utils.js +289 -0
- package/lib/validations.js +17 -0
- package/package.json +50 -0
- package/scoop/appwrite.json +30 -0
- package/sites/JavaScript starter/.env.example +3 -0
- package/sites/JavaScript starter/LICENSE +21 -0
- package/sites/JavaScript starter/images/appwrite.svg +8 -0
- package/sites/JavaScript starter/images/javascript.svg +5 -0
- package/sites/JavaScript starter/index.html +250 -0
- package/sites/JavaScript starter/lib/appwrite.js +10 -0
- package/sites/JavaScript starter/package-lock.json +1431 -0
- package/sites/JavaScript starter/package.json +21 -0
- package/sites/JavaScript starter/readme.md +26 -0
- package/sites/JavaScript starter/src/javascript.svg +1 -0
- package/sites/JavaScript starter/style/app.css +20 -0
- package/sites/JavaScript starter/vite.config.js +7 -0
package/lib/parser.js
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
const chalk = require('chalk');
|
|
2
|
+
const commander = require('commander');
|
|
3
|
+
const Table = require('cli-table3');
|
|
4
|
+
const { description } = require('../package.json');
|
|
5
|
+
const { globalConfig } = require("./config.js");
|
|
6
|
+
const os = require('os');
|
|
7
|
+
const Client = require("./client");
|
|
8
|
+
const { isCloud } = require("./utils");
|
|
9
|
+
|
|
10
|
+
const cliConfig = {
|
|
11
|
+
verbose: false,
|
|
12
|
+
json: false,
|
|
13
|
+
force: false,
|
|
14
|
+
all: false,
|
|
15
|
+
ids: [],
|
|
16
|
+
report: false,
|
|
17
|
+
reportData: {}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const parse = (data) => {
|
|
21
|
+
if (cliConfig.json) {
|
|
22
|
+
drawJSON(data);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
for (let key in data) {
|
|
27
|
+
if (data[key] === null) {
|
|
28
|
+
console.log(`${chalk.yellow.bold(key)} : null`);
|
|
29
|
+
} else if (Array.isArray(data[key])) {
|
|
30
|
+
console.log(`${chalk.yellow.bold.underline(key)}`);
|
|
31
|
+
if (typeof data[key][0] === 'object') {
|
|
32
|
+
drawTable(data[key]);
|
|
33
|
+
} else {
|
|
34
|
+
drawJSON(data[key]);
|
|
35
|
+
}
|
|
36
|
+
} else if (typeof data[key] === 'object') {
|
|
37
|
+
if (data[key]?.constructor?.name === 'BigNumber') {
|
|
38
|
+
console.log(`${chalk.yellow.bold(key)} : ${data[key]}`);
|
|
39
|
+
} else {
|
|
40
|
+
console.log(`${chalk.yellow.bold.underline(key)}`)
|
|
41
|
+
drawTable([data[key]]);
|
|
42
|
+
}
|
|
43
|
+
} else {
|
|
44
|
+
console.log(`${chalk.yellow.bold(key)} : ${data[key]}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const drawTable = (data) => {
|
|
50
|
+
if (data.length == 0) {
|
|
51
|
+
console.log("[]")
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Create an object with all the keys in it
|
|
56
|
+
let obj = data.reduce((res, item) => ({ ...res, ...item }));
|
|
57
|
+
// Get those keys as an array
|
|
58
|
+
let keys = Object.keys(obj);
|
|
59
|
+
// Create an object with all keys set to the default value ''
|
|
60
|
+
let def = keys.reduce((result, key) => {
|
|
61
|
+
result[key] = '-'
|
|
62
|
+
return result;
|
|
63
|
+
}, {});
|
|
64
|
+
// Use object destrucuring to replace all default values with the ones we have
|
|
65
|
+
data = data.map((item) => ({ ...def, ...item }));
|
|
66
|
+
|
|
67
|
+
let columns = Object.keys(data[0]);
|
|
68
|
+
|
|
69
|
+
let table = new Table({
|
|
70
|
+
head: columns.map(c => chalk.cyan.italic.bold(c)),
|
|
71
|
+
chars: {
|
|
72
|
+
'top': ' ',
|
|
73
|
+
'top-mid': ' ',
|
|
74
|
+
'top-left': ' ',
|
|
75
|
+
'top-right': ' ',
|
|
76
|
+
'bottom': ' ',
|
|
77
|
+
'bottom-mid': ' ',
|
|
78
|
+
'bottom-left': ' ',
|
|
79
|
+
'bottom-right': ' ',
|
|
80
|
+
'left': ' ',
|
|
81
|
+
'left-mid': ' ',
|
|
82
|
+
'mid': chalk.cyan('─'),
|
|
83
|
+
'mid-mid': chalk.cyan('┼'),
|
|
84
|
+
'right': ' ',
|
|
85
|
+
'right-mid': ' ',
|
|
86
|
+
'middle': chalk.cyan('│')
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
data.forEach(row => {
|
|
91
|
+
let rowValues = [];
|
|
92
|
+
for (let key in row) {
|
|
93
|
+
if (row[key] === null) {
|
|
94
|
+
rowValues.push("-");
|
|
95
|
+
} else if (Array.isArray(row[key])) {
|
|
96
|
+
rowValues.push(JSON.stringify(row[key]));
|
|
97
|
+
} else if (typeof row[key] === 'object') {
|
|
98
|
+
rowValues.push(JSON.stringify(row[key]));
|
|
99
|
+
} else {
|
|
100
|
+
rowValues.push(row[key]);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
table.push(rowValues);
|
|
104
|
+
});
|
|
105
|
+
console.log(table.toString());
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const drawJSON = (data) => {
|
|
109
|
+
console.log(JSON.stringify(data, null, 2));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const parseError = (err) => {
|
|
113
|
+
if (cliConfig.report) {
|
|
114
|
+
(async () => {
|
|
115
|
+
let appwriteVersion = 'unknown';
|
|
116
|
+
const endpoint = globalConfig.getEndpoint();
|
|
117
|
+
|
|
118
|
+
try {
|
|
119
|
+
const client = new Client().setEndpoint(endpoint);
|
|
120
|
+
const res = await client.call('get', '/health/version');
|
|
121
|
+
appwriteVersion = res.version;
|
|
122
|
+
} catch {
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const version = '0.16.0';
|
|
126
|
+
const stepsToReproduce = `Running \`appwrite ${cliConfig.reportData.data.args.join(' ')}\``;
|
|
127
|
+
const yourEnvironment = `CLI version: ${version}\nOperation System: ${os.type()}\nAppwrite version: ${appwriteVersion}\nIs Cloud: ${isCloud()}`;
|
|
128
|
+
|
|
129
|
+
const stack = '```\n' + err.stack + '\n```';
|
|
130
|
+
|
|
131
|
+
const githubIssueUrl = new URL('https://github.com/appwrite/appwrite/issues/new');
|
|
132
|
+
githubIssueUrl.searchParams.append('labels', 'bug');
|
|
133
|
+
githubIssueUrl.searchParams.append('template', 'bug.yaml');
|
|
134
|
+
githubIssueUrl.searchParams.append('title', `🐛 Bug Report: ${err.message}`);
|
|
135
|
+
githubIssueUrl.searchParams.append('actual-behavior', `CLI Error:\n${stack}`);
|
|
136
|
+
githubIssueUrl.searchParams.append('steps-to-reproduce', stepsToReproduce);
|
|
137
|
+
githubIssueUrl.searchParams.append('environment', yourEnvironment);
|
|
138
|
+
|
|
139
|
+
log(`To report this error you can:\n - Create a support ticket in our Discord server https://appwrite.io/discord \n - Create an issue in our Github\n ${githubIssueUrl.href}\n`);
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
error('\n Stack Trace: \n');
|
|
143
|
+
console.error(err);
|
|
144
|
+
process.exit(1);
|
|
145
|
+
})()
|
|
146
|
+
} else {
|
|
147
|
+
if (cliConfig.verbose) {
|
|
148
|
+
console.error(err);
|
|
149
|
+
} else {
|
|
150
|
+
log('For detailed error pass the --verbose or --report flag');
|
|
151
|
+
error(err.message);
|
|
152
|
+
}
|
|
153
|
+
process.exit(1);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const actionRunner = (fn) => {
|
|
159
|
+
return (...args) => {
|
|
160
|
+
if (cliConfig.all && (Array.isArray(cliConfig.ids) && cliConfig.ids.length !== 0)) {
|
|
161
|
+
error(`The '--all' and '--id' flags cannot be used together.`);
|
|
162
|
+
process.exit(1);
|
|
163
|
+
}
|
|
164
|
+
return fn(...args).catch(parseError)
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const parseInteger = (value) => {
|
|
169
|
+
const parsedValue = parseInt(value, 10);
|
|
170
|
+
if (isNaN(parsedValue)) {
|
|
171
|
+
throw new commander.InvalidArgumentError('Not a number.');
|
|
172
|
+
}
|
|
173
|
+
return parsedValue;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const parseBool = (value) => {
|
|
177
|
+
if (value === 'true') return true;
|
|
178
|
+
if (value === 'false') return false;
|
|
179
|
+
throw new commander.InvalidArgumentError('Not a boolean.');
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const log = (message) => {
|
|
183
|
+
console.log(`${chalk.cyan.bold("ℹ Info:")} ${chalk.cyan(message ?? "")}`);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const warn = (message) => {
|
|
187
|
+
console.log(`${chalk.yellow.bold("ℹ Warning:")} ${chalk.yellow(message ?? "")}`);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const hint = (message) => {
|
|
191
|
+
console.log(`${chalk.cyan.bold("♥ Hint:")} ${chalk.cyan(message ?? "")}`);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
const success = (message) => {
|
|
195
|
+
console.log(`${chalk.green.bold("✓ Success:")} ${chalk.green(message ?? "")}`);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const error = (message) => {
|
|
199
|
+
console.error(`${chalk.red.bold("✗ Error:")} ${chalk.red(message ?? "")}`);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const logo = "\n _ _ _ ___ __ _____ \n \/_\\ _ __ _ ____ ___ __(_) |_ ___ \/ __\\ \/ \/ \\_ \\\n \/\/_\\\\| '_ \\| '_ \\ \\ \/\\ \/ \/ '__| | __\/ _ \\ \/ \/ \/ \/ \/ \/\\\/\n \/ _ \\ |_) | |_) \\ V V \/| | | | || __\/ \/ \/___\/ \/___\/\\\/ \/_ \n \\_\/ \\_\/ .__\/| .__\/ \\_\/\\_\/ |_| |_|\\__\\___| \\____\/\\____\/\\____\/ \n |_| |_| \n\n";
|
|
203
|
+
|
|
204
|
+
const commandDescriptions = {
|
|
205
|
+
"account": `The account command allows you to authenticate and manage a user account.`,
|
|
206
|
+
"graphql": `The graphql command allows you to query and mutate any resource type on your Appwrite server.`,
|
|
207
|
+
"avatars": `The avatars command aims to help you complete everyday tasks related to your app image, icons, and avatars.`,
|
|
208
|
+
"databases": `The databases command allows you to create structured collections of documents and query and filter lists of documents.`,
|
|
209
|
+
"init": `The init command provides a convenient wrapper for creating and initializing projects, functions, collections, buckets, teams, and messaging-topics in Appwrite.`,
|
|
210
|
+
"push": `The push command provides a convenient wrapper for pushing your functions, collections, buckets, teams, and messaging-topics.`,
|
|
211
|
+
"run": `The run command allows you to run the project locally to allow easy development and quick debugging.`,
|
|
212
|
+
"functions": `The functions command allows you to view, create, and manage your Cloud Functions.`,
|
|
213
|
+
"health": `The health command allows you to both validate and monitor your Appwrite server's health.`,
|
|
214
|
+
"pull": `The pull command helps you pull your Appwrite project, functions, collections, buckets, teams, and messaging-topics`,
|
|
215
|
+
"locale": `The locale command allows you to customize your app based on your users' location.`,
|
|
216
|
+
"sites": `The sites command allows you to view, create and manage your Appwrite Sites.`,
|
|
217
|
+
"storage": `The storage command allows you to manage your project files.`,
|
|
218
|
+
"teams": `The teams command allows you to group users of your project to enable them to share read and write access to your project resources.`,
|
|
219
|
+
"users": `The users command allows you to manage your project users.`,
|
|
220
|
+
"client": `The client command allows you to configure your CLI`,
|
|
221
|
+
"login": `The login command allows you to authenticate and manage a user account.`,
|
|
222
|
+
"logout": `The logout command allows you to log out of your Appwrite account.`,
|
|
223
|
+
"whoami": `The whomai command gives information about the currently logged-in user.`,
|
|
224
|
+
"register": `Outputs the link to create an Appwrite account.`,
|
|
225
|
+
"console" : `The console command gives you access to the APIs used by the Appwrite Console.`,
|
|
226
|
+
"messaging": `The messaging command allows you to manage topics and targets and send messages.`,
|
|
227
|
+
"migrations": `The migrations command allows you to migrate data between services.`,
|
|
228
|
+
"vcs": `The vcs command allows you to interact with VCS providers and manage your code repositories.`,
|
|
229
|
+
"main": chalk.redBright(`${logo}${description}`),
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
module.exports = {
|
|
233
|
+
drawTable,
|
|
234
|
+
parse,
|
|
235
|
+
actionRunner,
|
|
236
|
+
parseInteger,
|
|
237
|
+
parseBool,
|
|
238
|
+
log,
|
|
239
|
+
warn,
|
|
240
|
+
hint,
|
|
241
|
+
success,
|
|
242
|
+
error,
|
|
243
|
+
commandDescriptions,
|
|
244
|
+
cliConfig,
|
|
245
|
+
drawTable
|
|
246
|
+
}
|