@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/cli",
3
- "version": "4.0.828",
3
+ "version": "4.0.830",
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.622",
44
- "@mintlify/link-rot": "3.0.768",
43
+ "@mintlify/common": "1.0.623",
44
+ "@mintlify/link-rot": "3.0.770",
45
45
  "@mintlify/models": "0.0.244",
46
- "@mintlify/prebuild": "1.0.752",
47
- "@mintlify/previewing": "4.0.803",
46
+ "@mintlify/prebuild": "1.0.754",
47
+ "@mintlify/previewing": "4.0.805",
48
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": "6149a2439791d19427c303725ebe1cb12010c9e4"
84
+ "gitHead": "de987842b191275a4abf5ff6ef0e1ba3a50825a3"
85
85
  }
package/src/cli.tsx CHANGED
@@ -68,6 +68,11 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
68
68
  description: 'Mock user groups for local development and testing',
69
69
  example: '--groups admin user',
70
70
  })
71
+ .option('disable-openapi', {
72
+ type: 'boolean',
73
+ default: false,
74
+ description: 'Disable OpenAPI file generation',
75
+ })
71
76
  .usage('usage: mintlify dev [options]')
72
77
  .example('mintlify dev', 'run with default settings (opens in browser)')
73
78
  .example('mintlify dev --no-open', 'run without opening in browser'),
@@ -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 { data, content } = matter(await fs.promises.readFile(mdxCandidatePath, 'utf-8'));
115
- const frontmatter = data as Record<string, string>;
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
  }