feat(cli): split flows inline scripts

This commit is contained in:
Ruben Fiszel
2023-05-05 23:26:03 +02:00
parent 15f1c947bb
commit 93ae0d71a4
5 changed files with 202 additions and 54 deletions
+9 -2
View File
@@ -1,6 +1,11 @@
// deno-lint-ignore-file no-explicit-any
import { requireLogin, resolveWorkspace, validatePath } from "./context.ts";
import { GlobalOptions, isSuperset, parseFromFile } from "./types.ts";
import {
GlobalOptions,
isSuperset,
parseFromFile,
removeType,
} from "./types.ts";
import {
colors,
Command,
@@ -47,6 +52,8 @@ export async function pushVariable(
localVariable: VariableFile,
plainSecrets: boolean
): Promise<void> {
remotePath = removeType(remotePath, "variable");
if (variable) {
if (isSuperset(localVariable, variable)) {
return;
@@ -61,7 +68,7 @@ export async function pushVariable(
},
});
} else {
console.log(colors.yellow.bold("Creating new variable..."));
console.log(colors.yellow.bold(`Creating new variable ${remotePath}...`));
await VariableService.createVariable({
workspace,
alreadyEncrypted: !plainSecrets,