diff --git a/.changeset/young-houses-unite.md b/.changeset/young-houses-unite.md new file mode 100644 index 0000000000..47ffe43c21 --- /dev/null +++ b/.changeset/young-houses-unite.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-app-api': patch +--- + +Fixing issue with `MiddlewareFactory` deprecation wrapping diff --git a/packages/backend-app-api/api-report.md b/packages/backend-app-api/api-report.md index 724d3409bf..7518f8e2cc 100644 --- a/packages/backend-app-api/api-report.md +++ b/packages/backend-app-api/api-report.md @@ -208,8 +208,7 @@ export const loggerServiceFactory: () => ServiceFactory< export class MiddlewareFactory { compression(): RequestHandler; cors(): RequestHandler; - // Warning: (ae-forgotten-export) The symbol "MiddlewareFactory_2" needs to be exported by the entry point index.d.ts - static create(options: MiddlewareFactoryOptions): MiddlewareFactory_2; + static create(options: MiddlewareFactoryOptions): MiddlewareFactory; error(options?: MiddlewareFactoryErrorOptions): ErrorRequestHandler; helmet(): RequestHandler; logging(): RequestHandler; diff --git a/packages/backend-app-api/src/http/index.ts b/packages/backend-app-api/src/http/index.ts index 8fd1b31e75..a056ed2d61 100644 --- a/packages/backend-app-api/src/http/index.ts +++ b/packages/backend-app-api/src/http/index.ts @@ -58,7 +58,7 @@ export class MiddlewareFactory { * Creates a new {@link MiddlewareFactory}. */ static create(options: MiddlewareFactoryOptions) { - return _MiddlewareFactory.create(options); + return new MiddlewareFactory(_MiddlewareFactory.create(options)); } private constructor(private readonly impl: _MiddlewareFactory) {}