diff --git a/.changeset/eight-spies-protect.md b/.changeset/eight-spies-protect.md new file mode 100644 index 0000000000..0011dece72 --- /dev/null +++ b/.changeset/eight-spies-protect.md @@ -0,0 +1,25 @@ +--- +'@backstage/plugin-azure-devops': patch +'@backstage/plugin-azure-devops-backend': patch +'@backstage/plugin-azure-devops-common': patch +'@backstage/plugin-cloudbuild': patch +'@backstage/plugin-explore': patch +'@backstage/plugin-fossa': patch +'@backstage/plugin-git-release-manager': patch +'@backstage/plugin-github-actions': patch +'@backstage/plugin-jenkins': patch +'@backstage/plugin-newrelic-dashboard': patch +'@backstage/plugin-pagerduty': patch +'@backstage/plugin-scaffolder': patch +'@backstage/plugin-search-backend-node': patch +'@backstage/plugin-sentry': patch +'@backstage/plugin-sonarqube': patch +'@backstage/plugin-tech-insights': patch +'@backstage/plugin-tech-insights-node': patch +'@backstage/plugin-techdocs': patch +'@backstage/plugin-techdocs-module-addons-contrib': patch +'@backstage/plugin-user-settings': patch +'@backstage/plugin-vault-backend': patch +--- + +Minor API signatures cleanup diff --git a/plugins/azure-devops-backend/api-report.md b/plugins/azure-devops-backend/api-report.md index eaebea4d7b..712a433920 100644 --- a/plugins/azure-devops-backend/api-report.md +++ b/plugins/azure-devops-backend/api-report.md @@ -20,8 +20,6 @@ import { Team } from '@backstage/plugin-azure-devops-common'; import { TeamMember } from '@backstage/plugin-azure-devops-common'; import { WebApi } from 'azure-devops-node-api'; -// Warning: (ae-missing-release-tag) "AzureDevOpsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class AzureDevOpsApi { constructor(logger: Logger, webApi: WebApi); @@ -88,13 +86,9 @@ export class AzureDevOpsApi { }): 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) "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-devops-backend/src/api/AzureDevOpsApi.ts b/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts index 240ba0b189..13edd7419d 100644 --- a/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts +++ b/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts @@ -53,6 +53,7 @@ import { WebApiTeam, } from 'azure-devops-node-api/interfaces/CoreInterfaces'; +/** @public */ export class AzureDevOpsApi { public constructor( private readonly logger: Logger, @@ -73,6 +74,7 @@ export class AzureDevOpsApi { a.name && b.name ? a.name.localeCompare(b.name) : 0, ); } + public async getGitRepository( projectName: string, repoName: string, diff --git a/plugins/azure-devops-backend/src/service/router.ts b/plugins/azure-devops-backend/src/service/router.ts index a4a76b4a14..0cb504537c 100644 --- a/plugins/azure-devops-backend/src/service/router.ts +++ b/plugins/azure-devops-backend/src/service/router.ts @@ -31,12 +31,14 @@ import express from 'express'; const DEFAULT_TOP = 10; +/** @public */ export interface RouterOptions { azureDevOpsApi?: AzureDevOpsApi; logger: Logger; config: Config; } +/** @public */ export async function createRouter( options: RouterOptions, ): Promise { diff --git a/plugins/azure-devops-common/api-report.md b/plugins/azure-devops-common/api-report.md index 34d911dac6..ca8206b508 100644 --- a/plugins/azure-devops-common/api-report.md +++ b/plugins/azure-devops-common/api-report.md @@ -3,8 +3,6 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -// Warning: (ae-missing-release-tag) "BuildResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum BuildResult { Canceled = 32, @@ -14,8 +12,6 @@ export enum BuildResult { Succeeded = 2, } -// Warning: (ae-missing-release-tag) "BuildRun" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BuildRun = { id?: number; @@ -30,15 +26,11 @@ export type BuildRun = { uniqueName?: string; }; -// Warning: (ae-missing-release-tag) "BuildRunOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BuildRunOptions = { top?: number; }; -// Warning: (ae-missing-release-tag) "BuildStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum BuildStatus { All = 47, @@ -50,8 +42,6 @@ export enum BuildStatus { Postponed = 8, } -// Warning: (ae-missing-release-tag) "CreatedBy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface CreatedBy { // (undocumented) @@ -68,8 +58,6 @@ export interface CreatedBy { uniqueName?: string; } -// Warning: (ae-missing-release-tag) "DashboardPullRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface DashboardPullRequest { // (undocumented) @@ -98,8 +86,6 @@ export interface DashboardPullRequest { title?: string; } -// Warning: (ae-missing-release-tag) "GitTag" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GitTag = { objectId?: string; @@ -110,8 +96,6 @@ export type GitTag = { commitLink: string; }; -// Warning: (ae-missing-release-tag) "Policy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Policy { // (undocumented) @@ -126,9 +110,7 @@ export interface Policy { type: PolicyType; } -// Warning: (ae-missing-release-tag) "PolicyEvaluationStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public +// @public (undocumented) export enum PolicyEvaluationStatus { Approved = 2, Broken = 5, @@ -138,8 +120,6 @@ export enum PolicyEvaluationStatus { Running = 1, } -// Warning: (ae-missing-release-tag) "PolicyType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum PolicyType { // (undocumented) @@ -156,8 +136,6 @@ export enum PolicyType { Status = 'Status', } -// Warning: (ae-missing-release-tag) "PolicyTypeId" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum PolicyTypeId { Build = '0609b952-1397-4640-95ec-e00a01b2c241', @@ -168,8 +146,6 @@ export enum PolicyTypeId { Status = 'cbdc66da-9728-4af8-aada-9a5a32e4a226', } -// Warning: (ae-missing-release-tag) "Project" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Project = { id?: string; @@ -177,8 +153,6 @@ export type Project = { description?: string; }; -// Warning: (ae-missing-release-tag) "PullRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PullRequest = { pullRequestId?: number; @@ -194,16 +168,12 @@ export type PullRequest = { link: string; }; -// Warning: (ae-missing-release-tag) "PullRequestOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PullRequestOptions = { top: number; status: PullRequestStatus; }; -// Warning: (ae-missing-release-tag) "PullRequestStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum PullRequestStatus { Abandoned = 2, @@ -213,8 +183,6 @@ export enum PullRequestStatus { NotSet = 0, } -// Warning: (ae-missing-release-tag) "PullRequestVoteStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum PullRequestVoteStatus { // (undocumented) @@ -229,8 +197,6 @@ export enum PullRequestVoteStatus { WaitingForAuthor = -5, } -// Warning: (ae-missing-release-tag) "RepoBuild" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type RepoBuild = { id?: number; @@ -245,15 +211,11 @@ export type RepoBuild = { uniqueName?: string; }; -// Warning: (ae-missing-release-tag) "RepoBuildOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type RepoBuildOptions = { top?: number; }; -// Warning: (ae-missing-release-tag) "Repository" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Repository { // (undocumented) @@ -264,8 +226,6 @@ export interface Repository { url?: string; } -// Warning: (ae-missing-release-tag) "Reviewer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Reviewer { // (undocumented) @@ -284,8 +244,6 @@ export interface Reviewer { voteStatus: PullRequestVoteStatus; } -// Warning: (ae-missing-release-tag) "Team" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Team { // (undocumented) @@ -300,8 +258,6 @@ export interface Team { projectName?: string; } -// Warning: (ae-missing-release-tag) "TeamMember" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface TeamMember { // (undocumented) diff --git a/plugins/azure-devops-common/src/types.ts b/plugins/azure-devops-common/src/types.ts index db2813dec1..d763d151ca 100644 --- a/plugins/azure-devops-common/src/types.ts +++ b/plugins/azure-devops-common/src/types.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +/** @public */ export enum BuildResult { /** * No result @@ -37,6 +38,7 @@ export enum BuildResult { Canceled = 32, } +/** @public */ export enum BuildStatus { /** * No status. @@ -68,6 +70,7 @@ export enum BuildStatus { All = 47, } +/** @public */ export type RepoBuild = { id?: number; title: string; @@ -81,10 +84,12 @@ export type RepoBuild = { uniqueName?: string; }; +/** @public */ export type RepoBuildOptions = { top?: number; }; +/** @public */ export enum PullRequestStatus { /** * Status not set. Default state. @@ -108,6 +113,7 @@ export enum PullRequestStatus { All = 4, } +/** @public */ export type GitTag = { objectId?: string; peeledObjectId?: string; @@ -117,6 +123,7 @@ export type GitTag = { commitLink: string; }; +/** @public */ export type PullRequest = { pullRequestId?: number; repoName?: string; @@ -131,11 +138,13 @@ export type PullRequest = { link: string; }; +/** @public */ export type PullRequestOptions = { top: number; status: PullRequestStatus; }; +/** @public */ export interface DashboardPullRequest { pullRequestId?: number; title?: string; @@ -151,6 +160,7 @@ export interface DashboardPullRequest { link?: string; } +/** @public */ export interface Reviewer { id?: string; displayName?: string; @@ -161,6 +171,7 @@ export interface Reviewer { voteStatus: PullRequestVoteStatus; } +/** @public */ export interface Policy { id?: number; type: PolicyType; @@ -169,6 +180,7 @@ export interface Policy { link?: string; } +/** @public */ export interface CreatedBy { id?: string; displayName?: string; @@ -178,12 +190,14 @@ export interface CreatedBy { teamNames?: string[]; } +/** @public */ export interface Repository { id?: string; name?: string; url?: string; } +/** @public */ export interface Team { id?: string; name?: string; @@ -192,6 +206,7 @@ export interface Team { members?: string[]; } +/** @public */ export interface TeamMember { id?: string; displayName?: string; @@ -202,6 +217,7 @@ export interface TeamMember { /** * Status of a policy which is running against a specific pull request. */ +/** @public */ export enum PolicyEvaluationStatus { /** * The policy is either queued to run, or is waiting for some event before progressing. @@ -229,6 +245,7 @@ export enum PolicyEvaluationStatus { Broken = 5, } +/** @public */ export enum PolicyType { Build = 'Build', Status = 'Status', @@ -238,6 +255,7 @@ export enum PolicyType { MergeStrategy = 'MergeStrategy', } +/** @public */ export enum PolicyTypeId { /** * This policy will require a successful build has been performed before updating protected refs. @@ -265,6 +283,7 @@ export enum PolicyTypeId { MergeStrategy = 'fa4e907d-c16b-4a4c-9dfa-4916e5d171ab', } +/** @public */ export enum PullRequestVoteStatus { Approved = 10, ApprovedWithSuggestions = 5, @@ -272,6 +291,8 @@ export enum PullRequestVoteStatus { WaitingForAuthor = -5, Rejected = -10, } + +/** @public */ export type BuildRun = { id?: number; title: string; @@ -285,10 +306,12 @@ export type BuildRun = { uniqueName?: string; }; +/** @public */ export type BuildRunOptions = { top?: number; }; +/** @public */ export type Project = { id?: string; name?: string; diff --git a/plugins/azure-devops/api-report.md b/plugins/azure-devops/api-report.md index 0fe600f15d..3c01936390 100644 --- a/plugins/azure-devops/api-report.md +++ b/plugins/azure-devops/api-report.md @@ -21,23 +21,17 @@ import { RepoBuildOptions } from '@backstage/plugin-azure-devops-common'; import { SvgIconProps } from '@material-ui/core'; import { Team } from '@backstage/plugin-azure-devops-common'; -// Warning: (ae-missing-release-tag) "AllFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AllFilter = BaseFilter & { type: FilterType.All; }; -// Warning: (ae-missing-release-tag) "AssignedToTeamFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AssignedToTeamFilter = BaseFilter & { type: FilterType.AssignedToTeam; teamId: string; }; -// Warning: (ae-missing-release-tag) "AssignedToTeamsFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AssignedToTeamsFilter = BaseFilter & ( @@ -51,8 +45,6 @@ export type AssignedToTeamsFilter = BaseFilter & } ); -// Warning: (ae-missing-release-tag) "AssignedToUserFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AssignedToUserFilter = BaseFilter & ( @@ -66,8 +58,6 @@ export type AssignedToUserFilter = BaseFilter & } ); -// Warning: (ae-missing-release-tag) "AzureDevOpsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AzureDevOpsApi { // (undocumented) @@ -112,13 +102,9 @@ export interface AzureDevOpsApi { getUserTeamIds(userId: string): Promise; } -// Warning: (ae-missing-release-tag) "azureDevOpsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const azureDevOpsApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "AzureDevOpsClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class AzureDevOpsClient implements AzureDevOpsApi { constructor(options: { @@ -167,38 +153,24 @@ export class AzureDevOpsClient implements AzureDevOpsApi { getUserTeamIds(userId: string): Promise; } -// Warning: (ae-missing-release-tag) "azureDevOpsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const azureDevOpsPlugin: BackstagePlugin<{}, {}, {}>; -// Warning: (ae-missing-release-tag) "AzurePullRequestsIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const AzurePullRequestsIcon: (props: SvgIconProps) => JSX.Element; -// Warning: (ae-missing-release-tag) "AzurePullRequestsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const AzurePullRequestsPage: ({ - projectName, - pollingInterval, - defaultColumnConfigs, -}: { +export const AzurePullRequestsPage: (props: { projectName?: string | undefined; pollingInterval?: number | undefined; defaultColumnConfigs?: PullRequestColumnConfig[] | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "BaseFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BaseFilter = { type: FilterType; }; -// Warning: (ae-missing-release-tag) "CreatedByTeamFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CreatedByTeamFilter = BaseFilter & ({ @@ -212,8 +184,6 @@ export type CreatedByTeamFilter = BaseFilter & } )); -// Warning: (ae-missing-release-tag) "CreatedByTeamsFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CreatedByTeamsFilter = BaseFilter & ( @@ -233,8 +203,6 @@ export type CreatedByTeamsFilter = BaseFilter & } ); -// Warning: (ae-missing-release-tag) "CreatedByUserFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CreatedByUserFilter = BaseFilter & ( @@ -248,31 +216,19 @@ export type CreatedByUserFilter = BaseFilter & } ); -// Warning: (ae-missing-release-tag) "EntityAzureGitTagsContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityAzureGitTagsContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityAzurePipelinesContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityAzurePipelinesContent: ({ - defaultLimit, -}: { +export const EntityAzurePipelinesContent: (props: { defaultLimit?: number | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityAzurePullRequestsContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityAzurePullRequestsContent: ({ - defaultLimit, -}: { +export const EntityAzurePullRequestsContent: (props: { defaultLimit?: number | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "Filter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Filter = | AssignedToUserFilter @@ -283,8 +239,6 @@ export type Filter = | CreatedByTeamsFilter | AllFilter; -// Warning: (ae-missing-release-tag) "FilterType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum FilterType { // (undocumented) @@ -311,18 +265,12 @@ export enum FilterType { CreatedByUser = 'CreatedByUser', } -// Warning: (ae-missing-release-tag) "isAzureDevOpsAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const isAzureDevOpsAvailable: (entity: Entity) => boolean; -// Warning: (ae-missing-release-tag) "isAzurePipelinesAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const isAzurePipelinesAvailable: (entity: Entity) => boolean; -// Warning: (ae-missing-release-tag) "PullRequestColumnConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface PullRequestColumnConfig { // (undocumented) @@ -333,8 +281,6 @@ export interface PullRequestColumnConfig { title: string; } -// Warning: (ae-missing-release-tag) "PullRequestFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PullRequestFilter = (pullRequest: DashboardPullRequest) => boolean; diff --git a/plugins/azure-devops/src/api/AzureDevOpsApi.ts b/plugins/azure-devops/src/api/AzureDevOpsApi.ts index ccedc401f1..d90fd71b30 100644 --- a/plugins/azure-devops/src/api/AzureDevOpsApi.ts +++ b/plugins/azure-devops/src/api/AzureDevOpsApi.ts @@ -28,10 +28,12 @@ import { import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export const azureDevOpsApiRef = createApiRef({ id: 'plugin.azure-devops.service', }); +/** @public */ export interface AzureDevOpsApi { getRepoBuilds( projectName: string, diff --git a/plugins/azure-devops/src/api/AzureDevOpsClient.ts b/plugins/azure-devops/src/api/AzureDevOpsClient.ts index 61c8479d71..41d7126f40 100644 --- a/plugins/azure-devops/src/api/AzureDevOpsClient.ts +++ b/plugins/azure-devops/src/api/AzureDevOpsClient.ts @@ -26,10 +26,10 @@ import { Team, } from '@backstage/plugin-azure-devops-common'; import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; - -import { AzureDevOpsApi } from './AzureDevOpsApi'; import { ResponseError } from '@backstage/errors'; +import { AzureDevOpsApi } from './AzureDevOpsApi'; +/** @public */ export class AzureDevOpsClient implements AzureDevOpsApi { private readonly discoveryApi: DiscoveryApi; private readonly identityApi: IdentityApi; diff --git a/plugins/azure-devops/src/components/AzurePullRequestsIcon/AzurePullRequestsIcon.tsx b/plugins/azure-devops/src/components/AzurePullRequestsIcon/AzurePullRequestsIcon.tsx index bb4cb8c081..99e3f74e90 100644 --- a/plugins/azure-devops/src/components/AzurePullRequestsIcon/AzurePullRequestsIcon.tsx +++ b/plugins/azure-devops/src/components/AzurePullRequestsIcon/AzurePullRequestsIcon.tsx @@ -14,10 +14,10 @@ * limitations under the License. */ +import React from 'react'; import { SvgIcon, SvgIconProps } from '@material-ui/core'; -import React from 'react'; - +/** @public */ export const AzurePullRequestsIcon = (props: SvgIconProps) => ( { +export const EntityPageAzurePipelines = (props: { defaultLimit?: number }) => { const { entity } = useEntity(); const { project, repo, definition } = getAnnotationFromEntity(entity); const { items, loading, error } = useBuildRuns( project, - defaultLimit, + props.defaultLimit, repo, definition, ); diff --git a/plugins/azure-devops/src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.tsx b/plugins/azure-devops/src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.tsx index 3d1a3ef77a..b5a21ff750 100644 --- a/plugins/azure-devops/src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.tsx +++ b/plugins/azure-devops/src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.tsx @@ -17,10 +17,8 @@ import { PullRequestTable } from '../PullRequestTable/PullRequestTable'; import React from 'react'; -export const EntityPageAzurePullRequests = ({ - defaultLimit, -}: { +export const EntityPageAzurePullRequests = (props: { defaultLimit?: number; }) => { - return ; + return ; }; diff --git a/plugins/azure-devops/src/components/PullRequestsPage/PullRequestsPage.tsx b/plugins/azure-devops/src/components/PullRequestsPage/PullRequestsPage.tsx index 158c4bca5b..c5da207bd6 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/PullRequestsPage.tsx +++ b/plugins/azure-devops/src/components/PullRequestsPage/PullRequestsPage.tsx @@ -24,7 +24,6 @@ import { import { PullRequestColumnConfig, PullRequestGroup } from './lib/types'; import React, { useState } from 'react'; import { getPullRequestGroupConfigs, getPullRequestGroups } from './lib/utils'; - import { FilterType } from './lib/filters'; import { PullRequestGrid } from './lib/PullRequestGrid'; import { useDashboardPullRequests } from '../../hooks'; @@ -71,11 +70,9 @@ type PullRequestsPageProps = { defaultColumnConfigs?: PullRequestColumnConfig[]; }; -export const PullRequestsPage = ({ - projectName, - pollingInterval, - defaultColumnConfigs, -}: PullRequestsPageProps) => { +export const PullRequestsPage = (props: PullRequestsPageProps) => { + const { projectName, pollingInterval, defaultColumnConfigs } = props; + const { pullRequests, loading, error } = useDashboardPullRequests( projectName, pollingInterval, diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/allFilter.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/allFilter.ts index 90ec822ef6..952f7ddc57 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/allFilter.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/allFilter.ts @@ -18,6 +18,7 @@ import { BaseFilter, FilterType, PullRequestFilter } from './types'; import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +/** @public */ export type AllFilter = BaseFilter & { type: FilterType.All; }; diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamFilter.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamFilter.ts index 8e816db2c3..fa6b3de00a 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamFilter.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamFilter.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { BaseFilter, FilterType, PullRequestFilter } from './types'; - import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +import { BaseFilter, FilterType, PullRequestFilter } from './types'; import { stringArrayHas } from '../../../../utils'; +/** @public */ export type AssignedToTeamFilter = BaseFilter & { type: FilterType.AssignedToTeam; teamId: string; diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.ts index ce5e5bcc11..df93e38f81 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { BaseFilter, FilterType, PullRequestFilter } from './types'; - import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +import { BaseFilter, FilterType, PullRequestFilter } from './types'; import { createAssignedToTeamFilter } from './assignedToTeamFilter'; +/** @public */ export type AssignedToTeamsFilter = BaseFilter & ( | { diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToUserFilter.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToUserFilter.ts index 95ee3d5a59..3f554de62b 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToUserFilter.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToUserFilter.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { BaseFilter, FilterType, PullRequestFilter } from './types'; - import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +import { BaseFilter, FilterType, PullRequestFilter } from './types'; import { stringArrayHas } from '../../../../utils'; +/** @public */ export type AssignedToUserFilter = BaseFilter & ( | { diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamFilter.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamFilter.ts index 70a388b540..e4d28d28b1 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamFilter.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamFilter.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { BaseFilter, FilterType, PullRequestFilter } from './types'; - import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +import { BaseFilter, FilterType, PullRequestFilter } from './types'; import { stringArrayHas } from '../../../../utils'; +/** @public */ export type CreatedByTeamFilter = BaseFilter & ({ type: FilterType.CreatedByTeam; diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamsFilter.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamsFilter.ts index 34ed81db5d..44e02136ec 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamsFilter.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamsFilter.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { BaseFilter, FilterType, PullRequestFilter } from './types'; - import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +import { BaseFilter, FilterType, PullRequestFilter } from './types'; import { createCreatedByTeamFilter } from './createdByTeamFilter'; +/** @public */ export type CreatedByTeamsFilter = BaseFilter & ( | ({ diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByUserFilter.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByUserFilter.ts index 69d4f23db5..24c14311eb 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByUserFilter.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByUserFilter.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { BaseFilter, FilterType, PullRequestFilter } from './types'; - import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +import { BaseFilter, FilterType, PullRequestFilter } from './types'; import { equalsIgnoreCase } from '../../../../utils'; +/** @public */ export type CreatedByUserFilter = BaseFilter & ( | { diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/types.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/types.ts index bc4643d51b..6b0d95eb78 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/types.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/types.ts @@ -23,6 +23,7 @@ import { CreatedByTeamsFilter } from './createdByTeamsFilter'; import { CreatedByUserFilter } from './createdByUserFilter'; import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +/** @public */ export enum FilterType { All = 'All', @@ -41,6 +42,7 @@ export enum FilterType { CreatedByCurrentUsersTeams = 'CreatedByCurrentUsersTeams', } +/** @public */ export const FilterTypes = [ FilterType.All, @@ -57,10 +59,12 @@ export const FilterTypes = [ FilterType.CreatedByCurrentUsersTeams, ] as const; +/** @public */ export type BaseFilter = { type: FilterType; }; +/** @public */ export type Filter = | AssignedToUserFilter | CreatedByUserFilter @@ -80,4 +84,5 @@ export type { AllFilter, }; +/** @public */ export type PullRequestFilter = (pullRequest: DashboardPullRequest) => boolean; diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/types.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/types.ts index 74c8ebe605..5f5f0119d8 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/types.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/types.ts @@ -14,22 +14,24 @@ * limitations under the License. */ +import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; import { Filter, PullRequestFilter } from './filters'; -import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; - +/** @public */ export interface PullRequestColumnConfig { title: string; filters: Filter[]; simplified?: boolean; } +/** @public */ export interface PullRequestGroupConfig { title: string; filter: PullRequestFilter; simplified?: boolean; } +/** @public */ export interface PullRequestGroup { title: string; pullRequests: DashboardPullRequest[]; diff --git a/plugins/azure-devops/src/plugin.ts b/plugins/azure-devops/src/plugin.ts index ccd183eee9..a9753a26c1 100644 --- a/plugins/azure-devops/src/plugin.ts +++ b/plugins/azure-devops/src/plugin.ts @@ -37,9 +37,11 @@ import { AzureDevOpsClient } from './api/AzureDevOpsClient'; import { Entity } from '@backstage/catalog-model'; import { azureDevOpsApiRef } from './api/AzureDevOpsApi'; +/** @public */ export const isAzureDevOpsAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[AZURE_DEVOPS_REPO_ANNOTATION]); +/** @public */ export const isAzurePipelinesAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[AZURE_DEVOPS_REPO_ANNOTATION]) || (Boolean(entity.metadata.annotations?.[AZURE_DEVOPS_PROJECT_ANNOTATION]) && @@ -47,6 +49,7 @@ export const isAzurePipelinesAvailable = (entity: Entity) => entity.metadata.annotations?.[AZURE_DEVOPS_BUILD_DEFINITION_ANNOTATION], )); +/** @public */ export const azureDevOpsPlugin = createPlugin({ id: 'azureDevOps', apis: [ @@ -59,6 +62,7 @@ export const azureDevOpsPlugin = createPlugin({ ], }); +/** @public */ export const AzurePullRequestsPage = azureDevOpsPlugin.provide( createRoutableExtension({ name: 'AzurePullRequestsPage', @@ -68,6 +72,7 @@ export const AzurePullRequestsPage = azureDevOpsPlugin.provide( }), ); +/** @public */ export const EntityAzurePipelinesContent = azureDevOpsPlugin.provide( createRoutableExtension({ name: 'EntityAzurePipelinesContent', @@ -79,6 +84,7 @@ export const EntityAzurePipelinesContent = azureDevOpsPlugin.provide( }), ); +/** @public */ export const EntityAzureGitTagsContent = azureDevOpsPlugin.provide( createRoutableExtension({ name: 'EntityAzureGitTagsContent', @@ -90,6 +96,7 @@ export const EntityAzureGitTagsContent = azureDevOpsPlugin.provide( }), ); +/** @public */ export const EntityAzurePullRequestsContent = azureDevOpsPlugin.provide( createRoutableExtension({ name: 'EntityAzurePullRequestsContent', diff --git a/plugins/cloudbuild/api-report.md b/plugins/cloudbuild/api-report.md index ecc6d7b460..5d2dc325e4 100644 --- a/plugins/cloudbuild/api-report.md +++ b/plugins/cloudbuild/api-report.md @@ -60,31 +60,20 @@ export interface BUILD { // @public (undocumented) export const CLOUDBUILD_ANNOTATION = 'google.com/cloudbuild-project-slug'; -// Warning: (ae-missing-release-tag) "CloudbuildApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CloudbuildApi = { - listWorkflowRuns: (request: { + listWorkflowRuns: (options: { projectId: string; }) => Promise; - getWorkflow: ({ - projectId, - id, - }: { + getWorkflow: (options: { projectId: string; id: string; }) => Promise; - getWorkflowRun: ({ - projectId, - id, - }: { + getWorkflowRun: (options: { projectId: string; id: string; }) => Promise; - reRunWorkflow: ({ - projectId, - runId, - }: { + reRunWorkflow: (options: { projectId: string; runId: string; }) => Promise; @@ -95,43 +84,27 @@ export type CloudbuildApi = { // @public (undocumented) export const cloudbuildApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "CloudbuildClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class CloudbuildClient implements CloudbuildApi { constructor(googleAuthApi: OAuthApi); // (undocumented) getToken(): Promise; // (undocumented) - getWorkflow({ - projectId, - id, - }: { + getWorkflow(options: { projectId: string; id: string; }): Promise; // (undocumented) - getWorkflowRun({ - projectId, - id, - }: { + getWorkflowRun(options: { projectId: string; id: string; }): Promise; // (undocumented) - listWorkflowRuns({ - projectId, - }: { + listWorkflowRuns(options: { projectId: string; }): Promise; // (undocumented) - reRunWorkflow({ - projectId, - runId, - }: { - projectId: string; - runId: string; - }): Promise; + reRunWorkflow(options: { projectId: string; runId: string }): Promise; } // Warning: (ae-missing-release-tag) "cloudbuildPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) diff --git a/plugins/cloudbuild/src/api/CloudbuildApi.ts b/plugins/cloudbuild/src/api/CloudbuildApi.ts index 92ea8511fe..eeaf269cde 100644 --- a/plugins/cloudbuild/src/api/CloudbuildApi.ts +++ b/plugins/cloudbuild/src/api/CloudbuildApi.ts @@ -24,28 +24,20 @@ export const cloudbuildApiRef = createApiRef({ id: 'plugin.cloudbuild.service', }); +/** @public */ export type CloudbuildApi = { - listWorkflowRuns: (request: { + listWorkflowRuns: (options: { projectId: string; }) => Promise; - getWorkflow: ({ - projectId, - id, - }: { + getWorkflow: (options: { projectId: string; id: string; }) => Promise; - getWorkflowRun: ({ - projectId, - id, - }: { + getWorkflowRun: (options: { projectId: string; id: string; }) => Promise; - reRunWorkflow: ({ - projectId, - runId, - }: { + reRunWorkflow: (options: { projectId: string; runId: string; }) => Promise; diff --git a/plugins/cloudbuild/src/api/CloudbuildClient.ts b/plugins/cloudbuild/src/api/CloudbuildClient.ts index cbd47e84e9..035b20f63d 100644 --- a/plugins/cloudbuild/src/api/CloudbuildClient.ts +++ b/plugins/cloudbuild/src/api/CloudbuildClient.ts @@ -21,20 +21,18 @@ import { } from '../api/types'; import { OAuthApi } from '@backstage/core-plugin-api'; +/** @public */ export class CloudbuildClient implements CloudbuildApi { constructor(private readonly googleAuthApi: OAuthApi) {} - async reRunWorkflow({ - projectId, - runId, - }: { + async reRunWorkflow(options: { projectId: string; runId: string; }): Promise { await fetch( `https://cloudbuild.googleapis.com/v1/projects/${encodeURIComponent( - projectId, - )}/builds/${encodeURIComponent(runId)}:retry`, + options.projectId, + )}/builds/${encodeURIComponent(options.runId)}:retry`, { headers: new Headers({ Accept: '*/*', @@ -43,14 +41,13 @@ export class CloudbuildClient implements CloudbuildApi { }, ); } - async listWorkflowRuns({ - projectId, - }: { + + async listWorkflowRuns(options: { projectId: string; }): Promise { const workflowRuns = await fetch( `https://cloudbuild.googleapis.com/v1/projects/${encodeURIComponent( - projectId, + options.projectId, )}/builds`, { headers: new Headers({ @@ -65,17 +62,15 @@ export class CloudbuildClient implements CloudbuildApi { return builds; } - async getWorkflow({ - projectId, - id, - }: { + + async getWorkflow(options: { projectId: string; id: string; }): Promise { const workflow = await fetch( `https://cloudbuild.googleapis.com/v1/projects/${encodeURIComponent( - projectId, - )}/builds/${encodeURIComponent(id)}`, + options.projectId, + )}/builds/${encodeURIComponent(options.id)}`, { headers: new Headers({ Accept: '*/*', @@ -88,17 +83,15 @@ export class CloudbuildClient implements CloudbuildApi { return build; } - async getWorkflowRun({ - projectId, - id, - }: { + + async getWorkflowRun(options: { projectId: string; id: string; }): Promise { const workflow = await fetch( `https://cloudbuild.googleapis.com/v1/projects/${encodeURIComponent( - projectId, - )}/builds/${encodeURIComponent(id)}`, + options.projectId, + )}/builds/${encodeURIComponent(options.id)}`, { headers: new Headers({ Accept: '*/*', diff --git a/plugins/explore/api-report.md b/plugins/explore/api-report.md index c7181af19d..f4c7345b6c 100644 --- a/plugins/explore/api-report.md +++ b/plugins/explore/api-report.md @@ -33,9 +33,7 @@ export const DomainCard: ({ entity }: DomainCardProps) => JSX.Element; // Warning: (ae-missing-release-tag) "DomainExplorerContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const DomainExplorerContent: ({ - title, -}: { +export const DomainExplorerContent: (props: { title?: string | undefined; }) => JSX.Element; @@ -82,18 +80,14 @@ export const exploreRouteRef: RouteRef; // Warning: (ae-missing-release-tag) "GroupsExplorerContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const GroupsExplorerContent: ({ - title, -}: { +export const GroupsExplorerContent: (props: { title?: string | undefined; }) => JSX.Element; // Warning: (ae-missing-release-tag) "ToolExplorerContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const ToolExplorerContent: ({ - title, -}: { +export const ToolExplorerContent: (props: { title?: string | undefined; }) => JSX.Element; diff --git a/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.tsx b/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.tsx index ba495f6492..3cfed5b12b 100644 --- a/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.tsx +++ b/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.tsx @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { DomainEntity } from '@backstage/catalog-model'; import { catalogApiRef } from '@backstage/plugin-catalog-react'; import { Button } from '@material-ui/core'; import React from 'react'; import useAsync from 'react-use/lib/useAsync'; import { DomainCard } from '../DomainCard'; - import { Content, ContentHeader, @@ -29,7 +29,6 @@ import { SupportButton, WarningPanel, } from '@backstage/core-components'; - import { useApi } from '@backstage/core-plugin-api'; const Body = () => { @@ -85,16 +84,11 @@ const Body = () => { ); }; -type DomainExplorerContentProps = { - title?: string; -}; - -export const DomainExplorerContent = ({ - title, -}: DomainExplorerContentProps) => { +/** @public */ +export const DomainExplorerContent = (props: { title?: string }) => { return ( - + Discover the domains in your ecosystem. diff --git a/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.tsx b/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.tsx index ae711b85d9..62c4b093c0 100644 --- a/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.tsx +++ b/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.tsx @@ -31,21 +31,14 @@ const useStyles = makeStyles({ }, }); -type GroupsExplorerContentProps = { - title?: string; -}; - -export const GroupsExplorerContent = ({ - title, -}: GroupsExplorerContentProps) => { +export const GroupsExplorerContent = (props: { title?: string }) => { const classes = useStyles(); return ( - + Explore your groups. - ); diff --git a/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx b/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx index db07bd0665..5404c67393 100644 --- a/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx +++ b/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx @@ -18,7 +18,6 @@ import { exploreToolsConfigRef } from '@backstage/plugin-explore-react'; import React from 'react'; import useAsync from 'react-use/lib/useAsync'; import { ToolCard } from '../ToolCard'; - import { Content, ContentHeader, @@ -28,7 +27,6 @@ import { SupportButton, WarningPanel, } from '@backstage/core-components'; - import { useApi } from '@backstage/core-plugin-api'; const Body = () => { @@ -68,13 +66,9 @@ const Body = () => { ); }; -type ToolExplorerContentProps = { - title?: string; -}; - -export const ToolExplorerContent = ({ title }: ToolExplorerContentProps) => ( +export const ToolExplorerContent = (props: { title?: string }) => ( - + Discover the tools in your ecosystem. diff --git a/plugins/fossa/api-report.md b/plugins/fossa/api-report.md index ca9610b992..45f0746ac3 100644 --- a/plugins/fossa/api-report.md +++ b/plugins/fossa/api-report.md @@ -9,22 +9,14 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { InfoCardVariants } from '@backstage/core-components'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "EntityFossaCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityFossaCard: ({ - variant, -}: { +export const EntityFossaCard: (props: { variant?: InfoCardVariants | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "FossaPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const FossaPage: ({ entitiesFilter }: FossaPageProps) => JSX.Element; +export const FossaPage: (props: FossaPageProps) => JSX.Element; -// Warning: (ae-missing-release-tag) "FossaPageProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type FossaPageProps = { entitiesFilter?: @@ -33,8 +25,6 @@ export type FossaPageProps = { | undefined; }; -// Warning: (ae-missing-release-tag) "fossaPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const fossaPlugin: BackstagePlugin< { diff --git a/plugins/fossa/src/components/FossaCard/FossaCard.tsx b/plugins/fossa/src/components/FossaCard/FossaCard.tsx index bbd5594fbc..31ff84e107 100644 --- a/plugins/fossa/src/components/FossaCard/FossaCard.tsx +++ b/plugins/fossa/src/components/FossaCard/FossaCard.tsx @@ -100,7 +100,9 @@ const Card = ({ ); }; -export const FossaCard = ({ variant }: { variant?: InfoCardVariants }) => { + +export const FossaCard = (props: { variant?: InfoCardVariants }) => { + const { variant } = props; const { entity } = useEntity(); const fossaApi = useApi(fossaApiRef); diff --git a/plugins/fossa/src/components/FossaPage/FossaPage.tsx b/plugins/fossa/src/components/FossaPage/FossaPage.tsx index 731852d4a7..faff862d0f 100644 --- a/plugins/fossa/src/components/FossaPage/FossaPage.tsx +++ b/plugins/fossa/src/components/FossaPage/FossaPage.tsx @@ -167,6 +167,7 @@ const filters: TableFilter[] = [ { column: 'Branch', type: 'select' }, ]; +/** @public */ export type FossaPageProps = { entitiesFilter?: | Record[] @@ -174,9 +175,8 @@ export type FossaPageProps = { | undefined; }; -export const FossaPage = ({ - entitiesFilter = { kind: 'Component' }, -}: FossaPageProps) => { +export const FossaPage = (props: FossaPageProps) => { + const { entitiesFilter = { kind: 'Component' } } = props; const catalogApi = useApi(catalogApiRef); const fossaApi = useApi(fossaApiRef); const [filter, setFilter] = useState(entitiesFilter); diff --git a/plugins/fossa/src/extensions.tsx b/plugins/fossa/src/extensions.tsx index 97bea6a4cf..d26057d9cc 100644 --- a/plugins/fossa/src/extensions.tsx +++ b/plugins/fossa/src/extensions.tsx @@ -21,6 +21,7 @@ import { createRoutableExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const EntityFossaCard = fossaPlugin.provide( createComponentExtension({ name: 'EntityFossaCard', @@ -30,6 +31,7 @@ export const EntityFossaCard = fossaPlugin.provide( }), ); +/** @public */ export const FossaPage = fossaPlugin.provide( createRoutableExtension({ name: 'FossaPage', diff --git a/plugins/fossa/src/plugin.ts b/plugins/fossa/src/plugin.ts index 954ecedc81..bcc8c0f8e6 100644 --- a/plugins/fossa/src/plugin.ts +++ b/plugins/fossa/src/plugin.ts @@ -24,6 +24,7 @@ import { identityApiRef, } from '@backstage/core-plugin-api'; +/** @public */ export const fossaPlugin = createPlugin({ id: 'fossa', apis: [ diff --git a/plugins/git-release-manager/api-report.md b/plugins/git-release-manager/api-report.md index 24207de991..d34b6c07fb 100644 --- a/plugins/git-release-manager/api-report.md +++ b/plugins/git-release-manager/api-report.md @@ -90,7 +90,6 @@ const DISABLE_CACHE: { const Divider: () => JSX.Element; // Warning: (ae-forgotten-export) The symbol "SemverTagParts" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "getBumpedSemverTagParts" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public function getBumpedSemverTagParts( @@ -105,14 +104,8 @@ function getBumpedSemverTagParts( }; }; -// Warning: (ae-missing-release-tag) "getBumpedTag" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public -function getBumpedTag({ - project, - tag, - bumpLevel, -}: { +function getBumpedTag(options: { project: Project; tag: string; bumpLevel: keyof typeof SEMVER_PARTS; @@ -167,10 +160,8 @@ function getSemverTagParts(tag: string): // @public (undocumented) function getShortCommitHash(hash: string): string; -// Warning: (ae-missing-release-tag) "getTagParts" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public -function getTagParts({ project, tag }: { project: Project; tag: string }): +function getTagParts(options: { project: Project; tag: string }): | { error: AlertError; tagParts?: undefined; @@ -207,14 +198,8 @@ export const gitReleaseManagerPlugin: BackstagePlugin< {} >; -// Warning: (ae-missing-release-tag) "InfoCardPlus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -const InfoCardPlus: ({ - children, -}: { - children?: React_2.ReactNode; -}) => JSX.Element; +const InfoCardPlus: (props: { children?: React_2.ReactNode }) => JSX.Element; // Warning: (ae-missing-release-tag) "internals" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -625,16 +610,8 @@ declare namespace testIds { export { TEST_IDS }; } -// Warning: (ae-missing-release-tag) "validateTagName" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -const validateTagName: ({ - project, - tagName, -}: { - project: Project; - tagName?: string | undefined; -}) => +const validateTagName: (options: { project: Project; tagName?: string }) => | { tagNameError: null; } @@ -653,9 +630,9 @@ const VERSIONING_STRATEGIES: { // Warnings were encountered during analysis: // // src/components/ResponseStepDialog/LinearProgressWithLabel.d.ts:5:5 - (ae-forgotten-export) The symbol "ResponseStep" needs to be exported by the entry point index.d.ts -// src/helpers/getBumpedTag.d.ts:14:5 - (ae-forgotten-export) The symbol "Project" needs to be exported by the entry point index.d.ts -// src/helpers/getBumpedTag.d.ts:19:5 - (ae-forgotten-export) The symbol "CalverTagParts" needs to be exported by the entry point index.d.ts -// src/helpers/getBumpedTag.d.ts:31:5 - (ae-forgotten-export) The symbol "AlertError" needs to be exported by the entry point index.d.ts +// src/helpers/getBumpedTag.d.ts:16:5 - (ae-forgotten-export) The symbol "Project" needs to be exported by the entry point index.d.ts +// src/helpers/getBumpedTag.d.ts:21:5 - (ae-forgotten-export) The symbol "CalverTagParts" needs to be exported by the entry point index.d.ts +// src/helpers/getBumpedTag.d.ts:33:5 - (ae-forgotten-export) The symbol "AlertError" needs to be exported by the entry point index.d.ts // src/index.d.ts:9:5 - (ae-forgotten-export) The symbol "components" needs to be exported by the entry point index.d.ts // src/index.d.ts:10:5 - (ae-forgotten-export) The symbol "constants" needs to be exported by the entry point index.d.ts // src/index.d.ts:11:5 - (ae-forgotten-export) The symbol "helpers" needs to be exported by the entry point index.d.ts diff --git a/plugins/git-release-manager/src/components/InfoCardPlus.tsx b/plugins/git-release-manager/src/components/InfoCardPlus.tsx index bd0b79ba37..cd682adde1 100644 --- a/plugins/git-release-manager/src/components/InfoCardPlus.tsx +++ b/plugins/git-release-manager/src/components/InfoCardPlus.tsx @@ -17,7 +17,6 @@ import React from 'react'; import { makeStyles } from '@material-ui/core'; import { TEST_IDS } from '../test-helpers/test-ids'; - import { InfoCard } from '@backstage/core-components'; const useStyles = makeStyles(() => ({ @@ -26,7 +25,8 @@ const useStyles = makeStyles(() => ({ }, })); -export const InfoCardPlus = ({ children }: { children?: React.ReactNode }) => { +/** @public */ +export const InfoCardPlus = (props: { children?: React.ReactNode }) => { const classes = useStyles(); return ( @@ -34,7 +34,7 @@ export const InfoCardPlus = ({ children }: { children?: React.ReactNode }) => { style={{ position: 'relative' }} data-testid={TEST_IDS.info.infoFeaturePlus} > - {children} + {props.children} ); }; diff --git a/plugins/git-release-manager/src/helpers/getBumpedTag.ts b/plugins/git-release-manager/src/helpers/getBumpedTag.ts index dbfb00818e..5183947a1c 100644 --- a/plugins/git-release-manager/src/helpers/getBumpedTag.ts +++ b/plugins/git-release-manager/src/helpers/getBumpedTag.ts @@ -28,16 +28,15 @@ import { SemverTagParts } from './tagParts/getSemverTagParts'; * * For semantic versioning this means either a minor or a patch bump * depending on the value of `bumpLevel` + * + * @public */ -export function getBumpedTag({ - project, - tag, - bumpLevel, -}: { +export function getBumpedTag(options: { project: Project; tag: string; bumpLevel: keyof typeof SEMVER_PARTS; }) { + const { project, tag, bumpLevel } = options; const tagParts = getTagParts({ project, tag }); if (tagParts.error !== undefined) { @@ -53,6 +52,7 @@ export function getBumpedTag({ return getBumpedSemverTag(tagParts.tagParts, bumpLevel); } +/** @public */ function getPatchedCalverTag(tagParts: CalverTagParts) { const bumpedTagParts: CalverTagParts = { ...tagParts, @@ -67,6 +67,7 @@ function getPatchedCalverTag(tagParts: CalverTagParts) { }; } +/** @public */ function getBumpedSemverTag( tagParts: SemverTagParts, semverBumpLevel: keyof typeof SEMVER_PARTS, @@ -85,6 +86,8 @@ function getBumpedSemverTag( /** * Calculates the next semantic version, taking into account * whether or not it's a minor or patch + * + * @public */ export function getBumpedSemverTagParts( tagParts: SemverTagParts, diff --git a/plugins/git-release-manager/src/helpers/tagParts/getTagParts.ts b/plugins/git-release-manager/src/helpers/tagParts/getTagParts.ts index 750e4e23c5..ba8412b2b4 100644 --- a/plugins/git-release-manager/src/helpers/tagParts/getTagParts.ts +++ b/plugins/git-release-manager/src/helpers/tagParts/getTagParts.ts @@ -21,17 +21,13 @@ import { Project } from '../../contexts/ProjectContext'; /** * Tag parts are the individual parts of a version, e.g. .. * are the parts of a semantic version + * + * @public */ -export function getTagParts({ - project, - tag, -}: { - project: Project; - tag: string; -}) { - if (project.versioningStrategy === 'calver') { - return getCalverTagParts(tag); +export function getTagParts(options: { project: Project; tag: string }) { + if (options.project.versioningStrategy === 'calver') { + return getCalverTagParts(options.tag); } - return getSemverTagParts(tag); + return getSemverTagParts(options.tag); } diff --git a/plugins/git-release-manager/src/helpers/tagParts/validateTagName.ts b/plugins/git-release-manager/src/helpers/tagParts/validateTagName.ts index b9c0fb74ff..4e35cb0ca4 100644 --- a/plugins/git-release-manager/src/helpers/tagParts/validateTagName.ts +++ b/plugins/git-release-manager/src/helpers/tagParts/validateTagName.ts @@ -18,13 +18,13 @@ import { getCalverTagParts } from './getCalverTagParts'; import { getSemverTagParts } from './getSemverTagParts'; import { Project } from '../../contexts/ProjectContext'; -export const validateTagName = ({ - project, - tagName, -}: { +/** @public */ +export const validateTagName = (options: { project: Project; tagName?: string; }) => { + const { project, tagName } = options; + if (!tagName) { return { tagNameError: null, @@ -33,7 +33,6 @@ export const validateTagName = ({ if (project.versioningStrategy === 'calver') { const { error } = getCalverTagParts(tagName); - return { tagNameError: error, }; diff --git a/plugins/github-actions/api-report.md b/plugins/github-actions/api-report.md index 862d20d608..8cf70eabcc 100644 --- a/plugins/github-actions/api-report.md +++ b/plugins/github-actions/api-report.md @@ -28,35 +28,22 @@ export enum BuildStatus { 'success' = 0, } -// Warning: (ae-missing-release-tag) "EntityGithubActionsContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityGithubActionsContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityLatestGithubActionRunCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityLatestGithubActionRunCard: ({ - branch, - variant, -}: { +export const EntityLatestGithubActionRunCard: (props: { branch: string; variant?: InfoCardVariants | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityLatestGithubActionsForBranchCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityLatestGithubActionsForBranchCard: ({ - branch, - variant, -}: { +export const EntityLatestGithubActionsForBranchCard: (props: { branch: string; variant?: InfoCardVariants | undefined; }) => JSX.Element; // Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "EntityRecentGithubActionsRunsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export const EntityRecentGithubActionsRunsCard: ({ @@ -191,8 +178,6 @@ export class GithubActionsClient implements GithubActionsApi { }): Promise; } -// Warning: (ae-missing-release-tag) "githubActionsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const githubActionsPlugin: BackstagePlugin< { @@ -233,22 +218,21 @@ export type Jobs = { jobs: Job[]; }; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts // Warning: (ae-missing-release-tag) "LatestWorkflowRunCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const LatestWorkflowRunCard: ({ - branch, - variant, -}: Props_2) => JSX.Element; +export const LatestWorkflowRunCard: (props: { + branch: string; + variant?: InfoCardVariants; +}) => JSX.Element; // Warning: (ae-missing-release-tag) "LatestWorkflowsForBranchCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const LatestWorkflowsForBranchCard: ({ - branch, - variant, -}: Props_2) => JSX.Element; +export const LatestWorkflowsForBranchCard: (props: { + branch: string; + variant?: InfoCardVariants; +}) => JSX.Element; // Warning: (ae-missing-release-tag) "RecentWorkflowRunsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // diff --git a/plugins/github-actions/src/components/Cards/Cards.tsx b/plugins/github-actions/src/components/Cards/Cards.tsx index 61a5146bee..5e53096ba4 100644 --- a/plugins/github-actions/src/components/Cards/Cards.tsx +++ b/plugins/github-actions/src/components/Cards/Cards.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { readGitHubIntegrationConfigs } from '@backstage/integration'; import { useEntity } from '@backstage/plugin-catalog-react'; import { @@ -27,7 +28,6 @@ import { GITHUB_ACTIONS_ANNOTATION } from '../getProjectNameFromEntity'; import { useWorkflowRuns, WorkflowRun } from '../useWorkflowRuns'; import { WorkflowRunsTable } from '../WorkflowRunsTable'; import { WorkflowRunStatus } from '../WorkflowRunStatus'; - import { configApiRef, errorApiRef, useApi } from '@backstage/core-plugin-api'; import { InfoCard, @@ -43,20 +43,18 @@ const useStyles = makeStyles({ }, }); -const WidgetContent = ({ - error, - loading, - lastRun, - branch, -}: { +const WidgetContent = (props: { error?: Error; loading?: boolean; lastRun: WorkflowRun; branch: string; }) => { + const { error, loading, lastRun, branch } = props; const classes = useStyles(); + if (error) return Couldn't fetch latest {branch} run; if (loading) return ; + return ( { +export const LatestWorkflowRunCard = (props: { + branch: string; + variant?: InfoCardVariants; +}) => { + const { branch = 'master', variant } = props; const { entity } = useEntity(); const config = useApi(configApiRef); const errorApi = useApi(errorApiRef); @@ -120,15 +118,11 @@ export const LatestWorkflowRunCard = ({ ); }; -type Props = { +export const LatestWorkflowsForBranchCard = (props: { branch: string; variant?: InfoCardVariants; -}; - -export const LatestWorkflowsForBranchCard = ({ - branch = 'master', - variant, -}: Props) => { +}) => { + const { branch = 'master', variant } = props; const { entity } = useEntity(); return ( diff --git a/plugins/github-actions/src/plugin.ts b/plugins/github-actions/src/plugin.ts index d8db5e16d0..26cf246fb9 100644 --- a/plugins/github-actions/src/plugin.ts +++ b/plugins/github-actions/src/plugin.ts @@ -25,6 +25,7 @@ import { createComponentExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const githubActionsPlugin = createPlugin({ id: 'github-actions', apis: [ @@ -40,6 +41,7 @@ export const githubActionsPlugin = createPlugin({ }, }); +/** @public */ export const EntityGithubActionsContent = githubActionsPlugin.provide( createRoutableExtension({ name: 'EntityGithubActionsContent', @@ -48,6 +50,7 @@ export const EntityGithubActionsContent = githubActionsPlugin.provide( }), ); +/** @public */ export const EntityLatestGithubActionRunCard = githubActionsPlugin.provide( createComponentExtension({ name: 'EntityLatestGithubActionRunCard', @@ -58,6 +61,7 @@ export const EntityLatestGithubActionRunCard = githubActionsPlugin.provide( }), ); +/** @public */ export const EntityLatestGithubActionsForBranchCard = githubActionsPlugin.provide( createComponentExtension({ @@ -71,6 +75,7 @@ export const EntityLatestGithubActionsForBranchCard = }), ); +/** @public */ export const EntityRecentGithubActionsRunsCard = githubActionsPlugin.provide( createComponentExtension({ name: 'EntityRecentGithubActionsRunsCard', diff --git a/plugins/jenkins/api-report.md b/plugins/jenkins/api-report.md index 33072ecf49..59e3dc636e 100644 --- a/plugins/jenkins/api-report.md +++ b/plugins/jenkins/api-report.md @@ -14,24 +14,15 @@ import { IdentityApi } from '@backstage/core-plugin-api'; import { InfoCardVariants } from '@backstage/core-components'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "EntityJenkinsContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityJenkinsContent: (_props: {}) => JSX.Element; +export const EntityJenkinsContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityLatestJenkinsRunCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityLatestJenkinsRunCard: ({ - branch, - variant, -}: { +export const EntityLatestJenkinsRunCard: (props: { branch: string; variant?: InfoCardVariants | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "isJenkinsAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const isJenkinsAvailable: (entity: Entity) => boolean; export { isJenkinsAvailable }; @@ -101,8 +92,6 @@ export class JenkinsClient implements JenkinsApi { }): Promise; } -// Warning: (ae-missing-release-tag) "jenkinsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const jenkinsPlugin: BackstagePlugin< { @@ -117,12 +106,9 @@ export { jenkinsPlugin as plugin }; // Warning: (ae-missing-release-tag) "LatestRunCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const LatestRunCard: ({ - branch, - variant, -}: { +export const LatestRunCard: (props: { branch: string; - variant?: InfoCardVariants | undefined; + variant?: InfoCardVariants; }) => JSX.Element; // Warning: (ae-missing-release-tag) "LEGACY_JENKINS_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -130,9 +116,8 @@ export const LatestRunCard: ({ // @public (undocumented) export const LEGACY_JENKINS_ANNOTATION = 'jenkins.io/github-folder'; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts // Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const Router: (_props: Props) => JSX.Element; +export const Router: () => JSX.Element; ``` diff --git a/plugins/jenkins/src/components/Cards/Cards.tsx b/plugins/jenkins/src/components/Cards/Cards.tsx index cb84964124..44bbc06f65 100644 --- a/plugins/jenkins/src/components/Cards/Cards.tsx +++ b/plugins/jenkins/src/components/Cards/Cards.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { LinearProgress, makeStyles, Theme } from '@material-ui/core'; import ExternalLinkIcon from '@material-ui/icons/Launch'; import { DateTime, Duration } from 'luxon'; @@ -77,13 +78,12 @@ const WidgetContent = ({ ); }; -const JenkinsApiErrorPanel = ({ - message, - errorType, -}: { +const JenkinsApiErrorPanel = (props: { message: string; errorType: ErrorType; }) => { + const { message, errorType } = props; + let title = undefined; if (errorType === ErrorType.CONNECTION_ERROR) { title = "Can't connect to Jenkins"; @@ -94,13 +94,11 @@ const JenkinsApiErrorPanel = ({ return ; }; -export const LatestRunCard = ({ - branch = 'master', - variant, -}: { +export const LatestRunCard = (props: { branch: string; variant?: InfoCardVariants; }) => { + const { branch = 'master', variant } = props; const [{ projects, loading, error }] = useBuilds({ branch }); const latestRun = projects?.[0]; return ( diff --git a/plugins/jenkins/src/components/Router.tsx b/plugins/jenkins/src/components/Router.tsx index b3561be2b0..ef86203e9e 100644 --- a/plugins/jenkins/src/components/Router.tsx +++ b/plugins/jenkins/src/components/Router.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Entity } from '@backstage/catalog-model'; import { MissingAnnotationEmptyState } from '@backstage/core-components'; import { useEntity } from '@backstage/plugin-catalog-react'; @@ -23,13 +24,12 @@ import { buildRouteRef } from '../plugin'; import { CITable } from './BuildsPage/lib/CITable'; import { DetailedViewPage } from './BuildWithStepsPage/'; +/** @public */ export const isJenkinsAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[JENKINS_ANNOTATION]) || Boolean(entity.metadata.annotations?.[LEGACY_JENKINS_ANNOTATION]); -type Props = {}; - -export const Router = (_props: Props) => { +export const Router = () => { const { entity } = useEntity(); if (!isJenkinsAvailable(entity)) { diff --git a/plugins/jenkins/src/plugin.ts b/plugins/jenkins/src/plugin.ts index c32c9b50d1..7dbb6bfde1 100644 --- a/plugins/jenkins/src/plugin.ts +++ b/plugins/jenkins/src/plugin.ts @@ -26,16 +26,19 @@ import { } from '@backstage/core-plugin-api'; import { JenkinsClient, jenkinsApiRef } from './api'; +/** @public */ export const rootRouteRef = createRouteRef({ id: 'jenkins', }); +/** @public */ export const buildRouteRef = createSubRouteRef({ id: 'jenkins/builds', path: '/builds/:jobFullName/:buildNumber', parent: rootRouteRef, }); +/** @public */ export const jenkinsPlugin = createPlugin({ id: 'jenkins', apis: [ @@ -51,6 +54,7 @@ export const jenkinsPlugin = createPlugin({ }, }); +/** @public */ export const EntityJenkinsContent = jenkinsPlugin.provide( createRoutableExtension({ name: 'EntityJenkinsContent', @@ -58,6 +62,8 @@ export const EntityJenkinsContent = jenkinsPlugin.provide( mountPoint: rootRouteRef, }), ); + +/** @public */ export const EntityLatestJenkinsRunCard = jenkinsPlugin.provide( createComponentExtension({ name: 'EntityLatestJenkinsRunCard', diff --git a/plugins/newrelic-dashboard/api-report.md b/plugins/newrelic-dashboard/api-report.md index d74d69cad6..223a327d20 100644 --- a/plugins/newrelic-dashboard/api-report.md +++ b/plugins/newrelic-dashboard/api-report.md @@ -10,23 +10,15 @@ import { Entity } from '@backstage/catalog-model'; import { RouteRef } from '@backstage/core-plugin-api'; // @public -export const DashboardSnapshotComponent: ({ - guid, - name, - permalink, -}: { +export const DashboardSnapshotComponent: (props: { guid: string; name: string; permalink: string; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityNewRelicDashboardCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityNewRelicDashboardCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityNewRelicDashboardContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityNewRelicDashboardContent: () => JSX.Element; @@ -35,8 +27,6 @@ export const EntityNewRelicDashboardContent: () => JSX.Element; // @public (undocumented) export const isNewRelicDashboardAvailable: (entity: Entity) => boolean; -// Warning: (ae-missing-release-tag) "newRelicDashboardPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const newRelicDashboardPlugin: BackstagePlugin< { diff --git a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx index f501fd77bf..dcbde9279a 100644 --- a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx +++ b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import React from 'react'; import { Box, Grid, MenuItem, Select } from '@material-ui/core'; import { useApi, storageApiRef } from '@backstage/core-plugin-api'; @@ -27,13 +28,15 @@ import { newRelicDashboardApiRef } from '../../../api'; import { DashboardSnapshotSummary } from '../../../api/NewRelicDashboardApi'; import useObservable from 'react-use/lib/useObservable'; -type Props = { +/** + * @public + */ +export const DashboardSnapshot = (props: { guid: string; name: string; permalink: string; -}; - -export const DashboardSnapshot = ({ guid, name, permalink }: Props) => { +}) => { + const { guid, name, permalink } = props; const newRelicDashboardAPI = useApi(newRelicDashboardApiRef); const storageApi = useApi(storageApiRef).forBucket('newrelic-dashboard'); const setStorageValue = (value: number) => { diff --git a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx index 85a73b0a4b..594a5fd53d 100644 --- a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx +++ b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx @@ -44,15 +44,14 @@ function TabPanel(props: TabPanelProps) { ); } + function a11yProps(index: number) { return { id: `simple-tab-${index}`, 'aria-controls': `simple-tabpanel-${index}`, }; } -type Props = { - guid: string; -}; + const useStyles = makeStyles( theme => ({ tabsWrapper: { @@ -79,7 +78,9 @@ const useStyles = makeStyles( }), { name: 'DashboardHeaderTabs' }, ); -export const DashboardSnapshotList = ({ guid }: Props) => { + +export const DashboardSnapshotList = (props: { guid: string }) => { + const { guid } = props; const styles = useStyles(); const newRelicDashboardAPI = useApi(newRelicDashboardApiRef); const { value, loading, error } = useAsync(async (): Promise< diff --git a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/index.ts b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/index.ts index 6b17582515..6d6ba5666b 100644 --- a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/index.ts +++ b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/index.ts @@ -13,5 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { DashboardSnapshot } from './DashboardSnapshot'; export { DashboardSnapshotList } from './DashboardSnapshotList'; diff --git a/plugins/newrelic-dashboard/src/plugin.ts b/plugins/newrelic-dashboard/src/plugin.ts index d4ed11573f..51be731ca7 100644 --- a/plugins/newrelic-dashboard/src/plugin.ts +++ b/plugins/newrelic-dashboard/src/plugin.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { createPlugin, configApiRef, @@ -24,6 +25,7 @@ import { import { newRelicDashboardApiRef, NewRelicDashboardClient } from './api'; import { rootRouteRef } from './routes'; +/** @public */ export const newRelicDashboardPlugin = createPlugin({ id: 'new-relic-dashboard', routes: { @@ -46,6 +48,8 @@ export const newRelicDashboardPlugin = createPlugin({ }), ], }); + +/** @public */ export const EntityNewRelicDashboardContent = newRelicDashboardPlugin.provide( createComponentExtension({ name: 'EntityNewRelicDashboardPage', @@ -55,6 +59,7 @@ export const EntityNewRelicDashboardContent = newRelicDashboardPlugin.provide( }), ); +/** @public */ export const EntityNewRelicDashboardCard = newRelicDashboardPlugin.provide( createComponentExtension({ name: 'EntityNewRelicDashboardListComponent', @@ -66,6 +71,7 @@ export const EntityNewRelicDashboardCard = newRelicDashboardPlugin.provide( }, }), ); + /** * Render dashboard snapshots from Newrelic in backstage. Use dashboards which have the tag `isDashboardPage: true` * diff --git a/plugins/pagerduty/api-report.md b/plugins/pagerduty/api-report.md index c81da24454..8bd8df6f7c 100644 --- a/plugins/pagerduty/api-report.md +++ b/plugins/pagerduty/api-report.md @@ -82,7 +82,7 @@ export class PagerDutyClient implements PagerDutyApi { // (undocumented) static fromConfig( configApi: ConfigApi, - { discoveryApi, fetchApi }: PagerDutyClientApiDependencies, + dependencies: PagerDutyClientApiDependencies, ): PagerDutyClient; // (undocumented) getChangeEventsByServiceId( diff --git a/plugins/pagerduty/src/api/client.ts b/plugins/pagerduty/src/api/client.ts index 69a702f66d..edc87d4b4a 100644 --- a/plugins/pagerduty/src/api/client.ts +++ b/plugins/pagerduty/src/api/client.ts @@ -43,8 +43,10 @@ const commonGetServiceParams = export class PagerDutyClient implements PagerDutyApi { static fromConfig( configApi: ConfigApi, - { discoveryApi, fetchApi }: PagerDutyClientApiDependencies, + dependencies: PagerDutyClientApiDependencies, ) { + const { discoveryApi, fetchApi } = dependencies; + const eventsBaseUrl: string = configApi.getOptionalString('pagerDuty.eventsBaseUrl') ?? 'https://events.pagerduty.com/v2'; @@ -55,6 +57,7 @@ export class PagerDutyClient implements PagerDutyApi { fetchApi, }); } + constructor(private readonly config: PagerDutyClientApiConfig) {} async getServiceByEntity(entity: Entity): Promise { diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index 24ff8e210d..222c18d655 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -248,11 +248,7 @@ export interface ScaffolderApi { ): Promise; listActions(): Promise; // (undocumented) - listTasks?({ - filterByOwnership, - }: { - filterByOwnership: 'owned' | 'all'; - }): Promise<{ + listTasks?(options: { filterByOwnership: 'owned' | 'all' }): Promise<{ tasks: ScaffolderTask[]; }>; scaffold( diff --git a/plugins/scaffolder/src/types.ts b/plugins/scaffolder/src/types.ts index d814119398..acb0f0e114 100644 --- a/plugins/scaffolder/src/types.ts +++ b/plugins/scaffolder/src/types.ts @@ -194,9 +194,7 @@ export interface ScaffolderApi { getTask(taskId: string): Promise; - listTasks?({ - filterByOwnership, - }: { + listTasks?(options: { filterByOwnership: 'owned' | 'all'; }): Promise<{ tasks: ScaffolderTask[] }>; diff --git a/plugins/search-backend-node/api-report.md b/plugins/search-backend-node/api-report.md index 64957f6366..62a4eabc26 100644 --- a/plugins/search-backend-node/api-report.md +++ b/plugins/search-backend-node/api-report.md @@ -56,9 +56,9 @@ export abstract class DecoratorBase extends Transform { // @public export class IndexBuilder { - constructor({ logger, searchEngine }: IndexBuilderOptions); - addCollator({ factory, schedule }: RegisterCollatorParameters): void; - addDecorator({ factory }: RegisterDecoratorParameters): void; + constructor(options: IndexBuilderOptions); + addCollator(options: RegisterCollatorParameters): void; + addDecorator(options: RegisterDecoratorParameters): void; build(): Promise<{ scheduler: Scheduler; }>; @@ -77,7 +77,7 @@ export type LunrQueryTranslator = (query: SearchQuery) => ConcreteLunrQuery; // @public export class LunrSearchEngine implements SearchEngine { - constructor({ logger }: { logger: Logger }); + constructor(options: { logger: Logger }); // (undocumented) protected docStore: Record; // (undocumented) @@ -157,8 +157,8 @@ export interface RegisterDecoratorParameters { // @public export class Scheduler { - constructor({ logger }: { logger: Logger }); - addToSchedule({ id, task, scheduledRunner }: ScheduleTaskParameters): void; + constructor(options: { logger: Logger }); + addToSchedule(options: ScheduleTaskParameters): void; start(): void; stop(): void; } diff --git a/plugins/search-backend-node/src/IndexBuilder.ts b/plugins/search-backend-node/src/IndexBuilder.ts index 3e1dae1c2f..0ba9ba0059 100644 --- a/plugins/search-backend-node/src/IndexBuilder.ts +++ b/plugins/search-backend-node/src/IndexBuilder.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { DocumentDecoratorFactory, DocumentTypeInfo, @@ -38,12 +39,12 @@ export class IndexBuilder { private searchEngine: SearchEngine; private logger: Logger; - constructor({ logger, searchEngine }: IndexBuilderOptions) { + constructor(options: IndexBuilderOptions) { this.collators = {}; this.decorators = {}; this.documentTypes = {}; - this.logger = logger; - this.searchEngine = searchEngine; + this.logger = options.logger; + this.searchEngine = options.searchEngine; } /** @@ -64,7 +65,9 @@ export class IndexBuilder { * Makes the index builder aware of a collator that should be executed at the * given refresh interval. */ - addCollator({ factory, schedule }: RegisterCollatorParameters): void { + addCollator(options: RegisterCollatorParameters): void { + const { factory, schedule } = options; + this.logger.info( `Added ${factory.constructor.name} collator factory for type ${factory.type}`, ); @@ -82,7 +85,8 @@ export class IndexBuilder { * the decorator, it will be applied to documents from all known collators, * otherwise it will only be applied to documents of the given types. */ - addDecorator({ factory }: RegisterDecoratorParameters): void { + addDecorator(options: RegisterDecoratorParameters): void { + const { factory } = options; const types = factory.types || ['*']; this.logger.info( `Added decorator ${factory.constructor.name} to types ${types.join( diff --git a/plugins/search-backend-node/src/Scheduler.ts b/plugins/search-backend-node/src/Scheduler.ts index 404823c53a..872a410808 100644 --- a/plugins/search-backend-node/src/Scheduler.ts +++ b/plugins/search-backend-node/src/Scheduler.ts @@ -43,8 +43,8 @@ export class Scheduler { private abortController: AbortController; private isRunning: boolean; - constructor({ logger }: { logger: Logger }) { - this.logger = logger; + constructor(options: { logger: Logger }) { + this.logger = options.logger; this.schedule = {}; this.abortController = new AbortController(); this.isRunning = false; @@ -55,7 +55,9 @@ export class Scheduler { * When running the tasks, the scheduler waits at least for the time specified * in the interval once the task was completed, before running it again. */ - addToSchedule({ id, task, scheduledRunner }: ScheduleTaskParameters) { + addToSchedule(options: ScheduleTaskParameters) { + const { id, task, scheduledRunner } = options; + if (this.isRunning) { throw new Error( 'Cannot add task to schedule that has already been started.', diff --git a/plugins/search-backend-node/src/engines/LunrSearchEngine.ts b/plugins/search-backend-node/src/engines/LunrSearchEngine.ts index ec8550d721..4d6779950f 100644 --- a/plugins/search-backend-node/src/engines/LunrSearchEngine.ts +++ b/plugins/search-backend-node/src/engines/LunrSearchEngine.ts @@ -43,7 +43,7 @@ type LunrResultEnvelope = { }; /** - * Translator repsonsible for translating search term and filters to a query that the Lunr Search Engine understands. + * Translator responsible for translating search term and filters to a query that the Lunr Search Engine understands. * @public */ export type LunrQueryTranslator = (query: SearchQuery) => ConcreteLunrQuery; @@ -59,8 +59,8 @@ export class LunrSearchEngine implements SearchEngine { protected highlightPreTag: string; protected highlightPostTag: string; - constructor({ logger }: { logger: Logger }) { - this.logger = logger; + constructor(options: { logger: Logger }) { + this.logger = options.logger; this.docStore = {}; const uuidTag = uuid(); this.highlightPreTag = `<${uuidTag}>`; diff --git a/plugins/sentry/api-report.md b/plugins/sentry/api-report.md index e752eb2110..bd77c46aa6 100644 --- a/plugins/sentry/api-report.md +++ b/plugins/sentry/api-report.md @@ -42,8 +42,6 @@ export class MockSentryApi implements SentryApi { fetchIssues(): Promise; } -// Warning: (ae-missing-release-tag) "ProductionSentryApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class ProductionSentryApi implements SentryApi { constructor( @@ -61,13 +59,9 @@ export class ProductionSentryApi implements SentryApi { ): Promise; } -// Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const Router: ({ entity }: { entity: Entity }) => JSX.Element; +export const Router: (props: { entity: Entity }) => JSX.Element; -// Warning: (ae-missing-release-tag) "SentryApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface SentryApi { // (undocumented) @@ -80,8 +74,6 @@ export interface SentryApi { ): Promise; } -// Warning: (ae-missing-release-tag) "sentryApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const sentryApiRef: ApiRef; @@ -121,25 +113,15 @@ export type SentryIssue = { statusDetails: any; }; -// Warning: (ae-missing-release-tag) "SentryIssuesWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const SentryIssuesWidget: ({ - entity, - statsFor, - tableOptions, - variant, - query, -}: { +export const SentryIssuesWidget: (props: { entity: Entity; statsFor: '24h' | '14d' | ''; tableOptions: Options; - variant?: InfoCardVariants | undefined; - query?: string | undefined; + variant?: InfoCardVariants; + query?: string; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "sentryPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const sentryPlugin: BackstagePlugin< { diff --git a/plugins/sentry/src/api/production-api.ts b/plugins/sentry/src/api/production-api.ts index da77f8a47d..7fe4afdf98 100644 --- a/plugins/sentry/src/api/production-api.ts +++ b/plugins/sentry/src/api/production-api.ts @@ -20,6 +20,7 @@ import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { getProjectSlug, getOrganization } from './annotations'; +/** @public */ export class ProductionSentryApi implements SentryApi { constructor( private readonly discoveryApi: DiscoveryApi, diff --git a/plugins/sentry/src/api/sentry-api.ts b/plugins/sentry/src/api/sentry-api.ts index 507803804d..73f1301cad 100644 --- a/plugins/sentry/src/api/sentry-api.ts +++ b/plugins/sentry/src/api/sentry-api.ts @@ -18,10 +18,12 @@ import { SentryIssue } from './sentry-issue'; import { createApiRef } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; +/** @public */ export const sentryApiRef = createApiRef({ id: 'plugin.sentry.service', }); +/** @public */ export interface SentryApi { fetchIssues( entity: Entity, diff --git a/plugins/sentry/src/components/Router.tsx b/plugins/sentry/src/components/Router.tsx index 2a3172824a..e683a6c7fa 100644 --- a/plugins/sentry/src/components/Router.tsx +++ b/plugins/sentry/src/components/Router.tsx @@ -19,14 +19,15 @@ import { Entity } from '@backstage/catalog-model'; import { Route, Routes } from 'react-router'; import { SentryIssuesWidget } from './SentryIssuesWidget'; -export const Router = ({ entity }: { entity: Entity }) => { +/** @public */ +export const Router = (props: { entity: Entity }) => { return ( ; variant?: InfoCardVariants; query?: string; }) => { + const { + entity, + statsFor, + tableOptions, + variant = 'gridItem', + query = '', + } = props; const errorApi = useApi(errorApiRef); const sentryApi = useApi(sentryApiRef); diff --git a/plugins/sentry/src/plugin.ts b/plugins/sentry/src/plugin.ts index 981745c8fe..51957b87a3 100644 --- a/plugins/sentry/src/plugin.ts +++ b/plugins/sentry/src/plugin.ts @@ -24,10 +24,12 @@ import { identityApiRef, } from '@backstage/core-plugin-api'; +/** @public */ export const rootRouteRef = createRouteRef({ id: 'sentry', }); +/** @public */ export const sentryPlugin = createPlugin({ id: 'sentry', apis: [ diff --git a/plugins/sonarqube/api-report.md b/plugins/sonarqube/api-report.md index 06e4b8578e..e0a51479a4 100644 --- a/plugins/sonarqube/api-report.md +++ b/plugins/sonarqube/api-report.md @@ -9,46 +9,29 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { InfoCardVariants } from '@backstage/core-components'; -// Warning: (ae-missing-release-tag) "EntitySonarQubeCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntitySonarQubeCard: ({ - variant, - duplicationRatings, -}: { - variant?: InfoCardVariants | undefined; - duplicationRatings?: - | { - greaterThan: number; - rating: '1.0' | '2.0' | '3.0' | '4.0' | '5.0'; - }[] - | undefined; -}) => JSX.Element; +export type DuplicationRating = { + greaterThan: number; + rating: '1.0' | '2.0' | '3.0' | '4.0' | '5.0'; +}; -// Warning: (ae-missing-release-tag) "isSonarQubeAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const isSonarQubeAvailable: (entity: Entity) => boolean; - -// Warning: (ae-missing-release-tag) "SonarQubeCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const SonarQubeCard: ({ - variant, - duplicationRatings, -}: { +export const EntitySonarQubeCard: (props: { variant?: InfoCardVariants | undefined; duplicationRatings?: DuplicationRating[] | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "sonarQubePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export const isSonarQubeAvailable: (entity: Entity) => boolean; + +// @public (undocumented) +export const SonarQubeCard: (props: { + variant?: InfoCardVariants; + duplicationRatings?: DuplicationRating[]; +}) => JSX.Element; + // @public (undocumented) const sonarQubePlugin: BackstagePlugin<{}, {}, {}>; export { sonarQubePlugin as plugin }; export { sonarQubePlugin }; - -// Warnings were encountered during analysis: -// -// src/components/SonarQubeCard/SonarQubeCard.d.ts:9:5 - (ae-forgotten-export) The symbol "DuplicationRating" needs to be exported by the entry point index.d.ts ``` diff --git a/plugins/sonarqube/src/api/SonarQubeApi.ts b/plugins/sonarqube/src/api/SonarQubeApi.ts index 271f1d8e8e..9dbb6331dd 100644 --- a/plugins/sonarqube/src/api/SonarQubeApi.ts +++ b/plugins/sonarqube/src/api/SonarQubeApi.ts @@ -38,10 +38,7 @@ export const sonarQubeApiRef = createApiRef({ }); export type SonarQubeApi = { - getFindingSummary({ - componentKey, - projectInstance, - }: { + getFindingSummary(options: { componentKey?: string; projectInstance?: string; }): Promise; diff --git a/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx b/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx index af91bc5469..b32a66aaa3 100644 --- a/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx +++ b/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx @@ -32,7 +32,6 @@ import { Percentage } from './Percentage'; import { Rating } from './Rating'; import { RatingCard } from './RatingCard'; import { Value } from './Value'; - import { EmptyState, InfoCard, @@ -40,7 +39,6 @@ import { MissingAnnotationEmptyState, Progress, } from '@backstage/core-components'; - import { useApi } from '@backstage/core-plugin-api'; const useStyles = makeStyles(theme => ({ @@ -72,7 +70,8 @@ const useStyles = makeStyles(theme => ({ }, })); -type DuplicationRating = { +/** @public */ +export type DuplicationRating = { greaterThan: number; rating: '1.0' | '2.0' | '3.0' | '4.0' | '5.0'; }; @@ -85,13 +84,15 @@ const defaultDuplicationRatings: DuplicationRating[] = [ { greaterThan: 20, rating: '5.0' }, ]; -export const SonarQubeCard = ({ - variant = 'gridItem', - duplicationRatings = defaultDuplicationRatings, -}: { +/** @public */ +export const SonarQubeCard = (props: { variant?: InfoCardVariants; duplicationRatings?: DuplicationRating[]; }) => { + const { + variant = 'gridItem', + duplicationRatings = defaultDuplicationRatings, + } = props; const { entity } = useEntity(); const sonarQubeApi = useApi(sonarQubeApiRef); diff --git a/plugins/sonarqube/src/components/SonarQubeCard/Value.tsx b/plugins/sonarqube/src/components/SonarQubeCard/Value.tsx index 58fb401ba1..a166f62a89 100644 --- a/plugins/sonarqube/src/components/SonarQubeCard/Value.tsx +++ b/plugins/sonarqube/src/components/SonarQubeCard/Value.tsx @@ -27,8 +27,7 @@ const useStyles = makeStyles((theme: BackstageTheme) => { }; }); -export const Value = ({ value }: { value?: string }) => { +export const Value = (props: { value?: string }) => { const classes = useStyles(); - - return {value}; + return {props.value}; }; diff --git a/plugins/sonarqube/src/components/SonarQubeCard/index.ts b/plugins/sonarqube/src/components/SonarQubeCard/index.ts index 44ab809439..307a9abc41 100644 --- a/plugins/sonarqube/src/components/SonarQubeCard/index.ts +++ b/plugins/sonarqube/src/components/SonarQubeCard/index.ts @@ -14,4 +14,5 @@ * limitations under the License. */ +export type { DuplicationRating } from './SonarQubeCard'; export { SonarQubeCard } from './SonarQubeCard'; diff --git a/plugins/sonarqube/src/components/useProjectKey.ts b/plugins/sonarqube/src/components/useProjectKey.ts index 7a5a428f49..59a572a6c4 100644 --- a/plugins/sonarqube/src/components/useProjectKey.ts +++ b/plugins/sonarqube/src/components/useProjectKey.ts @@ -19,6 +19,7 @@ import { Entity } from '@backstage/catalog-model'; export const SONARQUBE_PROJECT_KEY_ANNOTATION = 'sonarqube.org/project-key'; export const SONARQUBE_PROJECT_INSTANCE_SEPARATOR = '/'; +/** @public */ export const isSonarQubeAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[SONARQUBE_PROJECT_KEY_ANNOTATION]); diff --git a/plugins/sonarqube/src/plugin.ts b/plugins/sonarqube/src/plugin.ts index 4ac49b2350..0ea62de492 100644 --- a/plugins/sonarqube/src/plugin.ts +++ b/plugins/sonarqube/src/plugin.ts @@ -23,6 +23,7 @@ import { identityApiRef, } from '@backstage/core-plugin-api'; +/** @public */ export const sonarQubePlugin = createPlugin({ id: 'sonarqube', apis: [ @@ -41,6 +42,7 @@ export const sonarQubePlugin = createPlugin({ ], }); +/** @public */ export const EntitySonarQubeCard = sonarQubePlugin.provide( createComponentExtension({ name: 'EntitySonarQubeCard', diff --git a/plugins/tech-insights-node/api-report.md b/plugins/tech-insights-node/api-report.md index 84677bdcbc..19645d604b 100644 --- a/plugins/tech-insights-node/api-report.md +++ b/plugins/tech-insights-node/api-report.md @@ -169,11 +169,7 @@ export interface TechInsightsStore { [factRef: string]: FlatTechInsightFact; }>; getLatestSchemas(ids?: string[]): Promise; - insertFacts({ - id, - facts, - lifecycle, - }: { + insertFacts(options: { id: string; facts: TechInsightFact[]; lifecycle?: FactLifecycle; diff --git a/plugins/tech-insights-node/src/persistence.ts b/plugins/tech-insights-node/src/persistence.ts index 4324c24c42..31fda403a8 100644 --- a/plugins/tech-insights-node/src/persistence.ts +++ b/plugins/tech-insights-node/src/persistence.ts @@ -38,11 +38,7 @@ export interface TechInsightsStore { * @param facts - A collection of TechInsightFacts * @param lifecycle - (Optional) Fact lifecycle object indicating the expiration logic for these items */ - insertFacts({ - id, - facts, - lifecycle, - }: { + insertFacts(options: { id: string; facts: TechInsightFact[]; lifecycle?: FactLifecycle; diff --git a/plugins/tech-insights/api-report.md b/plugins/tech-insights/api-report.md index 694fb583d2..4f2687fa48 100644 --- a/plugins/tech-insights/api-report.md +++ b/plugins/tech-insights/api-report.md @@ -33,22 +33,14 @@ export type CheckResultRenderer = { }; // @public (undocumented) -export const EntityTechInsightsScorecardCard: ({ - title, - description, - checksId, -}: { +export const EntityTechInsightsScorecardCard: (props: { title?: string | undefined; description?: string | undefined; checksId?: string[] | undefined; }) => JSX.Element; // @public (undocumented) -export const EntityTechInsightsScorecardContent: ({ - title, - description, - checksId, -}: { +export const EntityTechInsightsScorecardContent: (props: { title?: string | undefined; description?: string | undefined; checksId?: string[] | undefined; diff --git a/plugins/tech-insights/src/components/ScorecardsCard/ScorecardsCard.tsx b/plugins/tech-insights/src/components/ScorecardsCard/ScorecardsCard.tsx index f6bc4b0cb5..57b8915b58 100644 --- a/plugins/tech-insights/src/components/ScorecardsCard/ScorecardsCard.tsx +++ b/plugins/tech-insights/src/components/ScorecardsCard/ScorecardsCard.tsx @@ -23,15 +23,12 @@ import { ScorecardInfo } from '../ScorecardsInfo'; import Alert from '@material-ui/lab/Alert'; import { techInsightsApiRef } from '../../api/TechInsightsApi'; -export const ScorecardsCard = ({ - title, - description, - checksId, -}: { +export const ScorecardsCard = (props: { title?: string; description?: string; checksId?: string[]; }) => { + const { title, description, checksId } = props; const api = useApi(techInsightsApiRef); const { namespace, kind, name } = useParams(); const { value, loading, error } = useAsync( diff --git a/plugins/tech-insights/src/components/ScorecardsContent/ScorecardContent.tsx b/plugins/tech-insights/src/components/ScorecardsContent/ScorecardContent.tsx index 07a839d7a8..c3d02c938f 100644 --- a/plugins/tech-insights/src/components/ScorecardsContent/ScorecardContent.tsx +++ b/plugins/tech-insights/src/components/ScorecardsContent/ScorecardContent.tsx @@ -31,15 +31,12 @@ const useStyles = makeStyles(() => ({ }, })); -export const ScorecardsContent = ({ - title, - description, - checksId, -}: { +export const ScorecardsContent = (props: { title?: string; description?: string; checksId?: string[]; }) => { + const { title, description, checksId } = props; const classes = useStyles(); const api = useApi(techInsightsApiRef); const { namespace, kind, name } = useParams(); diff --git a/plugins/tech-insights/src/components/ScorecardsInfo/ScorecardInfo.tsx b/plugins/tech-insights/src/components/ScorecardsInfo/ScorecardInfo.tsx index 2c5abb3596..9d5fc5ac9e 100644 --- a/plugins/tech-insights/src/components/ScorecardsInfo/ScorecardInfo.tsx +++ b/plugins/tech-insights/src/components/ScorecardsInfo/ScorecardInfo.tsx @@ -30,15 +30,9 @@ const useStyles = makeStyles((theme: BackstageTheme) => ({ }, })); -type Checks = { - checks: CheckResult[]; - title?: string; - description?: string; -}; - const infoCard = ( - title: Checks['title'], - description: Checks['description'], + title: string | undefined, + description: string | undefined, className: string, element: JSX.Element, ) => ( @@ -54,7 +48,12 @@ const infoCard = ( ); -export const ScorecardInfo = ({ checks, title, description }: Checks) => { +export const ScorecardInfo = (props: { + checks: CheckResult[]; + title?: string; + description?: string; +}) => { + const { checks, title, description } = props; const classes = useStyles(); const api = useApi(techInsightsApiRef); diff --git a/plugins/techdocs-module-addons-contrib/api-report.md b/plugins/techdocs-module-addons-contrib/api-report.md index f787e0678c..68fad9121d 100644 --- a/plugins/techdocs-module-addons-contrib/api-report.md +++ b/plugins/techdocs-module-addons-contrib/api-report.md @@ -26,9 +26,7 @@ export type ReportIssueTemplate = { }; // @public -export type ReportIssueTemplateBuilder = ({ - selection, -}: { +export type ReportIssueTemplateBuilder = (options: { selection: Selection; }) => ReportIssueTemplate; diff --git a/plugins/techdocs-module-addons-contrib/src/ReportIssue/types.ts b/plugins/techdocs-module-addons-contrib/src/ReportIssue/types.ts index 0816b45d9d..84143a40f2 100644 --- a/plugins/techdocs-module-addons-contrib/src/ReportIssue/types.ts +++ b/plugins/techdocs-module-addons-contrib/src/ReportIssue/types.ts @@ -37,9 +37,7 @@ export type ReportIssueTemplate = { * * @public */ -export type ReportIssueTemplateBuilder = ({ - selection, -}: { +export type ReportIssueTemplateBuilder = (options: { selection: Selection; }) => ReportIssueTemplate; diff --git a/plugins/techdocs/api-report.md b/plugins/techdocs/api-report.md index ef037fbb05..7922ea992e 100644 --- a/plugins/techdocs/api-report.md +++ b/plugins/techdocs/api-report.md @@ -345,11 +345,7 @@ export type TechDocsReaderPageProps = { }; // @public -export type TechDocsReaderPageRenderFunction = ({ - techdocsMetadataValue, - entityMetadataValue, - entityRef, -}: { +export type TechDocsReaderPageRenderFunction = (options: { techdocsMetadataValue?: TechDocsMetadata_2 | undefined; entityMetadataValue?: TechDocsEntityMetadata_2 | undefined; entityRef: CompoundEntityRef; diff --git a/plugins/techdocs/src/types.ts b/plugins/techdocs/src/types.ts index 014bf0d090..c07f7c3907 100644 --- a/plugins/techdocs/src/types.ts +++ b/plugins/techdocs/src/types.ts @@ -25,11 +25,7 @@ import { * * @public */ -export type TechDocsReaderPageRenderFunction = ({ - techdocsMetadataValue, - entityMetadataValue, - entityRef, -}: { +export type TechDocsReaderPageRenderFunction = (options: { techdocsMetadataValue?: TechDocsMetadata | undefined; entityMetadataValue?: TechDocsEntityMetadata | undefined; entityRef: CompoundEntityRef; diff --git a/plugins/user-settings/api-report.md b/plugins/user-settings/api-report.md index 914f8b2385..d6aca3c46f 100644 --- a/plugins/user-settings/api-report.md +++ b/plugins/user-settings/api-report.md @@ -20,7 +20,7 @@ import { SessionApi } from '@backstage/core-plugin-api'; // @public (undocumented) export const DefaultProviderSettings: ({ configuredProviders, -}: Props_3) => JSX.Element; +}: Props_2) => JSX.Element; // Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts // Warning: (ae-missing-release-tag) "ProviderSettingsItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -31,13 +31,10 @@ export const ProviderSettingsItem: ({ description, icon: Icon, apiRef, -}: Props_4) => JSX.Element; +}: Props_3) => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "SettingsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const Router: ({ providerSettings }: Props) => JSX.Element; +export const Router: (props: { providerSettings?: JSX.Element }) => JSX.Element; // Warning: (ae-forgotten-export) The symbol "SettingsProps" needs to be exported by the entry point index.d.ts // Warning: (ae-missing-release-tag) "Settings" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -59,7 +56,7 @@ export const UserSettingsAppearanceCard: () => JSX.Element; // @public (undocumented) export const UserSettingsAuthProviders: ({ providerSettings, -}: Props_2) => JSX.Element; +}: Props) => JSX.Element; // Warning: (ae-missing-release-tag) "UserSettingsFeatureFlags" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -84,9 +81,7 @@ export const UserSettingsMenu: () => JSX.Element; // Warning: (ae-missing-release-tag) "UserSettingsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const UserSettingsPage: ({ - providerSettings, -}: { +export const UserSettingsPage: (props: { providerSettings?: JSX.Element | undefined; }) => JSX.Element; @@ -117,7 +112,7 @@ export const UserSettingsProfileCard: () => JSX.Element; // Warning: (ae-missing-release-tag) "UserSettingsSignInAvatar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const UserSettingsSignInAvatar: ({ size }: Props_5) => JSX.Element; +export const UserSettingsSignInAvatar: ({ size }: Props_4) => JSX.Element; // @public export const UserSettingsTab: (props: UserSettingsTabProps) => JSX.Element; diff --git a/plugins/user-settings/src/components/SettingsPage.tsx b/plugins/user-settings/src/components/SettingsPage.tsx index dcaf62d435..9803bf4761 100644 --- a/plugins/user-settings/src/components/SettingsPage.tsx +++ b/plugins/user-settings/src/components/SettingsPage.tsx @@ -28,11 +28,11 @@ import { UserSettingsFeatureFlags } from './FeatureFlags'; import { UserSettingsGeneral } from './General'; import { USER_SETTINGS_TAB_KEY, UserSettingsTabProps } from './UserSettingsTab'; -type Props = { - providerSettings?: JSX.Element; -}; - -export const SettingsPage = ({ providerSettings }: Props) => { +/** + * @public + */ +export const SettingsPage = (props: { providerSettings?: JSX.Element }) => { + const { providerSettings } = props; const { isMobile } = useSidebarPinState(); const outlet = useOutlet(); diff --git a/plugins/vault-backend/api-report.md b/plugins/vault-backend/api-report.md index d2e9e1b177..2b1fb14bd0 100644 --- a/plugins/vault-backend/api-report.md +++ b/plugins/vault-backend/api-report.md @@ -48,7 +48,7 @@ export type VaultBuilderReturn = { // @public export class VaultClient implements VaultApi { - constructor({ config }: { config: Config }); + constructor(options: { config: Config }); // (undocumented) getFrontendSecretsUrl(): string; // (undocumented) diff --git a/plugins/vault-backend/src/service/vaultApi.ts b/plugins/vault-backend/src/service/vaultApi.ts index 158778294a..16aa39ae03 100644 --- a/plugins/vault-backend/src/service/vaultApi.ts +++ b/plugins/vault-backend/src/service/vaultApi.ts @@ -79,8 +79,8 @@ export class VaultClient implements VaultApi { private vaultConfig: VaultConfig; private readonly limit = plimit(5); - constructor({ config }: { config: Config }) { - this.vaultConfig = getVaultConfig(config); + constructor(options: { config: Config }) { + this.vaultConfig = getVaultConfig(options.config); } private async callApi( diff --git a/scripts/api-extractor.ts b/scripts/api-extractor.ts index f047c08873..101001a061 100644 --- a/scripts/api-extractor.ts +++ b/scripts/api-extractor.ts @@ -204,9 +204,6 @@ const ALLOW_WARNINGS = [ 'plugins/api-docs', 'plugins/app-backend', 'plugins/auth-backend', - 'plugins/azure-devops', - 'plugins/azure-devops-backend', - 'plugins/azure-devops-common', 'plugins/badges', 'plugins/badges-backend', 'plugins/bitrise', @@ -223,7 +220,6 @@ const ALLOW_WARNINGS = [ 'plugins/explore', 'plugins/explore-react', 'plugins/firehydrant', - 'plugins/fossa', 'plugins/gcalendar', 'plugins/gcp-projects', 'plugins/git-release-manager', @@ -246,7 +242,6 @@ const ALLOW_WARNINGS = [ 'plugins/search-backend-module-pg', 'plugins/sentry', 'plugins/shortcuts', - 'plugins/sonarqube', 'plugins/splunk-on-call', 'plugins/tech-radar', 'plugins/user-settings',