@xapp/stentor-service 1.56.37 → 1.56.41
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.mapResponseToResource = void 0;
|
|
4
4
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
5
|
-
const
|
|
5
|
+
const jsonpath_plus_1 = require("jsonpath-plus");
|
|
6
6
|
/**
|
|
7
7
|
* Maps a response payload to the resource.
|
|
8
8
|
*
|
|
@@ -17,7 +17,10 @@ function mapResponseToResource(payload, resource) {
|
|
|
17
17
|
const map = resource.responseMap;
|
|
18
18
|
for (const key in map) {
|
|
19
19
|
if (map.hasOwnProperty(key)) {
|
|
20
|
-
const queried =
|
|
20
|
+
const queried = (0, jsonpath_plus_1.JSONPath)({
|
|
21
|
+
json: payload,
|
|
22
|
+
path: map[key]
|
|
23
|
+
})[0]; // TODO: only taking the top for now
|
|
21
24
|
if (queried) {
|
|
22
25
|
if (!t) {
|
|
23
26
|
// Wait to make this assignment here
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceService.js","sourceRoot":"","sources":["../../src/ResourceService/ResourceService.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AACpC
|
|
1
|
+
{"version":3,"file":"ResourceService.js","sourceRoot":"","sources":["../../src/ResourceService/ResourceService.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AACpC,iDAAyC;AA6DzC;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CAAI,OAAY,EAAE,QAAqB;IACxE,IAAI,CAAM,CAAC;IAEX,MAAM,GAAG,GAAG,QAAQ,CAAC,WAAW,CAAC;IAEjC,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACpB,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1B,MAAM,OAAO,GAAG,IAAA,wBAAQ,EAAC;gBACrB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC;aAEjB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,oCAAoC;YAC1C,IAAI,OAAO,EAAE,CAAC;gBACV,IAAI,CAAC,CAAC,EAAE,CAAC;oBACL,oCAAoC;oBACpC,gDAAgD;oBAChD,uBAAuB;oBACvB,CAAC,GAAG,EAAE,CAAC;gBACX,CAAC;gBACD,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;YACrB,CAAC;QACL,CAAC;IACL,CAAC;IAED,+CAA+C;IAC/C,IAAI,CAAC,IAAI,QAAQ,CAAC,aAAa,EAAE,CAAC;QAC9B,6DAA6D;QAC7D,iCAAiC;QACjC,yDAAyD;QACzD,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,CAAC,CAAC;AACb,CAAC;AAjCD,sDAiCC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.56.
|
|
7
|
+
"version": "1.56.41",
|
|
8
8
|
"description": "Base service to be extended for making API calls",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"main": "lib/index",
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/chai": "4.3.14",
|
|
19
19
|
"@types/chai-as-promised": "7.1.8",
|
|
20
|
-
"@types/jsonpath": "0.2.4",
|
|
21
20
|
"@types/lodash": "4.17.0",
|
|
22
21
|
"@types/sinon": "4.3.3",
|
|
23
22
|
"@types/sinon-chai": "3.2.12",
|
|
@@ -29,19 +28,19 @@
|
|
|
29
28
|
"sinon": "16.1.3",
|
|
30
29
|
"sinon-chai": "3.7.0",
|
|
31
30
|
"stentor-constants": "1.59.46",
|
|
32
|
-
"stentor-context": "1.59.
|
|
31
|
+
"stentor-context": "1.59.47",
|
|
33
32
|
"stentor-models": "1.59.46",
|
|
34
|
-
"stentor-request": "1.59.
|
|
33
|
+
"stentor-request": "1.59.47",
|
|
35
34
|
"stentor-service-fetch": "1.59.46",
|
|
36
|
-
"stentor-utils": "1.59.
|
|
35
|
+
"stentor-utils": "1.59.47",
|
|
37
36
|
"ts-node": "10.9.2",
|
|
38
37
|
"typescript": "5.4.5"
|
|
39
38
|
},
|
|
40
39
|
"dependencies": {
|
|
41
|
-
"@xapp/stentor-app": "1.56.
|
|
40
|
+
"@xapp/stentor-app": "1.56.38",
|
|
42
41
|
"abort-controller": "3.0.0",
|
|
43
42
|
"isomorphic-fetch": "3.0.0",
|
|
44
|
-
"jsonpath": "
|
|
43
|
+
"jsonpath-plus": "9.0.0",
|
|
45
44
|
"lodash.find": "4.6.0",
|
|
46
45
|
"lodash.template": "4.5.0",
|
|
47
46
|
"moment": "2.30.1",
|
|
@@ -62,5 +61,5 @@
|
|
|
62
61
|
"clean": "rm -rf ./lib/*",
|
|
63
62
|
"ftest": "mocha --recursive -r ts-node/register \"./src/**/*.ftest.ts\""
|
|
64
63
|
},
|
|
65
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "a25fd828b0f7507012b997014b513cf13444e57d"
|
|
66
65
|
}
|