import { Command } from "commander";
import { loadCliState, parsedArgs } from "../shared.js";
import { runDriverCommand } from "./action.js";
const descriptions = {
    up: "Start the selected Compose deployment",
    down: "Stop the selected Compose deployment",
    logs: "Stream logs for the selected Compose deployment",
};
export function createDeploymentCommands(context, setExitCode) {
    return ["up", "down", "logs"].map((name) => new Command(name)
        .description(descriptions[name])
        .argument("[args...]", "additional arguments passed to the Compose runtime")
        .option("--instance <name>", "select a configured Compose instance")
        .action(async (args, options) => {
        const { config } = await loadCliState(context);
        setExitCode(await runDriverCommand(config, name, parsedArgs(name, undefined, args, options), context));
    }));
}
//# sourceMappingURL=index.js.map