@sc-voice/tools 3.5.0 → 3.6.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sc-voice/tools",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "description": "Utilities for SC-Voice",
5
5
  "main": "index.mjs",
6
6
  "files": [
@@ -26,7 +26,7 @@ export class ColorConsole {
26
26
  write = (...args) => console.log.call(null, ...args),
27
27
  colorOk1 = BRIGHT_GREEN,
28
28
  colorOk2 = GREEN,
29
- colorFYI1 = BRIGHT_BLACK,
29
+ colorFyi1 = BRIGHT_BLACK,
30
30
  colorBad1 = BRIGHT_RED,
31
31
  colorBad2 = RED,
32
32
  colorTag1 = CYAN,
@@ -39,7 +39,7 @@ export class ColorConsole {
39
39
  write,
40
40
  colorOk1,
41
41
  colorOk2,
42
- colorFYI1,
42
+ colorFyi1,
43
43
  colorBad1,
44
44
  colorBad2,
45
45
  colorTag1,
@@ -65,47 +65,56 @@ export class ColorConsole {
65
65
  });
66
66
  }
67
67
 
68
- msgLvl(color, msg, lvl, rest) {
69
- return this.color(color, msg + (lvl ? `@${lvl}` : ''), ...rest);
68
+ fyi(msg, ...rest) {
69
+ let color = this.colorFyi1;
70
+ this.write(...this.color(color, rest));
70
71
  }
71
72
 
72
- ok1(msg, lvl, ...rest) {
73
+ ok(...rest) {
74
+ return this.ok1(...rest);
75
+ }
76
+
77
+ ok1(...rest) {
73
78
  let color = this.colorOk1;
74
- this.write(...this.msgLvl(color, msg, lvl, rest));
79
+ this.write(...this.color(color, ...rest));
75
80
  }
76
81
 
77
- ok2(msg, lvl, ...rest) {
82
+ ok2(...rest) {
78
83
  let color = this.colorOk2;
79
- this.write(...this.msgLvl(color, msg, lvl, rest));
84
+ this.write(...this.color(color, ...rest));
85
+ }
86
+
87
+ bad(...rest) {
88
+ return this.bad1(...rest);
80
89
  }
81
90
 
82
- bad1(msg, lvl, ...rest) {
91
+ bad1(...rest) {
83
92
  let color = this.colorBad1;
84
- this.write(...this.msgLvl(color, msg, lvl, rest));
93
+ this.write(...this.color(color, ...rest));
85
94
  }
86
95
 
87
- bad2(msg, lvl, ...rest) {
96
+ bad2(...rest) {
88
97
  let color = this.colorBad2;
89
- this.write(...this.msgLvl(color, msg, lvl, rest));
98
+ this.write(...this.color(color, ...rest));
90
99
  }
91
100
 
92
- tag1(msg, lvl, ...rest) {
101
+ tag1(...rest) {
93
102
  let color = this.colorTag1;
94
- this.write(...this.msgLvl(color, msg, lvl, rest));
103
+ this.write(...this.color(color, ...rest));
95
104
  }
96
105
 
97
- tag2(msg, lvl, ...rest) {
106
+ tag2(...rest) {
98
107
  let color = this.colorTag2;
99
- this.write(...this.msgLvl(color, msg, lvl, rest));
108
+ this.write(...this.color(color, ...rest));
100
109
  }
101
110
 
102
111
  tag3(msg, lvl, ...rest) {
103
112
  let color = this.colorTag3;
104
- this.write(...this.msgLvl(color, msg, lvl, rest));
113
+ this.write(...this.color(color, ...rest));
105
114
  }
106
115
 
107
116
  tag4(msg, lvl, ...rest) {
108
117
  let color = this.colorTag4;
109
- this.write(...this.msgLvl(color, msg, lvl, rest));
118
+ this.write(...this.color(color, ...rest));
110
119
  }
111
120
  }