mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add comment
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
4916c89efb
commit
07052d41be
@ -313,6 +313,16 @@ export interface DeleteResourceDescriptor extends ResourceDescriptor {
|
|||||||
*/
|
*/
|
||||||
function legacyRegisterApi(api: KubeApi<any, any>): void {
|
function legacyRegisterApi(api: KubeApi<any, any>): void {
|
||||||
try {
|
try {
|
||||||
|
/**
|
||||||
|
* This function throws if called in `main`, so the `try..catch` is to make sure that doesn't
|
||||||
|
* leak.
|
||||||
|
*
|
||||||
|
* However, we need this code to be run in `renderer` so that the auto registering of `KubeApi`
|
||||||
|
* instances still works. That auto registering never worked or was applicable in `main` because
|
||||||
|
* there is no "single cluster" on `main`.
|
||||||
|
*
|
||||||
|
* TODO: rearchitect this design pattern in the new extension API
|
||||||
|
*/
|
||||||
const di = getEnvironmentSpecificLegacyGlobalDiForExtensionApi(Environments.renderer);
|
const di = getEnvironmentSpecificLegacyGlobalDiForExtensionApi(Environments.renderer);
|
||||||
const autoRegistrationEmitter = di.inject(autoRegistrationEmitterInjectable);
|
const autoRegistrationEmitter = di.inject(autoRegistrationEmitterInjectable);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user