-
Notifications
You must be signed in to change notification settings - Fork 0
JS Wrapper | Remove CLI from the wrapper and download from S3 (AST-64803) #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/main/wrapper/CxWrapper.ts
Outdated
@@ -56,7 +44,10 @@ export class CxWrapper { | |||
} | |||
} | |||
|
|||
initializeCommands(formatRequired: boolean): string[] { | |||
async initializeCommands(formatRequired: boolean): Promise<string[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when is get to this method? in each command and each event or only one time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
logger.info("Received clientId and clientSecret"); | ||
this.config.clientId = cxScanConfig.clientId; | ||
this.config.clientSecret = cxScanConfig.clientSecret; | ||
} else { | ||
logger.info("Did not receive ClientId/Secret or ApiKey from cli arguments"); | ||
} | ||
let executablePath: string; | ||
if (cxScanConfig.pathToExecutable) { | ||
this.config.pathToExecutable = cxScanConfig.pathToExecutable; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can create a factory for the wrapper then have async method for init the wrapper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or you can create just a method in the wrapper create wrapper that will call the constructor and init the cli
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi, there are more ways to solve it, you can try to get the right solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
No description provided.