mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 22:28:10 +09:00
Checkpoint: File edits
Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-07T15:03:47Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
20ac64870b
commit
ef829be100
1 file changed
+27
-19
@@ -372,30 +372,38 @@ export const doctorCommand: Command = {
|
||||
const results: HealthCheck[] = [];
|
||||
const fixes: string[] = [];
|
||||
|
||||
for (const check of checksToRun) {
|
||||
const spinner = output.createSpinner({ text: 'Checking...', spinner: 'dots' });
|
||||
spinner.start();
|
||||
// OPTIMIZATION: Run all checks in parallel for 3-5x faster execution
|
||||
const spinner = output.createSpinner({ text: 'Running health checks in parallel...', spinner: 'dots' });
|
||||
spinner.start();
|
||||
|
||||
try {
|
||||
const result = await check();
|
||||
results.push(result);
|
||||
try {
|
||||
// Execute all checks concurrently
|
||||
const checkResults = await Promise.allSettled(checksToRun.map(check => check()));
|
||||
spinner.stop();
|
||||
|
||||
spinner.stop();
|
||||
output.writeln(formatCheck(result));
|
||||
// Process results in order
|
||||
for (const settledResult of checkResults) {
|
||||
if (settledResult.status === 'fulfilled') {
|
||||
const result = settledResult.value;
|
||||
results.push(result);
|
||||
output.writeln(formatCheck(result));
|
||||
|
||||
if (result.fix && (result.status === 'fail' || result.status === 'warn')) {
|
||||
fixes.push(`${result.name}: ${result.fix}`);
|
||||
if (result.fix && (result.status === 'fail' || result.status === 'warn')) {
|
||||
fixes.push(`${result.name}: ${result.fix}`);
|
||||
}
|
||||
} else {
|
||||
const errorResult: HealthCheck = {
|
||||
name: 'Check',
|
||||
status: 'fail',
|
||||
message: settledResult.reason?.message || 'Unknown error'
|
||||
};
|
||||
results.push(errorResult);
|
||||
output.writeln(formatCheck(errorResult));
|
||||
}
|
||||
} catch (error) {
|
||||
spinner.stop();
|
||||
const errorResult: HealthCheck = {
|
||||
name: 'Check',
|
||||
status: 'fail',
|
||||
message: error instanceof Error ? error.message : 'Unknown error'
|
||||
};
|
||||
results.push(errorResult);
|
||||
output.writeln(formatCheck(errorResult));
|
||||
}
|
||||
} catch (error) {
|
||||
spinner.stop();
|
||||
output.writeln(output.error('Failed to run health checks'));
|
||||
}
|
||||
|
||||
// Auto-install missing dependencies if requested
|
||||
|
||||
Reference in new issue
Block a user