update: run npm update and upgrade electron from 5 to 6
This commit is contained in:
parent
28c755435d
commit
f4c17b9d36
File diff suppressed because it is too large
Load Diff
32
package.json
32
package.json
|
@ -26,38 +26,38 @@
|
|||
"dependencies": {
|
||||
"jsdom": "^15.1.1",
|
||||
"node-fetch": "^2.6.0",
|
||||
"sqlite3": "^4.0.9",
|
||||
"typeorm": "^0.2.18",
|
||||
"uuid": "^3.3.2"
|
||||
"sqlite3": "^4.1.0",
|
||||
"typeorm": "^0.2.19",
|
||||
"uuid": "^3.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-forge/cli": "^6.0.0-beta.43",
|
||||
"@electron-forge/maker-squirrel": "^6.0.0-beta.43",
|
||||
"@electron-forge/cli": "^6.0.0-beta.45",
|
||||
"@electron-forge/maker-squirrel": "^6.0.0-beta.45",
|
||||
"@types/jsdom": "latest",
|
||||
"@types/minimist": "latest",
|
||||
"@types/node-fetch": "latest",
|
||||
"@types/webpack": "latest",
|
||||
"electron": "^5.0.8",
|
||||
"electron-rebuild": "^1.8.5",
|
||||
"eslint": "^6.1.0",
|
||||
"eslint-config-prettier": "latest",
|
||||
"eslint-plugin-prettier": "latest",
|
||||
"electron": "^6.0.11",
|
||||
"electron-rebuild": "^1.8.6",
|
||||
"eslint": "^6.5.1",
|
||||
"eslint-config-prettier": "^6.3.0",
|
||||
"eslint-plugin-prettier": "^3.1.1",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-cli": "^2.2.0",
|
||||
"gulp-sourcemaps": "^2.6.5",
|
||||
"gulp-typescript": "^5.0.1",
|
||||
"minimist": "^1.2.0",
|
||||
"prettier": "latest",
|
||||
"svelte": "^3.6.10",
|
||||
"svelte": "^3.12.1",
|
||||
"svelte-loader": "^2.13.6",
|
||||
"ts-loader": "^6.0.4",
|
||||
"tslint": "latest",
|
||||
"ts-loader": "^6.2.0",
|
||||
"tslint": "^5.20.0",
|
||||
"tslint-config-prettier": "latest",
|
||||
"tslint-plugin-prettier": "latest",
|
||||
"typescript": "^3.5.3",
|
||||
"typescript": "^3.6.3",
|
||||
"typescript-tslint-plugin": "latest",
|
||||
"webpack": "^4.38.0",
|
||||
"webpack-cli": "^3.3.5",
|
||||
"webpack": "^4.41.0",
|
||||
"webpack-cli": "^3.3.9",
|
||||
"webpack-stream": "^5.2.1"
|
||||
},
|
||||
"config": {
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
import WebContents = Electron.WebContents;
|
||||
|
||||
declare interface IIpcEvent {
|
||||
frameId: number;
|
||||
preventDefault: () => void;
|
||||
reply: (channel: string, ...args: any) => void;
|
||||
sender: WebContents;
|
||||
}
|
|
@ -1,9 +1,10 @@
|
|||
import { ipcMain } from 'electron';
|
||||
import { isLoggedIn, login } from '../services/nhentai-crawler';
|
||||
import IpcMainEvent = Electron.IpcMainEvent;
|
||||
|
||||
const ipcServer: IIpcServer = {
|
||||
answer: (channel: IpcChannels, handler: (data?: any) => Promise<any>): void => {
|
||||
ipcMain.on(channel, (event: IIpcEvent, payload: IIpcPayload) => {
|
||||
ipcMain.on(channel, (event: IpcMainEvent, payload: IIpcPayload) => {
|
||||
handler(payload.data)
|
||||
.then((result: any) => {
|
||||
const response: IIpcResponse = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ipcRenderer } from 'electron';
|
||||
import IpcMessageEvent = Electron.IpcMessageEvent;
|
||||
import { uuid } from '../../services/uuid';
|
||||
import IpcRendererEvent = Electron.IpcRendererEvent;
|
||||
|
||||
const ipcClient: IIpcClient = {
|
||||
ask: (channel: IpcChannels, data?: any): Promise<any> => {
|
||||
|
@ -11,7 +11,7 @@ const ipcClient: IIpcClient = {
|
|||
};
|
||||
|
||||
return new Promise((resolve: (value?: any) => void, reject: (reason?: any) => void): void => {
|
||||
const listener = (event: IpcMessageEvent, response: IIpcResponse): void => {
|
||||
const listener = (event: IpcRendererEvent, response: IIpcResponse): void => {
|
||||
if (response.id === id) {
|
||||
if (response.success) {
|
||||
resolve(response.data);
|
||||
|
|
Loading…
Reference in New Issue