Merge pull request #10171 from backstage/freben/results

remove results
This commit is contained in:
Fredrik Adelöw
2022-03-14 15:06:12 +01:00
committed by GitHub
4 changed files with 5 additions and 142 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': minor
---
**BREAKING**: Removed the previously deprecated `results` export. Please use `processingResult` instead.
-45
View File
@@ -457,12 +457,6 @@ export type EntitiesSearchFilter = {
values?: string[];
};
// @public @deprecated (undocumented)
function entity(
atLocation: LocationSpec,
newEntity: Entity,
): CatalogProcessorResult;
// @public (undocumented)
export type EntityAncestryResponse = {
rootEntityRef: string;
@@ -574,24 +568,6 @@ export class FileReaderProcessor implements CatalogProcessor {
): Promise<boolean>;
}
// @public @deprecated (undocumented)
function generalError(
atLocation: LocationSpec,
message: string,
): CatalogProcessorResult;
// @public @deprecated (undocumented)
function inputError(
atLocation: LocationSpec,
message: string,
): CatalogProcessorResult;
// @public @deprecated (undocumented)
function location_2(
newLocation: LocationSpec,
_optional?: boolean,
): CatalogProcessorResult;
// @public (undocumented)
export type LocationAnalyzer = {
analyzeLocation(
@@ -680,12 +656,6 @@ export interface LocationStore {
listLocations(): Promise<Location_2[]>;
}
// @public @deprecated (undocumented)
function notFoundError(
atLocation: LocationSpec,
message: string,
): CatalogProcessorResult;
// @public (undocumented)
export type PageInfo =
| {
@@ -812,21 +782,6 @@ export interface RefreshService {
refresh(options: RefreshOptions): Promise<void>;
}
// @public @deprecated (undocumented)
function relation(spec: EntityRelationSpec): CatalogProcessorResult;
declare namespace results {
export {
notFoundError,
inputError,
generalError,
location_2 as location,
entity,
relation,
};
}
export { results };
// @public
export interface RouterOptions {
// (undocumented)
@@ -1,93 +0,0 @@
/*
* Copyright 2020 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { InputError, NotFoundError } from '@backstage/errors';
import { Entity } from '@backstage/catalog-model';
import { CatalogProcessorResult } from './processor';
import { EntityRelationSpec, LocationSpec } from './common';
// NOTE: This entire file is deprecated and should be eventually removed along with the `result` export
/**
* @public
* @deprecated import the processingResult symbol instead and use its fields
*/
export function notFoundError(
atLocation: LocationSpec,
message: string,
): CatalogProcessorResult {
return {
type: 'error',
location: atLocation,
error: new NotFoundError(message),
};
}
/**
* @public
* @deprecated import the processingResult symbol instead and use its fields
*/
export function inputError(
atLocation: LocationSpec,
message: string,
): CatalogProcessorResult {
return {
type: 'error',
location: atLocation,
error: new InputError(message),
};
}
/**
* @public
* @deprecated import the processingResult symbol instead and use its fields
*/
export function generalError(
atLocation: LocationSpec,
message: string,
): CatalogProcessorResult {
return { type: 'error', location: atLocation, error: new Error(message) };
}
/**
* @public
* @deprecated import the processingResult symbol instead and use its fields
*/
export function location(
newLocation: LocationSpec,
_optional?: boolean,
): CatalogProcessorResult {
return { type: 'location', location: newLocation };
}
/**
* @public
* @deprecated import the processingResult symbol instead and use its fields
*/
export function entity(
atLocation: LocationSpec,
newEntity: Entity,
): CatalogProcessorResult {
return { type: 'entity', location: atLocation, entity: newEntity };
}
/**
* @public
* @deprecated import the processingResult symbol instead and use its fields
*/
export function relation(spec: EntityRelationSpec): CatalogProcessorResult {
return { type: 'relation', relation: spec };
}
-4
View File
@@ -14,10 +14,6 @@
* limitations under the License.
*/
import * as results from './deprecatedResult';
export { results };
export { processingResult } from './processingResult';
export type { EntityRelationSpec, LocationSpec } from './common';
export type {