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

@@ -14,9 +14,7 @@ export type ScreenRecordPayload = {
};
function asRecord(value: unknown): Record<string, unknown> {
return typeof value === "object" && value !== null
? (value as Record<string, unknown>)
: {};
return typeof value === "object" && value !== null ? (value as Record<string, unknown>) : {};
}
function asString(value: unknown): string | undefined {
@@ -35,26 +33,18 @@ export function parseScreenRecordPayload(value: unknown): ScreenRecordPayload {
base64,
durationMs: typeof obj.durationMs === "number" ? obj.durationMs : undefined,
fps: typeof obj.fps === "number" ? obj.fps : undefined,
screenIndex:
typeof obj.screenIndex === "number" ? obj.screenIndex : undefined,
screenIndex: typeof obj.screenIndex === "number" ? obj.screenIndex : undefined,
hasAudio: typeof obj.hasAudio === "boolean" ? obj.hasAudio : undefined,
};
}
export function screenRecordTempPath(opts: {
ext: string;
tmpDir?: string;
id?: string;
}) {
export function screenRecordTempPath(opts: { ext: string; tmpDir?: string; id?: string }) {
const tmpDir = opts.tmpDir ?? os.tmpdir();
const id = opts.id ?? randomUUID();
const ext = opts.ext.startsWith(".") ? opts.ext : `.${opts.ext}`;
return path.join(tmpDir, `clawdbot-screen-record-${id}${ext}`);
}
export async function writeScreenRecordToFile(
filePath: string,
base64: string,
) {
export async function writeScreenRecordToFile(filePath: string, base64: string) {
return writeBase64ToFile(filePath, base64);
}