Skip to content

Commit

Permalink
Revert "chore: Extract sidebar item injection token into separate pac…
Browse files Browse the repository at this point in the history
…kage"

This reverts commit 8ac6638.
  • Loading branch information
Nokel81 committed May 23, 2023
1 parent cb0e876 commit 8f4aa49
Show file tree
Hide file tree
Showing 113 changed files with 1,680 additions and 5,648 deletions.
1 change: 0 additions & 1 deletion open-lens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@
"dependencies": {
"@k8slens/application": "^6.5.0-alpha.8",
"@k8slens/application-for-electron-main": "^6.5.0-alpha.7",
"@k8slens/cluster-sidebar": "^1.0.0-alpha.0",
"@k8slens/core": "^6.5.0-alpha.13",
"@k8slens/ensure-binaries": "^6.5.0-alpha.6",
"@k8slens/event-emitter": "^1.0.0-alpha.5",
Expand Down
11 changes: 5 additions & 6 deletions open-lens/src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ runInAction(() => {
registerLensCore(di, environment);

registerFeature(di,
loggerFeature,
loggerFeature,
);

registerFeature(
di,
applicationFeature,
applicationFeatureForElectronMain,
messagingFeatureForMain,
registerFeature(di,
applicationFeature,
applicationFeatureForElectronMain,
messagingFeatureForMain,
);

try {
Expand Down
4 changes: 1 addition & 3 deletions open-lens/src/renderer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { keyboardShortcutsFeature } from "@k8slens/keyboard-shortcuts";
import { reactApplicationFeature } from "@k8slens/react-application";
import { routingFeature } from "@k8slens/routing";
import { loggerFeature } from "@k8slens/logger";
import { clusterSidebarFeature } from "@k8slens/cluster-sidebar";

const environment = "renderer";

Expand All @@ -50,8 +49,7 @@ runInAction(() => {
keyboardShortcutsFeature,
reactApplicationFeature,
routingFeature,
metricsFeature,
clusterSidebarFeature,
metricsFeature
);

autoRegister({
Expand Down
26 changes: 0 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions packages/cluster-sidebar/.eslintrc.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/cluster-sidebar/.prettierrc

This file was deleted.

8 changes: 0 additions & 8 deletions packages/cluster-sidebar/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/cluster-sidebar/jest.config.js

This file was deleted.

48 changes: 0 additions & 48 deletions packages/cluster-sidebar/package.json

This file was deleted.

14 changes: 0 additions & 14 deletions packages/cluster-sidebar/src/feature.ts

This file was deleted.

62 changes: 0 additions & 62 deletions packages/cluster-sidebar/src/sidebar-items.injectable.ts

This file was deleted.

37 changes: 0 additions & 37 deletions packages/cluster-sidebar/src/tokens.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/cluster-sidebar/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/cluster-sidebar/webpack.config.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@
"@k8slens/application-for-electron-main": "^6.5.0-alpha.0",
"@k8slens/button": "^1.0.0-alpha.5",
"@k8slens/cluster-settings": "^6.5.0-alpha.1",
"@k8slens/cluster-sidebar": "^1.0.0-alpha.0",
"@k8slens/error-boundary": "^1.0.0-alpha.5",
"@k8slens/event-emitter": "^1.0.0-alpha.1",
"@k8slens/kubectl-versions": "^1.0.0-alpha.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* 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 { computed } from "mobx";
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";

const crdListRouteInjectable = getInjectable({
id: "crd-list-route",

instantiate: () => ({
path: "/crd/definitions",
clusterFrame: true,
isEnabled: computed(() => true),
}),

injectionToken: frontEndRouteInjectionToken,
});

export default crdListRouteInjectable;
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { navigateToRouteInjectionToken } from "../../../navigate-to-route-injection-token";
import crdListRouteInjectable from "./custom-resource-definitions.injectable";
import crdListRouteInjectable from "./crd-list-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";

const navigateToCrdListInjectable = getInjectable({
id: "navigate-to-crd-list",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import type { Route } from "../../../front-end-route-injection-token";
import { frontEndRouteInjectionToken } from "../../../front-end-route-injection-token";
import type { Route } from "../../../../front-end-route-injection-token";
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";

export interface CustomResourcesPathParameters {
group?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { navigateToRouteInjectionToken } from "../../../navigate-to-route-injection-token";
import type { CustomResourcesPathParameters } from "./custom-resources-route.injectable";
import customResourcesRouteInjectable from "./custom-resources-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";

const navigateToCustomResourcesInjectable = getInjectable({
id: "navigate-to-custom-resources",
Expand All @@ -14,7 +14,8 @@ const navigateToCustomResourcesInjectable = getInjectable({
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(customResourcesRouteInjectable);

return (parameters?: CustomResourcesPathParameters) => navigateToRoute(route, { parameters });
return (parameters?: CustomResourcesPathParameters) =>
navigateToRoute(route, { parameters });
},
});

Expand Down
Loading

0 comments on commit 8f4aa49

Please sign in to comment.