diff --git a/.gitignore b/.gitignore index 491ca9d83..4b647d935 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ node_modules/ .vscode/ .idea/ third_party/shellcheck/download/ +macos-signing-certificate.p12 \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d2f6ed712..4b0bfd09d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6671,12 +6671,52 @@ } }, "node_modules/electron-notarize": { - "version": "0.2.1", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/electron-notarize/-/electron-notarize-1.2.1.tgz", + "integrity": "sha512-u/ECWhIrhkSQpZM4cJzVZ5TsmkaqrRo5LDC/KMbGF0sPkm53Ng59+M0zp8QVaql0obfJy9vlVT+4iOkAi2UDlA==", "dev": true, - "license": "MIT", "dependencies": { "debug": "^4.1.1", - "fs-extra": "^8.1.0" + "fs-extra": "^9.0.1" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/electron-notarize/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/electron-notarize/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/electron-notarize/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" } }, "node_modules/electron-osx-sign": { @@ -20202,7 +20242,7 @@ "electron": "18.1.0", "electron-builder": "~23.0.3", "electron-icon-maker": "^0.0.4", - "electron-notarize": "^0.2.1", + "electron-notarize": "^1.2.1", "electron-to-chromium": "^1.4.122", "gulp": "^4.0.0", "gulp-posthtml": "^3.0.4", @@ -25399,11 +25439,43 @@ } }, "electron-notarize": { - "version": "0.2.1", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/electron-notarize/-/electron-notarize-1.2.1.tgz", + "integrity": "sha512-u/ECWhIrhkSQpZM4cJzVZ5TsmkaqrRo5LDC/KMbGF0sPkm53Ng59+M0zp8QVaql0obfJy9vlVT+4iOkAi2UDlA==", "dev": true, "requires": { "debug": "^4.1.1", - "fs-extra": "^8.1.0" + "fs-extra": "^9.0.1" + }, + "dependencies": { + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + } } }, "electron-osx-sign": { @@ -30138,7 +30210,7 @@ "electron": "18.1.0", "electron-builder": "~23.0.3", "electron-icon-maker": "^0.0.4", - "electron-notarize": "^0.2.1", + "electron-notarize": "1.2.1", "electron-to-chromium": "^1.4.122", "electron-updater": "^4.1.2", "express": "^4.17.1", diff --git a/src/server_manager/electron_app/release/notarize.js b/src/server_manager/electron_app/release/notarize.js index 746267b40..85d19f4fb 100644 --- a/src/server_manager/electron_app/release/notarize.js +++ b/src/server_manager/electron_app/release/notarize.js @@ -29,9 +29,14 @@ exports.default = async function (context) { const appName = context.packager.appInfo.productFilename; console.log(`Notarizing ${appName}. This may take a few minutes.`); await notarize({ - appBundleId: 'com.electron.outline-manager', + tool: 'notarytool', appPath: `${appOutDir}/${appName}.app`, appleId: process.env.APPLE_ID, + + // You'll have to generate a one-time password as the + // notary tool does not support 2FA: + // https://support.apple.com/en-us/HT204397 appleIdPassword: process.env.APPLE_PASSWORD, + teamId: process.env.APPLE_TEAM_ID, }); }; diff --git a/src/server_manager/package.json b/src/server_manager/package.json index e2b3f4e7f..10f562278 100644 --- a/src/server_manager/package.json +++ b/src/server_manager/package.json @@ -81,7 +81,7 @@ "electron": "18.1.0", "electron-builder": "~23.0.3", "electron-icon-maker": "^0.0.4", - "electron-notarize": "^0.2.1", + "electron-notarize": "^1.2.1", "electron-to-chromium": "^1.4.122", "gulp": "^4.0.0", "gulp-posthtml": "^3.0.4",