From ec7c806dc0c5de4d27ad1f0c1266f5736230ecda Mon Sep 17 00:00:00 2001 From: Janne Savolainen Date: Mon, 16 May 2022 15:33:50 +0300 Subject: [PATCH] Move channel abstraction to more global directory Co-authored-by: Mikko Aspiala Signed-off-by: Janne Savolainen --- .../{sync-box => }/channel/channel-injection-token.ts | 0 .../channel/channel-listener-injection-token.ts | 0 src/common/{sync-box => }/channel/channel.test.ts | 8 ++++---- .../channel/enlist-channel-listener-injection-token.ts | 0 .../channel/listening-of-channels.injectable.ts | 2 +- .../channel/send-to-agnostic-channel-injection-token.ts | 0 src/common/sync-box/create-sync-box.injectable.ts | 2 +- .../sync-box/sync-box-channel-listener.injectable.ts | 2 +- src/common/sync-box/sync-box-channel.injectable.ts | 2 +- .../enlist-channel-listener.injectable.ts | 2 +- .../start-listening-of-channels.injectable.ts | 2 +- src/main/channel/send-to-agnostic-channel.injectable.ts | 2 +- .../enlist-channel-listener.injectable.ts | 2 +- .../start-listening-of-channels.injectable.ts | 2 +- .../channel/send-to-agnostic-channel.injectable.ts | 2 +- 15 files changed, 14 insertions(+), 14 deletions(-) rename src/common/{sync-box => }/channel/channel-injection-token.ts (100%) rename src/common/{sync-box => }/channel/channel-listener-injection-token.ts (100%) rename src/common/{sync-box => }/channel/channel.test.ts (91%) rename src/common/{sync-box => }/channel/enlist-channel-listener-injection-token.ts (100%) rename src/common/{sync-box => }/channel/listening-of-channels.injectable.ts (92%) rename src/common/{sync-box => }/channel/send-to-agnostic-channel-injection-token.ts (100%) diff --git a/src/common/sync-box/channel/channel-injection-token.ts b/src/common/channel/channel-injection-token.ts similarity index 100% rename from src/common/sync-box/channel/channel-injection-token.ts rename to src/common/channel/channel-injection-token.ts diff --git a/src/common/sync-box/channel/channel-listener-injection-token.ts b/src/common/channel/channel-listener-injection-token.ts similarity index 100% rename from src/common/sync-box/channel/channel-listener-injection-token.ts rename to src/common/channel/channel-listener-injection-token.ts diff --git a/src/common/sync-box/channel/channel.test.ts b/src/common/channel/channel.test.ts similarity index 91% rename from src/common/sync-box/channel/channel.test.ts rename to src/common/channel/channel.test.ts index 2e14f3ac58..d55dda1d4f 100644 --- a/src/common/sync-box/channel/channel.test.ts +++ b/src/common/channel/channel.test.ts @@ -4,12 +4,12 @@ */ 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 { sendToAgnosticChannelInjectionToken } from "./send-to-agnostic-channel-injection-token"; -import { getApplicationBuilder } from "../../../renderer/components/test-utils/get-application-builder"; +import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import { channelListenerInjectionToken } from "./channel-listener-injection-token"; -import createLensWindowInjectable from "../../../main/start-main-application/lens-window/application-window/create-lens-window.injectable"; +import createLensWindowInjectable from "../../main/start-main-application/lens-window/application-window/create-lens-window.injectable"; import type { Channel } from "./channel-injection-token"; import { channelInjectionToken } from "./channel-injection-token"; diff --git a/src/common/sync-box/channel/enlist-channel-listener-injection-token.ts b/src/common/channel/enlist-channel-listener-injection-token.ts similarity index 100% rename from src/common/sync-box/channel/enlist-channel-listener-injection-token.ts rename to src/common/channel/enlist-channel-listener-injection-token.ts diff --git a/src/common/sync-box/channel/listening-of-channels.injectable.ts b/src/common/channel/listening-of-channels.injectable.ts similarity index 92% rename from src/common/sync-box/channel/listening-of-channels.injectable.ts rename to src/common/channel/listening-of-channels.injectable.ts index 0e82600642..a06c84980d 100644 --- a/src/common/sync-box/channel/listening-of-channels.injectable.ts +++ b/src/common/channel/listening-of-channels.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 { getStartableStoppable } from "../../utils/get-startable-stoppable"; +import { getStartableStoppable } from "../utils/get-startable-stoppable"; import { channelListenerInjectionToken } from "./channel-listener-injection-token"; import { enlistChannelListenerInjectionToken } from "./enlist-channel-listener-injection-token"; diff --git a/src/common/sync-box/channel/send-to-agnostic-channel-injection-token.ts b/src/common/channel/send-to-agnostic-channel-injection-token.ts similarity index 100% rename from src/common/sync-box/channel/send-to-agnostic-channel-injection-token.ts rename to src/common/channel/send-to-agnostic-channel-injection-token.ts diff --git a/src/common/sync-box/create-sync-box.injectable.ts b/src/common/sync-box/create-sync-box.injectable.ts index 7e4b44bb9f..752d7e4fd1 100644 --- a/src/common/sync-box/create-sync-box.injectable.ts +++ b/src/common/sync-box/create-sync-box.injectable.ts @@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import type { IComputedValue } from "mobx"; import { computed } from "mobx"; import syncBoxChannelInjectable from "./sync-box-channel.injectable"; -import { sendToAgnosticChannelInjectionToken } from "./channel/send-to-agnostic-channel-injection-token"; +import { sendToAgnosticChannelInjectionToken } from "../channel/send-to-agnostic-channel-injection-token"; import syncBoxStateInjectable from "./sync-box-state.injectable"; const createSyncBoxInjectable = getInjectable({ diff --git a/src/common/sync-box/sync-box-channel-listener.injectable.ts b/src/common/sync-box/sync-box-channel-listener.injectable.ts index a9ed8fd98e..899d19b76a 100644 --- a/src/common/sync-box/sync-box-channel-listener.injectable.ts +++ b/src/common/sync-box/sync-box-channel-listener.injectable.ts @@ -4,7 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import syncBoxChannelInjectable from "./sync-box-channel.injectable"; -import { channelListenerInjectionToken } from "./channel/channel-listener-injection-token"; +import { channelListenerInjectionToken } from "../channel/channel-listener-injection-token"; import syncBoxStateInjectable from "./sync-box-state.injectable"; const syncBoxChannelListenerInjectable = getInjectable({ diff --git a/src/common/sync-box/sync-box-channel.injectable.ts b/src/common/sync-box/sync-box-channel.injectable.ts index 4aaa3b1252..e167a55ac1 100644 --- a/src/common/sync-box/sync-box-channel.injectable.ts +++ b/src/common/sync-box/sync-box-channel.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 { channelInjectionToken } from "./channel/channel-injection-token"; +import { channelInjectionToken } from "../channel/channel-injection-token"; const syncBoxChannelInjectable = getInjectable({ id: "sync-box-channel", diff --git a/src/main/channel/channel-listeners/enlist-channel-listener.injectable.ts b/src/main/channel/channel-listeners/enlist-channel-listener.injectable.ts index 55241da3f2..a2ffac1c73 100644 --- a/src/main/channel/channel-listeners/enlist-channel-listener.injectable.ts +++ b/src/main/channel/channel-listeners/enlist-channel-listener.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import type { IpcMainEvent } from "electron"; import ipcMainInjectable from "../../app-paths/register-channel/ipc-main/ipc-main.injectable"; -import { enlistChannelListenerInjectionToken } from "../../../common/sync-box/channel/enlist-channel-listener-injection-token"; +import { enlistChannelListenerInjectionToken } from "../../../common/channel/enlist-channel-listener-injection-token"; const enlistChannelListenerInjectable = getInjectable({ id: "enlist-channel-listener-for-main", diff --git a/src/main/channel/channel-listeners/start-listening-of-channels.injectable.ts b/src/main/channel/channel-listeners/start-listening-of-channels.injectable.ts index 200dcdea31..0b50e6e58b 100644 --- a/src/main/channel/channel-listeners/start-listening-of-channels.injectable.ts +++ b/src/main/channel/channel-listeners/start-listening-of-channels.injectable.ts @@ -4,7 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import { onLoadOfApplicationInjectionToken } from "../../start-main-application/runnable-tokens/on-load-of-application-injection-token"; -import listeningOfChannelsInjectable from "../../../common/sync-box/channel/listening-of-channels.injectable"; +import listeningOfChannelsInjectable from "../../../common/channel/listening-of-channels.injectable"; const startListeningOfChannelsInjectable = getInjectable({ id: "start-listening-of-channels-main", diff --git a/src/main/channel/send-to-agnostic-channel.injectable.ts b/src/main/channel/send-to-agnostic-channel.injectable.ts index 6de4323244..9758e5e308 100644 --- a/src/main/channel/send-to-agnostic-channel.injectable.ts +++ b/src/main/channel/send-to-agnostic-channel.injectable.ts @@ -6,7 +6,7 @@ import { lensWindowInjectionToken } from "../start-main-application/lens-window/ import { pipeline } from "@ogre-tools/fp"; import { getInjectable } from "@ogre-tools/injectable"; import { filter } from "lodash/fp"; -import { sendToAgnosticChannelInjectionToken } from "../../common/sync-box/channel/send-to-agnostic-channel-injection-token"; +import { sendToAgnosticChannelInjectionToken } from "../../common/channel/send-to-agnostic-channel-injection-token"; const sendToAgnosticChannelInjectable = getInjectable({ id: "send-to-agnostic-channel-main", diff --git a/src/renderer/channel/channel-listeners/enlist-channel-listener.injectable.ts b/src/renderer/channel/channel-listeners/enlist-channel-listener.injectable.ts index b596c0aa7a..ad6dcc8749 100644 --- a/src/renderer/channel/channel-listeners/enlist-channel-listener.injectable.ts +++ b/src/renderer/channel/channel-listeners/enlist-channel-listener.injectable.ts @@ -5,7 +5,7 @@ import ipcRendererInjectable from "../../app-paths/get-value-from-registered-channel/ipc-renderer/ipc-renderer.injectable"; import { getInjectable } from "@ogre-tools/injectable"; import type { IpcRendererEvent } from "electron"; -import { enlistChannelListenerInjectionToken } from "../../../common/sync-box/channel/enlist-channel-listener-injection-token"; +import { enlistChannelListenerInjectionToken } from "../../../common/channel/enlist-channel-listener-injection-token"; const enlistChannelListenerInjectable = getInjectable({ id: "enlist-channel-listener-for-renderer", diff --git a/src/renderer/channel/channel-listeners/start-listening-of-channels.injectable.ts b/src/renderer/channel/channel-listeners/start-listening-of-channels.injectable.ts index 2baf1bd2b2..e5edd32159 100644 --- a/src/renderer/channel/channel-listeners/start-listening-of-channels.injectable.ts +++ b/src/renderer/channel/channel-listeners/start-listening-of-channels.injectable.ts @@ -4,7 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import { beforeFrameStartsInjectionToken } from "../../before-frame-starts/before-frame-starts-injection-token"; -import listeningOfChannelsInjectable from "../../../common/sync-box/channel/listening-of-channels.injectable"; +import listeningOfChannelsInjectable from "../../../common/channel/listening-of-channels.injectable"; const startListeningOfChannelsInjectable = getInjectable({ id: "start-listening-of-channels-renderer", diff --git a/src/renderer/channel/send-to-agnostic-channel.injectable.ts b/src/renderer/channel/send-to-agnostic-channel.injectable.ts index 8cdb1110e1..9d2ed08fc2 100644 --- a/src/renderer/channel/send-to-agnostic-channel.injectable.ts +++ b/src/renderer/channel/send-to-agnostic-channel.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 { sendToAgnosticChannelInjectionToken } from "../../common/sync-box/channel/send-to-agnostic-channel-injection-token"; +import { sendToAgnosticChannelInjectionToken } from "../../common/channel/send-to-agnostic-channel-injection-token"; import sendToMainInjectable from "./send-to-main.injectable"; const sendToAgnosticChannelInjectable = getInjectable({