bare-runtime
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -1,33 +0,9 @@ | ||
const path = require('path') | ||
const runtime = require('..') | ||
module.exports = function spawn (referrer, opts = {}) { | ||
const { | ||
platform = process.platform, | ||
arch = process.arch | ||
} = opts | ||
const filename = path.basename(referrer) | ||
const base = `bare-runtime-${platform}-${arch}` | ||
let mod | ||
module.exports = function spawn (referrer, opts) { | ||
try { | ||
mod = require.resolve(`${base}/package.json`) | ||
require('child_process').execFileSync(runtime(referrer, opts), process.argv.slice(2), { stdio: 'inherit' }) | ||
} catch (err) { | ||
if (err.code === 'MODULE_NOT_FOUND') { | ||
throw new Error(`No binary found for target ${platform}-${arch}`) | ||
} else { | ||
throw err | ||
} | ||
} | ||
const pkg = require(mod) | ||
const bin = path.join(mod, '..', pkg.bin[filename]) | ||
try { | ||
require('child_process').execFileSync(bin, process.argv.slice(2), { stdio: 'inherit' }) | ||
} catch (err) { | ||
process.exitCode = err.status || 1 | ||
} | ||
} |
{ | ||
"name": "bare-runtime", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Prebuilt Bare binaries for macOS, Linux, Android, and Windows", | ||
"exports": { | ||
".": "./index.js", | ||
"./spawn": "./lib/spawn.js" | ||
}, | ||
"bin": { | ||
@@ -11,3 +15,4 @@ "bare": "bin/bare" | ||
"bin", | ||
"lib" | ||
"lib", | ||
"index.js" | ||
], | ||
@@ -28,12 +33,12 @@ "scripts": { | ||
"optionalDependencies": { | ||
"bare-runtime-android-arm": "1.0.6", | ||
"bare-runtime-android-arm64": "1.0.6", | ||
"bare-runtime-android-ia32": "1.0.6", | ||
"bare-runtime-android-x64": "1.0.6", | ||
"bare-runtime-darwin-arm64": "1.0.6", | ||
"bare-runtime-darwin-x64": "1.0.6", | ||
"bare-runtime-linux-arm64": "1.0.6", | ||
"bare-runtime-linux-x64": "1.0.6", | ||
"bare-runtime-win32-arm64": "1.0.6", | ||
"bare-runtime-win32-x64": "1.0.6" | ||
"bare-runtime-android-arm": "1.0.7", | ||
"bare-runtime-android-arm64": "1.0.7", | ||
"bare-runtime-android-ia32": "1.0.7", | ||
"bare-runtime-android-x64": "1.0.7", | ||
"bare-runtime-darwin-arm64": "1.0.7", | ||
"bare-runtime-darwin-x64": "1.0.7", | ||
"bare-runtime-linux-arm64": "1.0.7", | ||
"bare-runtime-linux-x64": "1.0.7", | ||
"bare-runtime-win32-arm64": "1.0.7", | ||
"bare-runtime-win32-x64": "1.0.7" | ||
}, | ||
@@ -40,0 +45,0 @@ "devDependencies": { |
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
14189
7
35