@@ -45,13 +45,13 @@ const argv = yargs(hideBin(process.argv))
4545 } )
4646 . option ( 'timeout' , {
4747 alias : 't' ,
48- describe : 'timeout for graph run in ms' ,
48+ describe : 'timeout for flow run in ms' ,
4949 demandOption : false ,
5050 type : 'number' ,
5151 } )
5252 . option ( 'scan' , {
5353 alias : 's' ,
54- describe : 'generate and upload build scan' ,
54+ describe : 'generate and upload flow scan' ,
5555 } ) ;
5656 } ,
5757 async ( argv ) => {
@@ -78,8 +78,8 @@ const argv = yargs(hideBin(process.argv))
7878 argv . env ? getEnvVariables ( argv . env ) : { } ,
7979 logger ,
8080 ) ;
81- console . log ( chalk . yellow ( 'Running Graph \n' ) ) ;
82- if ( flowData . nodes . find ( ( n ) => n . type === 'complexNode ' ) ) {
81+ console . log ( chalk . yellow ( 'Running Flow \n' ) ) ;
82+ if ( flowData . nodes . find ( ( n ) => n . type === 'flowNode ' ) ) {
8383 console . log (
8484 chalk . blue (
8585 '[Note] This flow contains nested flows so run it from parent directory of collection. Ignore if already doing that. \n' ,
@@ -89,9 +89,9 @@ const argv = yargs(hideBin(process.argv))
8989 const result = await g . run ( ) ;
9090 console . log ( '\n' ) ;
9191 if ( result . status === 'Success' ) {
92- console . log ( chalk . bold ( 'Graph Run: ' ) + chalk . green ( ` ✓ ` ) + chalk . dim ( result . status ) ) ;
92+ console . log ( chalk . bold ( 'Flow Run: ' ) + chalk . green ( ` ✓ ` ) + chalk . dim ( result . status ) ) ;
9393 } else {
94- console . log ( chalk . bold ( 'Graph Run: ' ) + chalk . red ( ` ✕ ` ) + chalk . dim ( result . status ) ) ;
94+ console . log ( chalk . bold ( 'Flow Run: ' ) + chalk . red ( ` ✕ ` ) + chalk . dim ( result . status ) ) ;
9595 }
9696 logger . add ( LogLevel . INFO , `Total time: ${ Date . now ( ) - startTime } ms` ) ;
9797 console . log ( chalk . bold ( 'Total Time: ' ) + chalk . dim ( `${ Date . now ( ) - startTime } ms` ) ) ;
@@ -108,18 +108,18 @@ const argv = yargs(hideBin(process.argv))
108108 '/upload' ,
109109 bytesToBase64 ( new TextEncoder ( ) . encode ( JSON . stringify ( data ) ) ) ,
110110 ) ;
111- console . log ( chalk . bold ( 'Build Scan: ' ) + chalk . dim ( `${ baseUrl } /scan/${ response . data . data [ 0 ] . id } ` ) ) ;
111+ console . log ( chalk . bold ( 'Flow Scan: ' ) + chalk . dim ( `${ baseUrl } /scan/${ response . data . data [ 0 ] . id } ` ) ) ;
112112 } catch ( error ) {
113113 if ( error ?. response ) {
114- if ( error . response ?. status === 403 || error . response ?. status === 429 ) {
114+ if ( error . response ?. status >= 400 && error . response ?. status < 500 ) {
115115 console . log ( chalk . red ( ` ${ JSON . stringify ( error . response ?. data ) } ` ) ) ;
116116 }
117117
118118 if ( error . response ?. status === 500 ) {
119119 console . log ( chalk . red ( ' Internal Server Error' ) ) ;
120120 }
121121 }
122- console . log ( chalk . red ( ` ✕ ` ) + chalk . dim ( 'Unable to upload build scan' ) ) ;
122+ console . log ( chalk . red ( ` ✕ ` ) + chalk . dim ( 'Unable to upload flow scan' ) ) ;
123123 }
124124 }
125125
0 commit comments