mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat: checkpointWhen is required on Durable document definitions
Breaking change: defineDoc and defineDocFamily now require an explicit checkpointWhen predicate; no default is supplied. Set policies on built-in documents, examples, tests, and triage state, and document the required API.
This commit is contained in:
parent
e86b054753
commit
5c1736f82d
39 changed files with 231 additions and 16 deletions
|
|
@ -59,6 +59,7 @@ export type IssueState = {
|
|||
type TriageState = { inboxSince: string; issues: Record<string, IssueState> };
|
||||
|
||||
const StateDoc = defineDoc<TriageState>({
|
||||
checkpointWhen: (_value, _ops, { deltasSinceBase }) => deltasSinceBase >= 64,
|
||||
kind: "triage.state",
|
||||
version: 1,
|
||||
scope: "session",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue