UNPKG

vtex

Version:

The platform for e-commerce apps

39 lines (38 loc) 1.78 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const command_1 = require("@oclif/command"); const CustomCommand_1 = require("../api/oclif/CustomCommand"); const link_1 = require("../modules/apps/link"); class Link extends CustomCommand_1.CustomCommand { async run() { const { flags, flags: { account, setup, clean, unsafe, workspace }, } = this.parse(Link); const noWatch = flags['no-watch']; await link_1.appLink({ account, workspace, setup, clean, unsafe, noWatch }); } } exports.default = Link; Link.description = 'Start a development session for this app'; Link.examples = ['vtex link -a youraccount -w yourworkspace']; Link.flags = { ...CustomCommand_1.CustomCommand.globalFlags, account: command_1.flags.string({ char: 'a', description: `Account to login before linking the app. This flag has to be paired with the '--workspace' flag.`, required: false, dependsOn: ['workspace'], }), clean: command_1.flags.boolean({ char: 'c', description: 'Clean builder cache', default: false }), setup: command_1.flags.boolean({ char: 's', description: 'Setup typings before linking [see vtex setup --help]', default: false, }), 'no-watch': command_1.flags.boolean({ description: "Don't watch for file changes after initial link", default: false }), unsafe: command_1.flags.boolean({ char: 'u', description: 'Allow links with Typescript errors', default: false }), workspace: command_1.flags.string({ char: 'w', description: `Workspace to switch to before linking the app. Can be paired with the '--account' flag to change account and switch to the given workspace.`, required: false, }), }; Link.args = [];