Add ability replace the built in entity processors

Signed-off-by: Brian Fletcher <brian@roadie.io>
This commit is contained in:
Brian Fletcher
2025-04-03 19:51:39 +01:00
parent 2c5efa9555
commit 9a7570c5bd
2 changed files with 17 additions and 2 deletions
+9
View File
@@ -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());
}