Allow Replacement Of BuiltinKindsEntityProcessor

Signed-off-by: Jacob Bolda <me@jacobbolda.com>
This commit is contained in:
Jacob Bolda
2023-03-21 16:32:35 -05:00
parent c3330f909e
commit c4b846359c
3 changed files with 18 additions and 2 deletions
@@ -599,16 +599,26 @@ export class CatalogBuilder {
...this.placeholderResolvers,
};
// These are always there no matter what
// The placeholder is always there no matter what
const processors: CatalogProcessor[] = [
new PlaceholderProcessor({
resolvers: placeholderResolvers,
reader,
integrations,
}),
new BuiltinKindsEntityProcessor(),
];
// If the user adds a processor named 'BuiltinKindsEntityProcessor',
// skip inclusion of the catalog-backend version.
if (
!this.processors.find(
processor =>
processor.getProcessorName() === 'BuiltinKindsEntityProcessor',
)
) {
processors.push(new BuiltinKindsEntityProcessor());
}
// These are only added unless the user replaced them all
if (!this.processorsReplace) {
processors.push(...this.getDefaultProcessors());