create-catalyst-app-internal 0.1.3 → 0.1.5
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 +31 -2
- package/templates/common/server/document.js +1 -1
- package/templates/none-js/client/index.js +1 -1
- package/templates/none-js/package.json +1 -1
- package/templates/none-ts/client/index.js +1 -1
- package/templates/none-ts/package.json +1 -1
- package/templates/redux-js/client/index.js +1 -1
- package/templates/redux-js/package.json +1 -1
- package/templates/redux-ts/client/index.js +1 -1
- package/templates/redux-ts/package.json +1 -1
- package/templates/rtk-js/client/index.js +1 -1
- package/templates/rtk-js/package.json +1 -1
- package/templates/rtk-ts/client/index.js +1 -1
- package/templates/rtk-ts/package.json +1 -1
package/package.json
CHANGED
package/scripts/cli.cjs
CHANGED
|
@@ -44,7 +44,30 @@ const program = new Commander.Command()
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
if (process.argv.includes("mcp-setup")) {
|
|
47
|
-
|
|
47
|
+
const mcpDir = path.join(process.cwd(), "node_modules/catalyst-core/mcp_v2")
|
|
48
|
+
const setupPath = path.join(mcpDir, "setup.js")
|
|
49
|
+
|
|
50
|
+
if (!fs.existsSync(setupPath)) {
|
|
51
|
+
console.log(cyan("mcp_v2 not found in catalyst-core. Downloading from GitHub..."))
|
|
52
|
+
const catalystCoreDir = path.join(process.cwd(), "node_modules/catalyst-core")
|
|
53
|
+
const tarballUrl = "https://github.com/tata1mg/catalyst-core/archive/refs/heads/main.tar.gz"
|
|
54
|
+
const tarballPath = path.join(catalystCoreDir, "_mcp_v2_tarball.tar.gz")
|
|
55
|
+
execSync(`curl -fsSL "${tarballUrl}" -o "${tarballPath}"`, { stdio: "inherit" })
|
|
56
|
+
fs.mkdirSync(mcpDir, { recursive: true })
|
|
57
|
+
execSync(
|
|
58
|
+
`tar -xzf "${tarballPath}" -C "${mcpDir}" --strip-components=2 "catalyst-core-main/mcp_v2"`,
|
|
59
|
+
{ stdio: "inherit" }
|
|
60
|
+
)
|
|
61
|
+
fs.unlinkSync(tarballPath)
|
|
62
|
+
console.log(cyan("mcp_v2 downloaded successfully."))
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const mcpNodeModules = path.join(mcpDir, "node_modules")
|
|
66
|
+
if (!fs.existsSync(mcpNodeModules)) {
|
|
67
|
+
console.log(cyan("Installing mcp_v2 dependencies..."))
|
|
68
|
+
execSync("npm install", { cwd: mcpDir, stdio: "inherit" })
|
|
69
|
+
}
|
|
70
|
+
execSync(`node ${setupPath}`, { stdio: "inherit" })
|
|
48
71
|
return
|
|
49
72
|
}
|
|
50
73
|
|
|
@@ -124,7 +147,13 @@ const program = new Commander.Command()
|
|
|
124
147
|
}
|
|
125
148
|
|
|
126
149
|
if (mcpSupport) {
|
|
127
|
-
|
|
150
|
+
const newMcpDir = path.join(process.cwd(), projectName, "node_modules/catalyst-core/mcp_v2")
|
|
151
|
+
const newMcpNodeModules = path.join(newMcpDir, "node_modules")
|
|
152
|
+
if (!fs.existsSync(newMcpNodeModules)) {
|
|
153
|
+
console.log(cyan("Installing mcp_v2 dependencies..."))
|
|
154
|
+
execSync("npm install", { cwd: newMcpDir, stdio: "inherit" })
|
|
155
|
+
}
|
|
156
|
+
execSync(`node ${path.join(newMcpDir, "setup.js")}`, { stdio: "inherit" })
|
|
128
157
|
}
|
|
129
158
|
|
|
130
159
|
execSync(
|
|
@@ -3,7 +3,7 @@ import "./styles"
|
|
|
3
3
|
import { hydrateRoot } from "react-dom/client"
|
|
4
4
|
import { loadableReady } from "@loadable/component"
|
|
5
5
|
import { RouterProvider } from "@tata1mg/router"
|
|
6
|
-
import clientRouter from "catalyst-core
|
|
6
|
+
import clientRouter from "catalyst-core/router/ClientRouter"
|
|
7
7
|
|
|
8
8
|
window.addEventListener("load", () => {
|
|
9
9
|
loadableReady(() => {
|
|
@@ -3,7 +3,7 @@ import "./styles"
|
|
|
3
3
|
import { hydrateRoot } from "react-dom/client"
|
|
4
4
|
import { loadableReady } from "@loadable/component"
|
|
5
5
|
import { RouterProvider } from "@tata1mg/router"
|
|
6
|
-
import clientRouter from "catalyst-core
|
|
6
|
+
import clientRouter from "catalyst-core/router/ClientRouter"
|
|
7
7
|
|
|
8
8
|
window.addEventListener("load", () => {
|
|
9
9
|
loadableReady(() => {
|
|
@@ -4,7 +4,7 @@ import { hydrateRoot } from "react-dom/client"
|
|
|
4
4
|
import { loadableReady } from "@loadable/component"
|
|
5
5
|
import { Provider } from "react-redux"
|
|
6
6
|
import { RouterProvider } from "@tata1mg/router"
|
|
7
|
-
import clientRouter from "catalyst-core
|
|
7
|
+
import clientRouter from "catalyst-core/router/ClientRouter"
|
|
8
8
|
import configureStore from "@store"
|
|
9
9
|
|
|
10
10
|
window.addEventListener("load", () => {
|
|
@@ -4,7 +4,7 @@ import { hydrateRoot } from "react-dom/client"
|
|
|
4
4
|
import { loadableReady } from "@loadable/component"
|
|
5
5
|
import { Provider } from "react-redux"
|
|
6
6
|
import { RouterProvider } from "@tata1mg/router"
|
|
7
|
-
import clientRouter from "catalyst-core
|
|
7
|
+
import clientRouter from "catalyst-core/router/ClientRouter"
|
|
8
8
|
import configureStore from "@store"
|
|
9
9
|
|
|
10
10
|
window.addEventListener("load", () => {
|
|
@@ -4,7 +4,7 @@ import { hydrateRoot } from "react-dom/client"
|
|
|
4
4
|
import { loadableReady } from "@loadable/component"
|
|
5
5
|
import { Provider } from "react-redux"
|
|
6
6
|
import { RouterProvider } from "@tata1mg/router"
|
|
7
|
-
import clientRouter from "catalyst-core
|
|
7
|
+
import clientRouter from "catalyst-core/router/ClientRouter"
|
|
8
8
|
import configureStore from "@store"
|
|
9
9
|
|
|
10
10
|
window.addEventListener("load", () => {
|
|
@@ -4,7 +4,7 @@ import { hydrateRoot } from "react-dom/client"
|
|
|
4
4
|
import { loadableReady } from "@loadable/component"
|
|
5
5
|
import { Provider } from "react-redux"
|
|
6
6
|
import { RouterProvider } from "@tata1mg/router"
|
|
7
|
-
import clientRouter from "catalyst-core
|
|
7
|
+
import clientRouter from "catalyst-core/router/ClientRouter"
|
|
8
8
|
import configureStore from "@store"
|
|
9
9
|
|
|
10
10
|
window.addEventListener("load", () => {
|