miravo 0.4.0 → 0.5.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/console-dist/assets/index-C1oOHU1J.js +119 -0
- package/console-dist/index.html +1 -1
- package/package.json +6 -5
- package/src/commands/start.test.ts +122 -0
- package/src/commands/start.ts +241 -11
- package/src/lib/shutdown.ts +13 -3
- package/src/logger.ts +21 -4
- package/console-dist/assets/index-hUJSpKtB.js +0 -119
package/src/logger.ts
CHANGED
|
@@ -16,14 +16,26 @@ const LOG_LEVEL_MAP: Readonly<Record<LogLevel, number>> = {
|
|
|
16
16
|
/**
|
|
17
17
|
* Color map for log tags. Used in pretty mode to prepend a colored label.
|
|
18
18
|
*/
|
|
19
|
+
/**
|
|
20
|
+
* Aligned with Miravo brand palette (packages/shared/src/brand.css):
|
|
21
|
+
* engine → yellow brand primary #e5a218 (amber)
|
|
22
|
+
* mqtt → green brand success #10b981 (emerald)
|
|
23
|
+
* opcua → blue brand chart-3 #3b82f6
|
|
24
|
+
* modbus → cyan brand info #38bdf8 (sky blue)
|
|
25
|
+
* config → gray low-priority setup messages
|
|
26
|
+
* lifecycle → magenta brand chart-4 #8b5cf6 (violet)
|
|
27
|
+
* fault → redBright brand destructive #f43f5e (rose)
|
|
28
|
+
* control → blueBright lighter blue, distinct from opcua
|
|
29
|
+
*/
|
|
19
30
|
const TAG_COLORS: Readonly<Record<string, (s: string) => string>> = {
|
|
20
|
-
engine: colors.
|
|
31
|
+
engine: colors.yellow,
|
|
21
32
|
mqtt: colors.green,
|
|
22
33
|
opcua: colors.blue,
|
|
23
|
-
|
|
34
|
+
modbus: colors.cyan,
|
|
35
|
+
config: colors.gray,
|
|
24
36
|
lifecycle: colors.magenta,
|
|
25
|
-
fault: colors.
|
|
26
|
-
control: colors.
|
|
37
|
+
fault: colors.redBright,
|
|
38
|
+
control: colors.blueBright,
|
|
27
39
|
};
|
|
28
40
|
|
|
29
41
|
/**
|
|
@@ -34,6 +46,7 @@ const TAG_DISPLAY_NAMES: Readonly<Record<string, string>> = {
|
|
|
34
46
|
engine: "Engine",
|
|
35
47
|
mqtt: "MQTT",
|
|
36
48
|
opcua: "OPC UA",
|
|
49
|
+
modbus: "Modbus",
|
|
37
50
|
config: "Config",
|
|
38
51
|
lifecycle: "Lifecycle",
|
|
39
52
|
fault: "Fault",
|
|
@@ -170,6 +183,9 @@ export const faultLog: ConsolaInstance = logger.withTag("fault");
|
|
|
170
183
|
/** OPC UA adapter connection and server events. */
|
|
171
184
|
export const opcuaLog: ConsolaInstance = logger.withTag("opcua");
|
|
172
185
|
|
|
186
|
+
/** Modbus TCP adapter connection and server events. */
|
|
187
|
+
export const modbusLog: ConsolaInstance = logger.withTag("modbus");
|
|
188
|
+
|
|
173
189
|
/** Control plane status and command routing events. */
|
|
174
190
|
export const controlLog: ConsolaInstance = logger.withTag("control");
|
|
175
191
|
|
|
@@ -179,6 +195,7 @@ const allLoggers: ConsolaInstance[] = [
|
|
|
179
195
|
engineLog,
|
|
180
196
|
mqttLog,
|
|
181
197
|
opcuaLog,
|
|
198
|
+
modbusLog,
|
|
182
199
|
configLog,
|
|
183
200
|
lifecycleLog,
|
|
184
201
|
faultLog,
|