appwrite-cli 6.0.0-rc.4 → 6.0.0-rc.5

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.
@@ -1258,7 +1258,7 @@ functions
1258
1258
  functions
1259
1259
  .command(`create`)
1260
1260
  .description(`Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.`)
1261
- .requiredOption(`--functionId <functionId>`, `Function 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.`)
1261
+ .requiredOption(`--function-id <function-id>`, `Function 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.`)
1262
1262
  .requiredOption(`--name <name>`, `Function name. Max length: 128 chars.`)
1263
1263
  .requiredOption(`--runtime <runtime>`, `Execution runtime.`)
1264
1264
  .option(`--execute [execute...]`, `An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.`)
@@ -1270,24 +1270,24 @@ functions
1270
1270
  .option(`--entrypoint <entrypoint>`, `Entrypoint File. This path is relative to the "providerRootDirectory".`)
1271
1271
  .option(`--commands <commands>`, `Build Commands.`)
1272
1272
  .option(`--scopes [scopes...]`, `List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.`)
1273
- .option(`--installationId <installationId>`, `Appwrite Installation ID for VCS (Version Control System) deployment.`)
1274
- .option(`--providerRepositoryId <providerRepositoryId>`, `Repository ID of the repo linked to the function.`)
1275
- .option(`--providerBranch <providerBranch>`, `Production branch for the repo linked to the function.`)
1276
- .option(`--providerSilentMode <providerSilentMode>`, `Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.`, parseBool)
1277
- .option(`--providerRootDirectory <providerRootDirectory>`, `Path to function code in the linked repo.`)
1278
- .option(`--templateRepository <templateRepository>`, `Repository name of the template.`)
1279
- .option(`--templateOwner <templateOwner>`, `The name of the owner of the template.`)
1280
- .option(`--templateRootDirectory <templateRootDirectory>`, `Path to function code in the template repo.`)
1281
- .option(`--templateBranch <templateBranch>`, `Production branch for the repo linked to the function template.`)
1273
+ .option(`--installation-id <installation-id>`, `Appwrite Installation ID for VCS (Version Control System) deployment.`)
1274
+ .option(`--provider-repository-id <provider-repository-id>`, `Repository ID of the repo linked to the function.`)
1275
+ .option(`--provider-branch <provider-branch>`, `Production branch for the repo linked to the function.`)
1276
+ .option(`--provider-silent-mode <provider-silent-mode>`, `Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.`, parseBool)
1277
+ .option(`--provider-root-directory <provider-root-directory>`, `Path to function code in the linked repo.`)
1278
+ .option(`--template-repository <template-repository>`, `Repository name of the template.`)
1279
+ .option(`--template-owner <template-owner>`, `The name of the owner of the template.`)
1280
+ .option(`--template-root-directory <template-root-directory>`, `Path to function code in the template repo.`)
1281
+ .option(`--template-branch <template-branch>`, `Production branch for the repo linked to the function template.`)
1282
1282
  .action(actionRunner(functionsCreate))
1283
1283
 
1284
1284
  functions
1285
- .command(`listRuntimes`)
1285
+ .command(`list-runtimes`)
1286
1286
  .description(`Get a list of all runtimes that are currently active on your instance.`)
1287
1287
  .action(actionRunner(functionsListRuntimes))
1288
1288
 
1289
1289
  functions
1290
- .command(`getUsage`)
1290
+ .command(`get-usage`)
1291
1291
  .description(``)
1292
1292
  .option(`--range <range>`, `Date range.`)
1293
1293
  .action(actionRunner(functionsGetUsage))
@@ -1295,14 +1295,14 @@ functions
1295
1295
  functions
1296
1296
  .command(`get`)
1297
1297
  .description(`Get a function by its unique ID.`)
1298
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1298
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1299
1299
  .option(`--console`, `Get the resource console url`)
1300
1300
  .action(actionRunner(functionsGet))
1301
1301
 
1302
1302
  functions
1303
1303
  .command(`update`)
1304
1304
  .description(`Update function by its unique ID.`)
1305
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1305
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1306
1306
  .requiredOption(`--name <name>`, `Function name. Max length: 128 chars.`)
1307
1307
  .option(`--runtime <runtime>`, `Execution runtime.`)
1308
1308
  .option(`--execute [execute...]`, `An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.`)
@@ -1314,32 +1314,32 @@ functions
1314
1314
  .option(`--entrypoint <entrypoint>`, `Entrypoint File. This path is relative to the "providerRootDirectory".`)
1315
1315
  .option(`--commands <commands>`, `Build Commands.`)
1316
1316
  .option(`--scopes [scopes...]`, `List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.`)
1317
- .option(`--installationId <installationId>`, `Appwrite Installation ID for VCS (Version Controle System) deployment.`)
1318
- .option(`--providerRepositoryId <providerRepositoryId>`, `Repository ID of the repo linked to the function`)
1319
- .option(`--providerBranch <providerBranch>`, `Production branch for the repo linked to the function`)
1320
- .option(`--providerSilentMode <providerSilentMode>`, `Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.`, parseBool)
1321
- .option(`--providerRootDirectory <providerRootDirectory>`, `Path to function code in the linked repo.`)
1317
+ .option(`--installation-id <installation-id>`, `Appwrite Installation ID for VCS (Version Controle System) deployment.`)
1318
+ .option(`--provider-repository-id <provider-repository-id>`, `Repository ID of the repo linked to the function`)
1319
+ .option(`--provider-branch <provider-branch>`, `Production branch for the repo linked to the function`)
1320
+ .option(`--provider-silent-mode <provider-silent-mode>`, `Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.`, parseBool)
1321
+ .option(`--provider-root-directory <provider-root-directory>`, `Path to function code in the linked repo.`)
1322
1322
  .action(actionRunner(functionsUpdate))
1323
1323
 
1324
1324
  functions
1325
1325
  .command(`delete`)
1326
1326
  .description(`Delete a function by its unique ID.`)
1327
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1327
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1328
1328
  .action(actionRunner(functionsDelete))
1329
1329
 
1330
1330
  functions
1331
- .command(`listDeployments`)
1331
+ .command(`list-deployments`)
1332
1332
  .description(`Get a list of all the project's code deployments. You can use the query params to filter your results.`)
1333
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1333
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1334
1334
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands`)
1335
1335
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
1336
1336
  .option(`--console`, `Get the resource console url`)
1337
1337
  .action(actionRunner(functionsListDeployments))
1338
1338
 
1339
1339
  functions
1340
- .command(`createDeployment`)
1340
+ .command(`create-deployment`)
1341
1341
  .description(`Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID. This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions). Use the "command" param to set the entrypoint used to execute your code.`)
1342
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1342
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1343
1343
  .requiredOption(`--code <code>`, `Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.`)
1344
1344
  .requiredOption(`--activate <activate>`, `Automatically activate the deployment when it is finished building.`, parseBool)
1345
1345
  .option(`--entrypoint <entrypoint>`, `Entrypoint File.`)
@@ -1347,129 +1347,129 @@ functions
1347
1347
  .action(actionRunner(functionsCreateDeployment))
1348
1348
 
1349
1349
  functions
1350
- .command(`getDeployment`)
1350
+ .command(`get-deployment`)
1351
1351
  .description(`Get a code deployment by its unique ID.`)
1352
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1353
- .requiredOption(`--deploymentId <deploymentId>`, `Deployment ID.`)
1352
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1353
+ .requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
1354
1354
  .option(`--console`, `Get the resource console url`)
1355
1355
  .action(actionRunner(functionsGetDeployment))
1356
1356
 
1357
1357
  functions
1358
- .command(`updateDeployment`)
1358
+ .command(`update-deployment`)
1359
1359
  .description(`Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.`)
1360
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1361
- .requiredOption(`--deploymentId <deploymentId>`, `Deployment ID.`)
1360
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1361
+ .requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
1362
1362
  .action(actionRunner(functionsUpdateDeployment))
1363
1363
 
1364
1364
  functions
1365
- .command(`deleteDeployment`)
1365
+ .command(`delete-deployment`)
1366
1366
  .description(`Delete a code deployment by its unique ID.`)
1367
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1368
- .requiredOption(`--deploymentId <deploymentId>`, `Deployment ID.`)
1367
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1368
+ .requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
1369
1369
  .action(actionRunner(functionsDeleteDeployment))
1370
1370
 
1371
1371
  functions
1372
- .command(`createBuild`)
1372
+ .command(`create-build`)
1373
1373
  .description(``)
1374
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1375
- .requiredOption(`--deploymentId <deploymentId>`, `Deployment ID.`)
1376
- .option(`--buildId <buildId>`, `Build unique ID.`)
1374
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1375
+ .requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
1376
+ .option(`--build-id <build-id>`, `Build unique ID.`)
1377
1377
  .action(actionRunner(functionsCreateBuild))
1378
1378
 
1379
1379
  functions
1380
- .command(`updateDeploymentBuild`)
1380
+ .command(`update-deployment-build`)
1381
1381
  .description(``)
1382
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1383
- .requiredOption(`--deploymentId <deploymentId>`, `Deployment ID.`)
1382
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1383
+ .requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
1384
1384
  .action(actionRunner(functionsUpdateDeploymentBuild))
1385
1385
 
1386
1386
  functions
1387
- .command(`downloadDeployment`)
1387
+ .command(`download-deployment`)
1388
1388
  .description(`Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download.`)
1389
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1390
- .requiredOption(`--deploymentId <deploymentId>`, `Deployment ID.`)
1389
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1390
+ .requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
1391
1391
  .requiredOption(`--destination <path>`, `output file path.`)
1392
1392
  .action(actionRunner(functionsDownloadDeployment))
1393
1393
 
1394
1394
  functions
1395
- .command(`listExecutions`)
1395
+ .command(`list-executions`)
1396
1396
  .description(`Get a list of all the current user function execution logs. You can use the query params to filter your results.`)
1397
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1397
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1398
1398
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId`)
1399
1399
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
1400
1400
  .option(`--console`, `Get the resource console url`)
1401
1401
  .action(actionRunner(functionsListExecutions))
1402
1402
 
1403
1403
  functions
1404
- .command(`createExecution`)
1404
+ .command(`create-execution`)
1405
1405
  .description(`Trigger a function execution. The returned object will return you the current execution status. You can ping the 'Get Execution' endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.`)
1406
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1406
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1407
1407
  .option(`--body <body>`, `HTTP body of execution. Default value is empty string.`)
1408
1408
  .option(`--async <async>`, `Execute code in the background. Default value is false.`, parseBool)
1409
1409
  .option(`--xpath <xpath>`, `HTTP path of execution. Path can include query params. Default value is /`)
1410
1410
  .option(`--method <method>`, `HTTP method of execution. Default value is GET.`)
1411
1411
  .option(`--headers <headers>`, `HTTP headers of execution. Defaults to empty.`)
1412
- .option(`--scheduledAt <scheduledAt>`, `Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`)
1412
+ .option(`--scheduled-at <scheduled-at>`, `Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`)
1413
1413
  .action(actionRunner(functionsCreateExecution))
1414
1414
 
1415
1415
  functions
1416
- .command(`getExecution`)
1416
+ .command(`get-execution`)
1417
1417
  .description(`Get a function execution log by its unique ID.`)
1418
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1419
- .requiredOption(`--executionId <executionId>`, `Execution ID.`)
1418
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1419
+ .requiredOption(`--execution-id <execution-id>`, `Execution ID.`)
1420
1420
  .option(`--console`, `Get the resource console url`)
1421
1421
  .action(actionRunner(functionsGetExecution))
1422
1422
 
1423
1423
  functions
1424
- .command(`deleteExecution`)
1424
+ .command(`delete-execution`)
1425
1425
  .description(`Delete a function execution by its unique ID. `)
1426
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1427
- .requiredOption(`--executionId <executionId>`, `Execution ID.`)
1426
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1427
+ .requiredOption(`--execution-id <execution-id>`, `Execution ID.`)
1428
1428
  .action(actionRunner(functionsDeleteExecution))
1429
1429
 
1430
1430
  functions
1431
- .command(`getFunctionUsage`)
1431
+ .command(`get-function-usage`)
1432
1432
  .description(``)
1433
- .requiredOption(`--functionId <functionId>`, `Function ID.`)
1433
+ .requiredOption(`--function-id <function-id>`, `Function ID.`)
1434
1434
  .option(`--range <range>`, `Date range.`)
1435
1435
  .option(`--console`, `Get the resource console url`)
1436
1436
  .action(actionRunner(functionsGetFunctionUsage))
1437
1437
 
1438
1438
  functions
1439
- .command(`listVariables`)
1439
+ .command(`list-variables`)
1440
1440
  .description(`Get a list of all variables of a specific function.`)
1441
- .requiredOption(`--functionId <functionId>`, `Function unique ID.`)
1441
+ .requiredOption(`--function-id <function-id>`, `Function unique ID.`)
1442
1442
  .action(actionRunner(functionsListVariables))
1443
1443
 
1444
1444
  functions
1445
- .command(`createVariable`)
1445
+ .command(`create-variable`)
1446
1446
  .description(`Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.`)
1447
- .requiredOption(`--functionId <functionId>`, `Function unique ID.`)
1447
+ .requiredOption(`--function-id <function-id>`, `Function unique ID.`)
1448
1448
  .requiredOption(`--key <key>`, `Variable key. Max length: 255 chars.`)
1449
1449
  .requiredOption(`--value <value>`, `Variable value. Max length: 8192 chars.`)
1450
1450
  .action(actionRunner(functionsCreateVariable))
1451
1451
 
1452
1452
  functions
1453
- .command(`getVariable`)
1453
+ .command(`get-variable`)
1454
1454
  .description(`Get a variable by its unique ID.`)
1455
- .requiredOption(`--functionId <functionId>`, `Function unique ID.`)
1456
- .requiredOption(`--variableId <variableId>`, `Variable unique ID.`)
1455
+ .requiredOption(`--function-id <function-id>`, `Function unique ID.`)
1456
+ .requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`)
1457
1457
  .action(actionRunner(functionsGetVariable))
1458
1458
 
1459
1459
  functions
1460
- .command(`updateVariable`)
1460
+ .command(`update-variable`)
1461
1461
  .description(`Update variable by its unique ID.`)
1462
- .requiredOption(`--functionId <functionId>`, `Function unique ID.`)
1463
- .requiredOption(`--variableId <variableId>`, `Variable unique ID.`)
1462
+ .requiredOption(`--function-id <function-id>`, `Function unique ID.`)
1463
+ .requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`)
1464
1464
  .requiredOption(`--key <key>`, `Variable key. Max length: 255 chars.`)
1465
1465
  .option(`--value <value>`, `Variable value. Max length: 8192 chars.`)
1466
1466
  .action(actionRunner(functionsUpdateVariable))
1467
1467
 
1468
1468
  functions
1469
- .command(`deleteVariable`)
1469
+ .command(`delete-variable`)
1470
1470
  .description(`Delete a variable by its unique ID.`)
1471
- .requiredOption(`--functionId <functionId>`, `Function unique ID.`)
1472
- .requiredOption(`--variableId <variableId>`, `Variable unique ID.`)
1471
+ .requiredOption(`--function-id <function-id>`, `Function unique ID.`)
1472
+ .requiredOption(`--variable-id <variable-id>`, `Variable unique ID.`)
1473
1473
  .action(actionRunner(functionsDeleteVariable))
1474
1474
 
1475
1475
  module.exports = {
@@ -187,7 +187,8 @@ const logout = new Command("logout")
187
187
  const sessions = globalConfig.getSessions();
188
188
  const current = globalConfig.getCurrentSession();
189
189
 
190
- if (current === '') {
190
+ if (current === '' || !sessions.length) {
191
+ log('No active sessions found.');
191
192
  return;
192
193
  }
193
194
  if (sessions.length === 1) {
@@ -223,9 +224,9 @@ const client = new Command("client")
223
224
  .configureHelp({
224
225
  helpWidth: process.stdout.columns || 80
225
226
  })
226
- .option("-ss, --selfSigned <value>", "Configure the CLI to use a self-signed certificate ( true or false )", parseBool)
227
+ .option("-ss, --self-signed <value>", "Configure the CLI to use a self-signed certificate ( true or false )", parseBool)
227
228
  .option("-e, --endpoint <endpoint>", "Set your Appwrite server endpoint")
228
- .option("-p, --projectId <projectId>", "Set your Appwrite project ID")
229
+ .option("-p, --project-id <project-id>", "Set your Appwrite project ID")
229
230
  .option("-k, --key <key>", "Set your Appwrite server's API key")
230
231
  .option("-d, --debug", "Print CLI debug information")
231
232
  .option("-r, --reset", "Reset the CLI configuration")
@@ -819,128 +819,128 @@ health
819
819
  .action(actionRunner(healthGet))
820
820
 
821
821
  health
822
- .command(`getAntivirus`)
822
+ .command(`get-antivirus`)
823
823
  .description(`Check the Appwrite Antivirus server is up and connection is successful.`)
824
824
  .action(actionRunner(healthGetAntivirus))
825
825
 
826
826
  health
827
- .command(`getCache`)
827
+ .command(`get-cache`)
828
828
  .description(`Check the Appwrite in-memory cache servers are up and connection is successful.`)
829
829
  .action(actionRunner(healthGetCache))
830
830
 
831
831
  health
832
- .command(`getCertificate`)
832
+ .command(`get-certificate`)
833
833
  .description(`Get the SSL certificate for a domain`)
834
834
  .option(`--domain <domain>`, `string`)
835
835
  .action(actionRunner(healthGetCertificate))
836
836
 
837
837
  health
838
- .command(`getDB`)
838
+ .command(`get-db`)
839
839
  .description(`Check the Appwrite database servers are up and connection is successful.`)
840
840
  .action(actionRunner(healthGetDB))
841
841
 
842
842
  health
843
- .command(`getPubSub`)
843
+ .command(`get-pub-sub`)
844
844
  .description(`Check the Appwrite pub-sub servers are up and connection is successful.`)
845
845
  .action(actionRunner(healthGetPubSub))
846
846
 
847
847
  health
848
- .command(`getQueue`)
848
+ .command(`get-queue`)
849
849
  .description(`Check the Appwrite queue messaging servers are up and connection is successful.`)
850
850
  .action(actionRunner(healthGetQueue))
851
851
 
852
852
  health
853
- .command(`getQueueBuilds`)
853
+ .command(`get-queue-builds`)
854
854
  .description(`Get the number of builds that are waiting to be processed in the Appwrite internal queue server.`)
855
855
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
856
856
  .action(actionRunner(healthGetQueueBuilds))
857
857
 
858
858
  health
859
- .command(`getQueueCertificates`)
859
+ .command(`get-queue-certificates`)
860
860
  .description(`Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.`)
861
861
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
862
862
  .action(actionRunner(healthGetQueueCertificates))
863
863
 
864
864
  health
865
- .command(`getQueueDatabases`)
865
+ .command(`get-queue-databases`)
866
866
  .description(`Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.`)
867
867
  .option(`--name <name>`, `Queue name for which to check the queue size`)
868
868
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
869
869
  .action(actionRunner(healthGetQueueDatabases))
870
870
 
871
871
  health
872
- .command(`getQueueDeletes`)
872
+ .command(`get-queue-deletes`)
873
873
  .description(`Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.`)
874
874
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
875
875
  .action(actionRunner(healthGetQueueDeletes))
876
876
 
877
877
  health
878
- .command(`getFailedJobs`)
878
+ .command(`get-failed-jobs`)
879
879
  .description(`Returns the amount of failed jobs in a given queue. `)
880
880
  .requiredOption(`--name <name>`, `The name of the queue`)
881
881
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
882
882
  .action(actionRunner(healthGetFailedJobs))
883
883
 
884
884
  health
885
- .command(`getQueueFunctions`)
885
+ .command(`get-queue-functions`)
886
886
  .description(`Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.`)
887
887
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
888
888
  .action(actionRunner(healthGetQueueFunctions))
889
889
 
890
890
  health
891
- .command(`getQueueLogs`)
891
+ .command(`get-queue-logs`)
892
892
  .description(`Get the number of logs that are waiting to be processed in the Appwrite internal queue server.`)
893
893
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
894
894
  .action(actionRunner(healthGetQueueLogs))
895
895
 
896
896
  health
897
- .command(`getQueueMails`)
897
+ .command(`get-queue-mails`)
898
898
  .description(`Get the number of mails that are waiting to be processed in the Appwrite internal queue server.`)
899
899
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
900
900
  .action(actionRunner(healthGetQueueMails))
901
901
 
902
902
  health
903
- .command(`getQueueMessaging`)
903
+ .command(`get-queue-messaging`)
904
904
  .description(`Get the number of messages that are waiting to be processed in the Appwrite internal queue server.`)
905
905
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
906
906
  .action(actionRunner(healthGetQueueMessaging))
907
907
 
908
908
  health
909
- .command(`getQueueMigrations`)
909
+ .command(`get-queue-migrations`)
910
910
  .description(`Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.`)
911
911
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
912
912
  .action(actionRunner(healthGetQueueMigrations))
913
913
 
914
914
  health
915
- .command(`getQueueUsage`)
915
+ .command(`get-queue-usage`)
916
916
  .description(`Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.`)
917
917
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
918
918
  .action(actionRunner(healthGetQueueUsage))
919
919
 
920
920
  health
921
- .command(`getQueueUsageDump`)
921
+ .command(`get-queue-usage-dump`)
922
922
  .description(`Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.`)
923
923
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
924
924
  .action(actionRunner(healthGetQueueUsageDump))
925
925
 
926
926
  health
927
- .command(`getQueueWebhooks`)
927
+ .command(`get-queue-webhooks`)
928
928
  .description(`Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.`)
929
929
  .option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger)
930
930
  .action(actionRunner(healthGetQueueWebhooks))
931
931
 
932
932
  health
933
- .command(`getStorage`)
933
+ .command(`get-storage`)
934
934
  .description(`Check the Appwrite storage device is up and connection is successful.`)
935
935
  .action(actionRunner(healthGetStorage))
936
936
 
937
937
  health
938
- .command(`getStorageLocal`)
938
+ .command(`get-storage-local`)
939
939
  .description(`Check the Appwrite local storage device is up and connection is successful.`)
940
940
  .action(actionRunner(healthGetStorageLocal))
941
941
 
942
942
  health
943
- .command(`getTime`)
943
+ .command(`get-time`)
944
944
  .description(`Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.`)
945
945
  .action(actionRunner(healthGetTime))
946
946
 
@@ -110,6 +110,7 @@ const initProject = async ({ organizationId, projectId, projectName } = {}) => {
110
110
  answers = await inquirer.prompt(questionsInitProjectAutopull);
111
111
  if(answers.autopull) {
112
112
  cliConfig.all = true;
113
+ cliConfig.force = true;
113
114
  await pullResources();
114
115
  } else {
115
116
  log("You can run 'appwrite pull all' to synchronize all of your existing resources.");
@@ -333,9 +334,9 @@ const init = new Command("init")
333
334
  init
334
335
  .command("project")
335
336
  .description("Init a new Appwrite project")
336
- .option("--organizationId <organizationId>", "Appwrite organization ID")
337
- .option("--projectId <projectId>", "Appwrite project ID")
338
- .option("--projectName <projectName>", "Appwrite project ID")
337
+ .option("--organization-id <organization-id>", "Appwrite organization ID")
338
+ .option("--project-id <project-id>", "Appwrite project ID")
339
+ .option("--project-name <project-name>", "Appwrite project ID")
339
340
  .action(actionRunner(initProject));
340
341
 
341
342
  init
@@ -293,37 +293,37 @@ locale
293
293
  .action(actionRunner(localeGet))
294
294
 
295
295
  locale
296
- .command(`listCodes`)
296
+ .command(`list-codes`)
297
297
  .description(`List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).`)
298
298
  .action(actionRunner(localeListCodes))
299
299
 
300
300
  locale
301
- .command(`listContinents`)
301
+ .command(`list-continents`)
302
302
  .description(`List of all continents. You can use the locale header to get the data in a supported language.`)
303
303
  .action(actionRunner(localeListContinents))
304
304
 
305
305
  locale
306
- .command(`listCountries`)
306
+ .command(`list-countries`)
307
307
  .description(`List of all countries. You can use the locale header to get the data in a supported language.`)
308
308
  .action(actionRunner(localeListCountries))
309
309
 
310
310
  locale
311
- .command(`listCountriesEU`)
311
+ .command(`list-countries-eu`)
312
312
  .description(`List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.`)
313
313
  .action(actionRunner(localeListCountriesEU))
314
314
 
315
315
  locale
316
- .command(`listCountriesPhones`)
316
+ .command(`list-countries-phones`)
317
317
  .description(`List of all countries phone codes. You can use the locale header to get the data in a supported language.`)
318
318
  .action(actionRunner(localeListCountriesPhones))
319
319
 
320
320
  locale
321
- .command(`listCurrencies`)
321
+ .command(`list-currencies`)
322
322
  .description(`List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.`)
323
323
  .action(actionRunner(localeListCurrencies))
324
324
 
325
325
  locale
326
- .command(`listLanguages`)
326
+ .command(`list-languages`)
327
327
  .description(`List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.`)
328
328
  .action(actionRunner(localeListLanguages))
329
329