11import debug from 'debug' ;
22import retry from 'promise-retry' ;
33
4- import { checkSignatures } from './check-signature' ;
5- import { isNotaryToolAvailable , notarizeAndWaitForNotaryTool } from './notarytool' ;
6- import { stapleApp } from './staple' ;
7- import {
8- NotarizeOptions ,
9- NotaryToolStartOptions ,
10- NotarizeOptionsLegacy ,
11- NotarizeOptionsNotaryTool ,
12- } from './types' ;
4+ import { checkSignatures } from './check-signature.js' ;
5+ import { isNotaryToolAvailable , notarizeAndWaitForNotaryTool } from './notarytool.js' ;
6+ import { stapleApp } from './staple.js' ;
7+ import { NotarizeOptions } from './types.js' ;
138
149const d = debug ( 'electron-notarize' ) ;
1510
1611export { NotarizeOptions } ;
1712
18- export { validateNotaryToolAuthorizationArgs as validateAuthorizationArgs } from './validate-args' ;
13+ export { validateNotaryToolAuthorizationArgs as validateAuthorizationArgs } from './validate-args.js ' ;
1914
2015/**
2116 * Sends your app to Apple for notarization with `notarytool` and staples a successful
@@ -28,19 +23,9 @@ export { validateNotaryToolAuthorizationArgs as validateAuthorizationArgs } from
2823 * @param args Options for notarization
2924 * @returns The Promise resolves once notarization is complete. Note that this may take a few minutes.
3025 */
31- async function notarize ( args : NotarizeOptionsNotaryTool ) : Promise < void > ;
32- /**
33- * @deprecated
34- */
35- async function notarize ( args : NotarizeOptionsLegacy ) : Promise < void > ;
26+ async function notarize ( args : NotarizeOptions ) : Promise < void > ;
3627
3728async function notarize ( { appPath, ...otherOptions } : NotarizeOptions ) {
38- if ( otherOptions . tool === 'legacy' ) {
39- throw new Error (
40- 'Notarization with the legacy altool system was decommisioned as of November 2023' ,
41- ) ;
42- }
43-
4429 await checkSignatures ( { appPath } ) ;
4530
4631 d ( 'notarizing using notarytool' ) ;
@@ -53,7 +38,7 @@ async function notarize({ appPath, ...otherOptions }: NotarizeOptions) {
5338 await notarizeAndWaitForNotaryTool ( {
5439 appPath,
5540 ...otherOptions ,
56- } as NotaryToolStartOptions ) ;
41+ } as NotarizeOptions ) ;
5742
5843 await retry ( ( ) => stapleApp ( { appPath } ) , {
5944 retries : 3 ,
0 commit comments