@mastra/editor 0.7.21-alpha.0 → 0.7.21

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,5 +1,21 @@
1
1
  # @mastra/editor
2
2
 
3
+ ## 0.7.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed template variable interpolation for arrays and objects. Previously, using {{products}} where products is an array of objects would render as [object Object],[object Object]. Now arrays and objects are automatically JSON-stringified, so {{products}} correctly renders the full JSON representation. ([#15927](https://github.com/mastra-ai/mastra/pull/15927))
8
+
9
+ - Updated dependencies [[`6db978c`](https://github.com/mastra-ai/mastra/commit/6db978c42e94e75540a504f7230086f0b5cd35f9), [`95b001f`](https://github.com/mastra-ai/mastra/commit/95b001f750af6947ad9d174cd47abffc776663a5), [`512a013`](https://github.com/mastra-ai/mastra/commit/512a013f285aa9c0aa8f08a35b2ce09f9938b017), [`e9becde`](https://github.com/mastra-ai/mastra/commit/e9becdeed9176b9f8392e557bde12b933f99cf7a), [`703a443`](https://github.com/mastra-ai/mastra/commit/703a44390c587d9c0b8ae94ec4edd8afb2a74044), [`808df1b`](https://github.com/mastra-ai/mastra/commit/808df1b39358b5f10b7317107e42b1fda7c87185)]:
10
+ - @mastra/core@1.29.1
11
+ - @mastra/memory@1.17.3
12
+
13
+ ## 0.7.21-alpha.1
14
+
15
+ ### Patch Changes
16
+
17
+ - Fixed template variable interpolation for arrays and objects. Previously, using {{products}} where products is an array of objects would render as [object Object],[object Object]. Now arrays and objects are automatically JSON-stringified, so {{products}} correctly renders the full JSON representation. ([#15927](https://github.com/mastra-ai/mastra/pull/15927))
18
+
3
19
  ## 0.7.21-alpha.0
4
20
 
5
21
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -270,6 +270,9 @@ function renderTemplate(template, context) {
270
270
  (match, variablePath, singleFallback, doubleFallback) => {
271
271
  const resolved = resolvePath2(context, variablePath);
272
272
  if (resolved !== void 0 && resolved !== null) {
273
+ if (typeof resolved === "object") {
274
+ return JSON.stringify(resolved);
275
+ }
273
276
  return String(resolved);
274
277
  }
275
278
  const fallback = singleFallback ?? doubleFallback;
@@ -436,7 +439,7 @@ function buildWorkflow(entries, workflowId, ctx) {
436
439
  }
437
440
  const subWorkflow = buildWorkflow(branchEntries, `${workflowId}-parallel-branch-${branchIdx}`, ctx);
438
441
  return subWorkflow;
439
- }).filter(Boolean);
442
+ }).filter((s) => Boolean(s));
440
443
  if (branchSteps.length > 0) {
441
444
  workflow = workflow.parallel(branchSteps);
442
445
  workflow = workflow.map(mergeBranchOutputs);
package/dist/index.js CHANGED
@@ -222,6 +222,9 @@ function renderTemplate(template, context) {
222
222
  (match, variablePath, singleFallback, doubleFallback) => {
223
223
  const resolved = resolvePath2(context, variablePath);
224
224
  if (resolved !== void 0 && resolved !== null) {
225
+ if (typeof resolved === "object") {
226
+ return JSON.stringify(resolved);
227
+ }
225
228
  return String(resolved);
226
229
  }
227
230
  const fallback = singleFallback ?? doubleFallback;
@@ -388,7 +391,7 @@ function buildWorkflow(entries, workflowId, ctx) {
388
391
  }
389
392
  const subWorkflow = buildWorkflow(branchEntries, `${workflowId}-parallel-branch-${branchIdx}`, ctx);
390
393
  return subWorkflow;
391
- }).filter(Boolean);
394
+ }).filter((s) => Boolean(s));
392
395
  if (branchSteps.length > 0) {
393
396
  workflow = workflow.parallel(branchSteps);
394
397
  workflow = workflow.map(mergeBranchOutputs);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/editor",
3
- "version": "0.7.21-alpha.0",
3
+ "version": "0.7.21",
4
4
  "description": "Mastra Editor for agent management and instantiation",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -65,23 +65,23 @@
65
65
  "@arcadeai/arcadejs": "^2.3.0",
66
66
  "@composio/core": "^0.6.5",
67
67
  "@composio/mastra": "^0.6.5",
68
- "@mastra/memory": "1.17.3-alpha.0",
68
+ "@mastra/memory": "1.17.3",
69
69
  "@mastra/schema-compat": "1.2.9"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@hono/node-server": "^1.19.11",
73
73
  "hono": "^4.12.8",
74
74
  "tsup": "^8.5.1",
75
- "typescript": "^5.9.3",
75
+ "typescript": "^6.0.3",
76
76
  "vitest": "4.1.5",
77
77
  "zod": "^3.25.76",
78
- "@internal/ai-sdk-v4": "0.0.34",
79
- "@internal/ai-sdk-v5": "0.0.34",
80
- "@internal/ai-v6": "0.0.34",
81
- "@mastra/hono": "1.4.9-alpha.1",
82
- "@mastra/core": "1.29.1-alpha.1",
83
- "@mastra/libsql": "1.9.0",
84
- "@mastra/mcp": "1.6.0"
78
+ "@internal/ai-v6": "0.0.35",
79
+ "@internal/ai-sdk-v5": "0.0.35",
80
+ "@internal/ai-sdk-v4": "0.0.35",
81
+ "@mastra/core": "1.29.1",
82
+ "@mastra/hono": "1.4.9",
83
+ "@mastra/mcp": "1.6.0",
84
+ "@mastra/libsql": "1.9.0"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "@mastra/core": ">=1.7.1-0 <2.0.0-0",