@sap/cds 9.0.3 → 9.1.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/CHANGELOG.md +36 -0
- package/bin/serve.js +11 -9
- package/lib/compile/for/lean_drafts.js +29 -7
- package/lib/dbs/cds-deploy.js +5 -3
- package/lib/env/cds-requires.js +1 -1
- package/lib/env/defaults.js +0 -11
- package/lib/env/schemas/cds-rc.js +214 -6
- package/lib/i18n/locale.js +2 -1
- package/lib/req/request.js +1 -1
- package/lib/req/validate.js +1 -2
- package/lib/srv/cds-connect.js +1 -1
- package/lib/srv/middlewares/auth/xssec.js +1 -1
- package/lib/utils/inflect.js +2 -2
- package/lib/utils/tar.js +60 -23
- package/libx/_runtime/common/generic/crud.js +1 -3
- package/libx/_runtime/common/generic/input.js +2 -2
- package/libx/_runtime/common/generic/temporal.js +0 -6
- package/libx/_runtime/fiori/lean-draft.js +487 -141
- package/libx/_runtime/remote/utils/client.js +1 -0
- package/libx/odata/ODataAdapter.js +47 -43
- package/libx/odata/middleware/batch.js +0 -1
- package/libx/odata/middleware/error.js +7 -0
- package/libx/odata/middleware/operation.js +15 -21
- package/libx/odata/parse/afterburner.js +23 -10
- package/libx/odata/parse/cqn2odata.js +2 -2
- package/libx/odata/parse/grammar.peggy +182 -133
- package/libx/odata/parse/parser.js +1 -1
- package/libx/odata/utils/index.js +0 -35
- package/libx/odata/utils/metadata.js +34 -1
- package/libx/odata/utils/odataBind.js +2 -1
- package/libx/odata/utils/result.js +22 -20
- package/libx/queue/index.js +6 -2
- package/package.json +1 -1
|
@@ -78,9 +78,7 @@ module.exports = cds.service.impl(function () {
|
|
|
78
78
|
if (await _targetEntityDoesNotExist(req)) req.reject(404) // REVISIT: add a reasonable error message
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
if (req.constructor.name in { ODataRequest: 1 }) req._.readAfterWrite = true
|
|
83
|
-
if (req.protocol?.match(/odata/)) req._.readAfterWrite = true //> REVISIT for noah
|
|
81
|
+
if (req.protocol?.match(/odata/)) req._.readAfterWrite = true
|
|
84
82
|
|
|
85
83
|
return req.data
|
|
86
84
|
})
|
|
@@ -251,7 +251,7 @@ async function validate_input(req) {
|
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
const errs = cds.validate(req.data, req.target, assertOptions)
|
|
254
|
-
if (errs) return req.
|
|
254
|
+
if (errs) return errs.forEach(err => req.error(err))
|
|
255
255
|
|
|
256
256
|
// -------------------------------------------------
|
|
257
257
|
// REVISIT: is the below still needed?
|
|
@@ -332,7 +332,7 @@ function validate_action(req) {
|
|
|
332
332
|
protocol: req.protocol
|
|
333
333
|
}
|
|
334
334
|
let errs = cds.validate(data, operation, assertOptions)
|
|
335
|
-
if (errs) return req.
|
|
335
|
+
if (errs) return errs.forEach(err => req.error(err))
|
|
336
336
|
|
|
337
337
|
// REVISIT: we still need the following because cds.validate doesn't check for @mandatory params (both flat and nested)
|
|
338
338
|
const errors = []
|
|
@@ -76,12 +76,6 @@ function handle_temporal_data(req) {
|
|
|
76
76
|
_getDateFromQueryOptions(_queryOptions['sap-valid-to'] ?? normalizeTimestamp('9999-12-31T23:59:59.9999999Z'))
|
|
77
77
|
)
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
// REVISIT: needed without okra
|
|
81
|
-
if (req.constructor.name !== 'ODataRequest') {
|
|
82
|
-
req._['VALID-FROM'] = _['VALID-FROM']
|
|
83
|
-
req._['VALID-TO'] = _['VALID-TO']
|
|
84
|
-
}
|
|
85
79
|
}
|
|
86
80
|
handle_temporal_data._initial = true
|
|
87
81
|
|