Add ability replace the built in entity processors
Signed-off-by: Brian Fletcher <brian@roadie.io>
This commit is contained in:
Vendored
+9
@@ -148,6 +148,15 @@ export interface Config {
|
||||
*/
|
||||
disableRelationsCompatibility?: boolean;
|
||||
|
||||
/**
|
||||
* Disables the default backstage processors.
|
||||
*
|
||||
* Enabling this option allows more complete control of which processors are included
|
||||
* in the backstage processing loop.
|
||||
*
|
||||
*/
|
||||
disableDefaultProcessors?: boolean;
|
||||
|
||||
/**
|
||||
* The strategy to use for entities that are orphaned, i.e. no longer have
|
||||
* any other entities or providers referencing them. The default value is
|
||||
|
||||
@@ -736,8 +736,14 @@ export class CatalogBuilder {
|
||||
processors.push(builtinKindsEntityProcessor);
|
||||
}
|
||||
|
||||
// These are only added unless the user replaced them all
|
||||
if (!this.processorsReplace) {
|
||||
const disableDefaultProcessors = config.getOptionalBoolean(
|
||||
'catalog.disableDefaultProcessors',
|
||||
);
|
||||
|
||||
// Add default processors if:
|
||||
// - processors have NOT been explicitly replaced
|
||||
// - and default processors are NOT disabled via config
|
||||
if (!this.processorsReplace && !disableDefaultProcessors) {
|
||||
processors.push(...this.getDefaultProcessors());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user