fix(cli): warn to switch to bun in the CLI

This commit is contained in:
Ruben Fiszel
2024-03-09 17:05:57 +01:00
parent 357f74ad1a
commit 017190be27
+9 -2
View File
@@ -1,4 +1,4 @@
import { yamlParse } from "./deps.ts";
import { log, yamlParse } from "./deps.ts";
export interface SyncOptions {
stateful?: boolean;
@@ -26,9 +26,16 @@ export async function readConfigFile(): Promise<SyncOptions> {
const conf = yamlParse(
await Deno.readTextFile("wmill.yaml")
) as SyncOptions;
if (conf.defaultTs) {
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)'
);
}
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)'
);
return {};
}
}