@@ -17,11 +17,12 @@ import { BackendFeature } from '@backstage/backend-plugin-api';
1717import { BitbucketCloudIntegration } from ' @backstage/integration' ;
1818import { BitbucketIntegration } from ' @backstage/integration' ;
1919import { BitbucketServerIntegration } from ' @backstage/integration' ;
20- import { CacheService as CacheClient } from ' @backstage/backend-plugin-api' ;
21- import { CacheServiceOptions as CacheClientOptions } from ' @backstage/backend-plugin-api' ;
22- import { CacheServiceSetOptions as CacheClientSetOptions } from ' @backstage/backend-plugin-api' ;
20+ import { CacheService } from ' @backstage/backend-plugin-api' ;
21+ import { CacheServiceOptions } from ' @backstage/backend-plugin-api' ;
22+ import type { CacheServiceSetOptions } from ' @backstage/backend-plugin-api' ;
2323import { Config } from ' @backstage/config' ;
2424import cors from ' cors' ;
25+ import { DiscoveryService } from ' @backstage/backend-plugin-api' ;
2526import Docker from ' dockerode' ;
2627import { ErrorRequestHandler } from ' express' ;
2728import express from ' express' ;
@@ -44,7 +45,6 @@ import { LoggerService } from '@backstage/backend-plugin-api';
4445import { MergeResult } from ' isomorphic-git' ;
4546import { PermissionsService } from ' @backstage/backend-plugin-api' ;
4647import { DatabaseService as PluginDatabaseManager } from ' @backstage/backend-plugin-api' ;
47- import { DiscoveryService as PluginEndpointDiscovery } from ' @backstage/backend-plugin-api' ;
4848import { PluginMetadataService } from ' @backstage/backend-plugin-api' ;
4949import { PushResult } from ' isomorphic-git' ;
5050import { Readable } from ' stream' ;
@@ -193,18 +193,26 @@ export class BitbucketUrlReader implements UrlReader {
193193 toString(): string ;
194194}
195195
196- export { CacheClient };
196+ // @public @deprecated (undocumented)
197+ export type CacheClient = CacheService ;
197198
198- export { CacheClientOptions };
199+ // @public @deprecated (undocumented)
200+ export type CacheClientOptions = CacheServiceOptions ;
199201
200- export { CacheClientSetOptions };
202+ // @public @deprecated (undocumented)
203+ export type CacheClientSetOptions = CacheServiceSetOptions ;
201204
202205// @public
203206export class CacheManager {
204- forPlugin(pluginId : string ): PluginCacheManager ;
207+ forPlugin(pluginId : string ): {
208+ getClient(options ? : CacheServiceOptions ): CacheService ;
209+ };
205210 static fromConfig(
206211 config : Config ,
207- options ? : CacheManagerOptions ,
212+ options ? : {
213+ logger? : LoggerService ;
214+ onError? : (err : Error ) => void ;
215+ },
208216 ): CacheManager ;
209217}
210218
@@ -214,10 +222,10 @@ export type CacheManagerOptions = {
214222 onError? : (err : Error ) => void ;
215223};
216224
217- // @public (undocumented)
218- export function cacheToPluginCacheManager(
219- cache : CacheClient ,
220- ) : PluginCacheManager ;
225+ // @public
226+ export function cacheToPluginCacheManager(cache : CacheService ) : {
227+ getClient( options ? : CacheServiceOptions ) : CacheService ;
228+ } ;
221229
222230// @public @deprecated
223231export const coloredFormat: winston .Logform .Format ;
@@ -575,10 +583,10 @@ export const legacyPlugin: (
575583 default: LegacyCreateRouter <
576584 TransformedEnv <
577585 {
578- cache: CacheClient ;
586+ cache: CacheService ;
579587 config: RootConfigService ;
580588 database: PluginDatabaseManager ;
581- discovery: PluginEndpointDiscovery ;
589+ discovery: DiscoveryService ;
582590 logger: LoggerService ;
583591 permissions: PermissionsService ;
584592 scheduler: SchedulerService ;
@@ -588,7 +596,9 @@ export const legacyPlugin: (
588596 },
589597 {
590598 logger: (log : LoggerService ) => Logger ;
591- cache: (cache : CacheClient ) => PluginCacheManager ;
599+ cache: (cache : CacheService ) => {
600+ getClient(options ? : CacheServiceOptions | undefined ): CacheService ;
601+ };
592602 }
593603 >
594604 >;
@@ -639,12 +649,13 @@ export function notFoundHandler(): RequestHandler;
639649// @public (undocumented)
640650export interface PluginCacheManager {
641651 // (undocumented)
642- getClient(options ? : CacheClientOptions ): CacheClient ;
652+ getClient(options ? : CacheServiceOptions ): CacheService ;
643653}
644654
645655export { PluginDatabaseManager };
646656
647- export { PluginEndpointDiscovery };
657+ // @public @deprecated (undocumented)
658+ export type PluginEndpointDiscovery = DiscoveryService ;
648659
649660// @public
650661export interface PullOptions {
0 commit comments