@teamscale/coverage-collector 0.0.1-beta.7 → 0.1.0-beta.2

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.
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PrettyFileLogger = void 0;
7
+ const bunyan_1 = __importDefault(require("bunyan"));
8
+ require("dotenv/config");
9
+ /**
10
+ * Class for log4j-like logger. Stream output shows less information than the
11
+ * standard JSON format of the bunyan logger and therefore has better readability.
12
+ */
13
+ class PrettyFileLogger {
14
+ constructor(outputStream) {
15
+ this.outputStream = outputStream;
16
+ }
17
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
+ write(rec) {
19
+ this.outputStream.write(`[${rec.time.toISOString()}] ${bunyan_1.default.nameFromLevel[rec.level].toUpperCase()}: ${rec.msg}\n`);
20
+ }
21
+ end() {
22
+ this.outputStream.close();
23
+ }
24
+ }
25
+ exports.PrettyFileLogger = PrettyFileLogger;
@@ -0,0 +1,5 @@
1
+ import 'dotenv/config';
2
+ /** Class for console logger. Doesn't print all information to ensure better readability. */
3
+ export declare class StdConsoleLogger {
4
+ write(rec: any): void;
5
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.StdConsoleLogger = void 0;
7
+ const bunyan_1 = __importDefault(require("bunyan"));
8
+ require("dotenv/config");
9
+ /** Class for console logger. Doesn't print all information to ensure better readability. */
10
+ class StdConsoleLogger {
11
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
+ write(rec) {
13
+ console.log(`[${rec.time.toISOString()}] ${bunyan_1.default.nameFromLevel[rec.level].toUpperCase()}: ${rec.msg}`);
14
+ }
15
+ }
16
+ exports.StdConsoleLogger = StdConsoleLogger;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamscale/coverage-collector",
3
- "version": "0.0.1-beta.7",
3
+ "version": "0.1.0-beta.2",
4
4
  "description": "Collector for JavaScript code coverage information",
5
5
  "main": "dist/src/main.js",
6
6
  "bin": "dist/src/main.js",
@@ -11,49 +11,53 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/cqse/teamscale-javascript-profiler.git"
13
13
  },
14
- "scripts": {
15
- "clean": "rimraf dist tsconfig.tsbuildinfo",
16
- "build": "tsc",
17
- "collector": "node dist/src/main.js",
18
- "test": "yarn build && NODE_OPTIONS='--experimental-vm-modules' jest --forceExit --coverage --silent=true --detectOpenHandles"
19
- },
20
14
  "files": [
21
15
  "dist/**/*"
22
16
  ],
23
17
  "dependencies": {
24
- "@cqse/commons": "^0.0.1-beta.1",
18
+ "@cqse/commons": "0.0.1-beta.59",
25
19
  "argparse": "^2.0.1",
26
- "async": "^3.2.0",
27
- "axios": "^0.24.0",
28
- "dotenv": "^14.1.0",
20
+ "async": "^3.2.4",
21
+ "axios": "^1.6.2",
22
+ "bunyan": "^1.8.15",
23
+ "date-and-time": "^3.0.3",
24
+ "dotenv": "^16.3.1",
25
+ "express": "^4.18.2",
29
26
  "form-data": "^4.0.0",
30
- "rxjs": "^7.1.0",
31
- "source-map": "^0.7.3",
27
+ "mkdirp": "^3.0.1",
28
+ "rxjs": "^7.8.1",
29
+ "source-map": "^0.7.4",
32
30
  "tmp": "^0.2.1",
33
31
  "typescript-optional": "^2.0.1",
34
- "winston": "^3.3.3",
35
- "ws": "^7.4.5"
32
+ "ws": "^8.14.2"
36
33
  },
37
34
  "devDependencies": {
38
- "@babel/core": "^7.14.0",
39
- "@babel/preset-env": "^7.14.1",
40
- "@types/argparse": "^2.0.5",
41
- "@types/async": "^3.2.6",
42
- "@types/jest": "^27.0.1",
43
- "@types/node": "^15.0.1",
44
- "@types/source-map": "^0.5.7",
45
- "@types/tmp": "^0.2.3",
46
- "@types/winston": "^2.4.4",
47
- "@types/ws": "^7.4.2",
48
- "babel-jest": "^27.2.0",
49
- "esbuild": "^0.13.4",
50
- "jest": "^27.2.0",
51
- "rimraf": "^3.0.2",
52
- "ts-jest": "^27.0.5",
53
- "ts-node": "^10.2.1",
54
- "typescript": "^4.4.3"
35
+ "@babel/core": "^7.23.2",
36
+ "@babel/preset-env": "^7.23.2",
37
+ "@types/argparse": "^2.0.12",
38
+ "@types/async": "^3.2.22",
39
+ "@types/bunyan": "^1.8.10",
40
+ "@types/express": "^4.17.20",
41
+ "@types/jest": "^29.5.6",
42
+ "@types/node": "^20.8.6",
43
+ "@types/tmp": "^0.2.4",
44
+ "@types/ws": "^8.5.7",
45
+ "babel-jest": "^29.7.0",
46
+ "esbuild": "^0.19.5",
47
+ "jest": "^29.7.0",
48
+ "mockttp": "^3.9.4",
49
+ "rimraf": "^5.0.5",
50
+ "ts-jest": "^29.1.1",
51
+ "ts-node": "^10.9.1",
52
+ "typescript": "^5.2.2"
55
53
  },
56
54
  "publishConfig": {
57
55
  "access": "public"
56
+ },
57
+ "scripts": {
58
+ "clean": "rimraf dist tsconfig.tsbuildinfo",
59
+ "build": "tsc",
60
+ "collector": "node dist/src/main.js",
61
+ "test": "pnpm build && NODE_OPTIONS='--experimental-vm-modules' jest --coverage --silent=true --detectOpenHandles --forceExit"
58
62
  }
59
- }
63
+ }