@mastra/inngest 0.0.0-vnext-inngest-20250508111904 → 0.0.0-vnext-inngest-20250508121018
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 +14 -4
- package/dist/index.js +14 -4
- package/package.json +4 -4
- package/src/index.ts +24 -15
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-20250508121018
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
- Updated dependencies [b5d2de0]
|
|
10
10
|
- Updated dependencies [644f8ad]
|
|
11
11
|
- Updated dependencies [70dbf51]
|
|
12
|
-
- @mastra/core@0.0.0-vnext-inngest-
|
|
12
|
+
- @mastra/core@0.0.0-vnext-inngest-20250508121018
|
package/dist/index.cjs
CHANGED
|
@@ -52,6 +52,18 @@ var InngestRun = class extends vNext.Run {
|
|
|
52
52
|
async start({
|
|
53
53
|
inputData
|
|
54
54
|
}) {
|
|
55
|
+
await this.#mastra.getStorage()?.persistWorkflowSnapshot({
|
|
56
|
+
workflowName: this.workflowId,
|
|
57
|
+
runId: this.runId,
|
|
58
|
+
snapshot: {
|
|
59
|
+
runId: this.runId,
|
|
60
|
+
value: {},
|
|
61
|
+
context: {},
|
|
62
|
+
activePaths: [],
|
|
63
|
+
suspendedPaths: {},
|
|
64
|
+
timestamp: Date.now()
|
|
65
|
+
}
|
|
66
|
+
});
|
|
55
67
|
const eventOutput = await this.inngest.send({
|
|
56
68
|
name: `workflow.${this.workflowId}`,
|
|
57
69
|
data: {
|
|
@@ -154,19 +166,17 @@ var InngestWorkflow = class _InngestWorkflow extends vNext.NewWorkflow {
|
|
|
154
166
|
}
|
|
155
167
|
createRun(options) {
|
|
156
168
|
const runIdToUse = options?.runId || crypto.randomUUID();
|
|
157
|
-
const run =
|
|
169
|
+
const run = new InngestRun(
|
|
158
170
|
{
|
|
159
171
|
workflowId: this.id,
|
|
160
172
|
runId: runIdToUse,
|
|
161
173
|
executionEngine: this.executionEngine,
|
|
162
174
|
executionGraph: this.executionGraph,
|
|
163
175
|
mastra: this.#mastra,
|
|
164
|
-
retryConfig: this.retryConfig
|
|
165
|
-
cleanup: () => this.runs.delete(runIdToUse)
|
|
176
|
+
retryConfig: this.retryConfig
|
|
166
177
|
},
|
|
167
178
|
this.inngest
|
|
168
179
|
);
|
|
169
|
-
this.runs.set(runIdToUse, run);
|
|
170
180
|
return run;
|
|
171
181
|
}
|
|
172
182
|
getFunction() {
|
package/dist/index.js
CHANGED
|
@@ -50,6 +50,18 @@ var InngestRun = class extends Run {
|
|
|
50
50
|
async start({
|
|
51
51
|
inputData
|
|
52
52
|
}) {
|
|
53
|
+
await this.#mastra.getStorage()?.persistWorkflowSnapshot({
|
|
54
|
+
workflowName: this.workflowId,
|
|
55
|
+
runId: this.runId,
|
|
56
|
+
snapshot: {
|
|
57
|
+
runId: this.runId,
|
|
58
|
+
value: {},
|
|
59
|
+
context: {},
|
|
60
|
+
activePaths: [],
|
|
61
|
+
suspendedPaths: {},
|
|
62
|
+
timestamp: Date.now()
|
|
63
|
+
}
|
|
64
|
+
});
|
|
53
65
|
const eventOutput = await this.inngest.send({
|
|
54
66
|
name: `workflow.${this.workflowId}`,
|
|
55
67
|
data: {
|
|
@@ -152,19 +164,17 @@ var InngestWorkflow = class _InngestWorkflow extends NewWorkflow {
|
|
|
152
164
|
}
|
|
153
165
|
createRun(options) {
|
|
154
166
|
const runIdToUse = options?.runId || randomUUID();
|
|
155
|
-
const run =
|
|
167
|
+
const run = new InngestRun(
|
|
156
168
|
{
|
|
157
169
|
workflowId: this.id,
|
|
158
170
|
runId: runIdToUse,
|
|
159
171
|
executionEngine: this.executionEngine,
|
|
160
172
|
executionGraph: this.executionGraph,
|
|
161
173
|
mastra: this.#mastra,
|
|
162
|
-
retryConfig: this.retryConfig
|
|
163
|
-
cleanup: () => this.runs.delete(runIdToUse)
|
|
174
|
+
retryConfig: this.retryConfig
|
|
164
175
|
},
|
|
165
176
|
this.inngest
|
|
166
177
|
);
|
|
167
|
-
this.runs.set(runIdToUse, run);
|
|
168
178
|
return run;
|
|
169
179
|
}
|
|
170
180
|
getFunction() {
|
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-20250508121018",
|
|
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-20250508121018"
|
|
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
|
-
"@
|
|
42
|
-
"@
|
|
41
|
+
"@internal/lint": "0.0.0-vnext-inngest-20250508121018",
|
|
42
|
+
"@mastra/deployer": "0.0.0-vnext-inngest-20250508121018"
|
|
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
|
@@ -91,6 +91,19 @@ export class InngestRun<
|
|
|
91
91
|
inputData?: z.infer<TInput>;
|
|
92
92
|
runtimeContext?: RuntimeContext;
|
|
93
93
|
}): Promise<WorkflowResult<TOutput, TSteps>> {
|
|
94
|
+
await this.#mastra.getStorage()?.persistWorkflowSnapshot({
|
|
95
|
+
workflowName: this.workflowId,
|
|
96
|
+
runId: this.runId,
|
|
97
|
+
snapshot: {
|
|
98
|
+
runId: this.runId,
|
|
99
|
+
value: {},
|
|
100
|
+
context: {} as any,
|
|
101
|
+
activePaths: [],
|
|
102
|
+
suspendedPaths: {},
|
|
103
|
+
timestamp: Date.now(),
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
|
|
94
107
|
const eventOutput = await this.inngest.send({
|
|
95
108
|
name: `workflow.${this.workflowId}`,
|
|
96
109
|
data: {
|
|
@@ -227,22 +240,18 @@ export class InngestWorkflow<
|
|
|
227
240
|
const runIdToUse = options?.runId || randomUUID();
|
|
228
241
|
|
|
229
242
|
// Return a new Run instance with object parameters
|
|
230
|
-
const run: Run<TSteps, TInput, TOutput> =
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
},
|
|
242
|
-
this.inngest,
|
|
243
|
-
);
|
|
243
|
+
const run: Run<TSteps, TInput, TOutput> = new InngestRun(
|
|
244
|
+
{
|
|
245
|
+
workflowId: this.id,
|
|
246
|
+
runId: runIdToUse,
|
|
247
|
+
executionEngine: this.executionEngine,
|
|
248
|
+
executionGraph: this.executionGraph,
|
|
249
|
+
mastra: this.#mastra,
|
|
250
|
+
retryConfig: this.retryConfig,
|
|
251
|
+
},
|
|
252
|
+
this.inngest,
|
|
253
|
+
);
|
|
244
254
|
|
|
245
|
-
this.runs.set(runIdToUse, run);
|
|
246
255
|
return run;
|
|
247
256
|
}
|
|
248
257
|
|