Skip to main content

XpmDataModel class

Represents a lazy-loading data model for an xpm package.

Signature

export declare class XpmDataModel

Remarks

This class prepares substitution variables, creates the Liquid engine, and exposes actions and build configurations defined in the package.

The package processor serves as the top-level coordinator for all Liquid-based template processing in an xpm package. It establishes the foundation for variable substitution throughout the package hierarchy:

  1. Initializes base substitution variables (platform detection, system information, etc.).
  2. Adds package-specific variables from package.json metadata.
  3. Merges user-defined properties from xpack.properties.
  4. Creates package-level actions accessible across all contexts.
  5. Creates build configurations, each inheriting the base substitution context and adding configuration-specific variables.

This hierarchical structure ensures that templates at any level have access to appropriate variables while maintaining clear scoping rules. Package-level actions are available globally, while configuration-level actions are scoped to their respective configurations.

Constructors

Constructor

Modifiers

Description

(constructor)({ log, jsonPackage, })

Constructs a Liquid package processor.

Properties

Property

Modifiers

Type

Description

_engine

protected

Liquid

The Liquid engine used for substitutions.

_jsonPackage

protected

JsonXpmPackage

The JSON package definition.

_log

protected

Logger

The logger instance for output and diagnostics.

actions

readonly

XpmActions

The actions collection for this package.

buildConfigurations

readonly

XpmBuildConfigurations

The build configurations collection for this package.

substitutionsVariables

readonly

XpmLiquidSubstitutionsVariables

The variables available for Liquid substitutions.


Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.