@sap/cds 5.8.4 → 5.9.2

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 (248) hide show
  1. package/CHANGELOG.md +198 -77
  2. package/app/fiori/preview.js +16 -11
  3. package/app/fiori/routes.js +15 -8
  4. package/app/index.js +1 -1
  5. package/bin/build/buildTaskFactory.js +3 -3
  6. package/bin/build/buildTaskProviderFactory.js +1 -1
  7. package/bin/build/constants.js +1 -1
  8. package/bin/build/provider/buildTaskHandlerEdmx.js +12 -7
  9. package/bin/build/provider/buildTaskHandlerInternal.js +1 -1
  10. package/bin/build/provider/buildTaskProviderInternal.js +8 -2
  11. package/bin/build/provider/hana/2migration.js +27 -24
  12. package/bin/build/provider/hana/index.js +17 -18
  13. package/bin/build/provider/hana/migrationtable.js +9 -10
  14. package/bin/build/provider/java-cf/index.js +4 -5
  15. package/bin/build/provider/node-cf/index.js +99 -6
  16. package/bin/cds.js +17 -18
  17. package/bin/deploy/to-hana/cfUtil.js +16 -19
  18. package/bin/deploy/to-hana/hana.js +7 -24
  19. package/bin/deploy/to-hana/hdiDeployUtil.js +8 -4
  20. package/bin/mtx/in-cds.js +2 -2
  21. package/bin/serve.js +10 -3
  22. package/bin/utils/modules.js +7 -0
  23. package/bin/version.js +56 -3
  24. package/lib/compile/cdsc.js +7 -2
  25. package/lib/compile/etc/_localized.js +37 -25
  26. package/lib/compile/etc/csv.js +8 -8
  27. package/lib/compile/for/drafts.js +9 -0
  28. package/lib/compile/for/java.js +16 -0
  29. package/lib/compile/for/nodejs.js +12 -0
  30. package/lib/compile/index.js +3 -0
  31. package/lib/compile/minify.js +16 -2
  32. package/lib/compile/parse.js +2 -2
  33. package/lib/compile/resolve.js +35 -18
  34. package/lib/compile/to/json.js +3 -1
  35. package/lib/compile/to/sql.js +2 -2
  36. package/lib/compile/to/srvinfo.js +4 -2
  37. package/lib/connect/bindings.js +1 -1
  38. package/lib/connect/index.js +3 -4
  39. package/lib/core/entities.js +15 -14
  40. package/lib/core/index.js +39 -36
  41. package/lib/core/reflect.js +4 -2
  42. package/lib/deploy.js +114 -127
  43. package/lib/env/defaults.js +1 -0
  44. package/lib/env/index.js +165 -165
  45. package/lib/env/presets.js +1 -0
  46. package/lib/env/requires.js +121 -50
  47. package/lib/index.js +2 -0
  48. package/lib/log/format/kibana.js +2 -2
  49. package/lib/ql/SELECT.js +10 -0
  50. package/lib/ql/parse.js +1 -0
  51. package/lib/req/cds-context.js +4 -1
  52. package/lib/req/context.js +50 -56
  53. package/lib/req/event.js +1 -6
  54. package/lib/req/locale.js +6 -5
  55. package/lib/req/request.js +2 -0
  56. package/lib/req/user.js +7 -5
  57. package/lib/serve/Service-api.js +10 -7
  58. package/lib/serve/Service-dispatch.js +9 -11
  59. package/lib/serve/Service-methods.js +30 -41
  60. package/lib/serve/Transaction.js +10 -7
  61. package/lib/serve/adapters.js +11 -9
  62. package/lib/serve/factory.js +14 -9
  63. package/lib/serve/index.js +28 -15
  64. package/lib/utils/data.js +1 -1
  65. package/lib/utils/index.js +27 -30
  66. package/lib/utils/resources/index.js +101 -0
  67. package/lib/utils/resources/tar.js +71 -0
  68. package/lib/utils/resources/utils.js +11 -0
  69. package/libx/_runtime/audit/Service.js +36 -39
  70. package/libx/_runtime/audit/generic/personal/access.js +3 -4
  71. package/libx/_runtime/audit/generic/personal/modification.js +3 -4
  72. package/libx/_runtime/audit/utils/v2.js +1 -2
  73. package/libx/_runtime/auth/index.js +126 -84
  74. package/libx/_runtime/auth/strategies/JWT.js +12 -19
  75. package/libx/_runtime/auth/strategies/dummy.js +1 -5
  76. package/libx/_runtime/auth/strategies/dwc.js +11 -9
  77. package/libx/_runtime/auth/strategies/mock.js +0 -4
  78. package/libx/_runtime/auth/strategies/{utils/xssec.js → xssecUtils.js} +7 -4
  79. package/libx/_runtime/auth/strategies/xsuaa.js +12 -19
  80. package/libx/_runtime/auth/utils.js +22 -1
  81. package/libx/_runtime/cds-services/adapter/odata-v4/Dispatcher.js +104 -98
  82. package/libx/_runtime/cds-services/adapter/odata-v4/OData.js +8 -3
  83. package/libx/_runtime/cds-services/adapter/odata-v4/ODataRequest.js +1 -1
  84. package/libx/_runtime/cds-services/adapter/odata-v4/handlers/action.js +1 -1
  85. package/libx/_runtime/cds-services/adapter/odata-v4/handlers/language.js +2 -8
  86. package/libx/_runtime/cds-services/adapter/odata-v4/handlers/metadata.js +4 -29
  87. package/libx/_runtime/cds-services/adapter/odata-v4/handlers/read.js +2 -1
  88. package/libx/_runtime/cds-services/adapter/odata-v4/handlers/request.js +3 -2
  89. package/libx/_runtime/cds-services/adapter/odata-v4/handlers/update.js +2 -2
  90. package/libx/_runtime/cds-services/adapter/odata-v4/odata-to-cqn/ExpressionToCQN.js +4 -6
  91. package/libx/_runtime/cds-services/adapter/odata-v4/odata-to-cqn/expandToCQN.js +24 -21
  92. package/libx/_runtime/cds-services/adapter/odata-v4/odata-to-cqn/index.js +8 -2
  93. package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/deserializer/DeserializerFactory.js +2 -0
  94. package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/DispatcherCommand.js +2 -6
  95. package/libx/_runtime/cds-services/adapter/odata-v4/to.js +1 -12
  96. package/libx/_runtime/cds-services/adapter/odata-v4/utils/data.js +33 -9
  97. package/libx/_runtime/cds-services/adapter/odata-v4/utils/dispatcherUtils.js +56 -0
  98. package/libx/_runtime/cds-services/adapter/odata-v4/utils/readAfterWrite.js +2 -2
  99. package/libx/_runtime/cds-services/adapter/odata-v4/utils/request.js +10 -3
  100. package/libx/_runtime/cds-services/adapter/odata-v4/utils/result.js +9 -11
  101. package/libx/_runtime/cds-services/adapter/rest/RestRequest.js +6 -3
  102. package/libx/_runtime/cds-services/adapter/rest/handlers/operation.js +4 -2
  103. package/libx/_runtime/cds-services/adapter/rest/rest-to-cqn/utils.js +1 -1
  104. package/libx/_runtime/cds-services/adapter/rest/utils/binary.js +1 -1
  105. package/libx/_runtime/cds-services/adapter/rest/utils/key-value-utils.js +2 -3
  106. package/libx/_runtime/cds-services/adapter/rest/utils/parse-url.js +6 -4
  107. package/libx/_runtime/cds-services/adapter/rest/utils/result.js +1 -0
  108. package/libx/_runtime/cds-services/adapter/rest/utils/validation-checks.js +8 -5
  109. package/libx/_runtime/cds-services/services/Service.js +40 -0
  110. package/libx/_runtime/cds-services/services/utils/columns.js +4 -3
  111. package/libx/_runtime/cds-services/services/utils/compareJson.js +4 -4
  112. package/libx/_runtime/cds-services/services/utils/differ.js +3 -3
  113. package/libx/_runtime/cds-services/services/utils/handlerUtils.js +4 -4
  114. package/libx/_runtime/cds-services/util/assert.js +20 -14
  115. package/libx/_runtime/cds.js +9 -1
  116. package/libx/_runtime/common/aspects/any.js +5 -0
  117. package/libx/_runtime/common/aspects/entity.js +25 -7
  118. package/libx/_runtime/common/aspects/utils.js +2 -2
  119. package/libx/_runtime/common/composition/data.js +6 -0
  120. package/libx/_runtime/common/composition/insert.js +3 -2
  121. package/libx/_runtime/common/composition/tree.js +4 -10
  122. package/libx/_runtime/common/composition/update.js +4 -4
  123. package/libx/_runtime/common/constants/draft.js +29 -26
  124. package/libx/_runtime/common/error/constants.js +2 -2
  125. package/libx/_runtime/common/error/frontend.js +7 -15
  126. package/libx/_runtime/common/generic/auth/capabilities.js +59 -0
  127. package/libx/_runtime/common/generic/auth/constants.js +20 -0
  128. package/libx/_runtime/common/generic/auth/expand.js +54 -0
  129. package/libx/_runtime/common/generic/auth/index.js +32 -0
  130. package/libx/_runtime/common/generic/auth/insertOnly.js +15 -0
  131. package/libx/_runtime/common/generic/auth/readOnly.js +26 -0
  132. package/libx/_runtime/common/generic/auth/requires.js +34 -0
  133. package/libx/_runtime/common/generic/auth/restrict.js +298 -0
  134. package/libx/_runtime/common/generic/auth/restrictions.js +85 -0
  135. package/libx/_runtime/common/generic/auth/utils.js +213 -0
  136. package/libx/_runtime/common/generic/crud.js +8 -6
  137. package/libx/_runtime/common/generic/etag.js +1 -1
  138. package/libx/_runtime/common/generic/input.js +35 -35
  139. package/libx/_runtime/common/generic/sorting.js +2 -3
  140. package/libx/_runtime/common/generic/temporal.js +2 -2
  141. package/libx/_runtime/common/i18n/messages.properties +1 -1
  142. package/libx/_runtime/common/toggles/handler.js +21 -0
  143. package/libx/_runtime/common/utils/copy.js +10 -1
  144. package/libx/_runtime/common/utils/cqn2cqn4sql.js +111 -35
  145. package/libx/_runtime/common/utils/csn.js +63 -1
  146. package/libx/_runtime/common/utils/dollar.js +10 -1
  147. package/libx/_runtime/common/utils/draft.js +46 -7
  148. package/libx/_runtime/common/utils/entityFromCqn.js +13 -9
  149. package/libx/_runtime/common/utils/extensibilityUtils.js +18 -0
  150. package/libx/_runtime/common/utils/foreignKeyPropagations.js +88 -104
  151. package/libx/_runtime/common/utils/generateOnCond.js +4 -1
  152. package/libx/_runtime/common/utils/quotingStyles.js +2 -0
  153. package/libx/_runtime/common/utils/resolveStructured.js +25 -9
  154. package/libx/_runtime/common/utils/resolveView.js +4 -1
  155. package/libx/_runtime/common/utils/rewriteAsterisks.js +3 -16
  156. package/libx/_runtime/common/utils/structured.js +33 -37
  157. package/libx/_runtime/common/utils/template.js +17 -8
  158. package/libx/_runtime/common/utils/templateProcessor.js +28 -28
  159. package/libx/_runtime/db/data-conversion/post-processing.js +118 -412
  160. package/libx/_runtime/db/expand/expandCQNToJoin.js +45 -41
  161. package/libx/_runtime/db/expand/rawToExpanded.js +29 -8
  162. package/libx/_runtime/db/generic/index.js +1 -3
  163. package/libx/_runtime/db/generic/input.js +5 -10
  164. package/libx/_runtime/db/generic/rewrite.js +5 -2
  165. package/libx/_runtime/db/generic/structured.js +2 -2
  166. package/libx/_runtime/db/query/delete.js +2 -2
  167. package/libx/_runtime/db/query/insert.js +1 -1
  168. package/libx/_runtime/db/query/update.js +9 -14
  169. package/libx/_runtime/db/sql-builder/CreateBuilder.js +4 -3
  170. package/libx/_runtime/db/sql-builder/FunctionBuilder.js +8 -8
  171. package/libx/_runtime/db/sql-builder/InsertBuilder.js +14 -1
  172. package/libx/_runtime/db/sql-builder/SelectBuilder.js +3 -2
  173. package/libx/_runtime/db/sql-builder/dataTypes.js +3 -3
  174. package/libx/_runtime/db/utils/columns.js +3 -3
  175. package/libx/_runtime/db/utils/normalizeTimeData.js +2 -2
  176. package/libx/_runtime/db/utils/propagateForeignKeys.js +6 -2
  177. package/libx/_runtime/extensibility/mps/index.js +5 -0
  178. package/libx/_runtime/extensibility/mps/service.js +111 -0
  179. package/libx/_runtime/extensibility/mps/tar.js +42 -0
  180. package/libx/_runtime/extensibility/mps/utils.js +11 -0
  181. package/libx/_runtime/{fiori → extensibility}/uiflex/handler/transformREAD.js +0 -0
  182. package/libx/_runtime/{fiori → extensibility}/uiflex/handler/transformRESULT.js +17 -5
  183. package/libx/_runtime/{fiori → extensibility}/uiflex/handler/transformWRITE.js +1 -0
  184. package/libx/_runtime/extensibility/uiflex/index.js +54 -0
  185. package/libx/_runtime/extensibility/uiflex/service.js +276 -0
  186. package/libx/_runtime/{fiori → extensibility}/uiflex/utils.js +22 -7
  187. package/libx/_runtime/fiori/generic/activate.js +2 -2
  188. package/libx/_runtime/fiori/generic/before.js +4 -4
  189. package/libx/_runtime/fiori/generic/new.js +3 -3
  190. package/libx/_runtime/fiori/generic/patch.js +1 -1
  191. package/libx/_runtime/fiori/generic/read.js +58 -66
  192. package/libx/_runtime/fiori/generic/readOverDraft.js +74 -16
  193. package/libx/_runtime/fiori/utils/handler.js +6 -13
  194. package/libx/_runtime/fiori/utils/where.js +6 -5
  195. package/libx/_runtime/hana/Service.js +4 -10
  196. package/libx/_runtime/hana/customBuilder/CustomSelectBuilder.js +1 -1
  197. package/libx/_runtime/hana/driver.js +2 -2
  198. package/libx/_runtime/hana/execute.js +45 -75
  199. package/libx/_runtime/hana/pool.js +1 -1
  200. package/libx/_runtime/hana/streaming.js +2 -1
  201. package/libx/_runtime/index.js +6 -6
  202. package/libx/_runtime/messaging/AMQPWebhookMessaging.js +5 -21
  203. package/libx/_runtime/messaging/Outbox.js +2 -2
  204. package/libx/_runtime/messaging/common-utils/AMQPClient.js +4 -14
  205. package/libx/_runtime/messaging/common-utils/connections.js +5 -7
  206. package/libx/_runtime/messaging/common-utils/normalizeIncomingMessage.js +30 -0
  207. package/libx/_runtime/messaging/enterprise-messaging-shared.js +2 -1
  208. package/libx/_runtime/messaging/enterprise-messaging-utils/EMManagement.js +36 -30
  209. package/libx/_runtime/messaging/enterprise-messaging-utils/registerEndpoints.js +19 -12
  210. package/libx/_runtime/messaging/enterprise-messaging.js +8 -8
  211. package/libx/_runtime/messaging/file-based.js +5 -5
  212. package/libx/_runtime/messaging/message-queuing.js +14 -12
  213. package/libx/_runtime/messaging/outbox/utils.js +18 -19
  214. package/libx/_runtime/messaging/redis-messaging.js +91 -0
  215. package/libx/_runtime/messaging/service.js +8 -6
  216. package/libx/_runtime/remote/Service.js +44 -8
  217. package/libx/_runtime/remote/utils/client.js +24 -19
  218. package/libx/_runtime/remote/utils/data.js +11 -11
  219. package/libx/_runtime/sqlite/Service.js +6 -9
  220. package/libx/_runtime/sqlite/customBuilder/CustomFunctionBuilder.js +5 -2
  221. package/libx/_runtime/types/api.js +10 -2
  222. package/libx/common/utils/ucsn.js +109 -0
  223. package/libx/gql/resolvers/crud/update.js +5 -0
  224. package/libx/gql/resolvers/parse/ast2cqn/columns.js +3 -1
  225. package/libx/gql/schema/typeDefMap.js +2 -2
  226. package/libx/odata/afterburner.js +110 -16
  227. package/libx/odata/cqn2odata.js +24 -27
  228. package/libx/odata/grammar.pegjs +9 -1
  229. package/libx/odata/parseToCqn.js +39 -0
  230. package/libx/odata/parser.js +1 -1
  231. package/libx/rest/RestAdapter.js +9 -1
  232. package/libx/rest/middleware/input.js +54 -0
  233. package/libx/rest/middleware/operation.js +14 -1
  234. package/libx/rest/middleware/parse.js +11 -7
  235. package/package.json +2 -2
  236. package/server.js +34 -19
  237. package/srv/audit-log.cds +2 -2
  238. package/srv/flex.cds +8 -2
  239. package/srv/flex.js +1 -1
  240. package/srv/mps.cds +23 -0
  241. package/srv/mps.js +1 -0
  242. package/libx/_runtime/auth/strategies/utils/uaa.js +0 -21
  243. package/libx/_runtime/common/generic/auth.js +0 -874
  244. package/libx/_runtime/common/toggles/alpha.js +0 -43
  245. package/libx/_runtime/db/generic/arrayed.js +0 -33
  246. package/libx/_runtime/fiori/uiflex/index.js +0 -35
  247. package/libx/_runtime/fiori/uiflex/service.js +0 -150
  248. package/libx/rest/utils/data.js +0 -60
package/CHANGELOG.md CHANGED
@@ -4,6 +4,126 @@
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 5.9.2 - 2022-04-07
8
+
9
+ ### Fixed
10
+
11
+ - i18n translation for errors did not work correctly in some cases
12
+ - Normalization in custom `getRestrictions`
13
+ - Throw exception by `INSERT` into HANA queries if number of provided rows deviates from number of affected rows returned by hdb to prevent data losses
14
+ - Handler detection for extended services
15
+ - Speed-up in localization handling
16
+ - Draft: navigation via an association to many from a non-draft enabled entity to a draft-enabled entity
17
+ - Limited support of `SELECT` queries with operator expressions (`xpr`)
18
+
19
+ ## Version 5.9.1 - 2022-03-31
20
+
21
+ ### Fixed
22
+
23
+ - Function arguments might be escaped too often
24
+ - URL encoding for remote services for CQN queries
25
+ - `cds serve` during development again redirects URLs with for UI apps in a folder with the same name as a service, so `/foo/webapp` would redirect to `/foo`. This got broken in 5.8.3.
26
+ - Endless loop in localization handling
27
+ - Ensure service impl while extending entity from the service
28
+ - Post-processing of custom draft queries
29
+ - No minifying of CSN artifacts for Java build
30
+
31
+ ## Version 5.9.0 - 2022-03-25
32
+
33
+ ### Added
34
+
35
+ - Enable custom audit logging implementation by subclassing or prepending `cds.AuditLogService`
36
+ - Log authentication/authorization traces, for example, authentication strategy, and access control decisions to facilitate troubleshooting in debug mode.
37
+ - Bound functions and actions calls with odata-v2 from remote service
38
+ - Beta support for procedure calls with table output data (SAP HANA only)
39
+ + 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.
40
+ + All parameters must be named or unnamed, that is `CALL EXAMPLE_PROC(PARAM_1 => ?,PARAM_2 => ?)` or `CALL EXAMPLE_PROC(?,?)`
41
+ - Alpha `cds.ApplicationService.getRestrictions(definition, event, user)`, which returns the applicable restrictions for the current request as follows:
42
+ + `null`: unrestricted access
43
+ + `[]`: no applicable restrictions -> no access
44
+ + `[{ grant: '...', to: ['...'], where: '...' }, ...]`: applicable restrictions with grant normalized to strings
45
+ + That is, `grant: ['CREATE', 'UPDATE']` in model becomes `[{ grant: 'CREATE' }, { grant: 'UPDATE' }]`
46
+ + Promise resolving to any of the above (needed for CAS override)
47
+ - Internal model provider service can be used for obtaining dynamic csn including features and key user extensions
48
+ - Support insert of SQL snippets for HANA migration tables using @sql.append and @sql.prepend annotations.
49
+ - Support for the `@odata.draft.enclosed` annotation on associations targeted via navigation — previously only supported for `$expand`
50
+ - Pseudo role `internal-user` for technical user tokens acquired from own XSUAA instance
51
+ - Include globally-installed cds-dk version in output of `cds version`.
52
+ - Include version of cds-mtx in output of `cds version`, if available.
53
+ - Feature toggle support in `cds build` for cloud deployments. Create language bundles and parsed CSN for all features.
54
+
55
+ ### Changed
56
+
57
+ - Cleaned up `cds.env.requires` towards a consistent usage:
58
+ + Moved all entries of `cds.requires` to `cds.requires.kinds` → `cds.requires` is empty now by default, but has `cds.requires.kinds` as prototype, so e.g. `cds.requires.sql` will still return a match.
59
+ + Added support for db-specific `cds.requires.db.deploy-format` → deprecating `cds.hana.deploy-format` (which is still supported for compatibility)
60
+ + Introduced `cds.requires.kinds.hana-cloud` as `{kind:hana, deploy-format:hdbtable}` → to be used by default for production
61
+ + Changed `cds.requires.audit-log` to be consistent to all other; also got moved to `cds.requires.kinds.audit-log`, so it is no longer activated by default.
62
+ + Added support for `cds.requires.foo: true` with `foo` being a preset/prototype entry in `cds.requires.kinds` → allows to more easily switch on pre-configured services.
63
+ - Update-managed properties (`@cds.on.update`) are always updated
64
+ + Example: `UPDATE('Books').set({}).where({ ID: 1 })` leads to new modifiedAt and modifiedBy
65
+ + Does not apply to nested entities that are only preserved by specifying their primary keys in the data
66
+ + Deactivate during two month grace period via compact feature flag `cds.env.features.update_managed_properties = false`
67
+ - Response no longer contains keys neither technical draft properties (e.g. `HasDraftEntity` or `InProcessByUser`) in expanded data if they were not requested explicitly when using `cds.Service` API
68
+ + Example:
69
+ ```js
70
+ > await srv.read('Authors', a => { a.name, a.books(b => { b.title }) }).where({ ID: 1 })
71
+ // -> "old behaviour" result
72
+ [{ name: 'Emily Brontë', books: [{ title: 'Wuthering Heights', ID: 201 }] }]
73
+ // -> "new behaviour" result
74
+ [{ name: 'Emily Brontë', books: [{ title: 'Wuthering Heights' }] }]
75
+ ```
76
+ + Technical draft properties are not automatically fetched also on a root level
77
+ + Deactivate during two month grace period via compat feature flag `cds.env.features.auto_fetch_expand_keys = true`
78
+ - Access control is checked in generic handlers (rather than handlers materialized on app startup)
79
+ - Expand restriction check moved to pre-before phase
80
+ - The active state of an entity is read instead of the draft state when navigating from a draft entity to a draft-enabled entity via an association.
81
+ - Authentication middleware is always mounted (used to be only for restricted services)
82
+ - Fiori preview now uses the Horizon theme
83
+ - 'Preview' links in generic index.html page no longer get the word _preview_ appended automatically, allowing for more flexible naming. Link providers should make sure to add the _preview_ word if necessary.
84
+ - Don't throw error in GraphQL adapter if update mutation filter does not match any entries (to be consistent with delete mutations)
85
+ - Remote call of unbound action/function returns octet-stream instead of string by default
86
+ - Default pool's behaviour has been changed from `FIFO` (queue) to `LIFO` (stack). Can be changed in pool configuration.
87
+ - `cds run/serve` now gracefully shuts down the HTTP server before exiting. Custom handlers for signals like `SIGTERM` or `SIGINT` can now be processed.
88
+ - `cds build` no longer creates `COMMENT` statements for HANA if doc comments are present in CDS models. The statements caused superfluous table migrations during HANA deployments.
89
+
90
+ ### Fixed
91
+
92
+ - Logging of failed requests to remote services was incompatible to Elasticsearch
93
+ - `cds serve --project <dir>` didn't serve static web resources from `<dir>`
94
+ - `cds serve -p <dir>` was meant to be a shortcut for `cds serve --project <dir>`
95
+ - Messaging: Use correct kind for logging
96
+ - Incorrect return values for update-managed properties (`@cds.on.update`) of child entities that were not changed in request
97
+ - `$filter` with navigation to-one eq null
98
+ - Calculation of `DraftIsProcessedByMe` when navigating to `DraftAdministrativeData`
99
+ - Inbound streaming with media type annotated as `@Core.Computed`
100
+ - Pass column expression into `SELECT()` (example: `SELECT('SUBSTRING(locale,0,2) as loc').from(<entity>)`)
101
+ - Annotation `@cds.api.ignore` ignores key in new parser
102
+ - Inconsistencies in actions and functions API
103
+ - Opening root transaction in `srv.run` if none exists
104
+ - Glitches in handling of `req.user.tenant` and `req.user.locale`
105
+ - Flattened keys in URL are resolved correctly if they are unique in new REST adapter
106
+ - Actions and functions in REST adapter
107
+ - Empty string as key does not work in new parser
108
+ - Requesting property of an entity caused error in new parser
109
+ - The SQLite CSV import now imports `"true"` and `"false"` as strings instead of Booleans
110
+ - Fixed loading mechanism for custom build task handlers
111
+ - `req.diff()` for `UPDATE` on a view with renamed property in `orderBy`
112
+ - `$user.<attr>` for managed properties (`@cds.on.insert`/`@cds.on.update`)
113
+ - GraphQL `__typename` meta field if it is the only selected field of an association/composition
114
+ - Command shortcuts like `cds c` are now handled properly if executed in an NPM script
115
+ - ETag is not included in expanded entities using `$select`, for example: `Books(1)?$expand=author($select=ID)`
116
+ - `cds.compile.to...` no longer crashes if called with a CSN that has a dangling ref
117
+ - Requests to remote services via navigation path without explicit `$select`, but having `$expand` query option
118
+ - `cds.compile` correctly supports reserved namespaces like `cds.foundation`.
119
+ - `cds.compile.to.serviceinfo` now uses the correct configuration for the base URL paths for Java services
120
+ - `cds deploy --to sqlite` correctly localizes texts in deployed views. Before not all localized texts have been correctly resolved.
121
+ - `cds deploy --to hana` reports missing org or space info with better message.
122
+
123
+ ### Removed
124
+
125
+ - Redundant locale implementation
126
+
7
127
  ## Version 5.8.4 - 2022-03-17
8
128
 
9
129
  ### Fixed
@@ -64,6 +184,7 @@
64
184
  - `$filter` query option in structured mode (OData flavors `w4` and `x4`)
65
185
  + Using JSON-stringified objects no longer occasionally crashes an application
66
186
  + Filtering on a structured element with `ne null` condition also selects data having some `null` properties within
187
+ - Rest: `Content-type` header is set to `text/plain` for primitive data types in response (except for `Boolean`)
67
188
 
68
189
  ## Version 5.8.0 - 2022-01-27
69
190
 
@@ -86,8 +207,8 @@
86
207
  + In payloads, the binary data must be a base64 encoded string
87
208
  + In URLs, the binary data must have the following format: `binary'<url-safe base64 encoded>'`, e.g., `$filter=ID eq binary'Q0FQIE5vZGUuanM='`
88
209
  + The use of binary data in some advanced constructs like `$apply` and `/any()` may be limited
89
- + On SQLite, the base64 encoded string is stored to the database
90
- + It is strongly discouraged to use binary data as keys. See "Primary Keys — Best Practices" in documentation.
210
+ + On SQLite, the base64 encoded string is stored in the database
211
+ + It’s strongly discouraged to use binary data as keys. See "Primary Keys — Best Practices" in the documentation.
91
212
  - Support for OData annotation `@Core.ContentDisposition.Type` with `attachment` as the default value
92
213
  - Support for returning custom stream objects in custom handlers (beta):
93
214
  + Example:
@@ -119,19 +240,19 @@
119
240
  - `cds.spawn` also works with synchronous functions
120
241
  - Foreign keys in parent are set to `null` when deleting composition of one
121
242
  - `cds version` now always prints the version of `@sap/cds-dk`, especially if `cds version` was called from within an npm script, i.e. not from `cds-dk`'s CLI.
122
- - Better error message in case destination of Remote Service is not found
243
+ - Better error message in case destination of Remote Service isn’t found
123
244
  - Differentiate between draft already exists and entity locked
124
- - OData adapter: rollback transaction before rethrowing standard error in case of atomicty group
245
+ - OData adapter: roll back transaction before rethrowing standard error in case of atomicity group
125
246
  - Results of actions/functions do not ignore custom data when using `$expand` query option
126
- - `req.data` is available in custom error handler in case of deserialization error thrown by legacy odata server
247
+ - `req.data` is available in custom error handler in case of deserialization error thrown by legacy OData server
127
248
  - Joining entities with renamed foreign keys (limited to single-level projections)
128
249
  - Requests with draft and `$expand=*` caused problems in some cases
129
250
  - `cds serve` during development longer redirects URLs with similar path segments like `/browse/123/browse/` to e.g. `/browse/`
130
- - Post processing for renamed column in expand
131
- - Deploy to HANA: passing of options to `hdi-deploy` via `HDI_DEPLOY_OPTIONS` now possible
251
+ - Post-processing for renamed columns in expand
252
+ - Deploy to SAP HANA: passing of options to `hdi-deploy` via `HDI_DEPLOY_OPTIONS` now possible
132
253
  - Keys as path segments in beta OData to CQN parser
133
254
  - OData V2 Remote Service (`"kind": "odata-v2"`):
134
- + Request data properties of types `cds.Date`, `cds.DateTime` and `cds.Timestamp` are converted accordingly to OData V2 specification
255
+ + Request data properties of types `cds.Date`, `cds.DateTime`, and `cds.Timestamp` are converted accordingly to OData V2 specification
135
256
  + Response data properties of types `cds.Decimal`, `cds.DecimalFloat` (deprecated) and `cds.Integer64` are handled properly when using `Accept` header with `IEEE754Compatible=true/false` and `ExponentialDecimals=true/false` format parameters
136
257
 
137
258
  ## Version 5.7.6 - 2022-02-23
@@ -150,7 +271,7 @@
150
271
  - Negating lambda expressions in OData using the `not` operator
151
272
  - Event Mesh: Redelivery count when using AMQP
152
273
  - OData requests using lambda expressions on localized data
153
- - `cds.db.exists` wrongly generated a `SELECT * FROM ...` for odata flavor x4
274
+ - `cds.db.exists` wrongly generated a `SELECT * FROM ...` for OData flavor x4
154
275
  - Return localized texts on draft activate
155
276
  - Unicode characters in unquoted search terms in beta OData to CQN parser
156
277
 
@@ -172,7 +293,7 @@
172
293
  - OData requests using lambda expressions with `contains` function
173
294
  - Result of OData query option `$count=true` when using `$apply`
174
295
  - `$filter` with navigation to-one equals value crashes
175
- - `$skiptoken` query option allows to use arbitrary symbols except of `&` with beta OData URL to CQN parser (`cds.env.features.odata_new_parser`). In this non-integer value case the value will not be parsed into CQN.
296
+ - `$skiptoken` query option allows using arbitrary symbols except of `&` with beta OData URL to CQN parser (`cds.env.features.odata_new_parser`). In this non-integer value case, the value won’t be parsed into CQN.
176
297
  - Function names in `$filter` can now be case insensitive (as per OData 4.01)
177
298
  - `$count` in `$expand` caused server to crash
178
299
 
@@ -183,14 +304,14 @@
183
304
  - Instance-based restriction for activation of draft enabled entities
184
305
  - `.columns('*')` on projections of remote services using renamed properties
185
306
  - GraphQL filters on nested fields are now applied correctly
186
- - Performance degradation during processing of `where exists`
307
+ - Performance degradation during the processing of `where exists`
187
308
  - Read drafts via navigation with complex filter expression
188
309
 
189
310
  ## Version 5.7.1 - 2021-12-06
190
311
 
191
312
  ### Fixed
192
313
 
193
- - Draft (OData flavors `w4`, `x4` and `v4` with structs): Flags `HasActiveEntity`, `HasDraftEntity`, and `IsActiveEntity` are now included in the HTTP response for GET requests.
314
+ - Draft (OData flavors `w4`, `x4`, and `v4` with structs): Flags `HasActiveEntity`, `HasDraftEntity`, and `IsActiveEntity` are now included in the HTTP response for GET requests.
194
315
  - Instance-based restriction on entities using localized fields in draft
195
316
  - Results of actions/functions do not ignore nested data if query options are present
196
317
 
@@ -209,20 +330,20 @@
209
330
  + "opt-in": if included, the runtime check or database constraint applies
210
331
  + Behavior can be overridden via `@assert.integrity: <true/false/'RT'/'DB'>` on property, entity, or service level (lowest applies)
211
332
  - Allow `--with-mocks` in production via `cds.env.features.with_mocks = true`
212
- - Set media type from content type header while inbound streaming
333
+ - Set media type from content-type header while inbound streaming
213
334
  - Support for navigations with `$count` in `$filter`, for example `GET Entity?$filter=toMany/$count gt 0`
214
335
  - Draft: Generate UUIDs for request payloads to which extra data items are added (without the UUID keys) in a custom application handler.
215
336
  - Generate GraphQL schema via `cds compile -2 gql` (alpha)
216
- - Log requests to remote services if respective log level is set to `debug`
337
+ - Log requests to remote services if the respective log level is set to `debug`
217
338
  - Beta OData URL to CQN parser (`cds.env.features.odata_new_parser`):
218
- + support for `$skiptoken` query option
219
- + limited support for `$apply` query option
220
- + Supported are following transformations and their combinations: `aggregate`, `groupby`, `topcount`, `bottomcount`, `filter`, `search`
339
+ + Support for `$skiptoken` query option
340
+ + Limited support for `$apply` query option
341
+ + Supported are the following transformations and their combinations: `aggregate`, `groupby`, `topcount`, `bottomcount`, `filter`, `search`
221
342
  + Not supported:
222
343
  + Transformations `topsum`, `bottomsum`, `toppercent`, `bottompercent`, `expand`, `concat`, `compute`, `identity`
223
344
  + `rollup` and `$all` in `groupby` transformation
224
345
  + Filter function `isdefined`
225
- + Custom aggregation methods, arithmetic operators (`add`, `sub`, `mul` and so on) and keyword `from` in `aggregate` transformation
346
+ + Custom aggregation methods, arithmetic operators (`add`, `sub`, `mul`, and so on), and keyword `from` in `aggregate` transformation
226
347
  + OData vocabulary for Data Aggregation, `@Aggregation.default` annotation
227
348
  + Out of scope:
228
349
  + Draft handling
@@ -241,10 +362,10 @@
241
362
  - Leaner implementation for `sap-statistics`
242
363
  - Leading and trailing whitespaces are allowed for `$search` query parameter
243
364
  - Insert / Update of Composition of one with empty object is not allowed for non UUID keys
244
- - Search behavior of whitespaces changed as follow:
365
+ - Search behavior of whitespaces changed as follows:
245
366
  + Searches for plain whitespace, for example, `"$search= "` matches the complete data set.
246
367
  + Searches for whitespace surrounded by double-quotes, for example, `$search=" "` matches all entries containing whitespaces.
247
- - In single tenant mode, the default SQLite database is used, regardless of `context.tenant`
368
+ - In single-tenant mode, the default SQLite database is used, regardless of `context.tenant`
248
369
  - `cds build` for Node.js projects now copies `package-lock.json` files into the staging folder (usually `gen/srv`). This allows the execution of `npm ci` there.
249
370
  - Relaxed UUIDs in beta URL to CQN parser (`cds.env.features.odata_new_parser`)
250
371
  - Authentication strategies `dummy` and `mock` no longer require `passport`
@@ -253,15 +374,15 @@
253
374
 
254
375
  ### Fixed
255
376
 
256
- - Path resolution for references in sub selects
377
+ - Path resolution for references in sub-selects
257
378
  - Where exists without infix filter, e.g., `@restrict.where: 'exists author'`
258
379
  - `@restrict.where: 'exists [...]'` in draft union scenario
259
- - Select query with path exists predicates e.g., `WHERE EXISTS books[year = 2000].pages[wordcount > 1000]`
380
+ - Select query with path exists predicates, for example, `WHERE EXISTS books[year = 2000].pages[wordcount > 1000]`
260
381
  - Proper registration of audit log event handlers
261
382
  - Draft: Generate foreign keys for request payloads to which extra data items are added in a custom application handler.
262
383
  - `cds build` correctly merges `hdbmigrationtable` files that have multiple new migration versions defined.
263
384
  - `cds.test` converts response data of failed requests to JSON to prevent lost error details
264
- - Instance based restriction for draft enabled entities
385
+ - Instance-based restriction for draft enabled entities
265
386
  - Delete requests for localized with compositions
266
387
  - Ignore input for static and calculated fields during draft activate
267
388
  - Clear extension map entry on error during CSN fetching
@@ -269,7 +390,7 @@
269
390
  - Requests to mocked remote service when using custom service name with `.service` property
270
391
  - Rollback on already backrolled or committed transactions are ignored
271
392
  - Rollback handling in spawned background job
272
- - `cds.spawn()` throws error if passed options is an instance of `cds.EventContext`
393
+ - `cds.spawn()` throws error if passed option is an instance of `cds.EventContext`
273
394
  - Delete `timestamp` from options passed to `cds.spawn()` (transactions create their own timestamp)
274
395
  - Type error during programmatic action/function call if no params defined
275
396
  - Fully qualified bound actions/ functions in beta URL to CQN parser (`cds.env.features.odata_new_parser`)
@@ -292,8 +413,8 @@
292
413
  - RFC 3986 compliant segment recognition in beta URL to CQN parser (`cds.env.features.odata_new_parser`)
293
414
  - Support for `$skiptoken` OData query option when using beta URL to CQN parser (`cds.env.features.odata_new_parser`)
294
415
  - OData requests with `$skip` and without `$top` query option to services with defined default limit (`cds.query.limit.default`)
295
- - Creating entities with binary keys. Currently the binary keys may be provided only as Node.js `Buffer` instances using a custom handler.
296
- - Requests with payload containing nested arrayed elements no longer crash the application
416
+ - Creating entities with binary keys. Currently, the binary keys may be provided only as Node.js `Buffer` instances using a custom handler.
417
+ - Requests with a payload containing nested arrayed elements no longer crash the application
297
418
 
298
419
  ## Version 5.6.3 - 2021-11-15
299
420
 
@@ -302,7 +423,7 @@
302
423
  - `cds run` does not fail if `cds.requires.multitenancy` is explicitly set to `false`
303
424
  - Calculation of `DraftIsCreatedByMe` or `DraftIsProcessedByMe` when expanding or navigating to `DraftAdministrativeData`
304
425
  - Nested `any` in `$filter` query option
305
- - Crash on draft activate after draft edit for not existing composition of one, if no explicit DB service is defined
426
+ - Crash on draft activate after draft edit for not existing composition of one if no explicit DB service is defined
306
427
  - Typescript definition of `srv.delete` no longer leads to a duplication error
307
428
 
308
429
  ## Version 5.6.2 - 2021-11-08
@@ -345,11 +466,11 @@
345
466
  + Not meant for productive use! For example, authentication and authorization are out of scope.
346
467
  - Support of the following features when using beta OData URL to CQN parser (`cds.env.features.odata_new_parser`):
347
468
  + REST-style URLs (example: `GET /Foo/1`)
348
- + `$expand=*` query option on different nested expand levels (`$levels` is not yet supported)
349
- + draft handling
350
- + structured keys
351
- + streaming
352
- + navigation to primitive properties without `$value` query option
469
+ + `$expand=*` query option on different nested expand levels (`$levels` isn’t yet supported)
470
+ + Draft handling
471
+ + Structured keys
472
+ + Streaming
473
+ + Navigation to primitive properties without `$value` query option
353
474
  - Optimized Search: Support `$filter` query option in combination with optimize `$search` and localized data (when the environment variable `cds.env.features.optimized_search` is set to `true`)
354
475
  - `GET` requests support static values in ON-conditions of composition parents when using unmanaged backlinks
355
476
  - `destinationOptions` can be configured for Remote Services
@@ -375,7 +496,7 @@
375
496
  }
376
497
  }}}
377
498
  ```
378
- - File to store private project settings `.cdsrc-private.json` (should not be checked in source code management)
499
+ - File to store private project settings `.cdsrc-private.json` (shouldn’t be checked in source code management)
379
500
  - Read additional configuration from JSON files or directory structures using `CDS_CONFIG` env variable
380
501
  - Missing typescript definitions for services' `.send` shortcuts `get`, `put`, `post`, `patch`, and `delete`
381
502
  - Build VCAP_SERVICES env variable dynamically for compatibility (`cds.env.features.emulate_vcap_services`)
@@ -390,7 +511,7 @@
390
511
  ### Changed
391
512
 
392
513
  - Query API: Specified keys are now part of the target path, e.g. `SELECT.from('Books', 1)` will move the key condition into `SELECT.from.ref`.
393
- + Deactivate during two month grace period via compat feature flag `cds.env.features.keys_into_where = true`
514
+ + Deactivate during two-month grace period via compat feature flag `cds.env.features.keys_into_where = true`
394
515
  - Removed duplicate integrity checks
395
516
  - Optimized search: Optimize queries for non-localized elements
396
517
  - OData to CQN parsing changed to enable remote service consumption. As a side effect, application code in `srv.on('READ', handler)` custom handlers relaying on CQN might need to be adapted. The following has changed:
@@ -398,7 +519,7 @@
398
519
  - Previously, if the `$expand` query option was specified in the OData query, all elements of the expanded navigation property were listed explicitly in the CQN query. Now, an `*` (asterisk) is listed instead.
399
520
  - Non-specified columns are resolved at database layer
400
521
  - `cds deploy` no longer enforces the presence of SAP CommonCryptoLib (checked with env variable `SECUDIR`) on Windows since it uses now the built-in security libraries
401
- - Target keys are not included into a body when sending `PATCH` requests to external services
522
+ - Target keys are not included in the body when sending `PATCH` requests to external services
402
523
 
403
524
  ### Fixed
404
525
 
@@ -411,10 +532,10 @@
411
532
  - The check for the minimum Node.js version now properly enforces version 12.18, i.e. aborts server startup.
412
533
  - `cds.test` fails with a clearer error message if the server wasn't started at all
413
534
  - Audit logging for modification of personal or sensitive data when using same entity as a composition child in different parent entities
414
- - Deleting an entity defined with managed composition of one, whereas a dependent entity is defined having an independent managed association to its composition parent no longer crashes the application
535
+ - Deleting an entity defined with managed composition of one, whereas a dependent entity is defined as having an independent managed association to its composition parent no longer crashes the application
415
536
  - Audit logging for entities having arrayed elements
416
537
  - Filtering for `cds.Date` on Remote OData V2 services
417
- - Crash when `rollup` function was used in groupBy in odata requests
538
+ - Crash when `rollup` function was used in groupBy in OData requests
418
539
  - Or for $filter with IsActiveEntity=true for access to active entities
419
540
  - Reading draft-enabled entity with `$expand` targeting non-draft associations
420
541
  - Delete with sub-select
@@ -424,11 +545,11 @@
424
545
  - Activate draft of entity having `to-one` and `to-many` compositions
425
546
  - Caching issue that causes the OData `omit-values` preference in `Prefer` HTTP headers to misbehaves
426
547
  - Deletion of draft instances if multiple draft enabled entities are used within one service
427
- - Queries with `contains` filter targeting a remote odata v2 service
548
+ - Queries with `contains` filter targeting a remote OData v2 service
428
549
  - Schema evolution support for nested CDS entities in `cds build`
429
- - I18n texts with quotes and other special characters get escaped correctly if they appear in XML and Json documents
550
+ - I18n texts with quotes and other special characters get escaped correctly if they appear in XML and JSON documents
430
551
  - Execution of plain SQL statements on SQLite
431
- - `Content-Disposition` header is now url encoded
552
+ - `Content-Disposition` header is now URL encoded
432
553
 
433
554
  ### Removed
434
555
 
@@ -481,7 +602,7 @@
481
602
 
482
603
  - Typo in `DELETE` method of `cds.test`
483
604
  - View resolving for intermediate queries
484
- - Result post processing for renamed expands
605
+ - Result post-processing for renamed expands
485
606
  - Don't use placeholder values for `null`
486
607
 
487
608
  ## Version 5.5.0 - 2021-09-23
@@ -579,23 +700,23 @@
579
700
  - Payload for non-writable navigation targets removed from `req.data`
580
701
  - `cds build` supports i18n message bundles for Java and Nodejs apps and a default CSN format option for Java
581
702
  - View resolving considers renaming of foreign keys and `excluding` names when `columns` are explicitly provided in CQN
582
- - Resilient acquire for HANA via `cds.env.requires.db.connection_attempts = <number>` (alpha; hard max of 3 enforced)
703
+ - Resilient acquire for SAP HANA via `cds.env.requires.db.connection_attempts = <number>` (alpha; hard max of 3 enforced)
583
704
 
584
705
  ### Changed
585
706
 
586
707
  - Messaging: Webhooks will always generate tokens
587
708
  - Messaging: In multitenancy mode, messaging artifacts are only deployed to subscribers (unless the service option `deployForProvider` is set to `true`)
588
- - Messaging: Incoming messages without corresponding handlers are not acknowledged
589
- - If a service executes a query targeting a projection on one of its entities, the query is resolved along with projections to an entity known by the executing service. The result is post-processed to reflect the expected result of the incoming query. The reason is that no handlers of the executing service were executed as they did not know the query target.
590
- + Deactivate during two month grace period via compat feature flag `cds.env.features.resolve_views = false`
709
+ - Messaging: Incoming messages without corresponding handlers aren’t acknowledged
710
+ - If a service executes a query targeting a projection on one of its entities, the query is resolved along with projections to an entity known by the executing service. The result is post-processed to reflect the expected result of the incoming query. The reason is that no handlers of the executing service were executed as they didn’t know the query target.
711
+ + Deactivate during two-month grace period via compat feature flag `cds.env.features.resolve_views = false`
591
712
  - Use `@sap/cds-compiler`'s `smartId` function to determine whether a reference needs to be quoted.
592
713
  + Allows the use of non-word characters in column names, for example `entity Foo { ![bar/bz]: String; }`.
593
714
  + Support for columns with spaces with feature flag `cds.env.features.spaced_columns`.
594
715
  + Note: Restrictions in other layers (example: OData's simple identifier schema) still apply.
595
- + Note: Expressions in references (example: `ref: ['foo as bar']`) currently works but was never intended to and will be removed in future versions.
716
+ + Note: Expressions in references (example: `ref: ['foo as bar']`) currently works but were never intended to and will be removed in future versions.
596
717
  - Clear draft data based on their draft UUID instead of via deep delete
597
718
  - Support `@sap/cds-compiler`'s changes for DB constraints: managed and unmanaged compositions of one behave like associations. This means that only `$self`-managed composition of one gets `DELETE CASCADE` constraint. Since all other "2one" cases require extra `DELETE` handled by the runtime, that constraint is ignored.
598
- - Value with regards to date and time functions are not converted to strings in the OData protocol adapter
719
+ - Value with regards to date and time functions aren’t converted to strings in the OData protocol adapter
599
720
  - No placeholders for `LIMIT` to enable statement caching during pagination
600
721
  - Arrayed elements stringified in DB layer
601
722
  - Return values of handlers will have precedence over database reads
@@ -630,7 +751,7 @@
630
751
  - Expand during draft union
631
752
  - Validate content type for `$batch` requests
632
753
  - Support for `SELECT` statements in `where` clauses when resolving views
633
- - `INSERT.rows()` does not silently fill in `INSERT.entries` anymore &rarr; use `INSERT.entries()` to do so instead.
754
+ - `INSERT.rows()` doesn’t silently fill in `INSERT.entries` anymore &rarr; use `INSERT.entries()` to do so instead.
634
755
  - `UPDATE(Foo).with({foo:{'=':'bar'})` erroneously produced:
635
756
  ```js
636
757
  {UPDATE:{..., with:{foo:{ref:['bar']}}}} //> wrong
@@ -650,10 +771,10 @@
650
771
  - Actions and functions with `Integer` response type in REST services
651
772
  - Occasional drop of conditions in `WHERE` depending on the value when using structured types
652
773
  - `PATCH` fixed for singletons and when having a keyless, for example, managed to-one navigation path
653
- - Internal server error when forwarding a query to an external service whose target entity does not contain keys
774
+ - Internal server error when forwarding a query to an external service whose target entity doesn’t contain keys
654
775
  - Nested where exists in `@restrict` via navigation (CRUD-only; beta)
655
776
  - Expand to one in draft union
656
- - Patch to autoexposed entity through composition of aspect from Fiori Elements
777
+ - Patch to auto exposed entity through composition of aspect from SAP Fiori Elements
657
778
  - Diff for delete in draft
658
779
  - Streaming requests on views with joins no longer crash the application
659
780
 
@@ -662,31 +783,31 @@
662
783
  - Direct usage of body-parser
663
784
  - Queries constructed from `cds.ql` do not have the _internal_ property `cqn` anymore
664
785
  - Inofficial variant `SELECT({'expand(foo)':['a','b']})` is not supported anymore
665
- &rarr; use one of these official APIs for expands instead:
786
+ &rarr; use one of these official APIs for expands instead:
666
787
  ```js
667
788
  SELECT(x => { x.a, x.foo (f =>{ f.b, f.c }) })
668
789
  SELECT(['a',{ref:['foo'], expand:['b','c']}])
669
790
  ```
670
791
  - Inofficial variant `SELECT.orderBy('foo','desc')` is not supported anymore
671
- &rarr; use one of these official APIs instead:
792
+ &rarr; use one of these official APIs instead:
672
793
  ```js
673
794
  SELECT.from(Foo).orderBy({foo:'desc'})
674
795
  SELECT.from(Foo).orderBy('foo desc')
675
796
  ```
676
797
  - Inofficial variant `SELECT.orderBy('foo, bar desc')` is not supported anymore
677
- &rarr; use one of these official APIs instead:
798
+ &rarr; use one of these official APIs instead:
678
799
  ```js
679
800
  SELECT.from(Foo).orderBy({foo:1,bar:-1})
680
801
  SELECT.from(Foo).orderBy('foo','bar desc')
681
802
  SELECT.from(Foo).orderBy `foo, bar desc`
682
803
  ```
683
804
  - Inofficial variant `SELECT.where({ or: [{ foo: 'bar' }, { foo: 'baz' }] })` is not supported anymore
684
- &rarr; use one of these official APIs instead:
805
+ &rarr; use one of these official APIs instead:
685
806
  ```js
686
807
  SELECT.from(Foo).where({ foo: 'bar', or: { foo: 'baz' } })
687
808
  SELECT.from(Foo).where `foo='bar' or foo='baz'`
688
809
  ```
689
- - Usage of SQL window functions during expand on HANA
810
+ - Usage of SQL window functions during expand on SAP HANA
690
811
  - Hidden symbol for where clause elements originating from `@restrict`
691
812
  - Error masking gate keeper for `cds.env.log.levels.cli`
692
813
 
@@ -718,7 +839,7 @@
718
839
  - Update of deeply nested entity with structured key
719
840
  - Order by join column during draft union
720
841
  - Skip calculated properties while following projections
721
- - The `with parameters` clause is now correctly handled in sub selects if the locale parameter exceeds 3 characters
842
+ - The `with parameters` clause is now correctly handled in sub-selects if the locale parameter exceeds three characters
722
843
  - Statement already finalized error on SQLite
723
844
 
724
845
  ## Version 5.4.3 - 2021-08-16
@@ -744,7 +865,7 @@
744
865
 
745
866
  ### Fixed
746
867
 
747
- - Erroneously added Brazilian portuguese (`pt_BR`) removed from the list of normalized locales
868
+ - Erroneously added Brazilian Portuguese (`pt_BR`) removed from the list of normalized locales
748
869
 
749
870
  ## Version 5.4.0 - 2021-08-02
750
871
 
@@ -756,7 +877,7 @@
756
877
  - Support for `ReadByKeyRestrictions` annotations
757
878
  - Support for OData `omit-values` preference in `Prefer` HTTP header
758
879
  - Object variant of service methods
759
- - Brazilian portuguese (`pt_BR`) is now in the list of [normalized locales](https://cap.cloud.sap/docs/guides/i18n#normalized-locales)
880
+ - Brazilian Portuguese (`pt_BR`) is now on the list of [normalized locales](https://cap.cloud.sap/docs/guides/i18n#normalized-locales)
760
881
  - Support for actions and functions on Remote Service
761
882
 
762
883
  ### Changed
@@ -767,7 +888,7 @@
767
888
  - Messaging: No more topic manipulation per default
768
889
  - For consistency reasons `cds build` now determines the default model path using cds resolve
769
890
  - Match XSUAA's user attribute value `$UNRESTRICTED` case insensitive
770
- - CDS build now uses new CDS logging facade to allow for consistent logging behaviour accross the different CDS modules
891
+ - CDS build now uses new CDS logging facade to allow for consistent logging behaviour across the different CDS modules
771
892
 
772
893
  ### Fixed
773
894
 
@@ -878,7 +999,7 @@
878
999
  - Use OData simple identifier format for links to entity sets in generated `index.html`.
879
1000
  - `cds build` logged duplicate compilation errors for the identical `.cds` file, but with different relative path names.
880
1001
  - `cds serve` no longer tries to redirect Fiori URLs starting with `$` to service URLs.
881
- - `cds build` now supports `HANA Table data properties files` in SaaS applications. These files have not been copied into the sidecar folder.
1002
+ - `cds build` now supports `HANA Table data properties files` in SaaS applications. These files haven’t been copied into the sidecar folder.
882
1003
  - `cds deploy --dry` generates DROP/CREATE DDL statements with an order that also H2 can handle, i.e. with dependant views dropped before basic views.
883
1004
  - `cds build` now correctly handles symbolic links for nodejs projects on Windows.
884
1005
  - `cds build` now correctly filters CDS source files when building SaaS applications.
@@ -971,7 +1092,7 @@ entity Tic { tac: Composition of { toe:String } }
971
1092
  ### Added
972
1093
 
973
1094
  - Custom error handler via `srv.on('error', function (err, req) { ... })` (beta)
974
- + Synchroneous modification of passed error only
1095
+ + Synchronous modification of passed error only
975
1096
  - `cds.log.format()` for custom log formatting
976
1097
 
977
1098
  ### Fixed
@@ -1013,7 +1134,7 @@ entity Tic { tac: Composition of { toe:String } }
1013
1134
 
1014
1135
  ### Fixed
1015
1136
 
1016
- - `cds build` now correctly creates the deployment layout for multitenant applications (sdc folder contents) that have dedicated folder paths configured for db, srv and app modules.
1137
+ - `cds build` now correctly creates the deployment layout for multitenant applications (sdc folder contents) that have dedicated folder paths configured for db, srv, and app modules.
1017
1138
  - `cds deploy --to sqlite` now ignores a `_texts.csv` file again if there is a language-specific file like `_texts_en.csv` present
1018
1139
  - `cds env` no longer fails to parse `.env` files with JSON values containing `=` characters
1019
1140
 
@@ -1223,7 +1344,7 @@ await UPDATE`Books`.with`x = x-${amount}`.where`ID=${ID}`
1223
1344
  ### Fixed
1224
1345
 
1225
1346
  - `cds build` for Java now also creates a default edmx file (the one w/o language suffix) if the `cds.i18n.languages` array is configured with a set of languages. Runtime systems expect this file.
1226
- - `cds build` now skips empty lines in CSV files when preparing SAP HANA deployment. This does not happens if the build target folder is `.`, because there CSV files are sources that are not touched.
1347
+ - `cds build` now skips empty lines in CSV files when preparing SAP HANA deployment. This doesn’t happens if the build target folder is `.`, because there CSV files are sources that are not touched.
1227
1348
  - `cds build` for SAP HANA now writes CSV files more reliably, avoiding sporadic `ENOENT` errors.
1228
1349
 
1229
1350
  ## Version 4.4.6 - 2020-12-08
@@ -1340,7 +1461,7 @@ await UPDATE`Books`.with`x = x-${amount}`.where`ID=${ID}`
1340
1461
 
1341
1462
  ### Fixed
1342
1463
 
1343
- - Fiori preview finds the `express` package again in the case where no `express` is installed in the application's `node_modules`.
1464
+ - SAP Fiori Elements preview finds the `express` package again in the case where no `express` is installed in the application's `node_modules`.
1344
1465
 
1345
1466
 
1346
1467
  # Version 4.2.6 - 2020-10-26
@@ -1365,7 +1486,7 @@ await UPDATE`Books`.with`x = x-${amount}`.where`ID=${ID}`
1365
1486
  - `cds watch` no longer shows an error in absence of model files
1366
1487
  - `cds build` no longer fails with an error about module './old/compile'
1367
1488
  - Stack trace of some errors have been improved
1368
- - The `.hdiconfig` file created by `cds build` now includes HANA artifact types from undeploy.json
1489
+ - The `.hdiconfig` file created by `cds build` now includes SAP HANA artifact types from undeploy.json
1369
1490
 
1370
1491
  # Version 4.2.3 - 2020-10-12
1371
1492
 
@@ -1386,7 +1507,7 @@ await UPDATE`Books`.with`x = x-${amount}`.where`ID=${ID}`
1386
1507
  - `cds.env.odata.flavor` to choose from the afore-mentioned presets
1387
1508
  - `cds.load` option `plain` replacing former option `clean` (which still is silently supported for compatibility).
1388
1509
  - `cds.get` now supports option `flavor` with values: `files` | `sources` | `parsed` | `resolved` | `compiled`.
1389
- - `sap.common.Currencies`, `Countries`, and `Languages` now have their `code` element annotated with `@Common.Text` pointing to the `name`. In Fiori's value list with fixed values, this will show the `name` rather than the code itself. As before, this only has an effect if `@Common.TextArrangement` is set to `#TextOnly` on the entity the code list is used as `ValueList` for.
1510
+ - `sap.common.Currencies`, `Countries`, and `Languages` now have their `code` element annotated with `@Common.Text` pointing to the `name`. In SAP Fiori's value list with fixed values, this will show the `name` rather than the code itself. As before, this only has an effect if `@Common.TextArrangement` is set to `#TextOnly` on the entity the code list is used as `ValueList` for.
1390
1511
 
1391
1512
  ## Changed
1392
1513
 
@@ -1432,7 +1553,7 @@ await UPDATE`Books`.with`x = x-${amount}`.where`ID=${ID}`
1432
1553
  - `cds.entities` w/o namespace parameter now works properly when running out of a compiled model (aka `csn.json` aka 'on Cloud Foundry').
1433
1554
  - `cds deploy --to hana` now also handles SAP HANA Cloud services on trial, which are created by the `hana` broker (in contrast to the `hanatrial` broker which still provisions older SAP HANA instances).
1434
1555
  - `cds deploy --to hana` no longer uses `cf marketplace`, which has changed its parameters in CF CLI v7.
1435
- - Fiori preview's html no longer provokes Javascript errors in the Fiori client.
1556
+ - SAP Fiori Elements preview's html no longer provokes Javascript errors in the SAP Fiori client.
1436
1557
  - For DB services of kind `sql` the service implementation is now set correctly in the cds configuration. Previously, `sql` services got a `sqlite` implementation even if they were set to `hana` in production.
1437
1558
  - Custom event handlers that do not register with a path (only with event and function) no longer crash the runtime
1438
1559
  - In Typescript typings, the API declaration for `cds.load` and the `bootstrap` event is now fixed.
@@ -1522,18 +1643,18 @@ Nevertheless, they are listed here for your reference.
1522
1643
 
1523
1644
  - **`cds build --production`** &mdash; builds the project using the `production` profile - same when `NODE_ENV` or `CDS_ENV` environment variable is set to `production`. This will create HANA deployment artifacts if `kind: "sql"` has been defined.
1524
1645
 
1525
- - **`cds build --for <hana|java-cf|node-cf|mtx> --opts <...>`** &mdash; now supports execution of auto-created or configured build tasks. Individual properties can be overwritten by passing corresponding CLI options, defaults are used otherwise. E.g. `cds build --for hana --dest target --opts model=[data,srv,app]`. **Note:** The parameter `options-model` has been deprecated use `--opts model=[...]`instead.
1646
+ - **`cds build --for <hana|java-cf|node-cf|mtx> --opts <...>`** &mdash; now supports execution of auto-created or configured build tasks. Individual properties can be overwritten by passing corresponding CLI options, defaults are used otherwise. For example, `cds build --for hana --dest target --opts model=[data,srv,app]`. **Note:** The parameter `options-model` has been deprecated use `--opts model=[...]`instead.
1526
1647
 
1527
1648
  - The set of languages that is honored for the `i18n.json` language pack can now be configured through `i18n.languages`. Default is still `all`, which means the sum of language files found next to models.
1528
1649
 
1529
1650
  ## Fixed
1530
- - Fiori preview is now working again with the latest version of SAP UI5.
1651
+ - SAP Fiori Elements preview is now working again with the latest version of SAP UI5.
1531
1652
 
1532
1653
  - **Use latest SAP CommonCryptoLib help** &mdash; when SAP CommonCryptoLib is missing during `cds deploy --to hana`.
1533
1654
 
1534
1655
  - `sql_mapping` is only written to `csn.json` if the classic Java runtime and no default naming is used.
1535
1656
 
1536
- - Fiori dev support in `cds run` now also honors `/v2` URLs. These are installed by default by the `@sap/cds-odata-v2-adapter-proxy`.
1657
+ - SAP Fiori Elements dev support in `cds run` now also honors `/v2` URLs. These are installed by default by the `@sap/cds-odata-v2-adapter-proxy`.
1537
1658
 
1538
1659
  - npm scripts that wrap around cds-dk commands like `cds watch` now also work on Windows. Previously they couldn't find the cds command.
1539
1660
 
@@ -1566,7 +1687,7 @@ Nevertheless, they are listed here for your reference.
1566
1687
 
1567
1688
  - The `UI.Identification` annotation for `sap.common.CodeList` got a correct value, pointing to its `name` element.
1568
1689
  - Configuration `requires.<foo>.credentials.destination` is now preserved again when running with `VCAP_SERVICES`. In version 3.34.1 it was cleared.
1569
- - Entities annotated with `@cds.persistence.skip:if-unused` (like `sap.common.Languages`) now again are skipped when compiling to HANA output. This got broken in previous versions when using the new compiler APIs.
1690
+ - Entities annotated with `@cds.persistence.skip:if-unused` (like `sap.common.Languages`) now again are skipped when compiling to SAP HANA output. This got broken in previous versions when using the new compiler APIs.
1570
1691
  - `sql_mapping` is again written to `csn.json` as it's required by classic Java runtime.
1571
1692
  - `default-env.json` is now read even in production, which is in line with the behavior of other modules that honor this file. Real prod environments like CF will still overwrite these defaults.
1572
1693
  - `cds build` caused error `invalid option` &mdash; when passing command line options like `log-level`, `src` or `for`.
@@ -1772,7 +1893,7 @@ Support for `cds init` is now moved to `@sap/cds-dk`.
1772
1893
 
1773
1894
  # Version 3.21.1 - 2020-01-07
1774
1895
  ## Fixed
1775
- - Fiori preview no longer crashes since it's pinned to SAP UI5 1.72.3. Actual cause still needs to be investigated.
1896
+ - SAP Fiori Elements preview no longer crashes since it's pinned to SAP UI5 1.72.3. Actual cause still needs to be investigated.
1776
1897
 
1777
1898
  ## Version 3.21.0 - 2019-12-11
1778
1899
 
@@ -1983,8 +2104,8 @@ Support for `cds init` is now moved to `@sap/cds-dk`.
1983
2104
  - `cds compile` now understands `--to edmx-v2` and `--to edmx-v4` to produce OData metadata of versions 2 or 4, respectively.
1984
2105
 
1985
2106
  ## Changed
1986
- - Fiori preview in `cds run` now is only added if OData services are being served.
1987
- For other protocols like `rest`, no Fiori preview is provided. Same holds true for the `$metadata` link.
2107
+ - SAP Fiori Elements preview in `cds run` now is only added if OData services are being served.
2108
+ For other protocols like `rest`, no SAP Fiori Elements preview is provided. Same holds true for the `$metadata` link.
1988
2109
  - `cds compile` now behaves better in non-TTY scenarios (e.g. when piping to files). It writes a proper JSON
1989
2110
  string instead of a Javascript object. Previously, one had to enforce JSON using the `--to json` processor. Compare e.g. the output of `cds compile model.cds` to `cds compile model.cds > model.json`.
1990
2111
 
@@ -2092,7 +2213,7 @@ Support for `cds init` is now moved to `@sap/cds-dk`.
2092
2213
  # Version 3.10.0 - 2019-05-21
2093
2214
 
2094
2215
  ## Added
2095
- - Tables and view for localized entities are created by default now, both for HANA and SQLite.
2216
+ - Tables and view for localized entities are created by default now, both for SAP HANA and SQLite.
2096
2217
  - Internal errors are now marked as such in all CLI commands, with a request to report them.
2097
2218
 
2098
2219
  ## Changed
@@ -2220,7 +2341,7 @@ Support for `cds init` is now moved to `@sap/cds-dk`.
2220
2341
 
2221
2342
  ## Fixed
2222
2343
  - In `cds serve` service providers where added twice to the express app. This is fixed.
2223
- - In the logs of `cds serve` false warnings on fiori requests are now gone.
2344
+ - In the logs of `cds serve` false warnings on SAP Fiori Elements requests are now gone.
2224
2345
  - `cds serve` no longer fails on localization for unbound actions.
2225
2346
  - The project template was fixed to properly wire up the connection to SAP HANA.
2226
2347
 
@@ -2492,7 +2613,7 @@ Same as version 2.3.2, but including the generic service provider for Node.js (`
2492
2613
  - CDS configuration in `package.json` can now be omitted if you follow the standard project layout, i.e. if you place your model files in `db/`, `srv/`, and `app/` folders.
2493
2614
 
2494
2615
  ## Changed
2495
- - Previously data models needed to include import statements to the service models (e.g. `using from '../srv'`), so that the Java runtime could use these service views on the DB to execute queries. The views are now included automatically, so that you can remove the explict `using` clauses.
2616
+ - Previously data models needed to include import statements to the service models (e.g. `using from '../srv'`), so that the Java runtime could use these service views on the DB to execute queries. The views are now included automatically, so that you can remove the explicit `using` clauses.
2496
2617
  - Calling just `cds` on the command line now prints its help. The previously started REPL is now available with `cds repl` (or just `cds r`).
2497
2618
 
2498
2619
  ## Fixes