@omegup/msync 0.0.34 → 0.0.36

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
@@ -951,15 +951,14 @@ class Machine {
951
951
  }
952
952
  }
953
953
  const wrap = (root) => root;
954
- const runCont = async ({ next }, cb) => {
954
+ const runCont = async ({ next, clear }, cb) => {
955
955
  const { cont, info } = await next;
956
956
  const stopped = cb?.(info);
957
- const it = cont();
958
957
  if (stopped) {
959
- await it.clear();
958
+ await clear();
960
959
  throw new Error('Machine stopped');
961
960
  }
962
- return runCont(it, cb);
961
+ return runCont(cont(), cb);
963
962
  };
964
963
 
965
964
  const merge = ({ lsource: L, rsource: R, }) => mergeIterators({ sources: { L, R } });
@@ -1271,12 +1270,12 @@ const executes$1 = (view, input, streamName) => {
1271
1270
  const withStop = (next, tr) => {
1272
1271
  return addTeardown(() => ({ stop, next: next(), clear }), tr);
1273
1272
  };
1274
- const nextData = (data) => (next, debug, tr) => ({
1273
+ const nextData = (data, job) => (next, debug, tr) => ({
1275
1274
  cont: withStop(next, tr),
1276
1275
  data,
1277
1276
  info: { job, debug: `${streamName} on ${collection.collectionName}: ${debug}` },
1278
1277
  });
1279
- const next = nextData([]);
1278
+ const next = nextData([], job);
1280
1279
  const data = {
1281
1280
  input: input.delta,
1282
1281
  finalInputFirst: finalInput.raw(true),
package/index.js CHANGED
@@ -953,15 +953,14 @@ class Machine {
953
953
  }
954
954
  }
955
955
  const wrap = (root) => root;
956
- const runCont = async ({ next }, cb) => {
956
+ const runCont = async ({ next, clear }, cb) => {
957
957
  const { cont, info } = await next;
958
958
  const stopped = cb?.(info);
959
- const it = cont();
960
959
  if (stopped) {
961
- await it.clear();
960
+ await clear();
962
961
  throw new Error('Machine stopped');
963
962
  }
964
- return runCont(it, cb);
963
+ return runCont(cont(), cb);
965
964
  };
966
965
 
967
966
  const merge = ({ lsource: L, rsource: R, }) => mergeIterators({ sources: { L, R } });
@@ -1273,12 +1272,12 @@ const executes$1 = (view, input, streamName) => {
1273
1272
  const withStop = (next, tr) => {
1274
1273
  return addTeardown(() => ({ stop, next: next(), clear }), tr);
1275
1274
  };
1276
- const nextData = (data) => (next, debug, tr) => ({
1275
+ const nextData = (data, job) => (next, debug, tr) => ({
1277
1276
  cont: withStop(next, tr),
1278
1277
  data,
1279
1278
  info: { job, debug: `${streamName} on ${collection.collectionName}: ${debug}` },
1280
1279
  });
1281
- const next = nextData([]);
1280
+ const next = nextData([], job);
1282
1281
  const data = {
1283
1282
  input: input.delta,
1284
1283
  finalInputFirst: finalInput.raw(true),
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.34",
6
+ "version": "0.0.36",
7
7
  "dependencies": {
8
8
  "dayjs": "^1.11.9",
9
9
  "dotenv": "^16.3.1",