import { captureEvent } from "../common/analytics/lib.js";
import { identify } from "../common/middleware/user-identification.js";
import { whoami } from "../whoami/handler.js";
export default {
    desc: "Displays the currently authenticated user",
    command: "whoami",
    builder: (yargs) => {
        return yargs
            .usage("$0 whoami [options]")
            .option("api-key", {
            type: "string",
            describe: "The API Key from Zuplo",
            envVar: "API_KEY",
            alias: "apikey",
        })
            .example([["$0 whoami", "Display the currently authenticated user"]])
            .middleware([identify]);
    },
    handler: async (argv) => {
        await captureEvent({ argv, event: "zuplo whoami" });
        await whoami(argv);
    },
};
//# sourceMappingURL=whoami.js.map