@mintlify/cli 4.0.828 → 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/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 { data, content } = matter(yield fs.promises.readFile(mdxCandidatePath, 'utf-8'));
106
- const frontmatter = data;
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
  }