@mintlify/cli 4.0.827 → 4.0.829
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.829",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -40,18 +40,18 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@inquirer/prompts": "7.9.0",
|
|
43
|
-
"@mintlify/common": "1.0.
|
|
44
|
-
"@mintlify/link-rot": "3.0.
|
|
43
|
+
"@mintlify/common": "1.0.623",
|
|
44
|
+
"@mintlify/link-rot": "3.0.769",
|
|
45
45
|
"@mintlify/models": "0.0.244",
|
|
46
|
-
"@mintlify/prebuild": "1.0.
|
|
47
|
-
"@mintlify/previewing": "4.0.
|
|
48
|
-
"@mintlify/validation": "0.1.
|
|
46
|
+
"@mintlify/prebuild": "1.0.753",
|
|
47
|
+
"@mintlify/previewing": "4.0.804",
|
|
48
|
+
"@mintlify/validation": "0.1.531",
|
|
49
49
|
"adm-zip": "0.5.16",
|
|
50
50
|
"chalk": "5.2.0",
|
|
51
51
|
"color": "4.2.3",
|
|
52
52
|
"detect-port": "1.5.1",
|
|
53
|
+
"front-matter": "4.0.2",
|
|
53
54
|
"fs-extra": "11.2.0",
|
|
54
|
-
"gray-matter": "4.0.3",
|
|
55
55
|
"ink": "6.3.0",
|
|
56
56
|
"inquirer": "12.3.0",
|
|
57
57
|
"js-yaml": "4.1.0",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"vitest": "2.0.4",
|
|
82
82
|
"vitest-mock-process": "1.0.4"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "4aaff83c8c86084371c5b1940b5ca38aeff3a99c"
|
|
85
85
|
}
|
package/src/migrateMdx.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { potentiallyParseOpenApiString } from '@mintlify/common';
|
|
1
|
+
import { potentiallyParseOpenApiString, parseFrontmatter } from '@mintlify/common';
|
|
2
2
|
import { getConfigObj, getConfigPath } from '@mintlify/prebuild';
|
|
3
3
|
import { addLog, ErrorLog, SuccessLog } from '@mintlify/previewing';
|
|
4
4
|
import {
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
} from '@mintlify/validation';
|
|
12
12
|
import fs from 'fs';
|
|
13
13
|
import { outputFile } from 'fs-extra';
|
|
14
|
-
import matter from 'gray-matter';
|
|
15
14
|
import inquirer from 'inquirer';
|
|
16
15
|
import yaml from 'js-yaml';
|
|
17
16
|
import { OpenAPI, OpenAPIV3 } from 'openapi-types';
|
|
@@ -111,8 +110,11 @@ async function processNav(nav: NavigationConfig): Promise<NavigationConfig> {
|
|
|
111
110
|
if (!fs.existsSync(mdxCandidatePath)) {
|
|
112
111
|
return page;
|
|
113
112
|
}
|
|
114
|
-
const
|
|
115
|
-
|
|
113
|
+
const fmParsed = parseFrontmatter<Record<string, string>>(
|
|
114
|
+
await fs.promises.readFile(mdxCandidatePath, 'utf-8')
|
|
115
|
+
);
|
|
116
|
+
const frontmatter = fmParsed.attributes;
|
|
117
|
+
const content = fmParsed.body;
|
|
116
118
|
if (!frontmatter.openapi) {
|
|
117
119
|
return page;
|
|
118
120
|
}
|