@openreplay/tracker 18.0.13 → 18.0.14-beta.0

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/index.js CHANGED
@@ -3719,6 +3719,19 @@ class TopObserver extends Observer {
3719
3719
  // it has no node_id here
3720
3720
  this.app.nodes.callNodeCallbacks(document, true);
3721
3721
  }, window.document.documentElement);
3722
+ // DEBUG orload
3723
+ const markCandidates = [
3724
+ document.head,
3725
+ document.body,
3726
+ document.body ? document.body.querySelector('div') : null,
3727
+ ];
3728
+ for (const candidate of markCandidates) {
3729
+ const markId = candidate ? this.app.nodes.getID(candidate) : undefined;
3730
+ if (markId !== undefined) {
3731
+ this.app.send(SetNodeAttribute(markId, 'orloaded', 'true'));
3732
+ break;
3733
+ }
3734
+ }
3722
3735
  }
3723
3736
  crossdomainObserve(rootNodeId, frameOder, frameLevel) {
3724
3737
  const observer = this;
@@ -4099,7 +4112,7 @@ class App {
4099
4112
  this.stopCallbacks = [];
4100
4113
  this.commitCallbacks = [];
4101
4114
  this.activityState = ActivityState.NotActive;
4102
- this.version = '18.0.13'; // TODO: version compatability check inside each plugin.
4115
+ this.version = '18.0.14-beta.0'; // TODO: version compatability check inside each plugin.
4103
4116
  this.socketMode = false;
4104
4117
  this.compressionThreshold = 24 * 1000;
4105
4118
  this.bc = null;
@@ -7805,7 +7818,7 @@ class NetworkMessage {
7805
7818
  return null;
7806
7819
  const gqlHeader = "application/graphql-response";
7807
7820
  const isGraphql = messageInfo.url.includes("/graphql")
7808
- || Object.values(messageInfo.request.headers).some(v => v.includes(gqlHeader));
7821
+ || Object.values(messageInfo.request.headers).some(v => v && typeof v === 'string' && v.includes(gqlHeader));
7809
7822
  if (isGraphql && messageInfo.response.body && typeof messageInfo.response.body === 'string') {
7810
7823
  const isError = messageInfo.response.body.includes("errors");
7811
7824
  messageInfo.status = isError ? 400 : 200;
@@ -7909,6 +7922,7 @@ const genStringBody = (body) => {
7909
7922
  }
7910
7923
  else if (body instanceof Blob ||
7911
7924
  body instanceof ReadableStream ||
7925
+ ArrayBuffer.isView(body) ||
7912
7926
  body instanceof ArrayBuffer) {
7913
7927
  result = 'byte data';
7914
7928
  }
@@ -9397,7 +9411,7 @@ class ConstantProperties {
9397
9411
  user_id: this.user_id,
9398
9412
  distinct_id: this.deviceId,
9399
9413
  sdk_edition: 'web',
9400
- sdk_version: '18.0.13',
9414
+ sdk_version: '18.0.14-beta.0',
9401
9415
  timezone: getUTCOffsetString(),
9402
9416
  search_engine: this.searchEngine,
9403
9417
  };
@@ -10099,7 +10113,7 @@ class API {
10099
10113
  this.signalStartIssue = (reason, missingApi) => {
10100
10114
  const doNotTrack = this.checkDoNotTrack();
10101
10115
  console.log("Tracker couldn't start due to:", JSON.stringify({
10102
- trackerVersion: '18.0.13',
10116
+ trackerVersion: '18.0.14-beta.0',
10103
10117
  projectKey: this.options.projectKey,
10104
10118
  doNotTrack,
10105
10119
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,