build: prepare electron update and update electron builder
This commit is contained in:
parent
fda655a13f
commit
8a3d01f90e
|
@ -1,4 +1,4 @@
|
|||
import { app, ipcMain } from 'electron';
|
||||
import { app, ipcMain, IpcMainEvent } from 'electron';
|
||||
import {
|
||||
existsSync,
|
||||
mkdirSync,
|
||||
|
@ -60,7 +60,7 @@ export function initBackupAdapter(backupDir: string): void {
|
|||
}
|
||||
|
||||
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
||||
function backupData(ev: Event, data: AppDataComplete): void {
|
||||
function backupData(ev: IpcMainEvent, data: AppDataComplete): void {
|
||||
if (!existsSync(BACKUP_DIR)) {
|
||||
mkdirSync(BACKUP_DIR);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { BrowserWindow, ipcMain } from 'electron';
|
||||
import { BrowserWindow, ipcMain, IpcMainEvent } from 'electron';
|
||||
import { IPC } from './shared-with-frontend/ipc-events.const';
|
||||
import { warn } from 'electron-log';
|
||||
import { GlobalConfigState } from '../src/app/features/config/global-config.model';
|
||||
|
@ -15,7 +15,7 @@ export const getSettings = (
|
|||
ipcMain.on(IPC.TRANSFER_SETTINGS_TO_ELECTRON, getSettingsCb);
|
||||
|
||||
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
||||
function getSettingsCb(ev: Event, settings: GlobalConfigState): void {
|
||||
function getSettingsCb(ev: IpcMainEvent, settings: GlobalConfigState): void {
|
||||
if (cbs.length) {
|
||||
cbs.forEach((cb) => cb(settings));
|
||||
cbs = [];
|
||||
|
|
|
@ -5,6 +5,7 @@ import {
|
|||
BrowserWindow,
|
||||
globalShortcut,
|
||||
ipcMain,
|
||||
IpcMainEvent,
|
||||
powerMonitor,
|
||||
protocol,
|
||||
} from 'electron';
|
||||
|
@ -313,6 +314,7 @@ appIN.on('window-all-closed', () => {
|
|||
// ---------------
|
||||
ipcMain.on(IPC.SHUTDOWN_NOW, quitApp);
|
||||
|
||||
// TODO check
|
||||
ipcMain.on(IPC.EXEC, execWithFrontendErrorHandlerInform);
|
||||
|
||||
ipcMain.on(IPC.LOCK_SCREEN, () => {
|
||||
|
@ -494,7 +496,7 @@ function showOrFocus(passedWin: BrowserWindow): void {
|
|||
}
|
||||
|
||||
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
||||
function execWithFrontendErrorHandlerInform(ev: Event, command: string): void {
|
||||
function execWithFrontendErrorHandlerInform(ev: IpcMainEvent, command: string): void {
|
||||
log('running command ' + command);
|
||||
exec(command, (err) => {
|
||||
if (err) {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
|
@ -106,13 +106,13 @@
|
|||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"@electron/remote": "^2.0.9",
|
||||
"@electron/remote": "^2.0.10",
|
||||
"electron-dl": "^3.3.1",
|
||||
"electron-localshortcut": "^3.2.1",
|
||||
"electron-log": "^4.4.8",
|
||||
"electron-window-state": "^5.0.3",
|
||||
"fs-extra": "^11.1.1",
|
||||
"node-fetch": "^2.6.7"
|
||||
"node-fetch": "^2.6.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^14.1.1",
|
||||
|
@ -160,8 +160,8 @@
|
|||
"@types/lz-string": "^1.3.34",
|
||||
"@types/moment-duration-format": "^2.2.2",
|
||||
"@types/nightwatch": "^1.3.3",
|
||||
"@types/node": "^16.11.27",
|
||||
"@types/node-fetch": "^2.6.1",
|
||||
"@types/node": "16.18.46",
|
||||
"@types/node-fetch": "^2.6.4",
|
||||
"@types/object-path": "^0.11.1",
|
||||
"@typescript-eslint/eslint-plugin": "5.8.1",
|
||||
"@typescript-eslint/parser": "5.27.0",
|
||||
|
@ -176,8 +176,8 @@
|
|||
"conventional-changelog-cli": "^2.2.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"detect-it": "^4.0.1",
|
||||
"electron": "^23.1.2",
|
||||
"electron-builder": "23.6.0",
|
||||
"electron": "^23.3.13",
|
||||
"electron-builder": "24.6.3",
|
||||
"electron-builder-notarize": "^1.5.1",
|
||||
"eslint": "^8.23.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
|
|
Loading…
Reference in New Issue