@omegup/msync 0.0.80 → 0.0.81

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
@@ -1154,7 +1154,10 @@ const createIndex = async (collection, indexSpec, options) => {
1154
1154
  }
1155
1155
  };
1156
1156
 
1157
- const patch = (x, k, v) => ({ ...x, [k]: v });
1157
+ const patch = ({ ...x }, k, v) => {
1158
+ delete x[k];
1159
+ return { ...x, [k]: v };
1160
+ };
1158
1161
  const restart = (sources) => {
1159
1162
  return map(sources, x => x.stop());
1160
1163
  };
@@ -1642,8 +1645,8 @@ const executes$2 = (view, input, streamName, skip = false, after) => {
1642
1645
  await after?.();
1643
1646
  return nextData([])(async () => {
1644
1647
  await new Promise(resolve => setTimeout(resolve, 1000));
1645
- return step3(same)();
1646
- }, 'clone into new collection');
1648
+ return next(step3(same), 'clone into new collection');
1649
+ }, 'wait for clone into new collection');
1647
1650
  };
1648
1651
  const step3 = (lastTS) => async () => {
1649
1652
  const notDeleted = eq($ifNull(root().of('deletedAt').expr(), nil))(nil);
package/index.js CHANGED
@@ -1156,7 +1156,10 @@ const createIndex = async (collection, indexSpec, options) => {
1156
1156
  }
1157
1157
  };
1158
1158
 
1159
- const patch = (x, k, v) => ({ ...x, [k]: v });
1159
+ const patch = ({ ...x }, k, v) => {
1160
+ delete x[k];
1161
+ return { ...x, [k]: v };
1162
+ };
1160
1163
  const restart = (sources) => {
1161
1164
  return map(sources, x => x.stop());
1162
1165
  };
@@ -1644,8 +1647,8 @@ const executes$2 = (view, input, streamName, skip = false, after) => {
1644
1647
  await after?.();
1645
1648
  return nextData([])(async () => {
1646
1649
  await new Promise(resolve => setTimeout(resolve, 1000));
1647
- return step3(same)();
1648
- }, 'clone into new collection');
1650
+ return next(step3(same), 'clone into new collection');
1651
+ }, 'wait for clone into new collection');
1649
1652
  };
1650
1653
  const step3 = (lastTS) => async () => {
1651
1654
  const notDeleted = eq($ifNull(root().of('deletedAt').expr(), nil))(nil);
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.80",
6
+ "version": "0.0.81",
7
7
  "dependencies": {
8
8
  "dayjs": "^1.11.9",
9
9
  "dotenv": "^16.3.1",