import { createApiFactory , createComponentExtension , createPlugin , createRouteRef , } from '@backstage/core-plugin-api' ; import { awsLambdaApiRef , AwsLambdaClient } from './api' ; export const entityContentRouteRef = createRouteRef ( { id : 'AWS Lambda Entity Content' , } ) ; export const awsLambdaPlugin = createPlugin ( { id : 'aws-lambda' , apis : [ createApiFactory ( awsLambdaApiRef , new AwsLambdaClient ( ) ) ] , routes : { entityContent : entityContentRouteRef , } , } ) ; export const EntityAWSLambdaOverviewCard = awsLambdaPlugin . provide ( createComponentExtension ( { name : 'EntityAWSLambdaOverviewCard' , component : { lazy : ( ) => import ( './components/AWSLambdaOverview/AWSLambdaOverview' ) . then ( m => m . AWSLambdaOverviewWidget ) , } , } ) ) ;