mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Convert runMany and runManySync to use injectManyWithMeta + move to seperate package (#7244)
* Convert runMany and runManySync to use injectManyWithMeta Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fixup type errors due to new Runnable requirements Signed-off-by: Sebastian Malton <sebastian@malton.name> * Add documentation for verifyRunnablesAreDAG Signed-off-by: Sebastian Malton <sebastian@malton.name> * Simplify convertToWithIdWith Signed-off-by: Sebastian Malton <sebastian@malton.name> * Move all utility functions to separate package Signed-off-by: Sebastian Malton <sebastian@malton.name> * Move testing utilities to separate package Signed-off-by: Sebastian Malton <sebastian@malton.name> * Move run-many and run-many-sync to separate package Signed-off-by: Sebastian Malton <sebastian@malton.name> * Replace all internal uses of utilities with new packages Signed-off-by: Sebastian Malton <sebastian@malton.name> * Use new @k8slens/run-many package in core Signed-off-by: Sebastian Malton <sebastian@malton.name> * Add dep to open-lens Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fixup type errors Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fixup uses of @k8slens/test-utils Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fixup getGlobalOverride Signed-off-by: Sebastian Malton <sebastian@malton.name> * Move tests to new package too Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix type errors Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fixup uses of AsyncResult and autoBind Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fixup remaining import issues Signed-off-by: Sebastian Malton <sebastian@malton.name> * Finial fixups to fix build Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix lint Signed-off-by: Sebastian Malton <sebastian@malton.name> * Revert moving "testUsingFakeTime" to separate package - This fixes tests Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix integration tests Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix unit test failing due to spelling fix Signed-off-by: Sebastian Malton <sebastian@malton.name> --------- Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
ad9bafe2a5
commit
2789bcebcb
754 files changed
+2715
-2752
No files matched your search
@@ -7,13 +7,13 @@ import styles from "./main-layout.module.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import type { StorageLayer } from "../../utils";
|
||||
import { cssNames } from "../../utils";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
import { ErrorBoundary } from "../error-boundary";
|
||||
import { ResizeDirection, ResizeGrowthDirection, ResizeSide, ResizingAnchor } from "../resizing-anchor";
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import type { SidebarStorageState } from "./sidebar-storage/sidebar-storage.injectable";
|
||||
import sidebarStorageInjectable, { defaultSidebarWidth } from "./sidebar-storage/sidebar-storage.injectable";
|
||||
import type { StorageLayer } from "../../utils/storage-helper";
|
||||
|
||||
export interface MainLayoutProps {
|
||||
sidebar: React.ReactNode;
|
||||
|
||||
@@ -7,8 +7,8 @@ import "./setting-layout.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import type { IClassName } from "../../utils";
|
||||
import { cssNames } from "../../utils";
|
||||
import type { IClassName } from "@k8slens/utilities";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
import { CloseButton } from "./close-button";
|
||||
import { getLegacyGlobalDiForExtensionApi } from "../../../extensions/as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api";
|
||||
import navigateToCatalogInjectable from "../../../common/front-end-routing/routes/catalog/navigate-to-catalog.injectable";
|
||||
|
||||
@@ -7,8 +7,7 @@ import styles from "./sidebar-items.module.scss";
|
||||
|
||||
import React from "react";
|
||||
import { computed, makeObservable } from "mobx";
|
||||
import type { StorageLayer } from "../../utils";
|
||||
import { cssNames } from "../../utils";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
import { observer } from "mobx-react";
|
||||
import { NavLink } from "react-router-dom";
|
||||
import { Icon } from "../icon";
|
||||
@@ -16,6 +15,7 @@ import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import type { SidebarStorageState } from "./sidebar-storage/sidebar-storage.injectable";
|
||||
import sidebarStorageInjectable from "./sidebar-storage/sidebar-storage.injectable";
|
||||
import type { HierarchicalSidebarItem } from "./sidebar-items.injectable";
|
||||
import type { StorageLayer } from "../../utils/storage-helper";
|
||||
|
||||
interface Dependencies {
|
||||
sidebarStorage: StorageLayer<SidebarStorageState>;
|
||||
|
||||
@@ -7,7 +7,7 @@ import styles from "./sidebar.module.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { cssNames } from "../../utils";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
import { SidebarItem } from "./sidebar-item";
|
||||
import type { CatalogEntityRegistry } from "../../api/catalog/entity/registry";
|
||||
import { SidebarCluster } from "./sidebar-cluster";
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import "./sub-header.scss";
|
||||
import React from "react";
|
||||
import type { SingleOrMany } from "../../utils";
|
||||
import { cssNames } from "../../utils";
|
||||
import type { SingleOrMany } from "@k8slens/utilities";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
|
||||
export interface SubHeaderProps {
|
||||
className?: string;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import "./sub-title.scss";
|
||||
import React from "react";
|
||||
import type { SingleOrMany } from "../../utils";
|
||||
import { cssNames } from "../../utils";
|
||||
import type { SingleOrMany } from "@k8slens/utilities";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
|
||||
export interface SubTitleProps {
|
||||
className?: string;
|
||||
|
||||
@@ -7,7 +7,7 @@ import "./tab-layout.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { cssNames } from "../../utils";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
import { Tab, Tabs } from "../tabs";
|
||||
import { ErrorBoundary } from "../error-boundary";
|
||||
import type { HierarchicalSidebarItem } from "./sidebar-items.injectable";
|
||||
|
||||
@@ -9,8 +9,8 @@ import type { ReactNode } from "react";
|
||||
import React from "react";
|
||||
import { matchPath, Redirect, Route, Switch } from "react-router";
|
||||
import { observer } from "mobx-react";
|
||||
import type { IClassName } from "../../utils";
|
||||
import { cssNames } from "../../utils";
|
||||
import type { IClassName } from "@k8slens/utilities";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
import { Tab, Tabs } from "../tabs";
|
||||
import { ErrorBoundary } from "../error-boundary";
|
||||
import type { ObservableHistory } from "mobx-observable-history";
|
||||
|
||||
@@ -12,7 +12,6 @@ import topBarStateInjectable from "./state.injectable";
|
||||
const startTopbarStateSyncInjectable = getInjectable({
|
||||
id: "start-topbar-state-sync",
|
||||
instantiate: (di) => ({
|
||||
id: "start-topbar-state-sync",
|
||||
run: () => {
|
||||
const state = di.inject(topBarStateInjectable);
|
||||
const ipcRenderer = di.inject(ipcRendererInjectable);
|
||||
|
||||
+1
-1
@@ -3,6 +3,6 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import toggleMaximizeWindowInjectable from "./toggle-maximize-window.injectable";
|
||||
import { getGlobalOverrideForFunction } from "../../../../../common/test-utils/get-global-override-for-function";
|
||||
import { getGlobalOverrideForFunction } from "@k8slens/test-utils";
|
||||
|
||||
export default getGlobalOverrideForFunction(toggleMaximizeWindowInjectable);
|
||||
+1
-1
@@ -3,6 +3,6 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import openAppContextMenuInjectable from "./open-app-context-menu.injectable";
|
||||
import { getGlobalOverrideForFunction } from "../../../../../../../common/test-utils/get-global-override-for-function";
|
||||
import { getGlobalOverrideForFunction } from "@k8slens/test-utils";
|
||||
|
||||
export default getGlobalOverrideForFunction(openAppContextMenuInjectable);
|
||||
+1
-1
@@ -3,6 +3,6 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import goBackInjectable from "./go-back.injectable";
|
||||
import { getGlobalOverrideForFunction } from "../../../../../../../common/test-utils/get-global-override-for-function";
|
||||
import { getGlobalOverrideForFunction } from "@k8slens/test-utils";
|
||||
|
||||
export default getGlobalOverrideForFunction(goBackInjectable);
|
||||
+1
-1
@@ -3,6 +3,6 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import goForwardInjectable from "./go-forward.injectable";
|
||||
import { getGlobalOverrideForFunction } from "../../../../../../../common/test-utils/get-global-override-for-function";
|
||||
import { getGlobalOverrideForFunction } from "@k8slens/test-utils";
|
||||
|
||||
export default getGlobalOverrideForFunction(goForwardInjectable);
|
||||
+1
-1
@@ -3,6 +3,6 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import closeWindowInjectable from "./close-window.injectable";
|
||||
import { getGlobalOverrideForFunction } from "../../../../../../../common/test-utils/get-global-override-for-function";
|
||||
import { getGlobalOverrideForFunction } from "@k8slens/test-utils";
|
||||
|
||||
export default getGlobalOverrideForFunction(closeWindowInjectable);
|
||||
+1
-1
@@ -3,6 +3,6 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import maximizeWindowInjectable from "./maximize-window.injectable";
|
||||
import { getGlobalOverrideForFunction } from "../../../../../../../common/test-utils/get-global-override-for-function";
|
||||
import { getGlobalOverrideForFunction } from "@k8slens/test-utils";
|
||||
|
||||
export default getGlobalOverrideForFunction(maximizeWindowInjectable);
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
import React from "react";
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import { cssNames } from "../../../../../utils";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
import styles from "../../top-bar.module.scss";
|
||||
import isLinuxInjectable from "../../../../../../common/vars/is-linux.injectable";
|
||||
import toggleMaximizeWindowInjectable from "../../toggle-maximize-window/toggle-maximize-window.injectable";
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
import "./wizard-layout.scss";
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import type { IClassName } from "../../utils";
|
||||
import { cssNames } from "../../utils";
|
||||
import type { IClassName } from "@k8slens/utilities";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
|
||||
export interface WizardLayoutProps extends React.DOMAttributes<any> {
|
||||
className?: IClassName;
|
||||
|
||||
Reference in new issue
Block a user