XpmDataModel.(constructor)
Constructs a Liquid package processor.
Signature
constructor({ log, jsonPackage, }: {
log: Logger;
jsonPackage: JsonXpmPackage;
});
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
{ log, jsonPackage, } |
{ log: Logger; jsonPackage: JsonXpmPackage; } |
Remarks
The constructor initializes the Liquid engine and prepares the substitution variables context that will be inherited by all actions and build configurations.
Initialization sequence:
- Create
XpmLiquidEnginewith custom filters and strict configuration. - Validate
xpacksection exists inpackage.json. - Initialize base substitution variables (os, platform, arch, etc.).
- Add package metadata to substitution context.
- Merge
xpack.propertiesif defined, allowing user-defined variables. - Seal substitution variables to prevent accidental modification.
- Create package-level actions collection (initially empty, populated during initialisation).
- Create build configurations collection (initially empty, populated during initialisation).
The substitution variables object is sealed to ensure immutability of the base context. Individual actions and configurations will extend this context with their own scoped variables without modifying the original.
Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.