@@ -26,17 +26,12 @@ export { BuildSummary };
|
||||
|
||||
export { BuildWithSteps };
|
||||
|
||||
// Warning: (ae-missing-release-tag) "CIRCLECI_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const CIRCLECI_ANNOTATION = 'circleci.com/project-slug';
|
||||
|
||||
// Warning: (ae-missing-release-tag) "CircleCIApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export class CircleCIApi {
|
||||
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
|
||||
constructor(options: Options);
|
||||
constructor(options: { discoveryApi: DiscoveryApi; proxyPath?: string });
|
||||
// (undocumented)
|
||||
getBuild(
|
||||
buildNumber: number,
|
||||
@@ -59,44 +54,30 @@ export class CircleCIApi {
|
||||
): Promise<BuildSummary>;
|
||||
}
|
||||
|
||||
// Warning: (ae-missing-release-tag) "circleCIApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const circleCIApiRef: ApiRef<CircleCIApi>;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "circleCIBuildRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const circleCIBuildRouteRef: SubRouteRef<PathParams<'/:buildId'>>;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "circleCIPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
const circleCIPlugin: BackstagePlugin<{}, {}, {}>;
|
||||
export { circleCIPlugin };
|
||||
export { circleCIPlugin as plugin };
|
||||
|
||||
// Warning: (ae-missing-release-tag) "circleCIRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const circleCIRouteRef: RouteRef<undefined>;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "EntityCircleCIContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const EntityCircleCIContent: () => JSX.Element;
|
||||
|
||||
export { GitType };
|
||||
|
||||
// Warning: (ae-missing-release-tag) "isCircleCIAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
const isCircleCIAvailable: (entity: Entity) => boolean;
|
||||
export { isCircleCIAvailable };
|
||||
export { isCircleCIAvailable as isPluginApplicableToEntity };
|
||||
|
||||
// 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: () => JSX.Element;
|
||||
```
|
||||
|
||||
@@ -28,28 +28,31 @@ import {
|
||||
} from 'circleci-api';
|
||||
import { createApiRef, DiscoveryApi } from '@backstage/core-plugin-api';
|
||||
|
||||
/** @public */
|
||||
export { GitType };
|
||||
|
||||
/** @public */
|
||||
export type { BuildWithSteps, BuildStepAction, BuildSummary };
|
||||
|
||||
/** @public */
|
||||
export const circleCIApiRef = createApiRef<CircleCIApi>({
|
||||
id: 'plugin.circleci.service',
|
||||
});
|
||||
|
||||
const DEFAULT_PROXY_PATH = '/circleci/api';
|
||||
|
||||
type Options = {
|
||||
discoveryApi: DiscoveryApi;
|
||||
/**
|
||||
* Path to use for requests via the proxy, defaults to /circleci/api
|
||||
*/
|
||||
proxyPath?: string;
|
||||
};
|
||||
|
||||
/** @public */
|
||||
export class CircleCIApi {
|
||||
private readonly discoveryApi: DiscoveryApi;
|
||||
private readonly proxyPath: string;
|
||||
|
||||
constructor(options: Options) {
|
||||
constructor(options: {
|
||||
discoveryApi: DiscoveryApi;
|
||||
/**
|
||||
* Path to use for requests via the proxy, defaults to /circleci/api
|
||||
*/
|
||||
proxyPath?: string;
|
||||
}) {
|
||||
this.discoveryApi = options.discoveryApi;
|
||||
this.proxyPath = options.proxyPath ?? DEFAULT_PROXY_PATH;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { CircleCIApi, circleCIApiRef, GitType } from './CircleCIApi';
|
||||
export type { GitType } from './CircleCIApi';
|
||||
export { CircleCIApi, circleCIApiRef } from './CircleCIApi';
|
||||
export type {
|
||||
BuildWithSteps,
|
||||
BuildStepAction,
|
||||
|
||||
@@ -24,9 +24,11 @@ import { Entity } from '@backstage/catalog-model';
|
||||
import { useEntity } from '@backstage/plugin-catalog-react';
|
||||
import { MissingAnnotationEmptyState } from '@backstage/core-components';
|
||||
|
||||
/** @public */
|
||||
export const isCircleCIAvailable = (entity: Entity) =>
|
||||
Boolean(entity.metadata.annotations?.[CIRCLECI_ANNOTATION]);
|
||||
|
||||
/** @public */
|
||||
export const Router = () => {
|
||||
const { entity } = useEntity();
|
||||
|
||||
|
||||
@@ -14,4 +14,5 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/** @public */
|
||||
export const CIRCLECI_ANNOTATION = 'circleci.com/project-slug';
|
||||
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
createRoutableExtension,
|
||||
} from '@backstage/core-plugin-api';
|
||||
|
||||
/** @public */
|
||||
export const circleCIPlugin = createPlugin({
|
||||
id: 'circleci',
|
||||
apis: [
|
||||
@@ -34,6 +35,7 @@ export const circleCIPlugin = createPlugin({
|
||||
],
|
||||
});
|
||||
|
||||
/** @public */
|
||||
export const EntityCircleCIContent = circleCIPlugin.provide(
|
||||
createRoutableExtension({
|
||||
name: 'EntityCircleCIContent',
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
|
||||
import { createRouteRef, createSubRouteRef } from '@backstage/core-plugin-api';
|
||||
|
||||
/** @public */
|
||||
export const circleCIRouteRef = createRouteRef({
|
||||
id: 'circle-ci',
|
||||
});
|
||||
|
||||
/** @public */
|
||||
export const circleCIBuildRouteRef = createSubRouteRef({
|
||||
id: 'circle-ci/build',
|
||||
parent: circleCIRouteRef,
|
||||
|
||||
Reference in New Issue
Block a user