open-code-review/package.json
kite f76d4266ed feat: add platform-specific npm packages to eliminate postinstall download
Ship Go binaries inside per-platform npm packages (@alibaba-group/ocr-{os}-{arch})
so npm install resolves the correct binary via optionalDependencies + os/cpu fields.
This removes the need for a postinstall download from GitHub Releases, which is
extremely slow for users behind restricted networks (e.g. China mainland).

The postinstall download is retained as a fallback for --no-optional installs.
2026-06-17 14:17:03 +08:00

35 lines
1.1 KiB
JSON

{
"name": "@alibaba-group/open-code-review",
"version": "0.0.0",
"description": "OpenCodeReview CLI — AI-powered code review tool",
"bin": {
"ocr": "bin/ocr.js"
},
"scripts": {
"postinstall": "node scripts/install.js",
"test:github-actions": "node scripts/github-actions/post-review-comments.test.js"
},
"repository": {
"type": "git",
"url": "https://github.com/alibaba/open-code-review.git"
},
"publishConfig": {
"access": "public"
},
"ocrConfig": {
"urlPattern": "https://github.com/alibaba/open-code-review/releases/download/v{version}/opencodereview-{os}-{arch}",
"checksumPattern": "https://github.com/alibaba/open-code-review/releases/download/v{version}/sha256sum.txt"
},
"optionalDependencies": {
"@alibaba-group/ocr-darwin-arm64": "0.0.0",
"@alibaba-group/ocr-darwin-x64": "0.0.0",
"@alibaba-group/ocr-linux-arm64": "0.0.0",
"@alibaba-group/ocr-linux-x64": "0.0.0",
"@alibaba-group/ocr-win32-arm64": "0.0.0",
"@alibaba-group/ocr-win32-x64": "0.0.0"
},
"engines": {
"node": ">=14"
},
"license": "Apache-2.0"
}