mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Use @electron/remote module
This commit is contained in:
parent
b042d212fd
commit
832b51e1f3
9 changed files with 22 additions and 5 deletions
|
|
@ -9,6 +9,10 @@ if (['--help', '-v', '--version'].includes(process.argv[1])) {
|
|||
process.exit();
|
||||
}
|
||||
|
||||
// Enable remote module
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-var-requires
|
||||
require('@electron/remote/main').initialize();
|
||||
|
||||
// Native
|
||||
import {resolve} from 'path';
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
},
|
||||
"repository": "zeit/hyper",
|
||||
"dependencies": {
|
||||
"@electron/remote": "2.0.1",
|
||||
"async-retry": "1.3.3",
|
||||
"chokidar": "^3.5.2",
|
||||
"color": "4.0.1",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {app, BrowserWindow, shell, Menu, BrowserWindowConstructorOptions, Event} from 'electron';
|
||||
import {app, BrowserWindow, shell, Menu, BrowserWindowConstructorOptions, Event, WebPreferences} from 'electron';
|
||||
import {isAbsolute, normalize, sep} from 'path';
|
||||
import {URL, fileURLToPath} from 'url';
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
|
|
@ -40,7 +40,7 @@ export function newWindow(
|
|||
navigateOnDragDrop: true,
|
||||
enableRemoteModule: true,
|
||||
contextIsolation: false
|
||||
},
|
||||
} as WebPreferences,
|
||||
...options_
|
||||
};
|
||||
const window = new BrowserWindow(app.plugins.getDecoratedBrowserOptions(winOpts));
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@
|
|||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@electron/remote@2.0.1":
|
||||
version "2.0.1"
|
||||
resolved "https://registry.npmjs.org/@electron/remote/-/remote-2.0.1.tgz#810cbc595a21f0f94641eb2d7e8264063a3f84de"
|
||||
integrity sha512-bGX4/yB2bPZwXm1DsxgoABgH0Cz7oFtXJgkerB8VrStYdTyvhGAULzNLRn9rVmeAuC3VUDXaXpZIlZAZHpsLIA==
|
||||
|
||||
"@types/semver@^7.3.8":
|
||||
version "7.3.8"
|
||||
resolved "https://registry.npmjs.org/@types/semver/-/semver-7.3.8.tgz#508a27995498d7586dcecd77c25e289bfaf90c59"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {remote} from 'electron';
|
||||
import * as remote from '@electron/remote';
|
||||
import {HyperDispatch} from './hyper';
|
||||
import {closeSearch} from './actions/sessions';
|
||||
// TODO: Should be updates to new async API https://medium.com/@nornagon/electrons-remote-module-considered-harmful-70d69500f31
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import {ipcRenderer, remote} from 'electron';
|
||||
import {ipcRenderer} from 'electron';
|
||||
import * as remote from '@electron/remote';
|
||||
// TODO: Should be updates to new async API https://medium.com/@nornagon/electrons-remote-module-considered-harmful-70d69500f31
|
||||
|
||||
const plugins = remote.require('./plugins') as typeof import('../../app/plugins');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// eslint-disable-next-line eslint-comments/disable-enable-pair
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||
import {remote} from 'electron';
|
||||
import * as remote from '@electron/remote';
|
||||
// TODO: Should be updates to new async API https://medium.com/@nornagon/electrons-remote-module-considered-harmful-70d69500f31
|
||||
|
||||
import {connect as reduxConnect, Options} from 'react-redux';
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
"email": "team@zeit.co"
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron/remote": "2.0.1",
|
||||
"args": "5.0.1",
|
||||
"chalk": "4.1.2",
|
||||
"color": "4.0.1",
|
||||
|
|
|
|||
|
|
@ -569,6 +569,11 @@
|
|||
global-agent "^2.0.2"
|
||||
global-tunnel-ng "^2.7.1"
|
||||
|
||||
"@electron/remote@2.0.1":
|
||||
version "2.0.1"
|
||||
resolved "https://registry.npmjs.org/@electron/remote/-/remote-2.0.1.tgz#810cbc595a21f0f94641eb2d7e8264063a3f84de"
|
||||
integrity sha512-bGX4/yB2bPZwXm1DsxgoABgH0Cz7oFtXJgkerB8VrStYdTyvhGAULzNLRn9rVmeAuC3VUDXaXpZIlZAZHpsLIA==
|
||||
|
||||
"@electron/universal@1.0.5":
|
||||
version "1.0.5"
|
||||
resolved "https://registry.npmjs.org/@electron/universal/-/universal-1.0.5.tgz#b812340e4ef21da2b3ee77b2b4d35c9b86defe37"
|
||||
|
|
|
|||
Loading…
Reference in a new issue