Repository navigation
Releases: sj817/shotkit
Release list
v0.4.1
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
v0.4.0
Changes
- ci: 引入引擎指纹、产物查找与跨平台验证脚本 (#7)
- build(node): shot.node 改为薄插件并随包分发 libshot (#8)
- ci: 编译缓存改用 ccache 并与 vcpkg 二进制一起以 artifact 持久化 (#9)
- ci: 按引擎指纹复用产物并拆分构建与验证作业 (#10)
- feat(node): API 对齐 @pixel.js/shotium,0.4.0 起不再保留旧接口 (#12)
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.0, 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.0-windows-x64.tar.xz |
11.5 MB | 0106d4c7a5c34abb… |
| Windows | arm64 | @pixel.js/shotkit-win32-arm64 |
shotkit-0.4.0-windows-arm64.tar.xz |
10.7 MB | 0865cdc4298339c6… |
| Linux | x64 | @pixel.js/shotkit-linux-x64 |
shotkit-0.4.0-linux-x64.tar.xz |
9.2 MB | 26f3b7a891ae1c4e… |
| Linux | arm64 | @pixel.js/shotkit-linux-arm64 |
shotkit-0.4.0-linux-arm64.tar.xz |
8.3 MB | 072287b057ba9dd3… |
| macOS | x64 (Intel) | @pixel.js/shotkit-darwin-x64 |
shotkit-0.4.0-macos-x64.tar.xz |
9.7 MB | d4ad1a86c7b9b0a8… |
| macOS | arm64 (Apple silicon) | @pixel.js/shotkit-darwin-arm64 |
shotkit-0.4.0-macos-arm64.tar.xz |
8.2 MB | 7cba7f7d1a6b621d… |
Verify a download
# Linux / macOS
sha256sum -c shotkit-0.4.0-linux-x64.tar.xz.sha256
# Windows (PowerShell)
(Get-FileHash shotkit-0.4.0-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.0 发布为兼容别名包,依赖本包;已有项目无需改动。
# 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.0-linux-x64.tar.xz.sha256CI 验证项
本次发布的每个运行时,都在其对应的平台与架构上通过了:PNG/WebP 截图冒烟测试、
页面脚本零请求零执行、10 个 shot_* C ABI 导出、原生 shot.node 导出面、
可重定位 CLI、以及发布归档体积闸门。
npm 侧通过 Trusted Publishing(OIDC)发布,全程不涉及长期有效的 token。
Full changelog: v0.3.1...v0.4.0
Breaking changes / 破坏性变更
ShotKit 0.4.0 changes the Node SDK to the API shape of @pixel.js/shotium. This is a breaking upgrade for both @pixel.js/shotkit and its same-version alias @shotkit/node; the alias forwards the new API and does not restore the removed interfaces. The C ABI and CLI are unaffected by this SDK change.
ShotKit 0.4.0 将 Node SDK 调整为与 @pixel.js/shotium 同形的 API。@pixel.js/shotkit 与同版本别名包 @shotkit/node 均包含这些破坏性变更;别名包转发新 API,不保留已删除的旧接口。本次 SDK 变更不改变 C ABI 与 CLI。
API migration / API 迁移
launch(), the ShotKit handle, screenshotURL() and screenshotHTML() have been removed. Use screenshot(options), synchronous start(), status(), stop(), the shared runtime, or the default export. Both ESM and CommonJS are supported; CommonJS exposes the default object at require('@pixel.js/shotkit').default.
已删除 launch()、ShotKit handle、screenshotURL() 与 screenshotHTML()。改用 screenshot(options)、同步 start()、status()、stop()、共享 runtime 或默认导出。支持 ESM 与 CommonJS;CommonJS 的默认对象位于 require('@pixel.js/shotkit').default。
| Before / 旧写法 | 0.4.0 |
|---|---|
| URL or local-file input / URL 或本地文件输入 | file (HTTP(S) URL, file: URL, or local path / HTTP(S) URL、file: URL 或本地路径) |
outputPath |
path; when supplied, image is null / 写入文件后 image 为 null |
width, height |
viewport: { width, height } |
format |
type |
timeoutMs |
pageGotoParams: { timeout } |
allowFileURLs |
allowFileAccess (limitation below / 见下方限制) |
result data, bytes, durationMs, elapsedMs / 旧结果字段 |
{ image, stats: { bytes, timing: { render, total } } } |
Before / 升级前:
import { launch } from '@pixel.js/shotkit';
const kit = await launch();
await kit.screenshotURL('https://example.com/', {
outputPath: 'page.png',
width: 400,
height: 200,
});
await kit.close();After / 升级后:
import { screenshot, stop } from '@pixel.js/shotkit';
const { image, stats } = await screenshot({
file: 'https://example.com/',
path: 'page.png',
viewport: { width: 400, height: 200 },
});
// image === null; stats.bytes is the written file size.
// image 为 null;stats.bytes 是写入文件的字节数。
await stop();Omit path to receive the encoded bytes in image. html, baseURL, mimeType, webp-lossless, and per-capture userAgent remain ShotKit extensions. quality is now 1–100 (default 90) and is rejected for PNG; scale is 0.01–8. selector and fullPage are mutually exclusive. JPEG, clip, headers, cache, tiled capture, daemon options, and cache options passed to start() are unsupported and throw TypeError.
不传 path 时,编码后的图片字节通过 image 返回。保留 ShotKit 扩展 html、baseURL、mimeType、webp-lossless 与每次截图的 userAgent。quality 改为 1–100(默认 90),PNG 拒绝此选项;scale 为 0.01–8。selector 与 fullPage 互斥。不支持 JPEG、clip、headers、cache、分块截图、常驻进程选项,以及传给 start() 的缓存选项;使用时抛出 TypeError。
Known difference: local file access / 已知差异:本地文件访问
allowFileAccess currently only passes through to the kernel. The kernel restricts file: main-document navigation in renderURLToImage, but does not restrict file: subresources of any document. Node reads local input files itself, and resources beside those files can load regardless of this option. This is not yet equivalent to Shotium's file-access behavior.
allowFileAccess 目前只透传给内核。内核仅在 renderURLToImage 中限制 file: 主文档导航,不限制任何文档的 file: 子资源。Node 自行读取本地输入文件,本地页面旁的子资源不受此选项限制,仍可加载;此行为尚未与 Shotium 一致。
v0.3.1
Changes
- feat(node): 实现基于 C API 的原生截图绑定
- fix(capi): 使用标准移动交接编码缓冲区
- fix(ci): 允许 Node 宿主符号并拆分 macOS 压测
- fix(node): 由发布流程统一注入包版本
- fix(threading): 支持宿主专用渲染线程
- fix(threading): 在线程退出前清理 WebCore 状态
- ci(node): 发布可安装的 PR 原生预览包
- feat(render): 支持透明截图画布
- test(node): 修正透明图片数据断言
- chore(node): 同步主包版本至零点三
- ci(linux): 串行化完整链接以降低峰值
- test(node): 稳定端到端性能门槛
- test(node): 修正性能回归判定语义
- ci(node): 移除阻断式性能微基准
- fix(release): npm成功后再公开完整发行版
- docs(release): 自动生成版本变更摘要
- chore(repo): 移除Shot构建不可达的上游目录 (#5)
- feat(npm): 迁到 @pixel.js 组织,旧包名 @shotkit/node 以兼容别名同版本继续发布 (#6)
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.3.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 "const {launch}=require('@pixel.js/shotkit');launch().then(async s=>{await s.screenshotURL('https://example.com',{outputPath:'a.png'});await s.close()})"
# 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.3.1-windows-x64.tar.xz |
11.5 MB | 5f0b17600d208204… |
| Windows | arm64 | @pixel.js/shotkit-win32-arm64 |
shotkit-0.3.1-windows-arm64.tar.xz |
10.7 MB | 600cb78f33f838ab… |
| Linux | x64 | @pixel.js/shotkit-linux-x64 |
shotkit-0.3.1-linux-x64.tar.xz |
9.2 MB | 1bb051389d7cbb4c… |
| Linux | arm64 | @pixel.js/shotkit-linux-arm64 |
shotkit-0.3.1-linux-arm64.tar.xz |
8.3 MB | 03e478981011f5b3… |
| macOS | x64 (Intel) | @pixel.js/shotkit-darwin-x64 |
shotkit-0.3.1-macos-x64.tar.xz |
9.7 MB | 8311613e938e3c2d… |
| macOS | arm64 (Apple silicon) | @pixel.js/shotkit-darwin-arm64 |
shotkit-0.3.1-macos-arm64.tar.xz |
8.2 MB | f90d8bca2062a212… |
Verify a download
# Linux / macOS
sha256sum -c shotkit-0.3.1-linux-x64.tar.xz.sha256
# Windows (PowerShell)
(Get-FileHash shotkit-0.3.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.3.1 发布为兼容别名包,依赖本包;已有项目无需改动。
# Node.js API
node -e "const {launch}=require('@pixel.js/shotkit');launch().then(async s=>{await s.screenshotURL('https://example.com',{outputPath:'a.png'});await s.close()})"
# 独立 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.3.1-linux-x64.tar.xz.sha256CI 验证项
本次发布的每个运行时,都在其对应的平台与架构上通过了:PNG/WebP 截图冒烟测试、
页面脚本零请求零执行、10 个 shot_* C ABI 导出、原生 shot.node 导出面、
可重定位 CLI、以及发布归档体积闸门。
npm 侧通过 Trusted Publishing(OIDC)发布,全程不涉及长期有效的 token。
Full changelog: v0.2.1...v0.3.1
v0.2.1
本版亮点 / Highlights
- 修复 Release 附件 SHA-256 校验路径,重新让六个平台归档校验成为真实阻断门禁。
- 修复 npm 发布演练的版本推导,确保 dry-run 能发现真实发布问题,而不是被已存在版本误报掩盖。
Other ways to run it
```bash # One-off, no install npx @shotkit/node --url https://example.com --out shot.png # Global CLI — installs as `sk`, with `shotkit` as an equivalent alias npm install -g @shotkit/node sk --html page.html --out page.png --full-page # Node.js API node -e "const {launch}=require('@shotkit/node');launch().then(async s=>{await s.screenshotURL('https://example.com',{outputPath:'a.png'});await s.close()})" ```Verify a download
```bash # Linux / macOS sha256sum -c shotkit-0.2.1-linux-x64.tar.xz.sha256 # Windows (PowerShell) (Get-FileHash shotkit-0.2.1-windows-x64.tar.xz -Algorithm SHA256).Hash ``` Layout 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`.🇨🇳 简体中文
### 安装 ```bash npm install @shotkit/node ``` npm 只会为当前平台装下唯一匹配的预编译运行时——不需要 node-gyp,不需要编译器,也没有安装后下载。 ```bash # 不安装,直接跑一次 npx @shotkit/node --url https://example.com --out shot.png # 全局 CLI —— 命令为 `sk`,同时提供等价别名 `shotkit` npm install -g @shotkit/node sk --html page.html --out page.png --full-page ``` ### 预编译运行时 上面的归档表供 CLI、C ABI 和非 Node 语言直接使用,**请完整解压后再运行**。 每个归档解压出的目录都是不带版本号的 `shotkit--/`。 布局按平台不同:Windows 是平铺的 `shotcli.exe`、`shot.dll`、`include/shot.h`, 外加一份逐文件带 SHA-256 的 `manifest.json`;Linux 与 macOS 则是 `bin/`、`lib/`、 `include/`,另有 `DEPENDENCIES.txt`。 校验下载: ```bash # Linux / macOS sha256sum -c shotkit-0.2.1-linux-x64.tar.xz.sha256 ``` ### CI 验证项 本次发布的每个运行时,都在其对应的平台与架构上通过了:PNG/WebP 截图冒烟测试、 页面脚本零请求零执行、10 个 `shot_*` C ABI 导出、可重定位 CLI、以及发布归档体积闸门。 npm 侧通过 Trusted Publishing(OIDC)发布,全程不涉及长期有效的 token。v0.2.0
本版亮点 / Highlights
- 完成快照 fork 的目录重组:产品代码移出
Source/,建立可追踪的upstream-sync/偏离与同步流程。 - 对齐 2026-08-14 WebKit 上游快照,并修复 Windows arm64、Linux 与 macOS 的端口兼容问题。
- 发布归档改为版本化下载文件名与稳定的无版本解压目录;Windows 延迟加载
icuin,归档减少约 2.86 MiB。
Other ways to run it
```bash # One-off, no install npx @shotkit/node --url https://example.com --out shot.png # Global CLI — installs as `sk`, with `shotkit` as an equivalent alias npm install -g @shotkit/node sk --html page.html --out page.png --full-page # Node.js API node -e "const {launch}=require('@shotkit/node');launch().then(async s=>{await s.screenshotURL('https://example.com',{outputPath:'a.png'});await s.close()})" ```Verify a download
```bash # Linux / macOS sha256sum -c shotkit-0.2.0-linux-x64.tar.xz.sha256 # Windows (PowerShell) (Get-FileHash shotkit-0.2.0-windows-x64.tar.xz -Algorithm SHA256).Hash ``` Layout 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`.🇨🇳 简体中文
### 安装 ```bash npm install @shotkit/node ``` npm 只会为当前平台装下唯一匹配的预编译运行时——不需要 node-gyp,不需要编译器,也没有安装后下载。 ```bash # 不安装,直接跑一次 npx @shotkit/node --url https://example.com --out shot.png # 全局 CLI —— 命令为 `sk`,同时提供等价别名 `shotkit` npm install -g @shotkit/node sk --html page.html --out page.png --full-page ``` ### 预编译运行时 上面的归档表供 CLI、C ABI 和非 Node 语言直接使用,**请完整解压后再运行**。 每个归档解压出的目录都是不带版本号的 `shotkit--/`。 布局按平台不同:Windows 是平铺的 `shotcli.exe`、`shot.dll`、`include/shot.h`, 外加一份逐文件带 SHA-256 的 `manifest.json`;Linux 与 macOS 则是 `bin/`、`lib/`、 `include/`,另有 `DEPENDENCIES.txt`。 校验下载: ```bash # Linux / macOS sha256sum -c shotkit-0.2.0-linux-x64.tar.xz.sha256 ``` ### CI 验证项 本次发布的每个运行时,都在其对应的平台与架构上通过了:PNG/WebP 截图冒烟测试、 页面脚本零请求零执行、10 个 `shot_*` C ABI 导出、可重定位 CLI、以及发布归档体积闸门。 npm 侧通过 Trusted Publishing(OIDC)发布,全程不涉及长期有效的 token。v0.1.2
本版亮点 / Highlights
- 新增可直接使用的 Node CLI:主命令
sk,同时保留shotkit别名,支持npx与全局安装。 - Release 自动附带六个平台归档与中英文说明;新增独立 Node SDK CI、类型检查和 npm 缓存。
- README 重构为英文主文档与简体中文版,补齐安装和命令行示例。
Other ways to run it
```bash # One-off, no install npx @shotkit/node --url https://example.com --out shot.png # Global CLI — installs as `sk`, with `shotkit` as an equivalent alias npm install -g @shotkit/node sk --html page.html --out page.png --full-page # Node.js API node -e "const {launch}=require('@shotkit/node');launch().then(async s=>{await s.screenshotURL('https://example.com',{outputPath:'a.png'});await s.close()})" ```Verify a download
```bash # Linux / macOS sha256sum -c shotkit-0.1.2-linux-x64.tar.xz.sha256 # Windows (PowerShell) (Get-FileHash shotkit-0.1.2-windows-x64.tar.xz -Algorithm SHA256).Hash ``` Layout 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`.🇨🇳 简体中文
### 安装 ```bash npm install @shotkit/node ``` npm 只会为当前平台装下唯一匹配的预编译运行时——不需要 node-gyp,不需要编译器,也没有安装后下载。 ```bash # 不安装,直接跑一次 npx @shotkit/node --url https://example.com --out shot.png # 全局 CLI —— 命令为 `sk`,同时提供等价别名 `shotkit` npm install -g @shotkit/node sk --html page.html --out page.png --full-page ``` ### 预编译运行时 上面的归档表供 CLI、C ABI 和非 Node 语言直接使用,**请完整解压后再运行**。 布局按平台不同:Windows 是平铺的 `shotcli.exe`、`shot.dll`、`include/shot.h`, 外加一份逐文件带 SHA-256 的 `manifest.json`;Linux 与 macOS 则是 `bin/`、`lib/`、 `include/`,另有 `DEPENDENCIES.txt`。 校验下载: ```bash # Linux / macOS sha256sum -c shotkit-0.1.2-linux-x64.tar.xz.sha256 ``` ### CI 验证项 本次发布的每个运行时,都在其对应的平台与架构上通过了:PNG/WebP 截图冒烟测试、 页面脚本零请求零执行、10 个 `shot_*` C ABI 导出、可重定位 CLI、以及发布归档体积闸门。 npm 侧通过 Trusted Publishing(OIDC)发布,全程不涉及长期有效的 token。v0.1.1
本版亮点 / Highlights
- 首个完整公开版本:
@shotkit/node主包与 Windows、Linux、macOS × x64、arm64 六个平台运行时子包同步交付。 - 六个平台产物均采用 MinSizeRel;Windows/Linux 使用 Full LTO,并通过 PNG/WebP 截图冒烟与 10 个
shot_*C ABI 导出校验。
@shotkit/node 0.1.1 及 6 个平台运行时子包(win32/linux/darwin × x64/arm64)。 安装: npm i @shotkit/node npm 会按当前 os/cpu 自动装上对应的运行时子包。 构建:Full LTO(Windows/Linux)、MinSizeRel,三平台六架构均通过截图冒烟测试与 C ABI 导出面校验。