← Public packages
@kentcdodds/friction-log
Qualify and file friction papercuts to GitHub (any owner/repo) or wake Patch for Kody packages; daily sweep of kody-hq/kody friction issues.
src/status.ts
20 lines · 463 B · TypeScriptimport { denverDayKey } from './shared.ts'
import {
getSweep,
isEnabled,
listRecentOutcomes,
listRecentSweeps,
} from './storage.ts'
/** Operator snapshot: kill switch, today's sweep, recent outcomes. */
export default async function status() {
const day = denverDayKey()
return {
ok: true,
day,
enabled: await isEnabled(),
today: await getSweep(day),
recentSweeps: await listRecentSweeps(7),
recentOutcomes: await listRecentOutcomes(10),
}
}