UNPKG

1.14 kBJavaScriptView Raw
1#!/usr/bin/env node
2"use strict";
3Object.defineProperty(exports, "__esModule", { value: true });
4require("source-map-support/register");
5const automationClient_1 = require("../automationClient");
6const configuration_1 = require("../configuration");
7const scan_1 = require("../scan");
8try {
9 configuration_1.loadConfiguration()
10 .then(configuration => {
11 scan_1.enableDefaultScanning(configuration);
12 return configuration;
13 })
14 .then(configuration => automationClient_1.automationClient(configuration).run())
15 .catch(e => {
16 if (e instanceof Error) {
17 if (e.stack && e.stack.includes(e.message)) {
18 console.error(e.stack);
19 }
20 else if (e.stack) {
21 console.error(e.message);
22 console.error(e.stack);
23 }
24 else {
25 console.error(e.message);
26 }
27 }
28 else {
29 console.error(e);
30 }
31 process.exit(1);
32 });
33}
34catch (e) {
35 console.error(`Uncaught exception: ${e.message}`);
36 process.exit(10);
37}
38//# sourceMappingURL=start.js.map
\No newline at end of file