1 | #!/usr/bin/env node
|
2 | "use strict";
|
3 | Object.defineProperty(exports, "__esModule", { value: true });
|
4 | require("source-map-support/register");
|
5 | const automationClient_1 = require("../automationClient");
|
6 | const configuration_1 = require("../configuration");
|
7 | const scan_1 = require("../scan");
|
8 | try {
|
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 | }
|
34 | catch (e) {
|
35 | console.error(`Uncaught exception: ${e.message}`);
|
36 | process.exit(10);
|
37 | }
|
38 |
|
\ | No newline at end of file |