create-mastra 0.11.3-alpha.0 → 0.11.3-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.
package/dist/index.js CHANGED
@@ -1196,18 +1196,6 @@ function getPackageManager() {
1196
1196
  }
1197
1197
  return "npm";
1198
1198
  }
1199
- function getPackageManagerInstallCommand(pm) {
1200
- switch (pm) {
1201
- case "npm":
1202
- return "install";
1203
- case "yarn":
1204
- return "add";
1205
- case "pnpm":
1206
- return "add";
1207
- default:
1208
- return "install";
1209
- }
1210
- }
1211
1199
  var logger = new PinoLogger({
1212
1200
  name: "Mastra CLI",
1213
1201
  level: "info"
@@ -1362,6 +1350,20 @@ function findTemplateByName(templates, templateName) {
1362
1350
  function getDefaultProjectName(template) {
1363
1351
  return template.slug.replace(/^template-/, "");
1364
1352
  }
1353
+ function getPackageManagerAddCommand(pm) {
1354
+ switch (pm) {
1355
+ case "npm":
1356
+ return "install --audit=false --fund=false --loglevel=error --progress=false --update-notifier=false";
1357
+ case "yarn":
1358
+ return "add";
1359
+ case "pnpm":
1360
+ return "add --loglevel=error";
1361
+ case "bun":
1362
+ return "add";
1363
+ default:
1364
+ return "add";
1365
+ }
1366
+ }
1365
1367
  var DepsService = class {
1366
1368
  packageManager;
1367
1369
  constructor() {
@@ -1396,14 +1398,10 @@ var DepsService = class {
1396
1398
  }
1397
1399
  }
1398
1400
  async installPackages(packages) {
1399
- let runCommand = this.packageManager;
1400
- if (this.packageManager === "npm") {
1401
- runCommand = `${this.packageManager} i`;
1402
- } else {
1403
- runCommand = `${this.packageManager} add`;
1404
- }
1401
+ const pm = this.packageManager;
1402
+ const installCommand = getPackageManagerAddCommand(pm);
1405
1403
  const packageList = packages.join(" ");
1406
- return execa(`${runCommand} ${packageList}`, {
1404
+ return execa(`${pm} ${installCommand} ${packageList}`, {
1407
1405
  all: true,
1408
1406
  shell: true,
1409
1407
  stdio: "inherit"
@@ -2240,7 +2238,7 @@ var init = async ({
2240
2238
  const aiSdkPackageVersion = getAISDKPackageVersion(llmProvider);
2241
2239
  const depsService = new DepsService();
2242
2240
  const pm = depsService.packageManager;
2243
- const installCommand = getPackageManagerInstallCommand(pm);
2241
+ const installCommand = getPackageManagerAddCommand(pm);
2244
2242
  await exec3(`${pm} ${installCommand} ${aiSdkPackage}@${aiSdkPackageVersion}`);
2245
2243
  if (configureEditorWithDocsMCP) {
2246
2244
  await installMastraDocsMCPServer({
@@ -2295,7 +2293,7 @@ var execWithTimeout = async (command, timeoutMs) => {
2295
2293
  }
2296
2294
  };
2297
2295
  async function installMastraDependency(pm, dependency, versionTag, isDev, timeout) {
2298
- let installCommand = getPackageManagerInstallCommand(pm);
2296
+ let installCommand = getPackageManagerAddCommand(pm);
2299
2297
  if (isDev) {
2300
2298
  installCommand = `${installCommand} --save-dev`;
2301
2299
  }
@@ -2347,7 +2345,7 @@ var createMastraProject = async ({
2347
2345
  }
2348
2346
  process.chdir(projectName);
2349
2347
  const pm = getPackageManager();
2350
- const installCommand = getPackageManagerInstallCommand(pm);
2348
+ const installCommand = getPackageManagerAddCommand(pm);
2351
2349
  s2.message("Initializing project structure");
2352
2350
  try {
2353
2351
  await exec4(`npm init -y`);