refactor(collators): allow tokenManager param to be optional
Signed-off-by: Phil Kuang <pkuang@factset.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-search-backend-module-techdocs': patch
|
||||
'@backstage/plugin-search-backend-module-catalog': patch
|
||||
---
|
||||
|
||||
Allow the `tokenManager` parameter to be optional when instantiating collator
|
||||
@@ -44,7 +44,7 @@ export class DefaultCatalogCollatorFactory implements DocumentCollatorFactory {
|
||||
export type DefaultCatalogCollatorFactoryOptions = {
|
||||
auth?: AuthService;
|
||||
discovery: PluginEndpointDiscovery;
|
||||
tokenManager: TokenManager;
|
||||
tokenManager?: TokenManager;
|
||||
locationTemplate?: string;
|
||||
filter?: GetEntitiesRequest['filter'];
|
||||
batchSize?: number;
|
||||
|
||||
+1
-3
@@ -40,7 +40,7 @@ import { AuthService } from '@backstage/backend-plugin-api';
|
||||
export type DefaultCatalogCollatorFactoryOptions = {
|
||||
auth?: AuthService;
|
||||
discovery: PluginEndpointDiscovery;
|
||||
tokenManager: TokenManager;
|
||||
tokenManager?: TokenManager;
|
||||
/**
|
||||
* @deprecated Use the config key `search.collators.catalog.locationTemplate` instead.
|
||||
*/
|
||||
@@ -95,7 +95,6 @@ export class DefaultCatalogCollatorFactory implements DocumentCollatorFactory {
|
||||
entityTransformer: options.entityTransformer,
|
||||
auth: adaptedAuth,
|
||||
discovery: options.discovery,
|
||||
tokenManager: options.tokenManager,
|
||||
catalogClient: options.catalogClient,
|
||||
});
|
||||
}
|
||||
@@ -107,7 +106,6 @@ export class DefaultCatalogCollatorFactory implements DocumentCollatorFactory {
|
||||
entityTransformer?: CatalogCollatorEntityTransformer;
|
||||
auth: AuthService;
|
||||
discovery: PluginEndpointDiscovery;
|
||||
tokenManager: TokenManager;
|
||||
catalogClient?: CatalogApi;
|
||||
}) {
|
||||
const {
|
||||
|
||||
@@ -45,7 +45,7 @@ export type TechDocsCollatorEntityTransformer = (
|
||||
export type TechDocsCollatorFactoryOptions = {
|
||||
discovery: PluginEndpointDiscovery;
|
||||
logger: LoggerService;
|
||||
tokenManager: TokenManager;
|
||||
tokenManager?: TokenManager;
|
||||
auth?: AuthService;
|
||||
httpAuth?: HttpAuthService;
|
||||
locationTemplate?: string;
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ interface MkSearchIndexDoc {
|
||||
export type TechDocsCollatorFactoryOptions = {
|
||||
discovery: PluginEndpointDiscovery;
|
||||
logger: LoggerService;
|
||||
tokenManager: TokenManager;
|
||||
tokenManager?: TokenManager;
|
||||
auth?: AuthService;
|
||||
httpAuth?: HttpAuthService;
|
||||
locationTemplate?: string;
|
||||
|
||||
Reference in New Issue
Block a user