ml-testing-toolkit 18.13.1 → 18.13.2-rorfs.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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ml-testing-toolkit",
|
|
3
3
|
"description": "Testing Toolkit for Mojaloop implementations",
|
|
4
|
-
"version": "18.13.
|
|
4
|
+
"version": "18.13.2-rorfs.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Vijaya Kumar Guthi, ModusBox Inc. ",
|
|
7
7
|
"contributors": [
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"genexec": "pkg -t node8-win ."
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@elastic/elasticsearch": "9.0
|
|
74
|
+
"@elastic/elasticsearch": "9.1.0",
|
|
75
75
|
"@hapi/basic": "7.0.2",
|
|
76
76
|
"@hapi/boom": "10.0.1",
|
|
77
77
|
"@hapi/good": "9.0.1",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"json-rules-engine": "7.3.1",
|
|
109
109
|
"jsonwebtoken": "9.0.2",
|
|
110
110
|
"lodash": "4.17.21",
|
|
111
|
-
"mongoose": "8.
|
|
111
|
+
"mongoose": "8.17.0",
|
|
112
112
|
"multer": "2.0.2",
|
|
113
113
|
"mustache": "4.2.0",
|
|
114
114
|
"mv": "2.1.1",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
const dbAdapter = require('./db/adapters/dbAdapter')
|
|
33
33
|
const fileAdapter = require('./fileAdapter')
|
|
34
|
+
const axios = require('axios').default
|
|
34
35
|
|
|
35
36
|
const read = async (id, user) => {
|
|
36
37
|
let document
|
|
@@ -54,7 +55,8 @@ const read = async (id, user) => {
|
|
|
54
55
|
if (id.endsWith('/')) {
|
|
55
56
|
document = { data: await find(id) }
|
|
56
57
|
} else {
|
|
57
|
-
|
|
58
|
+
const data = await fileAdapter.read(id)
|
|
59
|
+
document = { data: data?.toString().startsWith('https://') ? (await axios.get(data.toString())).data : data }
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
62
|
return document
|