From 8928cfa3d7983193d0901b326fdbad98a1226201 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 13 Apr 2023 09:22:52 +0200 Subject: [PATCH] fix refreshOn --- backend/windmill-worker/src/worker.rs | 2 +- .../editor/component/ComponentNavigation.svelte | 3 +-- .../editor/componentsPanel/ComponentList.svelte | 4 +--- .../contextPanel/components/OutputHeader.svelte | 2 -- .../inlineScriptsPanel/InlineScriptEditor.svelte | 16 ---------------- .../inputEditor/ConnectedInputEditor.svelte | 3 +-- .../triggerLists/TriggerBadgesList.svelte | 3 +-- 7 files changed, 5 insertions(+), 28 deletions(-) diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs index fed5fe7ca1..3f4fe6cd93 100644 --- a/backend/windmill-worker/src/worker.rs +++ b/backend/windmill-worker/src/worker.rs @@ -1810,9 +1810,9 @@ async fn handle_deno_job( //do not cache local dependencies let reload = format!("--reload={base_internal_url}"); let child = async { - let mut args = Vec::new(); let script_path = format!("{job_dir}/wrapper.ts"); let import_map_path = format!("{job_dir}/import_map.json"); + let mut args = Vec::new(); args.push("run"); args.push("--no-check"); args.push("--import-map"); diff --git a/frontend/src/lib/components/apps/editor/component/ComponentNavigation.svelte b/frontend/src/lib/components/apps/editor/component/ComponentNavigation.svelte index 66e5eaa6ad..75816cd942 100644 --- a/frontend/src/lib/components/apps/editor/component/ComponentNavigation.svelte +++ b/frontend/src/lib/components/apps/editor/component/ComponentNavigation.svelte @@ -11,7 +11,7 @@ import { sendUserToast } from '$lib/utils' import { gridColumns } from '../../gridUtils' - const { app, selectedComponent, worldStore, focusedGrid, componentControl } = + const { app, selectedComponent, focusedGrid, componentControl } = getContext('AppViewerContext') const { history, movingcomponents } = getContext('AppEditorContext') @@ -209,7 +209,6 @@ $selectedComponent = nitems.map((x) => x) } - $worldStore = $worldStore $app = $app } diff --git a/frontend/src/lib/components/apps/editor/componentsPanel/ComponentList.svelte b/frontend/src/lib/components/apps/editor/componentsPanel/ComponentList.svelte index 1e1cefd5b1..104d69e91e 100644 --- a/frontend/src/lib/components/apps/editor/componentsPanel/ComponentList.svelte +++ b/frontend/src/lib/components/apps/editor/componentsPanel/ComponentList.svelte @@ -15,8 +15,7 @@ import { push } from '$lib/history' import { flip } from 'svelte/animate' - const { app, selectedComponent, focusedGrid, worldStore } = - getContext('AppViewerContext') + const { app, selectedComponent, focusedGrid } = getContext('AppViewerContext') const { history } = getContext('AppEditorContext') @@ -33,7 +32,6 @@ $selectedComponent = [id] $app = $app - $worldStore = $worldStore } let search = '' diff --git a/frontend/src/lib/components/apps/editor/contextPanel/components/OutputHeader.svelte b/frontend/src/lib/components/apps/editor/contextPanel/components/OutputHeader.svelte index b120dfc807..35acd54afe 100644 --- a/frontend/src/lib/components/apps/editor/contextPanel/components/OutputHeader.svelte +++ b/frontend/src/lib/components/apps/editor/contextPanel/components/OutputHeader.svelte @@ -135,9 +135,7 @@ runnable?.type === 'runnableByName' && runnable?.inlineScript?.refreshOn?.find((x) => x.id === from) ) { - console.log('processss') runnable.inlineScript.refreshOn = runnable.inlineScript.refreshOn.map((x) => { - console.log('renaming', x) if (x.id === from) { return { id: to, diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte index dbf70df358..6f47a29e68 100644 --- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte @@ -87,22 +87,6 @@ inlineScript?.language == 'frontend' && worldStore ? buildExtraLib($worldStore?.outputsById ?? {}, id, false, $state, true) : undefined - - let refreshOn: string = inlineScript?.refreshOn?.map((x) => `${x.id}.${x.key}`).join(' ') ?? '' - - $: handleRefreshOn(refreshOn) - - function handleRefreshOn(refreshOn: string) { - if (refreshOn && refreshOn != '' && inlineScript) { - inlineScript.refreshOn = refreshOn - .split(' ') - .filter((x) => x.split('.').length == 2) - .map((x) => { - const [id, key] = x.split('.') - return { id, key } - }) - } - } {#if inlineScript} diff --git a/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/ConnectedInputEditor.svelte b/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/ConnectedInputEditor.svelte index 40691f1520..fbd150a023 100644 --- a/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/ConnectedInputEditor.svelte +++ b/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/ConnectedInputEditor.svelte @@ -7,7 +7,7 @@ export let componentInput: ConnectedAppInput - const { connectingInput, app, worldStore } = getContext('AppViewerContext') + const { connectingInput, app } = getContext('AppViewerContext') function applyConnection() { if ( @@ -22,7 +22,6 @@ hoveredComponent: undefined } $app = $app - $worldStore = $worldStore } } diff --git a/frontend/src/lib/components/apps/editor/settingsPanel/triggerLists/TriggerBadgesList.svelte b/frontend/src/lib/components/apps/editor/settingsPanel/triggerLists/TriggerBadgesList.svelte index a897ac745f..ee3fa582ef 100644 --- a/frontend/src/lib/components/apps/editor/settingsPanel/triggerLists/TriggerBadgesList.svelte +++ b/frontend/src/lib/components/apps/editor/settingsPanel/triggerLists/TriggerBadgesList.svelte @@ -21,7 +21,7 @@ let badgeClass = 'inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium border' - const { app, worldStore } = getContext('AppViewerContext') + const { app } = getContext('AppViewerContext') const { connectingInput } = getContext('AppViewerContext') @@ -60,7 +60,6 @@ hoveredComponent: undefined } $app = $app - $worldStore = $worldStore } }