Remove export of createLifecycleMiddleware and LifecycleMiddlewareOptions
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
'@backstage/backend-defaults': minor
|
||||
---
|
||||
|
||||
Deprecated `createLifecycleMiddleware` to clean up API surface, it has no external references, let us know if you use this directly.
|
||||
**BREAKING** Removed `createLifecycleMiddleware` and `LifecycleMiddlewareOptions` to clean up API surface. These exports have no external usage and do not provide value in its current form. If you were using these exports, please reach out to the maintainers to discuss your use case.
|
||||
|
||||
@@ -4,16 +4,8 @@
|
||||
|
||||
```ts
|
||||
import { HttpRouterService } from '@backstage/backend-plugin-api';
|
||||
import { HumanDuration } from '@backstage/types';
|
||||
import { LifecycleService } from '@backstage/backend-plugin-api';
|
||||
import { RequestHandler } from 'express';
|
||||
import { ServiceFactory } from '@backstage/backend-plugin-api';
|
||||
|
||||
// @public @deprecated
|
||||
export function createLifecycleMiddleware(
|
||||
options: LifecycleMiddlewareOptions,
|
||||
): RequestHandler;
|
||||
|
||||
// @public
|
||||
export const httpRouterServiceFactory: ServiceFactory<
|
||||
HttpRouterService,
|
||||
@@ -21,12 +13,5 @@ export const httpRouterServiceFactory: ServiceFactory<
|
||||
'singleton'
|
||||
>;
|
||||
|
||||
// @public
|
||||
export interface LifecycleMiddlewareOptions {
|
||||
// (undocumented)
|
||||
lifecycle: LifecycleService;
|
||||
startupRequestPauseTimeout?: HumanDuration;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
|
||||
@@ -23,7 +23,7 @@ export const DEFAULT_TIMEOUT = { seconds: 5 };
|
||||
|
||||
/**
|
||||
* Options for {@link createLifecycleMiddleware}.
|
||||
* @public
|
||||
* @internal
|
||||
*/
|
||||
export interface LifecycleMiddlewareOptions {
|
||||
lifecycle: LifecycleService;
|
||||
@@ -47,9 +47,7 @@ export interface LifecycleMiddlewareOptions {
|
||||
* If the service is shutting down, all requests will be rejected with a
|
||||
* {@link @backstage/errors#ServiceUnavailableError}.
|
||||
*
|
||||
* @public
|
||||
* @deprecated This function export will be removed in a future release.
|
||||
* If rely on this function then please reach out to the Backstage maintainers.
|
||||
* @internal
|
||||
*/
|
||||
export function createLifecycleMiddleware(
|
||||
options: LifecycleMiddlewareOptions,
|
||||
|
||||
@@ -15,5 +15,3 @@
|
||||
*/
|
||||
|
||||
export { httpRouterServiceFactory } from './httpRouterServiceFactory';
|
||||
export { createLifecycleMiddleware } from './createLifecycleMiddleware';
|
||||
export type { LifecycleMiddlewareOptions } from './createLifecycleMiddleware';
|
||||
|
||||
Reference in New Issue
Block a user