UNPKG

@zowe/cics-for-zowe-explorer-api

Version:
28 lines 1.12 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.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"); const version = cicsExtension?.packageJSON.version; if (!cicsExtension || (0, compare_versions_1.compare)(version, "3.9.4", "<")) { return undefined; } if (minimumVersion && (0, compare_versions_1.compare)(version, minimumVersion, "<")) { return undefined; } return cicsExtension.activate(); } exports.getCICSForZoweExplorerAPI = getCICSForZoweExplorerAPI; //# sourceMappingURL=getAPI.js.map