1
0
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:
Sebastian Malton 2023-06-01 10:50:08 -04:00
parent 544d9e2686
commit 69324ff555
9 changed files with 18 additions and 30 deletions

View File

@ -25,12 +25,9 @@ registerMobX(di);
runInAction(() => { runInAction(() => {
registerLensCore(di, environment); registerLensCore(di, environment);
registerFeature(di,
loggerFeature,
);
registerFeature( registerFeature(
di, di,
loggerFeature,
applicationFeature, applicationFeature,
applicationFeatureForElectronMain, applicationFeatureForElectronMain,
messagingFeatureForMain, messagingFeatureForMain,

View File

@ -45,10 +45,6 @@ runInAction(() => {
registerFeature( registerFeature(
di, di,
loggerFeature, loggerFeature,
);
registerFeature(
di,
applicationFeature, applicationFeature,
messagingFeatureForRenderer, messagingFeatureForRenderer,
keyboardShortcutsFeature, keyboardShortcutsFeature,

View File

@ -20,12 +20,12 @@
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
"./main": { "./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": { "./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", "./styles": "./static/build/library/renderer.css",
"./template.html": "./src/renderer/template.html", "./template.html": "./src/renderer/template.html",

View File

@ -2,23 +2,17 @@
* Copyright (c) OpenLens Authors. All rights reserved. * Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information. * 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 { 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", id: "custom-resource-definitions-route",
path: "/crd/definitions",
instantiate: (di) => ({ clusterFrame: true,
path: "/crd/definitions", isEnabled: (di) => di.inject(shouldShowResourceInjectionToken, {
clusterFrame: true, group: "apiextensions.k8s.io",
isEnabled: di.inject(shouldShowResourceInjectionToken, { apiName: "customresourcedefinitions",
group: "apiextensions.k8s.io",
apiName: "customresourcedefinitions",
}),
}), }),
injectionToken: frontEndRouteInjectionToken,
}); });
export default customResourceDefinitionsRouteInjectable; export default customResourceDefinitionsRouteInjectable;

View File

@ -3,6 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { NavigateToSpecificRoute } from "../../../navigate-to-route-injection-token";
import { navigateToRouteInjectionToken } from "../../../navigate-to-route-injection-token"; import { navigateToRouteInjectionToken } from "../../../navigate-to-route-injection-token";
import customResourcesRouteInjectable from "./custom-resources-route.injectable"; import customResourcesRouteInjectable from "./custom-resources-route.injectable";

View File

@ -9,7 +9,7 @@ import type { RenderResult } from "@testing-library/react";
import { fireEvent } from "@testing-library/react"; import { fireEvent } from "@testing-library/react";
import { routeSpecificComponentInjectionToken } from "../../renderer/routes/route-specific-component-injection-token"; import { routeSpecificComponentInjectionToken } from "../../renderer/routes/route-specific-component-injection-token";
import { sidebarItemInjectionToken } from "@k8slens/cluster-sidebar"; import { sidebarItemInjectionToken } from "@k8slens/cluster-sidebar";
import { computed, runInAction } from "mobx"; import { runInAction } from "mobx";
import { noop } from "lodash/fp"; import { noop } from "lodash/fp";
import routeIsActiveInjectable from "../../renderer/routes/route-is-active.injectable"; import routeIsActiveInjectable from "../../renderer/routes/route-is-active.injectable";
import { getFrontEndRouteInjectable } from "../../common/front-end-routing/front-end-route-injection-token"; import { getFrontEndRouteInjectable } from "../../common/front-end-routing/front-end-route-injection-token";

View File

@ -16,7 +16,7 @@ describe("status-bar-items-originating-from-extensions", () => {
beforeEach(async () => { beforeEach(async () => {
builder = getApplicationBuilder(); builder = getApplicationBuilder();
await applicationBuilder.beforeWindowStart(({ windowDi }) => { await builder.beforeWindowStart(({ windowDi }) => {
windowDi.unoverride(getRandomIdInjectionToken); windowDi.unoverride(getRandomIdInjectionToken);
windowDi.permitSideEffects(getRandomIdInjectionToken); windowDi.permitSideEffects(getRandomIdInjectionToken);
}); });

View File

@ -29,7 +29,7 @@ const customResourceDefinitionGroupsSidebarItemsComputedInjectable = getInjectab
const customResourceDefinitions = di.inject(customResourceDefinitionsInjectable); const customResourceDefinitions = di.inject(customResourceDefinitionsInjectable);
const navigateToCustomResources = di.inject(navigateToCustomResourcesInjectable); const navigateToCustomResources = di.inject(navigateToCustomResourcesInjectable);
const customResourcesRoute = di.inject(customResourcesRouteInjectable); 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 toCustomResourceGroupToSidebarItems = ([group, definitions]: [string, CustomResourceDefinition[]], index: number) => {
const customResourceGroupSidebarItem = getInjectable({ const customResourceGroupSidebarItem = getInjectable({
@ -78,7 +78,7 @@ const customResourceDefinitionGroupsSidebarItemsComputedInjectable = getInjectab
const customResourceDefinitionGroups = ( const customResourceDefinitionGroups = (
iter.chain(customResourceDefinitions.get().values()) iter.chain(customResourceDefinitions.get().values())
.map((crd) => [crd.getGroup(), crd] as const) .map((crd) => [crd.getGroup(), crd] as const)
.toMap() .groupIntoMap()
); );
return Array.from(customResourceDefinitionGroups.entries(), toCustomResourceGroupToSidebarItems) return Array.from(customResourceDefinitionGroups.entries(), toCustomResourceGroupToSidebarItems)

View File

@ -13,7 +13,7 @@ const selectedCustomResourceDefinitionGroupsUrlParamInjectable = getInjectable({
return createPageParam({ return createPageParam({
name: "groups", name: "groups",
defaultValue: new Set<string>(), defaultValue: new Set<string>(),
parse: (value: string[]) => new Set<string>(value), parse: (value) => new Set<string>(value),
stringify: (value) => Array.from(value), stringify: (value) => Array.from(value),
}); });
}, },