mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-08 08:02:27 +00:00
fix: update bun to 1.1.27
This commit is contained in:
+12
@@ -145,6 +145,17 @@ const command = new Command()
|
||||
.command("completions", new CompletionsCommand());
|
||||
|
||||
export let showDiffs = false;
|
||||
|
||||
let isWin: boolean | undefined = undefined;
|
||||
|
||||
export async function getIsWin() {
|
||||
if (isWin === undefined) {
|
||||
const os = await import("node:os");
|
||||
isWin = os.platform() === "win32";
|
||||
}
|
||||
return isWin;
|
||||
}
|
||||
|
||||
async function main() {
|
||||
try {
|
||||
if (Deno.args.length === 0) {
|
||||
@@ -161,6 +172,7 @@ async function main() {
|
||||
handlers: {
|
||||
console: new log.ConsoleHandler(LOG_LEVEL, {
|
||||
formatter: ({ msg }) => `${msg}`,
|
||||
useColors: isWin ? false : true,
|
||||
}),
|
||||
},
|
||||
loggers: {
|
||||
|
||||
+14
-3
@@ -42,6 +42,7 @@ import {
|
||||
import { generateHash, readInlinePathSync } from "./utils.ts";
|
||||
import { SyncCodebase } from "./codebase.ts";
|
||||
import { FlowFile, replaceInlineScripts } from "./flow.ts";
|
||||
import { getIsWin } from "./main.ts";
|
||||
|
||||
export async function generateAllMetadata() {}
|
||||
|
||||
@@ -169,6 +170,12 @@ export async function generateFlowLockInternal(
|
||||
log.info(colors.green(`Flow ${remote_path} lockfiles updated`));
|
||||
}
|
||||
|
||||
// on windows, when using powershell, blue is not readable
|
||||
async function blueColor(): Promise<(x: string) => void> {
|
||||
const isWin = await getIsWin();
|
||||
return isWin ? colors.black : colors.blue;
|
||||
}
|
||||
|
||||
export async function generateScriptMetadataInternal(
|
||||
scriptPath: string,
|
||||
workspace: Workspace,
|
||||
@@ -196,7 +203,7 @@ export async function generateScriptMetadataInternal(
|
||||
);
|
||||
if (rawReqs) {
|
||||
log.info(
|
||||
colors.blue(
|
||||
(await blueColor())(
|
||||
`Found raw requirements (package.json/requirements.txt/composer.json) for ${scriptPath}, using it`
|
||||
)
|
||||
);
|
||||
@@ -786,7 +793,9 @@ export async function parseMetadataFile(
|
||||
} catch {
|
||||
// no metadata file at all. Create it
|
||||
log.info(
|
||||
colors.blue(`Creating script metadata file for ${metadataFilePath}`)
|
||||
(await blueColor())(
|
||||
`Creating script metadata file for ${metadataFilePath}`
|
||||
)
|
||||
);
|
||||
metadataFilePath = scriptPath + ".script.yaml";
|
||||
let scriptInitialMetadata = defaultScriptMetadata();
|
||||
@@ -800,7 +809,9 @@ export async function parseMetadataFile(
|
||||
|
||||
if (generateMetadataIfMissing) {
|
||||
log.info(
|
||||
colors.blue(`Generating lockfile and schema for ${metadataFilePath}`)
|
||||
(await blueColor())(
|
||||
`Generating lockfile and schema for ${metadataFilePath}`
|
||||
)
|
||||
);
|
||||
try {
|
||||
await generateScriptMetadataInternal(
|
||||
|
||||
Reference in New Issue
Block a user