stentor-response 1.48.5 → 1.48.6
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 +11 -0
- package/lib/compileResponse.js +6 -2
- package/lib/compileResponse.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.48.6](https://github.com/stentorium/stentor/compare/v1.48.5...v1.48.6) (2021-11-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Ability to now compile boolean false values in responses ([#1207](https://github.com/stentorium/stentor/issues/1207)) ([9ae0298](https://github.com/stentorium/stentor/commit/9ae0298e4570ff6d142cbd1542867fcb01dd4b71))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [1.48.5](https://github.com/stentorium/stentor/compare/v1.48.4...v1.48.5) (2021-11-01)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package stentor-response
|
package/lib/compileResponse.js
CHANGED
|
@@ -5,6 +5,7 @@ exports.compileResponse = void 0;
|
|
|
5
5
|
const stentor_constants_1 = require("stentor-constants");
|
|
6
6
|
const stentor_guards_1 = require("stentor-guards");
|
|
7
7
|
const stentor_locales_1 = require("stentor-locales");
|
|
8
|
+
const stentor_logger_1 = require("stentor-logger");
|
|
8
9
|
const stentor_utils_1 = require("stentor-utils");
|
|
9
10
|
const compileSegments_1 = require("./compileSegments");
|
|
10
11
|
/**
|
|
@@ -65,6 +66,9 @@ function compileResponse(response, request, context, additionalContext, macros)
|
|
|
65
66
|
const itemsName = firstDisplay.itemsName || "items";
|
|
66
67
|
// The collection variable. The regex is just for the syntactical similarity. ex "${ $.session.storeList }"
|
|
67
68
|
const itemsObject = firstDisplay.itemsObject;
|
|
69
|
+
// then delete these since they may cause problems later in compilation
|
|
70
|
+
delete firstDisplay.itemsObject;
|
|
71
|
+
delete firstDisplay.itemsName;
|
|
68
72
|
// If dynamic no reason to give more
|
|
69
73
|
if (firstDisplay.items.length !== 1) {
|
|
70
74
|
throw new Error("Templated Lists must only have 1 item");
|
|
@@ -114,7 +118,7 @@ function compileResponse(response, request, context, additionalContext, macros)
|
|
|
114
118
|
compiledItems.push(compiledItem);
|
|
115
119
|
}
|
|
116
120
|
catch (e) {
|
|
117
|
-
|
|
121
|
+
(0, stentor_logger_1.log)().error(`Could not compile display:`, e);
|
|
118
122
|
}
|
|
119
123
|
// ok, time to update the items.
|
|
120
124
|
firstDisplay.items = compiledItems;
|
|
@@ -132,7 +136,7 @@ function compileResponse(response, request, context, additionalContext, macros)
|
|
|
132
136
|
compiledResponse.displays = compiledDisplays;
|
|
133
137
|
}
|
|
134
138
|
catch (e) {
|
|
135
|
-
|
|
139
|
+
(0, stentor_logger_1.log)().error(`Could not compile display:`, e);
|
|
136
140
|
}
|
|
137
141
|
}
|
|
138
142
|
// return the result
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compileResponse.js","sourceRoot":"","sources":["../src/compileResponse.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AACpC,yDAAmD;AACnD,mDAAiD;AACjD,qDAA2C;
|
|
1
|
+
{"version":3,"file":"compileResponse.js","sourceRoot":"","sources":["../src/compileResponse.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AACpC,yDAAmD;AACnD,mDAAiD;AACjD,qDAA2C;AAC3C,mDAAqC;AAErC,iDAAmG;AAEnG,uDAAoD;AAEpD;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,eAAe,CAC3B,QAAkB,EAClB,OAAgB,EAChB,OAAgB,EAChB,iBAA2C,EAC3C,MAAiB;;IAEjB,YAAY;IACZ,IAAI,CAAC,QAAQ,EAAE;QACX,OAAO,QAAQ,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
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.48.
|
|
7
|
+
"version": "1.48.6",
|
|
8
8
|
"description": "Response for stentor",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"main": "lib/index",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@xapp/patterns": "1.37.29",
|
|
33
33
|
"lodash.template": "4.5.0",
|
|
34
|
-
"stentor-determiner": "1.48.
|
|
35
|
-
"stentor-locales": "1.48.
|
|
36
|
-
"stentor-media": "1.48.
|
|
37
|
-
"stentor-request": "1.48.
|
|
38
|
-
"stentor-utils": "1.48.
|
|
34
|
+
"stentor-determiner": "1.48.6",
|
|
35
|
+
"stentor-locales": "1.48.6",
|
|
36
|
+
"stentor-media": "1.48.6",
|
|
37
|
+
"stentor-request": "1.48.6",
|
|
38
|
+
"stentor-utils": "1.48.6"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"stentor-models": "1.x"
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"clean": "rm -rf ./lib/* ",
|
|
46
46
|
"test": "mocha --recursive -r ts-node/register \"./src/**/*.test.ts\""
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "f5dc39e4d7889b52df1e6c85ee399f144633ce5f"
|
|
49
49
|
}
|