diff --git a/index.d.ts b/index.d.ts index 785b969..6999dc6 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; + 'identity-validation'?: 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; +} 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..571cebf 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['identity-validation'] === false) { + return Promise.resolve() + } promise = findIdentitiesAsync(opts, opts.identity) } else { debugwarn('No `identity` passed in arguments...')