@openreplay/tracker 11.0.3 → 11.0.5
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 +9 -0
- package/cjs/app/canvas.d.ts +3 -0
- package/cjs/app/canvas.js +23 -7
- 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 +840 -739
- package/coverage/coverage-final.json +13 -12
- package/coverage/lcov-report/index.html +33 -33
- package/coverage/lcov-report/main/app/canvas.ts.html +23 -14
- package/coverage/lcov-report/main/app/guards.ts.html +1 -1
- package/coverage/lcov-report/main/app/index.html +16 -16
- package/coverage/lcov-report/main/app/index.ts.html +478 -82
- package/coverage/lcov-report/main/app/logger.ts.html +25 -91
- package/coverage/lcov-report/main/app/messages.gen.ts.html +62 -5
- package/coverage/lcov-report/main/app/nodes.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +2 -2
- 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 +2 -2
- 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 +182 -11
- package/coverage/lcov-report/main/modules/Network/beaconProxy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +21 -6
- package/coverage/lcov-report/main/modules/Network/index.html +6 -6
- 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 +3 -3
- 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 +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 +1 -1
- package/coverage/lcov-report/main/modules/index.html +34 -19
- 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 +307 -0
- 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 +17 -5
- 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 +19 -19
- package/coverage/lcov-report/webworker/index.ts.html +15 -12
- package/coverage/lcov.info +1576 -1355
- package/lib/app/canvas.d.ts +3 -0
- package/lib/app/canvas.js +23 -7
- 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
|
@@ -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/213</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/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/40</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/211</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -497,7 +497,64 @@
|
|
|
497
497
|
<a name='L432'></a><a href='#L432'>432</a>
|
|
498
498
|
<a name='L433'></a><a href='#L433'>433</a>
|
|
499
499
|
<a name='L434'></a><a href='#L434'>434</a>
|
|
500
|
-
<a name='L435'></a><a href='#L435'>435</a
|
|
500
|
+
<a name='L435'></a><a href='#L435'>435</a>
|
|
501
|
+
<a name='L436'></a><a href='#L436'>436</a>
|
|
502
|
+
<a name='L437'></a><a href='#L437'>437</a>
|
|
503
|
+
<a name='L438'></a><a href='#L438'>438</a>
|
|
504
|
+
<a name='L439'></a><a href='#L439'>439</a>
|
|
505
|
+
<a name='L440'></a><a href='#L440'>440</a>
|
|
506
|
+
<a name='L441'></a><a href='#L441'>441</a>
|
|
507
|
+
<a name='L442'></a><a href='#L442'>442</a>
|
|
508
|
+
<a name='L443'></a><a href='#L443'>443</a>
|
|
509
|
+
<a name='L444'></a><a href='#L444'>444</a>
|
|
510
|
+
<a name='L445'></a><a href='#L445'>445</a>
|
|
511
|
+
<a name='L446'></a><a href='#L446'>446</a>
|
|
512
|
+
<a name='L447'></a><a href='#L447'>447</a>
|
|
513
|
+
<a name='L448'></a><a href='#L448'>448</a>
|
|
514
|
+
<a name='L449'></a><a href='#L449'>449</a>
|
|
515
|
+
<a name='L450'></a><a href='#L450'>450</a>
|
|
516
|
+
<a name='L451'></a><a href='#L451'>451</a>
|
|
517
|
+
<a name='L452'></a><a href='#L452'>452</a>
|
|
518
|
+
<a name='L453'></a><a href='#L453'>453</a>
|
|
519
|
+
<a name='L454'></a><a href='#L454'>454</a>
|
|
520
|
+
<a name='L455'></a><a href='#L455'>455</a>
|
|
521
|
+
<a name='L456'></a><a href='#L456'>456</a>
|
|
522
|
+
<a name='L457'></a><a href='#L457'>457</a>
|
|
523
|
+
<a name='L458'></a><a href='#L458'>458</a>
|
|
524
|
+
<a name='L459'></a><a href='#L459'>459</a>
|
|
525
|
+
<a name='L460'></a><a href='#L460'>460</a>
|
|
526
|
+
<a name='L461'></a><a href='#L461'>461</a>
|
|
527
|
+
<a name='L462'></a><a href='#L462'>462</a>
|
|
528
|
+
<a name='L463'></a><a href='#L463'>463</a>
|
|
529
|
+
<a name='L464'></a><a href='#L464'>464</a>
|
|
530
|
+
<a name='L465'></a><a href='#L465'>465</a>
|
|
531
|
+
<a name='L466'></a><a href='#L466'>466</a>
|
|
532
|
+
<a name='L467'></a><a href='#L467'>467</a>
|
|
533
|
+
<a name='L468'></a><a href='#L468'>468</a>
|
|
534
|
+
<a name='L469'></a><a href='#L469'>469</a>
|
|
535
|
+
<a name='L470'></a><a href='#L470'>470</a>
|
|
536
|
+
<a name='L471'></a><a href='#L471'>471</a>
|
|
537
|
+
<a name='L472'></a><a href='#L472'>472</a>
|
|
538
|
+
<a name='L473'></a><a href='#L473'>473</a>
|
|
539
|
+
<a name='L474'></a><a href='#L474'>474</a>
|
|
540
|
+
<a name='L475'></a><a href='#L475'>475</a>
|
|
541
|
+
<a name='L476'></a><a href='#L476'>476</a>
|
|
542
|
+
<a name='L477'></a><a href='#L477'>477</a>
|
|
543
|
+
<a name='L478'></a><a href='#L478'>478</a>
|
|
544
|
+
<a name='L479'></a><a href='#L479'>479</a>
|
|
545
|
+
<a name='L480'></a><a href='#L480'>480</a>
|
|
546
|
+
<a name='L481'></a><a href='#L481'>481</a>
|
|
547
|
+
<a name='L482'></a><a href='#L482'>482</a>
|
|
548
|
+
<a name='L483'></a><a href='#L483'>483</a>
|
|
549
|
+
<a name='L484'></a><a href='#L484'>484</a>
|
|
550
|
+
<a name='L485'></a><a href='#L485'>485</a>
|
|
551
|
+
<a name='L486'></a><a href='#L486'>486</a>
|
|
552
|
+
<a name='L487'></a><a href='#L487'>487</a>
|
|
553
|
+
<a name='L488'></a><a href='#L488'>488</a>
|
|
554
|
+
<a name='L489'></a><a href='#L489'>489</a>
|
|
555
|
+
<a name='L490'></a><a href='#L490'>490</a>
|
|
556
|
+
<a name='L491'></a><a href='#L491'>491</a>
|
|
557
|
+
<a name='L492'></a><a href='#L492'>492</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span>
|
|
501
558
|
<span class="cline-any cline-neutral"> </span>
|
|
502
559
|
<span class="cline-any cline-no"> </span>
|
|
503
560
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -704,9 +761,8 @@
|
|
|
704
761
|
<span class="cline-any cline-neutral"> </span>
|
|
705
762
|
<span class="cline-any cline-neutral"> </span>
|
|
706
763
|
<span class="cline-any cline-neutral"> </span>
|
|
707
|
-
<span class="cline-any cline-neutral"> </span>
|
|
708
764
|
<span class="cline-any cline-no"> </span>
|
|
709
|
-
<span class="cline-any cline-
|
|
765
|
+
<span class="cline-any cline-no"> </span>
|
|
710
766
|
<span class="cline-any cline-neutral"> </span>
|
|
711
767
|
<span class="cline-any cline-neutral"> </span>
|
|
712
768
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -719,6 +775,7 @@
|
|
|
719
775
|
<span class="cline-any cline-no"> </span>
|
|
720
776
|
<span class="cline-any cline-no"> </span>
|
|
721
777
|
<span class="cline-any cline-no"> </span>
|
|
778
|
+
<span class="cline-any cline-no"> </span>
|
|
722
779
|
<span class="cline-any cline-neutral"> </span>
|
|
723
780
|
<span class="cline-any cline-neutral"> </span>
|
|
724
781
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -765,6 +822,20 @@
|
|
|
765
822
|
<span class="cline-any cline-neutral"> </span>
|
|
766
823
|
<span class="cline-any cline-neutral"> </span>
|
|
767
824
|
<span class="cline-any cline-neutral"> </span>
|
|
825
|
+
<span class="cline-any cline-neutral"> </span>
|
|
826
|
+
<span class="cline-any cline-neutral"> </span>
|
|
827
|
+
<span class="cline-any cline-neutral"> </span>
|
|
828
|
+
<span class="cline-any cline-neutral"> </span>
|
|
829
|
+
<span class="cline-any cline-neutral"> </span>
|
|
830
|
+
<span class="cline-any cline-neutral"> </span>
|
|
831
|
+
<span class="cline-any cline-neutral"> </span>
|
|
832
|
+
<span class="cline-any cline-no"> </span>
|
|
833
|
+
<span class="cline-any cline-no"> </span>
|
|
834
|
+
<span class="cline-any cline-neutral"> </span>
|
|
835
|
+
<span class="cline-any cline-no"> </span>
|
|
836
|
+
<span class="cline-any cline-neutral"> </span>
|
|
837
|
+
<span class="cline-any cline-neutral"> </span>
|
|
838
|
+
<span class="cline-any cline-neutral"> </span>
|
|
768
839
|
<span class="cline-any cline-no"> </span>
|
|
769
840
|
<span class="cline-any cline-no"> </span>
|
|
770
841
|
<span class="cline-any cline-no"> </span>
|
|
@@ -786,6 +857,10 @@
|
|
|
786
857
|
<span class="cline-any cline-neutral"> </span>
|
|
787
858
|
<span class="cline-any cline-neutral"> </span>
|
|
788
859
|
<span class="cline-any cline-neutral"> </span>
|
|
860
|
+
<span class="cline-any cline-neutral"> </span>
|
|
861
|
+
<span class="cline-any cline-neutral"> </span>
|
|
862
|
+
<span class="cline-any cline-neutral"> </span>
|
|
863
|
+
<span class="cline-any cline-neutral"> </span>
|
|
789
864
|
<span class="cline-any cline-no"> </span>
|
|
790
865
|
<span class="cline-any cline-no"> </span>
|
|
791
866
|
<span class="cline-any cline-no"> </span>
|
|
@@ -797,6 +872,45 @@
|
|
|
797
872
|
<span class="cline-any cline-neutral"> </span>
|
|
798
873
|
<span class="cline-any cline-neutral"> </span>
|
|
799
874
|
<span class="cline-any cline-neutral"> </span>
|
|
875
|
+
<span class="cline-any cline-neutral"> </span>
|
|
876
|
+
<span class="cline-any cline-neutral"> </span>
|
|
877
|
+
<span class="cline-any cline-neutral"> </span>
|
|
878
|
+
<span class="cline-any cline-neutral"> </span>
|
|
879
|
+
<span class="cline-any cline-neutral"> </span>
|
|
880
|
+
<span class="cline-any cline-neutral"> </span>
|
|
881
|
+
<span class="cline-any cline-neutral"> </span>
|
|
882
|
+
<span class="cline-any cline-neutral"> </span>
|
|
883
|
+
<span class="cline-any cline-neutral"> </span>
|
|
884
|
+
<span class="cline-any cline-neutral"> </span>
|
|
885
|
+
<span class="cline-any cline-neutral"> </span>
|
|
886
|
+
<span class="cline-any cline-neutral"> </span>
|
|
887
|
+
<span class="cline-any cline-neutral"> </span>
|
|
888
|
+
<span class="cline-any cline-neutral"> </span>
|
|
889
|
+
<span class="cline-any cline-no"> </span>
|
|
890
|
+
<span class="cline-any cline-no"> </span>
|
|
891
|
+
<span class="cline-any cline-no"> </span>
|
|
892
|
+
<span class="cline-any cline-neutral"> </span>
|
|
893
|
+
<span class="cline-any cline-no"> </span>
|
|
894
|
+
<span class="cline-any cline-neutral"> </span>
|
|
895
|
+
<span class="cline-any cline-no"> </span>
|
|
896
|
+
<span class="cline-any cline-neutral"> </span>
|
|
897
|
+
<span class="cline-any cline-neutral"> </span>
|
|
898
|
+
<span class="cline-any cline-neutral"> </span>
|
|
899
|
+
<span class="cline-any cline-neutral"> </span>
|
|
900
|
+
<span class="cline-any cline-neutral"> </span>
|
|
901
|
+
<span class="cline-any cline-neutral"> </span>
|
|
902
|
+
<span class="cline-any cline-neutral"> </span>
|
|
903
|
+
<span class="cline-any cline-neutral"> </span>
|
|
904
|
+
<span class="cline-any cline-neutral"> </span>
|
|
905
|
+
<span class="cline-any cline-neutral"> </span>
|
|
906
|
+
<span class="cline-any cline-neutral"> </span>
|
|
907
|
+
<span class="cline-any cline-no"> </span>
|
|
908
|
+
<span class="cline-any cline-no"> </span>
|
|
909
|
+
<span class="cline-any cline-neutral"> </span>
|
|
910
|
+
<span class="cline-any cline-no"> </span>
|
|
911
|
+
<span class="cline-any cline-neutral"> </span>
|
|
912
|
+
<span class="cline-any cline-neutral"> </span>
|
|
913
|
+
<span class="cline-any cline-neutral"> </span>
|
|
800
914
|
<span class="cline-any cline-no"> </span>
|
|
801
915
|
<span class="cline-any cline-no"> </span>
|
|
802
916
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -1083,7 +1197,7 @@ function <span class="fstat-no" title="function not covered" >processOptions(</s
|
|
|
1083
1197
|
}
|
|
1084
1198
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (failReason.length > 0) {</span>
|
|
1085
1199
|
const missingApi = <span class="cstat-no" title="statement not covered" >failReason.join(',')</span>
|
|
1086
|
-
<span class="cstat-no" title="statement not covered" > console.
|
|
1200
|
+
<span class="cstat-no" title="statement not covered" > console.error(</span>
|
|
1087
1201
|
`OpenReplay: browser doesn't support API required for tracking or doNotTrack is set to 1. Reason: ${missingApi}`,
|
|
1088
1202
|
)
|
|
1089
1203
|
<span class="cstat-no" title="statement not covered" > this.signalStartIssue('missing_api', failReason)</span>
|
|
@@ -1138,7 +1252,7 @@ function <span class="fstat-no" title="function not covered" >processOptions(</s
|
|
|
1138
1252
|
}
|
|
1139
1253
|
}
|
|
1140
1254
|
|
|
1141
|
-
<span class="
|
|
1255
|
+
<span class="cstat-no" title="statement not covered" > checkDoNotTrack = <span class="fstat-no" title="function not covered" >() =</span>> {</span>
|
|
1142
1256
|
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
1143
1257
|
this.options.respectDoNotTrack &&
|
|
1144
1258
|
(navigator.doNotTrack == '1' ||
|
|
@@ -1147,7 +1261,7 @@ function <span class="fstat-no" title="function not covered" >processOptions(</s
|
|
|
1147
1261
|
)
|
|
1148
1262
|
}
|
|
1149
1263
|
|
|
1150
|
-
<span class="fstat-no" title="function not covered" >
|
|
1264
|
+
<span class="cstat-no" title="statement not covered" > signalStartIssue = <span class="fstat-no" title="function not covered" >(r</span>eason: string, missingApi: string[]) => {</span>
|
|
1151
1265
|
const doNotTrack = <span class="cstat-no" title="statement not covered" >this.checkDoNotTrack()</span>
|
|
1152
1266
|
const req = <span class="cstat-no" title="statement not covered" >new XMLHttpRequest()</span>
|
|
1153
1267
|
const orig = <span class="cstat-no" title="statement not covered" >this.options.ingestPoint || DEFAULT_INGEST_POINT</span>
|
|
@@ -1197,6 +1311,20 @@ function <span class="fstat-no" title="function not covered" >processOptions(</s
|
|
|
1197
1311
|
}
|
|
1198
1312
|
<span class="cstat-no" title="statement not covered" > return this.app.active()</span>
|
|
1199
1313
|
}
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* Creates a named hook that expects event name, data string and msg direction (up/down),
|
|
1317
|
+
* it will skip any message bigger than 5 mb or event name bigger than 255 symbols
|
|
1318
|
+
* msg direction is "down" (incoming) by default
|
|
1319
|
+
*
|
|
1320
|
+
* @returns {(msgType: string, data: string, dir: 'up' | 'down') => void}
|
|
1321
|
+
* */
|
|
1322
|
+
<span class="fstat-no" title="function not covered" > trackWs(</span>channelName: string) {
|
|
1323
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (this.app === null) {</span>
|
|
1324
|
+
<span class="cstat-no" title="statement not covered" > return</span>
|
|
1325
|
+
}
|
|
1326
|
+
<span class="cstat-no" title="statement not covered" > return this.app.trackWs(channelName)</span>
|
|
1327
|
+
}
|
|
1200
1328
|
|
|
1201
1329
|
<span class="fstat-no" title="function not covered" > start(</span>startOpts?: Partial<StartOptions>): Promise<StartPromiseReturn> {
|
|
1202
1330
|
<span class="cstat-no" title="statement not covered" > if (this.browserEnvCheck()) {</span>
|
|
@@ -1219,6 +1347,10 @@ function <span class="fstat-no" title="function not covered" >processOptions(</s
|
|
|
1219
1347
|
<span class="cstat-no" title="statement not covered" > return true</span>
|
|
1220
1348
|
}
|
|
1221
1349
|
|
|
1350
|
+
/**
|
|
1351
|
+
* start buffering messages without starting the actual session, which gives user 30 seconds to "activate" and record
|
|
1352
|
+
* session by calling start() on conditional trigger and we will then send buffered batch, so it won't get lost
|
|
1353
|
+
* */
|
|
1222
1354
|
<span class="fstat-no" title="function not covered" > coldStart(</span>startOpts?: Partial<StartOptions>, conditional?: boolean) {
|
|
1223
1355
|
<span class="cstat-no" title="statement not covered" > if (this.browserEnvCheck()) {</span>
|
|
1224
1356
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (this.app === null) {</span>
|
|
@@ -1229,6 +1361,45 @@ function <span class="fstat-no" title="function not covered" >processOptions(</s
|
|
|
1229
1361
|
<span class="cstat-no" title="statement not covered" > return Promise.reject('Trying to start not in browser.')</span>
|
|
1230
1362
|
}
|
|
1231
1363
|
}
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* Starts offline session recording. Keep in mind that only user device time will be used for timestamps.
|
|
1367
|
+
* (no backend delay sync)
|
|
1368
|
+
*
|
|
1369
|
+
* @param {Object} startOpts - options for session start, same as .start()
|
|
1370
|
+
* @param {Function} onSessionSent - callback that will be called once session is fully sent
|
|
1371
|
+
* @returns methods to manipulate buffer:
|
|
1372
|
+
*
|
|
1373
|
+
* saveBuffer - to save it in localStorage
|
|
1374
|
+
*
|
|
1375
|
+
* getBuffer - returns current buffer
|
|
1376
|
+
*
|
|
1377
|
+
* setBuffer - replaces current buffer with given
|
|
1378
|
+
* */
|
|
1379
|
+
<span class="fstat-no" title="function not covered" > startOfflineRecording(</span>startOpts: Partial<StartOptions>, onSessionSent: () => void) {
|
|
1380
|
+
<span class="cstat-no" title="statement not covered" > if (this.browserEnvCheck()) {</span>
|
|
1381
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (this.app === null) {</span>
|
|
1382
|
+
<span class="cstat-no" title="statement not covered" > return Promise.reject('Tracker not initialized')</span>
|
|
1383
|
+
}
|
|
1384
|
+
<span class="cstat-no" title="statement not covered" > return this.app.offlineRecording(startOpts, onSessionSent)</span>
|
|
1385
|
+
} else {
|
|
1386
|
+
<span class="cstat-no" title="statement not covered" > return Promise.reject('Trying to start not in browser.')</span>
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1391
|
+
* Uploads the stored session buffer to backend
|
|
1392
|
+
* @returns promise that resolves once messages are loaded, it has to be awaited
|
|
1393
|
+
* so the session can be uploaded properly
|
|
1394
|
+
* @resolve {boolean} - if messages were loaded successfully
|
|
1395
|
+
* @reject {string} - error message
|
|
1396
|
+
* */
|
|
1397
|
+
<span class="fstat-no" title="function not covered" > uploadOfflineRecording(</span>) {
|
|
1398
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (this.app === null) {</span>
|
|
1399
|
+
<span class="cstat-no" title="statement not covered" > return</span>
|
|
1400
|
+
}
|
|
1401
|
+
<span class="cstat-no" title="statement not covered" > return this.app.uploadOfflineRecording()</span>
|
|
1402
|
+
}
|
|
1232
1403
|
|
|
1233
1404
|
<span class="fstat-no" title="function not covered" > stop(</span>): string | undefined {
|
|
1234
1405
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (this.app === null) {</span>
|
|
@@ -1372,7 +1543,7 @@ function <span class="fstat-no" title="function not covered" >processOptions(</s
|
|
|
1372
1543
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1373
1544
|
Code coverage generated by
|
|
1374
1545
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1375
|
-
at
|
|
1546
|
+
at 2024-01-09T16:51:30.347Z
|
|
1376
1547
|
</div>
|
|
1377
1548
|
<script src="../prettify.js"></script>
|
|
1378
1549
|
<script>
|
|
@@ -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
|
|
379
|
+
at 2024-01-09T16:51:30.347Z
|
|
380
380
|
</div>
|
|
381
381
|
<script src="../../../prettify.js"></script>
|
|
382
382
|
<script>
|
|
@@ -32,7 +32,7 @@
|
|
|
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/94</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/148</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -379,7 +379,12 @@
|
|
|
379
379
|
<a name='L314'></a><a href='#L314'>314</a>
|
|
380
380
|
<a name='L315'></a><a href='#L315'>315</a>
|
|
381
381
|
<a name='L316'></a><a href='#L316'>316</a>
|
|
382
|
-
<a name='L317'></a><a href='#L317'>317</a
|
|
382
|
+
<a name='L317'></a><a href='#L317'>317</a>
|
|
383
|
+
<a name='L318'></a><a href='#L318'>318</a>
|
|
384
|
+
<a name='L319'></a><a href='#L319'>319</a>
|
|
385
|
+
<a name='L320'></a><a href='#L320'>320</a>
|
|
386
|
+
<a name='L321'></a><a href='#L321'>321</a>
|
|
387
|
+
<a name='L322'></a><a href='#L322'>322</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
383
388
|
<span class="cline-any cline-neutral"> </span>
|
|
384
389
|
<span class="cline-any cline-neutral"> </span>
|
|
385
390
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -512,10 +517,15 @@
|
|
|
512
517
|
<span class="cline-any cline-neutral"> </span>
|
|
513
518
|
<span class="cline-any cline-no"> </span>
|
|
514
519
|
<span class="cline-any cline-no"> </span>
|
|
520
|
+
<span class="cline-any cline-no"> </span>
|
|
521
|
+
<span class="cline-any cline-neutral"> </span>
|
|
522
|
+
<span class="cline-any cline-neutral"> </span>
|
|
523
|
+
<span class="cline-any cline-neutral"> </span>
|
|
515
524
|
<span class="cline-any cline-neutral"> </span>
|
|
516
525
|
<span class="cline-any cline-no"> </span>
|
|
517
526
|
<span class="cline-any cline-neutral"> </span>
|
|
518
527
|
<span class="cline-any cline-neutral"> </span>
|
|
528
|
+
<span class="cline-any cline-neutral"> </span>
|
|
519
529
|
<span class="cline-any cline-no"> </span>
|
|
520
530
|
<span class="cline-any cline-neutral"> </span>
|
|
521
531
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -828,8 +838,13 @@ import { NetworkRequest } from '../../../common/messages.gen.js'
|
|
|
828
838
|
public <span class="fstat-no" title="function not covered" >apply(</span>target: T, _: typeof window, argsList: [RequestInfo | URL, RequestInit]) {
|
|
829
839
|
const input = <span class="cstat-no" title="statement not covered" >argsList[0]</span>
|
|
830
840
|
const init = <span class="cstat-no" title="statement not covered" >argsList[1]</span>
|
|
831
|
-
|
|
832
|
-
|
|
841
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (</span>
|
|
842
|
+
!input ||
|
|
843
|
+
// @ts-ignore
|
|
844
|
+
(typeof input !== 'string' && !input?.url)
|
|
845
|
+
) {
|
|
846
|
+
<span class="cstat-no" title="statement not covered" > return <ReturnType<T>>target.apply(window, argsList)</span>
|
|
847
|
+
}
|
|
833
848
|
|
|
834
849
|
const isORUrl =
|
|
835
850
|
<span class="cstat-no" title="statement not covered" > input instanceof URL || typeof input === 'string'</span>
|
|
@@ -1018,7 +1033,7 @@ import { NetworkRequest } from '../../../common/messages.gen.js'
|
|
|
1018
1033
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1019
1034
|
Code coverage generated by
|
|
1020
1035
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1021
|
-
at
|
|
1036
|
+
at 2024-01-09T16:51:30.347Z
|
|
1022
1037
|
</div>
|
|
1023
1038
|
<script src="../../../prettify.js"></script>
|
|
1024
1039
|
<script>
|
|
@@ -32,7 +32,7 @@
|
|
|
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/270</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/492</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -101,11 +101,11 @@
|
|
|
101
101
|
<td data-value="0" class="pct low">0%</td>
|
|
102
102
|
<td data-value="149" class="abs low">0/149</td>
|
|
103
103
|
<td data-value="0" class="pct low">0%</td>
|
|
104
|
-
<td data-value="
|
|
104
|
+
<td data-value="94" class="abs low">0/94</td>
|
|
105
105
|
<td data-value="0" class="pct low">0%</td>
|
|
106
106
|
<td data-value="20" class="abs low">0/20</td>
|
|
107
107
|
<td data-value="0" class="pct low">0%</td>
|
|
108
|
-
<td data-value="
|
|
108
|
+
<td data-value="148" class="abs low">0/148</td>
|
|
109
109
|
</tr>
|
|
110
110
|
|
|
111
111
|
<tr>
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
<td data-value="0" class="pct low">0%</td>
|
|
162
162
|
<td data-value="124" class="abs low">0/124</td>
|
|
163
163
|
<td data-value="0" class="pct low">0%</td>
|
|
164
|
-
<td data-value="
|
|
164
|
+
<td data-value="48" class="abs low">0/48</td>
|
|
165
165
|
<td data-value="0" class="pct low">0%</td>
|
|
166
166
|
<td data-value="26" class="abs low">0/26</td>
|
|
167
167
|
<td data-value="0" class="pct low">0%</td>
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
688
|
+
at 2024-01-09T16:51:30.347Z
|
|
689
689
|
</div>
|
|
690
690
|
<script src="../../../prettify.js"></script>
|
|
691
691
|
<script>
|
|
@@ -32,7 +32,7 @@
|
|
|
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/48</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -721,7 +721,7 @@ import { NetworkRequest } from '../../../common/messages.gen.js'
|
|
|
721
721
|
protected <span class="fstat-no" title="function not covered" >setOnReadyStateChange(</span>target: T, key: string, orscFunction: (args: any[]) => any) {
|
|
722
722
|
<span class="cstat-no" title="statement not covered" > return Reflect.set(target, key, <span class="fstat-no" title="function not covered" >(.</span>..args: any[]) => {</span>
|
|
723
723
|
<span class="cstat-no" title="statement not covered" > this.onReadyStateChange()</span>
|
|
724
|
-
<span class="cstat-no" title="statement not covered" > orscFunction
|
|
724
|
+
<span class="cstat-no" title="statement not covered" > orscFunction?.apply(target, args)</span>
|
|
725
725
|
})
|
|
726
726
|
}
|
|
727
727
|
|
|
@@ -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
|
|
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
|
|
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
|
|
697
|
+
at 2024-01-09T16:51:30.347Z
|
|
698
698
|
</div>
|
|
699
699
|
<script src="../../prettify.js"></script>
|
|
700
700
|
<script>
|