Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/rush-lib > IOperationRunnerContext

IOperationRunnerContext interface

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Information passed to the executing IOperationRunner

Signature:

export interface IOperationRunnerContext 

Properties

Property

Modifiers

Type

Description

collatedWriter

CollatedWriter

(BETA) The writer into which this IOperationRunner should write its logs.

debugMode

boolean

(BETA) If Rush was invoked with --debug

environment

IEnvironment | undefined

(BETA) The environment in which the operation is being executed. A return value of undefined indicates that it should inherit the environment from the parent process.

error?

Error

(BETA) (Optional) Error which occurred while executing this operation, this is stored in case we need it later (for example to re-print errors at end of execution).

quietMode

boolean

(BETA) Defaults to true. Will be false if Rush was invoked with --verbose.

status

OperationStatus

(BETA) The current execution status of an operation. Operations start in the 'ready' state, but can be 'blocked' if an upstream operation failed. It is 'executing' when the operation is executing. Once execution is complete, it is either 'success' or 'failure'.

stopwatch

IStopwatchResult

(BETA) Object used to track elapsed time.

Methods

Method

Description

runWithTerminalAsync(callback, options)

(BETA) Invokes the specified callback with a terminal that is associated with this operation.

Will write to a log file corresponding to the phase and project, and clean it up upon completion.