import { createPlugin , createRoutableExtension , createApiFactory , discoveryApiRef , } from '@backstage/core-plugin-api' ; import { BugsnagClient } from '.' ; import { rootRouteRef } from './routes' ; import { bugsnagApiRef } from './api/BugsnagApi' ; export const backstagePluginBugsnag = createPlugin ( { id : 'bugsnag' , apis : [ createApiFactory ( { api : bugsnagApiRef , deps : { discoveryApi : discoveryApiRef } , factory : ( { discoveryApi } ) => new BugsnagClient ( { discoveryApi } ) , } ) , ] , routes : { root : rootRouteRef , } , } ) ; export const EntityBugsnagErrorsOverviewTable = backstagePluginBugsnag . provide ( createRoutableExtension ( { name : 'EntityBugsnagErrorsOverviewTable' , component : ( ) => import ( './components/ErrorsOverviewComponent' ) . then ( m => m . ErrorsOverview ) , mountPoint : rootRouteRef , } ) ) ;