@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/bin/cli.js CHANGED
@@ -195,9 +195,34 @@ export const cli = ({ packageName = 'mint' }) => {
195
195
  yield migrateMdx();
196
196
  yield terminate(0);
197
197
  }))
198
- .command(['a11y', 'accessibility-check', 'a11y-check', 'accessibility'], 'check for accessibility issues in documentation', () => undefined, () => __awaiter(void 0, void 0, void 0, function* () {
199
- const accessibilityCheckTerminateCode = yield accessibilityCheck();
200
- const mdxLinterTerminateCode = yield mdxLinter();
198
+ .command(['a11y', 'accessibility-check', 'a11y-check', 'accessibility'], 'check for accessibility issues in documentation', (yargs) => yargs
199
+ .option('skip-contrast', {
200
+ type: 'boolean',
201
+ default: false,
202
+ description: 'Skip color contrast checks',
203
+ })
204
+ .option('skip-alt-text', {
205
+ type: 'boolean',
206
+ default: false,
207
+ description: 'Skip alt text checks on images and videos',
208
+ })
209
+ .check((argv) => {
210
+ if (argv.skipContrast && argv.skipAltText) {
211
+ throw new Error('Cannot skip both contrast and alt-text checks');
212
+ }
213
+ return true;
214
+ })
215
+ .example('mint a11y', 'Run all accessibility checks')
216
+ .example('mint a11y --skip-contrast', 'Only check for missing alt text')
217
+ .example('mint a11y --skip-alt-text', 'Only check color contrast'), (argv) => __awaiter(void 0, void 0, void 0, function* () {
218
+ let accessibilityCheckTerminateCode = 0;
219
+ let mdxLinterTerminateCode = 0;
220
+ if (!argv.skipContrast) {
221
+ accessibilityCheckTerminateCode = yield accessibilityCheck();
222
+ }
223
+ if (!argv.skipAltText) {
224
+ mdxLinterTerminateCode = yield mdxLinter();
225
+ }
201
226
  yield terminate(accessibilityCheckTerminateCode || mdxLinterTerminateCode);
202
227
  }))
203
228
  .command(['version', 'v'], 'display the current version of the CLI and client', () => undefined, () => __awaiter(void 0, void 0, void 0, function* () {