@@ -9,7 +9,6 @@ import * as os from "os";
99import CxBFL from "../bfl/CxBFL" ;
1010import path = require( 'path' ) ;
1111import { getTrimmedMapValue } from "./utils" ;
12- import { JwtClaims } from "../license/JwtClaims" ;
1312
1413type ParamTypeMap = Map < CxParamType , string > ;
1514
@@ -513,6 +512,17 @@ export class CxWrapper {
513512 return value ?. toLowerCase ( ) === "true" ;
514513 }
515514
515+ async dastEnabled ( ) : Promise < boolean > {
516+ const commands : string [ ] = [ CxConstants . CMD_UTILS , CxConstants . SUB_CMD_TENANT ] ;
517+ commands . push ( ...this . initializeCommands ( false ) ) ;
518+
519+ const exec = new ExecutionService ( ) ;
520+ const output = await exec . executeMapTenantOutputCommands ( this . config . pathToExecutable , commands ) ;
521+
522+ const value = getTrimmedMapValue ( output , CxConstants . DAST_ENABLED_KEY ) ;
523+ return value ?. toLowerCase ( ) === "true" ;
524+ }
525+
516526 async aiMcpServerEnabled ( ) : Promise < boolean > {
517527 const commands : string [ ] = [ CxConstants . CMD_UTILS , CxConstants . SUB_CMD_TENANT ] ;
518528 commands . push ( ...this . initializeCommands ( false ) ) ;
@@ -652,25 +662,4 @@ export class CxWrapper {
652662 }
653663 return r ;
654664 }
655-
656- /**
657- * Gets license details from the JWT token
658- */
659- async getLicenseDetails ( ) : Promise < JwtClaims | null > {
660- const commands : string [ ] = [
661- CxConstants . CMD_UTILS ,
662- CxConstants . SUB_CMD_LICENSE ,
663- CxConstants . FORMAT ,
664- CxConstants . FORMAT_JSON
665- ] ;
666- commands . push ( ...this . initializeCommands ( false ) ) ;
667-
668- const exec = new ExecutionService ( ) ;
669- const output = await exec . executeCommands ( this . config . pathToExecutable , commands ) ;
670-
671- if ( output . exitCode === 0 && output . payload ) {
672- return JwtClaims . fromJson ( output . payload ) ;
673- }
674- return null ;
675- }
676665}
0 commit comments