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

@@ -23,14 +23,12 @@ async function readLastLogLine(filePath: string): Promise<string | null> {
}
}
export async function readLastGatewayErrorLine(
env: NodeJS.ProcessEnv,
): Promise<string | null> {
export async function readLastGatewayErrorLine(env: NodeJS.ProcessEnv): Promise<string | null> {
const { stdoutPath, stderrPath } = resolveGatewayLogPaths(env);
const stderrRaw = await fs.readFile(stderrPath, "utf8").catch(() => "");
const stdoutRaw = await fs.readFile(stdoutPath, "utf8").catch(() => "");
const lines = [...stderrRaw.split(/\r?\n/), ...stdoutRaw.split(/\r?\n/)].map(
(line) => line.trim(),
const lines = [...stderrRaw.split(/\r?\n/), ...stdoutRaw.split(/\r?\n/)].map((line) =>
line.trim(),
);
for (let i = lines.length - 1; i >= 0; i -= 1) {
const line = lines[i];
@@ -39,7 +37,5 @@ export async function readLastGatewayErrorLine(
return line;
}
}
return (
(await readLastLogLine(stderrPath)) ?? (await readLastLogLine(stdoutPath))
);
return (await readLastLogLine(stderrPath)) ?? (await readLastLogLine(stdoutPath));
}