import { build } from "../build/handler.js";
import { captureEvent } from "../common/analytics/lib.js";
import { identify } from "../common/middleware/user-identification.js";
import setBlocking from "../common/output.js";
import { ZuploProjectValidator } from "../common/validators/file-system-validator.js";
import { YargsChecker } from "../common/validators/lib.js";
export default {
    desc: false,
    command: "build",
    builder: (yargs) => {
        return yargs
            .option("dir", {
            type: "string",
            describe: "The directory containing your Zuplo API",
            default: ".",
            normalize: true,
            hidden: true,
        })
            .option("customDomain", {
            type: "string",
            describe: "The custom domain for the project",
            default: undefined,
        })
            .middleware([setBlocking, identify])
            .check(async (argv) => {
            return await new YargsChecker(new ZuploProjectValidator()).check(argv);
        });
    },
    handler: async (argv) => {
        await captureEvent({ argv, event: "zuplo build" });
        await build(argv);
    },
};
//# sourceMappingURL=build.js.map