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

electron-installer-codesign

Package Overview
Dependencies
Maintainers
16
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-installer-codesign - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

67

index.js

@@ -52,3 +52,41 @@ /* eslint no-console:0 */

function codesign(pattern, opts, fn) {
function _signAll(files, opts, fn) {
async.parallel(files.map(function(src) {
return function(cb) {
debug('signing %s...', path.basename(src));
runCodesign(src, opts, cb);
};
}), function(_err, _files) {
if (_err) {
return fn(_err);
}
debug('%d files signed successfully!', _files.length);
fn(null, _files);
});
}
function _filterFiles(files, fn) {
async.parallel(files.map(function(file) {
return function(cb) {
fs.lstat(file, function(err, stat) {
if (err) {
return cb(err);
}
if (!stat.isFile() || stat.isSymbolicLink()) {
return cb(null, null);
}
cb(null, file);
});
};
}), function(_err, _files) {
if (_err) {
return fn(_err);
}
fn(null, _files.filter(function(f) {
return f !== null;
}));
});
}
function _collectFiles(pattern, opts, fn) {
glob.glob(pattern, function(err, files) {

@@ -63,17 +101,20 @@ if (err) {

}
async.parallel(files.map(function(src) {
return function(cb) {
debug('signing %s...', path.basename(src));
runCodesign(src, opts, cb);
};
}), function(_err, _files) {
if (_err) {
return fn(_err);
}
debug('%d files signed successfully!', _files.length);
fn(null, _files);
});
fn(null, files);
});
}
function codesign(pattern, opts, fn) {
async.waterfall([
function(cb) {
_collectFiles(pattern, opts, cb);
},
function(files, cb) {
_filterFiles(files, cb);
},
function(files, cb) {
_signAll(files, opts, cb);
}
], fn);
}
function verify(src, fn) {

@@ -80,0 +121,0 @@ debug('verifying signature on `%s`...', src);

3

package.json
{
"name": "electron-installer-codesign",
"description": "Sign your electron apps on OSX.",
"version": "0.1.1",
"version": "0.2.0",
"author": "Lucas Hrabovsky <lucas@mongodb.com> (http://imlucas.com)",

@@ -38,2 +38,3 @@ "homepage": "http://github.com/mongodb-js/electron-installer-codesign",

"mongodb-js-fmt": "0.0.3",
"mongodb-js-precommit": "^0.2.8",
"pre-commit": "^1.1.2"

@@ -40,0 +41,0 @@ },

@@ -45,3 +45,3 @@ # electron-installer-codesign [![travis][travis_img]][travis_url] [![npm][npm_img]][npm_url]

```
#### createDMG(opts, callback)
#### codesign(opts, callback)

@@ -48,0 +48,0 @@ ##### opts

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