mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Remove mac-ca usage since it was only in tests (#6043) * Make injecting CAs injectable, remove mac-ca as dependency * Fix win-ca failing on electron renderer on windows * Fix the matcher under features/ for main Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix type errors from new types Signed-off-by: Sebastian Malton <sebastian@malton.name> * Temp change to see windows errors on CI Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix temp change Signed-off-by: Sebastian Malton <sebastian@malton.name> * Change error message for windows Signed-off-by: Sebastian Malton <sebastian@malton.name> * Increase maxBuffer size when reading windows CAs Signed-off-by: Sebastian Malton <sebastian@malton.name> * Switch back to running integration tests on windows Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix usage after rebase Signed-off-by: Sebastian Malton <sebastian@malton.name> * Update lock file Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
import { createContainer } from "@ogre-tools/injectable";
|
|
import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registration";
|
|
import { registerMobX } from "@ogre-tools/injectable-extension-for-mobx";
|
|
import { runInAction } from "mobx";
|
|
import { Environments, setLegacyGlobalDiForExtensionApi } from "../extensions/as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api";
|
|
|
|
export const getDi = () => {
|
|
const di = createContainer("main");
|
|
|
|
setLegacyGlobalDiForExtensionApi(di, Environments.main);
|
|
|
|
runInAction(() => {
|
|
registerMobX(di);
|
|
|
|
autoRegister({
|
|
di,
|
|
requireContexts: [
|
|
require.context("./", true, CONTEXT_MATCHER_FOR_NON_FEATURES),
|
|
require.context("../extensions", true, CONTEXT_MATCHER_FOR_NON_FEATURES),
|
|
require.context("../common", true, CONTEXT_MATCHER_FOR_NON_FEATURES),
|
|
require.context("../features", true, CONTEXT_MATCHER_FOR_FEATURES),
|
|
],
|
|
});
|
|
});
|
|
|
|
return di;
|
|
};
|