mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
39 lines
856 B
TypeScript
39 lines
856 B
TypeScript
import { createContainer } from "@ogre-tools/injectable";
|
|
import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registration";
|
|
import { runInAction } from "mobx";
|
|
import { createApp, extensionApi } from "@k8slens/core/main";
|
|
|
|
const di = createContainer("main");
|
|
const app = createApp({
|
|
di,
|
|
mode: process.env.NODE_ENV || "development"
|
|
});
|
|
|
|
runInAction(() => {
|
|
try {
|
|
autoRegister({
|
|
di,
|
|
requireContexts: [
|
|
require.context("./", true, CONTEXT_MATCHER_FOR_NON_FEATURES),
|
|
require.context("../common", true, CONTEXT_MATCHER_FOR_NON_FEATURES),
|
|
],
|
|
});
|
|
} catch (err) {
|
|
console.error(err);
|
|
process.exit(1);
|
|
}
|
|
});
|
|
|
|
app.start().catch((error) => {
|
|
console.error(error);
|
|
process.exit(1);
|
|
})
|
|
|
|
const { Mobx, LensExtensions, Pty } = extensionApi;
|
|
|
|
export {
|
|
Mobx,
|
|
LensExtensions,
|
|
Pty
|
|
};
|