@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
|
@@ -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">16.07% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>18/112</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">1.2% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>1/83</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">11.11% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>1/9</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">11.32% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>12/106</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -268,7 +268,7 @@
|
|
|
268
268
|
<a name='L203'></a><a href='#L203'>203</a>
|
|
269
269
|
<a name='L204'></a><a href='#L204'>204</a>
|
|
270
270
|
<a name='L205'></a><a href='#L205'>205</a>
|
|
271
|
-
<a name='L206'></a><a href='#L206'>206</a></td><td class="line-coverage quiet"><span class="cline-any cline-
|
|
271
|
+
<a name='L206'></a><a href='#L206'>206</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">3x</span>
|
|
272
272
|
<span class="cline-any cline-neutral"> </span>
|
|
273
273
|
<span class="cline-any cline-neutral"> </span>
|
|
274
274
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
<span class="cline-any cline-no"> </span>
|
|
304
304
|
<span class="cline-any cline-neutral"> </span>
|
|
305
305
|
<span class="cline-any cline-neutral"> </span>
|
|
306
|
-
<span class="cline-any cline-
|
|
306
|
+
<span class="cline-any cline-yes">3x</span>
|
|
307
307
|
<span class="cline-any cline-neutral"> </span>
|
|
308
308
|
<span class="cline-any cline-neutral"> </span>
|
|
309
309
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -332,7 +332,7 @@
|
|
|
332
332
|
<span class="cline-any cline-no"> </span>
|
|
333
333
|
<span class="cline-any cline-neutral"> </span>
|
|
334
334
|
<span class="cline-any cline-neutral"> </span>
|
|
335
|
-
<span class="cline-any cline-
|
|
335
|
+
<span class="cline-any cline-yes">3x</span>
|
|
336
336
|
<span class="cline-any cline-no"> </span>
|
|
337
337
|
<span class="cline-any cline-no"> </span>
|
|
338
338
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -373,7 +373,7 @@
|
|
|
373
373
|
<span class="cline-any cline-no"> </span>
|
|
374
374
|
<span class="cline-any cline-neutral"> </span>
|
|
375
375
|
<span class="cline-any cline-neutral"> </span>
|
|
376
|
-
<span class="cline-any cline-
|
|
376
|
+
<span class="cline-any cline-yes">3x</span>
|
|
377
377
|
<span class="cline-any cline-no"> </span>
|
|
378
378
|
<span class="cline-any cline-no"> </span>
|
|
379
379
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -396,7 +396,7 @@
|
|
|
396
396
|
<span class="cline-any cline-no"> </span>
|
|
397
397
|
<span class="cline-any cline-neutral"> </span>
|
|
398
398
|
<span class="cline-any cline-neutral"> </span>
|
|
399
|
-
<span class="cline-any cline-
|
|
399
|
+
<span class="cline-any cline-yes">3x</span>
|
|
400
400
|
<span class="cline-any cline-no"> </span>
|
|
401
401
|
<span class="cline-any cline-no"> </span>
|
|
402
402
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -437,18 +437,18 @@
|
|
|
437
437
|
<span class="cline-any cline-no"> </span>
|
|
438
438
|
<span class="cline-any cline-neutral"> </span>
|
|
439
439
|
<span class="cline-any cline-neutral"> </span>
|
|
440
|
-
<span class="cline-any cline-
|
|
440
|
+
<span class="cline-any cline-yes">3x</span>
|
|
441
441
|
<span class="cline-any cline-no"> </span>
|
|
442
442
|
<span class="cline-any cline-neutral"> </span>
|
|
443
443
|
<span class="cline-any cline-neutral"> </span>
|
|
444
|
-
<span class="cline-any cline-
|
|
444
|
+
<span class="cline-any cline-yes">3x</span>
|
|
445
445
|
<span class="cline-any cline-no"> </span>
|
|
446
446
|
<span class="cline-any cline-no"> </span>
|
|
447
447
|
<span class="cline-any cline-neutral"> </span>
|
|
448
448
|
<span class="cline-any cline-no"> </span>
|
|
449
449
|
<span class="cline-any cline-neutral"> </span>
|
|
450
450
|
<span class="cline-any cline-neutral"> </span>
|
|
451
|
-
<span class="cline-any cline-
|
|
451
|
+
<span class="cline-any cline-yes">3x</span>
|
|
452
452
|
<span class="cline-any cline-no"> </span>
|
|
453
453
|
<span class="cline-any cline-neutral"> </span>
|
|
454
454
|
<span class="cline-any cline-no"> </span>
|
|
@@ -462,18 +462,18 @@
|
|
|
462
462
|
<span class="cline-any cline-no"> </span>
|
|
463
463
|
<span class="cline-any cline-neutral"> </span>
|
|
464
464
|
<span class="cline-any cline-neutral"> </span>
|
|
465
|
-
<span class="cline-any cline-
|
|
466
|
-
<span class="cline-any cline-
|
|
465
|
+
<span class="cline-any cline-yes">3x</span>
|
|
466
|
+
<span class="cline-any cline-yes">1x</span>
|
|
467
467
|
<span class="cline-any cline-no"> </span>
|
|
468
468
|
<span class="cline-any cline-no"> </span>
|
|
469
469
|
<span class="cline-any cline-neutral"> </span>
|
|
470
|
-
<span class="cline-any cline-
|
|
471
|
-
<span class="cline-any cline-
|
|
470
|
+
<span class="cline-any cline-yes">1x</span>
|
|
471
|
+
<span class="cline-any cline-yes">1x</span>
|
|
472
472
|
<span class="cline-any cline-neutral"> </span>
|
|
473
473
|
<span class="cline-any cline-no"> </span>
|
|
474
474
|
<span class="cline-any cline-neutral"> </span>
|
|
475
475
|
<span class="cline-any cline-neutral"> </span>
|
|
476
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">export const
|
|
476
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">export const genResponseByType = <span class="fstat-no" title="function not covered" >(</span>
|
|
477
477
|
responseType: XMLHttpRequest['responseType'],
|
|
478
478
|
response: any,
|
|
479
479
|
): string | Record<string, any> => {
|
|
@@ -508,7 +508,7 @@
|
|
|
508
508
|
<span class="cstat-no" title="statement not covered" > return result</span>
|
|
509
509
|
}
|
|
510
510
|
|
|
511
|
-
export const
|
|
511
|
+
export const getStringResponseByType = <span class="fstat-no" title="function not covered" >(</span>
|
|
512
512
|
responseType: XMLHttpRequest['responseType'],
|
|
513
513
|
response: any,
|
|
514
514
|
) => {
|
|
@@ -537,7 +537,7 @@ export const <span class="cstat-no" title="statement not covered" >getStringResp
|
|
|
537
537
|
<span class="cstat-no" title="statement not covered" > return result</span>
|
|
538
538
|
}
|
|
539
539
|
|
|
540
|
-
export const
|
|
540
|
+
export const genStringBody = <span class="fstat-no" title="function not covered" >(b</span>ody?: BodyInit) => {
|
|
541
541
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (!body) {</span>
|
|
542
542
|
<span class="cstat-no" title="statement not covered" > return null</span>
|
|
543
543
|
}
|
|
@@ -578,7 +578,7 @@ export const <span class="cstat-no" title="statement not covered" >genStringBody
|
|
|
578
578
|
<span class="cstat-no" title="statement not covered" > return result</span>
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
-
export const
|
|
581
|
+
export const genGetDataByUrl = <span class="fstat-no" title="function not covered" >(u</span>rl: string, getData: Record<string, any> = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> => {
|
|
582
582
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (!isPureObject(getData)) {</span>
|
|
583
583
|
<span class="cstat-no" title="statement not covered" > getData = {}</span>
|
|
584
584
|
}
|
|
@@ -601,7 +601,7 @@ export const <span class="cstat-no" title="statement not covered" >genGetDataByU
|
|
|
601
601
|
<span class="cstat-no" title="statement not covered" > return getData</span>
|
|
602
602
|
}
|
|
603
603
|
|
|
604
|
-
export const
|
|
604
|
+
export const genFormattedBody = <span class="fstat-no" title="function not covered" >(b</span>ody?: BodyInit) => {
|
|
605
605
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (!body) {</span>
|
|
606
606
|
<span class="cstat-no" title="statement not covered" > return null</span>
|
|
607
607
|
}
|
|
@@ -642,18 +642,18 @@ export const <span class="cstat-no" title="statement not covered" >genFormattedB
|
|
|
642
642
|
<span class="cstat-no" title="statement not covered" > return result</span>
|
|
643
643
|
}
|
|
644
644
|
|
|
645
|
-
|
|
645
|
+
export function <span class="fstat-no" title="function not covered" >isPureObject(</span>input: any): input is Record<any, any> {
|
|
646
646
|
<span class="cstat-no" title="statement not covered" > return null !== input && typeof input === 'object'</span>
|
|
647
647
|
}
|
|
648
648
|
|
|
649
|
-
|
|
649
|
+
export function <span class="fstat-no" title="function not covered" >isIterable(</span>value: any) {
|
|
650
650
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (value === null || value === undefined) {</span>
|
|
651
651
|
<span class="cstat-no" title="statement not covered" > return false</span>
|
|
652
652
|
}
|
|
653
653
|
<span class="cstat-no" title="statement not covered" > return typeof Symbol !== 'undefined' && typeof value[Symbol.iterator] === 'function'</span>
|
|
654
654
|
}
|
|
655
655
|
|
|
656
|
-
|
|
656
|
+
export function <span class="fstat-no" title="function not covered" >formatByteSize(</span>bytes: number) {
|
|
657
657
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (bytes <= 0) {</span>
|
|
658
658
|
// shouldn't happen?
|
|
659
659
|
<span class="cstat-no" title="statement not covered" > return ''</span>
|
|
@@ -667,14 +667,14 @@ export const <span class="cstat-no" title="statement not covered" >genFormattedB
|
|
|
667
667
|
<span class="cstat-no" title="statement not covered" > return `${bytes}B`</span>
|
|
668
668
|
}
|
|
669
669
|
|
|
670
|
-
export const
|
|
671
|
-
|
|
670
|
+
export const getURL = (urlString: string) => {
|
|
671
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (urlString.startsWith('//')) {
|
|
672
672
|
const baseUrl = <span class="cstat-no" title="statement not covered" >new URL(window.location.href)</span>
|
|
673
673
|
<span class="cstat-no" title="statement not covered" > urlString = `${baseUrl.protocol}${urlString}`</span>
|
|
674
674
|
}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
} else {
|
|
675
|
+
if (urlString.startsWith('http')) {
|
|
676
|
+
return new URL(urlString)
|
|
677
|
+
} else <span class="missing-if-branch" title="else path not taken" >E</span>{
|
|
678
678
|
<span class="cstat-no" title="statement not covered" > return new URL(urlString, window.location.href)</span>
|
|
679
679
|
}
|
|
680
680
|
}
|
|
@@ -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 2023-
|
|
688
|
+
at 2023-11-03T09:39:08.430Z
|
|
689
689
|
</div>
|
|
690
690
|
<script src="../../../prettify.js"></script>
|
|
691
691
|
<script>
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">3.22% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>4/124</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">3.27% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>4/122</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -326,12 +326,12 @@
|
|
|
326
326
|
<span class="cline-any cline-neutral"> </span>
|
|
327
327
|
<span class="cline-any cline-neutral"> </span>
|
|
328
328
|
<span class="cline-any cline-neutral"> </span>
|
|
329
|
-
<span class="cline-any cline-
|
|
330
|
-
<span class="cline-any cline-
|
|
329
|
+
<span class="cline-any cline-yes">1x</span>
|
|
330
|
+
<span class="cline-any cline-yes">1x</span>
|
|
331
331
|
<span class="cline-any cline-neutral"> </span>
|
|
332
332
|
<span class="cline-any cline-neutral"> </span>
|
|
333
333
|
<span class="cline-any cline-neutral"> </span>
|
|
334
|
-
<span class="cline-any cline-
|
|
334
|
+
<span class="cline-any cline-yes">1x</span>
|
|
335
335
|
<span class="cline-any cline-neutral"> </span>
|
|
336
336
|
<span class="cline-any cline-neutral"> </span>
|
|
337
337
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -545,7 +545,7 @@
|
|
|
545
545
|
<span class="cline-any cline-neutral"> </span>
|
|
546
546
|
<span class="cline-any cline-neutral"> </span>
|
|
547
547
|
<span class="cline-any cline-neutral"> </span>
|
|
548
|
-
<span class="cline-any cline-
|
|
548
|
+
<span class="cline-any cline-yes">1x</span>
|
|
549
549
|
<span class="cline-any cline-neutral"> </span>
|
|
550
550
|
<span class="cline-any cline-neutral"> </span>
|
|
551
551
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -581,12 +581,12 @@
|
|
|
581
581
|
* in not-so-hacky way
|
|
582
582
|
* */
|
|
583
583
|
|
|
584
|
-
|
|
585
|
-
|
|
584
|
+
import NetworkMessage, { RequestState } from './networkMessage.js'
|
|
585
|
+
import { genGetDataByUrl, formatByteSize, genStringBody, getStringResponseByType } from './utils.js'
|
|
586
586
|
import { RequestResponseData } from './types.js'
|
|
587
587
|
import { NetworkRequest } from '../../../common/messages.gen.js'
|
|
588
588
|
|
|
589
|
-
|
|
589
|
+
export class XHRProxyHandler<T extends XMLHttpRequest> implements ProxyHandler<T> {
|
|
590
590
|
public XMLReq: XMLHttpRequest
|
|
591
591
|
public item: NetworkMessage
|
|
592
592
|
|
|
@@ -800,7 +800,7 @@ import { NetworkRequest } from '../../../common/messages.gen.js'
|
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
|
|
803
|
-
|
|
803
|
+
export default class XHRProxy {
|
|
804
804
|
public <span class="fstat-no" title="function not covered" >static </span>create(
|
|
805
805
|
ignoredHeaders: boolean | string[],
|
|
806
806
|
setSessionTokenHeader: (cb: (name: string, value: string) => void) => void,
|
|
@@ -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 2023-
|
|
838
|
+
at 2023-11-03T09:39:08.430Z
|
|
839
839
|
</div>
|
|
840
840
|
<script src="../../../prettify.js"></script>
|
|
841
841
|
<script>
|
|
@@ -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/22</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -112,7 +112,10 @@
|
|
|
112
112
|
<a name='L47'></a><a href='#L47'>47</a>
|
|
113
113
|
<a name='L48'></a><a href='#L48'>48</a>
|
|
114
114
|
<a name='L49'></a><a href='#L49'>49</a>
|
|
115
|
-
<a name='L50'></a><a href='#L50'>50</a
|
|
115
|
+
<a name='L50'></a><a href='#L50'>50</a>
|
|
116
|
+
<a name='L51'></a><a href='#L51'>51</a>
|
|
117
|
+
<a name='L52'></a><a href='#L52'>52</a>
|
|
118
|
+
<a name='L53'></a><a href='#L53'>53</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
116
119
|
<span class="cline-any cline-neutral"> </span>
|
|
117
120
|
<span class="cline-any cline-neutral"> </span>
|
|
118
121
|
<span class="cline-any cline-no"> </span>
|
|
@@ -132,7 +135,10 @@
|
|
|
132
135
|
<span class="cline-any cline-no"> </span>
|
|
133
136
|
<span class="cline-any cline-no"> </span>
|
|
134
137
|
<span class="cline-any cline-neutral"> </span>
|
|
138
|
+
<span class="cline-any cline-neutral"> </span>
|
|
135
139
|
<span class="cline-any cline-no"> </span>
|
|
140
|
+
<span class="cline-any cline-no"> </span>
|
|
141
|
+
<span class="cline-any cline-neutral"> </span>
|
|
136
142
|
<span class="cline-any cline-neutral"> </span>
|
|
137
143
|
<span class="cline-any cline-neutral"> </span>
|
|
138
144
|
<span class="cline-any cline-no"> </span>
|
|
@@ -181,7 +187,10 @@ import App from '../app/index.js'
|
|
|
181
187
|
<span class="cstat-no" title="statement not covered" >export default class A</span>ttributeSender {
|
|
182
188
|
private <span class="cstat-no" title="statement not covered" >dict = new StringDictionary()</span>
|
|
183
189
|
|
|
184
|
-
<span class="fstat-no" title="function not covered" > constructor(
|
|
190
|
+
<span class="fstat-no" title="function not covered" > constructor(</span>
|
|
191
|
+
private readonly <span class="cstat-no" title="statement not covered" >app: App,</span>
|
|
192
|
+
private readonly <span class="cstat-no" title="statement not covered" >isDictDisabled: boolean,</span>
|
|
193
|
+
) {}
|
|
185
194
|
|
|
186
195
|
public <span class="fstat-no" title="function not covered" >sendSetAttribute(</span>id: number, name: string, value: string) {
|
|
187
196
|
<span class="cstat-no" title="statement not covered" > if (this.isDictDisabled) {</span>
|
|
@@ -217,7 +226,7 @@ import App from '../app/index.js'
|
|
|
217
226
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
218
227
|
Code coverage generated by
|
|
219
228
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
220
|
-
at 2023-
|
|
229
|
+
at 2023-11-03T09:39:08.430Z
|
|
221
230
|
</div>
|
|
222
231
|
<script src="../../prettify.js"></script>
|
|
223
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 2023-
|
|
697
|
+
at 2023-11-03T09:39:08.430Z
|
|
698
698
|
</div>
|
|
699
699
|
<script src="../../prettify.js"></script>
|
|
700
700
|
<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 2023-
|
|
148
|
+
at 2023-11-03T09:39:08.430Z
|
|
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 2023-
|
|
529
|
+
at 2023-11-03T09:39:08.430Z
|
|
530
530
|
</div>
|
|
531
531
|
<script src="../../prettify.js"></script>
|
|
532
532
|
<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/80</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/19</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/79</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -221,15 +221,17 @@
|
|
|
221
221
|
<a name='L156'></a><a href='#L156'>156</a>
|
|
222
222
|
<a name='L157'></a><a href='#L157'>157</a>
|
|
223
223
|
<a name='L158'></a><a href='#L158'>158</a>
|
|
224
|
-
<a name='L159'></a><a href='#L159'>159</a
|
|
224
|
+
<a name='L159'></a><a href='#L159'>159</a>
|
|
225
|
+
<a name='L160'></a><a href='#L160'>160</a>
|
|
226
|
+
<a name='L161'></a><a href='#L161'>161</a>
|
|
227
|
+
<a name='L162'></a><a href='#L162'>162</a>
|
|
228
|
+
<a name='L163'></a><a href='#L163'>163</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
225
229
|
<span class="cline-any cline-no"> </span>
|
|
226
230
|
<span class="cline-any cline-neutral"> </span>
|
|
227
231
|
<span class="cline-any cline-neutral"> </span>
|
|
228
232
|
<span class="cline-any cline-neutral"> </span>
|
|
229
233
|
<span class="cline-any cline-neutral"> </span>
|
|
230
234
|
<span class="cline-any cline-neutral"> </span>
|
|
231
|
-
<span class="cline-any cline-neutral"> </span>
|
|
232
|
-
<span class="cline-any cline-neutral"> </span>
|
|
233
235
|
<span class="cline-any cline-no"> </span>
|
|
234
236
|
<span class="cline-any cline-neutral"> </span>
|
|
235
237
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -244,9 +246,11 @@
|
|
|
244
246
|
<span class="cline-any cline-neutral"> </span>
|
|
245
247
|
<span class="cline-any cline-neutral"> </span>
|
|
246
248
|
<span class="cline-any cline-no"> </span>
|
|
249
|
+
<span class="cline-any cline-neutral"> </span>
|
|
247
250
|
<span class="cline-any cline-no"> </span>
|
|
248
251
|
<span class="cline-any cline-no"> </span>
|
|
249
252
|
<span class="cline-any cline-neutral"> </span>
|
|
253
|
+
<span class="cline-any cline-neutral"> </span>
|
|
250
254
|
<span class="cline-any cline-no"> </span>
|
|
251
255
|
<span class="cline-any cline-neutral"> </span>
|
|
252
256
|
<span class="cline-any cline-no"> </span>
|
|
@@ -281,6 +285,7 @@
|
|
|
281
285
|
<span class="cline-any cline-no"> </span>
|
|
282
286
|
<span class="cline-any cline-no"> </span>
|
|
283
287
|
<span class="cline-any cline-no"> </span>
|
|
288
|
+
<span class="cline-any cline-no"> </span>
|
|
284
289
|
<span class="cline-any cline-neutral"> </span>
|
|
285
290
|
<span class="cline-any cline-no"> </span>
|
|
286
291
|
<span class="cline-any cline-no"> </span>
|
|
@@ -293,9 +298,12 @@
|
|
|
293
298
|
<span class="cline-any cline-neutral"> </span>
|
|
294
299
|
<span class="cline-any cline-no"> </span>
|
|
295
300
|
<span class="cline-any cline-neutral"> </span>
|
|
301
|
+
<span class="cline-any cline-neutral"> </span>
|
|
296
302
|
<span class="cline-any cline-no"> </span>
|
|
297
303
|
<span class="cline-any cline-no"> </span>
|
|
298
304
|
<span class="cline-any cline-no"> </span>
|
|
305
|
+
<span class="cline-any cline-no"> </span>
|
|
306
|
+
<span class="cline-any cline-neutral"> </span>
|
|
299
307
|
<span class="cline-any cline-neutral"> </span>
|
|
300
308
|
<span class="cline-any cline-neutral"> </span>
|
|
301
309
|
<span class="cline-any cline-no"> </span>
|
|
@@ -381,10 +389,8 @@
|
|
|
381
389
|
<span class="cline-any cline-neutral"> </span>
|
|
382
390
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import type App from '../app/index.js'
|
|
383
391
|
<span class="cstat-no" title="statement not covered" >import {</span>
|
|
384
|
-
TechnicalInfo,
|
|
385
392
|
AdoptedSSReplaceURLBased,
|
|
386
393
|
AdoptedSSInsertRuleURLBased,
|
|
387
|
-
AdoptedSSDeleteRule,
|
|
388
394
|
AdoptedSSAddOwner,
|
|
389
395
|
AdoptedSSRemoveOwner,
|
|
390
396
|
} from '../app/messages.gen.js'
|
|
@@ -400,11 +406,13 @@ function <span class="fstat-no" title="function not covered" >hasAdoptedSS(</spa
|
|
|
400
406
|
)
|
|
401
407
|
}
|
|
402
408
|
|
|
403
|
-
// TODO:
|
|
409
|
+
// TODO: encapsulate to be init-ed on-start and join with cssrules.ts under one folder
|
|
404
410
|
let _id = <span class="cstat-no" title="statement not covered" >0xf</span>
|
|
411
|
+
|
|
405
412
|
<span class="cstat-no" title="statement not covered" >export function <span class="fstat-no" title="function not covered" >n</span>extID(</span>): number {
|
|
406
413
|
<span class="cstat-no" title="statement not covered" > return _id++</span>
|
|
407
414
|
}
|
|
415
|
+
|
|
408
416
|
export const <span class="cstat-no" title="statement not covered" >styleSheetIDMap: Map<CSSStyleSheet, number> = new Map()</span>
|
|
409
417
|
|
|
410
418
|
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >export default function (a</span></span>pp: App | null) {
|
|
@@ -433,35 +441,39 @@ export const <span class="cstat-no" title="statement not covered" >styleSheetIDM
|
|
|
433
441
|
}
|
|
434
442
|
const nowOwning: number[] = <span class="cstat-no" title="statement not covered" >[]</span>
|
|
435
443
|
const styleSheets = <span class="cstat-no" title="statement not covered" >root.adoptedStyleSheets</span>
|
|
436
|
-
<span class="cstat-no" title="statement not covered" >
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
<span class="cstat-no" title="statement not covered"
|
|
440
|
-
<span class="cstat-no" title="statement not covered" >
|
|
441
|
-
<span class="cstat-no" title="statement not covered" >
|
|
442
|
-
|
|
443
|
-
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (!pastOwning.includes(sheetID)) {</span>
|
|
444
|
-
<span class="cstat-no" title="statement not covered" > app.send(AdoptedSSAddOwner(sheetID, nodeID))</span>
|
|
445
|
-
}
|
|
446
|
-
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (init) {</span>
|
|
447
|
-
const rules = <span class="cstat-no" title="statement not covered" >s.cssRules</span>
|
|
448
|
-
<span class="cstat-no" title="statement not covered" > for (let i = <span class="cstat-no" title="statement not covered" >0;</span> i < rules.length; i++) {</span>
|
|
449
|
-
<span class="cstat-no" title="statement not covered" > app.send(AdoptedSSInsertRuleURLBased(sheetID, rules[i].cssText, i, app.getBaseHref()))</span>
|
|
444
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (Symbol.iterator in styleSheets) {</span>
|
|
445
|
+
<span class="cstat-no" title="statement not covered" > for (const s of styleSheets) {</span>
|
|
446
|
+
let sheetID = <span class="cstat-no" title="statement not covered" >styleSheetIDMap.get(s)</span>
|
|
447
|
+
const init = <span class="cstat-no" title="statement not covered" >!sheetID</span>
|
|
448
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (!sheetID) {</span>
|
|
449
|
+
<span class="cstat-no" title="statement not covered" > sheetID = nextID()</span>
|
|
450
|
+
<span class="cstat-no" title="statement not covered" > styleSheetIDMap.set(s, sheetID)</span>
|
|
450
451
|
}
|
|
452
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (!pastOwning.includes(sheetID)) {</span>
|
|
453
|
+
<span class="cstat-no" title="statement not covered" > app.send(AdoptedSSAddOwner(sheetID, nodeID))</span>
|
|
454
|
+
}
|
|
455
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (init) {</span>
|
|
456
|
+
const rules = <span class="cstat-no" title="statement not covered" >s.cssRules</span>
|
|
457
|
+
<span class="cstat-no" title="statement not covered" > for (let i = <span class="cstat-no" title="statement not covered" >0;</span> i < rules.length; i++) {</span>
|
|
458
|
+
<span class="cstat-no" title="statement not covered" > app.send(AdoptedSSInsertRuleURLBased(sheetID, rules[i].cssText, i, app.getBaseHref()))</span>
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
<span class="cstat-no" title="statement not covered" > nowOwning.push(sheetID)</span>
|
|
451
462
|
}
|
|
452
|
-
<span class="cstat-no" title="statement not covered" > nowOwning.push(sheetID)</span>
|
|
453
463
|
}
|
|
454
|
-
<span class="cstat-no" title="statement not covered" >
|
|
455
|
-
<span class="cstat-no" title="statement not covered" >
|
|
456
|
-
<span class="cstat-no" title="statement not covered" >
|
|
464
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (Symbol.iterator in pastOwning) {</span>
|
|
465
|
+
<span class="cstat-no" title="statement not covered" > for (const sheetID of pastOwning) {</span>
|
|
466
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (!nowOwning.includes(sheetID)) {</span>
|
|
467
|
+
<span class="cstat-no" title="statement not covered" > app.send(AdoptedSSRemoveOwner(sheetID, nodeID))</span>
|
|
468
|
+
}
|
|
457
469
|
}
|
|
458
470
|
}
|
|
459
471
|
<span class="cstat-no" title="statement not covered" > adoptedStyleSheetsOwnings.set(nodeID, nowOwning)</span>
|
|
460
|
-
}, 20) //
|
|
472
|
+
}, 20) // Mysterious bug:
|
|
461
473
|
/* On the page https://explore.fast.design/components/fast-accordion
|
|
462
474
|
the only rule inside the only adoptedStyleSheet of the iframe-s document
|
|
463
475
|
gets changed during first milliseconds after the load.
|
|
464
|
-
|
|
476
|
+
However, none of the documented methods (replace, insertRule) is triggered.
|
|
465
477
|
The rule is not substituted (remains the same object), however the text gets changed.
|
|
466
478
|
*/
|
|
467
479
|
|
|
@@ -544,7 +556,7 @@ export const <span class="cstat-no" title="statement not covered" >styleSheetIDM
|
|
|
544
556
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
545
557
|
Code coverage generated by
|
|
546
558
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
547
|
-
at 2023-
|
|
559
|
+
at 2023-11-03T09:39:08.430Z
|
|
548
560
|
</div>
|
|
549
561
|
<script src="../../prettify.js"></script>
|
|
550
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 2023-
|
|
406
|
+
at 2023-11-03T09:39:08.430Z
|
|
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 2023-
|
|
373
|
+
at 2023-11-03T09:39:08.430Z
|
|
374
374
|
</div>
|
|
375
375
|
<script src="../../prettify.js"></script>
|
|
376
376
|
<script>
|
|
@@ -397,7 +397,7 @@ export interface FetchPersistFlagsData {
|
|
|
397
397
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
398
398
|
Code coverage generated by
|
|
399
399
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
400
|
-
at 2023-
|
|
400
|
+
at 2023-11-03T09:39:08.430Z
|
|
401
401
|
</div>
|
|
402
402
|
<script src="../../prettify.js"></script>
|
|
403
403
|
<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 2023-
|
|
208
|
+
at 2023-11-03T09:39:08.430Z
|
|
209
209
|
</div>
|
|
210
210
|
<script src="../../prettify.js"></script>
|
|
211
211
|
<script>
|
|
@@ -274,7 +274,7 @@ type FFData = [string, string, string]
|
|
|
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>
|