chore: migrate to oxlint and oxfmt

Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
Peter Steinberger
2026-01-14 14:31:43 +00:00
parent 912ebffc63
commit c379191f80
1480 changed files with 28608 additions and 43547 deletions

View File

@@ -53,10 +53,7 @@ async function fetchLogs(
return payload as LogsTailPayload;
}
function formatLogTimestamp(
value?: string,
mode: "pretty" | "plain" = "plain",
) {
function formatLogTimestamp(value?: string, mode: "pretty" | "plain" = "plain") {
if (!value) return "";
const parsed = new Date(value);
if (Number.isNaN(parsed.getTime())) return value;
@@ -74,10 +71,7 @@ function formatLogLine(
const parsed = parseLogLine(raw);
if (!parsed) return raw;
const label = parsed.subsystem ?? parsed.module ?? "";
const time = formatLogTimestamp(
parsed.time,
opts.pretty ? "pretty" : "plain",
);
const time = formatLogTimestamp(parsed.time, opts.pretty ? "pretty" : "plain");
const level = parsed.level ?? "";
const levelLabel = level.padEnd(5).trim();
const message = parsed.message || parsed.raw;
@@ -158,11 +152,7 @@ export function registerLogsCli(program: Command) {
.option("--no-color", "Disable ANSI colors")
.addHelpText(
"after",
() =>
`\n${theme.muted("Docs:")} ${formatDocsLink(
"/logging",
"docs.clawd.bot/logging",
)}\n`,
() => `\n${theme.muted("Docs:")} ${formatDocsLink("/logging", "docs.clawd.bot/logging")}\n`,
);
addGatewayClientOptions(logs);
@@ -216,9 +206,7 @@ export function registerLogsCli(program: Command) {
}
} else {
if (first && payload.file) {
const prefix = pretty
? colorize(rich, theme.muted, "Log file:")
: "Log file:";
const prefix = pretty ? colorize(rich, theme.muted, "Log file:") : "Log file:";
defaultRuntime.log(`${prefix} ${payload.file}`);
}
for (const line of lines) {