electron-installer-codesign
Advanced tools
Comparing version 0.4.0 to 0.5.0
35
index.js
@@ -6,3 +6,2 @@ /* eslint no-console:0 */ | ||
var run = require('electron-installer-run'); | ||
var glob = require('glob'); | ||
var async = require('async'); | ||
@@ -38,36 +37,14 @@ var chalk = require('chalk'); | ||
hardenedRuntime: true, | ||
identity: opts.identity | ||
}, (err) => { | ||
identity: opts.identity, | ||
'gatekeeper-assess': false | ||
}, function(err) { | ||
if (err) { | ||
fn(new Error('codesign failed ' + path.basename(src) | ||
+ '. See output above for more details.')); | ||
+ ': ' + err.message)); | ||
return; | ||
} | ||
fn(null, src); | ||
}) | ||
} | ||
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 codesign(pattern, opts, fn) { | ||
async.waterfall([ | ||
function(files, cb) { | ||
_signAll(files, opts, cb); | ||
} | ||
], fn); | ||
} | ||
/** | ||
@@ -101,3 +78,3 @@ * @param {String} commonName | ||
cleanup.bind(null, opts), | ||
codesign.bind(null, opts.appPath, opts) | ||
runCodesign.bind(null, opts.appPath, opts) | ||
], done); | ||
@@ -107,3 +84,3 @@ }; | ||
module.exports.isIdentityAvailable = isIdentityAvailable; | ||
module.exports.codesign = codesign; | ||
module.exports.codesign = runCodesign; | ||
@@ -110,0 +87,0 @@ module.exports.printWarning = function() { |
{ | ||
"name": "electron-installer-codesign", | ||
"description": "Sign your electron apps on OSX.", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"author": "Lucas Hrabovsky <lucas@mongodb.com> (http://imlucas.com)", | ||
@@ -31,3 +31,2 @@ "homepage": "http://github.com/mongodb-js/electron-installer-codesign", | ||
"figures": "^2.0.0", | ||
"glob": "^7.1.1", | ||
"minimist": "^1.2.0" | ||
@@ -34,0 +33,0 @@ }, |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
8
17997
122
1
- Removedglob@^7.1.1