@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/lib/index.js CHANGED
@@ -3715,6 +3715,19 @@ class TopObserver extends Observer {
3715
3715
  // it has no node_id here
3716
3716
  this.app.nodes.callNodeCallbacks(document, true);
3717
3717
  }, window.document.documentElement);
3718
+ // DEBUG orload
3719
+ const markCandidates = [
3720
+ document.head,
3721
+ document.body,
3722
+ document.body ? document.body.querySelector('div') : null,
3723
+ ];
3724
+ for (const candidate of markCandidates) {
3725
+ const markId = candidate ? this.app.nodes.getID(candidate) : undefined;
3726
+ if (markId !== undefined) {
3727
+ this.app.send(SetNodeAttribute(markId, 'orloaded', 'true'));
3728
+ break;
3729
+ }
3730
+ }
3718
3731
  }
3719
3732
  crossdomainObserve(rootNodeId, frameOder, frameLevel) {
3720
3733
  const observer = this;
@@ -4095,7 +4108,7 @@ class App {
4095
4108
  this.stopCallbacks = [];
4096
4109
  this.commitCallbacks = [];
4097
4110
  this.activityState = ActivityState.NotActive;
4098
- this.version = '18.0.13'; // TODO: version compatability check inside each plugin.
4111
+ this.version = '18.0.14-beta.0'; // TODO: version compatability check inside each plugin.
4099
4112
  this.socketMode = false;
4100
4113
  this.compressionThreshold = 24 * 1000;
4101
4114
  this.bc = null;
@@ -7801,7 +7814,7 @@ class NetworkMessage {
7801
7814
  return null;
7802
7815
  const gqlHeader = "application/graphql-response";
7803
7816
  const isGraphql = messageInfo.url.includes("/graphql")
7804
- || Object.values(messageInfo.request.headers).some(v => v.includes(gqlHeader));
7817
+ || Object.values(messageInfo.request.headers).some(v => v && typeof v === 'string' && v.includes(gqlHeader));
7805
7818
  if (isGraphql && messageInfo.response.body && typeof messageInfo.response.body === 'string') {
7806
7819
  const isError = messageInfo.response.body.includes("errors");
7807
7820
  messageInfo.status = isError ? 400 : 200;
@@ -7905,6 +7918,7 @@ const genStringBody = (body) => {
7905
7918
  }
7906
7919
  else if (body instanceof Blob ||
7907
7920
  body instanceof ReadableStream ||
7921
+ ArrayBuffer.isView(body) ||
7908
7922
  body instanceof ArrayBuffer) {
7909
7923
  result = 'byte data';
7910
7924
  }
@@ -9393,7 +9407,7 @@ class ConstantProperties {
9393
9407
  user_id: this.user_id,
9394
9408
  distinct_id: this.deviceId,
9395
9409
  sdk_edition: 'web',
9396
- sdk_version: '18.0.13',
9410
+ sdk_version: '18.0.14-beta.0',
9397
9411
  timezone: getUTCOffsetString(),
9398
9412
  search_engine: this.searchEngine,
9399
9413
  };
@@ -10095,7 +10109,7 @@ class API {
10095
10109
  this.signalStartIssue = (reason, missingApi) => {
10096
10110
  const doNotTrack = this.checkDoNotTrack();
10097
10111
  console.log("Tracker couldn't start due to:", JSON.stringify({
10098
- trackerVersion: '18.0.13',
10112
+ trackerVersion: '18.0.14-beta.0',
10099
10113
  projectKey: this.options.projectKey,
10100
10114
  doNotTrack,
10101
10115
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,