diff --git a/plugins/firehydrant/api-report.md b/plugins/firehydrant/api-report.md index 2e3bcf6385..0ff5bbc62a 100644 --- a/plugins/firehydrant/api-report.md +++ b/plugins/firehydrant/api-report.md @@ -6,6 +6,7 @@ /// import { BackstagePlugin } from '@backstage/core-plugin-api'; +import { Entity } from '@backstage/catalog-model'; import { RouteRef } from '@backstage/core-plugin-api'; // @public (undocumented) @@ -19,4 +20,7 @@ export const firehydrantPlugin: BackstagePlugin< {}, {} >; + +// @public (undocumented) +export const isFireHydrantAvailable: (entity: Entity) => boolean; ``` diff --git a/plugins/firehydrant/src/components/hooks.ts b/plugins/firehydrant/src/components/hooks.ts index e8129e1b28..d9145f13f0 100644 --- a/plugins/firehydrant/src/components/hooks.ts +++ b/plugins/firehydrant/src/components/hooks.ts @@ -17,6 +17,7 @@ import { Entity } from '@backstage/catalog-model'; export const FIREHYDRANT_SERVICE_NAME_ANNOTATION = 'firehydrant.com/service-name'; +/** @public */ export const isFireHydrantAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[FIREHYDRANT_SERVICE_NAME_ANNOTATION]); export const getFireHydrantServiceName = (entity: Entity) =>