mastra 0.2.9-alpha.4 → 0.2.9-alpha.5
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-7XSCD43Z.js → chunk-WFYXT5ZO.js} +43 -42
- package/dist/commands/create/create.js +1 -1
- package/dist/index.js +2 -2
- package/package.json +3 -3
- package/src/playground/dist/assets/{index-FjzieC76.js → index-BPMnO8pg.js} +124 -129
- package/src/playground/dist/assets/{index-2C3bez9m.js → index-CXGHj3NH.js} +1 -1
- package/src/playground/dist/assets/{index-DBRpL1Mf.js → index-W3r2adO1.js} +1 -1
- package/src/playground/dist/assets/style-G82Qq-am.css +1 -0
- package/src/playground/dist/index.html +2 -2
- package/src/playground/dist/assets/style-Chj3VY8T.css +0 -1
|
@@ -2,55 +2,18 @@ import * as p from '@clack/prompts';
|
|
|
2
2
|
import color2 from 'picocolors';
|
|
3
3
|
import child_process from 'node:child_process';
|
|
4
4
|
import util from 'node:util';
|
|
5
|
+
import * as fs3 from 'fs';
|
|
6
|
+
import fs3__default from 'fs';
|
|
5
7
|
import fs4 from 'fs/promises';
|
|
6
8
|
import path, { dirname } from 'path';
|
|
9
|
+
import { fileURLToPath } from 'url';
|
|
10
|
+
import { execa } from 'execa';
|
|
7
11
|
import fsExtra3 from 'fs-extra/esm';
|
|
8
12
|
import prettier from 'prettier';
|
|
9
13
|
import yoctoSpinner from 'yocto-spinner';
|
|
10
|
-
import * as fs3 from 'fs';
|
|
11
|
-
import fs3__default from 'fs';
|
|
12
|
-
import { fileURLToPath } from 'url';
|
|
13
|
-
import { execa } from 'execa';
|
|
14
14
|
import { createLogger } from '@mastra/core/logger';
|
|
15
15
|
|
|
16
16
|
// src/commands/create/create.ts
|
|
17
|
-
|
|
18
|
-
// src/commands/utils.ts
|
|
19
|
-
function getPackageManager() {
|
|
20
|
-
const userAgent = process.env.npm_config_user_agent || "";
|
|
21
|
-
const execPath = process.env.npm_execpath || "";
|
|
22
|
-
if (userAgent.includes("yarn")) {
|
|
23
|
-
return "yarn";
|
|
24
|
-
}
|
|
25
|
-
if (userAgent.includes("pnpm")) {
|
|
26
|
-
return "pnpm";
|
|
27
|
-
}
|
|
28
|
-
if (userAgent.includes("npm")) {
|
|
29
|
-
return "npm";
|
|
30
|
-
}
|
|
31
|
-
if (execPath.includes("yarn")) {
|
|
32
|
-
return "yarn";
|
|
33
|
-
}
|
|
34
|
-
if (execPath.includes("pnpm")) {
|
|
35
|
-
return "pnpm";
|
|
36
|
-
}
|
|
37
|
-
if (execPath.includes("npm")) {
|
|
38
|
-
return "npm";
|
|
39
|
-
}
|
|
40
|
-
return "npm";
|
|
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
|
-
}
|
|
54
17
|
var DepsService = class {
|
|
55
18
|
packageManager;
|
|
56
19
|
constructor() {
|
|
@@ -145,6 +108,43 @@ var DepsService = class {
|
|
|
145
108
|
}
|
|
146
109
|
};
|
|
147
110
|
|
|
111
|
+
// src/commands/utils.ts
|
|
112
|
+
function getPackageManager() {
|
|
113
|
+
const userAgent = process.env.npm_config_user_agent || "";
|
|
114
|
+
const execPath = process.env.npm_execpath || "";
|
|
115
|
+
if (userAgent.includes("yarn")) {
|
|
116
|
+
return "yarn";
|
|
117
|
+
}
|
|
118
|
+
if (userAgent.includes("pnpm")) {
|
|
119
|
+
return "pnpm";
|
|
120
|
+
}
|
|
121
|
+
if (userAgent.includes("npm")) {
|
|
122
|
+
return "npm";
|
|
123
|
+
}
|
|
124
|
+
if (execPath.includes("yarn")) {
|
|
125
|
+
return "yarn";
|
|
126
|
+
}
|
|
127
|
+
if (execPath.includes("pnpm")) {
|
|
128
|
+
return "pnpm";
|
|
129
|
+
}
|
|
130
|
+
if (execPath.includes("npm")) {
|
|
131
|
+
return "npm";
|
|
132
|
+
}
|
|
133
|
+
return "npm";
|
|
134
|
+
}
|
|
135
|
+
function getPackageManagerInstallCommand(pm) {
|
|
136
|
+
switch (pm) {
|
|
137
|
+
case "npm":
|
|
138
|
+
return "install";
|
|
139
|
+
case "yarn":
|
|
140
|
+
return "add";
|
|
141
|
+
case "pnpm":
|
|
142
|
+
return "add";
|
|
143
|
+
default:
|
|
144
|
+
return "install";
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
148
|
// src/services/service.env.ts
|
|
149
149
|
var EnvService = class {
|
|
150
150
|
};
|
|
@@ -766,7 +766,8 @@ var init = async ({
|
|
|
766
766
|
}
|
|
767
767
|
const key = await getAPIKey(llmProvider || "openai");
|
|
768
768
|
const aiSdkPackage = getAISDKPackage(llmProvider);
|
|
769
|
-
const
|
|
769
|
+
const depsService = new DepsService();
|
|
770
|
+
const pm = depsService.packageManager;
|
|
770
771
|
const installCommand = getPackageManagerInstallCommand(pm);
|
|
771
772
|
await exec2(`${pm} ${installCommand} ${aiSdkPackage}`);
|
|
772
773
|
s.stop();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { create } from '../../chunk-
|
|
1
|
+
export { create } from '../../chunk-WFYXT5ZO.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#! /usr/bin/env node
|
|
2
2
|
import { PosthogAnalytics } from './chunk-SLGHDOYI.js';
|
|
3
3
|
export { PosthogAnalytics } from './chunk-SLGHDOYI.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-WFYXT5ZO.js';
|
|
5
|
+
export { create } from './chunk-WFYXT5ZO.js';
|
|
6
6
|
import { Command } from 'commander';
|
|
7
7
|
import { join as join$1, dirname } from 'node:path';
|
|
8
8
|
import { getWatcherInputOptions, writeTelemetryConfig, createWatcher, FileService as FileService$2 } from '@mastra/deployer/build';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mastra",
|
|
3
|
-
"version": "0.2.9-alpha.
|
|
3
|
+
"version": "0.2.9-alpha.5",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"description": "cli for mastra",
|
|
6
6
|
"type": "module",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"yocto-spinner": "^0.1.1",
|
|
57
57
|
"zod": "^3.24.1",
|
|
58
58
|
"zod-to-json-schema": "^3.24.1",
|
|
59
|
-
"@mastra/core": "^0.5.0-alpha.
|
|
60
|
-
"@mastra/deployer": "^0.1.8-alpha.
|
|
59
|
+
"@mastra/core": "^0.5.0-alpha.5",
|
|
60
|
+
"@mastra/deployer": "^0.1.8-alpha.5"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@microsoft/api-extractor": "^7.49.2",
|