@mojaloop/ml-testing-toolkit-client-lib 1.2.2 → 1.2.3-snapshot.0
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/audit-ci.jsonc
CHANGED
|
@@ -6,6 +6,18 @@
|
|
|
6
6
|
"allowlist": [
|
|
7
7
|
// request-promise-native>request-promise-core>request - Library is now deprecated. see https://github.com/mojaloop/project/issues/3545
|
|
8
8
|
"GHSA-p8p7-x288-28g6",
|
|
9
|
-
"GHSA-72xf-g2v4-qvf3"
|
|
9
|
+
"GHSA-72xf-g2v4-qvf3",
|
|
10
|
+
"GHSA-282f-qqgm-c34q",
|
|
11
|
+
"GHSA-6vfc-qv3f-vr6c",
|
|
12
|
+
"GHSA-7fh5-64p2-3v2j",
|
|
13
|
+
"GHSA-cgfm-xwp7-2cvr",
|
|
14
|
+
"GHSA-ghr5-ch3p-vcr6",
|
|
15
|
+
"GHSA-mjxr-4v3x-q3m4",
|
|
16
|
+
"GHSA-p9pc-299p-vxgp",
|
|
17
|
+
"GHSA-phwq-j96m-2c2q",
|
|
18
|
+
"GHSA-pppg-cpfq-h7wr",
|
|
19
|
+
"GHSA-rjqq-98f6-6j3r",
|
|
20
|
+
"GHSA-rm97-x556-q36h",
|
|
21
|
+
"GHSA-v88g-cgmw-v5xw"
|
|
10
22
|
]
|
|
11
23
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/ml-testing-toolkit-client-lib",
|
|
3
3
|
"description": "Testing Toolkit Client Library",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.3-snapshot.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Vijaya Kumar Guthi, ModusBox Inc. ",
|
|
7
7
|
"contributors": [
|
|
@@ -63,16 +63,16 @@
|
|
|
63
63
|
"snapshot": "npx standard-version --no-verify --skip.changelog --prerelease snapshot --releaseCommitMessageFormat 'chore(snapshot): {{currentTag}}'"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@mojaloop/central-services-logger": "11.
|
|
66
|
+
"@mojaloop/central-services-logger": "11.5.1",
|
|
67
67
|
"@mojaloop/ml-testing-toolkit-shared-lib": "14.0.1",
|
|
68
|
-
"@mojaloop/sdk-standard-components": "
|
|
69
|
-
"@slack/webhook": "7.0.
|
|
68
|
+
"@mojaloop/sdk-standard-components": "19.2.0",
|
|
69
|
+
"@slack/webhook": "7.0.3",
|
|
70
70
|
"atob": "2.1.2",
|
|
71
|
-
"aws-sdk": "2.
|
|
72
|
-
"axios": "1.
|
|
73
|
-
"cli-table3": "0.6.
|
|
74
|
-
"commander": "12.
|
|
75
|
-
"dotenv": "16.4.
|
|
71
|
+
"aws-sdk": "2.1691.0",
|
|
72
|
+
"axios": "1.7.7",
|
|
73
|
+
"cli-table3": "0.6.5",
|
|
74
|
+
"commander": "12.1.0",
|
|
75
|
+
"dotenv": "16.4.5",
|
|
76
76
|
"fs": "0.0.1-security",
|
|
77
77
|
"lodash": "4.17.21",
|
|
78
78
|
"mv": "2.1.1",
|
|
@@ -83,19 +83,19 @@
|
|
|
83
83
|
"rc": "1.2.8",
|
|
84
84
|
"request": "2.88.2",
|
|
85
85
|
"request-promise-native": "1.0.8",
|
|
86
|
-
"socket.io-client": "4.
|
|
86
|
+
"socket.io-client": "4.8.1"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"audit-ci": "^
|
|
89
|
+
"audit-ci": "^7.1.0",
|
|
90
90
|
"jest": "^29.7.0",
|
|
91
91
|
"jest-junit": "^16.0.0",
|
|
92
|
-
"npm-check-updates": "
|
|
93
|
-
"nyc": "^
|
|
92
|
+
"npm-check-updates": "17.1.6",
|
|
93
|
+
"nyc": "^17.1.0",
|
|
94
94
|
"parse-strings-in-object": "1.6.0",
|
|
95
95
|
"pre-commit": "1.2.2",
|
|
96
96
|
"replace": "^1.2.2",
|
|
97
|
-
"sinon": "
|
|
98
|
-
"standard": "^17.1.
|
|
97
|
+
"sinon": "19.0.2",
|
|
98
|
+
"standard": "^17.1.2",
|
|
99
99
|
"standard-version": "^9.5.0"
|
|
100
100
|
},
|
|
101
101
|
"generator-swaggerize": {
|
package/src/modes/outbound.js
CHANGED
|
@@ -149,7 +149,9 @@ const sendTemplate = async (sessionId) => {
|
|
|
149
149
|
const inputFiles = config.inputFiles.split(',')
|
|
150
150
|
const selectedLabels = config.labels ? config.labels.split(',') : []
|
|
151
151
|
const template = await TemplateGenerator.generateTemplate(inputFiles, selectedLabels)
|
|
152
|
-
|
|
152
|
+
const environmentFileObj = JSON.parse(await readFileAsync(config.environmentFile, 'utf8'))
|
|
153
|
+
template.inputValues = environmentFileObj.inputValues
|
|
154
|
+
template.options = environmentFileObj.options || {}
|
|
153
155
|
template.saveReport = config.saveReport
|
|
154
156
|
template.name = determineTemplateName(inputFiles)
|
|
155
157
|
|
|
@@ -163,7 +165,7 @@ const sendTemplate = async (sessionId) => {
|
|
|
163
165
|
totalProgress.totalAssertions += request.tests.assertions.length
|
|
164
166
|
}
|
|
165
167
|
})
|
|
166
|
-
testCase.breakOnError = (config.breakRunOnError === 'true')
|
|
168
|
+
testCase.options.breakOnError = (config.breakRunOnError === 'true')
|
|
167
169
|
})
|
|
168
170
|
await axios.post(`${config.baseURL}/api/outbound/template/` + outboundRequestID, template, { headers: { 'Content-Type': 'application/json' } })
|
|
169
171
|
} catch (err) {
|
|
@@ -36,7 +36,9 @@ const download = async () => {
|
|
|
36
36
|
const template = await templateGenerator.generateTemplate(inputFiles, selectedLabels)
|
|
37
37
|
if (config.environmentFile) {
|
|
38
38
|
const environmentFileContent = await utils.readFileAsync(config.environmentFile, 'utf8')
|
|
39
|
-
|
|
39
|
+
const environmentFileContentObj = JSON.parse(environmentFileContent)
|
|
40
|
+
template.inputValues = environmentFileContentObj.inputValues
|
|
41
|
+
template.options = environmentFileContentObj.options
|
|
40
42
|
}
|
|
41
43
|
await report.testcaseDefinition(template)
|
|
42
44
|
console.log(fStr.green('Terminate with exit code 0'))
|
|
@@ -153,7 +153,8 @@ describe('Cli client', () => {
|
|
|
153
153
|
it('when generateTemplate is successful should not throw an error', async () => {
|
|
154
154
|
spyPromisify.mockReturnValueOnce(() => {
|
|
155
155
|
return JSON.stringify({
|
|
156
|
-
"inputValues": {}
|
|
156
|
+
"inputValues": {},
|
|
157
|
+
"options": {}
|
|
157
158
|
})
|
|
158
159
|
})
|
|
159
160
|
const config = {
|
|
@@ -175,7 +176,8 @@ describe('Cli client', () => {
|
|
|
175
176
|
it('when generateTemplate failed should throw an error', async () => {
|
|
176
177
|
spyPromisify.mockReturnValueOnce(() => {
|
|
177
178
|
return JSON.stringify({
|
|
178
|
-
"inputValues": {}
|
|
179
|
+
"inputValues": {},
|
|
180
|
+
"options": {}
|
|
179
181
|
})
|
|
180
182
|
})
|
|
181
183
|
const config = {
|
|
@@ -54,7 +54,8 @@ describe('Cli client', () => {
|
|
|
54
54
|
})
|
|
55
55
|
it('when download is not successful should throw an error', async () => {
|
|
56
56
|
spyReadFileAsync.mockResolvedValueOnce(JSON.stringify({
|
|
57
|
-
"inputValues": {}
|
|
57
|
+
"inputValues": {},
|
|
58
|
+
"options": {}
|
|
58
59
|
}))
|
|
59
60
|
const config = {
|
|
60
61
|
inputFiles: "sample-cli.json",
|