diff --git a/.changeset/twelve-spoons-feel.md b/.changeset/twelve-spoons-feel.md new file mode 100644 index 0000000000..c9e41a81c3 --- /dev/null +++ b/.changeset/twelve-spoons-feel.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-catalog-backend': minar +'@backstage/plugin-catalog-node': minar +--- + +Enable YAML merge keys in yamlPlaceholderResolver diff --git a/plugins/catalog-node/report.api.md b/plugins/catalog-node/report.api.md index 9a9f91865c..d544bc6757 100644 --- a/plugins/catalog-node/report.api.md +++ b/plugins/catalog-node/report.api.md @@ -313,8 +313,15 @@ export function locationSpecToMetadataName(location: LocationSpec_2): string; export function parseEntityYaml( data: string | Buffer, location: LocationSpec_2, + options?: ParseEntityYamlOptions, ): Iterable; +// @public +export interface ParseEntityYamlOptions { + // (undocumented) + enableYamlMerge?: boolean; +} + // @public (undocumented) export type PlaceholderResolver = ( params: PlaceholderResolverParams, diff --git a/plugins/catalog-node/src/processing/index.ts b/plugins/catalog-node/src/processing/index.ts index 1610e0cb89..00c2551a60 100644 --- a/plugins/catalog-node/src/processing/index.ts +++ b/plugins/catalog-node/src/processing/index.ts @@ -24,4 +24,4 @@ export type { LocationAnalyzer, ScmLocationAnalyzer, } from './types'; -export { parseEntityYaml } from './parse'; +export { parseEntityYaml, type ParseEntityYamlOptions } from './parse'; diff --git a/plugins/catalog-node/src/processing/parse.ts b/plugins/catalog-node/src/processing/parse.ts index 4647dc8afc..5612ef991a 100644 --- a/plugins/catalog-node/src/processing/parse.ts +++ b/plugins/catalog-node/src/processing/parse.ts @@ -21,6 +21,11 @@ import { LocationSpec } from '@backstage/plugin-catalog-common'; import { CatalogProcessorResult } from '../api/processor'; import { processingResult } from '../api/processingResult'; +/** + * Options for parsing entity YAML files. + * + * @public + */ export interface ParseEntityYamlOptions { enableYamlMerge?: boolean; }