@dudousxd/nestjs-durable 0.46.2 → 0.47.0
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 +52 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +53 -13
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/skills/durable-workflows/SKILL.md +12 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dudousxd/nestjs-durable",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"description": "Durable workflows for NestJS — module, decorators, discovery and boot recovery",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Davide Carvalho",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"tsup": "8.3.5",
|
|
68
68
|
"@dudousxd/nestjs-diagnostics": "0.5.0",
|
|
69
69
|
"@tanstack/intent": "0.4.0",
|
|
70
|
-
"@dudousxd/durable-
|
|
71
|
-
"@dudousxd/nestjs-durable-
|
|
72
|
-
"@dudousxd/nestjs-durable-
|
|
73
|
-
"@dudousxd/nestjs-durable-transport-
|
|
74
|
-
"@dudousxd/
|
|
70
|
+
"@dudousxd/nestjs-durable-core": "^0.78.0",
|
|
71
|
+
"@dudousxd/nestjs-durable-dashboard": "0.50.0",
|
|
72
|
+
"@dudousxd/nestjs-durable-transport-bullmq": "0.22.0",
|
|
73
|
+
"@dudousxd/nestjs-durable-transport-event-emitter": "^0.5.1",
|
|
74
|
+
"@dudousxd/durable-worker": "0.10.3"
|
|
75
75
|
},
|
|
76
76
|
"module": "./dist/index.js",
|
|
77
77
|
"exports": {
|
|
@@ -137,6 +137,18 @@ const [a, b] = await Promise.all([
|
|
|
137
137
|
]);
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
+
For the same step over many inputs, use `ctx.all` with the `@Step` reference. It dispatches one step
|
|
141
|
+
per input, wakes the workflow once per settled wave instead of once per result, and returns the
|
|
142
|
+
outputs in input order (a `GatherError` carries the failed indexes, as for a child fan):
|
|
143
|
+
|
|
144
|
+
```ts
|
|
145
|
+
const results = await ctx.all(this.lines.processLine, lines, { concurrency: 500 });
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Prefer it to `Promise.all` past a handful of steps: every result of a `Promise.all` replays the
|
|
149
|
+
workflow, which makes a fan of N steps cost O(N²) checkpoint reads. Prefer it to a child-workflow
|
|
150
|
+
`ctx.all` when each item is just a step: a child costs a whole run (row, turn, lease, signal).
|
|
151
|
+
|
|
140
152
|
### Sub-process events inside a step
|
|
141
153
|
|
|
142
154
|
For pure visibility *inside* one step's execution, the `@Step` handler's optional second argument
|