@openreplay/tracker 16.1.0-beta.10 → 16.1.0-beta.3

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 CHANGED
@@ -725,9 +725,7 @@ class StringDictionary {
725
725
  this.backDict = {};
726
726
  this.getKey = (str) => {
727
727
  let isNew = false;
728
- // avoiding potential native object properties
729
- const safeKey = `__${str}`;
730
- if (!this.backDict[safeKey]) {
728
+ if (!this.backDict[str]) {
731
729
  isNew = true;
732
730
  // shaving the first 2 digits of the timestamp (since they are irrelevant for next millennia)
733
731
  const shavedTs = Date.now() % 10 ** (13 - 2);
@@ -739,10 +737,10 @@ class StringDictionary {
739
737
  else {
740
738
  this.lastSuffix = 1;
741
739
  }
742
- this.backDict[safeKey] = id;
740
+ this.backDict[str] = id;
743
741
  this.lastTs = shavedTs;
744
742
  }
745
- return [this.backDict[safeKey], isNew];
743
+ return [this.backDict[str], isNew];
746
744
  };
747
745
  }
748
746
  }
@@ -750,7 +748,8 @@ class AttributeSender {
750
748
  constructor(options) {
751
749
  this.sendSetAttribute = (id, name, value) => {
752
750
  if (this.isDictDisabled) {
753
- const msg = [12 /* Type.SetNodeAttribute */, id, name, value];
751
+ const attr = `${value}`;
752
+ const msg = [12 /* Type.SetNodeAttribute */, id, name, attr];
754
753
  return this.app.send(msg);
755
754
  }
756
755
  else {
@@ -4712,7 +4711,7 @@ class App {
4712
4711
  this.stopCallbacks = [];
4713
4712
  this.commitCallbacks = [];
4714
4713
  this.activityState = ActivityState.NotActive;
4715
- this.version = '16.1.0-beta.10'; // TODO: version compatability check inside each plugin.
4714
+ this.version = '16.1.0-beta.3'; // TODO: version compatability check inside each plugin.
4716
4715
  this.socketMode = false;
4717
4716
  this.compressionThreshold = 24 * 1000;
4718
4717
  this.bc = null;
@@ -5351,15 +5350,8 @@ class App {
5351
5350
  this.worker?.postMessage(this.messages);
5352
5351
  }
5353
5352
  catch (e) {
5353
+ console.log(this.messages.join('$___$'));
5354
5354
  console.error(e);
5355
- this.messages.forEach(m => {
5356
- try {
5357
- this.worker?.postMessage([m]);
5358
- }
5359
- catch (e) {
5360
- console.error(m, e);
5361
- }
5362
- });
5363
5355
  }
5364
5356
  this.commitCallbacks.forEach((cb) => cb(this.messages));
5365
5357
  this.messages.length = 0;
@@ -9188,7 +9180,7 @@ class API {
9188
9180
  this.signalStartIssue = (reason, missingApi) => {
9189
9181
  const doNotTrack = this.checkDoNotTrack();
9190
9182
  console.log("Tracker couldn't start due to:", JSON.stringify({
9191
- trackerVersion: '16.1.0-beta.10',
9183
+ trackerVersion: '16.1.0-beta.3',
9192
9184
  projectKey: this.options.projectKey,
9193
9185
  doNotTrack,
9194
9186
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,