@wwkit/cft
v1.0.28
Published
Chrome for Testing (CFT) installer — download, extract, chmod, dep-check
Downloads
4,744
Maintainers
Readme
@wwkit/cft
Chrome for Testing (CFT) 安装器 — 下载、解压、chmod、Linux 依赖检查。
用法
cft install # 下载并安装 Chrome for Testing(已装同版本则跳过)
cft status # 显示安装状态
cft clear # 删除安装产物(~/.config/cft/)
cft help # 显示帮助安装目录
~/.config/cft/(或 $XDG_CONFIG_HOME/cft/)
installed.json
安装完成后生成 ~/.config/cft/installed.json:
{
"location": "~/.config/cft",
"version": "141.0.7390.54",
"os": "mac-arm64",
"chrome_path": ".../chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing",
"driver_path": ".../chromedriver-mac-arm64/chromedriver"
}配置
版本和镜像源硬编码在包内,不接受外部参数。
- 默认版本:
141.0.7390.54 - 默认镜像:
https://npmmirror.com/mirrors/chrome-for-testing
本地开发
环境要求
- Node.js >= 18
- pnpm(workspace 根目录
pnpm install自动链接@wwkit/shared)
直接调用命令
# 通过 bin 入口(推荐,模拟 npm 全局安装后的行为)
node bin status
node bin install
node bin help
# 或通过 pnpm script
pnpm start install运行测试
pnpm run ut # 单元测试(pnpm test 为其别名)发布
pnpm release # pnpm version patch && pnpm publish