@sap/cds 7.2.0 → 7.3.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.
Files changed (63) hide show
  1. package/CHANGELOG.md +174 -126
  2. package/README.md +1 -1
  3. package/apis/connect.d.ts +1 -1
  4. package/apis/core.d.ts +6 -4
  5. package/apis/serve.d.ts +1 -1
  6. package/apis/services.d.ts +51 -31
  7. package/apis/test.d.ts +24 -10
  8. package/bin/serve.js +4 -3
  9. package/common.cds +4 -4
  10. package/lib/auth/ias-auth.js +7 -8
  11. package/lib/compile/cdsc.js +5 -7
  12. package/lib/compile/etc/csv.js +22 -11
  13. package/lib/dbs/cds-deploy.js +1 -2
  14. package/lib/env/cds-env.js +26 -20
  15. package/lib/env/defaults.js +4 -3
  16. package/lib/env/schema.js +9 -0
  17. package/lib/i18n/localize.js +83 -77
  18. package/lib/index.js +6 -2
  19. package/lib/linked/classes.js +13 -13
  20. package/lib/plugins.js +41 -45
  21. package/lib/req/user.js +2 -2
  22. package/lib/srv/protocols/_legacy.js +0 -1
  23. package/lib/srv/protocols/odata-v4.js +4 -0
  24. package/lib/utils/axios.js +7 -1
  25. package/lib/utils/cds-test.js +140 -133
  26. package/lib/utils/cds-utils.js +1 -1
  27. package/lib/utils/check-version.js +6 -0
  28. package/lib/utils/data.js +19 -6
  29. package/libx/_runtime/cds-services/adapter/odata-v4/OData.js +20 -19
  30. package/libx/_runtime/cds-services/adapter/odata-v4/handlers/action.js +10 -1
  31. package/libx/_runtime/cds-services/adapter/odata-v4/handlers/error.js +1 -1
  32. package/libx/_runtime/cds-services/adapter/odata-v4/handlers/request.js +2 -3
  33. package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-commons/utils/ValueConverter.js +0 -14
  34. package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/core/OdataRequest.js +1 -0
  35. package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/deserializer/BatchRequestListBuilder.js +5 -2
  36. package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/handler/MetadataHandler.js +1 -1
  37. package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/handler/ServiceHandler.js +1 -1
  38. package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/DispatcherCommand.js +2 -2
  39. package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/utils/BufferedWriter.js +1 -3
  40. package/libx/_runtime/cds-services/adapter/odata-v4/utils/metaInfo.js +1 -1
  41. package/libx/_runtime/common/composition/update.js +18 -2
  42. package/libx/_runtime/common/error/frontend.js +46 -34
  43. package/libx/_runtime/common/generic/auth/capabilities.js +33 -14
  44. package/libx/_runtime/common/generic/input.js +1 -1
  45. package/libx/_runtime/common/generic/paging.js +1 -0
  46. package/libx/_runtime/common/i18n/messages.properties +1 -0
  47. package/libx/_runtime/common/utils/cqn2cqn4sql.js +3 -3
  48. package/libx/_runtime/db/query/update.js +48 -30
  49. package/libx/_runtime/fiori/lean-draft.js +23 -24
  50. package/libx/_runtime/hana/conversion.js +3 -2
  51. package/libx/_runtime/messaging/enterprise-messaging-utils/getTenantInfo.js +1 -1
  52. package/libx/_runtime/messaging/outbox/utils.js +1 -1
  53. package/libx/_runtime/remote/Service.js +11 -26
  54. package/libx/_runtime/remote/utils/client.js +3 -2
  55. package/libx/_runtime/remote/utils/data.js +5 -7
  56. package/libx/odata/{grammar.pegjs → grammar.peggy} +1 -1
  57. package/libx/odata/metadata.js +121 -0
  58. package/libx/odata/parser.js +1 -1
  59. package/libx/odata/service-document.js +61 -0
  60. package/libx/odata/utils.js +102 -48
  61. package/libx/rest/RestAdapter.js +2 -2
  62. package/libx/rest/middleware/error.js +1 -1
  63. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,49 @@
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.3.0 - 2023-10-04
8
+
9
+ ### Added
10
+
11
+ - `cds.localized` now caches i18n bundles per locale and per model to speed up repeated usages of the same bundle at runtime, for example, in repeated calls to `cds.compile.for.edmx()`.
12
+ - Based on `cds.localized` with cached bundles, a new operation `cds.localized.lookup(i18n_key, locale)` is provided.
13
+ - If env variable `CDS_TEST_ENV_CHECK` is set, `cds.test.in()` detects if `cds.env` was loaded before from a different folder.
14
+ - `cds.test.log()` allows to capture and analyse any console log output. `cds.test.verbose()` is now deprecated.
15
+ - Typings for `cds.tx`
16
+ - Add method `cds.schema.default4(schemaId)` to retrieve json schema based on its id
17
+ - Support for pseudo role `internal-user` with authentication kind `ias`
18
+ - CSV files with multiline values, i.e. line breaks, are now supported with `cds deploy`
19
+
20
+ ### Changed
21
+
22
+ - If ommitted in the accept header, `ExponentialDecimals` no longer gets defaulted (to `true`), which violated the OData 4.0 specification.
23
+ This change can _temporarily_ be overridden via `cds.env.odata.defaultExponentialDecimals = 'true/false'`.
24
+ - Make type signature of `extend.with` more general
25
+ - `cds.test.data.autoReset()` is deprecated in favor of explicit `cds.test.data.reset()` call, like `beforeEach (test.data.reset)`.
26
+ - `cds.utils.uuid()` now uses `randomUUID` function of node `crypto` module instead of `uuid` package
27
+ - `@Capabilities` restrictions defined on entity level are also applied if navigating to the entity. Restrictions defined directly on the navigation now override restrictions defined on the target entity.
28
+
29
+ ### Fixed
30
+
31
+ - Draft: activate managed fields were miscalculated in some cases
32
+ - Error with `exists` predicate in `@restrict.where` when calling compositions
33
+ - `IsActiveEntity` in error target for lean draft
34
+ - Remote Service: OData v2 compliant representation of Edm.Decimal, Edm.Double, and Edm.Int64 in URL
35
+ - In draft activate managed fields were calculated wrongly in some cases
36
+ - On draft save, missing entries in `req.headers`
37
+
38
+ ## Version 7.2.1 - 2023-09-21
39
+
40
+ ### Fixed
41
+
42
+ - HTTP headers argument was not forwarded to remote services when using the `srv.send(...)` API.
43
+ - Not existing draft upon `SAVE` has own error code.
44
+ - Links to documentation in Typescript definitions.
45
+ - Remote service won't check for `credentials.url` in case of messaging.
46
+ - Lean draft: Implicitly added `limit` in some lean draft read scenarios.
47
+ - Lean draft: Association keys in lean draft.
48
+ - Remote service: Preserve namespaces in URLs that do not match the service's namespace.
49
+
7
50
  ## Version 7.2.0 - 2023-09-04
8
51
 
9
52
  ### Added
@@ -11,11 +54,11 @@
11
54
  - Typescript definition for:
12
55
  - The `cds.exit()` method.
13
56
  - The `label` option parameter in the `cds.log()` API. For example: `cds.log('log message', { label: 'adapter' }`.
14
- - `@restrict` annotations can now prevent the creation of drafts([see documentation](https://pages.github.tools.sap/cap/docs/guides/authorization#restrictions-and-draft-mode))
57
+ - A variant of the `roles` property of the `cds.User` class.
58
+ - `@restrict` annotations can now prevent the creation of drafts ([see documentation](https://cap.cloud.sap/docs/guides/authorization#restrictions-and-draft-mode))
15
59
  - JSON Schema validation for `cds.requires.multitenancy.jobs` settings.
16
- - Managed associations to-one with exactly one foreign key can now have a default value.
17
- - Skip Okra's parsing of query options via experimental feature flag `cds.env.features.okra_skip_query_options = true`.
18
- Only allowed in combination with new OData parser, i.e., `cds.env.features.odata_new_parser = true`.
60
+ - Managed associations to one with exactly one foreign key can now have a default value.
61
+ - Experimental feature flag `cds.env.features.okra_skip_query_options`. This feature allows you to bypass the parsing of query options by the legacy OData V4 Server (Okra). Please note that this feature can only be utilized in conjunction with the new OData parser, which is activated by setting the feature flag `cds.env.features.odata_new_parser = true`.
19
62
  - Support for `@requires: 'any'` to make service public, i.e., no authenticated user is required
20
63
 
21
64
  ### Changed
@@ -23,9 +66,10 @@
23
66
  - The built-in `java` profile sets `build.target` to `.` by default
24
67
  - Decimals from query options (e.g., `$filter`) are represented as strings in CQN
25
68
  - Improve error message for unsupported transformations with `$apply`
26
- - For database dialect H2, specialized localized views for languages `de` and `fr` are no longer generated.
27
- - Authentication kinds `jwt`, `xsuaa`, and `ias` throw an error during bootstrapping if the necessary credentials are not available.
28
- Previously, a warning was logged and authentication was skipped.
69
+ - For database dialect H2, specialized, localized views for languages `de` and `fr` are no longer generated.
70
+ - Authentication kinds `jwt`, `xsuaa`, and `ias` throw an error during bootstrapping if the necessary credentials are
71
+ unavailable.
72
+ Previously, a warning was logged, and authentication was skipped.
29
73
  See `cds bind`/ Hybrid Testing in CAPire for how to combine local development and cloud resources.
30
74
  - The Typescript definitions now make use of the default export.
31
75
 
@@ -33,25 +77,27 @@
33
77
 
34
78
  - Trace middleware: Adapted usage of `performance.now()` for Node 20.
35
79
  - Draft: Associations to non-draft enabled entities must never point to drafts
36
- - Avoid type error in old db post processing
37
- - `<remote-srv>.run('/arbitrary-url')` properly defaults to a get request and does not add request body
80
+ - Avoided type error in old db post-processing
81
+ - `<remote-srv>.run('/arbitrary-url')` now defaults to a get request and doesn't add request body
38
82
  - `@cds.query.limit` is cached per projection
39
83
  - Application crash for incorrect usage of REST-style API to run queries
40
84
  - The `@requires` annotation on entity level didn't get applied to bound operations
41
- - `cds.test` run with a profile parameter such as `cds.test('run', '--profile', 'integration-tests')` will use the correct profile.
85
+ - `cds.test` run with a profile parameter such as `cds.test('run', '--profile', 'integration-tests')` will use the
86
+ correct profile.
42
87
  - `cds.env.requires.auth.restrict_all_services = false` in combination with `cds.env.requires.middlewares = true` (the default)
43
88
 
44
89
  ## Version 7.1.2 - 2023-08-11
45
90
 
46
91
  ### Fixed
47
92
 
48
- - `req.tenant` is undefined when using new OData parser
49
- - Draft: replace some occurrences of the `arr.push(...largeArray)` pattern when copying large arrays to prevent maximum call stack size exceeded errors due to large deep update processing when saving the draft
50
- - Do not add keys to diff as they could be renamed (which leads to SQL error)
51
- - Custom bound actions for draft-enabled entities don't trigger a READ request on application service anymore
93
+ - `req.tenant` is undefined when using the new OData parser
94
+ - Draft: Replace some occurrences of the `arr.push(...largeArray)` pattern when copying large arrays to prevent maximum
95
+ call stack size exceeded errors due to large deep update processing when saving the draft
96
+ - Keys are no longer added to the diff as they could be renamed, leading to SQL errors
97
+ - Custom-bound actions for draft-enabled entities don't trigger a READ request on application service anymore
52
98
  - `cds.connect.to('db', options)`: add-hoc options for SAP HANA Database Service
53
99
  - Reading key-less singleton with `$select` clause while using the new OData parser `cds.env.features.odata_new_parser`
54
- - Don't use colored logs if `process.env.NO_COLOR` is set or not logging to a terminal (i.e., `!process.stdout.isTTY || !process.stderr.isTTY`)
100
+ - Avoided using colored logs if process.env.NO_COLOR is set or not logging to a terminal (i.e., `!process.stdout.isTTY || !process.stderr.isTTY`)
55
101
 
56
102
  ## Version 7.1.1 - 2023-08-01
57
103
 
@@ -65,7 +111,7 @@
65
111
 
66
112
  ### Added
67
113
 
68
- - Enable PDF export via GET to collection with accept header `appplication/pdf`.
114
+ - Enable PDF export via GET to collection with accept header `application/pdf`.
69
115
  Custom handler must return the following:
70
116
  ```
71
117
  {
@@ -92,26 +138,27 @@
92
138
  to: ['authenticated-user']
93
139
  }])
94
140
  ```
95
- - Support for resolving of experimental `STREAM` CQN queries that point to views
141
+ - Support for resolving experimental `STREAM` CQN queries that point to views
96
142
 
97
143
  ### Fixed
98
144
 
99
- - Multiple TypeScript improvements
145
+ - Multiple TypeScript fixes/improvements
100
146
  - Proper handling for `expand=*` for OData URL to CQN parser (`cds.env.features.odata_new_parser`)
101
- - Fully qualified operation names are correctly resolved in rest adapter
102
- - Log level for odata metadata cache was not handled correctly
147
+ - Corrected the resolution of fully qualified operation names in the REST adapter.
148
+ - Log level for OData metadata cache was not handled correctly
103
149
  - Protocol paths are normalized to always have a leading slash
104
150
  - `@odata` shortcut for `odata-v4` protocol with custom configuration
105
- - Default protocol is `odata-v4`, independent of the order in `cds.env.protocols`
106
- - Data is not logged for GET and DELETE remote requests
151
+ - Set default protocol to `odata-v4`, independent of the order in `cds.env.protocols`
152
+ - Now data is correctly logged for `GET` and `DELETE` remote requests
107
153
  - draft: deep update without change should not update the `modifiedAt` field
108
154
  - Lean draft: do not propagate `@Capabilities.NavigationRestrictions.RestrictedProperties`
109
- - Commit db transaction only once outbound streaming has ended
155
+ - Commit database transactions only once outbound streaming has ended
110
156
  - Lean draft: deactivate legacy `drafts` getter
111
- - Updated typings for srv.send
157
+ - Updated typings for `srv.send()`
112
158
  - `$search`: exclude calculated fields/expressions from default search in projection of projections
113
- - Immutable properties are always removed from payload during UPDATE
114
- - `serviceinfo.urlPath` contains the first endpoint of the service (cf. `srv.endpoints`), which is the legacy path if `cds.env.features.serve_on_root === true`
159
+ - Immutable properties are always removed from payload during `UPDATE`
160
+ - `serviceinfo.urlPath` contains the first endpoint of the service (cf. `srv.endpoints`), which is the legacy path if
161
+ `cds.env.features.serve_on_root === true`
115
162
 
116
163
  ## Version 7.0.3 - 2023-07-19
117
164
 
@@ -123,7 +170,7 @@
123
170
  - `SELECT.one.localized`
124
171
  - `COPYFILE_DISABLE=1` is now set for building `tar` archives by default
125
172
  - Actions of projection target are no longer accessible in linked models
126
- - Batch execute model-less mass inputs when on `@sap/hana-client`
173
+ - Batch executes model-less mass inputs when on `@sap/hana-client`
127
174
  - Requests to `/<path>/webapp` return 404 for absolute `@path` specifications
128
175
  - `cds compile --to serviceinfo` no longer returns paths w/ Windows `\` path characters
129
176
 
@@ -140,48 +187,49 @@
140
187
 
141
188
  ### Fixed
142
189
 
143
- - Feature toggle detection in single tenant mode
190
+ - Feature toggle detection in single-tenant mode
144
191
  - Log output for OData $batch requests
145
- - Avoid "catastrophic backtracking" issue in okra's tokenizer
192
+ - Avoid "catastrophic backtracking" issue in Okra's (OData V4 server) tokenizer
146
193
  - Transaction marked as committed too early
147
194
 
148
195
  ## Version 7.0.0 - 2023-06-21
149
196
 
150
197
  ### Added
151
198
 
152
- - Handling of expand with multiple `*` (e.g. $expand=*,*) in new parser. When using `*` in an expand the new OData parser now removes all unneeded `*`.
199
+ - Handling of expand with multiple `*` (e.g. `$expand=*,*`) in new parser. When using `*` in an `$expand`, the new OData
200
+ parser now removes all unneeded `*`.
153
201
  - Tests run with `cds.test()` now also load `cds-plugins`
154
202
 
155
203
  ### Changed
156
204
 
157
- - Result of `READ` events is now always an array. Previously, it could be `null/undefined` (now empty array), single object (now array with one entry) or array.
205
+ - Result of `READ` events is now always an array. Previously, it could be `null/undefined` (now empty array), a single object (now array with one entry), or array.
158
206
  - OData: `PUT`/`PATCH` requests resulting in a new entity (i.e., the `UPSERT` effectively was an `INSERT`) return status code 201
159
207
  - Draft: Draft activate requests resulting in an `UPDATE` return status code 200
160
208
  - ETags are validated via `WHERE EXISTS` clause attached to query on `GET`, `PUT`/`PATCH`, and `DELETE`
161
209
  - OData: `PUT`/`PATCH` with `if-match` header prevents `UPSERT`, i.e., only an existing entity can be updated by such a request
162
210
  - Runtime support for `@sap/instance-manager` is removed in favor of the `cds-mtxs` Service Manager client.
163
- - In multitenant mode, the HANA pool uses the `cds-mtxs` credentials cache
211
+ - In multitenant mode, the SAP HANA pool uses the `cds-mtxs` credentials cache
164
212
  - Draft handlers are registered for all entities.
165
213
  - Decimals in client input are validated in runtime's assert framework (previously OData adapter)
166
214
  - `cds build` and `cds deploy --to hana` have moved to `@sap/cds-dk`. Upgrade `@sap/cds-dk` to version 7 to continue using these commands.
167
215
  - Changed the behavior of `SELECT` queries for single entities to return `undefined` instead of `null` when no record is found.
168
- - Fiori preview has moved to new `@sap/cds-fiori` module.
169
- - Numbers are now always used as placeholders in SQL, except for `SELECT 1 From...`, `LIMIT` and the comparison of two numeric values (e.g. `1 eq 1`).
216
+ - Fiori preview has moved to the new `@sap/cds-fiori` module.
217
+ - Numbers are now always used as placeholders in SQL, except for `SELECT 1 From...`, `LIMIT`, and the comparison of two numeric values (e.g., `1 eq 1`).
170
218
  - Only new major version 3 of SAP Cloud SDK is from now on supported. Please make sure to upgrade. Version 2 is not maintained anymore.
171
- - `@protocol` annotation can be used to serve multiple protocols per service.
172
- - Per default, services are served with a protocol-specific prefix (for example '/odata/v4' for a service using the OData V4 protocol). To also serve without this prefix, as it was the case in older @sap/cds versions, the flag `cds.env.features.serve_on_root` can be set to `true`. Alternatively, the `@path` annotation can be used to explicitely specify an absolute path (with a leading `/`).
219
+ - `@protocol` annotation can serve multiple protocols per service.
220
+ - Per default, services are served with a protocol-specific prefix (for example, '/odata/v4' for a service using the OData V4 protocol). To also serve without this prefix, as was the case in older `@sap/cds` versions, the flag `cds.env.features.serve_on_root` can be set to `true`. Alternatively, the `@path` annotation can be used to explicitly specify an absolute path (with a leading `/`).
173
221
  - `cds.requires.middlewares` is enabled by default.
174
- - The order of csv files that `cds deploy --to sqlite` uses now reflects the dependency order of cds models. This is needed if `UPSERT` is used to create a logically correct deployment.
175
- - `cds.fiori.lean_draft` is activated by default. You can still set it to `false` as fallback.
222
+ - The order of CSV files that `cds deploy --to sqlite` uses now reflects the dependency order of cds models. This is needed if `UPSERT` is used to create a logically correct deployment.
223
+ - `cds.fiori.lean_draft` is activated by default. You can still set it to `false` as a fallback.
176
224
 
177
225
  ### Fixed
178
226
 
179
227
  - UUID typed key properties are no longer automatically filled during UPSERT
180
228
  - OData: When undefined in the payload, requests for actions with not nullable array-type parameters result in a client-side error
181
- - Missing `GROUP BY` in request with $apply in combination with aggregate on restricted entity
182
- - When `@sap/cds` was not installed underneath project root, cds-plugins where not found
229
+ - Missing `GROUP BY` in request with `$apply` in combination with aggregate on restricted entity
230
+ - When `@sap/cds` was not installed underneath project root, cds-plugins were not found
183
231
  - Support for multiline texts in `properties` files
184
- - Error when reading auth protected entities with infix filter in expand
232
+ - Error when reading auth-protected entities with infix filter in expand
185
233
  - Glitch in transaction handling in case of concurrent async before handlers
186
234
 
187
235
  ### Removed
@@ -195,7 +243,7 @@
195
243
  - Internal `req.getUriInfo()` and `req.getUrlObject()`
196
244
  - `cds deploy --to hana` is now part of `@sap/cds-dk`.
197
245
  - Deprecated compat mode `cds.env.features.cds_tx_protection = false`
198
- - Beta `AuditLogService` and out-of-the-box audit logging. Use plugin `@cap-js/audit-logging` instead.
246
+ - Beta `AuditLogService` and out-of-the-box audit logging. Use the plugin `@cap-js/audit-logging` instead.
199
247
 
200
248
  ## Version 6.8.4 - 2023-06-14
201
249
 
@@ -220,7 +268,7 @@
220
268
  - Nested `$expand` OData query to the `texts` compiler-generated composition for entities with localized elements.
221
269
  For example, similar OData requests `Entity?$expand=items($expand=item($expand=texts))` now should work as expected.
222
270
  - `req.subject` would occasionally be incorrect when a query had been executed prior to it.
223
- - cds plugins are also fetched from `devDependencies`
271
+ - cds plugins are also fetched from the development dependencies (`devDependencies`) section in `package.json`
224
272
  - `cds build` now correctly resolves complex models of mtx extension projects
225
273
 
226
274
  ## Version 6.8.1 - 2023-05-04
@@ -234,12 +282,12 @@ For example, similar OData requests `Entity?$expand=items($expand=item($expand=t
234
282
  ### Added
235
283
 
236
284
  - Global cds-dk version is now included in tabular output of `cds v -i`.
237
- - Audit logging support for OAuth2 Plan
238
- - Feature flag to limit the max number of requests in a Odata batch request. The max number can be specified with a number in `cds.odata.batch_limit`.
285
+ - Audit logging support for the OAuth2 Plan
286
+ - Feature flag to limit the maximum number of requests in an OData batch request. The max number can be specified with a number in `cds.odata.batch_limit`.
239
287
  - Custom authentication in `enterprise-messaging`
240
288
  - Requests with lambda expressions are rejected by remote services of kind `odata-v2`
241
289
  - `cds build` ignores invalid entries in `undeploy.json`
242
- - New `minorUnit` element in `sap.common.Currencies` for how many fractions the minor unit takes (e.g. `0`, or `2`). See https://www.npmjs.com/package/@sap/cds-common-content for matching content.
290
+ - New `minorUnit` element in `sap.common.Currencies` for how many fractions the minor unit takes (e.g., `0` or `2`). See https://www.npmjs.com/package/@sap/cds-common-content for matching content.
243
291
  - Support for `$user.<attr> is null` and `$user.<attr> is not null` in `@restrict.where`. `is null` matches `null` and `[]`, `is not null` matches arrays with at least one entry as well as `!= null` if no array.
244
292
  - Plugins are now also fetched from `devDependencies`, unless `NODE_ENV === 'production'`
245
293
  - Plugins can now provide `cds` configurations in their package.json.
@@ -248,30 +296,30 @@ For example, similar OData requests `Entity?$expand=items($expand=item($expand=t
248
296
  ### Changed
249
297
 
250
298
  - Texts for _Country_ are changed to _Country/Region_ in `@sap.common.Countries`
251
- - Resolved issue where selection strategies of destination options in multitenant applications were not working correctly, resulting in runtime errors.
299
+ - Resolved an issue where selection strategies of destination options in multitenant applications were not working correctly, resulting in runtime errors.
252
300
  The fix relies on the `@sap-cloud-sdk/connectivity` npm package to be installed.
253
301
  - Precision of timestamp used in outbox message increased to 100 nanoseconds (`YYYY-MM-DD hh:mm:ss.nnnnnnn`)
254
- - When a draft is locked by another user, the error message now includes the username of that user
302
+ - When another user locks a draft, the error message now includes the username of that user
255
303
 
256
304
  ### Fixed
257
305
 
258
- - fix exported types of the `cds` core API
306
+ - Fix exported types of the `cds` core API
259
307
  - cds build uses the correct path if no project dir is given
260
- - Read after write for updates on to-one navigation
308
+ - Read after write for updates on-to-one navigation
261
309
  - Error in $orderBy in combination with @Core.MediaType property
262
310
  - Fixes in lean-draft
263
311
  - Fixed an issue where the combined `$search` and `$expand` query and localized data was returning empty results on SAP HANA
264
312
  - Tests using `cds.test` no longer crash with a segmentation fault if `injectGlobals: false` is set in the Jest configuration.
265
- - Handlers registered with `cds.on('shutdown')` are now called with an `err` argument in case the shutdown happened in response to uncaught exceptions or unhandled rejected Promises.
266
- - Log output on uncaught exceptions or unhandled rejected Promises now is done via `cds.log` instead of `console`.
267
- - New config option `cds.env.server.force_exit_timeout` allows to configure the timeout in ms after which we force-exit the server (default: 1111) if it didn't do so as expected after a prior `server.close()`. Values `false` or `0` disable force-exit.
313
+ - Handlers registered with `cds.on('shutdown')` are now called with an `err` argument if the shutdown happened in response to uncaught exceptions or unhandled rejected Promises.
314
+ - Log output on uncaught exceptions, or unhandled rejected Promises now is done via `cds.log` instead of `console`.
315
+ - New config option `cds.env.server.force_exit_timeout` allows to configure the timeout in ms, after which we force-exit the server (default: 1111) if it didn't do so as expected after a prior `server.close()`. Values `false` or `0` disable force-exit.
268
316
  - Require custom auth relative to project root when using pluggable middlewares
269
317
 
270
318
  ## Version 6.7.2 - 2023-04-24
271
319
 
272
320
  ### Fixed
273
321
 
274
- - Try to destroy nonexistant socket in case of custom streaming implementation
322
+ - Try to destroy nonexistent socket in case of custom streaming implementation
275
323
  - Draft: Missing field `IsActiveEntity` in target path of error messages during `draftActivate`
276
324
  - Minor fixes for `cds.fiori.lean_draft`
277
325
  - Error in media type check when no `Content-Type` header is found
@@ -293,7 +341,7 @@ The fix relies on the `@sap-cloud-sdk/connectivity` npm package to be installed.
293
341
 
294
342
  ### Added
295
343
 
296
- - Config `cds.ql.quirks_mode` as a compatibility flag to still support behaviours which are undocumented, or even against the specifications, for example CQN:
344
+ - Config `cds.ql.quirks_mode` as a compatibility flag to still support behaviors which are undocumented or even against the specifications, for example, CQN:
297
345
  ```js
298
346
  let q = INSERT.into('Books')
299
347
  //> According to CQN spec should return:
@@ -305,7 +353,7 @@ The fix relies on the `@sap-cloud-sdk/connectivity` npm package to be installed.
305
353
  - `cds build` now checks extension point restrictions defined by the SaaS app provider. `cds build` fails if any restrictions are violated.
306
354
  - Typings for `cds.spawn()`
307
355
  - Typings for `entity.drafts`
308
- - Typings for winston logger
356
+ - Typings for Winston logger
309
357
  - Typings for `cds.context`
310
358
  - Typings for `service.on`, `service.before`, and `service.after` for actions and CRUD events
311
359
  - CLI command `cds env` now allows property paths with `/` instead of `.`, which allows usages like that:
@@ -313,7 +361,7 @@ The fix relies on the `@sap-cloud-sdk/connectivity` npm package to be installed.
313
361
  cds env requires/cds.xt.ModelProviderService
314
362
  ```
315
363
  - `cds.env` now allows to statically set/add profiles via `cds.profile` and `cds.profiles` in package.json.
316
- - `cds.env` now also supports using profiles in definitions of presets, i.e., in `cds.requires.kinds`.
364
+ - `cds.env` now also supports using profiles in preset definitions, i.e., in `cds.requires.kinds`.
317
365
  - `cds deploy` prints a warning when using Cloud Foundry client version less than 8.
318
366
  - `req.subject` to conveniently operate on the subjects targeted by the request. Example usage:
319
367
  SELECT.one.from(req.subject) //> returns single
@@ -326,8 +374,8 @@ cds env requires/cds.xt.ModelProviderService
326
374
 
327
375
  - CQL types now attach additional functionality to entities where appropriate
328
376
  - `cds.log().trace()` now logs stack traces in `DEBUG` level, before that was on `TRACE`/`SILLY` level only
329
- - Plain SQL queries now have `req.event === undefined`, formerly this had non-deterministic values.
330
- - Plain SQL queries don't allow to register custom handlers, other than for event `'*'`.
377
+ - Plain SQL queries now have `req.event === undefined`. Formerly this had non-deterministic values.
378
+ - Plain SQL queries don't allow registering custom handlers, other than for event `'*'`.
331
379
  - Plain SQL queries are only supported on database services, not on application services.
332
380
  - CQN representation of `columns=*` is not allowed anymore, instead `columns=['*']` should be used. This also applies to expand.
333
381
  - Only draft roots can be created via direct, non-navigation OData `POST` requests.
@@ -336,19 +384,19 @@ cds env requires/cds.xt.ModelProviderService
336
384
 
337
385
  ### Fixed
338
386
 
339
- - Specifying a key in `SELECT.from(...)` is now typed to produce a single result, instead of an array of results
387
+ - Specifying a key in `SELECT.from(...)` is now typed to produce a single result instead of an array of results
340
388
  - Proper handling of `IsActiveEntity` in error paths
341
- - For cloudevents using AMQP, the type is set to `application/cloudevents+json`
389
+ - For cloud events using AMQP, the type is set to `application/cloudevents+json`
342
390
  - Use `message` property in typings.
343
391
  - Typings for `cds.on('bootstrap', app => {app.use(...)`
344
392
  - Return types for `User` and `delete` in typescript
345
393
  - Typings for connect options
346
394
  - Typings for `req.error`
347
395
  - Deployment in sidecar
348
- - Error with restricting an entity and request it with $apply in combination with aggregate
396
+ - Error with restricting an entity and requesting it with `$apply` in combination with aggregate
349
397
  - Combined usage of `$skiptoken` and `$skip`
350
398
  - Error `package.json file is missing` in mtx extension builds
351
- - CLI commands w/ unknown arguments (`cds --foo`) clearly fail again with a proper error message
399
+ - CLI commands w/ unknown arguments (`cds --foo`) fail again with a proper error message
352
400
 
353
401
  ## Version 6.6.2 - 2023-03-17
354
402
 
@@ -361,7 +409,7 @@ cds env requires/cds.xt.ModelProviderService
361
409
 
362
410
  ### Added
363
411
 
364
- - `cds.xt.TENANT_UPDATED` event is emitted once a tenant was extended
412
+ - `cds.xt.TENANT_UPDATED` event is emitted once a tenant is extended
365
413
 
366
414
  ### Fixed
367
415
 
@@ -382,21 +430,21 @@ cds env requires/cds.xt.ModelProviderService
382
430
 
383
431
  ### Changed
384
432
 
385
- - `cds.serve(ServiceName)` (and `cds serve -s ServiceName`) now exactly serve services with the given names. Previously, all services that ended with the given name were served as well, e.g. `MyServiceName` and `ServiceName`, which might be problematic for applications that bootstrap services one by one.
433
+ - `cds.serve(ServiceName)` (and `cds serve -s ServiceName`) now exactly serve services with the given names. Previously, all services that ended with the given name were served as well, e.g., `MyServiceName` and `ServiceName`, which might be problematic for applications that bootstrap services one by one.
386
434
  - Optimize `@cds.persistence.journal` filtering for `last-dev` CSN file.
387
435
 
388
436
  ### Fixed
389
437
 
390
- - `cds deploy --to hana` no longer calls `cds bind` when `VCAP_SERVICES` is provided, e.g via `default-env.json`.
438
+ - `cds deploy --to hana` no longer calls `cds bind` when `VCAP_SERVICES` is provided, for example, via `default-env.json`.
391
439
  - `$search` on an entity without String elements
392
440
  - Only elements from type `cds.String` are searchable when combining `$apply` and `$search`
393
441
  - Error message for missing database connection in draft case
394
442
  - Extensibility with in-memory Sqlite
395
443
  - OData adapter error messages
396
- - Columns in navigation path are now added to the SELECT.columns in new parser
397
- - Application service calls on draft enabled entities using aliases
444
+ - Columns in navigation path are now added to the SELECT.columns in the new parser
445
+ - Application service calls on draft-enabled entities using aliases
398
446
  - Custom mtxs build tasks now use the correct default `src` folder value.
399
- - `cds build` adds a `.hdiconfig` file when creating HANA migration tables if none is existing.
447
+ - `cds build` adds a `.hdiconfig` file when creating SAP HANA migration tables if none exists.
400
448
  - UPSERTs using reserved keywords
401
449
  - Fix outbound-streaming error handling
402
450
  - Rollback transaction if inbound streaming fails
@@ -404,15 +452,15 @@ cds env requires/cds.xt.ModelProviderService
404
452
  - Concurrent etag calculation for UPDATE and DELETE
405
453
  - Typings for `cds.delete()`
406
454
  - CQN for `not` operator with OData functions
407
- - Expand on composition of aspect for draft enabled entities
408
- - Better error messages are provided for errors with HTTP status code `400`, `500` and `501`
455
+ - Expand on composition of aspect for draft-enabled entities
456
+ - Better error messages are provided for errors with HTTP status codes `400`, `500`, and `501`
409
457
 
410
458
  ## Version 6.5.0 - 2023-01-27
411
459
 
412
460
  ### Added
413
461
 
414
462
  - New aspect `sap.common.TextsAspect` in common.cds
415
- - New syntax for collection bound entities
463
+ - New syntax for collection-bound entities
416
464
 
417
465
  ### Changed
418
466
 
@@ -421,10 +469,10 @@ cds env requires/cds.xt.ModelProviderService
421
469
  SELECT.from `X` .where `x` .or `y` .where `z`
422
470
  //> SELECT from X where (x or y) and z`
423
471
  ```
424
- - `cds build` for HANA now adds an `engines.node` version to the generated `db/package.json`. This will help in the future when runtime environments change their default to some version higher than the one supported by `@sap/hdi-deploy`.
425
- - `cds build` checks the consistency of built-in models for java projects. An error is logged if some model files could not successfully be resolved indicating that a required npm module might be missing.
472
+ - `cds build` for SAP HANA now adds an `engines.node` version to the generated `db/package.json`. This will help in the future when runtime environments change their default to some version higher than the one supported by `@sap/hdi-deploy`.
473
+ - `cds build` checks the consistency of built-in models for Java projects. An error is logged if some model files cannot successfully be resolved, indicating that a required npm module might be missing.
426
474
  - Status code of draft actions are set in respective handler instead of protocol adapter
427
- - `cds deploy --dry` no longer loads the `sqlite3` module by mistake. This fixes a regression when building Java projects. As a side effect a file with the name `undefined` was created in the project root folder.
475
+ - `cds deploy --dry` no longer loads the `sqlite3` module by mistake. This fixes a regression when building Java projects. As a side effect, a file with the name `undefined` was created in the project root folder.
428
476
  - Internal representation of pseudo roles `internal-user` and `system-user`
429
477
 
430
478
  ### Fixed
@@ -432,7 +480,7 @@ cds env requires/cds.xt.ModelProviderService
432
480
  - Resolve i18n folders from the root directory
433
481
  - Types for `cds.test`
434
482
  - Types for `srv.send`
435
- - Optimized Search: Search queries for localized entities will now use default values, if no localized data is found in the corresponding localized tables on SAP HANA. Correct aliasing by search queries with navigation.
483
+ - Optimized Search: Search queries for localized entities will now use default values if no localized data is found in the corresponding localized tables on SAP HANA. Correct aliasing by search queries with navigation.
436
484
  - Resolution of `type of` references during minify in bootstrap
437
485
  - Generation of odata-v2 URL in case of select=* in `urlify()`
438
486
  - Build resets changed `cds.env` and `cds.root` when finished
@@ -446,18 +494,18 @@ cds env requires/cds.xt.ModelProviderService
446
494
  ### Fixed
447
495
 
448
496
  - `cds build` correctly creates a `resources.tgz` file for MTXS projects on Windows
449
- - `cds.deploy` for HANA now doesn't try to search for a globally installed `@sap/hdi-deploy` if there's no `npm` installed, e.g. on a Node.js server without `npm`
497
+ - `cds.deploy` for SAP HANA now doesn't try to search for a globally installed `@sap/hdi-deploy` if there's no `npm` installed, e.g., on a Node.js server without `npm`
450
498
  - Signature for `cds.ql.UPSERT`
451
499
  - Signature for `<srv>.delete().where()`
452
500
  - Signature for `SELECT.alias`
453
501
  - `UPSERT` requests for SQLite if only keys are provided
454
- - `cds.test` doesn't log database resets with `autoReset` enabled any more
455
- - The `cds.deploy` output for HANA is now correctly formatted in Kibana
502
+ - `cds.test` doesn't log database resets with `autoReset` enabled anymore
503
+ - The `cds.deploy` output for SAP HANA is now correctly formatted in Kibana
456
504
  - SAP HANA stored procedures containing implicit selects
457
505
  - Shorthand configuration for `graphql` in `cds.env.protocols`
458
506
  - If `cds.env.protocols` is set, `cds.requires.middlewares` is automatically turned on
459
507
  - `cds.context` middleware is split to initial handling of request correlation and user propagation
460
- - fix view resolving and managed data for UPSERT
508
+ - Fix view resolving and managed data for UPSERT
461
509
  - `cds.linked` supports polymorphic self links like in: `action foo( self: [many] $self, ...)`
462
510
  - Error with `@odata.draft.enabled` and `@restrict`
463
511
  - Skip mandatory check on navigation properties for write requests
@@ -480,11 +528,11 @@ cds env requires/cds.xt.ModelProviderService
480
528
 
481
529
  - Added several missing signatures in CQN types that are now in accordance with the current documentation.
482
530
  - `.columns(…)` of both `cql.SELECT` and `cql.INSERT` give improved code completion when paired when appropriate type definitions are present
483
- - Status code of error messages caused by empty `not null` fields is changed from `400` to `500` on database layer. Note, that as result the error message `Value is required` in production will be replaced by `Internal server error` in the HTTP response.
531
+ - Status code of error messages caused by empty `not null` fields is changed from `400` to `500` on database layer. As a result, the error message `Value is required` in production will be replaced by `Internal server error` in the HTTP response.
484
532
  - Underscores in environment variables can now be escaped by two `__` to set keys in `cds.env`. For example, use `CDS_FEATURES_WITH__MOCKS=...` to set `features.with_mocks`. Note that previously, this ended up as `features: { with_: { mocks:... }}`, so in rare cases, it might yield unexpected results.
485
- - `persistent-outbox`: Only programming errors lead to `process.exit()`, unrecoverable ones are only logged and their `attempts` are updated to `options.maxAttempts`
533
+ - `persistent-outbox`: Only programming errors lead to `process.exit()`, unrecoverable ones are only logged, and their `attempts` are updated to `options.maxAttempts`
486
534
  - Global configuration of CSRF-token handling for remote services `cds.env.features.fetch_csrf` is deprecated. Instead, please use `csrf: true/false` and `csrfInBatch: true/false` in the configuration of your remote services. These options will allow to configure CSRF-token handling for each remote service separately.
487
- - `cds build` no longer creates `engines` entry in package.json in case none has been defined. The Node.js version matched the minimal supported version of the CDS runtime and might therefore already be outdated.
535
+ - `cds build` no longer creates `engines` entry in package.json in case none has been defined. The Node.js version matched the minimal supported version of the CDS runtime and might, therefore already be outdated.
488
536
  - For streamlined MTX, `@sap/cds` now uses the custom SAP Service Manager client built into `@sap/cds-mtxs`
489
537
  - Require new package `@cap-js/graphql` for `cds compile -2 graphql`
490
538
 
@@ -498,13 +546,13 @@ cds env requires/cds.xt.ModelProviderService
498
546
  - Localized draft requests with nested expand in the case of `to many` now return localized data
499
547
  - Protected service root for REST adapter
500
548
  - `cds build` logs tar error message
501
- - Resolve view only with renamed fields in orderBy case
502
- - In case of `$apply` no default values for `top` or `skip` are set in subselects
503
- - Environment variables like `cds.requires.<service>.kind...` now consistently override services set in e.g. `package.json`
549
+ - Resolve view only with renamed fields in `orderBy` case
550
+ - In case of `$apply`, no default values for `top` or `skip` are set in subselects
551
+ - Environment variables like `cds.requires.<service>.kind...` now consistently override services set in, e.g. `package.json`
504
552
  - Expand of composition backlink now accesses draft instance instead of active
505
553
  - Performance of server bootstrap for services with lots of entities
506
554
  - Error with virtual properties in expand combined with draft
507
- - req.tenant is properly propagated by custom authentication in odata and rest
555
+ - `req.tenant` is properly propagated by custom authentication in odata and rest
508
556
  - Error with `SiblingEntity` in draft
509
557
  - Quoting of keys typed as `cds.String` in error targets. Error targets are a relative resource path to correlate error
510
558
  messages with the corresponding text input filed in the UI in an OData HTTP error response body for errors, warnings,
@@ -529,16 +577,16 @@ Content-Length: 145
529
577
  }
530
578
  ```
531
579
 
532
- - Application crash if batched Uri uses invalid percent encoding
533
- - `cds build` for SAP HANA no longer produces `hdbtabledata` for csv files that refer to non-existing entities. This can be the case for imported content packages that bring csv files for entities that are not used in the application model.
534
- - `cds build` for SAP HANA now gives precedence for csv files from application layer. This is important for imported content packages that bring csv files that shall be overwritten in the application layer.
580
+ - Application crash if batched Uri uses invalid percent-encoding
581
+ - `cds build` for SAP HANA no longer produces `hdbtabledata` for CSV files that refer to non-existing entities. This can be the case for imported content packages that bring CSV files for entities not used in the application model.
582
+ - `cds build` for SAP HANA now gives precedence for CSV files from application layer. This is important for imported content packages that bring CSV files that shall be overwritten in the application layer.
535
583
  - `cds build` for Java no longer adds the service `cds.xt.MTXServices` to the application model.
536
584
  - `cds build` no longer fails when creating large resource TAR archives for MTXS projects.
537
585
 
538
586
  ### Removed
539
587
 
540
- - Removed `PreconditionFailedError` when sending a request with an `if-match` header on an entity without an etag
541
- - Check for forbidden deep operations for associations on database layer. All non key fields for associations provided by request are ignored. Please check https://cap.cloud.sap/docs/guides/providing-services#associations-vs-compositions for more information. Note that this is a breaking change for applications that rely on checks for forbidden deep operations by runtime.
588
+ - Removed `PreconditionFailedError` when sending a request with an `if-match` header on an entity without an ETag
589
+ - Check for forbidden deep operations for associations on database layer. All non-key fields for associations provided by request are ignored. Please check https://cap.cloud.sap/docs/guides/providing-services#associations-vs-compositions for more information. Note that this is a breaking change for applications that rely on checks for forbidden deep operations by runtime.
542
590
 
543
591
  ## Version 6.3.2 - 2022-11-21
544
592
 
@@ -547,7 +595,7 @@ Content-Length: 145
547
595
  - `cds deploy` reports errors correctly
548
596
  - Reference resolution in QL API
549
597
  - `cds.parse.path` to correctly handle special characters
550
- - `cds build` issues on Windows: build with large number of files and build on Git Bash.
598
+ - `cds build` issues on Windows: build with a large number of files and build on Git Bash.
551
599
  - `odata` as default protocol for enabled middlewares feature
552
600
 
553
601
  ## Version 6.3.1 - 2022-11-04
@@ -558,14 +606,14 @@ Content-Length: 145
558
606
  - `cds deploy` handles empty result from `cf` call correctly
559
607
  - `$search` fails on columns composed by a CQL expression that uses the SAP HANA `coalesce` predicate
560
608
  - Draft ownership was erroneously checked for bound actions on active instances
561
- - `cds watch/run/serve --with-mocks` no longer start randomly with missing mocked services. This could happen if previous runs crashed with errors and left bad state in the local service registry.
609
+ - `cds watch/run/serve --with-mocks` no longer start randomly with missing mocked services. This could happen if previous runs crashed with errors and left a bad state in the local service registry.
562
610
 
563
611
  ## Version 6.3.0 - 2022-10-28
564
612
 
565
613
  ### Added
566
614
 
567
615
  - Additional type signatures for service methods in the query API
568
- - In case of error in a batch request, the @Core.ContentID is added to the details of the error message
616
+ - In case of an error in a batch request, the @Core.ContentID is added to the details of the error message
569
617
  - Extensibility: Use i18n files from extensions in edmx calculation
570
618
  - In messaging, you can listen to all messages in a queue by subscribing to `'*'`
571
619
  - Improved Log formatting for Cloud Foundry
@@ -598,7 +646,7 @@ Content-Length: 145
598
646
  ### Fixed
599
647
 
600
648
  - Change signature of cqn `SELECT.limit.offset` and `SELECT.limit.rows` to `val` instead of `number`
601
- - Parsing of store procedure SQL calls including the schema name. For example, `CALL "SCHEMA"."PROC"(?)` and `CALL SCHEMA.PROC(?)`
649
+ - Parsing of store procedure SQL calls, including the schema name. For example, `CALL "SCHEMA"."PROC"(?)` and `CALL SCHEMA.PROC(?)`
602
650
  - Add property name in the error message on validation of the value
603
651
  - Kibana and Cloud Foundry formatter: do not log cookie header value
604
652
  - Missing SQL aliases for `$search` queries combined with `$orderBy` query option
@@ -661,9 +709,9 @@ Content-Length: 145
661
709
  DEBUG?.(...)
662
710
  ```
663
711
  - All MTX-related modules have been refactored and moved to `@sap/cds-mtxs`.
664
- Ensure to also upgrade to latest version of `@sap/cds-mtxs` when upgrading `@sap/cds` to avoid any breaking change effects.
712
+ Ensure to also upgrade to the latest version of `@sap/cds-mtxs` when upgrading `@sap/cds` to avoid any breaking change effects.
665
713
  - SQLite database file endings have been changed to `.sqlite`, so third-party tools (e.g. VS Code extensions) can deduce the file type.
666
- - Method `disconnect()` in db services empties db pool w/o removing db services. In special cases (like tests) cleaning-up db service should be done manually while deleting `cds.services.db` and `cds.db`.
714
+ - Method `disconnect()` in db services empties db pool w/o removing db services. In special cases (like tests), cleaning-up db service should be done manually while deleting `cds.services.db` and `cds.db`.
667
715
  - Prefer HANA driver that is required in package.json of project root
668
716
 
669
717
  ### Fixed
@@ -672,24 +720,24 @@ Content-Length: 145
672
720
  - Signatures for QN `order_by` expressions are now in line with the capire doc
673
721
  - Signatures for QL operations are now more specific
674
722
  - `basic-auth` does not inherit users of `mocked-auth`
675
- - `cds.localize` now ignores i18n files defined outside project scope.
723
+ - `cds.localize` now ignores i18n files defined outside the project scope.
676
724
  - Allow `@Capabilities.NavigationRestrictions.RestrictedProperties` to be specified in the format `{ InsertRestrictions.Insertable: false }`
677
725
  - Bound actions/functions while calling remote service
678
726
  - `$search`: Search on localized projections/views does not always return the localized data
679
727
  - `cds push` now shows better output for failed extension validations
680
728
  - Aliased parameters in REST parser
681
729
  - `cds.deploy` now logs the correct filename for multitenant SQLite
682
- - HDI configuration data (e.g. `./cfg`, `.hdiignore`) and HANA native artifacts have not always been copied into the `sdc` folder of a MTX sidecar module
730
+ - HDI configuration data (e.g., `./cfg`, `.hdiignore`) and HANA native artifacts have not always been copied into the `sdc` folder of an MTX sidecar module
683
731
  - OData URL to CQN parser (`cds.env.features.odata_new_parser`) now supports functions with no arguments
684
732
  - Runtime exception for `PATCH` HTTP request with an empty payload body and read-only field
685
733
  - Streams in draft caused SQL error
686
734
  - Better response state handling during `cds deploy` to Cloud Foundry.
687
- - Draft: patch on draft enabled entity with a composition of one
735
+ - Draft: patch on draft-enabled entity with a composition of one
688
736
  - Maximum stack trace exceeded in generic audit logging implementation
689
- - The protocol adapter logs the decoded URI or the original one, if it is invalid
737
+ - The protocol adapter logs the decoded URI or the original one if it is invalid
690
738
  - REST: reject action calls with round brackets (parentheses). For example, the request `/Books(1)/bookShelf.CatalogService.rate()` is now rejected.
691
739
  - `cds deploy` and `cds run/serve/watch` no longer print terminal escape sequences (`x1b...`) if they run non-interactively.
692
- - Some fields in entities like `path` generated invalid sql
740
+ - Some fields in entities like `path` generated invalid SQL
693
741
 
694
742
  ## Version 6.1.3 - 2022-09-13
695
743
 
@@ -718,9 +766,9 @@ Content-Length: 145
718
766
  - Performance issue for OData <entity>/$count requests
719
767
  - Typescript definition for SQL-native variant of `srv.run`, like `srv.run('SELECT * from Authors where name like ?',['%Poe%'])`
720
768
  - Typescript definitions for `srv.run( [query] )` and `srv.send( {query, headers} )`
721
- - Typescript definitions for `cds.log` are improved, level indicators like `cds.log()._debug` added
769
+ - Typescript definitions for `cds.log` are improved, and level indicators like `cds.log()._debug` added
722
770
  - Typescript definitions for `tx` now carry additional service methods
723
- - `cds login` now returns errors with a better root cause messages
771
+ - `cds login` now returns errors with better root cause messages
724
772
  - `$expand` requests for to-one associations that do not select the foreign key
725
773
  - `UPDATE` statement accepts empty objects: `UPDATE('Foo').with({ bar: {} })`
726
774
  - URI encoding of parameters in remote service calls
@@ -731,7 +779,7 @@ Content-Length: 145
731
779
  - The configuration schema now includes `cds.extends` and `new-fields` (in `cds.xt.ExtensibilityService`)
732
780
  - Ability to run extension validations as part of `cds lint`
733
781
  - The `/-/cds/login` endpoint now also supports client credentials authentication
734
- - `srv.run(fn)` now accepts a function as first argument, which will be run in an active outer transaction, if any, or in a newly created one. This is in contrast to `srv.tx(fn)` which always creates a new tx.
782
+ - `srv.run(fn)` now accepts a function as first argument, which will be run in an active outer transaction, if any, or in a newly created one. This is in contrast to `srv.tx(fn)`, which always creates a new tx.
735
783
  ```js
736
784
  cds.run (tx => { // nested operations are guaranteed to run in a tx
737
785
  await INSERT.into (Foo, ...)
@@ -829,13 +877,13 @@ Content-Length: 145
829
877
  await SELECT.from('sqlite_master')
830
878
  await cds.read('sqlite_master')
831
879
  ```
832
- Caveat: the following undocumented usage of unqualified names happened to work in the past.
880
+ Caveat: The following undocumented usage of unqualified names happened to work in the past.
833
881
  But this was very fragile and caused lots of issues, and therefore was removed:
834
882
  ```sql
835
883
  await SELECT.from('Books')
836
884
  await cds.read('Books')
837
885
  ```
838
- Always use qualified names, or reflected definitions instead:
886
+ Always use qualified names or reflected definitions instead:
839
887
  ```sql
840
888
  const Books = 'sap.capire.bookshop.Books'
841
889
  await SELECT.from(Books)
@@ -864,7 +912,7 @@ Content-Length: 145
864
912
  - `cds build` no longer generates EDMX files for services that aren't odata protocol enabled
865
913
  - `cds deploy` handles orgs and spaces containing commas correctly
866
914
  - Incorrect decoding of special characters when reading data of type `cds.LargeString` from SAP HANA using `hdb@^0.19.5` driver
867
- - The payload is added to the delete request in rest adapter as req.data
915
+ - The payload is added to the delete request in rest adapter as `req.data`
868
916
 
869
917
  ## Version 6.0.4 - 2022-07-20
870
918
 
@@ -885,7 +933,7 @@ Content-Length: 145
885
933
  - `--vap-file` parameter of `cds deploy` is available again
886
934
  - `cds build` no longer throws an error if `@sap/cds-mtx` library (classic MTX) isn't installed locally.
887
935
  - `cds.spawn` no longer tries to reuse a transaction
888
- - Custom query parameter caused bad request on certain characters in rest adapter
936
+ - Custom query parameter caused bad request on certain characters in REST adapter
889
937
  - `cds-ts` no longer fails with an `ERR_UNKNOWN_FILE_EXTENSION` error
890
938
  - Timeouts when sending string payloads to remote services
891
939
  - `cds.context.http` for `$batch` using atomicity groups
@@ -895,7 +943,7 @@ Content-Length: 145
895
943
  ### Fixed
896
944
 
897
945
  - Jest tests do not fail any longer because of logs during app shutdown
898
- - `cds build` now uses correct `mtx/sidecar` context. This avoids redundant `cds-mtxs` npm dependency for Java projects.
946
+ - `cds build` now uses the correct `mtx/sidecar` context. This avoids redundant `cds-mtxs` npm dependency for Java projects.
899
947
 
900
948
  ## Version 6.0.1 - 2022-07-05
901
949
 
@@ -933,7 +981,7 @@ Content-Length: 145
933
981
  > while calling it without `new` it throws immediately. The latter is
934
982
  > useful for usages like that:
935
983
 
936
- - Improved `req.error` to always turn each recorded error in to an instance of `Error` with own stack trace.
984
+ - Improved `req.error` to always turn each recorded error into an instance of `Error` with its own stack trace.
937
985
  Multiple errors are finally thrown as an array of these errors with `.message = 'MULTIPLE_ERRORS'`
938
986
  and `.details = this` (the latter is for compatibility to former releases).
939
987
 
@@ -1027,7 +1075,7 @@ stay intact until the transaction is committed or rolled back.
1027
1075
  - The `file` option of file-based messaging is now on top level (before it was in `credentials`)
1028
1076
  - Optimized Search: `cds.env.features.optimized_search=true` is now the default behavior.
1029
1077
  - `cds build` no longer generates CF manifest files for Nodejs and HANA db deployer modules.
1030
- - `cds build` no longer supports WebIDE Fullstack compatibility mode. Consequently HANA artifacts and service EDMX files for Fiori modules might no longer be correctly generated.
1078
+ - `cds build` no longer supports WebIDE Fullstack compatibility mode. Consequently, SAP HANA artifacts and service EDMX files for Fiori modules might no longer be correctly generated.
1031
1079
  - Remote services: Batched `GET` requests will not fetch CSRF tokens
1032
1080
  - CQN now uses `xpr` correctly instead of brackets in `where`
1033
1081
  - `process.exit` is called again by `cds run/serve` and `watch`, to gain a reliable `exit` event for cleanup tasks. Before, this would be spoiled by apps that do not shut down the event loop properly.
@@ -1040,19 +1088,19 @@ stay intact until the transaction is committed or rolled back.
1040
1088
  - `cds build` supports initial data in CSV files that are located in any 'csv' or 'data' subfolder of some CDS model file. This also implies CSV files stored in reuse modules. Now, this behaviour is consistent with SQLite deployment. If the location of some CSV file has changed, a deployment error might be returned. In that case previously deployed `hdbtabledata` files have to be undeployed.
1041
1089
  - `cds deploy` reads Cloud Foundry file `config.json` to get org and space information.
1042
1090
  - New REST adapter replaced old (limited) implementation
1043
- - Default behaviour for runtime integrity checks. From now on no integrity checks will be done by default.
1044
- Note that this is a breaking change for appliations that rely on automatic integrity checks by runtime. We recommend to use `cds.env.features.assert_integrity`: `db` to switch on database integrity constraints. The value `app` can be used as fallback to previous behaviour.
1091
+ - Default behavior for runtime integrity checks. From now on no integrity checks will be done by default.
1092
+ Note that this is a breaking change for applications that rely on automatic integrity checks by runtime. We recommend using `cds.env.features.assert_integrity`: `db` to switch on database integrity constraints. The value `app` can be used as fallback to previous behavior.
1045
1093
  - `cds build` no longer copies `.env` or `default-env.json` files into the deployment folder.
1046
- - OData `POST`, `PATCH` and `PUT` requests as well as draft-related `draftEdit` and `draftActivate` actions are now followed by an additional `READ` request to the application service. Consequently affected functionality:
1047
- + It is now sufficient to have a custom `READ` handler in order to adjust the response (e.g. to handle virtual properties) of the modification request.
1094
+ - OData `POST`, `PATCH`, and `PUT` requests and draft-related `draftEdit` and `draftActivate` actions are now followed by an additional `READ` request to the application service. Consequently, affected functionality:
1095
+ + It is now sufficient to have a custom `READ` handler in order to adjust the response (e.g., to handle virtual properties) of the modification request.
1048
1096
  + A user is now required to be authorized to read updated data e.g. a user having a role restricted with "INSERT-only" annotation pattern will get empty results in response to `POST` request.
1049
1097
  + For compatibility reasons, `req._` of the modification request is uplinked to `req._` of the follow-up `READ` request so that one still can access original `req._.req/res` request objects of the modification request within the corresponding `READ` handlers.
1050
1098
  + Modification logs are now followed by corresponding access logs.
1051
1099
  + More details can be found in cds v6.0.0 release notes.
1052
1100
  - Message for PreconditionFailedError is now configurable in messages.properties
1053
1101
  - Remove circular references in Kibana logging
1054
- - Error sanitization in production is skipped for custom errors with HTTP code `5xx`. From now on, it's possible for an app developer to return any error message to the client.
1055
- Note that this is a breaking change for appliations that rely on error sanitization for custom errors in production. The behaviour of errors thrown by CAP framework is unchanged.
1102
+ - Error sanitization in production is skipped for custom errors with HTTP code `5xx`. From now on, an app developer can return any error message to the client.
1103
+ Note that this is a breaking change for applications that rely on error sanitization for custom errors in production. The behavior of errors thrown by CAP framework is unchanged.
1056
1104
 
1057
1105
  ### Fixed
1058
1106
 
@@ -1078,7 +1126,7 @@ In such scenarios, now the HTTP `404 Not Found` status code is returned rather t
1078
1126
  - All entities in `@sap/cds/common` have now proper CDS doc comments
1079
1127
  - `cds build` uses `package.json` and `package-lock.json` files located in `srv` folder for deployment if existing. Before, `package.json` and `package-lock.json` files of the project root folder have always been taken.
1080
1128
  - Pass options from `cds.parse.expr` to `cdsc.parse.expr`.
1081
- - Avoid error that is caused e.g. in a streaming scenario when there is an issue while processing the stream. Trying to change/send the response object could cause a crash because the response was sent already.
1129
+ - Avoid error that is caused, e.g., in a streaming scenario when there is an issue while processing the stream. Trying to change/send the response object could cause a crash because the response was sent already.
1082
1130
  - Correct URL generation for `Integer64` and `Decimal` for remote services
1083
1131
  - Operation parameters from structured type and annotated with @open are not filtered from the input query
1084
1132
  - Services are secured by default in production. Can be disabled via feature flag `cds.env.requires.auth.restrict_all_services: false` or by using `mocked-auth`.
@@ -1101,7 +1149,7 @@ In such scenarios, now the HTTP `404 Not Found` status code is returned rather t
1101
1149
  - `cds version` now handles array-valued entries for `folders.db`and `folders.srv` gracefully when looking for MTX sidecar
1102
1150
  - OData access of entities named `get` and `set`
1103
1151
  - missing brackets for OR condition in `.where()` when requesting by navigation
1104
- - `cds build` now correctly supports nodejs apps that do not have a service module defined. In these cases the build task's _src_ folder has to be configured as "."
1152
+ - `cds build` now correctly supports Node.js apps that do not have a service module defined. In these cases, the build task's _src_ folder has to be configured as "."
1105
1153
  - `cds build <dir>` is now correctly executed if called by npm script or mta build.
1106
1154
  - `cds deploy` now shows a better error message on INSERT errors (on SQLite).
1107
1155
 
@@ -1148,8 +1196,8 @@ In such scenarios, now the HTTP `404 Not Found` status code is returned rather t
1148
1196
  - Ignored requests in batch requests
1149
1197
  - `pool` module for logger facade is separated from `hana` database logger. Timeout error by acquiring client from pool is now enhanced with `_poolState` providing current pool attibutes.
1150
1198
  - Multiple errors did not have correct HTTP response status code
1151
- - `POST|PUT|PATCH` requests with `charset` directive in `Content-Type` header (e.g. `Content-Type: application/json; charset=utf-8`) no longer issues an error "Invalid content type" in REST adapters
1152
- - Call hana procedure:
1199
+ - `POST|PUT|PATCH` requests with `charset` directive in `Content-Type` header (e.g., `Content-Type: application/json; charset=utf-8`) no longer issues an error "Invalid content type" in REST adapters
1200
+ - Call SAP HANA procedure:
1153
1201
  + accepted are any symbols in a procedure name if it is delimited with a double quotation (`"`)
1154
1202
  + fixed results for table output parameters when using `@sap/hana-client`; **limitation**: output parameters in a `CALL` statement must follow the same order used in a stored procedure definition
1155
1203
  - `@odata.context` considers `cds.env.odata.contextAbsoluteUrl` when requesting an OData Service
@@ -1217,7 +1265,7 @@ In such scenarios, now the HTTP `404 Not Found` status code is returned rather t
1217
1265
  - URL encoding for remote services for CQN queries
1218
1266
  - `cds serve` during development again redirects URLs for UI apps in a folder with the same name as a service, so `/foo/webapp` would redirect to `/foo` again. This got broken in 5.8.3.
1219
1267
  - Endless loop in localization handling
1220
- - Ensure service impl while extending entity from the service
1268
+ - Ensure service implementation while extending entity from the service
1221
1269
  - Post-processing of custom draft queries
1222
1270
  - `cds build` no longer omits unused CDS type definitions, leading to Java compiler errors
1223
1271
 
@@ -1226,7 +1274,7 @@ In such scenarios, now the HTTP `404 Not Found` status code is returned rather t
1226
1274
  ### Added
1227
1275
 
1228
1276
  - Enable custom audit logging implementation by subclassing or prepending `cds.AuditLogService`
1229
- - Log authentication/authorization traces, for example, authentication strategy, and access control decisions to facilitate troubleshooting in debug mode.
1277
+ - Log authentication/authorization traces, for example, authentication strategy and access control decisions to facilitate troubleshooting in debug mode.
1230
1278
  - Bound functions and actions calls with odata-v2 from remote service
1231
1279
  - Beta support for procedure calls with table output data (SAP HANA only)
1232
1280
  + Both hdb and `@sap/hana-client` currently do not support parameter metadata for table output. To provide the functionality anyways, CAP must fetch the metadata itself. As this is not CAP's expertise, the feature is only beta.
@@ -1499,7 +1547,7 @@ In such scenarios, now the HTTP `404 Not Found` status code is returned rather t
1499
1547
 
1500
1548
  ### Fixed
1501
1549
 
1502
- - Instance-based restriction for activation of draft enabled entities
1550
+ - Instance-based restriction for activation of draft-enabled entities
1503
1551
  - `.columns('*')` on projections of remote services using renamed properties
1504
1552
  - GraphQL filters on nested fields are now applied correctly
1505
1553
  - Performance degradation during the processing of `where exists`