diff --git a/cli/conf.ts b/cli/conf.ts index d21d9c6256..4b6f248be4 100644 --- a/cli/conf.ts +++ b/cli/conf.ts @@ -36,13 +36,13 @@ export async function readConfigFile(): Promise { ) as SyncOptions; if (conf?.defaultTs == undefined) { log.warning( - 'No defaultTs defined in your wmill.yaml, using deno as default typescript language. Set defaultTs in wmill.yaml to "bun" to switch (https://www.windmill.dev/docs/advanced/cli/sync#wmillyaml)' + "No defaultTs defined in your wmill.yaml, using deno as default typescript language. Use 'wmill init' to bootstrap it." ); } return typeof conf == "object" ? conf : ({} as SyncOptions); } catch (e) { log.warning( - 'No wmill.yaml found, using deno as default typescript language. Create a wmill.yaml with a defaultTs set to "bun" to switch (https://www.windmill.dev/docs/advanced/cli/sync#wmillyaml)' + "No wmill.yaml found, using deno as default typescript language. Use 'wmill init' to bootstrap it." ); return {}; } diff --git a/cli/sync.ts b/cli/sync.ts index 32ffb247cf..8ec5c3541a 100644 --- a/cli/sync.ts +++ b/cli/sync.ts @@ -107,13 +107,13 @@ async function addCodebaseDigestIfRelevant( if (!isTs) { return content; } - log.info(`isScript: ${isScript}, isTs: ${isTs}; ${path}`); if (isTs) { const c = findCodebase(path, codebases); if (c) { const parsed: any = yamlParse(content); if (parsed && typeof parsed == "object") { parsed["codebase"] = c.digest; + parsed["lock"] = undefined; return yamlStringify(parsed, yamlOptions); } else { throw Error( diff --git a/frontend/src/lib/components/FlowPreviewContent.svelte b/frontend/src/lib/components/FlowPreviewContent.svelte index e64b84720e..201eb42940 100644 --- a/frontend/src/lib/components/FlowPreviewContent.svelte +++ b/frontend/src/lib/components/FlowPreviewContent.svelte @@ -10,7 +10,7 @@ import FlowProgressBar from './flows/FlowProgressBar.svelte' import CapturePayload from './flows/content/CapturePayload.svelte' import { AlertTriangle, ArrowRight, CornerDownLeft, Play, RefreshCw, X } from 'lucide-svelte' - import { emptyString } from '$lib/utils' + import { emptyString, sendUserToast } from '$lib/utils' import DrawerContent from './common/drawer/DrawerContent.svelte' import SavedInputs from './SavedInputs.svelte' import { dfs } from './flows/dfs' @@ -60,11 +60,17 @@ args: Record, restartedFrom: RestartedFrom | undefined ) { - lastPreviewFlow = JSON.stringify($flowStore) - jobProgressReset() - const newFlow = extractFlow(previewMode) - jobId = await runFlowPreview(args, newFlow, $pathStore, restartedFrom) - isRunning = true + try { + lastPreviewFlow = JSON.stringify($flowStore) + jobProgressReset() + const newFlow = extractFlow(previewMode) + jobId = await runFlowPreview(args, newFlow, $pathStore, restartedFrom) + isRunning = true + } catch (e) { + sendUserToast('Could not run preview', true, undefined, e.toString()) + isRunning = false + jobId = undefined + } } function onKeyDown(event: KeyboardEvent) {