File tree Expand file tree Collapse file tree 1 file changed +7
-22
lines changed Expand file tree Collapse file tree 1 file changed +7
-22
lines changed Original file line number Diff line number Diff line change 11'use strict'
22
3- const {
4- platform,
5- env : { TERM } ,
6- emitWarning,
7- } = require ( 'process' )
3+ const { emitWarning } = require ( 'process' )
4+
5+ const { circleFilled, info : infoSym , warning, cross } = require ( 'figures' )
86
97// Retrieve error's `level`
108const getLevel = function ( { opts, info } ) {
@@ -20,25 +18,12 @@ const getLevel = function({ opts, info }) {
2018 return defaultGetLevel ( info )
2119}
2220
23- const supportsUnicode = platform !== 'win32' || TERM === 'xterm-256color'
2421// Each level is printed in a different way
2522const LEVELS = {
26- debug : {
27- COLOR : 'blue' ,
28- SIGN : supportsUnicode ? '\u25C9' : '(*)' ,
29- } ,
30- info : {
31- COLOR : 'green' ,
32- SIGN : supportsUnicode ? '\u2139' : 'i' ,
33- } ,
34- warn : {
35- COLOR : 'yellow' ,
36- SIGN : supportsUnicode ? '\u26A0' : '\u203C' ,
37- } ,
38- error : {
39- COLOR : 'red' ,
40- SIGN : supportsUnicode ? '\u2716' : '\u00D7' ,
41- } ,
23+ debug : { COLOR : 'blue' , SIGN : circleFilled } ,
24+ info : { COLOR : 'green' , SIGN : infoSym } ,
25+ warn : { COLOR : 'yellow' , SIGN : warning } ,
26+ error : { COLOR : 'red' , SIGN : cross } ,
4227}
4328
4429// Default `opts.getLevel()`
You can’t perform that action at this time.
0 commit comments