@mintlify/cli 4.0.916 → 4.0.918
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/bin/index.js +4 -2
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/index.ts +14 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.918",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@inquirer/prompts": "7.9.0",
|
|
43
|
-
"@mintlify/common": "1.0.
|
|
44
|
-
"@mintlify/link-rot": "3.0.
|
|
45
|
-
"@mintlify/models": "0.0.
|
|
46
|
-
"@mintlify/prebuild": "1.0.
|
|
47
|
-
"@mintlify/previewing": "4.0.
|
|
48
|
-
"@mintlify/validation": "0.1.
|
|
43
|
+
"@mintlify/common": "1.0.697",
|
|
44
|
+
"@mintlify/link-rot": "3.0.856",
|
|
45
|
+
"@mintlify/models": "0.0.262",
|
|
46
|
+
"@mintlify/prebuild": "1.0.833",
|
|
47
|
+
"@mintlify/previewing": "4.0.889",
|
|
48
|
+
"@mintlify/validation": "0.1.576",
|
|
49
49
|
"adm-zip": "0.5.16",
|
|
50
50
|
"chalk": "5.2.0",
|
|
51
51
|
"color": "4.2.3",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"vitest": "2.0.4",
|
|
82
82
|
"vitest-mock-process": "1.0.4"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "e10b43ec02210804f233283b777c637da13ec5fd"
|
|
85
85
|
}
|
package/src/index.ts
CHANGED
|
@@ -66,22 +66,21 @@ process.on('unhandledRejection', async () => {
|
|
|
66
66
|
exitProcess(1);
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
+
// Arguments are passed as array elements to spawn() without shell: true,
|
|
70
|
+
// so shell metacharacters are not interpreted and command injection is prevented.
|
|
71
|
+
const userArgs = process.argv.slice(2);
|
|
72
|
+
|
|
69
73
|
try {
|
|
70
|
-
cli = spawn(
|
|
71
|
-
'
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
shell: process.platform === 'win32',
|
|
81
|
-
windowsHide: process.platform === 'win32',
|
|
82
|
-
detached: false,
|
|
83
|
-
}
|
|
84
|
-
);
|
|
74
|
+
cli = spawn('node', ['--no-deprecation', path.join(__dirname, '../bin/start.js'), ...userArgs], {
|
|
75
|
+
stdio: 'inherit',
|
|
76
|
+
env: {
|
|
77
|
+
...process.env,
|
|
78
|
+
MINTLIFY_PACKAGE_NAME: packageName,
|
|
79
|
+
CLI_TEST_MODE: process.env.CLI_TEST_MODE ?? 'false',
|
|
80
|
+
},
|
|
81
|
+
windowsHide: process.platform === 'win32',
|
|
82
|
+
detached: false,
|
|
83
|
+
});
|
|
85
84
|
|
|
86
85
|
cli.on('error', async (error) => {
|
|
87
86
|
console.error(`Failed to start ${packageName}: ${error.message}`);
|