Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/rush-lib > ICreateOperationsContext

ICreateOperationsContext interface

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

Context used for creating operations to be executed.

Signature:

export interface ICreateOperationsContext 

Properties

Property

Modifiers

Type

Description

buildCacheConfiguration

readonly

BuildCacheConfiguration | undefined

(ALPHA) The configuration for the build cache, if the feature is enabled.

changedProjectsOnly

readonly

boolean

(ALPHA) If true, for an incremental build, Rush will only include projects with immediate changes or projects with no consumers.

cobuildConfiguration

readonly

CobuildConfiguration | undefined

(ALPHA) The configuration for the cobuild, if cobuild feature and build cache feature are both enabled.

customParameters

readonly

ReadonlyMap<string, CommandLineParameter>

(ALPHA) The set of custom parameters for the executing command. Maps from the longName field in command-line.json to the parser configuration in ts-command-line.

includePhaseDeps

readonly

boolean

(ALPHA) If true, Rush will automatically include the dependent phases for the specified set of phases.

invalidateOperation?

readonly

((operation: Operation, reason: string) => void) | undefined

(ALPHA) (Optional) Marks an operation's result as invalid, potentially triggering a new build. Only applicable in watch mode.

isIncrementalBuildAllowed

readonly

boolean

(ALPHA) If true, projects may read their output from cache or be skipped if already up to date. If false, neither of the above may occur, e.g. "rush rebuild"

isInitial

readonly

boolean

(ALPHA) If true, this is the initial run of the command. If false, this execution is in response to changes.

isWatch

readonly

boolean

(ALPHA) If true, the command is running in watch mode.

parallelism

readonly

number

(ALPHA) The currently configured maximum parallelism for the command.

phaseOriginal

readonly

ReadonlySet<IPhase>

(ALPHA) The set of phases original for the current command execution.

phaseSelection

readonly

ReadonlySet<IPhase>

(ALPHA) The set of phases selected for the current command execution.

projectConfigurations

readonly

ReadonlyMap<RushConfigurationProject, RushProjectConfiguration>

(ALPHA) All successfully loaded rush-project.json data for selected projects.

projectSelection

readonly

ReadonlySet<RushConfigurationProject>

(ALPHA) The set of Rush projects selected for the current command execution.

projectsInUnknownState

readonly

ReadonlySet<RushConfigurationProject>

(ALPHA) The set of Rush projects that have not been built in the current process since they were last modified. When isInitial is true, this will be an exact match of projectSelection.

rushConfiguration

readonly

RushConfiguration

(ALPHA) The Rush configuration