devtools-backend: deprecate createRouter
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-devtools-backend': patch
|
||||
---
|
||||
|
||||
Deprecated `createRouter` and its router options in favour of the new backend system.
|
||||
@@ -13,8 +13,9 @@ import { ExternalDependency } from '@backstage/plugin-devtools-common';
|
||||
import { HttpAuthService } from '@backstage/backend-plugin-api';
|
||||
import { LoggerService } from '@backstage/backend-plugin-api';
|
||||
import { PermissionsService } from '@backstage/backend-plugin-api';
|
||||
import { RootConfigService } from '@backstage/backend-plugin-api';
|
||||
|
||||
// @public (undocumented)
|
||||
// @public @deprecated (undocumented)
|
||||
export function createRouter(options: RouterOptions): Promise<express.Router>;
|
||||
|
||||
// @public (undocumented)
|
||||
@@ -32,10 +33,10 @@ export class DevToolsBackendApi {
|
||||
const devtoolsPlugin: BackendFeatureCompat;
|
||||
export default devtoolsPlugin;
|
||||
|
||||
// @public (undocumented)
|
||||
// @public @deprecated (undocumented)
|
||||
export interface RouterOptions {
|
||||
// (undocumented)
|
||||
config: Config;
|
||||
config: RootConfigService;
|
||||
// (undocumented)
|
||||
devToolsBackendApi?: DevToolsBackendApi;
|
||||
// (undocumented)
|
||||
|
||||
@@ -21,7 +21,6 @@ import {
|
||||
devToolsPermissions,
|
||||
} from '@backstage/plugin-devtools-common';
|
||||
|
||||
import { Config } from '@backstage/config';
|
||||
import { DevToolsBackendApi } from '../api';
|
||||
import { NotAllowedError } from '@backstage/errors';
|
||||
import Router from 'express-promise-router';
|
||||
@@ -36,19 +35,26 @@ import {
|
||||
HttpAuthService,
|
||||
LoggerService,
|
||||
PermissionsService,
|
||||
RootConfigService,
|
||||
} from '@backstage/backend-plugin-api';
|
||||
|
||||
/** @public */
|
||||
/**
|
||||
* @public
|
||||
* @deprecated Please migrate to the new backend system as this will be removed in the future.
|
||||
*/
|
||||
export interface RouterOptions {
|
||||
devToolsBackendApi?: DevToolsBackendApi;
|
||||
logger: LoggerService;
|
||||
config: Config;
|
||||
config: RootConfigService;
|
||||
permissions: PermissionsService;
|
||||
discovery: DiscoveryService;
|
||||
httpAuth?: HttpAuthService;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
/**
|
||||
* @deprecated Please migrate to the new backend system as this will be removed in the future.
|
||||
* @public
|
||||
* */
|
||||
export async function createRouter(
|
||||
options: RouterOptions,
|
||||
): Promise<express.Router> {
|
||||
|
||||
Reference in New Issue
Block a user