create-catalyst-app 1.0.2-canary.2 → 1.0.2
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 +2 -2
- package/scripts/cli.cjs +8 -3
- package/templates/none-js/package.json +1 -1
- package/templates/none-ts/package.json +1 -1
- package/templates/redux-js/package.json +1 -1
- package/templates/redux-ts/package.json +1 -1
- package/templates/rtk-js/package.json +1 -1
- package/templates/rtk-ts/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-catalyst-app",
|
|
3
3
|
"bin": "scripts/cli.cjs",
|
|
4
|
-
"version": "1.0.2
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.12.0"
|
|
7
7
|
},
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@clack/prompts": "^1.7.0",
|
|
22
22
|
"ansis": "^4.3.1",
|
|
23
23
|
"commander": "^8.2.0",
|
|
24
|
-
"jscodeshift": "^
|
|
24
|
+
"jscodeshift": "^17.4.0",
|
|
25
25
|
"prompts": "^2.4.0",
|
|
26
26
|
"tar": "^7.5.22",
|
|
27
27
|
"validate-npm-package-name": "^5.0.0"
|
package/scripts/cli.cjs
CHANGED
|
@@ -109,6 +109,7 @@ const program = new Commander.Command()
|
|
|
109
109
|
)
|
|
110
110
|
process.exit(1)
|
|
111
111
|
}
|
|
112
|
+
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal - projectName is checked by validate-npm-package-name (no separators or ..) before use.
|
|
112
113
|
let projectPath = path.join(process.cwd(), projectName)
|
|
113
114
|
if (fs.existsSync(projectPath)) {
|
|
114
115
|
cancelWithError(
|
|
@@ -184,7 +185,7 @@ const program = new Commander.Command()
|
|
|
184
185
|
if (mcpSupport) {
|
|
185
186
|
const newMcpDir = path.join(
|
|
186
187
|
process.cwd(),
|
|
187
|
-
projectName,
|
|
188
|
+
projectName, // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal - projectName is checked by validate-npm-package-name (no separators or ..) before use.
|
|
188
189
|
"node_modules",
|
|
189
190
|
"catalyst-core",
|
|
190
191
|
"mcp_v2"
|
|
@@ -192,10 +193,13 @@ const program = new Commander.Command()
|
|
|
192
193
|
// Same treatment as the install: the setup script's
|
|
193
194
|
// own transcript (npm warnings, audit notices, DB
|
|
194
195
|
// paths) only matters when it fails.
|
|
195
|
-
const transcript = runStep(
|
|
196
|
-
|
|
196
|
+
const transcript = runStep(
|
|
197
|
+
"Setting up the MCP server",
|
|
198
|
+
() =>
|
|
199
|
+
runMcpSetup(newMcpDir, path.join(process.cwd(), projectName), { quiet: true }) // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal - projectName is checked by validate-npm-package-name (no separators or ..) before use.
|
|
197
200
|
)
|
|
198
201
|
for (const warning of mcpWarnings(transcript)) clack.log.warn(warning)
|
|
202
|
+
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal - newMcpDir is built from the validated projectName.
|
|
199
203
|
mcpEntry = path.join(newMcpDir, "mcp.js")
|
|
200
204
|
}
|
|
201
205
|
|
|
@@ -480,6 +484,7 @@ async function promptProjectName() {
|
|
|
480
484
|
if (!result.validForNewPackages) {
|
|
481
485
|
return (result.errors || result.warnings || ["Invalid package name"])[0]
|
|
482
486
|
}
|
|
487
|
+
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal - projectName is checked by validate-npm-package-name (no separators or ..) before use.
|
|
483
488
|
if (fs.existsSync(path.join(process.cwd(), name))) {
|
|
484
489
|
return `${name} already exists in this directory`
|
|
485
490
|
}
|