@openreplay/tracker 4.1.4-beta → 4.1.4

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/cjs/app/index.js CHANGED
@@ -32,7 +32,7 @@ class App {
32
32
  this.stopCallbacks = [];
33
33
  this.commitCallbacks = [];
34
34
  this.activityState = ActivityState.NotActive;
35
- this.version = '4.1.3'; // TODO: version compatability check inside each plugin.
35
+ this.version = '4.1.4'; // TODO: version compatability check inside each plugin.
36
36
  this.projectKey = projectKey;
37
37
  this.options = Object.assign({
38
38
  revID: '',
@@ -85,7 +85,7 @@ class App {
85
85
  }
86
86
  else if (data === 'restart') {
87
87
  this.stop(false);
88
- this.start({ forceNew: true });
88
+ this.start({ forceNew: true }); // TODO: keep userID & metadata (draw scenarios)
89
89
  }
90
90
  };
91
91
  const alertWorker = () => {
@@ -331,7 +331,8 @@ class App {
331
331
  (typeof beaconSizeLimit !== 'number' && typeof beaconSizeLimit !== 'undefined')) {
332
332
  return Promise.reject(`Incorrect server response: ${JSON.stringify(r)}`);
333
333
  }
334
- if (sessionID !== this.session.getInfo().sessionID) {
334
+ const prevSessionID = this.session.getInfo().sessionID;
335
+ if (prevSessionID && prevSessionID !== sessionID) {
335
336
  this.session.reset();
336
337
  }
337
338
  this.session.setSessionToken(token);
package/cjs/index.js CHANGED
@@ -133,7 +133,7 @@ class API {
133
133
  // no-cors issue only with text/plain or not-set Content-Type
134
134
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
135
135
  req.send(JSON.stringify({
136
- trackerVersion: '4.1.3',
136
+ trackerVersion: '4.1.4',
137
137
  projectKey: options.projectKey,
138
138
  doNotTrack,
139
139
  // TODO: add precise reason (an exact API missing)
package/lib/app/index.js CHANGED
@@ -29,7 +29,7 @@ export default class App {
29
29
  this.stopCallbacks = [];
30
30
  this.commitCallbacks = [];
31
31
  this.activityState = ActivityState.NotActive;
32
- this.version = '4.1.3'; // TODO: version compatability check inside each plugin.
32
+ this.version = '4.1.4'; // TODO: version compatability check inside each plugin.
33
33
  this.projectKey = projectKey;
34
34
  this.options = Object.assign({
35
35
  revID: '',
@@ -82,7 +82,7 @@ export default class App {
82
82
  }
83
83
  else if (data === 'restart') {
84
84
  this.stop(false);
85
- this.start({ forceNew: true });
85
+ this.start({ forceNew: true }); // TODO: keep userID & metadata (draw scenarios)
86
86
  }
87
87
  };
88
88
  const alertWorker = () => {
@@ -328,7 +328,8 @@ export default class App {
328
328
  (typeof beaconSizeLimit !== 'number' && typeof beaconSizeLimit !== 'undefined')) {
329
329
  return Promise.reject(`Incorrect server response: ${JSON.stringify(r)}`);
330
330
  }
331
- if (sessionID !== this.session.getInfo().sessionID) {
331
+ const prevSessionID = this.session.getInfo().sessionID;
332
+ if (prevSessionID && prevSessionID !== sessionID) {
332
333
  this.session.reset();
333
334
  }
334
335
  this.session.setSessionToken(token);
package/lib/index.js CHANGED
@@ -128,7 +128,7 @@ export default class API {
128
128
  // no-cors issue only with text/plain or not-set Content-Type
129
129
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
130
130
  req.send(JSON.stringify({
131
- trackerVersion: '4.1.3',
131
+ trackerVersion: '4.1.4',
132
132
  projectKey: options.projectKey,
133
133
  doNotTrack,
134
134
  // TODO: add precise reason (an exact API missing)
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": "4.1.4-beta",
4
+ "version": "4.1.4",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"