Comparing version 2.0.3 to 2.1.0
25
bin.js
@@ -16,2 +16,3 @@ #!/usr/bin/env node | ||
var os = require('os') | ||
var proc = require('child_process') | ||
var rc = require('./rc') | ||
@@ -45,2 +46,3 @@ | ||
if (rc.compile) return runGyp() | ||
if (rc.download) return downloadPrebuild() | ||
@@ -176,9 +178,20 @@ | ||
function runGyp (version, cb) { | ||
gyp.parseArgv(['node', 'index.js', 'rebuild', '--target=' + version, '--target_arch=' + rc.arch]) | ||
gyp.commands.rebuild(gyp.todo.shift().args, function run (err) { | ||
if (err) return cb(err) | ||
if (!gyp.todo.length) return cb() | ||
if (gyp.todo[0].name === 'configure') configurePreGyp() | ||
gyp.commands[gyp.todo[0].name](gyp.todo.shift().args, run) | ||
if (!version) version = process.version | ||
if (!cb) cb = function () {} | ||
if (!rc.preinstall) return run() | ||
proc.spawn(rc.preinstall, {stdio: 'inherit'}).on('exit', function (code) { | ||
if (code) process.exit(code) | ||
run() | ||
}) | ||
function run () { | ||
gyp.parseArgv(['node', 'index.js', 'rebuild', '--target=' + version, '--target_arch=' + rc.arch]) | ||
gyp.commands.rebuild(gyp.todo.shift().args, function run (err) { | ||
if (err) return cb(err) | ||
if (!gyp.todo.length) return cb() | ||
if (gyp.todo[0].name === 'configure') configurePreGyp() | ||
gyp.commands[gyp.todo[0].name](gyp.todo.shift().args, run) | ||
}) | ||
} | ||
} | ||
@@ -185,0 +198,0 @@ |
10
help.txt
prebuild [options] | ||
--path, -p [path] (make a prebuild here) | ||
--target, -t [version] (version to prebuild against) | ||
--upload, -u [gh-token] (upload prebuilds to github) | ||
--download, -d (download prebuilds from github) | ||
--path, -p [path] (make a prebuild here) | ||
--target, -t [version] (version to prebuild against) | ||
--upload, -u [gh-token] (upload prebuilds to github) | ||
--download, -d (download prebuilds from github) | ||
--preinstall, -i [script] (run this script before prebuilding) | ||
--compile, -c (compile your project using node-gyp) |
{ | ||
"name": "prebuild", | ||
"version": "2.0.3", | ||
"version": "2.1.0", | ||
"description": "A command line tool for easily doing prebuilds for multiple version of node/iojs on a specific platform", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -16,4 +16,7 @@ var minimist = require('minimist') | ||
upload: 'u', | ||
download: 'd' | ||
download: 'd', | ||
'build-from-source': 'compile', | ||
compile: 'c', | ||
preinstall: 'i' | ||
} | ||
})) |
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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
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
12681
262
1