@mintlify/cli 4.0.828 → 4.0.830
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/cli.js +5 -0
- package/bin/migrateMdx.js +4 -4
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/cli.tsx +5 -0
- package/src/migrateMdx.tsx +6 -4
package/bin/cli.js
CHANGED
|
@@ -48,6 +48,11 @@ export const cli = ({ packageName = 'mint' }) => {
|
|
|
48
48
|
type: 'array',
|
|
49
49
|
description: 'Mock user groups for local development and testing',
|
|
50
50
|
example: '--groups admin user',
|
|
51
|
+
})
|
|
52
|
+
.option('disable-openapi', {
|
|
53
|
+
type: 'boolean',
|
|
54
|
+
default: false,
|
|
55
|
+
description: 'Disable OpenAPI file generation',
|
|
51
56
|
})
|
|
52
57
|
.usage('usage: mintlify dev [options]')
|
|
53
58
|
.example('mintlify dev', 'run with default settings (opens in browser)')
|
package/bin/migrateMdx.js
CHANGED
|
@@ -8,13 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { potentiallyParseOpenApiString } from '@mintlify/common';
|
|
11
|
+
import { potentiallyParseOpenApiString, parseFrontmatter } from '@mintlify/common';
|
|
12
12
|
import { getConfigObj, getConfigPath } from '@mintlify/prebuild';
|
|
13
13
|
import { addLog, ErrorLog, SuccessLog } from '@mintlify/previewing';
|
|
14
14
|
import { divisions, validateDocsConfig, } from '@mintlify/validation';
|
|
15
15
|
import fs from 'fs';
|
|
16
16
|
import { outputFile } from 'fs-extra';
|
|
17
|
-
import matter from 'gray-matter';
|
|
18
17
|
import inquirer from 'inquirer';
|
|
19
18
|
import yaml from 'js-yaml';
|
|
20
19
|
import path from 'path';
|
|
@@ -102,8 +101,9 @@ function processNav(nav) {
|
|
|
102
101
|
if (!fs.existsSync(mdxCandidatePath)) {
|
|
103
102
|
return page;
|
|
104
103
|
}
|
|
105
|
-
const
|
|
106
|
-
const frontmatter =
|
|
104
|
+
const fmParsed = parseFrontmatter(yield fs.promises.readFile(mdxCandidatePath, 'utf-8'));
|
|
105
|
+
const frontmatter = fmParsed.attributes;
|
|
106
|
+
const content = fmParsed.body;
|
|
107
107
|
if (!frontmatter.openapi) {
|
|
108
108
|
return page;
|
|
109
109
|
}
|