@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/lib/index.js
CHANGED
|
@@ -4009,7 +4009,7 @@ class App {
|
|
|
4009
4009
|
this.stopCallbacks = [];
|
|
4010
4010
|
this.commitCallbacks = [];
|
|
4011
4011
|
this.activityState = ActivityState.NotActive;
|
|
4012
|
-
this.version = '18.0.8
|
|
4012
|
+
this.version = '18.0.8'; // TODO: version compatability check inside each plugin.
|
|
4013
4013
|
this.socketMode = false;
|
|
4014
4014
|
this.compressionThreshold = 24 * 1000;
|
|
4015
4015
|
this.bc = null;
|
|
@@ -4910,13 +4910,14 @@ class App {
|
|
|
4910
4910
|
}
|
|
4911
4911
|
checkSessionToken(forceNew) {
|
|
4912
4912
|
const PROTO_VERSION = "2";
|
|
4913
|
+
const versionHash = `${PROTO_VERSION}x${this.version}`;
|
|
4913
4914
|
const needReset = this.sessionStorage.getItem(this.options.session_reset_key) !== null;
|
|
4914
4915
|
let needNewSessionID = forceNew || needReset;
|
|
4915
4916
|
const sessionToken = this.session.getSessionToken(this.projectKey);
|
|
4916
4917
|
if (sessionToken) {
|
|
4917
4918
|
const storedVersion = this.sessionStorage.getItem(`${this.options.session_token_key}_version`);
|
|
4918
|
-
needNewSessionID = !storedVersion || storedVersion !==
|
|
4919
|
-
this.sessionStorage.setItem(`${this.options.session_token_key}_version`,
|
|
4919
|
+
needNewSessionID = !storedVersion || storedVersion !== versionHash;
|
|
4920
|
+
this.sessionStorage.setItem(`${this.options.session_token_key}_version`, versionHash);
|
|
4920
4921
|
}
|
|
4921
4922
|
return needNewSessionID || !sessionToken;
|
|
4922
4923
|
}
|
|
@@ -9009,7 +9010,7 @@ class ConstantProperties {
|
|
|
9009
9010
|
user_id: this.user_id,
|
|
9010
9011
|
distinct_id: this.deviceId,
|
|
9011
9012
|
sdk_edition: 'web',
|
|
9012
|
-
sdk_version: '18.0.8
|
|
9013
|
+
sdk_version: '18.0.8',
|
|
9013
9014
|
timezone: getUTCOffsetString(),
|
|
9014
9015
|
search_engine: this.searchEngine,
|
|
9015
9016
|
};
|
|
@@ -9711,7 +9712,7 @@ class API {
|
|
|
9711
9712
|
this.signalStartIssue = (reason, missingApi) => {
|
|
9712
9713
|
const doNotTrack = this.checkDoNotTrack();
|
|
9713
9714
|
console.log("Tracker couldn't start due to:", JSON.stringify({
|
|
9714
|
-
trackerVersion: '18.0.8
|
|
9715
|
+
trackerVersion: '18.0.8',
|
|
9715
9716
|
projectKey: this.options.projectKey,
|
|
9716
9717
|
doNotTrack,
|
|
9717
9718
|
reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
|