Update injectable library (#4842)

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
This commit is contained in:
Janne SavolainenandMikko Aspiala authored and GitHub committed 2022-02-25 11:10:13 -05:00
1 parent e8ca1ddf87
commit b65f6e00ec
231 files changed
+630 -613

No files matched your search

@@ -3,14 +3,14 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import { crdStore } from "./crd.store";
const customResourceDefinitionsInjectable = getInjectable({
instantiate: () => computed(() => [...crdStore.items]),
id: "custom-resource-definitions",
lifecycle: lifecycleEnum.singleton,
instantiate: () => computed(() => [...crdStore.items]),
});
export default customResourceDefinitionsInjectable;
@@ -2,7 +2,7 @@
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
import { getInjectable } from "@ogre-tools/injectable";
import { computed, IComputedValue } from "mobx";
import type { CustomResourceDefinition } from "../../../common/k8s-api/endpoints";
import { getOrInsert } from "../../utils";
@@ -25,10 +25,11 @@ function getGroupedCustomResourceDefinitions({ definitions }: Dependencies) {
}
const groupedCustomResourceDefinitionsInjectable = getInjectable({
id: "grouped-custom-resource-definitions",
instantiate: (di) => getGroupedCustomResourceDefinitions({
definitions: di.inject(customResourceDefinitionsInjectable),
}),
lifecycle: lifecycleEnum.singleton,
});
export default groupedCustomResourceDefinitionsInjectable;
@@ -2,7 +2,7 @@
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
import { getInjectable } from "@ogre-tools/injectable";
import { computed, IComputedValue } from "mobx";
import type { CustomResourceDefinition } from "../../../common/k8s-api/endpoints";
import { crdURL, crdDefinitionsRoute } from "../../../common/routes";
@@ -51,10 +51,11 @@ function getRouteTabs({ customResourcesDefinitions }: Dependencies) {
}
const customResourcesRouteTabsInjectable = getInjectable({
id: "custom-resources-route-tabs",
instantiate: (di) => getRouteTabs({
customResourcesDefinitions: di.inject(groupedCustomResourceDefinitionsInjectable),
}),
lifecycle: lifecycleEnum.singleton,
});
export default customResourcesRouteTabsInjectable;