vtex
Version:
The platform for e-commerce apps
30 lines (29 loc) • 1.4 kB
JavaScript
;
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 publish_1 = tslib_1.__importDefault(require("../modules/apps/publish"));
const Colors_1 = require("../api/constants/Colors");
class Publish extends CustomCommand_1.CustomCommand {
async run() {
const { args: { path }, flags: { yes, workspace, force, tag }, } = this.parse(Publish);
await publish_1.default(path, { yes, workspace, force, tag });
}
}
exports.default = Publish;
Publish.description = 'Publishes the app in the current directory as a release candidate version.';
Publish.examples = [`${Colors_1.ColorifyConstants.COMMAND_OR_VTEX_REF('vtex publish')}`];
Publish.flags = {
...CustomCommand_1.CustomCommand.globalFlags,
tag: command_1.flags.string({ char: 't', description: 'Adds the specified tag to the release.' }),
workspace: command_1.flags.string({
char: 'w',
description: `Uses the specified ${Colors_1.ColorifyConstants.ID('workspace')} in the app registry.`,
}),
force: command_1.flags.boolean({
char: 'f',
description: 'Publishes the app independently of SemVer rules.',
}),
yes: command_1.flags.boolean({ char: 'y', description: 'Answers yes to all prompts.' }),
};