@bytecodealliance/wizer
Advanced tools
Comparing version 3.0.0 to 3.0.1
19
index.js
@@ -1,20 +0,3 @@ | ||
import { endianness } from "node:os"; | ||
import { platform, arch } from "node:process"; | ||
import { pkgForCurrentPlatform } from "./package-helpers.js"; | ||
const knownPackages = { | ||
"win32 x64 LE": "@bytecodealliance/wizer-win32-x64", | ||
"darwin arm64 LE": "@bytecodealliance/wizer-darwin-arm64", | ||
"darwin x64 LE": "@bytecodealliance/wizer-darwin-x64", | ||
"linux x64 LE": "@bytecodealliance/wizer-linux-x64", | ||
}; | ||
function pkgForCurrentPlatform() { | ||
let platformKey = `${platform} ${arch} ${endianness()}`; | ||
if (platformKey in knownPackages) { | ||
return knownPackages[platformKey]; | ||
} | ||
throw new Error(`Unsupported platform: "${platformKey}". "@bytecodealliance/wizer does not have a precompiled binary for the platform/architecture you are using. You can open an issue on https://github.com/bytecodealliance/wizer/issues to request for your platform/architecture to be included."`); | ||
} | ||
const pkg = pkgForCurrentPlatform(); | ||
@@ -21,0 +4,0 @@ |
{ | ||
"name": "@bytecodealliance/wizer", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "The WebAssembly Pre-Initializer", | ||
@@ -23,8 +23,8 @@ "type": "module", | ||
"optionalDependencies": { | ||
"@bytecodealliance/wizer-darwin-arm64": "3.0.0", | ||
"@bytecodealliance/wizer-darwin-x64": "3.0.0", | ||
"@bytecodealliance/wizer-linux-x64": "3.0.0", | ||
"@bytecodealliance/wizer-linux-arm64": "3.0.0", | ||
"@bytecodealliance/wizer-linux-s390x": "3.0.0", | ||
"@bytecodealliance/wizer-win32-x64": "3.0.0" | ||
"@bytecodealliance/wizer-darwin-arm64": "3.0.1", | ||
"@bytecodealliance/wizer-darwin-x64": "3.0.1", | ||
"@bytecodealliance/wizer-linux-x64": "3.0.1", | ||
"@bytecodealliance/wizer-linux-arm64": "3.0.1", | ||
"@bytecodealliance/wizer-linux-s390x": "3.0.1", | ||
"@bytecodealliance/wizer-win32-x64": "3.0.1" | ||
}, | ||
@@ -31,0 +31,0 @@ "license": "Apache-2.0", |
19
wizer.js
#!/usr/bin/env node | ||
import { endianness } from "node:os"; | ||
import { platform, arch } from "node:process"; | ||
import { execFileSync } from "node:child_process"; | ||
const knownPackages = { | ||
"win32 x64 LE": "@bytecodealliance/wizer-win32-x64", | ||
"darwin arm64 LE": "@bytecodealliance/wizer-darwin-arm64", | ||
"darwin x64 LE": "@bytecodealliance/wizer-darwin-x64", | ||
"linux arm64 LE": "@bytecodealliance/wizer-linux-arm64", | ||
"linux x64 LE": "@bytecodealliance/wizer-linux-x64", | ||
"linux s390x BE": "@bytecodealliance/wizer-linux-s390x", | ||
}; | ||
function pkgForCurrentPlatform() { | ||
let platformKey = `${platform} ${arch} ${endianness()}`; | ||
import { pkgForCurrentPlatform } from "./package-helpers.js"; | ||
if (platformKey in knownPackages) { | ||
return knownPackages[platformKey]; | ||
} | ||
throw new Error(`Unsupported platform: "${platformKey}". "@bytecodealliance/wizer does not have a precompiled binary for the platform/architecture you are using. You can open an issue on https://github.com/bytecodealliance/wizer/issues to request for your platform/architecture to be included."`); | ||
} | ||
const pkg = pkgForCurrentPlatform(); | ||
@@ -24,0 +7,0 @@ |
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
7
21812
186