Skip to content

Commit c1e7ef7

Browse files
committed
fixup: builders
1 parent 3b668c9 commit c1e7ef7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/angular_devkit/architect/builders/all-of.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
*/
88
import { json } from '@angular-devkit/core';
99
import { EMPTY, from, of } from 'rxjs';
10-
import { map, mergeMap, tap } from 'rxjs/operators';
10+
import { map, mergeMap } from 'rxjs/operators';
1111
import { BuilderOutput, BuilderRun, createBuilder } from '../src/index2';
1212
import { Schema as OperatorSchema } from './operator-schema';
1313

1414
export default createBuilder<json.JsonObject & OperatorSchema>((options, context) => {
1515
const allRuns: Promise<[number, BuilderRun]>[] = [];
1616

17-
context.progress(0,
17+
context.reportProgress(0,
1818
(options.targets ? options.targets.length : 0)
1919
+ (options.builders ? options.builders.length : 0),
2020
);
@@ -37,14 +37,14 @@ export default createBuilder<json.JsonObject & OperatorSchema>((options, context
3737

3838
const allResults: (BuilderOutput | null)[] = allRuns.map(() => null);
3939
let n = 0;
40-
context.progress(n++, allRuns.length);
40+
context.reportProgress(n++, allRuns.length);
4141

4242
return from(allRuns).pipe(
4343
mergeMap(runPromise => from(runPromise)),
4444
mergeMap(([i, run]: [number, BuilderRun]) => run.output.pipe(map(output => [i, output]))),
4545
mergeMap<[number, BuilderOutput], BuilderOutput>(([i, output]) => {
4646
allResults[i] = output;
47-
context.progress(n++, allRuns.length);
47+
context.reportProgress(n++, allRuns.length);
4848

4949
if (allResults.some(x => x === null)) {
5050
// Some builders aren't done running yet.

packages/angular_devkit/architect/builders/concat.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { Schema as OperatorSchema } from './operator-schema';
1414
export default createBuilder<json.JsonObject & OperatorSchema>((options, context) => {
1515
const allRuns: (() => Promise<BuilderRun>)[] = [];
1616

17-
context.progress(0,
17+
context.reportProgress(0,
1818
(options.targets ? options.targets.length : 0)
1919
+ (options.builders ? options.builders.length : 0),
2020
);
@@ -35,14 +35,14 @@ export default createBuilder<json.JsonObject & OperatorSchema>((options, context
3535

3636
let stop: BuilderOutput | null = null;
3737
let i = 0;
38-
context.progress(i++, allRuns.length);
38+
context.reportProgress(i++, allRuns.length);
3939

4040
return from(allRuns).pipe(
4141
concatMap(fn => stop ? of(null) : from(fn()).pipe(
4242
switchMap(run => run === null ? of(null) : run.output.pipe(first())),
4343
)),
4444
map(output => {
45-
context.progress(i++, allRuns.length);
45+
context.reportProgress(i++, allRuns.length);
4646
if (output === null || stop !== null) {
4747
return stop || { success: false };
4848
} else if (output.success === false) {

0 commit comments

Comments
 (0)