Repository navigation
Changes
- docs: 记录 v0.4.0 发布日期与验收运行
- build: 接入可选 ThinLTO 缓存并记录六平台实验
Install
npm install @pixel.js/shotkitTip
npm resolves exactly one prebuilt runtime for your platform. No node-gyp, no
compiler, and no post-install download.
Also published as @shotkit/node@0.4.1, the previous name: a compatibility
alias that depends on this package. Existing installs keep updating unchanged.
Other ways to run it
# Node.js API
node -e "require('@pixel.js/shotkit').screenshot({file:'https://example.com',path:'a.png'}).then(()=>console.log('a.png'))"
# Standalone CLI: download the matching GitHub Release archive below.
./shotkit-linux-x64/bin/shotcli --url https://example.com --out shot.pngPrebuilt runtimes
Standalone archives for the CLI, the C ABI, and non-Node languages. Extract completely before use —
each one unpacks into a version-free shotkit-<os>-<arch>/ directory.
| Platform | Arch | npm package | Archive | Size | SHA-256 |
|---|---|---|---|---|---|
| Windows | x64 | @pixel.js/shotkit-win32-x64 |
shotkit-0.4.1-windows-x64.tar.xz |
11.5 MB | 217089a2748fa667… |
| Windows | arm64 | @pixel.js/shotkit-win32-arm64 |
shotkit-0.4.1-windows-arm64.tar.xz |
10.7 MB | fabaa2837605c5ec… |
| Linux | x64 | @pixel.js/shotkit-linux-x64 |
shotkit-0.4.1-linux-x64.tar.xz |
9.2 MB | 1b9b08e1a6ad1773… |
| Linux | arm64 | @pixel.js/shotkit-linux-arm64 |
shotkit-0.4.1-linux-arm64.tar.xz |
8.3 MB | 566f5c4bcc712b49… |
| macOS | x64 (Intel) | @pixel.js/shotkit-darwin-x64 |
shotkit-0.4.1-macos-x64.tar.xz |
9.7 MB | 3913aa185576e1e0… |
| macOS | arm64 (Apple silicon) | @pixel.js/shotkit-darwin-arm64 |
shotkit-0.4.1-macos-arm64.tar.xz |
8.2 MB | ab1f7bd24f387edd… |
Verify a download
# Linux / macOS
sha256sum -c shotkit-0.4.1-linux-x64.tar.xz.sha256
# Windows (PowerShell)
(Get-FileHash shotkit-0.4.1-windows-x64.tar.xz -Algorithm SHA256).HashLayout differs by platform: Windows archives are flat — shotcli.exe, shot.dll,
include/shot.h, and a manifest.json listing every file with its own SHA-256.
Linux and macOS use bin/, lib/, include/, plus a DEPENDENCIES.txt.
Verified in CI
Every runtime in this release passed, on its own platform and architecture:
- PNG and WebP screenshot smoke tests
- Page scripts are never fetched or executed
- Exactly 10
shot_*C ABI exports - Native
shot.nodeuses one N-API v8 build and does not exportshot_* - Relocatable CLI (
$ORIGIN/../lib/@loader_path/../lib) - Release archive within its size budget
Published to npm through Trusted Publishing (OIDC) — no
long-lived token is involved.
🇨🇳 简体中文
安装
npm install @pixel.js/shotkitnpm 只会为当前平台装下唯一匹配的预编译运行时——不需要 node-gyp,不需要编译器,也没有安装后下载。
同时以旧包名 @shotkit/node@0.4.1 发布为兼容别名包,依赖本包;已有项目无需改动。
# Node.js API
node -e "require('@pixel.js/shotkit').screenshot({file:'https://example.com',path:'a.png'}).then(()=>console.log('a.png'))"
# 独立 CLI 请下载下方对应平台的 GitHub Release 归档
./shotkit-linux-x64/bin/shotcli --url https://example.com --out shot.png预编译运行时
上面的归档表供 CLI、C ABI 和非 Node 语言直接使用,请完整解压后再运行。
每个归档解压出的目录都是不带版本号的 shotkit-<os>-<arch>/。
布局按平台不同:Windows 是平铺的 shotcli.exe、shot.dll、include/shot.h,
外加一份逐文件带 SHA-256 的 manifest.json;Linux 与 macOS 则是 bin/、lib/、
include/,另有 DEPENDENCIES.txt。
校验下载:
# Linux / macOS
sha256sum -c shotkit-0.4.1-linux-x64.tar.xz.sha256CI 验证项
本次发布的每个运行时,都在其对应的平台与架构上通过了:PNG/WebP 截图冒烟测试、
页面脚本零请求零执行、10 个 shot_* C ABI 导出、原生 shot.node 导出面、
可重定位 CLI、以及发布归档体积闸门。
npm 侧通过 Trusted Publishing(OIDC)发布,全程不涉及长期有效的 token。
Full changelog: v0.4.0...v0.4.1