Skip to main content

XpmLiquidSubstitutionsVariables interface

Defines the substitution variables available to Liquid templates.

Signature

export interface XpmLiquidSubstitutionsVariables

Remarks

This interface mirrors a subset of Node.js environment, operating system, and path information, along with package-specific configuration values.

Variable hierarchy and scoping:

  1. Base variables (env, os, path): Available globally, initialized once from Node.js runtime at startup.
  2. Package variables: Added when processing package.json, contains package metadata accessible via package.name, package.version, etc.
  3. Properties: User-defined values from xpack.properties, accessible via properties.key.
  4. Configuration: Build configuration metadata, available when processing configuration-specific templates via configuration.name, etc.
  5. Matrix: Template expansion parameters, scoped to individual expanded instances, accessible via matrix.key.

Variables are inherited and extended through the hierarchy:

  • package actions use package properties
  • configuration actions use:
    • package actions
    • actions inherited from parent configurations, recursively, in order of inheritance
    • configuration properties

This ensures templates have access to appropriate context without exposing unrelated data.

Properties

Property

Modifiers

Type

Description

configuration?

{ name: string; [key: string]: any; }

(Optional) The build configuration exposed to Liquid templates.

env

NodeJS.ProcessEnv

Process environment variables from the current execution context.

matrix?

XpmLiquidSubstitutionsStrings

(Optional) Optional matrix parameters used for template expansion.

os

{ EOL: string; arch: string; constants: { signals: Record<string, number>; errno: Record<string, number>; }; cpus: os.CpuInfo[]; endianness: 'BE' | 'LE'; homedir: string; hostname: string; platform: NodeJS.Platform; release: string; tmpdir: string; type: string; version: string; }

Operating system information from Node.js os module.

package?

any

(Optional) The package metadata exposed to Liquid templates.

path

{ delimiter: string; sep: string; win32: { delimiter: string; sep: string; }; posix: { delimiter: string; sep: string; }; }

Path separators and delimiters from Node.js path module.

properties

XpmLiquidSubstitutionsStrings

The properties map used for substitutions.


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