-
Notifications
You must be signed in to change notification settings - Fork 37
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
eMASS V3.9 Specification Updates #1426
Conversation
Signed-off-by: George Dias <[email protected]>
This pull request has a conflict. Could you fix it @georgedias? |
Signed-off-by: George Dias <[email protected]>
Signed-off-by: George Dias <[email protected]>
Signed-off-by: George Dias <[email protected]>
Signed-off-by: George Dias <[email protected]>
@@ -13,7 +13,7 @@ import {FlagOptions, | |||
const endpoint = 'artifacts' | |||
|
|||
export default class EmasserGetArtifacts extends Command { | |||
static usage = '<%= command.id %> [ARGUMENTS]'; | |||
static usage = '<%= command.id %> [ARGUMENT] \n \x1B[93m NOTE: see EXAMPLES for argument case format\x1B[0m'; |
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.
Which command makes this show up?
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.
bin/run emasser get artifacts -h or --help
@@ -9,7 +9,7 @@ import {outputError} from '../../../utils/emasser/outputError' | |||
import {FlagOptions, getFlagsForEndpoint} from '../../../utils/emasser/utilities' | |||
|
|||
export default class EmasserDeletePoams extends Command { | |||
static usage = '<%= command.id %> [ARGUMENTS]'; | |||
static usage = '<%= command.id %> [options]'; |
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.
What is the difference between ARGUMENTS and options?
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.
options are actually the FLAGS, I contemplated what to put there.
Should we use [flag options] or [FLAG options] or simply [flags] or just [FLAGS] - what do you think?
… – natural format Signed-off-by: George Dias <[email protected]>
Signed-off-by: George Dias <[email protected]>
this.log(this.formatCommand(command)) | ||
} | ||
|
||
this.log('') |
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.
Out of curiosity, what effect does this.log('')
have?
} | ||
|
||
protected log(...args: string[]): void { | ||
stdout.write(util.format.apply(this, args) + '\n') // skipcq: JS-0357 |
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.
Oh, does this.log('')
effectively print a newline?
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.
this.log is what is outputting to the console. I had to implement the Streams class to add the additional logModify(), where the new display values are replaced.
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
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.
LGTM
How to test
Checkout (
gh pr checkout 1426
) or clone (git clone -b emass_v3_9 [email protected]:mitre/saf.git
) the PRInstall dependencies
Build the executables
Generate the .env variables
Run the configure command to generate a .env configuration file containing the necessary environmental variables.
For additional information on how too references Generating an eMASS Configuration file
The command to invoke the configure utility from the development environment is:
You need to know the appropriate API and user key, certificates (
key.pem and cert.pem
), key cert password, dev env host url.endpoints added (to test)
Note Some endpoints don't return any data, but should return a 200 status
Test all emasser endpoints
To run all of the emasser unit tests (51) use this command: