UNPKG

salesforce-alm

Version:

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

64 lines (62 loc) 2.89 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.SourcePullCommand = 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 kit_1 = require("@salesforce/kit"); const source_tracking_1 = require("@salesforce/source-tracking"); const ToolbeltCommand_1 = require("../../../ToolbeltCommand"); core_1.Messages.importMessagesDirectory(__dirname); const mdapiMessages = core_1.Messages.loadMessages('salesforce-alm', 'mdapi_deploy'); const messages = core_1.Messages.loadMessages('salesforce-alm', 'source_pull'); const consts = require("../../../lib/core/constants"); class SourcePullCommand extends ToolbeltCommand_1.ToolbeltCommand { constructor() { super(...arguments); this.lifecycleEventNames = ['preretrieve', 'postretrieve', 'postsourceupdate']; } async run() { const context = await this.resolveLegacyContext(); source_tracking_1.throwIfInvalid({ org: this.org, projectPath: this.project.getPath(), toValidate: 'toolbelt', command: source_tracking_1.replaceRenamedCommands('force:source:pull'), }); const MdapiPullCommand = require('../../../lib/source/sourcePullCommand'); return this.execLegacyCommand(new MdapiPullCommand(), context); } } exports.SourcePullCommand = SourcePullCommand; SourcePullCommand.theDescription = messages.getMessage('commandDescription'); SourcePullCommand.longDescription = messages.getMessage('commandDescriptionLong'); SourcePullCommand.help = messages.getMessage('commandHelp'); SourcePullCommand.showProgress = true; SourcePullCommand.requiresProject = true; SourcePullCommand.requiresUsername = true; SourcePullCommand.flagsConfig = { wait: command_1.flags.minutes({ char: 'w', description: mdapiMessages.getMessage('mdapiCliWait', [consts.DEFAULT_SRC_WAIT_MINUTES]), longDescription: messages.getMessage('waitFlagDescriptionLong'), required: false, default: kit_1.Duration.minutes(consts.DEFAULT_SRC_WAIT_MINUTES), min: kit_1.Duration.minutes(consts.MIN_SRC_WAIT_MINUTES), }), forceoverwrite: command_1.flags.boolean({ char: 'f', description: messages.getMessage('forceoverwriteFlagDescription'), longDescription: messages.getMessage('forceoverwriteFlagDescriptionLong'), required: false, }), }; //# sourceMappingURL=pull.js.map