mastra 0.4.5-alpha.8 → 0.4.5-alpha.9
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/index.js +17 -15
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { readFileSync } from 'node:fs';
|
|
|
13
13
|
import { fileURLToPath } from 'node:url';
|
|
14
14
|
import { join } from 'path';
|
|
15
15
|
import { FileService, getDeployer } from '@mastra/deployer';
|
|
16
|
+
import { isWebContainer } from '@webcontainer/env';
|
|
16
17
|
import { execa } from 'execa';
|
|
17
18
|
import { stat } from 'node:fs/promises';
|
|
18
19
|
|
|
@@ -248,21 +249,22 @@ var isRestarting = false;
|
|
|
248
249
|
var startServer = async (dotMastraPath, port, env) => {
|
|
249
250
|
try {
|
|
250
251
|
logger.info("[Mastra Dev] - Starting server...");
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
"
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
252
|
+
const commands = [];
|
|
253
|
+
if (!isWebContainer()) {
|
|
254
|
+
const instrumentation = import.meta.resolve("@opentelemetry/instrumentation/hook.mjs");
|
|
255
|
+
commands.push("--import=./instrumentation.mjs", `--import=${instrumentation}`);
|
|
256
|
+
}
|
|
257
|
+
commands.push("index.mjs");
|
|
258
|
+
currentServerProcess = execa("node", commands, {
|
|
259
|
+
cwd: dotMastraPath,
|
|
260
|
+
env: {
|
|
261
|
+
...Object.fromEntries(env),
|
|
262
|
+
PORT: port.toString() || process.env.PORT || "4111",
|
|
263
|
+
MASTRA_DEFAULT_STORAGE_URL: `file:${join(dotMastraPath, "..", "mastra.db")}`
|
|
264
|
+
},
|
|
265
|
+
stdio: "inherit",
|
|
266
|
+
reject: false
|
|
267
|
+
});
|
|
266
268
|
if (currentServerProcess?.exitCode && currentServerProcess?.exitCode !== 0) {
|
|
267
269
|
if (!currentServerProcess) {
|
|
268
270
|
throw new Error(`Server failed to start`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mastra",
|
|
3
|
-
"version": "0.4.5-alpha.
|
|
3
|
+
"version": "0.4.5-alpha.9",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"description": "cli for mastra",
|
|
6
6
|
"type": "module",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"@clack/prompts": "^0.8.2",
|
|
38
38
|
"@lukeed/uuid": "^2.0.1",
|
|
39
39
|
"@opentelemetry/instrumentation": "^0.57.2",
|
|
40
|
+
"@webcontainer/env": "^1.1.1",
|
|
40
41
|
"commander": "^12.1.0",
|
|
41
42
|
"dotenv": "^16.4.7",
|
|
42
43
|
"execa": "^9.5.2",
|
|
@@ -53,8 +54,8 @@
|
|
|
53
54
|
"yocto-spinner": "^0.1.2",
|
|
54
55
|
"zod": "^3.24.2",
|
|
55
56
|
"zod-to-json-schema": "^3.24.3",
|
|
56
|
-
"@mastra/core": "^0.8.0-alpha.
|
|
57
|
-
"@mastra/deployer": "^0.2.6-alpha.
|
|
57
|
+
"@mastra/core": "^0.8.0-alpha.7",
|
|
58
|
+
"@mastra/deployer": "^0.2.6-alpha.9"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
61
|
"@microsoft/api-extractor": "^7.52.1",
|
|
@@ -72,8 +73,8 @@
|
|
|
72
73
|
"typescript": "^5.8.2",
|
|
73
74
|
"vitest": "^3.0.9",
|
|
74
75
|
"@internal/lint": "0.0.1",
|
|
75
|
-
"@mastra/client-js": "0.1.14-alpha.
|
|
76
|
-
"@mastra/playground-ui": "4.0.0-alpha.
|
|
76
|
+
"@mastra/client-js": "0.1.14-alpha.7",
|
|
77
|
+
"@mastra/playground-ui": "4.0.0-alpha.7"
|
|
77
78
|
},
|
|
78
79
|
"scripts": {
|
|
79
80
|
"build": "npm-run-all --serial build:lib copy-starter-files copy-templates build:playground",
|