@fireproof/core 0.13.7-dev → 0.14.1
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/fireproof.cjs +7 -6
- package/dist/browser/fireproof.cjs.map +2 -2
- package/dist/browser/fireproof.esm.js +7 -6
- package/dist/browser/fireproof.esm.js.map +2 -2
- package/dist/browser/fireproof.iife.js +7 -6
- package/dist/browser/fireproof.iife.js.map +2 -2
- package/dist/node/fireproof.cjs +9867 -446
- package/dist/node/fireproof.cjs.map +4 -4
- package/dist/node/fireproof.esm.js +9876 -447
- package/dist/node/fireproof.esm.js.map +4 -4
- package/dist/types/types.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
@@ -11583,7 +11583,7 @@ replaceTraps((oldTraps) => ({
|
|
11583
11583
|
}));
|
11584
11584
|
|
11585
11585
|
// src/version.ts
|
11586
|
-
var PACKAGE_VERSION = "0.
|
11586
|
+
var PACKAGE_VERSION = "0.14.1";
|
11587
11587
|
|
11588
11588
|
// src/store.ts
|
11589
11589
|
var match = PACKAGE_VERSION.match(/^([^.]*\.[^.]*)/);
|
@@ -20900,7 +20900,7 @@ async function gatherUpdates(blocks, eventsFetcher, head, since, updates = [], k
|
|
20900
20900
|
} else {
|
20901
20901
|
keys2.add(key);
|
20902
20902
|
const docValue = await getValueFromLink(blocks, value);
|
20903
|
-
updates.push({ key, value: docValue.doc, del: docValue.del });
|
20903
|
+
updates.push({ key, value: docValue.doc, del: docValue.del, clock: link2 });
|
20904
20904
|
limit--;
|
20905
20905
|
if (event.parents) {
|
20906
20906
|
updates = await gatherUpdates(blocks, eventsFetcher, event.parents, since, updates, keys2, didLinks, limit);
|
@@ -21371,9 +21371,9 @@ var CRDT = class {
|
|
21371
21371
|
}
|
21372
21372
|
const got = await this.blocks.transaction(async (tblocks) => {
|
21373
21373
|
const { head } = await applyBulkUpdateToCrdt(tblocks, this.clock.head, updates, options);
|
21374
|
-
updates = updates.map(({ key, value, del: del2 }) => {
|
21374
|
+
updates = updates.map(({ key, value, del: del2, clock }) => {
|
21375
21375
|
readFiles(this.blocks, { doc: value });
|
21376
|
-
return { key, value, del: del2 };
|
21376
|
+
return { key, value, del: del2, clock };
|
21377
21377
|
});
|
21378
21378
|
if (loader?.awaitingCompact) {
|
21379
21379
|
console.log("missing?", head.toString());
|
@@ -21482,9 +21482,10 @@ var Database = class {
|
|
21482
21482
|
}
|
21483
21483
|
async changes(since = [], opts = {}) {
|
21484
21484
|
const { result, head } = await this._crdt.changes(since, opts);
|
21485
|
-
const rows = result.map(({ key, value, del: del2 }) => ({
|
21485
|
+
const rows = result.map(({ key, value, del: del2, clock }) => ({
|
21486
21486
|
key,
|
21487
|
-
value: del2 ? { _id: key, _deleted: true } : { _id: key, ...value }
|
21487
|
+
value: del2 ? { _id: key, _deleted: true } : { _id: key, ...value },
|
21488
|
+
clock
|
21488
21489
|
}));
|
21489
21490
|
return { rows, clock: head };
|
21490
21491
|
}
|