@mastra/inngest 0.0.3 → 0.0.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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +14 -0
- package/dist/_tsup-dts-rollup.d.cts +4 -4
- package/dist/_tsup-dts-rollup.d.ts +4 -4
- package/package.json +4 -4
- package/src/index.ts +7 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/inngest@0.0.
|
|
2
|
+
> @mastra/inngest@0.0.4-alpha.0 build /home/runner/work/mastra/mastra/workflows/inngest
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
7
|
[34mCLI[39m tsup v8.4.0
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 7001ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.8.3
|
|
13
13
|
[36mWriting package typings: /home/runner/work/mastra/mastra/workflows/inngest/dist/_tsup-dts-rollup.d.ts[39m
|
|
14
14
|
Analysis will use the bundled TypeScript version 5.8.3
|
|
15
15
|
[36mWriting package typings: /home/runner/work/mastra/mastra/workflows/inngest/dist/_tsup-dts-rollup.d.cts[39m
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 6565ms
|
|
17
17
|
[34mCLI[39m Cleaning output folder
|
|
18
18
|
[34mESM[39m Build start
|
|
19
19
|
[34mCJS[39m Build start
|
|
20
20
|
[32mESM[39m [1mdist/index.js [22m[32m22.03 KB[39m
|
|
21
|
-
[32mESM[39m ⚡️ Build success in
|
|
21
|
+
[32mESM[39m ⚡️ Build success in 407ms
|
|
22
22
|
[32mCJS[39m [1mdist/index.cjs [22m[32m22.14 KB[39m
|
|
23
|
-
[32mCJS[39m ⚡️ Build success in
|
|
23
|
+
[32mCJS[39m ⚡️ Build success in 408ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @mastra/inngest
|
|
2
2
|
|
|
3
|
+
## 0.0.4-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e4172d9: Update getWorkflowRuns type for inngest workflow
|
|
8
|
+
- Updated dependencies [f53a6ac]
|
|
9
|
+
- Updated dependencies [eabdcd9]
|
|
10
|
+
- Updated dependencies [90be034]
|
|
11
|
+
- Updated dependencies [99f050a]
|
|
12
|
+
- Updated dependencies [d0ee3c6]
|
|
13
|
+
- Updated dependencies [23f258c]
|
|
14
|
+
- Updated dependencies [2672a05]
|
|
15
|
+
- @mastra/core@0.9.5-alpha.0
|
|
16
|
+
|
|
3
17
|
## 0.0.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -21,9 +21,9 @@ import { serve as serve_2 } from 'inngest/hono';
|
|
|
21
21
|
import type { Span } from '@opentelemetry/api';
|
|
22
22
|
import type { StepFlowEntry } from '@mastra/core/workflows/vNext';
|
|
23
23
|
import type { StepResult } from '@mastra/core/workflows/vNext';
|
|
24
|
+
import type { VNextWorkflowRun } from '@mastra/core';
|
|
25
|
+
import type { VNextWorkflowRuns } from '@mastra/core';
|
|
24
26
|
import type { WorkflowResult } from '@mastra/core/workflows/vNext';
|
|
25
|
-
import type { WorkflowRun } from '@mastra/core';
|
|
26
|
-
import { WorkflowRuns } from '@mastra/core';
|
|
27
27
|
import type { z } from 'zod';
|
|
28
28
|
|
|
29
29
|
declare function cloneWorkflow<TWorkflowId extends string = string, TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>, TSteps extends NewStep<string, any, any, any, any>[] = NewStep<string, any, any, any, any>[]>(workflow: InngestWorkflow<TSteps, string, TInput, TOutput>, opts: {
|
|
@@ -155,8 +155,8 @@ export declare class InngestWorkflow<TSteps extends NewStep<string, any, any>[]
|
|
|
155
155
|
limit?: number;
|
|
156
156
|
offset?: number;
|
|
157
157
|
resourceId?: string;
|
|
158
|
-
}): Promise<
|
|
159
|
-
getWorkflowRunById(runId: string): Promise<
|
|
158
|
+
}): Promise<VNextWorkflowRuns>;
|
|
159
|
+
getWorkflowRunById(runId: string): Promise<VNextWorkflowRun | null>;
|
|
160
160
|
__registerMastra(mastra: Mastra): void;
|
|
161
161
|
createRun(options?: {
|
|
162
162
|
runId?: string;
|
|
@@ -21,9 +21,9 @@ import { serve as serve_2 } from 'inngest/hono';
|
|
|
21
21
|
import type { Span } from '@opentelemetry/api';
|
|
22
22
|
import type { StepFlowEntry } from '@mastra/core/workflows/vNext';
|
|
23
23
|
import type { StepResult } from '@mastra/core/workflows/vNext';
|
|
24
|
+
import type { VNextWorkflowRun } from '@mastra/core';
|
|
25
|
+
import type { VNextWorkflowRuns } from '@mastra/core';
|
|
24
26
|
import type { WorkflowResult } from '@mastra/core/workflows/vNext';
|
|
25
|
-
import type { WorkflowRun } from '@mastra/core';
|
|
26
|
-
import { WorkflowRuns } from '@mastra/core';
|
|
27
27
|
import type { z } from 'zod';
|
|
28
28
|
|
|
29
29
|
declare function cloneWorkflow<TWorkflowId extends string = string, TInput extends z.ZodType<any> = z.ZodType<any>, TOutput extends z.ZodType<any> = z.ZodType<any>, TSteps extends NewStep<string, any, any, any, any>[] = NewStep<string, any, any, any, any>[]>(workflow: InngestWorkflow<TSteps, string, TInput, TOutput>, opts: {
|
|
@@ -155,8 +155,8 @@ export declare class InngestWorkflow<TSteps extends NewStep<string, any, any>[]
|
|
|
155
155
|
limit?: number;
|
|
156
156
|
offset?: number;
|
|
157
157
|
resourceId?: string;
|
|
158
|
-
}): Promise<
|
|
159
|
-
getWorkflowRunById(runId: string): Promise<
|
|
158
|
+
}): Promise<VNextWorkflowRuns>;
|
|
159
|
+
getWorkflowRunById(runId: string): Promise<VNextWorkflowRun | null>;
|
|
160
160
|
__registerMastra(mastra: Mastra): void;
|
|
161
161
|
createRun(options?: {
|
|
162
162
|
runId?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/inngest",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4-alpha.0",
|
|
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.9.
|
|
26
|
+
"@mastra/core": "^0.9.5-alpha.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@ai-sdk/openai": "^1.3.22",
|
|
@@ -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.5",
|
|
42
|
+
"@mastra/deployer": "0.3.5-alpha.0"
|
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from 'crypto';
|
|
2
2
|
import { subscribe } from '@inngest/realtime';
|
|
3
|
-
import type { Mastra,
|
|
3
|
+
import type { Mastra, VNextWorkflowRun, VNextWorkflowRuns } from '@mastra/core';
|
|
4
4
|
import { RuntimeContext } from '@mastra/core/di';
|
|
5
5
|
import { NewWorkflow, createStep, Run, DefaultExecutionEngine, cloneStep } from '@mastra/core/workflows/vNext';
|
|
6
6
|
import type {
|
|
@@ -226,20 +226,22 @@ export class InngestWorkflow<
|
|
|
226
226
|
return { runs: [], total: 0 };
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
return storage.getWorkflowRuns({ workflowName: this.id, ...(args ?? {}) });
|
|
229
|
+
return storage.getWorkflowRuns({ workflowName: this.id, ...(args ?? {}) }) as unknown as VNextWorkflowRuns;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
async getWorkflowRunById(runId: string): Promise<
|
|
232
|
+
async getWorkflowRunById(runId: string): Promise<VNextWorkflowRun | null> {
|
|
233
233
|
const storage = this.#mastra?.getStorage();
|
|
234
234
|
if (!storage) {
|
|
235
235
|
this.logger.debug('Cannot get workflow runs. Mastra engine is not initialized');
|
|
236
236
|
return null;
|
|
237
237
|
}
|
|
238
|
-
const run = await storage.getWorkflowRunById({ runId, workflowName: this.id });
|
|
238
|
+
const run = (await storage.getWorkflowRunById({ runId, workflowName: this.id })) as unknown as VNextWorkflowRun;
|
|
239
239
|
|
|
240
240
|
return (
|
|
241
241
|
run ??
|
|
242
|
-
(this.runs.get(runId)
|
|
242
|
+
(this.runs.get(runId)
|
|
243
|
+
? ({ ...this.runs.get(runId), workflowName: this.id } as unknown as VNextWorkflowRun)
|
|
244
|
+
: null)
|
|
243
245
|
);
|
|
244
246
|
}
|
|
245
247
|
|