@mastra/inngest 0.0.0-vnext-inngest-20250506132005 → 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 +2 -2
- package/dist/index.cjs +11 -3
- package/dist/index.js +11 -3
- package/package.json +4 -4
- package/src/index.ts +14 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @mastra/inngest
|
|
2
2
|
|
|
3
|
-
## 0.0.0-vnext-inngest-
|
|
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-
|
|
21
|
+
- @mastra/core@0.0.0-vnext-inngest-20250507093737
|
package/dist/index.cjs
CHANGED
|
@@ -11,6 +11,7 @@ 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 [];
|
|
@@ -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
|
-
|
|
140
|
-
step.step.__registerMastra(mastra);
|
|
141
|
-
}
|
|
149
|
+
updateNested(step);
|
|
142
150
|
}
|
|
143
151
|
}
|
|
144
152
|
}
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ 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 [];
|
|
@@ -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
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
42
|
-
"@internal/lint": "0.0.0-vnext-inngest-
|
|
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",
|
package/src/index.ts
CHANGED
|
@@ -31,6 +31,7 @@ export function serve({ mastra, inngest }: { mastra: Mastra; inngest: Inngest })
|
|
|
31
31
|
const wfs = mastra.vnext_getWorkflows();
|
|
32
32
|
const functions = Object.values(wfs).flatMap(wf => {
|
|
33
33
|
if (wf instanceof InngestWorkflow) {
|
|
34
|
+
wf.__registerMastra(mastra);
|
|
34
35
|
return wf.getFunctions();
|
|
35
36
|
}
|
|
36
37
|
return [];
|
|
@@ -203,12 +204,22 @@ export class InngestWorkflow<
|
|
|
203
204
|
__registerMastra(mastra: Mastra) {
|
|
204
205
|
this.#mastra = mastra;
|
|
205
206
|
this.executionEngine.__registerMastra(mastra);
|
|
207
|
+
const updateNested = (step: StepFlowEntry) => {
|
|
208
|
+
if (
|
|
209
|
+
(step.type === 'step' || step.type === 'loop' || step.type === 'foreach') &&
|
|
210
|
+
step.step instanceof InngestWorkflow
|
|
211
|
+
) {
|
|
212
|
+
step.step.__registerMastra(mastra);
|
|
213
|
+
} else if (step.type === 'parallel' || step.type === 'conditional') {
|
|
214
|
+
for (const subStep of step.steps) {
|
|
215
|
+
updateNested(subStep);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
};
|
|
206
219
|
|
|
207
220
|
if (this.executionGraph.steps.length) {
|
|
208
221
|
for (const step of this.executionGraph.steps) {
|
|
209
|
-
|
|
210
|
-
step.step.__registerMastra(mastra);
|
|
211
|
-
}
|
|
222
|
+
updateNested(step);
|
|
212
223
|
}
|
|
213
224
|
}
|
|
214
225
|
}
|