@aiot-toolkit/shared-utils 2.0.3 → 2.0.4-beta.1

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.
@@ -5,6 +5,7 @@ export interface IStyle {
5
5
  bold?: boolean;
6
6
  italic?: boolean;
7
7
  icon?: string;
8
+ underline?: boolean;
8
9
  }
9
10
  export type StyleMessage = string | number | boolean | undefined | {
10
11
  word: string | number;
@@ -125,7 +125,8 @@ class ColorConsole {
125
125
  color,
126
126
  bgColor,
127
127
  bold,
128
- italic
128
+ italic,
129
+ underline
129
130
  } = style || ColorConsole.defaultStyle;
130
131
  let result = word;
131
132
  if (color) {
@@ -140,6 +141,9 @@ class ColorConsole {
140
141
  if (italic) {
141
142
  result = _chalk.default.italic(result);
142
143
  }
144
+ if (underline) {
145
+ result = _chalk.default.underline(result);
146
+ }
143
147
  return result;
144
148
  }
145
149
 
@@ -174,7 +178,10 @@ class ColorConsole {
174
178
 
175
179
  // 位置消息
176
180
  let positionMessage = filePath ? {
177
- style: ColorConsole.getStyle(level),
181
+ style: {
182
+ ...ColorConsole.getStyle(_ILog.Loglevel.LOG),
183
+ underline: true
184
+ },
178
185
  word: [filePath, position?.startLine, position?.startColumn].filter(item => Boolean(item)).join(':')
179
186
  } : null;
180
187
  const logs = Array.isArray(message) ? message : [message];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiot-toolkit/shared-utils",
3
- "version": "2.0.3",
3
+ "version": "2.0.4-beta.1",
4
4
  "description": "The common method functions of the aiot-toolkit.",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -42,5 +42,5 @@
42
42
  "@types/minimatch": "^5.1.2",
43
43
  "@types/qrcode": "^1.5.5"
44
44
  },
45
- "gitHead": "e29e61eb89c2559eb9f3a18c51fd5ce4c4196cc2"
45
+ "gitHead": "85c4287c7b9468c83d468cfc39b147f4975f8285"
46
46
  }