@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/lib/index.js
CHANGED
|
@@ -4644,7 +4644,7 @@ class App {
|
|
|
4644
4644
|
this.stopCallbacks = [];
|
|
4645
4645
|
this.commitCallbacks = [];
|
|
4646
4646
|
this.activityState = ActivityState.NotActive;
|
|
4647
|
-
this.version = '15.0.
|
|
4647
|
+
this.version = '15.0.3'; // TODO: version compatability check inside each plugin.
|
|
4648
4648
|
this.socketMode = false;
|
|
4649
4649
|
this.compressionThreshold = 24 * 1000;
|
|
4650
4650
|
this.bc = null;
|
|
@@ -8805,6 +8805,9 @@ function Network (app, opts = {}) {
|
|
|
8805
8805
|
/* ====== modern way ====== */
|
|
8806
8806
|
if (options.useProxy) {
|
|
8807
8807
|
return createNetworkProxy(context, options.ignoreHeaders, setSessionTokenHeader, sanitize, (message) => {
|
|
8808
|
+
if (options.failuresOnly && message.status < 400) {
|
|
8809
|
+
return;
|
|
8810
|
+
}
|
|
8808
8811
|
app.send(NetworkRequest(message.requestType, message.method, message.url, message.request, message.response, message.status, message.startTime + getTimeOrigin(), message.duration, message.responseSize));
|
|
8809
8812
|
}, (url) => app.isServiceURL(url), { xhr: true, fetch: true, beacon: true }, options.tokenUrlMatcher);
|
|
8810
8813
|
}
|
|
@@ -9042,7 +9045,7 @@ function processOptions(obj) {
|
|
|
9042
9045
|
}
|
|
9043
9046
|
const canAccessTop = () => {
|
|
9044
9047
|
try {
|
|
9045
|
-
return Boolean(window.top);
|
|
9048
|
+
return Boolean(window.top?.document);
|
|
9046
9049
|
}
|
|
9047
9050
|
catch {
|
|
9048
9051
|
return false;
|
|
@@ -9065,7 +9068,7 @@ class API {
|
|
|
9065
9068
|
const orig = this.options.ingestPoint || DEFAULT_INGEST_POINT;
|
|
9066
9069
|
req.open('POST', orig + '/v1/web/not-started');
|
|
9067
9070
|
req.send(JSON.stringify({
|
|
9068
|
-
trackerVersion: '15.0.
|
|
9071
|
+
trackerVersion: '15.0.3',
|
|
9069
9072
|
projectKey: this.options.projectKey,
|
|
9070
9073
|
doNotTrack,
|
|
9071
9074
|
reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
|
|
@@ -9098,7 +9101,7 @@ class API {
|
|
|
9098
9101
|
return;
|
|
9099
9102
|
}
|
|
9100
9103
|
if (window.__OPENREPLAY__ ||
|
|
9101
|
-
(!this.crossdomainMode && inIframe() && canAccessTop() && window.top
|
|
9104
|
+
(!this.crossdomainMode && inIframe() && canAccessTop() && window.top.__OPENREPLAY__)) {
|
|
9102
9105
|
console.error('OpenReplay: one tracker instance has been initialised already');
|
|
9103
9106
|
return;
|
|
9104
9107
|
}
|