mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add dummy implementations for requesting in main from renderer
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
94cdf84712
commit
2a4fc4f20f
@ -0,0 +1,21 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import {
|
||||
RequestChannel,
|
||||
RequestFromChannel,
|
||||
requestFromChannelInjectionToken,
|
||||
} from "@k8slens/messaging";
|
||||
|
||||
const requestFromChannelInjectable = getInjectable({
|
||||
id: "request-from-channel",
|
||||
|
||||
instantiate: () =>
|
||||
((channel: RequestChannel<any, any>) => {
|
||||
throw new Error(
|
||||
`Tried to request from channel "${channel.id}" but requesting in "main" it's not supported yet`,
|
||||
);
|
||||
}) as unknown as RequestFromChannel,
|
||||
|
||||
injectionToken: requestFromChannelInjectionToken,
|
||||
});
|
||||
|
||||
export default requestFromChannelInjectable;
|
||||
@ -0,0 +1,18 @@
|
||||
/* c8 ignore start */
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { enlistRequestChannelListenerInjectionToken } from "@k8slens/messaging";
|
||||
|
||||
const enlistRequestChannelListenerInjectable = getInjectable({
|
||||
id: "enlist-request-channel-listener-for-renderer",
|
||||
|
||||
instantiate: () => (listener) => {
|
||||
throw new Error(
|
||||
`Tried to enlist request channel "${listener.channel.id}" in "renderer", but requesting it's not supported yet.`,
|
||||
);
|
||||
},
|
||||
|
||||
injectionToken: enlistRequestChannelListenerInjectionToken,
|
||||
});
|
||||
|
||||
export default enlistRequestChannelListenerInjectable;
|
||||
/* c8 ignore end */
|
||||
Loading…
Reference in New Issue
Block a user