@mintlify/cli 4.0.883 → 4.0.885

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 CHANGED
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  import { validate, getOpenApiDocumentFromUrl, isAllowedLocalSchemaUrl } from '@mintlify/common';
12
12
  import { getBrokenInternalLinks, renameFilesAndUpdateLinksInContent } from '@mintlify/link-rot';
13
- import { addLog, dev, ErrorLog, SpinnerLog, SuccessLog, Logs, clearLogs, BrokenLinksLog, WarningLog, } from '@mintlify/previewing';
13
+ import { addLog, dev, validateBuild, ErrorLog, SpinnerLog, SuccessLog, Logs, clearLogs, BrokenLinksLog, WarningLog, } from '@mintlify/previewing';
14
14
  import { render, Text } from 'ink';
15
15
  import path from 'path';
16
16
  import yargs from 'yargs';
@@ -88,6 +88,33 @@ export const cli = ({ packageName = 'mint' }) => {
88
88
  addLog(_jsx(ErrorLog, { message: "no available port found" }));
89
89
  yield terminate(1);
90
90
  }
91
+ }))
92
+ .command('validate', 'validate the documentation build (strict mode, exits on warnings or errors)', (yargs) => yargs
93
+ .option('local-schema', {
94
+ type: 'boolean',
95
+ default: false,
96
+ hidden: true,
97
+ description: 'use a locally hosted schema file',
98
+ })
99
+ .option('client-version', {
100
+ type: 'string',
101
+ hidden: true,
102
+ description: 'the version of the client to use for cli testing',
103
+ })
104
+ .option('groups', {
105
+ type: 'array',
106
+ description: 'Mock user groups for validation',
107
+ })
108
+ .option('disable-openapi', {
109
+ type: 'boolean',
110
+ default: false,
111
+ description: 'Disable OpenAPI file generation',
112
+ })
113
+ .usage('usage: mintlify validate [options]')
114
+ .example('mintlify validate', 'validate the build'), (argv) => __awaiter(void 0, void 0, void 0, function* () {
115
+ const { cli: cliVersion } = getVersions();
116
+ yield validateBuild(Object.assign(Object.assign({}, argv), { packageName,
117
+ cliVersion }));
91
118
  }))
92
119
  .command('openapi-check <filename>', 'check if an OpenAPI spec is valid', (yargs) => yargs
93
120
  .positional('filename', {