import { Command } from "commander";
import { loadCliState, parsedArgs } from "../shared.js";
import { runDoctorCommand } from "./action.js";
export function createDoctorCommand(context, setExitCode) {
    return new Command("doctor")
        .description("Run deployment diagnostics")
        .option("--instance <name>", "select a configured instance")
        .action(async (options) => {
        const { config } = await loadCliState(context);
        setExitCode(await runDoctorCommand(config, parsedArgs("doctor", undefined, [], options), context));
    });
}
//# sourceMappingURL=index.js.map