@lunora/client 1.0.0-alpha.10 → 1.0.0-alpha.11
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 +30 -3
- package/dist/index.d.ts +30 -3
- package/dist/index.mjs +3 -3
- package/dist/packem_shared/{LunoraClient-CgZ6FhKP.mjs → LunoraClient-6J-4BGWK.mjs} +5 -4
- package/dist/packem_shared/{createInMemoryPersistence-CW82inU5.mjs → createInMemoryPersistence-DlFjWtOm.mjs} +13 -1
- package/dist/packem_shared/{createInMemoryQueryCache-B1PQ9Twl.mjs → createInMemoryQueryCache-4AkTV38-.mjs} +13 -1
- package/dist/packem_shared/{createServerClient-BxkNcRlR.mjs → createServerClient-CtklXrs2.mjs} +1 -1
- package/dist/packem_shared/{lunora-client.d-B5vWSgvD.d.mts → lunora-client.d-Dm1BYq19.d.mts} +15 -5
- package/dist/packem_shared/{lunora-client.d-B5vWSgvD.d.ts → lunora-client.d-Dm1BYq19.d.ts} +15 -5
- package/dist/packem_shared/{preload.d-3XJD-2hM.d.mts → preload.d-BfWzGJWV.d.mts} +1 -1
- package/dist/packem_shared/{preload.d-CKZR675M.d.ts → preload.d-Sp_Ef-_u.d.ts} +1 -1
- 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 +1 -1
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-Dm1BYq19.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-Dm1BYq19.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, d as ReconnectOptions } from "./packem_shared/lunora-client.d-
|
|
2
|
-
export { type C as CachedQuery, type e as ClientMessage, type f as ClientShapeSubscribeMessage, type g as ClientShapeUnsubscribeMessage, type h as ConnectionStatus, D as DEFAULT_MAX_BUFFER, type i as FunctionArgumentDescriptor, type j as FunctionDescriptor, type G as GlobalFacetResult, type k as GlobalFacetValue, type l as GlobalFilterClause, type m as GlobalTableInfo, type n as GlobalTablePage, L as LunoraClient, type o as LunoraClientOptions, type p as MutationSettledEvent, type q as OptimisticLocalStore, type r as OptimisticUpdate, type s as OutboxMutation, type t as OutboxSink, type u as PersistedMutation, type P as Preloaded, type v as RowOp, type w as RpcEnvelope, type x as RpcResponseBody, type y as ScheduleRecord, type z as SchedulerPoolStatus, type E as SchedulerStatus, type H as ServerMessage, type I as ServerPokeEndMessage, type J as ServerPokePartMessage, type K as ServerPokeStartMessage, type N as ShardTrafficEntry, type T as ShardTrafficResult, type V as StorageListPage, type W as StorageObject, type X as StreamHandle, type Y as StreamIterable, type Z as SubscriptionCallback, type S as SubscriptionError, type b as SubscriptionErrorCallback, _ as SubscriptionRegistry, type $ as SubscriptionState, type a0 as SyncWatermark, type a as Unsubscribe, type U as User, type a1 as WorkflowInstanceAction, type a2 as WorkflowInstanceDetail, type a3 as WorkflowInstancePage, type a4 as WorkflowInstanceStatus, type a5 as WorkflowInstanceSummary, type a6 as WorkflowStepDetail, a7 as createLocalStore, a8 as createStream } from "./packem_shared/lunora-client.d-
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-
|
|
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, d as ReconnectOptions } from "./packem_shared/lunora-client.d-Dm1BYq19.mjs";
|
|
2
|
+
export { type C as CachedQuery, type e as ClientMessage, type f as ClientShapeSubscribeMessage, type g as ClientShapeUnsubscribeMessage, type h as ConnectionStatus, D as DEFAULT_MAX_BUFFER, type i as FunctionArgumentDescriptor, type j as FunctionDescriptor, type G as GlobalFacetResult, type k as GlobalFacetValue, type l as GlobalFilterClause, type m as GlobalTableInfo, type n as GlobalTablePage, L as LunoraClient, type o as LunoraClientOptions, type p as MutationSettledEvent, type q as OptimisticLocalStore, type r as OptimisticUpdate, type s as OutboxMutation, type t as OutboxSink, type u as PersistedMutation, type P as Preloaded, type v as RowOp, type w as RpcEnvelope, type x as RpcResponseBody, type y as ScheduleRecord, type z as SchedulerPoolStatus, type E as SchedulerStatus, type H as ServerMessage, type I as ServerPokeEndMessage, type J as ServerPokePartMessage, type K as ServerPokeStartMessage, type N as ShardTrafficEntry, type T as ShardTrafficResult, type V as StorageListPage, type W as StorageObject, type X as StreamHandle, type Y as StreamIterable, type Z as SubscriptionCallback, type S as SubscriptionError, type b as SubscriptionErrorCallback, _ as SubscriptionRegistry, type $ as SubscriptionState, type a0 as SyncWatermark, type a as Unsubscribe, type U as User, type a1 as WorkflowInstanceAction, type a2 as WorkflowInstanceDetail, type a3 as WorkflowInstancePage, type a4 as WorkflowInstanceStatus, type a5 as WorkflowInstanceSummary, type a6 as WorkflowStepDetail, a7 as createLocalStore, a8 as createStream } from "./packem_shared/lunora-client.d-Dm1BYq19.mjs";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-BfWzGJWV.mjs";
|
|
4
4
|
export type { AuthCapabilities, AuthImpersonation, AuthPage, AuthSession, AuthUser, CronJobInfo, VectorIndexSummary, VectorQueryMatch } from '@lunora/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* The slice of React Native's `AsyncStorage` (or any async key/value store —
|
|
@@ -329,6 +329,24 @@ interface IndexedDbPersistenceOptions {
|
|
|
329
329
|
*/
|
|
330
330
|
declare const createIndexedDbPersistence: (options?: IndexedDbPersistenceOptions) => PersistenceAdapter;
|
|
331
331
|
/**
|
|
332
|
+
* Resolve the effective offline-queue persistence from the user option,
|
|
333
|
+
* defaulting to a durable IndexedDB store when the environment supports one.
|
|
334
|
+
*
|
|
335
|
+
* An explicit adapter is used as-is; `false` opts out (the caller keeps an
|
|
336
|
+
* in-memory queue, lost on reload); `undefined` (the default) auto-probes
|
|
337
|
+
* IndexedDB when the global is present (browsers) and `autoProbe` is set,
|
|
338
|
+
* otherwise `undefined` — so SSR/Node/React-Native keep today's in-memory
|
|
339
|
+
* behaviour and only environments that can persist do.
|
|
340
|
+
*
|
|
341
|
+
* `autoProbe` is `false` when the `@lunora/db` outbox is wired: that sink is the
|
|
342
|
+
* single durable write path, so the built-in queue must stay in memory rather
|
|
343
|
+
* than persist a second, never-flushed copy. An explicit adapter is still
|
|
344
|
+
* honoured (the caller asked for it); only the implicit default is suppressed.
|
|
345
|
+
*
|
|
346
|
+
* The IndexedDB adapter opens its connection lazily, so constructing it here is
|
|
347
|
+
* cheap and never throws (the `indexedDB` global is verified present first).
|
|
348
|
+
*/
|
|
349
|
+
/**
|
|
332
350
|
* Compose the read-cache key for a subscription. Mirrors how
|
|
333
351
|
* `SubscriptionRegistry` keys live subscriptions so a hydrated value lines up
|
|
334
352
|
* with the subscription that will consume it. `shardKey` defaults to `""` (the
|
|
@@ -369,6 +387,15 @@ interface IndexedDbQueryCacheOptions {
|
|
|
369
387
|
*/
|
|
370
388
|
declare const createIndexedDbQueryCache: (options?: IndexedDbQueryCacheOptions) => QueryCacheAdapter;
|
|
371
389
|
/**
|
|
390
|
+
* Resolve the effective read-cache from the user option, defaulting to a durable
|
|
391
|
+
* IndexedDB store when the environment supports one. Same tri-state semantics as
|
|
392
|
+
* `resolvePersistenceAdapter` in `./persistence`:
|
|
393
|
+
*
|
|
394
|
+
* - an explicit adapter is used as-is;
|
|
395
|
+
* - `false` opts out — reads stay in memory only;
|
|
396
|
+
* - `undefined` (the default) auto-probes IndexedDB (browsers), else `undefined`.
|
|
397
|
+
*/
|
|
398
|
+
/**
|
|
372
399
|
* Exponential backoff calculator with optional jitter.
|
|
373
400
|
*
|
|
374
401
|
* `next()` doubles the delay each call up to `maxDelayMs`. When `jitter` is
|
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, d as ReconnectOptions } from "./packem_shared/lunora-client.d-
|
|
2
|
-
export { type C as CachedQuery, type e as ClientMessage, type f as ClientShapeSubscribeMessage, type g as ClientShapeUnsubscribeMessage, type h as ConnectionStatus, D as DEFAULT_MAX_BUFFER, type i as FunctionArgumentDescriptor, type j as FunctionDescriptor, type G as GlobalFacetResult, type k as GlobalFacetValue, type l as GlobalFilterClause, type m as GlobalTableInfo, type n as GlobalTablePage, L as LunoraClient, type o as LunoraClientOptions, type p as MutationSettledEvent, type q as OptimisticLocalStore, type r as OptimisticUpdate, type s as OutboxMutation, type t as OutboxSink, type u as PersistedMutation, type P as Preloaded, type v as RowOp, type w as RpcEnvelope, type x as RpcResponseBody, type y as ScheduleRecord, type z as SchedulerPoolStatus, type E as SchedulerStatus, type H as ServerMessage, type I as ServerPokeEndMessage, type J as ServerPokePartMessage, type K as ServerPokeStartMessage, type N as ShardTrafficEntry, type T as ShardTrafficResult, type V as StorageListPage, type W as StorageObject, type X as StreamHandle, type Y as StreamIterable, type Z as SubscriptionCallback, type S as SubscriptionError, type b as SubscriptionErrorCallback, _ as SubscriptionRegistry, type $ as SubscriptionState, type a0 as SyncWatermark, type a as Unsubscribe, type U as User, type a1 as WorkflowInstanceAction, type a2 as WorkflowInstanceDetail, type a3 as WorkflowInstancePage, type a4 as WorkflowInstanceStatus, type a5 as WorkflowInstanceSummary, type a6 as WorkflowStepDetail, a7 as createLocalStore, a8 as createStream } from "./packem_shared/lunora-client.d-
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-
|
|
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, d as ReconnectOptions } from "./packem_shared/lunora-client.d-Dm1BYq19.js";
|
|
2
|
+
export { type C as CachedQuery, type e as ClientMessage, type f as ClientShapeSubscribeMessage, type g as ClientShapeUnsubscribeMessage, type h as ConnectionStatus, D as DEFAULT_MAX_BUFFER, type i as FunctionArgumentDescriptor, type j as FunctionDescriptor, type G as GlobalFacetResult, type k as GlobalFacetValue, type l as GlobalFilterClause, type m as GlobalTableInfo, type n as GlobalTablePage, L as LunoraClient, type o as LunoraClientOptions, type p as MutationSettledEvent, type q as OptimisticLocalStore, type r as OptimisticUpdate, type s as OutboxMutation, type t as OutboxSink, type u as PersistedMutation, type P as Preloaded, type v as RowOp, type w as RpcEnvelope, type x as RpcResponseBody, type y as ScheduleRecord, type z as SchedulerPoolStatus, type E as SchedulerStatus, type H as ServerMessage, type I as ServerPokeEndMessage, type J as ServerPokePartMessage, type K as ServerPokeStartMessage, type N as ShardTrafficEntry, type T as ShardTrafficResult, type V as StorageListPage, type W as StorageObject, type X as StreamHandle, type Y as StreamIterable, type Z as SubscriptionCallback, type S as SubscriptionError, type b as SubscriptionErrorCallback, _ as SubscriptionRegistry, type $ as SubscriptionState, type a0 as SyncWatermark, type a as Unsubscribe, type U as User, type a1 as WorkflowInstanceAction, type a2 as WorkflowInstanceDetail, type a3 as WorkflowInstancePage, type a4 as WorkflowInstanceStatus, type a5 as WorkflowInstanceSummary, type a6 as WorkflowStepDetail, a7 as createLocalStore, a8 as createStream } from "./packem_shared/lunora-client.d-Dm1BYq19.js";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "./packem_shared/preload.d-Sp_Ef-_u.js";
|
|
4
4
|
export type { AuthCapabilities, AuthImpersonation, AuthPage, AuthSession, AuthUser, CronJobInfo, VectorIndexSummary, VectorQueryMatch } from '@lunora/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* The slice of React Native's `AsyncStorage` (or any async key/value store —
|
|
@@ -329,6 +329,24 @@ interface IndexedDbPersistenceOptions {
|
|
|
329
329
|
*/
|
|
330
330
|
declare const createIndexedDbPersistence: (options?: IndexedDbPersistenceOptions) => PersistenceAdapter;
|
|
331
331
|
/**
|
|
332
|
+
* Resolve the effective offline-queue persistence from the user option,
|
|
333
|
+
* defaulting to a durable IndexedDB store when the environment supports one.
|
|
334
|
+
*
|
|
335
|
+
* An explicit adapter is used as-is; `false` opts out (the caller keeps an
|
|
336
|
+
* in-memory queue, lost on reload); `undefined` (the default) auto-probes
|
|
337
|
+
* IndexedDB when the global is present (browsers) and `autoProbe` is set,
|
|
338
|
+
* otherwise `undefined` — so SSR/Node/React-Native keep today's in-memory
|
|
339
|
+
* behaviour and only environments that can persist do.
|
|
340
|
+
*
|
|
341
|
+
* `autoProbe` is `false` when the `@lunora/db` outbox is wired: that sink is the
|
|
342
|
+
* single durable write path, so the built-in queue must stay in memory rather
|
|
343
|
+
* than persist a second, never-flushed copy. An explicit adapter is still
|
|
344
|
+
* honoured (the caller asked for it); only the implicit default is suppressed.
|
|
345
|
+
*
|
|
346
|
+
* The IndexedDB adapter opens its connection lazily, so constructing it here is
|
|
347
|
+
* cheap and never throws (the `indexedDB` global is verified present first).
|
|
348
|
+
*/
|
|
349
|
+
/**
|
|
332
350
|
* Compose the read-cache key for a subscription. Mirrors how
|
|
333
351
|
* `SubscriptionRegistry` keys live subscriptions so a hydrated value lines up
|
|
334
352
|
* with the subscription that will consume it. `shardKey` defaults to `""` (the
|
|
@@ -369,6 +387,15 @@ interface IndexedDbQueryCacheOptions {
|
|
|
369
387
|
*/
|
|
370
388
|
declare const createIndexedDbQueryCache: (options?: IndexedDbQueryCacheOptions) => QueryCacheAdapter;
|
|
371
389
|
/**
|
|
390
|
+
* Resolve the effective read-cache from the user option, defaulting to a durable
|
|
391
|
+
* IndexedDB store when the environment supports one. Same tri-state semantics as
|
|
392
|
+
* `resolvePersistenceAdapter` in `./persistence`:
|
|
393
|
+
*
|
|
394
|
+
* - an explicit adapter is used as-is;
|
|
395
|
+
* - `false` opts out — reads stay in memory only;
|
|
396
|
+
* - `undefined` (the default) auto-probes IndexedDB (browsers), else `undefined`.
|
|
397
|
+
*/
|
|
398
|
+
/**
|
|
372
399
|
* Exponential backoff calculator with optional jitter.
|
|
373
400
|
*
|
|
374
401
|
* `next()` doubles the delay each call up to `maxDelayMs`. When `jitter` is
|
package/dist/index.mjs
CHANGED
|
@@ -3,13 +3,13 @@ export { default as createInMemoryBookmarkStorage } from './packem_shared/create
|
|
|
3
3
|
export { applyDelta, isMutationDelta } from './packem_shared/applyDelta-4jFGTPA3.mjs';
|
|
4
4
|
export { CONFLICT_ERROR_CODE, isConflictError } from './packem_shared/CONFLICT_ERROR_CODE-aUdVbEDw.mjs';
|
|
5
5
|
export { c as createLocalStore } from './packem_shared/local-store-BNgN3Dw3.mjs';
|
|
6
|
-
export { LunoraClient } from './packem_shared/LunoraClient-
|
|
6
|
+
export { LunoraClient } from './packem_shared/LunoraClient-6J-4BGWK.mjs';
|
|
7
7
|
export { createMutationRunner } from './packem_shared/createMutationRunner-BqsavzvG.mjs';
|
|
8
8
|
export { createMutatorRunner } from './packem_shared/createMutatorRunner-BETvCd0p.mjs';
|
|
9
9
|
export { O as OfflineQueue } from './packem_shared/offline-queue-7Wc4onA0.mjs';
|
|
10
|
-
export { createInMemoryPersistence, createIndexedDbPersistence } from './packem_shared/createInMemoryPersistence-
|
|
10
|
+
export { createInMemoryPersistence, createIndexedDbPersistence } from './packem_shared/createInMemoryPersistence-DlFjWtOm.mjs';
|
|
11
11
|
export { preloadQuery, preloadedQueryResult } from './packem_shared/preloadQuery-lobFkD2Z.mjs';
|
|
12
|
-
export { createInMemoryQueryCache, createIndexedDbQueryCache, queryCacheKey } from './packem_shared/createInMemoryQueryCache-
|
|
12
|
+
export { createInMemoryQueryCache, createIndexedDbQueryCache, queryCacheKey } from './packem_shared/createInMemoryQueryCache-4AkTV38-.mjs';
|
|
13
13
|
export { createReconnect } from './packem_shared/createReconnect-Di_-oHH7.mjs';
|
|
14
14
|
export { DEFAULT_MAX_BUFFER, createStream } from './packem_shared/DEFAULT_MAX_BUFFER-BDkqO5PW.mjs';
|
|
15
15
|
export { S as SubscriptionRegistry } from './packem_shared/subscription-C1Jy7HiF.mjs';
|
|
@@ -3,7 +3,8 @@ import createInMemoryBookmarkStorage from './createInMemoryBookmarkStorage-BoN7a
|
|
|
3
3
|
import { isMutationDelta, applyDelta } from './applyDelta-4jFGTPA3.mjs';
|
|
4
4
|
import { a as applyOptimisticLayer, d as dropConfirmedLayers, n as notifySubscription, f as foldOptimistic, c as createLocalStore } from './local-store-BNgN3Dw3.mjs';
|
|
5
5
|
import { O as OfflineQueue, n as nextId, i as isStaleVersion, r as reportPersistenceError } from './offline-queue-7Wc4onA0.mjs';
|
|
6
|
-
import {
|
|
6
|
+
import { resolvePersistenceAdapter } from './createInMemoryPersistence-DlFjWtOm.mjs';
|
|
7
|
+
import { resolveQueryCacheAdapter, queryCacheKey } from './createInMemoryQueryCache-4AkTV38-.mjs';
|
|
7
8
|
import { createReconnect } from './createReconnect-Di_-oHH7.mjs';
|
|
8
9
|
import { createStream } from './DEFAULT_MAX_BUFFER-BDkqO5PW.mjs';
|
|
9
10
|
|
|
@@ -319,9 +320,9 @@ class LunoraClient {
|
|
|
319
320
|
this.heartbeatIntervalMs = options.heartbeatIntervalMs ?? DEFAULT_HEARTBEAT_INTERVAL_MS;
|
|
320
321
|
this.connectTimeoutMs = options.connectTimeoutMs ?? DEFAULT_CONNECT_TIMEOUT_MS;
|
|
321
322
|
this.defaultConnectionContext = options.connectionContext;
|
|
322
|
-
this.persistence = options.persistence;
|
|
323
|
+
this.persistence = resolvePersistenceAdapter(options.persistence, options.outbox === void 0);
|
|
323
324
|
this.persistenceVersion = options.persistenceVersion;
|
|
324
|
-
this.queryCache = options.queryCache
|
|
325
|
+
this.queryCache = resolveQueryCacheAdapter(options.queryCache);
|
|
325
326
|
this.onPersistenceError = options.offlineQueue?.onPersistenceError;
|
|
326
327
|
this.offlineQueue = new OfflineQueue(options.offlineQueue, {
|
|
327
328
|
onEvict: (entry, error) => {
|
|
@@ -330,7 +331,7 @@ class LunoraClient {
|
|
|
330
331
|
onSizeChange: (size) => {
|
|
331
332
|
this.pendingChangeListeners.emit(size);
|
|
332
333
|
},
|
|
333
|
-
persistence:
|
|
334
|
+
persistence: this.persistence,
|
|
334
335
|
version: options.persistenceVersion
|
|
335
336
|
});
|
|
336
337
|
this.outbox = options.outbox;
|
|
@@ -101,5 +101,17 @@ const createIndexedDbPersistence = (options = {}) => {
|
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
};
|
|
104
|
+
const resolvePersistenceAdapter = (option, autoProbe = true) => {
|
|
105
|
+
if (option === false) {
|
|
106
|
+
return void 0;
|
|
107
|
+
}
|
|
108
|
+
if (option) {
|
|
109
|
+
return option;
|
|
110
|
+
}
|
|
111
|
+
if (!autoProbe || typeof indexedDB === "undefined") {
|
|
112
|
+
return void 0;
|
|
113
|
+
}
|
|
114
|
+
return createIndexedDbPersistence();
|
|
115
|
+
};
|
|
104
116
|
|
|
105
|
-
export { createInMemoryPersistence, createIndexedDbPersistence };
|
|
117
|
+
export { createInMemoryPersistence, createIndexedDbPersistence, resolvePersistenceAdapter };
|
|
@@ -134,5 +134,17 @@ const createIndexedDbQueryCache = (options = {}) => {
|
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
136
|
};
|
|
137
|
+
const resolveQueryCacheAdapter = (option) => {
|
|
138
|
+
if (option === false) {
|
|
139
|
+
return void 0;
|
|
140
|
+
}
|
|
141
|
+
if (option) {
|
|
142
|
+
return option;
|
|
143
|
+
}
|
|
144
|
+
if (typeof indexedDB === "undefined") {
|
|
145
|
+
return void 0;
|
|
146
|
+
}
|
|
147
|
+
return createIndexedDbQueryCache();
|
|
148
|
+
};
|
|
137
149
|
|
|
138
|
-
export { createInMemoryQueryCache, createIndexedDbQueryCache, queryCacheKey };
|
|
150
|
+
export { createInMemoryQueryCache, createIndexedDbQueryCache, queryCacheKey, resolveQueryCacheAdapter };
|
package/dist/packem_shared/{lunora-client.d-B5vWSgvD.d.mts → lunora-client.d-Dm1BYq19.d.mts}
RENAMED
|
@@ -271,8 +271,16 @@ interface LunoraClientOptions {
|
|
|
271
271
|
* standalone client, which keeps using {@link LunoraClientOptions.persistence}.
|
|
272
272
|
*/
|
|
273
273
|
outbox?: OutboxSink;
|
|
274
|
-
/**
|
|
275
|
-
|
|
274
|
+
/**
|
|
275
|
+
* Durable store for the offline mutation queue. Tri-state — an explicit
|
|
276
|
+
* {@link PersistenceAdapter} is used as-is; `false` opts out (the queue stays
|
|
277
|
+
* in memory, lost on reload); omitted (the default) auto-probes a durable
|
|
278
|
+
* IndexedDB store when the `indexedDB` global is present (browsers), otherwise
|
|
279
|
+
* in-memory, so SSR/Node/React-Native keep the in-memory behaviour and only
|
|
280
|
+
* environments that can persist do. Pass `createAsyncStoragePersistence()` on
|
|
281
|
+
* React Native.
|
|
282
|
+
*/
|
|
283
|
+
persistence?: false | PersistenceAdapter;
|
|
276
284
|
/**
|
|
277
285
|
* App/schema version stamped onto every persisted queued write and cached
|
|
278
286
|
* read. Bump it on a breaking change to a function signature or query shape:
|
|
@@ -289,11 +297,13 @@ interface LunoraClientOptions {
|
|
|
289
297
|
*/
|
|
290
298
|
persistenceVersion?: string;
|
|
291
299
|
/**
|
|
292
|
-
* Durable store for the read cache (Pillar 2). When
|
|
300
|
+
* Durable store for the read cache (Pillar 2). When active, query results
|
|
293
301
|
* are persisted as their subscriptions advance and hydrated on construction
|
|
294
302
|
* so a reload renders cached data before the socket reconnects, then resumes
|
|
295
|
-
* the live subscription from the persisted cursor.
|
|
296
|
-
*
|
|
303
|
+
* the live subscription from the persisted cursor. Tri-state — an explicit
|
|
304
|
+
* {@link QueryCacheAdapter} is used as-is; `false` opts out (reads stay in
|
|
305
|
+
* memory only); omitted (the default) auto-probes IndexedDB exactly like
|
|
306
|
+
* {@link LunoraClientOptions.persistence}.
|
|
297
307
|
*/
|
|
298
308
|
queryCache?: QueryCacheAdapter | false;
|
|
299
309
|
reconnect?: ReconnectOptions;
|
|
@@ -271,8 +271,16 @@ interface LunoraClientOptions {
|
|
|
271
271
|
* standalone client, which keeps using {@link LunoraClientOptions.persistence}.
|
|
272
272
|
*/
|
|
273
273
|
outbox?: OutboxSink;
|
|
274
|
-
/**
|
|
275
|
-
|
|
274
|
+
/**
|
|
275
|
+
* Durable store for the offline mutation queue. Tri-state — an explicit
|
|
276
|
+
* {@link PersistenceAdapter} is used as-is; `false` opts out (the queue stays
|
|
277
|
+
* in memory, lost on reload); omitted (the default) auto-probes a durable
|
|
278
|
+
* IndexedDB store when the `indexedDB` global is present (browsers), otherwise
|
|
279
|
+
* in-memory, so SSR/Node/React-Native keep the in-memory behaviour and only
|
|
280
|
+
* environments that can persist do. Pass `createAsyncStoragePersistence()` on
|
|
281
|
+
* React Native.
|
|
282
|
+
*/
|
|
283
|
+
persistence?: false | PersistenceAdapter;
|
|
276
284
|
/**
|
|
277
285
|
* App/schema version stamped onto every persisted queued write and cached
|
|
278
286
|
* read. Bump it on a breaking change to a function signature or query shape:
|
|
@@ -289,11 +297,13 @@ interface LunoraClientOptions {
|
|
|
289
297
|
*/
|
|
290
298
|
persistenceVersion?: string;
|
|
291
299
|
/**
|
|
292
|
-
* Durable store for the read cache (Pillar 2). When
|
|
300
|
+
* Durable store for the read cache (Pillar 2). When active, query results
|
|
293
301
|
* are persisted as their subscriptions advance and hydrated on construction
|
|
294
302
|
* so a reload renders cached data before the socket reconnects, then resumes
|
|
295
|
-
* the live subscription from the persisted cursor.
|
|
296
|
-
*
|
|
303
|
+
* the live subscription from the persisted cursor. Tri-state — an explicit
|
|
304
|
+
* {@link QueryCacheAdapter} is used as-is; `false` opts out (reads stay in
|
|
305
|
+
* memory only); omitted (the default) auto-probes IndexedDB exactly like
|
|
306
|
+
* {@link LunoraClientOptions.persistence}.
|
|
297
307
|
*/
|
|
298
308
|
queryCache?: QueryCacheAdapter | false;
|
|
299
309
|
reconnect?: ReconnectOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FunctionReference, L as LunoraClient, A as ArgsOf, R as ReturnOf, P as Preloaded } from "./lunora-client.d-
|
|
1
|
+
import { F as FunctionReference, L as LunoraClient, A as ArgsOf, R as ReturnOf, P as Preloaded } from "./lunora-client.d-Dm1BYq19.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* Run a query once on the server (during SSR) and capture its result in a
|
|
4
4
|
* serializable {@link Preloaded} token. Embed the token in the rendered HTML and
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FunctionReference, L as LunoraClient, A as ArgsOf, R as ReturnOf, P as Preloaded } from "./lunora-client.d-
|
|
1
|
+
import { F as FunctionReference, L as LunoraClient, A as ArgsOf, R as ReturnOf, P as Preloaded } from "./lunora-client.d-Dm1BYq19.js";
|
|
2
2
|
/**
|
|
3
3
|
* Run a query once on the server (during SSR) and capture its result in a
|
|
4
4
|
* serializable {@link Preloaded} token. Embed the token in the rendered HTML and
|
package/dist/query/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SubscriptionError, F as FunctionReference, A as ArgsOf, R as ReturnOf, L as LunoraClient, a as Unsubscribe } from "../packem_shared/lunora-client.d-
|
|
2
|
-
export type { b as SubscriptionErrorCallback } from "../packem_shared/lunora-client.d-
|
|
1
|
+
import { S as SubscriptionError, F as FunctionReference, A as ArgsOf, R as ReturnOf, L as LunoraClient, a as Unsubscribe } from "../packem_shared/lunora-client.d-Dm1BYq19.mjs";
|
|
2
|
+
export type { b as SubscriptionErrorCallback } from "../packem_shared/lunora-client.d-Dm1BYq19.mjs";
|
|
3
3
|
import '@lunora/runtime';
|
|
4
4
|
/**
|
|
5
5
|
* The sentinel a framework adapter resolves its reactive args to when it wants
|
package/dist/query/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SubscriptionError, F as FunctionReference, A as ArgsOf, R as ReturnOf, L as LunoraClient, a as Unsubscribe } from "../packem_shared/lunora-client.d-
|
|
2
|
-
export type { b as SubscriptionErrorCallback } from "../packem_shared/lunora-client.d-
|
|
1
|
+
import { S as SubscriptionError, F as FunctionReference, A as ArgsOf, R as ReturnOf, L as LunoraClient, a as Unsubscribe } from "../packem_shared/lunora-client.d-Dm1BYq19.js";
|
|
2
|
+
export type { b as SubscriptionErrorCallback } from "../packem_shared/lunora-client.d-Dm1BYq19.js";
|
|
3
3
|
import '@lunora/runtime';
|
|
4
4
|
/**
|
|
5
5
|
* The sentinel a framework adapter resolves its reactive args to when it wants
|
package/dist/ssr/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as Preloaded, L as LunoraClient } from "../packem_shared/lunora-client.d-
|
|
2
|
-
export type { A as ArgsOf, F as FunctionReference, R as ReturnOf } from "../packem_shared/lunora-client.d-
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "../packem_shared/preload.d-
|
|
1
|
+
import { P as Preloaded, L as LunoraClient } from "../packem_shared/lunora-client.d-Dm1BYq19.mjs";
|
|
2
|
+
export type { A as ArgsOf, F as FunctionReference, R as ReturnOf } from "../packem_shared/lunora-client.d-Dm1BYq19.mjs";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "../packem_shared/preload.d-BfWzGJWV.mjs";
|
|
4
4
|
import '@lunora/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* Structural shape of a better-auth `getSession` call's resolved value.
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as Preloaded, L as LunoraClient } from "../packem_shared/lunora-client.d-
|
|
2
|
-
export type { A as ArgsOf, F as FunctionReference, R as ReturnOf } from "../packem_shared/lunora-client.d-
|
|
3
|
-
export { p as preloadQuery, a as preloadedQueryResult } from "../packem_shared/preload.d-
|
|
1
|
+
import { P as Preloaded, L as LunoraClient } from "../packem_shared/lunora-client.d-Dm1BYq19.js";
|
|
2
|
+
export type { A as ArgsOf, F as FunctionReference, R as ReturnOf } from "../packem_shared/lunora-client.d-Dm1BYq19.js";
|
|
3
|
+
export { p as preloadQuery, a as preloadedQueryResult } from "../packem_shared/preload.d-Sp_Ef-_u.js";
|
|
4
4
|
import '@lunora/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* Structural shape of a better-auth `getSession` call's resolved value.
|
package/dist/ssr/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { getServerSession } from '../packem_shared/getServerSession-8jXewqxd.mjs';
|
|
2
2
|
export { deserializePreloaded, serializePreloaded } from '../packem_shared/deserializePreloaded-C0eJTY_W.mjs';
|
|
3
|
-
export { createServerClient } from '../packem_shared/createServerClient-
|
|
3
|
+
export { createServerClient } from '../packem_shared/createServerClient-CtklXrs2.mjs';
|
|
4
4
|
export { preloadQuery, preloadedQueryResult } from '../packem_shared/preloadQuery-lobFkD2Z.mjs';
|