Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bin-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bin-wrapper - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

31

bin-wrapper.js

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc