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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-catalyst-app-internal",
3
3
  "bin": "scripts/cli.cjs",
4
- "version": "0.1.3",
4
+ "version": "0.1.5",
5
5
  "description": "cli package to scaffold Catalyst application",
6
6
  "dependencies": {
7
7
  "commander": "^8.2.0",
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
- execSync(` cd ${projectName} && node node_modules/catalyst-core-internal/mcp_v2/setup.js`, { stdio: "inherit" })
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
- execSync(` cd ${projectName} && node node_modules/catalyst-core-internal/mcp_v2/setup.js`, { stdio: "inherit" })
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(
@@ -1,5 +1,5 @@
1
1
  import React from "react"
2
- import { Head, Body } from "catalyst-core-internal"
2
+ import { Head, Body } from "catalyst-core"
3
3
 
4
4
  function Document(props) {
5
5
  return (
@@ -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-internal/router/ClientRouter"
6
+ import clientRouter from "catalyst-core/router/ClientRouter"
7
7
 
8
8
  window.addEventListener("load", () => {
9
9
  loadableReady(() => {
@@ -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.2"
29
+ "catalyst-core": "0.1.0-canary.7"
30
30
  },
31
31
  "devDependencies": {
32
32
  "eslint": "^8.26.0",
@@ -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-internal/router/ClientRouter"
6
+ import clientRouter from "catalyst-core/router/ClientRouter"
7
7
 
8
8
  window.addEventListener("load", () => {
9
9
  loadableReady(() => {
@@ -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.2"
30
+ "catalyst-core": "0.1.0-canary.7"
31
31
  },
32
32
  "devDependencies": {
33
33
  "eslint": "^8.26.0",
@@ -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-internal/router/ClientRouter"
7
+ import clientRouter from "catalyst-core/router/ClientRouter"
8
8
  import configureStore from "@store"
9
9
 
10
10
  window.addEventListener("load", () => {
@@ -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.2",
30
+ "catalyst-core": "0.1.0-canary.7",
31
31
  "@reduxjs/toolkit": "1.9.3",
32
32
  "react-redux": "^8.1.3"
33
33
  },
@@ -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-internal/router/ClientRouter"
7
+ import clientRouter from "catalyst-core/router/ClientRouter"
8
8
  import configureStore from "@store"
9
9
 
10
10
  window.addEventListener("load", () => {
@@ -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.2",
31
+ "catalyst-core": "0.1.0-canary.7",
32
32
  "@reduxjs/toolkit": "1.9.3",
33
33
  "react-redux": "^8.1.3"
34
34
  },
@@ -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-internal/router/ClientRouter"
7
+ import clientRouter from "catalyst-core/router/ClientRouter"
8
8
  import configureStore from "@store"
9
9
 
10
10
  window.addEventListener("load", () => {
@@ -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.2",
30
+ "catalyst-core": "0.1.0-canary.7",
31
31
  "@reduxjs/toolkit": "1.9.3",
32
32
  "react-redux": "^8.1.3"
33
33
  },
@@ -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-internal/router/ClientRouter"
7
+ import clientRouter from "catalyst-core/router/ClientRouter"
8
8
  import configureStore from "@store"
9
9
 
10
10
  window.addEventListener("load", () => {
@@ -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.2",
31
+ "catalyst-core": "0.1.0-canary.7",
32
32
  "@reduxjs/toolkit": "1.9.3",
33
33
  "react-redux": "^8.1.3"
34
34
  },