@mintlify/cli 4.0.1045 → 4.0.1047
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1047",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@inquirer/prompts": "7.9.0",
|
|
48
|
-
"@mintlify/common": "1.0.
|
|
49
|
-
"@mintlify/link-rot": "3.0.
|
|
48
|
+
"@mintlify/common": "1.0.811",
|
|
49
|
+
"@mintlify/link-rot": "3.0.981",
|
|
50
50
|
"@mintlify/models": "0.0.286",
|
|
51
|
-
"@mintlify/prebuild": "1.0.
|
|
52
|
-
"@mintlify/previewing": "4.0.
|
|
53
|
-
"@mintlify/scraping": "4.0.
|
|
54
|
-
"@mintlify/validation": "0.1.
|
|
51
|
+
"@mintlify/prebuild": "1.0.952",
|
|
52
|
+
"@mintlify/previewing": "4.0.1010",
|
|
53
|
+
"@mintlify/scraping": "4.0.674",
|
|
54
|
+
"@mintlify/validation": "0.1.640",
|
|
55
55
|
"adm-zip": "0.5.16",
|
|
56
56
|
"chalk": "5.2.0",
|
|
57
57
|
"color": "4.2.3",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"vitest": "2.0.4",
|
|
88
88
|
"vitest-mock-process": "1.0.4"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "dfaa9310aee3e5e4115be0a0e53f8b4b0c48e433"
|
|
91
91
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getBackgroundColors } from '@mintlify/common';
|
|
2
2
|
import { getConfigObj, getConfigPath } from '@mintlify/prebuild';
|
|
3
3
|
import { addLog, ErrorLog, WarningLog } from '@mintlify/previewing';
|
|
4
|
+
import type { DocsConfig } from '@mintlify/validation';
|
|
4
5
|
import { Text } from 'ink';
|
|
5
6
|
|
|
6
7
|
import { checkDocsColors, type AccessibilityCheckResult } from './accessibility.js';
|
|
@@ -25,9 +26,9 @@ export const accessibilityCheck = async (): Promise<TerminateCode> => {
|
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
const configType = docsConfigPath ? 'docs' : 'mint';
|
|
28
|
-
const config = await getConfigObj(CMD_EXEC_PATH, configType);
|
|
29
|
+
const config = (await getConfigObj(CMD_EXEC_PATH, configType)) as DocsConfig | null;
|
|
29
30
|
|
|
30
|
-
if (!config
|
|
31
|
+
if (!config?.colors) {
|
|
31
32
|
addLog(<WarningLog message="No colors section found in configuration file" />);
|
|
32
33
|
return 0;
|
|
33
34
|
}
|
package/src/migrateMdx.tsx
CHANGED
|
@@ -66,6 +66,8 @@ export async function migrateMdx() {
|
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
const rawConfig = JSON.parse(await fs.promises.readFile(docsConfigPath, 'utf-8')) as DocsConfig;
|
|
70
|
+
|
|
69
71
|
const docsConfigObj = await getConfigObj(CMD_EXEC_PATH, 'docs');
|
|
70
72
|
|
|
71
73
|
const validationResults = await validateDocsConfig(docsConfigObj as DocsConfig);
|
|
@@ -75,14 +77,13 @@ export async function migrateMdx() {
|
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
const validatedDocsConfig = validationResults.data as DocsConfig;
|
|
78
|
-
const docsConfig = docsConfigObj as DocsConfig;
|
|
79
80
|
|
|
80
81
|
await buildCandidateSpecCacheIfNeeded(CMD_EXEC_PATH);
|
|
81
82
|
|
|
82
83
|
const updatedNavigation = await processNav(validatedDocsConfig.navigation);
|
|
83
84
|
|
|
84
|
-
|
|
85
|
-
await outputFile(docsConfigPath, JSON.stringify(
|
|
85
|
+
rawConfig.navigation = updatedNavigation;
|
|
86
|
+
await outputFile(docsConfigPath, JSON.stringify(rawConfig, null, 2));
|
|
86
87
|
addLog(<SuccessLog message="docs.json updated" />);
|
|
87
88
|
|
|
88
89
|
for (const specPath in specCache) {
|