@openreplay/tracker 5.0.5-beta.6 → 5.0.5-beta.7
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 +1 -1
- package/cjs/index.js +1 -1
- package/cjs/modules/network.js +3 -3
- package/lib/app/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/modules/network.js +3 -3
- package/package.json +1 -1
package/cjs/app/index.js
CHANGED
|
@@ -33,7 +33,7 @@ class App {
|
|
|
33
33
|
this.stopCallbacks = [];
|
|
34
34
|
this.commitCallbacks = [];
|
|
35
35
|
this.activityState = ActivityState.NotActive;
|
|
36
|
-
this.version = '5.0.5-beta.
|
|
36
|
+
this.version = '5.0.5-beta.7'; // TODO: version compatability check inside each plugin.
|
|
37
37
|
this._usingOldFetchPlugin = false;
|
|
38
38
|
this.delay = 0;
|
|
39
39
|
this.projectKey = projectKey;
|
package/cjs/index.js
CHANGED
|
@@ -140,7 +140,7 @@ class API {
|
|
|
140
140
|
// no-cors issue only with text/plain or not-set Content-Type
|
|
141
141
|
// req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
142
142
|
req.send(JSON.stringify({
|
|
143
|
-
trackerVersion: '5.0.5-beta.
|
|
143
|
+
trackerVersion: '5.0.5-beta.7',
|
|
144
144
|
projectKey: options.projectKey,
|
|
145
145
|
doNotTrack,
|
|
146
146
|
// TODO: add precise reason (an exact API missing)
|
package/cjs/modules/network.js
CHANGED
|
@@ -165,7 +165,9 @@ function default_1(app, opts = {}) {
|
|
|
165
165
|
});
|
|
166
166
|
xhr.addEventListener('load', app.safe((e) => {
|
|
167
167
|
const { headers: reqHs, body: reqBody } = getXHRRequestDataObject(xhr);
|
|
168
|
-
app.debug.log('Openreplay: XHR load
|
|
168
|
+
app.debug.log('Openreplay: XHR load', xhr, xhr.getAllResponseHeaders(), getXHRRequestDataObject(xhr));
|
|
169
|
+
if (!xhr.getAllResponseHeaders())
|
|
170
|
+
app.debug.warn('Openreplay: XHR no response headers returned');
|
|
169
171
|
const duration = startTime > 0 ? e.timeStamp - startTime : 0;
|
|
170
172
|
const hString = ignoreHeaders ? '' : xhr.getAllResponseHeaders(); // might be null (though only if no response received though)
|
|
171
173
|
const resHs = hString
|
|
@@ -202,12 +204,10 @@ function default_1(app, opts = {}) {
|
|
|
202
204
|
XMLHttpRequest.prototype.send = function (body) {
|
|
203
205
|
const rdo = getXHRRequestDataObject(this);
|
|
204
206
|
rdo.body = body;
|
|
205
|
-
app.debug.log('Openreplay: ', 'XHR send', rdo, 'XHR Object', this);
|
|
206
207
|
return nativeSend.apply(this, arguments);
|
|
207
208
|
};
|
|
208
209
|
const nativeSetRequestHeader = XMLHttpRequest.prototype.setRequestHeader;
|
|
209
210
|
XMLHttpRequest.prototype.setRequestHeader = function (name, value) {
|
|
210
|
-
app.debug.log('Openreplay: ', name, value, isHIgnored(name), getXHRRequestDataObject(this));
|
|
211
211
|
if (!isHIgnored(name)) {
|
|
212
212
|
const rdo = getXHRRequestDataObject(this);
|
|
213
213
|
rdo.headers[name] = value;
|
package/lib/app/index.js
CHANGED
|
@@ -30,7 +30,7 @@ export default class App {
|
|
|
30
30
|
this.stopCallbacks = [];
|
|
31
31
|
this.commitCallbacks = [];
|
|
32
32
|
this.activityState = ActivityState.NotActive;
|
|
33
|
-
this.version = '5.0.5-beta.
|
|
33
|
+
this.version = '5.0.5-beta.7'; // TODO: version compatability check inside each plugin.
|
|
34
34
|
this._usingOldFetchPlugin = false;
|
|
35
35
|
this.delay = 0;
|
|
36
36
|
this.projectKey = projectKey;
|
package/lib/index.js
CHANGED
|
@@ -135,7 +135,7 @@ export default class API {
|
|
|
135
135
|
// no-cors issue only with text/plain or not-set Content-Type
|
|
136
136
|
// req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
137
137
|
req.send(JSON.stringify({
|
|
138
|
-
trackerVersion: '5.0.5-beta.
|
|
138
|
+
trackerVersion: '5.0.5-beta.7',
|
|
139
139
|
projectKey: options.projectKey,
|
|
140
140
|
doNotTrack,
|
|
141
141
|
// TODO: add precise reason (an exact API missing)
|
package/lib/modules/network.js
CHANGED
|
@@ -163,7 +163,9 @@ export default function (app, opts = {}) {
|
|
|
163
163
|
});
|
|
164
164
|
xhr.addEventListener('load', app.safe((e) => {
|
|
165
165
|
const { headers: reqHs, body: reqBody } = getXHRRequestDataObject(xhr);
|
|
166
|
-
app.debug.log('Openreplay: XHR load
|
|
166
|
+
app.debug.log('Openreplay: XHR load', xhr, xhr.getAllResponseHeaders(), getXHRRequestDataObject(xhr));
|
|
167
|
+
if (!xhr.getAllResponseHeaders())
|
|
168
|
+
app.debug.warn('Openreplay: XHR no response headers returned');
|
|
167
169
|
const duration = startTime > 0 ? e.timeStamp - startTime : 0;
|
|
168
170
|
const hString = ignoreHeaders ? '' : xhr.getAllResponseHeaders(); // might be null (though only if no response received though)
|
|
169
171
|
const resHs = hString
|
|
@@ -200,12 +202,10 @@ export default function (app, opts = {}) {
|
|
|
200
202
|
XMLHttpRequest.prototype.send = function (body) {
|
|
201
203
|
const rdo = getXHRRequestDataObject(this);
|
|
202
204
|
rdo.body = body;
|
|
203
|
-
app.debug.log('Openreplay: ', 'XHR send', rdo, 'XHR Object', this);
|
|
204
205
|
return nativeSend.apply(this, arguments);
|
|
205
206
|
};
|
|
206
207
|
const nativeSetRequestHeader = XMLHttpRequest.prototype.setRequestHeader;
|
|
207
208
|
XMLHttpRequest.prototype.setRequestHeader = function (name, value) {
|
|
208
|
-
app.debug.log('Openreplay: ', name, value, isHIgnored(name), getXHRRequestDataObject(this));
|
|
209
209
|
if (!isHIgnored(name)) {
|
|
210
210
|
const rdo = getXHRRequestDataObject(this);
|
|
211
211
|
rdo.headers[name] = value;
|