@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 CHANGED
@@ -1,6 +1,7 @@
1
1
  # 12.0.11
2
2
 
3
3
  - better restart on unauth (new token assign for long sessions)
4
+ - more safeguards around arraybuffer and dataview types for network proxy
4
5
 
5
6
  # 12.0.10
6
7
 
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.10-beta.1'; // TODO: version compatability check inside each plugin.
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.10-beta.1',
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 instanceof Blob ||
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.10-beta.1'; // TODO: version compatability check inside each plugin.
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.10-beta.1',
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 instanceof Blob ||
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) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openreplay/tracker",
3
3
  "description": "The OpenReplay tracker main package",
4
- "version": "12.0.10-beta.1",
4
+ "version": "12.0.11",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"