@omegup/msync 0.0.46 → 0.0.47

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 CHANGED
@@ -1484,9 +1484,8 @@ const executes$1 = (view, input, streamName) => {
1484
1484
  streamNames[streamName] = hash;
1485
1485
  else if (streamNames[streamName] != hash)
1486
1486
  throw new Error(`streamName ${streamName} already used`);
1487
- const { collection, projection, hardMatch: pre, match } = view;
1487
+ const { collection, projection, hardMatch, match } = view;
1488
1488
  const removeNotYetSynchronizedFields = Object.values(mapExactToObject(projection, (_, k) => k.startsWith('_') ? root().of(k).has($ne(null)) : null));
1489
- const hardMatch = $and(pre, ...removeNotYetSynchronizedFields);
1490
1489
  const job = {};
1491
1490
  const db = collection.s.db, coll = collection.collectionName;
1492
1491
  db.command({
@@ -1570,7 +1569,7 @@ const executes$1 = (view, input, streamName) => {
1570
1569
  const step3 = (lastTS) => async () => {
1571
1570
  const hardQuery = $and(lastTS
1572
1571
  ? root().of('touchedAt').has($gteTs(lastTS.ts))
1573
- : root().of('deletedAt').has($eq(null)), lastTS ? null : match && $expr(match), hardMatch);
1572
+ : root().of('deletedAt').has($eq(null)), lastTS ? null : match && $expr(match), hardMatch, ...removeNotYetSynchronizedFields);
1574
1573
  const notDeleted = eq($ifNull(root().of('deletedAt').expr(), nil))(nil);
1575
1574
  const query = match ? and(notDeleted, match) : notDeleted;
1576
1575
  const replaceRaw = $replaceWith_(field({
package/index.js CHANGED
@@ -1486,9 +1486,8 @@ const executes$1 = (view, input, streamName) => {
1486
1486
  streamNames[streamName] = hash;
1487
1487
  else if (streamNames[streamName] != hash)
1488
1488
  throw new Error(`streamName ${streamName} already used`);
1489
- const { collection, projection, hardMatch: pre, match } = view;
1489
+ const { collection, projection, hardMatch, match } = view;
1490
1490
  const removeNotYetSynchronizedFields = Object.values(mapExactToObject(projection, (_, k) => k.startsWith('_') ? root().of(k).has($ne(null)) : null));
1491
- const hardMatch = $and(pre, ...removeNotYetSynchronizedFields);
1492
1491
  const job = {};
1493
1492
  const db = collection.s.db, coll = collection.collectionName;
1494
1493
  db.command({
@@ -1572,7 +1571,7 @@ const executes$1 = (view, input, streamName) => {
1572
1571
  const step3 = (lastTS) => async () => {
1573
1572
  const hardQuery = $and(lastTS
1574
1573
  ? root().of('touchedAt').has($gteTs(lastTS.ts))
1575
- : root().of('deletedAt').has($eq(null)), lastTS ? null : match && $expr(match), hardMatch);
1574
+ : root().of('deletedAt').has($eq(null)), lastTS ? null : match && $expr(match), hardMatch, ...removeNotYetSynchronizedFields);
1576
1575
  const notDeleted = eq($ifNull(root().of('deletedAt').expr(), nil))(nil);
1577
1576
  const query = match ? and(notDeleted, match) : notDeleted;
1578
1577
  const replaceRaw = $replaceWith_(field({
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "module": "index.esm.js",
4
4
  "typings": "index.d.ts",
5
5
  "name": "@omegup/msync",
6
- "version": "0.0.46",
6
+ "version": "0.0.47",
7
7
  "dependencies": {
8
8
  "dayjs": "^1.11.9",
9
9
  "dotenv": "^16.3.1",