Skip to main content

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:

  1. Create XpmLiquidEngine with custom filters and strict configuration.
  2. Validate xpack section exists in package.json.
  3. Initialize base substitution variables (os, platform, arch, etc.).
  4. Add package metadata to substitution context.
  5. Merge xpack.properties if defined, allowing user-defined variables.
  6. Seal substitution variables to prevent accidental modification.
  7. Create package-level actions collection (initially empty, populated during initialisation).
  8. 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.