mastra 0.4.5-alpha.5 → 0.4.5-alpha.7

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/README.md CHANGED
@@ -113,7 +113,7 @@ This CLI collects anonymous usage data (no personal/sensitive info) to help impr
113
113
 
114
114
  To opt-out:
115
115
 
116
- 1. Add `NO_MASTRA_TELEMETRY=1` to commands
116
+ 1. Add `MASTRA_TELEMETRY_DISABLED=1` to commands
117
117
 
118
118
  ## Local development
119
119
 
@@ -1 +1 @@
1
- export { PosthogAnalytics } from '../chunk-SDQ6DRUS.js';
1
+ export { PosthogAnalytics } from '../chunk-67VLC2FJ.js';
@@ -64,7 +64,7 @@ var PosthogAnalytics = class {
64
64
  });
65
65
  }
66
66
  isTelemetryEnabled() {
67
- if (process.env.NO_MASTRA_TELEMETRY) {
67
+ if (process.env.MASTRA_TELEMETRY_DISABLED) {
68
68
  return false;
69
69
  }
70
70
  return true;
@@ -81,7 +81,8 @@ var PosthogAnalytics = class {
81
81
  platform: process.arch,
82
82
  session_id: this.sessionId,
83
83
  cli_version: this.version || "unknown",
84
- machine_id: os.hostname()
84
+ machine_id: os.hostname(),
85
+ disableGeoip: false
85
86
  };
86
87
  }
87
88
  captureSessionStart() {
@@ -145,6 +145,16 @@ function getPackageManagerInstallCommand(pm) {
145
145
  return "install";
146
146
  }
147
147
  }
148
+ function convertToViteEnvVar(envVars, keysToConvert) {
149
+ const envEntries = Array.from(envVars.entries());
150
+ const formattedEnvEntries = envEntries.map(([key, value]) => {
151
+ if (keysToConvert.includes(key)) {
152
+ return [`VITE_${key.toUpperCase()}`, value];
153
+ }
154
+ return [key, value];
155
+ });
156
+ return new Map(formattedEnvEntries);
157
+ }
148
158
  var args = ["-y", "@mastra/mcp-docs-server@latest"];
149
159
  var mcpConfig = {
150
160
  mcpServers: {
@@ -1021,6 +1031,7 @@ var createMastraProject = async ({
1021
1031
  await exec3(`echo .env.development >> .gitignore`);
1022
1032
  await exec3(`echo .env >> .gitignore`);
1023
1033
  await exec3(`echo *.db >> .gitignore`);
1034
+ await exec3(`echo *.db-* >> .gitignore`);
1024
1035
  s2.stop(".gitignore added");
1025
1036
  p.outro("Project created successfully");
1026
1037
  console.log("");
@@ -1063,4 +1074,4 @@ var postCreate = ({ projectName }) => {
1063
1074
  `);
1064
1075
  };
1065
1076
 
1066
- export { DepsService, FileService, checkAndInstallCoreDeps, checkPkgJson, create, init, interactivePrompt, logger };
1077
+ export { DepsService, FileService, checkAndInstallCoreDeps, checkPkgJson, convertToViteEnvVar, create, init, interactivePrompt, logger };
@@ -1 +1 @@
1
- export { create } from '../../chunk-4QQ2IFQI.js';
1
+ export { create } from '../../chunk-ITGBIOBC.js';
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #! /usr/bin/env node
2
- import { PosthogAnalytics } from './chunk-SDQ6DRUS.js';
3
- export { PosthogAnalytics } from './chunk-SDQ6DRUS.js';
4
- import { DepsService, create, checkPkgJson, checkAndInstallCoreDeps, interactivePrompt, init, logger, FileService as FileService$1 } from './chunk-4QQ2IFQI.js';
5
- export { create } from './chunk-4QQ2IFQI.js';
2
+ import { PosthogAnalytics } from './chunk-67VLC2FJ.js';
3
+ export { PosthogAnalytics } from './chunk-67VLC2FJ.js';
4
+ import { DepsService, create, checkPkgJson, checkAndInstallCoreDeps, interactivePrompt, init, logger, convertToViteEnvVar, FileService as FileService$1 } from './chunk-ITGBIOBC.js';
5
+ export { create } from './chunk-ITGBIOBC.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';
@@ -335,9 +335,10 @@ async function dev({
335
335
  await bundler.prepare(dotMastraPath);
336
336
  const watcher = await bundler.watch(entryFile, dotMastraPath, discoveredTools);
337
337
  const env = await bundler.loadEnvVars();
338
+ const formattedEnv = convertToViteEnvVar(env, ["MASTRA_TELEMETRY_DISABLED"]);
338
339
  const serverOptions = await getServerOptions(entryFile, join(dotMastraPath, "output"));
339
340
  const startPort = port ?? serverOptions?.port ?? 4111;
340
- await startServer(join(dotMastraPath, "output"), startPort, env);
341
+ await startServer(join(dotMastraPath, "output"), startPort, formattedEnv);
341
342
  watcher.on("event", (event) => {
342
343
  if (event.code === "BUNDLE_END") {
343
344
  logger.info("[Mastra Dev] - Bundling finished, restarting server...");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mastra",
3
- "version": "0.4.5-alpha.5",
3
+ "version": "0.4.5-alpha.7",
4
4
  "license": "ISC",
5
5
  "description": "cli for mastra",
6
6
  "type": "module",
@@ -53,8 +53,8 @@
53
53
  "yocto-spinner": "^0.1.2",
54
54
  "zod": "^3.24.2",
55
55
  "zod-to-json-schema": "^3.24.3",
56
- "@mastra/core": "^0.8.0-alpha.3",
57
- "@mastra/deployer": "^0.2.6-alpha.5"
56
+ "@mastra/core": "^0.8.0-alpha.5",
57
+ "@mastra/deployer": "^0.2.6-alpha.7"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@microsoft/api-extractor": "^7.52.1",
@@ -71,9 +71,9 @@
71
71
  "type-fest": "^4.37.0",
72
72
  "typescript": "^5.8.2",
73
73
  "vitest": "^3.0.9",
74
- "@mastra/client-js": "0.1.14-alpha.3",
75
- "@mastra/playground-ui": "4.0.0-alpha.3",
76
- "@internal/lint": "0.0.1"
74
+ "@internal/lint": "0.0.1",
75
+ "@mastra/client-js": "0.1.14-alpha.5",
76
+ "@mastra/playground-ui": "4.0.0-alpha.5"
77
77
  },
78
78
  "scripts": {
79
79
  "build": "npm-run-all --serial build:lib copy-starter-files copy-templates build:playground",