From 8e4fd92fa500d5601f315b7a05037fe75984af4a Mon Sep 17 00:00:00 2001 From: Wesley Date: Mon, 12 Sep 2022 05:49:20 +0200 Subject: [PATCH] added /** @public */ to exports for api-report Signed-off-by: Wesley --- plugins/azure-functions-backend/api-report.md | 12 ------------ .../src/api/AzureWebManagementApi.ts | 2 ++ .../azure-functions-backend/src/api/types.ts | 2 ++ .../src/service/router.ts | 2 ++ plugins/azure-functions/api-report.md | 18 ------------------ .../src/api/AzureFunctionsApi.ts | 2 ++ .../src/api/AzureFunctionsBackendClient.ts | 1 + plugins/azure-functions/src/api/types.ts | 1 + .../AzureFunctionsOverview.tsx | 2 ++ .../OverviewTableComponent/OverviewTable.tsx | 1 + plugins/azure-functions/src/plugin.ts | 3 +++ 11 files changed, 16 insertions(+), 30 deletions(-) diff --git a/plugins/azure-functions-backend/api-report.md b/plugins/azure-functions-backend/api-report.md index 1811249ca2..fd72fb6f42 100644 --- a/plugins/azure-functions-backend/api-report.md +++ b/plugins/azure-functions-backend/api-report.md @@ -7,8 +7,6 @@ import { Config } from '@backstage/config'; import express from 'express'; import { Logger } from 'winston'; -// Warning: (ae-missing-release-tag) "AzureFunctionsAllowedSubscriptionsConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AzureFunctionsAllowedSubscriptionsConfig { // (undocumented) @@ -17,8 +15,6 @@ export interface AzureFunctionsAllowedSubscriptionsConfig { name: string; } -// Warning: (ae-missing-release-tag) "AzureFunctionsConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class AzureFunctionsConfig { constructor( @@ -42,8 +38,6 @@ export class AzureFunctionsConfig { readonly tenantId: string; } -// Warning: (ae-missing-release-tag) "AzureWebManagementApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class AzureWebManagementApi { constructor(config: AzureFunctionsConfig); @@ -53,13 +47,9 @@ export class AzureWebManagementApi { list({ functionName }: { functionName: string }): Promise; } -// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createRouter(options: RouterOptions): Promise; -// Warning: (ae-missing-release-tag) "FunctionsData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type FunctionsData = { href: string; @@ -72,8 +62,6 @@ export type FunctionsData = { lastModifiedDate: Date; }; -// Warning: (ae-missing-release-tag) "RouterOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface RouterOptions { // (undocumented) diff --git a/plugins/azure-functions-backend/src/api/AzureWebManagementApi.ts b/plugins/azure-functions-backend/src/api/AzureWebManagementApi.ts index a756130977..a78bf05ee2 100644 --- a/plugins/azure-functions-backend/src/api/AzureWebManagementApi.ts +++ b/plugins/azure-functions-backend/src/api/AzureWebManagementApi.ts @@ -22,6 +22,7 @@ import { FunctionsData, } from './types'; +/** @public */ export class AzureFunctionsConfig { constructor( public readonly tenantId: string, @@ -49,6 +50,7 @@ export class AzureFunctionsConfig { } } +/** @public */ export class AzureWebManagementApi { private readonly baseHref = (domain: string) => `https://portal.azure.com/#@${domain}/resource`; diff --git a/plugins/azure-functions-backend/src/api/types.ts b/plugins/azure-functions-backend/src/api/types.ts index c560689c0b..4ec50ffb15 100644 --- a/plugins/azure-functions-backend/src/api/types.ts +++ b/plugins/azure-functions-backend/src/api/types.ts @@ -14,11 +14,13 @@ * limitations under the License. */ +/** @public */ export interface AzureFunctionsAllowedSubscriptionsConfig { name: string; id: string; } +/** @public */ export type FunctionsData = { href: string; logstreamHref: string; diff --git a/plugins/azure-functions-backend/src/service/router.ts b/plugins/azure-functions-backend/src/service/router.ts index eb4f218a76..f603849895 100644 --- a/plugins/azure-functions-backend/src/service/router.ts +++ b/plugins/azure-functions-backend/src/service/router.ts @@ -21,11 +21,13 @@ import { Logger } from 'winston'; import { AzureWebManagementApi } from '../api'; +/** @public */ export interface RouterOptions { logger: Logger; azureWebManagementApi: AzureWebManagementApi; } +/** @public */ export async function createRouter( options: RouterOptions, ): Promise { diff --git a/plugins/azure-functions/api-report.md b/plugins/azure-functions/api-report.md index 881c5bdf5e..9bb5e00c9e 100644 --- a/plugins/azure-functions/api-report.md +++ b/plugins/azure-functions/api-report.md @@ -12,8 +12,6 @@ import { Entity } from '@backstage/catalog-model'; import { IdentityApi } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "AzureFunctionsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AzureFunctionsApi = { list: ({ @@ -23,13 +21,9 @@ export type AzureFunctionsApi = { }) => Promise; }; -// Warning: (ae-missing-release-tag) "azureFunctionsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const azureFunctionsApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "AzureFunctionsBackendClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class AzureFunctionsBackendClient implements AzureFunctionsApi { constructor(options: { @@ -40,13 +34,9 @@ export class AzureFunctionsBackendClient implements AzureFunctionsApi { list({ functionName }: { functionName: string }): Promise; } -// Warning: (ae-missing-release-tag) "AzureFunctionsOverviewWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const AzureFunctionsOverviewWidget: () => JSX.Element; -// Warning: (ae-missing-release-tag) "azureFunctionsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const azureFunctionsPlugin: BackstagePlugin< { @@ -56,18 +46,12 @@ export const azureFunctionsPlugin: BackstagePlugin< {} >; -// Warning: (ae-missing-release-tag) "EntityAzureFunctionsOverviewCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityAzureFunctionsOverviewCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "entityContentRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const entityContentRouteRef: RouteRef; -// Warning: (ae-missing-release-tag) "FunctionsData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type FunctionsData = { href: string; @@ -80,8 +64,6 @@ export type FunctionsData = { lastModifiedDate: Date; }; -// Warning: (ae-missing-release-tag) "isAzureFunctionsAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const isAzureFunctionsAvailable: (entity: Entity) => string | undefined; diff --git a/plugins/azure-functions/src/api/AzureFunctionsApi.ts b/plugins/azure-functions/src/api/AzureFunctionsApi.ts index 3853f0dbe4..969b7596ff 100644 --- a/plugins/azure-functions/src/api/AzureFunctionsApi.ts +++ b/plugins/azure-functions/src/api/AzureFunctionsApi.ts @@ -17,10 +17,12 @@ import { createApiRef } from '@backstage/core-plugin-api'; import { FunctionsData } from './types'; +/** @public */ export const azureFunctionsApiRef = createApiRef({ id: 'plugin.azurefunctions.service', }); +/** @public */ export type AzureFunctionsApi = { list: ({ functionName, diff --git a/plugins/azure-functions/src/api/AzureFunctionsBackendClient.ts b/plugins/azure-functions/src/api/AzureFunctionsBackendClient.ts index a7676e3b17..962fa3a113 100644 --- a/plugins/azure-functions/src/api/AzureFunctionsBackendClient.ts +++ b/plugins/azure-functions/src/api/AzureFunctionsBackendClient.ts @@ -18,6 +18,7 @@ import { AzureFunctionsApi } from './AzureFunctionsApi'; import { FunctionsData } from './types'; import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; +/** @public */ export class AzureFunctionsBackendClient implements AzureFunctionsApi { private readonly identityApi: IdentityApi; private readonly discoveryApi: DiscoveryApi; diff --git a/plugins/azure-functions/src/api/types.ts b/plugins/azure-functions/src/api/types.ts index 0585db10e6..024a7ee70b 100644 --- a/plugins/azure-functions/src/api/types.ts +++ b/plugins/azure-functions/src/api/types.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +/** @public */ export type FunctionsData = { href: string; logstreamHref: string; diff --git a/plugins/azure-functions/src/components/AzureFunctionsOverviewComponent/AzureFunctionsOverview.tsx b/plugins/azure-functions/src/components/AzureFunctionsOverviewComponent/AzureFunctionsOverview.tsx index 61ebac0c96..76ecc7035a 100644 --- a/plugins/azure-functions/src/components/AzureFunctionsOverviewComponent/AzureFunctionsOverview.tsx +++ b/plugins/azure-functions/src/components/AzureFunctionsOverviewComponent/AzureFunctionsOverview.tsx @@ -26,6 +26,7 @@ import ErrorBoundary from '../ErrorBoundary'; import { useEntity } from '@backstage/plugin-catalog-react'; import { OverviewTable } from '../OverviewTableComponent/OverviewTable'; +/** @public */ export const isAzureFunctionsAvailable = (entity: Entity) => entity?.metadata.annotations?.[AZURE_FUNCTIONS_ANNOTATION]; @@ -46,6 +47,7 @@ const AzureFunctionsOverview = ({ entity }: { entity: Entity }) => { ); }; +/** @public */ export const AzureFunctionsOverviewWidget = () => { const { entity } = useEntity(); diff --git a/plugins/azure-functions/src/components/OverviewTableComponent/OverviewTable.tsx b/plugins/azure-functions/src/components/OverviewTableComponent/OverviewTable.tsx index 3f1de1552d..52044c9b1a 100644 --- a/plugins/azure-functions/src/components/OverviewTableComponent/OverviewTable.tsx +++ b/plugins/azure-functions/src/components/OverviewTableComponent/OverviewTable.tsx @@ -89,6 +89,7 @@ const DEFAULT_COLUMNS: TableColumn[] = [ }, ]; +/** @public */ export const OverviewTable = ({ data, loading }: FunctionTableProps) => { const columns: TableColumn[] = [...DEFAULT_COLUMNS]; const tableStyle = { diff --git a/plugins/azure-functions/src/plugin.ts b/plugins/azure-functions/src/plugin.ts index ad160c340b..c0b011e76c 100644 --- a/plugins/azure-functions/src/plugin.ts +++ b/plugins/azure-functions/src/plugin.ts @@ -24,10 +24,12 @@ import { } from '@backstage/core-plugin-api'; import { azureFunctionsApiRef, AzureFunctionsBackendClient } from './api'; +/** @public */ export const entityContentRouteRef = createRouteRef({ id: 'Azure Functions Entity Content', }); +/** @public */ export const azureFunctionsPlugin = createPlugin({ id: 'azure-functions', apis: [ @@ -46,6 +48,7 @@ export const azureFunctionsPlugin = createPlugin({ }, }); +/** @public */ export const EntityAzureFunctionsOverviewCard = azureFunctionsPlugin.provide( createComponentExtension({ name: 'EntityAzureFunctionsOverviewCard',