chirag-appwrite-cli 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-verify.yml +71 -0
- package/.github/workflows/npm-publish.yml +41 -22
- package/CHANGELOG.md +190 -1
- package/LICENSE.md +12 -1
- package/README.md +182 -15
- package/bun.lock +627 -0
- package/dist/bundle.cjs +108228 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +149 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/client.d.ts +88 -0
- package/dist/lib/client.d.ts.map +1 -0
- package/dist/lib/client.js +238 -0
- package/dist/lib/client.js.map +1 -0
- package/dist/lib/commands/config.d.ts +557 -0
- package/dist/lib/commands/config.d.ts.map +1 -0
- package/dist/lib/commands/config.js +415 -0
- package/dist/lib/commands/config.js.map +1 -0
- package/dist/lib/commands/db.d.ts +34 -0
- package/dist/lib/commands/db.d.ts.map +1 -0
- package/dist/lib/commands/db.js +247 -0
- package/dist/lib/commands/db.js.map +1 -0
- package/dist/lib/commands/errors.d.ts +68 -0
- package/dist/lib/commands/errors.d.ts.map +1 -0
- package/dist/lib/commands/errors.js +72 -0
- package/dist/lib/commands/errors.js.map +1 -0
- package/dist/lib/commands/generic.d.ts +17 -0
- package/dist/lib/commands/generic.d.ts.map +1 -0
- package/dist/lib/commands/generic.js +292 -0
- package/dist/lib/commands/generic.js.map +1 -0
- package/dist/lib/commands/init.d.ts +3 -0
- package/dist/lib/commands/init.d.ts.map +1 -0
- package/dist/lib/commands/init.js +526 -0
- package/dist/lib/commands/init.js.map +1 -0
- package/dist/lib/commands/pull.d.ts +110 -0
- package/dist/lib/commands/pull.d.ts.map +1 -0
- package/dist/lib/commands/pull.js +626 -0
- package/dist/lib/commands/pull.js.map +1 -0
- package/dist/lib/commands/push.d.ts +82 -0
- package/dist/lib/commands/push.d.ts.map +1 -0
- package/dist/lib/commands/push.js +1666 -0
- package/dist/lib/commands/push.js.map +1 -0
- package/dist/lib/commands/run.d.ts +3 -0
- package/dist/lib/commands/run.d.ts.map +1 -0
- package/dist/lib/commands/run.js +289 -0
- package/dist/lib/commands/run.js.map +1 -0
- package/dist/lib/commands/schema.d.ts +57 -0
- package/dist/lib/commands/schema.d.ts.map +1 -0
- package/dist/lib/commands/schema.js +75 -0
- package/dist/lib/commands/schema.js.map +1 -0
- package/dist/lib/commands/services/account.d.ts +3 -0
- package/dist/lib/commands/services/account.d.ts.map +1 -0
- package/dist/lib/commands/services/account.js +306 -0
- package/dist/lib/commands/services/account.js.map +1 -0
- package/dist/lib/commands/services/avatars.d.ts +3 -0
- package/dist/lib/commands/services/avatars.d.ts.map +1 -0
- package/dist/lib/commands/services/avatars.js +118 -0
- package/dist/lib/commands/services/avatars.js.map +1 -0
- package/dist/lib/commands/services/console.d.ts +3 -0
- package/dist/lib/commands/services/console.d.ts.map +1 -0
- package/dist/lib/commands/services/console.js +41 -0
- package/dist/lib/commands/services/console.js.map +1 -0
- package/dist/lib/commands/services/databases.d.ts +3 -0
- package/dist/lib/commands/services/databases.d.ts.map +1 -0
- package/dist/lib/commands/services/databases.js +612 -0
- package/dist/lib/commands/services/databases.js.map +1 -0
- package/dist/lib/commands/services/functions.d.ts +3 -0
- package/dist/lib/commands/services/functions.d.ts.map +1 -0
- package/dist/lib/commands/services/functions.js +258 -0
- package/dist/lib/commands/services/functions.js.map +1 -0
- package/dist/lib/commands/services/graphql.d.ts +3 -0
- package/dist/lib/commands/services/graphql.d.ts.map +1 -0
- package/dist/lib/commands/services/graphql.js +28 -0
- package/dist/lib/commands/services/graphql.js.map +1 -0
- package/dist/lib/commands/services/health.d.ts +3 -0
- package/dist/lib/commands/services/health.d.ts.map +1 -0
- package/dist/lib/commands/services/health.js +123 -0
- package/dist/lib/commands/services/health.js.map +1 -0
- package/dist/lib/commands/services/locale.d.ts +3 -0
- package/dist/lib/commands/services/locale.d.ts.map +1 -0
- package/dist/lib/commands/services/locale.js +52 -0
- package/dist/lib/commands/services/locale.js.map +1 -0
- package/dist/lib/commands/services/messaging.d.ts +3 -0
- package/dist/lib/commands/services/messaging.d.ts.map +1 -0
- package/dist/lib/commands/services/messaging.js +505 -0
- package/dist/lib/commands/services/messaging.js.map +1 -0
- package/dist/lib/commands/services/migrations.d.ts +3 -0
- package/dist/lib/commands/services/migrations.d.ts.map +1 -0
- package/dist/lib/commands/services/migrations.js +135 -0
- package/dist/lib/commands/services/migrations.js.map +1 -0
- package/dist/lib/commands/services/project.d.ts +3 -0
- package/dist/lib/commands/services/project.d.ts.map +1 -0
- package/dist/lib/commands/services/project.js +54 -0
- package/dist/lib/commands/services/project.js.map +1 -0
- package/dist/lib/commands/services/projects.d.ts +3 -0
- package/dist/lib/commands/services/projects.d.ts.map +1 -0
- package/dist/lib/commands/services/projects.js +415 -0
- package/dist/lib/commands/services/projects.js.map +1 -0
- package/dist/lib/commands/services/proxy.d.ts +3 -0
- package/dist/lib/commands/services/proxy.d.ts.map +1 -0
- package/dist/lib/commands/services/proxy.js +68 -0
- package/dist/lib/commands/services/proxy.js.map +1 -0
- package/dist/lib/commands/services/sites.d.ts +3 -0
- package/dist/lib/commands/services/sites.d.ts.map +1 -0
- package/dist/lib/commands/services/sites.js +242 -0
- package/dist/lib/commands/services/sites.js.map +1 -0
- package/dist/lib/commands/services/storage.d.ts +3 -0
- package/dist/lib/commands/services/storage.d.ts.map +1 -0
- package/dist/lib/commands/services/storage.js +153 -0
- package/dist/lib/commands/services/storage.js.map +1 -0
- package/dist/lib/commands/services/tablesdb.d.ts +3 -0
- package/dist/lib/commands/services/tablesdb.d.ts.map +1 -0
- package/dist/lib/commands/services/tablesdb.js +605 -0
- package/dist/lib/commands/services/tablesdb.js.map +1 -0
- package/dist/lib/commands/services/teams.d.ts +3 -0
- package/dist/lib/commands/services/teams.d.ts.map +1 -0
- package/dist/lib/commands/services/teams.js +123 -0
- package/dist/lib/commands/services/teams.js.map +1 -0
- package/dist/lib/commands/services/tokens.d.ts +3 -0
- package/dist/lib/commands/services/tokens.d.ts.map +1 -0
- package/dist/lib/commands/services/tokens.js +49 -0
- package/dist/lib/commands/services/tokens.js.map +1 -0
- package/dist/lib/commands/services/users.d.ts +3 -0
- package/dist/lib/commands/services/users.d.ts.map +1 -0
- package/dist/lib/commands/services/users.js +312 -0
- package/dist/lib/commands/services/users.js.map +1 -0
- package/dist/lib/commands/services/vcs.d.ts +3 -0
- package/dist/lib/commands/services/vcs.d.ts.map +1 -0
- package/dist/lib/commands/services/vcs.js +87 -0
- package/dist/lib/commands/services/vcs.js.map +1 -0
- package/dist/lib/commands/types.d.ts +3 -0
- package/dist/lib/commands/types.d.ts.map +1 -0
- package/dist/lib/commands/types.js +151 -0
- package/dist/lib/commands/types.js.map +1 -0
- package/dist/lib/commands/update.d.ts +3 -0
- package/dist/lib/commands/update.d.ts.map +1 -0
- package/dist/lib/commands/update.js +201 -0
- package/dist/lib/commands/update.js.map +1 -0
- package/dist/lib/commands/utils/attributes.d.ts +46 -0
- package/dist/lib/commands/utils/attributes.d.ts.map +1 -0
- package/dist/lib/commands/utils/attributes.js +521 -0
- package/dist/lib/commands/utils/attributes.js.map +1 -0
- package/dist/lib/commands/utils/change-approval.d.ts +25 -0
- package/dist/lib/commands/utils/change-approval.d.ts.map +1 -0
- package/dist/lib/commands/utils/change-approval.js +129 -0
- package/dist/lib/commands/utils/change-approval.js.map +1 -0
- package/dist/lib/commands/utils/database-sync.d.ts +10 -0
- package/dist/lib/commands/utils/database-sync.d.ts.map +1 -0
- package/dist/lib/commands/utils/database-sync.js +136 -0
- package/dist/lib/commands/utils/database-sync.js.map +1 -0
- package/dist/lib/commands/utils/deployment.d.ts +34 -0
- package/dist/lib/commands/utils/deployment.d.ts.map +1 -0
- package/dist/lib/commands/utils/deployment.js +108 -0
- package/dist/lib/commands/utils/deployment.js.map +1 -0
- package/dist/lib/commands/utils/error-formatter.d.ts +19 -0
- package/dist/lib/commands/utils/error-formatter.d.ts.map +1 -0
- package/dist/lib/commands/utils/error-formatter.js +333 -0
- package/dist/lib/commands/utils/error-formatter.js.map +1 -0
- package/dist/lib/commands/utils/pools.d.ts +16 -0
- package/dist/lib/commands/utils/pools.d.ts.map +1 -0
- package/dist/lib/commands/utils/pools.js +197 -0
- package/dist/lib/commands/utils/pools.js.map +1 -0
- package/dist/lib/config.d.ts +119 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +728 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/emulation/docker.d.ts +7 -0
- package/dist/lib/emulation/docker.d.ts.map +1 -0
- package/dist/lib/emulation/docker.js +224 -0
- package/dist/lib/emulation/docker.js.map +1 -0
- package/dist/lib/emulation/utils.d.ts +29 -0
- package/dist/lib/emulation/utils.d.ts.map +1 -0
- package/dist/lib/emulation/utils.js +165 -0
- package/dist/lib/emulation/utils.js.map +1 -0
- package/dist/lib/id.d.ts +7 -0
- package/dist/lib/id.d.ts.map +1 -0
- package/dist/lib/id.js +27 -0
- package/dist/lib/id.js.map +1 -0
- package/dist/lib/paginate.d.ts +9 -0
- package/dist/lib/paginate.d.ts.map +1 -0
- package/dist/lib/paginate.js +43 -0
- package/dist/lib/paginate.js.map +1 -0
- package/dist/lib/parser.d.ts +18 -0
- package/dist/lib/parser.d.ts.map +1 -0
- package/dist/lib/parser.js +225 -0
- package/dist/lib/parser.js.map +1 -0
- package/dist/lib/questions.d.ts +59 -0
- package/dist/lib/questions.d.ts.map +1 -0
- package/dist/lib/questions.js +991 -0
- package/dist/lib/questions.js.map +1 -0
- package/dist/lib/sdks.d.ts +4 -0
- package/dist/lib/sdks.d.ts.map +1 -0
- package/dist/lib/sdks.js +61 -0
- package/dist/lib/sdks.js.map +1 -0
- package/dist/lib/services.d.ts +13 -0
- package/dist/lib/services.d.ts.map +1 -0
- package/dist/lib/services.js +47 -0
- package/dist/lib/services.js.map +1 -0
- package/dist/lib/spinner.d.ts +28 -0
- package/dist/lib/spinner.d.ts.map +1 -0
- package/dist/lib/spinner.js +91 -0
- package/dist/lib/spinner.js.map +1 -0
- package/dist/lib/type-generation/attribute.d.ts +17 -0
- package/dist/lib/type-generation/attribute.d.ts.map +1 -0
- package/dist/lib/type-generation/attribute.js +16 -0
- package/dist/lib/type-generation/attribute.js.map +1 -0
- package/dist/lib/type-generation/languages/csharp.d.ts +7 -0
- package/dist/lib/type-generation/languages/csharp.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/csharp.js +180 -0
- package/dist/lib/type-generation/languages/csharp.js.map +1 -0
- package/dist/lib/type-generation/languages/dart.d.ts +8 -0
- package/dist/lib/type-generation/languages/dart.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/dart.js +197 -0
- package/dist/lib/type-generation/languages/dart.js.map +1 -0
- package/dist/lib/type-generation/languages/java.d.ts +7 -0
- package/dist/lib/type-generation/languages/java.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/java.js +140 -0
- package/dist/lib/type-generation/languages/java.js.map +1 -0
- package/dist/lib/type-generation/languages/javascript.d.ts +9 -0
- package/dist/lib/type-generation/languages/javascript.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/javascript.js +109 -0
- package/dist/lib/type-generation/languages/javascript.js.map +1 -0
- package/dist/lib/type-generation/languages/kotlin.d.ts +7 -0
- package/dist/lib/type-generation/languages/kotlin.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/kotlin.js +95 -0
- package/dist/lib/type-generation/languages/kotlin.js.map +1 -0
- package/dist/lib/type-generation/languages/language.d.ts +43 -0
- package/dist/lib/type-generation/languages/language.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/language.js +77 -0
- package/dist/lib/type-generation/languages/language.js.map +1 -0
- package/dist/lib/type-generation/languages/php.d.ts +7 -0
- package/dist/lib/type-generation/languages/php.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/php.js +116 -0
- package/dist/lib/type-generation/languages/php.js.map +1 -0
- package/dist/lib/type-generation/languages/swift.d.ts +7 -0
- package/dist/lib/type-generation/languages/swift.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/swift.js +179 -0
- package/dist/lib/type-generation/languages/swift.js.map +1 -0
- package/dist/lib/type-generation/languages/typescript.d.ts +9 -0
- package/dist/lib/type-generation/languages/typescript.d.ts.map +1 -0
- package/dist/lib/type-generation/languages/typescript.js +115 -0
- package/dist/lib/type-generation/languages/typescript.js.map +1 -0
- package/dist/lib/types.d.ts +63 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utils.d.ts +18 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +323 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/validations.d.ts +2 -0
- package/dist/lib/validations.d.ts.map +1 -0
- package/dist/lib/validations.js +16 -0
- package/dist/lib/validations.js.map +1 -0
- package/dist/package.json +68 -0
- package/dist/scripts/generate-commands.d.ts +2 -0
- package/dist/scripts/generate-commands.d.ts.map +1 -0
- package/dist/scripts/generate-commands.js +398 -0
- package/dist/scripts/generate-commands.js.map +1 -0
- package/dist/sites/profile-website/src/lib/utils.d.ts +4 -0
- package/dist/sites/profile-website/src/lib/utils.d.ts.map +1 -0
- package/dist/sites/profile-website/src/lib/utils.js +32 -0
- package/dist/sites/profile-website/src/lib/utils.js.map +1 -0
- package/dist/sites/profile-website/tailwind.config.d.ts +3 -0
- package/dist/sites/profile-website/tailwind.config.d.ts.map +1 -0
- package/dist/sites/profile-website/tailwind.config.js +110 -0
- package/dist/sites/profile-website/tailwind.config.js.map +1 -0
- package/dist/test.d.ts +2 -0
- package/dist/test.d.ts.map +1 -0
- package/dist/test.js +38 -0
- package/dist/test.js.map +1 -0
- package/index.ts +190 -0
- package/install.ps1 +5 -8
- package/install.sh +4 -5
- package/lib/client.ts +292 -0
- package/lib/commands/config.ts +493 -0
- package/lib/commands/db.ts +324 -0
- package/lib/commands/errors.ts +93 -0
- package/lib/commands/generic.ts +440 -0
- package/lib/commands/init.ts +713 -0
- package/lib/commands/pull.ts +944 -0
- package/lib/commands/push.ts +2355 -0
- package/lib/commands/run.ts +416 -0
- package/lib/commands/schema.ts +103 -0
- package/lib/commands/services/account.ts +832 -0
- package/lib/commands/services/avatars.ts +400 -0
- package/lib/commands/services/console.ts +73 -0
- package/lib/commands/services/databases.ts +2080 -0
- package/lib/commands/services/functions.ts +855 -0
- package/lib/commands/services/graphql.ts +47 -0
- package/lib/commands/services/health.ts +322 -0
- package/lib/commands/services/locale.ts +99 -0
- package/lib/commands/services/messaging.ts +1871 -0
- package/lib/commands/services/migrations.ts +421 -0
- package/lib/commands/services/project.ts +116 -0
- package/lib/commands/services/projects.ts +1317 -0
- package/lib/commands/services/proxy.ts +163 -0
- package/lib/commands/services/sites.ts +777 -0
- package/lib/commands/services/storage.ts +547 -0
- package/lib/commands/services/tablesdb.ts +1928 -0
- package/lib/commands/services/teams.ts +294 -0
- package/lib/commands/services/tokens.ts +106 -0
- package/lib/commands/services/users.ts +886 -0
- package/lib/commands/services/vcs.ts +268 -0
- package/lib/commands/types.ts +220 -0
- package/lib/commands/update.ts +245 -0
- package/lib/commands/utils/attributes.ts +734 -0
- package/lib/commands/utils/change-approval.ts +186 -0
- package/lib/commands/utils/database-sync.ts +180 -0
- package/lib/commands/utils/deployment.ts +180 -0
- package/lib/commands/utils/error-formatter.ts +417 -0
- package/lib/commands/utils/pools.ts +354 -0
- package/lib/config.ts +932 -0
- package/lib/emulation/docker.ts +312 -0
- package/lib/emulation/utils.ts +207 -0
- package/lib/id.ts +30 -0
- package/lib/paginate.ts +77 -0
- package/lib/parser.ts +264 -0
- package/lib/questions.ts +1167 -0
- package/lib/sdks.ts +84 -0
- package/lib/services.ts +72 -0
- package/lib/spinner.ts +131 -0
- package/lib/type-generation/attribute.ts +18 -0
- package/lib/type-generation/languages/csharp.ts +192 -0
- package/lib/type-generation/languages/dart.ts +217 -0
- package/lib/type-generation/languages/java.ts +152 -0
- package/lib/type-generation/languages/javascript.ts +122 -0
- package/lib/type-generation/languages/kotlin.ts +107 -0
- package/lib/type-generation/languages/language.ts +127 -0
- package/lib/type-generation/languages/php.ts +128 -0
- package/lib/type-generation/languages/swift.ts +191 -0
- package/lib/type-generation/languages/typescript.ts +133 -0
- package/lib/types.ts +75 -0
- package/lib/utils.ts +394 -0
- package/lib/validations.ts +20 -0
- package/package.json +39 -21
- package/scoop/appwrite.config.json +20 -0
- package/scripts/generate-commands.ts +539 -0
- package/tsconfig.json +24 -0
- package/appwrite.json +0 -164
- package/docs/examples/account/create-anonymous-session.md +0 -1
- package/docs/examples/account/create-email-password-session.md +0 -3
- package/docs/examples/account/create-email-token.md +0 -4
- package/docs/examples/account/create-j-w-t.md +0 -1
- package/docs/examples/account/create-magic-u-r-l-token.md +0 -5
- package/docs/examples/account/create-mfa-authenticator.md +0 -2
- package/docs/examples/account/create-mfa-challenge.md +0 -2
- package/docs/examples/account/create-mfa-recovery-codes.md +0 -1
- package/docs/examples/account/create-o-auth2session.md +0 -5
- package/docs/examples/account/create-o-auth2token.md +0 -5
- package/docs/examples/account/create-phone-token.md +0 -3
- package/docs/examples/account/create-phone-verification.md +0 -1
- package/docs/examples/account/create-push-target.md +0 -4
- package/docs/examples/account/create-recovery.md +0 -3
- package/docs/examples/account/create-session.md +0 -3
- package/docs/examples/account/create-verification.md +0 -2
- package/docs/examples/account/create.md +0 -5
- package/docs/examples/account/delete-identity.md +0 -2
- package/docs/examples/account/delete-mfa-authenticator.md +0 -2
- package/docs/examples/account/delete-push-target.md +0 -2
- package/docs/examples/account/delete-session.md +0 -2
- package/docs/examples/account/delete-sessions.md +0 -1
- package/docs/examples/account/delete.md +0 -1
- package/docs/examples/account/get-mfa-recovery-codes.md +0 -1
- package/docs/examples/account/get-prefs.md +0 -1
- package/docs/examples/account/get-session.md +0 -2
- package/docs/examples/account/get.md +0 -1
- package/docs/examples/account/list-identities.md +0 -2
- package/docs/examples/account/list-logs.md +0 -2
- package/docs/examples/account/list-mfa-factors.md +0 -1
- package/docs/examples/account/list-sessions.md +0 -1
- package/docs/examples/account/update-email.md +0 -3
- package/docs/examples/account/update-m-f-a.md +0 -2
- package/docs/examples/account/update-magic-u-r-l-session.md +0 -3
- package/docs/examples/account/update-mfa-authenticator.md +0 -3
- package/docs/examples/account/update-mfa-challenge.md +0 -3
- package/docs/examples/account/update-mfa-recovery-codes.md +0 -1
- package/docs/examples/account/update-name.md +0 -2
- package/docs/examples/account/update-password.md +0 -3
- package/docs/examples/account/update-phone-session.md +0 -3
- package/docs/examples/account/update-phone-verification.md +0 -3
- package/docs/examples/account/update-phone.md +0 -3
- package/docs/examples/account/update-prefs.md +0 -2
- package/docs/examples/account/update-push-target.md +0 -3
- package/docs/examples/account/update-recovery.md +0 -4
- package/docs/examples/account/update-session.md +0 -2
- package/docs/examples/account/update-status.md +0 -1
- package/docs/examples/account/update-verification.md +0 -3
- package/docs/examples/avatars/get-browser.md +0 -5
- package/docs/examples/avatars/get-credit-card.md +0 -5
- package/docs/examples/avatars/get-favicon.md +0 -2
- package/docs/examples/avatars/get-flag.md +0 -5
- package/docs/examples/avatars/get-image.md +0 -4
- package/docs/examples/avatars/get-initials.md +0 -5
- package/docs/examples/avatars/get-q-r.md +0 -5
- package/docs/examples/console/get-resource.md +0 -3
- package/docs/examples/console/variables.md +0 -1
- package/docs/examples/databases/create-boolean-attribute.md +0 -7
- package/docs/examples/databases/create-collection.md +0 -7
- package/docs/examples/databases/create-datetime-attribute.md +0 -7
- package/docs/examples/databases/create-document.md +0 -6
- package/docs/examples/databases/create-documents.md +0 -4
- package/docs/examples/databases/create-email-attribute.md +0 -7
- package/docs/examples/databases/create-enum-attribute.md +0 -8
- package/docs/examples/databases/create-float-attribute.md +0 -9
- package/docs/examples/databases/create-index.md +0 -8
- package/docs/examples/databases/create-integer-attribute.md +0 -9
- package/docs/examples/databases/create-ip-attribute.md +0 -7
- package/docs/examples/databases/create-relationship-attribute.md +0 -9
- package/docs/examples/databases/create-string-attribute.md +0 -9
- package/docs/examples/databases/create-url-attribute.md +0 -7
- package/docs/examples/databases/create.md +0 -4
- package/docs/examples/databases/decrement-document-attribute.md +0 -7
- package/docs/examples/databases/delete-attribute.md +0 -4
- package/docs/examples/databases/delete-collection.md +0 -3
- package/docs/examples/databases/delete-document.md +0 -4
- package/docs/examples/databases/delete-documents.md +0 -4
- package/docs/examples/databases/delete-index.md +0 -4
- package/docs/examples/databases/delete.md +0 -2
- package/docs/examples/databases/get-attribute.md +0 -4
- package/docs/examples/databases/get-collection-usage.md +0 -4
- package/docs/examples/databases/get-collection.md +0 -3
- package/docs/examples/databases/get-database-usage.md +0 -3
- package/docs/examples/databases/get-document.md +0 -5
- package/docs/examples/databases/get-index.md +0 -4
- package/docs/examples/databases/get-usage.md +0 -2
- package/docs/examples/databases/get.md +0 -2
- package/docs/examples/databases/increment-document-attribute.md +0 -7
- package/docs/examples/databases/list-attributes.md +0 -4
- package/docs/examples/databases/list-collection-logs.md +0 -4
- package/docs/examples/databases/list-collections.md +0 -4
- package/docs/examples/databases/list-document-logs.md +0 -5
- package/docs/examples/databases/list-documents.md +0 -4
- package/docs/examples/databases/list-indexes.md +0 -4
- package/docs/examples/databases/list-logs.md +0 -3
- package/docs/examples/databases/list.md +0 -3
- package/docs/examples/databases/update-boolean-attribute.md +0 -7
- package/docs/examples/databases/update-collection.md +0 -7
- package/docs/examples/databases/update-datetime-attribute.md +0 -7
- package/docs/examples/databases/update-document.md +0 -6
- package/docs/examples/databases/update-documents.md +0 -5
- package/docs/examples/databases/update-email-attribute.md +0 -7
- package/docs/examples/databases/update-enum-attribute.md +0 -8
- package/docs/examples/databases/update-float-attribute.md +0 -9
- package/docs/examples/databases/update-integer-attribute.md +0 -9
- package/docs/examples/databases/update-ip-attribute.md +0 -7
- package/docs/examples/databases/update-relationship-attribute.md +0 -6
- package/docs/examples/databases/update-string-attribute.md +0 -8
- package/docs/examples/databases/update-url-attribute.md +0 -7
- package/docs/examples/databases/update.md +0 -4
- package/docs/examples/databases/upsert-document.md +0 -6
- package/docs/examples/databases/upsert-documents.md +0 -4
- package/docs/examples/functions/create-deployment.md +0 -6
- package/docs/examples/functions/create-duplicate-deployment.md +0 -4
- package/docs/examples/functions/create-execution.md +0 -8
- package/docs/examples/functions/create-template-deployment.md +0 -7
- package/docs/examples/functions/create-variable.md +0 -5
- package/docs/examples/functions/create-vcs-deployment.md +0 -5
- package/docs/examples/functions/create.md +0 -19
- package/docs/examples/functions/delete-deployment.md +0 -3
- package/docs/examples/functions/delete-execution.md +0 -3
- package/docs/examples/functions/delete-variable.md +0 -3
- package/docs/examples/functions/delete.md +0 -2
- package/docs/examples/functions/get-deployment-download.md +0 -4
- package/docs/examples/functions/get-deployment.md +0 -3
- package/docs/examples/functions/get-execution.md +0 -3
- package/docs/examples/functions/get-template.md +0 -2
- package/docs/examples/functions/get-usage.md +0 -3
- package/docs/examples/functions/get-variable.md +0 -3
- package/docs/examples/functions/get.md +0 -2
- package/docs/examples/functions/list-deployments.md +0 -4
- package/docs/examples/functions/list-executions.md +0 -3
- package/docs/examples/functions/list-runtimes.md +0 -1
- package/docs/examples/functions/list-specifications.md +0 -1
- package/docs/examples/functions/list-templates.md +0 -5
- package/docs/examples/functions/list-usage.md +0 -2
- package/docs/examples/functions/list-variables.md +0 -2
- package/docs/examples/functions/list.md +0 -3
- package/docs/examples/functions/update-deployment-status.md +0 -3
- package/docs/examples/functions/update-function-deployment.md +0 -3
- package/docs/examples/functions/update-variable.md +0 -6
- package/docs/examples/functions/update.md +0 -19
- package/docs/examples/graphql/mutation.md +0 -2
- package/docs/examples/graphql/query.md +0 -2
- package/docs/examples/health/get-antivirus.md +0 -1
- package/docs/examples/health/get-cache.md +0 -1
- package/docs/examples/health/get-certificate.md +0 -2
- package/docs/examples/health/get-d-b.md +0 -1
- package/docs/examples/health/get-failed-jobs.md +0 -3
- package/docs/examples/health/get-pub-sub.md +0 -1
- package/docs/examples/health/get-queue-builds.md +0 -2
- package/docs/examples/health/get-queue-certificates.md +0 -2
- package/docs/examples/health/get-queue-databases.md +0 -3
- package/docs/examples/health/get-queue-deletes.md +0 -2
- package/docs/examples/health/get-queue-functions.md +0 -2
- package/docs/examples/health/get-queue-logs.md +0 -2
- package/docs/examples/health/get-queue-mails.md +0 -2
- package/docs/examples/health/get-queue-messaging.md +0 -2
- package/docs/examples/health/get-queue-migrations.md +0 -2
- package/docs/examples/health/get-queue-stats-resources.md +0 -2
- package/docs/examples/health/get-queue-usage.md +0 -2
- package/docs/examples/health/get-queue-webhooks.md +0 -2
- package/docs/examples/health/get-storage-local.md +0 -1
- package/docs/examples/health/get-storage.md +0 -1
- package/docs/examples/health/get-time.md +0 -1
- package/docs/examples/health/get.md +0 -1
- package/docs/examples/locale/get.md +0 -1
- package/docs/examples/locale/list-codes.md +0 -1
- package/docs/examples/locale/list-continents.md +0 -1
- package/docs/examples/locale/list-countries-e-u.md +0 -1
- package/docs/examples/locale/list-countries-phones.md +0 -1
- package/docs/examples/locale/list-countries.md +0 -1
- package/docs/examples/locale/list-currencies.md +0 -1
- package/docs/examples/locale/list-languages.md +0 -1
- package/docs/examples/messaging/create-apns-provider.md +0 -9
- package/docs/examples/messaging/create-email.md +0 -13
- package/docs/examples/messaging/create-fcm-provider.md +0 -5
- package/docs/examples/messaging/create-mailgun-provider.md +0 -11
- package/docs/examples/messaging/create-msg91provider.md +0 -7
- package/docs/examples/messaging/create-push.md +0 -20
- package/docs/examples/messaging/create-sendgrid-provider.md +0 -9
- package/docs/examples/messaging/create-sms.md +0 -8
- package/docs/examples/messaging/create-smtp-provider.md +0 -15
- package/docs/examples/messaging/create-subscriber.md +0 -4
- package/docs/examples/messaging/create-telesign-provider.md +0 -7
- package/docs/examples/messaging/create-textmagic-provider.md +0 -7
- package/docs/examples/messaging/create-topic.md +0 -4
- package/docs/examples/messaging/create-twilio-provider.md +0 -7
- package/docs/examples/messaging/create-vonage-provider.md +0 -7
- package/docs/examples/messaging/delete-provider.md +0 -2
- package/docs/examples/messaging/delete-subscriber.md +0 -3
- package/docs/examples/messaging/delete-topic.md +0 -2
- package/docs/examples/messaging/delete.md +0 -2
- package/docs/examples/messaging/get-message.md +0 -2
- package/docs/examples/messaging/get-provider.md +0 -2
- package/docs/examples/messaging/get-subscriber.md +0 -3
- package/docs/examples/messaging/get-topic.md +0 -2
- package/docs/examples/messaging/list-message-logs.md +0 -3
- package/docs/examples/messaging/list-messages.md +0 -3
- package/docs/examples/messaging/list-provider-logs.md +0 -3
- package/docs/examples/messaging/list-providers.md +0 -3
- package/docs/examples/messaging/list-subscriber-logs.md +0 -3
- package/docs/examples/messaging/list-subscribers.md +0 -4
- package/docs/examples/messaging/list-targets.md +0 -3
- package/docs/examples/messaging/list-topic-logs.md +0 -3
- package/docs/examples/messaging/list-topics.md +0 -3
- package/docs/examples/messaging/update-apns-provider.md +0 -9
- package/docs/examples/messaging/update-email.md +0 -13
- package/docs/examples/messaging/update-fcm-provider.md +0 -5
- package/docs/examples/messaging/update-mailgun-provider.md +0 -11
- package/docs/examples/messaging/update-msg91provider.md +0 -7
- package/docs/examples/messaging/update-push.md +0 -20
- package/docs/examples/messaging/update-sendgrid-provider.md +0 -9
- package/docs/examples/messaging/update-sms.md +0 -8
- package/docs/examples/messaging/update-smtp-provider.md +0 -15
- package/docs/examples/messaging/update-telesign-provider.md +0 -7
- package/docs/examples/messaging/update-textmagic-provider.md +0 -7
- package/docs/examples/messaging/update-topic.md +0 -4
- package/docs/examples/messaging/update-twilio-provider.md +0 -7
- package/docs/examples/messaging/update-vonage-provider.md +0 -7
- package/docs/examples/migrations/create-appwrite-migration.md +0 -5
- package/docs/examples/migrations/create-csv-migration.md +0 -4
- package/docs/examples/migrations/create-firebase-migration.md +0 -3
- package/docs/examples/migrations/create-n-host-migration.md +0 -9
- package/docs/examples/migrations/create-supabase-migration.md +0 -8
- package/docs/examples/migrations/delete.md +0 -2
- package/docs/examples/migrations/get-appwrite-report.md +0 -5
- package/docs/examples/migrations/get-firebase-report.md +0 -3
- package/docs/examples/migrations/get-n-host-report.md +0 -9
- package/docs/examples/migrations/get-supabase-report.md +0 -8
- package/docs/examples/migrations/get.md +0 -2
- package/docs/examples/migrations/list.md +0 -3
- package/docs/examples/migrations/retry.md +0 -2
- package/docs/examples/project/create-variable.md +0 -4
- package/docs/examples/project/delete-variable.md +0 -2
- package/docs/examples/project/get-usage.md +0 -4
- package/docs/examples/project/get-variable.md +0 -2
- package/docs/examples/project/list-variables.md +0 -1
- package/docs/examples/project/update-variable.md +0 -5
- package/docs/examples/projects/create-dev-key.md +0 -4
- package/docs/examples/projects/create-j-w-t.md +0 -4
- package/docs/examples/projects/create-key.md +0 -5
- package/docs/examples/projects/create-platform.md +0 -7
- package/docs/examples/projects/create-smtp-test.md +0 -11
- package/docs/examples/projects/create-webhook.md +0 -9
- package/docs/examples/projects/create.md +0 -14
- package/docs/examples/projects/delete-dev-key.md +0 -3
- package/docs/examples/projects/delete-email-template.md +0 -4
- package/docs/examples/projects/delete-key.md +0 -3
- package/docs/examples/projects/delete-platform.md +0 -3
- package/docs/examples/projects/delete-sms-template.md +0 -4
- package/docs/examples/projects/delete-webhook.md +0 -3
- package/docs/examples/projects/delete.md +0 -2
- package/docs/examples/projects/get-dev-key.md +0 -3
- package/docs/examples/projects/get-email-template.md +0 -4
- package/docs/examples/projects/get-key.md +0 -3
- package/docs/examples/projects/get-platform.md +0 -3
- package/docs/examples/projects/get-sms-template.md +0 -4
- package/docs/examples/projects/get-webhook.md +0 -3
- package/docs/examples/projects/get.md +0 -2
- package/docs/examples/projects/list-dev-keys.md +0 -3
- package/docs/examples/projects/list-keys.md +0 -2
- package/docs/examples/projects/list-platforms.md +0 -2
- package/docs/examples/projects/list-webhooks.md +0 -2
- package/docs/examples/projects/list.md +0 -3
- package/docs/examples/projects/update-api-status-all.md +0 -3
- package/docs/examples/projects/update-api-status.md +0 -4
- package/docs/examples/projects/update-auth-duration.md +0 -3
- package/docs/examples/projects/update-auth-limit.md +0 -3
- package/docs/examples/projects/update-auth-password-dictionary.md +0 -3
- package/docs/examples/projects/update-auth-password-history.md +0 -3
- package/docs/examples/projects/update-auth-sessions-limit.md +0 -3
- package/docs/examples/projects/update-auth-status.md +0 -4
- package/docs/examples/projects/update-dev-key.md +0 -5
- package/docs/examples/projects/update-email-template.md +0 -9
- package/docs/examples/projects/update-key.md +0 -6
- package/docs/examples/projects/update-memberships-privacy.md +0 -5
- package/docs/examples/projects/update-mock-numbers.md +0 -3
- package/docs/examples/projects/update-o-auth2.md +0 -6
- package/docs/examples/projects/update-personal-data-check.md +0 -3
- package/docs/examples/projects/update-platform.md +0 -7
- package/docs/examples/projects/update-service-status-all.md +0 -3
- package/docs/examples/projects/update-service-status.md +0 -4
- package/docs/examples/projects/update-session-alerts.md +0 -3
- package/docs/examples/projects/update-sms-template.md +0 -5
- package/docs/examples/projects/update-smtp.md +0 -11
- package/docs/examples/projects/update-team.md +0 -3
- package/docs/examples/projects/update-webhook-signature.md +0 -3
- package/docs/examples/projects/update-webhook.md +0 -10
- package/docs/examples/projects/update.md +0 -12
- package/docs/examples/proxy/create-a-p-i-rule.md +0 -2
- package/docs/examples/proxy/create-function-rule.md +0 -4
- package/docs/examples/proxy/create-redirect-rule.md +0 -6
- package/docs/examples/proxy/create-site-rule.md +0 -4
- package/docs/examples/proxy/delete-rule.md +0 -2
- package/docs/examples/proxy/get-rule.md +0 -2
- package/docs/examples/proxy/list-rules.md +0 -3
- package/docs/examples/proxy/update-rule-verification.md +0 -2
- package/docs/examples/sites/create-deployment.md +0 -7
- package/docs/examples/sites/create-duplicate-deployment.md +0 -3
- package/docs/examples/sites/create-template-deployment.md +0 -7
- package/docs/examples/sites/create-variable.md +0 -5
- package/docs/examples/sites/create-vcs-deployment.md +0 -5
- package/docs/examples/sites/create.md +0 -19
- package/docs/examples/sites/delete-deployment.md +0 -3
- package/docs/examples/sites/delete-log.md +0 -3
- package/docs/examples/sites/delete-variable.md +0 -3
- package/docs/examples/sites/delete.md +0 -2
- package/docs/examples/sites/get-deployment-download.md +0 -4
- package/docs/examples/sites/get-deployment.md +0 -3
- package/docs/examples/sites/get-log.md +0 -3
- package/docs/examples/sites/get-template.md +0 -2
- package/docs/examples/sites/get-usage.md +0 -3
- package/docs/examples/sites/get-variable.md +0 -3
- package/docs/examples/sites/get.md +0 -2
- package/docs/examples/sites/list-deployments.md +0 -4
- package/docs/examples/sites/list-frameworks.md +0 -1
- package/docs/examples/sites/list-logs.md +0 -3
- package/docs/examples/sites/list-specifications.md +0 -1
- package/docs/examples/sites/list-templates.md +0 -5
- package/docs/examples/sites/list-usage.md +0 -2
- package/docs/examples/sites/list-variables.md +0 -2
- package/docs/examples/sites/list.md +0 -3
- package/docs/examples/sites/update-deployment-status.md +0 -3
- package/docs/examples/sites/update-site-deployment.md +0 -3
- package/docs/examples/sites/update-variable.md +0 -6
- package/docs/examples/sites/update.md +0 -19
- package/docs/examples/storage/create-bucket.md +0 -11
- package/docs/examples/storage/create-file.md +0 -5
- package/docs/examples/storage/delete-bucket.md +0 -2
- package/docs/examples/storage/delete-file.md +0 -3
- package/docs/examples/storage/get-bucket-usage.md +0 -3
- package/docs/examples/storage/get-bucket.md +0 -2
- package/docs/examples/storage/get-file-download.md +0 -4
- package/docs/examples/storage/get-file-preview.md +0 -15
- package/docs/examples/storage/get-file-view.md +0 -4
- package/docs/examples/storage/get-file.md +0 -3
- package/docs/examples/storage/get-usage.md +0 -2
- package/docs/examples/storage/list-buckets.md +0 -3
- package/docs/examples/storage/list-files.md +0 -4
- package/docs/examples/storage/update-bucket.md +0 -11
- package/docs/examples/storage/update-file.md +0 -5
- package/docs/examples/teams/create-membership.md +0 -8
- package/docs/examples/teams/create.md +0 -4
- package/docs/examples/teams/delete-membership.md +0 -3
- package/docs/examples/teams/delete.md +0 -2
- package/docs/examples/teams/get-membership.md +0 -3
- package/docs/examples/teams/get-prefs.md +0 -2
- package/docs/examples/teams/get.md +0 -2
- package/docs/examples/teams/list-logs.md +0 -3
- package/docs/examples/teams/list-memberships.md +0 -4
- package/docs/examples/teams/list.md +0 -3
- package/docs/examples/teams/update-membership-status.md +0 -5
- package/docs/examples/teams/update-membership.md +0 -4
- package/docs/examples/teams/update-name.md +0 -3
- package/docs/examples/teams/update-prefs.md +0 -3
- package/docs/examples/tokens/create-file-token.md +0 -4
- package/docs/examples/tokens/delete.md +0 -2
- package/docs/examples/tokens/get.md +0 -2
- package/docs/examples/tokens/list.md +0 -4
- package/docs/examples/tokens/update.md +0 -3
- package/docs/examples/users/create-argon2user.md +0 -5
- package/docs/examples/users/create-bcrypt-user.md +0 -5
- package/docs/examples/users/create-j-w-t.md +0 -4
- package/docs/examples/users/create-m-d5user.md +0 -5
- package/docs/examples/users/create-mfa-recovery-codes.md +0 -2
- package/docs/examples/users/create-p-h-pass-user.md +0 -5
- package/docs/examples/users/create-s-h-a-user.md +0 -6
- package/docs/examples/users/create-scrypt-modified-user.md +0 -8
- package/docs/examples/users/create-scrypt-user.md +0 -10
- package/docs/examples/users/create-session.md +0 -2
- package/docs/examples/users/create-target.md +0 -7
- package/docs/examples/users/create-token.md +0 -4
- package/docs/examples/users/create.md +0 -6
- package/docs/examples/users/delete-identity.md +0 -2
- package/docs/examples/users/delete-mfa-authenticator.md +0 -3
- package/docs/examples/users/delete-session.md +0 -3
- package/docs/examples/users/delete-sessions.md +0 -2
- package/docs/examples/users/delete-target.md +0 -3
- package/docs/examples/users/delete.md +0 -2
- package/docs/examples/users/get-mfa-recovery-codes.md +0 -2
- package/docs/examples/users/get-prefs.md +0 -2
- package/docs/examples/users/get-target.md +0 -3
- package/docs/examples/users/get-usage.md +0 -2
- package/docs/examples/users/get.md +0 -2
- package/docs/examples/users/list-identities.md +0 -3
- package/docs/examples/users/list-logs.md +0 -3
- package/docs/examples/users/list-memberships.md +0 -4
- package/docs/examples/users/list-mfa-factors.md +0 -2
- package/docs/examples/users/list-sessions.md +0 -2
- package/docs/examples/users/list-targets.md +0 -3
- package/docs/examples/users/list.md +0 -3
- package/docs/examples/users/update-email-verification.md +0 -3
- package/docs/examples/users/update-email.md +0 -3
- package/docs/examples/users/update-labels.md +0 -3
- package/docs/examples/users/update-mfa-recovery-codes.md +0 -2
- package/docs/examples/users/update-mfa.md +0 -3
- package/docs/examples/users/update-name.md +0 -3
- package/docs/examples/users/update-password.md +0 -3
- package/docs/examples/users/update-phone-verification.md +0 -3
- package/docs/examples/users/update-phone.md +0 -3
- package/docs/examples/users/update-prefs.md +0 -3
- package/docs/examples/users/update-status.md +0 -3
- package/docs/examples/users/update-target.md +0 -6
- package/docs/examples/vcs/create-repository-detection.md +0 -5
- package/docs/examples/vcs/create-repository.md +0 -4
- package/docs/examples/vcs/delete-installation.md +0 -2
- package/docs/examples/vcs/get-installation.md +0 -2
- package/docs/examples/vcs/get-repository-contents.md +0 -5
- package/docs/examples/vcs/get-repository.md +0 -3
- package/docs/examples/vcs/list-installations.md +0 -3
- package/docs/examples/vcs/list-repositories.md +0 -4
- package/docs/examples/vcs/list-repository-branches.md +0 -3
- package/docs/examples/vcs/update-external-deployments.md +0 -4
- package/functions/Starter function/.prettierrc.json +0 -6
- package/functions/Starter function/README.md +0 -48
- package/functions/Starter function/package-lock.json +0 -60
- package/functions/Starter function/package.json +0 -16
- package/functions/Starter function/src/main.js +0 -35
- package/generate/appwrite.d.ts +0 -18
- package/index.js +0 -109
- package/lib/client.js +0 -259
- package/lib/commands/account.js +0 -2074
- package/lib/commands/avatars.js +0 -491
- package/lib/commands/console.js +0 -129
- package/lib/commands/databases.js +0 -2972
- package/lib/commands/functions.js +0 -1737
- package/lib/commands/generic.js +0 -328
- package/lib/commands/graphql.js +0 -128
- package/lib/commands/health.js +0 -891
- package/lib/commands/init.js +0 -566
- package/lib/commands/locale.js +0 -324
- package/lib/commands/messaging.js +0 -2970
- package/lib/commands/migrations.js +0 -751
- package/lib/commands/organizations.js +0 -48
- package/lib/commands/project.js +0 -308
- package/lib/commands/projects.js +0 -2615
- package/lib/commands/proxy.js +0 -406
- package/lib/commands/pull.js +0 -474
- package/lib/commands/push.js +0 -2117
- package/lib/commands/run.js +0 -330
- package/lib/commands/sites.js +0 -1663
- package/lib/commands/storage.js +0 -990
- package/lib/commands/teams.js +0 -682
- package/lib/commands/tokens.js +0 -261
- package/lib/commands/types.js +0 -156
- package/lib/commands/users.js +0 -2035
- package/lib/commands/vcs.js +0 -484
- package/lib/config.js +0 -705
- package/lib/emulation/docker.js +0 -264
- package/lib/emulation/utils.js +0 -186
- package/lib/exception.js +0 -9
- package/lib/id.js +0 -30
- package/lib/paginate.js +0 -52
- package/lib/parser.js +0 -246
- package/lib/questions.js +0 -1006
- package/lib/sdks.js +0 -60
- package/lib/spinner.js +0 -104
- package/lib/type-generation/attribute.js +0 -16
- package/lib/type-generation/languages/dart.js +0 -196
- package/lib/type-generation/languages/java.js +0 -130
- package/lib/type-generation/languages/javascript.js +0 -102
- package/lib/type-generation/languages/kotlin.js +0 -84
- package/lib/type-generation/languages/language.js +0 -125
- package/lib/type-generation/languages/php.js +0 -109
- package/lib/type-generation/languages/swift.js +0 -169
- package/lib/type-generation/languages/typescript.js +0 -102
- package/lib/utils.js +0 -289
- package/lib/validations.js +0 -17
- package/scoop/appwrite.json +0 -30
- package/sites/JavaScript starter/.env.example +0 -3
- package/sites/JavaScript starter/LICENSE +0 -21
- package/sites/JavaScript starter/images/appwrite.svg +0 -8
- package/sites/JavaScript starter/images/javascript.svg +0 -5
- package/sites/JavaScript starter/index.html +0 -250
- package/sites/JavaScript starter/lib/appwrite.js +0 -10
- package/sites/JavaScript starter/package-lock.json +0 -1431
- package/sites/JavaScript starter/package.json +0 -21
- package/sites/JavaScript starter/readme.md +0 -26
- package/sites/JavaScript starter/src/javascript.svg +0 -1
- package/sites/JavaScript starter/style/app.css +0 -20
- package/sites/JavaScript starter/vite.config.js +0 -7
package/lib/utils.js
DELETED
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
const fs = require("fs");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
const net = require("net");
|
|
4
|
-
const childProcess = require('child_process');
|
|
5
|
-
const chalk = require('chalk');
|
|
6
|
-
const { localConfig, globalConfig } = require("./config");
|
|
7
|
-
|
|
8
|
-
function getAllFiles(folder) {
|
|
9
|
-
const files = [];
|
|
10
|
-
for (const pathDir of fs.readdirSync(folder)) {
|
|
11
|
-
const pathAbsolute = path.join(folder, pathDir);
|
|
12
|
-
let stats;
|
|
13
|
-
try {
|
|
14
|
-
stats = fs.statSync(pathAbsolute);
|
|
15
|
-
} catch (error) {
|
|
16
|
-
continue;
|
|
17
|
-
}
|
|
18
|
-
if (stats.isDirectory()) {
|
|
19
|
-
files.push(...getAllFiles(pathAbsolute));
|
|
20
|
-
} else {
|
|
21
|
-
files.push(pathAbsolute);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return files;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
async function isPortTaken(port) {
|
|
28
|
-
const taken = await new Promise((res, rej) => {
|
|
29
|
-
const tester = net.createServer()
|
|
30
|
-
.once('error', function (err) {
|
|
31
|
-
if (err.code != 'EADDRINUSE') return rej(err)
|
|
32
|
-
res(true)
|
|
33
|
-
})
|
|
34
|
-
.once('listening', function() {
|
|
35
|
-
tester.once('close', function() { res(false) })
|
|
36
|
-
.close()
|
|
37
|
-
})
|
|
38
|
-
.listen(port);
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
return taken;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function systemHasCommand(command) {
|
|
45
|
-
const isUsingWindows = process.platform == 'win32'
|
|
46
|
-
|
|
47
|
-
try {
|
|
48
|
-
if(isUsingWindows) {
|
|
49
|
-
childProcess.execSync('where ' + command, { stdio: 'pipe' })
|
|
50
|
-
} else {
|
|
51
|
-
childProcess.execSync(`[[ $(${command} --version) ]] || { exit 1; } && echo "OK"`, { stdio: 'pipe', shell: '/bin/bash' });
|
|
52
|
-
}
|
|
53
|
-
} catch (error) {
|
|
54
|
-
console.log(error);
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const checkDeployConditions = (localConfig) => {
|
|
62
|
-
if (Object.keys(localConfig.data).length === 0) {
|
|
63
|
-
throw new Error("No appwrite.json file found in the current directory. Please run this command again in the folder containing your appwrite.json file, or run 'appwrite init project' to link current directory to an Appwrite project.");
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function showConsoleLink(serviceName, action, ...ids) {
|
|
68
|
-
const projectId = localConfig.getProject().projectId;
|
|
69
|
-
|
|
70
|
-
const url = new URL(globalConfig.getEndpoint().replace('/v1', '/console'));
|
|
71
|
-
url.pathname += `/project-${projectId}`;
|
|
72
|
-
action = action.toLowerCase();
|
|
73
|
-
|
|
74
|
-
switch (serviceName) {
|
|
75
|
-
case "account":
|
|
76
|
-
url.pathname = url.pathname.replace(`/project-${projectId}`, '');
|
|
77
|
-
url.pathname += getAccountPath(action);
|
|
78
|
-
break;
|
|
79
|
-
case "databases":
|
|
80
|
-
url.pathname += getDatabasePath(action, ids);
|
|
81
|
-
break;
|
|
82
|
-
case "functions":
|
|
83
|
-
url.pathname += getFunctionsPath(action, ids);
|
|
84
|
-
break;
|
|
85
|
-
case "messaging":
|
|
86
|
-
url.pathname += getMessagingPath(action, ids);
|
|
87
|
-
break;
|
|
88
|
-
case "projects":
|
|
89
|
-
url.pathname = url.pathname.replace(`/project-${projectId}`, '');
|
|
90
|
-
url.pathname += getProjectsPath(action, ids);
|
|
91
|
-
break;
|
|
92
|
-
case "storage":
|
|
93
|
-
url.pathname += getBucketsPath(action, ids);
|
|
94
|
-
break;
|
|
95
|
-
case "teams":
|
|
96
|
-
url.pathname += getTeamsPath(action, ids);
|
|
97
|
-
break;
|
|
98
|
-
case "organizations":
|
|
99
|
-
url.pathname += getOrganizationsPath(action, ids);
|
|
100
|
-
break;
|
|
101
|
-
case "users":
|
|
102
|
-
url.pathname += getUsersPath(action, ids);
|
|
103
|
-
break;
|
|
104
|
-
default:
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
console.log(`${chalk.green.bold("✓ Success:")} ${chalk.green(url)}`);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function getAccountPath(action) {
|
|
112
|
-
let path = '/account';
|
|
113
|
-
|
|
114
|
-
if (action === 'listsessions') {
|
|
115
|
-
path += '/sessions';
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
return path;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function getDatabasePath(action, ids) {
|
|
122
|
-
let path = '/databases';
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
if (['get', 'listcollections', 'getcollection', 'listattributes', 'listdocuments', 'getdocument', 'listindexes', 'getdatabaseusage'].includes(action)) {
|
|
126
|
-
path += `/database-${ids[0]}`;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
if (action === 'getdatabaseusage') {
|
|
130
|
-
path += `/usage`;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if (['getcollection', 'listattributes', 'listdocuments', 'getdocument', 'listindexes'].includes(action)) {
|
|
134
|
-
path += `/collection-${ids[1]}`;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (action === 'listattributes') {
|
|
138
|
-
path += '/attributes';
|
|
139
|
-
}
|
|
140
|
-
if (action === 'listindexes') {
|
|
141
|
-
path += '/indexes';
|
|
142
|
-
}
|
|
143
|
-
if (action === 'getdocument') {
|
|
144
|
-
path += `/document-${ids[2]}`;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
return path;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function getFunctionsPath(action, ids) {
|
|
152
|
-
let path = '/functions';
|
|
153
|
-
|
|
154
|
-
if (action !== 'list') {
|
|
155
|
-
path += `/function-${ids[0]}`;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
if (action === 'getdeployment') {
|
|
159
|
-
path += `/deployment-${ids[1]}`
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
if (action === 'getexecution' || action === 'listexecution') {
|
|
163
|
-
path += `/executions`
|
|
164
|
-
}
|
|
165
|
-
if (action === 'getfunctionusage') {
|
|
166
|
-
path += `/usage`
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return path;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
function getMessagingPath(action, ids) {
|
|
173
|
-
let path = '/messaging';
|
|
174
|
-
|
|
175
|
-
if (['getmessage', 'listmessagelogs'].includes(action)) {
|
|
176
|
-
path += `/message-${ids[0]}`;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (['listproviders', 'getprovider'].includes(action)) {
|
|
180
|
-
path += `/providers`;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
if (action === 'getprovider') {
|
|
184
|
-
path += `/provider-${ids[0]}`;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
if (['listtopics', 'gettopic'].includes(action)) {
|
|
188
|
-
path += `/topics`;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
if (action === 'gettopic') {
|
|
192
|
-
path += `/topic-${ids[0]}`;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
return path;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
function getProjectsPath(action, ids) {
|
|
199
|
-
let path = '';
|
|
200
|
-
|
|
201
|
-
if (action !== 'list') {
|
|
202
|
-
path += `/project-${ids[0]}`;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
if (['listkeys', 'getkey'].includes(action)) {
|
|
206
|
-
path += '/overview/keys'
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
if (['listplatforms', 'getplatform'].includes(action)) {
|
|
210
|
-
path += '/overview/platforms'
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
if (['listwebhooks', 'getwebhook'].includes(action)) {
|
|
214
|
-
path += '/settings/webhooks'
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
if (['getplatform', 'getkey', 'getwebhook'].includes(action)) {
|
|
218
|
-
path += `/${ids[1]}`;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
return path;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
function getBucketsPath(action, ids) {
|
|
225
|
-
let path = '/storage';
|
|
226
|
-
|
|
227
|
-
if (action !== 'listbuckets') {
|
|
228
|
-
path += `/bucket-${ids[0]}`;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
if (action === 'getbucketusage') {
|
|
232
|
-
path += `/usage`
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
if (action === 'getfile') {
|
|
236
|
-
path += `/file-${ids[1]}`
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
return path;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
function getTeamsPath(action, ids) {
|
|
243
|
-
let path = '/auth/teams';
|
|
244
|
-
|
|
245
|
-
if (action !== 'list') {
|
|
246
|
-
path += `/team-${ids[0]}`;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
return path;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
function getOrganizationsPath(action, ids) {
|
|
253
|
-
let path = `/organization-${ids[0]}`;
|
|
254
|
-
|
|
255
|
-
if (action === 'list') {
|
|
256
|
-
path = '/account/organizations';
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
return path;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
function getUsersPath(action, ids) {
|
|
263
|
-
let path = '/auth';
|
|
264
|
-
|
|
265
|
-
if (action !== 'list') {
|
|
266
|
-
path += `/user-${ids[0]}`;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
if (action === 'listsessions') {
|
|
270
|
-
path += 'sessions';
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
return path;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
function isCloud() {
|
|
277
|
-
const endpoint = globalConfig.getEndpoint() || "https://cloud.appwrite.io/v1";
|
|
278
|
-
const hostname = new URL(endpoint).hostname;
|
|
279
|
-
return hostname.endsWith('appwrite.io');
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
module.exports = {
|
|
283
|
-
getAllFiles,
|
|
284
|
-
isPortTaken,
|
|
285
|
-
systemHasCommand,
|
|
286
|
-
checkDeployConditions,
|
|
287
|
-
showConsoleLink,
|
|
288
|
-
isCloud
|
|
289
|
-
};
|
package/lib/validations.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const validateRequired = (resource, value) => {
|
|
2
|
-
if (Array.isArray(value)) {
|
|
3
|
-
if (value.length <= 0) {
|
|
4
|
-
return `Please select at least one ${resource}`;
|
|
5
|
-
}
|
|
6
|
-
} else {
|
|
7
|
-
if (value === undefined || value === null || value === 0 || (typeof value === "string" && value.trim() === '')) {
|
|
8
|
-
return `${resource} is required`;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
module.exports = {
|
|
16
|
-
validateRequired
|
|
17
|
-
}
|
package/scoop/appwrite.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json",
|
|
3
|
-
"version": "0.16.0",
|
|
4
|
-
"description": "The Appwrite CLI is a command-line application that allows you to interact with Appwrite and perform server-side tasks using your terminal.",
|
|
5
|
-
"homepage": "https://github.com/appwrite/sdk-for-cli",
|
|
6
|
-
"license": "BSD-3-Clause",
|
|
7
|
-
"architecture": {
|
|
8
|
-
"64bit": {
|
|
9
|
-
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/0.16.0/appwrite-cli-win-x64.exe",
|
|
10
|
-
"bin": [
|
|
11
|
-
[
|
|
12
|
-
"appwrite-cli-win-x64.exe",
|
|
13
|
-
"appwrite"
|
|
14
|
-
]
|
|
15
|
-
]
|
|
16
|
-
},
|
|
17
|
-
"arm64": {
|
|
18
|
-
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/0.16.0/appwrite-cli-win-arm64.exe",
|
|
19
|
-
"bin": [
|
|
20
|
-
[
|
|
21
|
-
"appwrite-cli-win-arm64.exe",
|
|
22
|
-
"appwrite"
|
|
23
|
-
]
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"checkver": {
|
|
28
|
-
"github": "https://github.com/appwrite/sdk-for-cli"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Appwrite
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path
|
|
3
|
-
d="M24.4429 16.4322V21.9096H10.7519C6.76318 21.9096 3.28044 19.7067 1.4171 16.4322C1.14622 15.9561 0.909137 15.4567 0.710264 14.9383C0.319864 13.9225 0.0744552 12.8325 0 11.6952V10.2143C0.0161646 9.96089 0.0416361 9.70942 0.0749451 9.46095C0.143032 8.95105 0.245898 8.45211 0.381093 7.96711C1.66006 3.36909 5.81877 0 10.7519 0C15.6851 0 19.8433 3.36909 21.1223 7.96711H15.2682C14.3072 6.4683 12.6437 5.4774 10.7519 5.4774C8.86017 5.4774 7.19668 6.4683 6.23562 7.96711C5.9427 8.42274 5.71542 8.92516 5.56651 9.46095C5.43425 9.93599 5.36371 10.4369 5.36371 10.9548C5.36371 12.5248 6.01324 13.94 7.05463 14.9383C8.01961 15.865 9.32061 16.4322 10.7519 16.4322H24.4429Z"
|
|
4
|
-
fill="#FD366E" />
|
|
5
|
-
<path
|
|
6
|
-
d="M24.4429 9.46094V14.9383H14.4492C15.4906 13.94 16.1401 12.5248 16.1401 10.9548C16.1401 10.4369 16.0696 9.93598 15.9373 9.46094H24.4429Z"
|
|
7
|
-
fill="#FD366E" />
|
|
8
|
-
</svg>
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 630 630">
|
|
3
|
-
<rect width="630" height="630" fill="#f7df1e"/>
|
|
4
|
-
<path d="m423.2 492.19c12.69 20.72 29.2 35.95 58.4 35.95 24.53 0 40.2-12.26 40.2-29.2 0-20.3-16.1-27.49-43.1-39.3l-14.8-6.35c-42.72-18.2-71.1-41-71.1-89.2 0-44.4 33.83-78.2 86.7-78.2 37.64 0 64.7 13.1 84.2 47.4l-46.1 29.6c-10.15-18.2-21.1-25.37-38.1-25.37-17.34 0-28.33 11-28.33 25.37 0 17.76 11 24.95 36.4 35.95l14.8 6.34c50.3 21.57 78.7 43.56 78.7 93 0 53.3-41.87 82.5-98.1 82.5-54.98 0-90.5-26.2-107.88-60.54zm-209.13 5.13c9.3 16.5 17.76 30.45 38.1 30.45 19.45 0 31.72-7.61 31.72-37.2v-201.3h59.2v202.1c0 61.3-35.94 89.2-88.4 89.2-47.4 0-74.85-24.53-88.81-54.075z"/>
|
|
5
|
-
</svg>
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<link rel="icon" type="image/svg+xml" href="/images/appwrite.svg" />
|
|
7
|
-
<title>Appwrite + Javascript </title>
|
|
8
|
-
<link rel="stylesheet" href="./style/app.css">
|
|
9
|
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
10
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin />
|
|
11
|
-
<link
|
|
12
|
-
href="https://fonts.googleapis.com/css2?family=Fira+Code&family=Inter:opsz,wght@14..32,100..900&family=Poppins:wght@300;400&display=swap"
|
|
13
|
-
rel="stylesheet"
|
|
14
|
-
/>
|
|
15
|
-
<link rel="icon" type="image/svg+xml" href="/appwrite.svg" />
|
|
16
|
-
</head>
|
|
17
|
-
<body class="bg-[#FAFAFB] font-[Inter] text-sm text-[#56565C]">
|
|
18
|
-
<main class="checker-background flex flex-col items-center p-5" id="main">
|
|
19
|
-
<div class="mt-25 flex w-full max-w-[40em] items-center justify-center lg:mt-34">
|
|
20
|
-
<div class="rounded-[25%] border border-[#19191C0A] bg-[#F9F9FA] p-3 shadow-[0px_9.36px_9.36px_0px_hsla(0,0%,0%,0.04)]">
|
|
21
|
-
<div class="rounded-[25%] border border-[#FAFAFB] bg-white p-5 shadow-[0px_2px_12px_0px_hsla(0,0%,0%,0.03)] lg:p-9">
|
|
22
|
-
<img alt="Javascript logo" src="./images/javascript.svg" class="h-14 w-14" width="56" height="56">
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="flex w-38 items-center transition-opacity duration-2500 opacity-0" id="success-icon">
|
|
26
|
-
<div class="to-[rgba(253, 54, 110, 0.15)] h-[1px] flex-1 bg-gradient-to-l from-[#f02e65]"></div>
|
|
27
|
-
<div class="icon-check flex h-5 w-5 items-center justify-center rounded-full border border-[#FD366E52] bg-[#FD366E14] text-[#FD366E]"></div>
|
|
28
|
-
<div class="to-[rgba(253, 54, 110, 0.15)] h-[1px] flex-1 bg-gradient-to-r from-[#f02e65]"></div>
|
|
29
|
-
</div>
|
|
30
|
-
<div class="rounded-[25%] border border-[#19191C0A] bg-[#F9F9FA] p-3 shadow-[0px_9.36px_9.36px_0px_hsla(0,0%,0%,0.04)]">
|
|
31
|
-
<div class="rounded-[25%] border border-[#FAFAFB] bg-white p-5 shadow-[0px_2px_12px_0px_hsla(0,0%,0%,0.03)] lg:p-9">
|
|
32
|
-
<img alt="Appwrite logo" src="./images/appwrite.svg" class="h-14 w-14" width="56" height="56">
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
<section class="mt-12 flex h-52 flex-col items-center" id="status-section">
|
|
38
|
-
<div class="flex flex-row gap-4" id="loading-spinner" style="display: none;">
|
|
39
|
-
<div role="status">
|
|
40
|
-
<svg aria-hidden="true" class="h-5 w-5 animate-spin fill-[#FD366E] text-gray-200 dark:text-gray-600" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
41
|
-
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
|
|
42
|
-
<path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/>
|
|
43
|
-
</svg>
|
|
44
|
-
<span class="sr-only">Loading...</span>
|
|
45
|
-
</div>
|
|
46
|
-
<span>Waiting for connection...</span>
|
|
47
|
-
</div>
|
|
48
|
-
<h1 class="font-[Poppins] text-2xl font-light text-[#2D2D31]" id="status-message">Check connection</h1>
|
|
49
|
-
<p class="mt-2 mb-8" id="status-description">Send a ping to verify the connection</p>
|
|
50
|
-
<button class="cursor-pointer rounded-md bg-[#FD366E] px-2.5 py-1.5" id="ping-button">
|
|
51
|
-
<span class="text-white">Send a ping</span>
|
|
52
|
-
</button>
|
|
53
|
-
</section>
|
|
54
|
-
|
|
55
|
-
<div class="grid grid-rows-3 gap-7 lg:grid-cols-3 lg:grid-rows-none">
|
|
56
|
-
<div class="flex h-full w-72 flex-col gap-2 rounded-md border border-[#EDEDF0] bg-white p-4">
|
|
57
|
-
<h2 class="text-xl font-light text-[#2D2D31]">Edit your app</h2>
|
|
58
|
-
<p>Edit <code class="rounded-sm bg-[#EDEDF0] p-1">app/page.js</code> to get started with building your app.</p>
|
|
59
|
-
</div>
|
|
60
|
-
<a href="https://cloud.appwrite.io" target="_blank" rel="noopener noreferrer">
|
|
61
|
-
<div class="flex h-full w-72 flex-col gap-2 rounded-md border border-[#EDEDF0] bg-white p-4">
|
|
62
|
-
<div class="flex flex-row items-center justify-between">
|
|
63
|
-
<h2 class="text-xl font-light text-[#2D2D31]">Go to console</h2>
|
|
64
|
-
<span class="icon-arrow-right text-[#D8D8DB]"></span>
|
|
65
|
-
</div>
|
|
66
|
-
<p>Navigate to the console to control and oversee the Appwrite services.</p>
|
|
67
|
-
</div>
|
|
68
|
-
</a>
|
|
69
|
-
<a href="https://appwrite.io/docs" target="_blank" rel="noopener noreferrer">
|
|
70
|
-
<div class="flex h-full w-72 flex-col gap-2 rounded-md border border-[#EDEDF0] bg-white p-4">
|
|
71
|
-
<div class="flex flex-row items-center justify-between">
|
|
72
|
-
<h2 class="text-xl font-light text-[#2D2D31]">Explore docs</h2>
|
|
73
|
-
<span class="icon-arrow-right text-[#D8D8DB]"></span>
|
|
74
|
-
</div>
|
|
75
|
-
<p>Discover the full power of Appwrite by diving into our documentation.</p>
|
|
76
|
-
</div>
|
|
77
|
-
</a>
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
<aside class="fixed bottom-0 flex w-full cursor-pointer border-t border-[#EDEDF0] bg-white">
|
|
81
|
-
<details id="logs-details" class="w-full">
|
|
82
|
-
<summary class="flex w-full flex-row justify-between p-4 marker:content-none">
|
|
83
|
-
<div class="flex gap-2">
|
|
84
|
-
<span class="font-semibold">Logs</span>
|
|
85
|
-
<div class="flex items-center rounded-md bg-[#E6E6E6] px-2" id="log-count" style="display: none;">
|
|
86
|
-
<span class="font-semibold" id="log-count-value"></span>
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
<div class="icon">
|
|
90
|
-
<span class="icon-cheveron-down" aria-hidden="true"></span>
|
|
91
|
-
</div>
|
|
92
|
-
</summary>
|
|
93
|
-
<div class="flex w-full flex-col lg:flex-row">
|
|
94
|
-
<div class="flex flex-col border-r border-[#EDEDF0]">
|
|
95
|
-
<div class="border-y border-[#EDEDF0] bg-[#FAFAFB] px-4 py-2 text-[#97979B]">Project</div>
|
|
96
|
-
<div class="grid grid-cols-2 gap-4 p-4">
|
|
97
|
-
<div class="flex flex-col">
|
|
98
|
-
<span class="text-[#97979B]">Endpoint</span>
|
|
99
|
-
<span class="truncate" id="project-endpoint"></span>
|
|
100
|
-
</div>
|
|
101
|
-
<div class="flex flex-col">
|
|
102
|
-
<span class="text-[#97979B]">Project-ID</span>
|
|
103
|
-
<span class="truncate" id="project-id"></span>
|
|
104
|
-
</div>
|
|
105
|
-
<div class="flex flex-col">
|
|
106
|
-
<span class="text-[#97979B]">Project name</span>
|
|
107
|
-
<span class="truncate" id="project-name"></span>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
<div class="flex-grow">
|
|
112
|
-
<table class="w-full">
|
|
113
|
-
<thead>
|
|
114
|
-
<tr class="border-y border-[#EDEDF0] bg-[#FAFAFB] text-[#97979B]">
|
|
115
|
-
<td class="w-52 py-2 pl-4">Date</td>
|
|
116
|
-
<td>Status</td>
|
|
117
|
-
<td>Method</td>
|
|
118
|
-
<td class="hidden lg:table-cell">Path</td>
|
|
119
|
-
<td class="hidden lg:table-cell">Response</td>
|
|
120
|
-
</tr>
|
|
121
|
-
</thead>
|
|
122
|
-
<tbody id="log-table">
|
|
123
|
-
<tr>
|
|
124
|
-
<td class="py-2 pl-4 font-[Fira_Code]">There are no logs to show</td>
|
|
125
|
-
</tr>
|
|
126
|
-
</tbody>
|
|
127
|
-
</table>
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
</details>
|
|
131
|
-
</aside>
|
|
132
|
-
</main>
|
|
133
|
-
|
|
134
|
-
<script type="module">
|
|
135
|
-
import { client } from "./lib/appwrite.js";
|
|
136
|
-
import { AppwriteException } from "appwrite";
|
|
137
|
-
import "@appwrite.io/pink-icons";
|
|
138
|
-
|
|
139
|
-
document.addEventListener("DOMContentLoaded", () => {
|
|
140
|
-
let logs = [];
|
|
141
|
-
let status = "idle";
|
|
142
|
-
let showLogs = false;
|
|
143
|
-
|
|
144
|
-
const detailsRef = document.getElementById("logs-details");
|
|
145
|
-
const main = document.getElementById("main");
|
|
146
|
-
const statusMessage = document.getElementById("status-message");
|
|
147
|
-
const statusDescription = document.getElementById("status-description");
|
|
148
|
-
const pingButton = document.getElementById("ping-button");
|
|
149
|
-
const loadingSpinner = document.getElementById("loading-spinner");
|
|
150
|
-
const successIcon = document.getElementById("success-icon");
|
|
151
|
-
const logCount = document.getElementById("log-count");
|
|
152
|
-
const logCountValue = document.getElementById("log-count-value");
|
|
153
|
-
const logTable = document.getElementById("log-table");
|
|
154
|
-
|
|
155
|
-
const updateHeight = () => {
|
|
156
|
-
if (detailsRef) {
|
|
157
|
-
const height = detailsRef.clientHeight;
|
|
158
|
-
main.style.marginBottom = `${height}px`;
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
window.addEventListener("resize", updateHeight);
|
|
163
|
-
|
|
164
|
-
detailsRef.addEventListener("toggle", updateHeight);
|
|
165
|
-
|
|
166
|
-
async function sendPing() {
|
|
167
|
-
if (status === "loading") return;
|
|
168
|
-
status = "loading";
|
|
169
|
-
statusMessage.textContent = "";
|
|
170
|
-
statusDescription.textContent = "";
|
|
171
|
-
pingButton.style.display = "none";
|
|
172
|
-
loadingSpinner.style.display = "flex";
|
|
173
|
-
|
|
174
|
-
try {
|
|
175
|
-
const result = await client.ping();
|
|
176
|
-
const log = {
|
|
177
|
-
date: new Date(),
|
|
178
|
-
method: "GET",
|
|
179
|
-
path: "/v1/ping",
|
|
180
|
-
status: 200,
|
|
181
|
-
response: JSON.stringify(result),
|
|
182
|
-
};
|
|
183
|
-
logs.unshift(log);
|
|
184
|
-
status = "success";
|
|
185
|
-
statusMessage.textContent = "Congratulations!";
|
|
186
|
-
statusDescription.textContent = "You connected your app successfully.";
|
|
187
|
-
|
|
188
|
-
updateLogs();
|
|
189
|
-
} catch (err) {
|
|
190
|
-
const log = {
|
|
191
|
-
date: new Date(),
|
|
192
|
-
method: "GET",
|
|
193
|
-
path: "/v1/ping",
|
|
194
|
-
status: err instanceof AppwriteException ? err.code : 500,
|
|
195
|
-
response: err instanceof AppwriteException ? err.message : "Something went wrong",
|
|
196
|
-
};
|
|
197
|
-
logs.unshift(log);
|
|
198
|
-
status = "error";
|
|
199
|
-
statusMessage.textContent = "Check connection";
|
|
200
|
-
statusDescription.textContent = "Send a ping to verify the connection";
|
|
201
|
-
updateLogs();
|
|
202
|
-
}
|
|
203
|
-
pingButton.style.display = "block";
|
|
204
|
-
loadingSpinner.style.display = "none";
|
|
205
|
-
successIcon.style.opacity = status === "success" ? "100" : "0";
|
|
206
|
-
showLogs = true;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
const updateLogs = () => {
|
|
210
|
-
logTable.innerHTML = "";
|
|
211
|
-
if (logs.length > 0) {
|
|
212
|
-
logCount.style.display = "flex";
|
|
213
|
-
logCountValue.textContent = logs.length;
|
|
214
|
-
logs.forEach((log) => {
|
|
215
|
-
const row = document.createElement("tr");
|
|
216
|
-
row.innerHTML = `
|
|
217
|
-
<td class="py-2 pl-4 font-[Fira_Code]">${log.date.toLocaleString("en-US", {
|
|
218
|
-
month: "short",
|
|
219
|
-
day: "numeric",
|
|
220
|
-
hour: "2-digit",
|
|
221
|
-
minute: "2-digit",
|
|
222
|
-
})}</td>
|
|
223
|
-
<td>
|
|
224
|
-
<div class="w-fit rounded-sm ${log.status > 400 ? "bg-[#FF453A3D] text-[#B31212]" : "bg-[#10B9813D] text-[#0A714F]"} px-1">
|
|
225
|
-
${log.status}
|
|
226
|
-
</div>
|
|
227
|
-
</td>
|
|
228
|
-
<td>${log.method}</td>
|
|
229
|
-
<td class="hidden lg:table-cell">${log.path}</td>
|
|
230
|
-
<td class="hidden font-[Fira_Code] lg:table-cell">${log.response}</td>
|
|
231
|
-
`;
|
|
232
|
-
logTable.appendChild(row);
|
|
233
|
-
});
|
|
234
|
-
} else {
|
|
235
|
-
logCount.style.display = "none";
|
|
236
|
-
const row = document.createElement("tr");
|
|
237
|
-
row.innerHTML = `<td class="py-2 pl-4 font-[Fira_Code]">There are no logs to show</td>`;
|
|
238
|
-
logTable.appendChild(row);
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
pingButton.addEventListener("click", sendPing);
|
|
243
|
-
document.getElementById('project-endpoint').textContent = import.meta.env.VITE_APPWRITE_ENDPOINT;
|
|
244
|
-
document.getElementById('project-id').textContent = import.meta.env.VITE_APPWRITE_PROJECT_ID;
|
|
245
|
-
document.getElementById('project-name').textContent = import.meta.env.VITE_APPWRITE_PROJECT_NAME;
|
|
246
|
-
updateHeight();
|
|
247
|
-
});
|
|
248
|
-
</script>
|
|
249
|
-
</body>
|
|
250
|
-
</html>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Client, Account, Databases } from "appwrite";
|
|
2
|
-
|
|
3
|
-
const client = new Client()
|
|
4
|
-
.setEndpoint(import.meta.env.VITE_APPWRITE_ENDPOINT)
|
|
5
|
-
.setProject(import.meta.env.VITE_APPWRITE_PROJECT_ID);
|
|
6
|
-
|
|
7
|
-
const account = new Account(client);
|
|
8
|
-
const databases = new Databases(client);
|
|
9
|
-
|
|
10
|
-
export { client, account, databases };
|