fix(cli): 自动拉起 daemon 走 boot.js(带 BrowserManager),修复 open/list/get 全 not found;daemon 增 visionl-daemon bin + start 指向 boot;docs 同步当前 CLI(无 daemon/page 子命令,Bing 易反爬请用百度等国内源)
This commit is contained in:
1 parent
36780493a5
commit
c3a7f74b1f
4 files changed
+50
-14
No files matched your search
+15
-12
@@ -206,26 +206,29 @@ visionl profiles
|
||||
|
||||
## Daemon 管理
|
||||
|
||||
### `visionl daemon start`
|
||||
> 当前 CLI **没有 `daemon start/stop` 子命令**。首条页面命令会自动拉起**带反检测浏览器**的 daemon(`boot.js`);手动启动可选如下方式。
|
||||
|
||||
手动启动 daemon。
|
||||
### 手动启动浏览器 daemon
|
||||
|
||||
```bash
|
||||
visionl daemon start [--port <n>]
|
||||
# 方式一:daemon 包 start 脚本(= node ./dist/boot.js)
|
||||
cd packages/daemon && npm run start
|
||||
|
||||
# 默认端口 9527
|
||||
visionl daemon start
|
||||
# 指定端口
|
||||
visionl daemon start --port 8080
|
||||
# 方式二:直接节点
|
||||
node packages/daemon/dist/boot.js
|
||||
|
||||
# 方式三:全局 bin(构建后安装)
|
||||
visionl-daemon
|
||||
|
||||
# 指定端口:VISIONL_PORT 环境变量,默认 9527
|
||||
VISIONL_PORT=8080 node packages/daemon/dist/boot.js
|
||||
```
|
||||
|
||||
### `visionl daemon stop`
|
||||
> 注意:必须走 `boot.js`(它初始化 `BrowserManager` 并把它传给 `startServer`)。若直接 `node packages/daemon/dist/server.js`,daemon 会**没有浏览器**,页面路由不注册,`open/list/...` 一律 `not found`(这是已修复的坑)。
|
||||
|
||||
优雅关闭 daemon(不杀死已打开的页面)。
|
||||
### 重启 / 停止 daemon
|
||||
|
||||
```bash
|
||||
visionl daemon stop
|
||||
```
|
||||
没有 `daemon stop` 子命令;结束方式为 `kill <daemon的pid>`(含浏览器常驻进程)即可。
|
||||
|
||||
### `visionl daemon status`
|
||||
|
||||
|
||||
Reference in new issue
Block a user