mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Update messaging to work with new base
Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>
This commit is contained in:
parent
10d3539235
commit
dcdba45f28
@ -2,7 +2,8 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import type { MessageChannel } from "../utils/channel/message-channel-listener-injection-token";
|
||||
|
||||
import type { MessageChannel } from "@k8slens/messaging";
|
||||
|
||||
export interface IpcFileLogObject {
|
||||
fileId: string;
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getMessageChannelListenerInjectable } from "@k8slens/messaging";
|
||||
import ipcFileLoggerInjectable from "./ipc-file-logger.injectable";
|
||||
import { getMessageChannelListenerInjectable } from "../../common/utils/channel/message-channel-listener-injection-token";
|
||||
import {
|
||||
closeIpcFileLoggerChannel,
|
||||
} from "../../common/logger/ipc-file-logger-channel";
|
||||
@ -11,7 +11,7 @@ import {
|
||||
const closeIpcFileLoggingListenerInjectable = getMessageChannelListenerInjectable({
|
||||
id: "close-ipc-file-logging",
|
||||
channel: closeIpcFileLoggerChannel,
|
||||
handler: (di) => {
|
||||
getHandler: (di) => {
|
||||
const ipcFileLogger = di.inject(ipcFileLoggerInjectable);
|
||||
|
||||
return (fileId) => ipcFileLogger.close(fileId);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getMessageChannelListenerInjectable } from "../../common/utils/channel/message-channel-listener-injection-token";
|
||||
import { getMessageChannelListenerInjectable } from "@k8slens/messaging";
|
||||
import type { IpcFileLogObject } from "../../common/logger/ipc-file-logger-channel";
|
||||
import { ipcFileLoggerChannel } from "../../common/logger/ipc-file-logger-channel";
|
||||
import { MESSAGE } from "triple-beam";
|
||||
@ -28,7 +28,7 @@ export function deserializeLogFromIpc(ipcFileLogObject: IpcFileLogObject) {
|
||||
const ipcFileLoggingListenerInjectable = getMessageChannelListenerInjectable({
|
||||
id: "ipc-file-logging",
|
||||
channel: ipcFileLoggerChannel,
|
||||
handler: (di) => {
|
||||
getHandler: (di) => {
|
||||
const ipcFileLogger = di.inject(ipcFileLoggerInjectable);
|
||||
|
||||
return (ipcFileLogObject) =>
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import type winston from "winston";
|
||||
import type { SendMessageToChannel } from "@k8slens/messaging";
|
||||
import { sendMessageToChannelInjectionToken } from "@k8slens/messaging";
|
||||
import type { DiContainer } from "@ogre-tools/injectable";
|
||||
import winstonLoggerInjectable from "../../common/winston-logger.injectable";
|
||||
import { getDiForUnitTesting } from "../getDiForUnitTesting";
|
||||
import closeRendererLogFileInjectable from "./close-renderer-log-file.injectable";
|
||||
import type { DiContainer } from "@ogre-tools/injectable";
|
||||
import type winston from "winston";
|
||||
import type { SendMessageToChannel } from "../../common/utils/channel/message-to-channel-injection-token";
|
||||
import { sendMessageToChannelInjectionToken } from "../../common/utils/channel/message-to-channel-injection-token";
|
||||
import rendererLogFileIdInjectable from "./renderer-log-file-id.injectable";
|
||||
import ipcLogTransportInjectable from "./ipc-transport.injectable";
|
||||
import type IpcLogTransport from "./ipc-transport";
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { sendMessageToChannelInjectionToken } from "@k8slens/messaging";
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import winstonLoggerInjectable from "../../common/winston-logger.injectable";
|
||||
import { closeIpcFileLoggerChannel } from "../../common/logger/ipc-file-logger-channel";
|
||||
import { sendMessageToChannelInjectionToken } from "../../common/utils/channel/message-to-channel-injection-token";
|
||||
import rendererLogFileIdInjectable from "./renderer-log-file-id.injectable";
|
||||
import ipcLogTransportInjectable from "./ipc-transport.injectable";
|
||||
|
||||
|
||||
@ -8,14 +8,13 @@ import type winston from "winston";
|
||||
import { MESSAGE } from "triple-beam";
|
||||
|
||||
import IpcLogTransport from "./ipc-transport";
|
||||
import { sendMessageToChannelInjectionToken } from "../../common/utils/channel/message-to-channel-injection-token";
|
||||
import type {
|
||||
IpcFileLogObject } from "../../common/logger/ipc-file-logger-channel";
|
||||
import type { IpcFileLogObject } from "../../common/logger/ipc-file-logger-channel";
|
||||
import {
|
||||
closeIpcFileLoggerChannel,
|
||||
ipcFileLoggerChannel,
|
||||
} from "../../common/logger/ipc-file-logger-channel";
|
||||
import rendererLogFileIdInjectable from "./renderer-log-file-id.injectable";
|
||||
import { sendMessageToChannelInjectionToken } from "@k8slens/messaging";
|
||||
|
||||
/**
|
||||
* Winston uses symbol property for the actual message.
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import type { DiContainer } from "@ogre-tools/injectable";
|
||||
import type { SendMessageToChannel } from "../../common/utils/channel/message-to-channel-injection-token";
|
||||
import { sendMessageToChannelInjectionToken } from "../../common/utils/channel/message-to-channel-injection-token";
|
||||
import { MESSAGE } from "triple-beam";
|
||||
import type { SendMessageToChannel } from "@k8slens/messaging";
|
||||
import { sendMessageToChannelInjectionToken } from "@k8slens/messaging";
|
||||
import { getDiForUnitTesting } from "../getDiForUnitTesting";
|
||||
import rendererLogFileIdInjectable from "./renderer-log-file-id.injectable";
|
||||
import ipcLogTransportInjectable from "./ipc-transport.injectable";
|
||||
import { MESSAGE } from "triple-beam";
|
||||
|
||||
describe("renderer log transport through ipc", () => {
|
||||
let di: DiContainer;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user