appwrite-cli 5.0.5 → 6.0.0-rc.1
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 +4 -4
- package/docs/examples/functions/create-build.md +1 -1
- package/docs/examples/functions/create-execution.md +1 -0
- package/docs/examples/functions/create.md +1 -0
- package/docs/examples/functions/delete-execution.md +3 -0
- package/docs/examples/functions/update-deployment-build.md +3 -0
- package/docs/examples/functions/update.md +1 -0
- package/docs/examples/projects/create-j-w-t.md +4 -0
- package/docs/examples/projects/update-mock-numbers.md +3 -0
- package/docs/examples/projects/update-session-alerts.md +3 -0
- package/docs/examples/users/create-j-w-t.md +4 -0
- package/docs/examples/vcs/get-repository-contents.md +4 -0
- package/index.js +34 -7
- package/install.ps1 +3 -3
- package/install.sh +2 -2
- package/lib/client.js +17 -3
- package/lib/commands/account.js +306 -152
- package/lib/commands/assistant.js +8 -5
- package/lib/commands/avatars.js +114 -58
- package/lib/commands/console.js +8 -5
- package/lib/commands/databases.js +353 -164
- package/lib/commands/functions.js +310 -100
- package/lib/commands/generic.js +206 -54
- package/lib/commands/graphql.js +14 -8
- package/lib/commands/health.js +140 -71
- package/lib/commands/init.js +250 -155
- package/lib/commands/locale.js +50 -26
- package/lib/commands/messaging.js +334 -156
- package/lib/commands/migrations.js +98 -50
- package/lib/commands/project.js +38 -20
- package/lib/commands/projects.js +449 -144
- package/lib/commands/proxy.js +32 -17
- package/lib/commands/pull.js +231 -0
- package/lib/commands/push.js +1518 -0
- package/lib/commands/run.js +282 -0
- package/lib/commands/storage.js +160 -76
- package/lib/commands/teams.js +102 -50
- package/lib/commands/users.js +324 -134
- package/lib/commands/vcs.js +102 -29
- package/lib/config.js +190 -18
- package/lib/emulation/docker.js +187 -0
- package/lib/emulation/utils.js +177 -0
- package/lib/id.js +30 -0
- package/lib/paginate.js +1 -2
- package/lib/parser.js +69 -12
- package/lib/questions.js +452 -80
- package/lib/sdks.js +1 -1
- package/lib/spinner.js +103 -0
- package/lib/utils.js +242 -4
- package/lib/validations.js +17 -0
- package/package.json +6 -2
- package/scoop/appwrite.json +3 -3
- package/lib/commands/deploy.js +0 -940
package/lib/commands/locale.js
CHANGED
|
@@ -4,7 +4,7 @@ const tar = require("tar");
|
|
|
4
4
|
const ignore = require("ignore");
|
|
5
5
|
const { promisify } = require('util');
|
|
6
6
|
const libClient = require('../client.js');
|
|
7
|
-
const { getAllFiles } = require('../utils.js');
|
|
7
|
+
const { getAllFiles, showConsoleLink } = require('../utils.js');
|
|
8
8
|
const { Command } = require('commander');
|
|
9
9
|
const { sdkForProject, sdkForConsole } = require('../sdks')
|
|
10
10
|
const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser')
|
|
@@ -41,6 +41,7 @@ const locale = new Command("locale").description(commandDescriptions['locale']).
|
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* @typedef {Object} LocaleGetRequestParams
|
|
44
|
+
* @property {boolean} overrideForCli
|
|
44
45
|
* @property {boolean} parseOutput
|
|
45
46
|
* @property {libClient | undefined} sdk
|
|
46
47
|
*/
|
|
@@ -48,8 +49,9 @@ const locale = new Command("locale").description(commandDescriptions['locale']).
|
|
|
48
49
|
/**
|
|
49
50
|
* @param {LocaleGetRequestParams} params
|
|
50
51
|
*/
|
|
51
|
-
const localeGet = async ({
|
|
52
|
-
let client = !sdk ? await sdkForProject() :
|
|
52
|
+
const localeGet = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
53
|
+
let client = !sdk ? await sdkForProject() :
|
|
54
|
+
sdk;
|
|
53
55
|
let apiPath = '/locale';
|
|
54
56
|
let payload = {};
|
|
55
57
|
|
|
@@ -63,12 +65,14 @@ const localeGet = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
63
65
|
parse(response)
|
|
64
66
|
success()
|
|
65
67
|
}
|
|
66
|
-
|
|
68
|
+
|
|
67
69
|
return response;
|
|
70
|
+
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
/**
|
|
71
74
|
* @typedef {Object} LocaleListCodesRequestParams
|
|
75
|
+
* @property {boolean} overrideForCli
|
|
72
76
|
* @property {boolean} parseOutput
|
|
73
77
|
* @property {libClient | undefined} sdk
|
|
74
78
|
*/
|
|
@@ -76,8 +80,9 @@ const localeGet = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
76
80
|
/**
|
|
77
81
|
* @param {LocaleListCodesRequestParams} params
|
|
78
82
|
*/
|
|
79
|
-
const localeListCodes = async ({
|
|
80
|
-
let client = !sdk ? await sdkForProject() :
|
|
83
|
+
const localeListCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
84
|
+
let client = !sdk ? await sdkForProject() :
|
|
85
|
+
sdk;
|
|
81
86
|
let apiPath = '/locale/codes';
|
|
82
87
|
let payload = {};
|
|
83
88
|
|
|
@@ -91,12 +96,14 @@ const localeListCodes = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
91
96
|
parse(response)
|
|
92
97
|
success()
|
|
93
98
|
}
|
|
94
|
-
|
|
99
|
+
|
|
95
100
|
return response;
|
|
101
|
+
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
/**
|
|
99
105
|
* @typedef {Object} LocaleListContinentsRequestParams
|
|
106
|
+
* @property {boolean} overrideForCli
|
|
100
107
|
* @property {boolean} parseOutput
|
|
101
108
|
* @property {libClient | undefined} sdk
|
|
102
109
|
*/
|
|
@@ -104,8 +111,9 @@ const localeListCodes = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
104
111
|
/**
|
|
105
112
|
* @param {LocaleListContinentsRequestParams} params
|
|
106
113
|
*/
|
|
107
|
-
const localeListContinents = async ({
|
|
108
|
-
let client = !sdk ? await sdkForProject() :
|
|
114
|
+
const localeListContinents = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
115
|
+
let client = !sdk ? await sdkForProject() :
|
|
116
|
+
sdk;
|
|
109
117
|
let apiPath = '/locale/continents';
|
|
110
118
|
let payload = {};
|
|
111
119
|
|
|
@@ -119,12 +127,14 @@ const localeListContinents = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
119
127
|
parse(response)
|
|
120
128
|
success()
|
|
121
129
|
}
|
|
122
|
-
|
|
130
|
+
|
|
123
131
|
return response;
|
|
132
|
+
|
|
124
133
|
}
|
|
125
134
|
|
|
126
135
|
/**
|
|
127
136
|
* @typedef {Object} LocaleListCountriesRequestParams
|
|
137
|
+
* @property {boolean} overrideForCli
|
|
128
138
|
* @property {boolean} parseOutput
|
|
129
139
|
* @property {libClient | undefined} sdk
|
|
130
140
|
*/
|
|
@@ -132,8 +142,9 @@ const localeListContinents = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
132
142
|
/**
|
|
133
143
|
* @param {LocaleListCountriesRequestParams} params
|
|
134
144
|
*/
|
|
135
|
-
const localeListCountries = async ({
|
|
136
|
-
let client = !sdk ? await sdkForProject() :
|
|
145
|
+
const localeListCountries = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
146
|
+
let client = !sdk ? await sdkForProject() :
|
|
147
|
+
sdk;
|
|
137
148
|
let apiPath = '/locale/countries';
|
|
138
149
|
let payload = {};
|
|
139
150
|
|
|
@@ -147,12 +158,14 @@ const localeListCountries = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
147
158
|
parse(response)
|
|
148
159
|
success()
|
|
149
160
|
}
|
|
150
|
-
|
|
161
|
+
|
|
151
162
|
return response;
|
|
163
|
+
|
|
152
164
|
}
|
|
153
165
|
|
|
154
166
|
/**
|
|
155
167
|
* @typedef {Object} LocaleListCountriesEURequestParams
|
|
168
|
+
* @property {boolean} overrideForCli
|
|
156
169
|
* @property {boolean} parseOutput
|
|
157
170
|
* @property {libClient | undefined} sdk
|
|
158
171
|
*/
|
|
@@ -160,8 +173,9 @@ const localeListCountries = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
160
173
|
/**
|
|
161
174
|
* @param {LocaleListCountriesEURequestParams} params
|
|
162
175
|
*/
|
|
163
|
-
const localeListCountriesEU = async ({
|
|
164
|
-
let client = !sdk ? await sdkForProject() :
|
|
176
|
+
const localeListCountriesEU = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
177
|
+
let client = !sdk ? await sdkForProject() :
|
|
178
|
+
sdk;
|
|
165
179
|
let apiPath = '/locale/countries/eu';
|
|
166
180
|
let payload = {};
|
|
167
181
|
|
|
@@ -175,12 +189,14 @@ const localeListCountriesEU = async ({ parseOutput = true, sdk = undefined}) =>
|
|
|
175
189
|
parse(response)
|
|
176
190
|
success()
|
|
177
191
|
}
|
|
178
|
-
|
|
192
|
+
|
|
179
193
|
return response;
|
|
194
|
+
|
|
180
195
|
}
|
|
181
196
|
|
|
182
197
|
/**
|
|
183
198
|
* @typedef {Object} LocaleListCountriesPhonesRequestParams
|
|
199
|
+
* @property {boolean} overrideForCli
|
|
184
200
|
* @property {boolean} parseOutput
|
|
185
201
|
* @property {libClient | undefined} sdk
|
|
186
202
|
*/
|
|
@@ -188,8 +204,9 @@ const localeListCountriesEU = async ({ parseOutput = true, sdk = undefined}) =>
|
|
|
188
204
|
/**
|
|
189
205
|
* @param {LocaleListCountriesPhonesRequestParams} params
|
|
190
206
|
*/
|
|
191
|
-
const localeListCountriesPhones = async ({
|
|
192
|
-
let client = !sdk ? await sdkForProject() :
|
|
207
|
+
const localeListCountriesPhones = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
208
|
+
let client = !sdk ? await sdkForProject() :
|
|
209
|
+
sdk;
|
|
193
210
|
let apiPath = '/locale/countries/phones';
|
|
194
211
|
let payload = {};
|
|
195
212
|
|
|
@@ -203,12 +220,14 @@ const localeListCountriesPhones = async ({ parseOutput = true, sdk = undefined})
|
|
|
203
220
|
parse(response)
|
|
204
221
|
success()
|
|
205
222
|
}
|
|
206
|
-
|
|
223
|
+
|
|
207
224
|
return response;
|
|
225
|
+
|
|
208
226
|
}
|
|
209
227
|
|
|
210
228
|
/**
|
|
211
229
|
* @typedef {Object} LocaleListCurrenciesRequestParams
|
|
230
|
+
* @property {boolean} overrideForCli
|
|
212
231
|
* @property {boolean} parseOutput
|
|
213
232
|
* @property {libClient | undefined} sdk
|
|
214
233
|
*/
|
|
@@ -216,8 +235,9 @@ const localeListCountriesPhones = async ({ parseOutput = true, sdk = undefined})
|
|
|
216
235
|
/**
|
|
217
236
|
* @param {LocaleListCurrenciesRequestParams} params
|
|
218
237
|
*/
|
|
219
|
-
const localeListCurrencies = async ({
|
|
220
|
-
let client = !sdk ? await sdkForProject() :
|
|
238
|
+
const localeListCurrencies = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
239
|
+
let client = !sdk ? await sdkForProject() :
|
|
240
|
+
sdk;
|
|
221
241
|
let apiPath = '/locale/currencies';
|
|
222
242
|
let payload = {};
|
|
223
243
|
|
|
@@ -231,12 +251,14 @@ const localeListCurrencies = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
231
251
|
parse(response)
|
|
232
252
|
success()
|
|
233
253
|
}
|
|
234
|
-
|
|
254
|
+
|
|
235
255
|
return response;
|
|
256
|
+
|
|
236
257
|
}
|
|
237
258
|
|
|
238
259
|
/**
|
|
239
260
|
* @typedef {Object} LocaleListLanguagesRequestParams
|
|
261
|
+
* @property {boolean} overrideForCli
|
|
240
262
|
* @property {boolean} parseOutput
|
|
241
263
|
* @property {libClient | undefined} sdk
|
|
242
264
|
*/
|
|
@@ -244,8 +266,9 @@ const localeListCurrencies = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
244
266
|
/**
|
|
245
267
|
* @param {LocaleListLanguagesRequestParams} params
|
|
246
268
|
*/
|
|
247
|
-
const localeListLanguages = async ({
|
|
248
|
-
let client = !sdk ? await sdkForProject() :
|
|
269
|
+
const localeListLanguages = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
270
|
+
let client = !sdk ? await sdkForProject() :
|
|
271
|
+
sdk;
|
|
249
272
|
let apiPath = '/locale/languages';
|
|
250
273
|
let payload = {};
|
|
251
274
|
|
|
@@ -259,8 +282,9 @@ const localeListLanguages = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
259
282
|
parse(response)
|
|
260
283
|
success()
|
|
261
284
|
}
|
|
262
|
-
|
|
285
|
+
|
|
263
286
|
return response;
|
|
287
|
+
|
|
264
288
|
}
|
|
265
289
|
|
|
266
290
|
locale
|
|
@@ -313,4 +337,4 @@ module.exports = {
|
|
|
313
337
|
localeListCountriesPhones,
|
|
314
338
|
localeListCurrencies,
|
|
315
339
|
localeListLanguages
|
|
316
|
-
};
|
|
340
|
+
};
|