XpmContext interface
Provides the execution context for xpm operations.
Signature
export interface XpmContext
Remarks
The context object serves as the central coordination point for all xpm operations, providing access to logging, configuration, and extensible state.
Context flow:
- Created at the start of each xpm command execution.
- Initialized with logger instance and configuration options.
- Passed to all library functions and classes that perform xpm operations.
- Extended with additional properties as needed by specific operations (e.g., package paths, temporary directories, cache state).
Core responsibilities:
- Logging: Provides consistent output and diagnostics through the logger instance, enabling verbosity control and structured output.
- Configuration: Makes operational flags and user preferences accessible to all components.
- State sharing: The extensible design allows operations to attach computed values or state that should be available to subsequent operations within the same execution.
The context pattern enables dependency injection, making the code more testable and allowing operations to access shared resources without global state.
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
The xpm configuration options. | |||
|
Logger |
The logger instance for output and diagnostics. |
Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.