@lunora/db 1.0.0-alpha.6 → 1.0.0-alpha.8

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.
@@ -1,2 +1,2 @@
1
- export { createCheckpointRegistry, lunoraCollectionOptions } from '../packem_shared/createCheckpointRegistry-DztP2nI8.mjs';
2
- export { defineCollections } from '../packem_shared/defineCollections-oL1qzsWE.mjs';
1
+ export { createCheckpointRegistry, lunoraCollectionOptions } from '../packem_shared/createCheckpointRegistry-C1kzNWCs.mjs';
2
+ export { defineCollections } from '../packem_shared/defineCollections-DR6fcIkQ.mjs';
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { createCheckpointRegistry, lunoraCollectionOptions } from './packem_shared/createCheckpointRegistry-DztP2nI8.mjs';
2
- export { defineCollections } from './packem_shared/defineCollections-oL1qzsWE.mjs';
1
+ export { createCheckpointRegistry, lunoraCollectionOptions } from './packem_shared/createCheckpointRegistry-C1kzNWCs.mjs';
2
+ export { defineCollections } from './packem_shared/defineCollections-DR6fcIkQ.mjs';
3
3
  export { bindMutators, defineMutator } from './packem_shared/bindMutators-Bh6giR9x.mjs';
4
4
  export { OUTBOX_MUTATION_FN_NAME, createExecutorOutboxSink, createOptimisticOnlineDetector, makeDiffEmit, runOutboxMutation, toMap } from './packem_shared/OUTBOX_MUTATION_FN_NAME-DZrP1gna.mjs';
5
5
 
@@ -63,18 +63,17 @@ const lunoraCollectionOptions = (options) => {
63
63
  }
64
64
  };
65
65
  const onError = (error) => onErrorHandler?.(error);
66
+ const onCheckpoint = (watermark) => {
67
+ checkpoints.resolve(watermark);
68
+ };
66
69
  if (options.shape !== void 0) {
67
70
  return options.client.subscribeShape({ args, name: options.shape.name }, onRows, {
68
- // Advance the registry as the shape syncs, so a mutator runtime can
69
- // drop optimistic overlays once the server's rows have landed.
70
- onCheckpoint: (watermark) => {
71
- checkpoints.resolve(watermark);
72
- },
71
+ onCheckpoint,
73
72
  onError,
74
73
  shardKey: options.shape.shardKey
75
74
  });
76
75
  }
77
- return options.client.subscribe(options.list, args, onRows, { onError });
76
+ return options.client.subscribe(options.list, args, onRows, { onCheckpoint, onError });
78
77
  };
79
78
  const config = {
80
79
  // Auto-build ordered (B-tree) indexes for whatever the app's live queries
@@ -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-DztP2nI8.mjs';
3
+ import { lunoraCollectionOptions } from './createCheckpointRegistry-C1kzNWCs.mjs';
4
4
  import { createOptimisticOnlineDetector, runOutboxMutation, OUTBOX_MUTATION_FN_NAME } from './OUTBOX_MUTATION_FN_NAME-DZrP1gna.mjs';
5
5
 
6
6
  const defineCollections = (client, defs) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/db",
3
- "version": "1.0.0-alpha.6",
3
+ "version": "1.0.0-alpha.8",
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,7 @@
54
54
  "access": "public"
55
55
  },
56
56
  "dependencies": {
57
- "@lunora/client": "1.0.0-alpha.6"
57
+ "@lunora/client": "1.0.0-alpha.8"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@tanstack/db": "^0.6.0",