diff --git a/plugins/puppetdb/api-report.md b/plugins/puppetdb/api-report.md index f5ea82c28a..48a3276460 100644 --- a/plugins/puppetdb/api-report.md +++ b/plugins/puppetdb/api-report.md @@ -12,9 +12,7 @@ import { RouteRef } from '@backstage/core-plugin-api'; import { SubRouteRef } from '@backstage/core-plugin-api'; // @public -const isPuppetDbAvailable: (entity: Entity) => boolean; -export { isPuppetDbAvailable as isPluginApplicableToEntity }; -export { isPuppetDbAvailable }; +export const isPuppetDbAvailable: (entity: Entity) => boolean; // @public export const PuppetDbPage: () => JSX.Element; diff --git a/plugins/puppetdb/src/components/ReportsPage/ReportsPage.test.tsx b/plugins/puppetdb/src/components/ReportsPage/ReportsPage.test.tsx index d43e564ff9..a4c094f69a 100644 --- a/plugins/puppetdb/src/components/ReportsPage/ReportsPage.test.tsx +++ b/plugins/puppetdb/src/components/ReportsPage/ReportsPage.test.tsx @@ -20,7 +20,7 @@ import { EntityProvider } from '@backstage/plugin-catalog-react'; import { puppetDbApiRef, PuppetDbClient } from '../../api'; import { ANNOTATION_PUPPET_CERTNAME } from '../../constants'; import { Entity } from '@backstage/catalog-model/'; -import { isPluginApplicableToEntity } from '../../index'; +import { isPuppetDbAvailable } from '../Router'; import { ApiProvider } from '@backstage/core-app-api'; import { puppetDbRouteRef } from '../../routes'; @@ -50,16 +50,16 @@ const mockPuppetDbApi: Partial = { const apis = TestApiRegistry.from([puppetDbApiRef, mockPuppetDbApi]); -describe('isPluginApplicableToEntity', () => { +describe('isPuppetDbAvailable', () => { describe('when entity has no annotations', () => { it('returns false', () => { - expect(isPluginApplicableToEntity(entityWithoutAnnotations)).toBe(false); + expect(isPuppetDbAvailable(entityWithoutAnnotations)).toBe(false); }); }); describe('when entity has the puppet annotation', () => { it('returns true', () => { - expect(isPluginApplicableToEntity(entity)).toBe(true); + expect(isPuppetDbAvailable(entity)).toBe(true); }); }); }); diff --git a/plugins/puppetdb/src/index.ts b/plugins/puppetdb/src/index.ts index d235f52dd6..2361a44bed 100644 --- a/plugins/puppetdb/src/index.ts +++ b/plugins/puppetdb/src/index.ts @@ -18,9 +18,5 @@ export { puppetdbPlugin as plugin, PuppetDbPage, } from './plugin'; -export { - Router, - isPuppetDbAvailable, - isPuppetDbAvailable as isPluginApplicableToEntity, -} from './components/Router'; +export { Router, isPuppetDbAvailable } from './components/Router'; export * from './routes';