@openreplay/tracker 15.0.1 → 15.0.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/index.js +7 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/lib/index.js +7 -4
- package/dist/lib/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -4648,7 +4648,7 @@ class App {
|
|
|
4648
4648
|
this.stopCallbacks = [];
|
|
4649
4649
|
this.commitCallbacks = [];
|
|
4650
4650
|
this.activityState = ActivityState.NotActive;
|
|
4651
|
-
this.version = '15.0.
|
|
4651
|
+
this.version = '15.0.3'; // TODO: version compatability check inside each plugin.
|
|
4652
4652
|
this.socketMode = false;
|
|
4653
4653
|
this.compressionThreshold = 24 * 1000;
|
|
4654
4654
|
this.bc = null;
|
|
@@ -8809,6 +8809,9 @@ function Network (app, opts = {}) {
|
|
|
8809
8809
|
/* ====== modern way ====== */
|
|
8810
8810
|
if (options.useProxy) {
|
|
8811
8811
|
return createNetworkProxy(context, options.ignoreHeaders, setSessionTokenHeader, sanitize, (message) => {
|
|
8812
|
+
if (options.failuresOnly && message.status < 400) {
|
|
8813
|
+
return;
|
|
8814
|
+
}
|
|
8812
8815
|
app.send(NetworkRequest(message.requestType, message.method, message.url, message.request, message.response, message.status, message.startTime + getTimeOrigin(), message.duration, message.responseSize));
|
|
8813
8816
|
}, (url) => app.isServiceURL(url), { xhr: true, fetch: true, beacon: true }, options.tokenUrlMatcher);
|
|
8814
8817
|
}
|
|
@@ -9046,7 +9049,7 @@ function processOptions(obj) {
|
|
|
9046
9049
|
}
|
|
9047
9050
|
const canAccessTop = () => {
|
|
9048
9051
|
try {
|
|
9049
|
-
return Boolean(window.top);
|
|
9052
|
+
return Boolean(window.top?.document);
|
|
9050
9053
|
}
|
|
9051
9054
|
catch {
|
|
9052
9055
|
return false;
|
|
@@ -9069,7 +9072,7 @@ class API {
|
|
|
9069
9072
|
const orig = this.options.ingestPoint || DEFAULT_INGEST_POINT;
|
|
9070
9073
|
req.open('POST', orig + '/v1/web/not-started');
|
|
9071
9074
|
req.send(JSON.stringify({
|
|
9072
|
-
trackerVersion: '15.0.
|
|
9075
|
+
trackerVersion: '15.0.3',
|
|
9073
9076
|
projectKey: this.options.projectKey,
|
|
9074
9077
|
doNotTrack,
|
|
9075
9078
|
reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
|
|
@@ -9102,7 +9105,7 @@ class API {
|
|
|
9102
9105
|
return;
|
|
9103
9106
|
}
|
|
9104
9107
|
if (window.__OPENREPLAY__ ||
|
|
9105
|
-
(!this.crossdomainMode && inIframe() && canAccessTop() && window.top
|
|
9108
|
+
(!this.crossdomainMode && inIframe() && canAccessTop() && window.top.__OPENREPLAY__)) {
|
|
9106
9109
|
console.error('OpenReplay: one tracker instance has been initialised already');
|
|
9107
9110
|
return;
|
|
9108
9111
|
}
|