@openreplay/tracker 18.0.2 → 18.0.4
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/entry.js +6 -5
- package/dist/cjs/entry.js.map +1 -1
- package/dist/cjs/index.js +6 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/lib/entry.js +6 -5
- package/dist/lib/entry.js.map +1 -1
- package/dist/lib/index.js +6 -5
- package/dist/lib/index.js.map +1 -1
- package/package.json +2 -2
package/dist/lib/entry.js
CHANGED
|
@@ -4005,7 +4005,7 @@ class App {
|
|
|
4005
4005
|
this.stopCallbacks = [];
|
|
4006
4006
|
this.commitCallbacks = [];
|
|
4007
4007
|
this.activityState = ActivityState.NotActive;
|
|
4008
|
-
this.version = '18.0.
|
|
4008
|
+
this.version = '18.0.4'; // TODO: version compatability check inside each plugin.
|
|
4009
4009
|
this.socketMode = false;
|
|
4010
4010
|
this.compressionThreshold = 24 * 1000;
|
|
4011
4011
|
this.bc = null;
|
|
@@ -5194,7 +5194,7 @@ class App {
|
|
|
5194
5194
|
...this.getTrackerInfo(),
|
|
5195
5195
|
timestamp,
|
|
5196
5196
|
doNotRecord: false,
|
|
5197
|
-
bufferDiff: timestamp - this.coldStartTs,
|
|
5197
|
+
bufferDiff: this.coldStartTs ? timestamp - this.coldStartTs : 0,
|
|
5198
5198
|
userID: this.session.getInfo().userID,
|
|
5199
5199
|
token: isNewSession ? undefined : sessionToken,
|
|
5200
5200
|
deviceMemory,
|
|
@@ -7380,7 +7380,7 @@ class NetworkMessage {
|
|
|
7380
7380
|
return null;
|
|
7381
7381
|
const gqlHeader = "application/graphql-response";
|
|
7382
7382
|
const isGraphql = messageInfo.url.includes("/graphql")
|
|
7383
|
-
|| Object.values(messageInfo.request.headers).some(v => v.includes(gqlHeader));
|
|
7383
|
+
|| Object.values(messageInfo.request.headers).some(v => v && v.includes(gqlHeader));
|
|
7384
7384
|
if (isGraphql && messageInfo.response.body && typeof messageInfo.response.body === 'string') {
|
|
7385
7385
|
const isError = messageInfo.response.body.includes("errors");
|
|
7386
7386
|
messageInfo.status = isError ? 400 : 200;
|
|
@@ -7484,6 +7484,7 @@ const genStringBody = (body) => {
|
|
|
7484
7484
|
}
|
|
7485
7485
|
else if (body instanceof Blob ||
|
|
7486
7486
|
body instanceof ReadableStream ||
|
|
7487
|
+
ArrayBuffer.isView(body) ||
|
|
7487
7488
|
body instanceof ArrayBuffer) {
|
|
7488
7489
|
result = 'byte data';
|
|
7489
7490
|
}
|
|
@@ -8972,7 +8973,7 @@ class ConstantProperties {
|
|
|
8972
8973
|
user_id: this.user_id,
|
|
8973
8974
|
distinct_id: this.deviceId,
|
|
8974
8975
|
sdk_edition: 'web',
|
|
8975
|
-
sdk_version: '18.0.
|
|
8976
|
+
sdk_version: '18.0.4',
|
|
8976
8977
|
timezone: getUTCOffsetString(),
|
|
8977
8978
|
search_engine: this.searchEngine,
|
|
8978
8979
|
};
|
|
@@ -9674,7 +9675,7 @@ class API {
|
|
|
9674
9675
|
this.signalStartIssue = (reason, missingApi) => {
|
|
9675
9676
|
const doNotTrack = this.checkDoNotTrack();
|
|
9676
9677
|
console.log("Tracker couldn't start due to:", JSON.stringify({
|
|
9677
|
-
trackerVersion: '18.0.
|
|
9678
|
+
trackerVersion: '18.0.4',
|
|
9678
9679
|
projectKey: this.options.projectKey,
|
|
9679
9680
|
doNotTrack,
|
|
9680
9681
|
reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
|