@@ -255,7 +255,7 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
255
255
}
256
256
257
257
if (functionIds.length < = 0) {
258
- const answers = await inquirer.prompt(questionsDeployFunctions [0]);
258
+ const answers = await inquirer.prompt(questionsPushFunctions [0]);
259
259
functionIds.push(...answers.functions);
260
260
}
261
261
@@ -271,7 +271,7 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
271
271
});
272
272
273
273
log('Validating functions');
274
- // Validation is done BEFORE deploying so the deployment process can be run in async with progress update
274
+ // Validation is done BEFORE pushing so the deployment process can be run in async with progress update
275
275
for (let i = 0; i < functions.length; i++) {
276
276
const func = functions[i];
277
277
@@ -283,7 +283,7 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
283
283
}
284
284
285
285
if (func.variables) {
286
- func.deployVariables = yes;
286
+ func.pushVariables = yes;
287
287
288
288
try {
289
289
const { total } = await functionsListVariables({
@@ -293,11 +293,11 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
293
293
});
294
294
295
295
if (total === 0) {
296
- func.deployVariables = true;
297
- } else if (total > 0 && !func.deployVariables ) {
296
+ func.pushVariables = true;
297
+ } else if (total > 0 && !func.pushVariables ) {
298
298
log(`The function ${func.name} has remote variables setup`);
299
- const variableAnswers = await inquirer.prompt(questionsDeployFunctions [1])
300
- func.deployVariables = variableAnswers.override.toLowerCase() === "yes";
299
+ const variableAnswers = await inquirer.prompt(questionsPushFunctions [1])
300
+ func.pushVariables = variableAnswers.override.toLowerCase() === "yes";
301
301
}
302
302
} catch (e) {
303
303
if (e.code != 404) {
@@ -312,7 +312,7 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
312
312
log('Pushing functions\n');
313
313
314
314
Updater.start(false,)
315
- let successfullyDeployed = 0;
315
+ let successfullyPushed = 0;
316
316
317
317
await Promise.all(functions.map(async (func) => {
318
318
const ignore = func.ignore ? 'appwrite.json' : '.gitignore';
@@ -391,7 +391,7 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
391
391
}
392
392
393
393
if (func.variables) {
394
- if (!func.deployVariables ) {
394
+ if (!func.pushVariables ) {
395
395
updaterRow.update({ end: 'Skipping variables' });
396
396
} else {
397
397
updaterRow.update({ end: 'Pushing variables' });
@@ -415,7 +415,7 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
415
415
return;
416
416
}
417
417
418
- // Deploy local variables
418
+ // Push local variables
419
419
await Promise.all(Object.keys(func.variables).map(async localVariableKey => {
420
420
await functionsCreateVariable({
421
421
functionId: func['$id'],
@@ -439,7 +439,7 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
439
439
})
440
440
441
441
updaterRow.update({ status: 'Pushed' })
442
- successfullyDeployed ++;
442
+ successfullyPushed ++;
443
443
444
444
} catch (e) {
445
445
switch (e.code) {
@@ -455,7 +455,7 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
455
455
456
456
Updater.stop();
457
457
458
- success(`Pushed ${successfullyDeployed } functions`);
458
+ success(`Pushed ${successfullyPushed } functions`);
459
459
}
460
460
461
461
const createAttribute = async (databaseId, collectionId, attribute) => {
0 commit comments