File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -9,23 +9,29 @@ import BasicReporter from "./basic";
99export const TYPE_COLOR_MAP : { [ k in LogType ] ?: string } = {
1010 info : "cyan" ,
1111 fail : "red" ,
12+ success : "green" ,
13+ ready : "green" ,
14+ start : "yellow" ,
1215} ;
1316
1417export const LEVEL_COLOR_MAP : { [ k in LogLevel ] ?: string } = {
1518 0 : "red" ,
1619 1 : "yellow" ,
17- 2 : "white" ,
18- 3 : "white" ,
1920} ;
2021
2122const unicode = isUnicodeSupported ( ) ;
2223const s = ( c : string , fallback : string ) => ( unicode ? c : fallback ) ;
23- const TYPE_ICONS = {
24+ const TYPE_ICONS : { [ k in LogType ] ?: string } = {
25+ error : s ( "✖" , "×" ) ,
26+ fatal : s ( "✖" , "×" ) ,
27+ ready : s ( "✔" , "√" ) ,
28+ warn : s ( "⚠" , "‼" ) ,
2429 info : s ( "ℹ" , "i" ) ,
2530 success : s ( "✔" , "√" ) ,
2631 debug : s ( "⚙" , "D" ) ,
27- trace : s ( "⬆ " , "T " ) ,
32+ trace : s ( "→ " , "→ " ) ,
2833 fail : s ( "✖" , "×" ) ,
34+ start : s ( "⚙" , "S" ) ,
2935 log : "" ,
3036} ;
3137
@@ -61,6 +67,7 @@ export default class FancyReporter extends BasicReporter {
6167 typeof ( TYPE_ICONS as any ) [ logObj . type ] === "string"
6268 ? ( TYPE_ICONS as any ) [ logObj . type ]
6369 : ( logObj as any ) . icon || logObj . type ;
70+
6471 return _type ? getColor ( typeColor ) ( _type ) : "" ;
6572 }
6673
You can’t perform that action at this time.
0 commit comments