@mastra/inngest 0.0.0-vnext-inngest-20250506123700 → 0.0.0-vnext-inngest-20250507093737

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,6 +1,6 @@
1
1
  # @mastra/inngest
2
2
 
3
- ## 0.0.0-vnext-inngest-20250506123700
3
+ ## 0.0.0-vnext-inngest-20250507093737
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -18,4 +18,4 @@
18
18
  - Updated dependencies [17826a9]
19
19
  - Updated dependencies [fba031f]
20
20
  - Updated dependencies [51e6923]
21
- - @mastra/core@0.0.0-vnext-inngest-20250506123700
21
+ - @mastra/core@0.0.0-vnext-inngest-20250507093737
@@ -175,9 +175,9 @@ export declare class InngestWorkflow<TSteps extends NewStep<string, any, any>[]
175
175
  } & Partial<Record<"cron", never>>]>[];
176
176
  }
177
177
 
178
- export declare function serve({ mastra, ingest }: {
178
+ export declare function serve({ mastra, inngest }: {
179
179
  mastra: Mastra;
180
- ingest: Inngest;
180
+ inngest: Inngest;
181
181
  }): ReturnType<typeof serve_2>;
182
182
 
183
183
  export { }
@@ -175,9 +175,9 @@ export declare class InngestWorkflow<TSteps extends NewStep<string, any, any>[]
175
175
  } & Partial<Record<"cron", never>>]>[];
176
176
  }
177
177
 
178
- export declare function serve({ mastra, ingest }: {
178
+ export declare function serve({ mastra, inngest }: {
179
179
  mastra: Mastra;
180
- ingest: Inngest;
180
+ inngest: Inngest;
181
181
  }): ReturnType<typeof serve_2>;
182
182
 
183
183
  export { }
package/dist/index.cjs CHANGED
@@ -7,16 +7,17 @@ var di = require('@mastra/core/di');
7
7
  var crypto = require('crypto');
8
8
 
9
9
  // src/index.ts
10
- function serve({ mastra, ingest }) {
10
+ function serve({ mastra, inngest }) {
11
11
  const wfs = mastra.vnext_getWorkflows();
12
12
  const functions = Object.values(wfs).flatMap((wf) => {
13
13
  if (wf instanceof InngestWorkflow) {
14
+ wf.__registerMastra(mastra);
14
15
  return wf.getFunctions();
15
16
  }
16
17
  return [];
17
18
  });
18
19
  return hono.serve({
19
- client: ingest,
20
+ client: inngest,
20
21
  functions
21
22
  });
22
23
  }
@@ -134,11 +135,18 @@ var InngestWorkflow = class _InngestWorkflow extends vNext.NewWorkflow {
134
135
  __registerMastra(mastra) {
135
136
  this.#mastra = mastra;
136
137
  this.executionEngine.__registerMastra(mastra);
138
+ const updateNested = (step) => {
139
+ if ((step.type === "step" || step.type === "loop" || step.type === "foreach") && step.step instanceof _InngestWorkflow) {
140
+ step.step.__registerMastra(mastra);
141
+ } else if (step.type === "parallel" || step.type === "conditional") {
142
+ for (const subStep of step.steps) {
143
+ updateNested(subStep);
144
+ }
145
+ }
146
+ };
137
147
  if (this.executionGraph.steps.length) {
138
148
  for (const step of this.executionGraph.steps) {
139
- if (step.type === "step" && step.step instanceof _InngestWorkflow) {
140
- step.step.__registerMastra(mastra);
141
- }
149
+ updateNested(step);
142
150
  }
143
151
  }
144
152
  }
package/dist/index.js CHANGED
@@ -5,16 +5,17 @@ import { RuntimeContext } from '@mastra/core/di';
5
5
  import { randomUUID } from 'crypto';
6
6
 
7
7
  // src/index.ts
8
- function serve({ mastra, ingest }) {
8
+ function serve({ mastra, inngest }) {
9
9
  const wfs = mastra.vnext_getWorkflows();
10
10
  const functions = Object.values(wfs).flatMap((wf) => {
11
11
  if (wf instanceof InngestWorkflow) {
12
+ wf.__registerMastra(mastra);
12
13
  return wf.getFunctions();
13
14
  }
14
15
  return [];
15
16
  });
16
17
  return serve$1({
17
- client: ingest,
18
+ client: inngest,
18
19
  functions
19
20
  });
20
21
  }
@@ -132,11 +133,18 @@ var InngestWorkflow = class _InngestWorkflow extends NewWorkflow {
132
133
  __registerMastra(mastra) {
133
134
  this.#mastra = mastra;
134
135
  this.executionEngine.__registerMastra(mastra);
136
+ const updateNested = (step) => {
137
+ if ((step.type === "step" || step.type === "loop" || step.type === "foreach") && step.step instanceof _InngestWorkflow) {
138
+ step.step.__registerMastra(mastra);
139
+ } else if (step.type === "parallel" || step.type === "conditional") {
140
+ for (const subStep of step.steps) {
141
+ updateNested(subStep);
142
+ }
143
+ }
144
+ };
135
145
  if (this.executionGraph.steps.length) {
136
146
  for (const step of this.executionGraph.steps) {
137
- if (step.type === "step" && step.step instanceof _InngestWorkflow) {
138
- step.step.__registerMastra(mastra);
139
- }
147
+ updateNested(step);
140
148
  }
141
149
  }
142
150
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/inngest",
3
- "version": "0.0.0-vnext-inngest-20250506123700",
3
+ "version": "0.0.0-vnext-inngest-20250507093737",
4
4
  "description": "Mastra Inngest integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "inngest": "^3.35.1",
24
24
  "zod": "^3.24.2",
25
25
  "@opentelemetry/api": "^1.9.0",
26
- "@mastra/core": "0.0.0-vnext-inngest-20250506123700"
26
+ "@mastra/core": "0.0.0-vnext-inngest-20250507093737"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@ai-sdk/openai": "^1.2.1",
@@ -38,8 +38,8 @@
38
38
  "tsup": "^8.4.0",
39
39
  "typescript": "^5.8.2",
40
40
  "vitest": "^2.1.9",
41
- "@mastra/deployer": "0.0.0-vnext-inngest-20250506123700",
42
- "@internal/lint": "0.0.0-vnext-inngest-20250506123700"
41
+ "@mastra/deployer": "0.0.0-vnext-inngest-20250507093737",
42
+ "@internal/lint": "0.0.0-vnext-inngest-20250507093737"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting",