mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-11 00:06:06 +00:00
fix(cli): make bun the default language in absence of wmill defaultTs
This commit is contained in:
+2
-2
@@ -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. Use 'wmill init' to bootstrap it."
|
||||
"No defaultTs defined in your wmill.yaml. Using 'bun' as default."
|
||||
);
|
||||
}
|
||||
return typeof conf == "object" ? conf : ({} as SyncOptions);
|
||||
} catch (e) {
|
||||
log.warning(
|
||||
"No wmill.yaml found, using deno as default typescript language. Use 'wmill init' to bootstrap it."
|
||||
"No wmill.yaml found. Use 'wmill init' to bootstrap it. Using 'bun' as default typescript runtime."
|
||||
);
|
||||
return {};
|
||||
}
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ let command: any = new Command()
|
||||
"wmill.yaml",
|
||||
yamlStringify({
|
||||
defaultTs: "bun",
|
||||
includes: [],
|
||||
includes: ["**"],
|
||||
excludes: [],
|
||||
codebases: [],
|
||||
})
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ export async function downloadZip(
|
||||
}&include_users=${includeUsers ?? false}&include_groups=${
|
||||
includeGroups ?? false
|
||||
}&include_settings=${includeSettings ?? false}&default_ts=${
|
||||
defaultTs ?? "deno"
|
||||
defaultTs ?? "bun"
|
||||
}`,
|
||||
{
|
||||
headers: requestHeaders,
|
||||
|
||||
+2
-2
@@ -392,13 +392,13 @@ export function filePathExtensionFromContentType(
|
||||
} else if (language === "nativets") {
|
||||
return ".fetch.ts";
|
||||
} else if (language === "bun") {
|
||||
if (defaultTs == undefined || defaultTs == "deno") {
|
||||
if (defaultTs == "deno") {
|
||||
return ".bun.ts";
|
||||
} else {
|
||||
return ".ts";
|
||||
}
|
||||
} else if (language === "deno") {
|
||||
if (defaultTs == "bun") {
|
||||
if (defaultTs == undefined || defaultTs == "bun") {
|
||||
return ".deno.ts";
|
||||
} else {
|
||||
return ".ts";
|
||||
|
||||
@@ -27,7 +27,7 @@ export function inferContentTypeFromFilePath(
|
||||
} else if (contentPath.endsWith("deno.ts")) {
|
||||
return "deno";
|
||||
} else if (contentPath.endsWith(".ts")) {
|
||||
return defaultTs ?? "deno";
|
||||
return defaultTs ?? "bun";
|
||||
} else if (contentPath.endsWith(".go")) {
|
||||
return "go";
|
||||
} else if (contentPath.endsWith(".my.sql")) {
|
||||
|
||||
Reference in New Issue
Block a user