xpm-lib package
A Node.js TypeScript module with the core code for xpm and xpm enabled projects.
Remarks
This library groups together various classes and functions used in common by xpm and the Visual Studio Code extension.
The main functionality is to manage actions and build configurations, especially those defined using Liquid templates.
The Lazy Evaluation Mechanism
Actions (XpmActions) and build configurations (XpmBuildConfigurations) implement a two-step lazy evaluation process to avoid unnecessary operations:
- Name Expansion: During collection initialisation, only the matrix of options is evaluated for each template, expanding template names into concrete action or configuration names without processing their content.
- Content Evaluation: Later, when an action or build configuration is actually accessed and initialised (via
XpmAction.initialise()orXpmBuildConfiguration.initialise()), the template is fully evaluated and Liquid substitutions are performed.
This approach ensures that only items that are actually used incur the cost of template evaluation and variable substitution, significantly improving performance for projects with many actions or configurations.
Classes
|
Class |
Description |
|---|---|
|
An individual xpm action containing commands to be executed. | |
|
A collection of xpm actions for a build configuration or the entire package. | |
|
An individual xpm build configuration. | |
|
A collection of xpm build configurations. | |
|
Represents a lazy-loading data model for an xpm package. | |
|
Base class for xpm-related errors. | |
|
Error indicating that user input is invalid. | |
|
Liquid engine configured for xpm templates. | |
|
Liquid drop that resolves | |
|
Liquid drop that resolves | |
|
Error indicating a failure during output generation. | |
|
Provides access to package metadata and xpm-specific validation. | |
|
Computes feature policy flags based on a minimum xpm version. | |
|
Error indicating that required prerequisites are not met. | |
|
Error indicating a syntax error in configuration or template files. |
Abstract Classes
|
Abstract Class |
Description |
|---|---|
|
Base class for xpm initialisation templates. |
Functions
|
Function |
Description |
|---|---|
|
Recursively changes file permissions within a folder tree. | |
|
Replaces non-alphanumeric characters with dashes to make paths comply with file system names. | |
|
Replaces non-alphanumeric characters with dashes to make paths comply with POSIX file system names. | |
|
Replaces non-alphanumeric characters with dashes to make paths comply with Windows file system names. | |
|
Extracts an error message string from an unknown error value. | |
|
Builds a unique key using the current platform and architecture. | |
|
Determines whether a value is a boolean. | |
|
Determines whether a value is a JSON array. | |
|
Determines whether a value is a JSON object. | |
|
Determines whether a value is a non-empty JSON object. | |
|
Determines whether a value is a finite number. | |
|
Determines whether a value is a non-array object. | |
|
Determines whether a value is a JavaScript primitive. | |
|
Determines whether a value is a string. | |
|
performSubstitutions({ log, engine, input, substitutionsVariables, }) |
Performs substitutions on an input string using Liquid. |
Interfaces
|
Interface |
Description |
|---|---|
|
Represents a JSON template action with a matrix for expansion. | |
|
Represents a JSON build configuration definition. | |
|
Represents a JSON template build configuration with matrix expansion. | |
|
Represents a JSON extended dependency definition. | |
|
Represents a JSON npm | |
|
Represents a JSON npm package specifier. | |
|
Represents a JSON xpm-specific section in | |
|
Represents a JSON binaries definition in | |
|
Represents a JSON xpm | |
|
Represents a JSON platform-specific binary file definition. | |
|
Defines the xpm configuration options. | |
|
Provides the execution context for xpm operations. | |
|
Defines an | |
|
Defines an | |
|
Defines the substitution variables used by | |
|
Defines the substitution variables available to Liquid templates. |
Variables
|
Variable |
Description |
|---|---|
|
The property name used for the build folder relative path. | |
|
The base substitution variables initialised from the current environment. |
Type Aliases
|
Type Alias |
Description |
|---|---|
|
Represents a JSON action definition or a template of one. | |
|
Represents a JSON action content as a string or string array. | |
|
Represents a JSON map of action definitions. | |
|
Represents a JSON build configuration definition or a template of one. | |
|
Represents a JSON array of build configuration names to inherit from. | |
|
Represents a JSON map of build configuration definitions. | |
|
Represents a JSON map of dependencies. | |
|
Represents a JSON dependency content as a string or extended definition. | |
|
Represents a JSON map of properties. | |
|
Represents a JSON property value. | |
|
Represents a JSON map of npm scripts. | |
|
Represents a JSON map of binaries platforms. | |
|
Represents a list of action command strings. | |
|
Represents the available items for a | |
|
Represents the supported platform identifiers for | |
|
Represents a map of | |
|
Represents the supported property types for | |
|
Represents a map of substitution values used by Liquid templates. |
Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.