@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
@@ -11605,7 +11605,7 @@ replaceTraps((oldTraps) => ({
|
|
11605
11605
|
}));
|
11606
11606
|
|
11607
11607
|
// src/version.ts
|
11608
|
-
var PACKAGE_VERSION = "0.
|
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 @@ async function gatherUpdates(blocks, eventsFetcher, head, since, updates = [], k
|
|
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 @@ var CRDT = class {
|
|
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 @@ var Database = class {
|
|
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
|
}
|