XpmBuildConfiguration._substituteInherits() method
Performs selective substitution on the inherits field only.
Signature
protected _substituteInherits(): Promise<JsonBuildConfigurationContent>;
Returns
Promise<JsonBuildConfigurationContent>
A promise that resolves to the build configuration content with the inherits field substituted.
Exceptions
XpmError If Liquid template substitution fails on the inherits field.
Remarks
This method is invoked during initialisation for regular (non-template) configurations to substitute template variables in the inheritance specification whilst leaving other fields untouched until later processing.
Processing steps:
- Extract the
inherits(or deprecatedinherit) field from the configuration. - Stringify the inherits field and check for template syntax (
{{or{%). - If templates are found:
- Perform Liquid substitutions with current variable context.
- Parse the substituted JSON string back into an object.
- Return a new configuration object with the substituted inherits field and all other fields unchanged.
- If no templates are found, return the original configuration as-is.
This selective approach is more efficient than full JSON substitution for regular configurations that do not have matrix parameters. The remaining fields (properties, dependencies, actions) are processed during inheritance resolution and dependency substitution phases.
Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.