@openreplay/tracker 9.0.11-beta.14 → 9.0.12
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/CHANGELOG.md +2 -1
- package/cjs/app/index.js +2 -2
- package/cjs/index.js +1 -1
- package/cjs/modules/timing.js +5 -0
- package/lib/app/index.js +2 -2
- package/lib/index.js +1 -1
- package/lib/modules/timing.js +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# 9.0.11
|
|
2
2
|
|
|
3
|
-
- new `resetTabOnWindowOpen` option to fix window.open issue with sessionStorage being inherited (replicating tabId bug), users still should use 'noopener=true' in window.open to prevent it in general...
|
|
3
|
+
- new `resetTabOnWindowOpen` option to fix window.open issue with sessionStorage being inherited (replicating tabId bug), users still should use 'noopener=true' in window.open to prevent it in general...
|
|
4
|
+
- do not create BC channel in iframe context, add regeneration of tabid incase of duplication
|
|
4
5
|
|
|
5
6
|
# 9.0.10
|
|
6
7
|
|
package/cjs/app/index.js
CHANGED
|
@@ -39,7 +39,7 @@ class App {
|
|
|
39
39
|
this.stopCallbacks = [];
|
|
40
40
|
this.commitCallbacks = [];
|
|
41
41
|
this.activityState = ActivityState.NotActive;
|
|
42
|
-
this.version = '9.0.
|
|
42
|
+
this.version = '9.0.12'; // TODO: version compatability check inside each plugin.
|
|
43
43
|
this.compressionThreshold = 24 * 1000;
|
|
44
44
|
this.restartAttempts = 0;
|
|
45
45
|
this.bc = null;
|
|
@@ -413,7 +413,7 @@ class App {
|
|
|
413
413
|
const needNewSessionID = startOpts.forceNew || lsReset || resetByWorker;
|
|
414
414
|
const sessionToken = this.session.getSessionToken();
|
|
415
415
|
const isNewSession = needNewSessionID || !sessionToken;
|
|
416
|
-
console.log('OpenReplay: starting session', needNewSessionID, sessionToken);
|
|
416
|
+
console.log('OpenReplay: starting session; need new session id?', needNewSessionID, 'session token: ', sessionToken);
|
|
417
417
|
return window
|
|
418
418
|
.fetch(this.options.ingestPoint + '/v1/web/start', {
|
|
419
419
|
method: 'POST',
|
package/cjs/index.js
CHANGED
|
@@ -162,7 +162,7 @@ class API {
|
|
|
162
162
|
// no-cors issue only with text/plain or not-set Content-Type
|
|
163
163
|
// req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
164
164
|
req.send(JSON.stringify({
|
|
165
|
-
trackerVersion: '9.0.
|
|
165
|
+
trackerVersion: '9.0.12',
|
|
166
166
|
projectKey: options.projectKey,
|
|
167
167
|
doNotTrack,
|
|
168
168
|
// TODO: add precise reason (an exact API missing)
|
package/cjs/modules/timing.js
CHANGED
|
@@ -77,11 +77,16 @@ function default_1(app, opts) {
|
|
|
77
77
|
if (resources !== null) {
|
|
78
78
|
resources[entry.name] = entry.startTime + entry.duration;
|
|
79
79
|
}
|
|
80
|
+
let shouldSkip = false;
|
|
80
81
|
(_a = options.excludedResourceUrls) === null || _a === void 0 ? void 0 : _a.forEach((url) => {
|
|
81
82
|
if (entry.name.startsWith(url)) {
|
|
83
|
+
shouldSkip = true;
|
|
82
84
|
return;
|
|
83
85
|
}
|
|
84
86
|
});
|
|
87
|
+
if (shouldSkip) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
85
90
|
app.send((0, messages_gen_js_1.ResourceTiming)(entry.startTime + (0, utils_js_1.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, entry.name, entry.initiatorType, entry.transferSize,
|
|
86
91
|
// @ts-ignore
|
|
87
92
|
(entry.responseStatus && entry.responseStatus === 304) || entry.transferSize === 0));
|
package/lib/app/index.js
CHANGED
|
@@ -36,7 +36,7 @@ export default class App {
|
|
|
36
36
|
this.stopCallbacks = [];
|
|
37
37
|
this.commitCallbacks = [];
|
|
38
38
|
this.activityState = ActivityState.NotActive;
|
|
39
|
-
this.version = '9.0.
|
|
39
|
+
this.version = '9.0.12'; // TODO: version compatability check inside each plugin.
|
|
40
40
|
this.compressionThreshold = 24 * 1000;
|
|
41
41
|
this.restartAttempts = 0;
|
|
42
42
|
this.bc = null;
|
|
@@ -410,7 +410,7 @@ export default class App {
|
|
|
410
410
|
const needNewSessionID = startOpts.forceNew || lsReset || resetByWorker;
|
|
411
411
|
const sessionToken = this.session.getSessionToken();
|
|
412
412
|
const isNewSession = needNewSessionID || !sessionToken;
|
|
413
|
-
console.log('OpenReplay: starting session', needNewSessionID, sessionToken);
|
|
413
|
+
console.log('OpenReplay: starting session; need new session id?', needNewSessionID, 'session token: ', sessionToken);
|
|
414
414
|
return window
|
|
415
415
|
.fetch(this.options.ingestPoint + '/v1/web/start', {
|
|
416
416
|
method: 'POST',
|
package/lib/index.js
CHANGED
|
@@ -157,7 +157,7 @@ export default class API {
|
|
|
157
157
|
// no-cors issue only with text/plain or not-set Content-Type
|
|
158
158
|
// req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
159
159
|
req.send(JSON.stringify({
|
|
160
|
-
trackerVersion: '9.0.
|
|
160
|
+
trackerVersion: '9.0.12',
|
|
161
161
|
projectKey: options.projectKey,
|
|
162
162
|
doNotTrack,
|
|
163
163
|
// TODO: add precise reason (an exact API missing)
|
package/lib/modules/timing.js
CHANGED
|
@@ -75,11 +75,16 @@ export default function (app, opts) {
|
|
|
75
75
|
if (resources !== null) {
|
|
76
76
|
resources[entry.name] = entry.startTime + entry.duration;
|
|
77
77
|
}
|
|
78
|
+
let shouldSkip = false;
|
|
78
79
|
(_a = options.excludedResourceUrls) === null || _a === void 0 ? void 0 : _a.forEach((url) => {
|
|
79
80
|
if (entry.name.startsWith(url)) {
|
|
81
|
+
shouldSkip = true;
|
|
80
82
|
return;
|
|
81
83
|
}
|
|
82
84
|
});
|
|
85
|
+
if (shouldSkip) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
83
88
|
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, entry.name, entry.initiatorType, entry.transferSize,
|
|
84
89
|
// @ts-ignore
|
|
85
90
|
(entry.responseStatus && entry.responseStatus === 304) || entry.transferSize === 0));
|