protoc-gen-grpc-web
Advanced tools
Comparing version 1.4.0 to 1.4.1
{ | ||
"name": "protoc-gen-grpc-web", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "A protoc-gen-grpc-web binary for npm.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,3 +7,3 @@ const path = require('path'); | ||
const VERSION = '1.3.0'; | ||
const VERSION = '1.4.1'; | ||
const DL_PREFIX = 'https://github.com/grpc/grpc-web/releases/download/'; | ||
@@ -13,19 +13,13 @@ const BIN_DIR = path.resolve(__dirname, "bin"); | ||
const PLATFORM_NAME = process.platform === 'win32' ? 'windows' : process.platform; | ||
const ARCH = process.arch === 'arm64' ? 'aarch64' : 'x86_64'; | ||
async function run() { | ||
if (process.arch !== 'x64') { | ||
console.log(process.arch, process.platform); | ||
if (process.arch === "arm64" && process.platform === "darwin") { | ||
console.log( | ||
"macos arm64 platform detected, using x64 until https://github.com/grpc/grpc-web/issues/1159 is resolved" | ||
); | ||
} else { | ||
throw new Error( | ||
`Unsupported arch: only support x86_64, but you're using ${process.arch}` | ||
); | ||
} | ||
if (process.arch !== 'x64' && process.arch !== 'arm64') { | ||
throw new Error( | ||
`Unsupported arch: only support x86_64 and arm64, but you're using ${process.arch}` | ||
); | ||
} | ||
await fs.ensureDir(BIN_DIR); | ||
const execFilename = `protoc-gen-grpc-web-${VERSION}-${PLATFORM_NAME}-x86_64${EXT}`; | ||
const execFilename = `protoc-gen-grpc-web-${VERSION}-${PLATFORM_NAME}-${ARCH}${EXT}`; | ||
@@ -32,0 +26,0 @@ const downloadUrl = DL_PREFIX + VERSION + '/' + execFilename; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2673
44