Files
shadcn-ui__ui/apps/v4/lib/registry-health/state.ts
T
shadcn 352f2094bd feat(registry): add health monitoring (#11616)
* feat(registry): add health monitoring

* fix(registry): cache health directory route

* fix(registry): harden health state transitions
2026-08-25 15:49:59 +04:00

24 lines
595 B
TypeScript

import type { RegistryMonitorEntryState } from "./schema"
function createRegistryMonitorEntryState(now: Date) {
return {
firstObservedAt: now.toISOString(),
status: "observing",
consecutiveSuccessfulIndexes: 0,
consecutiveIndexFailures: 0,
availabilityRecoveryRequired: false,
itemCursor: 0,
itemNames: [],
recentIndex: [],
recentDryRuns: [],
daily: [],
latestHygiene: {
contentTypeJson: null,
noDuplicateNames: null,
nameMatches: null,
},
} satisfies RegistryMonitorEntryState
}
export { createRegistryMonitorEntryState }