Skip to main content

XpmAction class

An individual xpm action containing commands to be executed.

Signature

export declare class XpmAction

Remarks

Actions are lazily initialised, with variable substitution performed only when the action is first retrieved and initialised. This allows for efficient handling of large numbers of actions generated from templates.

An action can exist in three states:

  1. Undefined: Name is known but instance not yet created.
  2. Instantiated: Object exists but commands not yet evaluated.
  3. Initialised: Commands fully evaluated with Liquid substitutions.

This design minimizes memory usage and computation for actions that are defined but never executed, which is common when using matrix templates to generate platform-specific or configuration-specific actions.

Constructors

Constructor

Modifiers

Description

(constructor)({ actionName, jsonAction, parentActions, matrixParameters, })

Constructs an action instance.

Properties

Property

Modifiers

Type

Description

_commands?

protected

string[]

(Optional) The array of command strings after variable substitution.

_isInitialised

protected

boolean

Flag indicating whether the action has been initialised.

_matrixParameters?

protected

readonly

XpmLiquidSubstitutionsStrings

(Optional) The matrix parameter values for template-generated actions.

actionName

readonly

string

The name of the action.

commands

readonly

string[]

Retrieves the array of command strings for this action.

jsonAction

readonly

JsonActionContent

The JSON definition of the action commands.

parentActions

readonly

XpmActions

The parent actions collection this action belongs to.

Methods

Method

Modifiers

Description

initialise()

Completes the async initialisation of the action.


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