create-catalyst-app-internal 0.0.1-beta.68 → 0.0.1-beta.69
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/package.json +1 -1
- package/scripts/cli.cjs +16 -0
package/package.json
CHANGED
package/scripts/cli.cjs
CHANGED
|
@@ -111,6 +111,7 @@ const program = new Commander.Command()
|
|
|
111
111
|
createGitignore(projectName)
|
|
112
112
|
|
|
113
113
|
if (tailWindSupport) setupTailwind(projectName)
|
|
114
|
+
if (mcpSupport) setupMcp(projectName)
|
|
114
115
|
|
|
115
116
|
execSync(
|
|
116
117
|
`cd ${projectName} && npm i && npm pkg set name=${projectName} ${projectDescription ? `description="${projectDescription}"` : ""} && git init --quiet && git add . && git commit -m "initial commit from Create Catalyst App"`,
|
|
@@ -315,6 +316,21 @@ async function setupTailwind(projectName) {
|
|
|
315
316
|
}
|
|
316
317
|
}
|
|
317
318
|
|
|
319
|
+
async function setupMcp(projectName) {
|
|
320
|
+
try {
|
|
321
|
+
const packageJsonPath = path.join(process.cwd(), projectName, "package.json")
|
|
322
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"))
|
|
323
|
+
packageJson.dependencies = {
|
|
324
|
+
...(packageJson.dependencies || {}),
|
|
325
|
+
"@modelcontextprotocol/sdk": "^1.12.3",
|
|
326
|
+
}
|
|
327
|
+
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2))
|
|
328
|
+
} catch (error) {
|
|
329
|
+
console.log("Error while setting up MCP:", error)
|
|
330
|
+
process.exit(1)
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
318
334
|
function validateOptions(cmd) {
|
|
319
335
|
// Validate language option
|
|
320
336
|
if (cmd.lang && !["js", "ts"].includes(cmd.lang.toLowerCase())) {
|