@openreplay/tracker 16.4.4 → 16.4.6

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
@@ -5276,7 +5276,7 @@ class App {
5276
5276
  this.stopCallbacks = [];
5277
5277
  this.commitCallbacks = [];
5278
5278
  this.activityState = ActivityState.NotActive;
5279
- this.version = '16.4.4'; // TODO: version compatability check inside each plugin.
5279
+ this.version = '16.4.6'; // TODO: version compatability check inside each plugin.
5280
5280
  this.socketMode = false;
5281
5281
  this.compressionThreshold = 24 * 1000;
5282
5282
  this.bc = null;
@@ -7677,7 +7677,10 @@ function Timing (app, opts) {
7677
7677
  if (shouldSkip) {
7678
7678
  return;
7679
7679
  }
7680
- app.send(ResourceTiming(entry.startTime + getTimeOrigin(), entry.duration, entry.responseStart && entry.startTime ? entry.responseStart - entry.startTime : 0, entry.transferSize > entry.encodedBodySize ? entry.transferSize - entry.encodedBodySize : 0, entry.encodedBodySize || 0, entry.decodedBodySize || 0, app.sanitizer.privateMode ? entry.name.replaceAll(/./g, '*') : entry.name, entry.initiatorType, entry.transferSize,
7680
+ const entryName = options.resourceNameSanitizer
7681
+ ? options.resourceNameSanitizer(entry.name)
7682
+ : entry.name;
7683
+ app.send(ResourceTiming(entry.startTime + getTimeOrigin(), entry.duration, entry.responseStart && entry.startTime ? entry.responseStart - entry.startTime : 0, entry.transferSize > entry.encodedBodySize ? entry.transferSize - entry.encodedBodySize : 0, entry.encodedBodySize || 0, entry.decodedBodySize || 0, app.sanitizer.privateMode ? entry.name.replaceAll(/./g, '*') : entryName, entry.initiatorType, entry.transferSize,
7681
7684
  // @ts-ignore
7682
7685
  (entry.responseStatus && entry.responseStatus === 304) || entry.transferSize === 0));
7683
7686
  }
@@ -7861,9 +7864,10 @@ function Viewport (app, options) {
7861
7864
  const sendSetPageLocation = app.safe(() => {
7862
7865
  const { URL } = document;
7863
7866
  if (URL !== url) {
7864
- url = urlSanitizer(URL);
7867
+ url = URL;
7868
+ const sanitized = urlSanitizer(url);
7865
7869
  const safeTitle = app.sanitizer.privateMode ? stringWiper(document.title) : titleSanitizer(document.title);
7866
- const safeUrl = app.sanitizer.privateMode ? stringWiper(url) : url;
7870
+ const safeUrl = app.sanitizer.privateMode ? stringWiper(sanitized) : sanitized;
7867
7871
  const safeReferrer = app.sanitizer.privateMode ? stringWiper(referrer) : referrer;
7868
7872
  app.send(SetPageLocation(safeUrl, safeReferrer, navigationStart, safeTitle));
7869
7873
  navigationStart = 0;
@@ -9652,7 +9656,7 @@ class API {
9652
9656
  this.signalStartIssue = (reason, missingApi) => {
9653
9657
  const doNotTrack = this.checkDoNotTrack();
9654
9658
  console.log("Tracker couldn't start due to:", JSON.stringify({
9655
- trackerVersion: '16.4.4',
9659
+ trackerVersion: '16.4.6',
9656
9660
  projectKey: this.options.projectKey,
9657
9661
  doNotTrack,
9658
9662
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,