1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/packages/technical-features/messaging/electron/main/src/request-from-channel/request-from-channel.injectable.ts
Sebastian Malton 1226b63acf Persist apiVersion when editing resources in monaco
- Use a new custom k8slens prefixed label

- Means that users aren't surprised when they use lens to update a
  resource to a new apiVersionWithGroup

- Doesn't touch the versions in the stores

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-04-03 12:14:16 -04:00

18 lines
622 B
TypeScript

/* c8 ignore start */
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;
/* c8 ignore stop */