@dudousxd/nestjs-durable-core 0.40.0 → 0.40.1

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/dist/index.cjs CHANGED
@@ -1280,7 +1280,8 @@ function createWorkflowCtx(host, runId, compensations, workflow = "") {
1280
1280
  await store.putSignalWaiter({
1281
1281
  token: `child:${childId}`,
1282
1282
  runId,
1283
- seq
1283
+ seq,
1284
+ parallelGroup: group
1284
1285
  });
1285
1286
  if (!await store.getRun(childId)) host.startChild(name, inputs[i], childId);
1286
1287
  if (!cp) {
@@ -2355,7 +2356,12 @@ var WorkflowEngine = class {
2355
2356
  seq: waiter.seq,
2356
2357
  name: `signal:${token}`,
2357
2358
  kind: "signal",
2358
- output: payload
2359
+ output: payload,
2360
+ // Carry the awaiting command's fan group (set when a `ctx.gather_children`/`ctx.all` fan-out
2361
+ // registered this waiter) onto the resolving `signal:child:<id>` checkpoint, so the dashboard
2362
+ // groups the child fan-out vertically instead of rendering it as a sequential chain. Undefined
2363
+ // for an ordinary (non-fan) signal/child await.
2364
+ parallelGroup: waiter.parallelGroup
2359
2365
  }));
2360
2366
  return this.resume(waiter.runId).catch((err) => {
2361
2367
  if (err instanceof NamespaceMismatch) return null;
@@ -3125,7 +3131,12 @@ var WorkflowEngine = class {
3125
3131
  await this.store.putSignalWaiter({
3126
3132
  token: `child:${childId}`,
3127
3133
  runId: run.id,
3128
- seq: cmd.seq
3134
+ seq: cmd.seq,
3135
+ // A `ctx.gather_children`/`ctx.all` fan-out stamps every `startChild` in the fan with the same
3136
+ // group. Thread it onto the waiter so the child's terminal `signal:child:<id>` checkpoint
3137
+ // (written by engine.signal when the child notifies the parent) carries the group and the
3138
+ // dashboard renders the fan as one parallel group. Undefined for a lone (non-fan) child.
3139
+ parallelGroup: cmd.parallelGroup
3129
3140
  });
3130
3141
  if (!await this.store.getRun(childId)) {
3131
3142
  queueMicrotask(() => void this.start(cmd.workflow, cmd.input, childId).catch(() => void 0));