@mintlify/cli 4.0.838 → 4.0.840
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 +28 -3
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/cli.tsx +33 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.840",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@inquirer/prompts": "7.9.0",
|
|
43
|
-
"@mintlify/common": "1.0.
|
|
44
|
-
"@mintlify/link-rot": "3.0.
|
|
43
|
+
"@mintlify/common": "1.0.632",
|
|
44
|
+
"@mintlify/link-rot": "3.0.780",
|
|
45
45
|
"@mintlify/models": "0.0.246",
|
|
46
|
-
"@mintlify/prebuild": "1.0.
|
|
47
|
-
"@mintlify/previewing": "4.0.
|
|
48
|
-
"@mintlify/validation": "0.1.
|
|
46
|
+
"@mintlify/prebuild": "1.0.763",
|
|
47
|
+
"@mintlify/previewing": "4.0.815",
|
|
48
|
+
"@mintlify/validation": "0.1.538",
|
|
49
49
|
"adm-zip": "0.5.16",
|
|
50
50
|
"chalk": "5.2.0",
|
|
51
51
|
"color": "4.2.3",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"vitest": "2.0.4",
|
|
82
82
|
"vitest-mock-process": "1.0.4"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "aa8823755d0964e179ca6fcd914ff7e56594862b"
|
|
85
85
|
}
|
package/src/cli.tsx
CHANGED
|
@@ -271,10 +271,39 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
|
|
|
271
271
|
.command(
|
|
272
272
|
['a11y', 'accessibility-check', 'a11y-check', 'accessibility'],
|
|
273
273
|
'check for accessibility issues in documentation',
|
|
274
|
-
() =>
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
274
|
+
(yargs) =>
|
|
275
|
+
yargs
|
|
276
|
+
.option('skip-contrast', {
|
|
277
|
+
type: 'boolean',
|
|
278
|
+
default: false,
|
|
279
|
+
description: 'Skip color contrast checks',
|
|
280
|
+
})
|
|
281
|
+
.option('skip-alt-text', {
|
|
282
|
+
type: 'boolean',
|
|
283
|
+
default: false,
|
|
284
|
+
description: 'Skip alt text checks on images and videos',
|
|
285
|
+
})
|
|
286
|
+
.check((argv) => {
|
|
287
|
+
if (argv.skipContrast && argv.skipAltText) {
|
|
288
|
+
throw new Error('Cannot skip both contrast and alt-text checks');
|
|
289
|
+
}
|
|
290
|
+
return true;
|
|
291
|
+
})
|
|
292
|
+
.example('mint a11y', 'Run all accessibility checks')
|
|
293
|
+
.example('mint a11y --skip-contrast', 'Only check for missing alt text')
|
|
294
|
+
.example('mint a11y --skip-alt-text', 'Only check color contrast'),
|
|
295
|
+
async (argv) => {
|
|
296
|
+
let accessibilityCheckTerminateCode = 0;
|
|
297
|
+
let mdxLinterTerminateCode = 0;
|
|
298
|
+
|
|
299
|
+
if (!argv.skipContrast) {
|
|
300
|
+
accessibilityCheckTerminateCode = await accessibilityCheck();
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
if (!argv.skipAltText) {
|
|
304
|
+
mdxLinterTerminateCode = await mdxLinter();
|
|
305
|
+
}
|
|
306
|
+
|
|
278
307
|
await terminate(accessibilityCheckTerminateCode || mdxLinterTerminateCode);
|
|
279
308
|
}
|
|
280
309
|
)
|