@fireproof/core 0.13.7-dev → 0.14.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -11605,7 +11605,7 @@ You can use close({ resize: true }) to resize header`);
11605
11605
  }));
11606
11606
 
11607
11607
  // src/version.ts
11608
- var PACKAGE_VERSION = "0.13.7-dev";
11608
+ var PACKAGE_VERSION = "0.14.1";
11609
11609
 
11610
11610
  // src/store.ts
11611
11611
  var match = PACKAGE_VERSION.match(/^([^.]*\.[^.]*)/);
@@ -20922,7 +20922,7 @@ You can use close({ resize: true }) to resize header`);
20922
20922
  } else {
20923
20923
  keys2.add(key);
20924
20924
  const docValue = await getValueFromLink(blocks, value);
20925
- updates.push({ key, value: docValue.doc, del: docValue.del });
20925
+ updates.push({ key, value: docValue.doc, del: docValue.del, clock: link2 });
20926
20926
  limit--;
20927
20927
  if (event.parents) {
20928
20928
  updates = await gatherUpdates(blocks, eventsFetcher, event.parents, since, updates, keys2, didLinks, limit);
@@ -21393,9 +21393,9 @@ You can use close({ resize: true }) to resize header`);
21393
21393
  }
21394
21394
  const got = await this.blocks.transaction(async (tblocks) => {
21395
21395
  const { head } = await applyBulkUpdateToCrdt(tblocks, this.clock.head, updates, options);
21396
- updates = updates.map(({ key, value, del: del2 }) => {
21396
+ updates = updates.map(({ key, value, del: del2, clock }) => {
21397
21397
  readFiles(this.blocks, { doc: value });
21398
- return { key, value, del: del2 };
21398
+ return { key, value, del: del2, clock };
21399
21399
  });
21400
21400
  if (loader?.awaitingCompact) {
21401
21401
  console.log("missing?", head.toString());
@@ -21504,9 +21504,10 @@ You can use close({ resize: true }) to resize header`);
21504
21504
  }
21505
21505
  async changes(since = [], opts = {}) {
21506
21506
  const { result, head } = await this._crdt.changes(since, opts);
21507
- const rows = result.map(({ key, value, del: del2 }) => ({
21507
+ const rows = result.map(({ key, value, del: del2, clock }) => ({
21508
21508
  key,
21509
- value: del2 ? { _id: key, _deleted: true } : { _id: key, ...value }
21509
+ value: del2 ? { _id: key, _deleted: true } : { _id: key, ...value },
21510
+ clock
21510
21511
  }));
21511
21512
  return { rows, clock: head };
21512
21513
  }