Do not export isPluginApplicableToEntity
Signed-off-by: Tomas Dabasinskas <tomas@dabasinskas.net>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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<PuppetDbClient> = {
|
||||
|
||||
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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user