This commit is contained in:
Ruben Fiszel
2024-05-16 20:34:03 +02:00
parent f3b8e01981
commit 27d5cd00a3
3 changed files with 15 additions and 9 deletions
+2 -2
View File
@@ -36,13 +36,13 @@ export async function readConfigFile(): Promise<SyncOptions> {
) 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 {};
}
+1 -1
View File
@@ -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(
@@ -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<string, any>,
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) {