Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #!/usr/bin/env node
/**
* Capture baseline for validation
* Usage: node capture-baseline.js --config <config-file> [--source <source-dir>]
*/
import { fileURLToPath } from 'node:url';
import path from 'node:path';
import chalk from 'chalk';
import yargs from 'yargs';
import { captureBaseline } from './capture-baseline-core.js';
// Parse command line arguments
const argv = yargs(process.argv.slice(2))
.option('config', {
alias: 'c',
type: 'string',
description: 'Path to validation config file',
demandOption: true,
})
.option('source', {
alias: 's',
type: 'string',
description: 'Override source path from config',
})
.help()
.argv;
export async function runCaptureBaselineCli() {
try {
await captureBaseline(argv);
} catch (error) {
console.error(chalk.red('❌ Error capturing baseline:'), error);
process.exit(1);
}
}
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
runCaptureBaselineCli();
}
|