@@ -17,13 +17,13 @@ export class CxWrapper {
1717 constructor ( cxScanConfig : CxConfig , logFilePath ?: string ) {
1818
1919 getLoggerWithFilePath ( logFilePath )
20-
21- if ( cxScanConfig . clientId && cxScanConfig . clientSecret ) {
20+ if ( cxScanConfig . apiKey ) {
21+ this . config . apiKey = cxScanConfig . apiKey ;
22+ }
23+ else if ( cxScanConfig . clientId && cxScanConfig . clientSecret ) {
2224 logger . info ( "Received clientId and clientSecret" ) ;
2325 this . config . clientId = cxScanConfig . clientId ;
2426 this . config . clientSecret = cxScanConfig . clientSecret ;
25- } else if ( cxScanConfig . apiKey ) {
26- this . config . apiKey = cxScanConfig . apiKey ;
2727 } else {
2828 logger . info ( "Did not receive ClientId/Secret or ApiKey from cli arguments" ) ;
2929 }
@@ -51,6 +51,9 @@ export class CxWrapper {
5151 if ( cxScanConfig . tenant ) {
5252 this . config . tenant = cxScanConfig . tenant ;
5353 }
54+ if ( cxScanConfig . additionalParameters ) {
55+ this . config . additionalParameters = cxScanConfig . additionalParameters ;
56+ }
5457 }
5558
5659 initializeCommands ( formatRequired : boolean ) : string [ ] {
@@ -79,6 +82,12 @@ export class CxWrapper {
7982 list . push ( CxConstants . TENANT ) ;
8083 list . push ( this . config . tenant ) ;
8184 }
85+ if ( this . config . additionalParameters ) {
86+ // this.config.additionalParameters.forEach(function (param){
87+ // list.push(param)
88+ // })
89+ list . push ( this . config . additionalParameters )
90+ }
8291 if ( formatRequired ) {
8392 list . push ( CxConstants . FORMAT ) ;
8493 list . push ( CxConstants . FORMAT_JSON ) ;
@@ -275,6 +284,14 @@ export class CxWrapper {
275284 return exec . executeCommands ( this . config . pathToExecutable , commands ) ;
276285 }
277286
287+ async ideScansEnabled ( ) : Promise < boolean > {
288+ const commands : string [ ] = [ CxConstants . CMD_UTILS , CxConstants . SUB_CMD_TENANT ] ;
289+ commands . push ( ...this . initializeCommands ( false ) ) ;
290+ const exec = new ExecutionService ( ) ;
291+ const output = await exec . executeMapTenantOutputCommands ( this . config . pathToExecutable , commands ) ;
292+ return output . has ( CxConstants . IDE_SCANS_KEY ) && output . get ( CxConstants . IDE_SCANS_KEY ) . toLowerCase ( ) === " true" ;
293+ }
294+
278295
279296 getIndexOfBflNode ( bflNodes : CxBFL [ ] , resultNodes : any [ ] ) : number {
280297
0 commit comments