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
1.1 KiB
TypeScript
39 lines
1.1 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 { spawn } from "node-pty";
|
|
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,
|
|
};
|
|
|
|
const Pty = {
|
|
spawn,
|
|
};
|
|
|
|
export { Mobx, LensExtensions, Pty };
|