@mastra/inngest 0.18.2 → 0.18.3
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/CHANGELOG.md +18 -0
- package/dist/index.cjs +17 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -16
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @mastra/inngest
|
|
2
2
|
|
|
3
|
+
## 0.18.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Prevent changing workflow status to suspended when some parallel steps are still running ([#9460](https://github.com/mastra-ai/mastra/pull/9460))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`d6cb18e`](https://github.com/mastra-ai/mastra/commit/d6cb18e189fd0ac95d4934cf0d6f2866876d1a2e), [`d0ecff7`](https://github.com/mastra-ai/mastra/commit/d0ecff793d5cd50408cd8d1d113f02e28d897a3d), [`e84a959`](https://github.com/mastra-ai/mastra/commit/e84a9592bfdec4f1c9fdf108c9d4ea4e2ee8f7e3)]:
|
|
10
|
+
- @mastra/core@0.23.3
|
|
11
|
+
|
|
12
|
+
## 0.18.3-alpha.0
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Prevent changing workflow status to suspended when some parallel steps are still running ([#9460](https://github.com/mastra-ai/mastra/pull/9460))
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`d6cb18e`](https://github.com/mastra-ai/mastra/commit/d6cb18e189fd0ac95d4934cf0d6f2866876d1a2e), [`d0ecff7`](https://github.com/mastra-ai/mastra/commit/d0ecff793d5cd50408cd8d1d113f02e28d897a3d), [`e84a959`](https://github.com/mastra-ai/mastra/commit/e84a9592bfdec4f1c9fdf108c9d4ea4e2ee8f7e3)]:
|
|
19
|
+
- @mastra/core@0.23.3-alpha.0
|
|
20
|
+
|
|
3
21
|
## 0.18.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1434,9 +1434,7 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
1434
1434
|
runId,
|
|
1435
1435
|
entry,
|
|
1436
1436
|
prevOutput,
|
|
1437
|
-
prevStep,
|
|
1438
1437
|
stepResults,
|
|
1439
|
-
serializedStepGraph,
|
|
1440
1438
|
resume,
|
|
1441
1439
|
executionContext,
|
|
1442
1440
|
emitter,
|
|
@@ -1537,13 +1535,14 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
1537
1535
|
}
|
|
1538
1536
|
});
|
|
1539
1537
|
const results = await Promise.all(
|
|
1540
|
-
stepsToRun.map(
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1538
|
+
stepsToRun.map(async (step, index) => {
|
|
1539
|
+
const currStepResult = stepResults[step.step.id];
|
|
1540
|
+
if (currStepResult && currStepResult.status === "success") {
|
|
1541
|
+
return currStepResult;
|
|
1542
|
+
}
|
|
1543
|
+
const result = await this.executeStep({
|
|
1544
|
+
step: step.step,
|
|
1545
|
+
prevOutput,
|
|
1547
1546
|
stepResults,
|
|
1548
1547
|
resume,
|
|
1549
1548
|
executionContext: {
|
|
@@ -1564,20 +1563,22 @@ var InngestExecutionEngine = class extends workflows.DefaultExecutionEngine {
|
|
|
1564
1563
|
tracingContext: {
|
|
1565
1564
|
currentSpan: conditionalSpan
|
|
1566
1565
|
}
|
|
1567
|
-
})
|
|
1568
|
-
|
|
1566
|
+
});
|
|
1567
|
+
stepResults[step.step.id] = result;
|
|
1568
|
+
return result;
|
|
1569
|
+
})
|
|
1569
1570
|
);
|
|
1570
|
-
const hasFailed = results.find((result) => result.
|
|
1571
|
-
const hasSuspended = results.find((result) => result.
|
|
1571
|
+
const hasFailed = results.find((result) => result.status === "failed");
|
|
1572
|
+
const hasSuspended = results.find((result) => result.status === "suspended");
|
|
1572
1573
|
if (hasFailed) {
|
|
1573
|
-
execResults = { status: "failed", error: hasFailed.
|
|
1574
|
+
execResults = { status: "failed", error: hasFailed.error };
|
|
1574
1575
|
} else if (hasSuspended) {
|
|
1575
|
-
execResults = { status: "suspended", suspendPayload: hasSuspended.
|
|
1576
|
+
execResults = { status: "suspended", suspendPayload: hasSuspended.suspendPayload };
|
|
1576
1577
|
} else {
|
|
1577
1578
|
execResults = {
|
|
1578
1579
|
status: "success",
|
|
1579
1580
|
output: results.reduce((acc, result, index) => {
|
|
1580
|
-
if (result.
|
|
1581
|
+
if (result.status === "success") {
|
|
1581
1582
|
acc[stepsToRun[index].step.id] = result.output;
|
|
1582
1583
|
}
|
|
1583
1584
|
return acc;
|