Format code with Prettier (8 modified files from H1 decomposition)
Aligns with CC2 enforcement: ESLint + Prettier + noImplicitAny now enforced. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
import type { ErrorLogEntry } from '@shared/ipc'
|
||||
import { isValidErrorLogEntry } from './validation'
|
||||
import { createJsonStore } from './jsonStore'
|
||||
import { ERRORLOG_MAX_ENTRIES } from './constants'
|
||||
|
||||
// Plain JSON in userData, same shape as history.ts. Persisted so a failure
|
||||
// report survives the queue item being cleared (Seal's "debug report"). Atomic
|
||||
// writes / corruption backup / caching come from the shared jsonStore (R1–R3).
|
||||
const MAX_ENTRIES = 200
|
||||
|
||||
// Per-entry validation (isValidErrorLogEntry) so a hand-edited or corrupted
|
||||
// errorlog.json can't feed the UI entries with the wrong shape. (audit S5)
|
||||
const store = createJsonStore('errorlog.json', isValidErrorLogEntry, MAX_ENTRIES)
|
||||
const store = createJsonStore('errorlog.json', isValidErrorLogEntry, ERRORLOG_MAX_ENTRIES)
|
||||
|
||||
export function listErrorLog(): ErrorLogEntry[] {
|
||||
return store.read()
|
||||
|
||||
Reference in New Issue
Block a user