@onlineapps/conn-base-hub 1.0.14 → 1.0.15
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/coverage/clover.xml +50 -50
- package/coverage/lcov-report/config.js.html +1 -1
- package/coverage/lcov-report/defaults.js.html +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/index.js.html +105 -105
- package/package.json +2 -2
- package/tests/component/hub-integration.test.js +11 -5
- package/tests/unit/hub.test.js +12 -12
package/coverage/clover.xml
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
4
|
-
<metrics statements="78" coveredstatements="
|
|
5
|
-
<file name="config.js" path="/
|
|
2
|
+
<coverage generated="1766565084416" clover="3.2.0">
|
|
3
|
+
<project timestamp="1766565084416" name="All files">
|
|
4
|
+
<metrics statements="78" coveredstatements="19" conditionals="73" coveredconditionals="20" methods="19" coveredmethods="7" elements="170" coveredelements="46" complexity="0" loc="78" ncloc="78" packages="1" files="3" classes="3"/>
|
|
5
|
+
<file name="config.js" path="/app/shared/connector/conn-base-hub/src/config.js">
|
|
6
6
|
<metrics statements="4" coveredstatements="4" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
7
7
|
<line num="14" count="1" type="stmt"/>
|
|
8
8
|
<line num="15" count="1" type="stmt"/>
|
|
9
9
|
<line num="21" count="1" type="stmt"/>
|
|
10
10
|
<line num="43" count="1" type="stmt"/>
|
|
11
11
|
</file>
|
|
12
|
-
<file name="defaults.js" path="/
|
|
12
|
+
<file name="defaults.js" path="/app/shared/connector/conn-base-hub/src/defaults.js">
|
|
13
13
|
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
14
14
|
<line num="16" count="1" type="stmt"/>
|
|
15
15
|
</file>
|
|
16
|
-
<file name="index.js" path="/
|
|
17
|
-
<metrics statements="73" coveredstatements="
|
|
16
|
+
<file name="index.js" path="/app/shared/connector/conn-base-hub/src/index.js">
|
|
17
|
+
<metrics statements="73" coveredstatements="14" conditionals="73" coveredconditionals="20" methods="19" coveredmethods="7"/>
|
|
18
18
|
<line num="15" count="1" type="stmt"/>
|
|
19
19
|
<line num="18" count="1" type="stmt"/>
|
|
20
20
|
<line num="36" count="1" type="stmt"/>
|
|
21
21
|
<line num="37" count="1" type="stmt"/>
|
|
22
|
-
<line num="39" count="
|
|
23
|
-
<line num="45" count="
|
|
24
|
-
<line num="49" count="
|
|
25
|
-
<line num="50" count="
|
|
26
|
-
<line num="51" count="
|
|
27
|
-
<line num="52" count="
|
|
28
|
-
<line num="53" count="
|
|
29
|
-
<line num="54" count="
|
|
30
|
-
<line num="56" count="1" type="cond" truecount="
|
|
31
|
-
<line num="57" count="
|
|
32
|
-
<line num="62" count="
|
|
33
|
-
<line num="95" count="
|
|
34
|
-
<line num="98" count="
|
|
35
|
-
<line num="99" count="
|
|
36
|
-
<line num="104" count="
|
|
22
|
+
<line num="39" count="0" type="stmt"/>
|
|
23
|
+
<line num="45" count="19" type="stmt"/>
|
|
24
|
+
<line num="49" count="19" type="stmt"/>
|
|
25
|
+
<line num="50" count="19" type="stmt"/>
|
|
26
|
+
<line num="51" count="2" type="cond" truecount="1" falsecount="1"/>
|
|
27
|
+
<line num="52" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
28
|
+
<line num="53" count="2" type="cond" truecount="1" falsecount="1"/>
|
|
29
|
+
<line num="54" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
30
|
+
<line num="56" count="1" type="cond" truecount="2" falsecount="2"/>
|
|
31
|
+
<line num="57" count="0" type="stmt"/>
|
|
32
|
+
<line num="62" count="19" type="stmt"/>
|
|
33
|
+
<line num="95" count="0" type="stmt"/>
|
|
34
|
+
<line num="98" count="0" type="stmt"/>
|
|
35
|
+
<line num="99" count="0" type="stmt"/>
|
|
36
|
+
<line num="104" count="0" type="stmt"/>
|
|
37
37
|
<line num="106" count="0" type="stmt"/>
|
|
38
38
|
<line num="109" count="0" type="stmt"/>
|
|
39
|
-
<line num="113" count="
|
|
40
|
-
<line num="114" count="
|
|
41
|
-
<line num="117" count="
|
|
39
|
+
<line num="113" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
40
|
+
<line num="114" count="0" type="stmt"/>
|
|
41
|
+
<line num="117" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
42
42
|
<line num="118" count="0" type="stmt"/>
|
|
43
|
-
<line num="122" count="
|
|
44
|
-
<line num="123" count="
|
|
45
|
-
<line num="127" count="
|
|
46
|
-
<line num="128" count="
|
|
47
|
-
<line num="129" count="
|
|
48
|
-
<line num="133" count="
|
|
49
|
-
<line num="134" count="
|
|
50
|
-
<line num="135" count="
|
|
51
|
-
<line num="138" count="
|
|
52
|
-
<line num="143" count="
|
|
53
|
-
<line num="145" count="
|
|
54
|
-
<line num="146" count="
|
|
55
|
-
<line num="149" count="
|
|
56
|
-
<line num="150" count="
|
|
57
|
-
<line num="153" count="
|
|
58
|
-
<line num="154" count="
|
|
59
|
-
<line num="157" count="
|
|
60
|
-
<line num="168" count="
|
|
61
|
-
<line num="182" count="
|
|
62
|
-
<line num="195" count="
|
|
63
|
-
<line num="196" count="
|
|
64
|
-
<line num="198" count="
|
|
65
|
-
<line num="205" count="
|
|
66
|
-
<line num="213" count="
|
|
67
|
-
<line num="224" count="
|
|
43
|
+
<line num="122" count="0" type="stmt"/>
|
|
44
|
+
<line num="123" count="0" type="stmt"/>
|
|
45
|
+
<line num="127" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
46
|
+
<line num="128" count="0" type="stmt"/>
|
|
47
|
+
<line num="129" count="0" type="stmt"/>
|
|
48
|
+
<line num="133" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
49
|
+
<line num="134" count="0" type="stmt"/>
|
|
50
|
+
<line num="135" count="0" type="stmt"/>
|
|
51
|
+
<line num="138" count="0" type="stmt"/>
|
|
52
|
+
<line num="143" count="0" type="stmt"/>
|
|
53
|
+
<line num="145" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
54
|
+
<line num="146" count="0" type="stmt"/>
|
|
55
|
+
<line num="149" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
56
|
+
<line num="150" count="0" type="stmt"/>
|
|
57
|
+
<line num="153" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
58
|
+
<line num="154" count="0" type="stmt"/>
|
|
59
|
+
<line num="157" count="0" type="stmt"/>
|
|
60
|
+
<line num="168" count="0" type="stmt"/>
|
|
61
|
+
<line num="182" count="0" type="stmt"/>
|
|
62
|
+
<line num="195" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
63
|
+
<line num="196" count="0" type="stmt"/>
|
|
64
|
+
<line num="198" count="0" type="stmt"/>
|
|
65
|
+
<line num="205" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
66
|
+
<line num="213" count="0" type="stmt"/>
|
|
67
|
+
<line num="224" count="0" type="stmt"/>
|
|
68
68
|
<line num="243" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
69
69
|
<line num="246" count="0" type="stmt"/>
|
|
70
70
|
<line num="247" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
@@ -202,7 +202,7 @@ module.exports = runtimeCfg;
|
|
|
202
202
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
203
203
|
Code coverage generated by
|
|
204
204
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
205
|
-
at 2025-12-
|
|
205
|
+
at 2025-12-24T08:31:24.391Z
|
|
206
206
|
</div>
|
|
207
207
|
<script src="prettify.js"></script>
|
|
208
208
|
<script>
|
|
@@ -154,7 +154,7 @@ module.exports = {
|
|
|
154
154
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
155
155
|
Code coverage generated by
|
|
156
156
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
157
|
-
at 2025-12-
|
|
157
|
+
at 2025-12-24T08:31:24.391Z
|
|
158
158
|
</div>
|
|
159
159
|
<script src="prettify.js"></script>
|
|
160
160
|
<script>
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
132
132
|
Code coverage generated by
|
|
133
133
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
134
|
-
at 2025-12-
|
|
134
|
+
at 2025-12-24T12:28:27.663Z
|
|
135
135
|
</div>
|
|
136
136
|
<script src="prettify.js"></script>
|
|
137
137
|
<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">18.91% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>14/74</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">27.39% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>20/73</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">36.84% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>7/19</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">19.17% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>14/73</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
</div>
|
|
64
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line low'></div>
|
|
65
65
|
<pre><table class="coverage">
|
|
66
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -412,31 +412,30 @@
|
|
|
412
412
|
<span class="cline-any cline-yes">1x</span>
|
|
413
413
|
<span class="cline-any cline-yes">1x</span>
|
|
414
414
|
<span class="cline-any cline-neutral"> </span>
|
|
415
|
-
<span class="cline-any cline-
|
|
416
|
-
<span class="cline-any cline-neutral"> </span>
|
|
415
|
+
<span class="cline-any cline-no"> </span>
|
|
417
416
|
<span class="cline-any cline-neutral"> </span>
|
|
418
417
|
<span class="cline-any cline-neutral"> </span>
|
|
419
418
|
<span class="cline-any cline-neutral"> </span>
|
|
420
419
|
<span class="cline-any cline-neutral"> </span>
|
|
421
|
-
<span class="cline-any cline-yes">7x</span>
|
|
422
420
|
<span class="cline-any cline-neutral"> </span>
|
|
421
|
+
<span class="cline-any cline-yes">19x</span>
|
|
423
422
|
<span class="cline-any cline-neutral"> </span>
|
|
424
423
|
<span class="cline-any cline-neutral"> </span>
|
|
425
|
-
<span class="cline-any cline-yes">7x</span>
|
|
426
|
-
<span class="cline-any cline-yes">7x</span>
|
|
427
|
-
<span class="cline-any cline-no"> </span>
|
|
428
|
-
<span class="cline-any cline-no"> </span>
|
|
429
|
-
<span class="cline-any cline-no"> </span>
|
|
430
|
-
<span class="cline-any cline-no"> </span>
|
|
431
424
|
<span class="cline-any cline-neutral"> </span>
|
|
425
|
+
<span class="cline-any cline-yes">19x</span>
|
|
426
|
+
<span class="cline-any cline-yes">19x</span>
|
|
427
|
+
<span class="cline-any cline-yes">2x</span>
|
|
432
428
|
<span class="cline-any cline-yes">1x</span>
|
|
429
|
+
<span class="cline-any cline-yes">2x</span>
|
|
433
430
|
<span class="cline-any cline-yes">1x</span>
|
|
434
431
|
<span class="cline-any cline-neutral"> </span>
|
|
432
|
+
<span class="cline-any cline-yes">1x</span>
|
|
433
|
+
<span class="cline-any cline-no"> </span>
|
|
435
434
|
<span class="cline-any cline-neutral"> </span>
|
|
436
435
|
<span class="cline-any cline-neutral"> </span>
|
|
437
436
|
<span class="cline-any cline-neutral"> </span>
|
|
438
|
-
<span class="cline-any cline-yes">7x</span>
|
|
439
437
|
<span class="cline-any cline-neutral"> </span>
|
|
438
|
+
<span class="cline-any cline-yes">19x</span>
|
|
440
439
|
<span class="cline-any cline-neutral"> </span>
|
|
441
440
|
<span class="cline-any cline-neutral"> </span>
|
|
442
441
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -468,16 +467,17 @@
|
|
|
468
467
|
<span class="cline-any cline-neutral"> </span>
|
|
469
468
|
<span class="cline-any cline-neutral"> </span>
|
|
470
469
|
<span class="cline-any cline-neutral"> </span>
|
|
471
|
-
<span class="cline-any cline-yes">3x</span>
|
|
472
470
|
<span class="cline-any cline-neutral"> </span>
|
|
471
|
+
<span class="cline-any cline-no"> </span>
|
|
473
472
|
<span class="cline-any cline-neutral"> </span>
|
|
474
|
-
<span class="cline-any cline-yes">3x</span>
|
|
475
|
-
<span class="cline-any cline-yes">3x</span>
|
|
476
473
|
<span class="cline-any cline-neutral"> </span>
|
|
474
|
+
<span class="cline-any cline-no"> </span>
|
|
475
|
+
<span class="cline-any cline-no"> </span>
|
|
477
476
|
<span class="cline-any cline-neutral"> </span>
|
|
478
477
|
<span class="cline-any cline-neutral"> </span>
|
|
479
478
|
<span class="cline-any cline-neutral"> </span>
|
|
480
|
-
<span class="cline-any cline-
|
|
479
|
+
<span class="cline-any cline-neutral"> </span>
|
|
480
|
+
<span class="cline-any cline-no"> </span>
|
|
481
481
|
<span class="cline-any cline-neutral"> </span>
|
|
482
482
|
<span class="cline-any cline-no"> </span>
|
|
483
483
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -486,51 +486,51 @@
|
|
|
486
486
|
<span class="cline-any cline-neutral"> </span>
|
|
487
487
|
<span class="cline-any cline-neutral"> </span>
|
|
488
488
|
<span class="cline-any cline-neutral"> </span>
|
|
489
|
-
<span class="cline-any cline-
|
|
490
|
-
<span class="cline-any cline-
|
|
489
|
+
<span class="cline-any cline-no"> </span>
|
|
490
|
+
<span class="cline-any cline-no"> </span>
|
|
491
491
|
<span class="cline-any cline-neutral"> </span>
|
|
492
492
|
<span class="cline-any cline-neutral"> </span>
|
|
493
|
-
<span class="cline-any cline-
|
|
493
|
+
<span class="cline-any cline-no"> </span>
|
|
494
494
|
<span class="cline-any cline-no"> </span>
|
|
495
495
|
<span class="cline-any cline-neutral"> </span>
|
|
496
496
|
<span class="cline-any cline-neutral"> </span>
|
|
497
497
|
<span class="cline-any cline-neutral"> </span>
|
|
498
|
-
<span class="cline-any cline-
|
|
499
|
-
<span class="cline-any cline-
|
|
498
|
+
<span class="cline-any cline-no"> </span>
|
|
499
|
+
<span class="cline-any cline-no"> </span>
|
|
500
500
|
<span class="cline-any cline-neutral"> </span>
|
|
501
501
|
<span class="cline-any cline-neutral"> </span>
|
|
502
502
|
<span class="cline-any cline-neutral"> </span>
|
|
503
|
-
<span class="cline-any cline-
|
|
504
|
-
<span class="cline-any cline-
|
|
505
|
-
<span class="cline-any cline-
|
|
503
|
+
<span class="cline-any cline-no"> </span>
|
|
504
|
+
<span class="cline-any cline-no"> </span>
|
|
505
|
+
<span class="cline-any cline-no"> </span>
|
|
506
506
|
<span class="cline-any cline-neutral"> </span>
|
|
507
507
|
<span class="cline-any cline-neutral"> </span>
|
|
508
508
|
<span class="cline-any cline-neutral"> </span>
|
|
509
|
-
<span class="cline-any cline-
|
|
510
|
-
<span class="cline-any cline-
|
|
511
|
-
<span class="cline-any cline-
|
|
509
|
+
<span class="cline-any cline-no"> </span>
|
|
510
|
+
<span class="cline-any cline-no"> </span>
|
|
511
|
+
<span class="cline-any cline-no"> </span>
|
|
512
512
|
<span class="cline-any cline-neutral"> </span>
|
|
513
513
|
<span class="cline-any cline-neutral"> </span>
|
|
514
|
-
<span class="cline-any cline-
|
|
514
|
+
<span class="cline-any cline-no"> </span>
|
|
515
515
|
<span class="cline-any cline-neutral"> </span>
|
|
516
516
|
<span class="cline-any cline-neutral"> </span>
|
|
517
517
|
<span class="cline-any cline-neutral"> </span>
|
|
518
518
|
<span class="cline-any cline-neutral"> </span>
|
|
519
|
-
<span class="cline-any cline-
|
|
519
|
+
<span class="cline-any cline-no"> </span>
|
|
520
520
|
<span class="cline-any cline-neutral"> </span>
|
|
521
|
-
<span class="cline-any cline-
|
|
522
|
-
<span class="cline-any cline-
|
|
521
|
+
<span class="cline-any cline-no"> </span>
|
|
522
|
+
<span class="cline-any cline-no"> </span>
|
|
523
523
|
<span class="cline-any cline-neutral"> </span>
|
|
524
524
|
<span class="cline-any cline-neutral"> </span>
|
|
525
|
-
<span class="cline-any cline-
|
|
526
|
-
<span class="cline-any cline-
|
|
525
|
+
<span class="cline-any cline-no"> </span>
|
|
526
|
+
<span class="cline-any cline-no"> </span>
|
|
527
527
|
<span class="cline-any cline-neutral"> </span>
|
|
528
528
|
<span class="cline-any cline-neutral"> </span>
|
|
529
|
-
<span class="cline-any cline-
|
|
530
|
-
<span class="cline-any cline-
|
|
529
|
+
<span class="cline-any cline-no"> </span>
|
|
530
|
+
<span class="cline-any cline-no"> </span>
|
|
531
531
|
<span class="cline-any cline-neutral"> </span>
|
|
532
532
|
<span class="cline-any cline-neutral"> </span>
|
|
533
|
-
<span class="cline-any cline-
|
|
533
|
+
<span class="cline-any cline-no"> </span>
|
|
534
534
|
<span class="cline-any cline-neutral"> </span>
|
|
535
535
|
<span class="cline-any cline-neutral"> </span>
|
|
536
536
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -541,7 +541,7 @@
|
|
|
541
541
|
<span class="cline-any cline-neutral"> </span>
|
|
542
542
|
<span class="cline-any cline-neutral"> </span>
|
|
543
543
|
<span class="cline-any cline-neutral"> </span>
|
|
544
|
-
<span class="cline-any cline-
|
|
544
|
+
<span class="cline-any cline-no"> </span>
|
|
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>
|
|
@@ -555,7 +555,7 @@
|
|
|
555
555
|
<span class="cline-any cline-neutral"> </span>
|
|
556
556
|
<span class="cline-any cline-neutral"> </span>
|
|
557
557
|
<span class="cline-any cline-neutral"> </span>
|
|
558
|
-
<span class="cline-any cline-
|
|
558
|
+
<span class="cline-any cline-no"> </span>
|
|
559
559
|
<span class="cline-any cline-neutral"> </span>
|
|
560
560
|
<span class="cline-any cline-neutral"> </span>
|
|
561
561
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -568,17 +568,17 @@
|
|
|
568
568
|
<span class="cline-any cline-neutral"> </span>
|
|
569
569
|
<span class="cline-any cline-neutral"> </span>
|
|
570
570
|
<span class="cline-any cline-neutral"> </span>
|
|
571
|
-
<span class="cline-any cline-
|
|
572
|
-
<span class="cline-any cline-
|
|
571
|
+
<span class="cline-any cline-no"> </span>
|
|
572
|
+
<span class="cline-any cline-no"> </span>
|
|
573
573
|
<span class="cline-any cline-neutral"> </span>
|
|
574
|
-
<span class="cline-any cline-
|
|
574
|
+
<span class="cline-any cline-no"> </span>
|
|
575
575
|
<span class="cline-any cline-neutral"> </span>
|
|
576
576
|
<span class="cline-any cline-neutral"> </span>
|
|
577
577
|
<span class="cline-any cline-neutral"> </span>
|
|
578
578
|
<span class="cline-any cline-neutral"> </span>
|
|
579
579
|
<span class="cline-any cline-neutral"> </span>
|
|
580
580
|
<span class="cline-any cline-neutral"> </span>
|
|
581
|
-
<span class="cline-any cline-
|
|
581
|
+
<span class="cline-any cline-no"> </span>
|
|
582
582
|
<span class="cline-any cline-neutral"> </span>
|
|
583
583
|
<span class="cline-any cline-neutral"> </span>
|
|
584
584
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -586,7 +586,7 @@
|
|
|
586
586
|
<span class="cline-any cline-neutral"> </span>
|
|
587
587
|
<span class="cline-any cline-neutral"> </span>
|
|
588
588
|
<span class="cline-any cline-neutral"> </span>
|
|
589
|
-
<span class="cline-any cline-
|
|
589
|
+
<span class="cline-any cline-no"> </span>
|
|
590
590
|
<span class="cline-any cline-neutral"> </span>
|
|
591
591
|
<span class="cline-any cline-neutral"> </span>
|
|
592
592
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -597,7 +597,7 @@
|
|
|
597
597
|
<span class="cline-any cline-neutral"> </span>
|
|
598
598
|
<span class="cline-any cline-neutral"> </span>
|
|
599
599
|
<span class="cline-any cline-neutral"> </span>
|
|
600
|
-
<span class="cline-any cline-
|
|
600
|
+
<span class="cline-any cline-no"> </span>
|
|
601
601
|
<span class="cline-any cline-neutral"> </span>
|
|
602
602
|
<span class="cline-any cline-neutral"> </span>
|
|
603
603
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -721,9 +721,9 @@ module.exports = {
|
|
|
721
721
|
// Legacy createLogger for backward compatibility
|
|
722
722
|
createLogger: (() => {
|
|
723
723
|
const monitoring = require('@onlineapps/conn-base-monitoring');
|
|
724
|
-
return
|
|
724
|
+
return <span class="fstat-no" title="function not covered" >as</span>ync function(config) {
|
|
725
725
|
// Initialize monitoring and return logger-like interface (API returned by init)
|
|
726
|
-
return monitoring.init(config)
|
|
726
|
+
<span class="cstat-no" title="statement not covered" > return monitoring.init(config);</span>
|
|
727
727
|
};
|
|
728
728
|
})(),
|
|
729
729
|
|
|
@@ -735,13 +735,13 @@ module.exports = {
|
|
|
735
735
|
// This also prevents unhandled promise rejections when env/config is incomplete in tests/dev.
|
|
736
736
|
let loggerApi = null;
|
|
737
737
|
const logger = {
|
|
738
|
-
info:
|
|
739
|
-
warn:
|
|
740
|
-
error:
|
|
741
|
-
debug:
|
|
738
|
+
info: (message, data) => (loggerApi ? <span class="branch-0 cbranch-no" title="branch not covered" >loggerApi.info(message, data) </span>: console.log(message, data)),
|
|
739
|
+
warn: (message, data) => (loggerApi ? <span class="branch-0 cbranch-no" title="branch not covered" >loggerApi.warn(message, data) </span>: console.warn(message, data)),
|
|
740
|
+
error: (message, data) => (loggerApi ? <span class="branch-0 cbranch-no" title="branch not covered" >loggerApi.error(message, data) </span>: console.error(message, data)),
|
|
741
|
+
debug: (message, data) => (loggerApi ? <span class="branch-0 cbranch-no" title="branch not covered" >loggerApi.debug(message, data) </span>: console.debug(message, data)),
|
|
742
742
|
close: async () => {
|
|
743
|
-
<span class="missing-if-branch" title="
|
|
744
|
-
await loggerApi.shutdown()
|
|
743
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (loggerApi && <span class="branch-1 cbranch-no" title="branch not covered" >typeof loggerApi.shutdown === 'function')</span> {
|
|
744
|
+
<span class="cstat-no" title="statement not covered" > await loggerApi.shutdown();</span>
|
|
745
745
|
}
|
|
746
746
|
}
|
|
747
747
|
};
|
|
@@ -751,7 +751,7 @@ module.exports = {
|
|
|
751
751
|
// Initialize Registry Client
|
|
752
752
|
registry: config.registry ? new ServiceRegistryClient({
|
|
753
753
|
// Priority: explicit registry config → top-level config → ENV
|
|
754
|
-
amqpUrl: config.registry?.amqpUrl || config.registry?.url ||
|
|
754
|
+
amqpUrl: config.registry?.amqpUrl || config.registry?.url || config.amqpUrl || <span class="branch-3 cbranch-no" title="branch not covered" >runtimeCfg.get('rabbitmqUrl'),</span>
|
|
755
755
|
serviceName: config.serviceName,
|
|
756
756
|
version: config.version || <span class="branch-1 cbranch-no" title="branch not covered" >'1.0.0',</span>
|
|
757
757
|
...config.registry
|
|
@@ -761,7 +761,7 @@ module.exports = {
|
|
|
761
761
|
mq: config.mq ? new MQClient({
|
|
762
762
|
type: runtimeCfg.get('mqType'),
|
|
763
763
|
// Priority: explicit mq config → top-level config → ENV
|
|
764
|
-
host: config.mq?.host || config.mq?.url ||
|
|
764
|
+
host: config.mq?.host || config.mq?.url || config.amqpUrl || runtimeCfg.get('rabbitmqUrl'),
|
|
765
765
|
queue: `${config.serviceName}${runtimeCfg.get('mqDefaultServiceQueueSuffix')}`,
|
|
766
766
|
...config.mq
|
|
767
767
|
}) : null,
|
|
@@ -778,17 +778,17 @@ module.exports = {
|
|
|
778
778
|
}) : null,
|
|
779
779
|
|
|
780
780
|
// Initialize all components
|
|
781
|
-
|
|
782
|
-
const results = {}
|
|
781
|
+
<span class="fstat-no" title="function not covered" > as</span>ync init() {
|
|
782
|
+
const results = <span class="cstat-no" title="statement not covered" >{};</span>
|
|
783
783
|
|
|
784
784
|
// Initialize Logger (Monitoring) - optional, keep microservice usable even if monitoring can't start
|
|
785
|
-
try {
|
|
786
|
-
loggerApi = await createLogger({
|
|
785
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
786
|
+
<span class="cstat-no" title="statement not covered" > loggerApi = await createLogger({</span>
|
|
787
787
|
serviceName: config.serviceName,
|
|
788
788
|
version: config.version,
|
|
789
789
|
...config.logger
|
|
790
790
|
});
|
|
791
|
-
results.logger = true
|
|
791
|
+
<span class="cstat-no" title="statement not covered" > results.logger = true;</span>
|
|
792
792
|
} catch (err) {
|
|
793
793
|
<span class="cstat-no" title="statement not covered" > console.warn(</span>
|
|
794
794
|
`[conn-base-hub] Monitoring init failed - Continuing with console logger. Fix: set RABBITMQ_URL or pass logger.rabbitmq.url. (${err.message})`
|
|
@@ -797,51 +797,51 @@ module.exports = {
|
|
|
797
797
|
}
|
|
798
798
|
|
|
799
799
|
// Initialize Registry
|
|
800
|
-
|
|
801
|
-
await this.registry.initialize()
|
|
800
|
+
<span class="cstat-no" title="statement not covered" > if (this.registry) {</span>
|
|
801
|
+
<span class="cstat-no" title="statement not covered" > await this.registry.initialize();</span>
|
|
802
802
|
|
|
803
803
|
// Optionally subscribe to changes
|
|
804
|
-
|
|
804
|
+
<span class="cstat-no" title="statement not covered" > if (config.subscribeToRegistry) {</span>
|
|
805
805
|
<span class="cstat-no" title="statement not covered" > await this.registry.subscribeToChanges();</span>
|
|
806
806
|
}
|
|
807
807
|
|
|
808
808
|
// Start heartbeat
|
|
809
|
-
this.registry.startHeartbeat()
|
|
810
|
-
results.registry = true
|
|
809
|
+
<span class="cstat-no" title="statement not covered" > this.registry.startHeartbeat();</span>
|
|
810
|
+
<span class="cstat-no" title="statement not covered" > results.registry = true;</span>
|
|
811
811
|
}
|
|
812
812
|
|
|
813
813
|
// Initialize MQ
|
|
814
|
-
|
|
815
|
-
await this.mq.connect()
|
|
816
|
-
results.mq = true
|
|
814
|
+
<span class="cstat-no" title="statement not covered" > if (this.mq) {</span>
|
|
815
|
+
<span class="cstat-no" title="statement not covered" > await this.mq.connect();</span>
|
|
816
|
+
<span class="cstat-no" title="statement not covered" > results.mq = true;</span>
|
|
817
817
|
}
|
|
818
818
|
|
|
819
819
|
// Initialize Storage
|
|
820
|
-
|
|
821
|
-
await this.storage.initialize()
|
|
822
|
-
results.storage = true
|
|
820
|
+
<span class="cstat-no" title="statement not covered" > if (this.storage) {</span>
|
|
821
|
+
<span class="cstat-no" title="statement not covered" > await this.storage.initialize();</span>
|
|
822
|
+
<span class="cstat-no" title="statement not covered" > results.storage = true;</span>
|
|
823
823
|
}
|
|
824
824
|
|
|
825
|
-
return results
|
|
825
|
+
<span class="cstat-no" title="statement not covered" > return results;</span>
|
|
826
826
|
},
|
|
827
827
|
|
|
828
828
|
// Graceful shutdown
|
|
829
|
-
|
|
830
|
-
const promises = []
|
|
829
|
+
<span class="fstat-no" title="function not covered" > as</span>ync shutdown() {
|
|
830
|
+
const promises = <span class="cstat-no" title="statement not covered" >[];</span>
|
|
831
831
|
|
|
832
|
-
|
|
833
|
-
promises.push(this.registry.dispose())
|
|
832
|
+
<span class="cstat-no" title="statement not covered" > if (this.registry) {</span>
|
|
833
|
+
<span class="cstat-no" title="statement not covered" > promises.push(this.registry.dispose());</span>
|
|
834
834
|
}
|
|
835
835
|
|
|
836
|
-
|
|
837
|
-
promises.push(this.mq.disconnect())
|
|
836
|
+
<span class="cstat-no" title="statement not covered" > if (this.mq) {</span>
|
|
837
|
+
<span class="cstat-no" title="statement not covered" > promises.push(this.mq.disconnect());</span>
|
|
838
838
|
}
|
|
839
839
|
|
|
840
|
-
|
|
841
|
-
promises.push(this.logger.close())
|
|
840
|
+
<span class="cstat-no" title="statement not covered" > if (this.logger && typeof this.logger.close === 'function') {</span>
|
|
841
|
+
<span class="cstat-no" title="statement not covered" > promises.push(this.logger.close());</span>
|
|
842
842
|
}
|
|
843
843
|
|
|
844
|
-
await Promise.all(promises)
|
|
844
|
+
<span class="cstat-no" title="statement not covered" > await Promise.all(promises);</span>
|
|
845
845
|
}
|
|
846
846
|
};
|
|
847
847
|
},
|
|
@@ -851,12 +851,12 @@ module.exports = {
|
|
|
851
851
|
/**
|
|
852
852
|
* Create a workflow message
|
|
853
853
|
*/
|
|
854
|
-
|
|
855
|
-
return {
|
|
854
|
+
<span class="fstat-no" title="function not covered" > cr</span>eateMessage(opts) {
|
|
855
|
+
<span class="cstat-no" title="statement not covered" > return {</span>
|
|
856
856
|
workflow_id: opts.workflowId,
|
|
857
857
|
cookbook_name: opts.cookbookName,
|
|
858
|
-
step_index: opts.step ||
|
|
859
|
-
data: opts.data ||
|
|
858
|
+
step_index: opts.step || 0,
|
|
859
|
+
data: opts.data || {},
|
|
860
860
|
results: [],
|
|
861
861
|
timestamp: new Date().toISOString()
|
|
862
862
|
};
|
|
@@ -865,8 +865,8 @@ module.exports = {
|
|
|
865
865
|
/**
|
|
866
866
|
* Parse a workflow message
|
|
867
867
|
*/
|
|
868
|
-
|
|
869
|
-
return {
|
|
868
|
+
<span class="fstat-no" title="function not covered" > pa</span>rseMessage(message) {
|
|
869
|
+
<span class="cstat-no" title="statement not covered" > return {</span>
|
|
870
870
|
workflowId: message.workflow_id,
|
|
871
871
|
cookbookName: message.cookbook_name,
|
|
872
872
|
step: message.step_index,
|
|
@@ -878,28 +878,28 @@ module.exports = {
|
|
|
878
878
|
/**
|
|
879
879
|
* Get next queue from cookbook step
|
|
880
880
|
*/
|
|
881
|
-
|
|
882
|
-
if (step.queue) {
|
|
883
|
-
return step.queue
|
|
881
|
+
<span class="fstat-no" title="function not covered" > ge</span>tNextQueue(step) {
|
|
882
|
+
<span class="cstat-no" title="statement not covered" > if (step.queue) {</span>
|
|
883
|
+
<span class="cstat-no" title="statement not covered" > return step.queue;</span>
|
|
884
884
|
}
|
|
885
|
-
return `${step.service}${runtimeCfg.get('workflowDefaultServiceQueueSuffix')}
|
|
885
|
+
<span class="cstat-no" title="statement not covered" > return `${step.service}${runtimeCfg.get('workflowDefaultServiceQueueSuffix')}`;</span>
|
|
886
886
|
},
|
|
887
887
|
|
|
888
888
|
/**
|
|
889
889
|
* Validate workflow message
|
|
890
890
|
*/
|
|
891
|
-
|
|
892
|
-
return !!(message.workflow_id && message.cookbook_name &&
|
|
891
|
+
<span class="fstat-no" title="function not covered" > is</span>ValidMessage(message) {
|
|
892
|
+
<span class="cstat-no" title="statement not covered" > return !!(message.workflow_id && message.cookbook_name &&</span>
|
|
893
893
|
typeof message.step_index === 'number' && message.data);
|
|
894
894
|
},
|
|
895
895
|
|
|
896
896
|
/**
|
|
897
897
|
* Add result to workflow message
|
|
898
898
|
*/
|
|
899
|
-
|
|
900
|
-
return {
|
|
899
|
+
<span class="fstat-no" title="function not covered" > ad</span>dResult(message, result) {
|
|
900
|
+
<span class="cstat-no" title="statement not covered" > return {</span>
|
|
901
901
|
...message,
|
|
902
|
-
results: [...(message.results ||
|
|
902
|
+
results: [...(message.results || []), result],
|
|
903
903
|
last_result: result
|
|
904
904
|
};
|
|
905
905
|
},
|
|
@@ -907,8 +907,8 @@ module.exports = {
|
|
|
907
907
|
/**
|
|
908
908
|
* Create error message
|
|
909
909
|
*/
|
|
910
|
-
|
|
911
|
-
return {
|
|
910
|
+
<span class="fstat-no" title="function not covered" > cr</span>eateErrorMessage(message, error, serviceName) {
|
|
911
|
+
<span class="cstat-no" title="statement not covered" > return {</span>
|
|
912
912
|
...message,
|
|
913
913
|
status: 'error',
|
|
914
914
|
error: {
|
|
@@ -1003,7 +1003,7 @@ module.exports.ConnectorCore = module.exports;</pre></td></tr></table></pre>
|
|
|
1003
1003
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1004
1004
|
Code coverage generated by
|
|
1005
1005
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1006
|
-
at 2025-12-
|
|
1006
|
+
at 2025-12-24T08:31:24.391Z
|
|
1007
1007
|
</div>
|
|
1008
1008
|
<script src="prettify.js"></script>
|
|
1009
1009
|
<script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onlineapps/conn-base-hub",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "Central hub for OA Drive connectors - bundles and integrates all essential connector libraries",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"registry"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@onlineapps/conn-base-monitoring": "1.0.
|
|
24
|
+
"@onlineapps/conn-base-monitoring": "1.0.8",
|
|
25
25
|
"@onlineapps/conn-base-storage": "1.0.8",
|
|
26
26
|
"@onlineapps/conn-infra-mq": "1.1.57",
|
|
27
27
|
"@onlineapps/conn-orch-cookbook": "2.0.17",
|
|
@@ -66,7 +66,7 @@ describe('Hub Connector Component Tests @component', () => {
|
|
|
66
66
|
mockConfig = {
|
|
67
67
|
serviceName: 'test-service',
|
|
68
68
|
version: '1.0.0',
|
|
69
|
-
amqpUrl: 'amqp://
|
|
69
|
+
amqpUrl: 'amqp://127.0.0.1',
|
|
70
70
|
registry: {
|
|
71
71
|
registryUrl: 'http://registry:3000'
|
|
72
72
|
},
|
|
@@ -74,7 +74,10 @@ describe('Hub Connector Component Tests @component', () => {
|
|
|
74
74
|
queue: 'test-queue'
|
|
75
75
|
},
|
|
76
76
|
storage: {
|
|
77
|
-
|
|
77
|
+
// Explicit MinIO settings (fail-fast resolver requires port when storage is configured)
|
|
78
|
+
endPoint: '127.0.0.1',
|
|
79
|
+
port: 9000,
|
|
80
|
+
useSSL: false,
|
|
78
81
|
accessKey: 'test',
|
|
79
82
|
secretKey: 'test'
|
|
80
83
|
},
|
|
@@ -119,6 +122,7 @@ describe('Hub Connector Component Tests @component', () => {
|
|
|
119
122
|
const partialConfig = {
|
|
120
123
|
serviceName: 'partial-service',
|
|
121
124
|
version: '1.0.0',
|
|
125
|
+
amqpUrl: 'amqp://127.0.0.1',
|
|
122
126
|
mq: {
|
|
123
127
|
queue: 'partial-queue'
|
|
124
128
|
}
|
|
@@ -133,8 +137,9 @@ describe('Hub Connector Component Tests @component', () => {
|
|
|
133
137
|
});
|
|
134
138
|
|
|
135
139
|
it('should use environment variables as fallback', () => {
|
|
136
|
-
process.env.RABBITMQ_URL = 'amqp://
|
|
137
|
-
process.env.MINIO_ENDPOINT = '
|
|
140
|
+
process.env.RABBITMQ_URL = 'amqp://127.0.0.1:5672';
|
|
141
|
+
process.env.MINIO_ENDPOINT = '127.0.0.1';
|
|
142
|
+
process.env.MINIO_PORT = '9000';
|
|
138
143
|
process.env.MINIO_ACCESS_KEY = 'env-access';
|
|
139
144
|
process.env.MINIO_SECRET_KEY = 'env-secret';
|
|
140
145
|
|
|
@@ -150,6 +155,7 @@ describe('Hub Connector Component Tests @component', () => {
|
|
|
150
155
|
|
|
151
156
|
delete process.env.RABBITMQ_URL;
|
|
152
157
|
delete process.env.MINIO_ENDPOINT;
|
|
158
|
+
delete process.env.MINIO_PORT;
|
|
153
159
|
delete process.env.MINIO_ACCESS_KEY;
|
|
154
160
|
delete process.env.MINIO_SECRET_KEY;
|
|
155
161
|
});
|
|
@@ -228,7 +234,7 @@ describe('Hub Connector Component Tests @component', () => {
|
|
|
228
234
|
microservice.registry.register({
|
|
229
235
|
name: 'test-service',
|
|
230
236
|
version: '1.0.0',
|
|
231
|
-
endpoints: ['http://
|
|
237
|
+
endpoints: ['http://127.0.0.1:3000']
|
|
232
238
|
})
|
|
233
239
|
).resolves.not.toThrow();
|
|
234
240
|
|
package/tests/unit/hub.test.js
CHANGED
|
@@ -79,15 +79,15 @@ describe('ConnectorHub @unit', () => {
|
|
|
79
79
|
serviceName: 'test-service',
|
|
80
80
|
version: '1.0.0',
|
|
81
81
|
registry: {
|
|
82
|
-
url: 'amqp://
|
|
82
|
+
url: 'amqp://127.0.0.1',
|
|
83
83
|
queue: 'registry'
|
|
84
84
|
},
|
|
85
85
|
mq: {
|
|
86
|
-
url: 'amqp://
|
|
86
|
+
url: 'amqp://127.0.0.1',
|
|
87
87
|
queue: 'test-queue'
|
|
88
88
|
},
|
|
89
89
|
storage: {
|
|
90
|
-
endPoint: '
|
|
90
|
+
endPoint: '127.0.0.1',
|
|
91
91
|
port: 9000,
|
|
92
92
|
accessKey: 'minioadmin',
|
|
93
93
|
secretKey: 'minioadmin'
|
|
@@ -112,7 +112,7 @@ describe('ConnectorHub @unit', () => {
|
|
|
112
112
|
serviceName: 'test-service',
|
|
113
113
|
version: '1.0.0',
|
|
114
114
|
registry: {
|
|
115
|
-
url: 'amqp://
|
|
115
|
+
url: 'amqp://127.0.0.1',
|
|
116
116
|
queue: 'registry'
|
|
117
117
|
}
|
|
118
118
|
// Only registry, no mq or storage
|
|
@@ -131,15 +131,15 @@ describe('ConnectorHub @unit', () => {
|
|
|
131
131
|
serviceName: 'test-service',
|
|
132
132
|
version: '1.0.0',
|
|
133
133
|
registry: {
|
|
134
|
-
url: 'amqp://
|
|
134
|
+
url: 'amqp://127.0.0.1',
|
|
135
135
|
queue: 'registry'
|
|
136
136
|
},
|
|
137
137
|
mq: {
|
|
138
|
-
url: 'amqp://
|
|
138
|
+
url: 'amqp://127.0.0.1',
|
|
139
139
|
queue: 'test-queue'
|
|
140
140
|
},
|
|
141
141
|
storage: {
|
|
142
|
-
endPoint: '
|
|
142
|
+
endPoint: '127.0.0.1',
|
|
143
143
|
port: 9000,
|
|
144
144
|
accessKey: 'minioadmin',
|
|
145
145
|
secretKey: 'minioadmin'
|
|
@@ -159,15 +159,15 @@ describe('ConnectorHub @unit', () => {
|
|
|
159
159
|
serviceName: 'test-service',
|
|
160
160
|
version: '1.0.0',
|
|
161
161
|
registry: {
|
|
162
|
-
url: 'amqp://
|
|
162
|
+
url: 'amqp://127.0.0.1',
|
|
163
163
|
queue: 'registry'
|
|
164
164
|
},
|
|
165
165
|
mq: {
|
|
166
|
-
url: 'amqp://
|
|
166
|
+
url: 'amqp://127.0.0.1',
|
|
167
167
|
queue: 'test-queue'
|
|
168
168
|
},
|
|
169
169
|
storage: {
|
|
170
|
-
endPoint: '
|
|
170
|
+
endPoint: '127.0.0.1',
|
|
171
171
|
port: 9000,
|
|
172
172
|
accessKey: 'minioadmin',
|
|
173
173
|
secretKey: 'minioadmin'
|
|
@@ -190,7 +190,7 @@ describe('ConnectorHub @unit', () => {
|
|
|
190
190
|
serviceName: 'test-service',
|
|
191
191
|
version: '1.0.0',
|
|
192
192
|
registry: {
|
|
193
|
-
url: 'amqp://
|
|
193
|
+
url: 'amqp://127.0.0.1',
|
|
194
194
|
queue: 'registry'
|
|
195
195
|
}
|
|
196
196
|
};
|
|
@@ -321,7 +321,7 @@ describe('ConnectorHub @unit', () => {
|
|
|
321
321
|
serviceName: 'workflow-service',
|
|
322
322
|
version: '1.0.0',
|
|
323
323
|
mq: {
|
|
324
|
-
url: 'amqp://
|
|
324
|
+
url: 'amqp://127.0.0.1',
|
|
325
325
|
queue: 'workflow-queue'
|
|
326
326
|
}
|
|
327
327
|
};
|