@mastra/deployer 0.1.7 → 0.1.8-alpha.1
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 +10 -10
- package/CHANGELOG.md +20 -0
- package/dist/server/index.cjs +21 -5
- package/dist/server/index.js +21 -5
- package/package.json +2 -2
- package/src/server/handlers/logs.ts +0 -1
- package/src/server/handlers/workflows.ts +21 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/deployer@0.1.
|
|
2
|
+
> @mastra/deployer@0.1.8-alpha.1 build /home/runner/work/mastra/mastra/packages/deployer
|
|
3
3
|
> tsup src/index.ts src/build/index.ts src/server/index.ts src/build/bundler.ts src/build/analyze.ts src/bundler/index.ts --format esm,cjs --clean --experimental-dts --treeshake --publicDir
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts, src/build/analyze.ts, src/build/bundler.ts, src/build/index.ts, src/bundler/index.ts, src/server/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
7
|
[34mCLI[39m tsup v8.3.6
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 16918ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.7.3
|
|
13
13
|
[36mWriting package typings: /home/runner/work/mastra/mastra/packages/deployer/dist/_tsup-dts-rollup.d.ts[39m
|
|
14
14
|
Analysis will use the bundled TypeScript version 5.7.3
|
|
15
15
|
[36mWriting package typings: /home/runner/work/mastra/mastra/packages/deployer/dist/_tsup-dts-rollup.d.cts[39m
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 11976ms
|
|
17
17
|
[34mCLI[39m Cleaning output folder
|
|
18
18
|
[34mESM[39m Build start
|
|
19
19
|
[34mCJS[39m Build start
|
|
@@ -21,21 +21,21 @@ Analysis will use the bundled TypeScript version 5.7.3
|
|
|
21
21
|
"watch" is imported from external module "rollup" but never used in "dist/index.cjs".
|
|
22
22
|
[32mCJS[39m [1mdist/build/analyze.cjs [22m[32m11.21 KB[39m
|
|
23
23
|
[32mCJS[39m [1mdist/build/bundler.cjs [22m[32m10.25 KB[39m
|
|
24
|
-
[32mCJS[39m [1mdist/bundler/index.cjs [22m[32m31.52 KB[39m
|
|
25
24
|
[32mCJS[39m [1mdist/index.cjs [22m[32m38.41 KB[39m
|
|
25
|
+
[32mCJS[39m [1mdist/bundler/index.cjs [22m[32m31.52 KB[39m
|
|
26
26
|
[32mCJS[39m [1mdist/build/index.cjs [22m[32m34.98 KB[39m
|
|
27
|
-
[32mCJS[39m [1mdist/server/index.cjs [22m[32m156.
|
|
28
|
-
[32mCJS[39m ⚡️ Build success in
|
|
29
|
-
[32mESM[39m [1mdist/index.js [22m[32m3.74 KB[39m
|
|
27
|
+
[32mCJS[39m [1mdist/server/index.cjs [22m[32m156.83 KB[39m
|
|
28
|
+
[32mCJS[39m ⚡️ Build success in 4619ms
|
|
30
29
|
[32mESM[39m [1mdist/build/analyze.js [22m[32m85.00 B[39m
|
|
31
30
|
[32mESM[39m [1mdist/build/bundler.js [22m[32m102.00 B[39m
|
|
31
|
+
[32mESM[39m [1mdist/index.js [22m[32m3.74 KB[39m
|
|
32
32
|
[32mESM[39m [1mdist/build/index.js [22m[32m383.00 B[39m
|
|
33
33
|
[32mESM[39m [1mdist/chunk-72GFPLLU.js [22m[32m7.41 KB[39m
|
|
34
34
|
[32mESM[39m [1mdist/bundler/index.js [22m[32m172.00 B[39m
|
|
35
35
|
[32mESM[39m [1mdist/chunk-OF7TVLEI.js [22m[32m4.40 KB[39m
|
|
36
36
|
[32mESM[39m [1mdist/chunk-VPQMSJB2.js [22m[32m8.39 KB[39m
|
|
37
37
|
[32mESM[39m [1mdist/chunk-TQSSPVHI.js [22m[32m8.45 KB[39m
|
|
38
|
-
[32mESM[39m [1mdist/chunk-AC67BJSW.js [22m[32m7.44 KB[39m
|
|
39
38
|
[32mESM[39m [1mdist/chunk-PT5XTSU2.js [22m[32m1.86 KB[39m
|
|
40
|
-
[32mESM[39m [1mdist/
|
|
41
|
-
[32mESM[39m
|
|
39
|
+
[32mESM[39m [1mdist/chunk-AC67BJSW.js [22m[32m7.44 KB[39m
|
|
40
|
+
[32mESM[39m [1mdist/server/index.js [22m[32m155.78 KB[39m
|
|
41
|
+
[32mESM[39m ⚡️ Build success in 4625ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @mastra/deployer
|
|
2
2
|
|
|
3
|
+
## 0.1.8-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [dab255b]
|
|
8
|
+
- @mastra/core@0.5.0-alpha.1
|
|
9
|
+
|
|
10
|
+
## 0.1.8-alpha.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- c2dde91: Return full workflow details in api/workflows endpoint
|
|
15
|
+
- 731dd8a: Removed useless logging that showed up when user selected log drains tab on the playground
|
|
16
|
+
- 960690d: return runId from server on workflow watch
|
|
17
|
+
- Updated dependencies [59df7b6]
|
|
18
|
+
- Updated dependencies [29f3a82]
|
|
19
|
+
- Updated dependencies [59df7b6]
|
|
20
|
+
- Updated dependencies [c139344]
|
|
21
|
+
- @mastra/core@0.5.0-alpha.0
|
|
22
|
+
|
|
3
23
|
## 0.1.7
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/server/index.cjs
CHANGED
|
@@ -3034,7 +3034,6 @@ async function getLogsByRunIdHandler(c2) {
|
|
|
3034
3034
|
}
|
|
3035
3035
|
}
|
|
3036
3036
|
async function getLogTransports(c2) {
|
|
3037
|
-
console.log("here");
|
|
3038
3037
|
try {
|
|
3039
3038
|
const mastra = c2.get("mastra");
|
|
3040
3039
|
const logger2 = mastra.getLogger();
|
|
@@ -3589,8 +3588,25 @@ async function listenHandler(c2) {
|
|
|
3589
3588
|
async function getWorkflowsHandler(c2) {
|
|
3590
3589
|
try {
|
|
3591
3590
|
const mastra = c2.get("mastra");
|
|
3592
|
-
const workflows = mastra.getWorkflows({ serialized:
|
|
3593
|
-
|
|
3591
|
+
const workflows = mastra.getWorkflows({ serialized: false });
|
|
3592
|
+
const _workflows = Object.entries(workflows).reduce((acc, [key, workflow]) => {
|
|
3593
|
+
acc[key] = {
|
|
3594
|
+
...workflow,
|
|
3595
|
+
name: workflow.name,
|
|
3596
|
+
triggerSchema: workflow.triggerSchema ? stringify(esm_default(workflow.triggerSchema)) : void 0,
|
|
3597
|
+
steps: Object.entries(workflow.steps).reduce((acc2, [key2, step]) => {
|
|
3598
|
+
const _step = step;
|
|
3599
|
+
acc2[key2] = {
|
|
3600
|
+
..._step,
|
|
3601
|
+
inputSchema: _step.inputSchema ? stringify(esm_default(_step.inputSchema)) : void 0,
|
|
3602
|
+
outputSchema: _step.outputSchema ? stringify(esm_default(_step.outputSchema)) : void 0
|
|
3603
|
+
};
|
|
3604
|
+
return acc2;
|
|
3605
|
+
}, {})
|
|
3606
|
+
};
|
|
3607
|
+
return acc;
|
|
3608
|
+
}, {});
|
|
3609
|
+
return c2.json(_workflows);
|
|
3594
3610
|
} catch (error) {
|
|
3595
3611
|
return handleError(error, "Error getting workflows");
|
|
3596
3612
|
}
|
|
@@ -3648,8 +3664,8 @@ async function watchWorkflowHandler(c2) {
|
|
|
3648
3664
|
c2,
|
|
3649
3665
|
async (stream) => {
|
|
3650
3666
|
return new Promise((_resolve, _reject) => {
|
|
3651
|
-
let unwatch = workflow.watch(({ activePaths, context }) => {
|
|
3652
|
-
void stream.write(JSON.stringify({ activePaths, context }) + "");
|
|
3667
|
+
let unwatch = workflow.watch(({ activePaths, context, runId, timestamp, suspendedSteps }) => {
|
|
3668
|
+
void stream.write(JSON.stringify({ activePaths, context, runId, timestamp, suspendedSteps }) + "");
|
|
3653
3669
|
});
|
|
3654
3670
|
stream.onAbort(() => {
|
|
3655
3671
|
unwatch?.();
|
package/dist/server/index.js
CHANGED
|
@@ -3028,7 +3028,6 @@ async function getLogsByRunIdHandler(c2) {
|
|
|
3028
3028
|
}
|
|
3029
3029
|
}
|
|
3030
3030
|
async function getLogTransports(c2) {
|
|
3031
|
-
console.log("here");
|
|
3032
3031
|
try {
|
|
3033
3032
|
const mastra = c2.get("mastra");
|
|
3034
3033
|
const logger2 = mastra.getLogger();
|
|
@@ -3583,8 +3582,25 @@ async function listenHandler(c2) {
|
|
|
3583
3582
|
async function getWorkflowsHandler(c2) {
|
|
3584
3583
|
try {
|
|
3585
3584
|
const mastra = c2.get("mastra");
|
|
3586
|
-
const workflows = mastra.getWorkflows({ serialized:
|
|
3587
|
-
|
|
3585
|
+
const workflows = mastra.getWorkflows({ serialized: false });
|
|
3586
|
+
const _workflows = Object.entries(workflows).reduce((acc, [key, workflow]) => {
|
|
3587
|
+
acc[key] = {
|
|
3588
|
+
...workflow,
|
|
3589
|
+
name: workflow.name,
|
|
3590
|
+
triggerSchema: workflow.triggerSchema ? stringify(esm_default(workflow.triggerSchema)) : void 0,
|
|
3591
|
+
steps: Object.entries(workflow.steps).reduce((acc2, [key2, step]) => {
|
|
3592
|
+
const _step = step;
|
|
3593
|
+
acc2[key2] = {
|
|
3594
|
+
..._step,
|
|
3595
|
+
inputSchema: _step.inputSchema ? stringify(esm_default(_step.inputSchema)) : void 0,
|
|
3596
|
+
outputSchema: _step.outputSchema ? stringify(esm_default(_step.outputSchema)) : void 0
|
|
3597
|
+
};
|
|
3598
|
+
return acc2;
|
|
3599
|
+
}, {})
|
|
3600
|
+
};
|
|
3601
|
+
return acc;
|
|
3602
|
+
}, {});
|
|
3603
|
+
return c2.json(_workflows);
|
|
3588
3604
|
} catch (error) {
|
|
3589
3605
|
return handleError(error, "Error getting workflows");
|
|
3590
3606
|
}
|
|
@@ -3642,8 +3658,8 @@ async function watchWorkflowHandler(c2) {
|
|
|
3642
3658
|
c2,
|
|
3643
3659
|
async (stream) => {
|
|
3644
3660
|
return new Promise((_resolve, _reject) => {
|
|
3645
|
-
let unwatch = workflow.watch(({ activePaths, context }) => {
|
|
3646
|
-
void stream.write(JSON.stringify({ activePaths, context }) + "");
|
|
3661
|
+
let unwatch = workflow.watch(({ activePaths, context, runId, timestamp, suspendedSteps }) => {
|
|
3662
|
+
void stream.write(JSON.stringify({ activePaths, context, runId, timestamp, suspendedSteps }) + "");
|
|
3647
3663
|
});
|
|
3648
3664
|
stream.onAbort(() => {
|
|
3649
3665
|
unwatch?.();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/deployer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"rollup-plugin-esbuild": "^6.1.1",
|
|
81
81
|
"rollup-plugin-node-externals": "^8.0.0",
|
|
82
82
|
"zod": "^3.24.1",
|
|
83
|
-
"@mastra/core": "^0.
|
|
83
|
+
"@mastra/core": "^0.5.0-alpha.1"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@hono/node-server": "^1.13.7",
|
|
@@ -4,14 +4,30 @@ import { streamText } from 'hono/streaming';
|
|
|
4
4
|
import { stringify } from 'superjson';
|
|
5
5
|
import zodToJsonSchema from 'zod-to-json-schema';
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
import { handleError } from './error';
|
|
9
8
|
|
|
10
9
|
export async function getWorkflowsHandler(c: Context) {
|
|
11
10
|
try {
|
|
12
11
|
const mastra: Mastra = c.get('mastra');
|
|
13
|
-
const workflows = mastra.getWorkflows({ serialized:
|
|
14
|
-
|
|
12
|
+
const workflows = mastra.getWorkflows({ serialized: false });
|
|
13
|
+
const _workflows = Object.entries(workflows).reduce<any>((acc, [key, workflow]) => {
|
|
14
|
+
acc[key] = {
|
|
15
|
+
...workflow,
|
|
16
|
+
name: workflow.name,
|
|
17
|
+
triggerSchema: workflow.triggerSchema ? stringify(zodToJsonSchema(workflow.triggerSchema)) : undefined,
|
|
18
|
+
steps: Object.entries(workflow.steps).reduce<any>((acc, [key, step]) => {
|
|
19
|
+
const _step = step as any;
|
|
20
|
+
acc[key] = {
|
|
21
|
+
..._step,
|
|
22
|
+
inputSchema: _step.inputSchema ? stringify(zodToJsonSchema(_step.inputSchema)) : undefined,
|
|
23
|
+
outputSchema: _step.outputSchema ? stringify(zodToJsonSchema(_step.outputSchema)) : undefined,
|
|
24
|
+
};
|
|
25
|
+
return acc;
|
|
26
|
+
}, {}),
|
|
27
|
+
};
|
|
28
|
+
return acc;
|
|
29
|
+
}, {});
|
|
30
|
+
return c.json(_workflows);
|
|
15
31
|
} catch (error) {
|
|
16
32
|
return handleError(error, 'Error getting workflows');
|
|
17
33
|
}
|
|
@@ -79,8 +95,8 @@ export async function watchWorkflowHandler(c: Context) {
|
|
|
79
95
|
// NOTE: looks like the UI is closing the watch request, so as long as that is the case
|
|
80
96
|
// this promise doesn't need to be resolved or rejected
|
|
81
97
|
return new Promise((_resolve, _reject) => {
|
|
82
|
-
let unwatch: () => void = workflow.watch(({ activePaths, context }) => {
|
|
83
|
-
void stream.write(JSON.stringify({ activePaths, context }) + '\x1E');
|
|
98
|
+
let unwatch: () => void = workflow.watch(({ activePaths, context, runId, timestamp, suspendedSteps }) => {
|
|
99
|
+
void stream.write(JSON.stringify({ activePaths, context, runId, timestamp, suspendedSteps }) + '\x1E');
|
|
84
100
|
});
|
|
85
101
|
|
|
86
102
|
stream.onAbort(() => {
|