@openreplay/tracker 9.0.12 → 10.0.2
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/.nvmrc +1 -0
- package/CHANGELOG.md +15 -0
- package/README.md +4 -0
- package/bun.lockb +0 -0
- package/cjs/app/index.js +14 -11
- package/cjs/app/logger.d.ts +1 -1
- package/cjs/app/messages.gen.d.ts +2 -1
- package/cjs/app/messages.gen.js +20 -5
- package/cjs/app/nodes.js +4 -3
- package/cjs/app/observer/observer.js +2 -1
- package/cjs/common/messages.gen.d.ts +17 -4
- package/cjs/index.js +1 -1
- package/cjs/modules/Network/beaconProxy.d.ts +16 -0
- package/cjs/modules/Network/beaconProxy.js +82 -0
- package/cjs/modules/Network/fetchProxy.d.ts +0 -1
- package/cjs/modules/Network/fetchProxy.js +3 -1
- package/cjs/modules/Network/index.js +5 -0
- package/cjs/modules/Network/networkMessage.d.ts +1 -1
- package/cjs/modules/Network/networkMessage.js +7 -4
- package/cjs/modules/Network/xhrProxy.d.ts +0 -9
- package/cjs/modules/Network/xhrProxy.js +0 -1
- package/cjs/modules/axiosSpy.js +1 -1
- package/cjs/modules/constructedStyleSheets.js +25 -21
- package/cjs/modules/featureFlags.js +0 -1
- package/cjs/modules/img.js +2 -2
- package/cjs/modules/network.js +5 -4
- package/cjs/utils.d.ts +16 -0
- package/cjs/utils.js +53 -1
- package/coverage/clover.xml +829 -1064
- package/coverage/coverage-final.json +17 -21
- package/coverage/lcov-report/index.html +40 -55
- package/coverage/lcov-report/main/app/guards.ts.html +1 -1
- package/coverage/lcov-report/main/app/index.html +23 -23
- package/coverage/lcov-report/main/app/index.ts.html +212 -29
- package/coverage/lcov-report/main/app/logger.ts.html +2 -2
- package/coverage/lcov-report/main/app/messages.gen.ts.html +144 -144
- package/coverage/lcov-report/main/app/nodes.ts.html +13 -7
- package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/iframe_offsets.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/index.html +1 -1
- package/coverage/lcov-report/main/app/observer/shadow_root_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/top_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/sanitizer.ts.html +12 -3
- package/coverage/lcov-report/main/app/session.ts.html +30 -9
- package/coverage/lcov-report/main/app/ticker.ts.html +1 -1
- package/coverage/lcov-report/main/index.html +21 -21
- package/coverage/lcov-report/main/index.ts.html +26 -26
- package/coverage/lcov-report/main/modules/Network/beaconProxy.ts.html +19 -19
- package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +102 -96
- package/coverage/lcov-report/main/modules/Network/index.html +65 -65
- package/coverage/lcov-report/main/modules/Network/index.ts.html +33 -33
- package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +71 -71
- package/coverage/lcov-report/main/modules/Network/utils.ts.html +34 -34
- package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +13 -13
- package/coverage/lcov-report/main/modules/attributeSender.ts.html +13 -4
- package/coverage/lcov-report/main/modules/axiosSpy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/connection.ts.html +1 -1
- package/coverage/lcov-report/main/modules/console.ts.html +1 -1
- package/coverage/lcov-report/main/modules/constructedStyleSheets.ts.html +42 -30
- package/coverage/lcov-report/main/modules/cssrules.ts.html +1 -1
- package/coverage/lcov-report/main/modules/exception.ts.html +1 -1
- package/coverage/lcov-report/main/modules/featureFlags.ts.html +1 -1
- package/coverage/lcov-report/main/modules/focus.ts.html +1 -1
- package/coverage/lcov-report/main/modules/fonts.ts.html +1 -1
- package/coverage/lcov-report/main/modules/img.ts.html +23 -20
- package/coverage/lcov-report/main/modules/index.html +13 -13
- package/coverage/lcov-report/main/modules/input.ts.html +1 -1
- package/coverage/lcov-report/main/modules/mouse.ts.html +1 -1
- package/coverage/lcov-report/main/modules/network.ts.html +2 -2
- package/coverage/lcov-report/main/modules/performance.ts.html +1 -1
- package/coverage/lcov-report/main/modules/scroll.ts.html +1 -1
- package/coverage/lcov-report/main/modules/selection.ts.html +1 -1
- package/coverage/lcov-report/main/modules/tabs.ts.html +1 -1
- package/coverage/lcov-report/main/modules/timing.ts.html +42 -6
- package/coverage/lcov-report/main/modules/viewport.ts.html +1 -1
- package/coverage/lcov-report/main/utils.ts.html +255 -39
- package/coverage/lcov-report/webworker/BatchWriter.ts.html +1 -1
- package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +1 -1
- package/coverage/lcov-report/webworker/PrimitiveEncoder.ts.html +1 -1
- package/coverage/lcov-report/webworker/QueueSender.ts.html +1 -1
- package/coverage/lcov-report/webworker/index.html +1 -1
- package/coverage/lcov-report/webworker/index.ts.html +1 -1
- package/coverage/lcov.info +1376 -1729
- package/lib/app/index.js +15 -12
- package/lib/app/logger.d.ts +1 -1
- package/lib/app/messages.gen.d.ts +2 -1
- package/lib/app/messages.gen.js +16 -2
- package/lib/app/nodes.js +4 -3
- package/lib/app/observer/observer.js +2 -1
- package/lib/common/messages.gen.d.ts +17 -4
- package/lib/common/tsconfig.tsbuildinfo +1 -1
- package/lib/index.js +1 -1
- package/lib/modules/Network/beaconProxy.d.ts +16 -0
- package/lib/modules/Network/beaconProxy.js +77 -0
- package/lib/modules/Network/fetchProxy.d.ts +0 -1
- package/lib/modules/Network/fetchProxy.js +3 -1
- package/lib/modules/Network/index.js +5 -0
- package/lib/modules/Network/networkMessage.d.ts +1 -1
- package/lib/modules/Network/networkMessage.js +7 -4
- package/lib/modules/Network/xhrProxy.d.ts +0 -9
- package/lib/modules/Network/xhrProxy.js +0 -1
- package/lib/modules/axiosSpy.js +1 -1
- package/lib/modules/constructedStyleSheets.js +25 -21
- package/lib/modules/featureFlags.js +0 -1
- package/lib/modules/img.js +3 -3
- package/lib/modules/network.js +5 -4
- package/lib/utils.d.ts +16 -0
- package/lib/utils.js +47 -0
- package/package.json +13 -13
- package/rollup.config.js +4 -4
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/55</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/51</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -163,7 +163,11 @@
|
|
|
163
163
|
<a name='L98'></a><a href='#L98'>98</a>
|
|
164
164
|
<a name='L99'></a><a href='#L99'>99</a>
|
|
165
165
|
<a name='L100'></a><a href='#L100'>100</a>
|
|
166
|
-
<a name='L101'></a><a href='#L101'>101</a
|
|
166
|
+
<a name='L101'></a><a href='#L101'>101</a>
|
|
167
|
+
<a name='L102'></a><a href='#L102'>102</a>
|
|
168
|
+
<a name='L103'></a><a href='#L103'>103</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span>
|
|
169
|
+
<span class="cline-any cline-neutral"> </span>
|
|
170
|
+
<span class="cline-any cline-neutral"> </span>
|
|
167
171
|
<span class="cline-any cline-neutral"> </span>
|
|
168
172
|
<span class="cline-any cline-neutral"> </span>
|
|
169
173
|
<span class="cline-any cline-no"> </span>
|
|
@@ -263,7 +267,9 @@
|
|
|
263
267
|
<span class="cline-any cline-no"> </span>
|
|
264
268
|
<span class="cline-any cline-neutral"> </span>
|
|
265
269
|
<span class="cline-any cline-neutral"> </span>
|
|
266
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"
|
|
270
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >import { createEventListener, deleteEventListener } from '../utils.js'</span>
|
|
271
|
+
|
|
272
|
+
type NodeCallback = (node: Node, isStart: boolean) => void
|
|
267
273
|
type ElementListener = [string, EventListener, boolean]
|
|
268
274
|
|
|
269
275
|
<span class="cstat-no" title="statement not covered" >export default class N</span>odes {
|
|
@@ -284,7 +290,7 @@ type ElementListener = [string, EventListener, boolean]
|
|
|
284
290
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (id === undefined) {</span>
|
|
285
291
|
<span class="cstat-no" title="statement not covered" > return</span>
|
|
286
292
|
}
|
|
287
|
-
<span class="cstat-no" title="statement not covered" > node
|
|
293
|
+
<span class="cstat-no" title="statement not covered" > createEventListener(node, type, listener, useCapture)</span>
|
|
288
294
|
let listeners = <span class="cstat-no" title="statement not covered" >this.elementListeners.get(id)</span>
|
|
289
295
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (listeners === undefined) {</span>
|
|
290
296
|
<span class="cstat-no" title="statement not covered" > listeners = []</span>
|
|
@@ -314,7 +320,7 @@ type ElementListener = [string, EventListener, boolean]
|
|
|
314
320
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (listeners !== undefined) {</span>
|
|
315
321
|
<span class="cstat-no" title="statement not covered" > this.elementListeners.delete(id)</span>
|
|
316
322
|
<span class="cstat-no" title="statement not covered" > listeners.forEach(<span class="fstat-no" title="function not covered" >(l</span>istener) =></span>
|
|
317
|
-
<span class="cstat-no" title="statement not covered" > node
|
|
323
|
+
<span class="cstat-no" title="statement not covered" > deleteEventListener(node, listener[0], listener[1], listener[2]),</span>
|
|
318
324
|
)
|
|
319
325
|
}
|
|
320
326
|
<span class="cstat-no" title="statement not covered" > this.totalNodeAmount--</span>
|
|
@@ -370,7 +376,7 @@ type ElementListener = [string, EventListener, boolean]
|
|
|
370
376
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
371
377
|
Code coverage generated by
|
|
372
378
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
373
|
-
at 2023-
|
|
379
|
+
at 2023-11-03T09:39:08.430Z
|
|
374
380
|
</div>
|
|
375
381
|
<script src="../../prettify.js"></script>
|
|
376
382
|
<script>
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
134
134
|
Code coverage generated by
|
|
135
135
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
136
|
-
at 2023-
|
|
136
|
+
at 2023-11-03T09:39:08.430Z
|
|
137
137
|
</div>
|
|
138
138
|
<script src="../../../prettify.js"></script>
|
|
139
139
|
<script>
|
|
@@ -274,7 +274,7 @@ type OffsetState = {
|
|
|
274
274
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
275
275
|
Code coverage generated by
|
|
276
276
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
277
|
-
at 2023-
|
|
277
|
+
at 2023-11-03T09:39:08.430Z
|
|
278
278
|
</div>
|
|
279
279
|
<script src="../../../prettify.js"></script>
|
|
280
280
|
<script>
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
147
147
|
Code coverage generated by
|
|
148
148
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
149
|
-
at 2023-
|
|
149
|
+
at 2023-11-03T09:39:08.430Z
|
|
150
150
|
</div>
|
|
151
151
|
<script src="../../../prettify.js"></script>
|
|
152
152
|
<script>
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
128
128
|
Code coverage generated by
|
|
129
129
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
130
|
-
at 2023-
|
|
130
|
+
at 2023-11-03T09:39:08.430Z
|
|
131
131
|
</div>
|
|
132
132
|
<script src="../../../prettify.js"></script>
|
|
133
133
|
<script>
|
|
@@ -523,7 +523,7 @@ const attachShadowNativeFn = <span class="cstat-no" title="statement not covered
|
|
|
523
523
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
524
524
|
Code coverage generated by
|
|
525
525
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
526
|
-
at 2023-
|
|
526
|
+
at 2023-11-03T09:39:08.430Z
|
|
527
527
|
</div>
|
|
528
528
|
<script src="../../../prettify.js"></script>
|
|
529
529
|
<script>
|
|
@@ -166,7 +166,10 @@
|
|
|
166
166
|
<a name='L101'></a><a href='#L101'>101</a>
|
|
167
167
|
<a name='L102'></a><a href='#L102'>102</a>
|
|
168
168
|
<a name='L103'></a><a href='#L103'>103</a>
|
|
169
|
-
<a name='L104'></a><a href='#L104'>104</a
|
|
169
|
+
<a name='L104'></a><a href='#L104'>104</a>
|
|
170
|
+
<a name='L105'></a><a href='#L105'>105</a>
|
|
171
|
+
<a name='L106'></a><a href='#L106'>106</a>
|
|
172
|
+
<a name='L107'></a><a href='#L107'>107</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
170
173
|
<span class="cline-any cline-no"> </span>
|
|
171
174
|
<span class="cline-any cline-no"> </span>
|
|
172
175
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -192,7 +195,10 @@
|
|
|
192
195
|
<span class="cline-any cline-no"> </span>
|
|
193
196
|
<span class="cline-any cline-neutral"> </span>
|
|
194
197
|
<span class="cline-any cline-neutral"> </span>
|
|
198
|
+
<span class="cline-any cline-neutral"> </span>
|
|
195
199
|
<span class="cline-any cline-no"> </span>
|
|
200
|
+
<span class="cline-any cline-neutral"> </span>
|
|
201
|
+
<span class="cline-any cline-neutral"> </span>
|
|
196
202
|
<span class="cline-any cline-no"> </span>
|
|
197
203
|
<span class="cline-any cline-neutral"> </span>
|
|
198
204
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -295,7 +301,10 @@ export const <span class="cstat-no" title="statement not covered" >stringWiper =
|
|
|
295
301
|
private readonly <span class="cstat-no" title="statement not covered" >hidden: Set<number> = new Set()</span>
|
|
296
302
|
private readonly options: Options
|
|
297
303
|
|
|
298
|
-
<span class="fstat-no" title="function not covered" > constructor(
|
|
304
|
+
<span class="fstat-no" title="function not covered" > constructor(</span>
|
|
305
|
+
private readonly <span class="cstat-no" title="statement not covered" >app: App,</span>
|
|
306
|
+
options: Partial<Options>,
|
|
307
|
+
) {
|
|
299
308
|
<span class="cstat-no" title="statement not covered" > this.options = Object.assign(</span>
|
|
300
309
|
{
|
|
301
310
|
obscureTextEmails: true,
|
|
@@ -379,7 +388,7 @@ export const <span class="cstat-no" title="statement not covered" >stringWiper =
|
|
|
379
388
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
380
389
|
Code coverage generated by
|
|
381
390
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
382
|
-
at 2023-
|
|
391
|
+
at 2023-11-03T09:39:08.430Z
|
|
383
392
|
</div>
|
|
384
393
|
<script src="../../prettify.js"></script>
|
|
385
394
|
<script>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/75</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/
|
|
42
|
+
<span class='fraction'>0/20</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/72</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -235,7 +235,14 @@
|
|
|
235
235
|
<a name='L170'></a><a href='#L170'>170</a>
|
|
236
236
|
<a name='L171'></a><a href='#L171'>171</a>
|
|
237
237
|
<a name='L172'></a><a href='#L172'>172</a>
|
|
238
|
-
<a name='L173'></a><a href='#L173'>173</a
|
|
238
|
+
<a name='L173'></a><a href='#L173'>173</a>
|
|
239
|
+
<a name='L174'></a><a href='#L174'>174</a>
|
|
240
|
+
<a name='L175'></a><a href='#L175'>175</a>
|
|
241
|
+
<a name='L176'></a><a href='#L176'>176</a>
|
|
242
|
+
<a name='L177'></a><a href='#L177'>177</a>
|
|
243
|
+
<a name='L178'></a><a href='#L178'>178</a>
|
|
244
|
+
<a name='L179'></a><a href='#L179'>179</a>
|
|
245
|
+
<a name='L180'></a><a href='#L180'>180</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
239
246
|
<span class="cline-any cline-no"> </span>
|
|
240
247
|
<span class="cline-any cline-neutral"> </span>
|
|
241
248
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -272,7 +279,10 @@
|
|
|
272
279
|
<span class="cline-any cline-neutral"> </span>
|
|
273
280
|
<span class="cline-any cline-neutral"> </span>
|
|
274
281
|
<span class="cline-any cline-neutral"> </span>
|
|
282
|
+
<span class="cline-any cline-neutral"> </span>
|
|
283
|
+
<span class="cline-any cline-no"> </span>
|
|
275
284
|
<span class="cline-any cline-no"> </span>
|
|
285
|
+
<span class="cline-any cline-neutral"> </span>
|
|
276
286
|
<span class="cline-any cline-no"> </span>
|
|
277
287
|
<span class="cline-any cline-neutral"> </span>
|
|
278
288
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -383,10 +393,14 @@
|
|
|
383
393
|
<span class="cline-any cline-no"> </span>
|
|
384
394
|
<span class="cline-any cline-no"> </span>
|
|
385
395
|
<span class="cline-any cline-neutral"> </span>
|
|
396
|
+
<span class="cline-any cline-neutral"> </span>
|
|
397
|
+
<span class="cline-any cline-neutral"> </span>
|
|
386
398
|
<span class="cline-any cline-no"> </span>
|
|
387
399
|
<span class="cline-any cline-no"> </span>
|
|
388
400
|
<span class="cline-any cline-no"> </span>
|
|
389
401
|
<span class="cline-any cline-neutral"> </span>
|
|
402
|
+
<span class="cline-any cline-no"> </span>
|
|
403
|
+
<span class="cline-any cline-neutral"> </span>
|
|
390
404
|
<span class="cline-any cline-neutral"> </span>
|
|
391
405
|
<span class="cline-any cline-neutral"> </span>
|
|
392
406
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -444,7 +458,10 @@ export type Options = {
|
|
|
444
458
|
private tabId: string
|
|
445
459
|
public userInfo: UserInfo
|
|
446
460
|
|
|
447
|
-
<span class="fstat-no" title="function not covered" > constructor(
|
|
461
|
+
<span class="fstat-no" title="function not covered" > constructor(</span>
|
|
462
|
+
private readonly <span class="cstat-no" title="statement not covered" >app: App,</span>
|
|
463
|
+
private readonly <span class="cstat-no" title="statement not covered" >options: Options,</span>
|
|
464
|
+
) {
|
|
448
465
|
<span class="cstat-no" title="statement not covered" > this.createTabId()</span>
|
|
449
466
|
}
|
|
450
467
|
|
|
@@ -549,15 +566,19 @@ export type Options = {
|
|
|
549
566
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (!this.tabId) <span class="cstat-no" title="statement not covered" >this.createTabId()</span></span>
|
|
550
567
|
<span class="cstat-no" title="statement not covered" > return this.tabId</span>
|
|
551
568
|
}
|
|
569
|
+
|
|
570
|
+
public <span class="fstat-no" title="function not covered" >regenerateTabId(</span>) {
|
|
571
|
+
const randomId = <span class="cstat-no" title="statement not covered" >generateRandomId(12)</span>
|
|
572
|
+
<span class="cstat-no" title="statement not covered" > this.app.sessionStorage.setItem(this.options.session_tabid_key, randomId)</span>
|
|
573
|
+
<span class="cstat-no" title="statement not covered" > this.tabId = randomId</span>
|
|
574
|
+
}
|
|
552
575
|
|
|
553
576
|
private <span class="fstat-no" title="function not covered" >createTabId(</span>) {
|
|
554
577
|
const localId = <span class="cstat-no" title="statement not covered" >this.app.sessionStorage.getItem(this.options.session_tabid_key)</span>
|
|
555
578
|
<span class="cstat-no" title="statement not covered" > if (localId) {</span>
|
|
556
579
|
<span class="cstat-no" title="statement not covered" > this.tabId = localId</span>
|
|
557
580
|
} else {
|
|
558
|
-
|
|
559
|
-
<span class="cstat-no" title="statement not covered" > this.app.sessionStorage.setItem(this.options.session_tabid_key, randomId)</span>
|
|
560
|
-
<span class="cstat-no" title="statement not covered" > this.tabId = randomId</span>
|
|
581
|
+
<span class="cstat-no" title="statement not covered" > this.regenerateTabId()</span>
|
|
561
582
|
}
|
|
562
583
|
}
|
|
563
584
|
|
|
@@ -586,7 +607,7 @@ export type Options = {
|
|
|
586
607
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
587
608
|
Code coverage generated by
|
|
588
609
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
589
|
-
at 2023-
|
|
610
|
+
at 2023-11-03T09:39:08.430Z
|
|
590
611
|
</div>
|
|
591
612
|
<script src="../../prettify.js"></script>
|
|
592
613
|
<script>
|
|
@@ -235,7 +235,7 @@ function <span class="fstat-no" title="function not covered" >wrap(</span>callba
|
|
|
235
235
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
236
236
|
Code coverage generated by
|
|
237
237
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
238
|
-
at 2023-
|
|
238
|
+
at 2023-11-03T09:39:08.430Z
|
|
239
239
|
</div>
|
|
240
240
|
<script src="../../prettify.js"></script>
|
|
241
241
|
<script>
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">9.67% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>24/248</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">5.88% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>7/119</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/
|
|
42
|
+
<span class='fraction'>0/55</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">9.75% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>24/246</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -84,28 +84,28 @@
|
|
|
84
84
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
85
85
|
</td>
|
|
86
86
|
<td data-value="0" class="pct low">0%</td>
|
|
87
|
-
<td data-value="
|
|
87
|
+
<td data-value="171" class="abs low">0/171</td>
|
|
88
88
|
<td data-value="0" class="pct low">0%</td>
|
|
89
|
-
<td data-value="
|
|
89
|
+
<td data-value="89" class="abs low">0/89</td>
|
|
90
90
|
<td data-value="0" class="pct low">0%</td>
|
|
91
|
-
<td data-value="
|
|
91
|
+
<td data-value="33" class="abs low">0/33</td>
|
|
92
92
|
<td data-value="0" class="pct low">0%</td>
|
|
93
|
-
<td data-value="
|
|
93
|
+
<td data-value="169" class="abs low">0/169</td>
|
|
94
94
|
</tr>
|
|
95
95
|
|
|
96
96
|
<tr>
|
|
97
97
|
<td class="file low" data-value="utils.ts"><a href="utils.ts.html">utils.ts</a></td>
|
|
98
|
-
<td data-value="
|
|
99
|
-
<div class="chart"><div class="cover-fill" style="width:
|
|
98
|
+
<td data-value="31.16" class="pic low">
|
|
99
|
+
<div class="chart"><div class="cover-fill" style="width: 31%"></div><div class="cover-empty" style="width: 69%"></div></div>
|
|
100
100
|
</td>
|
|
101
|
+
<td data-value="31.16" class="pct low">31.16%</td>
|
|
102
|
+
<td data-value="77" class="abs low">24/77</td>
|
|
103
|
+
<td data-value="23.33" class="pct low">23.33%</td>
|
|
104
|
+
<td data-value="30" class="abs low">7/30</td>
|
|
101
105
|
<td data-value="0" class="pct low">0%</td>
|
|
102
|
-
<td data-value="
|
|
103
|
-
<td data-value="
|
|
104
|
-
<td data-value="
|
|
105
|
-
<td data-value="0" class="pct low">0%</td>
|
|
106
|
-
<td data-value="14" class="abs low">0/14</td>
|
|
107
|
-
<td data-value="0" class="pct low">0%</td>
|
|
108
|
-
<td data-value="51" class="abs low">0/51</td>
|
|
106
|
+
<td data-value="22" class="abs low">0/22</td>
|
|
107
|
+
<td data-value="31.16" class="pct low">31.16%</td>
|
|
108
|
+
<td data-value="77" class="abs low">24/77</td>
|
|
109
109
|
</tr>
|
|
110
110
|
|
|
111
111
|
</tbody>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at 2023-
|
|
119
|
+
at 2023-11-03T09:39:08.430Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -25,28 +25,28 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/171</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/89</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/
|
|
42
|
+
<span class='fraction'>0/33</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/169</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -470,8 +470,6 @@
|
|
|
470
470
|
<span class="cline-any cline-no"> </span>
|
|
471
471
|
<span class="cline-any cline-no"> </span>
|
|
472
472
|
<span class="cline-any cline-no"> </span>
|
|
473
|
-
<span class="cline-any cline-neutral"> </span>
|
|
474
|
-
<span class="cline-any cline-no"> </span>
|
|
475
473
|
<span class="cline-any cline-no"> </span>
|
|
476
474
|
<span class="cline-any cline-neutral"> </span>
|
|
477
475
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -503,6 +501,7 @@
|
|
|
503
501
|
<span class="cline-any cline-neutral"> </span>
|
|
504
502
|
<span class="cline-any cline-neutral"> </span>
|
|
505
503
|
<span class="cline-any cline-neutral"> </span>
|
|
504
|
+
<span class="cline-any cline-neutral"> </span>
|
|
506
505
|
<span class="cline-any cline-no"> </span>
|
|
507
506
|
<span class="cline-any cline-neutral"> </span>
|
|
508
507
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -537,8 +536,6 @@
|
|
|
537
536
|
<span class="cline-any cline-neutral"> </span>
|
|
538
537
|
<span class="cline-any cline-no"> </span>
|
|
539
538
|
<span class="cline-any cline-neutral"> </span>
|
|
540
|
-
<span class="cline-any cline-neutral"> </span>
|
|
541
|
-
<span class="cline-any cline-neutral"> </span>
|
|
542
539
|
<span class="cline-any cline-no"> </span>
|
|
543
540
|
<span class="cline-any cline-neutral"> </span>
|
|
544
541
|
<span class="cline-any cline-no"> </span>
|
|
@@ -592,7 +589,6 @@
|
|
|
592
589
|
<span class="cline-any cline-no"> </span>
|
|
593
590
|
<span class="cline-any cline-no"> </span>
|
|
594
591
|
<span class="cline-any cline-no"> </span>
|
|
595
|
-
<span class="cline-any cline-no"> </span>
|
|
596
592
|
<span class="cline-any cline-neutral"> </span>
|
|
597
593
|
<span class="cline-any cline-no"> </span>
|
|
598
594
|
<span class="cline-any cline-no"> </span>
|
|
@@ -603,9 +599,17 @@
|
|
|
603
599
|
<span class="cline-any cline-no"> </span>
|
|
604
600
|
<span class="cline-any cline-no"> </span>
|
|
605
601
|
<span class="cline-any cline-no"> </span>
|
|
602
|
+
<span class="cline-any cline-no"> </span>
|
|
603
|
+
<span class="cline-any cline-no"> </span>
|
|
604
|
+
<span class="cline-any cline-neutral"> </span>
|
|
605
|
+
<span class="cline-any cline-no"> </span>
|
|
606
|
+
<span class="cline-any cline-no"> </span>
|
|
607
|
+
<span class="cline-any cline-no"> </span>
|
|
606
608
|
<span class="cline-any cline-neutral"> </span>
|
|
607
609
|
<span class="cline-any cline-no"> </span>
|
|
608
610
|
<span class="cline-any cline-no"> </span>
|
|
611
|
+
<span class="cline-any cline-neutral"> </span>
|
|
612
|
+
<span class="cline-any cline-no"> </span>
|
|
609
613
|
<span class="cline-any cline-no"> </span>
|
|
610
614
|
<span class="cline-any cline-no"> </span>
|
|
611
615
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -811,10 +815,6 @@
|
|
|
811
815
|
<span class="cline-any cline-neutral"> </span>
|
|
812
816
|
<span class="cline-any cline-neutral"> </span>
|
|
813
817
|
<span class="cline-any cline-neutral"> </span>
|
|
814
|
-
<span class="cline-any cline-neutral"> </span>
|
|
815
|
-
<span class="cline-any cline-no"> </span>
|
|
816
|
-
<span class="cline-any cline-neutral"> </span>
|
|
817
|
-
<span class="cline-any cline-neutral"> </span>
|
|
818
818
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" >import App, { DEFAULT_INGEST_POINT } from './app/index.js'</span>
|
|
819
819
|
|
|
820
820
|
<span class="cstat-no" title="statement not covered" >export { <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >d</span>efault </span>as App </span>} from './app/index.js'
|
|
@@ -845,8 +845,6 @@ export const <span class="cstat-no" title="statement not covered" >Messages = _M
|
|
|
845
845
|
<span class="cstat-no" title="statement not covered" >import ConstructedStyleSheets from './modules/constructedStyleSheets.js'</span>
|
|
846
846
|
<span class="cstat-no" title="statement not covered" >import Selection from './modules/selection.js'</span>
|
|
847
847
|
<span class="cstat-no" title="statement not covered" >import Tabs from './modules/tabs.js'</span>
|
|
848
|
-
<span class="cstat-no" title="statement not covered" >import UserTestManager from './modules/userTesting/index.js'</span>
|
|
849
|
-
|
|
850
848
|
<span class="cstat-no" title="statement not covered" >import { IN_BROWSER, deprecationWarn, DOCS_HOST } from './utils.js'</span>
|
|
851
849
|
<span class="cstat-no" title="statement not covered" >import FeatureFlags, { IFeatureFlag } from './modules/featureFlags.js'</span>
|
|
852
850
|
import type { Options as AppOptions } from './app/index.js'
|
|
@@ -870,6 +868,7 @@ export type Options = Partial<
|
|
|
870
868
|
sessionToken?: string
|
|
871
869
|
respectDoNotTrack?: boolean
|
|
872
870
|
autoResetOnWindowOpen?: boolean
|
|
871
|
+
resetTabOnWindowOpen?: boolean
|
|
873
872
|
network?: Partial<NetworkOptions>
|
|
874
873
|
mouse?: Partial<MouseHandlerOptions>
|
|
875
874
|
flags?: {
|
|
@@ -913,8 +912,6 @@ function <span class="fstat-no" title="function not covered" >processOptions(</s
|
|
|
913
912
|
|
|
914
913
|
<span class="cstat-no" title="statement not covered" >export default class A</span>PI {
|
|
915
914
|
public featureFlags: FeatureFlags
|
|
916
|
-
private readonly userTestManager: UserTestManager
|
|
917
|
-
|
|
918
915
|
private readonly <span class="cstat-no" title="statement not covered" >app: App | null = null</span>
|
|
919
916
|
|
|
920
917
|
<span class="fstat-no" title="function not covered" > constructor(private readonly <span class="cstat-no" title="statement not covered" >o</span>ptions: Options)</span> {
|
|
@@ -968,7 +965,6 @@ function <span class="fstat-no" title="function not covered" >processOptions(</s
|
|
|
968
965
|
<span class="cstat-no" title="statement not covered" > Tabs(app)</span>
|
|
969
966
|
<span class="cstat-no" title="statement not covered" > this.featureFlags = new FeatureFlags(app)</span>
|
|
970
967
|
;(<span class="cstat-no" title="statement not covered" >window as any).__OPENREPLAY__ = this</span>
|
|
971
|
-
<span class="cstat-no" title="statement not covered" > this.userTestManager = new UserTestManager(app)</span>
|
|
972
968
|
|
|
973
969
|
<span class="cstat-no" title="statement not covered" > app.attachStartCallback(<span class="fstat-no" title="function not covered" >() =</span>> {</span>
|
|
974
970
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (options.flags?.onFlagsLoad) {</span>
|
|
@@ -976,14 +972,22 @@ function <span class="fstat-no" title="function not covered" >processOptions(</s
|
|
|
976
972
|
}
|
|
977
973
|
<span class="cstat-no" title="statement not covered" > void this.featureFlags.reloadFlags()</span>
|
|
978
974
|
})
|
|
979
|
-
<span class="cstat-no" title="statement not covered" >
|
|
980
|
-
|
|
975
|
+
const wOpen = <span class="cstat-no" title="statement not covered" >window.open</span>
|
|
976
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (options.autoResetOnWindowOpen || options.resetTabOnWindowOpen) {</span>
|
|
981
977
|
<span class="cstat-no" title="statement not covered" > app.attachStartCallback(<span class="fstat-no" title="function not covered" >() =</span>> {</span>
|
|
978
|
+
const tabId = <span class="cstat-no" title="statement not covered" >app.getTabId()</span>
|
|
979
|
+
const sessStorage = <span class="cstat-no" title="statement not covered" >app.sessionStorage ?? window.sessionStorage</span>
|
|
982
980
|
// @ts-ignore ?
|
|
983
981
|
<span class="cstat-no" title="statement not covered" > window.open = <span class="fstat-no" title="function not covered" >function (.</span>..args) {</span>
|
|
984
|
-
<span class="cstat-no" title="statement not covered" >
|
|
982
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (options.autoResetOnWindowOpen) {</span>
|
|
983
|
+
<span class="cstat-no" title="statement not covered" > app.resetNextPageSession(true)</span>
|
|
984
|
+
}
|
|
985
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (options.resetTabOnWindowOpen) {</span>
|
|
986
|
+
<span class="cstat-no" title="statement not covered" > sessStorage.removeItem(options.session_tabid_key || '__openreplay_tabid')</span>
|
|
987
|
+
}
|
|
985
988
|
<span class="cstat-no" title="statement not covered" > wOpen.call(window, ...args)</span>
|
|
986
989
|
<span class="cstat-no" title="statement not covered" > app.resetNextPageSession(false)</span>
|
|
990
|
+
<span class="cstat-no" title="statement not covered" > sessStorage.setItem(options.session_tabid_key || '__openreplay_tabid', tabId)</span>
|
|
987
991
|
}
|
|
988
992
|
})
|
|
989
993
|
<span class="cstat-no" title="statement not covered" > app.attachStopCallback(<span class="fstat-no" title="function not covered" >() =</span>> {</span>
|
|
@@ -1186,10 +1190,6 @@ function <span class="fstat-no" title="function not covered" >processOptions(</s
|
|
|
1186
1190
|
}
|
|
1187
1191
|
}
|
|
1188
1192
|
}
|
|
1189
|
-
|
|
1190
|
-
<span class="fstat-no" title="function not covered" > createTestingWidget(</span>) {
|
|
1191
|
-
<span class="cstat-no" title="statement not covered" > this.userTestManager.createGreeting('Test name goes here,', false, false)</span>
|
|
1192
|
-
}
|
|
1193
1193
|
}
|
|
1194
1194
|
</pre></td></tr></table></pre>
|
|
1195
1195
|
|
|
@@ -1198,7 +1198,7 @@ function <span class="fstat-no" title="function not covered" >processOptions(</s
|
|
|
1198
1198
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1199
1199
|
Code coverage generated by
|
|
1200
1200
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1201
|
-
at 2023-
|
|
1201
|
+
at 2023-11-03T09:39:08.430Z
|
|
1202
1202
|
</div>
|
|
1203
1203
|
<script src="../prettify.js"></script>
|
|
1204
1204
|
<script>
|