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

@@ -1,10 +1,5 @@
import type { HeartbeatRunResult } from "../../infra/heartbeat-wake.js";
import type {
CronJob,
CronJobCreate,
CronJobPatch,
CronStoreFile,
} from "../types.js";
import type { CronJob, CronJobCreate, CronJobPatch, CronStoreFile } from "../types.js";
export type CronEvent = {
jobId: string;
@@ -31,9 +26,7 @@ export type CronServiceDeps = {
cronEnabled: boolean;
enqueueSystemEvent: (text: string, opts?: { agentId?: string }) => void;
requestHeartbeatNow: (opts?: { reason?: string }) => void;
runHeartbeatOnce?: (opts?: {
reason?: string;
}) => Promise<HeartbeatRunResult>;
runHeartbeatOnce?: (opts?: { reason?: string }) => Promise<HeartbeatRunResult>;
runIsolatedAgentJob: (params: { job: CronJob; message: string }) => Promise<{
status: "ok" | "error" | "skipped";
summary?: string;
@@ -55,9 +48,7 @@ export type CronServiceState = {
warnedDisabled: boolean;
};
export function createCronServiceState(
deps: CronServiceDeps,
): CronServiceState {
export function createCronServiceState(deps: CronServiceDeps): CronServiceState {
return {
deps: { ...deps, nowMs: deps.nowMs ?? (() => Date.now()) },
store: null,
@@ -83,9 +74,7 @@ export type CronRunResult =
| { ok: true; ran: false; reason: "not-due" }
| { ok: false };
export type CronRemoveResult =
| { ok: true; removed: boolean }
| { ok: false; removed: false };
export type CronRemoveResult = { ok: true; removed: boolean } | { ok: false; removed: false };
export type CronAddResult = CronJob;
export type CronUpdateResult = CronJob;