@openreplay/tracker 18.0.13-beta.0 → 18.0.13
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 +4 -45
- package/dist/cjs/entry.js.map +1 -1
- package/dist/cjs/index.js +4 -45
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/main/app/observer/observer.d.ts +0 -6
- package/dist/lib/entry.js +4 -45
- package/dist/lib/entry.js.map +1 -1
- package/dist/lib/index.js +4 -45
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/main/app/observer/observer.d.ts +0 -6
- package/dist/types/main/app/observer/observer.d.ts +0 -6
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -3029,8 +3029,7 @@ class Observer {
|
|
|
3029
3029
|
}
|
|
3030
3030
|
}
|
|
3031
3031
|
catch (mutationErr) {
|
|
3032
|
-
|
|
3033
|
-
this.orDebug(`mutation processing threw type=${mutation.type} target=<${t.tagName ?? t.nodeName ?? 'unknown'}>: ${mutationErr?.message ?? String(mutationErr)}`);
|
|
3032
|
+
mutation.target;
|
|
3034
3033
|
}
|
|
3035
3034
|
}
|
|
3036
3035
|
this.commitNodes();
|
|
@@ -3252,27 +3251,15 @@ class Observer {
|
|
|
3252
3251
|
// TODO: Clean the logic (though now it workd fine)
|
|
3253
3252
|
if (!hasTag(node, 'html') || !this.isTopContext) {
|
|
3254
3253
|
if (parent === null) {
|
|
3255
|
-
// Sometimes one observation contains attribute mutations for the removimg node, which gets ignored here.
|
|
3256
|
-
// That shouldn't affect the visual rendering ( should it? maybe when transition applied? )
|
|
3257
|
-
// THEORY: an element silently dropped at commit time (no message emitted).
|
|
3258
|
-
if (isElementNode(node)) {
|
|
3259
|
-
this.orDebug(`commit drop <${node.tagName}> reason=no-parent`);
|
|
3260
|
-
}
|
|
3261
3254
|
this.unbindTree(node);
|
|
3262
3255
|
return false;
|
|
3263
3256
|
}
|
|
3264
3257
|
parentID = this.app.nodes.getID(parent);
|
|
3265
3258
|
if (parentID === undefined) {
|
|
3266
|
-
if (isElementNode(node)) {
|
|
3267
|
-
this.orDebug(`commit drop <${node.tagName}> reason=parent-unbound parent=<${parent.tagName ?? parent.nodeName}>`);
|
|
3268
|
-
}
|
|
3269
3259
|
this.unbindTree(node);
|
|
3270
3260
|
return false;
|
|
3271
3261
|
}
|
|
3272
3262
|
if (!this.commitNode(parentID)) {
|
|
3273
|
-
if (isElementNode(node)) {
|
|
3274
|
-
this.orDebug(`commit drop <${node.tagName}> reason=parent-commit-failed`);
|
|
3275
|
-
}
|
|
3276
3263
|
this.unbindTree(node);
|
|
3277
3264
|
return false;
|
|
3278
3265
|
}
|
|
@@ -3416,19 +3403,6 @@ class Observer {
|
|
|
3416
3403
|
beforeCommit(this.app.nodes.getID(node));
|
|
3417
3404
|
this.commitNodes(true);
|
|
3418
3405
|
}
|
|
3419
|
-
/**
|
|
3420
|
-
* [OPENREPLAYDEBUG] Emits a diagnostic line INTO the recorded session's
|
|
3421
|
-
* console (searchable in replay by "[OPENREPLAYDEBUG]"), NOT the local
|
|
3422
|
-
* devtools console — used to test capture-loss theories against real traffic.
|
|
3423
|
-
*/
|
|
3424
|
-
orDebug(message) {
|
|
3425
|
-
try {
|
|
3426
|
-
this.app.send(ConsoleLog('warn', `[OPENREPLAYDEBUG] ${message}`));
|
|
3427
|
-
}
|
|
3428
|
-
catch (_) {
|
|
3429
|
-
/* diagnostics must never break recording */
|
|
3430
|
-
}
|
|
3431
|
-
}
|
|
3432
3406
|
disconnect() {
|
|
3433
3407
|
// THEORY S3: a disconnect may discard MutationRecords still queued by the
|
|
3434
3408
|
// browser. takeRecords() drains them — they would be discarded by
|
|
@@ -3439,21 +3413,16 @@ class Observer {
|
|
|
3439
3413
|
// most reliable for mid-session re-observes (cold-start cycle / iframe).
|
|
3440
3414
|
const pending = this.observer.takeRecords();
|
|
3441
3415
|
if (pending.length) {
|
|
3442
|
-
let addedEls = 0;
|
|
3443
3416
|
const tags = [];
|
|
3444
3417
|
for (const m of pending) {
|
|
3445
3418
|
for (let i = 0; i < m.addedNodes.length; i++) {
|
|
3446
3419
|
const n = m.addedNodes[i];
|
|
3447
3420
|
if (n.tagName) {
|
|
3448
|
-
addedEls++;
|
|
3449
3421
|
if (tags.length < 10)
|
|
3450
3422
|
tags.push(n.tagName);
|
|
3451
3423
|
}
|
|
3452
3424
|
}
|
|
3453
3425
|
}
|
|
3454
|
-
if (addedEls > 0) {
|
|
3455
|
-
this.orDebug(`disconnect stranded ${pending.length} pending record(s), ${addedEls} added element(s): ${tags.join(',')}`);
|
|
3456
|
-
}
|
|
3457
3426
|
}
|
|
3458
3427
|
this.observer.disconnect();
|
|
3459
3428
|
this.clear();
|
|
@@ -4130,7 +4099,7 @@ class App {
|
|
|
4130
4099
|
this.stopCallbacks = [];
|
|
4131
4100
|
this.commitCallbacks = [];
|
|
4132
4101
|
this.activityState = ActivityState.NotActive;
|
|
4133
|
-
this.version = '18.0.13
|
|
4102
|
+
this.version = '18.0.13'; // TODO: version compatability check inside each plugin.
|
|
4134
4103
|
this.socketMode = false;
|
|
4135
4104
|
this.compressionThreshold = 24 * 1000;
|
|
4136
4105
|
this.bc = null;
|
|
@@ -5054,16 +5023,6 @@ class App {
|
|
|
5054
5023
|
}
|
|
5055
5024
|
else if (data === 'not_init') {
|
|
5056
5025
|
this.debug.warn('OR WebWorker: writer not initialised. Restarting tracker');
|
|
5057
|
-
// [OPENREPLAYDEBUG] THEORY: a message batch reached the worker before the
|
|
5058
|
-
// writer was initialised (start handshake not finished) and was DISCARDED.
|
|
5059
|
-
// Surface it into the session (searchable in replay) to test whether
|
|
5060
|
-
// startup batches — which can carry the initial DOM snapshot — are lost.
|
|
5061
|
-
try {
|
|
5062
|
-
this.send(ConsoleLog('warn', '[OPENREPLAYDEBUG] worker not_init: a pre-start message batch was discarded'));
|
|
5063
|
-
}
|
|
5064
|
-
catch (_) {
|
|
5065
|
-
/* diagnostics must never break recording */
|
|
5066
|
-
}
|
|
5067
5026
|
}
|
|
5068
5027
|
else if (data.type === 'failure') {
|
|
5069
5028
|
this.stop(false);
|
|
@@ -9438,7 +9397,7 @@ class ConstantProperties {
|
|
|
9438
9397
|
user_id: this.user_id,
|
|
9439
9398
|
distinct_id: this.deviceId,
|
|
9440
9399
|
sdk_edition: 'web',
|
|
9441
|
-
sdk_version: '18.0.13
|
|
9400
|
+
sdk_version: '18.0.13',
|
|
9442
9401
|
timezone: getUTCOffsetString(),
|
|
9443
9402
|
search_engine: this.searchEngine,
|
|
9444
9403
|
};
|
|
@@ -10140,7 +10099,7 @@ class API {
|
|
|
10140
10099
|
this.signalStartIssue = (reason, missingApi) => {
|
|
10141
10100
|
const doNotTrack = this.checkDoNotTrack();
|
|
10142
10101
|
console.log("Tracker couldn't start due to:", JSON.stringify({
|
|
10143
|
-
trackerVersion: '18.0.13
|
|
10102
|
+
trackerVersion: '18.0.13',
|
|
10144
10103
|
projectKey: this.options.projectKey,
|
|
10145
10104
|
doNotTrack,
|
|
10146
10105
|
reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
|