@omegup/msync 0.0.27 → 0.0.29

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
@@ -576,13 +576,11 @@ const subMerge = (args, out, gid, extra, idPrefix, first) => {
576
576
  .with($merge_({
577
577
  ...out,
578
578
  on: root().of(gid),
579
- ...{
580
- vars: { new: ['new', root().expr()] },
581
- stages: 'ctx',
582
- whenMatched: link()
583
- .with(mergeAggregates)
584
- .with(doubleReplace($set_(updater))).stages,
585
- },
579
+ vars: { new: ['new', root().expr()] },
580
+ stages: 'ctx',
581
+ whenMatched: link()
582
+ .with(mergeAggregates)
583
+ .with(doubleReplace($set_(updater))).stages,
586
584
  })).stages);
587
585
  };
588
586
 
@@ -1232,7 +1230,7 @@ const executes$1 = (view, input, streamName) => {
1232
1230
  const next = (next, debug, tr) => ({
1233
1231
  cont: withStop(next, tr),
1234
1232
  data: [],
1235
- info: { job, debug },
1233
+ info: { job, debug: `${streamName} on ${collection.collectionName}: ${debug}` },
1236
1234
  });
1237
1235
  const data = {
1238
1236
  input: input.delta,
@@ -1253,7 +1251,7 @@ const executes$1 = (view, input, streamName) => {
1253
1251
  const step2 = () => Promise.all([
1254
1252
  last.findOne({ _id: streamName, data }),
1255
1253
  last.findOne({ _id: streamName }),
1256
- ]).then(ts => next(step2_5(ts), 'handle teardown'));
1254
+ ]).then(ts => next(step2_5(ts), ts[0] ? `no teardown to handle, starting at ${ts[0].ts}` : ts[1] ? 'handle teardown' : 'start fresh'));
1257
1255
  const step2_5 = ([same, exists]) => async () => {
1258
1256
  const handleTeardown = async (last) => {
1259
1257
  if (!last.data)
package/index.js CHANGED
@@ -578,13 +578,11 @@ const subMerge = (args, out, gid, extra, idPrefix, first) => {
578
578
  .with($merge_({
579
579
  ...out,
580
580
  on: root().of(gid),
581
- ...{
582
- vars: { new: ['new', root().expr()] },
583
- stages: 'ctx',
584
- whenMatched: link()
585
- .with(mergeAggregates)
586
- .with(doubleReplace($set_(updater))).stages,
587
- },
581
+ vars: { new: ['new', root().expr()] },
582
+ stages: 'ctx',
583
+ whenMatched: link()
584
+ .with(mergeAggregates)
585
+ .with(doubleReplace($set_(updater))).stages,
588
586
  })).stages);
589
587
  };
590
588
 
@@ -1234,7 +1232,7 @@ const executes$1 = (view, input, streamName) => {
1234
1232
  const next = (next, debug, tr) => ({
1235
1233
  cont: withStop(next, tr),
1236
1234
  data: [],
1237
- info: { job, debug },
1235
+ info: { job, debug: `${streamName} on ${collection.collectionName}: ${debug}` },
1238
1236
  });
1239
1237
  const data = {
1240
1238
  input: input.delta,
@@ -1255,7 +1253,7 @@ const executes$1 = (view, input, streamName) => {
1255
1253
  const step2 = () => Promise.all([
1256
1254
  last.findOne({ _id: streamName, data }),
1257
1255
  last.findOne({ _id: streamName }),
1258
- ]).then(ts => next(step2_5(ts), 'handle teardown'));
1256
+ ]).then(ts => next(step2_5(ts), ts[0] ? `no teardown to handle, starting at ${ts[0].ts}` : ts[1] ? 'handle teardown' : 'start fresh'));
1259
1257
  const step2_5 = ([same, exists]) => async () => {
1260
1258
  const handleTeardown = async (last) => {
1261
1259
  if (!last.data)
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.27",
6
+ "version": "0.0.29",
7
7
  "dependencies": {
8
8
  "dayjs": "^1.11.9",
9
9
  "dotenv": "^16.3.1",