UNPKG

vtex

Version:

The platform for e-commerce apps

39 lines (38 loc) 1.66 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 deprecate_1 = tslib_1.__importDefault(require("../modules/apps/deprecate")); const Colors_1 = require("../api/constants/Colors"); class Deprecate extends CustomCommand_1.CustomCommand { async run() { const { raw, flags: { yes }, } = this.parse(Deprecate); const allArgs = this.getAllArgs(raw); await deprecate_1.default(allArgs, { yes }); } } exports.default = Deprecate; Deprecate.description = `Deprecates the specified app, uninstalling and downgrading it to the latest stable version in every ${Colors_1.ColorifyConstants.ID('VTEX account.')}`; Deprecate.examples = [ `${Colors_1.ColorifyConstants.COMMAND_OR_VTEX_REF('vtex deprecate')}`, `${Colors_1.ColorifyConstants.COMMAND_OR_VTEX_REF('vtex deprecate')} vtex.service-example@0.0.1`, ]; Deprecate.flags = { ...CustomCommand_1.CustomCommand.globalFlags, yes: command_1.flags.boolean({ description: 'Answers yes to all prompts.', char: 'y', default: false }), }; Deprecate.strict = false; Deprecate.args = [ { name: 'appId', required: false, description: `Name and version of the app ${Colors_1.ColorifyConstants.ID('({vendor}.{appname}@{x.x.x})')} to deprecate.`, }, { name: 'ithAppId', required: false, multiple: true, description: `Names and versions of multiple apps ${Colors_1.ColorifyConstants.ID('({vendor}.{appname}@{x.x.x})')} to deprecate.`, }, ];