@openreplay/tracker 18.0.8-beta.6 → 18.0.8
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/dist/cjs/entry.js +6 -5
- package/dist/cjs/entry.js.map +1 -1
- package/dist/cjs/index.js +6 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/lib/entry.js +6 -5
- package/dist/lib/entry.js.map +1 -1
- package/dist/lib/index.js +6 -5
- package/dist/lib/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/entry.js
CHANGED
|
@@ -4013,7 +4013,7 @@ class App {
|
|
|
4013
4013
|
this.stopCallbacks = [];
|
|
4014
4014
|
this.commitCallbacks = [];
|
|
4015
4015
|
this.activityState = ActivityState.NotActive;
|
|
4016
|
-
this.version = '18.0.8
|
|
4016
|
+
this.version = '18.0.8'; // TODO: version compatability check inside each plugin.
|
|
4017
4017
|
this.socketMode = false;
|
|
4018
4018
|
this.compressionThreshold = 24 * 1000;
|
|
4019
4019
|
this.bc = null;
|
|
@@ -4914,13 +4914,14 @@ class App {
|
|
|
4914
4914
|
}
|
|
4915
4915
|
checkSessionToken(forceNew) {
|
|
4916
4916
|
const PROTO_VERSION = "2";
|
|
4917
|
+
const versionHash = `${PROTO_VERSION}x${this.version}`;
|
|
4917
4918
|
const needReset = this.sessionStorage.getItem(this.options.session_reset_key) !== null;
|
|
4918
4919
|
let needNewSessionID = forceNew || needReset;
|
|
4919
4920
|
const sessionToken = this.session.getSessionToken(this.projectKey);
|
|
4920
4921
|
if (sessionToken) {
|
|
4921
4922
|
const storedVersion = this.sessionStorage.getItem(`${this.options.session_token_key}_version`);
|
|
4922
|
-
needNewSessionID = !storedVersion || storedVersion !==
|
|
4923
|
-
this.sessionStorage.setItem(`${this.options.session_token_key}_version`,
|
|
4923
|
+
needNewSessionID = !storedVersion || storedVersion !== versionHash;
|
|
4924
|
+
this.sessionStorage.setItem(`${this.options.session_token_key}_version`, versionHash);
|
|
4924
4925
|
}
|
|
4925
4926
|
return needNewSessionID || !sessionToken;
|
|
4926
4927
|
}
|
|
@@ -9013,7 +9014,7 @@ class ConstantProperties {
|
|
|
9013
9014
|
user_id: this.user_id,
|
|
9014
9015
|
distinct_id: this.deviceId,
|
|
9015
9016
|
sdk_edition: 'web',
|
|
9016
|
-
sdk_version: '18.0.8
|
|
9017
|
+
sdk_version: '18.0.8',
|
|
9017
9018
|
timezone: getUTCOffsetString(),
|
|
9018
9019
|
search_engine: this.searchEngine,
|
|
9019
9020
|
};
|
|
@@ -9715,7 +9716,7 @@ class API {
|
|
|
9715
9716
|
this.signalStartIssue = (reason, missingApi) => {
|
|
9716
9717
|
const doNotTrack = this.checkDoNotTrack();
|
|
9717
9718
|
console.log("Tracker couldn't start due to:", JSON.stringify({
|
|
9718
|
-
trackerVersion: '18.0.8
|
|
9719
|
+
trackerVersion: '18.0.8',
|
|
9719
9720
|
projectKey: this.options.projectKey,
|
|
9720
9721
|
doNotTrack,
|
|
9721
9722
|
reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
|