mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
remove getAllOnRunHooks
Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
parent
a877e109ba
commit
613f84b180
@ -65,16 +65,6 @@ export class CatalogEntityRegistry {
|
|||||||
getOnRunHook(catalogEntityUid: CatalogEntity["metadata"]["uid"]): CatelogEntityOnRunHook | undefined {
|
getOnRunHook(catalogEntityUid: CatalogEntity["metadata"]["uid"]): CatelogEntityOnRunHook | undefined {
|
||||||
return registry.getOnRunHook(catalogEntityUid);
|
return registry.getOnRunHook(catalogEntityUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns all catalog entities' onRun hooks
|
|
||||||
*/
|
|
||||||
getAllOnRunHooks(): Array<{
|
|
||||||
catalogEntityUid: CatalogEntity["metadata"]["uid"];
|
|
||||||
onRunHook: CatelogEntityOnRunHook;
|
|
||||||
}> {
|
|
||||||
return registry.getAllOnRunHooks();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const catalogEntities = new CatalogEntityRegistry();
|
export const catalogEntities = new CatalogEntityRegistry();
|
||||||
|
|||||||
@ -204,16 +204,6 @@ export class CatalogEntityRegistry {
|
|||||||
getOnRunHook(_catalogEntityUid: CatalogEntityUid): CatelogEntityOnRunHook | undefined {
|
getOnRunHook(_catalogEntityUid: CatalogEntityUid): CatelogEntityOnRunHook | undefined {
|
||||||
return Array.from(this.entityOnRunHooks).find(({ catalogEntityUid }) => catalogEntityUid === _catalogEntityUid)?.onRunHook;
|
return Array.from(this.entityOnRunHooks).find(({ catalogEntityUid }) => catalogEntityUid === _catalogEntityUid)?.onRunHook;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns all catalog entities' onRun hooks
|
|
||||||
*/
|
|
||||||
getAllOnRunHooks(): Array<{
|
|
||||||
catalogEntityUid: CatalogEntityUid;
|
|
||||||
onRunHook: CatelogEntityOnRunHook;
|
|
||||||
}> {
|
|
||||||
return Array.from(this.entityOnRunHooks);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const catalogEntityRegistry = new CatalogEntityRegistry(catalogCategoryRegistry);
|
export const catalogEntityRegistry = new CatalogEntityRegistry(catalogCategoryRegistry);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user