@mastra/inngest 0.0.0-vnext-inngest-20250508110322 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @mastra/inngest
2
2
 
3
- ## 0.0.0-vnext-inngest-20250508110322
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-20250508110322
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: {
@@ -161,12 +173,10 @@ var InngestWorkflow = class _InngestWorkflow extends vNext.NewWorkflow {
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: {
@@ -159,12 +171,10 @@ var InngestWorkflow = class _InngestWorkflow extends NewWorkflow {
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-20250508110322",
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-20250508110322"
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
- "@mastra/deployer": "0.0.0-vnext-inngest-20250508110322",
42
- "@internal/lint": "0.0.0-vnext-inngest-20250508110322"
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: {
@@ -235,12 +248,10 @@ export class InngestWorkflow<
235
248
  executionGraph: this.executionGraph,
236
249
  mastra: this.#mastra,
237
250
  retryConfig: this.retryConfig,
238
- cleanup: () => this.runs.delete(runIdToUse),
239
251
  },
240
252
  this.inngest,
241
253
  );
242
254
 
243
- this.runs.set(runIdToUse, run);
244
255
  return run;
245
256
  }
246
257