salesforce-alm
Version:
This package contains tools, and APIs, for an improved salesforce.com developer experience.
107 lines (105 loc) • 4.8 kB
JavaScript
"use strict";
/*
* 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.MdapiDeployCommand = void 0;
// This is the legacy converted command file. Ignoring code-coverage since this is generated.
// THIS SHOULD BE REMOVED WHEN CONVERTED TO EXTEND SfdxCommand
/* istanbul ignore file */
const command_1 = require("@salesforce/command");
const core_1 = require("@salesforce/core");
const ToolbeltCommand_1 = require("../../../ToolbeltCommand");
const consts = require("../../../lib/core/constants");
core_1.Messages.importMessagesDirectory(__dirname);
const messages = core_1.Messages.loadMessages('salesforce-alm', 'mdapi_deploy');
class MdapiDeployCommand extends ToolbeltCommand_1.ToolbeltCommand {
async run() {
const context = await this.resolveLegacyContext();
const MdapiDeployCommandImpl = require('../../../lib/mdapi/mdapiDeployCommand');
return this.execLegacyCommand(new MdapiDeployCommandImpl(context), context);
}
}
exports.MdapiDeployCommand = MdapiDeployCommand;
MdapiDeployCommand.theDescription = messages.getMessage('mdDeployCommandCliDescription');
MdapiDeployCommand.longDescription = messages.getMessage('mdDeployCommandCliLong');
MdapiDeployCommand.help = messages.getMessage('mdDeployCommandCliHelp');
MdapiDeployCommand.requiresProject = false;
MdapiDeployCommand.requiresUsername = true;
MdapiDeployCommand.flagsConfig = {
checkonly: command_1.flags.boolean({
char: 'c',
description: messages.getMessage('mdDeployCommandCliCheckOnly'),
longDescription: messages.getMessage('mdDeployCommandCliCheckOnlyLong'),
required: false,
}),
deploydir: command_1.flags.directory({
char: 'd',
description: messages.getMessage('mdDeployCommandCliDeployDir'),
longDescription: messages.getMessage('mdDeployCommandCliDeployDirLong'),
required: false,
exclusive: ['zipfile'],
}),
wait: command_1.flags.minutes({
char: 'w',
description: messages.getMessage('mdapiCliWait', [consts.DEFAULT_MDAPI_WAIT_MINUTES]),
longDescription: messages.getMessage('mdapiCliWaitLong', [consts.DEFAULT_MDAPI_WAIT_MINUTES]),
required: false,
}),
testlevel: command_1.flags.enum({
char: 'l',
description: messages.getMessage('mdDeployCommandCliTestLevel'),
longDescription: messages.getMessage('mdDeployCommandCliTestLevelLong'),
required: false,
options: ['NoTestRun', 'RunSpecifiedTests', 'RunLocalTests', 'RunAllTestsInOrg'],
}),
runtests: command_1.flags.array({
char: 'r',
description: messages.getMessage('mdDeployCommandCliRunTests'),
longDescription: messages.getMessage('mdDeployCommandCliRunTestsLong'),
required: false,
}),
ignoreerrors: command_1.flags.boolean({
char: 'o',
description: messages.getMessage('mdDeployCommandCliIgnoreErrors'),
longDescription: messages.getMessage('mdDeployCommandCliIgnoreErrorsLong'),
required: false,
}),
ignorewarnings: command_1.flags.boolean({
char: 'g',
description: messages.getMessage('mdDeployCommandCliIgnoreWarnings'),
longDescription: messages.getMessage('mdDeployCommandCliIgnoreWarningsLong'),
required: false,
}),
validateddeployrequestid: command_1.flags.id({
char: 'q',
description: messages.getMessage('mdDeployCommandCliValidatedDeployRequestId'),
longDescription: messages.getMessage('mdDeployCommandCliValidatedDeployRequestIdLong'),
required: false,
}),
verbose: command_1.flags.builtin({
description: messages.getMessage('mdDeployCommandCliVerbose'),
longDescription: messages.getMessage('mdDeployCommandCliVerboseLong'),
}),
zipfile: command_1.flags.filepath({
char: 'f',
description: messages.getMessage('mdDeployCommandCliZipFile'),
longDescription: messages.getMessage('mdDeployCommandCliZipFileLong'),
required: false,
}),
singlepackage: command_1.flags.boolean({
char: 's',
description: messages.getMessage('mdDeployCommandSinglePackageDescription'),
longDescription: messages.getMessage('mdDeployCommandSinglePackageDescriptionLong'),
required: false,
}),
soapdeploy: command_1.flags.boolean({
description: messages.getMessage('mdDeploySoapDeployDescription'),
longDescription: messages.getMessage('mdDeploySoapDeployDescriptionLong'),
required: false,
}),
};
//# sourceMappingURL=deploy.js.map