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

@@ -1,6 +1,6 @@
{
"name": "@kevisual/cli",
"version": "0.1.2",
"version": "0.1.3",
"description": "envision 命令行工具",
"type": "module",
"basename": "/root/cli",
@@ -30,13 +30,10 @@
],
"scripts": {
"dev": "bun src/run.ts ",
"dev:tsx": "tsx src/run.ts ",
"dev:server": "cd assistant && bun --watch src/run-server.ts ",
"build": "rimraf dist && bun run bun.config.mjs",
"deploy": "ev pack -u -p -m no",
"pub:me": "npm publish --registry https://npm.xiongxiao.me --tag beta",
"postbuild": "cd assistant && pnpm build ",
"dts": "dts-bundle-generator --external-inlines=@types/jsonwebtoken src/index.ts -o dist/index.d.ts "
"postbuild": "cd assistant && pnpm build "
},
"keywords": [
"kevisual",
@@ -44,32 +41,32 @@
],
"author": "abearxiong",
"dependencies": {
"@inquirer/prompts": "^8.2.0",
"@inquirer/prompts": "^8.2.1",
"@kevisual/app": "^0.0.2",
"@kevisual/auth": "^2.0.3",
"@kevisual/context": "^0.0.4",
"@kevisual/context": "^0.0.6",
"@kevisual/use-config": "^1.0.30",
"@opencode-ai/sdk": "^1.1.53",
"@opencode-ai/sdk": "^1.2.4",
"@types/busboy": "^1.5.4",
"busboy": "^1.6.0",
"eventemitter3": "^5.0.4",
"jose": "^6.1.3",
"lowdb": "^7.0.1",
"lru-cache": "^11.2.5",
"lru-cache": "^11.2.6",
"micromatch": "^4.0.8",
"pm2": "latest",
"semver": "^7.7.4",
"unstorage": "^1.17.4"
},
"devDependencies": {
"@kevisual/api": "^0.0.47",
"@kevisual/cnb": "^0.0.22",
"@kevisual/api": "^0.0.50",
"@kevisual/cnb": "^0.0.26",
"@kevisual/dts": "^0.0.3",
"@kevisual/load": "^0.0.6",
"@kevisual/logger": "^0.0.4",
"@kevisual/query": "0.0.40",
"@kevisual/query-login": "0.0.7",
"@types/bun": "^1.3.8",
"@types/bun": "^1.3.9",
"@types/crypto-js": "^4.2.2",
"@types/jsonwebtoken": "^9.0.10",
"@types/micromatch": "^4.0.10",