"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@oclif/core");
const _cliter_1 = require("../@cliter");
const handlers_1 = require("../@cliter/handlers");
class Pipeline extends core_1.Command {
    async run() {
        const { args, flags } = await this.parse(Pipeline);
        const { from, to, service } = await _cliter_1.Prompter.promptAddPipeline(args.firstArg);
        handlers_1.PipelineHandler.generatePipeline({
            command: this,
            scope: args.firstArg,
            flags,
            from,
            to,
            service,
        });
    }
}
exports.default = Pipeline;
Pipeline.description = 'Generate pipeline to deploy application in cloud';
Pipeline.flags = {
    help: core_1.Flags.help({ char: 'h' }),
    force: core_1.Flags.boolean({
        char: 'f',
        description: 'Overwrite existing files.',
    }),
};
Pipeline.args = {
    firstArg: core_1.Args.string({
        name: 'scope',
        required: true,
        description: 'Scope where our command will act.',
        options: [
            'back',
            'front',
        ],
    }),
};
Pipeline.examples = [
    '$ aurora pipeline back',
    '$ aurora pipeline front -f',
    '$ aurora --help',
];
