mastra 0.10.4 → 0.10.6-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/dist/{chunk-MKPHGZFU.js → chunk-DJA4WBIU.js} +8 -26
- package/dist/commands/create/create.js +1 -1
- package/dist/index.js +6 -4
- package/package.json +19 -19
- package/src/playground/dist/assets/index-BiVK08-K.js +742 -0
- package/src/playground/dist/assets/{index-BMvNR-a6.js → index-C6--CIXB.js} +1 -1
- package/src/playground/dist/assets/{index-AC5idYXx.js → index-CXfVj99q.js} +1 -1
- package/src/playground/dist/assets/{style-upG83dII.css → style-BnGp4Od9.css} +1 -1
- package/src/playground/dist/index.html +2 -2
- package/src/playground/dist/assets/index-BjEuuPvn.js +0 -751
|
@@ -241,8 +241,9 @@ async function globalMCPIsAlreadyInstalled(editor) {
|
|
|
241
241
|
}
|
|
242
242
|
try {
|
|
243
243
|
const configContents = await readJSON(configPath);
|
|
244
|
+
if (!configContents) return false;
|
|
244
245
|
if (editor === "vscode") {
|
|
245
|
-
if (!configContents
|
|
246
|
+
if (!configContents.servers) return false;
|
|
246
247
|
const hasMastraMCP2 = Object.values(configContents.servers).some(
|
|
247
248
|
(server) => server?.args?.find((arg) => arg?.includes(`@mastra/mcp-docs-server`))
|
|
248
249
|
);
|
|
@@ -253,8 +254,7 @@ async function globalMCPIsAlreadyInstalled(editor) {
|
|
|
253
254
|
(server) => server?.args?.find((arg) => arg?.includes(`@mastra/mcp-docs-server`))
|
|
254
255
|
);
|
|
255
256
|
return hasMastraMCP;
|
|
256
|
-
} catch
|
|
257
|
-
console.error(e);
|
|
257
|
+
} catch {
|
|
258
258
|
return false;
|
|
259
259
|
}
|
|
260
260
|
}
|
|
@@ -812,7 +812,7 @@ var writeCodeSample = async (dirPath, component, llmProvider, importComponents)
|
|
|
812
812
|
}
|
|
813
813
|
};
|
|
814
814
|
var interactivePrompt = async () => {
|
|
815
|
-
p.intro(color2.inverse("Mastra Init"));
|
|
815
|
+
p.intro(color2.inverse(" Mastra Init "));
|
|
816
816
|
const mastraProject = await p.group(
|
|
817
817
|
{
|
|
818
818
|
directory: () => p.text({
|
|
@@ -820,20 +820,6 @@ var interactivePrompt = async () => {
|
|
|
820
820
|
placeholder: "src/",
|
|
821
821
|
defaultValue: "src/"
|
|
822
822
|
}),
|
|
823
|
-
components: () => p.multiselect({
|
|
824
|
-
message: "Choose components to install:",
|
|
825
|
-
options: [
|
|
826
|
-
{ value: "agents", label: "Agents", hint: "recommended" },
|
|
827
|
-
{
|
|
828
|
-
value: "workflows",
|
|
829
|
-
label: "Workflows"
|
|
830
|
-
}
|
|
831
|
-
]
|
|
832
|
-
}),
|
|
833
|
-
shouldAddTools: () => p.confirm({
|
|
834
|
-
message: "Add tools?",
|
|
835
|
-
initialValue: false
|
|
836
|
-
}),
|
|
837
823
|
llmProvider: () => p.select({
|
|
838
824
|
message: "Select default provider:",
|
|
839
825
|
options: [
|
|
@@ -861,10 +847,6 @@ var interactivePrompt = async () => {
|
|
|
861
847
|
}
|
|
862
848
|
return void 0;
|
|
863
849
|
},
|
|
864
|
-
addExample: () => p.confirm({
|
|
865
|
-
message: "Add example",
|
|
866
|
-
initialValue: false
|
|
867
|
-
}),
|
|
868
850
|
configureEditorWithDocsMCP: async () => {
|
|
869
851
|
const windsurfIsAlreadyInstalled = await globalMCPIsAlreadyInstalled(`windsurf`);
|
|
870
852
|
const cursorIsAlreadyInstalled = await globalMCPIsAlreadyInstalled(`cursor`);
|
|
@@ -948,9 +930,7 @@ This means the Mastra docs MCP server will be available in all your Windsurf pro
|
|
|
948
930
|
}
|
|
949
931
|
}
|
|
950
932
|
);
|
|
951
|
-
|
|
952
|
-
const mastraComponents = shouldAddTools ? [...components, "tools"] : components;
|
|
953
|
-
return { ...rest, components: mastraComponents };
|
|
933
|
+
return mastraProject;
|
|
954
934
|
};
|
|
955
935
|
var checkPkgJson = async () => {
|
|
956
936
|
const cwd = process.cwd();
|
|
@@ -1190,7 +1170,9 @@ var create = async (args2) => {
|
|
|
1190
1170
|
const result = await interactivePrompt();
|
|
1191
1171
|
await init({
|
|
1192
1172
|
...result,
|
|
1193
|
-
llmApiKey: result?.llmApiKey
|
|
1173
|
+
llmApiKey: result?.llmApiKey,
|
|
1174
|
+
components: ["agents", "tools", "workflows"],
|
|
1175
|
+
addExample: true
|
|
1194
1176
|
});
|
|
1195
1177
|
postCreate({ projectName });
|
|
1196
1178
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { create } from '../../chunk-
|
|
1
|
+
export { create } from '../../chunk-DJA4WBIU.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#! /usr/bin/env node
|
|
2
2
|
import { PosthogAnalytics } from './chunk-7OXWUU2Q.js';
|
|
3
3
|
export { PosthogAnalytics } from './chunk-7OXWUU2Q.js';
|
|
4
|
-
import { DepsService, create, checkPkgJson, checkAndInstallCoreDeps, interactivePrompt, init, logger, FileService } from './chunk-
|
|
5
|
-
export { create } from './chunk-
|
|
4
|
+
import { DepsService, create, checkPkgJson, checkAndInstallCoreDeps, interactivePrompt, init, logger, FileService } from './chunk-DJA4WBIU.js';
|
|
5
|
+
export { create } from './chunk-DJA4WBIU.js';
|
|
6
6
|
import { Command } from 'commander';
|
|
7
7
|
import { config } from 'dotenv';
|
|
8
8
|
import { join, dirname } from 'path';
|
|
@@ -135,7 +135,7 @@ async function build({
|
|
|
135
135
|
logger.info("You can now deploy the .mastra/output directory to your target platform.");
|
|
136
136
|
} catch (error) {
|
|
137
137
|
if (error instanceof Error) {
|
|
138
|
-
logger.error(`Mastra Build failed
|
|
138
|
+
logger.error(`Mastra Build failed`, { error });
|
|
139
139
|
}
|
|
140
140
|
process.exit(1);
|
|
141
141
|
}
|
|
@@ -699,7 +699,9 @@ program.command("init").description("Initialize Mastra in your project").option(
|
|
|
699
699
|
const result = await interactivePrompt();
|
|
700
700
|
await init({
|
|
701
701
|
...result,
|
|
702
|
-
llmApiKey: result?.llmApiKey
|
|
702
|
+
llmApiKey: result?.llmApiKey,
|
|
703
|
+
components: ["agents", "tools", "workflows"],
|
|
704
|
+
addExample: true
|
|
703
705
|
});
|
|
704
706
|
return;
|
|
705
707
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mastra",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.6-alpha.0",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"description": "cli for mastra",
|
|
6
6
|
"type": "module",
|
|
@@ -40,47 +40,47 @@
|
|
|
40
40
|
"@webcontainer/env": "^1.1.1",
|
|
41
41
|
"commander": "^12.1.0",
|
|
42
42
|
"dotenv": "^16.5.0",
|
|
43
|
-
"execa": "^9.
|
|
43
|
+
"execa": "^9.6.0",
|
|
44
44
|
"fs-extra": "^11.3.0",
|
|
45
45
|
"get-port": "^7.1.0",
|
|
46
|
-
"json-schema-to-zod": "^2.6.
|
|
46
|
+
"json-schema-to-zod": "^2.6.1",
|
|
47
47
|
"picocolors": "^1.1.1",
|
|
48
48
|
"posthog-node": "4.16.0",
|
|
49
49
|
"prettier": "^3.5.3",
|
|
50
50
|
"prompt": "^1.3.0",
|
|
51
|
-
"shell-quote": "^1.8.
|
|
51
|
+
"shell-quote": "^1.8.3",
|
|
52
52
|
"shiki": "^1.29.2",
|
|
53
|
-
"strip-json-comments": "^5.0.
|
|
53
|
+
"strip-json-comments": "^5.0.2",
|
|
54
54
|
"superjson": "^2.2.2",
|
|
55
55
|
"swr": "^2.3.3",
|
|
56
56
|
"tcp-port-used": "^1.0.2",
|
|
57
57
|
"yocto-spinner": "^0.1.2",
|
|
58
|
-
"zod": "^3.25.
|
|
58
|
+
"zod": "^3.25.57",
|
|
59
59
|
"zod-to-json-schema": "^3.24.5",
|
|
60
|
-
"@mastra/deployer": "^0.10.
|
|
61
|
-
"@mastra/
|
|
62
|
-
"@mastra/
|
|
60
|
+
"@mastra/deployer": "^0.10.6-alpha.0",
|
|
61
|
+
"@mastra/mcp": "^0.10.4-alpha.0",
|
|
62
|
+
"@mastra/loggers": "^0.10.2"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@microsoft/api-extractor": "^7.52.8",
|
|
66
66
|
"@types/fs-extra": "^11.0.4",
|
|
67
|
-
"@types/node": "^20.
|
|
67
|
+
"@types/node": "^20.19.0",
|
|
68
68
|
"@types/prompt": "^1.1.9",
|
|
69
69
|
"@types/shell-quote": "^1.7.5",
|
|
70
70
|
"@types/tcp-port-used": "^1.0.4",
|
|
71
71
|
"cpy-cli": "^5.0.0",
|
|
72
72
|
"eslint": "^9.28.0",
|
|
73
|
-
"memfs": "^4.17.
|
|
73
|
+
"memfs": "^4.17.2",
|
|
74
74
|
"npm-run-all2": "^7.0.2",
|
|
75
|
-
"rollup": "^4.
|
|
75
|
+
"rollup": "^4.42.0",
|
|
76
76
|
"tsup": "^8.5.0",
|
|
77
|
-
"type-fest": "^4.
|
|
78
|
-
"typescript": "^5.8.
|
|
79
|
-
"vitest": "^3.2.
|
|
80
|
-
"@internal/lint": "0.0.
|
|
81
|
-
"@mastra/
|
|
82
|
-
"@mastra/core": "0.10.
|
|
83
|
-
"@mastra/
|
|
77
|
+
"type-fest": "^4.41.0",
|
|
78
|
+
"typescript": "^5.8.3",
|
|
79
|
+
"vitest": "^3.2.3",
|
|
80
|
+
"@internal/lint": "0.0.12",
|
|
81
|
+
"@mastra/playground-ui": "5.1.6-alpha.0",
|
|
82
|
+
"@mastra/core": "0.10.6-alpha.0",
|
|
83
|
+
"@mastra/client-js": "0.10.5-alpha.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"@mastra/core": "^0.10.2-alpha.0"
|