From dcf9de2694db78d3697a81fb11be9409dcbc5f4f Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 2 Mar 2023 10:36:43 -0500 Subject: [PATCH] Use new @k8slens/run-many package in core Signed-off-by: Sebastian Malton --- package-lock.json | 1 + packages/core/package.json | 1 + .../setup-runnables-after-window-is-opened.injectable.ts | 2 +- ...setup-runnables-before-closing-of-application.injectable.ts | 2 +- .../src/main/start-main-application/runnable-tokens/phases.ts | 2 +- .../root-frame-has-rendered/channel-listener.injectable.ts | 2 +- .../start-main-application.injectable.ts | 3 +-- packages/core/src/renderer/before-frame-starts/tokens.ts | 2 +- .../core/src/renderer/start-frame/start-frame.injectable.ts | 2 +- packages/utility-features/run-many/index.ts | 2 ++ 10 files changed, 11 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 73ea4d6410..ad1a9073d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32542,6 +32542,7 @@ }, "peerDependencies": { "@k8slens/application": "^6.5.0-alpha.0", + "@k8slens/run-many": "^1.0.0", "@k8slens/test-utils": "^1.0.0", "@k8slens/utilities": "^1.0.0", "@types/byline": "^4.2.33", diff --git a/packages/core/package.json b/packages/core/package.json index 29272aca72..468763de3b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -330,6 +330,7 @@ }, "peerDependencies": { "@k8slens/application": "^6.5.0-alpha.0", + "@k8slens/run-many": "^1.0.0", "@k8slens/test-utils": "^1.0.0", "@k8slens/utilities": "^1.0.0", "@types/byline": "^4.2.33", diff --git a/packages/core/src/main/electron-app/runnables/setup-runnables-after-window-is-opened.injectable.ts b/packages/core/src/main/electron-app/runnables/setup-runnables-after-window-is-opened.injectable.ts index 2d4461e423..a56e337e01 100644 --- a/packages/core/src/main/electron-app/runnables/setup-runnables-after-window-is-opened.injectable.ts +++ b/packages/core/src/main/electron-app/runnables/setup-runnables-after-window-is-opened.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { beforeElectronIsReadyInjectionToken, afterWindowIsOpenedInjectionToken } from "../../start-main-application/runnable-tokens/phases"; import electronAppInjectable from "../electron-app.injectable"; -import { runManyFor } from "../../../common/runnable/run-many-for"; +import { runManyFor } from "@k8slens/run-many"; const setupRunnablesAfterWindowIsOpenedInjectable = getInjectable({ id: "setup-runnables-after-window-is-opened", diff --git a/packages/core/src/main/electron-app/runnables/setup-runnables-before-closing-of-application.injectable.ts b/packages/core/src/main/electron-app/runnables/setup-runnables-before-closing-of-application.injectable.ts index d8cdbaa01b..6c72fced32 100644 --- a/packages/core/src/main/electron-app/runnables/setup-runnables-before-closing-of-application.injectable.ts +++ b/packages/core/src/main/electron-app/runnables/setup-runnables-before-closing-of-application.injectable.ts @@ -7,7 +7,7 @@ import { beforeElectronIsReadyInjectionToken, beforeQuitOfFrontEndInjectionToken import electronAppInjectable from "../electron-app.injectable"; import isIntegrationTestingInjectable from "../../../common/vars/is-integration-testing.injectable"; import autoUpdaterInjectable from "../features/auto-updater.injectable"; -import { runManySyncFor } from "../../../common/runnable/run-many-sync-for"; +import { runManySyncFor } from "@k8slens/run-many"; const setupRunnablesBeforeClosingOfApplicationInjectable = getInjectable({ id: "setup-closing-of-application", diff --git a/packages/core/src/main/start-main-application/runnable-tokens/phases.ts b/packages/core/src/main/start-main-application/runnable-tokens/phases.ts index b33d34f39a..26e2b62da1 100644 --- a/packages/core/src/main/start-main-application/runnable-tokens/phases.ts +++ b/packages/core/src/main/start-main-application/runnable-tokens/phases.ts @@ -4,7 +4,7 @@ */ import { getInjectionToken } from "@ogre-tools/injectable"; -import type { Runnable, RunnableSync } from "../../../common/runnable/types"; +import type { Runnable, RunnableSync } from "@k8slens/run-many"; /** * These tokens are here so that the importing of their respective dependencies diff --git a/packages/core/src/main/start-main-application/runnables/root-frame-has-rendered/channel-listener.injectable.ts b/packages/core/src/main/start-main-application/runnables/root-frame-has-rendered/channel-listener.injectable.ts index bef7b5a490..8b906c79e9 100644 --- a/packages/core/src/main/start-main-application/runnables/root-frame-has-rendered/channel-listener.injectable.ts +++ b/packages/core/src/main/start-main-application/runnables/root-frame-has-rendered/channel-listener.injectable.ts @@ -4,7 +4,7 @@ */ import { getMessageChannelListenerInjectable } from "../../../../common/utils/channel/message-channel-listener-injection-token"; import { rootFrameHasRenderedChannel } from "../../../../common/root-frame/root-frame-rendered-channel"; -import { runManyFor } from "../../../../common/runnable/run-many-for"; +import { runManyFor } from "@k8slens/run-many"; import { afterRootFrameIsReadyInjectionToken } from "../../runnable-tokens/phases"; const rootFrameRenderedChannelListenerInjectable = getMessageChannelListenerInjectable({ diff --git a/packages/core/src/main/start-main-application/start-main-application.injectable.ts b/packages/core/src/main/start-main-application/start-main-application.injectable.ts index 99689de0f0..7d7e12f695 100644 --- a/packages/core/src/main/start-main-application/start-main-application.injectable.ts +++ b/packages/core/src/main/start-main-application/start-main-application.injectable.ts @@ -4,8 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; -import { runManyFor } from "../../common/runnable/run-many-for"; -import { runManySyncFor } from "../../common/runnable/run-many-sync-for"; +import { runManyFor, runManySyncFor } from "@k8slens/run-many"; import * as phases from "./runnable-tokens/phases"; import waitForElectronToBeReadyInjectable from "../electron-app/features/wait-for-electron-to-be-ready.injectable"; diff --git a/packages/core/src/renderer/before-frame-starts/tokens.ts b/packages/core/src/renderer/before-frame-starts/tokens.ts index b73ca3d5df..26cbce9133 100644 --- a/packages/core/src/renderer/before-frame-starts/tokens.ts +++ b/packages/core/src/renderer/before-frame-starts/tokens.ts @@ -3,7 +3,7 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectionToken } from "@ogre-tools/injectable"; -import type { Runnable } from "../../common/runnable/types"; +import type { Runnable } from "@k8slens/run-many"; // NOTE: these are run before any other token, mostly to set up things that all other runnables need export const beforeFrameStartsFirstInjectionToken = getInjectionToken({ diff --git a/packages/core/src/renderer/start-frame/start-frame.injectable.ts b/packages/core/src/renderer/start-frame/start-frame.injectable.ts index 3f1934aa1c..b19e72e8d0 100644 --- a/packages/core/src/renderer/start-frame/start-frame.injectable.ts +++ b/packages/core/src/renderer/start-frame/start-frame.injectable.ts @@ -3,7 +3,7 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import { runManyFor } from "../../common/runnable/run-many-for"; +import { runManyFor } from "@k8slens/run-many"; import * as tokens from "../before-frame-starts/tokens"; import currentlyInClusterFrameInjectable from "../routes/currently-in-cluster-frame.injectable"; diff --git a/packages/utility-features/run-many/index.ts b/packages/utility-features/run-many/index.ts index 7944895d01..30f67f43d9 100644 --- a/packages/utility-features/run-many/index.ts +++ b/packages/utility-features/run-many/index.ts @@ -1,2 +1,4 @@ export * from "./src/run-many-for"; export * from "./src/run-many-sync-for"; + +export type { Runnable, RunnableSync, Run, RunSync } from "./src/types";