Back out "Back out Electron 7.1.1/7.1.2 upgrades"

Summary:
Original commit changeset: 05d13aca7145

Attempt to upgrade `electron` as it instacrashed; `electron-builder` version 22.1.0 didn't sign package correctly and caused the instacrash,

Reduced the version to 21.2.0 (latest).

Reviewed By: passy, nikoant

Differential Revision: D18954671

fbshipit-source-id: bc2dbd4fec9afb51d9a535974651b13d195407b4
This commit is contained in:
Chaiwat Ekkaewnumchai
2020-01-06 09:42:46 -08:00
committed by Facebook Github Bot
parent 2fac06e018
commit bacb1958fc
11 changed files with 351 additions and 564 deletions

View File

@@ -9,7 +9,7 @@
import Client, {ClientQuery} from '../../Client';
import {FlipperClientConnection} from '../../Client';
import {ipcRenderer, remote} from 'electron';
import {ipcRenderer, remote, IpcRendererEvent} from 'electron';
import JSDevice from '../../devices/JSDevice';
import {Store} from 'src/reducers';
import {Logger} from 'src/fb-interfaces/Logger';
@@ -41,7 +41,7 @@ export function initJsEmulatorIPC(
) {
ipcRenderer.on(
'from-js-emulator-init-client',
(_event: string, message: any) => {
(_event: IpcRendererEvent, message: any) => {
const {windowId} = message;
const {plugins, appName} = message.payload;
store.dispatch({
@@ -102,21 +102,24 @@ export function initJsEmulatorIPC(
flipperServer.emit('clients-change');
client.emit('plugins-change');
ipcRenderer.on('from-js-emulator', (_event: string, message: any) => {
const {command, payload} = message;
if (command === 'sendFlipperObject') {
client.onMessage(
JSON.stringify({
params: {
api: payload.api,
method: payload.method,
params: JSON.parse(payload.params),
},
method: 'execute',
}),
);
}
});
ipcRenderer.on(
'from-js-emulator',
(_event: IpcRendererEvent, message: any) => {
const {command, payload} = message;
if (command === 'sendFlipperObject') {
client.onMessage(
JSON.stringify({
params: {
api: payload.api,
method: payload.method,
params: JSON.parse(payload.params),
},
method: 'execute',
}),
);
}
},
);
});
},
);