@zowe/cli
Version:
Zowe CLI is a command line interface (CLI) that provides a simple and streamlined way to interact with IBM z/OS.
53 lines • 2.47 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.
*
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const perf_timing_1 = require("@zowe/perf-timing");
const timingApi = perf_timing_1.PerfTiming.api;
timingApi.mark("PRE_IMPORT_IMPERATIVE");
const imperative_1 = require("@zowe/imperative");
const Constants_1 = require("./Constants");
const util_1 = require("util");
// TODO(Kelosky): if we remove this, imperative fails to find config in package.json & we must debug this.
const config = {
configurationModule: __dirname + "/imperative"
};
(() => __awaiter(void 0, void 0, void 0, function* () {
timingApi.mark("POST_IMPORT_IMPERATIVE");
timingApi.measure("time to get into main function", "PRE_IMPORT_IMPERATIVE", "POST_IMPORT_IMPERATIVE");
try {
timingApi.mark("BEFORE_INIT");
yield imperative_1.Imperative.init(config);
timingApi.mark("AFTER_INIT");
timingApi.measure("imperative.init", "BEFORE_INIT", "AFTER_INIT");
imperative_1.Imperative.api.appLogger.trace("Init was successful");
timingApi.mark("BEFORE_PARSE");
imperative_1.Imperative.parse();
timingApi.mark("AFTER_PARSE");
timingApi.measure("Imperative.parse", "BEFORE_PARSE", "AFTER_PARSE");
}
catch (initErr) {
imperative_1.Imperative.console.fatal("Error initializing " + Constants_1.Constants.DISPLAY_NAME +
":\n "
+ util_1.inspect(initErr));
}
}))();
//# sourceMappingURL=main.js.map