@lunora/db 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/collections/index.d.mts +2 -2
- package/dist/collections/index.d.ts +2 -2
- package/dist/collections/index.mjs +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +4 -4
- package/dist/mutators/index.d.mts +2 -2
- package/dist/mutators/index.d.ts +2 -2
- package/dist/mutators/index.mjs +1 -1
- package/dist/packem_shared/{OUTBOX_MUTATION_FN_NAME-Cf8iP6Wa.mjs → OUTBOX_MUTATION_FN_NAME-9fqK7rND.mjs} +32 -3
- package/dist/packem_shared/{bindMutators-BseARPYg.mjs → bindMutators-B_RaNgel.mjs} +1 -1
- package/dist/packem_shared/{collection-options.d-DgAuvqvn.d.mts → collection-options.d-Cd6j65i-.d.mts} +1 -0
- package/dist/packem_shared/{collection-options.d-DgAuvqvn.d.ts → collection-options.d-Cd6j65i-.d.ts} +1 -0
- package/dist/packem_shared/{createCheckpointRegistry-Bf4JtkVH.mjs → createCheckpointRegistry-BtIEm2Kh.mjs} +1 -1
- package/dist/packem_shared/{define-collections.d-DPgIHAtd.d.ts → define-collections.d-CNkWbDe0.d.ts} +1 -1
- package/dist/packem_shared/{define-collections.d-1z8QtQW8.d.mts → define-collections.d-CSpxihIj.d.mts} +1 -1
- package/dist/packem_shared/{define-mutators.d-Cq_qr5Z1.d.mts → define-mutators.d-B4FIhFEy.d.mts} +1 -1
- package/dist/packem_shared/{define-mutators.d-10NiOBqm.d.ts → define-mutators.d-Cg_oXn60.d.ts} +1 -1
- package/dist/packem_shared/{defineCollections-yLxJvEsu.mjs → defineCollections-C_F-42rS.mjs} +5 -3
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { type C as CheckpointRegistry, type L as LunoraCollectionConfig, type a as LunoraCollectionOptions, c as createCheckpointRegistry, l as lunoraCollectionOptions } from "../packem_shared/collection-options.d-
|
|
2
|
-
export { type C as CollectionDef, type I as InsertBinding, type L as LunoraDb, d as defineCollections } from "../packem_shared/define-collections.d-
|
|
1
|
+
export { type C as CheckpointRegistry, type L as LunoraCollectionConfig, type a as LunoraCollectionOptions, c as createCheckpointRegistry, l as lunoraCollectionOptions } from "../packem_shared/collection-options.d-Cd6j65i-.mjs";
|
|
2
|
+
export { type C as CollectionDef, type I as InsertBinding, type L as LunoraDb, d as defineCollections } from "../packem_shared/define-collections.d-CSpxihIj.mjs";
|
|
3
3
|
import '@lunora/client';
|
|
4
4
|
import '@tanstack/db';
|
|
5
5
|
import '@tanstack/offline-transactions';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { type C as CheckpointRegistry, type L as LunoraCollectionConfig, type a as LunoraCollectionOptions, c as createCheckpointRegistry, l as lunoraCollectionOptions } from "../packem_shared/collection-options.d-
|
|
2
|
-
export { type C as CollectionDef, type I as InsertBinding, type L as LunoraDb, d as defineCollections } from "../packem_shared/define-collections.d-
|
|
1
|
+
export { type C as CheckpointRegistry, type L as LunoraCollectionConfig, type a as LunoraCollectionOptions, c as createCheckpointRegistry, l as lunoraCollectionOptions } from "../packem_shared/collection-options.d-Cd6j65i-.js";
|
|
2
|
+
export { type C as CollectionDef, type I as InsertBinding, type L as LunoraDb, d as defineCollections } from "../packem_shared/define-collections.d-CNkWbDe0.js";
|
|
3
3
|
import '@lunora/client';
|
|
4
4
|
import '@tanstack/db';
|
|
5
5
|
import '@tanstack/offline-transactions';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createCheckpointRegistry, lunoraCollectionOptions } from '../packem_shared/createCheckpointRegistry-
|
|
2
|
-
export { defineCollections } from '../packem_shared/defineCollections-
|
|
1
|
+
export { createCheckpointRegistry, lunoraCollectionOptions } from '../packem_shared/createCheckpointRegistry-BtIEm2Kh.mjs';
|
|
2
|
+
export { defineCollections } from '../packem_shared/defineCollections-C_F-42rS.mjs';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { type C as CheckpointRegistry, type E as ExecutorOutboxSinkOptions, type L as LunoraCollectionConfig, type a as LunoraCollectionOptions, O as OUTBOX_MUTATION_FN_NAME, type b as OutboxExecutor, type d as OutboxMutationMetadata, type R as Row, type S as SyncWriter, c as createCheckpointRegistry, e as createExecutorOutboxSink, f as createOptimisticOnlineDetector, l as lunoraCollectionOptions, m as makeDiffEmit, r as runOutboxMutation, t as toMap } from "./packem_shared/collection-options.d-
|
|
2
|
-
export { type C as CollectionDef, type D as DefineCollectionsOptions, type I as InsertBinding, type L as LunoraDb, type W as WriteRejectedEvent, d as defineCollections } from "./packem_shared/define-collections.d-
|
|
3
|
-
export { type B as BindMutatorsContext, type a as BoundMutators, type C as ClientMutatorContext, type b as ClientMutatorDef, c as bindMutators, d as defineMutator } from "./packem_shared/define-mutators.d-
|
|
1
|
+
export { type C as CheckpointRegistry, type E as ExecutorOutboxSinkOptions, type L as LunoraCollectionConfig, type a as LunoraCollectionOptions, O as OUTBOX_MUTATION_FN_NAME, type b as OutboxExecutor, type d as OutboxMutationMetadata, type R as Row, type S as SyncWriter, c as createCheckpointRegistry, e as createExecutorOutboxSink, f as createOptimisticOnlineDetector, l as lunoraCollectionOptions, m as makeDiffEmit, r as runOutboxMutation, t as toMap } from "./packem_shared/collection-options.d-Cd6j65i-.mjs";
|
|
2
|
+
export { type C as CollectionDef, type D as DefineCollectionsOptions, type I as InsertBinding, type L as LunoraDb, type W as WriteRejectedEvent, d as defineCollections } from "./packem_shared/define-collections.d-CSpxihIj.mjs";
|
|
3
|
+
export { type B as BindMutatorsContext, type a as BoundMutators, type C as ClientMutatorContext, type b as ClientMutatorDef, c as bindMutators, d as defineMutator } from "./packem_shared/define-mutators.d-B4FIhFEy.mjs";
|
|
4
4
|
import '@lunora/client';
|
|
5
5
|
import '@tanstack/db';
|
|
6
6
|
import '@tanstack/offline-transactions';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { type C as CheckpointRegistry, type E as ExecutorOutboxSinkOptions, type L as LunoraCollectionConfig, type a as LunoraCollectionOptions, O as OUTBOX_MUTATION_FN_NAME, type b as OutboxExecutor, type d as OutboxMutationMetadata, type R as Row, type S as SyncWriter, c as createCheckpointRegistry, e as createExecutorOutboxSink, f as createOptimisticOnlineDetector, l as lunoraCollectionOptions, m as makeDiffEmit, r as runOutboxMutation, t as toMap } from "./packem_shared/collection-options.d-
|
|
2
|
-
export { type C as CollectionDef, type D as DefineCollectionsOptions, type I as InsertBinding, type L as LunoraDb, type W as WriteRejectedEvent, d as defineCollections } from "./packem_shared/define-collections.d-
|
|
3
|
-
export { type B as BindMutatorsContext, type a as BoundMutators, type C as ClientMutatorContext, type b as ClientMutatorDef, c as bindMutators, d as defineMutator } from "./packem_shared/define-mutators.d-
|
|
1
|
+
export { type C as CheckpointRegistry, type E as ExecutorOutboxSinkOptions, type L as LunoraCollectionConfig, type a as LunoraCollectionOptions, O as OUTBOX_MUTATION_FN_NAME, type b as OutboxExecutor, type d as OutboxMutationMetadata, type R as Row, type S as SyncWriter, c as createCheckpointRegistry, e as createExecutorOutboxSink, f as createOptimisticOnlineDetector, l as lunoraCollectionOptions, m as makeDiffEmit, r as runOutboxMutation, t as toMap } from "./packem_shared/collection-options.d-Cd6j65i-.js";
|
|
2
|
+
export { type C as CollectionDef, type D as DefineCollectionsOptions, type I as InsertBinding, type L as LunoraDb, type W as WriteRejectedEvent, d as defineCollections } from "./packem_shared/define-collections.d-CNkWbDe0.js";
|
|
3
|
+
export { type B as BindMutatorsContext, type a as BoundMutators, type C as ClientMutatorContext, type b as ClientMutatorDef, c as bindMutators, d as defineMutator } from "./packem_shared/define-mutators.d-Cg_oXn60.js";
|
|
4
4
|
import '@lunora/client';
|
|
5
5
|
import '@tanstack/db';
|
|
6
6
|
import '@tanstack/offline-transactions';
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { createCheckpointRegistry, lunoraCollectionOptions } from './packem_shared/createCheckpointRegistry-
|
|
2
|
-
export { defineCollections } from './packem_shared/defineCollections-
|
|
3
|
-
export { bindMutators, defineMutator } from './packem_shared/bindMutators-
|
|
4
|
-
export { OUTBOX_MUTATION_FN_NAME, createExecutorOutboxSink, createOptimisticOnlineDetector, makeDiffEmit, runOutboxMutation, toMap } from './packem_shared/OUTBOX_MUTATION_FN_NAME-
|
|
1
|
+
export { createCheckpointRegistry, lunoraCollectionOptions } from './packem_shared/createCheckpointRegistry-BtIEm2Kh.mjs';
|
|
2
|
+
export { defineCollections } from './packem_shared/defineCollections-C_F-42rS.mjs';
|
|
3
|
+
export { bindMutators, defineMutator } from './packem_shared/bindMutators-B_RaNgel.mjs';
|
|
4
|
+
export { OUTBOX_MUTATION_FN_NAME, createExecutorOutboxSink, createOptimisticOnlineDetector, makeDiffEmit, runOutboxMutation, toMap } from './packem_shared/OUTBOX_MUTATION_FN_NAME-9fqK7rND.mjs';
|
|
5
5
|
|
|
6
6
|
const VERSION = "0.0.0";
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { type B as BindMutatorsContext, type a as BoundMutators, type C as ClientMutatorContext, type b as ClientMutatorDef, c as bindMutators, d as defineMutator } from "../packem_shared/define-mutators.d-
|
|
1
|
+
export { type B as BindMutatorsContext, type a as BoundMutators, type C as ClientMutatorContext, type b as ClientMutatorDef, c as bindMutators, d as defineMutator } from "../packem_shared/define-mutators.d-B4FIhFEy.mjs";
|
|
2
2
|
import '@lunora/client';
|
|
3
3
|
import '@tanstack/db';
|
|
4
|
-
import "../packem_shared/collection-options.d-
|
|
4
|
+
import "../packem_shared/collection-options.d-Cd6j65i-.mjs";
|
|
5
5
|
import '@tanstack/offline-transactions';
|
package/dist/mutators/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { type B as BindMutatorsContext, type a as BoundMutators, type C as ClientMutatorContext, type b as ClientMutatorDef, c as bindMutators, d as defineMutator } from "../packem_shared/define-mutators.d-
|
|
1
|
+
export { type B as BindMutatorsContext, type a as BoundMutators, type C as ClientMutatorContext, type b as ClientMutatorDef, c as bindMutators, d as defineMutator } from "../packem_shared/define-mutators.d-Cg_oXn60.js";
|
|
2
2
|
import '@lunora/client';
|
|
3
3
|
import '@tanstack/db';
|
|
4
|
-
import "../packem_shared/collection-options.d-
|
|
4
|
+
import "../packem_shared/collection-options.d-Cd6j65i-.js";
|
|
5
5
|
import '@tanstack/offline-transactions';
|
package/dist/mutators/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { bindMutators, defineMutator } from '../packem_shared/bindMutators-
|
|
1
|
+
export { bindMutators, defineMutator } from '../packem_shared/bindMutators-B_RaNgel.mjs';
|
|
@@ -1,7 +1,26 @@
|
|
|
1
|
+
import { createCollection, safeRandomUUID } from '@tanstack/db';
|
|
1
2
|
import { NonRetriableError } from '@tanstack/offline-transactions';
|
|
2
3
|
|
|
3
4
|
const OUTBOX_DRAIN_INTERVAL_MS = 1e3;
|
|
4
5
|
const OUTBOX_MUTATION_FN_NAME = "__lunora_outbox__";
|
|
6
|
+
const outboxCarriers = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
const createOutboxCarrier = () => createCollection({
|
|
8
|
+
// eslint-disable-next-line no-underscore-dangle -- `_id` is the Lunora document-id field
|
|
9
|
+
getKey: (row) => row._id,
|
|
10
|
+
id: `${OUTBOX_MUTATION_FN_NAME}:${safeRandomUUID()}`,
|
|
11
|
+
startSync: true,
|
|
12
|
+
sync: {
|
|
13
|
+
// Nothing syncs into the carrier — mark it ready immediately.
|
|
14
|
+
sync: (writer) => {
|
|
15
|
+
writer.markReady();
|
|
16
|
+
return () => void 0;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const registerOutboxCarrier = (executor, carrier) => {
|
|
21
|
+
outboxCarriers.set(executor, carrier);
|
|
22
|
+
};
|
|
23
|
+
let warnedMissingCarrier = false;
|
|
5
24
|
const createExecutorOutboxSink = (executor, options = {}) => {
|
|
6
25
|
const maxItems = options.maxItems ?? 1e3;
|
|
7
26
|
const mutationFunctionName = options.mutationFnName ?? OUTBOX_MUTATION_FN_NAME;
|
|
@@ -23,13 +42,23 @@ const createExecutorOutboxSink = (executor, options = {}) => {
|
|
|
23
42
|
mutationId: mutation.mutationId,
|
|
24
43
|
shardKey: mutation.shardKey
|
|
25
44
|
};
|
|
45
|
+
const carrier = outboxCarriers.get(executor);
|
|
46
|
+
if (!carrier && !warnedMissingCarrier) {
|
|
47
|
+
warnedMissingCarrier = true;
|
|
48
|
+
console.warn(
|
|
49
|
+
"[@lunora/db] createExecutorOutboxSink: no outbox carrier is registered for this executor. On a TanStack OfflineExecutor a zero-mutation transaction is silently dropped, so offline writes may be lost — wire the sink to the executor returned by defineCollections()."
|
|
50
|
+
);
|
|
51
|
+
}
|
|
26
52
|
const transaction = executor.createOfflineTransaction({
|
|
27
|
-
autoCommit:
|
|
53
|
+
autoCommit: false,
|
|
28
54
|
idempotencyKey: mutation.idempotencyKey,
|
|
29
55
|
metadata,
|
|
30
56
|
mutationFnName: mutationFunctionName
|
|
31
57
|
});
|
|
32
|
-
transaction.mutate(() =>
|
|
58
|
+
transaction.mutate(() => {
|
|
59
|
+
carrier?.insert({ _id: mutation.idempotencyKey });
|
|
60
|
+
});
|
|
61
|
+
transaction.commit?.().catch(() => void 0);
|
|
33
62
|
return Promise.resolve();
|
|
34
63
|
}
|
|
35
64
|
};
|
|
@@ -99,4 +128,4 @@ const createOptimisticOnlineDetector = () => {
|
|
|
99
128
|
};
|
|
100
129
|
};
|
|
101
130
|
|
|
102
|
-
export { OUTBOX_MUTATION_FN_NAME, createExecutorOutboxSink, createOptimisticOnlineDetector, makeDiffEmit, runOutboxMutation, toMap };
|
|
131
|
+
export { OUTBOX_MUTATION_FN_NAME, createExecutorOutboxSink, createOptimisticOnlineDetector, createOutboxCarrier, makeDiffEmit, registerOutboxCarrier, runOutboxMutation, toMap };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LunoraError } from '@lunora/errors';
|
|
2
2
|
import { createTransaction } from '@tanstack/db';
|
|
3
|
-
import { runOutboxMutation } from './OUTBOX_MUTATION_FN_NAME-
|
|
3
|
+
import { runOutboxMutation } from './OUTBOX_MUTATION_FN_NAME-9fqK7rND.mjs';
|
|
4
4
|
|
|
5
5
|
const defineMutator = (definition) => {
|
|
6
6
|
return {
|
|
@@ -23,6 +23,7 @@ interface OutboxMutationMetadata extends Record<string, unknown> {
|
|
|
23
23
|
}
|
|
24
24
|
/** A committable outbox transaction handle (the `OfflineTransaction` the executor mints). */
|
|
25
25
|
interface OutboxTransaction {
|
|
26
|
+
commit?: () => Promise<unknown>;
|
|
26
27
|
mutate: (callback: () => void) => unknown;
|
|
27
28
|
}
|
|
28
29
|
/**
|
package/dist/packem_shared/{collection-options.d-DgAuvqvn.d.ts → collection-options.d-Cd6j65i-.d.ts}
RENAMED
|
@@ -23,6 +23,7 @@ interface OutboxMutationMetadata extends Record<string, unknown> {
|
|
|
23
23
|
}
|
|
24
24
|
/** A committable outbox transaction handle (the `OfflineTransaction` the executor mints). */
|
|
25
25
|
interface OutboxTransaction {
|
|
26
|
+
commit?: () => Promise<unknown>;
|
|
26
27
|
mutate: (callback: () => void) => unknown;
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LunoraError } from '@lunora/errors';
|
|
2
2
|
import { BTreeIndex } from '@tanstack/db';
|
|
3
|
-
import { toMap, makeDiffEmit } from './OUTBOX_MUTATION_FN_NAME-
|
|
3
|
+
import { toMap, makeDiffEmit } from './OUTBOX_MUTATION_FN_NAME-9fqK7rND.mjs';
|
|
4
4
|
|
|
5
5
|
const createGate = () => {
|
|
6
6
|
let highest = Number.NEGATIVE_INFINITY;
|
package/dist/packem_shared/{define-collections.d-DPgIHAtd.d.ts → define-collections.d-CNkWbDe0.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FunctionReference, SubscriptionError, LunoraClient } from '@lunora/client';
|
|
2
2
|
import { Transaction, Collection } from '@tanstack/db';
|
|
3
3
|
import { OfflineExecutor, StorageDiagnostic } from '@tanstack/offline-transactions';
|
|
4
|
-
import { R as Row } from "./collection-options.d-
|
|
4
|
+
import { R as Row } from "./collection-options.d-Cd6j65i-.js";
|
|
5
5
|
/** Element type of an array (the row type a `list` query returns). */
|
|
6
6
|
type Element<T> = T extends ReadonlyArray<infer E> ? E : never;
|
|
7
7
|
/** `true` for the `any` type, `false` otherwise. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FunctionReference, SubscriptionError, LunoraClient } from '@lunora/client';
|
|
2
2
|
import { Transaction, Collection } from '@tanstack/db';
|
|
3
3
|
import { OfflineExecutor, StorageDiagnostic } from '@tanstack/offline-transactions';
|
|
4
|
-
import { R as Row } from "./collection-options.d-
|
|
4
|
+
import { R as Row } from "./collection-options.d-Cd6j65i-.mjs";
|
|
5
5
|
/** Element type of an array (the row type a `list` query returns). */
|
|
6
6
|
type Element<T> = T extends ReadonlyArray<infer E> ? E : never;
|
|
7
7
|
/** `true` for the `any` type, `false` otherwise. */
|
package/dist/packem_shared/{define-mutators.d-Cq_qr5Z1.d.mts → define-mutators.d-B4FIhFEy.d.mts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LunoraClient } from '@lunora/client';
|
|
2
2
|
import { Collection, Transaction } from '@tanstack/db';
|
|
3
|
-
import { C as CheckpointRegistry, R as Row } from "./collection-options.d-
|
|
3
|
+
import { C as CheckpointRegistry, R as Row } from "./collection-options.d-Cd6j65i-.mjs";
|
|
4
4
|
/** The local store a client mutator's optimistic body writes against. */
|
|
5
5
|
interface ClientMutatorContext {
|
|
6
6
|
/** The wired collections, keyed by name — apply optimistic inserts/updates/deletes here. */
|
package/dist/packem_shared/{define-mutators.d-10NiOBqm.d.ts → define-mutators.d-Cg_oXn60.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LunoraClient } from '@lunora/client';
|
|
2
2
|
import { Collection, Transaction } from '@tanstack/db';
|
|
3
|
-
import { C as CheckpointRegistry, R as Row } from "./collection-options.d-
|
|
3
|
+
import { C as CheckpointRegistry, R as Row } from "./collection-options.d-Cd6j65i-.js";
|
|
4
4
|
/** The local store a client mutator's optimistic body writes against. */
|
|
5
5
|
interface ClientMutatorContext {
|
|
6
6
|
/** The wired collections, keyed by name — apply optimistic inserts/updates/deletes here. */
|
package/dist/packem_shared/{defineCollections-yLxJvEsu.mjs → defineCollections-C_F-42rS.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createCollection, safeRandomUUID } from '@tanstack/db';
|
|
2
2
|
import { startOfflineExecutor, NonRetriableError } from '@tanstack/offline-transactions';
|
|
3
|
-
import { lunoraCollectionOptions } from './createCheckpointRegistry-
|
|
4
|
-
import {
|
|
3
|
+
import { lunoraCollectionOptions } from './createCheckpointRegistry-BtIEm2Kh.mjs';
|
|
4
|
+
import { createOutboxCarrier, createOptimisticOnlineDetector, OUTBOX_MUTATION_FN_NAME, registerOutboxCarrier, runOutboxMutation } from './OUTBOX_MUTATION_FN_NAME-9fqK7rND.mjs';
|
|
5
5
|
|
|
6
6
|
const defineCollections = (client, defs, options = {}) => {
|
|
7
7
|
const collections = {};
|
|
@@ -57,8 +57,9 @@ const defineCollections = (client, defs, options = {}) => {
|
|
|
57
57
|
() => client.mutation({ __lunoraRef: meta.functionPath }, meta.args, { mutationId: meta.idempotencyKey, shardKey: meta.shardKey })
|
|
58
58
|
);
|
|
59
59
|
};
|
|
60
|
+
const outboxCarrier = createOutboxCarrier();
|
|
60
61
|
const executor = startOfflineExecutor({
|
|
61
|
-
collections,
|
|
62
|
+
collections: { ...collections, [OUTBOX_MUTATION_FN_NAME]: outboxCarrier },
|
|
62
63
|
mutationFns,
|
|
63
64
|
onlineDetector: createOptimisticOnlineDetector(),
|
|
64
65
|
...options.onLeadershipChange ? { onLeadershipChange: options.onLeadershipChange } : {},
|
|
@@ -82,6 +83,7 @@ const defineCollections = (client, defs, options = {}) => {
|
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
});
|
|
86
|
+
registerOutboxCarrier(executor, outboxCarrier);
|
|
85
87
|
const actions = {};
|
|
86
88
|
for (const [name, definition] of entries) {
|
|
87
89
|
const insert = definition.insert;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/db",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.23",
|
|
4
4
|
"description": "TanStack DB binding: typed, live-synced collections and a durable offline outbox over the Lunora client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@lunora/client": "1.0.0-alpha.
|
|
58
|
-
"@lunora/errors": "1.0.0-alpha.
|
|
57
|
+
"@lunora/client": "1.0.0-alpha.23",
|
|
58
|
+
"@lunora/errors": "1.0.0-alpha.5"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@tanstack/db": "^0.6.0",
|