create-mastra 0.17.1 → 0.17.3-alpha.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # create-mastra
2
2
 
3
+ ## 0.17.3-alpha.0
4
+
5
+ ## 0.17.2
6
+
7
+ ## 0.17.2-alpha.0
8
+
3
9
  ## 0.17.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1940,7 +1940,6 @@ export const mastra = new Mastra({
1940
1940
  throw err;
1941
1941
  }
1942
1942
  };
1943
- yoctoSpinner({ text: "Installing Mastra core dependencies\n" });
1944
1943
  var getAPIKey = async (provider) => {
1945
1944
  let key = "OPENAI_API_KEY";
1946
1945
  switch (provider) {
@@ -2084,19 +2083,19 @@ Note: you will need to go into Cursor Settings -> MCP Settings and manually enab
2084
2083
  );
2085
2084
  }
2086
2085
  if (editor === `cursor-global`) {
2087
- const confirm2 = await ve({
2086
+ const confirm = await ve({
2088
2087
  message: `Global install will add/update ${cursorGlobalMCPConfigPath} and make the Mastra docs MCP server available in all your Cursor projects. Continue?`,
2089
2088
  options: [
2090
2089
  { value: "yes", label: "Yes, I understand" },
2091
2090
  { value: "skip", label: "No, skip for now" }
2092
2091
  ]
2093
2092
  });
2094
- if (confirm2 !== `yes`) {
2093
+ if (confirm !== `yes`) {
2095
2094
  return void 0;
2096
2095
  }
2097
2096
  }
2098
2097
  if (editor === `windsurf`) {
2099
- const confirm2 = await ve({
2098
+ const confirm = await ve({
2100
2099
  message: `Windsurf only supports a global MCP config (at ${windsurfGlobalMCPConfigPath}) is it ok to add/update that global config?
2101
2100
  This means the Mastra docs MCP server will be available in all your Windsurf projects.`,
2102
2101
  options: [
@@ -2104,7 +2103,7 @@ This means the Mastra docs MCP server will be available in all your Windsurf pro
2104
2103
  { value: "skip", label: "No, skip for now" }
2105
2104
  ]
2106
2105
  });
2107
- if (confirm2 !== `yes`) {
2106
+ if (confirm !== `yes`) {
2108
2107
  return void 0;
2109
2108
  }
2110
2109
  }
@@ -2154,10 +2153,10 @@ var exec2 = util.promisify(child_process.exec);
2154
2153
  async function cloneTemplate(options) {
2155
2154
  const { template, projectName, targetDir } = options;
2156
2155
  const projectPath = targetDir ? path.resolve(targetDir, projectName) : path.resolve(projectName);
2157
- const spinner5 = yoctoSpinner({ text: `Cloning template "${template.title}"...` }).start();
2156
+ const spinner4 = yoctoSpinner({ text: `Cloning template "${template.title}"...` }).start();
2158
2157
  try {
2159
2158
  if (await directoryExists(projectPath)) {
2160
- spinner5.error(`Directory ${projectName} already exists`);
2159
+ spinner4.error(`Directory ${projectName} already exists`);
2161
2160
  throw new Error(`Directory ${projectName} already exists`);
2162
2161
  }
2163
2162
  await cloneRepositoryWithoutGit(template.githubUrl, projectPath);
@@ -2166,10 +2165,10 @@ async function cloneTemplate(options) {
2166
2165
  if (await fileExists(envExamplePath)) {
2167
2166
  await fs4.copyFile(envExamplePath, path.join(projectPath, ".env"));
2168
2167
  }
2169
- spinner5.success(`Template "${template.title}" cloned successfully to ${projectName}`);
2168
+ spinner4.success(`Template "${template.title}" cloned successfully to ${projectName}`);
2170
2169
  return projectPath;
2171
2170
  } catch (error) {
2172
- spinner5.error(`Failed to clone template: ${error instanceof Error ? error.message : "Unknown error"}`);
2171
+ spinner4.error(`Failed to clone template: ${error instanceof Error ? error.message : "Unknown error"}`);
2173
2172
  throw error;
2174
2173
  }
2175
2174
  }
@@ -2224,16 +2223,16 @@ async function updatePackageJson(projectPath, projectName) {
2224
2223
  }
2225
2224
  }
2226
2225
  async function installDependencies(projectPath, packageManager) {
2227
- const spinner5 = yoctoSpinner({ text: "Installing dependencies..." }).start();
2226
+ const spinner4 = yoctoSpinner({ text: "Installing dependencies..." }).start();
2228
2227
  try {
2229
2228
  const pm = packageManager || getPackageManager();
2230
2229
  const installCommand = shellQuote2.quote([pm, "install"]);
2231
2230
  await exec2(installCommand, {
2232
2231
  cwd: projectPath
2233
2232
  });
2234
- spinner5.success("Dependencies installed successfully");
2233
+ spinner4.success("Dependencies installed successfully");
2235
2234
  } catch (error) {
2236
- spinner5.error(`Failed to install dependencies: ${error instanceof Error ? error.message : "Unknown error"}`);
2235
+ spinner4.error(`Failed to install dependencies: ${error instanceof Error ? error.message : "Unknown error"}`);
2237
2236
  throw error;
2238
2237
  }
2239
2238
  }
@@ -2696,16 +2695,16 @@ async function createFromTemplate(args2) {
2696
2695
  selectedTemplate = selected;
2697
2696
  } else if (args2.template && typeof args2.template === "string") {
2698
2697
  if (isGitHubUrl(args2.template)) {
2699
- const spinner5 = Y();
2700
- spinner5.start("Validating GitHub repository...");
2698
+ const spinner4 = Y();
2699
+ spinner4.start("Validating GitHub repository...");
2701
2700
  const validation = await validateGitHubProject(args2.template);
2702
2701
  if (!validation.isValid) {
2703
- spinner5.stop("Validation failed");
2702
+ spinner4.stop("Validation failed");
2704
2703
  M.error("This does not appear to be a valid Mastra project:");
2705
2704
  validation.errors.forEach((error) => M.error(` - ${error}`));
2706
2705
  throw new Error("Invalid Mastra project");
2707
2706
  }
2708
- spinner5.stop("Valid Mastra project \u2713");
2707
+ spinner4.stop("Valid Mastra project \u2713");
2709
2708
  selectedTemplate = await createFromGitHubUrl(args2.template);
2710
2709
  } else {
2711
2710
  const templates = await loadTemplates();