UNPKG

salesforce-alm

Version:

This package contains tools, and APIs, for an improved salesforce.com developer experience.

62 lines (60 loc) 2.96 kB
"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.MdapiRetrieveReportCommand = 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"); core_1.Messages.importMessagesDirectory(__dirname); const messages = core_1.Messages.loadMessages('salesforce-alm', 'mdapi_retrieve'); const consts = require("../../../../lib/core/constants"); const Stash = require("../../../../lib/core/stash"); class MdapiRetrieveReportCommand extends ToolbeltCommand_1.ToolbeltCommand { async run() { const context = await this.resolveLegacyContext(); const MdapiRetrieveReportCommandImpl = require('../../../../lib/mdapi/mdapiRetrieveReportCommand'); return this.execLegacyCommand(new MdapiRetrieveReportCommandImpl(context), context); } resolveUsername(context) { return context.flags.jobid ? undefined : Stash.get('targetusername', Stash.Commands.MDAPI_RETRIEVE); } } exports.MdapiRetrieveReportCommand = MdapiRetrieveReportCommand; MdapiRetrieveReportCommand.theDescription = messages.getMessage('reportCommandDescription'); MdapiRetrieveReportCommand.longDescription = messages.getMessage('reportCommandLongDescription'); MdapiRetrieveReportCommand.help = messages.getMessage('reportCommandHelp'); MdapiRetrieveReportCommand.requiresProject = false; MdapiRetrieveReportCommand.requiresUsername = true; MdapiRetrieveReportCommand.flagsConfig = { wait: command_1.flags.minutes({ char: 'w', description: messages.getMessage('waitFlagDescription', [consts.DEFAULT_MDAPI_RETRIEVE_WAIT_MINUTES]), longDescription: messages.getMessage('waitFlagLongDescription', [consts.DEFAULT_MDAPI_RETRIEVE_WAIT_MINUTES]), required: false, }), retrievetargetdir: command_1.flags.directory({ char: 'r', description: messages.getMessage('retrievetargetdirFlagDescription'), longDescription: messages.getMessage('retrievetargetdirFlagLongDescription'), required: false, }), verbose: command_1.flags.builtin({ description: messages.getMessage('verboseFlagDescription'), longDescription: messages.getMessage('verboseFlagLongDescription'), }), jobid: command_1.flags.id({ char: 'i', description: messages.getMessage('jobidDescription'), longDescription: messages.getMessage('jobidLongDescription'), required: false, }), }; //# sourceMappingURL=report.js.map