@zowe/cics-for-zowe-explorer-api
Version:
IBM CICS for Zowe Explorer API
30 lines • 1.09 kB
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 Contributors to the Zowe Project.
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCICSForZoweExplorerAPI = void 0;
const compare_versions_1 = require("compare-versions");
const vscode_1 = require("vscode");
async function getCICSForZoweExplorerAPI(minimumVersion) {
const cicsExtension = vscode_1.extensions.getExtension("Zowe.cics-extension-for-zowe");
if (!cicsExtension) {
return undefined;
}
if (minimumVersion) {
const version = cicsExtension.packageJSON.version;
if ((0, compare_versions_1.compare)(version, minimumVersion, "<")) {
return undefined;
}
}
return cicsExtension.activate();
}
exports.getCICSForZoweExplorerAPI = getCICSForZoweExplorerAPI;
//# sourceMappingURL=getAPI.js.map