UNPKG

vtex

Version:

The platform for e-commerce apps

30 lines (29 loc) 1.4 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 unlink_1 = tslib_1.__importDefault(require("../modules/apps/unlink")); const Colors_1 = require("../api/constants/Colors"); class Unlink extends CustomCommand_1.CustomCommand { async run() { const { raw, flags: { all }, } = this.parse(Unlink); const allArgs = this.getAllArgs(raw); await unlink_1.default(allArgs, { all }); } } exports.default = Unlink; Unlink.description = `Unlinks an app from the current ${Colors_1.ColorifyConstants.ID('workspace.')} If not specified which app to unlink, it defaults to the app in the current directory.`; Unlink.examples = [ `${Colors_1.ColorifyConstants.COMMAND_OR_VTEX_REF('vtex unlink')}`, `${Colors_1.ColorifyConstants.COMMAND_OR_VTEX_REF('vtex unlink')} vtex.service-example@0.x`, ]; Unlink.flags = { ...CustomCommand_1.CustomCommand.globalFlags, all: command_1.flags.boolean({ char: 'a', description: 'Unlinks all apps.', default: false }), }; Unlink.strict = false; Unlink.args = [ { name: 'appId', required: false, description: 'Name of the app to unlink.' }, { name: 'ithAppId', required: false, multiple: true, description: 'Names of multiple apps to unlink.' }, ];