update usage elsewhere
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-gitlab': patch
|
||||
---
|
||||
|
||||
Internal update to use the new cache manager
|
||||
@@ -65,10 +65,15 @@ export type CacheClientOptions = CacheServiceOptions;
|
||||
// @public @deprecated (undocumented)
|
||||
export type CacheClientSetOptions = CacheServiceSetOptions;
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "CacheManager_2" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
// @public @deprecated (undocumented)
|
||||
export class CacheManager extends CacheManager_2 {}
|
||||
export class CacheManager {
|
||||
// (undocumented)
|
||||
forPlugin(pluginId: string): PluginCacheManager;
|
||||
static fromConfig(
|
||||
config: RootConfigService,
|
||||
options?: CacheManagerOptions,
|
||||
): CacheManager;
|
||||
}
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "CacheManagerOptions_2" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
@@ -411,10 +416,10 @@ export function makeLegacyPlugin<
|
||||
// @public @deprecated
|
||||
export function notFoundHandler(): RequestHandler;
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "PluginCacheManager_2" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
// @public @deprecated (undocumented)
|
||||
export type PluginCacheManager = PluginCacheManager_2;
|
||||
export type PluginCacheManager = {
|
||||
getClient(options?: CacheServiceOptions): CacheService;
|
||||
};
|
||||
|
||||
// @public @deprecated (undocumented)
|
||||
export type PluginDatabaseManager = DatabaseService;
|
||||
|
||||
@@ -27,10 +27,7 @@ import {
|
||||
} from '@backstage/plugin-catalog-node';
|
||||
import { GitLabClient, GitLabProject, paginated } from './lib';
|
||||
import { CacheService, LoggerService } from '@backstage/backend-plugin-api';
|
||||
import {
|
||||
CacheManager,
|
||||
PluginCacheManager,
|
||||
} from '@backstage/backend-defaults/cache';
|
||||
import { CacheManager } from '@backstage/backend-defaults/cache';
|
||||
|
||||
/**
|
||||
* Extracts repositories out of an GitLab instance.
|
||||
@@ -64,13 +61,13 @@ export class GitLabDiscoveryProcessor implements CatalogProcessor {
|
||||
|
||||
private constructor(options: {
|
||||
integrations: ScmIntegrationRegistry;
|
||||
pluginCache: PluginCacheManager;
|
||||
pluginCache: CacheService;
|
||||
logger: LoggerService;
|
||||
skipReposWithoutExactFileMatch?: boolean;
|
||||
skipForkedRepos?: boolean;
|
||||
}) {
|
||||
this.integrations = options.integrations;
|
||||
this.cache = options.pluginCache.getClient();
|
||||
this.cache = options.pluginCache;
|
||||
this.logger = options.logger;
|
||||
this.skipReposWithoutExactFileMatch =
|
||||
options.skipReposWithoutExactFileMatch || false;
|
||||
|
||||
@@ -14,7 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { loggerToWinstonLogger } from '@backstage/backend-common';
|
||||
import {
|
||||
PluginCacheManager,
|
||||
loggerToWinstonLogger,
|
||||
} from '@backstage/backend-common';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import {
|
||||
DocsBuildStrategy,
|
||||
@@ -30,7 +33,6 @@ import { createEventStream, createRouter, RouterOptions } from './router';
|
||||
import { TechDocsCache } from '../cache';
|
||||
import { mockErrorHandler, mockServices } from '@backstage/backend-test-utils';
|
||||
import { DiscoveryService } from '@backstage/backend-plugin-api';
|
||||
import { PluginCacheManager } from '@backstage/backend-defaults/cache';
|
||||
|
||||
jest.mock('@backstage/catalog-client');
|
||||
jest.mock('@backstage/config');
|
||||
|
||||
Reference in New Issue
Block a user