@mintlify/cli 4.0.837 → 4.0.839

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.837",
3
+ "version": "4.0.839",
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.629",
44
- "@mintlify/link-rot": "3.0.777",
45
- "@mintlify/models": "0.0.245",
46
- "@mintlify/prebuild": "1.0.760",
47
- "@mintlify/previewing": "4.0.812",
48
- "@mintlify/validation": "0.1.536",
43
+ "@mintlify/common": "1.0.631",
44
+ "@mintlify/link-rot": "3.0.779",
45
+ "@mintlify/models": "0.0.246",
46
+ "@mintlify/prebuild": "1.0.762",
47
+ "@mintlify/previewing": "4.0.814",
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": "5ec49326b8bfabbf673d01141e96a1e593aa7f2c"
84
+ "gitHead": "7929d9f7e5485f70daacab7f681197345232b8ed"
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
- () => undefined,
275
- async () => {
276
- const accessibilityCheckTerminateCode = await accessibilityCheck();
277
- const mdxLinterTerminateCode = await mdxLinter();
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
  )