From 9d85eaf58ad54988f192ac121d9a2294967ebb80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Fri, 19 Aug 2022 14:46:34 +0200 Subject: [PATCH] gitops-profiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- plugins/gitops-profiles/api-report.md | 38 --------------------------- plugins/gitops-profiles/src/api.ts | 16 +++++++++++ plugins/gitops-profiles/src/plugin.ts | 4 +++ scripts/api-extractor.ts | 1 - 4 files changed, 20 insertions(+), 39 deletions(-) diff --git a/plugins/gitops-profiles/api-report.md b/plugins/gitops-profiles/api-report.md index 245a1fb30b..9449417bba 100644 --- a/plugins/gitops-profiles/api-report.md +++ b/plugins/gitops-profiles/api-report.md @@ -9,8 +9,6 @@ import { ApiRef } from '@backstage/core-plugin-api'; import { BackstagePlugin } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "ApplyProfileRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ApplyProfileRequest { // (undocumented) @@ -25,8 +23,6 @@ export interface ApplyProfileRequest { targetRepo: string; } -// Warning: (ae-missing-release-tag) "ChangeClusterStateRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ChangeClusterStateRequest { // (undocumented) @@ -41,8 +37,6 @@ export interface ChangeClusterStateRequest { targetRepo: string; } -// Warning: (ae-missing-release-tag) "CloneFromTemplateRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface CloneFromTemplateRequest { // (undocumented) @@ -62,8 +56,6 @@ export interface CloneFromTemplateRequest { templateRepository: string; } -// Warning: (ae-missing-release-tag) "ClusterStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ClusterStatus { // (undocumented) @@ -78,8 +70,6 @@ export interface ClusterStatus { status: string; } -// Warning: (ae-missing-release-tag) "FetchError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class FetchError extends Error { // (undocumented) @@ -88,24 +78,18 @@ export class FetchError extends Error { get name(): string; } -// Warning: (ae-missing-release-tag) "GithubUserInfoRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface GithubUserInfoRequest { // (undocumented) accessToken: string; } -// Warning: (ae-missing-release-tag) "GithubUserInfoResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface GithubUserInfoResponse { // (undocumented) login: string; } -// Warning: (ae-missing-release-tag) "GitOpsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GitOpsApi = { url: string; @@ -117,28 +101,18 @@ export type GitOpsApi = { fetchUserInfo(req: GithubUserInfoRequest): Promise; }; -// Warning: (ae-missing-release-tag) "gitOpsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const gitOpsApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "GitopsProfilesClusterListPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const GitopsProfilesClusterListPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "GitopsProfilesClusterPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const GitopsProfilesClusterPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "GitopsProfilesCreatePage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const GitopsProfilesCreatePage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "gitopsProfilesPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const gitopsProfilesPlugin: BackstagePlugin< { @@ -155,8 +129,6 @@ const gitopsProfilesPlugin: BackstagePlugin< export { gitopsProfilesPlugin }; export { gitopsProfilesPlugin as plugin }; -// Warning: (ae-missing-release-tag) "GitOpsRestApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class GitOpsRestApi implements GitOpsApi { constructor(url?: string); @@ -176,8 +148,6 @@ export class GitOpsRestApi implements GitOpsApi { url: string; } -// Warning: (ae-missing-release-tag) "ListClusterRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ListClusterRequest { // (undocumented) @@ -186,16 +156,12 @@ export interface ListClusterRequest { gitHubUser: string; } -// Warning: (ae-missing-release-tag) "ListClusterStatusesResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ListClusterStatusesResponse { // (undocumented) result: ClusterStatus[]; } -// Warning: (ae-missing-release-tag) "PollLogRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface PollLogRequest { // (undocumented) @@ -208,8 +174,6 @@ export interface PollLogRequest { targetRepo: string; } -// Warning: (ae-missing-release-tag) "Status" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Status { // (undocumented) @@ -220,8 +184,6 @@ export interface Status { status: string; } -// Warning: (ae-missing-release-tag) "StatusResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface StatusResponse { // (undocumented) diff --git a/plugins/gitops-profiles/src/api.ts b/plugins/gitops-profiles/src/api.ts index ca141140d8..fe47d20336 100644 --- a/plugins/gitops-profiles/src/api.ts +++ b/plugins/gitops-profiles/src/api.ts @@ -13,8 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export interface CloneFromTemplateRequest { templateRepository: string; secrets: { @@ -27,6 +29,7 @@ export interface CloneFromTemplateRequest { gitHubToken: string; } +/** @public */ export interface ApplyProfileRequest { targetOrg: string; targetRepo: string; @@ -35,6 +38,7 @@ export interface ApplyProfileRequest { profiles: string[]; } +/** @public */ export interface ChangeClusterStateRequest { targetOrg: string; targetRepo: string; @@ -43,6 +47,7 @@ export interface ChangeClusterStateRequest { clusterState: 'present' | 'absent'; // /api/cluster/state } +/** @public */ export interface PollLogRequest { targetOrg: string; targetRepo: string; @@ -50,18 +55,21 @@ export interface PollLogRequest { gitHubToken: string; } +/** @public */ export interface Status { status: string; // queued, in_progress, or completed message: string; conclusion: string; // success, failure, neutral, cancelled, skipped, timed_out, or action_required } +/** @public */ export interface StatusResponse { result: Status[]; link: string; status: string; } +/** @public */ export interface ClusterStatus { name: string; link: string; @@ -70,23 +78,28 @@ export interface ClusterStatus { runStatus: Status[]; } +/** @public */ export interface ListClusterStatusesResponse { result: ClusterStatus[]; } +/** @public */ export interface ListClusterRequest { gitHubUser: string; gitHubToken: string; } +/** @public */ export interface GithubUserInfoRequest { accessToken: string; } +/** @public */ export interface GithubUserInfoResponse { login: string; } +/** @public */ export class FetchError extends Error { get name(): string { return this.constructor.name; @@ -101,6 +114,7 @@ export class FetchError extends Error { } } +/** @public */ export type GitOpsApi = { url: string; fetchLog(req: PollLogRequest): Promise; @@ -111,10 +125,12 @@ export type GitOpsApi = { fetchUserInfo(req: GithubUserInfoRequest): Promise; }; +/** @public */ export const gitOpsApiRef = createApiRef({ id: 'plugin.gitops.service', }); +/** @public */ export class GitOpsRestApi implements GitOpsApi { constructor(public url: string = '') {} diff --git a/plugins/gitops-profiles/src/plugin.ts b/plugins/gitops-profiles/src/plugin.ts index fc961d7026..8c8bfc52fa 100644 --- a/plugins/gitops-profiles/src/plugin.ts +++ b/plugins/gitops-profiles/src/plugin.ts @@ -26,6 +26,7 @@ import { createRoutableExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const gitopsProfilesPlugin = createPlugin({ id: 'gitops-profiles', apis: [ @@ -38,6 +39,7 @@ export const gitopsProfilesPlugin = createPlugin({ }, }); +/** @public */ export const GitopsProfilesClusterListPage = gitopsProfilesPlugin.provide( createRoutableExtension({ name: 'GitopsProfilesClusterListPage', @@ -46,6 +48,7 @@ export const GitopsProfilesClusterListPage = gitopsProfilesPlugin.provide( }), ); +/** @public */ export const GitopsProfilesClusterPage = gitopsProfilesPlugin.provide( createRoutableExtension({ name: 'GitopsProfilesClusterPage', @@ -54,6 +57,7 @@ export const GitopsProfilesClusterPage = gitopsProfilesPlugin.provide( }), ); +/** @public */ export const GitopsProfilesCreatePage = gitopsProfilesPlugin.provide( createRoutableExtension({ name: 'GitopsProfilesCreatePage', diff --git a/scripts/api-extractor.ts b/scripts/api-extractor.ts index 3cd7ad57d0..19fbfd79be 100644 --- a/scripts/api-extractor.ts +++ b/scripts/api-extractor.ts @@ -208,7 +208,6 @@ const ALLOW_WARNINGS = [ 'plugins/github-actions', 'plugins/github-deployments', 'plugins/github-pull-requests-board', - 'plugins/gitops-profiles', 'plugins/jenkins', 'plugins/jenkins-backend', 'plugins/kubernetes',