@openreplay/tracker 16.0.2 → 16.1.0-beta.1
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 +15 -8
- package/dist/cjs/entry.js.map +1 -1
- package/dist/cjs/index.js +15 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/main/modules/attributeSender.d.ts +2 -2
- package/dist/lib/entry.js +15 -8
- package/dist/lib/entry.js.map +1 -1
- package/dist/lib/index.js +15 -8
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/main/modules/attributeSender.d.ts +2 -2
- package/dist/types/main/modules/attributeSender.d.ts +2 -2
- package/package.json +1 -1
package/dist/lib/index.js
CHANGED
|
@@ -721,9 +721,7 @@ class StringDictionary {
|
|
|
721
721
|
this.backDict = {};
|
|
722
722
|
this.getKey = (str) => {
|
|
723
723
|
let isNew = false;
|
|
724
|
-
|
|
725
|
-
const safeKey = `__${str}`;
|
|
726
|
-
if (!this.backDict[safeKey]) {
|
|
724
|
+
if (!this.backDict[str]) {
|
|
727
725
|
isNew = true;
|
|
728
726
|
// shaving the first 2 digits of the timestamp (since they are irrelevant for next millennia)
|
|
729
727
|
const shavedTs = Date.now() % 10 ** (13 - 2);
|
|
@@ -735,10 +733,10 @@ class StringDictionary {
|
|
|
735
733
|
else {
|
|
736
734
|
this.lastSuffix = 1;
|
|
737
735
|
}
|
|
738
|
-
this.backDict[
|
|
736
|
+
this.backDict[str] = id;
|
|
739
737
|
this.lastTs = shavedTs;
|
|
740
738
|
}
|
|
741
|
-
return [this.backDict[
|
|
739
|
+
return [this.backDict[str], isNew];
|
|
742
740
|
};
|
|
743
741
|
}
|
|
744
742
|
}
|
|
@@ -4708,7 +4706,7 @@ class App {
|
|
|
4708
4706
|
this.stopCallbacks = [];
|
|
4709
4707
|
this.commitCallbacks = [];
|
|
4710
4708
|
this.activityState = ActivityState.NotActive;
|
|
4711
|
-
this.version = '16.0.
|
|
4709
|
+
this.version = '16.1.0-beta.1'; // TODO: version compatability check inside each plugin.
|
|
4712
4710
|
this.socketMode = false;
|
|
4713
4711
|
this.compressionThreshold = 24 * 1000;
|
|
4714
4712
|
this.bc = null;
|
|
@@ -5343,7 +5341,16 @@ class App {
|
|
|
5343
5341
|
requestIdleCb(() => {
|
|
5344
5342
|
this.messages.unshift(TabData(this.session.getTabId()));
|
|
5345
5343
|
this.messages.unshift(Timestamp(this.timestamp()));
|
|
5346
|
-
|
|
5344
|
+
if (this.messages.length > 3) {
|
|
5345
|
+
console.log(this.messages);
|
|
5346
|
+
}
|
|
5347
|
+
try {
|
|
5348
|
+
this.worker?.postMessage(this.messages);
|
|
5349
|
+
}
|
|
5350
|
+
catch (e) {
|
|
5351
|
+
console.log(this.messages.join(','));
|
|
5352
|
+
console.error(e);
|
|
5353
|
+
}
|
|
5347
5354
|
this.commitCallbacks.forEach((cb) => cb(this.messages));
|
|
5348
5355
|
this.messages.length = 0;
|
|
5349
5356
|
});
|
|
@@ -9171,7 +9178,7 @@ class API {
|
|
|
9171
9178
|
this.signalStartIssue = (reason, missingApi) => {
|
|
9172
9179
|
const doNotTrack = this.checkDoNotTrack();
|
|
9173
9180
|
console.log("Tracker couldn't start due to:", JSON.stringify({
|
|
9174
|
-
trackerVersion: '16.0.
|
|
9181
|
+
trackerVersion: '16.1.0-beta.1',
|
|
9175
9182
|
projectKey: this.options.projectKey,
|
|
9176
9183
|
doNotTrack,
|
|
9177
9184
|
reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
|