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:
natreex
2025-12-24 10:40:58 -05:00
parent 0366a2d444
commit 6d661806d4
4 changed files with 107 additions and 52 deletions

19
scripts/notarize.cjs Normal file
View 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
});
};