UNPKG

vtex

Version:

The platform for e-commerce apps

36 lines (35 loc) 1.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const command_1 = require("@oclif/command"); const CustomCommand_1 = require("../api/oclif/CustomCommand"); const undeprecate_1 = tslib_1.__importDefault(require("../modules/apps/undeprecate")); const Colors_1 = require("../api/constants/Colors"); class Undeprecate extends CustomCommand_1.CustomCommand { async run() { const { raw, flags: { yes }, } = this.parse(Undeprecate); const allArgs = this.getAllArgs(raw); await undeprecate_1.default(allArgs, { yes }); } } exports.default = Undeprecate; Undeprecate.description = 'Reestablishes a deprecated version of an app as a stable version.'; Undeprecate.examples = [`${Colors_1.ColorifyConstants.COMMAND_OR_VTEX_REF('vtex undeprecate')} vtex.service-example@0.0.1`]; Undeprecate.flags = { ...CustomCommand_1.CustomCommand.globalFlags, yes: command_1.flags.boolean({ description: 'Answers yes to all prompts.', char: 'y', default: false }), }; Undeprecate.strict = false; Undeprecate.args = [ { name: 'appId', required: false, description: `Name and version of the app ${Colors_1.ColorifyConstants.ID('({vendor}.{appname}@{x.x.x})')} to undeprecate.`, }, { name: 'ithAppId', required: false, multiple: true, description: `Names and versions of the multiple apps ${Colors_1.ColorifyConstants.ID('({vendor}.{appname}@{x.x.x})')} to undeprecate.`, }, ];