mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-09-14 20:00:29 +08:00
352f2094bd
* feat(registry): add health monitoring * fix(registry): cache health directory route * fix(registry): harden health state transitions
24 lines
595 B
TypeScript
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 }
|