diff --git a/src/common/channel/channel-listener-injection-token.ts b/src/common/channel/channel-listener-injection-token.ts index db7672f906..f2725f6c59 100644 --- a/src/common/channel/channel-listener-injection-token.ts +++ b/src/common/channel/channel-listener-injection-token.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 { Channel } from "./channel-injection-token"; +import type { Channel } from "./channel"; export interface ChannelListener> { channel: TChannel; diff --git a/src/common/channel/channel.test.ts b/src/common/channel/channel.test.ts index 508cec128b..608e0cf73e 100644 --- a/src/common/channel/channel.test.ts +++ b/src/common/channel/channel.test.ts @@ -11,8 +11,7 @@ import { sendToAgnosticChannelInjectionToken } from "./send-to-agnostic-channel- 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 type { Channel } from "./channel-injection-token"; -import { channelInjectionToken } from "./channel-injection-token"; +import type { Channel } from "./channel"; type TestChannel = Channel; @@ -158,8 +157,6 @@ const testChannelInjectable = getInjectable({ id: channelId, }; }, - - injectionToken: channelInjectionToken, }); const createTestWindow = (di: DiContainer, id: string) => { diff --git a/src/common/channel/channel-injection-token.ts b/src/common/channel/channel.ts similarity index 59% rename from src/common/channel/channel-injection-token.ts rename to src/common/channel/channel.ts index 0b346b2341..53b6768c7e 100644 --- a/src/common/channel/channel-injection-token.ts +++ b/src/common/channel/channel.ts @@ -2,13 +2,8 @@ * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ -import { getInjectionToken } from "@ogre-tools/injectable"; export interface Channel { id: string; _template?: TInstance; } - -export const channelInjectionToken = getInjectionToken>({ - id: "channel", -}); diff --git a/src/common/channel/enlist-channel-listener-injection-token.ts b/src/common/channel/enlist-channel-listener-injection-token.ts index 6b72ca4ac1..113f32069a 100644 --- a/src/common/channel/enlist-channel-listener-injection-token.ts +++ b/src/common/channel/enlist-channel-listener-injection-token.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 { Channel } from "./channel-injection-token"; +import type { Channel } from "./channel"; export type EnlistChannelListener = >( channel: TChannel, diff --git a/src/common/channel/send-to-agnostic-channel-injection-token.ts b/src/common/channel/send-to-agnostic-channel-injection-token.ts index 901e51b94b..fd96051f42 100644 --- a/src/common/channel/send-to-agnostic-channel-injection-token.ts +++ b/src/common/channel/send-to-agnostic-channel-injection-token.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 { Channel } from "./channel-injection-token"; +import type { Channel } from "./channel"; export type SendToAgnosticChannel = >( channel: TChannel, diff --git a/src/common/ipc-channel/channel.ts b/src/common/ipc-channel/channel.ts index 2153134fff..dfc2f2fcc6 100644 --- a/src/common/ipc-channel/channel.ts +++ b/src/common/ipc-channel/channel.ts @@ -2,6 +2,10 @@ * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ + +/** + * @deprecated Switch to using newer version of Channel abstraction + */ export interface Channel { name: string; _template: TInstance; diff --git a/src/common/ipc-channel/create-channel/create-channel.ts b/src/common/ipc-channel/create-channel/create-channel.ts index 6b9fe1b0d9..403bc1dcc0 100644 --- a/src/common/ipc-channel/create-channel/create-channel.ts +++ b/src/common/ipc-channel/create-channel/create-channel.ts @@ -4,6 +4,9 @@ */ import type { Channel } from "../channel"; +/** + * @deprecated Switch to using newer version of Channel abstraction + */ export const createChannel = (name: string): Channel => ({ name, _template: null as never, diff --git a/src/common/sync-box/sync-box-channel.injectable.ts b/src/common/sync-box/sync-box-channel.injectable.ts index 7b9262f607..d5b5101d7c 100644 --- a/src/common/sync-box/sync-box-channel.injectable.ts +++ b/src/common/sync-box/sync-box-channel.injectable.ts @@ -3,8 +3,7 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import type { Channel } from "../channel/channel-injection-token"; -import { channelInjectionToken } from "../channel/channel-injection-token"; +import type { Channel } from "../channel/channel"; export type SyncBoxChannel = Channel<{ id: string; value: unknown }>; @@ -14,8 +13,6 @@ const syncBoxChannelInjectable = getInjectable({ instantiate: (): SyncBoxChannel => ({ id: "sync-box-channel", }), - - injectionToken: channelInjectionToken, }); export default syncBoxChannelInjectable;