|
|
|
@@ -102,9 +102,11 @@ function getCommandHelp(command: string): string {
|
|
|
|
|
${pc.dim('Options:')}
|
|
|
|
|
--profile <name> Profile name from config
|
|
|
|
|
--seed <number> Deterministic seed
|
|
|
|
|
--changed Filter to git-modified routes
|
|
|
|
|
|
|
|
|
|
${pc.dim('Examples:')}
|
|
|
|
|
apophis qualify --profile oauth-nightly --seed 42
|
|
|
|
|
apophis qualify --changed
|
|
|
|
|
`,
|
|
|
|
|
replay: `
|
|
|
|
|
${pc.bold('apophis replay')} — Replay a failure using seed and stored trace
|
|
|
|
@@ -167,18 +169,18 @@ function printInternalError(error: unknown): void {
|
|
|
|
|
console.error();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function resolveRequestedFormat(argv: string[]): 'human' | 'json' | 'ndjson' {
|
|
|
|
|
function resolveRequestedFormat(argv: string[]): 'human' | 'json' | 'ndjson' | 'json-summary' | 'ndjson-summary' {
|
|
|
|
|
for (let i = 0; i < argv.length; i++) {
|
|
|
|
|
const arg = argv[i];
|
|
|
|
|
if (!arg) continue;
|
|
|
|
|
if (arg === '--format' && argv[i + 1]) {
|
|
|
|
|
const value = argv[i + 1];
|
|
|
|
|
if (value === 'json' || value === 'ndjson') return value;
|
|
|
|
|
if (value === 'json' || value === 'ndjson' || value === 'json-summary' || value === 'ndjson-summary') return value as 'json' | 'ndjson' | 'json-summary' | 'ndjson-summary';
|
|
|
|
|
return 'human';
|
|
|
|
|
}
|
|
|
|
|
if (arg.startsWith('--format=')) {
|
|
|
|
|
const value = arg.slice('--format='.length);
|
|
|
|
|
if (value === 'json' || value === 'ndjson') return value;
|
|
|
|
|
if (value === 'json' || value === 'ndjson' || value === 'json-summary' || value === 'ndjson-summary') return value as 'json' | 'ndjson' | 'json-summary' | 'ndjson-summary';
|
|
|
|
|
return 'human';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -277,6 +279,7 @@ export async function main(argv: string[] = process.argv.slice(2)): Promise<numb
|
|
|
|
|
case 'qualify':
|
|
|
|
|
cmd.option('--profile <name>', 'Profile name from config');
|
|
|
|
|
cmd.option('--seed <number>', 'Deterministic seed');
|
|
|
|
|
cmd.option('--changed', 'Filter to git-modified routes');
|
|
|
|
|
break;
|
|
|
|
|
case 'replay':
|
|
|
|
|
cmd.option('--artifact <path>', 'Path to failure artifact');
|
|
|
|
@@ -375,7 +378,7 @@ export async function main(argv: string[] = process.argv.slice(2)): Promise<numb
|
|
|
|
|
init: new Set(['--preset', '-p', '--force', '-f', '--noninteractive']),
|
|
|
|
|
verify: new Set(['--profile', '--routes', '--seed', '--changed', '--workspace']),
|
|
|
|
|
observe: new Set(['--profile', '--check-config', '--workspace']),
|
|
|
|
|
qualify: new Set(['--profile', '--seed', '--workspace']),
|
|
|
|
|
qualify: new Set(['--profile', '--seed', '--workspace', '--changed']),
|
|
|
|
|
replay: new Set(['--artifact', '--route']),
|
|
|
|
|
doctor: new Set(['--mode', '--strict', '--workspace']),
|
|
|
|
|
migrate: new Set(['--check', '--dry-run', '--write']),
|
|
|
|
|