refactor(@angular-devkit/architect-cli): remove rxjs as a dependency

`rxjs` was only a dependency for the `tap` operator which can be replaced
by accessing the result object returned from awaiting the builder output
`Observable` which is already converted to a Promise.
This commit is contained in:
Charles Lyding 2022-07-18 11:52:35 -04:00 committed by Charles
parent b2513e5af2
commit 17a91a058f
3 changed files with 11 additions and 19 deletions

View File

@ -24,7 +24,6 @@ ts_library(
"@npm//@types/progress",
"@npm//@types/yargs-parser",
"@npm//ansi-colors",
"@npm//rxjs",
],
)

View File

@ -14,7 +14,6 @@ import { NodeJsSyncHost, createConsoleLogger } from '@angular-devkit/core/node';
import * as ansiColors from 'ansi-colors';
import { existsSync } from 'fs';
import * as path from 'path';
import { tap } from 'rxjs/operators';
import yargsParser, { camelCase, decamelize } from 'yargs-parser';
import { MultiProgressBar } from '../src/progress';
@ -151,9 +150,7 @@ async function _executeTarget(
// Wait for full completion of the builder.
try {
const { success } = await run.output
.pipe(
tap((result) => {
const result = await run.output.toPromise();
if (result.success) {
parentLogger.info(colors.green('SUCCESS'));
} else {
@ -164,14 +161,11 @@ async function _executeTarget(
parentLogger.info('\nLogs:');
logs.forEach((l) => parentLogger.next(l));
logs.splice(0);
}),
)
.toPromise();
await run.stop();
bars.terminate();
return success ? 0 : 1;
return result.success ? 0 : 1;
} catch (err) {
parentLogger.info(colors.red('ERROR'));
parentLogger.info('\nLogs:');

View File

@ -18,7 +18,6 @@
"@angular-devkit/core": "0.0.0-PLACEHOLDER",
"ansi-colors": "4.1.3",
"progress": "2.0.3",
"rxjs": "6.6.7",
"symbol-observable": "4.0.0",
"yargs-parser": "21.0.1"
},