#!/usr/bin/env node
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
exports.__esModule = true;
var yargs_1 = __importDefault(require("yargs"));
var dev_1 = __importDefault(require("./dev"));
var init_1 = __importDefault(require("./init"));
var build_1 = __importDefault(require("./build"));
var migrate_1 = __importDefault(require("./migrate"));
var support_1 = require("./support");
yargs_1["default"]
    .option('verbose', {
    alias: 'v',
    type: 'boolean',
    "default": false
})
    // .middleware([
    //     (argv) => {
    //         if (argv.verbose) {
    //             winston.configure({
    //                 ...winstonConf,
    //                 level: 'debug',
    //             })
    //             return
    //         }
    //         winston.configure({ ...winstonConf, silent: true, level: 'error' })
    //     },
    // ])
    .command(support_1.withErrorHandling(init_1["default"]))
    .command(support_1.withErrorHandling(build_1["default"]))
    .command(support_1.withErrorHandling(migrate_1["default"]))
    // .demandCommand()
    .command(support_1.withErrorHandling(dev_1["default"]))
    .help('help').argv;
// TODO on dev and init command cli asks to login, then redirects to the dashboard page to connect vercel and github, the dashboard main button is to import a repository to deploy its vitro app
// TODO deploy command,  if the user prefers to use the cli instead he can login in the cli and run deploy, it calls the API as a github hook would do, calls the vercel cli on the current vitro app path
//# sourceMappingURL=main.js.map