create-mcp-use-app 0.7.4 → 0.8.0-canary.1

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.
Files changed (2) hide show
  1. package/dist/index.js +26 -22
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -264,13 +264,24 @@ function listTemplates() {
264
264
  } catch (error) {
265
265
  }
266
266
  }
267
- console.log(chalk.cyan(` ${template.padEnd(15)}`), chalk.gray(description));
267
+ console.log(
268
+ chalk.cyan(` ${template.padEnd(15)}`),
269
+ chalk.gray(description)
270
+ );
268
271
  }
269
272
  console.log("");
270
- console.log(chalk.gray("\u{1F4A1} Use with: npx create-mcp-use-app my-project --template <template>"));
273
+ console.log(
274
+ chalk.gray(
275
+ "\u{1F4A1} Use with: npx create-mcp-use-app my-project --template <template>"
276
+ )
277
+ );
271
278
  console.log("");
272
279
  }
273
- program.name("create-mcp-use-app").description("Create a new MCP server project").version(packageJson.version).argument("[project-name]", "Name of the MCP server project").option("-t, --template <template>", "Template to use (starter, mcp-ui, apps-sdk)", "starter").option("--list-templates", "List all available templates").option("--install", "Install dependencies after creating project").option("--no-git", "Skip initializing a git repository").option("--dev", "Use workspace dependencies for development").option("--canary", "Use canary versions of packages").option("--yarn", "Use yarn as package manager").option("--npm", "Use npm as package manager").option("--pnpm", "Use pnpm as package manager").action(
280
+ program.name("create-mcp-use-app").description("Create a new MCP server project").version(packageJson.version).argument("[project-name]", "Name of the MCP server project").option(
281
+ "-t, --template <template>",
282
+ "Template to use (starter, mcp-ui, apps-sdk)",
283
+ "starter"
284
+ ).option("--list-templates", "List all available templates").option("--install", "Install dependencies after creating project").option("--no-git", "Skip initializing a git repository").option("--dev", "Use workspace dependencies for development").option("--canary", "Use canary versions of packages").option("--yarn", "Use yarn as package manager").option("--npm", "Use npm as package manager").option("--pnpm", "Use pnpm as package manager").action(
274
285
  async (projectName, options) => {
275
286
  try {
276
287
  if (options.listTemplates) {
@@ -634,23 +645,20 @@ function ProjectNameInput({ onSubmit }) {
634
645
  return;
635
646
  }
636
647
  if (!/^[a-zA-Z0-9-_]+$/.test(trimmed)) {
637
- setError("Project name can only contain letters, numbers, hyphens, and underscores");
648
+ setError(
649
+ "Project name can only contain letters, numbers, hyphens, and underscores"
650
+ );
638
651
  return;
639
652
  }
640
653
  if (existsSync(join(process.cwd(), trimmed))) {
641
- setError(`Directory "${trimmed}" already exists! Please choose a different name.`);
654
+ setError(
655
+ `Directory "${trimmed}" already exists! Please choose a different name.`
656
+ );
642
657
  return;
643
658
  }
644
659
  onSubmit(trimmed);
645
660
  };
646
- return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Box, { marginBottom: 1 }, /* @__PURE__ */ React.createElement(Text, { bold: true }, "What is your project name?")), /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, { color: "cyan" }, "\u276F "), /* @__PURE__ */ React.createElement(
647
- TextInput,
648
- {
649
- value,
650
- onChange: setValue,
651
- onSubmit: handleSubmit
652
- }
653
- )), error && /* @__PURE__ */ React.createElement(Box, { marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { color: "red" }, "\u2716 ", error)));
661
+ return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Box, { marginBottom: 1 }, /* @__PURE__ */ React.createElement(Text, { bold: true }, "What is your project name?")), /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, { color: "cyan" }, "\u276F "), /* @__PURE__ */ React.createElement(TextInput, { value, onChange: setValue, onSubmit: handleSubmit })), error && /* @__PURE__ */ React.createElement(Box, { marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { color: "red" }, "\u2716 ", error)));
654
662
  }
655
663
  async function promptForProjectName() {
656
664
  return new Promise((resolve2) => {
@@ -667,10 +675,12 @@ async function promptForProjectName() {
667
675
  );
668
676
  });
669
677
  }
670
- function TemplateSelector({ onSelect }) {
678
+ function TemplateSelector({
679
+ onSelect
680
+ }) {
671
681
  const templatesDir = join(__dirname, "templates");
672
682
  if (!existsSync(templatesDir)) {
673
- return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color: "red" }, "\u274C Templates directory not found at: ", templatesDir), /* @__PURE__ */ React.createElement(Text, { color: "yellow" }, " __dirname: ", __dirname));
683
+ return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color: "red" }, "\u274C Templates directory not found at: ", templatesDir), /* @__PURE__ */ React.createElement(Text, { color: "yellow" }, " __dirname: ", __dirname));
674
684
  }
675
685
  const availableTemplates = readdirSync(templatesDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name).sort();
676
686
  if (availableTemplates.length === 0) {
@@ -691,13 +701,7 @@ function TemplateSelector({ onSelect }) {
691
701
  value: template
692
702
  };
693
703
  });
694
- return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Box, { marginBottom: 1 }, /* @__PURE__ */ React.createElement(Text, { bold: true }, "Select a template:")), /* @__PURE__ */ React.createElement(
695
- SelectInput,
696
- {
697
- items,
698
- onSelect: (item) => onSelect(item.value)
699
- }
700
- ));
704
+ return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Box, { marginBottom: 1 }, /* @__PURE__ */ React.createElement(Text, { bold: true }, "Select a template:")), /* @__PURE__ */ React.createElement(SelectInput, { items, onSelect: (item) => onSelect(item.value) }));
701
705
  }
702
706
  async function promptForTemplate() {
703
707
  return new Promise((resolve2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mcp-use-app",
3
- "version": "0.7.4",
3
+ "version": "0.8.0-canary.1",
4
4
  "type": "module",
5
5
  "description": "Create MCP-Use apps with one command",
6
6
  "author": "mcp-use, Inc.",