fix(cli): support whileloop in flow cli sync

This commit is contained in:
Ruben Fiszel
2024-05-11 02:06:14 +02:00
parent 306007c3fe
commit d0a6ddab94
5 changed files with 14 additions and 8 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ if [ "$REVERT" == "YES" ]; then
ce_file="${ee_file/${EE_CODE_DIR}/.}"
ce_file="${root_dirpath}/backend/${ce_file}"
if [ "$REVERT_PREVIOUS" == "YES" ]; then
git checkout HEAD@{15} ${ce_file} || true
git checkout HEAD@{5} ${ce_file} || true
else
git restore --staged ${ce_file} || true
git restore ${ce_file} || true
+7 -5
View File
@@ -1,5 +1,5 @@
use crate::ee::LicensePlan::Community;
use serde::Deserialize;
use serde::{Deserialize, Serialize};
use std::sync::Arc;
use tokio::sync::RwLock;
@@ -20,8 +20,10 @@ pub async fn get_license_plan() -> LicensePlan {
return Community;
}
#[derive(Deserialize)]
#[serde(untagged)]
pub enum CriticalErrorChannel {}
pub async fn trigger_critical_error_channels(_x: String) {
//not open-source
()
}
pub async fn trigger_critical_error_channels(_error_message: String) {}
#[derive(Serialize, Deserialize)]
pub enum CriticalErrorChannel {}
+2
View File
@@ -71,6 +71,8 @@ export async function pushFlow(
}
} else if (m.value.type == "forloopflow") {
replaceInlineScripts(m.value.modules);
} else if (m.value.type == "whileloopflow") {
replaceInlineScripts(m.value.modules);
} else if (m.value.type == "branchall") {
m.value.branches.forEach((b) => replaceInlineScripts(b.modules));
} else if (m.value.type == "branchone") {
+3 -1
View File
@@ -208,6 +208,7 @@ export async function handleFile(
no_main_func: typed?.no_main_func,
priority: typed?.priority,
codebase: codebase?.digest,
timeout: typed?.timeout,
};
if (remote) {
@@ -236,7 +237,8 @@ export async function handleFile(
Boolean(typed.visible_to_runner_only) ==
Boolean(remote.visible_to_runner_only) &&
Boolean(typed.no_main_func) == Boolean(remote.no_main_func) &&
typed.priority == Boolean(remote.priority))
typed.priority == Boolean(remote.priority) &&
typed.timeout == remote.timeout)
) {
log.info(colors.green(`Script ${remotePath} is up to date`));
return true;
+1 -1
View File
@@ -43,7 +43,7 @@ import {
import { handleFile } from "./script.ts";
import { deepEqual } from "./utils.ts";
import { Codebase, SyncOptions, mergeConfigWithConfigFile } from "./conf.ts";
import { SyncOptions, mergeConfigWithConfigFile } from "./conf.ts";
import { removePathPrefix } from "./types.ts";
import { SyncCodebase, listSyncCodebases } from "./codebase.ts";