@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.
@@ -1,19 +1,19 @@
1
1
 
2
- > @mastra/deployer@0.1.7-alpha.0 build /home/runner/work/mastra/mastra/packages/deployer
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
  CLI 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
  CLI Using tsconfig: tsconfig.json
7
7
  CLI tsup v8.3.6
8
8
  TSC Build start
9
- TSC ⚡️ Build success in 18233ms
9
+ TSC ⚡️ Build success in 16918ms
10
10
  DTS Build start
11
11
  CLI Target: es2022
12
12
  Analysis will use the bundled TypeScript version 5.7.3
13
13
  Writing package typings: /home/runner/work/mastra/mastra/packages/deployer/dist/_tsup-dts-rollup.d.ts
14
14
  Analysis will use the bundled TypeScript version 5.7.3
15
15
  Writing package typings: /home/runner/work/mastra/mastra/packages/deployer/dist/_tsup-dts-rollup.d.cts
16
- DTS ⚡️ Build success in 12695ms
16
+ DTS ⚡️ Build success in 11976ms
17
17
  CLI Cleaning output folder
18
18
  ESM Build start
19
19
  CJS 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
  CJS dist/build/analyze.cjs 11.21 KB
23
23
  CJS dist/build/bundler.cjs 10.25 KB
24
- CJS dist/bundler/index.cjs 31.52 KB
25
24
  CJS dist/index.cjs 38.41 KB
25
+ CJS dist/bundler/index.cjs 31.52 KB
26
26
  CJS dist/build/index.cjs 34.98 KB
27
- CJS dist/server/index.cjs 156.10 KB
28
- CJS ⚡️ Build success in 4596ms
29
- ESM dist/index.js 3.74 KB
27
+ CJS dist/server/index.cjs 156.83 KB
28
+ CJS ⚡️ Build success in 4619ms
30
29
  ESM dist/build/analyze.js 85.00 B
31
30
  ESM dist/build/bundler.js 102.00 B
31
+ ESM dist/index.js 3.74 KB
32
32
  ESM dist/build/index.js 383.00 B
33
33
  ESM dist/chunk-72GFPLLU.js 7.41 KB
34
34
  ESM dist/bundler/index.js 172.00 B
35
35
  ESM dist/chunk-OF7TVLEI.js 4.40 KB
36
36
  ESM dist/chunk-VPQMSJB2.js 8.39 KB
37
37
  ESM dist/chunk-TQSSPVHI.js 8.45 KB
38
- ESM dist/chunk-AC67BJSW.js 7.44 KB
39
38
  ESM dist/chunk-PT5XTSU2.js 1.86 KB
40
- ESM dist/server/index.js 155.05 KB
41
- ESM ⚡️ Build success in 4606ms
39
+ ESM dist/chunk-AC67BJSW.js 7.44 KB
40
+ ESM dist/server/index.js 155.78 KB
41
+ ESM ⚡️ 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
@@ -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: true });
3593
- return c2.json(workflows);
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?.();
@@ -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: true });
3587
- return c2.json(workflows);
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.7",
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.4.4"
83
+ "@mastra/core": "^0.5.0-alpha.1"
84
84
  },
85
85
  "devDependencies": {
86
86
  "@hono/node-server": "^1.13.7",
@@ -39,7 +39,6 @@ export async function getLogsByRunIdHandler(c: Context) {
39
39
  }
40
40
 
41
41
  export async function getLogTransports(c: Context) {
42
- console.log('here');
43
42
  try {
44
43
  const mastra: Mastra = c.get('mastra');
45
44
  const logger = mastra.getLogger();
@@ -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: true });
14
- return c.json(workflows);
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(() => {