mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Consolidate directory structure of composite
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
c96f562c69
commit
f212c2a86d
@ -6,7 +6,7 @@ import type { ApplicationBuilder } from "../../renderer/components/test-utils/ge
|
||||
import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
|
||||
import populateApplicationMenuInjectable from "./main/populate-application-menu.injectable";
|
||||
import { advanceFakeTime, useFakeTime } from "../../common/test-utils/use-fake-time";
|
||||
import { getCompositePaths } from "./main/menu-items/get-composite/get-composite-paths/get-composite-paths";
|
||||
import { getCompositePaths } from "./main/menu-items/composite/get-composite-paths/get-composite-paths";
|
||||
|
||||
describe("application-menu", () => {
|
||||
let builder: ApplicationBuilder;
|
||||
|
||||
@ -6,7 +6,7 @@ import type { ApplicationBuilder } from "../../renderer/components/test-utils/ge
|
||||
import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
|
||||
import populateApplicationMenuInjectable from "./main/populate-application-menu.injectable";
|
||||
import { advanceFakeTime, useFakeTime } from "../../common/test-utils/use-fake-time";
|
||||
import { getCompositePaths } from "./main/menu-items/get-composite/get-composite-paths/get-composite-paths";
|
||||
import { getCompositePaths } from "./main/menu-items/composite/get-composite-paths/get-composite-paths";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import applicationMenuItemInjectionToken from "./main/menu-items/application-menu-item-injection-token";
|
||||
import { runInAction } from "mobx";
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import applicationMenuItemsInjectable from "./application-menu-items.injectable";
|
||||
import type { Composite } from "./menu-items/get-composite/get-composite";
|
||||
import getComposite from "./menu-items/get-composite/get-composite";
|
||||
import type { Composite } from "./menu-items/composite/get-composite/get-composite";
|
||||
import getComposite from "./menu-items/composite/get-composite/get-composite";
|
||||
import { computed } from "mobx";
|
||||
import { pipeline } from "@ogre-tools/fp";
|
||||
import type { ApplicationMenuItemTypes } from "./menu-items/application-menu-item-injection-token";
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import type { Composite } from "../get-composite";
|
||||
import getComposite from "../get-composite";
|
||||
import type { Composite } from "../get-composite/get-composite";
|
||||
import getComposite from "../get-composite/get-composite";
|
||||
import { compositeHasDescendant } from "./composite-has-descendant";
|
||||
|
||||
describe("composite-has-descendant, given composite with children and grand children", () => {
|
||||
@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import type { Composite } from "../get-composite";
|
||||
import type { Composite } from "../get-composite/get-composite";
|
||||
|
||||
const compositeHasDescendant = <T>(
|
||||
predicate: (referenceComposite: Composite<T>) => boolean,
|
||||
@ -2,8 +2,8 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import type { Composite } from "../get-composite";
|
||||
import getComposite from "../get-composite";
|
||||
import type { Composite } from "../get-composite/get-composite";
|
||||
import getComposite from "../get-composite/get-composite";
|
||||
import { findComposite } from "./find-composite";
|
||||
|
||||
describe("find-composite", () => {
|
||||
@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import type { Composite } from "../get-composite";
|
||||
import type { Composite } from "../get-composite/get-composite";
|
||||
import { getCompositeNormalization } from "../get-composite-normalization/get-composite-normalization";
|
||||
|
||||
export const findComposite =
|
||||
@ -3,7 +3,7 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getCompositeNormalization } from "./get-composite-normalization";
|
||||
import getComposite from "../get-composite";
|
||||
import getComposite from "../get-composite/get-composite";
|
||||
|
||||
describe("get-composite-normalization", () => {
|
||||
it("given a composite, flattens it to path and composite", () => {
|
||||
@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import type { Composite } from "../get-composite";
|
||||
import type { Composite } from "../get-composite/get-composite";
|
||||
|
||||
export const getCompositeNormalization = <T>(composite: Composite<T>) => {
|
||||
const _normalizeComposite = <T>(
|
||||
@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import getComposite from "../get-composite";
|
||||
import getComposite from "../get-composite/get-composite";
|
||||
import { getCompositePaths } from "./get-composite-paths";
|
||||
|
||||
describe("get-composite-paths", () => {
|
||||
@ -4,7 +4,7 @@
|
||||
*/
|
||||
import { pipeline } from "@ogre-tools/fp";
|
||||
import { map } from "lodash/fp";
|
||||
import type { Composite } from "../get-composite";
|
||||
import type { Composite } from "../get-composite/get-composite";
|
||||
import { getCompositeNormalization } from "../get-composite-normalization/get-composite-normalization";
|
||||
|
||||
export const getCompositePaths = (
|
||||
@ -6,7 +6,7 @@
|
||||
import { sortBy } from "lodash/fp";
|
||||
import type { Composite } from "./get-composite";
|
||||
import getComposite from "./get-composite";
|
||||
import { getCompositePaths } from "./get-composite-paths/get-composite-paths";
|
||||
import { getCompositePaths } from "../get-composite-paths/get-composite-paths";
|
||||
|
||||
describe("get-composite", () => {
|
||||
it("given items and a specified root id, creates a composite", () => {
|
||||
@ -5,7 +5,7 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { Menu } from "electron";
|
||||
import type { MenuItemOpts } from "./application-menu-items.injectable";
|
||||
import type { Composite } from "./menu-items/get-composite/get-composite";
|
||||
import type { Composite } from "./menu-items/composite/get-composite/get-composite";
|
||||
import type { ApplicationMenuItemTypes } from "./menu-items/application-menu-item-injection-token";
|
||||
import { pipeline } from "@ogre-tools/fp";
|
||||
import { map, sortBy } from "lodash/fp";
|
||||
|
||||
@ -5,10 +5,10 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { computed } from "mobx";
|
||||
import type { PreferenceTab, PreferenceTypes } from "./preference-item-injection-token";
|
||||
import type { Composite } from "../../../application-menu/main/menu-items/get-composite/get-composite";
|
||||
import type { Composite } from "../../../application-menu/main/menu-items/composite/get-composite/get-composite";
|
||||
import { filter, map } from "lodash/fp";
|
||||
import { pipeline } from "@ogre-tools/fp";
|
||||
import { getCompositeNormalization } from "../../../application-menu/main/menu-items/get-composite/get-composite-normalization/get-composite-normalization";
|
||||
import { getCompositeNormalization } from "../../../application-menu/main/menu-items/composite/get-composite-normalization/get-composite-normalization";
|
||||
import preferencesCompositeInjectable from "./preferences-composite.injectable";
|
||||
import type { PreferenceTabsRoot } from "./preference-tab-root";
|
||||
import currentPreferenceTabIdInjectable from "./current-preference-tab-id.injectable";
|
||||
|
||||
@ -7,7 +7,7 @@ import { computedInjectManyInjectable } from "@ogre-tools/injectable-extension-f
|
||||
import { computed } from "mobx";
|
||||
import type { PreferenceTypes } from "./preference-item-injection-token";
|
||||
import { preferenceItemInjectionToken } from "./preference-item-injection-token";
|
||||
import getComposite from "../../../application-menu/main/menu-items/get-composite/get-composite";
|
||||
import getComposite from "../../../application-menu/main/menu-items/composite/get-composite/get-composite";
|
||||
import { filter } from "lodash/fp";
|
||||
import { pipeline } from "@ogre-tools/fp";
|
||||
import { preferenceTabsRoot } from "./preference-tab-root";
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
*/
|
||||
import { Tabs } from "../../../../renderer/components/tabs";
|
||||
import React from "react";
|
||||
import type { Composite } from "../../../application-menu/main/menu-items/get-composite/get-composite";
|
||||
import type { Composite } from "../../../application-menu/main/menu-items/composite/get-composite/get-composite";
|
||||
import type { PreferenceTypes } from "../preference-items/preference-item-injection-token";
|
||||
import { Map } from "../../../../renderer/components/map/map";
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
@ -12,7 +12,7 @@ import type { IComputedValue } from "mobx";
|
||||
import preferencesCompositeInjectable from "../preference-items/preferences-composite.injectable";
|
||||
import { observer } from "mobx-react";
|
||||
import { PreferencesNavigationTab } from "./preferences-navigation-tab";
|
||||
import { compositeHasDescendant } from "../../../application-menu/main/menu-items/get-composite/composite-has-descendant/composite-has-descendant";
|
||||
import { compositeHasDescendant } from "../../../application-menu/main/menu-items/composite/composite-has-descendant/composite-has-descendant";
|
||||
import type { PreferenceTabsRoot } from "../preference-items/preference-tab-root";
|
||||
import { Icon } from "../../../../renderer/components/icon";
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ import { SettingLayout } from "../../../renderer/components/layout/setting-layou
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import closePreferencesInjectable from "./close-preferences/close-preferences.injectable";
|
||||
import currentPreferenceTabCompositeInjectable from "./preference-items/current-preference-tab-composite.injectable";
|
||||
import type { Composite } from "../../application-menu/main/menu-items/get-composite/get-composite";
|
||||
import type { Composite } from "../../application-menu/main/menu-items/composite/get-composite/get-composite";
|
||||
import type { PreferenceTypes, PreferenceTab } from "./preference-items/preference-item-injection-token";
|
||||
import type { IComputedValue } from "mobx";
|
||||
import { Map } from "../../../renderer/components/map/map";
|
||||
|
||||
@ -65,10 +65,10 @@ import namespaceApiInjectable from "../../../common/k8s-api/endpoints/namespace.
|
||||
import { Namespace } from "../../../common/k8s-api/endpoints";
|
||||
import { overrideFsWithFakes } from "../../../test-utils/override-fs-with-fakes";
|
||||
import applicationMenuItemCompositeInjectable from "../../../features/application-menu/main/application-menu-item-composite.injectable";
|
||||
import { getCompositePaths } from "../../../features/application-menu/main/menu-items/get-composite/get-composite-paths/get-composite-paths";
|
||||
import { getCompositeNormalization } from "../../../features/application-menu/main/menu-items/get-composite/get-composite-normalization/get-composite-normalization";
|
||||
import { getCompositePaths } from "../../../features/application-menu/main/menu-items/composite/get-composite-paths/get-composite-paths";
|
||||
import { getCompositeNormalization } from "../../../features/application-menu/main/menu-items/composite/get-composite-normalization/get-composite-normalization";
|
||||
import type { ClickableMenuItem } from "../../../features/application-menu/main/menu-items/application-menu-item-injection-token";
|
||||
import type { Composite } from "../../../features/application-menu/main/menu-items/get-composite/get-composite";
|
||||
import type { Composite } from "../../../features/application-menu/main/menu-items/composite/get-composite/get-composite";
|
||||
import { getSingleElement } from "./discovery-of-html-elements";
|
||||
|
||||
type Callback = (di: DiContainer) => void | Promise<void>;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user