@demlik/tea 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -9
- package/dist/agent/index.d.ts +638 -45
- package/dist/agent/index.js +9 -19
- package/dist/{chunk-RH5EFRVJ.js → chunk-22POWGFA.js} +31 -5
- package/dist/chunk-22POWGFA.js.map +1 -0
- package/dist/{chunk-DMYGQB4O.js → chunk-3B5X7SBB.js} +23 -6
- package/dist/chunk-3B5X7SBB.js.map +1 -0
- package/dist/chunk-66PY5WYF.js +1816 -0
- package/dist/chunk-66PY5WYF.js.map +1 -0
- package/dist/{chunk-25LBDCBC.js → chunk-6IQPODUF.js} +2 -2
- package/dist/{chunk-25LBDCBC.js.map → chunk-6IQPODUF.js.map} +1 -1
- package/dist/chunk-AYS5N6WY.js +505 -0
- package/dist/chunk-AYS5N6WY.js.map +1 -0
- package/dist/{chunk-EWJP3YYP.js → chunk-HWVW4AXC.js} +3 -3
- package/dist/chunk-HWVW4AXC.js.map +1 -0
- package/dist/{chunk-O4MVQTEJ.js → chunk-L3TND7LA.js} +20 -16
- package/dist/chunk-L3TND7LA.js.map +1 -0
- package/dist/{chunk-J6527VRQ.js → chunk-LFZUK6J2.js} +3 -3
- package/dist/chunk-LFZUK6J2.js.map +1 -0
- package/dist/{chunk-D736QUGF.js → chunk-MYXFNWAJ.js} +4 -5
- package/dist/chunk-MYXFNWAJ.js.map +1 -0
- package/dist/{chunk-K575PT4S.js → chunk-PR6TB3BL.js} +15 -4
- package/dist/chunk-PR6TB3BL.js.map +1 -0
- package/dist/{chunk-YUXP55T2.js → chunk-Q5CQTBFA.js} +57 -7
- package/dist/chunk-Q5CQTBFA.js.map +1 -0
- package/dist/{batch-window/index.js → chunk-QPEVCJ5Q.js} +4 -8
- package/dist/chunk-QPEVCJ5Q.js.map +1 -0
- package/dist/chunk-TCLBCERH.js +1480 -0
- package/dist/chunk-TCLBCERH.js.map +1 -0
- package/dist/{chunk-FV3Z5MBE.js → chunk-TXN2KFHF.js} +14 -4
- package/dist/chunk-TXN2KFHF.js.map +1 -0
- package/dist/{chunk-MUUROGIH.js → chunk-V46HSVCK.js} +62 -12
- package/dist/chunk-V46HSVCK.js.map +1 -0
- package/dist/{chunk-Q2UM7BXU.js → chunk-VBDU4JL6.js} +2 -2
- package/dist/chunk-VBDU4JL6.js.map +1 -0
- package/dist/{chunk-ZVJZ72HY.js → chunk-VTQI2NHP.js} +25 -11
- package/dist/chunk-VTQI2NHP.js.map +1 -0
- package/dist/{core-Co0LWkIA.d.ts → core-DnzqWy6u.d.ts} +72 -23
- package/dist/devtools/index.d.ts +2 -2
- package/dist/devtools/index.js +207 -2
- package/dist/devtools/index.js.map +1 -1
- package/dist/do/index.d.ts +43 -29
- package/dist/do/index.js +36 -25
- package/dist/do/index.js.map +1 -1
- package/dist/{durable-effects-C6uwzjb5.d.ts → durable-effects-CWzA-o2B.d.ts} +2 -2
- package/dist/extension/index.d.ts +300 -3
- package/dist/extension/index.js +596 -5
- package/dist/extension/index.js.map +1 -1
- package/dist/flow/index.d.ts +1284 -0
- package/dist/flow/index.js +732 -0
- package/dist/flow/index.js.map +1 -0
- package/dist/idempotency/index.d.ts +90 -116
- package/dist/idempotency/index.js +4 -1
- package/dist/index-Bc40JWVl.d.ts +131 -0
- package/dist/{batch-window/index.d.ts → index-C2DwkjlP.d.ts} +7 -12
- package/dist/index-CA_7I5g9.d.ts +806 -0
- package/dist/index-CSyMYDAB.d.ts +69 -0
- package/dist/{fan-out/index.d.ts → index-CuNO9m8i.d.ts} +7 -9
- package/dist/{debounce/index.d.ts → index-DHSUmQTR.d.ts} +7 -7
- package/dist/{recorder/index.d.ts → index-DrIRb_Ch.d.ts} +4 -7
- package/dist/index-HSYgG2Yt.d.ts +380 -0
- package/dist/{monitored-run/index.d.ts → index-KXqTRJyb.d.ts} +37 -13
- package/dist/{snapshot/index.d.ts → index-ZCMhnVKN.d.ts} +15 -78
- package/dist/index.d.ts +771 -6
- package/dist/index.js +1 -2
- package/dist/jev/index.d.ts +646 -0
- package/dist/jev/index.js +485 -0
- package/dist/jev/index.js.map +1 -0
- package/dist/machine-DGlPWCWI.d.ts +1781 -0
- package/dist/machine-viz/index.d.ts +1 -1
- package/dist/machine-viz/index.js +12 -5
- package/dist/machine-viz/index.js.map +1 -1
- package/dist/mem/index.d.ts +18 -3
- package/dist/mem/index.js +22 -2
- package/dist/mem/index.js.map +1 -1
- package/dist/node/index.d.ts +104 -6
- package/dist/node/index.js +132 -9
- package/dist/node/index.js.map +1 -1
- package/dist/{paginator → paginate}/index.d.ts +140 -6
- package/dist/paginate/index.js +7 -0
- package/dist/parity/index.d.ts +4 -10
- package/dist/parity/index.js +4 -7
- package/dist/parity/index.js.map +1 -1
- package/dist/pbt/index.d.ts +247 -5
- package/dist/pbt/index.js +124 -5
- package/dist/pbt/index.js.map +1 -1
- package/dist/{trace-replay → persistence}/index.d.ts +7 -5
- package/dist/persistence/index.js +6 -0
- package/dist/{protocol-B5YmJr0d.d.ts → protocol-D8VbH-VH.d.ts} +10 -1
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +1 -2
- package/dist/react/index.js.map +1 -1
- package/dist/resilience/index.d.ts +744 -0
- package/dist/resilience/index.js +657 -0
- package/dist/resilience/index.js.map +1 -0
- package/dist/retry-backoff/index.d.ts +3 -2
- package/dist/retry-backoff/index.js +1 -1
- package/dist/runtime-types-CMF13BBh.d.ts +998 -0
- package/dist/testing/index.d.ts +147 -3
- package/dist/testing/index.js +95 -3
- package/dist/testing/index.js.map +1 -1
- package/dist/{throttled-input → timing}/index.d.ts +143 -12
- package/dist/{throttled-input → timing}/index.js +57 -12
- package/dist/timing/index.js.map +1 -0
- package/dist/{types-XS_miRnB.d.ts → types-BseNPIhr.d.ts} +1 -1
- package/dist/work-queue/index.d.ts +130 -54
- package/dist/work-queue/index.js +3 -2
- package/dist/work-queue/index.js.map +1 -1
- package/package.json +45 -218
- package/dist/authed-call/index.d.ts +0 -120
- package/dist/authed-call/index.js +0 -134
- package/dist/authed-call/index.js.map +0 -1
- package/dist/await-terminal/index.d.ts +0 -101
- package/dist/await-terminal/index.js +0 -76
- package/dist/await-terminal/index.js.map +0 -1
- package/dist/batch-window/index.js.map +0 -1
- package/dist/cache/index.d.ts +0 -152
- package/dist/cache/index.js +0 -8
- package/dist/chart/index.d.ts +0 -218
- package/dist/chart/index.js +0 -16
- package/dist/chart/index.js.map +0 -1
- package/dist/chart/inspect/index.d.ts +0 -86
- package/dist/chart/inspect/index.js +0 -5
- package/dist/chart/inspect/react.d.ts +0 -113
- package/dist/chart/inspect/react.js +0 -11
- package/dist/chart/inspect/react.js.map +0 -1
- package/dist/chart/inspect/styles.css +0 -286
- package/dist/chart/lane/index.d.ts +0 -362
- package/dist/chart/lane/index.js +0 -9
- package/dist/chart/lane/index.js.map +0 -1
- package/dist/chart/lane/react.d.ts +0 -84
- package/dist/chart/lane/react.js +0 -559
- package/dist/chart/lane/react.js.map +0 -1
- package/dist/chart/lane/server.d.ts +0 -148
- package/dist/chart/lane/server.js +0 -209
- package/dist/chart/lane/server.js.map +0 -1
- package/dist/chart/lane/styles.css +0 -498
- package/dist/chart/lane/viewer/assets/abnfDiagram-N423BO3Z-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/architectureDiagram-T3A2C74G-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/blockDiagram-VBNYF7ZC-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/c4Diagram-5PPSVZJV-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/chunk-2GRJ4B5K-HdDf8SI3.js +0 -1
- package/dist/chart/lane/viewer/assets/chunk-5RXB4S5H-CcNtpUd7.js +0 -231
- package/dist/chart/lane/viewer/assets/chunk-5VM5RSS4-BP4fRS_5.js +0 -15
- package/dist/chart/lane/viewer/assets/chunk-KBJHAD2P-DZOw7xU6.js +0 -1
- package/dist/chart/lane/viewer/assets/chunk-NSK5VX7P-CBCyTZMs.js +0 -128
- package/dist/chart/lane/viewer/assets/classDiagram-JCYQIIEL-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/classDiagram-v2-OCEON4UE-D4uAiFr8.js +0 -206
- package/dist/chart/lane/viewer/assets/cose-bilkent-JH36ORCC-DOwCrGXH.js +0 -1
- package/dist/chart/lane/viewer/assets/cynefinDiagram-MW4NZA55-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/dagre-K_PewWfS.js +0 -1
- package/dist/chart/lane/viewer/assets/dagre-VZM6K2ZE-831qZcA8.js +0 -4
- package/dist/chart/lane/viewer/assets/diagram-7IWD3JNH-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/diagram-B4RE2ZJO-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/diagram-LBJQPF4R-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/diagram-Q27KOJAE-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/diagram-UB23O5K3-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/ebnfDiagram-BXEA7PRR-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/erDiagram-JOGREHBK-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/flowDiagram-UKHOOZJN-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/ganttDiagram-PKOTCBZU-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/gitGraphDiagram-DS77QQ5N-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/index-9SkH5NA3.css +0 -1
- package/dist/chart/lane/viewer/assets/index-Bgt4sXpW.js +0 -195
- package/dist/chart/lane/viewer/assets/infoDiagram-6WML65LV-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/ishikawaDiagram-WSZJBQD7-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/journeyDiagram-NVQOT4AX-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/kanban-definition-27J2QSJJ-G7PaPzy-.js +0 -89
- package/dist/chart/lane/viewer/assets/katex-DOwCrGXH.js +0 -1
- package/dist/chart/lane/viewer/assets/mindmap-definition-FAOFIHXS-CGj9nrVk.js +0 -96
- package/dist/chart/lane/viewer/assets/path-fybaL0A-.js +0 -1
- package/dist/chart/lane/viewer/assets/pegDiagram-VL7TDLO6-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/pieDiagram-7S7Q4E2Y-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/quadrantDiagram-CIZ2JOQS-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/railroadDiagram-AXF67PYL-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/requirementDiagram-LRYGKXZP-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/sankeyDiagram-W5VNT64P-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/sequenceDiagram-SI44F4Z6-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/stateDiagram-OKZ733FA-B_88AzBS.js +0 -1
- package/dist/chart/lane/viewer/assets/stateDiagram-v2-UEYNNEHI-CR5gcgq6.js +0 -1
- package/dist/chart/lane/viewer/assets/swimlanes-SLNWSIFB-B4xK-rwg.js +0 -1
- package/dist/chart/lane/viewer/assets/swimlanesDiagram-ULZ7WXOC-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/timeline-definition-Z64GVDOM-CCv52MfY.js +0 -120
- package/dist/chart/lane/viewer/assets/vennDiagram-T6HMQDX7-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/wardleyDiagram-T6FBY63Y-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/assets/xychartDiagram-ELKLHX3M-C729LI31.js +0 -1
- package/dist/chart/lane/viewer/index.html +0 -15
- package/dist/chart/report/index.d.ts +0 -117
- package/dist/chart/report/index.js +0 -32
- package/dist/chart/report/index.js.map +0 -1
- package/dist/chunk-2YFLOCWX.js +0 -15
- package/dist/chunk-2YFLOCWX.js.map +0 -1
- package/dist/chunk-3I52QZZ5.js +0 -519
- package/dist/chunk-3I52QZZ5.js.map +0 -1
- package/dist/chunk-3ZAFFRRB.js +0 -457
- package/dist/chunk-3ZAFFRRB.js.map +0 -1
- package/dist/chunk-4EQZ76JC.js +0 -33
- package/dist/chunk-4EQZ76JC.js.map +0 -1
- package/dist/chunk-4KLG43GY.js +0 -223
- package/dist/chunk-4KLG43GY.js.map +0 -1
- package/dist/chunk-7FRZ2CT2.js +0 -424
- package/dist/chunk-7FRZ2CT2.js.map +0 -1
- package/dist/chunk-AZZLE7XR.js +0 -62
- package/dist/chunk-AZZLE7XR.js.map +0 -1
- package/dist/chunk-BYQUGDD3.js +0 -16
- package/dist/chunk-BYQUGDD3.js.map +0 -1
- package/dist/chunk-CIQG5L42.js +0 -685
- package/dist/chunk-CIQG5L42.js.map +0 -1
- package/dist/chunk-CLM6ERNO.js +0 -61
- package/dist/chunk-CLM6ERNO.js.map +0 -1
- package/dist/chunk-COS5MSTO.js +0 -88
- package/dist/chunk-COS5MSTO.js.map +0 -1
- package/dist/chunk-CRPZJVD2.js +0 -71
- package/dist/chunk-CRPZJVD2.js.map +0 -1
- package/dist/chunk-D62FDQKE.js +0 -53
- package/dist/chunk-D62FDQKE.js.map +0 -1
- package/dist/chunk-D736QUGF.js.map +0 -1
- package/dist/chunk-DGE4PV4A.js +0 -26
- package/dist/chunk-DGE4PV4A.js.map +0 -1
- package/dist/chunk-DMYGQB4O.js.map +0 -1
- package/dist/chunk-EWJP3YYP.js.map +0 -1
- package/dist/chunk-FV3Z5MBE.js.map +0 -1
- package/dist/chunk-HCEVHFJ7.js +0 -54
- package/dist/chunk-HCEVHFJ7.js.map +0 -1
- package/dist/chunk-J6527VRQ.js.map +0 -1
- package/dist/chunk-JELSZN25.js +0 -47
- package/dist/chunk-JELSZN25.js.map +0 -1
- package/dist/chunk-K575PT4S.js.map +0 -1
- package/dist/chunk-L57ZOT5K.js +0 -184
- package/dist/chunk-L57ZOT5K.js.map +0 -1
- package/dist/chunk-MU6MCIAC.js +0 -15
- package/dist/chunk-MU6MCIAC.js.map +0 -1
- package/dist/chunk-MUUROGIH.js.map +0 -1
- package/dist/chunk-NR7BU22N.js +0 -758
- package/dist/chunk-NR7BU22N.js.map +0 -1
- package/dist/chunk-O4MVQTEJ.js.map +0 -1
- package/dist/chunk-OOYD44JI.js +0 -317
- package/dist/chunk-OOYD44JI.js.map +0 -1
- package/dist/chunk-Q2UM7BXU.js.map +0 -1
- package/dist/chunk-RH5EFRVJ.js.map +0 -1
- package/dist/chunk-S2EGRPCM.js +0 -47
- package/dist/chunk-S2EGRPCM.js.map +0 -1
- package/dist/chunk-SINXE47Y.js +0 -55
- package/dist/chunk-SINXE47Y.js.map +0 -1
- package/dist/chunk-UF4MZSLT.js +0 -53
- package/dist/chunk-UF4MZSLT.js.map +0 -1
- package/dist/chunk-UOC2PL46.js +0 -13
- package/dist/chunk-UOC2PL46.js.map +0 -1
- package/dist/chunk-VYFAZN3F.js +0 -372
- package/dist/chunk-VYFAZN3F.js.map +0 -1
- package/dist/chunk-WRAA7GVZ.js +0 -209
- package/dist/chunk-WRAA7GVZ.js.map +0 -1
- package/dist/chunk-XGELA764.js +0 -163
- package/dist/chunk-XGELA764.js.map +0 -1
- package/dist/chunk-YUXP55T2.js.map +0 -1
- package/dist/chunk-YWIKDKHY.js +0 -307
- package/dist/chunk-YWIKDKHY.js.map +0 -1
- package/dist/chunk-ZJ5AOYBH.js +0 -8
- package/dist/chunk-ZJ5AOYBH.js.map +0 -1
- package/dist/chunk-ZSUUOEPL.js +0 -731
- package/dist/chunk-ZSUUOEPL.js.map +0 -1
- package/dist/chunk-ZVJZ72HY.js.map +0 -1
- package/dist/circuit-breaker/index.d.ts +0 -197
- package/dist/circuit-breaker/index.js +0 -3
- package/dist/circuit-breaker/index.js.map +0 -1
- package/dist/deadline/index.d.ts +0 -199
- package/dist/deadline/index.js +0 -6
- package/dist/deadline/index.js.map +0 -1
- package/dist/debounce/index.js +0 -3
- package/dist/debounce/index.js.map +0 -1
- package/dist/extension/react.d.ts +0 -121
- package/dist/extension/react.js +0 -75
- package/dist/extension/react.js.map +0 -1
- package/dist/extension/subs/index.d.ts +0 -45
- package/dist/extension/subs/index.js +0 -80
- package/dist/extension/subs/index.js.map +0 -1
- package/dist/extension/test-utils.d.ts +0 -128
- package/dist/extension/test-utils.js +0 -277
- package/dist/extension/test-utils.js.map +0 -1
- package/dist/fan-out/index.js +0 -5
- package/dist/fan-out/index.js.map +0 -1
- package/dist/fold-BJPdjc9w.d.ts +0 -435
- package/dist/graph-B3L5e0N1.d.ts +0 -923
- package/dist/idempotency/adapter.d.ts +0 -62
- package/dist/idempotency/adapter.js +0 -4
- package/dist/idempotency/adapter.js.map +0 -1
- package/dist/idempotent-intake/index.d.ts +0 -188
- package/dist/idempotent-intake/index.js +0 -7
- package/dist/idempotent-intake/index.js.map +0 -1
- package/dist/journal/index.d.ts +0 -373
- package/dist/journal/index.js +0 -3
- package/dist/journal/index.js.map +0 -1
- package/dist/llm-call/index.d.ts +0 -311
- package/dist/llm-call/index.js +0 -16
- package/dist/llm-call/index.js.map +0 -1
- package/dist/machine-BtFWQmmq.d.ts +0 -804
- package/dist/monitored-run/index.js +0 -10
- package/dist/monitored-run/index.js.map +0 -1
- package/dist/paginated-walk/index.d.ts +0 -235
- package/dist/paginated-walk/index.js +0 -16
- package/dist/paginated-walk/index.js.map +0 -1
- package/dist/paginator/index.js +0 -3
- package/dist/paginator/index.js.map +0 -1
- package/dist/pbt/arbitraries/index.d.ts +0 -136
- package/dist/pbt/arbitraries/index.js +0 -3
- package/dist/pbt/arbitraries/index.js.map +0 -1
- package/dist/pbt/runners/index.d.ts +0 -118
- package/dist/pbt/runners/index.js +0 -5
- package/dist/pbt/runners/index.js.map +0 -1
- package/dist/poller/index.d.ts +0 -352
- package/dist/poller/index.js +0 -115
- package/dist/poller/index.js.map +0 -1
- package/dist/prediction/index.d.ts +0 -131
- package/dist/prediction/index.js +0 -4
- package/dist/prediction/index.js.map +0 -1
- package/dist/pure/index.d.ts +0 -3
- package/dist/pure/index.js +0 -4
- package/dist/pure/index.js.map +0 -1
- package/dist/rate-limit/index.d.ts +0 -115
- package/dist/rate-limit/index.js +0 -3
- package/dist/rate-limit/index.js.map +0 -1
- package/dist/reconciler/index.d.ts +0 -193
- package/dist/reconciler/index.js +0 -164
- package/dist/reconciler/index.js.map +0 -1
- package/dist/recorder/index.js +0 -3
- package/dist/recorder/index.js.map +0 -1
- package/dist/reducer-4GNR6b8B.d.ts +0 -447
- package/dist/resilient-call/index.d.ts +0 -320
- package/dist/resilient-call/index.js +0 -14
- package/dist/resilient-call/index.js.map +0 -1
- package/dist/retry-to-success/index.d.ts +0 -109
- package/dist/retry-to-success/index.js +0 -37
- package/dist/retry-to-success/index.js.map +0 -1
- package/dist/run-pAcmBpah.d.ts +0 -713
- package/dist/runtime-types-CNLmhWif.d.ts +0 -517
- package/dist/saga/index.d.ts +0 -241
- package/dist/saga/index.js +0 -150
- package/dist/saga/index.js.map +0 -1
- package/dist/samples-B3My5oh2.d.ts +0 -59
- package/dist/snapshot/index.js +0 -5
- package/dist/snapshot/index.js.map +0 -1
- package/dist/subs/index.d.ts +0 -472
- package/dist/subs/index.js +0 -7
- package/dist/subs/index.js.map +0 -1
- package/dist/throttle/index.d.ts +0 -134
- package/dist/throttle/index.js +0 -3
- package/dist/throttle/index.js.map +0 -1
- package/dist/throttled-input/index.js.map +0 -1
- package/dist/token-refresh/index.d.ts +0 -216
- package/dist/token-refresh/index.js +0 -6
- package/dist/token-refresh/index.js.map +0 -1
- package/dist/trace-replay/index.js +0 -6
- package/dist/trace-replay/index.js.map +0 -1
- package/dist/with-deadline/index.d.ts +0 -197
- package/dist/with-deadline/index.js +0 -111
- package/dist/with-deadline/index.js.map +0 -1
- package/dist/with-resilience/index.d.ts +0 -225
- package/dist/with-resilience/index.js +0 -240
- package/dist/with-resilience/index.js.map +0 -1
- package/dist/with-telemetry/index.d.ts +0 -150
- package/dist/with-telemetry/index.js +0 -70
- package/dist/with-telemetry/index.js.map +0 -1
- package/dist/work-queue/adapter.d.ts +0 -84
- package/dist/work-queue/adapter.js +0 -4
- package/dist/work-queue/adapter.js.map +0 -1
- package/dist/work-queue/ops.d.ts +0 -71
- package/dist/work-queue/ops.js +0 -3
- package/dist/work-queue/ops.js.map +0 -1
- package/dist/workflow/index.d.ts +0 -485
- package/dist/workflow/index.js +0 -244
- package/dist/workflow/index.js.map +0 -1
- /package/dist/{cache → paginate}/index.js.map +0 -0
- /package/dist/{chart/inspect → persistence}/index.js.map +0 -0
|
@@ -1,131 +1,105 @@
|
|
|
1
|
+
import { I as IdempotencyStore } from '../index-Bc40JWVl.js';
|
|
2
|
+
export { a as IdempotencyEntry, e as evictExpired, i as initStore, r as recall, b as remember, s as seen } from '../index-Bc40JWVl.js';
|
|
3
|
+
import { a as CmdOf, b as CmdDef } from '../core-DnzqWy6u.js';
|
|
4
|
+
import { Q as QueueItem } from '../index-CSyMYDAB.js';
|
|
5
|
+
import 'zod';
|
|
6
|
+
import '../runtime-types-CMF13BBh.js';
|
|
7
|
+
import 'better-result';
|
|
8
|
+
|
|
1
9
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* no `Date.now()`, no timers, no I/O. The caller injects the clock (`nowMs`)
|
|
7
|
-
* and wires the result into its own reducer / interpret. This keeps the store
|
|
8
|
-
* inside TEA's invariant 2 (transitions are pure: same inputs → same outputs,
|
|
9
|
-
* no `Date.now`) so a consumer can fold it through `update` and exercise it
|
|
10
|
-
* with `replay` / the pbt fold without a fake clock.
|
|
11
|
-
*
|
|
12
|
-
* Every op returns a NEW store value and never mutates its input (invariant 1 —
|
|
13
|
-
* state is a value, not a place). `seen` / `recall` are read-shaped predicates;
|
|
14
|
-
* `remember` / `evictExpired` return a new store.
|
|
15
|
-
*
|
|
16
|
-
* The use case: a webhook receiver, a retried queue message, or a repeated user
|
|
17
|
-
* action arrives carrying an idempotency key. `seen(store, key, now)` answers
|
|
18
|
-
* "did I already process this?"; `recall(store, key, now)` returns the cached
|
|
19
|
-
* result so the duplicate request gets the SAME response the original produced
|
|
20
|
-
* rather than re-running the side effect. `remember(store, key, value, now)`
|
|
21
|
-
* records the key + its result after the first run.
|
|
22
|
-
*
|
|
23
|
-
* Two eviction policies keep the store bounded, both injected at `initStore`:
|
|
10
|
+
* A cached intake entry: either a key whose work is still in flight
|
|
11
|
+
* (`pending`) or one whose work has finished and whose `result` is held for
|
|
12
|
+
* replay to later duplicates (`done`). Discriminated on `phase` — `pending`
|
|
13
|
+
* carries no payload, `done` carries the result `R`.
|
|
24
14
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* (and every `remember`) physically drops it. Without a TTL, entries live
|
|
28
|
-
* until evicted by capacity. The cutoff is half-open: an entry exactly
|
|
29
|
-
* `ttlMs` old is expired (`age >= ttlMs` drops it), matching `rate-limit`'s
|
|
30
|
-
* window edge — a key remembered at `t` no longer counts at `t + ttlMs`.
|
|
31
|
-
* - **`capacity`** — at most `capacity` entries are retained. When a
|
|
32
|
-
* `remember` would push the count past `capacity` (after expiry eviction),
|
|
33
|
-
* the OLDEST entries by insertion `order` are dropped until the count fits.
|
|
34
|
-
* Without a capacity, the store grows unbounded (TTL alone bounds it).
|
|
35
|
-
*
|
|
36
|
-
* `order` is the insertion-order index that capacity eviction reads — the keys
|
|
37
|
-
* oldest-first. It is the store's own LRU-by-insertion ledger, kept in lockstep
|
|
38
|
-
* with `entries` so `entries` never needs to be sorted to find the oldest.
|
|
39
|
-
*
|
|
40
|
-
* **Overwrite semantics** (decided + pinned by tests): re-`remember`ing an
|
|
41
|
-
* existing key is an UPDATE, not a no-op. It (1) overwrites `value`, (2)
|
|
42
|
-
* refreshes `atMs` to the new `nowMs` — so the TTL clock restarts and a
|
|
43
|
-
* frequently-seen key never expires — and (3) moves the key to the NEWEST
|
|
44
|
-
* position in `order` — so capacity eviction treats a re-remembered key as
|
|
45
|
-
* fresh, not as a stale candidate for eviction. This makes `remember` behave
|
|
46
|
-
* like "touch": a key actively being re-seen is kept alive on both the TTL and
|
|
47
|
-
* capacity axes.
|
|
48
|
-
*
|
|
49
|
-
* NOT exported from the package root — reached via the `@demlik/tea/idempotency`
|
|
50
|
-
* subpath, same one-shape-per-package rule as `work-queue`, `rate-limit`, and
|
|
51
|
-
* `do`.
|
|
15
|
+
* Lives inside the `seen` half of the slice (`IdempotencyStore<IntakeEntry<R>>`).
|
|
16
|
+
* It is the dedupe ledger's *value*; the ledger's *key* is `keyOf(payload)`.
|
|
52
17
|
*/
|
|
18
|
+
type IntakeEntry<R> = {
|
|
19
|
+
readonly phase: "pending";
|
|
20
|
+
} | {
|
|
21
|
+
readonly phase: "done";
|
|
22
|
+
readonly result: R;
|
|
23
|
+
};
|
|
53
24
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
*
|
|
66
|
-
*
|
|
25
|
+
* The intake knob's config — `keyOf` derives the idempotency key from a
|
|
26
|
+
* payload, `ttlMs` (optional) ages a *completed* cached key out so a webhook
|
|
27
|
+
* replayed long after the work finished is treated as new and re-processed.
|
|
28
|
+
*
|
|
29
|
+
* **The TTL clock starts at `complete`, not at `receive`.** A `pending` entry
|
|
30
|
+
* (work still in flight) NEVER ages out, no matter how slow the worker is —
|
|
31
|
+
* ageing a pending key would let the duplicate re-enqueue the in-flight
|
|
32
|
+
* payload and double-process it. Only a `done` entry expires, measured from
|
|
33
|
+
* the `at` passed to `complete` (the moment the result was cached). Inside the
|
|
34
|
+
* window a duplicate replays the cached result; at/after the window it is
|
|
35
|
+
* re-accepted and re-processed.
|
|
36
|
+
*
|
|
37
|
+
* Omit `ttlMs` for a cache whose `done` entries never expire by age (keys live
|
|
38
|
+
* forever — fine for a bounded universe of ids, unbounded growth otherwise).
|
|
67
39
|
*
|
|
68
|
-
*
|
|
69
|
-
* entry
|
|
70
|
-
*
|
|
71
|
-
*
|
|
40
|
+
* The TTL is owned HERE, not delegated to the composed `IdempotencyStore`: the
|
|
41
|
+
* store's uniform per-entry TTL cannot tell `pending` from `done`, so intake
|
|
42
|
+
* keeps the store TTL-free and applies the phase-aware rule itself (see
|
|
43
|
+
* `liveEntry`).
|
|
72
44
|
*/
|
|
73
|
-
interface
|
|
74
|
-
|
|
75
|
-
readonly
|
|
76
|
-
|
|
45
|
+
interface IntakeConfig<P> {
|
|
46
|
+
/** Derive the idempotency key from a payload. Must be pure + deterministic. */
|
|
47
|
+
readonly keyOf: (payload: P) => string;
|
|
48
|
+
/**
|
|
49
|
+
* Age a *completed* key out after this many ms, measured from the `at`
|
|
50
|
+
* passed to `complete`. Pending keys never age out.
|
|
51
|
+
*/
|
|
77
52
|
readonly ttlMs?: number;
|
|
78
53
|
}
|
|
79
54
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*/
|
|
85
|
-
declare function initStore<V>(opts?: {
|
|
86
|
-
capacity?: number;
|
|
87
|
-
ttlMs?: number;
|
|
88
|
-
}): IdempotencyStore<V>;
|
|
89
|
-
/**
|
|
90
|
-
* True iff `key` is present AND not expired at `nowMs`. This is the dedupe
|
|
91
|
-
* predicate: a webhook / retried message / repeated action whose key returns
|
|
92
|
-
* `true` has already been processed and should be short-circuited (paired with
|
|
93
|
-
* `recall` to return the original result). PURE — reads only, never mutates.
|
|
55
|
+
* The Model slice this knob owns. `seen` is the dedupe + last-result cache
|
|
56
|
+
* (the `../idempotency` brick); `queue` is the pending-work list (the
|
|
57
|
+
* `../work-queue` brick). Both are plain serializable values — the whole slice
|
|
58
|
+
* round-trips through `JSON` so it survives eviction and replays exactly.
|
|
94
59
|
*/
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
60
|
+
interface IntakeState<P, R> {
|
|
61
|
+
readonly seen: IdempotencyStore<IntakeEntry<R>>;
|
|
62
|
+
readonly queue: readonly QueueItem<P>[];
|
|
63
|
+
}
|
|
64
|
+
/** A genuinely-new payload was accepted and enqueued — go run the work. */
|
|
65
|
+
declare function intakeProcessDef<P>(): CmdDef<"intake:process", {
|
|
66
|
+
/** The dedupe key the payload was filed under. */
|
|
67
|
+
readonly key: string;
|
|
68
|
+
/** The enqueued queue-item id (the same `id` passed to `receive`). */
|
|
69
|
+
readonly itemId: string;
|
|
70
|
+
/** The original payload, for the worker to process. */
|
|
71
|
+
readonly payload: P;
|
|
72
|
+
}, void, never, unknown>;
|
|
73
|
+
type IntakeProcessCmd<P> = CmdOf<ReturnType<typeof intakeProcessDef<P>>>;
|
|
104
74
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
* relative insertion order of the survivors. A no-TTL store returns an
|
|
108
|
-
* equivalent store (nothing ages out). PURE — the input store is never mutated.
|
|
75
|
+
* A duplicate of an already-completed key arrived — replay the cached result
|
|
76
|
+
* to the caller instead of re-running the side effect.
|
|
109
77
|
*/
|
|
110
|
-
declare function
|
|
78
|
+
declare function intakeReplayDef<R>(): CmdDef<"intake:replay", {
|
|
79
|
+
/** The dedupe key whose cached result is being replayed. */
|
|
80
|
+
readonly key: string;
|
|
81
|
+
/** The result the ORIGINAL request produced, recalled from the cache. */
|
|
82
|
+
readonly result: R;
|
|
83
|
+
}, void, never, unknown>;
|
|
84
|
+
type IntakeReplayCmd<R> = CmdOf<ReturnType<typeof intakeReplayDef<R>>>;
|
|
85
|
+
/** The Cmd union the intake verbs emit. */
|
|
86
|
+
type IntakeCmd<P, R> = IntakeProcessCmd<P> | IntakeReplayCmd<R>;
|
|
111
87
|
/**
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* expired key never occupies a capacity slot the new entry could take, and
|
|
118
|
-
* a stale entry under the same `key` is cleared before the overwrite.
|
|
119
|
-
* 2. **Insert / overwrite** — write the new entry. If `key` already exists,
|
|
120
|
-
* this is an UPDATE: `value` is overwritten, `atMs` is refreshed to
|
|
121
|
-
* `nowMs` (restarting the TTL clock), and the key is moved to the NEWEST
|
|
122
|
-
* position in `order` (removed from wherever it sat, appended at the end).
|
|
123
|
-
* See the module-level "Overwrite semantics" note.
|
|
124
|
-
* 3. **Capacity eviction** — if the entry count now exceeds `capacity`, drop
|
|
125
|
-
* the OLDEST keys by `order` until the count fits. Because step 2 moves a
|
|
126
|
-
* re-remembered key to the newest position, an actively re-seen key is
|
|
127
|
-
* never the eviction victim.
|
|
88
|
+
* Build an idempotent-intake knob from `config`. Returns the uniform L2
|
|
89
|
+
* contract — `init()` + the verbs (`receive`, `complete`, `boot`, `claimNext`).
|
|
90
|
+
* No `subs` / `handlers`: intake owns no timers and does no I/O of its own (the
|
|
91
|
+
* composed bricks are pure-ops; the worker that runs `IntakeProcess` and the
|
|
92
|
+
* responder that runs `IntakeReplay` live in the host's interpret map).
|
|
128
93
|
*/
|
|
129
|
-
declare function
|
|
94
|
+
declare function createIntake<P, R>(config: IntakeConfig<P>): {
|
|
95
|
+
init: () => IntakeState<P, R>;
|
|
96
|
+
receive: (state: IntakeState<P, R>, payload: P, at: number, id: string) => readonly [IntakeState<P, R>, readonly IntakeCmd<P, R>[]];
|
|
97
|
+
complete: (state: IntakeState<P, R>, key: string, result: R, at: number) => readonly [IntakeState<P, R>, readonly IntakeCmd<P, R>[]];
|
|
98
|
+
boot: (state: IntakeState<P, R>) => readonly [IntakeState<P, R>, readonly IntakeCmd<P, R>[]];
|
|
99
|
+
claimNext: (state: IntakeState<P, R>, at: number) => {
|
|
100
|
+
readonly state: IntakeState<P, R>;
|
|
101
|
+
readonly claimed: QueueItem<P>;
|
|
102
|
+
} | null;
|
|
103
|
+
};
|
|
130
104
|
|
|
131
|
-
export { type
|
|
105
|
+
export { IdempotencyStore, type IntakeCmd, type IntakeConfig, type IntakeEntry, type IntakeProcessCmd, type IntakeReplayCmd, type IntakeState, createIntake, intakeProcessDef, intakeReplayDef };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { createIntake, intakeProcessDef, intakeReplayDef } from '../chunk-VTQI2NHP.js';
|
|
2
|
+
export { evictExpired, initStore, recall, remember, seen } from '../chunk-PR6TB3BL.js';
|
|
3
|
+
import '../chunk-TXN2KFHF.js';
|
|
4
|
+
import '../chunk-66PY5WYF.js';
|
|
2
5
|
//# sourceMappingURL=index.js.map
|
|
3
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* internal/idempotency/idempotency — dedupe-by-key + last-result cache as pure state + ops.
|
|
3
|
+
*
|
|
4
|
+
* Same shape as `../../work-queue`'s `ops.ts` and `../../resilience/rate-limit`:
|
|
5
|
+
* a state type plus pure transition functions. Host-agnostic by construction —
|
|
6
|
+
* no `Date.now()`, no timers, no I/O. The caller injects the clock (`nowMs`)
|
|
7
|
+
* and wires the result into its own reducer / interpret. This keeps the store
|
|
8
|
+
* inside TEA's invariant 2 (transitions are pure: same inputs → same outputs,
|
|
9
|
+
* no `Date.now`) so a consumer can fold it through `update` and exercise it
|
|
10
|
+
* with `replay` / the pbt fold without a fake clock.
|
|
11
|
+
*
|
|
12
|
+
* Every op returns a NEW store value and never mutates its input (invariant 1 —
|
|
13
|
+
* state is a value, not a place). `seen` / `recall` are read-shaped predicates;
|
|
14
|
+
* `remember` / `evictExpired` return a new store.
|
|
15
|
+
*
|
|
16
|
+
* The use case: a webhook receiver, a retried queue message, or a repeated user
|
|
17
|
+
* action arrives carrying an idempotency key. `seen(store, key, now)` answers
|
|
18
|
+
* "did I already process this?"; `recall(store, key, now)` returns the cached
|
|
19
|
+
* result so the duplicate request gets the SAME response the original produced
|
|
20
|
+
* rather than re-running the side effect. `remember(store, key, value, now)`
|
|
21
|
+
* records the key + its result after the first run.
|
|
22
|
+
*
|
|
23
|
+
* Two eviction policies keep the store bounded, both injected at `initStore`:
|
|
24
|
+
*
|
|
25
|
+
* - **`ttlMs`** — an entry expires `ttlMs` after the `atMs` it was remembered
|
|
26
|
+
* at. `seen` / `recall` treat an expired entry as absent; `evictExpired`
|
|
27
|
+
* (and every `remember`) physically drops it. Without a TTL, entries live
|
|
28
|
+
* until evicted by capacity. The cutoff is half-open: an entry exactly
|
|
29
|
+
* `ttlMs` old is expired (`age >= ttlMs` drops it), matching `rate-limit`'s
|
|
30
|
+
* window edge — a key remembered at `t` no longer counts at `t + ttlMs`.
|
|
31
|
+
* - **`capacity`** — at most `capacity` entries are retained. When a
|
|
32
|
+
* `remember` would push the count past `capacity` (after expiry eviction),
|
|
33
|
+
* the OLDEST entries by insertion `order` are dropped until the count fits.
|
|
34
|
+
* Without a capacity, the store grows unbounded (TTL alone bounds it).
|
|
35
|
+
*
|
|
36
|
+
* `order` is the insertion-order index that capacity eviction reads — the keys
|
|
37
|
+
* oldest-first. It is the store's own LRU-by-insertion ledger, kept in lockstep
|
|
38
|
+
* with `entries` so `entries` never needs to be sorted to find the oldest.
|
|
39
|
+
*
|
|
40
|
+
* **Overwrite semantics** (decided + pinned by tests): re-`remember`ing an
|
|
41
|
+
* existing key is an UPDATE, not a no-op. It (1) overwrites `value`, (2)
|
|
42
|
+
* refreshes `atMs` to the new `nowMs` — so the TTL clock restarts and a
|
|
43
|
+
* frequently-seen key never expires — and (3) moves the key to the NEWEST
|
|
44
|
+
* position in `order` — so capacity eviction treats a re-remembered key as
|
|
45
|
+
* fresh, not as a stale candidate for eviction. This makes `remember` behave
|
|
46
|
+
* like "touch": a key actively being re-seen is kept alive on both the TTL and
|
|
47
|
+
* capacity axes.
|
|
48
|
+
*
|
|
49
|
+
* Internal since #47 — not published on any subpath; reached from inside the
|
|
50
|
+
* package as `internal/idempotency/idempotency`. Same one-shape-per-package rule
|
|
51
|
+
* as `work-queue`, `rate-limit`, and `do`.
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* A cached entry: the result `value` the original request produced and the
|
|
55
|
+
* clock reading `atMs` it was remembered at. `atMs` is the TTL anchor — expiry
|
|
56
|
+
* is measured from here, and a re-`remember` refreshes it. Both fields are
|
|
57
|
+
* plain data so the whole store is trivially JSON-serializable into a
|
|
58
|
+
* consumer's `Store<S>`.
|
|
59
|
+
*/
|
|
60
|
+
interface IdempotencyEntry<V> {
|
|
61
|
+
readonly value: V;
|
|
62
|
+
readonly atMs: number;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The dedupe store: a map of `key → entry`, an insertion-`order` ledger
|
|
66
|
+
* (oldest-first) that capacity eviction reads, and the two optional bounds.
|
|
67
|
+
*
|
|
68
|
+
* `entries` and `order` are kept in lockstep — every key in `order` has an
|
|
69
|
+
* entry and vice versa. `capacity` / `ttlMs` are carried on the store (not
|
|
70
|
+
* passed per-op) so a single value fully describes the policy; a consumer
|
|
71
|
+
* persists the store and rehydrates the same bounds without re-deriving them.
|
|
72
|
+
*/
|
|
73
|
+
interface IdempotencyStore<V> {
|
|
74
|
+
readonly entries: Readonly<Record<string, IdempotencyEntry<V>>>;
|
|
75
|
+
readonly order: readonly string[];
|
|
76
|
+
readonly capacity?: number;
|
|
77
|
+
readonly ttlMs?: number;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Create an empty store. `capacity` and `ttlMs` are both optional — omit both
|
|
81
|
+
* for an unbounded cache, supply either or both to bound by count, age, or
|
|
82
|
+
* both. Stored on the returned value so every later op reads the policy off
|
|
83
|
+
* the store rather than from a re-passed argument.
|
|
84
|
+
*/
|
|
85
|
+
declare function initStore<V>(opts?: {
|
|
86
|
+
capacity?: number;
|
|
87
|
+
ttlMs?: number;
|
|
88
|
+
}): IdempotencyStore<V>;
|
|
89
|
+
/**
|
|
90
|
+
* True iff `key` is present AND not expired at `nowMs`. This is the dedupe
|
|
91
|
+
* predicate: a webhook / retried message / repeated action whose key returns
|
|
92
|
+
* `true` has already been processed and should be short-circuited (paired with
|
|
93
|
+
* `recall` to return the original result). PURE — reads only, never mutates.
|
|
94
|
+
*/
|
|
95
|
+
declare function seen<V>(store: IdempotencyStore<V>, key: string, nowMs: number): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* The cached `value` for `key` if present and unexpired at `nowMs`, else
|
|
98
|
+
* `undefined`. Use after `seen` returns `true` to replay the original result to
|
|
99
|
+
* a duplicate request. An expired entry reads as absent (returns `undefined`)
|
|
100
|
+
* even though it is physically still in `entries` until the next `remember` /
|
|
101
|
+
* `evictExpired` drops it. PURE — reads only, never mutates.
|
|
102
|
+
*/
|
|
103
|
+
declare function recall<V>(store: IdempotencyStore<V>, key: string, nowMs: number): V | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Drop every entry expired at `nowMs` (older than `ttlMs`). Returns a NEW store
|
|
106
|
+
* with the survivors; `order` is rebuilt to drop the same keys, preserving the
|
|
107
|
+
* relative insertion order of the survivors. A no-TTL store returns an
|
|
108
|
+
* equivalent store (nothing ages out). PURE — the input store is never mutated.
|
|
109
|
+
*/
|
|
110
|
+
declare function evictExpired<V>(store: IdempotencyStore<V>, nowMs: number): IdempotencyStore<V>;
|
|
111
|
+
/**
|
|
112
|
+
* Record `key → value` at `nowMs`, then enforce both bounds. PURE — returns a
|
|
113
|
+
* new store; the input is untouched.
|
|
114
|
+
*
|
|
115
|
+
* Order of operations (each step matters):
|
|
116
|
+
* 1. **Expiry eviction** — drop everything older than `ttlMs` first, so an
|
|
117
|
+
* expired key never occupies a capacity slot the new entry could take, and
|
|
118
|
+
* a stale entry under the same `key` is cleared before the overwrite.
|
|
119
|
+
* 2. **Insert / overwrite** — write the new entry. If `key` already exists,
|
|
120
|
+
* this is an UPDATE: `value` is overwritten, `atMs` is refreshed to
|
|
121
|
+
* `nowMs` (restarting the TTL clock), and the key is moved to the NEWEST
|
|
122
|
+
* position in `order` (removed from wherever it sat, appended at the end).
|
|
123
|
+
* See the module-level "Overwrite semantics" note.
|
|
124
|
+
* 3. **Capacity eviction** — if the entry count now exceeds `capacity`, drop
|
|
125
|
+
* the OLDEST keys by `order` until the count fits. Because step 2 moves a
|
|
126
|
+
* re-remembered key to the newest position, an actively re-seen key is
|
|
127
|
+
* never the eviction victim.
|
|
128
|
+
*/
|
|
129
|
+
declare function remember<V>(store: IdempotencyStore<V>, key: string, value: V, nowMs: number): IdempotencyStore<V>;
|
|
130
|
+
|
|
131
|
+
export { type IdempotencyStore as I, type IdempotencyEntry as a, remember as b, evictExpired as e, initStore as i, recall as r, seen as s };
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { C as Cmd } from '
|
|
2
|
-
|
|
3
|
-
import { DeadlineExceeded, DeadlineSub } from '
|
|
4
|
-
import { S as SubscribeHandler } from '../types-XS_miRnB.js';
|
|
5
|
-
export { EnqueueInput } from '../work-queue/index.js';
|
|
6
|
-
import 'zod';
|
|
7
|
-
import '../runtime-types-CNLmhWif.js';
|
|
8
|
-
import 'better-result';
|
|
1
|
+
import { C as Cmd } from './core-DnzqWy6u.js';
|
|
2
|
+
import { S as SubscribeHandler } from './types-BseNPIhr.js';
|
|
3
|
+
import { D as DeadlineExceeded, a as DeadlineSub } from './index-HSYgG2Yt.js';
|
|
9
4
|
|
|
10
5
|
/**
|
|
11
|
-
*
|
|
6
|
+
* internal/flow/batch-window — coalesce a stream of items into size- or
|
|
12
7
|
* time-bounded BATCHES, then flush each batch as a single Cmd.
|
|
13
8
|
*
|
|
14
9
|
* What this module actually DELEGATES to, vs. what it merely RE-EXPORTS:
|
|
@@ -63,8 +58,8 @@ import 'better-result';
|
|
|
63
58
|
* is the consumer's — it is where the batch meets I/O (an `enqueue`, a network
|
|
64
59
|
* POST, an R2 write).
|
|
65
60
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
61
|
+
* Internal since #48 — not published on any subpath; reached from inside the
|
|
62
|
+
* package as `internal/flow/batch-window`. Same one-shape-per-package rule as `deadline`, `cache`, and
|
|
68
63
|
* `work-queue`.
|
|
69
64
|
*/
|
|
70
65
|
|
|
@@ -258,4 +253,4 @@ declare const subscribeBatchWindow: SubscribeHandler<BatchWindowSub, BatchWindow
|
|
|
258
253
|
*/
|
|
259
254
|
declare function createBatchWindow<I, C extends Cmd>(config: BatchWindowConfig<I, C>): BatchWindowKnob<I, C>;
|
|
260
255
|
|
|
261
|
-
export { type BatchWindow, type
|
|
256
|
+
export { type BatchWindow as B, type BatchWindowSub as a, type BatchWindowExpired as b, type BatchWindowConfig as c, type BatchWindowKnob as d, addItem as e, batchWindowExpired as f, createBatchWindow as g, subscribeBatchWindow as h, initBatchWindow as i, onWindow as o, subsFor as s };
|