event-sourced-collection 0.0.11 → 0.0.13
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/browser-event-sourced-db-D3vSW3QV.d.mts +121 -0
- package/dist/browser-event-sourced-db-D3vSW3QV.d.mts.map +1 -0
- package/dist/browser.d.mts +2 -118
- package/dist/browser.d.mts.map +1 -1
- package/dist/browser.mjs +1 -1
- package/dist/{create-event-sourced-db-handle-D23nsV5c.mjs → create-event-sourced-db-handle-BqV3vLjS.mjs} +44 -16
- package/dist/create-event-sourced-db-handle-BqV3vLjS.mjs.map +1 -0
- package/dist/create-event-sourced-db-handle-DmHdplVr.d.mts +105 -0
- package/dist/create-event-sourced-db-handle-DmHdplVr.d.mts.map +1 -0
- package/dist/index.d.mts +347 -3
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1 -1
- package/dist/node.d.mts +2 -2
- package/dist/node.d.mts.map +1 -1
- package/dist/node.mjs +1 -1
- package/dist/react-native.d.mts +2 -2
- package/dist/react-native.d.mts.map +1 -1
- package/dist/react-native.mjs +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/{types-CbOMv5E8.d.mts → types-uO49i9Ae.d.mts} +15 -2
- package/dist/types-uO49i9Ae.d.mts.map +1 -0
- package/package.json +1 -1
- package/dist/create-event-sourced-db-handle-D23nsV5c.mjs.map +0 -1
- package/dist/index-BkKizlCB.d.mts +0 -446
- package/dist/index-BkKizlCB.d.mts.map +0 -1
- package/dist/types-CbOMv5E8.d.mts.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,347 @@
|
|
|
1
|
-
import { $ as InjectedCreateCollection, A as PushResponse, B as SyncPushLimits, C as PruneOptions, D as PushConfirmation, E as PullResponse, F as ServerEvent, G as SyncTrigger, H as SyncResult, I as SyncHandlersConfig, J as UpcastEventFn, K as SyncUrlConfig, L as SyncLock, M as RetryConfig, N as RowVersionEntry, O as PushEventsFn, P as SQLiteDriver, Q as CreateCollectionFn, R as SyncMetaEntry, S as PersistedCollectionPersistence, T as PullEventsFn, U as SyncStatus, V as SyncPushPreset, W as SyncTransport, X as EventSourcedLogger, Y as UpcastableEvent, Z as createEventSourcedLogger, _ as ManualSyncResult, a as CollectionMap, b as OutboxEntry, c as DeadLetterReason, d as EventSourcedHooks, et as InjectedModuleFn, f as EventSourcedOptions, g as InferState, h as InferKey, i as CollectionIndexDef, j as ReservedCollections, k as PushFailure, l as EventSourcedDB, m as InboxEntry, n as CollectionDef, o as DeadLetterDirection, p as EventSourcedSharedOptions, q as UnknownEventHandling, r as CollectionIndexConstructor, s as DeadLetterEntry, t as BackendMismatchPolicy, tt as PersistedCollectionOptionsFn, u as EventSourcedDBConfig, v as MutationType, w as PruneResult, x as OutboxSyncStatus, y as OutboundEvent, z as SyncPhase } from "./types-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { $ as InjectedCreateCollection, A as PushResponse, B as SyncPushLimits, C as PruneOptions, D as PushConfirmation, E as PullResponse, F as ServerEvent, G as SyncTrigger, H as SyncResult, I as SyncHandlersConfig, J as UpcastEventFn, K as SyncUrlConfig, L as SyncLock, M as RetryConfig, N as RowVersionEntry, O as PushEventsFn, P as SQLiteDriver, Q as CreateCollectionFn, R as SyncMetaEntry, S as PersistedCollectionPersistence, T as PullEventsFn, U as SyncStatus, V as SyncPushPreset, W as SyncTransport, X as EventSourcedLogger, Y as UpcastableEvent, Z as createEventSourcedLogger, _ as ManualSyncResult, a as CollectionMap, b as OutboxEntry, c as DeadLetterReason, d as EventSourcedHooks, et as InjectedModuleFn, f as EventSourcedOptions, g as InferState, h as InferKey, i as CollectionIndexDef, j as ReservedCollections, k as PushFailure, l as EventSourcedDB, m as InboxEntry, n as CollectionDef, o as DeadLetterDirection, p as EventSourcedSharedOptions, q as UnknownEventHandling, r as CollectionIndexConstructor, s as DeadLetterEntry, t as BackendMismatchPolicy, tt as PersistedCollectionOptionsFn, u as EventSourcedDBConfig, v as MutationType, w as PruneResult, x as OutboxSyncStatus, y as OutboundEvent, z as SyncPhase } from "./types-uO49i9Ae.mjs";
|
|
2
|
+
import { a as resolveModules, i as createEventSourcedDBHandle, n as EventSourcedDBHandleSetup, r as ModulesInput, t as EventSourcedDBHandle } from "./create-event-sourced-db-handle-DmHdplVr.mjs";
|
|
3
|
+
import { Collection } from "@tanstack/db";
|
|
4
|
+
|
|
5
|
+
//#region src/core/create-event-sourced-db.d.ts
|
|
6
|
+
type CollectionDefConstraint = {
|
|
7
|
+
getKey: (state: never) => string | number;
|
|
8
|
+
schemaVersion?: number;
|
|
9
|
+
localOnly?: boolean;
|
|
10
|
+
indexes?: ReadonlyArray<{
|
|
11
|
+
select: (row: never) => unknown;
|
|
12
|
+
name?: string;
|
|
13
|
+
indexType?: new (id: number, expression: never, name?: string, options?: never) => unknown;
|
|
14
|
+
}>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Low-level factory: wires persistence, collections, outbox/inbox, and sync.
|
|
18
|
+
* Prefer a platform helper (`createBrowserEventSourcedDB`,
|
|
19
|
+
* `createNodeEventSourcedDB`, `createReactNativeEventSourcedDB`) unless you are
|
|
20
|
+
* supplying your own persistence.
|
|
21
|
+
*
|
|
22
|
+
* @param config - See {@link EventSourcedDBConfig} for every option.
|
|
23
|
+
*
|
|
24
|
+
* @example Node SQLite, opened immediately
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { createCollection } from "@tanstack/db"
|
|
27
|
+
* import {
|
|
28
|
+
* createNodeSQLitePersistence,
|
|
29
|
+
* persistedCollectionOptions,
|
|
30
|
+
* } from "@tanstack/node-db-sqlite-persistence"
|
|
31
|
+
* import Database from "better-sqlite3"
|
|
32
|
+
* import { createEventSourcedDB } from "event-sourced-collection"
|
|
33
|
+
*
|
|
34
|
+
* type Todo = { id: string; title: string }
|
|
35
|
+
*
|
|
36
|
+
* const sqlite = new Database("app.sqlite")
|
|
37
|
+
* const db = await createEventSourcedDB({
|
|
38
|
+
* persistence: createNodeSQLitePersistence({ database: sqlite }),
|
|
39
|
+
* createCollection,
|
|
40
|
+
* persistedCollectionOptions,
|
|
41
|
+
* collections: {
|
|
42
|
+
* todos: { getKey: (todo: Todo) => todo.id },
|
|
43
|
+
* },
|
|
44
|
+
* sync: {
|
|
45
|
+
* push: "/api/sync/events",
|
|
46
|
+
* pull: "/api/sync/events",
|
|
47
|
+
* },
|
|
48
|
+
* })
|
|
49
|
+
*
|
|
50
|
+
* await db.collections.todos.insert({ id: "t1", title: "Ship" }).isPersisted.promise
|
|
51
|
+
* await db.sync()
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
declare function createEventSourcedDB<const TDefs extends Record<string, CollectionDefConstraint>>(config: EventSourcedDBConfig<TDefs>): Promise<EventSourcedDB<TDefs>>;
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/core/lazy-singleton.d.ts
|
|
57
|
+
type LazySingletonOptions = {
|
|
58
|
+
/** Runs on every `ensure()` / proxy access (e.g. `typeof window` checks). */guard?: () => void; /** Thrown when `proxy` is used before `ensure()` resolves. */
|
|
59
|
+
notInitializedMessage?: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Result of {@link createLazySingleton}.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* import { createLazySingleton } from "event-sourced-collection"
|
|
67
|
+
*
|
|
68
|
+
* const { ensure, proxy, reset } = createLazySingleton(async () => ({ ready: true }))
|
|
69
|
+
* await ensure()
|
|
70
|
+
* console.log(proxy.ready) // true
|
|
71
|
+
* reset()
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
type LazySingleton<T extends object> = {
|
|
75
|
+
ensure: () => Promise<T>;
|
|
76
|
+
proxy: T;
|
|
77
|
+
reset: () => void;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* One-shot async factory with a proxy that is safe to export as a module
|
|
81
|
+
* singleton. Platform DB helpers are built on this.
|
|
82
|
+
*
|
|
83
|
+
* @example Export a proxy, initialize at app startup
|
|
84
|
+
* ```ts
|
|
85
|
+
* import { createLazySingleton } from "event-sourced-collection"
|
|
86
|
+
*
|
|
87
|
+
* type Client = { ping: () => Promise<string> }
|
|
88
|
+
*
|
|
89
|
+
* const { ensure, proxy: client } = createLazySingleton<Client>(async () => ({
|
|
90
|
+
* ping: async () => "ok",
|
|
91
|
+
* }))
|
|
92
|
+
*
|
|
93
|
+
* export async function start() {
|
|
94
|
+
* await ensure()
|
|
95
|
+
* }
|
|
96
|
+
*
|
|
97
|
+
* export { client }
|
|
98
|
+
* // client.ping() throws until start() has run
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
declare function createLazySingleton<T extends object>(factory: () => Promise<T>, options?: LazySingletonOptions): LazySingleton<T>;
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/core/sync.d.ts
|
|
104
|
+
/**
|
|
105
|
+
* Builds a {@link SyncTransport} that POSTs outbound events and GETs
|
|
106
|
+
* `pull?since=N`. Pass this as `sync` when you already have REST endpoints.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* import { createHttpTransport } from "event-sourced-collection"
|
|
111
|
+
* import { createBrowserEventSourcedDB } from "event-sourced-collection/browser"
|
|
112
|
+
*
|
|
113
|
+
* const sync = createHttpTransport({
|
|
114
|
+
* push: "/api/sync/events",
|
|
115
|
+
* pull: "/api/sync/events",
|
|
116
|
+
* headers: () => ({ Authorization: `Bearer ${localStorage.getItem("token") ?? ""}` }),
|
|
117
|
+
* })
|
|
118
|
+
*
|
|
119
|
+
* const { ensureDb } = createBrowserEventSourcedDB({
|
|
120
|
+
* databaseName: "app.sqlite",
|
|
121
|
+
* collections: { todos: { getKey: (todo: { id: string }) => todo.id } },
|
|
122
|
+
* sync,
|
|
123
|
+
* modules: async () => {
|
|
124
|
+
* const { createCollection } = await import("@tanstack/db")
|
|
125
|
+
* const persistence = await import("@tanstack/browser-db-sqlite-persistence")
|
|
126
|
+
* return { createCollection, ...persistence }
|
|
127
|
+
* },
|
|
128
|
+
* })
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
declare function createHttpTransport(config: SyncUrlConfig): SyncTransport;
|
|
132
|
+
/**
|
|
133
|
+
* Thrown when the HTTP push endpoint returns a non-OK status.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```ts
|
|
137
|
+
* import { createHttpTransport, SyncPushError } from "event-sourced-collection"
|
|
138
|
+
*
|
|
139
|
+
* const sync = createHttpTransport({
|
|
140
|
+
* push: "/api/sync/events",
|
|
141
|
+
* pull: "/api/sync/events",
|
|
142
|
+
* })
|
|
143
|
+
*
|
|
144
|
+
* try {
|
|
145
|
+
* await sync.push(events)
|
|
146
|
+
* } catch (error) {
|
|
147
|
+
* if (error instanceof SyncPushError) {
|
|
148
|
+
* console.error(error.status, error.body)
|
|
149
|
+
* }
|
|
150
|
+
* }
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
declare class SyncPushError extends Error {
|
|
154
|
+
readonly status: number;
|
|
155
|
+
readonly body: string;
|
|
156
|
+
constructor(status: number, body: string);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Thrown when the HTTP pull endpoint returns a non-OK status.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```ts
|
|
163
|
+
* import { createHttpTransport, SyncPullError } from "event-sourced-collection"
|
|
164
|
+
*
|
|
165
|
+
* const sync = createHttpTransport({
|
|
166
|
+
* push: "/api/sync/events",
|
|
167
|
+
* pull: "/api/sync/events",
|
|
168
|
+
* })
|
|
169
|
+
*
|
|
170
|
+
* try {
|
|
171
|
+
* await sync.pull(0)
|
|
172
|
+
* } catch (error) {
|
|
173
|
+
* if (error instanceof SyncPullError) {
|
|
174
|
+
* console.error(error.status, error.body)
|
|
175
|
+
* }
|
|
176
|
+
* }
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
declare class SyncPullError extends Error {
|
|
180
|
+
readonly status: number;
|
|
181
|
+
readonly body: string;
|
|
182
|
+
constructor(status: number, body: string);
|
|
183
|
+
}
|
|
184
|
+
//#endregion
|
|
185
|
+
//#region src/core/sync-presets.d.ts
|
|
186
|
+
/**
|
|
187
|
+
* Push limits per hosting platform. Byte caps leave headroom under the
|
|
188
|
+
* platform's request body limit (Vercel functions: 4.5 MB; AWS Lambda and
|
|
189
|
+
* Netlify: 6 MB) for headers and JSON size estimation drift.
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```ts
|
|
193
|
+
* createBrowserEventSourcedDB({ ..., syncPreset: "vercel" })
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
declare const SYNC_PUSH_PRESETS: Readonly<Record<SyncPushPreset, SyncPushLimits>>;
|
|
197
|
+
declare function resolvePushLimits(config: {
|
|
198
|
+
syncPreset?: SyncPushPreset;
|
|
199
|
+
pushBatchSize?: number;
|
|
200
|
+
maxPushBytes?: number;
|
|
201
|
+
}): SyncPushLimits;
|
|
202
|
+
//#endregion
|
|
203
|
+
//#region src/testing/mock-sync-backend.d.ts
|
|
204
|
+
type MockRejection = {
|
|
205
|
+
message: string;
|
|
206
|
+
code?: string;
|
|
207
|
+
retryable?: boolean;
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Decides the fate of a pushed event. Return `undefined` to accept it.
|
|
211
|
+
* Throwing from here simulates a transport-level failure for the whole batch.
|
|
212
|
+
*/
|
|
213
|
+
type MockRejectFn = (event: OutboundEvent, attempt: number) => MockRejection | undefined;
|
|
214
|
+
type MockSyncBackendOptions = {
|
|
215
|
+
/** Identity reported on pull, for exercising backend-reset detection. */backendId?: string; /** Max events returned per pull page. Defaults to all of them. */
|
|
216
|
+
pageSize?: number; /** Per-event push rejection hook. */
|
|
217
|
+
rejectPush?: MockRejectFn;
|
|
218
|
+
};
|
|
219
|
+
type MockSyncBackend = SyncTransport & {
|
|
220
|
+
/** Everything the server has accepted, in assigned order. */readonly events: ReadonlyArray<ServerEvent>;
|
|
221
|
+
readonly pushCalls: number;
|
|
222
|
+
readonly pullCalls: number; /** Batch sizes seen by push, in order — useful for asserting batching. */
|
|
223
|
+
readonly pushBatchSizes: ReadonlyArray<number>; /** Injects an event as though another device had pushed it. */
|
|
224
|
+
seed: (event: {
|
|
225
|
+
collectionId: string;
|
|
226
|
+
type?: MutationType;
|
|
227
|
+
key: string | number;
|
|
228
|
+
payload: Record<string, unknown>;
|
|
229
|
+
eventId?: string;
|
|
230
|
+
clientId?: string;
|
|
231
|
+
}) => ServerEvent; /** Fails the next `count` push calls at the transport level. */
|
|
232
|
+
failNextPushes: (count: number, message?: string) => void; /** Changes reported identity, simulating a wiped or swapped backend. */
|
|
233
|
+
setBackendId: (backendId: string) => void; /** Drops all stored events and restarts sequence numbering. */
|
|
234
|
+
reset: () => void;
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* In-memory sync backend for tests: assigns sequence numbers, deduplicates by
|
|
238
|
+
* `eventId`, paginates, and can inject rejections and outages.
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* ```ts
|
|
242
|
+
* import { createMockSyncBackend } from "event-sourced-collection"
|
|
243
|
+
* import { createNodeEventSourcedDB } from "event-sourced-collection/node"
|
|
244
|
+
*
|
|
245
|
+
* const backend = createMockSyncBackend({ backendId: "test" })
|
|
246
|
+
* const { ensureDb, db } = createNodeEventSourcedDB({
|
|
247
|
+
* collections: { todos: { getKey: (todo: { id: string }) => todo.id } },
|
|
248
|
+
* sync: backend,
|
|
249
|
+
* modules: nodeSqliteModules,
|
|
250
|
+
* })
|
|
251
|
+
*
|
|
252
|
+
* await ensureDb()
|
|
253
|
+
* backend.seed({ collectionId: "todos", key: "t1", payload: { id: "t1", title: "Remote" } })
|
|
254
|
+
* await db.sync()
|
|
255
|
+
* ```
|
|
256
|
+
*/
|
|
257
|
+
declare function createMockSyncBackend(options?: MockSyncBackendOptions): MockSyncBackend;
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/platforms/web-locks.d.ts
|
|
260
|
+
/**
|
|
261
|
+
* True when `navigator.locks` is available (modern browsers / workers).
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* ```ts
|
|
265
|
+
* import { createWebLocksSyncLock, supportsWebLocks } from "event-sourced-collection"
|
|
266
|
+
* import { createBrowserEventSourcedDB } from "event-sourced-collection/browser"
|
|
267
|
+
*
|
|
268
|
+
* const lock = supportsWebLocks() ? createWebLocksSyncLock() : undefined
|
|
269
|
+
*
|
|
270
|
+
* createBrowserEventSourcedDB({
|
|
271
|
+
* databaseName: "app.sqlite",
|
|
272
|
+
* lock: lock ?? null,
|
|
273
|
+
* collections: { todos: { getKey: (todo: { id: string }) => todo.id } },
|
|
274
|
+
* modules,
|
|
275
|
+
* })
|
|
276
|
+
* ```
|
|
277
|
+
*/
|
|
278
|
+
declare function supportsWebLocks(): boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Leader election backed by the Web Locks API, so only one tab or worker syncs
|
|
281
|
+
* at a time. Uses `ifAvailable` rather than queueing: a tab that loses the race
|
|
282
|
+
* returns immediately instead of running a redundant sync afterwards.
|
|
283
|
+
*
|
|
284
|
+
* Falls back to always acquiring when Web Locks is unavailable (older browsers,
|
|
285
|
+
* non-browser runtimes), which preserves single-context behaviour.
|
|
286
|
+
*
|
|
287
|
+
* `createBrowserEventSourcedDB` installs this as the default `lock`. Pass
|
|
288
|
+
* `lock: null` there to opt out.
|
|
289
|
+
*
|
|
290
|
+
* @example Only one tab runs `sync()`
|
|
291
|
+
* ```ts
|
|
292
|
+
* import { createWebLocksSyncLock, supportsWebLocks } from "event-sourced-collection"
|
|
293
|
+
*
|
|
294
|
+
* const lock = createWebLocksSyncLock()
|
|
295
|
+
*
|
|
296
|
+
* async function syncIfLeader() {
|
|
297
|
+
* const outcome = await lock.tryRun("event-sourced-sync:app.sqlite", () => db.sync())
|
|
298
|
+
* if (!outcome.acquired) return // another tab already holds the lock
|
|
299
|
+
* return outcome.result
|
|
300
|
+
* }
|
|
301
|
+
*
|
|
302
|
+
* if (!supportsWebLocks()) {
|
|
303
|
+
* // Node / older browsers: tryRun always acquires
|
|
304
|
+
* }
|
|
305
|
+
* ```
|
|
306
|
+
*/
|
|
307
|
+
declare function createWebLocksSyncLock(): SyncLock;
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region src/utils/uuid.d.ts
|
|
310
|
+
/**
|
|
311
|
+
* Time-ordered event id (UUIDv7). Used as `eventId` on outbox rows and as the
|
|
312
|
+
* default device `clientId` when you do not pass one.
|
|
313
|
+
*
|
|
314
|
+
* @example
|
|
315
|
+
* ```ts
|
|
316
|
+
* import { generateEventId } from "event-sourced-collection"
|
|
317
|
+
*
|
|
318
|
+
* const eventId = generateEventId()
|
|
319
|
+
* const clientId = generateEventId()
|
|
320
|
+
* ```
|
|
321
|
+
*/
|
|
322
|
+
declare function generateEventId(): string;
|
|
323
|
+
//#endregion
|
|
324
|
+
//#region src/internal/pull.d.ts
|
|
325
|
+
/**
|
|
326
|
+
* Thrown when `backendMismatch` is `"fail"` and the server reports a different
|
|
327
|
+
* `backendId` than this client last synced with (wiped or swapped event store).
|
|
328
|
+
*
|
|
329
|
+
* @example
|
|
330
|
+
* ```ts
|
|
331
|
+
* import { BackendMismatchError } from "event-sourced-collection"
|
|
332
|
+
*
|
|
333
|
+
* const result = await db.sync()
|
|
334
|
+
* const mismatch = result.errors.find((error) => error instanceof BackendMismatchError)
|
|
335
|
+
* if (mismatch) {
|
|
336
|
+
* console.error("backend changed", mismatch.expected, mismatch.received)
|
|
337
|
+
* }
|
|
338
|
+
* ```
|
|
339
|
+
*/
|
|
340
|
+
declare class BackendMismatchError extends Error {
|
|
341
|
+
readonly expected: string | null;
|
|
342
|
+
readonly received: string;
|
|
343
|
+
constructor(expected: string | null, received: string);
|
|
344
|
+
}
|
|
345
|
+
//#endregion
|
|
346
|
+
export { BackendMismatchError, type BackendMismatchPolicy, type CollectionDef, type CollectionIndexConstructor, type CollectionIndexDef, type CollectionMap, type CreateCollectionFn, type DeadLetterDirection, type DeadLetterEntry, type DeadLetterReason, type EventSourcedDB, type EventSourcedDBConfig, type EventSourcedDBHandle, type EventSourcedDBHandleSetup, type EventSourcedHooks, type EventSourcedLogger, type EventSourcedOptions, type EventSourcedSharedOptions, type InboxEntry, type InferKey, type InferState, type InjectedCreateCollection, type InjectedModuleFn, type LazySingleton, type LazySingletonOptions, type ManualSyncResult, type MockRejectFn, type MockRejection, type MockSyncBackend, type MockSyncBackendOptions, type ModulesInput, type MutationType, type OutboundEvent, type OutboxEntry, type OutboxSyncStatus, type PersistedCollectionOptionsFn, type PersistedCollectionPersistence, type PruneOptions, type PruneResult, type PullEventsFn, type PullResponse, type PushConfirmation, type PushEventsFn, type PushFailure, type PushResponse, type ReservedCollections, type RetryConfig, type RowVersionEntry, type SQLiteDriver, SYNC_PUSH_PRESETS, type ServerEvent, type SyncHandlersConfig, type SyncLock, type SyncMetaEntry, type SyncPhase, SyncPullError, SyncPushError, type SyncPushLimits, type SyncPushPreset, type SyncResult, type SyncStatus, type SyncTransport, type SyncTrigger, type SyncUrlConfig, type UnknownEventHandling, type UpcastEventFn, type UpcastableEvent, createEventSourcedDB, createEventSourcedDBHandle, createEventSourcedLogger, createHttpTransport, createLazySingleton, createMockSyncBackend, createWebLocksSyncLock, generateEventId, resolveModules, resolvePushLimits, supportsWebLocks };
|
|
347
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/core/create-event-sourced-db.ts","../src/core/lazy-singleton.ts","../src/core/sync.ts","../src/core/sync-presets.ts","../src/testing/mock-sync-backend.ts","../src/platforms/web-locks.ts","../src/utils/uuid.ts","../src/internal/pull.ts"],"mappings":";;;;;KA6DK,uBAAA;EACH,MAAA,GAAS,KAAA;EACT,aAAA;EACA,SAAA;EACA,OAAA,GAAU,aAAa;IACrB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B,KAAA,EAAO,aAAA,EAAe,OAAA,aAAoB,aAAa;AAAA,KAEvE,sBAAA;EJyCV,yEIvCA,SAAA,WJwCU;EItCV,QAAA,WJuCW;EIrCX,UAAA,GAAa,YAAY;AAAA;AAAA,KAGf,eAAA,GAAkB,aAAA;EJoCG,sEIlCtB,MAAA,EAAQ,aAAA,CAAc,WAAA;EAAA,SACtB,SAAA;EAAA,SACA,SAAA,UJgCuE;EAAA,SI9BvE,cAAA,EAAgB,aAAA,UJ8Ge;EI5GxC,IAAA,GAAO,KAAA;IACL,YAAA;IACA,IAAA,GAAO,YAAA;IACP,GAAA;IACA,OAAA,EAAS,MAAA;IACT,OAAA;IACA,QAAA;EAAA,MACI,WAAA,EJuGuC;EIrG7C,cAAA,GAAiB,KAAA,UAAe,OAAA,oBJoG1B;EIlGN,YAAA,GAAe,SAAA,mBJkGoB;EIhGnC,KAAA;AAAA;;;;;;AJiGkE;;;;ACtJpE;;;;AAIuB;AAgBvB;;;;;;;iBGyDgB,qBAAA,CAAsB,OAAA,GAAS,sBAAA,GAA8B,eAAe;;;;;;;AJrB3E;;;;;;;;;;;;;;iBKvBD,gBAAA;;;;;ALmCkE;AAgFlF;;;;;;;;;;;;;;;;;;;;;;AAEoE;iBKrFpD,sBAAA,IAA0B,QAAQ;;;;;;;;ALTjC;;;;;;;iBM1CD,eAAA;;;;;;;;;;;;;;;;ANsDkE;AAgFlF;cO9Ga,oBAAA,SAA6B,KAAK;EAAA,SAElC,QAAA;EAAA,SACA,QAAA;cADA,QAAA,iBACA,QAAA;AAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as generateEventId, c as resolvePushLimits, d as createHttpTransport, f as BackendMismatchError, i as createEventSourcedDB, l as SyncPullError, n as resolveModules, o as createEventSourcedLogger, r as createLazySingleton, s as SYNC_PUSH_PRESETS, t as createEventSourcedDBHandle, u as SyncPushError } from "./create-event-sourced-db-handle-
|
|
1
|
+
import { a as generateEventId, c as resolvePushLimits, d as createHttpTransport, f as BackendMismatchError, i as createEventSourcedDB, l as SyncPullError, n as resolveModules, o as createEventSourcedLogger, r as createLazySingleton, s as SYNC_PUSH_PRESETS, t as createEventSourcedDBHandle, u as SyncPushError } from "./create-event-sourced-db-handle-BqV3vLjS.mjs";
|
|
2
2
|
import { n as supportsWebLocks, t as createWebLocksSyncLock } from "./web-locks-Bi2f732X.mjs";
|
|
3
3
|
//#region src/testing/mock-sync-backend.ts
|
|
4
4
|
/**
|
package/dist/node.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as InjectedCreateCollection, S as PersistedCollectionPersistence, et as InjectedModuleFn, p as EventSourcedSharedOptions } from "./types-
|
|
2
|
-
import {
|
|
1
|
+
import { $ as InjectedCreateCollection, S as PersistedCollectionPersistence, et as InjectedModuleFn, p as EventSourcedSharedOptions } from "./types-uO49i9Ae.mjs";
|
|
2
|
+
import { r as ModulesInput, t as EventSourcedDBHandle } from "./create-event-sourced-db-handle-DmHdplVr.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/platforms/node.d.ts
|
|
5
5
|
type NodePlatformDeps = {
|
package/dist/node.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.mts","names":[],"sources":["../src/platforms/node.ts","../src/platforms/node-event-sourced-db.ts"],"mappings":";;;;KAEY,gBAAA;EACV,2BAAA,GAA8B,OAAA;IAAW,QAAA;EAAA,MAAsB,8BAA8B;AAAA;AAAA,KAGnF,kBAAA;EACV,QAAQ;AAAA;AAAA,KAGE,kBAAA;EACV,WAAA,EAAa,8BAA8B;AAAA
|
|
1
|
+
{"version":3,"file":"node.d.mts","names":[],"sources":["../src/platforms/node.ts","../src/platforms/node-event-sourced-db.ts"],"mappings":";;;;KAEY,gBAAA;EACV,2BAAA,GAA8B,OAAA;IAAW,QAAA;EAAA,MAAsB,8BAA8B;AAAA;AAAA,KAGnF,kBAAA;EACV,QAAQ;AAAA;AAAA,KAGE,kBAAA;EACV,WAAA,EAAa,8BAA8B;AAAA;;;AARkD;AAG/F;;;;AACU;AAGV;;;;AAC6C;AA6B7C;;;;;;;;;;;;;iBAAgB,kBAAA,CACd,IAAA,EAAM,gBAAA,EACN,MAAA,EAAQ,kBAAA,GACP,kBAAA;;;KC7BE,uBAAA;EACH,MAAA,GAAS,KAAY;AAAA;AAAA,KAGX,uBAAA;EACV,2BAAA,GAA8B,OAAA;IAAW,QAAA;EAAA,MAAsB,8BAAA,EDhBtB;ECkBzC,QAAA;EACA,gBAAA,EAAkB,wBAAA;EAClB,0BAAA,EAA4B,gBAAA;AAAA;AAAA,KAGlB,wBAAA,eAAuC,MAAA,SAAe,uBAAA,KAChE,yBAAA;EACE,WAAA,EAAa,KAAA;;;ADrBP;AAGV;ECuBI,OAAA,EAAS,YAAA,CAAa,uBAAA;AAAA;;ADtBmB;AA6B7C;;;;;;;;;;;;;;AAGqB;;;;AChC0E;;;;AAIxE;AAGvB;;;;;;;;;iBAoDgB,wBAAA,qBACM,MAAA,SAAe,uBAAA,GACnC,MAAA,EAAQ,wBAAA,CAAyB,KAAA,IAAM,oBAAA,CAAA,KAAA"}
|
package/dist/node.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as resolveModules, t as createEventSourcedDBHandle } from "./create-event-sourced-db-handle-
|
|
1
|
+
import { n as resolveModules, t as createEventSourcedDBHandle } from "./create-event-sourced-db-handle-BqV3vLjS.mjs";
|
|
2
2
|
//#region src/platforms/node.ts
|
|
3
3
|
/**
|
|
4
4
|
* Wraps an already-opened better-sqlite3 database as TanStack persistence.
|
package/dist/react-native.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as InjectedCreateCollection, S as PersistedCollectionPersistence, et as InjectedModuleFn, p as EventSourcedSharedOptions } from "./types-
|
|
2
|
-
import {
|
|
1
|
+
import { $ as InjectedCreateCollection, S as PersistedCollectionPersistence, et as InjectedModuleFn, p as EventSourcedSharedOptions } from "./types-uO49i9Ae.mjs";
|
|
2
|
+
import { r as ModulesInput, t as EventSourcedDBHandle } from "./create-event-sourced-db-handle-DmHdplVr.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/platforms/react-native.d.ts
|
|
5
5
|
type ReactNativePlatformDeps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-native.d.mts","names":[],"sources":["../src/platforms/react-native.ts","../src/platforms/react-native-event-sourced-db.ts"],"mappings":";;;;KAEY,uBAAA;EACV,kCAAA,GAAqC,OAAA;IACnC,QAAA;EAAA,MACI,8BAA8B;AAAA;AAAA,KAG1B,yBAAA;EACV,QAAQ;AAAA;AAAA,KAGE,yBAAA;EACV,WAAA,EAAa,8BAA8B;AAAA
|
|
1
|
+
{"version":3,"file":"react-native.d.mts","names":[],"sources":["../src/platforms/react-native.ts","../src/platforms/react-native-event-sourced-db.ts"],"mappings":";;;;KAEY,uBAAA;EACV,kCAAA,GAAqC,OAAA;IACnC,QAAA;EAAA,MACI,8BAA8B;AAAA;AAAA,KAG1B,yBAAA;EACV,QAAQ;AAAA;AAAA,KAGE,yBAAA;EACV,WAAA,EAAa,8BAA8B;AAAA;;;AARP;AAGtC;;;;AACU;AAGV;;;;AAC6C;AAgC7C;;;;;;;;;;;;;;AAG4B;;iBAHZ,yBAAA,CACd,IAAA,EAAM,uBAAA,EACN,MAAA,EAAQ,yBAAA,GACP,yBAAA;;;KClCE,uBAAA;EACH,MAAA,GAAS,KAAY;AAAA;AAAA,KAGX,8BAAA;EACV,kCAAA,GAAqC,OAAA;IACnC,QAAA;EAAA,MACI,8BAAA,EDjBJ;ECmBF,QAAA;EACA,gBAAA,EAAkB,wBAAA;EAClB,0BAAA,EAA4B,gBAAA;AAAA;ADjB9B;;;;AACU;AADV,KCyBY,+BAAA,eAA8C,MAAA,SAAe,uBAAA,KACvE,yBAAA;EACE,WAAA,EAAa,KAAA;;;ADtB4B;AAgC7C;;ECJI,OAAA,EAAS,YAAA,CAAa,8BAAA;AAAA;;;;;;;;;;ADOE;;;;ACrCmE;;;;AAIxE;AAGvB;;;;;;;;;;iBAwDgB,+BAAA,qBACM,MAAA,SAAe,uBAAA,GACnC,MAAA,EAAQ,+BAAA,CAAgC,KAAA,IAAM,oBAAA,CAAA,KAAA"}
|
package/dist/react-native.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as resolveModules, t as createEventSourcedDBHandle } from "./create-event-sourced-db-handle-
|
|
1
|
+
import { n as resolveModules, t as createEventSourcedDBHandle } from "./create-event-sourced-db-handle-BqV3vLjS.mjs";
|
|
2
2
|
//#region src/platforms/react-native.ts
|
|
3
3
|
/**
|
|
4
4
|
* Wraps an already-opened native SQLite database as TanStack persistence.
|
package/dist/react.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as SyncStatus, _ as ManualSyncResult } from "./types-
|
|
1
|
+
import { U as SyncStatus, _ as ManualSyncResult } from "./types-uO49i9Ae.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/react/format-manual-sync-message.d.ts
|
|
4
4
|
declare function formatManualSyncMessage(result: ManualSyncResult): string;
|
|
@@ -465,6 +465,12 @@ type CollectionDef<TState = object, TKey extends string | number = string> = {
|
|
|
465
465
|
*/
|
|
466
466
|
schemaVersion?: number; /** Secondary indexes created when the collection is opened. */
|
|
467
467
|
indexes?: ReadonlyArray<CollectionIndexDef<TState, TKey>>;
|
|
468
|
+
/**
|
|
469
|
+
* Persist locally but never sync: mutations author no outbox events, and
|
|
470
|
+
* pulled events for this collection are skipped so server history cannot
|
|
471
|
+
* overwrite local rows. Outbox entries queued before the switch are dropped.
|
|
472
|
+
*/
|
|
473
|
+
localOnly?: boolean;
|
|
468
474
|
};
|
|
469
475
|
type InferState<T> = T extends {
|
|
470
476
|
getKey: (state: infer S) => string | number;
|
|
@@ -475,6 +481,7 @@ type InferKey<T> = T extends {
|
|
|
475
481
|
type CollectionDefConstraint = {
|
|
476
482
|
getKey: (state: never) => string | number;
|
|
477
483
|
schemaVersion?: number;
|
|
484
|
+
localOnly?: boolean;
|
|
478
485
|
indexes?: ReadonlyArray<{
|
|
479
486
|
select: (row: never) => unknown;
|
|
480
487
|
name?: string;
|
|
@@ -840,7 +847,13 @@ type EventSourcedDB<TDefs extends Record<string, CollectionDefConstraint>> = {
|
|
|
840
847
|
* Compacts the event log by deleting confirmed outbox rows and resolved inbox
|
|
841
848
|
* rows. Safe because the pull cursor lives in `syncmeta`, not in the inbox.
|
|
842
849
|
*/
|
|
843
|
-
pruneSyncedEvents: (options?: PruneOptions) => Promise<PruneResult>;
|
|
850
|
+
pruneSyncedEvents: (options?: PruneOptions) => Promise<PruneResult>; /** Current push limits after preset, overrides and clamping. */
|
|
851
|
+
getPushLimits: () => SyncPushLimits;
|
|
852
|
+
/**
|
|
853
|
+
* Changes push limits for future batches (the batch in flight is unaffected).
|
|
854
|
+
* `pushBatchSize` is clamped to 1–100; `maxPushBytes: null` removes the cap.
|
|
855
|
+
*/
|
|
856
|
+
setPushLimits: (limits: Partial<SyncPushLimits>) => SyncPushLimits;
|
|
844
857
|
dispose: () => void;
|
|
845
858
|
};
|
|
846
859
|
type SyncResult = {
|
|
@@ -856,4 +869,4 @@ type ManualSyncResult = SyncResult & {
|
|
|
856
869
|
};
|
|
857
870
|
//#endregion
|
|
858
871
|
export { InjectedCreateCollection as $, PushResponse as A, SyncPushLimits as B, PruneOptions as C, PushConfirmation as D, PullResponse as E, ServerEvent as F, SyncTrigger as G, SyncResult as H, SyncHandlersConfig as I, UpcastEventFn as J, SyncUrlConfig as K, SyncLock as L, RetryConfig as M, RowVersionEntry as N, PushEventsFn as O, SQLiteDriver as P, CreateCollectionFn as Q, SyncMetaEntry as R, PersistedCollectionPersistence$1 as S, PullEventsFn as T, SyncStatus as U, SyncPushPreset as V, SyncTransport as W, EventSourcedLogger as X, UpcastableEvent as Y, createEventSourcedLogger as Z, ManualSyncResult as _, CollectionMap as a, OutboxEntry as b, DeadLetterReason as c, EventSourcedHooks as d, InjectedModuleFn as et, EventSourcedOptions as f, InferState as g, InferKey as h, CollectionIndexDef as i, ReservedCollections as j, PushFailure as k, EventSourcedDB as l, InboxEntry as m, CollectionDef as n, DeadLetterDirection as o, EventSourcedSharedOptions as p, UnknownEventHandling as q, CollectionIndexConstructor as r, DeadLetterEntry as s, BackendMismatchPolicy as t, PersistedCollectionOptionsFn as tt, EventSourcedDBConfig as u, MutationType as v, PruneResult as w, OutboxSyncStatus as x, OutboundEvent as y, SyncPhase as z };
|
|
859
|
-
//# sourceMappingURL=types-
|
|
872
|
+
//# sourceMappingURL=types-uO49i9Ae.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-uO49i9Ae.d.mts","names":[],"sources":["../src/core/persisted-collection.ts","../src/utils/logger.ts","../src/core/types.ts"],"mappings":";;;;;;AAkBA;;;;AAA4E;AAa5E;;;;;KAbY,4BAAA,UAAsC,0BAA0B;;;;;;;;;;;;KAahE,kBAAA,oDACV,OAAA,EAAS,gBAAA,CAAiB,CAAA,EAAG,IAAA,SAAa,WAAA,GAAc,wBAAA,MACrD,UAAA,CAAW,CAAA,EAAG,IAAA;;;;;KAMP,gBAAA,OAAuB,IAAI;;KAG3B,wBAAA,GAA2B,gBAAgB;;;;;;AAxBvD;;;;AAA4E;AAa5E;;;;;;;KCdY,kBAAA;EACV,KAAA,GAAQ,OAAA,UAAiB,IAAA,GAAO,MAAA;EAChC,IAAA,GAAO,OAAA,UAAiB,IAAA,GAAO,MAAA;EAC/B,IAAA,GAAO,OAAA,UAAiB,IAAA,GAAO,MAAA;EAC/B,KAAA,GAAQ,OAAA,UAAiB,IAAA,GAAO,MAAA;AAAA;;;;;;;;;;;;;ADYX;AAMvB;;;;AAAuC;AAGvC;;;;AAAuD;;iBCevC,wBAAA,CAAyB,KAAA,aAAkB,kBAAA,GAAqB,kBAAkB;;;KCvCtF,YAAA;AAAA,KACA,gBAAA;AFYZ;;;;;;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