mastra 0.4.9 → 0.4.10-alpha.2
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.
|
@@ -954,6 +954,21 @@ var execWithTimeout = async (command, timeoutMs) => {
|
|
|
954
954
|
throw error;
|
|
955
955
|
}
|
|
956
956
|
};
|
|
957
|
+
async function installMastraDependency(pm, dependency, versionTag, isDev, timeout) {
|
|
958
|
+
let installCommand = getPackageManagerInstallCommand(pm);
|
|
959
|
+
if (isDev) {
|
|
960
|
+
installCommand = `${installCommand} --save-dev`;
|
|
961
|
+
}
|
|
962
|
+
try {
|
|
963
|
+
await execWithTimeout(`${pm} ${installCommand} ${dependency}${versionTag}`, timeout);
|
|
964
|
+
} catch (err) {
|
|
965
|
+
console.log("err", err);
|
|
966
|
+
if (versionTag === "@latest") {
|
|
967
|
+
throw err;
|
|
968
|
+
}
|
|
969
|
+
await execWithTimeout(`${pm} ${installCommand} ${dependency}@latest`, timeout);
|
|
970
|
+
}
|
|
971
|
+
}
|
|
957
972
|
var createMastraProject = async ({
|
|
958
973
|
projectName: name,
|
|
959
974
|
createVersionTag,
|
|
@@ -990,12 +1005,13 @@ var createMastraProject = async ({
|
|
|
990
1005
|
await exec3(`npm pkg set type="module"`);
|
|
991
1006
|
const depsService = new DepsService();
|
|
992
1007
|
await depsService.addScriptsToPackageJson({
|
|
993
|
-
dev: "mastra dev"
|
|
1008
|
+
dev: "mastra dev",
|
|
1009
|
+
build: "mastra build"
|
|
994
1010
|
});
|
|
995
1011
|
s2.stop("Project created");
|
|
996
1012
|
s2.start(`Installing ${pm} dependencies`);
|
|
997
1013
|
await exec3(`${pm} ${installCommand} zod`);
|
|
998
|
-
await exec3(`${pm} ${installCommand} typescript
|
|
1014
|
+
await exec3(`${pm} ${installCommand} typescript @types/node --save-dev`);
|
|
999
1015
|
await exec3(`echo '{
|
|
1000
1016
|
"compilerOptions": {
|
|
1001
1017
|
"target": "ES2022",
|
|
@@ -1005,24 +1021,20 @@ var createMastraProject = async ({
|
|
|
1005
1021
|
"forceConsistentCasingInFileNames": true,
|
|
1006
1022
|
"strict": true,
|
|
1007
1023
|
"skipLibCheck": true,
|
|
1024
|
+
"noEmit": true,
|
|
1008
1025
|
"outDir": "dist"
|
|
1009
1026
|
},
|
|
1010
1027
|
"include": [
|
|
1011
1028
|
"src/**/*"
|
|
1012
|
-
],
|
|
1013
|
-
"exclude": [
|
|
1014
|
-
"node_modules",
|
|
1015
|
-
"dist",
|
|
1016
|
-
".mastra"
|
|
1017
1029
|
]
|
|
1018
1030
|
}' > tsconfig.json`);
|
|
1019
1031
|
s2.stop(`${pm} dependencies installed`);
|
|
1020
1032
|
s2.start("Installing mastra");
|
|
1021
1033
|
const versionTag = createVersionTag ? `@${createVersionTag}` : "@latest";
|
|
1022
|
-
await
|
|
1034
|
+
await installMastraDependency(pm, "mastra", versionTag, true, timeout);
|
|
1023
1035
|
s2.stop("mastra installed");
|
|
1024
1036
|
s2.start("Installing @mastra/core");
|
|
1025
|
-
await
|
|
1037
|
+
await installMastraDependency(pm, "@mastra/core", versionTag, false, timeout);
|
|
1026
1038
|
s2.stop("@mastra/core installed");
|
|
1027
1039
|
s2.start("Adding .gitignore");
|
|
1028
1040
|
await exec3(`echo output.txt >> .gitignore`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { create } from '../../chunk-
|
|
1
|
+
export { create } from '../../chunk-BY3FZLXQ.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, convertToViteEnvVar, FileService as FileService$1 } from './chunk-
|
|
5
|
-
export { create } from './chunk-
|
|
4
|
+
import { DepsService, create, checkPkgJson, checkAndInstallCoreDeps, interactivePrompt, init, logger, convertToViteEnvVar, FileService as FileService$1 } from './chunk-BY3FZLXQ.js';
|
|
5
|
+
export { create } from './chunk-BY3FZLXQ.js';
|
|
6
6
|
import { Command } from 'commander';
|
|
7
7
|
import { config } from 'dotenv';
|
|
8
8
|
import { join as join$1, dirname, basename } from 'node:path';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mastra",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.10-alpha.2",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"description": "cli for mastra",
|
|
6
6
|
"type": "module",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"yocto-spinner": "^0.1.2",
|
|
55
55
|
"zod": "^3.24.2",
|
|
56
56
|
"zod-to-json-schema": "^3.24.3",
|
|
57
|
-
"@mastra/core": "^0.8.
|
|
58
|
-
"@mastra/deployer": "^0.2.
|
|
57
|
+
"@mastra/core": "^0.8.4-alpha.1",
|
|
58
|
+
"@mastra/deployer": "^0.2.10-alpha.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@microsoft/api-extractor": "^7.52.1",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"typescript": "^5.8.2",
|
|
74
74
|
"vitest": "^3.0.9",
|
|
75
75
|
"@internal/lint": "0.0.2",
|
|
76
|
-
"@mastra/
|
|
77
|
-
"@mastra/
|
|
76
|
+
"@mastra/client-js": "0.1.18-alpha.1",
|
|
77
|
+
"@mastra/playground-ui": "4.0.5-alpha.1"
|
|
78
78
|
},
|
|
79
79
|
"scripts": {
|
|
80
80
|
"build": "npm-run-all --serial build:lib copy-starter-files copy-templates build:playground",
|