CliCommandRunner Class — astro Architecture
Architecture documentation for the CliCommandRunner class in cli-command-runner.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 9b2e6679_8431_841c_735f_e7299588f746["CliCommandRunner"] 46649658_9306_4493_b1c5_82761fe3bf46["cli-command-runner.ts"] 9b2e6679_8431_841c_735f_e7299588f746 -->|defined in| 46649658_9306_4493_b1c5_82761fe3bf46 b512cef5_e03b_c3d2_f4c4_a17d598662a2["constructor()"] 9b2e6679_8431_841c_735f_e7299588f746 -->|method| b512cef5_e03b_c3d2_f4c4_a17d598662a2 ff7ff054_8201_e598_33e6_6c7a6d71cd58["run()"] 9b2e6679_8431_841c_735f_e7299588f746 -->|method| ff7ff054_8201_e598_33e6_6c7a6d71cd58
Relationship Graph
Source Code
packages/astro/src/cli/infra/cli-command-runner.ts lines 4–25
export class CliCommandRunner implements CommandRunner {
readonly #helpDisplay: HelpDisplay;
constructor({
helpDisplay,
}: {
helpDisplay: HelpDisplay;
}) {
this.#helpDisplay = helpDisplay;
}
run<T extends AnyCommand>(
command: T,
...args: Parameters<T['run']>
): ReturnType<T['run']> | undefined {
if (this.#helpDisplay.shouldFire()) {
this.#helpDisplay.show(command.help);
return;
}
return command.run(...args);
}
}
Domain
Source
Frequently Asked Questions
What is the CliCommandRunner class?
CliCommandRunner is a class in the astro codebase, defined in packages/astro/src/cli/infra/cli-command-runner.ts.
Where is CliCommandRunner defined?
CliCommandRunner is defined in packages/astro/src/cli/infra/cli-command-runner.ts at line 4.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free