@openreplay/tracker 11.0.4 → 11.0.6
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 +13 -0
- package/cjs/app/canvas.d.ts +3 -0
- package/cjs/app/canvas.js +27 -11
- package/cjs/app/index.d.ts +2 -0
- package/cjs/app/index.js +15 -6
- package/cjs/app/nodes.d.ts +1 -0
- package/cjs/app/nodes.js +3 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +7 -1
- package/coverage/clover.xml +890 -527
- package/coverage/coverage-final.json +10 -9
- package/coverage/lcov-report/index.html +30 -30
- package/coverage/lcov-report/main/app/canvas.ts.html +21 -6
- package/coverage/lcov-report/main/app/guards.ts.html +1 -1
- package/coverage/lcov-report/main/app/index.html +13 -13
- package/coverage/lcov-report/main/app/index.ts.html +1236 -114
- package/coverage/lcov-report/main/app/logger.ts.html +25 -91
- package/coverage/lcov-report/main/app/messages.gen.ts.html +1 -1
- package/coverage/lcov-report/main/app/nodes.ts.html +1 -1
- 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 +1 -1
- package/coverage/lcov-report/main/app/session.ts.html +1 -1
- package/coverage/lcov-report/main/app/ticker.ts.html +1 -1
- package/coverage/lcov-report/main/index.html +9 -9
- package/coverage/lcov-report/main/index.ts.html +376 -100
- package/coverage/lcov-report/main/modules/Network/beaconProxy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/index.html +1 -1
- package/coverage/lcov-report/main/modules/Network/index.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/utils.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/attributeSender.ts.html +1 -1
- package/coverage/lcov-report/main/modules/axiosSpy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/conditionsManager.ts.html +112 -67
- 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 +1 -1
- 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 +10 -7
- 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 +1 -1
- package/coverage/lcov-report/main/modules/index.html +37 -22
- 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 +1 -1
- 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/tagWatcher.ts.html +72 -15
- package/coverage/lcov-report/main/modules/timing.ts.html +1 -1
- package/coverage/lcov-report/main/modules/userTesting/SignalManager.ts.html +1 -1
- package/coverage/lcov-report/main/modules/userTesting/dnd.ts.html +1 -1
- package/coverage/lcov-report/main/modules/userTesting/index.html +1 -1
- package/coverage/lcov-report/main/modules/userTesting/index.ts.html +1 -1
- package/coverage/lcov-report/main/modules/userTesting/recorder.ts.html +1 -1
- package/coverage/lcov-report/main/modules/userTesting/styles.ts.html +1 -1
- package/coverage/lcov-report/main/modules/userTesting/utils.ts.html +1 -1
- package/coverage/lcov-report/main/modules/viewport.ts.html +1 -1
- package/coverage/lcov-report/main/utils.ts.html +1 -1
- package/coverage/lcov-report/webworker/BatchWriter.ts.html +23 -5
- 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 +18 -6
- package/coverage/lcov-report/webworker/index.html +13 -13
- package/coverage/lcov-report/webworker/index.ts.html +17 -8
- package/coverage/lcov.info +1629 -942
- package/lib/app/canvas.d.ts +3 -0
- package/lib/app/canvas.js +27 -11
- package/lib/app/index.d.ts +2 -0
- package/lib/app/index.js +15 -6
- package/lib/app/nodes.d.ts +1 -0
- package/lib/app/nodes.js +3 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +7 -1
- package/package.json +1 -1
|
@@ -376,7 +376,7 @@ const getContentType = <span class="cstat-no" title="statement not covered" ><sp
|
|
|
376
376
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
377
377
|
Code coverage generated by
|
|
378
378
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
379
|
-
at 2024-01-
|
|
379
|
+
at 2024-01-09T16:51:30.347Z
|
|
380
380
|
</div>
|
|
381
381
|
<script src="../../../prettify.js"></script>
|
|
382
382
|
<script>
|
|
@@ -1033,7 +1033,7 @@ import { NetworkRequest } from '../../../common/messages.gen.js'
|
|
|
1033
1033
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1034
1034
|
Code coverage generated by
|
|
1035
1035
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1036
|
-
at 2024-01-
|
|
1036
|
+
at 2024-01-09T16:51:30.347Z
|
|
1037
1037
|
</div>
|
|
1038
1038
|
<script src="../../../prettify.js"></script>
|
|
1039
1039
|
<script>
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
177
177
|
Code coverage generated by
|
|
178
178
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
179
|
-
at 2024-01-
|
|
179
|
+
at 2024-01-09T16:51:30.347Z
|
|
180
180
|
</div>
|
|
181
181
|
<script src="../../../prettify.js"></script>
|
|
182
182
|
<script>
|
|
@@ -229,7 +229,7 @@ If you're using serverside rendering in your app, make sure that tracker is load
|
|
|
229
229
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
230
230
|
Code coverage generated by
|
|
231
231
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
232
|
-
at 2024-01-
|
|
232
|
+
at 2024-01-09T16:51:30.347Z
|
|
233
233
|
</div>
|
|
234
234
|
<script src="../../../prettify.js"></script>
|
|
235
235
|
<script>
|
|
@@ -379,7 +379,7 @@ export type httpMethod =
|
|
|
379
379
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
380
380
|
Code coverage generated by
|
|
381
381
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
382
|
-
at 2024-01-
|
|
382
|
+
at 2024-01-09T16:51:30.347Z
|
|
383
383
|
</div>
|
|
384
384
|
<script src="../../../prettify.js"></script>
|
|
385
385
|
<script>
|
|
@@ -685,7 +685,7 @@ export const <span class="cstat-no" title="statement not covered" >getURL = <spa
|
|
|
685
685
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
686
686
|
Code coverage generated by
|
|
687
687
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
688
|
-
at 2024-01-
|
|
688
|
+
at 2024-01-09T16:51:30.347Z
|
|
689
689
|
</div>
|
|
690
690
|
<script src="../../../prettify.js"></script>
|
|
691
691
|
<script>
|
|
@@ -835,7 +835,7 @@ import { NetworkRequest } from '../../../common/messages.gen.js'
|
|
|
835
835
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
836
836
|
Code coverage generated by
|
|
837
837
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
838
|
-
at 2024-01-
|
|
838
|
+
at 2024-01-09T16:51:30.347Z
|
|
839
839
|
</div>
|
|
840
840
|
<script src="../../../prettify.js"></script>
|
|
841
841
|
<script>
|
|
@@ -226,7 +226,7 @@ import App from '../app/index.js'
|
|
|
226
226
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
227
227
|
Code coverage generated by
|
|
228
228
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
229
|
-
at 2024-01-
|
|
229
|
+
at 2024-01-09T16:51:30.347Z
|
|
230
230
|
</div>
|
|
231
231
|
<script src="../../prettify.js"></script>
|
|
232
232
|
<script>
|
|
@@ -694,7 +694,7 @@ function <span class="fstat-no" title="function not covered" >isObject(</span>th
|
|
|
694
694
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
695
695
|
Code coverage generated by
|
|
696
696
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
697
|
-
at 2024-01-
|
|
697
|
+
at 2024-01-09T16:51:30.347Z
|
|
698
698
|
</div>
|
|
699
699
|
<script src="../../prettify.js"></script>
|
|
700
700
|
<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">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>0/165</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/63</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>0/52</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>0/150</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -468,7 +468,22 @@
|
|
|
468
468
|
<a name='L403'></a><a href='#L403'>403</a>
|
|
469
469
|
<a name='L404'></a><a href='#L404'>404</a>
|
|
470
470
|
<a name='L405'></a><a href='#L405'>405</a>
|
|
471
|
-
<a name='L406'></a><a href='#L406'>406</a
|
|
471
|
+
<a name='L406'></a><a href='#L406'>406</a>
|
|
472
|
+
<a name='L407'></a><a href='#L407'>407</a>
|
|
473
|
+
<a name='L408'></a><a href='#L408'>408</a>
|
|
474
|
+
<a name='L409'></a><a href='#L409'>409</a>
|
|
475
|
+
<a name='L410'></a><a href='#L410'>410</a>
|
|
476
|
+
<a name='L411'></a><a href='#L411'>411</a>
|
|
477
|
+
<a name='L412'></a><a href='#L412'>412</a>
|
|
478
|
+
<a name='L413'></a><a href='#L413'>413</a>
|
|
479
|
+
<a name='L414'></a><a href='#L414'>414</a>
|
|
480
|
+
<a name='L415'></a><a href='#L415'>415</a>
|
|
481
|
+
<a name='L416'></a><a href='#L416'>416</a>
|
|
482
|
+
<a name='L417'></a><a href='#L417'>417</a>
|
|
483
|
+
<a name='L418'></a><a href='#L418'>418</a>
|
|
484
|
+
<a name='L419'></a><a href='#L419'>419</a>
|
|
485
|
+
<a name='L420'></a><a href='#L420'>420</a>
|
|
486
|
+
<a name='L421'></a><a href='#L421'>421</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
472
487
|
<span class="cline-any cline-neutral"> </span>
|
|
473
488
|
<span class="cline-any cline-neutral"> </span>
|
|
474
489
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -497,13 +512,14 @@
|
|
|
497
512
|
<span class="cline-any cline-neutral"> </span>
|
|
498
513
|
<span class="cline-any cline-neutral"> </span>
|
|
499
514
|
<span class="cline-any cline-neutral"> </span>
|
|
500
|
-
<span class="cline-any cline-yes">1x</span>
|
|
501
|
-
<span class="cline-any cline-yes">1x</span>
|
|
502
|
-
<span class="cline-any cline-yes">1x</span>
|
|
503
515
|
<span class="cline-any cline-neutral"> </span>
|
|
516
|
+
<span class="cline-any cline-no"> </span>
|
|
517
|
+
<span class="cline-any cline-no"> </span>
|
|
518
|
+
<span class="cline-any cline-no"> </span>
|
|
504
519
|
<span class="cline-any cline-neutral"> </span>
|
|
505
|
-
<span class="cline-any cline-
|
|
506
|
-
<span class="cline-any cline-
|
|
520
|
+
<span class="cline-any cline-neutral"> </span>
|
|
521
|
+
<span class="cline-any cline-no"> </span>
|
|
522
|
+
<span class="cline-any cline-no"> </span>
|
|
507
523
|
<span class="cline-any cline-neutral"> </span>
|
|
508
524
|
<span class="cline-any cline-neutral"> </span>
|
|
509
525
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -523,18 +539,24 @@
|
|
|
523
539
|
<span class="cline-any cline-no"> </span>
|
|
524
540
|
<span class="cline-any cline-no"> </span>
|
|
525
541
|
<span class="cline-any cline-no"> </span>
|
|
542
|
+
<span class="cline-any cline-neutral"> </span>
|
|
543
|
+
<span class="cline-any cline-no"> </span>
|
|
526
544
|
<span class="cline-any cline-no"> </span>
|
|
527
545
|
<span class="cline-any cline-no"> </span>
|
|
528
546
|
<span class="cline-any cline-neutral"> </span>
|
|
529
547
|
<span class="cline-any cline-neutral"> </span>
|
|
530
|
-
<span class="cline-any cline-neutral"> </span>
|
|
531
|
-
<span class="cline-any cline-no"> </span>
|
|
532
548
|
<span class="cline-any cline-no"> </span>
|
|
549
|
+
<span class="cline-any cline-neutral"> </span>
|
|
533
550
|
<span class="cline-any cline-no"> </span>
|
|
534
551
|
<span class="cline-any cline-no"> </span>
|
|
535
552
|
<span class="cline-any cline-no"> </span>
|
|
553
|
+
<span class="cline-any cline-neutral"> </span>
|
|
536
554
|
<span class="cline-any cline-no"> </span>
|
|
555
|
+
<span class="cline-any cline-neutral"> </span>
|
|
556
|
+
<span class="cline-any cline-neutral"> </span>
|
|
557
|
+
<span class="cline-any cline-neutral"> </span>
|
|
537
558
|
<span class="cline-any cline-no"> </span>
|
|
559
|
+
<span class="cline-any cline-neutral"> </span>
|
|
538
560
|
<span class="cline-any cline-no"> </span>
|
|
539
561
|
<span class="cline-any cline-neutral"> </span>
|
|
540
562
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -543,23 +565,17 @@
|
|
|
543
565
|
<span class="cline-any cline-no"> </span>
|
|
544
566
|
<span class="cline-any cline-no"> </span>
|
|
545
567
|
<span class="cline-any cline-no"> </span>
|
|
546
|
-
<span class="cline-any cline-neutral"> </span>
|
|
547
568
|
<span class="cline-any cline-no"> </span>
|
|
548
569
|
<span class="cline-any cline-neutral"> </span>
|
|
549
570
|
<span class="cline-any cline-neutral"> </span>
|
|
550
|
-
<span class="cline-any cline-neutral"> </span>
|
|
551
|
-
<span class="cline-any cline-neutral"> </span>
|
|
552
|
-
<span class="cline-any cline-no"> </span>
|
|
553
|
-
<span class="cline-any cline-neutral"> </span>
|
|
554
571
|
<span class="cline-any cline-no"> </span>
|
|
555
572
|
<span class="cline-any cline-neutral"> </span>
|
|
556
573
|
<span class="cline-any cline-neutral"> </span>
|
|
557
574
|
<span class="cline-any cline-neutral"> </span>
|
|
558
|
-
<span class="cline-any cline-
|
|
559
|
-
<span class="cline-any cline-
|
|
560
|
-
<span class="cline-any cline-
|
|
561
|
-
<span class="cline-any cline-
|
|
562
|
-
<span class="cline-any cline-yes">1x</span>
|
|
575
|
+
<span class="cline-any cline-no"> </span>
|
|
576
|
+
<span class="cline-any cline-no"> </span>
|
|
577
|
+
<span class="cline-any cline-no"> </span>
|
|
578
|
+
<span class="cline-any cline-no"> </span>
|
|
563
579
|
<span class="cline-any cline-neutral"> </span>
|
|
564
580
|
<span class="cline-any cline-no"> </span>
|
|
565
581
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -603,7 +619,7 @@
|
|
|
603
619
|
<span class="cline-any cline-neutral"> </span>
|
|
604
620
|
<span class="cline-any cline-neutral"> </span>
|
|
605
621
|
<span class="cline-any cline-neutral"> </span>
|
|
606
|
-
<span class="cline-any cline-
|
|
622
|
+
<span class="cline-any cline-no"> </span>
|
|
607
623
|
<span class="cline-any cline-neutral"> </span>
|
|
608
624
|
<span class="cline-any cline-neutral"> </span>
|
|
609
625
|
<span class="cline-any cline-no"> </span>
|
|
@@ -626,6 +642,7 @@
|
|
|
626
642
|
<span class="cline-any cline-neutral"> </span>
|
|
627
643
|
<span class="cline-any cline-no"> </span>
|
|
628
644
|
<span class="cline-any cline-no"> </span>
|
|
645
|
+
<span class="cline-any cline-no"> </span>
|
|
629
646
|
<span class="cline-any cline-neutral"> </span>
|
|
630
647
|
<span class="cline-any cline-no"> </span>
|
|
631
648
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -650,6 +667,9 @@
|
|
|
650
667
|
<span class="cline-any cline-neutral"> </span>
|
|
651
668
|
<span class="cline-any cline-neutral"> </span>
|
|
652
669
|
<span class="cline-any cline-neutral"> </span>
|
|
670
|
+
<span class="cline-any cline-no"> </span>
|
|
671
|
+
<span class="cline-any cline-no"> </span>
|
|
672
|
+
<span class="cline-any cline-neutral"> </span>
|
|
653
673
|
<span class="cline-any cline-neutral"> </span>
|
|
654
674
|
<span class="cline-any cline-neutral"> </span>
|
|
655
675
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -665,6 +685,16 @@
|
|
|
665
685
|
<span class="cline-any cline-neutral"> </span>
|
|
666
686
|
<span class="cline-any cline-neutral"> </span>
|
|
667
687
|
<span class="cline-any cline-neutral"> </span>
|
|
688
|
+
<span class="cline-any cline-no"> </span>
|
|
689
|
+
<span class="cline-any cline-neutral"> </span>
|
|
690
|
+
<span class="cline-any cline-neutral"> </span>
|
|
691
|
+
<span class="cline-any cline-neutral"> </span>
|
|
692
|
+
<span class="cline-any cline-no"> </span>
|
|
693
|
+
<span class="cline-any cline-neutral"> </span>
|
|
694
|
+
<span class="cline-any cline-neutral"> </span>
|
|
695
|
+
<span class="cline-any cline-neutral"> </span>
|
|
696
|
+
<span class="cline-any cline-neutral"> </span>
|
|
697
|
+
<span class="cline-any cline-neutral"> </span>
|
|
668
698
|
<span class="cline-any cline-neutral"> </span>
|
|
669
699
|
<span class="cline-any cline-neutral"> </span>
|
|
670
700
|
<span class="cline-any cline-no"> </span>
|
|
@@ -746,7 +776,7 @@
|
|
|
746
776
|
<span class="cline-any cline-neutral"> </span>
|
|
747
777
|
<span class="cline-any cline-neutral"> </span>
|
|
748
778
|
<span class="cline-any cline-neutral"> </span>
|
|
749
|
-
<span class="cline-any cline-
|
|
779
|
+
<span class="cline-any cline-no"> </span>
|
|
750
780
|
<span class="cline-any cline-no"> </span>
|
|
751
781
|
<span class="cline-any cline-no"> </span>
|
|
752
782
|
<span class="cline-any cline-no"> </span>
|
|
@@ -760,7 +790,7 @@
|
|
|
760
790
|
<span class="cline-any cline-no"> </span>
|
|
761
791
|
<span class="cline-any cline-neutral"> </span>
|
|
762
792
|
<span class="cline-any cline-neutral"> </span>
|
|
763
|
-
<span class="cline-any cline-
|
|
793
|
+
<span class="cline-any cline-no"> </span>
|
|
764
794
|
<span class="cline-any cline-no"> </span>
|
|
765
795
|
<span class="cline-any cline-neutral"> </span>
|
|
766
796
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -896,19 +926,20 @@ interface Filter {
|
|
|
896
926
|
type: string
|
|
897
927
|
source?: string
|
|
898
928
|
}
|
|
929
|
+
|
|
899
930
|
interface ApiResponse {
|
|
900
931
|
capture_rate: number
|
|
901
932
|
name: string
|
|
902
933
|
filters: Filter[]
|
|
903
934
|
}
|
|
904
935
|
|
|
905
|
-
export default class
|
|
906
|
-
conditions: Condition[] = []
|
|
907
|
-
hasStarted = false
|
|
936
|
+
<span class="cstat-no" title="statement not covered" >export default class C</span>onditionsManager {
|
|
937
|
+
<span class="cstat-no" title="statement not covered" > conditions: Condition[] = []</span>
|
|
938
|
+
<span class="cstat-no" title="statement not covered" > hasStarted = false</span>
|
|
908
939
|
|
|
909
|
-
constructor(
|
|
910
|
-
private readonly app: App
|
|
911
|
-
private readonly startParams: StartOptions
|
|
940
|
+
<span class="fstat-no" title="function not covered" > constructor(</span>
|
|
941
|
+
private readonly <span class="cstat-no" title="statement not covered" >app: App,</span>
|
|
942
|
+
private readonly <span class="cstat-no" title="statement not covered" >startParams: StartOptions,</span>
|
|
912
943
|
) {}
|
|
913
944
|
|
|
914
945
|
<span class="fstat-no" title="function not covered" > setConditions(</span>conditions: Condition[]) {
|
|
@@ -925,32 +956,22 @@ export default class ConditionsManager {
|
|
|
925
956
|
})
|
|
926
957
|
const { conditions } = (<span class="cstat-no" title="statement not covered" >await r.json())</span> as { conditions: ApiResponse[] }
|
|
927
958
|
const mappedConditions: Condition[] = <span class="cstat-no" title="statement not covered" >[]</span>
|
|
928
|
-
const processFilter = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(f</span>ilter: Filter) => {</span>
|
|
929
|
-
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (filter.value.length) {</span>
|
|
930
|
-
const resultCondition = <span class="cstat-no" title="statement not covered" >mapCondition(filter)</span>
|
|
931
|
-
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (resultCondition.type) {</span>
|
|
932
|
-
<span class="cstat-no" title="statement not covered" > return resultCondition</span>
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
959
|
<span class="cstat-no" title="statement not covered" > conditions.forEach(<span class="fstat-no" title="function not covered" >(c</span>) => {</span>
|
|
937
960
|
const filters = <span class="cstat-no" title="statement not covered" >c.filters</span>
|
|
938
961
|
<span class="cstat-no" title="statement not covered" > filters.forEach(<span class="fstat-no" title="function not covered" >(f</span>ilter) => {</span>
|
|
962
|
+
let cond: Condition | undefined
|
|
939
963
|
<span class="cstat-no" title="statement not covered" > if (filter.type === 'fetch') {</span>
|
|
940
964
|
<span class="cstat-no" title="statement not covered" > filter.filters.forEach(<span class="fstat-no" title="function not covered" >(f</span>) => {</span>
|
|
941
|
-
|
|
942
|
-
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (cond) {</span>
|
|
943
|
-
<span class="cstat-no" title="statement not covered" > mappedConditions.push({ ...cond, name: c.name })</span>
|
|
944
|
-
}
|
|
965
|
+
<span class="cstat-no" title="statement not covered" > cond = this.createConditionFromFilter(f as unknown as Filter)</span>
|
|
945
966
|
})
|
|
946
967
|
} else {
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
<span class="cstat-no" title="statement not covered" >
|
|
950
|
-
<span class="cstat-no" title="statement not covered" >
|
|
951
|
-
|
|
952
|
-
<span class="cstat-no" title="statement not covered" > mappedConditions.push({ ...cond, name: c.name })</span>
|
|
968
|
+
<span class="cstat-no" title="statement not covered" > cond = this.createConditionFromFilter(filter)</span>
|
|
969
|
+
}
|
|
970
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (cond) {</span>
|
|
971
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (cond.type === 'session_duration') {</span>
|
|
972
|
+
<span class="cstat-no" title="statement not covered" > this.processDuration(cond.value[0], c.name)</span>
|
|
953
973
|
}
|
|
974
|
+
<span class="cstat-no" title="statement not covered" > mappedConditions.push({ ...cond, name: c.name })</span>
|
|
954
975
|
}
|
|
955
976
|
})
|
|
956
977
|
})
|
|
@@ -960,11 +981,21 @@ export default class ConditionsManager {
|
|
|
960
981
|
}
|
|
961
982
|
}
|
|
962
983
|
|
|
963
|
-
|
|
964
|
-
<span class="missing-if-branch" title="if path not taken" >I</span>if (
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
984
|
+
<span class="cstat-no" title="statement not covered" > createConditionFromFilter = <span class="fstat-no" title="function not covered" >(f</span>ilter: Filter) => {</span>
|
|
985
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (filter.value.length) {</span>
|
|
986
|
+
const resultCondition = <span class="cstat-no" title="statement not covered" >mapCondition(filter)</span>
|
|
987
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (resultCondition.type) {</span>
|
|
988
|
+
<span class="cstat-no" title="statement not covered" > return resultCondition</span>
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
<span class="cstat-no" title="statement not covered" > return undefined</span>
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
<span class="fstat-no" title="function not covered" > trigger(</span>conditionName: string) {
|
|
995
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (this.hasStarted) <span class="cstat-no" title="statement not covered" >return</span></span>
|
|
996
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
997
|
+
<span class="cstat-no" title="statement not covered" > this.hasStarted = true</span>
|
|
998
|
+
<span class="cstat-no" title="statement not covered" > void this.app.start(this.startParams, undefined, conditionName)</span>
|
|
968
999
|
} catch (e) {
|
|
969
1000
|
<span class="cstat-no" title="statement not covered" > this.app.debug.error(e)</span>
|
|
970
1001
|
}
|
|
@@ -1008,7 +1039,7 @@ export default class ConditionsManager {
|
|
|
1008
1039
|
}
|
|
1009
1040
|
}
|
|
1010
1041
|
|
|
1011
|
-
durationInt: ReturnType<typeof setInterval> | null = null
|
|
1042
|
+
<span class="cstat-no" title="statement not covered" > durationInt: ReturnType<typeof setInterval> | null = null</span>
|
|
1012
1043
|
|
|
1013
1044
|
<span class="fstat-no" title="function not covered" > processDuration(</span>durationMs: number, condName: string) {
|
|
1014
1045
|
<span class="cstat-no" title="statement not covered" > this.durationInt = setInterval(<span class="fstat-no" title="function not covered" >() =</span>> {</span>
|
|
@@ -1029,8 +1060,9 @@ export default class ConditionsManager {
|
|
|
1029
1060
|
const reqConds = <span class="cstat-no" title="statement not covered" >this.conditions.filter(</span>
|
|
1030
1061
|
<span class="fstat-no" title="function not covered" > (c</span>) => <span class="cstat-no" title="statement not covered" >c.type === 'network_request',</span>
|
|
1031
1062
|
) as NetworkRequestCondition[]
|
|
1032
|
-
<span class="cstat-no" title="statement not covered" >
|
|
1033
|
-
<span class="cstat-no" title="statement not covered" >
|
|
1063
|
+
const withoutAny = <span class="cstat-no" title="statement not covered" >reqConds.filter(<span class="fstat-no" title="function not covered" >(c</span>) => <span class="cstat-no" title="statement not covered" >c.operator !== 'isAny')</span></span>
|
|
1064
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (withoutAny.length) {</span>
|
|
1065
|
+
<span class="cstat-no" title="statement not covered" > withoutAny.forEach(<span class="fstat-no" title="function not covered" >(r</span>eqCond) => {</span>
|
|
1034
1066
|
let value
|
|
1035
1067
|
<span class="cstat-no" title="statement not covered" > switch (reqCond.key) {</span>
|
|
1036
1068
|
case 'url':
|
|
@@ -1055,15 +1087,28 @@ export default class ConditionsManager {
|
|
|
1055
1087
|
}
|
|
1056
1088
|
})
|
|
1057
1089
|
}
|
|
1090
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (withoutAny.length === 0 && reqConds.length) {</span>
|
|
1091
|
+
<span class="cstat-no" title="statement not covered" > this.trigger(reqConds[0].name)</span>
|
|
1092
|
+
}
|
|
1058
1093
|
}
|
|
1059
1094
|
|
|
1060
1095
|
<span class="fstat-no" title="function not covered" > customEvent(</span>message: CustomEvent) {
|
|
1061
|
-
// name - 1
|
|
1096
|
+
// name - 1, payload - 2
|
|
1062
1097
|
const evConds = <span class="cstat-no" title="statement not covered" >this.conditions.filter(<span class="fstat-no" title="function not covered" >(c</span>) => <span class="cstat-no" title="statement not covered" >c.type === 'custom_event')</span> as CommonCondition[]</span>
|
|
1098
|
+
<span class="cstat-no" title="statement not covered" > console.log(message, evConds)</span>
|
|
1063
1099
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (evConds.length) {</span>
|
|
1064
1100
|
<span class="cstat-no" title="statement not covered" > evConds.forEach(<span class="fstat-no" title="function not covered" >(e</span>vCond) => {</span>
|
|
1065
1101
|
const operator = <span class="cstat-no" title="statement not covered" >operators[evCond.operator] as (a: string, b: string[]) => boolean</span>
|
|
1066
|
-
<span class="cstat-no" title="statement not covered" >
|
|
1102
|
+
<span class="cstat-no" title="statement not covered" > console.log(</span>
|
|
1103
|
+
operator,
|
|
1104
|
+
evCond,
|
|
1105
|
+
operator(message[1], evCond.value),
|
|
1106
|
+
operator(message[2], evCond.value),
|
|
1107
|
+
)
|
|
1108
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (</span>
|
|
1109
|
+
operator &&
|
|
1110
|
+
(operator(message[1], evCond.value) || operator(message[2], evCond.value))
|
|
1111
|
+
) {
|
|
1067
1112
|
<span class="cstat-no" title="statement not covered" > this.trigger(evCond.name)</span>
|
|
1068
1113
|
}
|
|
1069
1114
|
})
|
|
@@ -1151,10 +1196,10 @@ type Condition =
|
|
|
1151
1196
|
| SessionDurationCondition
|
|
1152
1197
|
| NetworkRequestCondition
|
|
1153
1198
|
|
|
1154
|
-
const operators = {
|
|
1155
|
-
is: <span class="fstat-no" title="function not covered" >(v</span>al: string, target: string[]) => <span class="cstat-no" title="statement not covered" >target.includes(
|
|
1199
|
+
const operators = <span class="cstat-no" title="statement not covered" >{</span>
|
|
1200
|
+
is: <span class="fstat-no" title="function not covered" >(v</span>al: string, target: string[]) => <span class="cstat-no" title="statement not covered" >target.some(<span class="fstat-no" title="function not covered" >(t</span>) => <span class="cstat-no" title="statement not covered" >val.includes(t))</span>,</span>
|
|
1156
1201
|
isAny: <span class="fstat-no" title="function not covered" >() =</span>> <span class="cstat-no" title="statement not covered" >true,</span>
|
|
1157
|
-
isNot: <span class="fstat-no" title="function not covered" >(v</span>al: string, target: string[]) => <span class="cstat-no" title="statement not covered" >!target.includes(
|
|
1202
|
+
isNot: <span class="fstat-no" title="function not covered" >(v</span>al: string, target: string[]) => <span class="cstat-no" title="statement not covered" >!target.some(<span class="fstat-no" title="function not covered" >(t</span>) => <span class="cstat-no" title="statement not covered" >val.includes(t))</span>,</span>
|
|
1158
1203
|
contains: <span class="fstat-no" title="function not covered" >(v</span>al: string, target: string[]) => <span class="cstat-no" title="statement not covered" >target.some(<span class="fstat-no" title="function not covered" >(t</span>) => <span class="cstat-no" title="statement not covered" >val.includes(t))</span>,</span>
|
|
1159
1204
|
notContains: <span class="fstat-no" title="function not covered" >(v</span>al: string, target: string[]) => <span class="cstat-no" title="statement not covered" >!target.some(<span class="fstat-no" title="function not covered" >(t</span>) => <span class="cstat-no" title="statement not covered" >val.includes(t))</span>,</span>
|
|
1160
1205
|
startsWith: <span class="fstat-no" title="function not covered" >(v</span>al: string, target: string[]) => <span class="cstat-no" title="statement not covered" >target.some(<span class="fstat-no" title="function not covered" >(t</span>) => <span class="cstat-no" title="statement not covered" >val.startsWith(t))</span>,</span>
|
|
@@ -1165,7 +1210,7 @@ const operators = {
|
|
|
1165
1210
|
lessThan: <span class="fstat-no" title="function not covered" >(v</span>al: number, target: number) => <span class="cstat-no" title="statement not covered" >val < target,</span>
|
|
1166
1211
|
}
|
|
1167
1212
|
|
|
1168
|
-
const mapCondition = <span class="fstat-no" title="function not covered" >(c</span>ondition: Filter): Condition => {
|
|
1213
|
+
const mapCondition = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(c</span>ondition: Filter): Condition => {</span>
|
|
1169
1214
|
const opMap = <span class="cstat-no" title="statement not covered" >{</span>
|
|
1170
1215
|
on: 'is',
|
|
1171
1216
|
notOn: 'isNot',
|
|
@@ -1285,7 +1330,7 @@ const mapCondition = <span class="fstat-no" title="function not covered" >(c</sp
|
|
|
1285
1330
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1286
1331
|
Code coverage generated by
|
|
1287
1332
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1288
|
-
at
|
|
1333
|
+
at 2024-01-09T16:51:30.347Z
|
|
1289
1334
|
</div>
|
|
1290
1335
|
<script src="../../prettify.js"></script>
|
|
1291
1336
|
<script>
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
146
146
|
Code coverage generated by
|
|
147
147
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
148
|
-
at 2024-01-
|
|
148
|
+
at 2024-01-09T16:51:30.347Z
|
|
149
149
|
</div>
|
|
150
150
|
<script src="../../prettify.js"></script>
|
|
151
151
|
<script>
|
|
@@ -526,7 +526,7 @@ const consoleMethods = <span class="cstat-no" title="statement not covered" >['l
|
|
|
526
526
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
527
527
|
Code coverage generated by
|
|
528
528
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
529
|
-
at 2024-01-
|
|
529
|
+
at 2024-01-09T16:51:30.347Z
|
|
530
530
|
</div>
|
|
531
531
|
<script src="../../prettify.js"></script>
|
|
532
532
|
<script>
|
|
@@ -556,7 +556,7 @@ export const <span class="cstat-no" title="statement not covered" >styleSheetIDM
|
|
|
556
556
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
557
557
|
Code coverage generated by
|
|
558
558
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
559
|
-
at 2024-01-
|
|
559
|
+
at 2024-01-09T16:51:30.347Z
|
|
560
560
|
</div>
|
|
561
561
|
<script src="../../prettify.js"></script>
|
|
562
562
|
<script>
|
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
404
404
|
Code coverage generated by
|
|
405
405
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
406
|
-
at 2024-01-
|
|
406
|
+
at 2024-01-09T16:51:30.347Z
|
|
407
407
|
</div>
|
|
408
408
|
<script src="../../prettify.js"></script>
|
|
409
409
|
<script>
|
|
@@ -370,7 +370,7 @@ function <span class="fstat-no" title="function not covered" >getDefaultStack(</
|
|
|
370
370
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
371
371
|
Code coverage generated by
|
|
372
372
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
373
|
-
at 2024-01-
|
|
373
|
+
at 2024-01-09T16:51:30.347Z
|
|
374
374
|
</div>
|
|
375
375
|
<script src="../../prettify.js"></script>
|
|
376
376
|
<script>
|
|
@@ -25,14 +25,14 @@
|
|
|
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/50</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/13</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -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/42</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -172,7 +172,8 @@
|
|
|
172
172
|
<a name='L107'></a><a href='#L107'>107</a>
|
|
173
173
|
<a name='L108'></a><a href='#L108'>108</a>
|
|
174
174
|
<a name='L109'></a><a href='#L109'>109</a>
|
|
175
|
-
<a name='L110'></a><a href='#L110'>110</a
|
|
175
|
+
<a name='L110'></a><a href='#L110'>110</a>
|
|
176
|
+
<a name='L111'></a><a href='#L111'>111</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
176
177
|
<span class="cline-any cline-neutral"> </span>
|
|
177
178
|
<span class="cline-any cline-neutral"> </span>
|
|
178
179
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -238,6 +239,7 @@
|
|
|
238
239
|
<span class="cline-any cline-neutral"> </span>
|
|
239
240
|
<span class="cline-any cline-neutral"> </span>
|
|
240
241
|
<span class="cline-any cline-no"> </span>
|
|
242
|
+
<span class="cline-any cline-no"> </span>
|
|
241
243
|
<span class="cline-any cline-neutral"> </span>
|
|
242
244
|
<span class="cline-any cline-neutral"> </span>
|
|
243
245
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -320,7 +322,7 @@ export interface FetchPersistFlagsData {
|
|
|
320
322
|
<span class="cstat-no" title="statement not covered" > this.onFlagsCb = cb</span>
|
|
321
323
|
}
|
|
322
324
|
|
|
323
|
-
async <span class="fstat-no" title="function not covered" >reloadFlags(</span>) {
|
|
325
|
+
async <span class="fstat-no" title="function not covered" >reloadFlags(</span>token?: string) {
|
|
324
326
|
const persistFlagsStr = <span class="cstat-no" title="statement not covered" >this.app.sessionStorage.getItem(this.storageKey)</span>
|
|
325
327
|
const persistFlags: Record<string, FetchPersistFlagsData> = <span class="cstat-no" title="statement not covered" >{}</span>
|
|
326
328
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (persistFlagsStr) {</span>
|
|
@@ -346,11 +348,12 @@ export interface FetchPersistFlagsData {
|
|
|
346
348
|
persistFlags: persistFlags,
|
|
347
349
|
}
|
|
348
350
|
|
|
351
|
+
const authToken = <span class="cstat-no" title="statement not covered" >token ?? (this.app.session.getSessionToken() as string)</span>
|
|
349
352
|
const resp = <span class="cstat-no" title="statement not covered" >await fetch(this.app.options.ingestPoint + '/v1/web/feature-flags', {</span>
|
|
350
353
|
method: 'POST',
|
|
351
354
|
headers: {
|
|
352
355
|
'Content-Type': 'application/json',
|
|
353
|
-
Authorization: `Bearer ${
|
|
356
|
+
Authorization: `Bearer ${authToken}`,
|
|
354
357
|
},
|
|
355
358
|
body: JSON.stringify(requestObject),
|
|
356
359
|
})
|
|
@@ -397,7 +400,7 @@ export interface FetchPersistFlagsData {
|
|
|
397
400
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
398
401
|
Code coverage generated by
|
|
399
402
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
400
|
-
at 2024-01-
|
|
403
|
+
at 2024-01-09T16:51:30.347Z
|
|
401
404
|
</div>
|
|
402
405
|
<script src="../../prettify.js"></script>
|
|
403
406
|
<script>
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
206
206
|
Code coverage generated by
|
|
207
207
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
208
|
-
at 2024-01-
|
|
208
|
+
at 2024-01-09T16:51:30.347Z
|
|
209
209
|
</div>
|
|
210
210
|
<script src="../../prettify.js"></script>
|
|
211
211
|
<script>
|