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:
- Base variables (
env,os,path): Available globally, initialized once from Node.js runtime at startup. - Package variables: Added when processing
package.json, contains package metadata accessible viapackage.name,package.version, etc. - Properties: User-defined values from
xpack.properties, accessible viaproperties.key. - Configuration: Build configuration metadata, available when processing configuration-specific templates via
configuration.name, etc. - 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 |
|---|---|---|---|
|
{ name: string; [key: string]: any; } |
(Optional) The build configuration exposed to Liquid templates. | ||
|
NodeJS.ProcessEnv |
Process environment variables from the current execution context. | ||
|
(Optional) Optional matrix parameters used for template expansion. | |||
|
{ 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. | ||
|
any |
(Optional) The package metadata exposed to Liquid templates. | ||
|
{ delimiter: string; sep: string; win32: { delimiter: string; sep: string; }; posix: { delimiter: string; sep: string; }; } |
Path separators and delimiters from Node.js path module. | ||
|
The properties map used for substitutions. |
Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.