@omegup/msync 0.0.49 → 0.0.51
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/index.esm.js +6 -1
- package/index.js +6 -1
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1444,6 +1444,7 @@ const makeWatchStream = (db, { collection, projection: p, hardMatch: m }, startA
|
|
|
1444
1444
|
});
|
|
1445
1445
|
pipeline.push({
|
|
1446
1446
|
$replaceWith: {
|
|
1447
|
+
_id: 1,
|
|
1447
1448
|
ts: {
|
|
1448
1449
|
$cond: {
|
|
1449
1450
|
if: {
|
|
@@ -1591,7 +1592,11 @@ const executes$1 = (view, input, streamName) => {
|
|
|
1591
1592
|
.with($merge_({
|
|
1592
1593
|
into: snapshotCollection,
|
|
1593
1594
|
on: root().of('_id'),
|
|
1594
|
-
|
|
1595
|
+
stages: 'ctx',
|
|
1596
|
+
vars: {
|
|
1597
|
+
new: ['new', root().expr()],
|
|
1598
|
+
},
|
|
1599
|
+
whenMatched: link().with($replaceWith_(ite(eq(root().of('before').expr())(ctx()('new').of('after').expr()), root().expr(), mergeObjects(root().expr(), ctx()('new').expr())))).stages,
|
|
1595
1600
|
whenNotMatched: 'insert',
|
|
1596
1601
|
})).stages;
|
|
1597
1602
|
const r = await aggregate(streamName, c => c({ coll: collection, input: cloneIntoNew }));
|
package/index.js
CHANGED
|
@@ -1446,6 +1446,7 @@ const makeWatchStream = (db, { collection, projection: p, hardMatch: m }, startA
|
|
|
1446
1446
|
});
|
|
1447
1447
|
pipeline.push({
|
|
1448
1448
|
$replaceWith: {
|
|
1449
|
+
_id: 1,
|
|
1449
1450
|
ts: {
|
|
1450
1451
|
$cond: {
|
|
1451
1452
|
if: {
|
|
@@ -1593,7 +1594,11 @@ const executes$1 = (view, input, streamName) => {
|
|
|
1593
1594
|
.with($merge_({
|
|
1594
1595
|
into: snapshotCollection,
|
|
1595
1596
|
on: root().of('_id'),
|
|
1596
|
-
|
|
1597
|
+
stages: 'ctx',
|
|
1598
|
+
vars: {
|
|
1599
|
+
new: ['new', root().expr()],
|
|
1600
|
+
},
|
|
1601
|
+
whenMatched: link().with($replaceWith_(ite(eq(root().of('before').expr())(ctx()('new').of('after').expr()), root().expr(), mergeObjects(root().expr(), ctx()('new').expr())))).stages,
|
|
1597
1602
|
whenNotMatched: 'insert',
|
|
1598
1603
|
})).stages;
|
|
1599
1604
|
const r = await aggregate(streamName, c => c({ coll: collection, input: cloneIntoNew }));
|