@mintlify/cli 4.0.1740 → 4.0.1742
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/__test__/validateCommand.test.ts +126 -27
- package/__test__/validateEngine.test.ts +186 -2
- package/__test__/validateRules.test.ts +64 -49
- package/bin/cli.js +13 -1
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/bin/validate/command.js +48 -10
- package/bin/validate/engine.js +75 -14
- package/bin/validate/files.js +1 -1
- package/bin/validate/output.js +13 -2
- package/bin/validate/report.js +3 -8
- package/package.json +4 -4
- package/src/cli.tsx +20 -1
- package/src/validate/command.tsx +48 -9
- package/src/validate/engine.ts +101 -13
- package/src/validate/files.ts +1 -1
- package/src/validate/output.tsx +18 -0
- package/src/validate/report.ts +9 -2
- package/src/validate/types.ts +10 -0
package/bin/cli.js
CHANGED
|
@@ -328,6 +328,17 @@ export const cli = ({ packageName = 'mint' }) => {
|
|
|
328
328
|
array: true,
|
|
329
329
|
coerce: splitList,
|
|
330
330
|
description: 'Turn off rules or groups (comma-separated), or all; parse errors are still reported',
|
|
331
|
+
})
|
|
332
|
+
.option('fix', {
|
|
333
|
+
type: 'boolean',
|
|
334
|
+
default: false,
|
|
335
|
+
description: 'Apply the fixes and check again',
|
|
336
|
+
})
|
|
337
|
+
.option('format', {
|
|
338
|
+
type: 'string',
|
|
339
|
+
choices: ['text', 'json'],
|
|
340
|
+
default: 'text',
|
|
341
|
+
description: 'Output format; json prints one report ({ passed, summary, diagnostics, build }) and nothing else on stdout, and errors to stderr',
|
|
331
342
|
})
|
|
332
343
|
.usage('usage: mint validate [options]')
|
|
333
344
|
.epilogue([
|
|
@@ -336,7 +347,8 @@ export const cli = ({ packageName = 'mint' }) => {
|
|
|
336
347
|
` parse-error — ${PARSE_ERROR.description} (always runs)`,
|
|
337
348
|
].join('\n'))
|
|
338
349
|
.example('mint validate', 'run every check and the build')
|
|
339
|
-
.example('mint validate --
|
|
350
|
+
.example('mint validate --no-build --format json', 'fast offline check for scripts and agents')
|
|
351
|
+
.example('mint validate --files "guides/**/*.mdx" --fix', 'check some pages and apply fixes')
|
|
340
352
|
.example('mint validate --disable all --enable content', 'run the content rules only; missing-file and import-error still run the build')
|
|
341
353
|
.strict(), (argv) => validateHandler(argv, packageName))
|
|
342
354
|
.command('export', 'Export a static site for air-gapped deployment', (yargs) => yargs
|