@omegup/msync 0.0.70 → 0.0.71

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.
Files changed (3) hide show
  1. package/index.esm.js +10 -7
  2. package/index.js +10 -7
  3. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -1180,13 +1180,16 @@ const nextWinner = (previousWinner, previousWinnerNextFrame, sources, interrupt)
1180
1180
  const mergeIterators = (params) => {
1181
1181
  const { sources, interrupt, select = race } = params;
1182
1182
  const reiterate = (winner) => {
1183
- const { frame, key } = winner, result = frame.cont();
1183
+ const { frame, key } = winner;
1184
1184
  return {
1185
- cont: () => mergeIterators({
1186
- sources: patch(sources, key, result),
1187
- interrupt,
1188
- select: sources => nextWinner(winner, result.next, sources, interrupt),
1189
- }),
1185
+ cont: () => {
1186
+ const result = frame.cont();
1187
+ return mergeIterators({
1188
+ sources: patch(sources, key, result),
1189
+ interrupt,
1190
+ select: sources => nextWinner(winner, result.next, sources, interrupt),
1191
+ });
1192
+ },
1190
1193
  data: frame.data,
1191
1194
  info: { key, value: frame.info, job: frame.info.job },
1192
1195
  };
@@ -1615,7 +1618,7 @@ const executes$2 = (view, input, streamName, skip = false, after) => {
1615
1618
  await Promise.all([snapshotCollection.drop().catch(noop), action]);
1616
1619
  log('teardown done', `db['${snapshotCollection.collectionName}'].drop()`, ...out);
1617
1620
  };
1618
- if (!exists || !same) {
1621
+ if (!same) {
1619
1622
  await handleTeardown(exists ?? { data });
1620
1623
  }
1621
1624
  await after?.();
package/index.js CHANGED
@@ -1182,13 +1182,16 @@ const nextWinner = (previousWinner, previousWinnerNextFrame, sources, interrupt)
1182
1182
  const mergeIterators = (params) => {
1183
1183
  const { sources, interrupt, select = race } = params;
1184
1184
  const reiterate = (winner) => {
1185
- const { frame, key } = winner, result = frame.cont();
1185
+ const { frame, key } = winner;
1186
1186
  return {
1187
- cont: () => mergeIterators({
1188
- sources: patch(sources, key, result),
1189
- interrupt,
1190
- select: sources => nextWinner(winner, result.next, sources, interrupt),
1191
- }),
1187
+ cont: () => {
1188
+ const result = frame.cont();
1189
+ return mergeIterators({
1190
+ sources: patch(sources, key, result),
1191
+ interrupt,
1192
+ select: sources => nextWinner(winner, result.next, sources, interrupt),
1193
+ });
1194
+ },
1192
1195
  data: frame.data,
1193
1196
  info: { key, value: frame.info, job: frame.info.job },
1194
1197
  };
@@ -1617,7 +1620,7 @@ const executes$2 = (view, input, streamName, skip = false, after) => {
1617
1620
  await Promise.all([snapshotCollection.drop().catch(noop), action]);
1618
1621
  log('teardown done', `db['${snapshotCollection.collectionName}'].drop()`, ...out);
1619
1622
  };
1620
- if (!exists || !same) {
1623
+ if (!same) {
1621
1624
  await handleTeardown(exists ?? { data });
1622
1625
  }
1623
1626
  await after?.();
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.70",
6
+ "version": "0.0.71",
7
7
  "dependencies": {
8
8
  "dayjs": "^1.11.9",
9
9
  "dotenv": "^16.3.1",