import { configApiRef , createPlugin , createApiFactory , discoveryApiRef , createComponentExtension , } from '@backstage/core-plugin-api' ; import { jiraApiRef , JiraAPI } from './api' ; export const jiraPlugin = createPlugin ( { id : 'jira' , apis : [ createApiFactory ( { api : jiraApiRef , deps : { discoveryApi : discoveryApiRef , configApi : configApiRef } , factory : ( { discoveryApi , configApi } ) => { return new JiraAPI ( { discoveryApi , apiVersion : configApi . getOptionalNumber ( 'jira.apiVersion' ) , } ) ; } , } ) , ] , } ) ; export const EntityJiraOverviewCard = jiraPlugin . provide ( createComponentExtension ( { name : 'EntityJiraOverviewCard' , component : { lazy : ( ) => import ( './components/JiraCard' ) . then ( ( m ) => m . JiraCard ) , } , } ) ) ;