appwrite-cli 4.2.1 → 5.0.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 +1 -1
- package/README.md +6 -9
- package/docs/examples/account/{create-email-session.md → create-email-password-session.md} +1 -1
- package/docs/examples/account/create-email-token.md +4 -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-auth2token.md +5 -0
- package/docs/examples/account/create-phone-token.md +3 -0
- package/docs/examples/account/create-push-target.md +4 -0
- package/docs/examples/account/create-session.md +3 -0
- package/docs/examples/account/create.md +1 -1
- package/docs/examples/account/delete-identity.md +1 -1
- package/docs/examples/account/delete-mfa-authenticator.md +3 -0
- package/docs/examples/account/delete-push-target.md +2 -0
- package/docs/examples/account/delete-session.md +1 -1
- package/docs/examples/account/delete.md +1 -0
- package/docs/examples/account/get-mfa-recovery-codes.md +1 -0
- package/docs/examples/account/get-session.md +1 -1
- package/docs/examples/account/list-mfa-factors.md +1 -0
- package/docs/examples/account/update-m-f-a.md +2 -0
- package/docs/examples/account/update-magic-u-r-l-session.md +2 -2
- 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 +1 -1
- package/docs/examples/account/update-phone-session.md +2 -2
- package/docs/examples/account/update-phone-verification.md +2 -2
- package/docs/examples/account/update-push-target.md +3 -0
- package/docs/examples/account/update-recovery.md +3 -4
- package/docs/examples/account/update-session.md +1 -1
- package/docs/examples/account/update-verification.md +2 -2
- package/docs/examples/assistant/chat.md +1 -1
- package/docs/examples/avatars/get-q-r.md +1 -1
- package/docs/examples/databases/create-boolean-attribute.md +2 -2
- package/docs/examples/databases/create-collection.md +3 -3
- package/docs/examples/databases/create-datetime-attribute.md +2 -2
- package/docs/examples/databases/create-document.md +3 -3
- package/docs/examples/databases/create-email-attribute.md +2 -2
- package/docs/examples/databases/create-enum-attribute.md +2 -2
- package/docs/examples/databases/create-float-attribute.md +2 -2
- package/docs/examples/databases/create-index.md +2 -2
- package/docs/examples/databases/create-integer-attribute.md +2 -2
- package/docs/examples/databases/create-ip-attribute.md +2 -2
- package/docs/examples/databases/create-relationship-attribute.md +3 -3
- package/docs/examples/databases/create-string-attribute.md +2 -2
- package/docs/examples/databases/create-url-attribute.md +2 -2
- package/docs/examples/databases/create.md +2 -2
- package/docs/examples/databases/delete-attribute.md +2 -2
- package/docs/examples/databases/delete-collection.md +2 -2
- package/docs/examples/databases/delete-document.md +3 -3
- package/docs/examples/databases/delete-index.md +2 -2
- package/docs/examples/databases/delete.md +1 -1
- package/docs/examples/databases/get-attribute.md +2 -2
- package/docs/examples/databases/get-collection-usage.md +2 -2
- package/docs/examples/databases/get-collection.md +2 -2
- package/docs/examples/databases/get-database-usage.md +1 -1
- package/docs/examples/databases/get-document.md +3 -3
- package/docs/examples/databases/get-index.md +2 -2
- package/docs/examples/databases/get.md +1 -1
- package/docs/examples/databases/list-attributes.md +2 -2
- package/docs/examples/databases/list-collection-logs.md +2 -2
- package/docs/examples/databases/list-collections.md +1 -1
- package/docs/examples/databases/list-document-logs.md +3 -3
- package/docs/examples/databases/list-documents.md +2 -2
- package/docs/examples/databases/list-indexes.md +2 -2
- package/docs/examples/databases/list-logs.md +1 -1
- package/docs/examples/databases/update-boolean-attribute.md +2 -2
- package/docs/examples/databases/update-collection.md +3 -3
- package/docs/examples/databases/update-datetime-attribute.md +2 -2
- package/docs/examples/databases/update-document.md +3 -3
- package/docs/examples/databases/update-email-attribute.md +2 -2
- package/docs/examples/databases/update-enum-attribute.md +3 -3
- package/docs/examples/databases/update-float-attribute.md +2 -2
- package/docs/examples/databases/update-integer-attribute.md +2 -2
- package/docs/examples/databases/update-ip-attribute.md +2 -2
- package/docs/examples/databases/update-relationship-attribute.md +2 -2
- package/docs/examples/databases/update-string-attribute.md +3 -3
- package/docs/examples/databases/update-url-attribute.md +2 -2
- package/docs/examples/databases/update.md +2 -2
- package/docs/examples/functions/create-build.md +3 -3
- package/docs/examples/functions/create-deployment.md +1 -1
- package/docs/examples/functions/create-execution.md +1 -1
- package/docs/examples/functions/create-variable.md +3 -3
- package/docs/examples/functions/create.md +3 -3
- package/docs/examples/functions/delete-deployment.md +2 -2
- package/docs/examples/functions/delete-variable.md +2 -2
- package/docs/examples/functions/delete.md +1 -1
- package/docs/examples/functions/download-deployment.md +2 -2
- package/docs/examples/functions/get-deployment.md +2 -2
- package/docs/examples/functions/get-execution.md +2 -2
- package/docs/examples/functions/get-function-usage.md +1 -1
- package/docs/examples/functions/get-variable.md +2 -2
- package/docs/examples/functions/get.md +1 -1
- package/docs/examples/functions/list-deployments.md +1 -1
- package/docs/examples/functions/list-executions.md +1 -1
- package/docs/examples/functions/list-variables.md +1 -1
- package/docs/examples/functions/update-deployment.md +2 -2
- package/docs/examples/functions/update-variable.md +3 -3
- package/docs/examples/functions/update.md +2 -2
- package/docs/examples/health/get-certificate.md +2 -0
- package/docs/examples/health/get-failed-jobs.md +3 -0
- package/docs/examples/health/get-queue-usage-dump.md +2 -0
- package/docs/examples/health/get-queue-usage.md +2 -0
- package/docs/examples/health/get-storage.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 +17 -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 +12 -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 +17 -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 +2 -2
- package/docs/examples/migrations/create-firebase-migration.md +1 -1
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +1 -1
- package/docs/examples/migrations/create-n-host-migration.md +6 -6
- package/docs/examples/migrations/create-supabase-migration.md +4 -4
- package/docs/examples/migrations/delete.md +1 -1
- package/docs/examples/migrations/get-appwrite-report.md +2 -2
- package/docs/examples/migrations/get-firebase-report-o-auth.md +1 -1
- package/docs/examples/migrations/get-firebase-report.md +1 -1
- package/docs/examples/migrations/get-n-host-report.md +6 -6
- package/docs/examples/migrations/get-supabase-report.md +4 -4
- package/docs/examples/migrations/get.md +1 -1
- package/docs/examples/migrations/retry.md +1 -1
- package/docs/examples/project/create-variable.md +2 -2
- package/docs/examples/project/delete-variable.md +1 -1
- package/docs/examples/project/get-usage.md +2 -0
- package/docs/examples/project/get-variable.md +1 -1
- package/docs/examples/project/update-variable.md +2 -2
- package/docs/examples/projects/create-key.md +2 -2
- package/docs/examples/projects/create-platform.md +2 -2
- package/docs/examples/projects/create-smtp-test.md +11 -0
- package/docs/examples/projects/create-webhook.md +4 -3
- package/docs/examples/projects/create.md +2 -2
- package/docs/examples/projects/delete-email-template.md +1 -1
- package/docs/examples/projects/delete-key.md +2 -2
- package/docs/examples/projects/delete-platform.md +2 -2
- package/docs/examples/projects/delete-sms-template.md +1 -1
- package/docs/examples/projects/delete-webhook.md +2 -2
- package/docs/examples/projects/delete.md +1 -1
- package/docs/examples/projects/get-email-template.md +1 -1
- package/docs/examples/projects/get-key.md +2 -2
- package/docs/examples/projects/get-platform.md +2 -2
- package/docs/examples/projects/get-sms-template.md +1 -1
- package/docs/examples/projects/get-webhook.md +2 -2
- package/docs/examples/projects/get.md +1 -1
- package/docs/examples/projects/list-keys.md +1 -1
- package/docs/examples/projects/list-platforms.md +1 -1
- package/docs/examples/projects/list-webhooks.md +1 -1
- 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 +1 -1
- package/docs/examples/projects/update-auth-limit.md +1 -1
- package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
- package/docs/examples/projects/update-auth-password-history.md +1 -1
- package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
- package/docs/examples/projects/update-auth-status.md +1 -1
- package/docs/examples/projects/update-email-template.md +3 -3
- package/docs/examples/projects/update-key.md +3 -3
- package/docs/examples/projects/update-o-auth2.md +1 -1
- package/docs/examples/projects/update-personal-data-check.md +1 -1
- package/docs/examples/projects/update-platform.md +3 -3
- package/docs/examples/projects/update-service-status-all.md +1 -1
- package/docs/examples/projects/update-service-status.md +1 -1
- package/docs/examples/projects/update-sms-template.md +2 -2
- package/docs/examples/projects/update-smtp.md +11 -0
- package/docs/examples/projects/update-team.md +2 -2
- package/docs/examples/projects/update-webhook-signature.md +2 -2
- package/docs/examples/projects/update-webhook.md +5 -4
- package/docs/examples/projects/update.md +2 -2
- package/docs/examples/proxy/delete-rule.md +1 -1
- package/docs/examples/proxy/get-rule.md +1 -1
- package/docs/examples/proxy/update-rule-verification.md +1 -1
- package/docs/examples/storage/create-bucket.md +2 -2
- package/docs/examples/storage/create-file.md +2 -2
- package/docs/examples/storage/delete-bucket.md +1 -1
- package/docs/examples/storage/delete-file.md +2 -2
- package/docs/examples/storage/get-bucket-usage.md +1 -1
- package/docs/examples/storage/get-bucket.md +1 -1
- package/docs/examples/storage/get-file-download.md +2 -2
- package/docs/examples/storage/get-file-preview.md +2 -2
- package/docs/examples/storage/get-file-view.md +2 -2
- package/docs/examples/storage/get-file.md +2 -2
- package/docs/examples/storage/list-files.md +1 -1
- package/docs/examples/storage/update-bucket.md +2 -2
- package/docs/examples/storage/update-file.md +2 -2
- package/docs/examples/teams/create-membership.md +1 -1
- package/docs/examples/teams/create.md +2 -2
- package/docs/examples/teams/delete-membership.md +2 -2
- package/docs/examples/teams/delete.md +1 -1
- package/docs/examples/teams/get-membership.md +2 -2
- package/docs/examples/teams/get-prefs.md +1 -1
- package/docs/examples/teams/get.md +1 -1
- package/docs/examples/teams/list-logs.md +1 -1
- package/docs/examples/teams/list-memberships.md +1 -1
- package/docs/examples/teams/update-membership-status.md +4 -4
- package/docs/examples/teams/update-membership.md +2 -2
- package/docs/examples/teams/update-name.md +2 -2
- package/docs/examples/teams/update-prefs.md +1 -1
- package/docs/examples/users/create-argon2user.md +1 -1
- package/docs/examples/users/create-bcrypt-user.md +1 -1
- package/docs/examples/users/create-m-d5user.md +1 -1
- package/docs/examples/users/create-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/create-p-h-pass-user.md +1 -1
- package/docs/examples/users/create-s-h-a-user.md +1 -1
- package/docs/examples/users/create-scrypt-modified-user.md +4 -4
- package/docs/examples/users/create-scrypt-user.md +2 -2
- 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 +1 -1
- package/docs/examples/users/delete-identity.md +1 -1
- package/docs/examples/users/delete-mfa-authenticator.md +3 -0
- package/docs/examples/users/delete-session.md +2 -2
- package/docs/examples/users/delete-sessions.md +1 -1
- package/docs/examples/users/delete-target.md +3 -0
- package/docs/examples/users/delete.md +1 -1
- package/docs/examples/users/get-mfa-recovery-codes.md +2 -0
- package/docs/examples/users/get-prefs.md +1 -1
- package/docs/examples/users/get-target.md +3 -0
- package/docs/examples/users/get-usage.md +0 -1
- package/docs/examples/users/get.md +1 -1
- package/docs/examples/users/list-logs.md +1 -1
- package/docs/examples/users/list-memberships.md +1 -1
- package/docs/examples/users/list-mfa-factors.md +2 -0
- package/docs/examples/users/list-sessions.md +1 -1
- package/docs/examples/users/list-targets.md +3 -0
- package/docs/examples/users/update-email-verification.md +1 -1
- package/docs/examples/users/update-email.md +1 -1
- package/docs/examples/users/update-labels.md +1 -1
- 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 +2 -2
- package/docs/examples/users/update-password.md +1 -1
- package/docs/examples/users/update-phone-verification.md +1 -1
- package/docs/examples/users/update-phone.md +1 -1
- package/docs/examples/users/update-prefs.md +1 -1
- package/docs/examples/users/update-status.md +1 -1
- package/docs/examples/users/update-target.md +6 -0
- package/docs/examples/vcs/create-repository-detection.md +2 -2
- package/docs/examples/vcs/create-repository.md +2 -2
- package/docs/examples/vcs/delete-installation.md +1 -1
- package/docs/examples/vcs/get-installation.md +1 -1
- package/docs/examples/vcs/get-repository.md +2 -2
- package/docs/examples/vcs/list-repositories.md +1 -1
- package/docs/examples/vcs/list-repository-branches.md +2 -2
- package/docs/examples/vcs/update-external-deployments.md +3 -3
- package/index.js +2 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +9 -4
- package/lib/commands/account.js +966 -381
- package/lib/commands/assistant.js +3 -8
- package/lib/commands/avatars.js +32 -48
- package/lib/commands/console.js +3 -8
- package/lib/commands/databases.js +119 -265
- package/lib/commands/deploy.js +45 -6
- package/lib/commands/functions.js +59 -124
- package/lib/commands/generic.js +0 -1
- package/lib/commands/graphql.js +5 -13
- package/lib/commands/health.js +225 -89
- package/lib/commands/locale.js +17 -43
- package/lib/commands/messaging.js +2815 -0
- package/lib/commands/migrations.js +35 -85
- package/lib/commands/project.js +28 -38
- package/lib/commands/projects.js +286 -270
- package/lib/commands/proxy.js +12 -29
- package/lib/commands/storage.js +42 -87
- package/lib/commands/teams.js +31 -75
- package/lib/commands/users.js +677 -235
- package/lib/commands/vcs.js +19 -48
- package/lib/paginate.js +2 -2
- package/lib/parser.js +1 -0
- package/package.json +1 -1
- package/scoop/appwrite.json +3 -3
- package/docs/examples/account/create-magic-u-r-l-session.md +0 -4
- package/docs/examples/account/create-phone-session.md +0 -3
- package/docs/examples/projects/get-usage.md +0 -3
- package/docs/examples/projects/update-smtp-configuration.md +0 -11
package/lib/commands/vcs.js
CHANGED
|
@@ -37,7 +37,7 @@ function convertReadStreamToReadableStream(readStream) {
|
|
|
37
37
|
|
|
38
38
|
const vcs = new Command("vcs").description(commandDescriptions['vcs']).configureHelp({
|
|
39
39
|
helpWidth: process.stdout.columns || 80
|
|
40
|
-
|
|
40
|
+
})
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* @typedef {Object} VcsListRepositoriesRequestParams
|
|
@@ -52,21 +52,18 @@ const vcs = new Command("vcs").description(commandDescriptions['vcs']).configure
|
|
|
52
52
|
*/
|
|
53
53
|
const vcsListRepositories = async ({ installationId, search, parseOutput = true, sdk = undefined}) => {
|
|
54
54
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
55
|
-
|
|
56
55
|
let apiPath = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
|
|
57
56
|
let payload = {};
|
|
58
57
|
if (typeof search !== 'undefined') {
|
|
59
58
|
payload['search'] = search;
|
|
60
59
|
}
|
|
61
60
|
|
|
62
|
-
|
|
63
61
|
let response = undefined;
|
|
64
|
-
|
|
62
|
+
|
|
65
63
|
response = await client.call('get', apiPath, {
|
|
66
64
|
'content-type': 'application/json',
|
|
67
65
|
}, payload);
|
|
68
66
|
|
|
69
|
-
|
|
70
67
|
if (parseOutput) {
|
|
71
68
|
parse(response)
|
|
72
69
|
success()
|
|
@@ -89,7 +86,6 @@ const vcsListRepositories = async ({ installationId, search, parseOutput = true,
|
|
|
89
86
|
*/
|
|
90
87
|
const vcsCreateRepository = async ({ installationId, name, xprivate, parseOutput = true, sdk = undefined}) => {
|
|
91
88
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
92
|
-
|
|
93
89
|
let apiPath = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
|
|
94
90
|
let payload = {};
|
|
95
91
|
if (typeof name !== 'undefined') {
|
|
@@ -99,14 +95,12 @@ const vcsCreateRepository = async ({ installationId, name, xprivate, parseOutput
|
|
|
99
95
|
payload['private'] = xprivate;
|
|
100
96
|
}
|
|
101
97
|
|
|
102
|
-
|
|
103
98
|
let response = undefined;
|
|
104
|
-
|
|
99
|
+
|
|
105
100
|
response = await client.call('post', apiPath, {
|
|
106
101
|
'content-type': 'application/json',
|
|
107
102
|
}, payload);
|
|
108
103
|
|
|
109
|
-
|
|
110
104
|
if (parseOutput) {
|
|
111
105
|
parse(response)
|
|
112
106
|
success()
|
|
@@ -128,18 +122,15 @@ const vcsCreateRepository = async ({ installationId, name, xprivate, parseOutput
|
|
|
128
122
|
*/
|
|
129
123
|
const vcsGetRepository = async ({ installationId, providerRepositoryId, parseOutput = true, sdk = undefined}) => {
|
|
130
124
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
131
|
-
|
|
132
125
|
let apiPath = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
|
|
133
126
|
let payload = {};
|
|
134
127
|
|
|
135
|
-
|
|
136
128
|
let response = undefined;
|
|
137
|
-
|
|
129
|
+
|
|
138
130
|
response = await client.call('get', apiPath, {
|
|
139
131
|
'content-type': 'application/json',
|
|
140
132
|
}, payload);
|
|
141
133
|
|
|
142
|
-
|
|
143
134
|
if (parseOutput) {
|
|
144
135
|
parse(response)
|
|
145
136
|
success()
|
|
@@ -161,18 +152,15 @@ const vcsGetRepository = async ({ installationId, providerRepositoryId, parseOut
|
|
|
161
152
|
*/
|
|
162
153
|
const vcsListRepositoryBranches = async ({ installationId, providerRepositoryId, parseOutput = true, sdk = undefined}) => {
|
|
163
154
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
164
|
-
|
|
165
155
|
let apiPath = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/branches'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
|
|
166
156
|
let payload = {};
|
|
167
157
|
|
|
168
|
-
|
|
169
158
|
let response = undefined;
|
|
170
|
-
|
|
159
|
+
|
|
171
160
|
response = await client.call('get', apiPath, {
|
|
172
161
|
'content-type': 'application/json',
|
|
173
162
|
}, payload);
|
|
174
163
|
|
|
175
|
-
|
|
176
164
|
if (parseOutput) {
|
|
177
165
|
parse(response)
|
|
178
166
|
success()
|
|
@@ -195,21 +183,18 @@ const vcsListRepositoryBranches = async ({ installationId, providerRepositoryId,
|
|
|
195
183
|
*/
|
|
196
184
|
const vcsCreateRepositoryDetection = async ({ installationId, providerRepositoryId, providerRootDirectory, parseOutput = true, sdk = undefined}) => {
|
|
197
185
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
198
|
-
|
|
199
186
|
let apiPath = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/detection'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
|
|
200
187
|
let payload = {};
|
|
201
188
|
if (typeof providerRootDirectory !== 'undefined') {
|
|
202
189
|
payload['providerRootDirectory'] = providerRootDirectory;
|
|
203
190
|
}
|
|
204
191
|
|
|
205
|
-
|
|
206
192
|
let response = undefined;
|
|
207
|
-
|
|
193
|
+
|
|
208
194
|
response = await client.call('post', apiPath, {
|
|
209
195
|
'content-type': 'application/json',
|
|
210
196
|
}, payload);
|
|
211
197
|
|
|
212
|
-
|
|
213
198
|
if (parseOutput) {
|
|
214
199
|
parse(response)
|
|
215
200
|
success()
|
|
@@ -232,21 +217,18 @@ const vcsCreateRepositoryDetection = async ({ installationId, providerRepository
|
|
|
232
217
|
*/
|
|
233
218
|
const vcsUpdateExternalDeployments = async ({ installationId, repositoryId, providerPullRequestId, parseOutput = true, sdk = undefined}) => {
|
|
234
219
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
235
|
-
|
|
236
220
|
let apiPath = '/vcs/github/installations/{installationId}/repositories/{repositoryId}'.replace('{installationId}', installationId).replace('{repositoryId}', repositoryId);
|
|
237
221
|
let payload = {};
|
|
238
222
|
if (typeof providerPullRequestId !== 'undefined') {
|
|
239
223
|
payload['providerPullRequestId'] = providerPullRequestId;
|
|
240
224
|
}
|
|
241
225
|
|
|
242
|
-
|
|
243
226
|
let response = undefined;
|
|
244
|
-
|
|
227
|
+
|
|
245
228
|
response = await client.call('patch', apiPath, {
|
|
246
229
|
'content-type': 'application/json',
|
|
247
230
|
}, payload);
|
|
248
231
|
|
|
249
|
-
|
|
250
232
|
if (parseOutput) {
|
|
251
233
|
parse(response)
|
|
252
234
|
success()
|
|
@@ -268,7 +250,6 @@ const vcsUpdateExternalDeployments = async ({ installationId, repositoryId, prov
|
|
|
268
250
|
*/
|
|
269
251
|
const vcsListInstallations = async ({ queries, search, parseOutput = true, sdk = undefined}) => {
|
|
270
252
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
271
|
-
|
|
272
253
|
let apiPath = '/vcs/installations';
|
|
273
254
|
let payload = {};
|
|
274
255
|
if (typeof queries !== 'undefined') {
|
|
@@ -278,14 +259,12 @@ const vcsListInstallations = async ({ queries, search, parseOutput = true, sdk =
|
|
|
278
259
|
payload['search'] = search;
|
|
279
260
|
}
|
|
280
261
|
|
|
281
|
-
|
|
282
262
|
let response = undefined;
|
|
283
|
-
|
|
263
|
+
|
|
284
264
|
response = await client.call('get', apiPath, {
|
|
285
265
|
'content-type': 'application/json',
|
|
286
266
|
}, payload);
|
|
287
267
|
|
|
288
|
-
|
|
289
268
|
if (parseOutput) {
|
|
290
269
|
parse(response)
|
|
291
270
|
success()
|
|
@@ -306,18 +285,15 @@ const vcsListInstallations = async ({ queries, search, parseOutput = true, sdk =
|
|
|
306
285
|
*/
|
|
307
286
|
const vcsGetInstallation = async ({ installationId, parseOutput = true, sdk = undefined}) => {
|
|
308
287
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
309
|
-
|
|
310
288
|
let apiPath = '/vcs/installations/{installationId}'.replace('{installationId}', installationId);
|
|
311
289
|
let payload = {};
|
|
312
290
|
|
|
313
|
-
|
|
314
291
|
let response = undefined;
|
|
315
|
-
|
|
292
|
+
|
|
316
293
|
response = await client.call('get', apiPath, {
|
|
317
294
|
'content-type': 'application/json',
|
|
318
295
|
}, payload);
|
|
319
296
|
|
|
320
|
-
|
|
321
297
|
if (parseOutput) {
|
|
322
298
|
parse(response)
|
|
323
299
|
success()
|
|
@@ -338,18 +314,15 @@ const vcsGetInstallation = async ({ installationId, parseOutput = true, sdk = un
|
|
|
338
314
|
*/
|
|
339
315
|
const vcsDeleteInstallation = async ({ installationId, parseOutput = true, sdk = undefined}) => {
|
|
340
316
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
341
|
-
|
|
342
317
|
let apiPath = '/vcs/installations/{installationId}'.replace('{installationId}', installationId);
|
|
343
318
|
let payload = {};
|
|
344
319
|
|
|
345
|
-
|
|
346
320
|
let response = undefined;
|
|
347
|
-
|
|
321
|
+
|
|
348
322
|
response = await client.call('delete', apiPath, {
|
|
349
323
|
'content-type': 'application/json',
|
|
350
324
|
}, payload);
|
|
351
325
|
|
|
352
|
-
|
|
353
326
|
if (parseOutput) {
|
|
354
327
|
parse(response)
|
|
355
328
|
success()
|
|
@@ -358,7 +331,6 @@ const vcsDeleteInstallation = async ({ installationId, parseOutput = true, sdk =
|
|
|
358
331
|
return response;
|
|
359
332
|
}
|
|
360
333
|
|
|
361
|
-
|
|
362
334
|
vcs
|
|
363
335
|
.command(`listRepositories`)
|
|
364
336
|
.description(``)
|
|
@@ -423,16 +395,15 @@ vcs
|
|
|
423
395
|
.requiredOption(`--installationId <installationId>`, `Installation Id`)
|
|
424
396
|
.action(actionRunner(vcsDeleteInstallation))
|
|
425
397
|
|
|
426
|
-
|
|
427
398
|
module.exports = {
|
|
428
399
|
vcs,
|
|
429
|
-
vcsListRepositories,
|
|
430
|
-
vcsCreateRepository,
|
|
431
|
-
vcsGetRepository,
|
|
432
|
-
vcsListRepositoryBranches,
|
|
433
|
-
vcsCreateRepositoryDetection,
|
|
434
|
-
vcsUpdateExternalDeployments,
|
|
435
|
-
vcsListInstallations,
|
|
436
|
-
vcsGetInstallation,
|
|
437
|
-
vcsDeleteInstallation
|
|
400
|
+
vcsListRepositories,
|
|
401
|
+
vcsCreateRepository,
|
|
402
|
+
vcsGetRepository,
|
|
403
|
+
vcsListRepositoryBranches,
|
|
404
|
+
vcsCreateRepositoryDetection,
|
|
405
|
+
vcsUpdateExternalDeployments,
|
|
406
|
+
vcsListInstallations,
|
|
407
|
+
vcsGetInstallation,
|
|
408
|
+
vcsDeleteInstallation
|
|
438
409
|
};
|
package/lib/paginate.js
CHANGED
|
@@ -10,8 +10,8 @@ const paginate = async (action, args = {}, limit = 100, wrapper = '') => {
|
|
|
10
10
|
const response = await action({
|
|
11
11
|
...args,
|
|
12
12
|
queries: [
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
JSON.stringify({ method: 'limit', values: [limit] }),
|
|
14
|
+
JSON.stringify({ method: 'offset', values: [offset] })
|
|
15
15
|
]
|
|
16
16
|
});
|
|
17
17
|
|
package/lib/parser.js
CHANGED
|
@@ -170,6 +170,7 @@ const commandDescriptions = {
|
|
|
170
170
|
"logout": `The logout command allows you to logout of your Appwrite account.`,
|
|
171
171
|
"console" : `The console command allows gives you access to the APIs used by the Appwrite console.`,
|
|
172
172
|
"assistant": `The assistant command allows you to interact with the Appwrite Assistant AI`,
|
|
173
|
+
"messaging": `The messaging command allows you to send messages.`,
|
|
173
174
|
"migrations": `The migrations command allows you to migrate data between services.`,
|
|
174
175
|
"project": `The project command is for overall project administration.`,
|
|
175
176
|
"proxy": `The proxy command allows you to configure behavior for your attached domains.`,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "appwrite-cli",
|
|
3
3
|
"homepage": "https://appwrite.io/support",
|
|
4
4
|
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "5.0.0",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"bin": {
|
package/scoop/appwrite.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
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
5
|
"homepage": "https://github.com/appwrite/sdk-for-cli",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"architecture": {
|
|
8
8
|
"64bit": {
|
|
9
|
-
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/
|
|
9
|
+
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.0/appwrite-cli-win-x64.exe",
|
|
10
10
|
"bin": [
|
|
11
11
|
[
|
|
12
12
|
"appwrite-cli-win-x64.exe",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"arm64": {
|
|
18
|
-
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/
|
|
18
|
+
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.0/appwrite-cli-win-arm64.exe",
|
|
19
19
|
"bin": [
|
|
20
20
|
[
|
|
21
21
|
"appwrite-cli-win-arm64.exe",
|