@openreplay/tracker 16.1.0-beta.5 → 16.1.0-beta.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/lib/index.js CHANGED
@@ -743,10 +743,8 @@ class StringDictionary {
743
743
  class AttributeSender {
744
744
  constructor(options) {
745
745
  this.sendSetAttribute = (id, name, value) => {
746
- let attr = `${value}`;
747
- if (attr.includes('[native code]')) {
748
- attr = attr.replace('[native code]', '');
749
- }
746
+ // @ts-ignore
747
+ const attr = typeof value === 'string' ? value : (value.toString?.() ?? '');
750
748
  if (this.isDictDisabled) {
751
749
  const msg = [12 /* Type.SetNodeAttribute */, id, name, attr];
752
750
  return this.app.send(msg);
@@ -4710,7 +4708,7 @@ class App {
4710
4708
  this.stopCallbacks = [];
4711
4709
  this.commitCallbacks = [];
4712
4710
  this.activityState = ActivityState.NotActive;
4713
- this.version = '16.1.0-beta.5'; // TODO: version compatability check inside each plugin.
4711
+ this.version = '16.1.0-beta.8'; // TODO: version compatability check inside each plugin.
4714
4712
  this.socketMode = false;
4715
4713
  this.compressionThreshold = 24 * 1000;
4716
4714
  this.bc = null;
@@ -5351,6 +5349,14 @@ class App {
5351
5349
  catch (e) {
5352
5350
  console.log(this.messages.join('$___$'));
5353
5351
  console.error(e);
5352
+ this.messages.forEach(m => {
5353
+ try {
5354
+ this.worker?.postMessage([m]);
5355
+ }
5356
+ catch (e) {
5357
+ console.error(m, e);
5358
+ }
5359
+ });
5354
5360
  }
5355
5361
  this.commitCallbacks.forEach((cb) => cb(this.messages));
5356
5362
  this.messages.length = 0;
@@ -9179,7 +9185,7 @@ class API {
9179
9185
  this.signalStartIssue = (reason, missingApi) => {
9180
9186
  const doNotTrack = this.checkDoNotTrack();
9181
9187
  console.log("Tracker couldn't start due to:", JSON.stringify({
9182
- trackerVersion: '16.1.0-beta.5',
9188
+ trackerVersion: '16.1.0-beta.8',
9183
9189
  projectKey: this.options.projectKey,
9184
9190
  doNotTrack,
9185
9191
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,