backend-app-api: deprecate callback form of backend.add(...)
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-app-api': patch
|
||||
---
|
||||
|
||||
The ability to install backend features in callback form (`() => BackendFeature`) has been deprecated. This typically means that you need to update the installed features to use the latest version of `@backstage/backend-plugin-api`. If the feature is from a third-party package, please reach out to the package maintainer to update it.
|
||||
@@ -58,9 +58,16 @@ export interface Backend {
|
||||
add(
|
||||
feature:
|
||||
| BackendFeature
|
||||
| Promise<{
|
||||
default: BackendFeature;
|
||||
}>,
|
||||
): void;
|
||||
// @deprecated (undocumented)
|
||||
add(
|
||||
feature:
|
||||
| (() => BackendFeature)
|
||||
| Promise<{
|
||||
default: BackendFeature | (() => BackendFeature);
|
||||
default: () => BackendFeature;
|
||||
}>,
|
||||
): void;
|
||||
// (undocumented)
|
||||
|
||||
@@ -25,11 +25,18 @@ import {
|
||||
* @public
|
||||
*/
|
||||
export interface Backend {
|
||||
add(feature: BackendFeature | Promise<{ default: BackendFeature }>): void;
|
||||
/**
|
||||
* @deprecated The ability to add features defined as a callback is being
|
||||
* removed. Please update the installed feature to no longer be defined as a
|
||||
* callback, typically this means updating it to use the latest version of
|
||||
* `@backstage/backend-plugin-api`. If the feature is from a third-party
|
||||
* package, please reach out to the package maintainer to update it.
|
||||
*/
|
||||
add(
|
||||
feature:
|
||||
| BackendFeature
|
||||
| (() => BackendFeature)
|
||||
| Promise<{ default: BackendFeature | (() => BackendFeature) }>,
|
||||
| Promise<{ default: () => BackendFeature }>,
|
||||
): void;
|
||||
start(): Promise<void>;
|
||||
stop(): Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user