mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
A set of tweaks to simplify electron packaging (#421)
* Replace `ormconfig.js` with a newer mechanism of configuring
TypeORM that can be included in the source code properly.
The path to `ormconfig.js` has always been awkward to handle,
and eliminating the file makes building different Grist setups
a bit simpler.
* Remove `electron` package. It is barely used, just for some old
remnants of an older attempt at electron packaging. It was used
for two types, which I left at `any` for now. More code pruning is
no doubt possible here, but I'd rather do it when Electron packaging
has solidified.
* Add a hook for replacing the login system, and for adding some
extra middleware the login system may need.
* Add support for some more possible locations of Python, which
arise when a standalone version of it is included in the Electron
package. This isn't very general purpose, just configurations
that I found useful.
* Support using grist-core within a yarn workspace - the only tweak
needed was webpack related.
* Allow an external ID to be optionally associated with documents.
This commit is contained in:
@@ -40,7 +40,6 @@ import { getOriginUrl } from 'app/common/urlUtils';
|
||||
import { GristAPI, RPC_GRISTAPI_INTERFACE } from 'app/plugin/GristAPI';
|
||||
import { RenderOptions, RenderTarget } from 'app/plugin/RenderOptions';
|
||||
import { checkers } from 'app/plugin/TypeCheckers';
|
||||
import { IpcMessageEvent } from 'electron';
|
||||
import { IMsgCustom, IMsgRpcCall, Rpc } from 'grain-rpc';
|
||||
import { Disposable } from './dispose';
|
||||
const G = getBrowserGlobals('document', 'window');
|
||||
@@ -316,7 +315,7 @@ class WebviewProcess extends ViewProcess {
|
||||
// TODO: find a way for keyboard events to play nice when webviews are non-modal.
|
||||
Mousetrap.setPaused(true);
|
||||
this.autoDisposeCallback(() => Mousetrap.setPaused(false));
|
||||
webview.addEventListener('ipc-message', (event: IpcMessageEvent) => {
|
||||
webview.addEventListener('ipc-message', (event: any /* IpcMessageEvent */) => {
|
||||
// The event object passed to the listener is missing proper documentation. In the examples
|
||||
// listed in https://electronjs.org/docs/api/ipc-main the arguments should be passed to the
|
||||
// listener after the event object, but this is not happening here. Only we know it is a
|
||||
|
||||
Reference in New Issue
Block a user