@rindle/optimistic 0.4.3 → 0.5.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 +30 -61
- package/dist/backend.d.ts +881 -26
- package/dist/backend.d.ts.map +1 -1
- package/dist/backend.js +2033 -205
- package/dist/backend.js.map +1 -1
- package/dist/client.d.ts +156 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +848 -8
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/local-persist.d.ts +102 -0
- package/dist/local-persist.d.ts.map +1 -0
- package/dist/local-persist.js +957 -0
- package/dist/local-persist.js.map +1 -0
- package/dist/system-streams.d.ts +62 -0
- package/dist/system-streams.d.ts.map +1 -0
- package/dist/system-streams.js +107 -0
- package/dist/system-streams.js.map +1 -0
- package/package.json +6 -5
- package/src/backend.ts +2476 -198
- package/src/client.ts +1174 -13
- package/src/index.ts +51 -0
- package/src/local-persist.ts +1129 -0
- package/src/system-streams.ts +140 -0
package/src/index.ts
CHANGED
|
@@ -25,6 +25,7 @@ export { OptimisticBackend } from "./backend.ts";
|
|
|
25
25
|
export type {
|
|
26
26
|
ClientMutator,
|
|
27
27
|
ClientRegistry,
|
|
28
|
+
DowngradeStuckEvent,
|
|
28
29
|
FoldClock,
|
|
29
30
|
FoldHandle,
|
|
30
31
|
FoldInspect,
|
|
@@ -36,8 +37,31 @@ export type {
|
|
|
36
37
|
PendingInspect,
|
|
37
38
|
QueryArg,
|
|
38
39
|
QueryResultRow,
|
|
40
|
+
ReadLog,
|
|
41
|
+
ReadOutcome,
|
|
42
|
+
ReadRecord,
|
|
39
43
|
ResultType,
|
|
44
|
+
RoomTableRouting,
|
|
45
|
+
RoomTableRoutingSpec,
|
|
46
|
+
RoutingFailureReason,
|
|
47
|
+
RoutingInspect,
|
|
48
|
+
ScopeSessionsEvent,
|
|
49
|
+
SystemStreamSpec,
|
|
50
|
+
SystemStreamTable,
|
|
51
|
+
WriteRecord,
|
|
52
|
+
WriteSet,
|
|
40
53
|
} from "./backend.ts";
|
|
54
|
+
// The §4 lifecycle system-stream leaf vocabulary (Slice I-iii): table names + wire schemas +
|
|
55
|
+
// the reserved system-sub query name (see ./system-streams.ts).
|
|
56
|
+
export {
|
|
57
|
+
LIFECYCLE_QUERY_NAME,
|
|
58
|
+
LIFECYCLE_TABLE_SCHEMAS,
|
|
59
|
+
ROOM_CLIENT_MUTATIONS_TABLE,
|
|
60
|
+
ROOM_MUTATION_OUTCOMES_TABLE,
|
|
61
|
+
ROOM_WATERMARK_TABLE,
|
|
62
|
+
roomDomainKey,
|
|
63
|
+
SCOPE_SESSIONS_TABLE,
|
|
64
|
+
} from "./system-streams.ts";
|
|
41
65
|
export type { MutationEnvelope, OptimisticSource, ProgressFrame } from "@rindle/client";
|
|
42
66
|
// The shared (generator) mutator seam — a registry may hold plain client mutators OR these isomorphic
|
|
43
67
|
// generators (the SAME body the API server runs); re-exported here so an app registers from one import.
|
|
@@ -47,8 +71,35 @@ export type { IsoTx, MutationGen, MutatorCtx, SharedMutator, YieldEffect } from
|
|
|
47
71
|
// The one-call client for the daemon/serverless topology (API server + daemon ws).
|
|
48
72
|
export { createRindleClient } from "./client.ts";
|
|
49
73
|
export type { RindleClient, RindleClientOptions } from "./client.ts";
|
|
74
|
+
// Rindle Realtime client surface (G-v resolve-then-register): the lease-wire mirror types, the
|
|
75
|
+
// loud anomaly channel, and the `__realtimeInspect` snapshot shape.
|
|
76
|
+
export type {
|
|
77
|
+
LifecycleLeaseBlock,
|
|
78
|
+
LifecycleLeaseEntry,
|
|
79
|
+
RealtimeAnomaly,
|
|
80
|
+
RealtimeAnomalyKind,
|
|
81
|
+
RealtimeClientOptions,
|
|
82
|
+
RealtimeInspect,
|
|
83
|
+
RealtimeLeaseBlock,
|
|
84
|
+
RealtimeLeaseTableSpec,
|
|
85
|
+
} from "./client.ts";
|
|
50
86
|
export { resetStableClientID, stableClientID } from "./client-id.ts";
|
|
51
87
|
|
|
88
|
+
// Local-table persistence (207-LOCAL-TABLE-PERSISTENCE-DESIGN.md): durable, cross-tab `local: true`
|
|
89
|
+
// tables. `createRindleClient` wires it via the `persistLocal` option; a standalone backend attaches
|
|
90
|
+
// with `attachLocalPersistence`; `deleteLocalPersistence` is the sanctioned logout hook (§3.2).
|
|
91
|
+
export { attachLocalPersistence, deleteLocalPersistence } from "./local-persist.ts";
|
|
92
|
+
export type {
|
|
93
|
+
LocalPersistence,
|
|
94
|
+
PersistChannel,
|
|
95
|
+
PersistDb,
|
|
96
|
+
PersistEnv,
|
|
97
|
+
PersistLocalOptions,
|
|
98
|
+
PersistMeta,
|
|
99
|
+
RowState,
|
|
100
|
+
StoredRow,
|
|
101
|
+
} from "./local-persist.ts";
|
|
102
|
+
|
|
52
103
|
/** A {@link Store} over an {@link OptimisticBackend}, plus the named-mutator entry
|
|
53
104
|
* (`mutate.createIssue(args)` — the §9 dream shape) and the §6 lifecycle surface. */
|
|
54
105
|
export function createOptimisticStore<S extends ColsMap, R extends ClientRegistry>(
|