mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
- Extract global shared state of shell sessions Signed-off-by: Sebastian Malton <sebastian@malton.name>
22 lines
709 B
TypeScript
22 lines
709 B
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
import { getInjectable } from "@ogre-tools/injectable";
|
|
import { beforeQuitOfBackEndInjectionToken } from "../start-main-application/runnable-tokens/phases";
|
|
import lensProxyInjectable from "./lens-proxy.injectable";
|
|
|
|
const closeLensProxyOnQuitInjectable = getInjectable({
|
|
id: "close-lens-proxy-on-quit",
|
|
instantiate: (di) => ({
|
|
run: async () => {
|
|
const lensProxy = di.inject(lensProxyInjectable);
|
|
|
|
await lensProxy.close();
|
|
},
|
|
}),
|
|
injectionToken: beforeQuitOfBackEndInjectionToken,
|
|
});
|
|
|
|
export default closeLensProxyOnQuitInjectable;
|