From 142cc9e0bedb3f965b37b469ac7574a98f27999f Mon Sep 17 00:00:00 2001 From: Binyamin Yawitz <316103+byawitz@users.noreply.github.com> Date: Mon, 26 Aug 2024 19:47:09 -0400 Subject: [PATCH] feat(cli): disabling variable push --- templates/cli/lib/commands/push.js.twig | 36 +------------------------ 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/templates/cli/lib/commands/push.js.twig b/templates/cli/lib/commands/push.js.twig index e1fd35b42..1e9beece0 100644 --- a/templates/cli/lib/commands/push.js.twig +++ b/templates/cli/lib/commands/push.js.twig @@ -1006,7 +1006,7 @@ const pushSettings = async () => { } } -const pushFunction = async ({ functionId, async, code, withVariables } = { returnOnZero: false }) => { +const pushFunction = async ({ functionId, async, code } = { returnOnZero: false }) => { process.chdir(localConfig.configDirectoryPath) const functionIds = []; @@ -1146,39 +1146,6 @@ const pushFunction = async ({ functionId, async, code, withVariables } = { retur } } - if (withVariables) { - updaterRow.update({ status: 'Updating variables' }).replaceSpinner(SPINNER_ARC); - - const { variables } = await paginate(functionsListVariables, { - functionId: func['$id'], - parseOutput: false - }, 100, 'variables'); - - await Promise.all(variables.map(async variable => { - await functionsDeleteVariable({ - functionId: func['$id'], - variableId: variable['$id'], - parseOutput: false - }); - })); - - let result = await awaitPools.wipeVariables(func['$id']); - if (!result) { - updaterRow.fail({ errorMessage: `Variable deletion timed out.` }) - return; - } - - // Deploy local variables - await Promise.all((func['vars'] ?? []).map(async variable => { - await functionsCreateVariable({ - functionId: func['$id'], - key: variable['key'], - value: variable['value'], - parseOutput: false - }); - })); - } - if (code === false) { successfullyPushed++; successfullyDeployed++; @@ -1692,7 +1659,6 @@ push .option(`-f, --function-id `, `ID of function to run`) .option(`-A, --async`, `Don't wait for functions deployments status`) .option("--no-code", "Don't push the function's code") - .option("--with-variables", `Push function variables.`) .action(actionRunner(pushFunction)); push