7
7
*/
8
8
import { json } from '@angular-devkit/core' ;
9
9
import { EMPTY , from , of } from 'rxjs' ;
10
- import { map , mergeMap , tap } from 'rxjs/operators' ;
10
+ import { map , mergeMap } from 'rxjs/operators' ;
11
11
import { BuilderOutput , BuilderRun , createBuilder } from '../src/index2' ;
12
12
import { Schema as OperatorSchema } from './operator-schema' ;
13
13
14
14
export default createBuilder < json . JsonObject & OperatorSchema > ( ( options , context ) => {
15
15
const allRuns : Promise < [ number , BuilderRun ] > [ ] = [ ] ;
16
16
17
- context . progress ( 0 ,
17
+ context . reportProgress ( 0 ,
18
18
( options . targets ? options . targets . length : 0 )
19
19
+ ( options . builders ? options . builders . length : 0 ) ,
20
20
) ;
@@ -37,14 +37,14 @@ export default createBuilder<json.JsonObject & OperatorSchema>((options, context
37
37
38
38
const allResults : ( BuilderOutput | null ) [ ] = allRuns . map ( ( ) => null ) ;
39
39
let n = 0 ;
40
- context . progress ( n ++ , allRuns . length ) ;
40
+ context . reportProgress ( n ++ , allRuns . length ) ;
41
41
42
42
return from ( allRuns ) . pipe (
43
43
mergeMap ( runPromise => from ( runPromise ) ) ,
44
44
mergeMap ( ( [ i , run ] : [ number , BuilderRun ] ) => run . output . pipe ( map ( output => [ i , output ] ) ) ) ,
45
45
mergeMap < [ number , BuilderOutput ] , BuilderOutput > ( ( [ i , output ] ) => {
46
46
allResults [ i ] = output ;
47
- context . progress ( n ++ , allRuns . length ) ;
47
+ context . reportProgress ( n ++ , allRuns . length ) ;
48
48
49
49
if ( allResults . some ( x => x === null ) ) {
50
50
// Some builders aren't done running yet.
0 commit comments