Additional package export

Signed-off-by: Magnus Persson <magnus.persson@fortnox.se>
This commit is contained in:
Magnus Persson
2023-01-23 00:07:32 +01:00
parent 38c3232645
commit 6310eacc11
5 changed files with 38 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-sonarqube': patch
---
Additional export added in order to bind SonarQubeClient to its apiref
+27
View File
@@ -6,8 +6,12 @@
/// <reference types="react" />
import { BackstagePlugin } from '@backstage/core-plugin-api';
import { DiscoveryApi } from '@backstage/core-plugin-api';
import { Entity } from '@backstage/catalog-model';
import { FindingSummary } from '@backstage/plugin-sonarqube-react';
import { IdentityApi } from '@backstage/core-plugin-api';
import { InfoCardVariants } from '@backstage/core-components';
import { SonarQubeApi } from '@backstage/plugin-sonarqube-react';
// @public (undocumented)
export type DuplicationRating = {
@@ -38,6 +42,29 @@ export const SonarQubeCard: (props: {
duplicationRatings?: DuplicationRating[];
}) => JSX.Element;
// @alpha (undocumented)
export class SonarQubeClient implements SonarQubeApi {
constructor({
discoveryApi,
identityApi,
}: {
discoveryApi: DiscoveryApi;
identityApi: IdentityApi;
});
// (undocumented)
discoveryApi: DiscoveryApi;
// (undocumented)
getFindingSummary({
componentKey,
projectInstance,
}?: {
componentKey?: string;
projectInstance?: string;
}): Promise<FindingSummary | undefined>;
// (undocumented)
identityApi: IdentityApi;
}
// @public (undocumented)
export type SonarQubeContentPageProps = {
title?: string;
+4 -2
View File
@@ -8,7 +8,8 @@
"publishConfig": {
"access": "public",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts"
"types": "dist/index.d.ts",
"alphaTypes": "dist/index.alpha.d.ts"
},
"backstage": {
"role": "frontend-plugin"
@@ -25,7 +26,7 @@
"sonarcloud"
],
"scripts": {
"build": "backstage-cli package build",
"build": "backstage-cli package build --experimental-type-build",
"start": "backstage-cli package start",
"lint": "backstage-cli package lint",
"test": "backstage-cli package test",
@@ -64,6 +65,7 @@
},
"files": [
"dist",
"alpha",
"config.d.ts"
],
"configSchema": "config.d.ts"
@@ -23,6 +23,7 @@ import {
import { InstanceUrlWrapper, FindingsWrapper } from './types';
import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api';
/** @alpha */
export class SonarQubeClient implements SonarQubeApi {
discoveryApi: DiscoveryApi;
identityApi: IdentityApi;
+1
View File
@@ -21,5 +21,6 @@
* @packageDocumentation
*/
export * from './api';
export * from './components';
export * from './plugin';