mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Switch to running injection token based setups over legacy DI setups in application roots
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
d5ab2ab000
commit
71f74de570
@ -62,6 +62,7 @@ import hotbarStoreInjectable from "../common/hotbar-store.injectable";
|
|||||||
import applicationMenuItemsInjectable from "./menu/application-menu-items.injectable";
|
import applicationMenuItemsInjectable from "./menu/application-menu-items.injectable";
|
||||||
import type { DiContainer } from "@ogre-tools/injectable";
|
import type { DiContainer } from "@ogre-tools/injectable";
|
||||||
import { init } from "@sentry/electron/main";
|
import { init } from "@sentry/electron/main";
|
||||||
|
import { runSetups } from "../common/setupable-injection-token/run-setups";
|
||||||
|
|
||||||
async function main(di: DiContainer) {
|
async function main(di: DiContainer) {
|
||||||
app.setName(appName);
|
app.setName(appName);
|
||||||
@ -70,7 +71,7 @@ async function main(di: DiContainer) {
|
|||||||
* Note: this MUST be called before electron's "ready" event has been emitted.
|
* Note: this MUST be called before electron's "ready" event has been emitted.
|
||||||
*/
|
*/
|
||||||
initializeSentryReporting(init);
|
initializeSentryReporting(init);
|
||||||
await di.runSetups();
|
await runSetups(di);
|
||||||
await app.whenReady();
|
await app.whenReady();
|
||||||
|
|
||||||
injectSystemCAs();
|
injectSystemCAs();
|
||||||
|
|||||||
@ -43,6 +43,7 @@ import hotbarStoreInjectable from "../common/hotbar-store.injectable";
|
|||||||
import { bindEvents } from "./navigation/events";
|
import { bindEvents } from "./navigation/events";
|
||||||
import deleteClusterDialogModelInjectable from "./components/delete-cluster-dialog/delete-cluster-dialog-model/delete-cluster-dialog-model.injectable";
|
import deleteClusterDialogModelInjectable from "./components/delete-cluster-dialog/delete-cluster-dialog-model/delete-cluster-dialog-model.injectable";
|
||||||
import { init } from "@sentry/electron/renderer";
|
import { init } from "@sentry/electron/renderer";
|
||||||
|
import { runSetups } from "../common/setupable-injection-token/run-setups";
|
||||||
|
|
||||||
configurePackages(); // global packages
|
configurePackages(); // global packages
|
||||||
registerCustomThemes(); // monaco editor themes
|
registerCustomThemes(); // monaco editor themes
|
||||||
@ -63,7 +64,7 @@ export async function bootstrap(di: DiContainer) {
|
|||||||
initializeSentryReporting(init);
|
initializeSentryReporting(init);
|
||||||
}
|
}
|
||||||
|
|
||||||
await di.runSetups();
|
await runSetups(di);
|
||||||
|
|
||||||
// TODO: Consolidate import time side-effect to setup time
|
// TODO: Consolidate import time side-effect to setup time
|
||||||
bindEvents();
|
bindEvents();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user