import { captureEvent } from "../common/analytics/lib.js";
import { authenticate } from "../common/middleware/authentication.js";
import { configure } from "../common/middleware/user-configuration.js";
import { identify } from "../common/middleware/user-identification.js";
import setBlocking from "../common/output.js";
import { list } from "../list/handler.js";
import { fetchAccount } from "../common/middleware/get-account-param.js";
import { fetchProject } from "../common/middleware/get-project-param.js";
export default {
    desc: "Lists all deployed zups",
    command: "list",
    builder: (yargs) => {
        return yargs
            .option("api-key", {
            type: "string",
            describe: "The API Key from Zuplo",
            envVar: "API_KEY",
        })
            .option("project", {
            type: "string",
            describe: "The project name",
        })
            .option("account", {
            type: "string",
            describe: "The account name",
        })
            .option("self-hosted-endpoint", {
            type: "string",
            describe: "The endpoint of your self-hosted service to deploy to",
        })
            .middleware([
            setBlocking,
            authenticate,
            configure,
            fetchAccount,
            fetchProject,
            identify,
        ]);
    },
    handler: async (argv) => {
        await captureEvent({ argv, event: "zuplo list" });
        await list(argv);
    },
};
//# sourceMappingURL=list.js.map