@coboot/headless 0.2.2-rc.11 → 0.2.2-rc.15
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 +306 -294
- package/package.json +1 -1
- package/browser-runtime/playwright-core/node_modules/.bin/playwright-core +0 -21
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.15 '<device-token>'
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
Siboot 和 Coboot 都继承入口进程的运行身份:入口是 root 就以 root 运行,入口是普通用户就以该用户运行。
|
|
@@ -45,10 +45,10 @@ detached daemon 并退出。不需要设置 `BACKEND_URL`、`CLIENT_UID`。终
|
|
|
45
45
|
普通 `update`、`start`、`restart` 继续使用现有身份,无需 token。
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
49
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
50
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
51
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
48
|
+
npx -y @coboot/headless@0.2.2-rc.15 status
|
|
49
|
+
npx -y @coboot/headless@0.2.2-rc.15 logs
|
|
50
|
+
npx -y @coboot/headless@0.2.2-rc.15 restart
|
|
51
|
+
npx -y @coboot/headless@0.2.2-rc.15 stop
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
更新到 npm `latest` 并重启:
|
|
@@ -92,8 +92,8 @@ Coboot 将安装位置写入用户默认应用目录的 `installation.json`(
|
|
|
92
92
|
Agent 默认工作目录可在首次绑定或重启时单独指定,必须是已存在的绝对目录:
|
|
93
93
|
|
|
94
94
|
```bash
|
|
95
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
96
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
95
|
+
npx -y @coboot/headless@0.2.2-rc.15 '<device-token>' --workspace-dir /home/demo/project
|
|
96
|
+
npx -y @coboot/headless@0.2.2-rc.15 restart --workspace-dir /home/demo/another-project
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
该设置会保存;任务明确选中的本机目录优先于安装默认值。Bash cwd 和相对文件路径使用同一默认值,
|
|
@@ -111,13 +111,13 @@ Coboot daemon 默认禁用 updater 和浏览器预热,第一次调用 `browser
|
|
|
111
111
|
|
|
112
112
|
```bash
|
|
113
113
|
HEADLESS_BROWSER_EXECUTABLE=/absolute/path/to/chrome \
|
|
114
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
114
|
+
npx -y @coboot/headless@0.2.2-rc.15 '<device-token>'
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
需要安装浏览器时,由用户执行:
|
|
118
118
|
|
|
119
119
|
```bash
|
|
120
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
120
|
+
npx -y @coboot/headless@0.2.2-rc.15 install-browser
|
|
121
121
|
```
|
|
122
122
|
|
|
123
123
|
该命令不需要设备 token,也不要求 root。它会先检查现有浏览器并执行启动验证;浏览器已经可用时
|
|
@@ -155,7 +155,7 @@ dnf/yum 先试仓库中的 `chromium`,x86_64 回退到官方 RPM 并关闭 wea
|
|
|
155
155
|
自动化或排障需要显式表达重新注册时,也可以使用:
|
|
156
156
|
|
|
157
157
|
```bash
|
|
158
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
158
|
+
npx -y @coboot/headless@0.2.2-rc.15 --force-enroll '<device-token>'
|
|
159
159
|
```
|
|
160
160
|
|
|
161
161
|
该命令始终尝试重新注册,必须使用未消费的新 token;普通 positional token 安装会识别已经成功的同 token 重试。
|
|
@@ -192,7 +192,7 @@ HTTP 与 WebSocket 必须同域并与设备 token 匹配:
|
|
|
192
192
|
HEADLESS_ALLOW_ENDPOINT_OVERRIDE=1 \
|
|
193
193
|
BACKEND_URL=https://example.com \
|
|
194
194
|
WS_URL=wss://example.com/wsschat \
|
|
195
|
-
npx -y @coboot/headless@0.2.2-rc.
|
|
195
|
+
npx -y @coboot/headless@0.2.2-rc.15 '<device-token>'
|
|
196
196
|
```
|
|
197
197
|
|
|
198
198
|
WebSocket 覆盖变量名是 `WS_URL`,不是 `WSS_URL`。
|
|
@@ -206,7 +206,7 @@ endpoint 覆盖同样不会写入配置;后续执行 `restart` 时必须再次
|
|
|
206
206
|
CU_EDITION=coboot \
|
|
207
207
|
PKG_NAME=@coboot/headless \
|
|
208
208
|
PKG_BIN_NAME=coboot-headless \
|
|
209
|
-
PKG_VERSION=0.2.2-rc.
|
|
209
|
+
PKG_VERSION=0.2.2-rc.15 \
|
|
210
210
|
pnpm build:headless:npm
|
|
211
211
|
```
|
|
212
212
|
|
|
@@ -214,8 +214,8 @@ pnpm build:headless:npm
|
|
|
214
214
|
|
|
215
215
|
```bash
|
|
216
216
|
npm pack --dry-run --json ./dist-headless
|
|
217
|
-
tar -xOf dist-headless/coboot-headless-0.2.2-rc.
|
|
218
|
-
sha256sum dist-headless/coboot-headless-0.2.2-rc.
|
|
217
|
+
tar -xOf dist-headless/coboot-headless-0.2.2-rc.15.tgz package/package.json
|
|
218
|
+
sha256sum dist-headless/coboot-headless-0.2.2-rc.15.tgz
|
|
219
219
|
```
|
|
220
220
|
|
|
221
221
|
|