Add notarization logic and update dependencies
- Introduce `notarize.cjs` script for macOS app notarization using `@electron/notarize`. - Add `dotenv` dependency for environment variable management. - Update `@electron/notarize` and `dotenv` to latest versions in `package.json`. - Extend `electron-builder` configuration to include notarization steps (`buildDependenciesFromSource`, `nodeGypRebuild`, `npmRebuild`). - Enhance `useEffect` hooks in `page.tsx` for improved session and book synchronization logic. - Add debug logging for book synchronization states.
This commit is contained in:
19
scripts/notarize.cjs
Normal file
19
scripts/notarize.cjs
Normal file
@@ -0,0 +1,19 @@
|
||||
require('dotenv').config();
|
||||
const { notarize } = require('@electron/notarize');
|
||||
|
||||
exports.default = async function notarizing(context) {
|
||||
const { electronPlatformName, appOutDir } = context;
|
||||
if (electronPlatformName !== 'darwin') {
|
||||
return;
|
||||
}
|
||||
|
||||
const appName = context.packager.appInfo.productFilename;
|
||||
|
||||
return await notarize({
|
||||
tool: 'notarytool',
|
||||
appPath: `${appOutDir}/${appName}.app`,
|
||||
appleId: process.env.APPLE_ID,
|
||||
appleIdPassword: process.env.APPLE_APP_SPECIFIC_PASSWORD,
|
||||
teamId: process.env.APPLE_TEAM_ID
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user