mastra 0.2.4-alpha.0 → 0.2.4-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.
|
@@ -39,6 +39,18 @@ function getPackageManager() {
|
|
|
39
39
|
}
|
|
40
40
|
return "npm";
|
|
41
41
|
}
|
|
42
|
+
function getPackageManagerInstallCommand(pm) {
|
|
43
|
+
switch (pm) {
|
|
44
|
+
case "npm":
|
|
45
|
+
return "install";
|
|
46
|
+
case "yarn":
|
|
47
|
+
return "add";
|
|
48
|
+
case "pnpm":
|
|
49
|
+
return "add";
|
|
50
|
+
default:
|
|
51
|
+
return "install";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
42
54
|
var DepsService = class {
|
|
43
55
|
packageManager;
|
|
44
56
|
constructor() {
|
|
@@ -754,7 +766,9 @@ var init = async ({
|
|
|
754
766
|
}
|
|
755
767
|
const key = await getAPIKey(llmProvider || "openai");
|
|
756
768
|
const aiSdkPackage = getAISDKPackage(llmProvider);
|
|
757
|
-
|
|
769
|
+
const pm = getPackageManager();
|
|
770
|
+
const installCommand = getPackageManagerInstallCommand(pm);
|
|
771
|
+
await exec2(`${pm} ${installCommand} ${aiSdkPackage}`);
|
|
758
772
|
s.stop();
|
|
759
773
|
if (!llmApiKey) {
|
|
760
774
|
p.note(`
|
|
@@ -825,6 +839,7 @@ var createMastraProject = async ({ createVersionTag }) => {
|
|
|
825
839
|
}
|
|
826
840
|
process.chdir(projectName);
|
|
827
841
|
const pm = getPackageManager();
|
|
842
|
+
const installCommand = getPackageManagerInstallCommand(pm);
|
|
828
843
|
s2.message("Creating project");
|
|
829
844
|
await exec3(`npm init -y`);
|
|
830
845
|
await exec3(`npm pkg set type="module"`);
|
|
@@ -834,8 +849,8 @@ var createMastraProject = async ({ createVersionTag }) => {
|
|
|
834
849
|
});
|
|
835
850
|
s2.stop("Project created");
|
|
836
851
|
s2.start(`Installing ${pm} dependencies`);
|
|
837
|
-
await exec3(`${pm}
|
|
838
|
-
await exec3(`${pm}
|
|
852
|
+
await exec3(`${pm} ${installCommand} zod`);
|
|
853
|
+
await exec3(`${pm} ${installCommand} typescript tsx @types/node --save-dev`);
|
|
839
854
|
await exec3(`echo '{
|
|
840
855
|
"compilerOptions": {
|
|
841
856
|
"target": "ES2022",
|
|
@@ -859,10 +874,10 @@ var createMastraProject = async ({ createVersionTag }) => {
|
|
|
859
874
|
s2.stop(`${pm} dependencies installed`);
|
|
860
875
|
s2.start("Installing mastra");
|
|
861
876
|
const versionTag = createVersionTag ? `@${createVersionTag}` : "@latest";
|
|
862
|
-
await execWithTimeout(`${pm}
|
|
877
|
+
await execWithTimeout(`${pm} ${installCommand} mastra${versionTag}`);
|
|
863
878
|
s2.stop("mastra installed");
|
|
864
879
|
s2.start("Installing @mastra/core");
|
|
865
|
-
await execWithTimeout(`${pm}
|
|
880
|
+
await execWithTimeout(`${pm} ${installCommand} @mastra/core${versionTag}`);
|
|
866
881
|
s2.stop("@mastra/core installed");
|
|
867
882
|
s2.start("Adding .gitignore");
|
|
868
883
|
await exec3(`echo output.txt >> .gitignore`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { create } from '../../chunk-
|
|
1
|
+
export { create } from '../../chunk-IMSTTFWI.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#! /usr/bin/env node
|
|
2
2
|
import { PosthogAnalytics } from './chunk-DHTLEROT.js';
|
|
3
3
|
export { PosthogAnalytics } from './chunk-DHTLEROT.js';
|
|
4
|
-
import { DepsService, create, checkPkgJson, checkAndInstallCoreDeps, interactivePrompt, init, logger, FileService as FileService$1 } from './chunk-
|
|
5
|
-
export { create } from './chunk-
|
|
4
|
+
import { DepsService, create, checkPkgJson, checkAndInstallCoreDeps, interactivePrompt, init, logger, FileService as FileService$1 } from './chunk-IMSTTFWI.js';
|
|
5
|
+
export { create } from './chunk-IMSTTFWI.js';
|
|
6
6
|
import { Command } from 'commander';
|
|
7
7
|
import 'picocolors';
|
|
8
8
|
import { join as join$1, dirname } from 'node:path';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mastra",
|
|
3
|
-
"version": "0.2.4-alpha.
|
|
3
|
+
"version": "0.2.4-alpha.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "cli for mastra",
|
|
6
6
|
"type": "module",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"yocto-spinner": "^0.1.1",
|
|
56
56
|
"zod": "^3.24.1",
|
|
57
57
|
"zod-to-json-schema": "^3.24.1",
|
|
58
|
-
"@mastra/core": "^0.4.0-alpha.
|
|
59
|
-
"@mastra/deployer": "^0.1.3-alpha.
|
|
58
|
+
"@mastra/core": "^0.4.0-alpha.1",
|
|
59
|
+
"@mastra/deployer": "^0.1.3-alpha.1"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@microsoft/api-extractor": "^7.49.2",
|