@teamscale/coverage-collector 0.0.1-beta.2 → 0.0.1-beta.6
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/README.md +1 -1
- package/dist/package.json +5 -5
- package/dist/src/main.js +5 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ yarn build
|
|
|
32
32
|
There are several options to run the Collector. For example, via `yarn` by running
|
|
33
33
|
|
|
34
34
|
```
|
|
35
|
-
yarn
|
|
35
|
+
yarn collector --port 54678 --dump-to-file=./coverage.simple
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
or via `npx` by running
|
package/dist/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamscale/coverage-collector",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.6",
|
|
4
4
|
"description": "Collector for JavaScript code coverage information",
|
|
5
|
-
"main": "dist/main.js",
|
|
6
|
-
"bin": "dist/main.js",
|
|
7
|
-
"types": "dist/main.d.ts",
|
|
5
|
+
"main": "dist/src/main.js",
|
|
6
|
+
"bin": "dist/src/main.js",
|
|
7
|
+
"types": "dist/src/main.d.ts",
|
|
8
8
|
"author": "CQSE GmbH",
|
|
9
9
|
"license": "Apache-2.0",
|
|
10
10
|
"repository": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"clean": "rimraf dist tsconfig.tsbuildinfo",
|
|
16
16
|
"build": "tsc",
|
|
17
|
-
"
|
|
17
|
+
"collector": "node dist/src/main.js",
|
|
18
18
|
"test": "yarn build && NODE_OPTIONS='--experimental-vm-modules' jest --forceExit --coverage --silent=true --detectOpenHandles"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
package/dist/src/main.js
CHANGED
|
@@ -28,9 +28,9 @@ class Main {
|
|
|
28
28
|
parser.add_argument('-f', '--dump-to-file', { help: 'Target file', default: './coverage.simple' });
|
|
29
29
|
parser.add_argument('-l', '--log-to-file', { help: 'Log file', default: 'logs/collector-combined.log' });
|
|
30
30
|
parser.add_argument('-e', '--log-level', { help: 'Log level', default: 'info' });
|
|
31
|
-
parser.add_argument('-
|
|
32
|
-
help: 'Dump the coverage information to the target file every N
|
|
33
|
-
default:
|
|
31
|
+
parser.add_argument('-t', '--dump-after-mins', {
|
|
32
|
+
help: 'Dump the coverage information to the target file every N minutes.',
|
|
33
|
+
default: 2
|
|
34
34
|
});
|
|
35
35
|
parser.add_argument('-d', '--debug', {
|
|
36
36
|
help: 'Print received coverage information to the terminal?',
|
|
@@ -92,7 +92,7 @@ class Main {
|
|
|
92
92
|
* @param logger - The logger to use.
|
|
93
93
|
*/
|
|
94
94
|
static maybeStartDumpTimer(config, storage, logger) {
|
|
95
|
-
if (config.
|
|
95
|
+
if (config.dump_after_mins > 0) {
|
|
96
96
|
const timer = setInterval(() => {
|
|
97
97
|
try {
|
|
98
98
|
const lines = storage.dumpToSimpleCoverageFile(config.dump_to_file);
|
|
@@ -101,7 +101,7 @@ class Main {
|
|
|
101
101
|
catch (e) {
|
|
102
102
|
logger.error('Timed coverage dump failed.', e);
|
|
103
103
|
}
|
|
104
|
-
}, config.
|
|
104
|
+
}, config.dump_after_mins * 1000 * 60);
|
|
105
105
|
process.on('SIGINT', () => {
|
|
106
106
|
// Stop the timed file dump
|
|
107
107
|
if (timer) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamscale/coverage-collector",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.6",
|
|
4
4
|
"description": "Collector for JavaScript code coverage information",
|
|
5
5
|
"main": "dist/src/main.js",
|
|
6
6
|
"bin": "dist/src/main.js",
|
|
7
|
-
"types": "dist/main.d.ts",
|
|
7
|
+
"types": "dist/src/main.d.ts",
|
|
8
8
|
"author": "CQSE GmbH",
|
|
9
9
|
"license": "Apache-2.0",
|
|
10
10
|
"repository": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"clean": "rimraf dist tsconfig.tsbuildinfo",
|
|
16
16
|
"build": "tsc",
|
|
17
|
-
"
|
|
17
|
+
"collector": "node dist/src/main.js",
|
|
18
18
|
"test": "yarn build && NODE_OPTIONS='--experimental-vm-modules' jest --forceExit --coverage --silent=true --detectOpenHandles"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|