topkat-utils 1.3.6 → 1.3.7
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 +22 -25
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/clean-stack-trace.ts.html +12 -21
- package/coverage/lcov-report/config.ts.html +1 -1
- package/coverage/lcov-report/error-utils.ts.html +1 -1
- package/coverage/lcov-report/index.html +23 -23
- package/coverage/lcov-report/is-empty.ts.html +1 -1
- package/coverage/lcov-report/is-nodejs.ts.html +1 -1
- package/coverage/lcov-report/is-object.ts.html +1 -1
- package/coverage/lcov-report/isset.ts.html +1 -1
- package/coverage/lcov-report/logger-utils.ts.html +22 -22
- package/coverage/lcov-report/loop-utils.ts.html +1 -1
- package/coverage/lcov-report/math-utils.ts.html +1 -1
- package/coverage/lcov-report/object-utils.ts.html +1 -1
- package/coverage/lcov-report/regexp-utils.ts.html +1 -1
- package/coverage/lcov-report/remove-circular-json-stringify.ts.html +1 -1
- package/coverage/lcov-report/string-utils.ts.html +1 -1
- package/coverage/lcov-report/timer-utils.ts.html +1 -1
- package/coverage/lcov-report/transaction-utils.ts.html +1 -1
- package/coverage/lcov.info +30 -34
- package/dist/src/clean-stack-trace.js +3 -5
- package/dist/src/clean-stack-trace.js.map +1 -1
- package/dist/src/logger-utils.js +2 -2
- package/dist/src/logger-utils.js.map +1 -1
- package/package.json +1 -1
- package/src/clean-stack-trace.ts +2 -5
- package/src/logger-utils.ts +2 -2
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>38/38</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">90% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>9/10</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">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>38/38</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -101,10 +101,7 @@
|
|
|
101
101
|
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
102
|
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
103
|
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
-
<a name='L39'></a><a href='#L39'>39</a>
|
|
105
|
-
<a name='L40'></a><a href='#L40'>40</a>
|
|
106
|
-
<a name='L41'></a><a href='#L41'>41</a>
|
|
107
|
-
<a name='L42'></a><a href='#L42'>42</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">2x</span>
|
|
104
|
+
<a name='L39'></a><a href='#L39'>39</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">2x</span>
|
|
108
105
|
<span class="cline-any cline-yes">2x</span>
|
|
109
106
|
<span class="cline-any cline-yes">2x</span>
|
|
110
107
|
<span class="cline-any cline-yes">2x</span>
|
|
@@ -138,13 +135,10 @@
|
|
|
138
135
|
<span class="cline-any cline-yes">2x</span>
|
|
139
136
|
<span class="cline-any cline-yes">8x</span>
|
|
140
137
|
<span class="cline-any cline-yes">6x</span>
|
|
141
|
-
<span class="cline-any cline-yes">
|
|
142
|
-
<span class="cline-any cline-yes">
|
|
143
|
-
<span class="cline-any cline-yes">
|
|
144
|
-
<span class="cline-any cline-yes">
|
|
145
|
-
<span class="cline-any cline-yes">2x</span>
|
|
146
|
-
<span class="cline-any cline-yes">2x</span>
|
|
147
|
-
<span class="cline-any cline-yes">2x</span>
|
|
138
|
+
<span class="cline-any cline-yes">4x</span>
|
|
139
|
+
<span class="cline-any cline-yes">4x</span>
|
|
140
|
+
<span class="cline-any cline-yes">5x</span>
|
|
141
|
+
<span class="cline-any cline-yes">5x</span>
|
|
148
142
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">
|
|
149
143
|
export function cleanStackTrace(stack) {
|
|
150
144
|
if (typeof stack !== 'string') <span class="branch-0 cbranch-no" title="branch not covered" >return ''</span>
|
|
@@ -177,11 +171,8 @@ export function cleanStackTrace(stack) {
|
|
|
177
171
|
const linesClean = lines
|
|
178
172
|
.filter(l => l && !removeIfContain.some(text => l.includes(text)))
|
|
179
173
|
.map((line, i) => {
|
|
180
|
-
if (i === 0) return ''
|
|
181
|
-
else
|
|
182
|
-
const [, start, fileName, end] = line.match(/(^.+\/)([^/]+:\d+:\d+)(.{0,3})/)<span class="branch-0 cbranch-no" title="branch not covered" > || []</span>
|
|
183
|
-
return fileName ? `\x1b[2m${start}\x1b[0m${fileName}\x1b[2m${end}\x1b[0m` <span class="branch-0 cbranch-no" title="branch not covered" >: `\x1b[2m${line}\x1b[0m`</span>
|
|
184
|
-
}
|
|
174
|
+
if (i === 0) return '' // usually just the word "Error:"
|
|
175
|
+
else return line
|
|
185
176
|
})
|
|
186
177
|
.join('\n')
|
|
187
178
|
return linesClean
|
|
@@ -193,7 +184,7 @@ export function cleanStackTrace(stack) {
|
|
|
193
184
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
194
185
|
Code coverage generated by
|
|
195
186
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
196
|
-
at 2025-03-
|
|
187
|
+
at 2025-03-18T20:30:22.452Z
|
|
197
188
|
</div>
|
|
198
189
|
<script src="prettify.js"></script>
|
|
199
190
|
<script>
|
|
@@ -349,7 +349,7 @@ type RecursivePartial<T> = {
|
|
|
349
349
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
350
350
|
Code coverage generated by
|
|
351
351
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
352
|
-
at 2025-03-
|
|
352
|
+
at 2025-03-18T20:30:22.452Z
|
|
353
353
|
</div>
|
|
354
354
|
<script src="prettify.js"></script>
|
|
355
355
|
<script>
|
|
@@ -715,7 +715,7 @@ export const failSafe = tryCatch // ALIAS
|
|
|
715
715
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
716
716
|
Code coverage generated by
|
|
717
717
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
718
|
-
at 2025-03-
|
|
718
|
+
at 2025-03-18T20:30:22.452Z
|
|
719
719
|
</div>
|
|
720
720
|
<script src="prettify.js"></script>
|
|
721
721
|
<script>
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">39.
|
|
26
|
+
<span class="strong">39.48% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>757/1917</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">62.06% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>36/58</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">9.
|
|
40
|
+
<span class="strong">9.62% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>13/
|
|
42
|
+
<span class='fraction'>13/135</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">39.
|
|
47
|
+
<span class="strong">39.48% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>757/1917</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
|
85
85
|
</td>
|
|
86
86
|
<td data-value="100" class="pct high">100%</td>
|
|
87
|
-
<td data-value="
|
|
88
|
-
<td data-value="
|
|
89
|
-
<td data-value="
|
|
87
|
+
<td data-value="38" class="abs high">38/38</td>
|
|
88
|
+
<td data-value="90" class="pct high">90%</td>
|
|
89
|
+
<td data-value="10" class="abs high">9/10</td>
|
|
90
90
|
<td data-value="100" class="pct high">100%</td>
|
|
91
91
|
<td data-value="1" class="abs high">1/1</td>
|
|
92
92
|
<td data-value="100" class="pct high">100%</td>
|
|
93
|
-
<td data-value="
|
|
93
|
+
<td data-value="38" class="abs high">38/38</td>
|
|
94
94
|
</tr>
|
|
95
95
|
|
|
96
96
|
<tr>
|
|
@@ -185,17 +185,17 @@
|
|
|
185
185
|
|
|
186
186
|
<tr>
|
|
187
187
|
<td class="file low" data-value="logger-utils.ts"><a href="logger-utils.ts.html">logger-utils.ts</a></td>
|
|
188
|
-
<td data-value="
|
|
189
|
-
<div class="chart"><div class="cover-fill" style="width:
|
|
188
|
+
<td data-value="41.2" class="pic low">
|
|
189
|
+
<div class="chart"><div class="cover-fill" style="width: 41%"></div><div class="cover-empty" style="width: 59%"></div></div>
|
|
190
190
|
</td>
|
|
191
|
-
<td data-value="
|
|
192
|
-
<td data-value="364" class="abs low">
|
|
193
|
-
<td data-value="
|
|
194
|
-
<td data-value="
|
|
195
|
-
<td data-value="
|
|
196
|
-
<td data-value="
|
|
197
|
-
<td data-value="
|
|
198
|
-
<td data-value="364" class="abs low">
|
|
191
|
+
<td data-value="41.2" class="pct low">41.2%</td>
|
|
192
|
+
<td data-value="364" class="abs low">150/364</td>
|
|
193
|
+
<td data-value="36" class="pct low">36%</td>
|
|
194
|
+
<td data-value="25" class="abs low">9/25</td>
|
|
195
|
+
<td data-value="12.5" class="pct low">12.5%</td>
|
|
196
|
+
<td data-value="40" class="abs low">5/40</td>
|
|
197
|
+
<td data-value="41.2" class="pct low">41.2%</td>
|
|
198
|
+
<td data-value="364" class="abs low">150/364</td>
|
|
199
199
|
</tr>
|
|
200
200
|
|
|
201
201
|
<tr>
|
|
@@ -326,7 +326,7 @@
|
|
|
326
326
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
327
327
|
Code coverage generated by
|
|
328
328
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
329
|
-
at 2025-03-
|
|
329
|
+
at 2025-03-18T20:30:22.452Z
|
|
330
330
|
</div>
|
|
331
331
|
<script src="prettify.js"></script>
|
|
332
332
|
<script>
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
89
89
|
Code coverage generated by
|
|
90
90
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
91
|
-
at 2025-03-
|
|
91
|
+
at 2025-03-18T20:30:22.452Z
|
|
92
92
|
</div>
|
|
93
93
|
<script src="prettify.js"></script>
|
|
94
94
|
<script>
|
|
@@ -94,7 +94,7 @@ export function isNodeJs(): boolean {
|
|
|
94
94
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
95
95
|
Code coverage generated by
|
|
96
96
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
97
|
-
at 2025-03-
|
|
97
|
+
at 2025-03-18T20:30:22.452Z
|
|
98
98
|
</div>
|
|
99
99
|
<script src="prettify.js"></script>
|
|
100
100
|
<script>
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
77
77
|
Code coverage generated by
|
|
78
78
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
79
|
-
at 2025-03-
|
|
79
|
+
at 2025-03-18T20:30:22.452Z
|
|
80
80
|
</div>
|
|
81
81
|
<script src="prettify.js"></script>
|
|
82
82
|
<script>
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
77
77
|
Code coverage generated by
|
|
78
78
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
79
|
-
at 2025-03-
|
|
79
|
+
at 2025-03-18T20:30:22.452Z
|
|
80
80
|
</div>
|
|
81
81
|
<script src="prettify.js"></script>
|
|
82
82
|
<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">41.2% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>150/364</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">36% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>9/25</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">12.5% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>5/
|
|
42
|
+
<span class='fraction'>5/40</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">41.2% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>150/364</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -735,11 +735,13 @@
|
|
|
735
735
|
<span class="cline-any cline-no"> </span>
|
|
736
736
|
<span class="cline-any cline-no"> </span>
|
|
737
737
|
<span class="cline-any cline-no"> </span>
|
|
738
|
-
<span class="cline-any cline-yes">1x</span>
|
|
739
738
|
<span class="cline-any cline-yes">2x</span>
|
|
740
739
|
<span class="cline-any cline-yes">2x</span>
|
|
741
740
|
<span class="cline-any cline-yes">2x</span>
|
|
742
|
-
<span class="cline-any cline-yes">
|
|
741
|
+
<span class="cline-any cline-yes">2x</span>
|
|
742
|
+
<span class="cline-any cline-no"> </span>
|
|
743
|
+
<span class="cline-any cline-no"> </span>
|
|
744
|
+
<span class="cline-any cline-no"> </span>
|
|
743
745
|
<span class="cline-any cline-no"> </span>
|
|
744
746
|
<span class="cline-any cline-no"> </span>
|
|
745
747
|
<span class="cline-any cline-no"> </span>
|
|
@@ -785,13 +787,11 @@
|
|
|
785
787
|
<span class="cline-any cline-no"> </span>
|
|
786
788
|
<span class="cline-any cline-no"> </span>
|
|
787
789
|
<span class="cline-any cline-no"> </span>
|
|
790
|
+
<span class="cline-any cline-yes">2x</span>
|
|
791
|
+
<span class="cline-any cline-yes">2x</span>
|
|
788
792
|
<span class="cline-any cline-no"> </span>
|
|
789
793
|
<span class="cline-any cline-no"> </span>
|
|
790
|
-
<span class="cline-any cline-yes">1x</span>
|
|
791
|
-
<span class="cline-any cline-yes">1x</span>
|
|
792
794
|
<span class="cline-any cline-no"> </span>
|
|
793
|
-
<span class="cline-any cline-yes">1x</span>
|
|
794
|
-
<span class="cline-any cline-yes">1x</span>
|
|
795
795
|
<span class="cline-any cline-neutral"> </span>
|
|
796
796
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">/* eslint-disable no-console */
|
|
797
797
|
/* eslint-disable no-control-regex */
|
|
@@ -996,12 +996,12 @@ export const C = {
|
|
|
996
996
|
function logErrPrivate(level: NotInfoLogLevel, color: Color, ...errors) {
|
|
997
997
|
const { isProd } = configFn()
|
|
998
998
|
|
|
999
|
-
if (errors.length === 1 && typeof errors[0]
|
|
999
|
+
if (errors.length === 1 && typeof errors[0]?.log === 'function') <span class="branch-0 cbranch-no" title="branch not covered" >return errors[0].log()</span>
|
|
1000
1000
|
|
|
1001
1001
|
let stackTrace = (new Error('')).stack<span class="branch-0 cbranch-no" title="branch not covered" > || ''</span>
|
|
1002
1002
|
const displayStack = errors[0] === false <span class="branch-0 cbranch-no" title="branch not covered" >? errors.shift() </span>: true
|
|
1003
1003
|
const symbol = level === 'error' <span class="branch-0 cbranch-no" title="branch not covered" >? '✘ ' </span>: '⚠ '
|
|
1004
|
-
if (errors.length > 1<span class="branch-0 cbranch-no" title="branch not covered" > && !isset(errors[0]))</span> <span class="branch-0 cbranch-no" title="branch not covered" >errors.shift()
|
|
1004
|
+
if (errors.length > 1<span class="branch-0 cbranch-no" title="branch not covered" > && !isset(errors[0]))</span> <span class="branch-0 cbranch-no" title="branch not covered" >errors.shift() /</span>/ remove first empty object
|
|
1005
1005
|
|
|
1006
1006
|
const getStringFromErr = (err, i) => {
|
|
1007
1007
|
if (!isset(err)) <span class="branch-0 cbranch-no" title="branch not covered" >return ''</span>
|
|
@@ -1094,7 +1094,7 @@ function logErrPrivate(level: NotInfoLogLevel, color: Color, ...errors) {
|
|
|
1094
1094
|
* @param {String} char Default: '.'
|
|
1095
1095
|
* @param {String} msg String before char. Final output will be `${str}${char.repeat(step)}`
|
|
1096
1096
|
*/
|
|
1097
|
-
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered"
|
|
1097
|
+
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >export function cliProgressBar(step: number, char = '.', msg = `\x1b[2mⓘ Waiting response`) {</span></span>
|
|
1098
1098
|
<span class="cstat-no" title="statement not covered" > if (typeof process?.stdout?.clearLine === 'function') {</span>
|
|
1099
1099
|
<span class="cstat-no" title="statement not covered" > process.stdout.cursorTo(0)</span>
|
|
1100
1100
|
<span class="cstat-no" title="statement not covered" > process.stdout.write(`${msg}${char.repeat(step)}\x1b[0m`) // \x1b[0m == reset color</span>
|
|
@@ -1104,8 +1104,8 @@ function logErrPrivate(level: NotInfoLogLevel, color: Color, ...errors) {
|
|
|
1104
1104
|
type loadingSpinnerTypes = 'arrow' | 'dots'
|
|
1105
1105
|
|
|
1106
1106
|
/** This allow an intuitive inline loading spinner with a check mark when loading as finished or a red cross for errors */
|
|
1107
|
-
<span class="fstat-no" title="function not covered" ><span class="branch-0 cbranch-no" title="branch not covered" >export class cliLoadingSpinner {</span></span>
|
|
1108
|
-
<span class="cstat-no" title="statement not covered"
|
|
1107
|
+
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" ><span class="branch-0 cbranch-no" title="branch not covered" >export class cliLoadingSpinner {</span></span></span>
|
|
1108
|
+
<span class="cstat-no" title="statement not covered" > /** Please use it like spinner.start('myStuff') then spinner.end()</span>
|
|
1109
1109
|
<span class="cstat-no" title="statement not covered" > * @param {String} type in: ['arrow', 'dots']</span>
|
|
1110
1110
|
<span class="cstat-no" title="statement not covered" > */</span>
|
|
1111
1111
|
<span class="cstat-no" title="statement not covered" > frameRate: number</span>
|
|
@@ -1155,8 +1155,8 @@ type loadingSpinnerTypes = 'arrow' | 'dots'
|
|
|
1155
1155
|
|
|
1156
1156
|
|
|
1157
1157
|
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >export function dim(str = '') {</span></span>
|
|
1158
|
-
return configFn()?.terminal?.noColor ? str : `\x1b[2m${str.toString().split('\n').join('\x1b[0m\n\x1b[2m')}\x1b[0m
|
|
1159
|
-
}
|
|
1158
|
+
<span class="cstat-no" title="statement not covered" > return configFn()?.terminal?.noColor ? str : `\x1b[2m${str.toString().split('\n').join('\x1b[0m\n\x1b[2m')}\x1b[0m`</span>
|
|
1159
|
+
<span class="cstat-no" title="statement not covered" >}</span>
|
|
1160
1160
|
|
|
1161
1161
|
</pre></td></tr></table></pre>
|
|
1162
1162
|
|
|
@@ -1165,7 +1165,7 @@ type loadingSpinnerTypes = 'arrow' | 'dots'
|
|
|
1165
1165
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1166
1166
|
Code coverage generated by
|
|
1167
1167
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1168
|
-
at 2025-03-
|
|
1168
|
+
at 2025-03-18T20:30:22.452Z
|
|
1169
1169
|
</div>
|
|
1170
1170
|
<script src="prettify.js"></script>
|
|
1171
1171
|
<script>
|
|
@@ -559,7 +559,7 @@ export <span class="fstat-no" title="function not covered" >async function recur
|
|
|
559
559
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
560
560
|
Code coverage generated by
|
|
561
561
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
562
|
-
at 2025-03-
|
|
562
|
+
at 2025-03-18T20:30:22.452Z
|
|
563
563
|
</div>
|
|
564
564
|
<script src="prettify.js"></script>
|
|
565
565
|
<script>
|
|
@@ -244,7 +244,7 @@ import { isset } from './isset'
|
|
|
244
244
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
245
245
|
Code coverage generated by
|
|
246
246
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
247
|
-
at 2025-03-
|
|
247
|
+
at 2025-03-18T20:30:22.452Z
|
|
248
248
|
</div>
|
|
249
249
|
<script src="prettify.js"></script>
|
|
250
250
|
<script>
|
|
@@ -1399,7 +1399,7 @@ export const entries = objEntries</pre></td></tr></table></pre>
|
|
|
1399
1399
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1400
1400
|
Code coverage generated by
|
|
1401
1401
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1402
|
-
at 2025-03-
|
|
1402
|
+
at 2025-03-18T20:30:22.452Z
|
|
1403
1403
|
</div>
|
|
1404
1404
|
<script src="prettify.js"></script>
|
|
1405
1405
|
<script>
|
|
@@ -223,7 +223,7 @@ import { C } from './logger-utils'
|
|
|
223
223
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
224
224
|
Code coverage generated by
|
|
225
225
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
226
|
-
at 2025-03-
|
|
226
|
+
at 2025-03-18T20:30:22.452Z
|
|
227
227
|
</div>
|
|
228
228
|
<script src="prettify.js"></script>
|
|
229
229
|
<script>
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
125
125
|
Code coverage generated by
|
|
126
126
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
127
|
-
at 2025-03-
|
|
127
|
+
at 2025-03-18T20:30:22.452Z
|
|
128
128
|
</div>
|
|
129
129
|
<script src="prettify.js"></script>
|
|
130
130
|
<script>
|
|
@@ -949,7 +949,7 @@ export type MiniTemplaterOptions = {
|
|
|
949
949
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
950
950
|
Code coverage generated by
|
|
951
951
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
952
|
-
at 2025-03-
|
|
952
|
+
at 2025-03-18T20:30:22.452Z
|
|
953
953
|
</div>
|
|
954
954
|
<script src="prettify.js"></script>
|
|
955
955
|
<script>
|
|
@@ -334,7 +334,7 @@ console.log('Process took ' + time.end())
|
|
|
334
334
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
335
335
|
Code coverage generated by
|
|
336
336
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
337
|
-
at 2025-03-
|
|
337
|
+
at 2025-03-18T20:30:22.452Z
|
|
338
338
|
</div>
|
|
339
339
|
<script src="prettify.js"></script>
|
|
340
340
|
<script>
|
|
@@ -259,7 +259,7 @@ export <span class="fstat-no" title="function not covered" >async function waitF
|
|
|
259
259
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
260
260
|
Code coverage generated by
|
|
261
261
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
262
|
-
at 2025-03-
|
|
262
|
+
at 2025-03-18T20:30:22.452Z
|
|
263
263
|
</div>
|
|
264
264
|
<script src="prettify.js"></script>
|
|
265
265
|
<script>
|
package/coverage/lcov.info
CHANGED
|
@@ -38,26 +38,24 @@ DA:31,2
|
|
|
38
38
|
DA:32,2
|
|
39
39
|
DA:33,8
|
|
40
40
|
DA:34,6
|
|
41
|
-
DA:35,
|
|
42
|
-
DA:36,
|
|
43
|
-
DA:37,
|
|
44
|
-
DA:38,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
DA:41,2
|
|
48
|
-
LF:41
|
|
49
|
-
LH:41
|
|
41
|
+
DA:35,4
|
|
42
|
+
DA:36,4
|
|
43
|
+
DA:37,5
|
|
44
|
+
DA:38,5
|
|
45
|
+
LF:38
|
|
46
|
+
LH:38
|
|
50
47
|
BRDA:2,0,0,2
|
|
51
48
|
BRDA:3,1,0,0
|
|
52
49
|
BRDA:31,2,0,12
|
|
53
50
|
BRDA:31,3,0,224
|
|
54
|
-
BRDA:32,4,0,
|
|
55
|
-
BRDA:33,5,0,
|
|
56
|
-
BRDA:
|
|
57
|
-
BRDA:
|
|
58
|
-
BRDA:
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
BRDA:32,4,0,5
|
|
52
|
+
BRDA:33,5,0,5
|
|
53
|
+
BRDA:33,6,0,4
|
|
54
|
+
BRDA:32,7,0,8
|
|
55
|
+
BRDA:33,8,0,2
|
|
56
|
+
BRDA:33,9,0,6
|
|
57
|
+
BRF:10
|
|
58
|
+
BRH:9
|
|
61
59
|
end_of_record
|
|
62
60
|
TN:
|
|
63
61
|
SF:src/config.ts
|
|
@@ -524,11 +522,9 @@ FN:211,getStringFromErr
|
|
|
524
522
|
FN:245,stringifyInstanceOfError
|
|
525
523
|
FN:263,stringifyExtraInfos
|
|
526
524
|
FN:302,cliProgressBar
|
|
527
|
-
FN:313,<instance_members_initializer>
|
|
528
|
-
FN:302,cliProgressBar
|
|
529
525
|
FN:312,<instance_members_initializer>
|
|
530
526
|
FN:362,dim
|
|
531
|
-
FNF:
|
|
527
|
+
FNF:40
|
|
532
528
|
FNH:5
|
|
533
529
|
FNDA:2,log
|
|
534
530
|
FNDA:0,toHtml
|
|
@@ -569,8 +565,6 @@ FNDA:0,stringifyInstanceOfError
|
|
|
569
565
|
FNDA:0,stringifyExtraInfos
|
|
570
566
|
FNDA:0,cliProgressBar
|
|
571
567
|
FNDA:0,<instance_members_initializer>
|
|
572
|
-
FNDA:0,cliProgressBar
|
|
573
|
-
FNDA:0,<instance_members_initializer>
|
|
574
568
|
FNDA:0,dim
|
|
575
569
|
DA:1,2
|
|
576
570
|
DA:2,2
|
|
@@ -879,11 +873,11 @@ DA:304,0
|
|
|
879
873
|
DA:305,0
|
|
880
874
|
DA:306,0
|
|
881
875
|
DA:307,0
|
|
882
|
-
DA:308,
|
|
876
|
+
DA:308,2
|
|
883
877
|
DA:309,2
|
|
884
878
|
DA:310,2
|
|
885
879
|
DA:311,2
|
|
886
|
-
DA:312,
|
|
880
|
+
DA:312,0
|
|
887
881
|
DA:313,0
|
|
888
882
|
DA:314,0
|
|
889
883
|
DA:315,0
|
|
@@ -931,13 +925,13 @@ DA:356,0
|
|
|
931
925
|
DA:357,0
|
|
932
926
|
DA:358,0
|
|
933
927
|
DA:359,0
|
|
934
|
-
DA:360,
|
|
935
|
-
DA:361,
|
|
928
|
+
DA:360,2
|
|
929
|
+
DA:361,2
|
|
936
930
|
DA:362,0
|
|
937
|
-
DA:363,
|
|
938
|
-
DA:364,
|
|
931
|
+
DA:363,0
|
|
932
|
+
DA:364,0
|
|
939
933
|
LF:364
|
|
940
|
-
LH:
|
|
934
|
+
LH:150
|
|
941
935
|
BRDA:17,0,0,2
|
|
942
936
|
BRDA:19,1,0,0
|
|
943
937
|
BRDA:22,2,0,0
|
|
@@ -946,12 +940,12 @@ BRDA:92,4,0,2
|
|
|
946
940
|
BRDA:92,5,0,0
|
|
947
941
|
BRDA:142,6,0,2
|
|
948
942
|
BRDA:201,7,0,2
|
|
949
|
-
BRDA:204,8,0,
|
|
943
|
+
BRDA:204,8,0,1
|
|
950
944
|
BRDA:206,9,0,0
|
|
951
945
|
BRDA:207,10,0,0
|
|
952
946
|
BRDA:208,11,0,0
|
|
953
947
|
BRDA:209,12,0,0
|
|
954
|
-
BRDA:209,13,0,
|
|
948
|
+
BRDA:209,13,0,1
|
|
955
949
|
BRDA:239,14,0,0
|
|
956
950
|
BRDA:211,15,0,2
|
|
957
951
|
BRDA:212,16,0,0
|
|
@@ -959,10 +953,12 @@ BRDA:215,17,0,0
|
|
|
959
953
|
BRDA:216,18,0,0
|
|
960
954
|
BRDA:231,19,0,2
|
|
961
955
|
BRDA:232,20,0,0
|
|
962
|
-
BRDA:
|
|
963
|
-
BRDA:
|
|
964
|
-
|
|
965
|
-
|
|
956
|
+
BRDA:312,21,0,0
|
|
957
|
+
BRDA:204,22,0,0
|
|
958
|
+
BRDA:209,23,0,0
|
|
959
|
+
BRDA:232,24,0,1
|
|
960
|
+
BRF:25
|
|
961
|
+
BRH:9
|
|
966
962
|
end_of_record
|
|
967
963
|
TN:
|
|
968
964
|
SF:src/loop-utils.ts
|
|
@@ -34,11 +34,9 @@ function cleanStackTrace(stack) {
|
|
|
34
34
|
.filter(l => l && !removeIfContain.some(text => l.includes(text)))
|
|
35
35
|
.map((line, i) => {
|
|
36
36
|
if (i === 0)
|
|
37
|
-
return '';
|
|
38
|
-
else
|
|
39
|
-
|
|
40
|
-
return fileName ? `\x1b[2m${start}\x1b[0m${fileName}\x1b[2m${end}\x1b[0m` : `\x1b[2m${line}\x1b[0m`;
|
|
41
|
-
}
|
|
37
|
+
return ''; // usually just the word "Error:"
|
|
38
|
+
else
|
|
39
|
+
return line;
|
|
42
40
|
})
|
|
43
41
|
.join('\n');
|
|
44
42
|
return linesClean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean-stack-trace.js","sourceRoot":"","sources":["../../src/clean-stack-trace.ts"],"names":[],"mappings":";;;AACA,SAAgB,eAAe,CAAC,KAAK;IACjC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAA;IACxC,KAAK,CAAC,OAAO,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAA;IAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC/B,MAAM,eAAe,GAAG;QACpB,iBAAiB;QACjB,YAAY;QACZ,kBAAkB;QAClB,qCAAqC;QACrC,wBAAwB;QACxB,yCAAyC;QACzC,4BAA4B;QAC5B,wCAAwC;QACxC,aAAa;QACb,0BAA0B;QAC1B,wBAAwB;QACxB,gCAAgC;QAChC,WAAW;QACX,kBAAkB;QAClB,iBAAiB;QACjB,kBAAkB;QAClB,eAAe;QACf,oBAAoB;QACpB,cAAc;QACd,oBAAoB;QACpB,gCAAgC;QAChC,cAAc;KACjB,CAAA;IACD,MAAM,UAAU,GAAG,KAAK;SACnB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;SACjE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;QACb,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO,EAAE,CAAA
|
|
1
|
+
{"version":3,"file":"clean-stack-trace.js","sourceRoot":"","sources":["../../src/clean-stack-trace.ts"],"names":[],"mappings":";;;AACA,SAAgB,eAAe,CAAC,KAAK;IACjC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAA;IACxC,KAAK,CAAC,OAAO,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAA;IAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC/B,MAAM,eAAe,GAAG;QACpB,iBAAiB;QACjB,YAAY;QACZ,kBAAkB;QAClB,qCAAqC;QACrC,wBAAwB;QACxB,yCAAyC;QACzC,4BAA4B;QAC5B,wCAAwC;QACxC,aAAa;QACb,0BAA0B;QAC1B,wBAAwB;QACxB,gCAAgC;QAChC,WAAW;QACX,kBAAkB;QAClB,iBAAiB;QACjB,kBAAkB;QAClB,eAAe;QACf,oBAAoB;QACpB,cAAc;QACd,oBAAoB;QACpB,gCAAgC;QAChC,cAAc;KACjB,CAAA;IACD,MAAM,UAAU,GAAG,KAAK;SACnB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;SACjE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;QACb,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO,EAAE,CAAA,CAAC,iCAAiC;;YACnD,OAAO,IAAI,CAAA;IACpB,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAA;IACf,OAAO,UAAU,CAAA;AACrB,CAAC;AApCD,0CAoCC"}
|
package/dist/src/logger-utils.js
CHANGED
|
@@ -200,13 +200,13 @@ exports.C = {
|
|
|
200
200
|
};
|
|
201
201
|
function logErrPrivate(level, color, ...errors) {
|
|
202
202
|
const { isProd } = (0, config_1.configFn)();
|
|
203
|
-
if (errors.length === 1 && typeof errors[0]
|
|
203
|
+
if (errors.length === 1 && typeof errors[0]?.log === 'function')
|
|
204
204
|
return errors[0].log();
|
|
205
205
|
let stackTrace = (new Error('')).stack || '';
|
|
206
206
|
const displayStack = errors[0] === false ? errors.shift() : true;
|
|
207
207
|
const symbol = level === 'error' ? '✘ ' : '⚠ ';
|
|
208
208
|
if (errors.length > 1 && !(0, isset_1.isset)(errors[0]))
|
|
209
|
-
errors.shift();
|
|
209
|
+
errors.shift(); // remove first empty object
|
|
210
210
|
const getStringFromErr = (err, i) => {
|
|
211
211
|
if (!(0, isset_1.isset)(err))
|
|
212
212
|
return '';
|