mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Adapt to injectable feature-wrappers
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
29 files changed
+79
-60
No files matched your search
@@ -190,6 +190,7 @@
|
||||
"@k8slens/core": "^6.5.0-alpha.6",
|
||||
"@k8slens/ensure-binaries": "^6.5.0-alpha.2",
|
||||
"@k8slens/feature-core": "^6.5.0-alpha.2",
|
||||
"@k8slens/basic-dependency-features": "^1.0.0-alpha.0",
|
||||
"@k8slens/keyboard-shortcuts": "^1.0.0-alpha.2",
|
||||
"@k8slens/kubectl-versions": "^1.0.0-alpha.0",
|
||||
"@k8slens/legacy-extension-example": "^1.0.0-alpha.4",
|
||||
|
||||
@@ -6,11 +6,11 @@ import {
|
||||
registerLensCore,
|
||||
} from "@k8slens/core/main";
|
||||
import { createContainer } from "@ogre-tools/injectable";
|
||||
import { registerMobX } from "@ogre-tools/injectable-extension-for-mobx";
|
||||
import { registerFeature } from "@k8slens/feature-core";
|
||||
import { applicationFeature, startApplicationInjectionToken } from '@k8slens/application'
|
||||
import { applicationFeatureForElectronMain } from '@k8slens/application-for-electron-main'
|
||||
import { messagingFeatureForMain } from "@k8slens/messaging-for-main";
|
||||
import { injectableMobXFeature } from "@k8slens/basic-dependency-features";
|
||||
|
||||
const environment = "main";
|
||||
|
||||
@@ -18,12 +18,16 @@ const di = createContainer(environment, {
|
||||
detectCycles: false,
|
||||
});
|
||||
|
||||
registerMobX(di);
|
||||
|
||||
runInAction(() => {
|
||||
registerLensCore(di, environment);
|
||||
|
||||
registerFeature(di, applicationFeature, applicationFeatureForElectronMain, messagingFeatureForMain);
|
||||
registerFeature(
|
||||
di,
|
||||
injectableMobXFeature,
|
||||
applicationFeature,
|
||||
applicationFeatureForElectronMain,
|
||||
messagingFeatureForMain
|
||||
);
|
||||
|
||||
try {
|
||||
autoRegister({
|
||||
|
||||
@@ -13,12 +13,11 @@ import {
|
||||
startApplicationInjectionToken,
|
||||
} from "@k8slens/application";
|
||||
import { createContainer } from "@ogre-tools/injectable";
|
||||
import { registerMobX } from "@ogre-tools/injectable-extension-for-mobx";
|
||||
import { registerInjectableReact } from "@ogre-tools/injectable-react";
|
||||
import { messagingFeatureForRenderer } from "@k8slens/messaging-for-renderer";
|
||||
import { keyboardShortcutsFeature } from "@k8slens/keyboard-shortcuts";
|
||||
import { reactApplicationFeature } from "@k8slens/react-application";
|
||||
import { dockFeature } from "@k8slens/dock";
|
||||
import { injectableReactFeature, injectableMobXFeature } from "@k8slens/basic-dependency-features";
|
||||
|
||||
const environment = "renderer";
|
||||
|
||||
@@ -27,12 +26,12 @@ const di = createContainer(environment, {
|
||||
});
|
||||
|
||||
runInAction(() => {
|
||||
registerMobX(di);
|
||||
registerInjectableReact(di);
|
||||
registerLensCore(di, environment);
|
||||
|
||||
registerFeature(
|
||||
di,
|
||||
injectableReactFeature,
|
||||
injectableMobXFeature,
|
||||
applicationFeature,
|
||||
messagingFeatureForRenderer,
|
||||
keyboardShortcutsFeature,
|
||||
|
||||
Reference in new issue
Block a user