@sap/cds 7.7.2 → 7.7.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
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
- The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|
5
5
|
- This project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
+
## Version 7.7.3 - 2024-03-18
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- `cds.log`: preserve message property of details through stringification (it's non-enumerable if the detail entry is an error)
|
|
12
|
+
- Auto-exposed child entities with multiple restrictions
|
|
13
|
+
- Calculation of read-only values in custom code during creation of new drafts
|
|
14
|
+
|
|
7
15
|
## Version 7.7.2 - 2024-03-11
|
|
8
16
|
|
|
9
17
|
### Fixed
|
package/lib/log/format/json.js
CHANGED
|
@@ -74,9 +74,13 @@ module.exports = function format(module, level, ...args) {
|
|
|
74
74
|
const err = args.shift()
|
|
75
75
|
toLog.msg = `${toLog.msg ? toLog.msg + ' ' : ''}${err.message}`
|
|
76
76
|
if (typeof err.stack === 'string' && !_is4xx(err)) toLog.stacktrace = err.stack.split(/\s*\r?\n\s*/)
|
|
77
|
-
if (Array.isArray(err.details))
|
|
78
|
-
for (const d of err.details)
|
|
77
|
+
if (Array.isArray(err.details)) {
|
|
78
|
+
for (const d of err.details) {
|
|
79
|
+
// preserve message property through stringification
|
|
80
|
+
if (d.message) Object.defineProperty(d, 'message', { value: d.message, enumerable: true })
|
|
79
81
|
if (typeof d.stack === 'string' && !_is4xx(d)) d.stacktrace = d.stack.split(/\s*\r?\n\s*/)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
80
84
|
Object.assign(toLog, err, { level: toLog.level })
|
|
81
85
|
}
|
|
82
86
|
|
|
@@ -116,8 +116,8 @@ const _processCategory = (req, category, value, elementInfo, assertMap) => {
|
|
|
116
116
|
// Always take over the values from active entities
|
|
117
117
|
if (cds.env.fiori?.lean_draft && req.context?.event === 'EDIT') return
|
|
118
118
|
|
|
119
|
-
//
|
|
120
|
-
if (cds.env.fiori?.lean_draft && event === 'CREATE' && req.
|
|
119
|
+
// read-only values are already deleted before `NEW` (and they can be set in a `NEW` handler!)
|
|
120
|
+
if (cds.env.fiori?.lean_draft && event === 'CREATE' && req.target.isDraft) return
|
|
121
121
|
|
|
122
122
|
delete row[key]
|
|
123
123
|
value.val = undefined
|