mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 20:32:20 +03:00
20 lines
543 B
JavaScript
20 lines
543 B
JavaScript
import { runDoctorCommand } from "./commands/doctor.mjs";
|
|
import { runProvidersCommand } from "./commands/providers.mjs";
|
|
import { runSetupCommand } from "./commands/setup.mjs";
|
|
|
|
export async function runCliCommand(command, argv, context = {}) {
|
|
if (command === "doctor") {
|
|
return runDoctorCommand(argv, context);
|
|
}
|
|
|
|
if (command === "providers") {
|
|
return runProvidersCommand(argv, context);
|
|
}
|
|
|
|
if (command === "setup") {
|
|
return runSetupCommand(argv, context);
|
|
}
|
|
|
|
throw new Error(`Unknown CLI command: ${command}`);
|
|
}
|