| 69 | console.log('electron will open', url); |
| 70 | |
| 71 | async function installDevExtensions(isDev_: boolean) { |
| 72 | if (!isDev_) { |
| 73 | return []; |
| 74 | } |
| 75 | const installer = await import('electron-devtools-installer'); |
| 76 | |
| 77 | const extensions = ['REACT_DEVELOPER_TOOLS', 'REDUX_DEVTOOLS'] as const; |
| 78 | const forceDownload = Boolean(process.env.UPGRADE_EXTENSIONS); |
| 79 | |
| 80 | return Promise.all( |
| 81 | extensions.map((name) => |
| 82 | installer.default(installer[name], {forceDownload, loadExtensionOptions: {allowFileAccess: true}}) |
| 83 | ) |
| 84 | ); |
| 85 | } |
| 86 | |
| 87 | // eslint-disable-next-line @typescript-eslint/no-misused-promises |
| 88 | app.on('ready', () => |