appwrite-cli 6.0.0-rc.6 → 6.0.0-rc.7
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 +3 -3
- package/docs/examples/functions/{download-deployment.md → get-deployment-download.md} +1 -1
- package/docs/examples/functions/get-template.md +2 -0
- package/docs/examples/functions/list-templates.md +5 -0
- package/index.js +4 -3
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +3 -3
- package/lib/commands/account.js +1 -49
- package/lib/commands/assistant.js +1 -2
- package/lib/commands/avatars.js +1 -8
- package/lib/commands/console.js +1 -2
- package/lib/commands/databases.js +1 -49
- package/lib/commands/functions.js +121 -35
- package/lib/commands/generic.js +11 -11
- package/lib/commands/graphql.js +1 -3
- package/lib/commands/health.js +1 -24
- package/lib/commands/init.js +7 -20
- package/lib/commands/locale.js +1 -9
- package/lib/commands/messaging.js +1 -47
- package/lib/commands/migrations.js +1 -17
- package/lib/commands/project.js +1 -7
- package/lib/commands/projects.js +1 -46
- package/lib/commands/proxy.js +1 -6
- package/lib/commands/pull.js +73 -35
- package/lib/commands/push.js +120 -53
- package/lib/commands/run.js +10 -12
- package/lib/commands/storage.js +1 -16
- package/lib/commands/teams.js +1 -15
- package/lib/commands/users.js +1 -44
- package/lib/commands/vcs.js +1 -11
- package/lib/config.js +11 -7
- package/lib/emulation/docker.js +1 -3
- package/lib/paginate.js +3 -1
- package/lib/parser.js +12 -15
- package/lib/questions.js +16 -31
- package/package.json +2 -2
- package/scoop/appwrite.json +3 -3
|
@@ -35,7 +35,7 @@ function convertReadStreamToReadableStream(readStream) {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
const databases = new Command("databases").description(commandDescriptions['databases']).configureHelp({
|
|
38
|
+
const databases = new Command("databases").description(commandDescriptions['databases'] ?? '').configureHelp({
|
|
39
39
|
helpWidth: process.stdout.columns || 80
|
|
40
40
|
})
|
|
41
41
|
|
|
@@ -74,7 +74,6 @@ const databasesList = async ({queries,search,parseOutput = true, overrideForCli
|
|
|
74
74
|
showConsoleLink('databases', 'list');
|
|
75
75
|
} else {
|
|
76
76
|
parse(response)
|
|
77
|
-
success()
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
|
|
@@ -118,7 +117,6 @@ const databasesCreate = async ({databaseId,name,enabled,parseOutput = true, over
|
|
|
118
117
|
|
|
119
118
|
if (parseOutput) {
|
|
120
119
|
parse(response)
|
|
121
|
-
success()
|
|
122
120
|
}
|
|
123
121
|
|
|
124
122
|
return response;
|
|
@@ -153,7 +151,6 @@ const databasesGetUsage = async ({range,parseOutput = true, overrideForCli = fal
|
|
|
153
151
|
|
|
154
152
|
if (parseOutput) {
|
|
155
153
|
parse(response)
|
|
156
|
-
success()
|
|
157
154
|
}
|
|
158
155
|
|
|
159
156
|
return response;
|
|
@@ -188,7 +185,6 @@ const databasesGet = async ({databaseId,parseOutput = true, overrideForCli = fal
|
|
|
188
185
|
showConsoleLink('databases', 'get', databaseId);
|
|
189
186
|
} else {
|
|
190
187
|
parse(response)
|
|
191
|
-
success()
|
|
192
188
|
}
|
|
193
189
|
}
|
|
194
190
|
|
|
@@ -229,7 +225,6 @@ const databasesUpdate = async ({databaseId,name,enabled,parseOutput = true, over
|
|
|
229
225
|
|
|
230
226
|
if (parseOutput) {
|
|
231
227
|
parse(response)
|
|
232
|
-
success()
|
|
233
228
|
}
|
|
234
229
|
|
|
235
230
|
return response;
|
|
@@ -261,7 +256,6 @@ const databasesDelete = async ({databaseId,parseOutput = true, overrideForCli =
|
|
|
261
256
|
|
|
262
257
|
if (parseOutput) {
|
|
263
258
|
parse(response)
|
|
264
|
-
success()
|
|
265
259
|
}
|
|
266
260
|
|
|
267
261
|
return response;
|
|
@@ -304,7 +298,6 @@ const databasesListCollections = async ({databaseId,queries,search,parseOutput =
|
|
|
304
298
|
showConsoleLink('databases', 'listCollections', databaseId);
|
|
305
299
|
} else {
|
|
306
300
|
parse(response)
|
|
307
|
-
success()
|
|
308
301
|
}
|
|
309
302
|
}
|
|
310
303
|
|
|
@@ -358,7 +351,6 @@ const databasesCreateCollection = async ({databaseId,collectionId,name,permissio
|
|
|
358
351
|
|
|
359
352
|
if (parseOutput) {
|
|
360
353
|
parse(response)
|
|
361
|
-
success()
|
|
362
354
|
}
|
|
363
355
|
|
|
364
356
|
return response;
|
|
@@ -394,7 +386,6 @@ const databasesGetCollection = async ({databaseId,collectionId,parseOutput = tru
|
|
|
394
386
|
showConsoleLink('databases', 'getCollection', databaseId, collectionId);
|
|
395
387
|
} else {
|
|
396
388
|
parse(response)
|
|
397
|
-
success()
|
|
398
389
|
}
|
|
399
390
|
}
|
|
400
391
|
|
|
@@ -445,7 +436,6 @@ const databasesUpdateCollection = async ({databaseId,collectionId,name,permissio
|
|
|
445
436
|
|
|
446
437
|
if (parseOutput) {
|
|
447
438
|
parse(response)
|
|
448
|
-
success()
|
|
449
439
|
}
|
|
450
440
|
|
|
451
441
|
return response;
|
|
@@ -478,7 +468,6 @@ const databasesDeleteCollection = async ({databaseId,collectionId,parseOutput =
|
|
|
478
468
|
|
|
479
469
|
if (parseOutput) {
|
|
480
470
|
parse(response)
|
|
481
|
-
success()
|
|
482
471
|
}
|
|
483
472
|
|
|
484
473
|
return response;
|
|
@@ -518,7 +507,6 @@ const databasesListAttributes = async ({databaseId,collectionId,queries,parseOut
|
|
|
518
507
|
showConsoleLink('databases', 'listAttributes', databaseId, collectionId);
|
|
519
508
|
} else {
|
|
520
509
|
parse(response)
|
|
521
|
-
success()
|
|
522
510
|
}
|
|
523
511
|
}
|
|
524
512
|
|
|
@@ -568,7 +556,6 @@ const databasesCreateBooleanAttribute = async ({databaseId,collectionId,key,requ
|
|
|
568
556
|
|
|
569
557
|
if (parseOutput) {
|
|
570
558
|
parse(response)
|
|
571
|
-
success()
|
|
572
559
|
}
|
|
573
560
|
|
|
574
561
|
return response;
|
|
@@ -610,7 +597,6 @@ const databasesUpdateBooleanAttribute = async ({databaseId,collectionId,key,requ
|
|
|
610
597
|
|
|
611
598
|
if (parseOutput) {
|
|
612
599
|
parse(response)
|
|
613
|
-
success()
|
|
614
600
|
}
|
|
615
601
|
|
|
616
602
|
return response;
|
|
@@ -659,7 +645,6 @@ const databasesCreateDatetimeAttribute = async ({databaseId,collectionId,key,req
|
|
|
659
645
|
|
|
660
646
|
if (parseOutput) {
|
|
661
647
|
parse(response)
|
|
662
|
-
success()
|
|
663
648
|
}
|
|
664
649
|
|
|
665
650
|
return response;
|
|
@@ -701,7 +686,6 @@ const databasesUpdateDatetimeAttribute = async ({databaseId,collectionId,key,req
|
|
|
701
686
|
|
|
702
687
|
if (parseOutput) {
|
|
703
688
|
parse(response)
|
|
704
|
-
success()
|
|
705
689
|
}
|
|
706
690
|
|
|
707
691
|
return response;
|
|
@@ -750,7 +734,6 @@ const databasesCreateEmailAttribute = async ({databaseId,collectionId,key,requir
|
|
|
750
734
|
|
|
751
735
|
if (parseOutput) {
|
|
752
736
|
parse(response)
|
|
753
|
-
success()
|
|
754
737
|
}
|
|
755
738
|
|
|
756
739
|
return response;
|
|
@@ -792,7 +775,6 @@ const databasesUpdateEmailAttribute = async ({databaseId,collectionId,key,requir
|
|
|
792
775
|
|
|
793
776
|
if (parseOutput) {
|
|
794
777
|
parse(response)
|
|
795
|
-
success()
|
|
796
778
|
}
|
|
797
779
|
|
|
798
780
|
return response;
|
|
@@ -846,7 +828,6 @@ const databasesCreateEnumAttribute = async ({databaseId,collectionId,key,element
|
|
|
846
828
|
|
|
847
829
|
if (parseOutput) {
|
|
848
830
|
parse(response)
|
|
849
|
-
success()
|
|
850
831
|
}
|
|
851
832
|
|
|
852
833
|
return response;
|
|
@@ -893,7 +874,6 @@ const databasesUpdateEnumAttribute = async ({databaseId,collectionId,key,element
|
|
|
893
874
|
|
|
894
875
|
if (parseOutput) {
|
|
895
876
|
parse(response)
|
|
896
|
-
success()
|
|
897
877
|
}
|
|
898
878
|
|
|
899
879
|
return response;
|
|
@@ -950,7 +930,6 @@ const databasesCreateFloatAttribute = async ({databaseId,collectionId,key,requir
|
|
|
950
930
|
|
|
951
931
|
if (parseOutput) {
|
|
952
932
|
parse(response)
|
|
953
|
-
success()
|
|
954
933
|
}
|
|
955
934
|
|
|
956
935
|
return response;
|
|
@@ -1000,7 +979,6 @@ const databasesUpdateFloatAttribute = async ({databaseId,collectionId,key,requir
|
|
|
1000
979
|
|
|
1001
980
|
if (parseOutput) {
|
|
1002
981
|
parse(response)
|
|
1003
|
-
success()
|
|
1004
982
|
}
|
|
1005
983
|
|
|
1006
984
|
return response;
|
|
@@ -1057,7 +1035,6 @@ const databasesCreateIntegerAttribute = async ({databaseId,collectionId,key,requ
|
|
|
1057
1035
|
|
|
1058
1036
|
if (parseOutput) {
|
|
1059
1037
|
parse(response)
|
|
1060
|
-
success()
|
|
1061
1038
|
}
|
|
1062
1039
|
|
|
1063
1040
|
return response;
|
|
@@ -1107,7 +1084,6 @@ const databasesUpdateIntegerAttribute = async ({databaseId,collectionId,key,requ
|
|
|
1107
1084
|
|
|
1108
1085
|
if (parseOutput) {
|
|
1109
1086
|
parse(response)
|
|
1110
|
-
success()
|
|
1111
1087
|
}
|
|
1112
1088
|
|
|
1113
1089
|
return response;
|
|
@@ -1156,7 +1132,6 @@ const databasesCreateIpAttribute = async ({databaseId,collectionId,key,required,
|
|
|
1156
1132
|
|
|
1157
1133
|
if (parseOutput) {
|
|
1158
1134
|
parse(response)
|
|
1159
|
-
success()
|
|
1160
1135
|
}
|
|
1161
1136
|
|
|
1162
1137
|
return response;
|
|
@@ -1198,7 +1173,6 @@ const databasesUpdateIpAttribute = async ({databaseId,collectionId,key,required,
|
|
|
1198
1173
|
|
|
1199
1174
|
if (parseOutput) {
|
|
1200
1175
|
parse(response)
|
|
1201
|
-
success()
|
|
1202
1176
|
}
|
|
1203
1177
|
|
|
1204
1178
|
return response;
|
|
@@ -1255,7 +1229,6 @@ const databasesCreateRelationshipAttribute = async ({databaseId,collectionId,rel
|
|
|
1255
1229
|
|
|
1256
1230
|
if (parseOutput) {
|
|
1257
1231
|
parse(response)
|
|
1258
|
-
success()
|
|
1259
1232
|
}
|
|
1260
1233
|
|
|
1261
1234
|
return response;
|
|
@@ -1312,7 +1285,6 @@ const databasesCreateStringAttribute = async ({databaseId,collectionId,key,size,
|
|
|
1312
1285
|
|
|
1313
1286
|
if (parseOutput) {
|
|
1314
1287
|
parse(response)
|
|
1315
|
-
success()
|
|
1316
1288
|
}
|
|
1317
1289
|
|
|
1318
1290
|
return response;
|
|
@@ -1354,7 +1326,6 @@ const databasesUpdateStringAttribute = async ({databaseId,collectionId,key,requi
|
|
|
1354
1326
|
|
|
1355
1327
|
if (parseOutput) {
|
|
1356
1328
|
parse(response)
|
|
1357
|
-
success()
|
|
1358
1329
|
}
|
|
1359
1330
|
|
|
1360
1331
|
return response;
|
|
@@ -1403,7 +1374,6 @@ const databasesCreateUrlAttribute = async ({databaseId,collectionId,key,required
|
|
|
1403
1374
|
|
|
1404
1375
|
if (parseOutput) {
|
|
1405
1376
|
parse(response)
|
|
1406
|
-
success()
|
|
1407
1377
|
}
|
|
1408
1378
|
|
|
1409
1379
|
return response;
|
|
@@ -1445,7 +1415,6 @@ const databasesUpdateUrlAttribute = async ({databaseId,collectionId,key,required
|
|
|
1445
1415
|
|
|
1446
1416
|
if (parseOutput) {
|
|
1447
1417
|
parse(response)
|
|
1448
|
-
success()
|
|
1449
1418
|
}
|
|
1450
1419
|
|
|
1451
1420
|
return response;
|
|
@@ -1479,7 +1448,6 @@ const databasesGetAttribute = async ({databaseId,collectionId,key,parseOutput =
|
|
|
1479
1448
|
|
|
1480
1449
|
if (parseOutput) {
|
|
1481
1450
|
parse(response)
|
|
1482
|
-
success()
|
|
1483
1451
|
}
|
|
1484
1452
|
|
|
1485
1453
|
return response;
|
|
@@ -1513,7 +1481,6 @@ const databasesDeleteAttribute = async ({databaseId,collectionId,key,parseOutput
|
|
|
1513
1481
|
|
|
1514
1482
|
if (parseOutput) {
|
|
1515
1483
|
parse(response)
|
|
1516
|
-
success()
|
|
1517
1484
|
}
|
|
1518
1485
|
|
|
1519
1486
|
return response;
|
|
@@ -1551,7 +1518,6 @@ const databasesUpdateRelationshipAttribute = async ({databaseId,collectionId,key
|
|
|
1551
1518
|
|
|
1552
1519
|
if (parseOutput) {
|
|
1553
1520
|
parse(response)
|
|
1554
|
-
success()
|
|
1555
1521
|
}
|
|
1556
1522
|
|
|
1557
1523
|
return response;
|
|
@@ -1591,7 +1557,6 @@ const databasesListDocuments = async ({databaseId,collectionId,queries,parseOutp
|
|
|
1591
1557
|
showConsoleLink('databases', 'listDocuments', databaseId, collectionId);
|
|
1592
1558
|
} else {
|
|
1593
1559
|
parse(response)
|
|
1594
|
-
success()
|
|
1595
1560
|
}
|
|
1596
1561
|
}
|
|
1597
1562
|
|
|
@@ -1638,7 +1603,6 @@ const databasesCreateDocument = async ({databaseId,collectionId,documentId,data,
|
|
|
1638
1603
|
|
|
1639
1604
|
if (parseOutput) {
|
|
1640
1605
|
parse(response)
|
|
1641
|
-
success()
|
|
1642
1606
|
}
|
|
1643
1607
|
|
|
1644
1608
|
return response;
|
|
@@ -1679,7 +1643,6 @@ const databasesGetDocument = async ({databaseId,collectionId,documentId,queries,
|
|
|
1679
1643
|
showConsoleLink('databases', 'getDocument', databaseId, collectionId, documentId);
|
|
1680
1644
|
} else {
|
|
1681
1645
|
parse(response)
|
|
1682
|
-
success()
|
|
1683
1646
|
}
|
|
1684
1647
|
}
|
|
1685
1648
|
|
|
@@ -1723,7 +1686,6 @@ const databasesUpdateDocument = async ({databaseId,collectionId,documentId,data,
|
|
|
1723
1686
|
|
|
1724
1687
|
if (parseOutput) {
|
|
1725
1688
|
parse(response)
|
|
1726
|
-
success()
|
|
1727
1689
|
}
|
|
1728
1690
|
|
|
1729
1691
|
return response;
|
|
@@ -1757,7 +1719,6 @@ const databasesDeleteDocument = async ({databaseId,collectionId,documentId,parse
|
|
|
1757
1719
|
|
|
1758
1720
|
if (parseOutput) {
|
|
1759
1721
|
parse(response)
|
|
1760
|
-
success()
|
|
1761
1722
|
}
|
|
1762
1723
|
|
|
1763
1724
|
return response;
|
|
@@ -1795,7 +1756,6 @@ const databasesListDocumentLogs = async ({databaseId,collectionId,documentId,que
|
|
|
1795
1756
|
|
|
1796
1757
|
if (parseOutput) {
|
|
1797
1758
|
parse(response)
|
|
1798
|
-
success()
|
|
1799
1759
|
}
|
|
1800
1760
|
|
|
1801
1761
|
return response;
|
|
@@ -1835,7 +1795,6 @@ const databasesListIndexes = async ({databaseId,collectionId,queries,parseOutput
|
|
|
1835
1795
|
showConsoleLink('databases', 'listIndexes', databaseId, collectionId);
|
|
1836
1796
|
} else {
|
|
1837
1797
|
parse(response)
|
|
1838
|
-
success()
|
|
1839
1798
|
}
|
|
1840
1799
|
}
|
|
1841
1800
|
|
|
@@ -1887,7 +1846,6 @@ const databasesCreateIndex = async ({databaseId,collectionId,key,type,attributes
|
|
|
1887
1846
|
|
|
1888
1847
|
if (parseOutput) {
|
|
1889
1848
|
parse(response)
|
|
1890
|
-
success()
|
|
1891
1849
|
}
|
|
1892
1850
|
|
|
1893
1851
|
return response;
|
|
@@ -1921,7 +1879,6 @@ const databasesGetIndex = async ({databaseId,collectionId,key,parseOutput = true
|
|
|
1921
1879
|
|
|
1922
1880
|
if (parseOutput) {
|
|
1923
1881
|
parse(response)
|
|
1924
|
-
success()
|
|
1925
1882
|
}
|
|
1926
1883
|
|
|
1927
1884
|
return response;
|
|
@@ -1955,7 +1912,6 @@ const databasesDeleteIndex = async ({databaseId,collectionId,key,parseOutput = t
|
|
|
1955
1912
|
|
|
1956
1913
|
if (parseOutput) {
|
|
1957
1914
|
parse(response)
|
|
1958
|
-
success()
|
|
1959
1915
|
}
|
|
1960
1916
|
|
|
1961
1917
|
return response;
|
|
@@ -1992,7 +1948,6 @@ const databasesListCollectionLogs = async ({databaseId,collectionId,queries,pars
|
|
|
1992
1948
|
|
|
1993
1949
|
if (parseOutput) {
|
|
1994
1950
|
parse(response)
|
|
1995
|
-
success()
|
|
1996
1951
|
}
|
|
1997
1952
|
|
|
1998
1953
|
return response;
|
|
@@ -2029,7 +1984,6 @@ const databasesGetCollectionUsage = async ({databaseId,collectionId,range,parseO
|
|
|
2029
1984
|
|
|
2030
1985
|
if (parseOutput) {
|
|
2031
1986
|
parse(response)
|
|
2032
|
-
success()
|
|
2033
1987
|
}
|
|
2034
1988
|
|
|
2035
1989
|
return response;
|
|
@@ -2065,7 +2019,6 @@ const databasesListLogs = async ({databaseId,queries,parseOutput = true, overrid
|
|
|
2065
2019
|
|
|
2066
2020
|
if (parseOutput) {
|
|
2067
2021
|
parse(response)
|
|
2068
|
-
success()
|
|
2069
2022
|
}
|
|
2070
2023
|
|
|
2071
2024
|
return response;
|
|
@@ -2104,7 +2057,6 @@ const databasesGetDatabaseUsage = async ({databaseId,range,parseOutput = true, o
|
|
|
2104
2057
|
showConsoleLink('databases', 'getDatabaseUsage', databaseId);
|
|
2105
2058
|
} else {
|
|
2106
2059
|
parse(response)
|
|
2107
|
-
success()
|
|
2108
2060
|
}
|
|
2109
2061
|
}
|
|
2110
2062
|
|