UNPKG

projex

Version:
28 lines (27 loc) 1.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const _api_1 = require("../../api/index"); const _modules_1 = require("../../modules/index"); const core_1 = require("@oclif/core"); const _shared_1 = require("../../shared/index"); class Browse extends core_1.Command { static description = `Run a command and automatically accept any "Yes/No" questions by default.`; static examples = [ `${_api_1.Colors.PINK(`${_shared_1.CLI_NAME} vtex run`)} 'vtex release minor stable'`, `${_api_1.Colors.PINK(`${_shared_1.CLI_NAME} vtex run`)} 'vtex publish'`, `${_api_1.Colors.PINK(`${_shared_1.CLI_NAME} vtex run`)} 'vtex deploy'`, ]; static flags = { ..._shared_1.globalFlags, }; static args = { command: core_1.Args.string({ description: `Specify the command to run. When using this command, we detect any prompts with the question "Yes/No" and automatically respond with "Yes". If the command finishes with errors, we throw an error to terminate the process.`, }), }; async run() { const { args: { command }, } = await this.parse(Browse); await (0, _modules_1.vtexRunCommand)(command); } } exports.default = Browse;