@@ -2,7 +2,7 @@ const inquirer = require("inquirer");
2
2
const JSONbig = require("json-bigint")({ storeAsString: false });
3
3
const { Command } = require("commander");
4
4
const { localConfig } = require("../config");
5
- const { Updater , SPINNER_ARC, SPINNER_DOTS } = require('../updater ');
5
+ const { Spinner , SPINNER_ARC, SPINNER_DOTS } = require('../spinner ');
6
6
const { paginate } = require('../paginate');
7
7
const { questionsPushBuckets, questionsPushTeams, questionsPushFunctions, questionsGetEntrypoint, questionsPushCollections, questionsConfirmPushCollections } = require("../questions");
8
8
const { actionRunner, success, log, error, commandDescriptions } = require("../parser");
@@ -272,8 +272,7 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
272
272
273
273
log('Validating functions');
274
274
// Validation is done BEFORE pushing so the deployment process can be run in async with progress update
275
- for (let i = 0; i < functions.length; i++) {
276
- const func = functions[i];
275
+ for (let func of functions) {
277
276
278
277
if (!func.entrypoint) {
279
278
log(`Function ${func.name} does not have an endpoint`);
@@ -311,14 +310,14 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
311
310
log('All functions are validated');
312
311
log('Pushing functions\n');
313
312
314
- Updater .start(false,)
313
+ Spinner .start(false);
315
314
let successfullyPushed = 0;
316
315
317
316
await Promise.all(functions.map(async (func) => {
318
317
const ignore = func.ignore ? 'appwrite.json' : '.gitignore';
319
318
let functionExists = false;
320
319
321
- const updaterRow = new Updater ({ status: '', resource: func.name, id: func['$id'], end: `Ignoring using: ${ignore}` });
320
+ const updaterRow = new Spinner ({ status: '', resource: func.name, id: func['$id'], end: `Ignoring using: ${ignore}` });
322
321
323
322
updaterRow.update({ status: 'Getting' }).startSpinner(SPINNER_DOTS);
324
323
@@ -453,7 +452,7 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
453
452
updaterRow.stopSpinner();
454
453
}));
455
454
456
- Updater .stop();
455
+ Spinner .stop();
457
456
458
457
success(`Pushed ${successfullyPushed} functions`);
459
458
}
0 commit comments