Merge pull request #975 from spotify/rugvip/create
packages/core: switch to only using createApiRef
This commit is contained in:
@@ -26,11 +26,11 @@ import {
|
||||
BuildSummary,
|
||||
GitType,
|
||||
} from 'circleci-api';
|
||||
import { ApiRef } from '@backstage/core';
|
||||
import { createApiRef } from '@backstage/core';
|
||||
|
||||
export { BuildWithSteps, BuildStepAction, BuildSummary, GitType };
|
||||
|
||||
export const circleCIApiRef = new ApiRef<CircleCIApi>({
|
||||
export const circleCIApiRef = createApiRef<CircleCIApi>({
|
||||
id: 'plugin.circleci.service',
|
||||
description: 'Used by the CircleCI plugin to make requests',
|
||||
});
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiRef } from '@backstage/core';
|
||||
import { createApiRef } from '@backstage/core';
|
||||
|
||||
export type GraphQLEndpoint = {
|
||||
// Will be used as unique key for storing history and query data
|
||||
@@ -33,7 +33,7 @@ export type GraphQLBrowseApi = {
|
||||
getEndpoints(): Promise<GraphQLEndpoint[]>;
|
||||
};
|
||||
|
||||
export const graphQlBrowseApiRef = new ApiRef<GraphQLBrowseApi>({
|
||||
export const graphQlBrowseApiRef = createApiRef<GraphQLBrowseApi>({
|
||||
id: 'plugin.graphiql.browse',
|
||||
description: 'Used to supply GraphQL endpoints for browsing',
|
||||
});
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiRef } from '@backstage/core';
|
||||
import { createApiRef } from '@backstage/core';
|
||||
|
||||
export type LighthouseCategoryId =
|
||||
| 'pwa'
|
||||
@@ -105,7 +105,7 @@ export type LighthouseApi = {
|
||||
triggerAudit: (payload: TriggerAuditPayload) => Promise<Audit>;
|
||||
};
|
||||
|
||||
export const lighthouseApiRef = new ApiRef<LighthouseApi>({
|
||||
export const lighthouseApiRef = createApiRef<LighthouseApi>({
|
||||
id: 'plugin.lighthouse.service',
|
||||
description: 'Used by the Lighthouse plugin to make requests',
|
||||
});
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiRef } from '@backstage/core';
|
||||
import { createApiRef } from '@backstage/core';
|
||||
|
||||
/**
|
||||
* Types related to the Radar's visualization.
|
||||
@@ -71,7 +71,7 @@ export interface TechRadarApi extends TechRadarComponentProps {
|
||||
subtitle?: string;
|
||||
}
|
||||
|
||||
export const techRadarApiRef = new ApiRef<TechRadarApi>({
|
||||
export const techRadarApiRef = createApiRef<TechRadarApi>({
|
||||
id: 'plugin.techradar',
|
||||
description: 'Used by the Tech Radar to render the visualization',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user