From 4b70c4e455d307fba60a4e8b4e666de83cdd5acc Mon Sep 17 00:00:00 2001 From: develar Date: Fri, 24 Feb 2017 11:55:48 +0100 Subject: [PATCH 1/4] feat: skipIdentityValidation Not documented because intended to be internal option for programmatic usage --- index.d.ts | 61 ++++++++++++++++++++++++++++------------------------ package.json | 20 ++++++++--------- sign.js | 3 +++ 3 files changed, 46 insertions(+), 38 deletions(-) diff --git a/index.d.ts b/index.d.ts index 785b969..aaf8f51 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,32 +1,37 @@ -interface BaseSignOptions { - app: string; - identity?: string; - platform?: string; - keychain?: string; -} +declare module "electron-osx-sign" { + interface BaseSignOptions { + app: string; + identity?: string; + platform?: string; + keychain?: string; + } -interface SignOptions extends BaseSignOptions { - binaries?: string[]; - entitlements?: string; - 'entitlements-inherit'?: string; - 'gatekeeper-assess'?: boolean; - ignore?: string; - 'pre-auto-entitlements'?: boolean; - 'pre-embed-provisioning-profile'?: boolean; - 'provisioning-profile'?: string; - 'requirements'?: string; - 'type'?: string; - version?: string; -} + interface SignOptions extends BaseSignOptions { + binaries?: string[]; + entitlements?: string; + 'entitlements-inherit'?: string; + 'gatekeeper-assess'?: boolean; + ignore?: string; + 'pre-auto-entitlements'?: boolean; + 'pre-embed-provisioning-profile'?: boolean; + 'provisioning-profile'?: string; + 'requirements'?: string; + 'type'?: string; + version?: string; + skipIdentityValidation?: boolean; + } -export function sign(opts: SignOptions, callback: (error: Error) => void): void; -export function signAsync(opts: SignOptions): Promise; + export function sign(opts: SignOptions, callback: (error: Error) => void): void; -interface FlatOptions extends BaseSignOptions { - install?: string; - pkg?: string; - scripts?: string; -} + export function signAsync(opts: SignOptions): Promise; -export function flat(opts: FlatOptions, callback: (error: Error) => void): void; -export function flatAsync(opts: FlatOptions): Promise; + interface FlatOptions extends BaseSignOptions { + install?: string; + pkg?: string; + scripts?: string; + } + + export function flat(opts: FlatOptions, callback: (error: Error) => void): void; + + export function flatAsync(opts: FlatOptions): Promise; +} \ No newline at end of file diff --git a/package.json b/package.json index ff6945b..33f4e70 100644 --- a/package.json +++ b/package.json @@ -18,25 +18,25 @@ }, "homepage": "https://github.com/electron-userland/electron-osx-sign", "dependencies": { - "bluebird": "^3.4.6", + "bluebird": "^3.4.7", "compare-version": "^0.1.2", - "debug": "^2.3.2", - "isbinaryfile": "^3.0.1", + "debug": "^2.6.1", + "isbinaryfile": "^3.0.2", "minimist": "^1.2.0", "plist": "^2.0.1", "tempfile": "^1.1.1" }, "devDependencies": { - "electron-download": "^3.0.1", - "eslint": "^3.10.0", - "eslint-config-eslint": "^3.0.0", - "extract-zip": "^1.5.0", + "electron-download": "^4.0.0", + "eslint": "^3.16.1", + "eslint-config-eslint": "^4.0.0", + "extract-zip": "^1.6.0", "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", + "rimraf": "^2.6.1", "run-series": "^1.1.4", "run-waterfall": "^1.1.3", - "standard": "^8.5.0", - "tape": "^4.6.2" + "standard": "^8.6.0", + "tape": "^4.6.3" }, "scripts": { "code-standard": "standard", diff --git a/sign.js b/sign.js index 9a5c5fa..3cb0a26 100644 --- a/sign.js +++ b/sign.js @@ -219,6 +219,9 @@ var signAsync = module.exports.signAsync = function (opts) { var promise if (opts.identity) { debuglog('`identity` passed in arguments.') + if (opts.skipIdentityValidation) { + return Promise.resolve() + } promise = findIdentitiesAsync(opts, opts.identity) } else { debugwarn('No `identity` passed in arguments...') From 08324d760016fea4139e6cbace90b6aa4027dcef Mon Sep 17 00:00:00 2001 From: develar Date: Sat, 25 Feb 2017 21:30:25 +0100 Subject: [PATCH 2/4] rename to identity-validation --- index.d.ts | 2 +- sign.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index aaf8f51..36f3813 100644 --- a/index.d.ts +++ b/index.d.ts @@ -18,7 +18,7 @@ declare module "electron-osx-sign" { 'requirements'?: string; 'type'?: string; version?: string; - skipIdentityValidation?: boolean; + "identity-validation?: boolean; } export function sign(opts: SignOptions, callback: (error: Error) => void): void; diff --git a/sign.js b/sign.js index 3cb0a26..d4082c5 100644 --- a/sign.js +++ b/sign.js @@ -219,7 +219,7 @@ var signAsync = module.exports.signAsync = function (opts) { var promise if (opts.identity) { debuglog('`identity` passed in arguments.') - if (opts.skipIdentityValidation) { + if (opts["identity-validation"] === false) { return Promise.resolve() } promise = findIdentitiesAsync(opts, opts.identity) From 5da9a21e9e213e139aedc37d4261c8eafefa75b7 Mon Sep 17 00:00:00 2001 From: Zhuo Lu Date: Sat, 25 Feb 2017 12:53:48 -0800 Subject: [PATCH 3/4] Fix double quoted strings --- sign.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sign.js b/sign.js index d4082c5..571cebf 100644 --- a/sign.js +++ b/sign.js @@ -219,7 +219,7 @@ var signAsync = module.exports.signAsync = function (opts) { var promise if (opts.identity) { debuglog('`identity` passed in arguments.') - if (opts["identity-validation"] === false) { + if (opts['identity-validation'] === false) { return Promise.resolve() } promise = findIdentitiesAsync(opts, opts.identity) From e0e8ee8388ebaa0e48ed4bc962877f0d3ed361f2 Mon Sep 17 00:00:00 2001 From: Zhuo Lu Date: Sat, 25 Feb 2017 12:54:38 -0800 Subject: [PATCH 4/4] Fix `identity-validation` --- index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 36f3813..6999dc6 100644 --- a/index.d.ts +++ b/index.d.ts @@ -18,7 +18,7 @@ declare module "electron-osx-sign" { 'requirements'?: string; 'type'?: string; version?: string; - "identity-validation?: boolean; + 'identity-validation'?: boolean; } export function sign(opts: SignOptions, callback: (error: Error) => void): void; @@ -34,4 +34,4 @@ declare module "electron-osx-sign" { export function flat(opts: FlatOptions, callback: (error: Error) => void): void; export function flatAsync(opts: FlatOptions): Promise; -} \ No newline at end of file +}