XpmActions class
A collection of xpm actions for a build configuration or the entire package.
Signature
export declare class XpmActions
Remarks
This class manages a collection of named actions, each containing one or more commands to be executed. Actions can belong to a package or a build configuration and support template-based definitions with matrix expansion to generate multiple actions from a single template.
The collection always exists, even as empty if no actions are defined.
Action lifecycle phases:
- Construction: Basic setup with optional inheritance from parent package.
- Initialisation: Template name expansion without content evaluation.
- Retrieval: On-demand instantiation when accessed via
get(). - Action Initialisation: Liquid template evaluation and substitution.
This multi-phase approach ensures efficient resource usage by deferring expensive operations until actions are actually needed.
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs an actions collection instance. |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
Map<string, XpmAction | undefined> |
Map of action names to their corresponding action instances. | |
|
|
string[] |
Cached array of all action names in the collection. | |
|
|
Set<string> |
Set of all action names for quick lookup. | |
|
|
boolean |
Flag indicating whether the actions collection has been initialised. | |
|
|
Map<string, string> |
Map of expanded action names to their original JSON action names. | |
|
|
XpmBuildConfiguration | undefined |
The build configuration this actions collection belongs to, if any. | |
|
|
The Liquid templating engine for variable substitution. | ||
|
|
boolean |
Indicates whether the actions collection is empty. | |
|
|
The JSON object containing action definitions from the package manifest. | ||
|
|
Logger |
The logger instance for output and diagnostics. | |
|
|
string[] |
The names of all actions in the collection. | |
|
|
number |
The number of actions in the collection. | |
|
|
The variables available for substitution in action definitions. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
_createSubstitutedAction({ actionName, jsonAction, combination, newActionsMap, }) |
|
Creates a substituted action from a template and matrix combination. |
|
|
Expands a template action into multiple concrete actions. | |
|
|
Processes a template action by expanding it and registering the generated actions. | |
|
Retrieves an action by name, creating it if not yet instantiated. | ||
|
Checks whether an action with the specified name exists. | ||
|
Completes the async initialisation of the actions collection. |
Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.