From f15d1fb1f12d1fa6e3165f33fc362ca0229a98b1 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Fri, 16 Aug 2024 15:44:51 +0200 Subject: [PATCH] chore: switch from config to RootConfigService Signed-off-by: Johan Haals --- plugins/app-backend/api-report.md | 4 ++-- plugins/app-backend/src/service/router.ts | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/app-backend/api-report.md b/plugins/app-backend/api-report.md index 690ce1c285..bb0ebb67db 100644 --- a/plugins/app-backend/api-report.md +++ b/plugins/app-backend/api-report.md @@ -4,12 +4,12 @@ ```ts import { AuthService } from '@backstage/backend-plugin-api'; -import { Config } from '@backstage/config'; import { ConfigSchema } from '@backstage/config-loader'; import { DatabaseService } from '@backstage/backend-plugin-api'; import express from 'express'; import { HttpAuthService } from '@backstage/backend-plugin-api'; import { LoggerService } from '@backstage/backend-plugin-api'; +import { RootConfigService } from '@backstage/backend-plugin-api'; // @public @deprecated (undocumented) export function createRouter(options: RouterOptions): Promise; @@ -20,7 +20,7 @@ export interface RouterOptions { // (undocumented) auth?: AuthService; // (undocumented) - config: Config; + config: RootConfigService; database?: DatabaseService; disableConfigInjection?: boolean; // (undocumented) diff --git a/plugins/app-backend/src/service/router.ts b/plugins/app-backend/src/service/router.ts index 7633968f06..b205f16203 100644 --- a/plugins/app-backend/src/service/router.ts +++ b/plugins/app-backend/src/service/router.ts @@ -18,8 +18,9 @@ import { notFoundHandler } from '@backstage/backend-common'; import { DatabaseService, resolvePackagePath, + RootConfigService, } from '@backstage/backend-plugin-api'; -import { AppConfig, Config } from '@backstage/config'; +import { AppConfig } from '@backstage/config'; import helmet from 'helmet'; import express from 'express'; import Router from 'express-promise-router'; @@ -52,7 +53,7 @@ type Mime = { lookup(arg0: string): string }; * @deprecated Please migrate to the new backend system as this will be removed in the future. */ export interface RouterOptions { - config: Config; + config: RootConfigService; logger: LoggerService; auth?: AuthService; httpAuth?: HttpAuthService;