Add winston formatting support for error causes (#6576)

* Add winston formatting support for error causes

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix failing to run built version

- Finally make logger fully injectable
- Simplify startMainApplication to only have runMany(Sync) invocations
  to fix time of use bugs related to logger

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Remove legacy type enforced ipc to fix tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix type error

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-11-17 14:56:16 +02:00
1 parent a4d0451dec
commit 8dd1d1a8fa
28 files changed
+544 -506

No files matched your search

+4 -14
View File
@@ -5,10 +5,9 @@
import type { IpcRendererEvent } from "electron";
import { ipcRenderer } from "electron";
import { onCorrect } from "../../common/ipc";
import { Notifications } from "../components/notifications";
import { defaultHotbarCells } from "../../common/hotbars/types";
import { type ListNamespaceForbiddenArgs, clusterListNamespaceForbiddenChannel, isListNamespaceForbiddenArgs } from "../../common/ipc/cluster";
import { type ListNamespaceForbiddenArgs, clusterListNamespaceForbiddenChannel } from "../../common/ipc/cluster";
import { hotbarTooManyItemsChannel } from "../../common/ipc/hotbar";
function HotbarTooManyItemsHandler(): void {
@@ -23,15 +22,6 @@ interface Dependencies {
}
export const registerIpcListeners = ({ listNamespacesForbiddenHandler }: Dependencies) => () => {
onCorrect({
source: ipcRenderer,
channel: clusterListNamespaceForbiddenChannel,
listener: listNamespacesForbiddenHandler,
verifier: isListNamespaceForbiddenArgs,
});
onCorrect({
source: ipcRenderer,
channel: hotbarTooManyItemsChannel,
listener: HotbarTooManyItemsHandler,
verifier: (args: unknown[]): args is [] => args.length === 0,
});};
ipcRenderer.on(clusterListNamespaceForbiddenChannel, listNamespacesForbiddenHandler);
ipcRenderer.on(hotbarTooManyItemsChannel, HotbarTooManyItemsHandler);
};