@lunora/db 1.0.0-alpha.15 → 1.0.0-alpha.17
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.mjs +2 -2
- package/dist/index.mjs +3 -3
- package/dist/mutators/index.mjs +1 -1
- package/dist/packem_shared/{bindMutators-DNhICkoy.mjs → bindMutators-BseARPYg.mjs} +5 -1
- package/dist/packem_shared/{createCheckpointRegistry-SvwBczzv.mjs → createCheckpointRegistry-DkfPWFWz.mjs} +2 -1
- package/dist/packem_shared/{defineCollections-BWB7CJzY.mjs → defineCollections--aaoqJCd.mjs} +1 -1
- package/package.json +3 -2
|
@@ -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-DkfPWFWz.mjs';
|
|
2
|
+
export { defineCollections } from '../packem_shared/defineCollections--aaoqJCd.mjs';
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { createCheckpointRegistry, lunoraCollectionOptions } from './packem_shared/createCheckpointRegistry-
|
|
2
|
-
export { defineCollections } from './packem_shared/defineCollections
|
|
3
|
-
export { bindMutators, defineMutator } from './packem_shared/bindMutators-
|
|
1
|
+
export { createCheckpointRegistry, lunoraCollectionOptions } from './packem_shared/createCheckpointRegistry-DkfPWFWz.mjs';
|
|
2
|
+
export { defineCollections } from './packem_shared/defineCollections--aaoqJCd.mjs';
|
|
3
|
+
export { bindMutators, defineMutator } from './packem_shared/bindMutators-BseARPYg.mjs';
|
|
4
4
|
export { OUTBOX_MUTATION_FN_NAME, createExecutorOutboxSink, createOptimisticOnlineDetector, makeDiffEmit, runOutboxMutation, toMap } from './packem_shared/OUTBOX_MUTATION_FN_NAME-Cf8iP6Wa.mjs';
|
|
5
5
|
|
|
6
6
|
const VERSION = "0.0.0";
|
package/dist/mutators/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { bindMutators, defineMutator } from '../packem_shared/bindMutators-
|
|
1
|
+
export { bindMutators, defineMutator } from '../packem_shared/bindMutators-BseARPYg.mjs';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LunoraError } from '@lunora/errors';
|
|
1
2
|
import { createTransaction } from '@tanstack/db';
|
|
2
3
|
import { runOutboxMutation } from './OUTBOX_MUTATION_FN_NAME-Cf8iP6Wa.mjs';
|
|
3
4
|
|
|
@@ -28,7 +29,10 @@ const bindMutators = (client, context, mutators) => {
|
|
|
28
29
|
return clientSeq;
|
|
29
30
|
}
|
|
30
31
|
if (attempt >= maxReissues) {
|
|
31
|
-
throw new
|
|
32
|
+
throw new LunoraError(
|
|
33
|
+
"INTERNAL",
|
|
34
|
+
`lunora: custom mutator "${serverRef}" could not claim a fresh client sequence after ${String(maxReissues)} attempts`
|
|
35
|
+
);
|
|
32
36
|
}
|
|
33
37
|
}
|
|
34
38
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LunoraError } from '@lunora/errors';
|
|
1
2
|
import { BTreeIndex } from '@tanstack/db';
|
|
2
3
|
import { toMap, makeDiffEmit } from './OUTBOX_MUTATION_FN_NAME-Cf8iP6Wa.mjs';
|
|
3
4
|
|
|
@@ -46,7 +47,7 @@ const createCheckpointRegistry = () => {
|
|
|
46
47
|
};
|
|
47
48
|
const lunoraCollectionOptions = (options) => {
|
|
48
49
|
if (options.list === void 0 === (options.shape === void 0)) {
|
|
49
|
-
throw new
|
|
50
|
+
throw new LunoraError("INTERNAL", "lunoraCollectionOptions: pass exactly one of `list` or `shape`");
|
|
50
51
|
}
|
|
51
52
|
const getKey = options.getKey ?? ((row) => row._id);
|
|
52
53
|
const checkpoints = createCheckpointRegistry();
|
package/dist/packem_shared/{defineCollections-BWB7CJzY.mjs → defineCollections--aaoqJCd.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createCollection } from '@tanstack/db';
|
|
2
2
|
import { startOfflineExecutor, NonRetriableError } from '@tanstack/offline-transactions';
|
|
3
|
-
import { lunoraCollectionOptions } from './createCheckpointRegistry-
|
|
3
|
+
import { lunoraCollectionOptions } from './createCheckpointRegistry-DkfPWFWz.mjs';
|
|
4
4
|
import { createOptimisticOnlineDetector, runOutboxMutation, OUTBOX_MUTATION_FN_NAME } from './OUTBOX_MUTATION_FN_NAME-Cf8iP6Wa.mjs';
|
|
5
5
|
|
|
6
6
|
const defineCollections = (client, defs, options = {}) => {
|
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.17",
|
|
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,7 +54,8 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@lunora/client": "1.0.0-alpha.
|
|
57
|
+
"@lunora/client": "1.0.0-alpha.17",
|
|
58
|
+
"@lunora/errors": "1.0.0-alpha.1"
|
|
58
59
|
},
|
|
59
60
|
"peerDependencies": {
|
|
60
61
|
"@tanstack/db": "^0.6.0",
|