Skip to content

Commit 91121c4

Browse files
Added new function to get license info is standalone is enabled
1 parent 5ee57aa commit 91121c4

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/main/wrapper/CxConstants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ export enum CxConstants {
116116
CMD_LEARN_MORE = "learn-more",
117117
IDE_SCANS_KEY = "scan.config.plugins.ideScans",
118118
AI_GUIDED_REMEDIATION_KEY = "scan.config.plugins.aiGuidedRemediation",
119+
STANDALONE_KEY = "scan.config.plugins.standalone",
119120
AI_MCP_SERVER_KEY = "scan.config.plugins.aiMcpServer",
120121
TELEMETRY = "telemetry",
121122
SUB_CMD_TELEMETRY_AI = "ai",

src/main/wrapper/CxWrapper.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,16 @@ export class CxWrapper {
466466
return value?.toLowerCase() === "true";
467467
}
468468

469+
async standaloneEnabled(): Promise<boolean> {
470+
const commands: string[] = [CxConstants.CMD_UTILS, CxConstants.SUB_CMD_TENANT];
471+
commands.push(...this.initializeCommands(false));
472+
473+
const exec = new ExecutionService();
474+
const output = await exec.executeMapTenantOutputCommands(this.config.pathToExecutable, commands);
475+
476+
const value = getTrimmedMapValue(output, CxConstants.STANDALONE_KEY);
477+
return value?.toLowerCase() === "true";
478+
}
469479

470480
async aiMcpServerEnabled(): Promise<boolean> {
471481
const commands: string[] = [CxConstants.CMD_UTILS, CxConstants.SUB_CMD_TENANT];

0 commit comments

Comments
 (0)