@lunora/client 1.0.0-alpha.21 → 1.0.0-alpha.23
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 +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/index.d.mts +249 -4
- package/dist/index.d.ts +249 -4
- package/dist/index.mjs +10 -4
- package/dist/packem_shared/ClientServiceWorker-C3PAFwy0.mjs +100 -0
- package/dist/packem_shared/{LunoraClient-kXpHNyaE.mjs → LunoraClient-BBCQjjbl.mjs} +382 -243
- package/dist/packem_shared/{OfflineQueue-GGYJRmhF.mjs → OfflineQueue-B4HUF7rt.mjs} +1 -1
- package/dist/packem_shared/SubscriptionRegistry-CxS_Inha.mjs +31 -0
- package/dist/packem_shared/TabCoordinator-BwRR8H06.mjs +222 -0
- package/dist/packem_shared/createClientQuery-CQ51bWAE.mjs +71 -0
- package/dist/packem_shared/createLocalStore-BtqUmOQA.mjs +2 -0
- package/dist/packem_shared/createReply-lI4tVS2w.mjs +36 -0
- package/dist/packem_shared/{createServerClient-DF-3mLmb.mjs → createServerClient-CTTAmvMx.mjs} +1 -1
- package/dist/packem_shared/createSnapshotPrecondition-CxQ1T4ZP.mjs +18 -0
- package/dist/packem_shared/httpStream-BJU-aflc.mjs +159 -0
- package/dist/packem_shared/{local-store-BveBeFEo.mjs → local-store-DIq-UWfD.mjs} +1 -1
- package/dist/packem_shared/{lunora-client.d-BYkEjCEJ.d.mts → lunora-client.d-JvtVpf8A.d.mts} +302 -18
- package/dist/packem_shared/{lunora-client.d-BYkEjCEJ.d.ts → lunora-client.d-JvtVpf8A.d.ts} +302 -18
- package/dist/packem_shared/{offline-queue-B9vfdSqp.mjs → offline-queue-CF4_Co5k.mjs} +29 -0
- package/dist/packem_shared/{preload.d-B-vyHnml.d.ts → preload.d-C4_d_l5v.d.ts} +1 -1
- package/dist/packem_shared/{preload.d-DrfuisCE.d.mts → preload.d-DKbjGN5O.d.mts} +1 -1
- package/dist/packem_shared/wire-key-Djie6aaR.mjs +266 -0
- package/dist/query/index.d.mts +2 -2
- package/dist/query/index.d.ts +2 -2
- package/dist/ssr/index.d.mts +3 -3
- package/dist/ssr/index.d.ts +3 -3
- package/dist/ssr/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/packem_shared/SubscriptionRegistry-DjGKZsqq.mjs +0 -1
- package/dist/packem_shared/createLocalStore-jRoqmazl.mjs +0 -2
- package/dist/packem_shared/subscription-BjynOXCU.mjs +0 -68
package/dist/auth/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as User, L as LunoraClient } from "../packem_shared/lunora-client.d-
|
|
1
|
+
import { U as User, L as LunoraClient } from "../packem_shared/lunora-client.d-JvtVpf8A.mjs";
|
|
2
2
|
import '@lunora/runtime';
|
|
3
3
|
interface IdentityStore {
|
|
4
4
|
/** Read the current resolved user, or `null` when signed out / not yet resolved. */
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as User, L as LunoraClient } from "../packem_shared/lunora-client.d-
|
|
1
|
+
import { U as User, L as LunoraClient } from "../packem_shared/lunora-client.d-JvtVpf8A.js";
|
|
2
2
|
import '@lunora/runtime';
|
|
3
3
|
interface IdentityStore {
|
|
4
4
|
/** Read the current resolved user, or `null` when signed out / not yet resolved. */
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as PersistenceAdapter, B as BookmarkStorage, F as FunctionReference, A as ArgsOf, M as MutationCallOptions, R as ReturnOf, O as OfflineQueueOptions, Q as QueryCacheAdapter,
|
|
2
|
-
export { type
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-
|
|
1
|
+
import { c as PersistenceAdapter, B as BookmarkStorage, S as SubscriptionError, H as HttpStreamRef, d as HttpStreamArgsOf, e as HttpStreamChunkOf, f as StreamIterable, F as FunctionReference, A as ArgsOf, M as MutationCallOptions, R as ReturnOf, O as OfflineQueueOptions, Q as QueryCacheAdapter, g as ReconnectOptions, L as LunoraClient } from "./packem_shared/lunora-client.d-JvtVpf8A.mjs";
|
|
2
|
+
export { type h as BatchSlot, C as CONFLICT_ERROR_CODE, type i as CachedQuery, type j as ClientMessage, type k as ClientQueryRef, type l as ClientShapeSubscribeMessage, type m as ClientShapeUnsubscribeMessage, type n as ConnectionStatus, D as DEFAULT_MAX_BUFFER, type o as FunctionArgumentDescriptor, type p as FunctionDescriptor, type G as GlobalFacetResult, type q as GlobalFacetValue, type r as GlobalFilterClause, type s as GlobalTableInfo, type t as GlobalTablePage, type u as HttpStreamCallArgs, type v as LunoraClientError, type w as LunoraClientOptions, type x as LunoraErrorCode, type y as MutationSettledEvent, type z as OptimisticLocalStore, type E as OptimisticUpdate, type I as OutboxMutation, type J as OutboxSink, type K as PersistedMutation, type P as Preloaded, type N as RowOp, type T as RpcEnvelope, type V as RpcResponseBody, type W as ScheduleRecord, type X as SchedulerPoolStatus, type Y as SchedulerStatus, type Z as ServerMessage, type _ as ServerPokeEndMessage, type $ as ServerPokePartMessage, type a0 as ServerPokeStartMessage, type a1 as ShardTrafficEntry, type a2 as ShardTrafficResult, type a3 as StorageListPage, type a4 as StorageObject, type a5 as StreamHandle, type a6 as SubscriptionCallback, type b as SubscriptionErrorCallback, a7 as SubscriptionRegistry, type a8 as SubscriptionState, type a9 as SyncWatermark, type a as Unsubscribe, type U as User, type aa as WorkflowInstanceAction, type ab as WorkflowInstanceDetail, type ac as WorkflowInstancePage, type ad as WorkflowInstanceStatus, type ae as WorkflowInstanceSummary, type af as WorkflowStepDetail, type ag as WsTokenProvider, ah as createClientQuery, ai as createLocalStore, aj as createStream, ak as getErrorCode, al as getRetryAfterMs, am as isConflictError, an as isForbiddenError, ao as isRateLimitedError, ap as isUnauthorizedError } from "./packem_shared/lunora-client.d-JvtVpf8A.mjs";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-DKbjGN5O.mjs";
|
|
4
4
|
export type { AuthCapabilities, AuthConfigInfo, AuthImpersonation, AuthPage, AuthSession, AuthUser, AuthUserFieldSpec, CronJobInfo, KvKeyEntry, KvKeyListResult, KvNamespaceSummary, KvValueResult, VectorIndexSummary, VectorQueryMatch } from '@lunora/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* The slice of React Native's `AsyncStorage` (or any async key/value store —
|
|
@@ -33,6 +33,92 @@ interface AsyncStoragePersistenceOptions {
|
|
|
33
33
|
declare const createAsyncStoragePersistence: (options: AsyncStoragePersistenceOptions) => PersistenceAdapter;
|
|
34
34
|
/** Default in-memory bookmark store. Survives the lifetime of the client. */
|
|
35
35
|
declare const createInMemoryBookmarkStorage: () => BookmarkStorage;
|
|
36
|
+
interface TabCoordinatorOptions {
|
|
37
|
+
/**
|
|
38
|
+
* BroadcastChannel name. Defaults to `"lunora-bridge"`.
|
|
39
|
+
*/
|
|
40
|
+
channelName?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Interval (ms) between leader heartbeats. Defaults to 1000.
|
|
43
|
+
*/
|
|
44
|
+
heartbeatInterval?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Milliseconds without a heartbeat to consider the leader dead. Must be
|
|
47
|
+
* larger than `heartbeatInterval`. Defaults to 3000.
|
|
48
|
+
*/
|
|
49
|
+
leaderTimeout?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Called when this tab becomes the leader (should open WS connections).
|
|
52
|
+
*/
|
|
53
|
+
onBecomeLeader?: () => void;
|
|
54
|
+
/**
|
|
55
|
+
* Called when this tab loses leadership (should close WS connections).
|
|
56
|
+
*/
|
|
57
|
+
onStopBeingLeader?: () => void;
|
|
58
|
+
/**
|
|
59
|
+
* Called when the leader broadcasts subscription data.
|
|
60
|
+
*/
|
|
61
|
+
onSubscriptionData?: (key: string, data: unknown) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Called when the leader broadcasts a subscription error.
|
|
64
|
+
*/
|
|
65
|
+
onSubscriptionError?: (key: string, error: SubscriptionError) => void;
|
|
66
|
+
}
|
|
67
|
+
declare class TabCoordinator {
|
|
68
|
+
private readonly bc;
|
|
69
|
+
private readonly tabId;
|
|
70
|
+
private readonly heartbeatInterval;
|
|
71
|
+
private readonly leaderTimeout;
|
|
72
|
+
/** The tab id of the current known leader, or `undefined` if no leader. */
|
|
73
|
+
private knownLeader;
|
|
74
|
+
/** `true` when this tab believes it is the leader. */
|
|
75
|
+
private leader;
|
|
76
|
+
/** `true` once `start()` has been called. */
|
|
77
|
+
private running;
|
|
78
|
+
/** Timestamp of the most recent leader heartbeat. */
|
|
79
|
+
private lastHeartbeat;
|
|
80
|
+
private heartbeatTimer;
|
|
81
|
+
private leaderCheckTimer;
|
|
82
|
+
/** Callbacks set via constructor options. */
|
|
83
|
+
private readonly onBecomeLeader;
|
|
84
|
+
private readonly onStopBeingLeader;
|
|
85
|
+
private readonly onSubscriptionData;
|
|
86
|
+
private readonly onSubscriptionError;
|
|
87
|
+
constructor(options?: TabCoordinatorOptions);
|
|
88
|
+
/**
|
|
89
|
+
* Start the coordinator: attempt to claim leadership and begin the
|
|
90
|
+
* heartbeat/leader-check cycle. Safe to call multiple times.
|
|
91
|
+
*/
|
|
92
|
+
start(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Stop the coordinator: yield leadership (if held), close the channel, and
|
|
95
|
+
* clear all timers. Safe to call multiple times.
|
|
96
|
+
*/
|
|
97
|
+
stop(): void;
|
|
98
|
+
/** `true` when this tab is the current WebSocket leader. */
|
|
99
|
+
isLeader(): boolean;
|
|
100
|
+
/** The tab id of the current leader, or `undefined` if unknown / no leader. */
|
|
101
|
+
get leaderTabId(): string | undefined;
|
|
102
|
+
/** The id of this tab. */
|
|
103
|
+
get id(): string;
|
|
104
|
+
/** `true` when the coordinator has been started and is not yet stopped. */
|
|
105
|
+
get isRunning(): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Broadcast subscription data to all follower tabs. Only the leader should
|
|
108
|
+
* call this.
|
|
109
|
+
*/
|
|
110
|
+
broadcastSubscriptionData(key: string, data: unknown): void;
|
|
111
|
+
/**
|
|
112
|
+
* Broadcast a subscription error to all follower tabs. Only the leader
|
|
113
|
+
* should call this.
|
|
114
|
+
*/
|
|
115
|
+
broadcastSubscriptionError(key: string, error: SubscriptionError): void;
|
|
116
|
+
private broadcast;
|
|
117
|
+
private handleMessage;
|
|
118
|
+
private becomeLeader;
|
|
119
|
+
private sendHeartbeat;
|
|
120
|
+
private checkLeaderHealth;
|
|
121
|
+
}
|
|
36
122
|
/**
|
|
37
123
|
* Client-side incremental merging of structured mutation deltas.
|
|
38
124
|
*
|
|
@@ -95,6 +181,43 @@ declare const isMutationDelta: (value: unknown) => value is MutationDelta;
|
|
|
95
181
|
* when an `insert`/`update` delta carries no `row` to splice in.
|
|
96
182
|
*/
|
|
97
183
|
declare const applyDelta: (current: unknown, delta: MutationDelta) => undefined | unknown[];
|
|
184
|
+
/**
|
|
185
|
+
* Options accepted by {@link httpStream}.
|
|
186
|
+
* @experimental Part of the HTTP-SSE stream surface.
|
|
187
|
+
*/
|
|
188
|
+
interface HttpStreamOptions {
|
|
189
|
+
/**
|
|
190
|
+
* Origin (or origin + prefix) the route path is appended to, e.g.
|
|
191
|
+
* `https://my-app.example.com`. Defaults to `""` — a relative URL, which
|
|
192
|
+
* resolves against the page origin in a browser.
|
|
193
|
+
*/
|
|
194
|
+
baseUrl?: string;
|
|
195
|
+
/** `fetch` implementation override; defaults to the global `fetch`. */
|
|
196
|
+
fetch?: typeof fetch;
|
|
197
|
+
/** Extra request headers (e.g. `authorization`). `accept: text/event-stream` is always sent. */
|
|
198
|
+
headers?: Record<string, string>;
|
|
199
|
+
/** Caps the in-flight chunk buffer (see `createStream`); exceeding it fails the stream. */
|
|
200
|
+
maxBuffer?: number;
|
|
201
|
+
/** External abort signal — aborting it cancels the fetch (→ the server handler's `signal`). */
|
|
202
|
+
signal?: AbortSignal;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Open a typed HTTP-SSE stream route and iterate its chunks:
|
|
206
|
+
*
|
|
207
|
+
* ```ts
|
|
208
|
+
* const stream = httpStream(httpStreams.http.tokens, { searchParams: { prompt } }, { baseUrl });
|
|
209
|
+
* for await (const token of stream) {
|
|
210
|
+
* render(token); // typed as the route handler's yielded chunk
|
|
211
|
+
* }
|
|
212
|
+
* ```
|
|
213
|
+
*
|
|
214
|
+
* The returned iterable terminates when the server writes `event: complete`;
|
|
215
|
+
* an `event: error` frame (or a transport failure) surfaces as a coded
|
|
216
|
+
* rejection on the next `next()`. `.cancel()` — or aborting `options.signal` —
|
|
217
|
+
* aborts the underlying fetch, which the server observes via `request.signal`.
|
|
218
|
+
* @experimental Reconnect/POST-body/wire-fidelity design questions are still open, so the shape may change.
|
|
219
|
+
*/
|
|
220
|
+
declare const httpStream: <Ref extends HttpStreamRef>(route: Ref, args?: HttpStreamArgsOf<Ref>, options?: HttpStreamOptions) => StreamIterable<HttpStreamChunkOf<Ref>>;
|
|
98
221
|
/** The single transport method a mutation runner needs — narrowed so adapters can test against a stub. */
|
|
99
222
|
interface MutationCapableClient<F extends FunctionReference> {
|
|
100
223
|
mutation: (function_: F, args: ArgsOf<F>, options?: MutationCallOptions<unknown, unknown, ArgsOf<F>>) => Promise<ReturnOf<F>>;
|
|
@@ -202,6 +325,14 @@ interface QueuedMutation<T = unknown> {
|
|
|
202
325
|
* Absent on hydrated records (the optimistic write lived in a prior session).
|
|
203
326
|
*/
|
|
204
327
|
readonly onCommit?: (commitCursor: number | undefined) => void;
|
|
328
|
+
/**
|
|
329
|
+
* Optional sync predicate evaluated just before replay. When it returns
|
|
330
|
+
* `false` the write is dropped instead of replaying, handling the case
|
|
331
|
+
* where the mutation's preconditions are no longer valid (e.g. the
|
|
332
|
+
* document it referred to was deleted while offline). Absent or `true`
|
|
333
|
+
* means "ok to replay".
|
|
334
|
+
*/
|
|
335
|
+
readonly precondition?: () => boolean;
|
|
205
336
|
/** Rejects if the mutation can no longer be replayed. */
|
|
206
337
|
readonly reject: (error: unknown) => void;
|
|
207
338
|
/** Resolves once the mutation has been replayed against the server. */
|
|
@@ -288,6 +419,16 @@ declare class OfflineQueue {
|
|
|
288
419
|
* transport failure: the unreplayed writes stay queued for the next reconnect.
|
|
289
420
|
*/
|
|
290
421
|
requeue(items: QueuedMutation[]): void;
|
|
422
|
+
/**
|
|
423
|
+
* Remove mutations whose precondition evaluates to `false` (stale/dirty
|
|
424
|
+
* writes that should not replay) and reject each with an
|
|
425
|
+
* `OFFLINE_PRECONDITION_FAILED` error. The valid (admitted) mutations stay
|
|
426
|
+
* queued in FIFO order. Returns the drained stale entries.
|
|
427
|
+
*
|
|
428
|
+
* Called during reconnect before the flush cycle to weed out writes whose
|
|
429
|
+
* assumptions no longer hold (e.g. a document was deleted by another client).
|
|
430
|
+
*/
|
|
431
|
+
drainConflict(): QueuedMutation[];
|
|
291
432
|
clear(): void;
|
|
292
433
|
/** Notify the size observer (the client's pending-sync count) after any change. */
|
|
293
434
|
private notifySize;
|
|
@@ -398,4 +539,108 @@ interface ReconnectCalculator {
|
|
|
398
539
|
reset: () => void;
|
|
399
540
|
}
|
|
400
541
|
declare const createReconnect: (options?: ReconnectOptions, random?: () => number) => ReconnectCalculator;
|
|
401
|
-
|
|
542
|
+
/**
|
|
543
|
+
* Capture a snapshot of the current live query value at call time and produce a
|
|
544
|
+
* `() => boolean` precondition that compares it against the value at replay time.
|
|
545
|
+
*
|
|
546
|
+
* When the precondition is checked (on queue drain / reconnect) it re-reads the
|
|
547
|
+
* query's current value via {@link LunoraClient.peekActiveQueryValue}. If the
|
|
548
|
+
* value differs from what was captured at call time the precondition returns
|
|
549
|
+
* `false` and the offline mutation is dropped as stale.
|
|
550
|
+
* @example
|
|
551
|
+
* ```ts
|
|
552
|
+
* client.mutation(api.todos.update, { id, text }, {
|
|
553
|
+
* precondition: createSnapshotPrecondition(client, api.todos.list, { userId }),
|
|
554
|
+
* });
|
|
555
|
+
* ```
|
|
556
|
+
*/
|
|
557
|
+
declare const createSnapshotPrecondition: (client: LunoraClient, functionRef: FunctionReference, args: Record<string, unknown>, shardKey?: string) => (() => boolean);
|
|
558
|
+
/**
|
|
559
|
+
* Client-side service-worker registration and lifecycle management.
|
|
560
|
+
*
|
|
561
|
+
* Usage:
|
|
562
|
+
* ```ts
|
|
563
|
+
* const sw = new ClientServiceWorker({ swUrl: "/sw.js" });
|
|
564
|
+
* await sw.register();
|
|
565
|
+
*
|
|
566
|
+
* if (sw.active) {
|
|
567
|
+
* sw.postMessage({ type: "sync" });
|
|
568
|
+
* }
|
|
569
|
+
* ```
|
|
570
|
+
*/
|
|
571
|
+
type ServiceWorkerStatus = "unsupported" | "unregistered" | "registering" | "active" | "error";
|
|
572
|
+
interface ClientSwOptions {
|
|
573
|
+
/** Called when the status changes. */
|
|
574
|
+
onStatusChange?: (status: ServiceWorkerStatus) => void;
|
|
575
|
+
/** Optional registration scope. Defaults to `/`. */
|
|
576
|
+
scope?: string;
|
|
577
|
+
/** URL of the service worker script (relative to origin). */
|
|
578
|
+
swUrl: string;
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Manages service-worker registration and provides a simple API for
|
|
582
|
+
* sending messages and listening for responses.
|
|
583
|
+
*/
|
|
584
|
+
declare class ClientServiceWorker {
|
|
585
|
+
#private;
|
|
586
|
+
readonly swUrl: string;
|
|
587
|
+
readonly scope: string;
|
|
588
|
+
constructor(options: ClientSwOptions);
|
|
589
|
+
/** Current registration status. */
|
|
590
|
+
get status(): ServiceWorkerStatus;
|
|
591
|
+
/** The underlying `ServiceWorkerRegistration`, if registered. */
|
|
592
|
+
get registration(): ServiceWorkerRegistration | undefined;
|
|
593
|
+
/** Whether the SW is currently controlling this page. */
|
|
594
|
+
get active(): boolean;
|
|
595
|
+
/**
|
|
596
|
+
* Register the service worker.
|
|
597
|
+
*
|
|
598
|
+
* Returns `false` when the browser does not support service workers.
|
|
599
|
+
*/
|
|
600
|
+
register(): Promise<boolean>;
|
|
601
|
+
/**
|
|
602
|
+
* Remove the active service worker registration and clear listeners.
|
|
603
|
+
*
|
|
604
|
+
* Returns `false` when no registration is currently held.
|
|
605
|
+
*/
|
|
606
|
+
unregister(): Promise<boolean>;
|
|
607
|
+
/**
|
|
608
|
+
* Send a message to the active service worker.
|
|
609
|
+
*/
|
|
610
|
+
postMessage(message: unknown): void;
|
|
611
|
+
/**
|
|
612
|
+
* Register a handler for messages **from** the service worker.
|
|
613
|
+
* @returns Unsubscribe function.
|
|
614
|
+
*/
|
|
615
|
+
onMessage(handler: (event: MessageEvent) => void): () => void;
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Outbound message from the client to the SW.
|
|
619
|
+
*/
|
|
620
|
+
interface ClientToSwMessage {
|
|
621
|
+
/** Opaque correlation ID for request/response patterns. */
|
|
622
|
+
correlationId?: string;
|
|
623
|
+
payload?: unknown;
|
|
624
|
+
type: string;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* Inbound message from the SW to the client.
|
|
628
|
+
*/
|
|
629
|
+
interface SwToClientMessage {
|
|
630
|
+
/** Echoes the correlation ID from the client request, if any. */
|
|
631
|
+
correlationId?: string;
|
|
632
|
+
payload?: unknown;
|
|
633
|
+
type: string;
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* Send a typed message to the service worker and optionally await a
|
|
637
|
+
* matching response.
|
|
638
|
+
* @returns A promise that resolves when the SW sends a reply with the
|
|
639
|
+
* same `correlationId` (if `expectResponse` is true).
|
|
640
|
+
*/
|
|
641
|
+
declare const sendToSw: (sw: ServiceWorker | null, message: ClientToSwMessage, expectResponse?: boolean) => Promise<unknown>;
|
|
642
|
+
/**
|
|
643
|
+
* Create a reply for a client message (call from inside the SW).
|
|
644
|
+
*/
|
|
645
|
+
declare const createReply: (original: ClientToSwMessage, payload?: unknown) => SwToClientMessage;
|
|
646
|
+
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 PersistenceAdapter, type QueryCacheAdapter, type QueuedMutation, type ReconnectCalculator, type ReconnectOptions, type ReturnOf, type ServiceWorkerStatus, type StreamIterable, type SubscriptionError, type SwToClientMessage, TabCoordinator, applyDelta, createAsyncStoragePersistence, createInMemoryBookmarkStorage, createInMemoryPersistence, createInMemoryQueryCache, createIndexedDbPersistence, createIndexedDbQueryCache, createMutationRunner, createMutatorRunner, createReconnect, createReply, createSnapshotPrecondition, httpStream, isMutationDelta, queryCacheKey, sendToSw };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as PersistenceAdapter, B as BookmarkStorage, F as FunctionReference, A as ArgsOf, M as MutationCallOptions, R as ReturnOf, O as OfflineQueueOptions, Q as QueryCacheAdapter,
|
|
2
|
-
export { type
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-
|
|
1
|
+
import { c as PersistenceAdapter, B as BookmarkStorage, S as SubscriptionError, H as HttpStreamRef, d as HttpStreamArgsOf, e as HttpStreamChunkOf, f as StreamIterable, F as FunctionReference, A as ArgsOf, M as MutationCallOptions, R as ReturnOf, O as OfflineQueueOptions, Q as QueryCacheAdapter, g as ReconnectOptions, L as LunoraClient } from "./packem_shared/lunora-client.d-JvtVpf8A.js";
|
|
2
|
+
export { type h as BatchSlot, C as CONFLICT_ERROR_CODE, type i as CachedQuery, type j as ClientMessage, type k as ClientQueryRef, type l as ClientShapeSubscribeMessage, type m as ClientShapeUnsubscribeMessage, type n as ConnectionStatus, D as DEFAULT_MAX_BUFFER, type o as FunctionArgumentDescriptor, type p as FunctionDescriptor, type G as GlobalFacetResult, type q as GlobalFacetValue, type r as GlobalFilterClause, type s as GlobalTableInfo, type t as GlobalTablePage, type u as HttpStreamCallArgs, type v as LunoraClientError, type w as LunoraClientOptions, type x as LunoraErrorCode, type y as MutationSettledEvent, type z as OptimisticLocalStore, type E as OptimisticUpdate, type I as OutboxMutation, type J as OutboxSink, type K as PersistedMutation, type P as Preloaded, type N as RowOp, type T as RpcEnvelope, type V as RpcResponseBody, type W as ScheduleRecord, type X as SchedulerPoolStatus, type Y as SchedulerStatus, type Z as ServerMessage, type _ as ServerPokeEndMessage, type $ as ServerPokePartMessage, type a0 as ServerPokeStartMessage, type a1 as ShardTrafficEntry, type a2 as ShardTrafficResult, type a3 as StorageListPage, type a4 as StorageObject, type a5 as StreamHandle, type a6 as SubscriptionCallback, type b as SubscriptionErrorCallback, a7 as SubscriptionRegistry, type a8 as SubscriptionState, type a9 as SyncWatermark, type a as Unsubscribe, type U as User, type aa as WorkflowInstanceAction, type ab as WorkflowInstanceDetail, type ac as WorkflowInstancePage, type ad as WorkflowInstanceStatus, type ae as WorkflowInstanceSummary, type af as WorkflowStepDetail, type ag as WsTokenProvider, ah as createClientQuery, ai as createLocalStore, aj as createStream, ak as getErrorCode, al as getRetryAfterMs, am as isConflictError, an as isForbiddenError, ao as isRateLimitedError, ap as isUnauthorizedError } from "./packem_shared/lunora-client.d-JvtVpf8A.js";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-C4_d_l5v.js";
|
|
4
4
|
export type { AuthCapabilities, AuthConfigInfo, AuthImpersonation, AuthPage, AuthSession, AuthUser, AuthUserFieldSpec, CronJobInfo, KvKeyEntry, KvKeyListResult, KvNamespaceSummary, KvValueResult, VectorIndexSummary, VectorQueryMatch } from '@lunora/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* The slice of React Native's `AsyncStorage` (or any async key/value store —
|
|
@@ -33,6 +33,92 @@ interface AsyncStoragePersistenceOptions {
|
|
|
33
33
|
declare const createAsyncStoragePersistence: (options: AsyncStoragePersistenceOptions) => PersistenceAdapter;
|
|
34
34
|
/** Default in-memory bookmark store. Survives the lifetime of the client. */
|
|
35
35
|
declare const createInMemoryBookmarkStorage: () => BookmarkStorage;
|
|
36
|
+
interface TabCoordinatorOptions {
|
|
37
|
+
/**
|
|
38
|
+
* BroadcastChannel name. Defaults to `"lunora-bridge"`.
|
|
39
|
+
*/
|
|
40
|
+
channelName?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Interval (ms) between leader heartbeats. Defaults to 1000.
|
|
43
|
+
*/
|
|
44
|
+
heartbeatInterval?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Milliseconds without a heartbeat to consider the leader dead. Must be
|
|
47
|
+
* larger than `heartbeatInterval`. Defaults to 3000.
|
|
48
|
+
*/
|
|
49
|
+
leaderTimeout?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Called when this tab becomes the leader (should open WS connections).
|
|
52
|
+
*/
|
|
53
|
+
onBecomeLeader?: () => void;
|
|
54
|
+
/**
|
|
55
|
+
* Called when this tab loses leadership (should close WS connections).
|
|
56
|
+
*/
|
|
57
|
+
onStopBeingLeader?: () => void;
|
|
58
|
+
/**
|
|
59
|
+
* Called when the leader broadcasts subscription data.
|
|
60
|
+
*/
|
|
61
|
+
onSubscriptionData?: (key: string, data: unknown) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Called when the leader broadcasts a subscription error.
|
|
64
|
+
*/
|
|
65
|
+
onSubscriptionError?: (key: string, error: SubscriptionError) => void;
|
|
66
|
+
}
|
|
67
|
+
declare class TabCoordinator {
|
|
68
|
+
private readonly bc;
|
|
69
|
+
private readonly tabId;
|
|
70
|
+
private readonly heartbeatInterval;
|
|
71
|
+
private readonly leaderTimeout;
|
|
72
|
+
/** The tab id of the current known leader, or `undefined` if no leader. */
|
|
73
|
+
private knownLeader;
|
|
74
|
+
/** `true` when this tab believes it is the leader. */
|
|
75
|
+
private leader;
|
|
76
|
+
/** `true` once `start()` has been called. */
|
|
77
|
+
private running;
|
|
78
|
+
/** Timestamp of the most recent leader heartbeat. */
|
|
79
|
+
private lastHeartbeat;
|
|
80
|
+
private heartbeatTimer;
|
|
81
|
+
private leaderCheckTimer;
|
|
82
|
+
/** Callbacks set via constructor options. */
|
|
83
|
+
private readonly onBecomeLeader;
|
|
84
|
+
private readonly onStopBeingLeader;
|
|
85
|
+
private readonly onSubscriptionData;
|
|
86
|
+
private readonly onSubscriptionError;
|
|
87
|
+
constructor(options?: TabCoordinatorOptions);
|
|
88
|
+
/**
|
|
89
|
+
* Start the coordinator: attempt to claim leadership and begin the
|
|
90
|
+
* heartbeat/leader-check cycle. Safe to call multiple times.
|
|
91
|
+
*/
|
|
92
|
+
start(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Stop the coordinator: yield leadership (if held), close the channel, and
|
|
95
|
+
* clear all timers. Safe to call multiple times.
|
|
96
|
+
*/
|
|
97
|
+
stop(): void;
|
|
98
|
+
/** `true` when this tab is the current WebSocket leader. */
|
|
99
|
+
isLeader(): boolean;
|
|
100
|
+
/** The tab id of the current leader, or `undefined` if unknown / no leader. */
|
|
101
|
+
get leaderTabId(): string | undefined;
|
|
102
|
+
/** The id of this tab. */
|
|
103
|
+
get id(): string;
|
|
104
|
+
/** `true` when the coordinator has been started and is not yet stopped. */
|
|
105
|
+
get isRunning(): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Broadcast subscription data to all follower tabs. Only the leader should
|
|
108
|
+
* call this.
|
|
109
|
+
*/
|
|
110
|
+
broadcastSubscriptionData(key: string, data: unknown): void;
|
|
111
|
+
/**
|
|
112
|
+
* Broadcast a subscription error to all follower tabs. Only the leader
|
|
113
|
+
* should call this.
|
|
114
|
+
*/
|
|
115
|
+
broadcastSubscriptionError(key: string, error: SubscriptionError): void;
|
|
116
|
+
private broadcast;
|
|
117
|
+
private handleMessage;
|
|
118
|
+
private becomeLeader;
|
|
119
|
+
private sendHeartbeat;
|
|
120
|
+
private checkLeaderHealth;
|
|
121
|
+
}
|
|
36
122
|
/**
|
|
37
123
|
* Client-side incremental merging of structured mutation deltas.
|
|
38
124
|
*
|
|
@@ -95,6 +181,43 @@ declare const isMutationDelta: (value: unknown) => value is MutationDelta;
|
|
|
95
181
|
* when an `insert`/`update` delta carries no `row` to splice in.
|
|
96
182
|
*/
|
|
97
183
|
declare const applyDelta: (current: unknown, delta: MutationDelta) => undefined | unknown[];
|
|
184
|
+
/**
|
|
185
|
+
* Options accepted by {@link httpStream}.
|
|
186
|
+
* @experimental Part of the HTTP-SSE stream surface.
|
|
187
|
+
*/
|
|
188
|
+
interface HttpStreamOptions {
|
|
189
|
+
/**
|
|
190
|
+
* Origin (or origin + prefix) the route path is appended to, e.g.
|
|
191
|
+
* `https://my-app.example.com`. Defaults to `""` — a relative URL, which
|
|
192
|
+
* resolves against the page origin in a browser.
|
|
193
|
+
*/
|
|
194
|
+
baseUrl?: string;
|
|
195
|
+
/** `fetch` implementation override; defaults to the global `fetch`. */
|
|
196
|
+
fetch?: typeof fetch;
|
|
197
|
+
/** Extra request headers (e.g. `authorization`). `accept: text/event-stream` is always sent. */
|
|
198
|
+
headers?: Record<string, string>;
|
|
199
|
+
/** Caps the in-flight chunk buffer (see `createStream`); exceeding it fails the stream. */
|
|
200
|
+
maxBuffer?: number;
|
|
201
|
+
/** External abort signal — aborting it cancels the fetch (→ the server handler's `signal`). */
|
|
202
|
+
signal?: AbortSignal;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Open a typed HTTP-SSE stream route and iterate its chunks:
|
|
206
|
+
*
|
|
207
|
+
* ```ts
|
|
208
|
+
* const stream = httpStream(httpStreams.http.tokens, { searchParams: { prompt } }, { baseUrl });
|
|
209
|
+
* for await (const token of stream) {
|
|
210
|
+
* render(token); // typed as the route handler's yielded chunk
|
|
211
|
+
* }
|
|
212
|
+
* ```
|
|
213
|
+
*
|
|
214
|
+
* The returned iterable terminates when the server writes `event: complete`;
|
|
215
|
+
* an `event: error` frame (or a transport failure) surfaces as a coded
|
|
216
|
+
* rejection on the next `next()`. `.cancel()` — or aborting `options.signal` —
|
|
217
|
+
* aborts the underlying fetch, which the server observes via `request.signal`.
|
|
218
|
+
* @experimental Reconnect/POST-body/wire-fidelity design questions are still open, so the shape may change.
|
|
219
|
+
*/
|
|
220
|
+
declare const httpStream: <Ref extends HttpStreamRef>(route: Ref, args?: HttpStreamArgsOf<Ref>, options?: HttpStreamOptions) => StreamIterable<HttpStreamChunkOf<Ref>>;
|
|
98
221
|
/** The single transport method a mutation runner needs — narrowed so adapters can test against a stub. */
|
|
99
222
|
interface MutationCapableClient<F extends FunctionReference> {
|
|
100
223
|
mutation: (function_: F, args: ArgsOf<F>, options?: MutationCallOptions<unknown, unknown, ArgsOf<F>>) => Promise<ReturnOf<F>>;
|
|
@@ -202,6 +325,14 @@ interface QueuedMutation<T = unknown> {
|
|
|
202
325
|
* Absent on hydrated records (the optimistic write lived in a prior session).
|
|
203
326
|
*/
|
|
204
327
|
readonly onCommit?: (commitCursor: number | undefined) => void;
|
|
328
|
+
/**
|
|
329
|
+
* Optional sync predicate evaluated just before replay. When it returns
|
|
330
|
+
* `false` the write is dropped instead of replaying, handling the case
|
|
331
|
+
* where the mutation's preconditions are no longer valid (e.g. the
|
|
332
|
+
* document it referred to was deleted while offline). Absent or `true`
|
|
333
|
+
* means "ok to replay".
|
|
334
|
+
*/
|
|
335
|
+
readonly precondition?: () => boolean;
|
|
205
336
|
/** Rejects if the mutation can no longer be replayed. */
|
|
206
337
|
readonly reject: (error: unknown) => void;
|
|
207
338
|
/** Resolves once the mutation has been replayed against the server. */
|
|
@@ -288,6 +419,16 @@ declare class OfflineQueue {
|
|
|
288
419
|
* transport failure: the unreplayed writes stay queued for the next reconnect.
|
|
289
420
|
*/
|
|
290
421
|
requeue(items: QueuedMutation[]): void;
|
|
422
|
+
/**
|
|
423
|
+
* Remove mutations whose precondition evaluates to `false` (stale/dirty
|
|
424
|
+
* writes that should not replay) and reject each with an
|
|
425
|
+
* `OFFLINE_PRECONDITION_FAILED` error. The valid (admitted) mutations stay
|
|
426
|
+
* queued in FIFO order. Returns the drained stale entries.
|
|
427
|
+
*
|
|
428
|
+
* Called during reconnect before the flush cycle to weed out writes whose
|
|
429
|
+
* assumptions no longer hold (e.g. a document was deleted by another client).
|
|
430
|
+
*/
|
|
431
|
+
drainConflict(): QueuedMutation[];
|
|
291
432
|
clear(): void;
|
|
292
433
|
/** Notify the size observer (the client's pending-sync count) after any change. */
|
|
293
434
|
private notifySize;
|
|
@@ -398,4 +539,108 @@ interface ReconnectCalculator {
|
|
|
398
539
|
reset: () => void;
|
|
399
540
|
}
|
|
400
541
|
declare const createReconnect: (options?: ReconnectOptions, random?: () => number) => ReconnectCalculator;
|
|
401
|
-
|
|
542
|
+
/**
|
|
543
|
+
* Capture a snapshot of the current live query value at call time and produce a
|
|
544
|
+
* `() => boolean` precondition that compares it against the value at replay time.
|
|
545
|
+
*
|
|
546
|
+
* When the precondition is checked (on queue drain / reconnect) it re-reads the
|
|
547
|
+
* query's current value via {@link LunoraClient.peekActiveQueryValue}. If the
|
|
548
|
+
* value differs from what was captured at call time the precondition returns
|
|
549
|
+
* `false` and the offline mutation is dropped as stale.
|
|
550
|
+
* @example
|
|
551
|
+
* ```ts
|
|
552
|
+
* client.mutation(api.todos.update, { id, text }, {
|
|
553
|
+
* precondition: createSnapshotPrecondition(client, api.todos.list, { userId }),
|
|
554
|
+
* });
|
|
555
|
+
* ```
|
|
556
|
+
*/
|
|
557
|
+
declare const createSnapshotPrecondition: (client: LunoraClient, functionRef: FunctionReference, args: Record<string, unknown>, shardKey?: string) => (() => boolean);
|
|
558
|
+
/**
|
|
559
|
+
* Client-side service-worker registration and lifecycle management.
|
|
560
|
+
*
|
|
561
|
+
* Usage:
|
|
562
|
+
* ```ts
|
|
563
|
+
* const sw = new ClientServiceWorker({ swUrl: "/sw.js" });
|
|
564
|
+
* await sw.register();
|
|
565
|
+
*
|
|
566
|
+
* if (sw.active) {
|
|
567
|
+
* sw.postMessage({ type: "sync" });
|
|
568
|
+
* }
|
|
569
|
+
* ```
|
|
570
|
+
*/
|
|
571
|
+
type ServiceWorkerStatus = "unsupported" | "unregistered" | "registering" | "active" | "error";
|
|
572
|
+
interface ClientSwOptions {
|
|
573
|
+
/** Called when the status changes. */
|
|
574
|
+
onStatusChange?: (status: ServiceWorkerStatus) => void;
|
|
575
|
+
/** Optional registration scope. Defaults to `/`. */
|
|
576
|
+
scope?: string;
|
|
577
|
+
/** URL of the service worker script (relative to origin). */
|
|
578
|
+
swUrl: string;
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Manages service-worker registration and provides a simple API for
|
|
582
|
+
* sending messages and listening for responses.
|
|
583
|
+
*/
|
|
584
|
+
declare class ClientServiceWorker {
|
|
585
|
+
#private;
|
|
586
|
+
readonly swUrl: string;
|
|
587
|
+
readonly scope: string;
|
|
588
|
+
constructor(options: ClientSwOptions);
|
|
589
|
+
/** Current registration status. */
|
|
590
|
+
get status(): ServiceWorkerStatus;
|
|
591
|
+
/** The underlying `ServiceWorkerRegistration`, if registered. */
|
|
592
|
+
get registration(): ServiceWorkerRegistration | undefined;
|
|
593
|
+
/** Whether the SW is currently controlling this page. */
|
|
594
|
+
get active(): boolean;
|
|
595
|
+
/**
|
|
596
|
+
* Register the service worker.
|
|
597
|
+
*
|
|
598
|
+
* Returns `false` when the browser does not support service workers.
|
|
599
|
+
*/
|
|
600
|
+
register(): Promise<boolean>;
|
|
601
|
+
/**
|
|
602
|
+
* Remove the active service worker registration and clear listeners.
|
|
603
|
+
*
|
|
604
|
+
* Returns `false` when no registration is currently held.
|
|
605
|
+
*/
|
|
606
|
+
unregister(): Promise<boolean>;
|
|
607
|
+
/**
|
|
608
|
+
* Send a message to the active service worker.
|
|
609
|
+
*/
|
|
610
|
+
postMessage(message: unknown): void;
|
|
611
|
+
/**
|
|
612
|
+
* Register a handler for messages **from** the service worker.
|
|
613
|
+
* @returns Unsubscribe function.
|
|
614
|
+
*/
|
|
615
|
+
onMessage(handler: (event: MessageEvent) => void): () => void;
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Outbound message from the client to the SW.
|
|
619
|
+
*/
|
|
620
|
+
interface ClientToSwMessage {
|
|
621
|
+
/** Opaque correlation ID for request/response patterns. */
|
|
622
|
+
correlationId?: string;
|
|
623
|
+
payload?: unknown;
|
|
624
|
+
type: string;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* Inbound message from the SW to the client.
|
|
628
|
+
*/
|
|
629
|
+
interface SwToClientMessage {
|
|
630
|
+
/** Echoes the correlation ID from the client request, if any. */
|
|
631
|
+
correlationId?: string;
|
|
632
|
+
payload?: unknown;
|
|
633
|
+
type: string;
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* Send a typed message to the service worker and optionally await a
|
|
637
|
+
* matching response.
|
|
638
|
+
* @returns A promise that resolves when the SW sends a reply with the
|
|
639
|
+
* same `correlationId` (if `expectResponse` is true).
|
|
640
|
+
*/
|
|
641
|
+
declare const sendToSw: (sw: ServiceWorker | null, message: ClientToSwMessage, expectResponse?: boolean) => Promise<unknown>;
|
|
642
|
+
/**
|
|
643
|
+
* Create a reply for a client message (call from inside the SW).
|
|
644
|
+
*/
|
|
645
|
+
declare const createReply: (original: ClientToSwMessage, payload?: unknown) => SwToClientMessage;
|
|
646
|
+
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 PersistenceAdapter, type QueryCacheAdapter, type QueuedMutation, type ReconnectCalculator, type ReconnectOptions, type ReturnOf, type ServiceWorkerStatus, type StreamIterable, type SubscriptionError, type SwToClientMessage, TabCoordinator, applyDelta, createAsyncStoragePersistence, createInMemoryBookmarkStorage, createInMemoryPersistence, createInMemoryQueryCache, createIndexedDbPersistence, createIndexedDbQueryCache, createMutationRunner, createMutatorRunner, createReconnect, createReply, createSnapshotPrecondition, httpStream, isMutationDelta, queryCacheKey, sendToSw };
|
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
export { createAsyncStoragePersistence } from './packem_shared/createAsyncStoragePersistence-1Z5BZ8RC.mjs';
|
|
2
2
|
export { default as createInMemoryBookmarkStorage } from './packem_shared/createInMemoryBookmarkStorage-BoN7a7TH.mjs';
|
|
3
|
+
export { createClientQuery } from './packem_shared/createClientQuery-CQ51bWAE.mjs';
|
|
4
|
+
export { TabCoordinator } from './packem_shared/TabCoordinator-BwRR8H06.mjs';
|
|
3
5
|
export { applyDelta, isMutationDelta } from './packem_shared/applyDelta-CRKZ1PBt.mjs';
|
|
4
6
|
export { CONFLICT_ERROR_CODE, getErrorCode, getRetryAfterMs, isConflictError, isForbiddenError, isRateLimitedError, isUnauthorizedError } from './packem_shared/CONFLICT_ERROR_CODE-B8gQ8tyU.mjs';
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
+
export { httpStream } from './packem_shared/httpStream-BJU-aflc.mjs';
|
|
8
|
+
export { c as createLocalStore } from './packem_shared/local-store-DIq-UWfD.mjs';
|
|
9
|
+
export { LunoraClient } from './packem_shared/LunoraClient-BBCQjjbl.mjs';
|
|
7
10
|
export { createMutationRunner } from './packem_shared/createMutationRunner-BqsavzvG.mjs';
|
|
8
11
|
export { createMutatorRunner } from './packem_shared/createMutatorRunner-BETvCd0p.mjs';
|
|
9
|
-
export { O as OfflineQueue } from './packem_shared/offline-queue-
|
|
12
|
+
export { O as OfflineQueue } from './packem_shared/offline-queue-CF4_Co5k.mjs';
|
|
10
13
|
export { createInMemoryPersistence, createIndexedDbPersistence } from './packem_shared/createInMemoryPersistence-DZ2VHWgm.mjs';
|
|
11
14
|
export { preloadQuery, preloadedQueryResult } from './packem_shared/preloadQuery-lobFkD2Z.mjs';
|
|
12
15
|
export { createInMemoryQueryCache, createIndexedDbQueryCache, queryCacheKey } from './packem_shared/createInMemoryQueryCache-DiaGZkA2.mjs';
|
|
13
16
|
export { createReconnect } from './packem_shared/createReconnect-Di_-oHH7.mjs';
|
|
17
|
+
export { default as createSnapshotPrecondition } from './packem_shared/createSnapshotPrecondition-CxQ1T4ZP.mjs';
|
|
14
18
|
export { DEFAULT_MAX_BUFFER, createStream } from './packem_shared/DEFAULT_MAX_BUFFER-7hFnzNk9.mjs';
|
|
15
|
-
export {
|
|
19
|
+
export { SubscriptionRegistry } from './packem_shared/SubscriptionRegistry-CxS_Inha.mjs';
|
|
20
|
+
export { ClientServiceWorker } from './packem_shared/ClientServiceWorker-C3PAFwy0.mjs';
|
|
21
|
+
export { createReply, sendToSw } from './packem_shared/createReply-lI4tVS2w.mjs';
|