@@ -14,7 +14,8 @@ import {
1414 OperationStatus ,
1515 type ILogFilePaths ,
1616 type RushConfiguration ,
17- type IOperationExecutionManager
17+ type IOperationExecutionManager ,
18+ type IOperationExecutionIterationOptions
1819} from '@rushstack/rush-sdk' ;
1920import { type ITerminalChunk , TerminalChunkKind , TerminalWritable } from '@rushstack/terminal' ;
2021
@@ -183,7 +184,7 @@ export function tryEnableBuildStatusWebSocketServer(
183184 const { packageName } = associatedProject ;
184185 return {
185186 name,
186- runInThisPass : record . enabled ,
187+ runInThisIteration : record . enabled ,
187188 isActive : ! ! runner . isActive ,
188189 status : readableStatusFromStatus [ record . status ] ,
189190 startTime : record . stopwatch . startTime ,
@@ -242,9 +243,9 @@ export function tryEnableBuildStatusWebSocketServer(
242243 parallelism : executionManager . parallelism ,
243244 debugMode : executionManager . debugMode ,
244245 verbose : ! executionManager . quietMode ,
245- runNextPassBehavior : executionManager . runNextPassBehavior ,
246+ pauseNextIteration : executionManager . pauseNextIteration ,
246247 status : buildStatus ,
247- hasQueuedPass : executionManager . hasQueuedPass
248+ hasScheduledIteration : executionManager . hasScheduledIteration
248249 } ;
249250 }
250251
@@ -261,9 +262,9 @@ export function tryEnableBuildStatusWebSocketServer(
261262 parallelism : 1 ,
262263 debugMode : false ,
263264 verbose : true ,
264- runNextPassBehavior : 'automatic' ,
265+ pauseNextIteration : false ,
265266 status : buildStatus ,
266- hasQueuedPass : false
267+ hasScheduledIteration : false
267268 } ,
268269 lastExecutionResults : executionManager
269270 ? convertToExecutionStateArray ( executionManager . lastExecutionResults . values ( ) )
@@ -278,10 +279,13 @@ export function tryEnableBuildStatusWebSocketServer(
278279
279280 manager . addTerminalDestination ( new WebSocketTerminalWritable ( webSockets ) ) ;
280281
281- hooks . beforeExecuteOperationsAsync . tap (
282+ hooks . beforeExecuteIterationAsync . tap (
282283 PLUGIN_NAME ,
283- ( operationsToExecute : ReadonlyMap < Operation , IOperationExecutionResult > ) : void => {
284- // Clear queuedStates when the pass begins executing
284+ (
285+ operationsToExecute : ReadonlyMap < Operation , IOperationExecutionResult > ,
286+ iterationOptions : IOperationExecutionIterationOptions
287+ ) : void => {
288+ // Clear queuedStates when the iteration begins executing
285289 queuedStates = undefined ;
286290 for ( const [ operation , result ] of operationsToExecute ) {
287291 operationStates . set ( operation . name , result ) ;
@@ -296,7 +300,7 @@ export function tryEnableBuildStatusWebSocketServer(
296300 }
297301 ) ;
298302
299- hooks . afterExecuteOperationsAsync . tap (
303+ hooks . afterExecuteIterationAsync . tap (
300304 PLUGIN_NAME ,
301305 (
302306 status : OperationStatus ,
@@ -332,13 +336,13 @@ export function tryEnableBuildStatusWebSocketServer(
332336 }
333337 ) ;
334338
335- // Capture queued operations for next pass
336- hooks . onPassQueued . tap (
339+ // Capture queued operations for next iteration
340+ hooks . onIterationScheduled . tap (
337341 PLUGIN_NAME ,
338342 ( queuedMap : ReadonlyMap < Operation , IOperationExecutionResult > ) : void => {
339343 queuedStates = Array . from ( queuedMap . values ( ) ) ;
340344 const message : IWebSocketPassQueuedEventMessage = {
341- event : 'pass-queued ' ,
345+ event : 'iteration-scheduled ' ,
342346 queuedStates : convertToExecutionStateArray ( queuedStates )
343347 } ;
344348 sendWebSocketMessage ( message ) ;
@@ -441,7 +445,7 @@ export function tryEnableBuildStatusWebSocketServer(
441445 }
442446
443447 case 'abort-execution' : {
444- void executionManager ?. abortCurrentPassAsync ( ) ;
448+ void executionManager ?. abortCurrentIterationAsync ( ) ;
445449 break ;
446450 }
447451
@@ -457,8 +461,8 @@ export function tryEnableBuildStatusWebSocketServer(
457461 case 'execute' : {
458462 if ( executionManager ) {
459463 const definedExecutionManager : IOperationExecutionManager = executionManager ;
460- void definedExecutionManager . queuePassAsync ( { } ) . then ( ( ) => {
461- return definedExecutionManager . executeQueuedPassAsync ( ) ;
464+ void definedExecutionManager . scheduleIterationAsync ( { } ) . then ( ( ) => {
465+ return definedExecutionManager . executeScheduledIterationAsync ( ) ;
462466 } ) ;
463467 }
464468 break ;
@@ -474,12 +478,9 @@ export function tryEnableBuildStatusWebSocketServer(
474478 break ;
475479 }
476480
477- case 'set-run-next-pass-behavior' : {
478- if (
479- executionManager &&
480- ( parsedMessage . value === 'automatic' || parsedMessage . value === 'manual' )
481- ) {
482- executionManager . runNextPassBehavior = parsedMessage . value ;
481+ case 'set-pause-next-iteration' : {
482+ if ( executionManager && typeof parsedMessage . value === 'boolean' ) {
483+ executionManager . pauseNextIteration = parsedMessage . value ;
483484 }
484485 break ;
485486 }
0 commit comments