@openreplay/tracker 12.0.10-beta.1 → 12.0.11
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 +1 -0
- package/bun.lockb +0 -0
- package/cjs/app/index.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/modules/Network/utils.js +6 -3
- package/lib/app/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/modules/Network/utils.js +6 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/bun.lockb
CHANGED
|
Binary file
|
package/cjs/app/index.js
CHANGED
|
@@ -80,7 +80,7 @@ class App {
|
|
|
80
80
|
this.stopCallbacks = [];
|
|
81
81
|
this.commitCallbacks = [];
|
|
82
82
|
this.activityState = ActivityState.NotActive;
|
|
83
|
-
this.version = '12.0.
|
|
83
|
+
this.version = '12.0.11'; // TODO: version compatability check inside each plugin.
|
|
84
84
|
this.compressionThreshold = 24 * 1000;
|
|
85
85
|
this.restartAttempts = 0;
|
|
86
86
|
this.bc = null;
|
package/cjs/index.js
CHANGED
|
@@ -97,7 +97,7 @@ class API {
|
|
|
97
97
|
const orig = this.options.ingestPoint || index_js_1.DEFAULT_INGEST_POINT;
|
|
98
98
|
req.open('POST', orig + '/v1/web/not-started');
|
|
99
99
|
req.send(JSON.stringify({
|
|
100
|
-
trackerVersion: '12.0.
|
|
100
|
+
trackerVersion: '12.0.11',
|
|
101
101
|
projectKey: this.options.projectKey,
|
|
102
102
|
doNotTrack,
|
|
103
103
|
reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
|
|
@@ -158,13 +158,13 @@ const genFormattedBody = (body) => {
|
|
|
158
158
|
result[key] = typeof value === 'string' ? value : '[object Object]';
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
else if (body
|
|
161
|
+
else if (ArrayBuffer.isView(body) ||
|
|
162
|
+
body instanceof Blob ||
|
|
162
163
|
body instanceof ReadableStream ||
|
|
163
164
|
body instanceof ArrayBuffer) {
|
|
164
|
-
result = 'byte data';
|
|
165
|
+
result = '[byte data]';
|
|
165
166
|
}
|
|
166
167
|
else if (isPureObject(body)) {
|
|
167
|
-
// overriding ArrayBufferView which is not convertable to string
|
|
168
168
|
result = body;
|
|
169
169
|
}
|
|
170
170
|
else {
|
|
@@ -181,6 +181,9 @@ function isIterable(value) {
|
|
|
181
181
|
if (value === null || value === undefined) {
|
|
182
182
|
return false;
|
|
183
183
|
}
|
|
184
|
+
if (ArrayBuffer.isView(value)) {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
184
187
|
return typeof Symbol !== 'undefined' && typeof value[Symbol.iterator] === 'function';
|
|
185
188
|
}
|
|
186
189
|
exports.isIterable = isIterable;
|
package/lib/app/index.js
CHANGED
|
@@ -51,7 +51,7 @@ export default class App {
|
|
|
51
51
|
this.stopCallbacks = [];
|
|
52
52
|
this.commitCallbacks = [];
|
|
53
53
|
this.activityState = ActivityState.NotActive;
|
|
54
|
-
this.version = '12.0.
|
|
54
|
+
this.version = '12.0.11'; // TODO: version compatability check inside each plugin.
|
|
55
55
|
this.compressionThreshold = 24 * 1000;
|
|
56
56
|
this.restartAttempts = 0;
|
|
57
57
|
this.bc = null;
|
package/lib/index.js
CHANGED
|
@@ -66,7 +66,7 @@ export default class API {
|
|
|
66
66
|
const orig = this.options.ingestPoint || DEFAULT_INGEST_POINT;
|
|
67
67
|
req.open('POST', orig + '/v1/web/not-started');
|
|
68
68
|
req.send(JSON.stringify({
|
|
69
|
-
trackerVersion: '12.0.
|
|
69
|
+
trackerVersion: '12.0.11',
|
|
70
70
|
projectKey: this.options.projectKey,
|
|
71
71
|
doNotTrack,
|
|
72
72
|
reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
|
|
@@ -151,13 +151,13 @@ export const genFormattedBody = (body) => {
|
|
|
151
151
|
result[key] = typeof value === 'string' ? value : '[object Object]';
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
else if (body
|
|
154
|
+
else if (ArrayBuffer.isView(body) ||
|
|
155
|
+
body instanceof Blob ||
|
|
155
156
|
body instanceof ReadableStream ||
|
|
156
157
|
body instanceof ArrayBuffer) {
|
|
157
|
-
result = 'byte data';
|
|
158
|
+
result = '[byte data]';
|
|
158
159
|
}
|
|
159
160
|
else if (isPureObject(body)) {
|
|
160
|
-
// overriding ArrayBufferView which is not convertable to string
|
|
161
161
|
result = body;
|
|
162
162
|
}
|
|
163
163
|
else {
|
|
@@ -172,6 +172,9 @@ export function isIterable(value) {
|
|
|
172
172
|
if (value === null || value === undefined) {
|
|
173
173
|
return false;
|
|
174
174
|
}
|
|
175
|
+
if (ArrayBuffer.isView(value)) {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
175
178
|
return typeof Symbol !== 'undefined' && typeof value[Symbol.iterator] === 'function';
|
|
176
179
|
}
|
|
177
180
|
export function formatByteSize(bytes) {
|