From 411f3efe54047f425feae8b69c493f3b3ee99cb2 Mon Sep 17 00:00:00 2001 From: Josh Abernathy Date: Thu, 10 Aug 2017 07:31:57 -0400 Subject: [PATCH 1/2] Replace `protocol` and `protocolName` with `protocols` The CLI accepts the former, while the programatic interface accepts the latter. https://github.com/electron-userland/electron-packager/blob/93523ba8dbe8626906a6ef51db3ee02d54e19ad0/common.js#L44-L51 --- types/electron-packager/index.d.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/types/electron-packager/index.d.ts b/types/electron-packager/index.d.ts index 7a4504c386..fce952641e 100644 --- a/types/electron-packager/index.d.ts +++ b/types/electron-packager/index.d.ts @@ -185,15 +185,12 @@ declare namespace electronPackager { * If present, signs OS X target apps when the host platform is OS X and XCode is installed. */ osxSign?: boolean | ElectronOsXSignOptions; - /** - * The URL protocol scheme(s) to associate the app with - */ - protocol?: string[]; - /** - * The descriptive name(s) of the URL protocol scheme(s) specified via the protocol option. - * Maps to the CFBundleURLName metadata property. - */ - protocolName?: string[]; + + /** The URL protocol schemes the app supports. */ + protocols: Array<{ + name: string + schemes: string[] + }>; /** * Windows targets only From 08996b5553e1e8c85799273f07759045e95ccac0 Mon Sep 17 00:00:00 2001 From: Josh Abernathy Date: Thu, 10 Aug 2017 07:39:05 -0400 Subject: [PATCH 2/2] Make it optional --- types/electron-packager/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/electron-packager/index.d.ts b/types/electron-packager/index.d.ts index fce952641e..df5a10eb92 100644 --- a/types/electron-packager/index.d.ts +++ b/types/electron-packager/index.d.ts @@ -187,7 +187,7 @@ declare namespace electronPackager { osxSign?: boolean | ElectronOsXSignOptions; /** The URL protocol schemes the app supports. */ - protocols: Array<{ + protocols?: Array<{ name: string schemes: string[] }>;