@@ -60,12 +60,12 @@ export async function checkBuildConditions(opts: BuildOptions): Promise<void> {
6060 // due to tree shaking.
6161 const { NodeJsAsyncHost } : typeof import ( "@angular-devkit/core/node" ) = await import (
6262 require . resolve ( "@angular-devkit/core/node" , {
63- paths : [ process . cwd ( ) , angularCorePath ] ,
63+ paths : [ process . cwd ( ) , angularCorePath ] ,
6464 } )
6565 ) ;
6666 const { workspaces } : typeof import ( "@angular-devkit/core" ) = await import (
6767 require . resolve ( "@angular-devkit/core" , {
68- paths : [ process . cwd ( ) , angularCorePath ] ,
68+ paths : [ process . cwd ( ) , angularCorePath ] ,
6969 } )
7070 ) ;
7171 const host = workspaces . createWorkspaceHost ( new NodeJsAsyncHost ( ) ) ;
@@ -76,7 +76,8 @@ export async function checkBuildConditions(opts: BuildOptions): Promise<void> {
7676 if ( value . extensions . projectType === "application" ) apps . push ( key ) ;
7777 } ) ;
7878 const project = apps [ 0 ] ;
79- if ( apps . length > 1 || ! project ) throw new Error ( "Unable to determine the application to deploy" ) ;
79+ if ( apps . length > 1 || ! project ) throw new Error (
80+ "Unable to determine the application to deploy" ) ;
8081
8182 const workspaceProject = workspace . projects . get ( project ) ;
8283 if ( ! workspaceProject ) throw new Error ( `No project ${ project } found.` ) ;
@@ -87,22 +88,22 @@ export async function checkBuildConditions(opts: BuildOptions): Promise<void> {
8788 const { builder } = workspaceProject . targets . get ( target ) ! ;
8889 angularBuilder = builder ;
8990 } catch ( error ) {
90-
9191 logger . warn ( "failed to determine angular builder from the workspace api: " , error ) ;
9292 try {
9393 const root = process . cwd ( ) ;
94- const angularJSON = JSON . parse ( ( readFileSync ( join ( root , "angular.json" ) ) ) . toString ( ) ) ;
94+ const angularJSON = JSON . parse ( readFileSync ( join ( root , "angular.json" ) ) ) . toString ( ) ;
9595 const apps : string [ ] = [ ] ;
96- Object . keys ( angularJSON . projects ) . forEach ( projectName => {
97- const project = angularJSON . projects [ projectName ] ;
98- if ( project [ "projectType" ] === "application" ) apps . push ( projectName ) ;
96+ Object . keys ( angularJSON . projects ) . forEach ( ( projectName ) => {
97+ const project = angularJSON . projects [ projectName ] ;
98+ if ( project [ "projectType" ] === "application" ) apps . push ( projectName ) ;
9999 } ) ;
100100 const project = apps [ 0 ] ;
101- if ( apps . length > 1 || ! project ) throw new Error ( "Unable to determine the application to deploy" ) ;
101+ if ( apps . length > 1 || ! project ) throw new Error (
102+ "Unable to determine the application to deploy" ) ;
102103 angularBuilder = angularJSON . projects [ project ] . architect . build . builder ;
103104 } catch ( error ) {
104105 logger . warn ( "failed to determine angular builder from parsing angular.json: " , error ) ;
105- } ;
106+ }
106107 } ;
107108
108109 if ( angularBuilder !== "" ) {
0 commit comments