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

View File

@@ -10,7 +10,7 @@
],
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
"license": "MIT",
"packageManager": "pnpm@10.28.2",
"packageManager": "pnpm@10.29.3",
"type": "module",
"files": [
"dist",
@@ -42,27 +42,27 @@
}
},
"devDependencies": {
"@inquirer/prompts": "^8.2.0",
"@inquirer/prompts": "^8.2.1",
"@kevisual/ai": "^0.0.24",
"@kevisual/api": "^0.0.44",
"@kevisual/api": "^0.0.50",
"@kevisual/load": "^0.0.6",
"@kevisual/local-app-manager": "^0.1.32",
"@kevisual/logger": "^0.0.4",
"@kevisual/query": "0.0.39",
"@kevisual/query": "0.0.40",
"@kevisual/query-login": "0.0.7",
"@kevisual/router": "^0.0.70",
"@kevisual/types": "^0.0.12",
"@kevisual/use-config": "^1.0.30",
"@opencode-ai/plugin": "^1.1.49",
"@types/bun": "^1.3.8",
"@types/node": "^25.2.0",
"@opencode-ai/plugin": "^1.2.4",
"@types/bun": "^1.3.9",
"@types/node": "^25.2.3",
"@types/send": "^1.2.1",
"@types/ws": "^8.18.1",
"chalk": "^5.6.2",
"commander": "^14.0.3",
"cross-env": "^10.1.0",
"dayjs": "^1.11.19",
"dotenv": "^17.2.3",
"dotenv": "^17.3.1",
"get-port": "^7.1.0",
"nanoid": "^5.1.6",
"send": "^1.2.1",
@@ -77,15 +77,15 @@
"access": "public"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.981.0",
"@aws-sdk/client-s3": "^3.990.0",
"@kevisual/js-filter": "^0.0.5",
"@kevisual/oss": "^0.0.19",
"@kevisual/video-tools": "^0.0.13",
"@opencode-ai/sdk": "^1.1.49",
"@opencode-ai/sdk": "^1.2.4",
"es-toolkit": "^1.44.0",
"eventemitter3": "^5.0.4",
"lowdb": "^7.0.1",
"lru-cache": "^11.2.5",
"lru-cache": "^11.2.6",
"pm2": "^6.0.14",
"unstorage": "^1.17.4",
"zod": "^4.3.6"