@coboot/headless 0.2.2-rc.7 → 0.2.2-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -14
- package/entry.mjs +271 -270
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Headless 业务运行时要求 Node.js 20+;当入口检测到 Node.js 18/19
|
|
|
6
6
|
首次启动只需一次性设备 token:
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
9
|
+
npx -y @coboot/headless@0.2.2-rc.8 '<device-token>'
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
Siboot 和 Coboot 都继承入口进程的运行身份:入口是 root 就以 root 运行,入口是普通用户就以该用户运行。
|
|
@@ -38,10 +38,10 @@ detached daemon 并退出。不需要设置 `BACKEND_URL`、`CLIENT_UID`。终
|
|
|
38
38
|
并重新启动旧 client,不会让两个 Headless 进程争抢同一台物理机的 Driver 锁。
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
42
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
43
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
44
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
41
|
+
npx -y @coboot/headless@0.2.2-rc.8 status
|
|
42
|
+
npx -y @coboot/headless@0.2.2-rc.8 logs
|
|
43
|
+
npx -y @coboot/headless@0.2.2-rc.8 restart
|
|
44
|
+
npx -y @coboot/headless@0.2.2-rc.8 stop
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
更新到 npm `latest` 并重启:
|
|
@@ -66,8 +66,8 @@ Coboot 将安装位置写入用户默认应用目录的 `installation.json`(
|
|
|
66
66
|
Agent 默认工作目录可在首次绑定或重启时单独指定,必须是已存在的绝对目录:
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
70
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
69
|
+
npx -y @coboot/headless@0.2.2-rc.8 '<device-token>' --workspace-dir /home/demo/project
|
|
70
|
+
npx -y @coboot/headless@0.2.2-rc.8 restart --workspace-dir /home/demo/another-project
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
该设置会保存;任务明确选中的本机目录优先于安装默认值。Bash cwd 和相对文件路径使用同一默认值,
|
|
@@ -85,13 +85,13 @@ Coboot daemon 默认禁用 updater 和浏览器预热,第一次调用 `browser
|
|
|
85
85
|
|
|
86
86
|
```bash
|
|
87
87
|
HEADLESS_BROWSER_EXECUTABLE=/absolute/path/to/chrome \
|
|
88
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
88
|
+
npx -y @coboot/headless@0.2.2-rc.8 '<device-token>'
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
需要安装浏览器时,由用户执行:
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
94
|
+
npx -y @coboot/headless@0.2.2-rc.8 install-browser
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
该命令不需要设备 token,也不要求 root。它会先检查现有浏览器并执行启动验证;浏览器已经可用时
|
|
@@ -129,7 +129,7 @@ dnf/yum 先试仓库中的 `chromium`,x86_64 回退到官方 RPM 并关闭 wea
|
|
|
129
129
|
自动化或排障需要显式表达重新注册时,也可以使用:
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
132
|
+
npx -y @coboot/headless@0.2.2-rc.8 --force-enroll '<device-token>'
|
|
133
133
|
```
|
|
134
134
|
|
|
135
135
|
当本地已经存在设备身份时,该命令与再次传入 positional token 使用同一套事务式替换流程。
|
|
@@ -166,7 +166,7 @@ HTTP 与 WebSocket 必须同域并与设备 token 匹配:
|
|
|
166
166
|
HEADLESS_ALLOW_ENDPOINT_OVERRIDE=1 \
|
|
167
167
|
BACKEND_URL=https://example.com \
|
|
168
168
|
WS_URL=wss://example.com/wsschat \
|
|
169
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
169
|
+
npx -y @coboot/headless@0.2.2-rc.8 '<device-token>'
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
WebSocket 覆盖变量名是 `WS_URL`,不是 `WSS_URL`。
|
|
@@ -180,7 +180,7 @@ endpoint 覆盖同样不会写入配置;后续执行 `restart` 时必须再次
|
|
|
180
180
|
CU_EDITION=coboot \
|
|
181
181
|
PKG_NAME=@coboot/headless \
|
|
182
182
|
PKG_BIN_NAME=coboot-headless \
|
|
183
|
-
PKG_VERSION=0.2.2-rc.
|
|
183
|
+
PKG_VERSION=0.2.2-rc.8 \
|
|
184
184
|
pnpm build:headless:npm
|
|
185
185
|
```
|
|
186
186
|
|
|
@@ -188,8 +188,8 @@ pnpm build:headless:npm
|
|
|
188
188
|
|
|
189
189
|
```bash
|
|
190
190
|
npm pack --dry-run --json ./dist-headless
|
|
191
|
-
tar -xOf dist-headless/coboot-headless-0.2.2-rc.
|
|
192
|
-
sha256sum dist-headless/coboot-headless-0.2.2-rc.
|
|
191
|
+
tar -xOf dist-headless/coboot-headless-0.2.2-rc.8.tgz package/package.json
|
|
192
|
+
sha256sum dist-headless/coboot-headless-0.2.2-rc.8.tgz
|
|
193
193
|
```
|
|
194
194
|
|
|
195
195
|
|