create-mcp-use-app 0.10.2 → 0.10.3

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
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  import { Box, render, Text } from "ink";
7
7
  import SelectInput from "ink-select-input";
8
8
  import TextInput from "ink-text-input";
9
- import { execSync, spawn, spawnSync } from "child_process";
9
+ import { spawn, spawnSync } from "child_process";
10
10
  import {
11
11
  copyFileSync,
12
12
  existsSync,
@@ -88,50 +88,6 @@ function getInstallArgs(packageManager) {
88
88
  return ["install"];
89
89
  }
90
90
  }
91
- function isInGitRepository() {
92
- try {
93
- execSync("git rev-parse --is-inside-work-tree", { stdio: "ignore" });
94
- return true;
95
- } catch (_) {
96
- }
97
- return false;
98
- }
99
- function isDefaultBranchSet() {
100
- try {
101
- execSync("git config init.defaultBranch", { stdio: "ignore" });
102
- return true;
103
- } catch (_) {
104
- }
105
- return false;
106
- }
107
- function tryGitInit(root) {
108
- let didInit = false;
109
- try {
110
- execSync("git --version", { stdio: "ignore" });
111
- if (isInGitRepository()) {
112
- return false;
113
- }
114
- execSync("git init", { cwd: root, stdio: "ignore" });
115
- didInit = true;
116
- if (!isDefaultBranchSet()) {
117
- execSync("git checkout -b main", { cwd: root, stdio: "ignore" });
118
- }
119
- execSync("git add -A", { cwd: root, stdio: "ignore" });
120
- execSync('git commit -m "Initial commit from create-mcp-use-app"', {
121
- cwd: root,
122
- stdio: "ignore"
123
- });
124
- return true;
125
- } catch (e) {
126
- if (didInit) {
127
- try {
128
- rmSync(join(root, ".git"), { recursive: true, force: true });
129
- } catch (_) {
130
- }
131
- }
132
- return false;
133
- }
134
- }
135
91
  var program = new Command();
136
92
  function renderLogo() {
137
93
  console.log(chalk.cyan("\u259B\u259B\u258C\u259B\u2598\u259B\u258C\u2584\u2596\u258C\u258C\u259B\u2598\u2588\u258C"));
@@ -304,9 +260,9 @@ program.name("create-mcp-use-app").description("Create a new MCP server project"
304
260
  console.log("");
305
261
  projectName = await promptForProjectName();
306
262
  console.log("");
307
- if (!options.template) {
308
- selectedTemplate = await promptForTemplate();
309
- }
263
+ }
264
+ if (!options.template && !selectedTemplate) {
265
+ selectedTemplate = await promptForTemplate();
310
266
  }
311
267
  if (!selectedTemplate) {
312
268
  selectedTemplate = "starter";
@@ -484,9 +440,6 @@ program.name("create-mcp-use-app").description("Create a new MCP server project"
484
440
  );
485
441
  }
486
442
  }
487
- if (options.git && !isGitHubRepoUrl(validatedTemplate)) {
488
- tryGitInit(projectPath);
489
- }
490
443
  console.log("");
491
444
  console.log(chalk.green("\u2705 MCP server created successfully!"));
492
445
  if (options.dev) {
@@ -523,7 +476,11 @@ program.name("create-mcp-use-app").description("Create a new MCP server project"
523
476
  console.log("");
524
477
  console.log(chalk.bold("\u{1F680} To get started:"));
525
478
  console.log(chalk.cyan(` cd ${sanitizedProjectName}`));
526
- console.log(chalk.cyan(` ${getInstallCommand(usedPackageManager)}`));
479
+ if (!options.install) {
480
+ console.log(
481
+ chalk.cyan(` ${getInstallCommand(usedPackageManager)}`)
482
+ );
483
+ }
527
484
  console.log(chalk.cyan(` ${getDevCommand(usedPackageManager)}`));
528
485
  console.log("");
529
486
  console.log(chalk.bold("\u{1F4E4} To deploy:"));
@@ -765,7 +722,8 @@ function copyDirectoryWithProcessing(src, dest, versions, isDevelopment, useCana
765
722
  continue;
766
723
  }
767
724
  const srcPath = join(src, entry.name);
768
- const destPath = join(dest, entry.name);
725
+ const destName = entry.name === "gitignore" ? ".gitignore" : entry.name;
726
+ const destPath = join(dest, destName);
769
727
  if (entry.isDirectory()) {
770
728
  mkdirSync(destPath, { recursive: true });
771
729
  copyDirectoryWithProcessing(
@@ -0,0 +1,31 @@
1
+ # Dependencies
2
+ node_modules/
3
+
4
+ # Build output
5
+ dist/
6
+ .mcp-use/
7
+
8
+ # TypeScript
9
+ *.tsbuildinfo
10
+
11
+ # Environment
12
+ .env
13
+ .env.local
14
+
15
+ # Logs
16
+ *.log
17
+ npm-debug.log*
18
+ yarn-debug.log*
19
+ yarn-error.log*
20
+
21
+ # OS
22
+ .DS_Store
23
+ Thumbs.db
24
+
25
+ # IDE
26
+ .vscode/
27
+ .idea/
28
+ *.swp
29
+ *.swo
30
+ *~
31
+
@@ -0,0 +1,31 @@
1
+ # Dependencies
2
+ node_modules/
3
+
4
+ # Build output
5
+ dist/
6
+ .mcp-use/
7
+
8
+ # TypeScript
9
+ *.tsbuildinfo
10
+
11
+ # Environment
12
+ .env
13
+ .env.local
14
+
15
+ # Logs
16
+ *.log
17
+ npm-debug.log*
18
+ yarn-debug.log*
19
+ yarn-error.log*
20
+
21
+ # OS
22
+ .DS_Store
23
+ Thumbs.db
24
+
25
+ # IDE
26
+ .vscode/
27
+ .idea/
28
+ *.swp
29
+ *.swo
30
+ *~
31
+
@@ -0,0 +1,31 @@
1
+ # Dependencies
2
+ node_modules/
3
+
4
+ # Build output
5
+ dist/
6
+ .mcp-use/
7
+
8
+ # TypeScript
9
+ *.tsbuildinfo
10
+
11
+ # Environment
12
+ .env
13
+ .env.local
14
+
15
+ # Logs
16
+ *.log
17
+ npm-debug.log*
18
+ yarn-debug.log*
19
+ yarn-error.log*
20
+
21
+ # OS
22
+ .DS_Store
23
+ Thumbs.db
24
+
25
+ # IDE
26
+ .vscode/
27
+ .idea/
28
+ *.swp
29
+ *.swo
30
+ *~
31
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mcp-use-app",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "type": "module",
5
5
  "description": "Create MCP-Use apps with one command",
6
6
  "author": "mcp-use, Inc.",