salesforce-alm
Version:
This package contains tools, and APIs, for an improved salesforce.com developer experience.
41 lines (39 loc) • 1.92 kB
JavaScript
;
/*
* Copyright (c) 2020, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.CommunityPublishCommand = void 0;
const command_1 = require("@salesforce/command");
const core_1 = require("@salesforce/core");
const CommunityPublishResource_1 = require("../../../lib/community/connect/CommunityPublishResource");
const ConnectExecutor_1 = require("../../../lib/connect/services/ConnectExecutor");
core_1.Messages.importMessagesDirectory(__dirname);
const community = core_1.Messages.loadMessages('salesforce-alm', 'community_commands');
/**
* A command to publish a community. This is just an sfdx wrapper around
* the community publish connect endpoint
*/
class CommunityPublishCommand extends command_1.SfdxCommand {
async run() {
const publishCommand = new CommunityPublishResource_1.CommunityPublishResource(this.flags, this.org, this.ux);
return new ConnectExecutor_1.ConnectExecutor(publishCommand, this.org).callConnectApi();
}
}
exports.CommunityPublishCommand = CommunityPublishCommand;
CommunityPublishCommand.requiresUsername = true;
CommunityPublishCommand.help = community.getMessage('publish.help');
CommunityPublishCommand.longDescription = community.getMessage('publish.longDescription');
CommunityPublishCommand.description = community.getMessage('publish.description') + '\n\n' + CommunityPublishCommand.help;
CommunityPublishCommand.flagsConfig = {
name: command_1.flags.string({
char: 'n',
description: community.getMessage('publish.flags.name.description'),
longDescription: community.getMessage('publish.flags.name.longDescription'),
required: true,
}),
};
//# sourceMappingURL=publish.js.map