Skip to content

Commit 02be0f0

Browse files
committed
feat(cli): Updating push to include the project
1 parent 224c3fd commit 02be0f0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

templates/cli/lib/commands/push.js.twig

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { Command } = require("commander");
44
const { localConfig, globalConfig } = require("../config");
55
const { Spinner, SPINNER_ARC, SPINNER_DOTS } = require('../spinner');
66
const { paginate } = require('../paginate');
7-
const { questionsPushBuckets, questionsPushTeams, questionsPushFunctions, questionsGetEntrypoint, questionsPushCollections, questionsConfirmPushCollections, questionsPushMessagingTopics } = require("../questions");
7+
const { questionsPushBuckets, questionsPushTeams, questionsPushFunctions, questionsGetEntrypoint, questionsPushCollections, questionsConfirmPushCollections, questionsPushMessagingTopics, questionsPushResources } = require("../questions");
88
const { actionRunner, success, log, error, commandDescriptions } = require("../parser");
99
const { functionsGet, functionsCreate, functionsUpdate, functionsCreateDeployment, functionsUpdateDeployment, functionsGetDeployment, functionsListVariables, functionsDeleteVariable, functionsCreateVariable } = require('./functions');
1010
const {
@@ -246,6 +246,7 @@ const awaitPools = {
246246

247247
const pushResources = async ({ all, yes } = {}) => {
248248
const actions = {
249+
project: pushProject,
249250
functions: pushFunction,
250251
collections: pushCollection,
251252
buckets: pushBucket,
@@ -254,7 +255,9 @@ const pushResources = async ({ all, yes } = {}) => {
254255
}
255256

256257
if (all) {
257-
Object.values(actions).forEach(action => action({ all: true, yes }));
258+
for(let action of Object.values(actions)){
259+
await action({ all: true, yes });
260+
}
258261
} else {
259262
const answers = await inquirer.prompt(questionsPushResources[0]);
260263
answers.resources.forEach((resource) => {
@@ -1182,6 +1185,8 @@ const push = new Command("push")
11821185
push
11831186
.command("all")
11841187
.description("Push all resource.")
1188+
.option(`--all`, `Flag to push all functions`)
1189+
.option(`--yes`, `Flag to confirm all warnings`)
11851190
.action(actionRunner(pushResources));
11861191

11871192
push

0 commit comments

Comments
 (0)