Replaced all ASCII box characters (┌─┐│└┘) with modern, clean colored output using the existing color theme and symbols. Changes in ts/systemd.ts: - displayServiceStatus(): Parse systemctl output and show key info with colored symbols (● for running, ○ for stopped) - displaySingleUpsStatus(): Clean output with battery/runtime colors - Green >60%, yellow 30-60%, red <30% for battery - Power status with colored symbols and text - Clean indented layout without boxes Example new output: ● Service: active (running) PID: 7606 Memory: 41.5M CPU: 279ms UPS Devices (2): ● Test UPS (SNMP v1) - Online Battery: 100% ✓ Runtime: 48 min Host: 192.168.187.140:161 Much cleaner and more readable than ASCII boxes!
37 lines
823 B
JSON
37 lines
823 B
JSON
{
|
|
"name": "@serve.zone/nupst",
|
|
"version": "4.0.6",
|
|
"exports": "./mod.ts",
|
|
"tasks": {
|
|
"dev": "deno run --allow-all mod.ts",
|
|
"compile": "deno task compile:all",
|
|
"compile:all": "bash scripts/compile-all.sh",
|
|
"test": "deno test --allow-all test/",
|
|
"test:watch": "deno test --allow-all --watch test/",
|
|
"check": "deno check mod.ts",
|
|
"fmt": "deno fmt",
|
|
"lint": "deno lint"
|
|
},
|
|
"lint": {
|
|
"rules": {
|
|
"tags": ["recommended"]
|
|
}
|
|
},
|
|
"fmt": {
|
|
"useTabs": false,
|
|
"lineWidth": 100,
|
|
"indentWidth": 2,
|
|
"semiColons": true,
|
|
"singleQuote": true
|
|
},
|
|
"compilerOptions": {
|
|
"lib": ["deno.window"],
|
|
"strict": true
|
|
},
|
|
"imports": {
|
|
"@std/cli": "jsr:@std/cli@^1.0.0",
|
|
"@std/fmt": "jsr:@std/fmt@^1.0.0",
|
|
"@std/path": "jsr:@std/path@^1.0.0"
|
|
}
|
|
}
|