bin-wrapper
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -6,7 +6,10 @@ 'use strict'; | ||
var fs = require('fs'); | ||
var hasOwn = require('mout/object/hasOwn'); | ||
var isbin = require('isbin'); | ||
var mout = require('mout'); | ||
var isFunction = require('mout/lang/isFunction'); | ||
var mixIn = require('mout/object/mixIn'); | ||
var os = require('os'); | ||
var path = require('path'); | ||
var ProgressBar = require('progress'); | ||
var rm = require('rimraf'); | ||
var spawn = require('child_process').spawn; | ||
@@ -50,3 +53,3 @@ var which = require('which'); | ||
if (!cb && mout.lang.isFunction(cmd)) { | ||
if (!cb && isFunction(cmd)) { | ||
cb = cmd; | ||
@@ -64,3 +67,3 @@ cmd = ['--help']; | ||
this._download(this.url, this.dest, { mode: '0755', proxy: this.proxy }) | ||
.once('close', function () { | ||
.on('close', function () { | ||
return self._test(cmd, cb); | ||
@@ -81,13 +84,9 @@ }); | ||
var tmp = path.join(tmpDir, this.name); | ||
var get = this._download(this.src, tmp, { extract: true, strip: '1', proxy: this.proxy }); | ||
var get = this._download(this.src, tmp, { mode: '0777', extract: true, strip: '1', proxy: this.proxy }); | ||
if (!cb || !mout.lang.isFunction(cb)) { | ||
if (!cb || !isFunction(cb)) { | ||
cb = function () {}; | ||
} | ||
if (!isbin('make')) { | ||
throw new Error('failed to find make'); | ||
} | ||
get.once('close', function () { | ||
get.on('close', function () { | ||
exec(self.buildScript, { cwd: tmp }, function (err) { | ||
@@ -98,2 +97,4 @@ if (err) { | ||
rm.sync(tmp); | ||
return cb(); | ||
@@ -202,12 +203,12 @@ }); | ||
if (mout.object.hasOwn(opts.platform, [platform])) { | ||
opts = mout.object.mixIn(opts, opts.platform[platform]); | ||
if (hasOwn(opts.platform, [platform])) { | ||
opts = mixIn(opts, opts.platform[platform]); | ||
} | ||
if (mout.object.hasOwn(opts.arch, [arch])) { | ||
opts = mout.object.mixIn(opts, opts.arch[arch]); | ||
if (hasOwn(opts.arch, [arch])) { | ||
opts = mixIn(opts, opts.arch[arch]); | ||
} | ||
required.forEach(function (val) { | ||
if (!mout.object.hasOwn(opts, val)) { | ||
if (!hasOwn(opts, val)) { | ||
throw new Error(val + ' option is required'); | ||
@@ -214,0 +215,0 @@ } |
{ | ||
"name": "bin-wrapper", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Binary wrapper for Node.js that makes your programs seamlessly available as local dependencies", | ||
@@ -21,3 +21,3 @@ "keywords": [ | ||
"scripts": { | ||
"test": "mocha --reporter list" | ||
"test": "mocha --reporter list --timeout 0" | ||
}, | ||
@@ -33,2 +33,3 @@ "main": "bin-wrapper.js", | ||
"progress": "~1.1.0", | ||
"rimraf": "~2.2.6", | ||
"which": "~1.0.5" | ||
@@ -40,4 +41,4 @@ }, | ||
"engines": { | ||
"node": ">=0.8.0" | ||
"node": ">=0.10.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
7565
182
6
+ Addedrimraf@~2.2.6
+ Addedrimraf@2.2.8(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedrimraf@2.7.1(transitive)
- Removedwrappy@1.0.2(transitive)