diff --git a/src/common/app-paths/app-paths-channel.injectable.ts b/src/common/app-paths/app-paths-channel.injectable.ts index fd93ed14d8..99fc738b41 100644 --- a/src/common/app-paths/app-paths-channel.injectable.ts +++ b/src/common/app-paths/app-paths-channel.injectable.ts @@ -4,8 +4,8 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import type { AppPaths } from "./app-path-injection-token"; -import type { RequestChannel } from "../channel/request-channel-injection-token"; -import { messageChannelInjectionToken } from "../channel/message-channel-injection-token"; +import type { RequestChannel } from "../utils/channel/request-channel-injection-token"; +import { messageChannelInjectionToken } from "../utils/channel/message-channel-injection-token"; export type AppPathsChannel = RequestChannel; diff --git a/src/common/application-update/application-update-status-channel.injectable.ts b/src/common/application-update/application-update-status-channel.injectable.ts index ef9b9ed14f..1365fd19af 100644 --- a/src/common/application-update/application-update-status-channel.injectable.ts +++ b/src/common/application-update/application-update-status-channel.injectable.ts @@ -3,8 +3,8 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import type { MessageChannel } from "../channel/message-channel-injection-token"; -import { messageChannelInjectionToken } from "../channel/message-channel-injection-token"; +import type { MessageChannel } from "../utils/channel/message-channel-injection-token"; +import { messageChannelInjectionToken } from "../utils/channel/message-channel-injection-token"; export type ApplicationUpdateStatusEventId = | "checking-for-updates" diff --git a/src/common/ask-boolean/ask-boolean-answer-channel.injectable.ts b/src/common/ask-boolean/ask-boolean-answer-channel.injectable.ts index 94f2277b5c..9901c04e30 100644 --- a/src/common/ask-boolean/ask-boolean-answer-channel.injectable.ts +++ b/src/common/ask-boolean/ask-boolean-answer-channel.injectable.ts @@ -3,8 +3,8 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import type { MessageChannel } from "../channel/message-channel-injection-token"; -import { messageChannelInjectionToken } from "../channel/message-channel-injection-token"; +import type { MessageChannel } from "../utils/channel/message-channel-injection-token"; +import { messageChannelInjectionToken } from "../utils/channel/message-channel-injection-token"; export type AskBooleanAnswerChannel = MessageChannel<{ id: string; value: boolean }>; diff --git a/src/common/ask-boolean/ask-boolean-question-channel.injectable.ts b/src/common/ask-boolean/ask-boolean-question-channel.injectable.ts index bae41372dd..664337158f 100644 --- a/src/common/ask-boolean/ask-boolean-question-channel.injectable.ts +++ b/src/common/ask-boolean/ask-boolean-question-channel.injectable.ts @@ -3,8 +3,8 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import type { MessageChannel } from "../channel/message-channel-injection-token"; -import { messageChannelInjectionToken } from "../channel/message-channel-injection-token"; +import type { MessageChannel } from "../utils/channel/message-channel-injection-token"; +import { messageChannelInjectionToken } from "../utils/channel/message-channel-injection-token"; // eslint-disable-next-line @typescript-eslint/consistent-type-definitions export type AskBooleanQuestionParameters = { id: string; title: string; question: string }; diff --git a/src/common/front-end-routing/app-navigation-channel.injectable.ts b/src/common/front-end-routing/app-navigation-channel.injectable.ts index 8dce3c6c0a..869fbfdecd 100644 --- a/src/common/front-end-routing/app-navigation-channel.injectable.ts +++ b/src/common/front-end-routing/app-navigation-channel.injectable.ts @@ -4,8 +4,8 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import { IpcRendererNavigationEvents } from "../../renderer/navigation/events"; -import type { MessageChannel } from "../channel/message-channel-injection-token"; -import { messageChannelInjectionToken } from "../channel/message-channel-injection-token"; +import type { MessageChannel } from "../utils/channel/message-channel-injection-token"; +import { messageChannelInjectionToken } from "../utils/channel/message-channel-injection-token"; export type AppNavigationChannel = MessageChannel; diff --git a/src/common/front-end-routing/cluster-frame-navigation-channel.injectable.ts b/src/common/front-end-routing/cluster-frame-navigation-channel.injectable.ts index 8e40d778c3..596bd6d351 100644 --- a/src/common/front-end-routing/cluster-frame-navigation-channel.injectable.ts +++ b/src/common/front-end-routing/cluster-frame-navigation-channel.injectable.ts @@ -4,8 +4,8 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import { IpcRendererNavigationEvents } from "../../renderer/navigation/events"; -import type { MessageChannel } from "../channel/message-channel-injection-token"; -import { messageChannelInjectionToken } from "../channel/message-channel-injection-token"; +import type { MessageChannel } from "../utils/channel/message-channel-injection-token"; +import { messageChannelInjectionToken } from "../utils/channel/message-channel-injection-token"; export type ClusterFrameNavigationChannel = MessageChannel; diff --git a/src/common/root-frame-rendered-channel/root-frame-rendered-channel.injectable.ts b/src/common/root-frame-rendered-channel/root-frame-rendered-channel.injectable.ts index 95ddf8fc60..a7787c6cc4 100644 --- a/src/common/root-frame-rendered-channel/root-frame-rendered-channel.injectable.ts +++ b/src/common/root-frame-rendered-channel/root-frame-rendered-channel.injectable.ts @@ -3,8 +3,8 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import type { MessageChannel } from "../channel/message-channel-injection-token"; -import { messageChannelInjectionToken } from "../channel/message-channel-injection-token"; +import type { MessageChannel } from "../utils/channel/message-channel-injection-token"; +import { messageChannelInjectionToken } from "../utils/channel/message-channel-injection-token"; export type RootFrameRenderedChannel = MessageChannel; diff --git a/src/common/channel/channel-injection-token.ts b/src/common/utils/channel/channel-injection-token.ts similarity index 100% rename from src/common/channel/channel-injection-token.ts rename to src/common/utils/channel/channel-injection-token.ts diff --git a/src/common/channel/channel.test.ts b/src/common/utils/channel/channel.test.ts similarity index 92% rename from src/common/channel/channel.test.ts rename to src/common/utils/channel/channel.test.ts index 72cf486e15..d8574dfc4c 100644 --- a/src/common/channel/channel.test.ts +++ b/src/common/utils/channel/channel.test.ts @@ -4,13 +4,13 @@ */ import type { DiContainer } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable"; -import type { LensWindow } from "../../main/start-main-application/lens-window/application-window/lens-window-injection-token"; -import { lensWindowInjectionToken } from "../../main/start-main-application/lens-window/application-window/lens-window-injection-token"; +import type { LensWindow } from "../../../main/start-main-application/lens-window/application-window/lens-window-injection-token"; +import { lensWindowInjectionToken } from "../../../main/start-main-application/lens-window/application-window/lens-window-injection-token"; import type { MessageToChannel } from "./message-to-channel-injection-token"; import { messageToChannelInjectionToken } from "./message-to-channel-injection-token"; -import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; -import createLensWindowInjectable from "../../main/start-main-application/lens-window/application-window/create-lens-window.injectable"; -import closeAllWindowsInjectable from "../../main/start-main-application/lens-window/hide-all-windows/close-all-windows.injectable"; +import { getApplicationBuilder } from "../../../renderer/components/test-utils/get-application-builder"; +import createLensWindowInjectable from "../../../main/start-main-application/lens-window/application-window/create-lens-window.injectable"; +import closeAllWindowsInjectable from "../../../main/start-main-application/lens-window/hide-all-windows/close-all-windows.injectable"; import { messageChannelListenerInjectionToken } from "./message-channel-listener-injection-token"; import type { MessageChannel } from "./message-channel-injection-token"; import type { RequestFromChannel } from "./request-from-channel-injection-token"; @@ -19,7 +19,7 @@ import type { RequestChannel } from "./request-channel-injection-token"; import { requestChannelListenerInjectionToken } from "./request-channel-listener-injection-token"; import type { AsyncFnMock } from "@async-fn/jest"; import asyncFn from "@async-fn/jest"; -import { getPromiseStatus } from "../test-utils/get-promise-status"; +import { getPromiseStatus } from "../../test-utils/get-promise-status"; type TestMessageChannel = MessageChannel; type TestRequestChannel = RequestChannel; diff --git a/src/common/channel/enlist-message-channel-listener-injection-token.ts b/src/common/utils/channel/enlist-message-channel-listener-injection-token.ts similarity index 100% rename from src/common/channel/enlist-message-channel-listener-injection-token.ts rename to src/common/utils/channel/enlist-message-channel-listener-injection-token.ts diff --git a/src/common/channel/enlist-request-channel-listener-injection-token.ts b/src/common/utils/channel/enlist-request-channel-listener-injection-token.ts similarity index 100% rename from src/common/channel/enlist-request-channel-listener-injection-token.ts rename to src/common/utils/channel/enlist-request-channel-listener-injection-token.ts diff --git a/src/common/channel/listening-of-channels.injectable.ts b/src/common/utils/channel/listening-of-channels.injectable.ts similarity index 93% rename from src/common/channel/listening-of-channels.injectable.ts rename to src/common/utils/channel/listening-of-channels.injectable.ts index 0a48772945..30fee42fb9 100644 --- a/src/common/channel/listening-of-channels.injectable.ts +++ b/src/common/utils/channel/listening-of-channels.injectable.ts @@ -3,8 +3,8 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import { getStartableStoppable } from "../utils/get-startable-stoppable"; -import { disposer } from "../utils"; +import { getStartableStoppable } from "../get-startable-stoppable"; +import { disposer } from "../index"; import { messageChannelListenerInjectionToken } from "./message-channel-listener-injection-token"; import { requestChannelListenerInjectionToken } from "./request-channel-listener-injection-token"; import { enlistMessageChannelListenerInjectionToken } from "./enlist-message-channel-listener-injection-token"; diff --git a/src/common/channel/message-channel-injection-token.ts b/src/common/utils/channel/message-channel-injection-token.ts similarity index 100% rename from src/common/channel/message-channel-injection-token.ts rename to src/common/utils/channel/message-channel-injection-token.ts diff --git a/src/common/channel/message-channel-listener-injection-token.ts b/src/common/utils/channel/message-channel-listener-injection-token.ts similarity index 100% rename from src/common/channel/message-channel-listener-injection-token.ts rename to src/common/utils/channel/message-channel-listener-injection-token.ts diff --git a/src/common/channel/message-to-channel-injection-token.ts b/src/common/utils/channel/message-to-channel-injection-token.ts similarity index 100% rename from src/common/channel/message-to-channel-injection-token.ts rename to src/common/utils/channel/message-to-channel-injection-token.ts diff --git a/src/common/channel/request-channel-injection-token.ts b/src/common/utils/channel/request-channel-injection-token.ts similarity index 100% rename from src/common/channel/request-channel-injection-token.ts rename to src/common/utils/channel/request-channel-injection-token.ts diff --git a/src/common/channel/request-channel-listener-injection-token.ts b/src/common/utils/channel/request-channel-listener-injection-token.ts similarity index 100% rename from src/common/channel/request-channel-listener-injection-token.ts rename to src/common/utils/channel/request-channel-listener-injection-token.ts diff --git a/src/common/channel/request-from-channel-injection-token.ts b/src/common/utils/channel/request-from-channel-injection-token.ts similarity index 100% rename from src/common/channel/request-from-channel-injection-token.ts rename to src/common/utils/channel/request-from-channel-injection-token.ts diff --git a/src/common/utils/sync-box/create-sync-box.injectable.ts b/src/common/utils/sync-box/create-sync-box.injectable.ts index 3e5ebbd827..2cf3de6a69 100644 --- a/src/common/utils/sync-box/create-sync-box.injectable.ts +++ b/src/common/utils/sync-box/create-sync-box.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; import syncBoxChannelInjectable from "./sync-box-channel.injectable"; -import { messageToChannelInjectionToken } from "../../channel/message-to-channel-injection-token"; +import { messageToChannelInjectionToken } from "../channel/message-to-channel-injection-token"; import syncBoxStateInjectable from "./sync-box-state.injectable"; import type { SyncBox } from "./sync-box-injection-token"; diff --git a/src/common/utils/sync-box/sync-box-channel-listener.injectable.ts b/src/common/utils/sync-box/sync-box-channel-listener.injectable.ts index 8e7c11fc44..b603c85997 100644 --- a/src/common/utils/sync-box/sync-box-channel-listener.injectable.ts +++ b/src/common/utils/sync-box/sync-box-channel-listener.injectable.ts @@ -6,8 +6,8 @@ import { getInjectable } from "@ogre-tools/injectable"; import type { SyncBoxChannel } from "./sync-box-channel.injectable"; import syncBoxChannelInjectable from "./sync-box-channel.injectable"; import syncBoxStateInjectable from "./sync-box-state.injectable"; -import type { MessageChannelListener } from "../../channel/message-channel-listener-injection-token"; -import { messageChannelListenerInjectionToken } from "../../channel/message-channel-listener-injection-token"; +import type { MessageChannelListener } from "../channel/message-channel-listener-injection-token"; +import { messageChannelListenerInjectionToken } from "../channel/message-channel-listener-injection-token"; const syncBoxChannelListenerInjectable = getInjectable({ id: "sync-box-channel-listener", diff --git a/src/common/utils/sync-box/sync-box-channel.injectable.ts b/src/common/utils/sync-box/sync-box-channel.injectable.ts index 83bf8aaab7..9389a99867 100644 --- a/src/common/utils/sync-box/sync-box-channel.injectable.ts +++ b/src/common/utils/sync-box/sync-box-channel.injectable.ts @@ -3,8 +3,8 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import type { MessageChannel } from "../../channel/message-channel-injection-token"; -import { messageChannelInjectionToken } from "../../channel/message-channel-injection-token"; +import type { MessageChannel } from "../channel/message-channel-injection-token"; +import { messageChannelInjectionToken } from "../channel/message-channel-injection-token"; export type SyncBoxChannel = MessageChannel<{ id: string; value: any }>; diff --git a/src/common/utils/sync-box/sync-box-initial-value-channel.injectable.ts b/src/common/utils/sync-box/sync-box-initial-value-channel.injectable.ts index fa9c740d9d..89374c3565 100644 --- a/src/common/utils/sync-box/sync-box-initial-value-channel.injectable.ts +++ b/src/common/utils/sync-box/sync-box-initial-value-channel.injectable.ts @@ -3,8 +3,8 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import type { RequestChannel } from "../../channel/request-channel-injection-token"; -import { requestChannelInjectionToken } from "../../channel/request-channel-injection-token"; +import type { RequestChannel } from "../channel/request-channel-injection-token"; +import { requestChannelInjectionToken } from "../channel/request-channel-injection-token"; export type SyncBoxInitialValueChannel = RequestChannel< void, diff --git a/src/main/app-paths/app-paths-request-channel-listener.injectable.ts b/src/main/app-paths/app-paths-request-channel-listener.injectable.ts index 3fd3aec572..3bd0c95bf7 100644 --- a/src/main/app-paths/app-paths-request-channel-listener.injectable.ts +++ b/src/main/app-paths/app-paths-request-channel-listener.injectable.ts @@ -3,8 +3,8 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import type { RequestChannelListener } from "../../common/channel/request-channel-listener-injection-token"; -import { requestChannelListenerInjectionToken } from "../../common/channel/request-channel-listener-injection-token"; +import type { RequestChannelListener } from "../../common/utils/channel/request-channel-listener-injection-token"; +import { requestChannelListenerInjectionToken } from "../../common/utils/channel/request-channel-listener-injection-token"; import type { AppPathsChannel } from "../../common/app-paths/app-paths-channel.injectable"; import appPathsChannelInjectable from "../../common/app-paths/app-paths-channel.injectable"; import appPathsInjectable from "../../common/app-paths/app-paths.injectable"; diff --git a/src/main/application-update/check-for-updates/broadcast-change-in-updating-status.injectable.ts b/src/main/application-update/check-for-updates/broadcast-change-in-updating-status.injectable.ts index d74fde169e..7e9257e966 100644 --- a/src/main/application-update/check-for-updates/broadcast-change-in-updating-status.injectable.ts +++ b/src/main/application-update/check-for-updates/broadcast-change-in-updating-status.injectable.ts @@ -4,7 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import type { ApplicationUpdateStatusChannelMessage } from "../../../common/application-update/application-update-status-channel.injectable"; -import { messageToChannelInjectionToken } from "../../../common/channel/message-to-channel-injection-token"; +import { messageToChannelInjectionToken } from "../../../common/utils/channel/message-to-channel-injection-token"; import applicationUpdateStatusChannelInjectable from "../../../common/application-update/application-update-status-channel.injectable"; const broadcastChangeInUpdatingStatusInjectable = getInjectable({ diff --git a/src/main/ask-boolean/ask-boolean-answer-channel-listener.injectable.ts b/src/main/ask-boolean/ask-boolean-answer-channel-listener.injectable.ts index 99f04f2f08..06bc3972eb 100644 --- a/src/main/ask-boolean/ask-boolean-answer-channel-listener.injectable.ts +++ b/src/main/ask-boolean/ask-boolean-answer-channel-listener.injectable.ts @@ -6,8 +6,8 @@ import { getInjectable } from "@ogre-tools/injectable"; import type { AskBooleanAnswerChannel } from "../../common/ask-boolean/ask-boolean-answer-channel.injectable"; import askBooleanAnswerChannelInjectable from "../../common/ask-boolean/ask-boolean-answer-channel.injectable"; import askBooleanPromiseInjectable from "./ask-boolean-promise.injectable"; -import type { MessageChannelListener } from "../../common/channel/message-channel-listener-injection-token"; -import { messageChannelListenerInjectionToken } from "../../common/channel/message-channel-listener-injection-token"; +import type { MessageChannelListener } from "../../common/utils/channel/message-channel-listener-injection-token"; +import { messageChannelListenerInjectionToken } from "../../common/utils/channel/message-channel-listener-injection-token"; const askBooleanAnswerChannelListenerInjectable = getInjectable({ diff --git a/src/main/ask-boolean/ask-boolean.injectable.ts b/src/main/ask-boolean/ask-boolean.injectable.ts index 8bdef37342..1fa54629b2 100644 --- a/src/main/ask-boolean/ask-boolean.injectable.ts +++ b/src/main/ask-boolean/ask-boolean.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 { messageToChannelInjectionToken } from "../../common/channel/message-to-channel-injection-token"; +import { messageToChannelInjectionToken } from "../../common/utils/channel/message-to-channel-injection-token"; import askBooleanQuestionChannelInjectable from "../../common/ask-boolean/ask-boolean-question-channel.injectable"; import askBooleanPromiseInjectable from "./ask-boolean-promise.injectable"; import getRandomIdInjectable from "../../common/utils/get-random-id.injectable"; diff --git a/src/main/getDiForUnitTesting.ts b/src/main/getDiForUnitTesting.ts index a2b27cfeb9..543ba91e60 100644 --- a/src/main/getDiForUnitTesting.ts +++ b/src/main/getDiForUnitTesting.ts @@ -64,7 +64,7 @@ import type { ClusterFrameInfo } from "../common/cluster-frames"; import { observable } from "mobx"; import waitForElectronToBeReadyInjectable from "./electron-app/features/wait-for-electron-to-be-ready.injectable"; import setupListenerForCurrentClusterFrameInjectable from "./start-main-application/lens-window/current-cluster-frame/setup-listener-for-current-cluster-frame.injectable"; -import ipcMainInjectable from "./channel/ipc-main/ipc-main.injectable"; +import ipcMainInjectable from "./utils/channel/ipc-main/ipc-main.injectable"; import createElectronWindowForInjectable from "./start-main-application/lens-window/application-window/create-electron-window-for.injectable"; import setupRunnablesAfterWindowIsOpenedInjectable from "./electron-app/runnables/setup-runnables-after-window-is-opened.injectable"; import sendToChannelInElectronBrowserWindowInjectable from "./start-main-application/lens-window/application-window/send-to-channel-in-electron-browser-window.injectable"; diff --git a/src/main/start-main-application/lens-window/application-window/application-window.injectable.ts b/src/main/start-main-application/lens-window/application-window/application-window.injectable.ts index aa67efb2b0..c63191c71c 100644 --- a/src/main/start-main-application/lens-window/application-window/application-window.injectable.ts +++ b/src/main/start-main-application/lens-window/application-window/application-window.injectable.ts @@ -11,7 +11,7 @@ import appNameInjectable from "../../../app-paths/app-name/app-name.injectable"; import appEventBusInjectable from "../../../../common/app-event-bus/app-event-bus.injectable"; import { delay } from "../../../../common/utils"; import { bundledExtensionsLoaded } from "../../../../common/ipc/extension-handling"; -import ipcMainInjectable from "../../../channel/ipc-main/ipc-main.injectable"; +import ipcMainInjectable from "../../../utils/channel/ipc-main/ipc-main.injectable"; const applicationWindowInjectable = getInjectable({ id: "application-window", diff --git a/src/main/start-main-application/runnables/root-frame-rendered-channel-listener/root-frame-rendered-channel-listener.injectable.ts b/src/main/start-main-application/runnables/root-frame-rendered-channel-listener/root-frame-rendered-channel-listener.injectable.ts index fb84799341..83ebf7bf91 100644 --- a/src/main/start-main-application/runnables/root-frame-rendered-channel-listener/root-frame-rendered-channel-listener.injectable.ts +++ b/src/main/start-main-application/runnables/root-frame-rendered-channel-listener/root-frame-rendered-channel-listener.injectable.ts @@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import rootFrameRenderedChannelInjectable from "../../../../common/root-frame-rendered-channel/root-frame-rendered-channel.injectable"; import { runManyFor } from "../../../../common/runnable/run-many-for"; import { afterRootFrameIsReadyInjectionToken } from "../../runnable-tokens/after-root-frame-is-ready-injection-token"; -import { messageChannelListenerInjectionToken } from "../../../../common/channel/message-channel-listener-injection-token"; +import { messageChannelListenerInjectionToken } from "../../../../common/utils/channel/message-channel-listener-injection-token"; const rootFrameRenderedChannelListenerInjectable = getInjectable({ id: "root-frame-rendered-channel-listener", diff --git a/src/main/channel/channel-listeners/enlist-message-channel-listener.injectable.ts b/src/main/utils/channel/channel-listeners/enlist-message-channel-listener.injectable.ts similarity index 87% rename from src/main/channel/channel-listeners/enlist-message-channel-listener.injectable.ts rename to src/main/utils/channel/channel-listeners/enlist-message-channel-listener.injectable.ts index 3315760857..6b7fa9b8df 100644 --- a/src/main/channel/channel-listeners/enlist-message-channel-listener.injectable.ts +++ b/src/main/utils/channel/channel-listeners/enlist-message-channel-listener.injectable.ts @@ -5,9 +5,9 @@ import { getInjectable } from "@ogre-tools/injectable"; import type { IpcMainEvent } from "electron"; import ipcMainInjectable from "../ipc-main/ipc-main.injectable"; -import { enlistMessageChannelListenerInjectionToken } from "../../../common/channel/enlist-message-channel-listener-injection-token"; +import { enlistMessageChannelListenerInjectionToken } from "../../../../common/utils/channel/enlist-message-channel-listener-injection-token"; import { pipeline } from "@ogre-tools/fp"; -import { tentativeParseJson } from "../../../common/utils/tentative-parse-json"; +import { tentativeParseJson } from "../../../../common/utils/tentative-parse-json"; const enlistMessageChannelListenerInjectable = getInjectable({ id: "enlist-message-channel-listener-for-main", diff --git a/src/main/channel/channel-listeners/enlist-message-channel-listener.test.ts b/src/main/utils/channel/channel-listeners/enlist-message-channel-listener.test.ts similarity index 91% rename from src/main/channel/channel-listeners/enlist-message-channel-listener.test.ts rename to src/main/utils/channel/channel-listeners/enlist-message-channel-listener.test.ts index 8299d91d11..3bd0398d8e 100644 --- a/src/main/channel/channel-listeners/enlist-message-channel-listener.test.ts +++ b/src/main/utils/channel/channel-listeners/enlist-message-channel-listener.test.ts @@ -2,10 +2,10 @@ * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ -import { getDiForUnitTesting } from "../../getDiForUnitTesting"; +import { getDiForUnitTesting } from "../../../getDiForUnitTesting"; import ipcMainInjectable from "../ipc-main/ipc-main.injectable"; -import type { EnlistMessageChannelListener } from "../../../common/channel/enlist-message-channel-listener-injection-token"; -import { enlistMessageChannelListenerInjectionToken } from "../../../common/channel/enlist-message-channel-listener-injection-token"; +import type { EnlistMessageChannelListener } from "../../../../common/utils/channel/enlist-message-channel-listener-injection-token"; +import { enlistMessageChannelListenerInjectionToken } from "../../../../common/utils/channel/enlist-message-channel-listener-injection-token"; import type { IpcMain, IpcMainEvent } from "electron"; describe("enlist message channel listener in main", () => { diff --git a/src/main/channel/channel-listeners/enlist-request-channel-listener.injectable.ts b/src/main/utils/channel/channel-listeners/enlist-request-channel-listener.injectable.ts similarity index 81% rename from src/main/channel/channel-listeners/enlist-request-channel-listener.injectable.ts rename to src/main/utils/channel/channel-listeners/enlist-request-channel-listener.injectable.ts index 2ca6d9aa71..6f118288f3 100644 --- a/src/main/channel/channel-listeners/enlist-request-channel-listener.injectable.ts +++ b/src/main/utils/channel/channel-listeners/enlist-request-channel-listener.injectable.ts @@ -5,10 +5,10 @@ import { getInjectable } from "@ogre-tools/injectable"; import type { IpcMainInvokeEvent } from "electron"; import ipcMainInjectable from "../ipc-main/ipc-main.injectable"; -import { enlistRequestChannelListenerInjectionToken } from "../../../common/channel/enlist-request-channel-listener-injection-token"; +import { enlistRequestChannelListenerInjectionToken } from "../../../../common/utils/channel/enlist-request-channel-listener-injection-token"; import { pipeline } from "@ogre-tools/fp"; -import { tentativeParseJson } from "../../../common/utils/tentative-parse-json"; -import { tentativeStringifyJson } from "../../../common/utils/tentative-stringify-json"; +import { tentativeParseJson } from "../../../../common/utils/tentative-parse-json"; +import { tentativeStringifyJson } from "../../../../common/utils/tentative-stringify-json"; const enlistRequestChannelListenerInjectable = getInjectable({ id: "enlist-request-channel-listener-for-main", diff --git a/src/main/channel/channel-listeners/enlist-request-channel-listener.test.ts b/src/main/utils/channel/channel-listeners/enlist-request-channel-listener.test.ts similarity index 92% rename from src/main/channel/channel-listeners/enlist-request-channel-listener.test.ts rename to src/main/utils/channel/channel-listeners/enlist-request-channel-listener.test.ts index 719c288a17..12a5e9af74 100644 --- a/src/main/channel/channel-listeners/enlist-request-channel-listener.test.ts +++ b/src/main/utils/channel/channel-listeners/enlist-request-channel-listener.test.ts @@ -2,12 +2,12 @@ * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ -import { getDiForUnitTesting } from "../../getDiForUnitTesting"; +import { getDiForUnitTesting } from "../../../getDiForUnitTesting"; import ipcMainInjectable from "../ipc-main/ipc-main.injectable"; import type { IpcMain, IpcMainInvokeEvent } from "electron"; -import type { EnlistRequestChannelListener } from "../../../common/channel/enlist-request-channel-listener-injection-token"; -import { enlistRequestChannelListenerInjectionToken } from "../../../common/channel/enlist-request-channel-listener-injection-token"; -import { getPromiseStatus } from "../../../common/test-utils/get-promise-status"; +import type { EnlistRequestChannelListener } from "../../../../common/utils/channel/enlist-request-channel-listener-injection-token"; +import { enlistRequestChannelListenerInjectionToken } from "../../../../common/utils/channel/enlist-request-channel-listener-injection-token"; +import { getPromiseStatus } from "../../../../common/test-utils/get-promise-status"; import type { AsyncFnMock } from "@async-fn/jest"; import asyncFn from "@async-fn/jest"; diff --git a/src/main/channel/channel-listeners/start-listening-of-channels.injectable.ts b/src/main/utils/channel/channel-listeners/start-listening-of-channels.injectable.ts similarity index 71% rename from src/main/channel/channel-listeners/start-listening-of-channels.injectable.ts rename to src/main/utils/channel/channel-listeners/start-listening-of-channels.injectable.ts index 0b50e6e58b..96fea0a2f0 100644 --- a/src/main/channel/channel-listeners/start-listening-of-channels.injectable.ts +++ b/src/main/utils/channel/channel-listeners/start-listening-of-channels.injectable.ts @@ -3,8 +3,8 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import { onLoadOfApplicationInjectionToken } from "../../start-main-application/runnable-tokens/on-load-of-application-injection-token"; -import listeningOfChannelsInjectable from "../../../common/channel/listening-of-channels.injectable"; +import { onLoadOfApplicationInjectionToken } from "../../../start-main-application/runnable-tokens/on-load-of-application-injection-token"; +import listeningOfChannelsInjectable from "../../../../common/utils/channel/listening-of-channels.injectable"; const startListeningOfChannelsInjectable = getInjectable({ id: "start-listening-of-channels-main", diff --git a/src/main/channel/ipc-main/ipc-main.injectable.ts b/src/main/utils/channel/ipc-main/ipc-main.injectable.ts similarity index 100% rename from src/main/channel/ipc-main/ipc-main.injectable.ts rename to src/main/utils/channel/ipc-main/ipc-main.injectable.ts diff --git a/src/main/channel/message-to-channel.injectable.ts b/src/main/utils/channel/message-to-channel.injectable.ts similarity index 72% rename from src/main/channel/message-to-channel.injectable.ts rename to src/main/utils/channel/message-to-channel.injectable.ts index 8d423da307..00e588a16a 100644 --- a/src/main/channel/message-to-channel.injectable.ts +++ b/src/main/utils/channel/message-to-channel.injectable.ts @@ -2,13 +2,13 @@ * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ -import { lensWindowInjectionToken } from "../start-main-application/lens-window/application-window/lens-window-injection-token"; +import { lensWindowInjectionToken } from "../../start-main-application/lens-window/application-window/lens-window-injection-token"; import { pipeline } from "@ogre-tools/fp"; import { getInjectable } from "@ogre-tools/injectable"; import { filter } from "lodash/fp"; -import { messageToChannelInjectionToken } from "../../common/channel/message-to-channel-injection-token"; -import type { MessageChannel } from "../../common/channel/message-channel-injection-token"; -import { tentativeStringifyJson } from "../../common/utils/tentative-stringify-json"; +import { messageToChannelInjectionToken } from "../../../common/utils/channel/message-to-channel-injection-token"; +import type { MessageChannel } from "../../../common/utils/channel/message-channel-injection-token"; +import { tentativeStringifyJson } from "../../../common/utils/tentative-stringify-json"; const messageToChannelInjectable = getInjectable({ id: "message-to-channel", diff --git a/src/main/channel/message-to-channel.test.ts b/src/main/utils/channel/message-to-channel.test.ts similarity index 80% rename from src/main/channel/message-to-channel.test.ts rename to src/main/utils/channel/message-to-channel.test.ts index c5829ea596..5871f8107c 100644 --- a/src/main/channel/message-to-channel.test.ts +++ b/src/main/utils/channel/message-to-channel.test.ts @@ -3,17 +3,17 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ -import type { MessageToChannel } from "../../common/channel/message-to-channel-injection-token"; -import { messageToChannelInjectionToken } from "../../common/channel/message-to-channel-injection-token"; -import closeAllWindowsInjectable from "../start-main-application/lens-window/hide-all-windows/close-all-windows.injectable"; -import type { MessageChannel } from "../../common/channel/message-channel-injection-token"; -import { getDiForUnitTesting } from "../getDiForUnitTesting"; -import createLensWindowInjectable from "../start-main-application/lens-window/application-window/create-lens-window.injectable"; -import type { LensWindow } from "../start-main-application/lens-window/application-window/lens-window-injection-token"; -import { lensWindowInjectionToken } from "../start-main-application/lens-window/application-window/lens-window-injection-token"; +import type { MessageToChannel } from "../../../common/utils/channel/message-to-channel-injection-token"; +import { messageToChannelInjectionToken } from "../../../common/utils/channel/message-to-channel-injection-token"; +import closeAllWindowsInjectable from "../../start-main-application/lens-window/hide-all-windows/close-all-windows.injectable"; +import type { MessageChannel } from "../../../common/utils/channel/message-channel-injection-token"; +import { getDiForUnitTesting } from "../../getDiForUnitTesting"; +import createLensWindowInjectable from "../../start-main-application/lens-window/application-window/create-lens-window.injectable"; +import type { LensWindow } from "../../start-main-application/lens-window/application-window/lens-window-injection-token"; +import { lensWindowInjectionToken } from "../../start-main-application/lens-window/application-window/lens-window-injection-token"; import type { DiContainer } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable"; -import sendToChannelInElectronBrowserWindowInjectable from "../start-main-application/lens-window/application-window/send-to-channel-in-electron-browser-window.injectable"; +import sendToChannelInElectronBrowserWindowInjectable from "../../start-main-application/lens-window/application-window/send-to-channel-in-electron-browser-window.injectable"; describe("message to channel from main", () => { let messageToChannel: MessageToChannel; diff --git a/src/main/utils/sync-box/sync-box-initial-value-channel-listener.injectable.ts b/src/main/utils/sync-box/sync-box-initial-value-channel-listener.injectable.ts index 7a1fb04cda..5eb043291a 100644 --- a/src/main/utils/sync-box/sync-box-initial-value-channel-listener.injectable.ts +++ b/src/main/utils/sync-box/sync-box-initial-value-channel-listener.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import syncBoxInitialValueChannelInjectable from "../../../common/utils/sync-box/sync-box-initial-value-channel.injectable"; import { syncBoxInjectionToken } from "../../../common/utils/sync-box/sync-box-injection-token"; -import { requestChannelListenerInjectionToken } from "../../../common/channel/request-channel-listener-injection-token"; +import { requestChannelListenerInjectionToken } from "../../../common/utils/channel/request-channel-listener-injection-token"; const syncBoxInitialValueChannelListenerInjectable = getInjectable({ id: "sync-box-initial-value-channel-listener", diff --git a/src/renderer/app-paths/setup-app-paths.injectable.ts b/src/renderer/app-paths/setup-app-paths.injectable.ts index efdfaede70..14242347f4 100644 --- a/src/renderer/app-paths/setup-app-paths.injectable.ts +++ b/src/renderer/app-paths/setup-app-paths.injectable.ts @@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import appPathsStateInjectable from "../../common/app-paths/app-paths-state.injectable"; import { beforeFrameStartsInjectionToken } from "../before-frame-starts/before-frame-starts-injection-token"; import appPathsChannelInjectable from "../../common/app-paths/app-paths-channel.injectable"; -import { requestFromChannelInjectionToken } from "../../common/channel/request-from-channel-injection-token"; +import { requestFromChannelInjectionToken } from "../../common/utils/channel/request-from-channel-injection-token"; const setupAppPathsInjectable = getInjectable({ id: "setup-app-paths", diff --git a/src/renderer/application-update/application-update-status-listener.injectable.ts b/src/renderer/application-update/application-update-status-listener.injectable.ts index 11fe329e4f..69ba23608c 100644 --- a/src/renderer/application-update/application-update-status-listener.injectable.ts +++ b/src/renderer/application-update/application-update-status-listener.injectable.ts @@ -6,8 +6,8 @@ import { getInjectable } from "@ogre-tools/injectable"; import type { ApplicationUpdateStatusChannel, ApplicationUpdateStatusEventId } from "../../common/application-update/application-update-status-channel.injectable"; import applicationUpdateStatusChannelInjectable from "../../common/application-update/application-update-status-channel.injectable"; import showInfoNotificationInjectable from "../components/notifications/show-info-notification.injectable"; -import type { MessageChannelListener } from "../../common/channel/message-channel-listener-injection-token"; -import { messageChannelListenerInjectionToken } from "../../common/channel/message-channel-listener-injection-token"; +import type { MessageChannelListener } from "../../common/utils/channel/message-channel-listener-injection-token"; +import { messageChannelListenerInjectionToken } from "../../common/utils/channel/message-channel-listener-injection-token"; const applicationUpdateStatusListenerInjectable = getInjectable({ id: "application-update-status-listener", diff --git a/src/renderer/ask-boolean/ask-boolean-question-channel-listener.injectable.tsx b/src/renderer/ask-boolean/ask-boolean-question-channel-listener.injectable.tsx index 6e9460fac8..5e9adff4cc 100644 --- a/src/renderer/ask-boolean/ask-boolean-question-channel-listener.injectable.tsx +++ b/src/renderer/ask-boolean/ask-boolean-question-channel-listener.injectable.tsx @@ -8,11 +8,11 @@ import askBooleanQuestionChannelInjectable from "../../common/ask-boolean/ask-bo import showInfoNotificationInjectable from "../components/notifications/show-info-notification.injectable"; import { Button } from "../components/button"; import React from "react"; -import { messageToChannelInjectionToken } from "../../common/channel/message-to-channel-injection-token"; +import { messageToChannelInjectionToken } from "../../common/utils/channel/message-to-channel-injection-token"; import askBooleanAnswerChannelInjectable from "../../common/ask-boolean/ask-boolean-answer-channel.injectable"; import notificationsStoreInjectable from "../components/notifications/notifications-store.injectable"; -import type { MessageChannelListener } from "../../common/channel/message-channel-listener-injection-token"; -import { messageChannelListenerInjectionToken } from "../../common/channel/message-channel-listener-injection-token"; +import type { MessageChannelListener } from "../../common/utils/channel/message-channel-listener-injection-token"; +import { messageChannelListenerInjectionToken } from "../../common/utils/channel/message-channel-listener-injection-token"; const askBooleanQuestionChannelListenerInjectable = getInjectable({ id: "ask-boolean-question-channel-listener", diff --git a/src/renderer/frames/root-frame/broadcast-that-root-frame-is-rendered.injectable.ts b/src/renderer/frames/root-frame/broadcast-that-root-frame-is-rendered.injectable.ts index b94cbb8f1c..e6493e2832 100644 --- a/src/renderer/frames/root-frame/broadcast-that-root-frame-is-rendered.injectable.ts +++ b/src/renderer/frames/root-frame/broadcast-that-root-frame-is-rendered.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 { messageToChannelInjectionToken } from "../../../common/channel/message-to-channel-injection-token"; +import { messageToChannelInjectionToken } from "../../../common/utils/channel/message-to-channel-injection-token"; import rootFrameIsRenderedChannelInjectable from "../../../common/root-frame-rendered-channel/root-frame-rendered-channel.injectable"; const broadcastThatRootFrameIsRenderedInjectable = getInjectable({ diff --git a/src/renderer/frames/root-frame/init-root-frame/init-root-frame.injectable.ts b/src/renderer/frames/root-frame/init-root-frame/init-root-frame.injectable.ts index a2182eee66..b77ed399fc 100644 --- a/src/renderer/frames/root-frame/init-root-frame/init-root-frame.injectable.ts +++ b/src/renderer/frames/root-frame/init-root-frame/init-root-frame.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { initRootFrame } from "./init-root-frame"; import extensionLoaderInjectable from "../../../../extensions/extension-loader/extension-loader.injectable"; -import ipcRendererInjectable from "../../../channel/ipc-renderer.injectable"; +import ipcRendererInjectable from "../../../utils/channel/ipc-renderer.injectable"; import bindProtocolAddRouteHandlersInjectable from "../../../protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.injectable"; import lensProtocolRouterRendererInjectable from "../../../protocol-handler/lens-protocol-router-renderer/lens-protocol-router-renderer.injectable"; import catalogEntityRegistryInjectable from "../../../api/catalog/entity/registry.injectable"; diff --git a/src/renderer/getDiForUnitTesting.tsx b/src/renderer/getDiForUnitTesting.tsx index 7135028391..3d89322cdf 100644 --- a/src/renderer/getDiForUnitTesting.tsx +++ b/src/renderer/getDiForUnitTesting.tsx @@ -7,7 +7,7 @@ import glob from "glob"; import { memoize, noop } from "lodash/fp"; import { createContainer } from "@ogre-tools/injectable"; import { Environments, setLegacyGlobalDiForExtensionApi } from "../extensions/as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api"; -import requestFromChannelInjectable from "./channel/request-from-channel.injectable"; +import requestFromChannelInjectable from "./utils/channel/request-from-channel.injectable"; import loggerInjectable from "../common/logger.injectable"; import { overrideFsWithFakes } from "../test-utils/override-fs-with-fakes"; import { createMemoryHistory } from "history"; @@ -36,7 +36,7 @@ import { ApiManager } from "../common/k8s-api/api-manager"; import lensResourcesDirInjectable from "../common/vars/lens-resources-dir.injectable"; import broadcastMessageInjectable from "../common/ipc/broadcast-message.injectable"; import apiManagerInjectable from "../common/k8s-api/api-manager/manager.injectable"; -import ipcRendererInjectable from "./channel/ipc-renderer.injectable"; +import ipcRendererInjectable from "./utils/channel/ipc-renderer.injectable"; import type { IpcRenderer } from "electron"; import setupOnApiErrorListenersInjectable from "./api/setup-on-api-errors.injectable"; import { observable } from "mobx"; diff --git a/src/renderer/navigation/navigation-channel-listener.injectable.ts b/src/renderer/navigation/navigation-channel-listener.injectable.ts index 94817078dd..3a17451071 100644 --- a/src/renderer/navigation/navigation-channel-listener.injectable.ts +++ b/src/renderer/navigation/navigation-channel-listener.injectable.ts @@ -8,7 +8,7 @@ import appNavigationChannelInjectable from "../../common/front-end-routing/app-n import clusterFrameNavigationChannelInjectable from "../../common/front-end-routing/cluster-frame-navigation-channel.injectable"; import focusWindowInjectable from "./focus-window.injectable"; import { navigateToUrlInjectionToken } from "../../common/front-end-routing/navigate-to-url-injection-token"; -import { messageChannelListenerInjectionToken } from "../../common/channel/message-channel-listener-injection-token"; +import { messageChannelListenerInjectionToken } from "../../common/utils/channel/message-channel-listener-injection-token"; const navigationChannelListenerInjectable = getInjectable({ id: "navigation-channel-listener", diff --git a/src/renderer/themes/store.injectable.ts b/src/renderer/themes/store.injectable.ts index c2e517c9a4..a67075584e 100644 --- a/src/renderer/themes/store.injectable.ts +++ b/src/renderer/themes/store.injectable.ts @@ -4,7 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import userStoreInjectable from "../../common/user-store/user-store.injectable"; -import ipcRendererInjectable from "../channel/ipc-renderer.injectable"; +import ipcRendererInjectable from "../utils/channel/ipc-renderer.injectable"; import { ThemeStore } from "./store"; const themeStoreInjectable = getInjectable({ diff --git a/src/renderer/channel/channel-listeners/enlist-message-channel-listener.injectable.ts b/src/renderer/utils/channel/channel-listeners/enlist-message-channel-listener.injectable.ts similarity index 87% rename from src/renderer/channel/channel-listeners/enlist-message-channel-listener.injectable.ts rename to src/renderer/utils/channel/channel-listeners/enlist-message-channel-listener.injectable.ts index 23dbf90602..6d76e35340 100644 --- a/src/renderer/channel/channel-listeners/enlist-message-channel-listener.injectable.ts +++ b/src/renderer/utils/channel/channel-listeners/enlist-message-channel-listener.injectable.ts @@ -5,8 +5,8 @@ import ipcRendererInjectable from "../ipc-renderer.injectable"; import { getInjectable } from "@ogre-tools/injectable"; import type { IpcRendererEvent } from "electron"; -import { enlistMessageChannelListenerInjectionToken } from "../../../common/channel/enlist-message-channel-listener-injection-token"; -import { tentativeParseJson } from "../../../common/utils/tentative-parse-json"; +import { enlistMessageChannelListenerInjectionToken } from "../../../../common/utils/channel/enlist-message-channel-listener-injection-token"; +import { tentativeParseJson } from "../../../../common/utils/tentative-parse-json"; import { pipeline } from "@ogre-tools/fp"; const enlistMessageChannelListenerInjectable = getInjectable({ diff --git a/src/renderer/channel/channel-listeners/enlist-message-channel-listener.test.ts b/src/renderer/utils/channel/channel-listeners/enlist-message-channel-listener.test.ts similarity index 91% rename from src/renderer/channel/channel-listeners/enlist-message-channel-listener.test.ts rename to src/renderer/utils/channel/channel-listeners/enlist-message-channel-listener.test.ts index 316252808e..4653dcdd5d 100644 --- a/src/renderer/channel/channel-listeners/enlist-message-channel-listener.test.ts +++ b/src/renderer/utils/channel/channel-listeners/enlist-message-channel-listener.test.ts @@ -2,9 +2,9 @@ * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ -import { getDiForUnitTesting } from "../../getDiForUnitTesting"; -import type { EnlistMessageChannelListener } from "../../../common/channel/enlist-message-channel-listener-injection-token"; -import { enlistMessageChannelListenerInjectionToken } from "../../../common/channel/enlist-message-channel-listener-injection-token"; +import { getDiForUnitTesting } from "../../../getDiForUnitTesting"; +import type { EnlistMessageChannelListener } from "../../../../common/utils/channel/enlist-message-channel-listener-injection-token"; +import { enlistMessageChannelListenerInjectionToken } from "../../../../common/utils/channel/enlist-message-channel-listener-injection-token"; import type { IpcRendererEvent, IpcRenderer } from "electron"; import ipcRendererInjectable from "../ipc-renderer.injectable"; diff --git a/src/renderer/channel/channel-listeners/enlist-request-channel-listener.injectable.ts b/src/renderer/utils/channel/channel-listeners/enlist-request-channel-listener.injectable.ts similarity index 88% rename from src/renderer/channel/channel-listeners/enlist-request-channel-listener.injectable.ts rename to src/renderer/utils/channel/channel-listeners/enlist-request-channel-listener.injectable.ts index aa931a09ec..03253a06f2 100644 --- a/src/renderer/channel/channel-listeners/enlist-request-channel-listener.injectable.ts +++ b/src/renderer/utils/channel/channel-listeners/enlist-request-channel-listener.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 { enlistRequestChannelListenerInjectionToken } from "../../../common/channel/enlist-request-channel-listener-injection-token"; +import { enlistRequestChannelListenerInjectionToken } from "../../../../common/utils/channel/enlist-request-channel-listener-injection-token"; const enlistRequestChannelListenerInjectable = getInjectable({ id: "enlist-request-channel-listener-for-renderer", diff --git a/src/renderer/channel/channel-listeners/start-listening-of-channels.injectable.ts b/src/renderer/utils/channel/channel-listeners/start-listening-of-channels.injectable.ts similarity index 73% rename from src/renderer/channel/channel-listeners/start-listening-of-channels.injectable.ts rename to src/renderer/utils/channel/channel-listeners/start-listening-of-channels.injectable.ts index e5edd32159..c37c9b1864 100644 --- a/src/renderer/channel/channel-listeners/start-listening-of-channels.injectable.ts +++ b/src/renderer/utils/channel/channel-listeners/start-listening-of-channels.injectable.ts @@ -3,8 +3,8 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import { beforeFrameStartsInjectionToken } from "../../before-frame-starts/before-frame-starts-injection-token"; -import listeningOfChannelsInjectable from "../../../common/channel/listening-of-channels.injectable"; +import { beforeFrameStartsInjectionToken } from "../../../before-frame-starts/before-frame-starts-injection-token"; +import listeningOfChannelsInjectable from "../../../../common/utils/channel/listening-of-channels.injectable"; const startListeningOfChannelsInjectable = getInjectable({ id: "start-listening-of-channels-renderer", diff --git a/src/renderer/channel/ipc-renderer.injectable.ts b/src/renderer/utils/channel/ipc-renderer.injectable.ts similarity index 100% rename from src/renderer/channel/ipc-renderer.injectable.ts rename to src/renderer/utils/channel/ipc-renderer.injectable.ts diff --git a/src/renderer/channel/message-to-channel.injectable.ts b/src/renderer/utils/channel/message-to-channel.injectable.ts similarity index 78% rename from src/renderer/channel/message-to-channel.injectable.ts rename to src/renderer/utils/channel/message-to-channel.injectable.ts index d6082baac6..3e493fd322 100644 --- a/src/renderer/channel/message-to-channel.injectable.ts +++ b/src/renderer/utils/channel/message-to-channel.injectable.ts @@ -3,9 +3,9 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import { messageToChannelInjectionToken } from "../../common/channel/message-to-channel-injection-token"; +import { messageToChannelInjectionToken } from "../../../common/utils/channel/message-to-channel-injection-token"; import sendToMainInjectable from "./send-to-main.injectable"; -import type { MessageChannel } from "../../common/channel/message-channel-injection-token"; +import type { MessageChannel } from "../../../common/utils/channel/message-channel-injection-token"; const messageToChannelInjectable = getInjectable({ id: "message-to-channel", diff --git a/src/renderer/channel/message-to-channel.test.ts b/src/renderer/utils/channel/message-to-channel.test.ts similarity index 83% rename from src/renderer/channel/message-to-channel.test.ts rename to src/renderer/utils/channel/message-to-channel.test.ts index dfca81ccf5..443abfb0dc 100644 --- a/src/renderer/channel/message-to-channel.test.ts +++ b/src/renderer/utils/channel/message-to-channel.test.ts @@ -3,10 +3,10 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ -import type { MessageToChannel } from "../../common/channel/message-to-channel-injection-token"; -import type { MessageChannel } from "../../common/channel/message-channel-injection-token"; -import { getDiForUnitTesting } from "../getDiForUnitTesting"; -import { messageToChannelInjectionToken } from "../../common/channel/message-to-channel-injection-token"; +import type { MessageToChannel } from "../../../common/utils/channel/message-to-channel-injection-token"; +import type { MessageChannel } from "../../../common/utils/channel/message-channel-injection-token"; +import { getDiForUnitTesting } from "../../getDiForUnitTesting"; +import { messageToChannelInjectionToken } from "../../../common/utils/channel/message-to-channel-injection-token"; import ipcRendererInjectable from "./ipc-renderer.injectable"; import type { IpcRenderer } from "electron"; diff --git a/src/renderer/channel/request-from-channel.injectable.ts b/src/renderer/utils/channel/request-from-channel.injectable.ts similarity index 73% rename from src/renderer/channel/request-from-channel.injectable.ts rename to src/renderer/utils/channel/request-from-channel.injectable.ts index ca5757b9a2..f77287a2ed 100644 --- a/src/renderer/channel/request-from-channel.injectable.ts +++ b/src/renderer/utils/channel/request-from-channel.injectable.ts @@ -4,10 +4,10 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import ipcRendererInjectable from "./ipc-renderer.injectable"; -import { requestFromChannelInjectionToken } from "../../common/channel/request-from-channel-injection-token"; +import { requestFromChannelInjectionToken } from "../../../common/utils/channel/request-from-channel-injection-token"; import { pipeline } from "@ogre-tools/fp"; -import { tentativeStringifyJson } from "../../common/utils/tentative-stringify-json"; -import { tentativeParseJson } from "../../common/utils/tentative-parse-json"; +import { tentativeStringifyJson } from "../../../common/utils/tentative-stringify-json"; +import { tentativeParseJson } from "../../../common/utils/tentative-parse-json"; const requestFromChannelInjectable = getInjectable({ id: "request-from-channel", diff --git a/src/renderer/channel/request-from-channel.test.ts b/src/renderer/utils/channel/request-from-channel.test.ts similarity index 89% rename from src/renderer/channel/request-from-channel.test.ts rename to src/renderer/utils/channel/request-from-channel.test.ts index a6c7581042..d7b343bf02 100644 --- a/src/renderer/channel/request-from-channel.test.ts +++ b/src/renderer/utils/channel/request-from-channel.test.ts @@ -3,16 +3,16 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ -import type { MessageChannel } from "../../common/channel/message-channel-injection-token"; -import { getDiForUnitTesting } from "../getDiForUnitTesting"; +import type { MessageChannel } from "../../../common/utils/channel/message-channel-injection-token"; +import { getDiForUnitTesting } from "../../getDiForUnitTesting"; import ipcRendererInjectable from "./ipc-renderer.injectable"; import type { IpcRenderer } from "electron"; import type { AsyncFnMock } from "@async-fn/jest"; import asyncFn from "@async-fn/jest"; -import type { RequestFromChannel } from "../../common/channel/request-from-channel-injection-token"; -import { requestFromChannelInjectionToken } from "../../common/channel/request-from-channel-injection-token"; +import type { RequestFromChannel } from "../../../common/utils/channel/request-from-channel-injection-token"; +import { requestFromChannelInjectionToken } from "../../../common/utils/channel/request-from-channel-injection-token"; import requestFromChannelInjectable from "./request-from-channel.injectable"; -import { getPromiseStatus } from "../../common/test-utils/get-promise-status"; +import { getPromiseStatus } from "../../../common/test-utils/get-promise-status"; describe("request from channel in renderer", () => { let requestFromChannel: RequestFromChannel; diff --git a/src/renderer/channel/send-to-main.injectable.ts b/src/renderer/utils/channel/send-to-main.injectable.ts similarity index 90% rename from src/renderer/channel/send-to-main.injectable.ts rename to src/renderer/utils/channel/send-to-main.injectable.ts index bb6d05c1dd..0811a78798 100644 --- a/src/renderer/channel/send-to-main.injectable.ts +++ b/src/renderer/utils/channel/send-to-main.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import type { JsonValue } from "type-fest"; import ipcRendererInjectable from "./ipc-renderer.injectable"; -import { tentativeStringifyJson } from "../../common/utils/tentative-stringify-json"; +import { tentativeStringifyJson } from "../../../common/utils/tentative-stringify-json"; const sendToMainInjectable = getInjectable({ id: "send-to-main", diff --git a/src/renderer/utils/sync-box/provide-initial-values-for-sync-boxes.injectable.ts b/src/renderer/utils/sync-box/provide-initial-values-for-sync-boxes.injectable.ts index 645ed961d5..39d63e5d46 100644 --- a/src/renderer/utils/sync-box/provide-initial-values-for-sync-boxes.injectable.ts +++ b/src/renderer/utils/sync-box/provide-initial-values-for-sync-boxes.injectable.ts @@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { beforeFrameStartsInjectionToken } from "../../before-frame-starts/before-frame-starts-injection-token"; import syncBoxInitialValueChannelInjectable from "../../../common/utils/sync-box/sync-box-initial-value-channel.injectable"; import syncBoxStateInjectable from "../../../common/utils/sync-box/sync-box-state.injectable"; -import { requestFromChannelInjectionToken } from "../../../common/channel/request-from-channel-injection-token"; +import { requestFromChannelInjectionToken } from "../../../common/utils/channel/request-from-channel-injection-token"; const provideInitialValuesForSyncBoxesInjectable = getInjectable({ id: "provide-initial-values-for-sync-boxes", diff --git a/src/test-utils/channel-fakes/override-messaging-from-main-to-window.ts b/src/test-utils/channel-fakes/override-messaging-from-main-to-window.ts index bd318343ca..6ade9b7f0d 100644 --- a/src/test-utils/channel-fakes/override-messaging-from-main-to-window.ts +++ b/src/test-utils/channel-fakes/override-messaging-from-main-to-window.ts @@ -2,11 +2,11 @@ * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ -import type { MessageChannelListener } from "../../common/channel/message-channel-listener-injection-token"; -import type { MessageChannel } from "../../common/channel/message-channel-injection-token"; +import type { MessageChannelListener } from "../../common/utils/channel/message-channel-listener-injection-token"; +import type { MessageChannel } from "../../common/utils/channel/message-channel-injection-token"; import sendToChannelInElectronBrowserWindowInjectable from "../../main/start-main-application/lens-window/application-window/send-to-channel-in-electron-browser-window.injectable"; import type { SendToViewArgs } from "../../main/start-main-application/lens-window/application-window/lens-window-injection-token"; -import enlistMessageChannelListenerInjectableInRenderer from "../../renderer/channel/channel-listeners/enlist-message-channel-listener.injectable"; +import enlistMessageChannelListenerInjectableInRenderer from "../../renderer/utils/channel/channel-listeners/enlist-message-channel-listener.injectable"; import type { DiContainer } from "@ogre-tools/injectable"; import assert from "assert"; import { tentativeParseJson } from "../../common/utils/tentative-parse-json"; diff --git a/src/test-utils/channel-fakes/override-messaging-from-window-to-main.ts b/src/test-utils/channel-fakes/override-messaging-from-window-to-main.ts index 7141160639..ba6813235b 100644 --- a/src/test-utils/channel-fakes/override-messaging-from-window-to-main.ts +++ b/src/test-utils/channel-fakes/override-messaging-from-window-to-main.ts @@ -4,10 +4,10 @@ */ import type { DiContainer } from "@ogre-tools/injectable"; import assert from "assert"; -import type { MessageChannel } from "../../common/channel/message-channel-injection-token"; -import type { MessageChannelListener } from "../../common/channel/message-channel-listener-injection-token"; -import enlistMessageChannelListenerInjectableInMain from "../../main/channel/channel-listeners/enlist-message-channel-listener.injectable"; -import sendToMainInjectable from "../../renderer/channel/send-to-main.injectable"; +import type { MessageChannel } from "../../common/utils/channel/message-channel-injection-token"; +import type { MessageChannelListener } from "../../common/utils/channel/message-channel-listener-injection-token"; +import enlistMessageChannelListenerInjectableInMain from "../../main/utils/channel/channel-listeners/enlist-message-channel-listener.injectable"; +import sendToMainInjectable from "../../renderer/utils/channel/send-to-main.injectable"; export const overrideMessagingFromWindowToMain = (mainDi: DiContainer) => { const messageChannelListenerFakesForMain = new Map< diff --git a/src/test-utils/channel-fakes/override-requesting-from-window-to-main.ts b/src/test-utils/channel-fakes/override-requesting-from-window-to-main.ts index 308ebad3e5..8ee4227289 100644 --- a/src/test-utils/channel-fakes/override-requesting-from-window-to-main.ts +++ b/src/test-utils/channel-fakes/override-requesting-from-window-to-main.ts @@ -3,10 +3,10 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import type { DiContainer } from "@ogre-tools/injectable"; -import type { RequestChannel } from "../../common/channel/request-channel-injection-token"; -import type { RequestChannelListener } from "../../common/channel/request-channel-listener-injection-token"; -import enlistRequestChannelListenerInjectableInMain from "../../main/channel/channel-listeners/enlist-request-channel-listener.injectable"; -import requestFromChannelInjectable from "../../renderer/channel/request-from-channel.injectable"; +import type { RequestChannel } from "../../common/utils/channel/request-channel-injection-token"; +import type { RequestChannelListener } from "../../common/utils/channel/request-channel-listener-injection-token"; +import enlistRequestChannelListenerInjectableInMain from "../../main/utils/channel/channel-listeners/enlist-request-channel-listener.injectable"; +import requestFromChannelInjectable from "../../renderer/utils/channel/request-from-channel.injectable"; export const overrideRequestingFromWindowToMain = (mainDi: DiContainer) => { const requestChannelListenerFakesForMain = new Map<