Refactor CNB command to improve configuration handling and add default keep.json

- Changed import of 'path' module to use default import syntax.
- Updated 'live' command to accept a configuration file path with higher priority than JSON input.
- Removed stdin reading for JSON input; now reads directly from the specified config file.
- Simplified error handling for JSON parsing and configuration validation.
- Enhanced keepAlive creation by removing unnecessary callbacks and enabling debug mode.
- Added default keep.json file with example configuration.
This commit is contained in:
2026-02-15 23:52:32 +08:00
parent 786ee80839
commit 76aeb21a41
5 changed files with 390 additions and 518 deletions

5
keep.json Normal file
View File

@@ -0,0 +1,5 @@
{
"wss": "wss://cnb-pf8-1jhgvbrkm-001.cnb.space:443/stable-3c0b449c6e6e37b44a8a7938c0d8a3049926a64c?reconnectionToken=3d90027f-b2b1-4c60-a3b4-f061b75ec073&reconnection=false&skipWebSocketFrames=false",
"cookie": "orange:workspace:cookie-session:cnb-pf8-1jhgvbrkm-001=9cc870da-d3d5-44ee-afdc-7498e1111186",
"url": "https://cnb-pf8-1jhgvbrkm-001.cnb.space/?folder=/workspace"
}