UNPKG

1.75 kBJavaScriptView Raw
1#!/usr/bin/env node
2"use strict";
3/*
4 * Copyright © 2018 Atomist, Inc.
5 *
6 * See LICENSE file.
7 */
8var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
9 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
10 return new (P || (P = Promise))(function (resolve, reject) {
11 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
12 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
13 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
14 step((generator = generator.apply(thisArg, _arguments || [])).next());
15 });
16};
17Object.defineProperty(exports, "__esModule", { value: true });
18// tslint:disable-next-line:no-import-side-effect
19require("source-map-support/register");
20const error_1 = require("../lib/util/error");
21function main() {
22 return __awaiter(this, void 0, void 0, function* () {
23 try {
24 const logging = require("../lib/util/logger");
25 logging.configureLogging(logging.ClientLogging);
26 let configuration = yield require("../lib/configuration").loadConfiguration();
27 configuration = require("../lib/scan").enableDefaultScanning(configuration);
28 yield require("../lib/automationClient").automationClient(configuration).run();
29 }
30 catch (e) {
31 error_1.printError(e);
32 process.exit(5);
33 }
34 });
35}
36/* tslint:disable:no-console */
37main()
38 .catch(e => {
39 console.error(`Unhandled exception: ${e.message}`);
40 process.exit(10);
41});
42//# sourceMappingURL=start.js.map
\No newline at end of file