mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Fix build after rebase with master
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
544d9e2686
commit
69324ff555
@ -25,12 +25,9 @@ registerMobX(di);
|
||||
runInAction(() => {
|
||||
registerLensCore(di, environment);
|
||||
|
||||
registerFeature(di,
|
||||
loggerFeature,
|
||||
);
|
||||
|
||||
registerFeature(
|
||||
di,
|
||||
loggerFeature,
|
||||
applicationFeature,
|
||||
applicationFeatureForElectronMain,
|
||||
messagingFeatureForMain,
|
||||
|
||||
@ -45,10 +45,6 @@ runInAction(() => {
|
||||
registerFeature(
|
||||
di,
|
||||
loggerFeature,
|
||||
);
|
||||
|
||||
registerFeature(
|
||||
di,
|
||||
applicationFeature,
|
||||
messagingFeatureForRenderer,
|
||||
keyboardShortcutsFeature,
|
||||
|
||||
@ -20,12 +20,12 @@
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
"./main": {
|
||||
"default": "./static/build/library/main.js",
|
||||
"types": "./static/build/main/src/library.d.ts"
|
||||
"types": "./static/build/main/src/library.d.ts",
|
||||
"default": "./static/build/library/main.js"
|
||||
},
|
||||
"./renderer": {
|
||||
"default": "./static/build/library/renderer.js",
|
||||
"types": "./static/build/library/src/renderer/library.d.ts"
|
||||
"types": "./static/build/library/src/renderer/library.d.ts",
|
||||
"default": "./static/build/library/renderer.js"
|
||||
},
|
||||
"./styles": "./static/build/library/renderer.css",
|
||||
"./template.html": "./src/renderer/template.html",
|
||||
|
||||
@ -2,23 +2,17 @@
|
||||
* 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 { shouldShowResourceInjectionToken } from "../../../../../features/cluster/showing-kube-resources/common/allowed-resources-injection-token";
|
||||
import { frontEndRouteInjectionToken } from "../../../front-end-route-injection-token";
|
||||
import { getFrontEndRouteInjectable } from "../../../front-end-route-injection-token";
|
||||
|
||||
const customResourceDefinitionsRouteInjectable = getInjectable({
|
||||
const customResourceDefinitionsRouteInjectable = getFrontEndRouteInjectable({
|
||||
id: "custom-resource-definitions-route",
|
||||
|
||||
instantiate: (di) => ({
|
||||
path: "/crd/definitions",
|
||||
clusterFrame: true,
|
||||
isEnabled: di.inject(shouldShowResourceInjectionToken, {
|
||||
group: "apiextensions.k8s.io",
|
||||
apiName: "customresourcedefinitions",
|
||||
}),
|
||||
path: "/crd/definitions",
|
||||
clusterFrame: true,
|
||||
isEnabled: (di) => di.inject(shouldShowResourceInjectionToken, {
|
||||
group: "apiextensions.k8s.io",
|
||||
apiName: "customresourcedefinitions",
|
||||
}),
|
||||
|
||||
injectionToken: frontEndRouteInjectionToken,
|
||||
});
|
||||
|
||||
export default customResourceDefinitionsRouteInjectable;
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { NavigateToSpecificRoute } from "../../../navigate-to-route-injection-token";
|
||||
import { navigateToRouteInjectionToken } from "../../../navigate-to-route-injection-token";
|
||||
import customResourcesRouteInjectable from "./custom-resources-route.injectable";
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ import type { RenderResult } from "@testing-library/react";
|
||||
import { fireEvent } from "@testing-library/react";
|
||||
import { routeSpecificComponentInjectionToken } from "../../renderer/routes/route-specific-component-injection-token";
|
||||
import { sidebarItemInjectionToken } from "@k8slens/cluster-sidebar";
|
||||
import { computed, runInAction } from "mobx";
|
||||
import { runInAction } from "mobx";
|
||||
import { noop } from "lodash/fp";
|
||||
import routeIsActiveInjectable from "../../renderer/routes/route-is-active.injectable";
|
||||
import { getFrontEndRouteInjectable } from "../../common/front-end-routing/front-end-route-injection-token";
|
||||
|
||||
@ -16,7 +16,7 @@ describe("status-bar-items-originating-from-extensions", () => {
|
||||
beforeEach(async () => {
|
||||
builder = getApplicationBuilder();
|
||||
|
||||
await applicationBuilder.beforeWindowStart(({ windowDi }) => {
|
||||
await builder.beforeWindowStart(({ windowDi }) => {
|
||||
windowDi.unoverride(getRandomIdInjectionToken);
|
||||
windowDi.permitSideEffects(getRandomIdInjectionToken);
|
||||
});
|
||||
|
||||
@ -29,7 +29,7 @@ const customResourceDefinitionGroupsSidebarItemsComputedInjectable = getInjectab
|
||||
const customResourceDefinitions = di.inject(customResourceDefinitionsInjectable);
|
||||
const navigateToCustomResources = di.inject(navigateToCustomResourcesInjectable);
|
||||
const customResourcesRoute = di.inject(customResourcesRouteInjectable);
|
||||
const pathParameters = di.inject(routePathParametersInjectable, customResourcesRoute);
|
||||
const pathParameters = di.inject(routePathParametersInjectable)(customResourcesRoute);
|
||||
|
||||
const toCustomResourceGroupToSidebarItems = ([group, definitions]: [string, CustomResourceDefinition[]], index: number) => {
|
||||
const customResourceGroupSidebarItem = getInjectable({
|
||||
@ -78,7 +78,7 @@ const customResourceDefinitionGroupsSidebarItemsComputedInjectable = getInjectab
|
||||
const customResourceDefinitionGroups = (
|
||||
iter.chain(customResourceDefinitions.get().values())
|
||||
.map((crd) => [crd.getGroup(), crd] as const)
|
||||
.toMap()
|
||||
.groupIntoMap()
|
||||
);
|
||||
|
||||
return Array.from(customResourceDefinitionGroups.entries(), toCustomResourceGroupToSidebarItems)
|
||||
|
||||
@ -13,7 +13,7 @@ const selectedCustomResourceDefinitionGroupsUrlParamInjectable = getInjectable({
|
||||
return createPageParam({
|
||||
name: "groups",
|
||||
defaultValue: new Set<string>(),
|
||||
parse: (value: string[]) => new Set<string>(value),
|
||||
parse: (value) => new Set<string>(value),
|
||||
stringify: (value) => Array.from(value),
|
||||
});
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user