electron-osx-sign
Advanced tools
Comparing version 0.4.6 to 0.4.7
@@ -38,4 +38,4 @@ | ||
--ignore=regex | ||
Regex that signals ignoring a file before signing. | ||
--ignore=path | ||
Path to skip signing. | ||
@@ -42,0 +42,0 @@ --keychain=keychain |
@@ -11,2 +11,3 @@ /** | ||
const pkg = require('./package.json') | ||
const util = require('./util') | ||
@@ -82,2 +83,3 @@ const debuglog = util.debuglog | ||
var flatAsync = module.exports.flatAsync = function (opts) { | ||
debuglog('electron-osx-sign@%s', pkg.version) | ||
return validateFlatOptsAsync(opts) | ||
@@ -84,0 +86,0 @@ .then(function () { |
{ | ||
"name": "electron-osx-sign", | ||
"version": "0.4.6", | ||
"version": "0.4.7", | ||
"description": "Codesign Electron macOS apps", | ||
@@ -21,15 +21,14 @@ "main": "index.js", | ||
"dependencies": { | ||
"bluebird": "^3.4.7", | ||
"bluebird": "^3.5.0", | ||
"compare-version": "^0.1.2", | ||
"debug": "^2.6.1", | ||
"debug": "^2.6.8", | ||
"isbinaryfile": "^3.0.2", | ||
"minimist": "^1.2.0", | ||
"plist": "^2.0.1", | ||
"tempfile": "^1.1.1" | ||
"plist": "^2.1.0" | ||
}, | ||
"devDependencies": { | ||
"electron-download": "^4.0.0", | ||
"eslint": "^3.16.1", | ||
"electron-download": "^4.1.0", | ||
"eslint": "^4.2.0", | ||
"eslint-config-eslint": "^4.0.0", | ||
"extract-zip": "^1.6.0", | ||
"extract-zip": "^1.6.5", | ||
"mkdirp": "^0.5.1", | ||
@@ -39,4 +38,4 @@ "rimraf": "^2.6.1", | ||
"run-waterfall": "^1.1.3", | ||
"standard": "^8.6.0", | ||
"tape": "^4.6.3" | ||
"standard": "^10.0.2", | ||
"tape": "^4.7.0" | ||
}, | ||
@@ -54,4 +53,4 @@ "scripts": { | ||
"engines": { | ||
"node": ">=0.4.0" | ||
"node": ">=4.0.0" | ||
} | ||
} |
@@ -176,5 +176,6 @@ # electron-osx-sign [![npm][npm_img]][npm_url] [![Build Status][travis_img]][travis_url] | ||
`ignore` - *String* | ||
`ignore` - *RegExp|Function|Array.<(RegExp|Function)>* | ||
Regex or function that signals ignoring a file before signing. | ||
Regex, function or an array of regex's and functions that signal to skip signing a file. | ||
Elements of other types are converted to `RegExp` automatically. | ||
Default to `undefined`. | ||
@@ -364,6 +365,6 @@ | ||
> electron-osx-sign@0.4.6 pretest electron-osx-sign | ||
> electron-osx-sign@0.4.7 pretest electron-osx-sign | ||
> rimraf test/work | ||
> electron-osx-sign@0.4.6 test electron-osx-sign | ||
> electron-osx-sign@0.4.7 test electron-osx-sign | ||
> standard && tape test | ||
@@ -421,5 +422,5 @@ | ||
ok 23 app signed | ||
# defaults-test:v1.6.8-darwin-x64 | ||
# defaults-test:v1.6.11-darwin-x64 | ||
ok 24 app signed | ||
# defaults-test:v1.6.8-mas-x64 | ||
# defaults-test:v1.6.11-mas-x64 | ||
ok 25 app signed | ||
@@ -426,0 +427,0 @@ # teardown |
17
sign.js
@@ -12,2 +12,3 @@ /** | ||
const pkg = require('./package.json') | ||
const util = require('./util') | ||
@@ -53,4 +54,4 @@ const debuglog = util.debuglog | ||
function validateSignOptsAsync (opts) { | ||
if (opts.ignore) { | ||
if (typeof opts.ignore !== 'function' && typeof opts.ignore !== 'string') return Promise.reject(new Error('Ignore filter should be either a function or a string.')) | ||
if (opts.ignore && !(opts.ignore instanceof Array)) { | ||
opts.ignore = [opts.ignore] | ||
} | ||
@@ -127,7 +128,8 @@ | ||
if (opts.ignore) { | ||
if (typeof opts.ignore === 'function') { | ||
return opts.ignore(filePath) | ||
} else if (typeof opts.ignore === 'string') { | ||
return filePath.match(opts.ignore) | ||
} | ||
return opts.ignore.some(function (ignore) { | ||
if (typeof ignore === 'function') { | ||
return ignore(filePath) | ||
} | ||
return filePath.match(ignore) | ||
}) | ||
} | ||
@@ -222,2 +224,3 @@ return false | ||
var signAsync = module.exports.signAsync = function (opts) { | ||
debuglog('electron-osx-sign@%s', pkg.version) | ||
return validateSignOptsAsync(opts) | ||
@@ -224,0 +227,0 @@ .then(function () { |
@@ -19,4 +19,4 @@ { | ||
"1.4.15", | ||
"1.6.8" | ||
"1.6.11" | ||
] | ||
} |
@@ -7,6 +7,6 @@ /** | ||
const os = require('os') | ||
const path = require('path') | ||
const plist = require('plist') | ||
const tempfile = require('tempfile') | ||
@@ -19,2 +19,4 @@ const util = require('./util') | ||
let tmpFileCounter = 0 | ||
/** | ||
@@ -93,3 +95,3 @@ * This function returns a promise completing the entitlements automation: The process includes checking in `Info.plist` for `ElectronTeamID` or setting parsed value from identity, and checking in entitlements file for `com.apple.security.application-groups` or inserting new into array. A temporary entitlements file may be created to replace the input for any changes introduced. | ||
// Create temporary entitlements file | ||
var entitlementsPath = tempfile('.plist') | ||
const entitlementsPath = path.join(os.tmpdir(), `tmp-entitlements-${process.pid.toString(16)}-${(tmpFileCounter++).toString(16)}.plist`) | ||
opts.entitlements = entitlementsPath | ||
@@ -96,0 +98,0 @@ return writeFileAsync(entitlementsPath, plist.build(entitlements), 'utf8') |
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
74159
6
1555
447
- Removedtempfile@^1.1.1
- Removedos-tmpdir@1.0.2(transitive)
- Removedtempfile@1.1.1(transitive)
- Removeduuid@2.0.3(transitive)
Updatedbluebird@^3.5.0
Updateddebug@^2.6.8
Updatedplist@^2.1.0