appwrite-cli 6.2.2 → 6.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/docs/examples/databases/update-float-attribute.md +2 -2
- package/docs/examples/databases/update-integer-attribute.md +2 -2
- package/docs/examples/health/get-queue-stats-resources.md +2 -0
- package/docs/examples/health/get-queue-stats-usage-dump.md +2 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +6 -3
- package/lib/commands/avatars.js +2 -2
- package/lib/commands/databases.js +9 -9
- package/lib/commands/health.js +49 -44
- package/lib/commands/migrations.js +6 -6
- package/lib/parser.js +1 -1
- package/lib/utils.js +7 -1
- package/package.json +1 -1
- package/scoop/appwrite.json +3 -3
- package/docs/examples/health/get-queue-usage-dump.md +0 -2
- package/docs/examples/health/get-queue.md +0 -1
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using
|
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
31
|
$ appwrite -v
|
|
32
|
-
6.2.
|
|
32
|
+
6.2.3
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### Install using prebuilt binaries
|
|
@@ -60,7 +60,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
|
|
|
60
60
|
Once the installation completes, you can verify your install using
|
|
61
61
|
```
|
|
62
62
|
$ appwrite -v
|
|
63
|
-
6.2.
|
|
63
|
+
6.2.3
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## Getting Started
|
|
@@ -124,7 +124,7 @@ My Awesome Function
|
|
|
124
124
|
You can now deploy this function using
|
|
125
125
|
|
|
126
126
|
```sh
|
|
127
|
-
$ appwrite
|
|
127
|
+
$ appwrite push function
|
|
128
128
|
|
|
129
129
|
? Which functions would you like to deploy? My Awesome Function (61d1a4c81dfcd95bc834)
|
|
130
130
|
ℹ Info Deploying function My Awesome Function ( 61d1a4c81dfcd95bc834 )
|
|
@@ -138,7 +138,7 @@ Your function has now been deployed on your Appwrite server! As soon as the buil
|
|
|
138
138
|
Similarly, you can deploy all your collections to your Appwrite server using
|
|
139
139
|
|
|
140
140
|
```sh
|
|
141
|
-
appwrite
|
|
141
|
+
appwrite push collections
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
> ### Note
|
|
@@ -163,7 +163,7 @@ $ appwrite users list
|
|
|
163
163
|
|
|
164
164
|
To create a document you can use the following command
|
|
165
165
|
```sh
|
|
166
|
-
$ appwrite database
|
|
166
|
+
$ appwrite databases create-document --database-id <DATABASE_ID> --collection-id <COLLECTION_ID> --document-id "unique()" --data '{"name": "Walter O Brein"}' --permissions 'read("any")' 'read("team:abc")'
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
### Some Gotchas
|
|
@@ -207,6 +207,7 @@ The Appwrite CLI can also work in a CI environment. The initialisation of the CL
|
|
|
207
207
|
appwrite client --endpoint http://localhost/v1 --projectId <PROJECT_ID> --key <API KEY>
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
+
|
|
210
211
|
## Contribution
|
|
211
212
|
|
|
212
213
|
This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
|
package/install.ps1
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
# You can use "View source" of this page to see the full script.
|
|
14
14
|
|
|
15
15
|
# REPO
|
|
16
|
-
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.
|
|
17
|
-
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.
|
|
16
|
+
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.3/appwrite-cli-win-x64.exe"
|
|
17
|
+
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.3/appwrite-cli-win-arm64.exe"
|
|
18
18
|
|
|
19
19
|
$APPWRITE_BINARY_NAME = "appwrite.exe"
|
|
20
20
|
|
package/install.sh
CHANGED
|
@@ -97,7 +97,7 @@ printSuccess() {
|
|
|
97
97
|
downloadBinary() {
|
|
98
98
|
echo "[2/4] Downloading executable for $OS ($ARCH) ..."
|
|
99
99
|
|
|
100
|
-
GITHUB_LATEST_VERSION="6.2.
|
|
100
|
+
GITHUB_LATEST_VERSION="6.2.3"
|
|
101
101
|
GITHUB_FILE="appwrite-cli-${OS}-${ARCH}"
|
|
102
102
|
GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE"
|
|
103
103
|
|
package/lib/client.js
CHANGED
|
@@ -16,8 +16,8 @@ class Client {
|
|
|
16
16
|
'x-sdk-name': 'Command Line',
|
|
17
17
|
'x-sdk-platform': 'console',
|
|
18
18
|
'x-sdk-language': 'cli',
|
|
19
|
-
'x-sdk-version': '6.2.
|
|
20
|
-
'user-agent' : `AppwriteCLI/6.2.
|
|
19
|
+
'x-sdk-version': '6.2.3',
|
|
20
|
+
'user-agent' : `AppwriteCLI/6.2.3 (${os.type()} ${os.version()}; ${os.arch()})`,
|
|
21
21
|
'X-Appwrite-Response-Format' : '1.6.0',
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -129,8 +129,11 @@ class Client {
|
|
|
129
129
|
* @return this
|
|
130
130
|
*/
|
|
131
131
|
setEndpoint(endpoint) {
|
|
132
|
-
|
|
132
|
+
if (!endpoint.startsWith('http://') && !endpoint.startsWith('https://')) {
|
|
133
|
+
throw new AppwriteException('Invalid endpoint URL: ' + endpoint);
|
|
134
|
+
}
|
|
133
135
|
|
|
136
|
+
this.endpoint = endpoint;
|
|
134
137
|
return this;
|
|
135
138
|
}
|
|
136
139
|
|
package/lib/commands/avatars.js
CHANGED
|
@@ -96,7 +96,7 @@ const avatarsGetBrowser = async ({code,width,height,quality,parseOutput = true,
|
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* @typedef {Object} AvatarsGetCreditCardRequestParams
|
|
99
|
-
* @property {CreditCard} code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.
|
|
99
|
+
* @property {CreditCard} code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.
|
|
100
100
|
* @property {number} width Image width. Pass an integer between 0 to 2000. Defaults to 100.
|
|
101
101
|
* @property {number} height Image height. Pass an integer between 0 to 2000. Defaults to 100.
|
|
102
102
|
* @property {number} quality Image quality. Pass an integer between 0 to 100. Defaults to 100.
|
|
@@ -433,7 +433,7 @@ avatars
|
|
|
433
433
|
avatars
|
|
434
434
|
.command(`get-credit-card`)
|
|
435
435
|
.description(`The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings. When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px. `)
|
|
436
|
-
.requiredOption(`--code <code>`, `Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.`)
|
|
436
|
+
.requiredOption(`--code <code>`, `Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.`)
|
|
437
437
|
.option(`--width <width>`, `Image width. Pass an integer between 0 to 2000. Defaults to 100.`, parseInteger)
|
|
438
438
|
.option(`--height <height>`, `Image height. Pass an integer between 0 to 2000. Defaults to 100.`, parseInteger)
|
|
439
439
|
.option(`--quality <quality>`, `Image quality. Pass an integer between 0 to 100. Defaults to 100.`, parseInteger)
|
|
@@ -958,9 +958,9 @@ const databasesCreateFloatAttribute = async ({databaseId,collectionId,key,requir
|
|
|
958
958
|
* @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
959
959
|
* @property {string} key Attribute Key.
|
|
960
960
|
* @property {boolean} required Is attribute required?
|
|
961
|
+
* @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
961
962
|
* @property {number} min Minimum value to enforce on new documents
|
|
962
963
|
* @property {number} max Maximum value to enforce on new documents
|
|
963
|
-
* @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
964
964
|
* @property {string} newKey New attribute key.
|
|
965
965
|
* @property {boolean} overrideForCli
|
|
966
966
|
* @property {boolean} parseOutput
|
|
@@ -970,7 +970,7 @@ const databasesCreateFloatAttribute = async ({databaseId,collectionId,key,requir
|
|
|
970
970
|
/**
|
|
971
971
|
* @param {DatabasesUpdateFloatAttributeRequestParams} params
|
|
972
972
|
*/
|
|
973
|
-
const databasesUpdateFloatAttribute = async ({databaseId,collectionId,key,required,min,max,
|
|
973
|
+
const databasesUpdateFloatAttribute = async ({databaseId,collectionId,key,required,xdefault,min,max,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
974
974
|
let client = !sdk ? await sdkForProject() :
|
|
975
975
|
sdk;
|
|
976
976
|
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
@@ -1067,9 +1067,9 @@ const databasesCreateIntegerAttribute = async ({databaseId,collectionId,key,requ
|
|
|
1067
1067
|
* @property {string} collectionId Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1068
1068
|
* @property {string} key Attribute Key.
|
|
1069
1069
|
* @property {boolean} required Is attribute required?
|
|
1070
|
+
* @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1070
1071
|
* @property {number} min Minimum value to enforce on new documents
|
|
1071
1072
|
* @property {number} max Maximum value to enforce on new documents
|
|
1072
|
-
* @property {number} xdefault Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1073
1073
|
* @property {string} newKey New attribute key.
|
|
1074
1074
|
* @property {boolean} overrideForCli
|
|
1075
1075
|
* @property {boolean} parseOutput
|
|
@@ -1079,7 +1079,7 @@ const databasesCreateIntegerAttribute = async ({databaseId,collectionId,key,requ
|
|
|
1079
1079
|
/**
|
|
1080
1080
|
* @param {DatabasesUpdateIntegerAttributeRequestParams} params
|
|
1081
1081
|
*/
|
|
1082
|
-
const databasesUpdateIntegerAttribute = async ({databaseId,collectionId,key,required,min,max,
|
|
1082
|
+
const databasesUpdateIntegerAttribute = async ({databaseId,collectionId,key,required,xdefault,min,max,newKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1083
1083
|
let client = !sdk ? await sdkForProject() :
|
|
1084
1084
|
sdk;
|
|
1085
1085
|
let apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
@@ -2316,9 +2316,9 @@ databases
|
|
|
2316
2316
|
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
2317
2317
|
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2318
2318
|
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
2319
|
-
.requiredOption(`--min <min>`, `Minimum value to enforce on new documents`, parseInteger)
|
|
2320
|
-
.requiredOption(`--max <max>`, `Maximum value to enforce on new documents`, parseInteger)
|
|
2321
2319
|
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseInteger)
|
|
2320
|
+
.option(`--min <min>`, `Minimum value to enforce on new documents`, parseInteger)
|
|
2321
|
+
.option(`--max <max>`, `Maximum value to enforce on new documents`, parseInteger)
|
|
2322
2322
|
.option(`--new-key <new-key>`, `New attribute key.`)
|
|
2323
2323
|
.action(actionRunner(databasesUpdateFloatAttribute))
|
|
2324
2324
|
|
|
@@ -2342,9 +2342,9 @@ databases
|
|
|
2342
2342
|
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
2343
2343
|
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
2344
2344
|
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
2345
|
-
.requiredOption(`--min <min>`, `Minimum value to enforce on new documents`, parseInteger)
|
|
2346
|
-
.requiredOption(`--max <max>`, `Maximum value to enforce on new documents`, parseInteger)
|
|
2347
2345
|
.option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`, parseInteger)
|
|
2346
|
+
.option(`--min <min>`, `Minimum value to enforce on new documents`, parseInteger)
|
|
2347
|
+
.option(`--max <max>`, `Maximum value to enforce on new documents`, parseInteger)
|
|
2348
2348
|
.option(`--new-key <new-key>`, `New attribute key.`)
|
|
2349
2349
|
.action(actionRunner(databasesUpdateIntegerAttribute))
|
|
2350
2350
|
|
|
@@ -2467,7 +2467,7 @@ databases
|
|
|
2467
2467
|
|
|
2468
2468
|
databases
|
|
2469
2469
|
.command(`create-document`)
|
|
2470
|
-
.description(`Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console
|
|
2470
|
+
.description(`Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. `)
|
|
2471
2471
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
2472
2472
|
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.`)
|
|
2473
2473
|
.requiredOption(`--document-id <document-id>`, `Document ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
package/lib/commands/health.js
CHANGED
|
@@ -223,36 +223,6 @@ const healthGetPubSub = async ({parseOutput = true, overrideForCli = false, sdk
|
|
|
223
223
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
/**
|
|
227
|
-
* @typedef {Object} HealthGetQueueRequestParams
|
|
228
|
-
* @property {boolean} overrideForCli
|
|
229
|
-
* @property {boolean} parseOutput
|
|
230
|
-
* @property {libClient | undefined} sdk
|
|
231
|
-
*/
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* @param {HealthGetQueueRequestParams} params
|
|
235
|
-
*/
|
|
236
|
-
const healthGetQueue = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
237
|
-
let client = !sdk ? await sdkForProject() :
|
|
238
|
-
sdk;
|
|
239
|
-
let apiPath = '/health/queue';
|
|
240
|
-
let payload = {};
|
|
241
|
-
|
|
242
|
-
let response = undefined;
|
|
243
|
-
|
|
244
|
-
response = await client.call('get', apiPath, {
|
|
245
|
-
'content-type': 'application/json',
|
|
246
|
-
}, payload);
|
|
247
|
-
|
|
248
|
-
if (parseOutput) {
|
|
249
|
-
parse(response)
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
return response;
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
|
|
256
226
|
/**
|
|
257
227
|
* @typedef {Object} HealthGetQueueBuildsRequestParams
|
|
258
228
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
@@ -598,6 +568,40 @@ const healthGetQueueMigrations = async ({threshold,parseOutput = true, overrideF
|
|
|
598
568
|
|
|
599
569
|
}
|
|
600
570
|
|
|
571
|
+
/**
|
|
572
|
+
* @typedef {Object} HealthGetQueueStatsResourcesRequestParams
|
|
573
|
+
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
574
|
+
* @property {boolean} overrideForCli
|
|
575
|
+
* @property {boolean} parseOutput
|
|
576
|
+
* @property {libClient | undefined} sdk
|
|
577
|
+
*/
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* @param {HealthGetQueueStatsResourcesRequestParams} params
|
|
581
|
+
*/
|
|
582
|
+
const healthGetQueueStatsResources = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
583
|
+
let client = !sdk ? await sdkForProject() :
|
|
584
|
+
sdk;
|
|
585
|
+
let apiPath = '/health/queue/stats-resources';
|
|
586
|
+
let payload = {};
|
|
587
|
+
if (typeof threshold !== 'undefined') {
|
|
588
|
+
payload['threshold'] = threshold;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
let response = undefined;
|
|
592
|
+
|
|
593
|
+
response = await client.call('get', apiPath, {
|
|
594
|
+
'content-type': 'application/json',
|
|
595
|
+
}, payload);
|
|
596
|
+
|
|
597
|
+
if (parseOutput) {
|
|
598
|
+
parse(response)
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
return response;
|
|
602
|
+
|
|
603
|
+
}
|
|
604
|
+
|
|
601
605
|
/**
|
|
602
606
|
* @typedef {Object} HealthGetQueueUsageRequestParams
|
|
603
607
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
@@ -612,7 +616,7 @@ const healthGetQueueMigrations = async ({threshold,parseOutput = true, overrideF
|
|
|
612
616
|
const healthGetQueueUsage = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
613
617
|
let client = !sdk ? await sdkForProject() :
|
|
614
618
|
sdk;
|
|
615
|
-
let apiPath = '/health/queue/usage';
|
|
619
|
+
let apiPath = '/health/queue/stats-usage';
|
|
616
620
|
let payload = {};
|
|
617
621
|
if (typeof threshold !== 'undefined') {
|
|
618
622
|
payload['threshold'] = threshold;
|
|
@@ -633,7 +637,7 @@ const healthGetQueueUsage = async ({threshold,parseOutput = true, overrideForCli
|
|
|
633
637
|
}
|
|
634
638
|
|
|
635
639
|
/**
|
|
636
|
-
* @typedef {Object}
|
|
640
|
+
* @typedef {Object} HealthGetQueueStatsUsageDumpRequestParams
|
|
637
641
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
638
642
|
* @property {boolean} overrideForCli
|
|
639
643
|
* @property {boolean} parseOutput
|
|
@@ -641,12 +645,12 @@ const healthGetQueueUsage = async ({threshold,parseOutput = true, overrideForCli
|
|
|
641
645
|
*/
|
|
642
646
|
|
|
643
647
|
/**
|
|
644
|
-
* @param {
|
|
648
|
+
* @param {HealthGetQueueStatsUsageDumpRequestParams} params
|
|
645
649
|
*/
|
|
646
|
-
const
|
|
650
|
+
const healthGetQueueStatsUsageDump = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
647
651
|
let client = !sdk ? await sdkForProject() :
|
|
648
652
|
sdk;
|
|
649
|
-
let apiPath = '/health/queue/usage-dump';
|
|
653
|
+
let apiPath = '/health/queue/stats-usage-dump';
|
|
650
654
|
let payload = {};
|
|
651
655
|
if (typeof threshold !== 'undefined') {
|
|
652
656
|
payload['threshold'] = threshold;
|
|
@@ -821,11 +825,6 @@ health
|
|
|
821
825
|
.description(`Check the Appwrite pub-sub servers are up and connection is successful.`)
|
|
822
826
|
.action(actionRunner(healthGetPubSub))
|
|
823
827
|
|
|
824
|
-
health
|
|
825
|
-
.command(`get-queue`)
|
|
826
|
-
.description(`Check the Appwrite queue messaging servers are up and connection is successful.`)
|
|
827
|
-
.action(actionRunner(healthGetQueue))
|
|
828
|
-
|
|
829
828
|
health
|
|
830
829
|
.command(`get-queue-builds`)
|
|
831
830
|
.description(`Get the number of builds that are waiting to be processed in the Appwrite internal queue server.`)
|
|
@@ -888,6 +887,12 @@ health
|
|
|
888
887
|
.option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
|
|
889
888
|
.action(actionRunner(healthGetQueueMigrations))
|
|
890
889
|
|
|
890
|
+
health
|
|
891
|
+
.command(`get-queue-stats-resources`)
|
|
892
|
+
.description(`Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.`)
|
|
893
|
+
.option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
|
|
894
|
+
.action(actionRunner(healthGetQueueStatsResources))
|
|
895
|
+
|
|
891
896
|
health
|
|
892
897
|
.command(`get-queue-usage`)
|
|
893
898
|
.description(`Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.`)
|
|
@@ -895,10 +900,10 @@ health
|
|
|
895
900
|
.action(actionRunner(healthGetQueueUsage))
|
|
896
901
|
|
|
897
902
|
health
|
|
898
|
-
.command(`get-queue-usage-dump`)
|
|
903
|
+
.command(`get-queue-stats-usage-dump`)
|
|
899
904
|
.description(`Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.`)
|
|
900
905
|
.option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
|
|
901
|
-
.action(actionRunner(
|
|
906
|
+
.action(actionRunner(healthGetQueueStatsUsageDump))
|
|
902
907
|
|
|
903
908
|
health
|
|
904
909
|
.command(`get-queue-webhooks`)
|
|
@@ -929,7 +934,6 @@ module.exports = {
|
|
|
929
934
|
healthGetCertificate,
|
|
930
935
|
healthGetDB,
|
|
931
936
|
healthGetPubSub,
|
|
932
|
-
healthGetQueue,
|
|
933
937
|
healthGetQueueBuilds,
|
|
934
938
|
healthGetQueueCertificates,
|
|
935
939
|
healthGetQueueDatabases,
|
|
@@ -940,8 +944,9 @@ module.exports = {
|
|
|
940
944
|
healthGetQueueMails,
|
|
941
945
|
healthGetQueueMessaging,
|
|
942
946
|
healthGetQueueMigrations,
|
|
947
|
+
healthGetQueueStatsResources,
|
|
943
948
|
healthGetQueueUsage,
|
|
944
|
-
|
|
949
|
+
healthGetQueueStatsUsageDump,
|
|
945
950
|
healthGetQueueWebhooks,
|
|
946
951
|
healthGetStorage,
|
|
947
952
|
healthGetStorageLocal,
|
|
@@ -80,9 +80,9 @@ const migrationsList = async ({queries,search,parseOutput = true, overrideForCli
|
|
|
80
80
|
/**
|
|
81
81
|
* @typedef {Object} MigrationsCreateAppwriteMigrationRequestParams
|
|
82
82
|
* @property {string[]} resources List of resources to migrate
|
|
83
|
-
* @property {string} endpoint Source
|
|
84
|
-
* @property {string} projectId Source
|
|
85
|
-
* @property {string} apiKey Source
|
|
83
|
+
* @property {string} endpoint Source Appwrite endpoint
|
|
84
|
+
* @property {string} projectId Source Project ID
|
|
85
|
+
* @property {string} apiKey Source API Key
|
|
86
86
|
* @property {boolean} overrideForCli
|
|
87
87
|
* @property {boolean} parseOutput
|
|
88
88
|
* @property {libClient | undefined} sdk
|
|
@@ -593,9 +593,9 @@ migrations
|
|
|
593
593
|
.command(`create-appwrite-migration`)
|
|
594
594
|
.description(`Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. `)
|
|
595
595
|
.requiredOption(`--resources [resources...]`, `List of resources to migrate`)
|
|
596
|
-
.requiredOption(`--endpoint <endpoint>`, `Source
|
|
597
|
-
.requiredOption(`--project-id <project-id>`, `Source
|
|
598
|
-
.requiredOption(`--api-key <api-key>`, `Source
|
|
596
|
+
.requiredOption(`--endpoint <endpoint>`, `Source Appwrite endpoint`)
|
|
597
|
+
.requiredOption(`--project-id <project-id>`, `Source Project ID`)
|
|
598
|
+
.requiredOption(`--api-key <api-key>`, `Source API Key`)
|
|
599
599
|
.action(actionRunner(migrationsCreateAppwriteMigration))
|
|
600
600
|
|
|
601
601
|
migrations
|
package/lib/parser.js
CHANGED
|
@@ -120,7 +120,7 @@ const parseError = (err) => {
|
|
|
120
120
|
} catch {
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
const version = '6.2.
|
|
123
|
+
const version = '6.2.3';
|
|
124
124
|
const stepsToReproduce = `Running \`appwrite ${cliConfig.reportData.data.args.join(' ')}\``;
|
|
125
125
|
const yourEnvironment = `CLI version: ${version}\nOperation System: ${os.type()}\nAppwrite version: ${appwriteVersion}\nIs Cloud: ${isCloud}`;
|
|
126
126
|
|
package/lib/utils.js
CHANGED
|
@@ -9,7 +9,13 @@ function getAllFiles(folder) {
|
|
|
9
9
|
const files = [];
|
|
10
10
|
for (const pathDir of fs.readdirSync(folder)) {
|
|
11
11
|
const pathAbsolute = path.join(folder, pathDir);
|
|
12
|
-
|
|
12
|
+
let stats;
|
|
13
|
+
try {
|
|
14
|
+
stats = fs.statSync(pathAbsolute);
|
|
15
|
+
} catch (error) {
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
if (stats.isDirectory()) {
|
|
13
19
|
files.push(...getAllFiles(pathAbsolute));
|
|
14
20
|
} else {
|
|
15
21
|
files.push(pathAbsolute);
|
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": "6.2.
|
|
5
|
+
"version": "6.2.3",
|
|
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": "6.2.
|
|
3
|
+
"version": "6.2.3",
|
|
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/6.2.
|
|
9
|
+
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.3/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/6.2.
|
|
18
|
+
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.3/appwrite-cli-win-arm64.exe",
|
|
19
19
|
"bin": [
|
|
20
20
|
[
|
|
21
21
|
"appwrite-cli-win-arm64.exe",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
appwrite health getQueue
|