UNPKG

@backstage-community/plugin-sonarqube

Version:
42 lines (39 loc) 1.27 kB
import { SonarQubeClient } from './api/SonarQubeClient.esm.js'; import { createPlugin, createApiFactory, discoveryApiRef, fetchApiRef, createComponentExtension } from '@backstage/core-plugin-api'; import { sonarQubeApiRef } from '@backstage-community/plugin-sonarqube-react'; const sonarQubePlugin = createPlugin({ id: "sonarqube", apis: [ createApiFactory({ api: sonarQubeApiRef, deps: { discoveryApi: discoveryApiRef, fetchApi: fetchApiRef }, factory: ({ discoveryApi, fetchApi }) => new SonarQubeClient({ discoveryApi, fetchApi }) }) ] }); const EntitySonarQubeCard = sonarQubePlugin.provide( createComponentExtension({ name: "EntitySonarQubeCard", component: { lazy: () => import('./components/SonarQubeCard/index.esm.js').then((m) => m.SonarQubeCard) } }) ); const EntitySonarQubeContentPage = sonarQubePlugin.provide( createComponentExtension({ name: "EntitySonarQubeContentPage", component: { lazy: () => import('./components/SonarQubeContentPage/index.esm.js').then( (m) => m.SonarQubeContentPage ) } }) ); export { EntitySonarQubeCard, EntitySonarQubeContentPage, sonarQubePlugin }; //# sourceMappingURL=plugin.esm.js.map