Revert "Build api reports"

This reverts commit 6a5dc558f6.

Signed-off-by: sblausten <sam@roadie.io>
This commit is contained in:
sblausten
2023-01-03 15:51:55 +01:00
parent 6a5dc558f6
commit 268f58aea1
13 changed files with 209 additions and 99 deletions
+5
View File
@@ -83,6 +83,11 @@ export const permissionsFactory: (
options?: undefined,
) => ServiceFactory<PermissionsService>;
// @public
export const rootLifecycleFactory: (
options?: undefined,
) => ServiceFactory<LifecycleService>;
// @public (undocumented)
export const rootLoggerFactory: (
options?: undefined,
+22 -65
View File
@@ -30,12 +30,23 @@ import { KubeConfig } from '@kubernetes/client-node';
import { LoadConfigOptionsRemote } from '@backstage/config-loader';
import { Logger } from 'winston';
import { MergeResult } from 'isomorphic-git';
import { DiscoveryService as PluginEndpointDiscovery } from '@backstage/backend-plugin-api';
import { PushResult } from 'isomorphic-git';
import { Readable } from 'stream';
import { ReadCommitResult } from 'isomorphic-git';
import { ReadTreeOptions } from '@backstage/backend-plugin-api';
import { ReadTreeResponse } from '@backstage/backend-plugin-api';
import { ReadTreeResponseDirOptions } from '@backstage/backend-plugin-api';
import { ReadTreeResponseFile } from '@backstage/backend-plugin-api';
import { ReadUrlOptions } from '@backstage/backend-plugin-api';
import { ReadUrlResponse } from '@backstage/backend-plugin-api';
import { RequestHandler } from 'express';
import { Router } from 'express';
import { SearchOptions } from '@backstage/backend-plugin-api';
import { SearchResponse } from '@backstage/backend-plugin-api';
import { SearchResponseFile } from '@backstage/backend-plugin-api';
import { Server } from 'http';
import { UrlReaderService as UrlReader } from '@backstage/backend-plugin-api';
import { V1PodTemplateSpec } from '@kubernetes/client-node';
import * as winston from 'winston';
import { Writable } from 'stream';
@@ -520,11 +531,7 @@ export interface PluginDatabaseManager {
};
}
// @public
export type PluginEndpointDiscovery = {
getBaseUrl(pluginId: string): Promise<string>;
getExternalBaseUrl(pluginId: string): Promise<string>;
};
export { PluginEndpointDiscovery };
// @public
export type ReaderFactory = (options: {
@@ -533,30 +540,11 @@ export type ReaderFactory = (options: {
treeResponseFactory: ReadTreeResponseFactory;
}) => UrlReaderPredicateTuple[];
// @public
export type ReadTreeOptions = {
filter?(
path: string,
info?: {
size: number;
},
): boolean;
etag?: string;
signal?: AbortSignal;
};
export { ReadTreeOptions };
// @public
export type ReadTreeResponse = {
files(): Promise<ReadTreeResponseFile[]>;
archive(): Promise<NodeJS.ReadableStream>;
dir(options?: ReadTreeResponseDirOptions): Promise<string>;
etag: string;
};
export { ReadTreeResponse };
// @public
export type ReadTreeResponseDirOptions = {
targetDir?: string;
};
export { ReadTreeResponseDirOptions };
// @public
export interface ReadTreeResponseFactory {
@@ -587,24 +575,11 @@ export type ReadTreeResponseFactoryOptions = {
) => boolean;
};
// @public
export type ReadTreeResponseFile = {
path: string;
content(): Promise<Buffer>;
};
export { ReadTreeResponseFile };
// @public
export type ReadUrlOptions = {
etag?: string;
signal?: AbortSignal;
};
export { ReadUrlOptions };
// @public
export type ReadUrlResponse = {
buffer(): Promise<Buffer>;
stream?(): Readable;
etag?: string;
};
export { ReadUrlResponse };
// @public
export class ReadUrlResponseFactory {
@@ -652,23 +627,11 @@ export type RunContainerOptions = {
pullImage?: boolean;
};
// @public
export type SearchOptions = {
etag?: string;
signal?: AbortSignal;
};
export { SearchOptions };
// @public
export type SearchResponse = {
files: SearchResponseFile[];
etag: string;
};
export { SearchResponse };
// @public
export type SearchResponseFile = {
url: string;
content(): Promise<Buffer>;
};
export { SearchResponseFile };
// @public
export class ServerTokenManager implements TokenManager {
@@ -755,13 +718,7 @@ export interface TokenManager {
}>;
}
// @public
export type UrlReader = {
read(url: string): Promise<Buffer>;
readUrl(url: string, options?: ReadUrlOptions): Promise<ReadUrlResponse>;
readTree(url: string, options?: ReadTreeOptions): Promise<ReadTreeResponse>;
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
};
export { UrlReader };
// @public
export type UrlReaderPredicateTuple = {
+86 -8
View File
@@ -3,6 +3,8 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
/// <reference types="node" />
import { Config } from '@backstage/config';
import { Handler } from 'express';
import { Logger } from 'winston';
@@ -10,11 +12,10 @@ import { PermissionAuthorizer } from '@backstage/plugin-permission-common';
import { PermissionEvaluator } from '@backstage/plugin-permission-common';
import { PluginCacheManager } from '@backstage/backend-common';
import { PluginDatabaseManager } from '@backstage/backend-common';
import { PluginEndpointDiscovery } from '@backstage/backend-common';
import { PluginTaskScheduler } from '@backstage/backend-tasks';
import { Readable } from 'stream';
import { TokenManager } from '@backstage/backend-common';
import { TransportStreamOptions } from 'winston-transport';
import { UrlReader } from '@backstage/backend-common';
// @public (undocumented)
export interface BackendFeature {
@@ -89,6 +90,7 @@ declare namespace coreServices {
tokenManagerServiceRef as tokenManager,
permissionsServiceRef as permissions,
schedulerServiceRef as scheduler,
rootLifecycleServiceRef as rootLifecycle,
rootLoggerServiceRef as rootLogger,
pluginMetadataServiceRef as pluginMetadata,
lifecycleServiceRef as lifecycle,
@@ -166,11 +168,14 @@ export type DatabaseService = PluginDatabaseManager;
// @public (undocumented)
const databaseServiceRef: ServiceRef<PluginDatabaseManager, 'plugin'>;
// @public (undocumented)
export type DiscoveryService = PluginEndpointDiscovery;
// @public
export type DiscoveryService = {
getBaseUrl(pluginId: string): Promise<string>;
getExternalBaseUrl(pluginId: string): Promise<string>;
};
// @public (undocumented)
const discoveryServiceRef: ServiceRef<PluginEndpointDiscovery, 'plugin'>;
const discoveryServiceRef: ServiceRef<DiscoveryService, 'plugin'>;
// @public
export type ExtensionPoint<T> = {
@@ -200,6 +205,7 @@ const lifecycleServiceRef: ServiceRef<LifecycleService, 'plugin'>;
// @public (undocumented)
export type LifecycleServiceShutdownHook = {
fn: () => void | Promise<void>;
labels?: Record<string, string>;
};
// @public (undocumented)
@@ -245,6 +251,56 @@ export interface PluginMetadataService {
// @public (undocumented)
const pluginMetadataServiceRef: ServiceRef<PluginMetadataService, 'plugin'>;
// @public
export type ReadTreeOptions = {
filter?(
path: string,
info?: {
size: number;
},
): boolean;
etag?: string;
signal?: AbortSignal;
};
// @public
export type ReadTreeResponse = {
files(): Promise<ReadTreeResponseFile[]>;
archive(): Promise<NodeJS.ReadableStream>;
dir(options?: ReadTreeResponseDirOptions): Promise<string>;
etag: string;
};
// @public
export type ReadTreeResponseDirOptions = {
targetDir?: string;
};
// @public
export type ReadTreeResponseFile = {
path: string;
content(): Promise<Buffer>;
};
// @public
export type ReadUrlOptions = {
etag?: string;
signal?: AbortSignal;
};
// @public
export type ReadUrlResponse = {
buffer(): Promise<Buffer>;
stream?(): Readable;
etag?: string;
};
// @public (undocumented)
export type RootLifecycleService = LifecycleService;
// @public (undocumented)
const rootLifecycleServiceRef: ServiceRef<LifecycleService, 'root'>;
// @public (undocumented)
export type RootLoggerService = LoggerService;
@@ -257,6 +313,24 @@ export type SchedulerService = PluginTaskScheduler;
// @public (undocumented)
const schedulerServiceRef: ServiceRef<PluginTaskScheduler, 'plugin'>;
// @public
export type SearchOptions = {
etag?: string;
signal?: AbortSignal;
};
// @public
export type SearchResponse = {
files: SearchResponseFile[];
etag: string;
};
// @public
export type SearchResponseFile = {
url: string;
content(): Promise<Buffer>;
};
// @public (undocumented)
export type ServiceFactory<TService = unknown> =
| {
@@ -307,9 +381,13 @@ export type TypesToServiceRef<T> = {
[key in keyof T]: ServiceRef<T[key]>;
};
// @public (undocumented)
export type UrlReaderService = UrlReader;
// @public
export type UrlReaderService = {
readUrl(url: string, options?: ReadUrlOptions): Promise<ReadUrlResponse>;
readTree(url: string, options?: ReadTreeOptions): Promise<ReadTreeResponse>;
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
};
// @public (undocumented)
const urlReaderServiceRef: ServiceRef<UrlReader, 'plugin'>;
const urlReaderServiceRef: ServiceRef<UrlReaderService, 'plugin'>;
```
+12
View File
@@ -161,6 +161,17 @@ export type EntityFilterQuery =
| Record<string, string | symbol | (string | symbol)[]>[]
| Record<string, string | symbol | (string | symbol)[]>;
// @public
export type EntityOrderQuery =
| {
field: string;
order: 'asc' | 'desc';
}
| Array<{
field: string;
order: 'asc' | 'desc';
}>;
// @public
export interface GetEntitiesByRefsRequest {
entityRefs: string[];
@@ -179,6 +190,7 @@ export interface GetEntitiesRequest {
filter?: EntityFilterQuery;
limit?: number;
offset?: number;
order?: EntityOrderQuery;
}
// @public
+1 -1
View File
@@ -25,7 +25,7 @@ export const ApolloExplorerPage: (props: {
displayOptions: {
docsPanelState?: 'closed' | 'open' | undefined;
showHeadersAndEnvVars?: boolean | undefined;
theme?: 'light' | 'dark' | undefined;
theme?: 'dark' | 'light' | undefined;
};
}
| undefined;
+10
View File
@@ -5,7 +5,9 @@
```ts
/// <reference types="react" />
import { ApiHolder } from '@backstage/core-plugin-api';
import { BackstagePlugin } from '@backstage/core-plugin-api';
import { Entity } from '@backstage/catalog-model';
import { RouteRef } from '@backstage/core-plugin-api';
// @public (undocumented)
@@ -36,6 +38,14 @@ export const bazaarPlugin: BackstagePlugin<
// @public (undocumented)
export const EntityBazaarInfoCard: () => JSX.Element | null;
// @public (undocumented)
export const isBazaarAvailable: (
entity: Entity,
context: {
apis: ApiHolder;
},
) => Promise<boolean>;
// @public (undocumented)
export const SortView: () => JSX.Element;
@@ -178,7 +178,9 @@ export class GitHubOrgEntityProvider extends GithubOrgEntityProvider {
}
// @public
export class GithubOrgEntityProvider implements EntityProvider {
export class GithubOrgEntityProvider
implements EntityProvider, EventSubscriber
{
constructor(options: {
id: string;
orgUrl: string;
@@ -197,7 +199,11 @@ export class GithubOrgEntityProvider implements EntityProvider {
): GithubOrgEntityProvider;
// (undocumented)
getProviderName(): string;
// (undocumented)
onEvent(params: EventParams): Promise<void>;
read(options?: { logger?: Logger }): Promise<void>;
// (undocumented)
supportsEventTopics(): string[];
}
// @public @deprecated (undocumented)
@@ -3,6 +3,7 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { CatalogApi } from '@backstage/catalog-client';
import { Config } from '@backstage/config';
import express from 'express';
import { Logger } from 'winston';
@@ -15,6 +16,8 @@ export function createRouter(options: RouterOptions): Promise<express.Router>;
// @public
export interface RouterOptions {
// (undocumented)
catalogApi?: CatalogApi;
// (undocumented)
config: Config;
// (undocumented)
-4
View File
@@ -9,7 +9,6 @@ import { ApiRef } from '@backstage/core-plugin-api';
import { BackstagePlugin } from '@backstage/core-plugin-api';
import { default as default_2 } from 'react';
import { DiscoveryApi } from '@backstage/core-plugin-api';
import { DomainEntity } from '@backstage/catalog-model';
import { ExploreToolsConfig } from '@backstage/plugin-explore-react';
import { ExternalRouteRef } from '@backstage/core-plugin-api';
import { FetchApi } from '@backstage/core-plugin-api';
@@ -31,9 +30,6 @@ export const catalogEntityRouteRef: ExternalRouteRef<
true
>;
// @public (undocumented)
export const DomainCard: (props: { entity: DomainEntity }) => JSX.Element;
// @public (undocumented)
export const DomainExplorerContent: (props: {
title?: string | undefined;
+3 -3
View File
@@ -29,8 +29,8 @@ export class RollbarApi {
},
): Promise<
{
timestamp: number;
count: number;
timestamp: number;
}[]
>;
// (undocumented)
@@ -51,8 +51,8 @@ export class RollbarApi {
},
): Promise<
{
timestamp: number;
count: number;
timestamp: number;
}[]
>;
// (undocumented)
@@ -64,8 +64,8 @@ export class RollbarApi {
}>;
// (undocumented)
getProjectItems(projectName: string): Promise<{
items: RollbarItem[];
page: number;
items: RollbarItem[];
totalCount: number;
}>;
// (undocumented)
+29 -11
View File
@@ -195,6 +195,12 @@ export function createGithubRepoCreateAction(options: {
gitAuthorEmail?: string | undefined;
allowRebaseMerge?: boolean | undefined;
allowSquashMerge?: boolean | undefined;
squashMergeCommitTitle?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' | undefined;
squashMergeCommitMessage?:
| 'PR_BODY'
| 'COMMIT_MESSAGES'
| 'BLANK'
| undefined;
allowMergeCommit?: boolean | undefined;
allowAutoMerge?: boolean | undefined;
requireCodeOwnerReviews?: boolean | undefined;
@@ -208,16 +214,16 @@ export function createGithubRepoCreateAction(options: {
requiredStatusCheckContexts?: string[] | undefined;
requireBranchesToBeUpToDate?: boolean | undefined;
requiredConversationResolution?: boolean | undefined;
repoVisibility?: 'public' | 'private' | 'internal' | undefined;
repoVisibility?: 'internal' | 'private' | 'public' | undefined;
collaborators?:
| (
| {
user: string;
access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
access: string;
}
| {
team: string;
access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
access: string;
}
| {
username: string;
@@ -225,6 +231,9 @@ export function createGithubRepoCreateAction(options: {
}
)[]
| undefined;
hasProjects?: boolean | undefined;
hasWiki?: boolean | undefined;
hasIssues?: boolean | undefined;
token?: string | undefined;
topics?: string[] | undefined;
}>;
@@ -298,7 +307,7 @@ export function createPublishBitbucketAction(options: {
repoUrl: string;
description?: string | undefined;
defaultBranch?: string | undefined;
repoVisibility?: 'public' | 'private' | undefined;
repoVisibility?: 'private' | 'public' | undefined;
sourcePath?: string | undefined;
enableLFS?: boolean | undefined;
token?: string | undefined;
@@ -315,7 +324,7 @@ export function createPublishBitbucketCloudAction(options: {
repoUrl: string;
description?: string | undefined;
defaultBranch?: string | undefined;
repoVisibility?: 'public' | 'private' | undefined;
repoVisibility?: 'private' | 'public' | undefined;
sourcePath?: string | undefined;
token?: string | undefined;
}>;
@@ -328,7 +337,7 @@ export function createPublishBitbucketServerAction(options: {
repoUrl: string;
description?: string | undefined;
defaultBranch?: string | undefined;
repoVisibility?: 'public' | 'private' | undefined;
repoVisibility?: 'private' | 'public' | undefined;
sourcePath?: string | undefined;
enableLFS?: boolean | undefined;
token?: string | undefined;
@@ -380,6 +389,12 @@ export function createPublishGithubAction(options: {
gitAuthorEmail?: string | undefined;
allowRebaseMerge?: boolean | undefined;
allowSquashMerge?: boolean | undefined;
squashMergeCommitTitle?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' | undefined;
squashMergeCommitMessage?:
| 'PR_BODY'
| 'COMMIT_MESSAGES'
| 'BLANK'
| undefined;
allowMergeCommit?: boolean | undefined;
allowAutoMerge?: boolean | undefined;
sourcePath?: string | undefined;
@@ -395,16 +410,16 @@ export function createPublishGithubAction(options: {
requiredStatusCheckContexts?: string[] | undefined;
requireBranchesToBeUpToDate?: boolean | undefined;
requiredConversationResolution?: boolean | undefined;
repoVisibility?: 'public' | 'private' | 'internal' | undefined;
repoVisibility?: 'internal' | 'private' | 'public' | undefined;
collaborators?:
| (
| {
user: string;
access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
access: string;
}
| {
team: string;
access: 'pull' | 'push' | 'admin' | 'maintain' | 'triage';
access: string;
}
| {
username: string;
@@ -412,6 +427,9 @@ export function createPublishGithubAction(options: {
}
)[]
| undefined;
hasProjects?: boolean | undefined;
hasWiki?: boolean | undefined;
hasIssues?: boolean | undefined;
token?: string | undefined;
topics?: string[] | undefined;
}>;
@@ -441,7 +459,7 @@ export function createPublishGitlabAction(options: {
}): TemplateAction<{
repoUrl: string;
defaultBranch?: string | undefined;
repoVisibility?: 'public' | 'private' | 'internal' | undefined;
repoVisibility?: 'internal' | 'private' | 'public' | undefined;
sourcePath?: string | undefined;
token?: string | undefined;
gitCommitMessage?: string | undefined;
@@ -462,7 +480,7 @@ export const createPublishGitlabMergeRequestAction: (options: {
sourcePath?: string | undefined;
targetPath?: string | undefined;
token?: string | undefined;
commitAction?: 'create' | 'update' | 'delete' | undefined;
commitAction?: 'update' | 'delete' | 'create' | undefined;
projectid?: string | undefined;
removeSourceBranch?: boolean | undefined;
assignee?: string | undefined;
+28 -6
View File
@@ -11,7 +11,6 @@ import { BackstagePlugin } from '@backstage/core-plugin-api';
import { ComponentType } from 'react';
import { DiscoveryApi } from '@backstage/core-plugin-api';
import { Entity } from '@backstage/catalog-model';
import type { ErrorTransformer } from '@rjsf/utils';
import { Extension } from '@backstage/core-plugin-api';
import { ExternalRouteRef } from '@backstage/core-plugin-api';
import { FetchApi } from '@backstage/core-plugin-api';
@@ -19,7 +18,8 @@ import { FieldProps } from '@rjsf/core';
import { FieldProps as FieldProps_2 } from '@rjsf/utils';
import { FieldValidation } from '@rjsf/core';
import { FieldValidation as FieldValidation_2 } from '@rjsf/utils';
import type { FormProps } from '@rjsf/core';
import type { FormProps as FormProps_2 } from '@rjsf/core';
import type { FormProps as FormProps_3 } from '@rjsf/core-v5';
import { IdentityApi } from '@backstage/core-plugin-api';
import { JsonObject } from '@backstage/types';
import { JSONSchema7 } from 'json-schema';
@@ -88,6 +88,10 @@ export const EntityPickerFieldExtension: FieldExtensionComponent<
defaultNamespace?: string | false | undefined;
allowedKinds?: string[] | undefined;
allowArbitraryValues?: boolean | undefined;
catalogFilter?:
| Record<string, string | string[]>
| Record<string, string | string[]>[]
| undefined;
}
>;
@@ -99,6 +103,10 @@ export const EntityPickerFieldSchema: FieldSchema<
defaultNamespace?: string | false | undefined;
allowedKinds?: string[] | undefined;
allowArbitraryValues?: boolean | undefined;
catalogFilter?:
| Record<string, string | string[]>
| Record<string, string | string[]>[]
| undefined;
}
>;
@@ -167,6 +175,12 @@ export interface FieldSchema<TReturn, TUiOptions> {
readonly uiOptionsType: TUiOptions;
}
// @alpha
export type FormProps = Pick<
FormProps_3,
'transformErrors' | 'noHtml5Validate'
>;
// @public
export type LayoutComponent<_TInputProps> = () => null;
@@ -179,7 +193,7 @@ export interface LayoutOptions<P = any> {
}
// @public
export type LayoutTemplate<T = any> = FormProps<T>['ObjectFieldTemplate'];
export type LayoutTemplate<T = any> = FormProps_2<T>['ObjectFieldTemplate'];
// @public
export type ListActionsResponse = Array<{
@@ -264,7 +278,7 @@ export type NextRouterProps = {
TaskPageComponent?: React_2.ComponentType<{}>;
};
groups?: TemplateGroupFilter[];
transformErrors?: ErrorTransformer;
FormProps?: FormProps;
};
// @alpha
@@ -310,6 +324,10 @@ export const OwnerPickerFieldExtension: FieldExtensionComponent<
defaultNamespace?: string | false | undefined;
allowedKinds?: string[] | undefined;
allowArbitraryValues?: boolean | undefined;
catalogFilter?:
| Record<string, string | string[]>
| Record<string, string | string[]>[]
| undefined;
}
>;
@@ -320,6 +338,10 @@ export const OwnerPickerFieldSchema: FieldSchema<
defaultNamespace?: string | false | undefined;
allowedKinds?: string[] | undefined;
allowArbitraryValues?: boolean | undefined;
catalogFilter?:
| Record<string, string | string[]>
| Record<string, string | string[]>[]
| undefined;
}
>;
@@ -348,10 +370,10 @@ export const RepoUrlPickerFieldExtension: FieldExtensionComponent<
| {
additionalScopes?:
| {
azure?: string[] | undefined;
github?: string[] | undefined;
gitlab?: string[] | undefined;
bitbucket?: string[] | undefined;
azure?: string[] | undefined;
gerrit?: string[] | undefined;
}
| undefined;
@@ -374,10 +396,10 @@ export const RepoUrlPickerFieldSchema: FieldSchema<
| {
additionalScopes?:
| {
azure?: string[] | undefined;
github?: string[] | undefined;
gitlab?: string[] | undefined;
bitbucket?: string[] | undefined;
azure?: string[] | undefined;
gerrit?: string[] | undefined;
}
| undefined;
+3
View File
@@ -32,6 +32,9 @@ export const SHADOW_DOM_STYLE_LOAD_EVENT = 'TECH_DOCS_SHADOW_DOM_STYLE_LOAD';
// @public
export type SyncResult = 'cached' | 'updated';
// @public
export const TECHDOCS_ADDONS_KEY = 'techdocs.addons.addon.v1';
// @public
export const TECHDOCS_ADDONS_WRAPPER_KEY = 'techdocs.addons.wrapper.v1';