@mintlify/previewing 4.0.803 → 4.0.805
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.
|
@@ -14,6 +14,7 @@ const dev = async (argv) => {
|
|
|
14
14
|
const packageName = argv.packageName;
|
|
15
15
|
const groups = argv.groups;
|
|
16
16
|
const cliVersion = argv.cliVersion;
|
|
17
|
+
const disableOpenApi = argv.disableOpenapi;
|
|
17
18
|
await fse.ensureDir(DOT_MINTLIFY);
|
|
18
19
|
const versionString = (await pathExists(VERSION_PATH))
|
|
19
20
|
? fse.readFileSync(VERSION_PATH, 'utf8')
|
|
@@ -37,7 +38,7 @@ const dev = async (argv) => {
|
|
|
37
38
|
fse.emptyDirSync(NEXT_PROPS_PATH);
|
|
38
39
|
process.chdir(CLIENT_PATH);
|
|
39
40
|
try {
|
|
40
|
-
await prebuild(CMD_EXEC_PATH, { localSchema, groups });
|
|
41
|
+
await prebuild(CMD_EXEC_PATH, { localSchema, groups, disableOpenApi });
|
|
41
42
|
}
|
|
42
43
|
catch (err) {
|
|
43
44
|
clearLogs();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { parseFrontmatter } from '@mintlify/common';
|
|
1
2
|
import crypto from 'crypto';
|
|
2
3
|
import { promises as _promises } from 'fs';
|
|
3
4
|
import fse from 'fs-extra';
|
|
4
|
-
import matter from 'gray-matter';
|
|
5
5
|
const { stat } = _promises;
|
|
6
6
|
export const getFileExtension = (filename) => {
|
|
7
7
|
return filename.substring(filename.lastIndexOf('.') + 1, filename.length) || filename;
|
|
@@ -20,7 +20,7 @@ export const readJsonFile = async (path) => {
|
|
|
20
20
|
};
|
|
21
21
|
export const shouldRegenerateNavForPage = async (filename, contentStr, frontmatterHashes) => {
|
|
22
22
|
try {
|
|
23
|
-
const {
|
|
23
|
+
const { attributes: currentFrontmatter } = parseFrontmatter(contentStr);
|
|
24
24
|
const prevFrontmatterHash = frontmatterHashes.get(filename);
|
|
25
25
|
const currentFrontmatterHash = crypto
|
|
26
26
|
.createHash('md5')
|