@@ -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");
@@ -273,8 +273,7 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
273
273
274
274
log('Validating functions');
275
275
// Validation is done BEFORE pushing so the deployment process can be run in async with progress update
276
- for (let i = 0; i < functions.length; i++) {
277
- const func = functions[i];
276
+ for (let func of functions) {
278
277
279
278
if (!func.entrypoint) {
280
279
log(`Function ${func.name} does not have an endpoint`);
@@ -312,7 +311,7 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
312
311
log('All functions are validated');
313
312
log('Pushing functions\n');
314
313
315
- Updater .start(false);
314
+ Spinner .start(false);
316
315
let successfullyPushed = 0;
317
316
let successfullyDeployed = 0;
318
317
@@ -321,7 +320,7 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
321
320
let functionExists = false;
322
321
let deploymentCreated = false;
323
322
324
- const updaterRow = new Updater ({ status: '', resource: func.name, id: func['$id'], end: `Ignoring using: ${ignore}` });
323
+ const updaterRow = new Spinner ({ status: '', resource: func.name, id: func['$id'], end: `Ignoring using: ${ignore}` });
325
324
326
325
updaterRow.update({ status: 'Getting' }).startSpinner(SPINNER_DOTS);
327
326
@@ -498,7 +497,7 @@ const pushFunction = async ({ functionId, all, yes } = {}) => {
498
497
updaterRow.stopSpinner();
499
498
}));
500
499
501
- Updater .stop();
500
+ Spinner .stop();
502
501
503
502
success(`Pushed ${successfullyPushed} functions with ${successfullyDeployed} successfully deployed`);
504
503
}
0 commit comments