@openreplay/tracker 12.0.9-beta.7 → 12.0.10

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,3 +1,7 @@
1
+ # 12.0.10
2
+
3
+ - improved logs for node binding errors, full nodelist clear before start, getSessionInfo method
4
+
1
5
  # 12.0.9
2
6
 
3
7
  - moved logging to query
package/cjs/app/index.js CHANGED
@@ -80,7 +80,7 @@ class App {
80
80
  this.stopCallbacks = [];
81
81
  this.commitCallbacks = [];
82
82
  this.activityState = ActivityState.NotActive;
83
- this.version = '12.0.9-beta.7'; // TODO: version compatability check inside each plugin.
83
+ this.version = '12.0.10'; // TODO: version compatability check inside each plugin.
84
84
  this.compressionThreshold = 24 * 1000;
85
85
  this.restartAttempts = 0;
86
86
  this.bc = null;
@@ -7,7 +7,7 @@ interface UserInfo {
7
7
  userOS: string;
8
8
  userState: string;
9
9
  }
10
- interface SessionInfo {
10
+ export interface SessionInfo {
11
11
  sessionID: string | undefined;
12
12
  metadata: Record<string, string>;
13
13
  userID: string | null;
package/cjs/index.d.ts CHANGED
@@ -12,6 +12,7 @@ import type { Options as PerformanceOptions } from './modules/performance.js';
12
12
  import type { Options as TimingOptions } from './modules/timing.js';
13
13
  import type { Options as NetworkOptions } from './modules/network.js';
14
14
  import type { MouseHandlerOptions } from './modules/mouse.js';
15
+ import type { SessionInfo } from './app/session.js';
15
16
  import type { StartOptions } from './app/index.js';
16
17
  import type { StartPromiseReturn } from './app/index.js';
17
18
  export type Options = Partial<AppOptions & ConsoleOptions & ExceptionOptions & InputOptions & PerformanceOptions & TimingOptions> & {
@@ -89,6 +90,7 @@ export default class API {
89
90
  stop(): string | undefined;
90
91
  forceFlushBatch(): void;
91
92
  getSessionToken(): string | null | undefined;
93
+ getSessionInfo(): SessionInfo | null;
92
94
  getSessionID(): string | null | undefined;
93
95
  getTabId(): string | null;
94
96
  getUxId(): number | null;
package/cjs/index.js CHANGED
@@ -97,7 +97,7 @@ class API {
97
97
  const orig = this.options.ingestPoint || index_js_1.DEFAULT_INGEST_POINT;
98
98
  req.open('POST', orig + '/v1/web/not-started');
99
99
  req.send(JSON.stringify({
100
- trackerVersion: '12.0.9-beta.7',
100
+ trackerVersion: '12.0.10',
101
101
  projectKey: this.options.projectKey,
102
102
  doNotTrack,
103
103
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
@@ -354,6 +354,12 @@ class API {
354
354
  }
355
355
  return this.app.getSessionToken();
356
356
  }
357
+ getSessionInfo() {
358
+ if (this.app === null) {
359
+ return null;
360
+ }
361
+ return this.app.session.getInfo();
362
+ }
357
363
  getSessionID() {
358
364
  if (this.app === null) {
359
365
  return null;
package/lib/app/index.js CHANGED
@@ -51,7 +51,7 @@ export default class App {
51
51
  this.stopCallbacks = [];
52
52
  this.commitCallbacks = [];
53
53
  this.activityState = ActivityState.NotActive;
54
- this.version = '12.0.9-beta.7'; // TODO: version compatability check inside each plugin.
54
+ this.version = '12.0.10'; // TODO: version compatability check inside each plugin.
55
55
  this.compressionThreshold = 24 * 1000;
56
56
  this.restartAttempts = 0;
57
57
  this.bc = null;
@@ -7,7 +7,7 @@ interface UserInfo {
7
7
  userOS: string;
8
8
  userState: string;
9
9
  }
10
- interface SessionInfo {
10
+ export interface SessionInfo {
11
11
  sessionID: string | undefined;
12
12
  metadata: Record<string, string>;
13
13
  userID: string | null;
package/lib/index.d.ts CHANGED
@@ -12,6 +12,7 @@ import type { Options as PerformanceOptions } from './modules/performance.js';
12
12
  import type { Options as TimingOptions } from './modules/timing.js';
13
13
  import type { Options as NetworkOptions } from './modules/network.js';
14
14
  import type { MouseHandlerOptions } from './modules/mouse.js';
15
+ import type { SessionInfo } from './app/session.js';
15
16
  import type { StartOptions } from './app/index.js';
16
17
  import type { StartPromiseReturn } from './app/index.js';
17
18
  export type Options = Partial<AppOptions & ConsoleOptions & ExceptionOptions & InputOptions & PerformanceOptions & TimingOptions> & {
@@ -89,6 +90,7 @@ export default class API {
89
90
  stop(): string | undefined;
90
91
  forceFlushBatch(): void;
91
92
  getSessionToken(): string | null | undefined;
93
+ getSessionInfo(): SessionInfo | null;
92
94
  getSessionID(): string | null | undefined;
93
95
  getTabId(): string | null;
94
96
  getUxId(): number | null;
package/lib/index.js CHANGED
@@ -66,7 +66,7 @@ export default class API {
66
66
  const orig = this.options.ingestPoint || DEFAULT_INGEST_POINT;
67
67
  req.open('POST', orig + '/v1/web/not-started');
68
68
  req.send(JSON.stringify({
69
- trackerVersion: '12.0.9-beta.7',
69
+ trackerVersion: '12.0.10',
70
70
  projectKey: this.options.projectKey,
71
71
  doNotTrack,
72
72
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
@@ -323,6 +323,12 @@ export default class API {
323
323
  }
324
324
  return this.app.getSessionToken();
325
325
  }
326
+ getSessionInfo() {
327
+ if (this.app === null) {
328
+ return null;
329
+ }
330
+ return this.app.session.getInfo();
331
+ }
326
332
  getSessionID() {
327
333
  if (this.app === null) {
328
334
  return null;
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": "12.0.9-beta.7",
4
+ "version": "12.0.10",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"