mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Replace static application window with ability to create as many as you wish Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Adapt tests for replacing static application window with ability to create as many as you wish and separate starting of main and window in behaviours Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Make first render of application smaller in test that proves to be hard for CI Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Remove redundant code Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Simplify code Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
|
|
// Main process
|
|
|
|
import * as Mobx from "mobx";
|
|
import * as LensExtensionsCommonApi from "../extensions/common-api";
|
|
import * as LensExtensionsMainApi from "../extensions/main-api";
|
|
import { getDi } from "./getDi";
|
|
import startMainApplicationInjectable from "./start-main-application/start-main-application.injectable";
|
|
import shouldStartHiddenInjectable from "./electron-app/features/should-start-hidden.injectable";
|
|
|
|
const di = getDi();
|
|
|
|
const shouldStartHidden = di.inject(shouldStartHiddenInjectable);
|
|
|
|
const startApplication = di.inject(startMainApplicationInjectable);
|
|
|
|
void startApplication(!shouldStartHidden);
|
|
|
|
/**
|
|
* Exports for virtual package "@k8slens/extensions" for main-process.
|
|
* All exporting names available in global runtime scope:
|
|
* e.g. global.Mobx, global.LensExtensions
|
|
*/
|
|
const LensExtensions = {
|
|
Common: LensExtensionsCommonApi,
|
|
Main: LensExtensionsMainApi,
|
|
};
|
|
|
|
export { Mobx, LensExtensions };
|