@teamscale/coverage-collector 0.0.1-beta.29 → 0.0.1-beta.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamscale/coverage-collector",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.32",
|
|
4
4
|
"description": "Collector for JavaScript code coverage information",
|
|
5
5
|
"main": "dist/src/main.js",
|
|
6
6
|
"bin": "dist/src/main.js",
|
|
@@ -24,15 +24,16 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@cqse/commons": "^0.0.1-beta.26",
|
|
26
26
|
"argparse": "^2.0.1",
|
|
27
|
-
"async": "^3.2.
|
|
27
|
+
"async": "^3.2.3",
|
|
28
28
|
"axios": "^0.24.0",
|
|
29
|
+
"bunyan": "^1.8.15",
|
|
29
30
|
"dotenv": "^14.1.0",
|
|
30
31
|
"form-data": "^4.0.0",
|
|
32
|
+
"mkdirp": "^1.0.4",
|
|
31
33
|
"rxjs": "^7.1.0",
|
|
32
34
|
"source-map": "^0.7.3",
|
|
33
35
|
"tmp": "^0.2.1",
|
|
34
36
|
"typescript-optional": "^2.0.1",
|
|
35
|
-
"winston": "^3.6.0",
|
|
36
37
|
"ws": "^7.4.5"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
@@ -40,11 +41,11 @@
|
|
|
40
41
|
"@babel/preset-env": "^7.14.1",
|
|
41
42
|
"@types/argparse": "^2.0.5",
|
|
42
43
|
"@types/async": "^3.2.6",
|
|
44
|
+
"@types/bunyan": "^1.8.8",
|
|
43
45
|
"@types/jest": "^27.0.1",
|
|
44
46
|
"@types/node": "^15.0.1",
|
|
45
47
|
"@types/source-map": "^0.5.7",
|
|
46
48
|
"@types/tmp": "^0.2.3",
|
|
47
|
-
"@types/winston": "^2.4.4",
|
|
48
49
|
"@types/ws": "^7.4.2",
|
|
49
50
|
"babel-jest": "^27.2.0",
|
|
50
51
|
"esbuild": "^0.13.4",
|
package/dist/src/main.js
CHANGED
|
@@ -30,7 +30,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
30
30
|
exports.Main = void 0;
|
|
31
31
|
const package_json_1 = require("../package.json");
|
|
32
32
|
const argparse_1 = require("argparse");
|
|
33
|
-
const
|
|
33
|
+
const bunyan_1 = __importDefault(require("bunyan"));
|
|
34
34
|
const DataStorage_1 = require("./storage/DataStorage");
|
|
35
35
|
const CollectingServer_1 = require("./receiver/CollectingServer");
|
|
36
36
|
require("dotenv/config");
|
|
@@ -40,6 +40,8 @@ const form_data_1 = __importDefault(require("form-data"));
|
|
|
40
40
|
const QueryParameters_1 = __importDefault(require("./utils/QueryParameters"));
|
|
41
41
|
const util_1 = require("util");
|
|
42
42
|
const tmp_1 = __importDefault(require("tmp"));
|
|
43
|
+
const mkdirp_1 = __importDefault(require("mkdirp"));
|
|
44
|
+
const path_1 = __importDefault(require("path"));
|
|
43
45
|
/**
|
|
44
46
|
* The main class of the Teamscale JavaScript Collector.
|
|
45
47
|
* Used to start the collector for with a given configuration.
|
|
@@ -117,16 +119,25 @@ class Main {
|
|
|
117
119
|
* Construct the logger.
|
|
118
120
|
*/
|
|
119
121
|
static buildLogger(config) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
const logfilePath = config.log_to_file.trim();
|
|
123
|
+
mkdirp_1.default.sync(path_1.default.dirname(logfilePath));
|
|
124
|
+
const logLevel = config.log_level;
|
|
125
|
+
return bunyan_1.default.createLogger({ name: "Instrumenter",
|
|
126
|
+
streams: [
|
|
127
|
+
{
|
|
128
|
+
level: logLevel,
|
|
129
|
+
stream: {
|
|
130
|
+
write: (rec) => {
|
|
131
|
+
console.log('[%s] %s: %s', rec.time.toISOString(), bunyan_1.default.nameFromLevel[rec.level], rec.msg);
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
type: 'raw'
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
level: logLevel,
|
|
138
|
+
path: logfilePath
|
|
139
|
+
}
|
|
140
|
+
] });
|
|
130
141
|
}
|
|
131
142
|
/**
|
|
132
143
|
* Entry point of the Teamscale JavaScript Profiler.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Socket } from 'net';
|
|
3
3
|
import { IDataStorage } from '../storage/DataStorage';
|
|
4
|
-
import
|
|
4
|
+
import Logger from "bunyan";
|
|
5
5
|
/**
|
|
6
6
|
* The session maintains the relevant information for a client.
|
|
7
7
|
* One session is created for each client.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamscale/coverage-collector",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.32",
|
|
4
4
|
"description": "Collector for JavaScript code coverage information",
|
|
5
5
|
"main": "dist/src/main.js",
|
|
6
6
|
"bin": "dist/src/main.js",
|
|
@@ -24,15 +24,16 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@cqse/commons": "^0.0.1-beta.26",
|
|
26
26
|
"argparse": "^2.0.1",
|
|
27
|
-
"async": "^3.2.
|
|
27
|
+
"async": "^3.2.3",
|
|
28
28
|
"axios": "^0.24.0",
|
|
29
|
+
"bunyan": "^1.8.15",
|
|
29
30
|
"dotenv": "^14.1.0",
|
|
30
31
|
"form-data": "^4.0.0",
|
|
32
|
+
"mkdirp": "^1.0.4",
|
|
31
33
|
"rxjs": "^7.1.0",
|
|
32
34
|
"source-map": "^0.7.3",
|
|
33
35
|
"tmp": "^0.2.1",
|
|
34
36
|
"typescript-optional": "^2.0.1",
|
|
35
|
-
"winston": "^3.6.0",
|
|
36
37
|
"ws": "^7.4.5"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
@@ -40,11 +41,11 @@
|
|
|
40
41
|
"@babel/preset-env": "^7.14.1",
|
|
41
42
|
"@types/argparse": "^2.0.5",
|
|
42
43
|
"@types/async": "^3.2.6",
|
|
44
|
+
"@types/bunyan": "^1.8.8",
|
|
43
45
|
"@types/jest": "^27.0.1",
|
|
44
46
|
"@types/node": "^15.0.1",
|
|
45
47
|
"@types/source-map": "^0.5.7",
|
|
46
48
|
"@types/tmp": "^0.2.3",
|
|
47
|
-
"@types/winston": "^2.4.4",
|
|
48
49
|
"@types/ws": "^7.4.2",
|
|
49
50
|
"babel-jest": "^27.2.0",
|
|
50
51
|
"esbuild": "^0.13.4",
|