mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix crashes with usages of @k8slens/core/common
- Only observable with extensions Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
5002b450fd
commit
7c18c2a23b
13 files changed
+95
-129
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { applicationInformationToken, ApplicationInformation } from "@k8slens/core/common";
|
||||
import { applicationInformationToken, ApplicationInformation } from "@k8slens/core/main";
|
||||
import packageJson from "../../package.json";
|
||||
|
||||
const applicationInformationInjectable = getInjectable({
|
||||
@@ -1,8 +1,7 @@
|
||||
import { createContainer } from "@ogre-tools/injectable";
|
||||
import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registration";
|
||||
import { runInAction } from "mobx";
|
||||
import { createApp, extensionApi as Main } from "@k8slens/core/main";
|
||||
import { extensionApi as Common } from "@k8slens/core/common";
|
||||
import { createApp, extensionApi as Main, commonExtensionApi as Common } from "@k8slens/core/main";
|
||||
|
||||
const di = createContainer("main");
|
||||
const app = createApp({
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { applicationInformationToken, ApplicationInformation } from "@k8slens/core/renderer";
|
||||
import packageJson from "../../package.json";
|
||||
|
||||
const applicationInformationInjectable = getInjectable({
|
||||
id: "application-information",
|
||||
injectionToken: applicationInformationToken,
|
||||
instantiate: () => {
|
||||
const { version, config, productName, build, copyright, description, name } = packageJson;
|
||||
|
||||
return { version, config, productName, build, copyright, description, name } as ApplicationInformation;
|
||||
},
|
||||
causesSideEffects: true,
|
||||
});
|
||||
|
||||
export default applicationInformationInjectable;
|
||||
@@ -1,8 +1,7 @@
|
||||
import "@k8slens/core/styles";
|
||||
import { createContainer } from "@ogre-tools/injectable";
|
||||
import { runInAction } from "mobx";
|
||||
import { createApp, extensionApi as Renderer } from "@k8slens/core/renderer";
|
||||
import { extensionApi as Common } from "@k8slens/core/common";
|
||||
import { createApp, extensionApi as Renderer, commonExtensionApi as Common } from "@k8slens/core/renderer";
|
||||
import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registration";
|
||||
|
||||
const di = createContainer("renderer");
|
||||
|
||||
Reference in new issue
Block a user