@openreplay/tracker 3.4.15 → 3.4.16
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/cjs/app/index.js +14 -14
- package/cjs/index.js +1 -1
- package/cjs/modules/exception.js +8 -1
- package/lib/app/index.js +14 -14
- package/lib/index.js +1 -1
- package/lib/modules/exception.js +8 -1
- package/package.json +1 -1
package/cjs/app/index.js
CHANGED
|
@@ -17,7 +17,7 @@ class App {
|
|
|
17
17
|
this.commitCallbacks = [];
|
|
18
18
|
this._sessionID = null;
|
|
19
19
|
this.isActive = false;
|
|
20
|
-
this.version = '3.4.
|
|
20
|
+
this.version = '3.4.16';
|
|
21
21
|
this.projectKey = projectKey;
|
|
22
22
|
this.options = Object.assign({
|
|
23
23
|
revID: '',
|
|
@@ -203,18 +203,18 @@ class App {
|
|
|
203
203
|
connAttemptGap: this.options.connAttemptGap,
|
|
204
204
|
};
|
|
205
205
|
this.worker.postMessage(messageData); // brings delay of 10th ms?
|
|
206
|
-
let token = sessionStorage.getItem(this.options.session_token_key)
|
|
207
|
-
const tokenIsActive = localStorage.getItem("__or_at_" + token)
|
|
208
|
-
if (tokenIsActive) {
|
|
209
|
-
|
|
210
|
-
}
|
|
206
|
+
// let token = sessionStorage.getItem(this.options.session_token_key)
|
|
207
|
+
// const tokenIsActive = localStorage.getItem("__or_at_" + token)
|
|
208
|
+
// if (tokenIsActive) {
|
|
209
|
+
// token = null
|
|
210
|
+
// }
|
|
211
211
|
return window.fetch(this.options.ingestPoint + '/v1/web/start', {
|
|
212
212
|
method: 'POST',
|
|
213
213
|
headers: {
|
|
214
214
|
'Content-Type': 'application/json',
|
|
215
215
|
},
|
|
216
216
|
body: JSON.stringify({
|
|
217
|
-
token,
|
|
217
|
+
token: sessionStorage.getItem(this.options.session_token_key),
|
|
218
218
|
userUUID: localStorage.getItem(this.options.local_uuid_key),
|
|
219
219
|
projectKey: this.projectKey,
|
|
220
220
|
revID: this.revID,
|
|
@@ -245,13 +245,13 @@ class App {
|
|
|
245
245
|
}
|
|
246
246
|
sessionStorage.setItem(this.options.session_token_key, token);
|
|
247
247
|
localStorage.setItem(this.options.local_uuid_key, userUUID);
|
|
248
|
-
localStorage.setItem("__or_at_" + token, "true")
|
|
249
|
-
this.attachEventListener(window, 'beforeunload', ()
|
|
250
|
-
|
|
251
|
-
}, false);
|
|
252
|
-
this.attachEventListener(window, 'pagehide', ()
|
|
253
|
-
|
|
254
|
-
}, false);
|
|
248
|
+
// localStorage.setItem("__or_at_" + token, "true")
|
|
249
|
+
// this.attachEventListener(window, 'beforeunload', ()=>{
|
|
250
|
+
// localStorage.removeItem("__or_at_" + token)
|
|
251
|
+
// }, false);
|
|
252
|
+
// this.attachEventListener(window, 'pagehide', ()=>{
|
|
253
|
+
// localStorage.removeItem("__or_at_" + token)
|
|
254
|
+
// }, false);
|
|
255
255
|
if (typeof sessionID === 'string') {
|
|
256
256
|
this._sessionID = sessionID;
|
|
257
257
|
}
|
package/cjs/index.js
CHANGED
|
@@ -115,7 +115,7 @@ class API {
|
|
|
115
115
|
// no-cors issue only with text/plain or not-set Content-Type
|
|
116
116
|
// req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
117
117
|
req.send(JSON.stringify({
|
|
118
|
-
trackerVersion: '3.4.
|
|
118
|
+
trackerVersion: '3.4.16',
|
|
119
119
|
projectKey: options.projectKey,
|
|
120
120
|
doNotTrack,
|
|
121
121
|
// TODO: add precise reason (an exact API missing)
|
package/cjs/modules/exception.js
CHANGED
|
@@ -41,7 +41,14 @@ function getExceptionMessageFromEvent(e) {
|
|
|
41
41
|
return getExceptionMessage(e.reason, []);
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
|
-
|
|
44
|
+
let message;
|
|
45
|
+
try {
|
|
46
|
+
message = JSON.stringify(e.reason);
|
|
47
|
+
}
|
|
48
|
+
catch (_) {
|
|
49
|
+
message = String(e.reason);
|
|
50
|
+
}
|
|
51
|
+
return new index_js_1.JSException('Unhandled Promise Rejection', message, '[]');
|
|
45
52
|
}
|
|
46
53
|
}
|
|
47
54
|
return null;
|
package/lib/app/index.js
CHANGED
|
@@ -14,7 +14,7 @@ export default class App {
|
|
|
14
14
|
this.commitCallbacks = [];
|
|
15
15
|
this._sessionID = null;
|
|
16
16
|
this.isActive = false;
|
|
17
|
-
this.version = '3.4.
|
|
17
|
+
this.version = '3.4.16';
|
|
18
18
|
this.projectKey = projectKey;
|
|
19
19
|
this.options = Object.assign({
|
|
20
20
|
revID: '',
|
|
@@ -200,18 +200,18 @@ export default class App {
|
|
|
200
200
|
connAttemptGap: this.options.connAttemptGap,
|
|
201
201
|
};
|
|
202
202
|
this.worker.postMessage(messageData); // brings delay of 10th ms?
|
|
203
|
-
let token = sessionStorage.getItem(this.options.session_token_key)
|
|
204
|
-
const tokenIsActive = localStorage.getItem("__or_at_" + token)
|
|
205
|
-
if (tokenIsActive) {
|
|
206
|
-
|
|
207
|
-
}
|
|
203
|
+
// let token = sessionStorage.getItem(this.options.session_token_key)
|
|
204
|
+
// const tokenIsActive = localStorage.getItem("__or_at_" + token)
|
|
205
|
+
// if (tokenIsActive) {
|
|
206
|
+
// token = null
|
|
207
|
+
// }
|
|
208
208
|
return window.fetch(this.options.ingestPoint + '/v1/web/start', {
|
|
209
209
|
method: 'POST',
|
|
210
210
|
headers: {
|
|
211
211
|
'Content-Type': 'application/json',
|
|
212
212
|
},
|
|
213
213
|
body: JSON.stringify({
|
|
214
|
-
token,
|
|
214
|
+
token: sessionStorage.getItem(this.options.session_token_key),
|
|
215
215
|
userUUID: localStorage.getItem(this.options.local_uuid_key),
|
|
216
216
|
projectKey: this.projectKey,
|
|
217
217
|
revID: this.revID,
|
|
@@ -242,13 +242,13 @@ export default class App {
|
|
|
242
242
|
}
|
|
243
243
|
sessionStorage.setItem(this.options.session_token_key, token);
|
|
244
244
|
localStorage.setItem(this.options.local_uuid_key, userUUID);
|
|
245
|
-
localStorage.setItem("__or_at_" + token, "true")
|
|
246
|
-
this.attachEventListener(window, 'beforeunload', ()
|
|
247
|
-
|
|
248
|
-
}, false);
|
|
249
|
-
this.attachEventListener(window, 'pagehide', ()
|
|
250
|
-
|
|
251
|
-
}, false);
|
|
245
|
+
// localStorage.setItem("__or_at_" + token, "true")
|
|
246
|
+
// this.attachEventListener(window, 'beforeunload', ()=>{
|
|
247
|
+
// localStorage.removeItem("__or_at_" + token)
|
|
248
|
+
// }, false);
|
|
249
|
+
// this.attachEventListener(window, 'pagehide', ()=>{
|
|
250
|
+
// localStorage.removeItem("__or_at_" + token)
|
|
251
|
+
// }, false);
|
|
252
252
|
if (typeof sessionID === 'string') {
|
|
253
253
|
this._sessionID = sessionID;
|
|
254
254
|
}
|
package/lib/index.js
CHANGED
|
@@ -111,7 +111,7 @@ export default class API {
|
|
|
111
111
|
// no-cors issue only with text/plain or not-set Content-Type
|
|
112
112
|
// req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
113
113
|
req.send(JSON.stringify({
|
|
114
|
-
trackerVersion: '3.4.
|
|
114
|
+
trackerVersion: '3.4.16',
|
|
115
115
|
projectKey: options.projectKey,
|
|
116
116
|
doNotTrack,
|
|
117
117
|
// TODO: add precise reason (an exact API missing)
|
package/lib/modules/exception.js
CHANGED
|
@@ -37,7 +37,14 @@ export function getExceptionMessageFromEvent(e) {
|
|
|
37
37
|
return getExceptionMessage(e.reason, []);
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
|
-
|
|
40
|
+
let message;
|
|
41
|
+
try {
|
|
42
|
+
message = JSON.stringify(e.reason);
|
|
43
|
+
}
|
|
44
|
+
catch (_) {
|
|
45
|
+
message = String(e.reason);
|
|
46
|
+
}
|
|
47
|
+
return new JSException('Unhandled Promise Rejection', message, '[]');
|
|
41
48
|
}
|
|
42
49
|
}
|
|
43
50
|
return null;
|