create-catalyst-app-internal 0.1.0 → 0.1.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-catalyst-app-internal",
3
3
  "bin": "scripts/cli.cjs",
4
- "version": "0.1.0",
4
+ "version": "0.1.3",
5
5
  "description": "cli package to scaffold Catalyst application",
6
6
  "dependencies": {
7
7
  "commander": "^8.2.0",
package/scripts/cli.cjs CHANGED
@@ -43,6 +43,11 @@ const program = new Commander.Command()
43
43
  return
44
44
  }
45
45
 
46
+ if (process.argv.includes("mcp-setup")) {
47
+ execSync(` cd ${projectName} && node node_modules/catalyst-core-internal/mcp_v2/setup.js`, { stdio: "inherit" })
48
+ return
49
+ }
50
+
46
51
  console.log(cyan(`Using create-catalyst-app version ${bold(packageJson.version)}`))
47
52
 
48
53
  // Use options provided through commander or prompt the user
@@ -93,11 +98,8 @@ const program = new Commander.Command()
93
98
  const commonCodeDirectory = "package/templates/common"
94
99
  const selectedTemplateCode = `package/templates/${repositorySuffixes[stateManagement]}-${repositorySuffixes[language]}`
95
100
  const tailwindCodeDirectory = "package/templates/tailwind"
96
- const mcpCodeDirectory = "package/templates/mcp-root"
97
-
98
101
  const subDirectoriesToExtract = [commonCodeDirectory, selectedTemplateCode]
99
102
  if (tailWindSupport) subDirectoriesToExtract.push(tailwindCodeDirectory)
100
- if (mcpSupport) subDirectoriesToExtract.push(mcpCodeDirectory)
101
103
 
102
104
  const extractionDestination = `/${projectName}/`
103
105
  let tempDir
@@ -122,7 +124,7 @@ const program = new Commander.Command()
122
124
  }
123
125
 
124
126
  if (mcpSupport) {
125
- execSync(`cd ${projectName} && npm i @modelcontextprotocol/sdk`, { stdio: "inherit" })
127
+ execSync(` cd ${projectName} && node node_modules/catalyst-core-internal/mcp_v2/setup.js`, { stdio: "inherit" })
126
128
  }
127
129
 
128
130
  execSync(
@@ -203,9 +205,6 @@ const program = new Commander.Command()
203
205
  if (entry.path.startsWith(tailwindCodeDirectory)) {
204
206
  entry.path = entry.path.replace(tailwindCodeDirectory, extractionDestination)
205
207
  }
206
- if (entry.path.startsWith(mcpCodeDirectory)) {
207
- entry.path = entry.path.replace(mcpCodeDirectory, extractionDestination)
208
- }
209
208
  },
210
209
  })
211
210
  } catch (e) {
@@ -26,7 +26,7 @@
26
26
  "dependencies": {
27
27
  "@loadable/component": "^5.16.3",
28
28
  "@tata1mg/router": "0.0.1-beta.7",
29
- "catalyst-core-internal": "0.1.0"
29
+ "catalyst-core-internal": "0.1.2"
30
30
  },
31
31
  "devDependencies": {
32
32
  "eslint": "^8.26.0",
@@ -27,7 +27,7 @@
27
27
  "dependencies": {
28
28
  "@loadable/component": "^5.16.3",
29
29
  "@tata1mg/router": "0.0.1-beta.7",
30
- "catalyst-core-internal": "0.1.0"
30
+ "catalyst-core-internal": "0.1.2"
31
31
  },
32
32
  "devDependencies": {
33
33
  "eslint": "^8.26.0",
@@ -27,7 +27,7 @@
27
27
  "dependencies": {
28
28
  "@loadable/component": "^5.16.3",
29
29
  "@tata1mg/router": "0.0.1-beta.7",
30
- "catalyst-core-internal": "0.1.0",
30
+ "catalyst-core-internal": "0.1.2",
31
31
  "@reduxjs/toolkit": "1.9.3",
32
32
  "react-redux": "^8.1.3"
33
33
  },
@@ -28,7 +28,7 @@
28
28
  "dependencies": {
29
29
  "@loadable/component": "^5.16.3",
30
30
  "@tata1mg/router": "0.0.1-beta.7",
31
- "catalyst-core-internal": "0.1.0",
31
+ "catalyst-core-internal": "0.1.2",
32
32
  "@reduxjs/toolkit": "1.9.3",
33
33
  "react-redux": "^8.1.3"
34
34
  },
@@ -27,7 +27,7 @@
27
27
  "dependencies": {
28
28
  "@loadable/component": "^5.16.3",
29
29
  "@tata1mg/router": "0.0.1-beta.7",
30
- "catalyst-core-internal": "0.1.0",
30
+ "catalyst-core-internal": "0.1.2",
31
31
  "@reduxjs/toolkit": "1.9.3",
32
32
  "react-redux": "^8.1.3"
33
33
  },
@@ -28,7 +28,7 @@
28
28
  "dependencies": {
29
29
  "@loadable/component": "^5.16.3",
30
30
  "@tata1mg/router": "0.0.1-beta.7",
31
- "catalyst-core-internal": "0.1.0",
31
+ "catalyst-core-internal": "0.1.2",
32
32
  "@reduxjs/toolkit": "1.9.3",
33
33
  "react-redux": "^8.1.3"
34
34
  },
@@ -1,55 +0,0 @@
1
- const { McpServer } = require("@modelcontextprotocol/sdk/server/mcp.js")
2
- const { StdioServerTransport } = require("@modelcontextprotocol/sdk/server/stdio.js")
3
-
4
- const fetchContextFromGitHub = async () => {
5
- const url = "https://raw.githubusercontent.com/tata1mg/catalyst-core-internal/main/context.md"
6
- const response = await fetch(url)
7
-
8
- if (!response.ok) {
9
- throw new Error(`HTTP ${response.status}: Failed to fetch context from GitHub`)
10
- }
11
-
12
- return await response.text()
13
- }
14
-
15
- const server = new McpServer({
16
- name: "catalyst",
17
- version: "1.0.0",
18
- capabilities: {
19
- tools: {},
20
- },
21
- })
22
-
23
- server.tool("get_context", "Complete context of catalyst framework", {}, async () => {
24
- try {
25
- const context = await fetchContextFromGitHub()
26
- return {
27
- content: [
28
- {
29
- type: "text",
30
- text: context,
31
- },
32
- ],
33
- }
34
- } catch (error) {
35
- return {
36
- content: [
37
- {
38
- type: "text",
39
- text: `Error fetching context: ${error.message}`,
40
- },
41
- ],
42
- }
43
- }
44
- })
45
-
46
- const init = async () => {
47
- try {
48
- const transport = new StdioServerTransport()
49
- await server.connect(transport)
50
- } catch (error) {
51
- console.error("Error starting MCP server:", error)
52
- }
53
- }
54
-
55
- init()