@zosconnect/zosconnect-zowe-cli
Version:
z/OS Connect EE Plugin for Zowe CLI
26 lines • 910 B
JavaScript
;
/*
* 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 IBM 2019
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConnectionUtil = void 0;
const zosconnect_node_1 = require("@zosconnect/zosconnect-node");
class ConnectionUtil {
static getConnection(session) {
const options = {};
options.rejectUnauthorized = session.rejectUnauthorized;
if (session.user !== undefined) {
options.auth = session.user + ":" + session.password;
}
return new zosconnect_node_1.ZosConnect(session.address, options);
}
}
exports.ConnectionUtil = ConnectionUtil;
//# sourceMappingURL=connection.js.map