@lunora/client 1.0.0-alpha.35 → 1.0.0-alpha.37
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/dist/auth/index.d.mts +2 -1
- package/dist/auth/index.d.ts +2 -1
- package/dist/index.d.mts +131 -8
- package/dist/index.d.ts +131 -8
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/LunoraClient-BzVeQ8ub.mjs +1 -0
- package/dist/packem_shared/OfflineQueue-y4mymc5n.mjs +1 -0
- package/dist/packem_shared/{SubscriptionRegistry-CdrOD7sZ.mjs → SubscriptionRegistry-Dr5H2kVT.mjs} +1 -1
- package/dist/packem_shared/TabCoordinator-CMFYQCL-.mjs +1 -0
- package/dist/packem_shared/createLocalStore-7bvzJ_xS.mjs +1 -0
- package/dist/packem_shared/{createServerClient-DX7Dk2w2.mjs → createServerClient-BMtqMeyY.mjs} +1 -1
- package/dist/packem_shared/{createSnapshotPrecondition-DOKRAJ4b.mjs → createSnapshotPrecondition-9rTzUURM.mjs} +1 -1
- package/dist/packem_shared/{local-store-C53xDvEr.mjs → local-store-Di_y1q4e.mjs} +1 -1
- package/dist/packem_shared/{lunora-client.d-DLcz4GRz.d.mts → lunora-client.d-BkfH0Zom.d.ts} +128 -947
- package/dist/packem_shared/{lunora-client.d-DLcz4GRz.d.ts → lunora-client.d-yDX6HUZv.d.mts} +128 -947
- package/dist/packem_shared/offline-queue-BeWay5u5.mjs +1 -0
- package/dist/packem_shared/{preload.d-C1M_N5mE.d.mts → preload.d--OibiIK_.d.ts} +2 -1
- package/dist/packem_shared/{preload.d-hkFC0Uno.d.ts → preload.d-DbtqnQ4C.d.mts} +2 -1
- package/dist/packem_shared/types.d-CxmbJf0E.d.mts +942 -0
- package/dist/packem_shared/types.d-CxmbJf0E.d.ts +942 -0
- package/dist/packem_shared/wire-codec-Ctnni0h6.mjs +1 -0
- package/dist/packem_shared/wire-key-DHMKiMxD.mjs +1 -0
- package/dist/query/index.d.mts +3 -2
- package/dist/query/index.d.ts +3 -2
- package/dist/service.d.mts +49 -0
- package/dist/service.d.ts +49 -0
- package/dist/service.mjs +1 -0
- package/dist/ssr/index.d.mts +4 -3
- package/dist/ssr/index.d.ts +4 -3
- package/dist/ssr/index.mjs +1 -1
- package/package.json +6 -2
- package/dist/packem_shared/LunoraClient-DRo2LNe9.mjs +0 -1
- package/dist/packem_shared/OfflineQueue-l0_y9TmK.mjs +0 -1
- package/dist/packem_shared/TabCoordinator-ijLic02x.mjs +0 -1
- package/dist/packem_shared/createLocalStore-B3Tw_Tw1.mjs +0 -1
- package/dist/packem_shared/offline-queue-b-v6bWWd.mjs +0 -1
- package/dist/packem_shared/wire-key-D_zOxXK4.mjs +0 -1
package/dist/auth/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as LunoraClient } from "../packem_shared/lunora-client.d-yDX6HUZv.mjs";
|
|
2
|
+
import { U as User } from "../packem_shared/types.d-CxmbJf0E.mjs";
|
|
2
3
|
import '@lunora/runtime';
|
|
3
4
|
interface IdentityStore {
|
|
4
5
|
/** Read the current resolved user, or `null` when signed out / not yet resolved. */
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { L as LunoraClient } from "../packem_shared/lunora-client.d-BkfH0Zom.js";
|
|
2
|
+
import { U as User } from "../packem_shared/types.d-CxmbJf0E.js";
|
|
2
3
|
import '@lunora/runtime';
|
|
3
4
|
interface IdentityStore {
|
|
4
5
|
/** Read the current resolved user, or `null` when signed out / not yet resolved. */
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
import { o as PersistenceAdapter, B as BookmarkStorage, H as HttpStreamRef, m as HttpStreamArgsOf, n as HttpStreamChunkOf, F as FunctionReference, A as ArgsOf, R as ReturnOf, O as OfflineQueueOptions, Q as QueryCacheAdapter, p as ReconnectOptions } from "./packem_shared/types.d-CxmbJf0E.mjs";
|
|
2
|
+
export type { C as CachedQuery, q as ClientMessage, r as ClientShapeSubscribeMessage, s as ClientShapeUnsubscribeMessage, t as FunctionArgumentDescriptor, h as FunctionDescriptor, l as GlobalFacetResult, u as GlobalFacetValue, j as GlobalFilterClause, G as GlobalTableInfo, k as GlobalTablePage, v as HttpStreamCallArgs, L as LunoraClientOptions, w as OutboxMutation, x as OutboxSink, y as PersistedMutation, P as Preloaded, z as RowOp, D as RpcEnvelope, E as RpcResponseBody, b as ScheduleRecord, I as SchedulerPoolStatus, c as SchedulerStatus, J as ServerMessage, K as ServerPokeEndMessage, M as ServerPokePartMessage, N as ServerPokeStartMessage, T as ShardTrafficEntry, S as ShardTrafficResult, i as StorageListPage, V as StorageObject, a as Unsubscribe, U as User, g as WorkflowInstanceAction, f as WorkflowInstanceDetail, e as WorkflowInstancePage, d as WorkflowInstanceStatus, X as WorkflowInstanceSummary, Y as WorkflowStepDetail, W as WsTokenProvider } from "./packem_shared/types.d-CxmbJf0E.mjs";
|
|
3
|
+
import { C as ConnectionStatus, S as SubscriptionError, b as StreamIterable, M as MutationCallOptions, L as LunoraClient } from "./packem_shared/lunora-client.d-yDX6HUZv.mjs";
|
|
4
|
+
export { type B as BatchSlot, c as CONFLICT_ERROR_CODE, type d as ClientDebugShard, type e as ClientDebugSnapshot, type f as ClientDebugSubscription, type g as ClientQueryRef, D as DEFAULT_MAX_BUFFER, type h as LunoraClientError, type i as LunoraErrorCode, type j as MutationSettledEvent, type O as OptimisticLocalStore, type k as OptimisticUpdate, type l as StreamHandle, type m as SubscriptionCallback, type a as SubscriptionErrorCallback, n as SubscriptionRegistry, type o as SubscriptionState, type p as SyncWatermark, q as createClientQuery, r as createLocalStore, s as createStream, t as getErrorCode, u as getRetryAfterMs, v as isConflictError, w as isForbiddenError, x as isRateLimitedError, y as isUnauthorizedError } from "./packem_shared/lunora-client.d-yDX6HUZv.mjs";
|
|
5
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-DbtqnQ4C.mjs";
|
|
4
6
|
export type { AuthCapabilities, AuthConfigInfo, AuthImpersonation, AuthPage, AuthSession, AuthUser, AuthUserFieldSpec, CronJobInfo, KvKeyEntry, KvKeyListResult, KvNamespaceSummary, KvValueResult, PipelineLogColumnMap, PipelineLogCursor, PipelineLogField, PipelineLogPage, PipelineLogQuery, PipelineLogRow, VectorIndexSummary, VectorQueryMatch } from '@lunora/runtime';
|
|
5
7
|
declare const anyApi: Record<string, Record<string, unknown>>;
|
|
6
8
|
/**
|
|
@@ -140,18 +142,69 @@ interface TabCoordinatorOptions {
|
|
|
140
142
|
* Called when this tab becomes the leader (should open WS connections).
|
|
141
143
|
*/
|
|
142
144
|
onBecomeLeader?: () => void;
|
|
145
|
+
/**
|
|
146
|
+
* Called when the leader broadcasts its aggregate `ConnectionStatus`
|
|
147
|
+
* (see `LunoraClient.emitConnectionStatus`) — a follower owns no socket
|
|
148
|
+
* of its own, so this is its only truthful signal for a status indicator
|
|
149
|
+
* or the offline-queue gate. Sent on every leader-side status change and
|
|
150
|
+
* once more right after a new leader takes over, so a follower already
|
|
151
|
+
* mid-mirroring isn't stuck on a stale value from the PREVIOUS leader.
|
|
152
|
+
*
|
|
153
|
+
* `identity` is the leader's own `identityFingerprint()` (`null` = signed
|
|
154
|
+
* out) — the channel-name scoping (see `LunoraClient.createTabCoordinator`)
|
|
155
|
+
* is the primary defence against a stale frame from a since-changed
|
|
156
|
+
* identity, but `setAuthToken` in one tab can move it to a new channel
|
|
157
|
+
* while this frame is already queued in another tab's message task queue.
|
|
158
|
+
* A follower drops the frame when `identity` is present and doesn't match
|
|
159
|
+
* its own; an **absent** `identity` (mixed-version leader) is accepted —
|
|
160
|
+
* today's behavior, and the channel split already separates version groups.
|
|
161
|
+
*/
|
|
162
|
+
onConnectionStatus?: (status: ConnectionStatus, identity?: string | null) => void;
|
|
143
163
|
/**
|
|
144
164
|
* Called when this tab loses leadership (should close WS connections).
|
|
145
165
|
*/
|
|
146
166
|
onStopBeingLeader?: () => void;
|
|
147
167
|
/**
|
|
148
|
-
* Called when the leader broadcasts subscription data.
|
|
168
|
+
* Called when the leader broadcasts subscription data. `cursor`/`epoch`
|
|
169
|
+
* ride along when the leader is CLIENT-01-aware, so the follower can drop
|
|
170
|
+
* its own confirmed optimistic layers instead of just displaying the raw
|
|
171
|
+
* value; both are absent on a mixed-version leader that hasn't shipped the
|
|
172
|
+
* cursor yet (the follower falls back to its historical behavior — see
|
|
173
|
+
* `lunora-client.ts`'s `onSubscriptionData` wiring).
|
|
174
|
+
*
|
|
175
|
+
* `identity` is the leader's `identityFingerprint()` (see
|
|
176
|
+
* `onConnectionStatus`'s docblock for the full rationale and the
|
|
177
|
+
* absent-field mixed-version rule — identical here).
|
|
149
178
|
*/
|
|
150
|
-
onSubscriptionData?: (key: string, data: unknown) => void;
|
|
179
|
+
onSubscriptionData?: (key: string, data: unknown, cursor?: number, epoch?: string, identity?: string | null) => void;
|
|
151
180
|
/**
|
|
152
181
|
* Called when the leader broadcasts a subscription error.
|
|
153
182
|
*/
|
|
154
183
|
onSubscriptionError?: (key: string, error: SubscriptionError) => void;
|
|
184
|
+
/**
|
|
185
|
+
* Called when the leader broadcasts a `settled` frame's checkpoint advance
|
|
186
|
+
* (no value change, but the resume cursor moved). A follower needs this
|
|
187
|
+
* too — otherwise a `setQuery`/per-call optimistic overlay that a
|
|
188
|
+
* byte-identical write just confirmed stays masked on follower tabs until
|
|
189
|
+
* the next VISIBLE data frame arrives, even though the leader already
|
|
190
|
+
* dropped it.
|
|
191
|
+
*
|
|
192
|
+
* `lastMutationId` is the LEADER's own per-client `__client_watermark` —
|
|
193
|
+
* scoped server-side to the socket's announced `clientId` — so it only
|
|
194
|
+
* means anything to a follower whose `clientId` matches the leader's
|
|
195
|
+
* (`clientId` rides along for exactly that comparison; see
|
|
196
|
+
* `LunoraClient`'s wiring). An **absent** `clientId` (a mixed-version
|
|
197
|
+
* leader that hasn't shipped this field yet) also skips the
|
|
198
|
+
* `mutationId` half — safe, because the follower's own gates still
|
|
199
|
+
* resolve via its own RPC-ack watermark path and the `CheckpointRegistry`
|
|
200
|
+
* bounded fallback. The checkpoint (cursor) half of this callback fires
|
|
201
|
+
* unconditionally regardless of `clientId` — only the `mutationId` half
|
|
202
|
+
* is scoped.
|
|
203
|
+
*
|
|
204
|
+
* `identity` is the leader's `identityFingerprint()` — see
|
|
205
|
+
* `onConnectionStatus`'s docblock for the drop rule (identical here).
|
|
206
|
+
*/
|
|
207
|
+
onSubscriptionSettled?: (key: string, cursor?: number, epoch?: string, lastMutationId?: number, clientId?: string, identity?: string | null) => void;
|
|
155
208
|
}
|
|
156
209
|
declare class TabCoordinator {
|
|
157
210
|
private readonly bc;
|
|
@@ -164,6 +217,12 @@ declare class TabCoordinator {
|
|
|
164
217
|
private leader;
|
|
165
218
|
/** `true` once `start()` has been called. */
|
|
166
219
|
private running;
|
|
220
|
+
/**
|
|
221
|
+
* `true` while a `claimAndPromote()` claim window is open. Guards the yield
|
|
222
|
+
* handler and `checkLeaderHealth`'s belt-and-braces else-branch so the two
|
|
223
|
+
* promotion paths can't both arm a `becomeLeader` timeout for the same gap.
|
|
224
|
+
*/
|
|
225
|
+
private promotionPending;
|
|
167
226
|
/** Timestamp of the most recent leader heartbeat. */
|
|
168
227
|
private lastHeartbeat;
|
|
169
228
|
private heartbeatTimer;
|
|
@@ -171,8 +230,10 @@ declare class TabCoordinator {
|
|
|
171
230
|
/** Callbacks set via constructor options. */
|
|
172
231
|
private readonly onBecomeLeader;
|
|
173
232
|
private readonly onStopBeingLeader;
|
|
233
|
+
private readonly onConnectionStatus;
|
|
174
234
|
private readonly onSubscriptionData;
|
|
175
235
|
private readonly onSubscriptionError;
|
|
236
|
+
private readonly onSubscriptionSettled;
|
|
176
237
|
constructor(options?: TabCoordinatorOptions);
|
|
177
238
|
/**
|
|
178
239
|
* Start the coordinator: attempt to claim leadership and begin the
|
|
@@ -186,6 +247,23 @@ declare class TabCoordinator {
|
|
|
186
247
|
stop(): void;
|
|
187
248
|
/** `true` when this tab is the current WebSocket leader. */
|
|
188
249
|
isLeader(): boolean;
|
|
250
|
+
/**
|
|
251
|
+
* Force this (freshly `start()`-ed) tab to become leader immediately,
|
|
252
|
+
* skipping the normal claim-then-`leaderTimeout` dance. Safe to call
|
|
253
|
+
* right after `start()` when the caller already knows this tab was the
|
|
254
|
+
* SOLE leader of the group it's replacing (e.g. `LunoraClient`'s
|
|
255
|
+
* identity-change coordinator restart — waiting out the full
|
|
256
|
+
* `leaderTimeout` there would freeze every live query for no reason,
|
|
257
|
+
* since this tab is overwhelmingly likely to be alone on the freshly
|
|
258
|
+
* derived channel). A sibling tab going through the normal `start()`
|
|
259
|
+
* dance for the SAME transition observes this tab's `becomeLeader`
|
|
260
|
+
* heartbeat and defers before its own claim-timeout fires; if another
|
|
261
|
+
* tab ALSO force-promotes at the same moment (e.g. two tabs both
|
|
262
|
+
* transitioning to the same new identity), the existing
|
|
263
|
+
* `resolveLeaderVsLeaderTieBreak` resolves the rare double-promotion
|
|
264
|
+
* the same way it resolves any other split-brain.
|
|
265
|
+
*/
|
|
266
|
+
promoteImmediately(): void;
|
|
189
267
|
/** The tab id of the current leader, or `undefined` if unknown / no leader. */
|
|
190
268
|
get leaderTabId(): string | undefined;
|
|
191
269
|
/** The id of this tab. */
|
|
@@ -194,14 +272,42 @@ declare class TabCoordinator {
|
|
|
194
272
|
get isRunning(): boolean;
|
|
195
273
|
/**
|
|
196
274
|
* Broadcast subscription data to all follower tabs. Only the leader should
|
|
197
|
-
* call this.
|
|
275
|
+
* call this. `cursor`/`epoch` are omitted from the wire frame when
|
|
276
|
+
* `undefined` (e.g. a CDC-off shard) — a follower on ANY version treats a
|
|
277
|
+
* missing `cursor` as "no confirmed-layer drop this frame", so omitting it
|
|
278
|
+
* here is equivalent to sending it as `undefined`. `identity` is this
|
|
279
|
+
* (leader) tab's own `identityFingerprint()` (`null` = signed out) —
|
|
280
|
+
* stamped so a follower can drop a frame from a since-changed identity
|
|
281
|
+
* (see the `onSubscriptionData` docblock); spread-included whenever
|
|
282
|
+
* supplied, since a fixed leader always knows its own identity (never
|
|
283
|
+
* omits it) and `null` must round-trip distinctly from "field absent".
|
|
198
284
|
*/
|
|
199
|
-
broadcastSubscriptionData(key: string, data: unknown): void;
|
|
285
|
+
broadcastSubscriptionData(key: string, data: unknown, cursor?: number, epoch?: string, identity?: string | null): void;
|
|
200
286
|
/**
|
|
201
287
|
* Broadcast a subscription error to all follower tabs. Only the leader
|
|
202
288
|
* should call this.
|
|
203
289
|
*/
|
|
204
290
|
broadcastSubscriptionError(key: string, error: SubscriptionError): void;
|
|
291
|
+
/**
|
|
292
|
+
* Broadcast a `settled` frame's checkpoint advance to all follower tabs
|
|
293
|
+
* (no value change, but the resume cursor/epoch moved — see
|
|
294
|
+
* `LunoraClient.handleSettledMessage`). `clientId` is this (leader) tab's
|
|
295
|
+
* own client id, stamped so a follower can tell whether the echoed
|
|
296
|
+
* `lastMutationId` watermark is genuinely its own (see the
|
|
297
|
+
* `onSubscriptionSettled` docblock). `identity` is this tab's own
|
|
298
|
+
* `identityFingerprint()` — see `broadcastSubscriptionData`'s docblock for
|
|
299
|
+
* the same round-tripping rule. Only the leader should call this.
|
|
300
|
+
*/
|
|
301
|
+
broadcastSubscriptionSettled(key: string, cursor?: number, epoch?: string, lastMutationId?: number, clientId?: string, identity?: string | null): void;
|
|
302
|
+
/**
|
|
303
|
+
* Broadcast this tab's aggregate `ConnectionStatus` to follower tabs, so
|
|
304
|
+
* they can mirror a truthful status without a socket of their own (see
|
|
305
|
+
* `LunoraClient.computeStatus`/`emitConnectionStatus`). `identity` is this
|
|
306
|
+
* tab's own `identityFingerprint()` — see `broadcastSubscriptionData`'s
|
|
307
|
+
* docblock for the same round-tripping rule. Only the leader should call
|
|
308
|
+
* this.
|
|
309
|
+
*/
|
|
310
|
+
broadcastConnectionStatus(status: ConnectionStatus, identity?: string | null): void;
|
|
205
311
|
private broadcast;
|
|
206
312
|
private handleMessage;
|
|
207
313
|
private handleClaimLeadership;
|
|
@@ -222,6 +328,14 @@ declare class TabCoordinator {
|
|
|
222
328
|
private becomeLeader;
|
|
223
329
|
private sendHeartbeat;
|
|
224
330
|
private checkLeaderHealth;
|
|
331
|
+
/**
|
|
332
|
+
* Broadcast a leadership claim and arm a `becomeLeader` fallback: if no
|
|
333
|
+
* other tab has asserted itself as leader by the time the window elapses,
|
|
334
|
+
* self-promote. Shared by `checkLeaderHealth`'s stale-leader path and the
|
|
335
|
+
* `yield-leadership` handler so both promotion triggers use one claim
|
|
336
|
+
* window instead of each arming its own timeout.
|
|
337
|
+
*/
|
|
338
|
+
private claimAndPromote;
|
|
225
339
|
}
|
|
226
340
|
/**
|
|
227
341
|
* Client-side incremental merging of structured mutation deltas.
|
|
@@ -533,6 +647,15 @@ declare class OfflineQueue {
|
|
|
533
647
|
*/
|
|
534
648
|
drainConflict(): QueuedMutation[];
|
|
535
649
|
clear(): void;
|
|
650
|
+
/**
|
|
651
|
+
* Evict entries from the FRONT of `items` (the oldest — FIFO order) until
|
|
652
|
+
* the queue is at or under `maxItems`, rejecting each with
|
|
653
|
+
* `OFFLINE_QUEUE_OVERFLOW`, un-persisting it, and firing `onEvict`. Shared
|
|
654
|
+
* by `enqueue` (a live write pushes past capacity) and `hydrate` (a durable
|
|
655
|
+
* store restored more than `maxItems` records — CLIENT-03) so an overflow
|
|
656
|
+
* always drops the same way regardless of which caller triggered it.
|
|
657
|
+
*/
|
|
658
|
+
private evictOverflow;
|
|
536
659
|
/** Notify the size observer (the client's pending-sync count) after any change. */
|
|
537
660
|
private notifySize;
|
|
538
661
|
}
|
|
@@ -719,4 +842,4 @@ declare const sendToSw: (sw: ServiceWorker | null, message: ClientToSwMessage, e
|
|
|
719
842
|
* Create a reply for a client message (call from inside the SW).
|
|
720
843
|
*/
|
|
721
844
|
declare const createReply: (original: ClientToSwMessage, payload?: unknown) => SwToClientMessage;
|
|
722
|
-
export { type ArgsOf, type AsyncStorageLike, type AsyncStoragePersistenceOptions, type BookmarkStorage, ClientServiceWorker, type ClientSwOptions, type ClientToSwMessage, type FunctionReference, type HttpStreamArgsOf, type HttpStreamChunkOf, type HttpStreamOptions, type HttpStreamRef, type IndexedDbPersistenceOptions, type IndexedDbQueryCacheOptions, LunoraClient, type MutationCallOptions, type MutationDelta, type MutationRunnerSinks, type MutatorHandle, type MutatorRunnerSinks, type MutatorTransaction, OfflineQueue, type OfflineQueueOptions, type OptimisticMessage, type PersistenceAdapter, type QueryCacheAdapter, type QueuedMutation, RETIRE_AFTER_DURABLE_SEQ_ADVANCE, type ReconcileDurableMessage, type ReconnectCalculator, type ReconnectOptions, type ReturnOf, type ServiceWorkerStatus, type StreamIterable, type SubscriptionError, type SwToClientMessage, TabCoordinator, anyApi, applyDelta, createAsyncStoragePersistence, createInMemoryBookmarkStorage, createInMemoryPersistence, createInMemoryQueryCache, createIndexedDbPersistence, createIndexedDbQueryCache, createMutationRunner, createMutatorRunner, createReconnect, createReply, createSnapshotPrecondition, httpStream, isMutationDelta, maxSeq, queryCacheKey, reconcileOptimistic, sendToSw };
|
|
845
|
+
export { type ArgsOf, type AsyncStorageLike, type AsyncStoragePersistenceOptions, type BookmarkStorage, ClientServiceWorker, type ClientSwOptions, type ClientToSwMessage, type ConnectionStatus, type FunctionReference, type HttpStreamArgsOf, type HttpStreamChunkOf, type HttpStreamOptions, type HttpStreamRef, type IndexedDbPersistenceOptions, type IndexedDbQueryCacheOptions, LunoraClient, type MutationCallOptions, type MutationDelta, type MutationRunnerSinks, type MutatorHandle, type MutatorRunnerSinks, type MutatorTransaction, OfflineQueue, type OfflineQueueOptions, type OptimisticMessage, type PersistenceAdapter, type QueryCacheAdapter, type QueuedMutation, RETIRE_AFTER_DURABLE_SEQ_ADVANCE, type ReconcileDurableMessage, type ReconnectCalculator, type ReconnectOptions, type ReturnOf, type ServiceWorkerStatus, type StreamIterable, type SubscriptionError, type SwToClientMessage, TabCoordinator, anyApi, applyDelta, createAsyncStoragePersistence, createInMemoryBookmarkStorage, createInMemoryPersistence, createInMemoryQueryCache, createIndexedDbPersistence, createIndexedDbQueryCache, createMutationRunner, createMutatorRunner, createReconnect, createReply, createSnapshotPrecondition, httpStream, isMutationDelta, maxSeq, queryCacheKey, reconcileOptimistic, sendToSw };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
import { o as PersistenceAdapter, B as BookmarkStorage, H as HttpStreamRef, m as HttpStreamArgsOf, n as HttpStreamChunkOf, F as FunctionReference, A as ArgsOf, R as ReturnOf, O as OfflineQueueOptions, Q as QueryCacheAdapter, p as ReconnectOptions } from "./packem_shared/types.d-CxmbJf0E.js";
|
|
2
|
+
export type { C as CachedQuery, q as ClientMessage, r as ClientShapeSubscribeMessage, s as ClientShapeUnsubscribeMessage, t as FunctionArgumentDescriptor, h as FunctionDescriptor, l as GlobalFacetResult, u as GlobalFacetValue, j as GlobalFilterClause, G as GlobalTableInfo, k as GlobalTablePage, v as HttpStreamCallArgs, L as LunoraClientOptions, w as OutboxMutation, x as OutboxSink, y as PersistedMutation, P as Preloaded, z as RowOp, D as RpcEnvelope, E as RpcResponseBody, b as ScheduleRecord, I as SchedulerPoolStatus, c as SchedulerStatus, J as ServerMessage, K as ServerPokeEndMessage, M as ServerPokePartMessage, N as ServerPokeStartMessage, T as ShardTrafficEntry, S as ShardTrafficResult, i as StorageListPage, V as StorageObject, a as Unsubscribe, U as User, g as WorkflowInstanceAction, f as WorkflowInstanceDetail, e as WorkflowInstancePage, d as WorkflowInstanceStatus, X as WorkflowInstanceSummary, Y as WorkflowStepDetail, W as WsTokenProvider } from "./packem_shared/types.d-CxmbJf0E.js";
|
|
3
|
+
import { C as ConnectionStatus, S as SubscriptionError, b as StreamIterable, M as MutationCallOptions, L as LunoraClient } from "./packem_shared/lunora-client.d-BkfH0Zom.js";
|
|
4
|
+
export { type B as BatchSlot, c as CONFLICT_ERROR_CODE, type d as ClientDebugShard, type e as ClientDebugSnapshot, type f as ClientDebugSubscription, type g as ClientQueryRef, D as DEFAULT_MAX_BUFFER, type h as LunoraClientError, type i as LunoraErrorCode, type j as MutationSettledEvent, type O as OptimisticLocalStore, type k as OptimisticUpdate, type l as StreamHandle, type m as SubscriptionCallback, type a as SubscriptionErrorCallback, n as SubscriptionRegistry, type o as SubscriptionState, type p as SyncWatermark, q as createClientQuery, r as createLocalStore, s as createStream, t as getErrorCode, u as getRetryAfterMs, v as isConflictError, w as isForbiddenError, x as isRateLimitedError, y as isUnauthorizedError } from "./packem_shared/lunora-client.d-BkfH0Zom.js";
|
|
5
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d--OibiIK_.js";
|
|
4
6
|
export type { AuthCapabilities, AuthConfigInfo, AuthImpersonation, AuthPage, AuthSession, AuthUser, AuthUserFieldSpec, CronJobInfo, KvKeyEntry, KvKeyListResult, KvNamespaceSummary, KvValueResult, PipelineLogColumnMap, PipelineLogCursor, PipelineLogField, PipelineLogPage, PipelineLogQuery, PipelineLogRow, VectorIndexSummary, VectorQueryMatch } from '@lunora/runtime';
|
|
5
7
|
declare const anyApi: Record<string, Record<string, unknown>>;
|
|
6
8
|
/**
|
|
@@ -140,18 +142,69 @@ interface TabCoordinatorOptions {
|
|
|
140
142
|
* Called when this tab becomes the leader (should open WS connections).
|
|
141
143
|
*/
|
|
142
144
|
onBecomeLeader?: () => void;
|
|
145
|
+
/**
|
|
146
|
+
* Called when the leader broadcasts its aggregate `ConnectionStatus`
|
|
147
|
+
* (see `LunoraClient.emitConnectionStatus`) — a follower owns no socket
|
|
148
|
+
* of its own, so this is its only truthful signal for a status indicator
|
|
149
|
+
* or the offline-queue gate. Sent on every leader-side status change and
|
|
150
|
+
* once more right after a new leader takes over, so a follower already
|
|
151
|
+
* mid-mirroring isn't stuck on a stale value from the PREVIOUS leader.
|
|
152
|
+
*
|
|
153
|
+
* `identity` is the leader's own `identityFingerprint()` (`null` = signed
|
|
154
|
+
* out) — the channel-name scoping (see `LunoraClient.createTabCoordinator`)
|
|
155
|
+
* is the primary defence against a stale frame from a since-changed
|
|
156
|
+
* identity, but `setAuthToken` in one tab can move it to a new channel
|
|
157
|
+
* while this frame is already queued in another tab's message task queue.
|
|
158
|
+
* A follower drops the frame when `identity` is present and doesn't match
|
|
159
|
+
* its own; an **absent** `identity` (mixed-version leader) is accepted —
|
|
160
|
+
* today's behavior, and the channel split already separates version groups.
|
|
161
|
+
*/
|
|
162
|
+
onConnectionStatus?: (status: ConnectionStatus, identity?: string | null) => void;
|
|
143
163
|
/**
|
|
144
164
|
* Called when this tab loses leadership (should close WS connections).
|
|
145
165
|
*/
|
|
146
166
|
onStopBeingLeader?: () => void;
|
|
147
167
|
/**
|
|
148
|
-
* Called when the leader broadcasts subscription data.
|
|
168
|
+
* Called when the leader broadcasts subscription data. `cursor`/`epoch`
|
|
169
|
+
* ride along when the leader is CLIENT-01-aware, so the follower can drop
|
|
170
|
+
* its own confirmed optimistic layers instead of just displaying the raw
|
|
171
|
+
* value; both are absent on a mixed-version leader that hasn't shipped the
|
|
172
|
+
* cursor yet (the follower falls back to its historical behavior — see
|
|
173
|
+
* `lunora-client.ts`'s `onSubscriptionData` wiring).
|
|
174
|
+
*
|
|
175
|
+
* `identity` is the leader's `identityFingerprint()` (see
|
|
176
|
+
* `onConnectionStatus`'s docblock for the full rationale and the
|
|
177
|
+
* absent-field mixed-version rule — identical here).
|
|
149
178
|
*/
|
|
150
|
-
onSubscriptionData?: (key: string, data: unknown) => void;
|
|
179
|
+
onSubscriptionData?: (key: string, data: unknown, cursor?: number, epoch?: string, identity?: string | null) => void;
|
|
151
180
|
/**
|
|
152
181
|
* Called when the leader broadcasts a subscription error.
|
|
153
182
|
*/
|
|
154
183
|
onSubscriptionError?: (key: string, error: SubscriptionError) => void;
|
|
184
|
+
/**
|
|
185
|
+
* Called when the leader broadcasts a `settled` frame's checkpoint advance
|
|
186
|
+
* (no value change, but the resume cursor moved). A follower needs this
|
|
187
|
+
* too — otherwise a `setQuery`/per-call optimistic overlay that a
|
|
188
|
+
* byte-identical write just confirmed stays masked on follower tabs until
|
|
189
|
+
* the next VISIBLE data frame arrives, even though the leader already
|
|
190
|
+
* dropped it.
|
|
191
|
+
*
|
|
192
|
+
* `lastMutationId` is the LEADER's own per-client `__client_watermark` —
|
|
193
|
+
* scoped server-side to the socket's announced `clientId` — so it only
|
|
194
|
+
* means anything to a follower whose `clientId` matches the leader's
|
|
195
|
+
* (`clientId` rides along for exactly that comparison; see
|
|
196
|
+
* `LunoraClient`'s wiring). An **absent** `clientId` (a mixed-version
|
|
197
|
+
* leader that hasn't shipped this field yet) also skips the
|
|
198
|
+
* `mutationId` half — safe, because the follower's own gates still
|
|
199
|
+
* resolve via its own RPC-ack watermark path and the `CheckpointRegistry`
|
|
200
|
+
* bounded fallback. The checkpoint (cursor) half of this callback fires
|
|
201
|
+
* unconditionally regardless of `clientId` — only the `mutationId` half
|
|
202
|
+
* is scoped.
|
|
203
|
+
*
|
|
204
|
+
* `identity` is the leader's `identityFingerprint()` — see
|
|
205
|
+
* `onConnectionStatus`'s docblock for the drop rule (identical here).
|
|
206
|
+
*/
|
|
207
|
+
onSubscriptionSettled?: (key: string, cursor?: number, epoch?: string, lastMutationId?: number, clientId?: string, identity?: string | null) => void;
|
|
155
208
|
}
|
|
156
209
|
declare class TabCoordinator {
|
|
157
210
|
private readonly bc;
|
|
@@ -164,6 +217,12 @@ declare class TabCoordinator {
|
|
|
164
217
|
private leader;
|
|
165
218
|
/** `true` once `start()` has been called. */
|
|
166
219
|
private running;
|
|
220
|
+
/**
|
|
221
|
+
* `true` while a `claimAndPromote()` claim window is open. Guards the yield
|
|
222
|
+
* handler and `checkLeaderHealth`'s belt-and-braces else-branch so the two
|
|
223
|
+
* promotion paths can't both arm a `becomeLeader` timeout for the same gap.
|
|
224
|
+
*/
|
|
225
|
+
private promotionPending;
|
|
167
226
|
/** Timestamp of the most recent leader heartbeat. */
|
|
168
227
|
private lastHeartbeat;
|
|
169
228
|
private heartbeatTimer;
|
|
@@ -171,8 +230,10 @@ declare class TabCoordinator {
|
|
|
171
230
|
/** Callbacks set via constructor options. */
|
|
172
231
|
private readonly onBecomeLeader;
|
|
173
232
|
private readonly onStopBeingLeader;
|
|
233
|
+
private readonly onConnectionStatus;
|
|
174
234
|
private readonly onSubscriptionData;
|
|
175
235
|
private readonly onSubscriptionError;
|
|
236
|
+
private readonly onSubscriptionSettled;
|
|
176
237
|
constructor(options?: TabCoordinatorOptions);
|
|
177
238
|
/**
|
|
178
239
|
* Start the coordinator: attempt to claim leadership and begin the
|
|
@@ -186,6 +247,23 @@ declare class TabCoordinator {
|
|
|
186
247
|
stop(): void;
|
|
187
248
|
/** `true` when this tab is the current WebSocket leader. */
|
|
188
249
|
isLeader(): boolean;
|
|
250
|
+
/**
|
|
251
|
+
* Force this (freshly `start()`-ed) tab to become leader immediately,
|
|
252
|
+
* skipping the normal claim-then-`leaderTimeout` dance. Safe to call
|
|
253
|
+
* right after `start()` when the caller already knows this tab was the
|
|
254
|
+
* SOLE leader of the group it's replacing (e.g. `LunoraClient`'s
|
|
255
|
+
* identity-change coordinator restart — waiting out the full
|
|
256
|
+
* `leaderTimeout` there would freeze every live query for no reason,
|
|
257
|
+
* since this tab is overwhelmingly likely to be alone on the freshly
|
|
258
|
+
* derived channel). A sibling tab going through the normal `start()`
|
|
259
|
+
* dance for the SAME transition observes this tab's `becomeLeader`
|
|
260
|
+
* heartbeat and defers before its own claim-timeout fires; if another
|
|
261
|
+
* tab ALSO force-promotes at the same moment (e.g. two tabs both
|
|
262
|
+
* transitioning to the same new identity), the existing
|
|
263
|
+
* `resolveLeaderVsLeaderTieBreak` resolves the rare double-promotion
|
|
264
|
+
* the same way it resolves any other split-brain.
|
|
265
|
+
*/
|
|
266
|
+
promoteImmediately(): void;
|
|
189
267
|
/** The tab id of the current leader, or `undefined` if unknown / no leader. */
|
|
190
268
|
get leaderTabId(): string | undefined;
|
|
191
269
|
/** The id of this tab. */
|
|
@@ -194,14 +272,42 @@ declare class TabCoordinator {
|
|
|
194
272
|
get isRunning(): boolean;
|
|
195
273
|
/**
|
|
196
274
|
* Broadcast subscription data to all follower tabs. Only the leader should
|
|
197
|
-
* call this.
|
|
275
|
+
* call this. `cursor`/`epoch` are omitted from the wire frame when
|
|
276
|
+
* `undefined` (e.g. a CDC-off shard) — a follower on ANY version treats a
|
|
277
|
+
* missing `cursor` as "no confirmed-layer drop this frame", so omitting it
|
|
278
|
+
* here is equivalent to sending it as `undefined`. `identity` is this
|
|
279
|
+
* (leader) tab's own `identityFingerprint()` (`null` = signed out) —
|
|
280
|
+
* stamped so a follower can drop a frame from a since-changed identity
|
|
281
|
+
* (see the `onSubscriptionData` docblock); spread-included whenever
|
|
282
|
+
* supplied, since a fixed leader always knows its own identity (never
|
|
283
|
+
* omits it) and `null` must round-trip distinctly from "field absent".
|
|
198
284
|
*/
|
|
199
|
-
broadcastSubscriptionData(key: string, data: unknown): void;
|
|
285
|
+
broadcastSubscriptionData(key: string, data: unknown, cursor?: number, epoch?: string, identity?: string | null): void;
|
|
200
286
|
/**
|
|
201
287
|
* Broadcast a subscription error to all follower tabs. Only the leader
|
|
202
288
|
* should call this.
|
|
203
289
|
*/
|
|
204
290
|
broadcastSubscriptionError(key: string, error: SubscriptionError): void;
|
|
291
|
+
/**
|
|
292
|
+
* Broadcast a `settled` frame's checkpoint advance to all follower tabs
|
|
293
|
+
* (no value change, but the resume cursor/epoch moved — see
|
|
294
|
+
* `LunoraClient.handleSettledMessage`). `clientId` is this (leader) tab's
|
|
295
|
+
* own client id, stamped so a follower can tell whether the echoed
|
|
296
|
+
* `lastMutationId` watermark is genuinely its own (see the
|
|
297
|
+
* `onSubscriptionSettled` docblock). `identity` is this tab's own
|
|
298
|
+
* `identityFingerprint()` — see `broadcastSubscriptionData`'s docblock for
|
|
299
|
+
* the same round-tripping rule. Only the leader should call this.
|
|
300
|
+
*/
|
|
301
|
+
broadcastSubscriptionSettled(key: string, cursor?: number, epoch?: string, lastMutationId?: number, clientId?: string, identity?: string | null): void;
|
|
302
|
+
/**
|
|
303
|
+
* Broadcast this tab's aggregate `ConnectionStatus` to follower tabs, so
|
|
304
|
+
* they can mirror a truthful status without a socket of their own (see
|
|
305
|
+
* `LunoraClient.computeStatus`/`emitConnectionStatus`). `identity` is this
|
|
306
|
+
* tab's own `identityFingerprint()` — see `broadcastSubscriptionData`'s
|
|
307
|
+
* docblock for the same round-tripping rule. Only the leader should call
|
|
308
|
+
* this.
|
|
309
|
+
*/
|
|
310
|
+
broadcastConnectionStatus(status: ConnectionStatus, identity?: string | null): void;
|
|
205
311
|
private broadcast;
|
|
206
312
|
private handleMessage;
|
|
207
313
|
private handleClaimLeadership;
|
|
@@ -222,6 +328,14 @@ declare class TabCoordinator {
|
|
|
222
328
|
private becomeLeader;
|
|
223
329
|
private sendHeartbeat;
|
|
224
330
|
private checkLeaderHealth;
|
|
331
|
+
/**
|
|
332
|
+
* Broadcast a leadership claim and arm a `becomeLeader` fallback: if no
|
|
333
|
+
* other tab has asserted itself as leader by the time the window elapses,
|
|
334
|
+
* self-promote. Shared by `checkLeaderHealth`'s stale-leader path and the
|
|
335
|
+
* `yield-leadership` handler so both promotion triggers use one claim
|
|
336
|
+
* window instead of each arming its own timeout.
|
|
337
|
+
*/
|
|
338
|
+
private claimAndPromote;
|
|
225
339
|
}
|
|
226
340
|
/**
|
|
227
341
|
* Client-side incremental merging of structured mutation deltas.
|
|
@@ -533,6 +647,15 @@ declare class OfflineQueue {
|
|
|
533
647
|
*/
|
|
534
648
|
drainConflict(): QueuedMutation[];
|
|
535
649
|
clear(): void;
|
|
650
|
+
/**
|
|
651
|
+
* Evict entries from the FRONT of `items` (the oldest — FIFO order) until
|
|
652
|
+
* the queue is at or under `maxItems`, rejecting each with
|
|
653
|
+
* `OFFLINE_QUEUE_OVERFLOW`, un-persisting it, and firing `onEvict`. Shared
|
|
654
|
+
* by `enqueue` (a live write pushes past capacity) and `hydrate` (a durable
|
|
655
|
+
* store restored more than `maxItems` records — CLIENT-03) so an overflow
|
|
656
|
+
* always drops the same way regardless of which caller triggered it.
|
|
657
|
+
*/
|
|
658
|
+
private evictOverflow;
|
|
536
659
|
/** Notify the size observer (the client's pending-sync count) after any change. */
|
|
537
660
|
private notifySize;
|
|
538
661
|
}
|
|
@@ -719,4 +842,4 @@ declare const sendToSw: (sw: ServiceWorker | null, message: ClientToSwMessage, e
|
|
|
719
842
|
* Create a reply for a client message (call from inside the SW).
|
|
720
843
|
*/
|
|
721
844
|
declare const createReply: (original: ClientToSwMessage, payload?: unknown) => SwToClientMessage;
|
|
722
|
-
export { type ArgsOf, type AsyncStorageLike, type AsyncStoragePersistenceOptions, type BookmarkStorage, ClientServiceWorker, type ClientSwOptions, type ClientToSwMessage, type FunctionReference, type HttpStreamArgsOf, type HttpStreamChunkOf, type HttpStreamOptions, type HttpStreamRef, type IndexedDbPersistenceOptions, type IndexedDbQueryCacheOptions, LunoraClient, type MutationCallOptions, type MutationDelta, type MutationRunnerSinks, type MutatorHandle, type MutatorRunnerSinks, type MutatorTransaction, OfflineQueue, type OfflineQueueOptions, type OptimisticMessage, type PersistenceAdapter, type QueryCacheAdapter, type QueuedMutation, RETIRE_AFTER_DURABLE_SEQ_ADVANCE, type ReconcileDurableMessage, type ReconnectCalculator, type ReconnectOptions, type ReturnOf, type ServiceWorkerStatus, type StreamIterable, type SubscriptionError, type SwToClientMessage, TabCoordinator, anyApi, applyDelta, createAsyncStoragePersistence, createInMemoryBookmarkStorage, createInMemoryPersistence, createInMemoryQueryCache, createIndexedDbPersistence, createIndexedDbQueryCache, createMutationRunner, createMutatorRunner, createReconnect, createReply, createSnapshotPrecondition, httpStream, isMutationDelta, maxSeq, queryCacheKey, reconcileOptimistic, sendToSw };
|
|
845
|
+
export { type ArgsOf, type AsyncStorageLike, type AsyncStoragePersistenceOptions, type BookmarkStorage, ClientServiceWorker, type ClientSwOptions, type ClientToSwMessage, type ConnectionStatus, type FunctionReference, type HttpStreamArgsOf, type HttpStreamChunkOf, type HttpStreamOptions, type HttpStreamRef, type IndexedDbPersistenceOptions, type IndexedDbQueryCacheOptions, LunoraClient, type MutationCallOptions, type MutationDelta, type MutationRunnerSinks, type MutatorHandle, type MutatorRunnerSinks, type MutatorTransaction, OfflineQueue, type OfflineQueueOptions, type OptimisticMessage, type PersistenceAdapter, type QueryCacheAdapter, type QueuedMutation, RETIRE_AFTER_DURABLE_SEQ_ADVANCE, type ReconcileDurableMessage, type ReconnectCalculator, type ReconnectOptions, type ReturnOf, type ServiceWorkerStatus, type StreamIterable, type SubscriptionError, type SwToClientMessage, TabCoordinator, anyApi, applyDelta, createAsyncStoragePersistence, createInMemoryBookmarkStorage, createInMemoryPersistence, createInMemoryQueryCache, createIndexedDbPersistence, createIndexedDbQueryCache, createMutationRunner, createMutatorRunner, createReconnect, createReply, createSnapshotPrecondition, httpStream, isMutationDelta, maxSeq, queryCacheKey, reconcileOptimistic, sendToSw };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{anyApi as o}from"./packem_shared/anyApi-BD4dgvDY.mjs";import{RETIRE_AFTER_DURABLE_SEQ_ADVANCE as a,maxSeq as
|
|
1
|
+
import{anyApi as o}from"./packem_shared/anyApi-BD4dgvDY.mjs";import{RETIRE_AFTER_DURABLE_SEQ_ADVANCE as a,maxSeq as n,reconcileOptimistic as p}from"./packem_shared/RETIRE_AFTER_DURABLE_SEQ_ADVANCE-D96iRJDY.mjs";import{createAsyncStoragePersistence as m}from"./packem_shared/createAsyncStoragePersistence-BRLqeXsC.mjs";import{default as f}from"./packem_shared/createInMemoryBookmarkStorage-DCd5Ej-t.mjs";import{createClientQuery as s}from"./packem_shared/createClientQuery-CrdRoicO.mjs";import{TabCoordinator as d}from"./packem_shared/TabCoordinator-CMFYQCL-.mjs";import{applyDelta as y,isMutationDelta as R}from"./packem_shared/applyDelta-DXqQORbM.mjs";import{CONFLICT_ERROR_CODE as C,getErrorCode as S,getRetryAfterMs as A,isConflictError as D,isForbiddenError as M,isRateLimitedError as _,isUnauthorizedError as h}from"./packem_shared/CONFLICT_ERROR_CODE-B2SU0CaJ.mjs";import{httpStream as Q}from"./packem_shared/httpStream-Cz4_QyjV.mjs";import{c as L}from"./packem_shared/local-store-Di_y1q4e.mjs";import{LunoraClient as b}from"./packem_shared/LunoraClient-BzVeQ8ub.mjs";import{createMutationRunner as O}from"./packem_shared/createMutationRunner-lQXH8Amk.mjs";import{createMutatorRunner as U}from"./packem_shared/createMutatorRunner-BVzo0FBZ.mjs";import{h as B}from"./packem_shared/offline-queue-BeWay5u5.mjs";import{createInMemoryPersistence as N,createIndexedDbPersistence as v}from"./packem_shared/createInMemoryPersistence-CQYXy8UP.mjs";import{preloadQuery as z,preloadedQueryResult as K}from"./packem_shared/preloadQuery-DjwSjFwt.mjs";import{createInMemoryQueryCache as W,createIndexedDbQueryCache as X,queryCacheKey as j}from"./packem_shared/createInMemoryQueryCache-DjCKrLjk.mjs";import{createReconnect as H}from"./packem_shared/createReconnect-CFT7YRSR.mjs";import{default as Y}from"./packem_shared/createSnapshotPrecondition-9rTzUURM.mjs";import{DEFAULT_MAX_BUFFER as $,createStream as ee}from"./packem_shared/DEFAULT_MAX_BUFFER-TBn2s7Rz.mjs";import{SubscriptionRegistry as oe}from"./packem_shared/SubscriptionRegistry-Dr5H2kVT.mjs";import{ClientServiceWorker as ae}from"./packem_shared/ClientServiceWorker-CRQ5yl7-.mjs";import{createReply as pe,sendToSw as ce}from"./packem_shared/createReply-DF0jRsv-.mjs";export{C as CONFLICT_ERROR_CODE,ae as ClientServiceWorker,$ as DEFAULT_MAX_BUFFER,b as LunoraClient,B as OfflineQueue,a as RETIRE_AFTER_DURABLE_SEQ_ADVANCE,oe as SubscriptionRegistry,d as TabCoordinator,o as anyApi,y as applyDelta,m as createAsyncStoragePersistence,s as createClientQuery,f as createInMemoryBookmarkStorage,N as createInMemoryPersistence,W as createInMemoryQueryCache,v as createIndexedDbPersistence,X as createIndexedDbQueryCache,L as createLocalStore,O as createMutationRunner,U as createMutatorRunner,H as createReconnect,pe as createReply,Y as createSnapshotPrecondition,ee as createStream,S as getErrorCode,A as getRetryAfterMs,Q as httpStream,D as isConflictError,M as isForbiddenError,R as isMutationDelta,_ as isRateLimitedError,h as isUnauthorizedError,n as maxSeq,z as preloadQuery,K as preloadedQueryResult,j as queryCacheKey,p as reconcileOptimistic,ce as sendToSw};
|