@mastra/inngest 0.18.2 → 0.18.4-alpha.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/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @mastra/inngest
2
2
 
3
+ ## 0.18.4-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - update peerdeps ([`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc))
8
+
9
+ - Updated dependencies [[`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc), [`6d7e90d`](https://github.com/mastra-ai/mastra/commit/6d7e90db09713e6250f4d6c3d3cff1b4740e50f9), [`f78b908`](https://github.com/mastra-ai/mastra/commit/f78b9080e11af765969b36b4a619761056030840), [`23c2614`](https://github.com/mastra-ai/mastra/commit/23c26140fdbf04b8c59e8d7d52106d67dad962ec), [`e365eda`](https://github.com/mastra-ai/mastra/commit/e365eda45795b43707310531cac1e2ce4e5a0712)]:
10
+ - @mastra/core@0.24.0-alpha.0
11
+
12
+ ## 0.18.3
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
20
+
21
+ ## 0.18.3-alpha.0
22
+
23
+ ### Patch Changes
24
+
25
+ - Prevent changing workflow status to suspended when some parallel steps are still running ([#9460](https://github.com/mastra-ai/mastra/pull/9460))
26
+
27
+ - 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)]:
28
+ - @mastra/core@0.23.3-alpha.0
29
+
3
30
  ## 0.18.2
4
31
 
5
32
  ### 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
- (step, index) => this.executeEntry({
1542
- workflowId,
1543
- runId,
1544
- entry: step,
1545
- serializedStepGraph,
1546
- prevStep,
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.result.status === "failed");
1571
- const hasSuspended = results.find((result) => result.result.status === "suspended");
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.result.error };
1574
+ execResults = { status: "failed", error: hasFailed.error };
1574
1575
  } else if (hasSuspended) {
1575
- execResults = { status: "suspended", suspendPayload: hasSuspended.result.suspendPayload };
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.result.status === "success") {
1581
+ if (result.status === "success") {
1581
1582
  acc[stepsToRun[index].step.id] = result.output;
1582
1583
  }
1583
1584
  return acc;