1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Try waters for feature registration using a test-feature

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
Iku-turso 2022-11-09 15:37:34 +02:00
parent 794ab63360
commit 513e4a8193
3 changed files with 21 additions and 1 deletions

View File

@ -295,7 +295,9 @@
"@lensapp/composable-responsibilities": "0.0.1", "@lensapp/composable-responsibilities": "0.0.1",
"@lensapp/utils": "0.0.1", "@lensapp/utils": "0.0.1",
"@lensapp/composite": "0.0.1", "@lensapp/composite": "0.0.1",
"@lensapp/preferences": "0.0.1" "@lensapp/preferences": "0.0.1",
"@lensapp/test-feature": "0.0.1",
"@lensapp/feature-core": "0.0.1"
}, },
"devDependencies": { "devDependencies": {
"@async-fn/jest": "1.6.4", "@async-fn/jest": "1.6.4",

View File

@ -45,6 +45,7 @@ import autoRegistrationInjectable from "../common/k8s-api/api-manager/auto-regis
import assert from "assert"; import assert from "assert";
import startFrameInjectable from "./start-frame/start-frame.injectable"; import startFrameInjectable from "./start-frame/start-frame.injectable";
import initializeSentryReportingWithInjectable from "../common/error-reporting/initialize-sentry-reporting.injectable"; import initializeSentryReportingWithInjectable from "../common/error-reporting/initialize-sentry-reporting.injectable";
import registerFeatures from "./register-features";
configurePackages(); // global packages configurePackages(); // global packages
registerCustomThemes(); // monaco editor themes registerCustomThemes(); // monaco editor themes
@ -61,6 +62,8 @@ async function attachChromeDebugger() {
} }
export async function bootstrap(di: DiContainer) { export async function bootstrap(di: DiContainer) {
registerFeatures(di);
const initializeSentryReportingWith = di.inject(initializeSentryReportingWithInjectable); const initializeSentryReportingWith = di.inject(initializeSentryReportingWithInjectable);
if (process.isMainFrame) { if (process.isMainFrame) {

View File

@ -0,0 +1,15 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { registerFeature } from "@lensapp/feature-core";
import type { DiContainer } from "@ogre-tools/injectable";
import { runInAction } from "mobx";
import testFeature from "@lensapp/test-feature";
export default (di: DiContainer) => {
runInAction(() => {
registerFeature(di, testFeature);
});
};