chore: upgrade electron => 3.1.10 (#958)
This commit is contained in:
committed by
László Monda
parent
82c9126d82
commit
c64515885b
@@ -45,6 +45,7 @@ addons:
|
||||
|
||||
install:
|
||||
- nvm install
|
||||
- npm install -g npm@6.4.0
|
||||
- npm install
|
||||
|
||||
before_script:
|
||||
|
||||
@@ -7,7 +7,7 @@ environment:
|
||||
secure: 3IebpEKmC39codi1wT6dXx8mql4/mCL1JzZ7lir7GQ5MWRnCxlED2OXbiKHHigDV
|
||||
CSC_LINK: c:\projects\uhk-agent\scripts\certs\windows-cert.p12
|
||||
matrix:
|
||||
- nodejs_version: "8"
|
||||
- nodejs_version: "10.2.1"
|
||||
|
||||
cache:
|
||||
- node_modules -> package.json
|
||||
@@ -24,6 +24,7 @@ install:
|
||||
- choco install chromium
|
||||
- set CI=true
|
||||
- set PATH=%APPDATA%\npm;%PATH%
|
||||
- npm install -g npm@6.4.0
|
||||
- node -v
|
||||
- npm -v
|
||||
- appveyor-retry npm install
|
||||
|
||||
569
package-lock.json
generated
569
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@
|
||||
},
|
||||
"license": "GPL-3.0",
|
||||
"engines": {
|
||||
"node": ">=8.12.0 <9.0.0",
|
||||
"node": ">=10.2.1 <11.0.0",
|
||||
"npm": ">=6.4.0 <7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -41,12 +41,12 @@
|
||||
"decompress": "4.2.0",
|
||||
"decompress-tarbz2": "4.1.1",
|
||||
"devtron": "1.4.0",
|
||||
"electron": "2.0.16",
|
||||
"electron": "3.1.10",
|
||||
"electron-builder": "20.34.0",
|
||||
"electron-debug": "1.5.0",
|
||||
"electron-devtools-installer": "2.2.3",
|
||||
"electron-log": "2.2.16",
|
||||
"electron-rebuild": "1.8.2",
|
||||
"electron-rebuild": "1.8.5",
|
||||
"electron-settings": "3.1.4",
|
||||
"electron-updater": "2.21.4",
|
||||
"exports-loader": "0.6.3",
|
||||
@@ -100,6 +100,5 @@
|
||||
"clean": "lerna exec rimraf ./node_modules ./dist && rimraf ./node_modules ./dist ./tmp",
|
||||
"predeploy-gh-pages": "lerna run build:web --scope=uhk-web",
|
||||
"deploy-gh-pages": "gh-pages -d packages/uhk-web/dist"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,19 +60,7 @@ if (console.debug) {
|
||||
};
|
||||
}
|
||||
|
||||
const isSecondInstance = app.makeSingleInstance(function (commandLine, workingDirectory) {
|
||||
// Someone tried to run a second instance, we should focus our window.
|
||||
if (win) {
|
||||
if (win.isMinimized()) {
|
||||
win.restore();
|
||||
}
|
||||
win.focus();
|
||||
}
|
||||
});
|
||||
|
||||
if (isSecondInstance) {
|
||||
app.quit();
|
||||
}
|
||||
const isSecondInstance = !app.requestSingleInstanceLock();
|
||||
|
||||
function createWindow() {
|
||||
if (isSecondInstance) {
|
||||
@@ -157,29 +145,43 @@ function createWindow() {
|
||||
win.on('move', () => saveWindowState(win));
|
||||
}
|
||||
|
||||
if (isSecondInstance) {
|
||||
app.quit();
|
||||
} else {
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.on('ready', createWindow);
|
||||
app.on('ready', createWindow);
|
||||
|
||||
// Quit when all windows are closed.
|
||||
app.on('window-all-closed', () => {
|
||||
if (appUpdateService) {
|
||||
appUpdateService.saveFirtsRun();
|
||||
}
|
||||
app.exit();
|
||||
});
|
||||
app.on('window-all-closed', () => {
|
||||
if (appUpdateService) {
|
||||
appUpdateService.saveFirtsRun();
|
||||
}
|
||||
app.exit();
|
||||
});
|
||||
|
||||
app.on('will-quit', () => {
|
||||
});
|
||||
app.on('will-quit', () => {
|
||||
});
|
||||
|
||||
app.on('activate', () => {
|
||||
// On macOS it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (win === null) {
|
||||
createWindow();
|
||||
}
|
||||
});
|
||||
app.on('activate', () => {
|
||||
// On macOS it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (win === null) {
|
||||
createWindow();
|
||||
}
|
||||
});
|
||||
|
||||
app.on('second-instance', () => {
|
||||
// Someone tried to run a second instance, we should focus our window.
|
||||
if (win) {
|
||||
if (win.isMinimized()) {
|
||||
win.restore();
|
||||
}
|
||||
win.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
// In this file you can include the rest of your app's specific main process
|
||||
// code. You can also put them in separate files and require them here
|
||||
|
||||
@@ -14,9 +14,7 @@ import {
|
||||
UpdateFirmwareData
|
||||
} from 'uhk-common';
|
||||
import { snooze, UhkHidDevice, UhkOperations } from 'uhk-usb';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { interval } from 'rxjs/observable/interval';
|
||||
import { fromPromise } from 'rxjs/observable/fromPromise';
|
||||
import { Subscription, interval, from } from 'rxjs';
|
||||
import { distinctUntilChanged, startWith, switchMap, tap } from 'rxjs/operators';
|
||||
import { emptyDir } from 'fs-extra';
|
||||
import * as path from 'path';
|
||||
@@ -252,7 +250,7 @@ export class DeviceService {
|
||||
this.pollTimer$ = interval(1000)
|
||||
.pipe(
|
||||
startWith(0),
|
||||
switchMap(() => fromPromise(this.device.getDeviceConnectionStateAsync())),
|
||||
switchMap(() => from(this.device.getDeviceConnectionStateAsync())),
|
||||
distinctUntilChanged<DeviceConnectionState>(isEqual),
|
||||
tap((state: DeviceConnectionState) => {
|
||||
this.win.webContents.send(IpcEvents.device.deviceConnectionStateChanged, state);
|
||||
|
||||
Reference in New Issue
Block a user