UNPKG

@zowe/cics-for-zowe-cli

Version:
37 lines 1.52 kB
"use strict"; /** * This program and the accompanying materials are made available under the terms of the * Eclipse Public License v2.0 which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-v20.html * * SPDX-License-Identifier: EPL-2.0 * * Copyright Contributors to the Zowe Project. * */ Object.defineProperty(exports, "__esModule", { value: true }); exports.CicsBaseHandler = void 0; const CicsSession_1 = require("./CicsSession"); /** * This class is used by the various cics handlers as the base class for their implementation. * All handlers should extend this class whenever possible */ class CicsBaseHandler { /** * This will grab the cics profile and create a session before calling the subclass * {@link CicsBaseHandler#processWithSession} method. * * @param {IHandlerParameters} commandParameters Command parameters sent by imperative. * * @returns {Promise<void>} */ async process(commandParameters) { const session = await CicsSession_1.CicsSession.createSessCfgFromArgs(commandParameters.arguments, true, commandParameters); const response = await this.processWithSession(commandParameters, session); commandParameters.response.progress.endBar(); // end any progress bars // Return as an object when using --response-format-json commandParameters.response.data.setObj(response); } } exports.CicsBaseHandler = CicsBaseHandler; //# sourceMappingURL=CicsBaseHandler.js.map