@mojaloop/ml-testing-toolkit-client-lib 1.10.2 → 1.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -0
- package/package.json +1 -1
- package/{sbom-v1.10.1.csv → sbom-v1.10.2.csv} +201 -189
- package/src/client.js +1 -0
- package/src/router.js +1 -0
- package/src/utils/report.js +1 -0
package/src/client.js
CHANGED
|
@@ -46,6 +46,7 @@ program
|
|
|
46
46
|
.option('--report-format <reportFormat>', 'default: "none" --- supported formats: "none", "json", "html", "printhtml"')
|
|
47
47
|
.option('--report-auto-filename-enable <reportAutoFilenameEnable>', 'default: false, if true the file name will be generated by the backend')
|
|
48
48
|
.option('--report-target <reportTarget>', 'default: "file://<file_name_genrated_by_backend>" --- supported targets: "file://path_to_file", "s3://<bucket_name>[/<file_path>]"')
|
|
49
|
+
.option('--report-folder <reportFolder>', 'save report in the specified folder, default: "current working directory"')
|
|
49
50
|
.option('--slack-webhook-url <slackWebhookUrl>', 'default: "Disabled" --- supported formats: "https://....."')
|
|
50
51
|
.option('--slack-webhook-url-for-failed <slackWebhookUrl>', 'default: "Disabled" --- supported formats: "https://....."')
|
|
51
52
|
.option('--extra-summary-information <Comma separated values in the format key:value>', 'default: none --- example: "Testcase Name:something,Environment:Dev1"')
|
package/src/router.js
CHANGED
|
@@ -62,6 +62,7 @@ const cli = (commanderOptions) => {
|
|
|
62
62
|
reportFormat: commanderOptions.reportFormat || configFile.reportFormat,
|
|
63
63
|
reportAutoFilenameEnable: commanderOptions.reportAutoFilenameEnable === 'true' || configFile.reportAutoFilenameEnable === true,
|
|
64
64
|
reportTarget: commanderOptions.reportTarget || configFile.reportTarget,
|
|
65
|
+
reportFolder: commanderOptions.reportFolder || configFile.reportFolder,
|
|
65
66
|
slackWebhookUrl: commanderOptions.slackWebhookUrl || configFile.slackWebhookUrl,
|
|
66
67
|
slackWebhookUrlForFailed: commanderOptions.slackWebhookUrlForFailed || configFile.slackWebhookUrlForFailed,
|
|
67
68
|
slackPassedImage: configFile.slackPassedImage,
|
package/src/utils/report.js
CHANGED
|
@@ -112,6 +112,7 @@ const report = async (data, reportType) => {
|
|
|
112
112
|
}
|
|
113
113
|
} else {
|
|
114
114
|
// Store the file
|
|
115
|
+
reportFilename = `${config.reportFolder || '.'}/${reportFilename}`
|
|
115
116
|
const writeFileAsync = promisify(fs.writeFile)
|
|
116
117
|
await writeFileAsync(reportFilename, reportData)
|
|
117
118
|
console.log(`${reportFilename} was generated`)
|