@sap/cds 9.4.2 → 9.4.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,15 @@
|
|
|
4
4
|
- The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
5
5
|
- This project adheres to [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## Version 9.4.3 - 2025-10-10
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Don't continue validation user input if data type is wrong
|
|
12
|
+
- UI annotation generation for status transition flows for Java
|
|
13
|
+
- Increased minimium version of `@sap/cds-compiler` to 6.3.x
|
|
14
|
+
- Undefined error message for early access checks
|
|
15
|
+
|
|
7
16
|
## Version 9.4.2 - 2025-10-08
|
|
8
17
|
|
|
9
18
|
### Fixed
|
package/lib/compile/for/flows.js
CHANGED
|
@@ -19,7 +19,7 @@ function addOperationAvailableToActions(actions, statusEnum, statusElementName)
|
|
|
19
19
|
for (const action of Object.values(actions)) {
|
|
20
20
|
const fromList = getFrom(action)
|
|
21
21
|
const conditions = fromList.map(from => {
|
|
22
|
-
const value = from['#'] ? statusEnum[from['#']]?.val ??
|
|
22
|
+
const value = from['#'] ? (statusEnum[from['#']]?.val ?? from['#']) : from
|
|
23
23
|
return `$self.${statusElementName} = ${typeof value === 'string' ? `'${value}'` : value}`
|
|
24
24
|
})
|
|
25
25
|
const condition = `(${conditions.join(' OR ')})`
|
|
@@ -2,13 +2,14 @@ const cds = require('../..'), {i18n} = cds
|
|
|
2
2
|
const LOG = cds.log('error')
|
|
3
3
|
const internals = /\n +at .*(?:node_modules\/express|node:).*/gm
|
|
4
4
|
const is_test = typeof global.it === 'function'
|
|
5
|
+
const { STATUS_CODES } = require('http')
|
|
5
6
|
|
|
6
7
|
module.exports = () => {
|
|
7
8
|
/** @param {import('express').Response} res */
|
|
8
9
|
return function http_error (err, req, res, next) { // eslint-disable-line no-unused-vars
|
|
9
10
|
|
|
10
11
|
// In case of 401 require login if available by auth strategy
|
|
11
|
-
if (typeof err === 'number') err = { code: err }
|
|
12
|
+
if (typeof err === 'number') err = { status: err, code: String(err), message: STATUS_CODES[err] }
|
|
12
13
|
if (err.code == 401 && req._login) return req._login()
|
|
13
14
|
|
|
14
15
|
// Shutdown on uncaught errors, which could be critical programming errors
|
|
@@ -355,7 +355,12 @@ async function validate_input(req) {
|
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
const errs = cds.validate(req.data, req.target, assertOptions)
|
|
358
|
-
if (errs)
|
|
358
|
+
if (errs) {
|
|
359
|
+
errs.forEach(err => req.error(err))
|
|
360
|
+
// data types are incorrect -> stop further processing which could rely on data type
|
|
361
|
+
if (errs.some(e => e.message === 'ASSERT_DATA_TYPE')) req.reject()
|
|
362
|
+
else return
|
|
363
|
+
}
|
|
359
364
|
|
|
360
365
|
// -------------------------------------------------
|
|
361
366
|
// REVISIT: is the below still needed?
|
|
@@ -399,7 +404,12 @@ function validate_action(req) {
|
|
|
399
404
|
protocol: req.protocol
|
|
400
405
|
}
|
|
401
406
|
let errs = cds.validate(data, operation, assertOptions)
|
|
402
|
-
if (errs)
|
|
407
|
+
if (errs) {
|
|
408
|
+
errs.forEach(err => req.error(err))
|
|
409
|
+
// data types are incorrect -> stop further processing which could rely on data type
|
|
410
|
+
if (errs.some(e => e.message === 'ASSERT_DATA_TYPE')) req.reject()
|
|
411
|
+
else return
|
|
412
|
+
}
|
|
403
413
|
|
|
404
414
|
// convert binaries
|
|
405
415
|
operation.params &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/cds",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.3",
|
|
4
4
|
"description": "SAP Cloud Application Programming Model - CDS for Node.js",
|
|
5
5
|
"homepage": "https://cap.cloud.sap/",
|
|
6
6
|
"keywords": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"node": ">=20"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@sap/cds-compiler": "^6.
|
|
35
|
+
"@sap/cds-compiler": "^6.3",
|
|
36
36
|
"@sap/cds-fiori": "^2",
|
|
37
37
|
"js-yaml": "^4.1.0"
|
|
38
38
|
},
|