Some checks failed
CI / Type Check & Lint (push) Failing after 6s
CI / Build Test (Current Platform) (push) Successful in 6s
Release / build-and-release (push) Successful in 44s
CI / Build All Platforms (push) Successful in 50s
CI / Type Check & Lint (pull_request) Failing after 5s
CI / Build Test (Current Platform) (pull_request) Successful in 5s
CI / Build All Platforms (pull_request) Successful in 49s
Major improvements: - Created color theme system (ts/colors.ts) with ANSI colors - Enhanced logger with colors, table formatting, and styled boxes - Fixed daemon exit bug - now stays running when no UPS configured - Added config hot-reload with file watcher for live updates - Beautified CLI help output with color-coded commands - Added showcase test demonstrating all output features - Fixed ANSI code handling for perfect table/box alignment Features: - Color-coded messages (success=green, error=red, warning=yellow, info=cyan) - Status symbols (●○◐◯ for running/stopped/starting/unknown) - Battery level colors (green>60%, yellow 30-60%, red<30%) - Table formatting with auto-sizing and column alignment - Styled boxes (success, error, warning, info styles) - Hot-reload: daemon watches config file and reloads automatically - Idle mode: daemon stays alive when no devices, checks periodically Daemon improvements: - No longer exits when no UPS devices configured - Enters idle monitoring loop waiting for config - File watcher detects config changes in real-time - Auto-reloads and starts monitoring when devices added - Logs warnings instead of errors for missing devices Technical fixes: - Strip ANSI codes when calculating text width for alignment - Use visible length for padding calculations in tables and boxes - Properly handle colored text in table cells and box lines Breaking changes: None (backward compatible)
37 lines
823 B
JSON
37 lines
823 B
JSON
{
|
|
"name": "@serve.zone/nupst",
|
|
"version": "4.0.2",
|
|
"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"
|
|
}
|
|
}
|