@openreplay/tracker 14.0.1 → 14.0.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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- # 14.0.0
1
+ # 14.0.2
2
+
3
+ - fix logger check
4
+
5
+ # 14.0.0 & .1
2
6
 
3
7
  - titles for tabs
4
8
  - new `MouseClick` message to introduce heatmaps instead of clickmaps
package/cjs/app/index.js CHANGED
@@ -94,7 +94,7 @@ class App {
94
94
  this.stopCallbacks = [];
95
95
  this.commitCallbacks = [];
96
96
  this.activityState = ActivityState.NotActive;
97
- this.version = '14.0.1'; // TODO: version compatability check inside each plugin.
97
+ this.version = '14.0.2'; // TODO: version compatability check inside each plugin.
98
98
  this.socketMode = false;
99
99
  this.compressionThreshold = 24 * 1000;
100
100
  this.bc = null;
@@ -9,8 +9,8 @@ export type ILogLevel = (typeof LogLevel)[keyof typeof LogLevel];
9
9
  export default class Logger {
10
10
  private readonly level;
11
11
  constructor(debugLevel?: ILogLevel);
12
- private shouldLog;
13
- log(...args: any[]): void;
14
- warn(...args: any[]): void;
15
- error(...args: any[]): void;
12
+ private readonly shouldLog;
13
+ log: (...args: any[]) => void;
14
+ warn: (...args: any[]) => void;
15
+ error: (...args: any[]) => void;
16
16
  }
package/cjs/app/logger.js CHANGED
@@ -10,28 +10,28 @@ exports.LogLevel = {
10
10
  };
11
11
  class Logger {
12
12
  constructor(debugLevel = exports.LogLevel.Silent) {
13
+ this.shouldLog = (level) => {
14
+ return this.level >= level;
15
+ };
16
+ this.log = (...args) => {
17
+ if (this.shouldLog(exports.LogLevel.Log)) {
18
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
19
+ console.log(...args);
20
+ }
21
+ };
22
+ this.warn = (...args) => {
23
+ if (this.shouldLog(exports.LogLevel.Warnings)) {
24
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
25
+ console.warn(...args);
26
+ }
27
+ };
28
+ this.error = (...args) => {
29
+ if (this.shouldLog(exports.LogLevel.Errors)) {
30
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
31
+ console.error(...args);
32
+ }
33
+ };
13
34
  this.level = debugLevel;
14
35
  }
15
- shouldLog(level) {
16
- return this.level >= level;
17
- }
18
- log(...args) {
19
- if (this.shouldLog(exports.LogLevel.Log)) {
20
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
21
- console.log(...args);
22
- }
23
- }
24
- warn(...args) {
25
- if (this.shouldLog(exports.LogLevel.Warnings)) {
26
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
27
- console.warn(...args);
28
- }
29
- }
30
- error(...args) {
31
- if (this.shouldLog(exports.LogLevel.Errors)) {
32
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
33
- console.error(...args);
34
- }
35
- }
36
36
  }
37
37
  exports.default = Logger;
package/cjs/index.js CHANGED
@@ -98,7 +98,7 @@ class API {
98
98
  const orig = this.options.ingestPoint || index_js_1.DEFAULT_INGEST_POINT;
99
99
  req.open('POST', orig + '/v1/web/not-started');
100
100
  req.send(JSON.stringify({
101
- trackerVersion: '14.0.1',
101
+ trackerVersion: '14.0.2',
102
102
  projectKey: this.options.projectKey,
103
103
  doNotTrack,
104
104
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
package/lib/app/index.js CHANGED
@@ -65,7 +65,7 @@ export default class App {
65
65
  this.stopCallbacks = [];
66
66
  this.commitCallbacks = [];
67
67
  this.activityState = ActivityState.NotActive;
68
- this.version = '14.0.1'; // TODO: version compatability check inside each plugin.
68
+ this.version = '14.0.2'; // TODO: version compatability check inside each plugin.
69
69
  this.socketMode = false;
70
70
  this.compressionThreshold = 24 * 1000;
71
71
  this.bc = null;
@@ -9,8 +9,8 @@ export type ILogLevel = (typeof LogLevel)[keyof typeof LogLevel];
9
9
  export default class Logger {
10
10
  private readonly level;
11
11
  constructor(debugLevel?: ILogLevel);
12
- private shouldLog;
13
- log(...args: any[]): void;
14
- warn(...args: any[]): void;
15
- error(...args: any[]): void;
12
+ private readonly shouldLog;
13
+ log: (...args: any[]) => void;
14
+ warn: (...args: any[]) => void;
15
+ error: (...args: any[]) => void;
16
16
  }
package/lib/app/logger.js CHANGED
@@ -7,27 +7,27 @@ export const LogLevel = {
7
7
  };
8
8
  export default class Logger {
9
9
  constructor(debugLevel = LogLevel.Silent) {
10
+ this.shouldLog = (level) => {
11
+ return this.level >= level;
12
+ };
13
+ this.log = (...args) => {
14
+ if (this.shouldLog(LogLevel.Log)) {
15
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
16
+ console.log(...args);
17
+ }
18
+ };
19
+ this.warn = (...args) => {
20
+ if (this.shouldLog(LogLevel.Warnings)) {
21
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
22
+ console.warn(...args);
23
+ }
24
+ };
25
+ this.error = (...args) => {
26
+ if (this.shouldLog(LogLevel.Errors)) {
27
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
28
+ console.error(...args);
29
+ }
30
+ };
10
31
  this.level = debugLevel;
11
32
  }
12
- shouldLog(level) {
13
- return this.level >= level;
14
- }
15
- log(...args) {
16
- if (this.shouldLog(LogLevel.Log)) {
17
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
18
- console.log(...args);
19
- }
20
- }
21
- warn(...args) {
22
- if (this.shouldLog(LogLevel.Warnings)) {
23
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
24
- console.warn(...args);
25
- }
26
- }
27
- error(...args) {
28
- if (this.shouldLog(LogLevel.Errors)) {
29
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
30
- console.error(...args);
31
- }
32
- }
33
33
  }
package/lib/index.js CHANGED
@@ -67,7 +67,7 @@ export default class API {
67
67
  const orig = this.options.ingestPoint || DEFAULT_INGEST_POINT;
68
68
  req.open('POST', orig + '/v1/web/not-started');
69
69
  req.send(JSON.stringify({
70
- trackerVersion: '14.0.1',
70
+ trackerVersion: '14.0.2',
71
71
  projectKey: this.options.projectKey,
72
72
  doNotTrack,
73
73
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openreplay/tracker",
3
3
  "description": "The OpenReplay tracker main package",
4
- "version": "14.0.1",
4
+ "version": "14.0.2",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"
@@ -21,7 +21,6 @@
21
21
  "rollup": "rollup --config rollup.config.js",
22
22
  "compile": "node --experimental-modules --experimental-json-modules scripts/compile.cjs",
23
23
  "build": "bun run clean && bun run tscRun && bun run rollup && bun run compile",
24
- "prepare": "cd ../../ && husky install tracker/.husky/",
25
24
  "lint-front": "lint-staged",
26
25
  "test": "jest --coverage=false",
27
26
  "test:ci": "jest --coverage=true",