@sap/cds 7.2.1 → 7.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +168 -126
- package/README.md +1 -1
- package/apis/core.d.ts +6 -4
- package/apis/services.d.ts +24 -4
- package/apis/test.d.ts +24 -10
- package/bin/serve.js +4 -3
- package/lib/auth/ias-auth.js +7 -8
- package/lib/compile/cdsc.js +5 -7
- package/lib/compile/etc/csv.js +22 -11
- package/lib/compile/for/lean_drafts.js +1 -1
- package/lib/dbs/cds-deploy.js +1 -2
- package/lib/env/cds-env.js +26 -20
- package/lib/env/defaults.js +4 -3
- package/lib/env/schema.js +9 -0
- package/lib/i18n/localize.js +83 -77
- package/lib/index.js +6 -2
- package/lib/linked/classes.js +13 -13
- package/lib/plugins.js +41 -45
- package/lib/req/user.js +2 -2
- package/lib/srv/protocols/_legacy.js +0 -1
- package/lib/srv/protocols/odata-v4.js +4 -0
- package/lib/utils/axios.js +7 -1
- package/lib/utils/cds-test.js +140 -133
- package/lib/utils/cds-utils.js +10 -3
- package/lib/utils/check-version.js +6 -0
- package/lib/utils/data.js +19 -6
- package/libx/_runtime/cds-services/adapter/odata-v4/OData.js +20 -19
- package/libx/_runtime/cds-services/adapter/odata-v4/handlers/action.js +10 -1
- package/libx/_runtime/cds-services/adapter/odata-v4/handlers/error.js +1 -1
- package/libx/_runtime/cds-services/adapter/odata-v4/handlers/request.js +2 -3
- package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-commons/utils/ValueConverter.js +0 -14
- package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/core/OdataRequest.js +1 -0
- package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/deserializer/BatchRequestListBuilder.js +5 -2
- package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/handler/MetadataHandler.js +1 -1
- package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/handler/ServiceHandler.js +1 -1
- package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/invocation/DispatcherCommand.js +2 -2
- package/libx/_runtime/cds-services/adapter/odata-v4/okra/odata-server/utils/BufferedWriter.js +1 -3
- package/libx/_runtime/cds-services/adapter/odata-v4/utils/metaInfo.js +1 -1
- package/libx/_runtime/common/composition/update.js +18 -2
- package/libx/_runtime/common/error/frontend.js +46 -34
- package/libx/_runtime/common/generic/auth/capabilities.js +33 -14
- package/libx/_runtime/common/generic/input.js +1 -1
- package/libx/_runtime/common/utils/cqn2cqn4sql.js +3 -3
- package/libx/_runtime/db/query/update.js +48 -30
- package/libx/_runtime/fiori/lean-draft.js +2 -3
- package/libx/_runtime/hana/conversion.js +3 -2
- package/libx/_runtime/messaging/enterprise-messaging-utils/getTenantInfo.js +1 -1
- package/libx/_runtime/messaging/outbox/utils.js +1 -1
- package/libx/_runtime/remote/Service.js +1 -17
- package/libx/_runtime/remote/utils/client.js +3 -3
- package/libx/_runtime/remote/utils/data.js +5 -7
- package/libx/odata/{grammar.pegjs → grammar.peggy} +1 -1
- package/libx/odata/metadata.js +121 -0
- package/libx/odata/parser.js +1 -1
- package/libx/odata/service-document.js +61 -0
- package/libx/odata/utils.js +102 -48
- package/libx/rest/RestAdapter.js +2 -2
- package/libx/rest/middleware/error.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,43 @@
|
|
|
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.1 - 2023-10-23
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- `cds-ts` no longer fails if configured with an ESM loader. It tries loading files w/ `import()` in this case.
|
|
12
|
+
- `cds deploy` for draft enabled entities
|
|
13
|
+
|
|
14
|
+
## Version 7.3.0 - 2023-10-04
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- `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()`.
|
|
19
|
+
- Based on `cds.localized` with cached bundles, a new operation `cds.localized.lookup(i18n_key, locale)` is provided.
|
|
20
|
+
- If env variable `CDS_TEST_ENV_CHECK` is set, `cds.test.in()` detects if `cds.env` was loaded before from a different folder.
|
|
21
|
+
- `cds.test.log()` allows to capture and analyse any console log output. `cds.test.verbose()` is now deprecated.
|
|
22
|
+
- Typings for `cds.tx`
|
|
23
|
+
- Add method `cds.schema.default4(schemaId)` to retrieve json schema based on its id
|
|
24
|
+
- Support for pseudo role `internal-user` with authentication kind `ias`
|
|
25
|
+
- CSV files with multiline values, i.e. line breaks, are now supported with `cds deploy`
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- If ommitted in the accept header, `ExponentialDecimals` no longer gets defaulted (to `true`), which violated the OData 4.0 specification.
|
|
30
|
+
This change can _temporarily_ be overridden via `cds.env.odata.defaultExponentialDecimals = 'true/false'`.
|
|
31
|
+
- Make type signature of `extend.with` more general
|
|
32
|
+
- `cds.test.data.autoReset()` is deprecated in favor of explicit `cds.test.data.reset()` call, like `beforeEach (test.data.reset)`.
|
|
33
|
+
- `cds.utils.uuid()` now uses `randomUUID` function of node `crypto` module instead of `uuid` package
|
|
34
|
+
- `@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.
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- Draft: activate managed fields were miscalculated in some cases
|
|
39
|
+
- Error with `exists` predicate in `@restrict.where` when calling compositions
|
|
40
|
+
- `IsActiveEntity` in error target for lean draft
|
|
41
|
+
- Remote Service: OData v2 compliant representation of Edm.Decimal, Edm.Double, and Edm.Int64 in URL
|
|
42
|
+
- In draft activate managed fields were calculated wrongly in some cases
|
|
43
|
+
- On draft save, missing entries in `req.headers`
|
|
7
44
|
|
|
8
45
|
## Version 7.2.1 - 2023-09-21
|
|
9
46
|
|
|
@@ -24,11 +61,11 @@
|
|
|
24
61
|
- Typescript definition for:
|
|
25
62
|
- The `cds.exit()` method.
|
|
26
63
|
- The `label` option parameter in the `cds.log()` API. For example: `cds.log('log message', { label: 'adapter' }`.
|
|
27
|
-
-
|
|
64
|
+
- A variant of the `roles` property of the `cds.User` class.
|
|
65
|
+
- `@restrict` annotations can now prevent the creation of drafts ([see documentation](https://cap.cloud.sap/docs/guides/authorization#restrictions-and-draft-mode))
|
|
28
66
|
- JSON Schema validation for `cds.requires.multitenancy.jobs` settings.
|
|
29
|
-
- Managed associations to
|
|
30
|
-
-
|
|
31
|
-
Only allowed in combination with new OData parser, i.e., `cds.env.features.odata_new_parser = true`.
|
|
67
|
+
- Managed associations to one with exactly one foreign key can now have a default value.
|
|
68
|
+
- 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`.
|
|
32
69
|
- Support for `@requires: 'any'` to make service public, i.e., no authenticated user is required
|
|
33
70
|
|
|
34
71
|
### Changed
|
|
@@ -36,9 +73,10 @@
|
|
|
36
73
|
- The built-in `java` profile sets `build.target` to `.` by default
|
|
37
74
|
- Decimals from query options (e.g., `$filter`) are represented as strings in CQN
|
|
38
75
|
- Improve error message for unsupported transformations with `$apply`
|
|
39
|
-
- For database dialect H2, specialized localized views for languages `de` and `fr` are no longer generated.
|
|
40
|
-
- Authentication kinds `jwt`, `xsuaa`, and `ias` throw an error during bootstrapping if the necessary credentials are
|
|
41
|
-
|
|
76
|
+
- For database dialect H2, specialized, localized views for languages `de` and `fr` are no longer generated.
|
|
77
|
+
- Authentication kinds `jwt`, `xsuaa`, and `ias` throw an error during bootstrapping if the necessary credentials are
|
|
78
|
+
unavailable.
|
|
79
|
+
Previously, a warning was logged, and authentication was skipped.
|
|
42
80
|
See `cds bind`/ Hybrid Testing in CAPire for how to combine local development and cloud resources.
|
|
43
81
|
- The Typescript definitions now make use of the default export.
|
|
44
82
|
|
|
@@ -46,25 +84,27 @@
|
|
|
46
84
|
|
|
47
85
|
- Trace middleware: Adapted usage of `performance.now()` for Node 20.
|
|
48
86
|
- Draft: Associations to non-draft enabled entities must never point to drafts
|
|
49
|
-
-
|
|
50
|
-
- `<remote-srv>.run('/arbitrary-url')`
|
|
87
|
+
- Avoided type error in old db post-processing
|
|
88
|
+
- `<remote-srv>.run('/arbitrary-url')` now defaults to a get request and doesn't add request body
|
|
51
89
|
- `@cds.query.limit` is cached per projection
|
|
52
90
|
- Application crash for incorrect usage of REST-style API to run queries
|
|
53
91
|
- The `@requires` annotation on entity level didn't get applied to bound operations
|
|
54
|
-
- `cds.test` run with a profile parameter such as `cds.test('run', '--profile', 'integration-tests')` will use the
|
|
92
|
+
- `cds.test` run with a profile parameter such as `cds.test('run', '--profile', 'integration-tests')` will use the
|
|
93
|
+
correct profile.
|
|
55
94
|
- `cds.env.requires.auth.restrict_all_services = false` in combination with `cds.env.requires.middlewares = true` (the default)
|
|
56
95
|
|
|
57
96
|
## Version 7.1.2 - 2023-08-11
|
|
58
97
|
|
|
59
98
|
### Fixed
|
|
60
99
|
|
|
61
|
-
- `req.tenant` is undefined when using new OData parser
|
|
62
|
-
- Draft:
|
|
63
|
-
|
|
64
|
-
-
|
|
100
|
+
- `req.tenant` is undefined when using the new OData parser
|
|
101
|
+
- Draft: Replace some occurrences of the `arr.push(...largeArray)` pattern when copying large arrays to prevent maximum
|
|
102
|
+
call stack size exceeded errors due to large deep update processing when saving the draft
|
|
103
|
+
- Keys are no longer added to the diff as they could be renamed, leading to SQL errors
|
|
104
|
+
- Custom-bound actions for draft-enabled entities don't trigger a READ request on application service anymore
|
|
65
105
|
- `cds.connect.to('db', options)`: add-hoc options for SAP HANA Database Service
|
|
66
106
|
- Reading key-less singleton with `$select` clause while using the new OData parser `cds.env.features.odata_new_parser`
|
|
67
|
-
-
|
|
107
|
+
- 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`)
|
|
68
108
|
|
|
69
109
|
## Version 7.1.1 - 2023-08-01
|
|
70
110
|
|
|
@@ -78,7 +118,7 @@
|
|
|
78
118
|
|
|
79
119
|
### Added
|
|
80
120
|
|
|
81
|
-
- Enable PDF export via GET to collection with accept header `
|
|
121
|
+
- Enable PDF export via GET to collection with accept header `application/pdf`.
|
|
82
122
|
Custom handler must return the following:
|
|
83
123
|
```
|
|
84
124
|
{
|
|
@@ -105,26 +145,27 @@
|
|
|
105
145
|
to: ['authenticated-user']
|
|
106
146
|
}])
|
|
107
147
|
```
|
|
108
|
-
- Support for resolving
|
|
148
|
+
- Support for resolving experimental `STREAM` CQN queries that point to views
|
|
109
149
|
|
|
110
150
|
### Fixed
|
|
111
151
|
|
|
112
|
-
- Multiple TypeScript improvements
|
|
152
|
+
- Multiple TypeScript fixes/improvements
|
|
113
153
|
- Proper handling for `expand=*` for OData URL to CQN parser (`cds.env.features.odata_new_parser`)
|
|
114
|
-
-
|
|
115
|
-
- Log level for
|
|
154
|
+
- Corrected the resolution of fully qualified operation names in the REST adapter.
|
|
155
|
+
- Log level for OData metadata cache was not handled correctly
|
|
116
156
|
- Protocol paths are normalized to always have a leading slash
|
|
117
157
|
- `@odata` shortcut for `odata-v4` protocol with custom configuration
|
|
118
|
-
-
|
|
119
|
-
-
|
|
158
|
+
- Set default protocol to `odata-v4`, independent of the order in `cds.env.protocols`
|
|
159
|
+
- Now data is correctly logged for `GET` and `DELETE` remote requests
|
|
120
160
|
- draft: deep update without change should not update the `modifiedAt` field
|
|
121
161
|
- Lean draft: do not propagate `@Capabilities.NavigationRestrictions.RestrictedProperties`
|
|
122
|
-
- Commit
|
|
162
|
+
- Commit database transactions only once outbound streaming has ended
|
|
123
163
|
- Lean draft: deactivate legacy `drafts` getter
|
|
124
|
-
- Updated typings for srv.send
|
|
164
|
+
- Updated typings for `srv.send()`
|
|
125
165
|
- `$search`: exclude calculated fields/expressions from default search in projection of projections
|
|
126
|
-
- Immutable properties are always removed from payload during UPDATE
|
|
127
|
-
- `serviceinfo.urlPath` contains the first endpoint of the service (cf. `srv.endpoints`), which is the legacy path if
|
|
166
|
+
- Immutable properties are always removed from payload during `UPDATE`
|
|
167
|
+
- `serviceinfo.urlPath` contains the first endpoint of the service (cf. `srv.endpoints`), which is the legacy path if
|
|
168
|
+
`cds.env.features.serve_on_root === true`
|
|
128
169
|
|
|
129
170
|
## Version 7.0.3 - 2023-07-19
|
|
130
171
|
|
|
@@ -136,7 +177,7 @@
|
|
|
136
177
|
- `SELECT.one.localized`
|
|
137
178
|
- `COPYFILE_DISABLE=1` is now set for building `tar` archives by default
|
|
138
179
|
- Actions of projection target are no longer accessible in linked models
|
|
139
|
-
- Batch
|
|
180
|
+
- Batch executes model-less mass inputs when on `@sap/hana-client`
|
|
140
181
|
- Requests to `/<path>/webapp` return 404 for absolute `@path` specifications
|
|
141
182
|
- `cds compile --to serviceinfo` no longer returns paths w/ Windows `\` path characters
|
|
142
183
|
|
|
@@ -153,48 +194,49 @@
|
|
|
153
194
|
|
|
154
195
|
### Fixed
|
|
155
196
|
|
|
156
|
-
- Feature toggle detection in single
|
|
197
|
+
- Feature toggle detection in single-tenant mode
|
|
157
198
|
- Log output for OData $batch requests
|
|
158
|
-
- Avoid "catastrophic backtracking" issue in
|
|
199
|
+
- Avoid "catastrophic backtracking" issue in Okra's (OData V4 server) tokenizer
|
|
159
200
|
- Transaction marked as committed too early
|
|
160
201
|
|
|
161
202
|
## Version 7.0.0 - 2023-06-21
|
|
162
203
|
|
|
163
204
|
### Added
|
|
164
205
|
|
|
165
|
-
- Handling of expand with multiple `*` (e.g.
|
|
206
|
+
- Handling of expand with multiple `*` (e.g. `$expand=*,*`) in new parser. When using `*` in an `$expand`, the new OData
|
|
207
|
+
parser now removes all unneeded `*`.
|
|
166
208
|
- Tests run with `cds.test()` now also load `cds-plugins`
|
|
167
209
|
|
|
168
210
|
### Changed
|
|
169
211
|
|
|
170
|
-
- 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.
|
|
212
|
+
- 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.
|
|
171
213
|
- OData: `PUT`/`PATCH` requests resulting in a new entity (i.e., the `UPSERT` effectively was an `INSERT`) return status code 201
|
|
172
214
|
- Draft: Draft activate requests resulting in an `UPDATE` return status code 200
|
|
173
215
|
- ETags are validated via `WHERE EXISTS` clause attached to query on `GET`, `PUT`/`PATCH`, and `DELETE`
|
|
174
216
|
- OData: `PUT`/`PATCH` with `if-match` header prevents `UPSERT`, i.e., only an existing entity can be updated by such a request
|
|
175
217
|
- Runtime support for `@sap/instance-manager` is removed in favor of the `cds-mtxs` Service Manager client.
|
|
176
|
-
- In multitenant mode, the HANA pool uses the `cds-mtxs` credentials cache
|
|
218
|
+
- In multitenant mode, the SAP HANA pool uses the `cds-mtxs` credentials cache
|
|
177
219
|
- Draft handlers are registered for all entities.
|
|
178
220
|
- Decimals in client input are validated in runtime's assert framework (previously OData adapter)
|
|
179
221
|
- `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.
|
|
180
222
|
- Changed the behavior of `SELECT` queries for single entities to return `undefined` instead of `null` when no record is found.
|
|
181
|
-
- Fiori preview has moved to new `@sap/cds-fiori` module.
|
|
182
|
-
- Numbers are now always used as placeholders in SQL, except for `SELECT 1 From...`, `LIMIT
|
|
223
|
+
- Fiori preview has moved to the new `@sap/cds-fiori` module.
|
|
224
|
+
- 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`).
|
|
183
225
|
- 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.
|
|
184
|
-
- `@protocol` annotation can
|
|
185
|
-
- 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
|
|
226
|
+
- `@protocol` annotation can serve multiple protocols per service.
|
|
227
|
+
- 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 `/`).
|
|
186
228
|
- `cds.requires.middlewares` is enabled by default.
|
|
187
|
-
- The order of
|
|
188
|
-
- `cds.fiori.lean_draft` is activated by default. You can still set it to `false` as fallback.
|
|
229
|
+
- 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.
|
|
230
|
+
- `cds.fiori.lean_draft` is activated by default. You can still set it to `false` as a fallback.
|
|
189
231
|
|
|
190
232
|
### Fixed
|
|
191
233
|
|
|
192
234
|
- UUID typed key properties are no longer automatically filled during UPSERT
|
|
193
235
|
- OData: When undefined in the payload, requests for actions with not nullable array-type parameters result in a client-side error
|
|
194
|
-
- Missing `GROUP BY` in request with
|
|
195
|
-
- When `@sap/cds` was not installed underneath project root, cds-plugins
|
|
236
|
+
- Missing `GROUP BY` in request with `$apply` in combination with aggregate on restricted entity
|
|
237
|
+
- When `@sap/cds` was not installed underneath project root, cds-plugins were not found
|
|
196
238
|
- Support for multiline texts in `properties` files
|
|
197
|
-
- Error when reading auth
|
|
239
|
+
- Error when reading auth-protected entities with infix filter in expand
|
|
198
240
|
- Glitch in transaction handling in case of concurrent async before handlers
|
|
199
241
|
|
|
200
242
|
### Removed
|
|
@@ -208,7 +250,7 @@
|
|
|
208
250
|
- Internal `req.getUriInfo()` and `req.getUrlObject()`
|
|
209
251
|
- `cds deploy --to hana` is now part of `@sap/cds-dk`.
|
|
210
252
|
- Deprecated compat mode `cds.env.features.cds_tx_protection = false`
|
|
211
|
-
- Beta `AuditLogService` and out-of-the-box audit logging. Use plugin `@cap-js/audit-logging` instead.
|
|
253
|
+
- Beta `AuditLogService` and out-of-the-box audit logging. Use the plugin `@cap-js/audit-logging` instead.
|
|
212
254
|
|
|
213
255
|
## Version 6.8.4 - 2023-06-14
|
|
214
256
|
|
|
@@ -233,7 +275,7 @@
|
|
|
233
275
|
- Nested `$expand` OData query to the `texts` compiler-generated composition for entities with localized elements.
|
|
234
276
|
For example, similar OData requests `Entity?$expand=items($expand=item($expand=texts))` now should work as expected.
|
|
235
277
|
- `req.subject` would occasionally be incorrect when a query had been executed prior to it.
|
|
236
|
-
- cds plugins are also fetched from `devDependencies`
|
|
278
|
+
- cds plugins are also fetched from the development dependencies (`devDependencies`) section in `package.json`
|
|
237
279
|
- `cds build` now correctly resolves complex models of mtx extension projects
|
|
238
280
|
|
|
239
281
|
## Version 6.8.1 - 2023-05-04
|
|
@@ -247,12 +289,12 @@ For example, similar OData requests `Entity?$expand=items($expand=item($expand=t
|
|
|
247
289
|
### Added
|
|
248
290
|
|
|
249
291
|
- Global cds-dk version is now included in tabular output of `cds v -i`.
|
|
250
|
-
- Audit logging support for OAuth2 Plan
|
|
251
|
-
- Feature flag to limit the
|
|
292
|
+
- Audit logging support for the OAuth2 Plan
|
|
293
|
+
- 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`.
|
|
252
294
|
- Custom authentication in `enterprise-messaging`
|
|
253
295
|
- Requests with lambda expressions are rejected by remote services of kind `odata-v2`
|
|
254
296
|
- `cds build` ignores invalid entries in `undeploy.json`
|
|
255
|
-
- New `minorUnit` element in `sap.common.Currencies` for how many fractions the minor unit takes (e.g
|
|
297
|
+
- 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.
|
|
256
298
|
- 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.
|
|
257
299
|
- Plugins are now also fetched from `devDependencies`, unless `NODE_ENV === 'production'`
|
|
258
300
|
- Plugins can now provide `cds` configurations in their package.json.
|
|
@@ -261,30 +303,30 @@ For example, similar OData requests `Entity?$expand=items($expand=item($expand=t
|
|
|
261
303
|
### Changed
|
|
262
304
|
|
|
263
305
|
- Texts for _Country_ are changed to _Country/Region_ in `@sap.common.Countries`
|
|
264
|
-
- Resolved issue where selection strategies of destination options in multitenant applications were not working correctly, resulting in runtime errors.
|
|
306
|
+
- Resolved an issue where selection strategies of destination options in multitenant applications were not working correctly, resulting in runtime errors.
|
|
265
307
|
The fix relies on the `@sap-cloud-sdk/connectivity` npm package to be installed.
|
|
266
308
|
- Precision of timestamp used in outbox message increased to 100 nanoseconds (`YYYY-MM-DD hh:mm:ss.nnnnnnn`)
|
|
267
|
-
- When
|
|
309
|
+
- When another user locks a draft, the error message now includes the username of that user
|
|
268
310
|
|
|
269
311
|
### Fixed
|
|
270
312
|
|
|
271
|
-
-
|
|
313
|
+
- Fix exported types of the `cds` core API
|
|
272
314
|
- cds build uses the correct path if no project dir is given
|
|
273
|
-
- Read after write for updates on
|
|
315
|
+
- Read after write for updates on-to-one navigation
|
|
274
316
|
- Error in $orderBy in combination with @Core.MediaType property
|
|
275
317
|
- Fixes in lean-draft
|
|
276
318
|
- Fixed an issue where the combined `$search` and `$expand` query and localized data was returning empty results on SAP HANA
|
|
277
319
|
- Tests using `cds.test` no longer crash with a segmentation fault if `injectGlobals: false` is set in the Jest configuration.
|
|
278
|
-
- Handlers registered with `cds.on('shutdown')` are now called with an `err` argument
|
|
279
|
-
- Log output on uncaught exceptions or unhandled rejected Promises now is done via `cds.log` instead of `console`.
|
|
280
|
-
- 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.
|
|
320
|
+
- 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.
|
|
321
|
+
- Log output on uncaught exceptions, or unhandled rejected Promises now is done via `cds.log` instead of `console`.
|
|
322
|
+
- 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.
|
|
281
323
|
- Require custom auth relative to project root when using pluggable middlewares
|
|
282
324
|
|
|
283
325
|
## Version 6.7.2 - 2023-04-24
|
|
284
326
|
|
|
285
327
|
### Fixed
|
|
286
328
|
|
|
287
|
-
- Try to destroy
|
|
329
|
+
- Try to destroy nonexistent socket in case of custom streaming implementation
|
|
288
330
|
- Draft: Missing field `IsActiveEntity` in target path of error messages during `draftActivate`
|
|
289
331
|
- Minor fixes for `cds.fiori.lean_draft`
|
|
290
332
|
- Error in media type check when no `Content-Type` header is found
|
|
@@ -306,7 +348,7 @@ The fix relies on the `@sap-cloud-sdk/connectivity` npm package to be installed.
|
|
|
306
348
|
|
|
307
349
|
### Added
|
|
308
350
|
|
|
309
|
-
- Config `cds.ql.quirks_mode` as a compatibility flag to still support
|
|
351
|
+
- Config `cds.ql.quirks_mode` as a compatibility flag to still support behaviors which are undocumented or even against the specifications, for example, CQN:
|
|
310
352
|
```js
|
|
311
353
|
let q = INSERT.into('Books')
|
|
312
354
|
//> According to CQN spec should return:
|
|
@@ -318,7 +360,7 @@ The fix relies on the `@sap-cloud-sdk/connectivity` npm package to be installed.
|
|
|
318
360
|
- `cds build` now checks extension point restrictions defined by the SaaS app provider. `cds build` fails if any restrictions are violated.
|
|
319
361
|
- Typings for `cds.spawn()`
|
|
320
362
|
- Typings for `entity.drafts`
|
|
321
|
-
- Typings for
|
|
363
|
+
- Typings for Winston logger
|
|
322
364
|
- Typings for `cds.context`
|
|
323
365
|
- Typings for `service.on`, `service.before`, and `service.after` for actions and CRUD events
|
|
324
366
|
- CLI command `cds env` now allows property paths with `/` instead of `.`, which allows usages like that:
|
|
@@ -326,7 +368,7 @@ The fix relies on the `@sap-cloud-sdk/connectivity` npm package to be installed.
|
|
|
326
368
|
cds env requires/cds.xt.ModelProviderService
|
|
327
369
|
```
|
|
328
370
|
- `cds.env` now allows to statically set/add profiles via `cds.profile` and `cds.profiles` in package.json.
|
|
329
|
-
- `cds.env` now also supports using profiles in definitions
|
|
371
|
+
- `cds.env` now also supports using profiles in preset definitions, i.e., in `cds.requires.kinds`.
|
|
330
372
|
- `cds deploy` prints a warning when using Cloud Foundry client version less than 8.
|
|
331
373
|
- `req.subject` to conveniently operate on the subjects targeted by the request. Example usage:
|
|
332
374
|
SELECT.one.from(req.subject) //> returns single
|
|
@@ -339,8 +381,8 @@ cds env requires/cds.xt.ModelProviderService
|
|
|
339
381
|
|
|
340
382
|
- CQL types now attach additional functionality to entities where appropriate
|
|
341
383
|
- `cds.log().trace()` now logs stack traces in `DEBUG` level, before that was on `TRACE`/`SILLY` level only
|
|
342
|
-
- Plain SQL queries now have `req.event === undefined
|
|
343
|
-
- Plain SQL queries don't allow
|
|
384
|
+
- Plain SQL queries now have `req.event === undefined`. Formerly this had non-deterministic values.
|
|
385
|
+
- Plain SQL queries don't allow registering custom handlers, other than for event `'*'`.
|
|
344
386
|
- Plain SQL queries are only supported on database services, not on application services.
|
|
345
387
|
- CQN representation of `columns=*` is not allowed anymore, instead `columns=['*']` should be used. This also applies to expand.
|
|
346
388
|
- Only draft roots can be created via direct, non-navigation OData `POST` requests.
|
|
@@ -349,19 +391,19 @@ cds env requires/cds.xt.ModelProviderService
|
|
|
349
391
|
|
|
350
392
|
### Fixed
|
|
351
393
|
|
|
352
|
-
- Specifying a key in `SELECT.from(...)` is now typed to produce a single result
|
|
394
|
+
- Specifying a key in `SELECT.from(...)` is now typed to produce a single result instead of an array of results
|
|
353
395
|
- Proper handling of `IsActiveEntity` in error paths
|
|
354
|
-
- For
|
|
396
|
+
- For cloud events using AMQP, the type is set to `application/cloudevents+json`
|
|
355
397
|
- Use `message` property in typings.
|
|
356
398
|
- Typings for `cds.on('bootstrap', app => {app.use(...)`
|
|
357
399
|
- Return types for `User` and `delete` in typescript
|
|
358
400
|
- Typings for connect options
|
|
359
401
|
- Typings for `req.error`
|
|
360
402
|
- Deployment in sidecar
|
|
361
|
-
- Error with restricting an entity and
|
|
403
|
+
- Error with restricting an entity and requesting it with `$apply` in combination with aggregate
|
|
362
404
|
- Combined usage of `$skiptoken` and `$skip`
|
|
363
405
|
- Error `package.json file is missing` in mtx extension builds
|
|
364
|
-
- CLI commands w/ unknown arguments (`cds --foo`)
|
|
406
|
+
- CLI commands w/ unknown arguments (`cds --foo`) fail again with a proper error message
|
|
365
407
|
|
|
366
408
|
## Version 6.6.2 - 2023-03-17
|
|
367
409
|
|
|
@@ -374,7 +416,7 @@ cds env requires/cds.xt.ModelProviderService
|
|
|
374
416
|
|
|
375
417
|
### Added
|
|
376
418
|
|
|
377
|
-
- `cds.xt.TENANT_UPDATED` event is emitted once a tenant
|
|
419
|
+
- `cds.xt.TENANT_UPDATED` event is emitted once a tenant is extended
|
|
378
420
|
|
|
379
421
|
### Fixed
|
|
380
422
|
|
|
@@ -395,21 +437,21 @@ cds env requires/cds.xt.ModelProviderService
|
|
|
395
437
|
|
|
396
438
|
### Changed
|
|
397
439
|
|
|
398
|
-
- `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
|
|
440
|
+
- `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.
|
|
399
441
|
- Optimize `@cds.persistence.journal` filtering for `last-dev` CSN file.
|
|
400
442
|
|
|
401
443
|
### Fixed
|
|
402
444
|
|
|
403
|
-
- `cds deploy --to hana` no longer calls `cds bind` when `VCAP_SERVICES` is provided,
|
|
445
|
+
- `cds deploy --to hana` no longer calls `cds bind` when `VCAP_SERVICES` is provided, for example, via `default-env.json`.
|
|
404
446
|
- `$search` on an entity without String elements
|
|
405
447
|
- Only elements from type `cds.String` are searchable when combining `$apply` and `$search`
|
|
406
448
|
- Error message for missing database connection in draft case
|
|
407
449
|
- Extensibility with in-memory Sqlite
|
|
408
450
|
- OData adapter error messages
|
|
409
|
-
- Columns in navigation path are now added to the SELECT.columns in new parser
|
|
410
|
-
- Application service calls on draft
|
|
451
|
+
- Columns in navigation path are now added to the SELECT.columns in the new parser
|
|
452
|
+
- Application service calls on draft-enabled entities using aliases
|
|
411
453
|
- Custom mtxs build tasks now use the correct default `src` folder value.
|
|
412
|
-
- `cds build` adds a `.hdiconfig` file when creating HANA migration tables if none
|
|
454
|
+
- `cds build` adds a `.hdiconfig` file when creating SAP HANA migration tables if none exists.
|
|
413
455
|
- UPSERTs using reserved keywords
|
|
414
456
|
- Fix outbound-streaming error handling
|
|
415
457
|
- Rollback transaction if inbound streaming fails
|
|
@@ -417,15 +459,15 @@ cds env requires/cds.xt.ModelProviderService
|
|
|
417
459
|
- Concurrent etag calculation for UPDATE and DELETE
|
|
418
460
|
- Typings for `cds.delete()`
|
|
419
461
|
- CQN for `not` operator with OData functions
|
|
420
|
-
- Expand on composition of aspect for draft
|
|
421
|
-
- Better error messages are provided for errors with HTTP status
|
|
462
|
+
- Expand on composition of aspect for draft-enabled entities
|
|
463
|
+
- Better error messages are provided for errors with HTTP status codes `400`, `500`, and `501`
|
|
422
464
|
|
|
423
465
|
## Version 6.5.0 - 2023-01-27
|
|
424
466
|
|
|
425
467
|
### Added
|
|
426
468
|
|
|
427
469
|
- New aspect `sap.common.TextsAspect` in common.cds
|
|
428
|
-
- New syntax for collection
|
|
470
|
+
- New syntax for collection-bound entities
|
|
429
471
|
|
|
430
472
|
### Changed
|
|
431
473
|
|
|
@@ -434,10 +476,10 @@ cds env requires/cds.xt.ModelProviderService
|
|
|
434
476
|
SELECT.from `X` .where `x` .or `y` .where `z`
|
|
435
477
|
//> SELECT from X where (x or y) and z`
|
|
436
478
|
```
|
|
437
|
-
- `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`.
|
|
438
|
-
- `cds build` checks the consistency of built-in models for
|
|
479
|
+
- `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`.
|
|
480
|
+
- `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.
|
|
439
481
|
- Status code of draft actions are set in respective handler instead of protocol adapter
|
|
440
|
-
- `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.
|
|
482
|
+
- `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.
|
|
441
483
|
- Internal representation of pseudo roles `internal-user` and `system-user`
|
|
442
484
|
|
|
443
485
|
### Fixed
|
|
@@ -445,7 +487,7 @@ cds env requires/cds.xt.ModelProviderService
|
|
|
445
487
|
- Resolve i18n folders from the root directory
|
|
446
488
|
- Types for `cds.test`
|
|
447
489
|
- Types for `srv.send`
|
|
448
|
-
- Optimized Search: Search queries for localized entities will now use default values
|
|
490
|
+
- 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.
|
|
449
491
|
- Resolution of `type of` references during minify in bootstrap
|
|
450
492
|
- Generation of odata-v2 URL in case of select=* in `urlify()`
|
|
451
493
|
- Build resets changed `cds.env` and `cds.root` when finished
|
|
@@ -459,18 +501,18 @@ cds env requires/cds.xt.ModelProviderService
|
|
|
459
501
|
### Fixed
|
|
460
502
|
|
|
461
503
|
- `cds build` correctly creates a `resources.tgz` file for MTXS projects on Windows
|
|
462
|
-
- `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
|
|
504
|
+
- `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`
|
|
463
505
|
- Signature for `cds.ql.UPSERT`
|
|
464
506
|
- Signature for `<srv>.delete().where()`
|
|
465
507
|
- Signature for `SELECT.alias`
|
|
466
508
|
- `UPSERT` requests for SQLite if only keys are provided
|
|
467
|
-
- `cds.test` doesn't log database resets with `autoReset` enabled
|
|
468
|
-
- The `cds.deploy` output for HANA is now correctly formatted in Kibana
|
|
509
|
+
- `cds.test` doesn't log database resets with `autoReset` enabled anymore
|
|
510
|
+
- The `cds.deploy` output for SAP HANA is now correctly formatted in Kibana
|
|
469
511
|
- SAP HANA stored procedures containing implicit selects
|
|
470
512
|
- Shorthand configuration for `graphql` in `cds.env.protocols`
|
|
471
513
|
- If `cds.env.protocols` is set, `cds.requires.middlewares` is automatically turned on
|
|
472
514
|
- `cds.context` middleware is split to initial handling of request correlation and user propagation
|
|
473
|
-
-
|
|
515
|
+
- Fix view resolving and managed data for UPSERT
|
|
474
516
|
- `cds.linked` supports polymorphic self links like in: `action foo( self: [many] $self, ...)`
|
|
475
517
|
- Error with `@odata.draft.enabled` and `@restrict`
|
|
476
518
|
- Skip mandatory check on navigation properties for write requests
|
|
@@ -493,11 +535,11 @@ cds env requires/cds.xt.ModelProviderService
|
|
|
493
535
|
|
|
494
536
|
- Added several missing signatures in CQN types that are now in accordance with the current documentation.
|
|
495
537
|
- `.columns(…)` of both `cql.SELECT` and `cql.INSERT` give improved code completion when paired when appropriate type definitions are present
|
|
496
|
-
- Status code of error messages caused by empty `not null` fields is changed from `400` to `500` on database layer.
|
|
538
|
+
- 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.
|
|
497
539
|
- 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.
|
|
498
|
-
- `persistent-outbox`: Only programming errors lead to `process.exit()`, unrecoverable ones are only logged and their `attempts` are updated to `options.maxAttempts`
|
|
540
|
+
- `persistent-outbox`: Only programming errors lead to `process.exit()`, unrecoverable ones are only logged, and their `attempts` are updated to `options.maxAttempts`
|
|
499
541
|
- 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.
|
|
500
|
-
- `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.
|
|
542
|
+
- `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.
|
|
501
543
|
- For streamlined MTX, `@sap/cds` now uses the custom SAP Service Manager client built into `@sap/cds-mtxs`
|
|
502
544
|
- Require new package `@cap-js/graphql` for `cds compile -2 graphql`
|
|
503
545
|
|
|
@@ -511,13 +553,13 @@ cds env requires/cds.xt.ModelProviderService
|
|
|
511
553
|
- Localized draft requests with nested expand in the case of `to many` now return localized data
|
|
512
554
|
- Protected service root for REST adapter
|
|
513
555
|
- `cds build` logs tar error message
|
|
514
|
-
- Resolve view only with renamed fields in orderBy case
|
|
515
|
-
- In case of `$apply
|
|
516
|
-
- Environment variables like `cds.requires.<service>.kind...` now consistently override services set in e.g. `package.json`
|
|
556
|
+
- Resolve view only with renamed fields in `orderBy` case
|
|
557
|
+
- In case of `$apply`, no default values for `top` or `skip` are set in subselects
|
|
558
|
+
- Environment variables like `cds.requires.<service>.kind...` now consistently override services set in, e.g. `package.json`
|
|
517
559
|
- Expand of composition backlink now accesses draft instance instead of active
|
|
518
560
|
- Performance of server bootstrap for services with lots of entities
|
|
519
561
|
- Error with virtual properties in expand combined with draft
|
|
520
|
-
- req.tenant is properly propagated by custom authentication in odata and rest
|
|
562
|
+
- `req.tenant` is properly propagated by custom authentication in odata and rest
|
|
521
563
|
- Error with `SiblingEntity` in draft
|
|
522
564
|
- Quoting of keys typed as `cds.String` in error targets. Error targets are a relative resource path to correlate error
|
|
523
565
|
messages with the corresponding text input filed in the UI in an OData HTTP error response body for errors, warnings,
|
|
@@ -542,16 +584,16 @@ Content-Length: 145
|
|
|
542
584
|
}
|
|
543
585
|
```
|
|
544
586
|
|
|
545
|
-
- Application crash if batched Uri uses invalid percent
|
|
546
|
-
- `cds build` for SAP HANA no longer produces `hdbtabledata` for
|
|
547
|
-
- `cds build` for SAP HANA now gives precedence for
|
|
587
|
+
- Application crash if batched Uri uses invalid percent-encoding
|
|
588
|
+
- `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.
|
|
589
|
+
- `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.
|
|
548
590
|
- `cds build` for Java no longer adds the service `cds.xt.MTXServices` to the application model.
|
|
549
591
|
- `cds build` no longer fails when creating large resource TAR archives for MTXS projects.
|
|
550
592
|
|
|
551
593
|
### Removed
|
|
552
594
|
|
|
553
|
-
- Removed `PreconditionFailedError` when sending a request with an `if-match` header on an entity without an
|
|
554
|
-
- Check for forbidden deep operations for associations on database layer. All non
|
|
595
|
+
- Removed `PreconditionFailedError` when sending a request with an `if-match` header on an entity without an ETag
|
|
596
|
+
- 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.
|
|
555
597
|
|
|
556
598
|
## Version 6.3.2 - 2022-11-21
|
|
557
599
|
|
|
@@ -560,7 +602,7 @@ Content-Length: 145
|
|
|
560
602
|
- `cds deploy` reports errors correctly
|
|
561
603
|
- Reference resolution in QL API
|
|
562
604
|
- `cds.parse.path` to correctly handle special characters
|
|
563
|
-
- `cds build` issues on Windows: build with large number of files and build on Git Bash.
|
|
605
|
+
- `cds build` issues on Windows: build with a large number of files and build on Git Bash.
|
|
564
606
|
- `odata` as default protocol for enabled middlewares feature
|
|
565
607
|
|
|
566
608
|
## Version 6.3.1 - 2022-11-04
|
|
@@ -571,14 +613,14 @@ Content-Length: 145
|
|
|
571
613
|
- `cds deploy` handles empty result from `cf` call correctly
|
|
572
614
|
- `$search` fails on columns composed by a CQL expression that uses the SAP HANA `coalesce` predicate
|
|
573
615
|
- Draft ownership was erroneously checked for bound actions on active instances
|
|
574
|
-
- `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.
|
|
616
|
+
- `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.
|
|
575
617
|
|
|
576
618
|
## Version 6.3.0 - 2022-10-28
|
|
577
619
|
|
|
578
620
|
### Added
|
|
579
621
|
|
|
580
622
|
- Additional type signatures for service methods in the query API
|
|
581
|
-
- In case of error in a batch request, the @Core.ContentID is added to the details of the error message
|
|
623
|
+
- In case of an error in a batch request, the @Core.ContentID is added to the details of the error message
|
|
582
624
|
- Extensibility: Use i18n files from extensions in edmx calculation
|
|
583
625
|
- In messaging, you can listen to all messages in a queue by subscribing to `'*'`
|
|
584
626
|
- Improved Log formatting for Cloud Foundry
|
|
@@ -611,7 +653,7 @@ Content-Length: 145
|
|
|
611
653
|
### Fixed
|
|
612
654
|
|
|
613
655
|
- Change signature of cqn `SELECT.limit.offset` and `SELECT.limit.rows` to `val` instead of `number`
|
|
614
|
-
- Parsing of store procedure SQL calls including the schema name. For example, `CALL "SCHEMA"."PROC"(?)` and `CALL SCHEMA.PROC(?)`
|
|
656
|
+
- Parsing of store procedure SQL calls, including the schema name. For example, `CALL "SCHEMA"."PROC"(?)` and `CALL SCHEMA.PROC(?)`
|
|
615
657
|
- Add property name in the error message on validation of the value
|
|
616
658
|
- Kibana and Cloud Foundry formatter: do not log cookie header value
|
|
617
659
|
- Missing SQL aliases for `$search` queries combined with `$orderBy` query option
|
|
@@ -674,9 +716,9 @@ Content-Length: 145
|
|
|
674
716
|
DEBUG?.(...)
|
|
675
717
|
```
|
|
676
718
|
- All MTX-related modules have been refactored and moved to `@sap/cds-mtxs`.
|
|
677
|
-
Ensure to also upgrade to latest version of `@sap/cds-mtxs` when upgrading `@sap/cds` to avoid any breaking change effects.
|
|
719
|
+
Ensure to also upgrade to the latest version of `@sap/cds-mtxs` when upgrading `@sap/cds` to avoid any breaking change effects.
|
|
678
720
|
- SQLite database file endings have been changed to `.sqlite`, so third-party tools (e.g. VS Code extensions) can deduce the file type.
|
|
679
|
-
- 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`.
|
|
721
|
+
- 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`.
|
|
680
722
|
- Prefer HANA driver that is required in package.json of project root
|
|
681
723
|
|
|
682
724
|
### Fixed
|
|
@@ -685,24 +727,24 @@ Content-Length: 145
|
|
|
685
727
|
- Signatures for QN `order_by` expressions are now in line with the capire doc
|
|
686
728
|
- Signatures for QL operations are now more specific
|
|
687
729
|
- `basic-auth` does not inherit users of `mocked-auth`
|
|
688
|
-
- `cds.localize` now ignores i18n files defined outside project scope.
|
|
730
|
+
- `cds.localize` now ignores i18n files defined outside the project scope.
|
|
689
731
|
- Allow `@Capabilities.NavigationRestrictions.RestrictedProperties` to be specified in the format `{ InsertRestrictions.Insertable: false }`
|
|
690
732
|
- Bound actions/functions while calling remote service
|
|
691
733
|
- `$search`: Search on localized projections/views does not always return the localized data
|
|
692
734
|
- `cds push` now shows better output for failed extension validations
|
|
693
735
|
- Aliased parameters in REST parser
|
|
694
736
|
- `cds.deploy` now logs the correct filename for multitenant SQLite
|
|
695
|
-
- HDI configuration data (e.g
|
|
737
|
+
- 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
|
|
696
738
|
- OData URL to CQN parser (`cds.env.features.odata_new_parser`) now supports functions with no arguments
|
|
697
739
|
- Runtime exception for `PATCH` HTTP request with an empty payload body and read-only field
|
|
698
740
|
- Streams in draft caused SQL error
|
|
699
741
|
- Better response state handling during `cds deploy` to Cloud Foundry.
|
|
700
|
-
- Draft: patch on draft
|
|
742
|
+
- Draft: patch on draft-enabled entity with a composition of one
|
|
701
743
|
- Maximum stack trace exceeded in generic audit logging implementation
|
|
702
|
-
- The protocol adapter logs the decoded URI or the original one
|
|
744
|
+
- The protocol adapter logs the decoded URI or the original one if it is invalid
|
|
703
745
|
- REST: reject action calls with round brackets (parentheses). For example, the request `/Books(1)/bookShelf.CatalogService.rate()` is now rejected.
|
|
704
746
|
- `cds deploy` and `cds run/serve/watch` no longer print terminal escape sequences (`x1b...`) if they run non-interactively.
|
|
705
|
-
- Some fields in entities like `path` generated invalid
|
|
747
|
+
- Some fields in entities like `path` generated invalid SQL
|
|
706
748
|
|
|
707
749
|
## Version 6.1.3 - 2022-09-13
|
|
708
750
|
|
|
@@ -731,9 +773,9 @@ Content-Length: 145
|
|
|
731
773
|
- Performance issue for OData <entity>/$count requests
|
|
732
774
|
- Typescript definition for SQL-native variant of `srv.run`, like `srv.run('SELECT * from Authors where name like ?',['%Poe%'])`
|
|
733
775
|
- Typescript definitions for `srv.run( [query] )` and `srv.send( {query, headers} )`
|
|
734
|
-
- Typescript definitions for `cds.log` are improved, level indicators like `cds.log()._debug` added
|
|
776
|
+
- Typescript definitions for `cds.log` are improved, and level indicators like `cds.log()._debug` added
|
|
735
777
|
- Typescript definitions for `tx` now carry additional service methods
|
|
736
|
-
- `cds login` now returns errors with
|
|
778
|
+
- `cds login` now returns errors with better root cause messages
|
|
737
779
|
- `$expand` requests for to-one associations that do not select the foreign key
|
|
738
780
|
- `UPDATE` statement accepts empty objects: `UPDATE('Foo').with({ bar: {} })`
|
|
739
781
|
- URI encoding of parameters in remote service calls
|
|
@@ -744,7 +786,7 @@ Content-Length: 145
|
|
|
744
786
|
- The configuration schema now includes `cds.extends` and `new-fields` (in `cds.xt.ExtensibilityService`)
|
|
745
787
|
- Ability to run extension validations as part of `cds lint`
|
|
746
788
|
- The `/-/cds/login` endpoint now also supports client credentials authentication
|
|
747
|
-
- `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)
|
|
789
|
+
- `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.
|
|
748
790
|
```js
|
|
749
791
|
cds.run (tx => { // nested operations are guaranteed to run in a tx
|
|
750
792
|
await INSERT.into (Foo, ...)
|
|
@@ -842,13 +884,13 @@ Content-Length: 145
|
|
|
842
884
|
await SELECT.from('sqlite_master')
|
|
843
885
|
await cds.read('sqlite_master')
|
|
844
886
|
```
|
|
845
|
-
Caveat:
|
|
887
|
+
Caveat: The following undocumented usage of unqualified names happened to work in the past.
|
|
846
888
|
But this was very fragile and caused lots of issues, and therefore was removed:
|
|
847
889
|
```sql
|
|
848
890
|
await SELECT.from('Books')
|
|
849
891
|
await cds.read('Books')
|
|
850
892
|
```
|
|
851
|
-
Always use qualified names
|
|
893
|
+
Always use qualified names or reflected definitions instead:
|
|
852
894
|
```sql
|
|
853
895
|
const Books = 'sap.capire.bookshop.Books'
|
|
854
896
|
await SELECT.from(Books)
|
|
@@ -877,7 +919,7 @@ Content-Length: 145
|
|
|
877
919
|
- `cds build` no longer generates EDMX files for services that aren't odata protocol enabled
|
|
878
920
|
- `cds deploy` handles orgs and spaces containing commas correctly
|
|
879
921
|
- Incorrect decoding of special characters when reading data of type `cds.LargeString` from SAP HANA using `hdb@^0.19.5` driver
|
|
880
|
-
- The payload is added to the delete request in rest adapter as req.data
|
|
922
|
+
- The payload is added to the delete request in rest adapter as `req.data`
|
|
881
923
|
|
|
882
924
|
## Version 6.0.4 - 2022-07-20
|
|
883
925
|
|
|
@@ -898,7 +940,7 @@ Content-Length: 145
|
|
|
898
940
|
- `--vap-file` parameter of `cds deploy` is available again
|
|
899
941
|
- `cds build` no longer throws an error if `@sap/cds-mtx` library (classic MTX) isn't installed locally.
|
|
900
942
|
- `cds.spawn` no longer tries to reuse a transaction
|
|
901
|
-
- Custom query parameter caused bad request on certain characters in
|
|
943
|
+
- Custom query parameter caused bad request on certain characters in REST adapter
|
|
902
944
|
- `cds-ts` no longer fails with an `ERR_UNKNOWN_FILE_EXTENSION` error
|
|
903
945
|
- Timeouts when sending string payloads to remote services
|
|
904
946
|
- `cds.context.http` for `$batch` using atomicity groups
|
|
@@ -908,7 +950,7 @@ Content-Length: 145
|
|
|
908
950
|
### Fixed
|
|
909
951
|
|
|
910
952
|
- Jest tests do not fail any longer because of logs during app shutdown
|
|
911
|
-
- `cds build` now uses correct `mtx/sidecar` context. This avoids redundant `cds-mtxs` npm dependency for Java projects.
|
|
953
|
+
- `cds build` now uses the correct `mtx/sidecar` context. This avoids redundant `cds-mtxs` npm dependency for Java projects.
|
|
912
954
|
|
|
913
955
|
## Version 6.0.1 - 2022-07-05
|
|
914
956
|
|
|
@@ -946,7 +988,7 @@ Content-Length: 145
|
|
|
946
988
|
> while calling it without `new` it throws immediately. The latter is
|
|
947
989
|
> useful for usages like that:
|
|
948
990
|
|
|
949
|
-
- Improved `req.error` to always turn each recorded error
|
|
991
|
+
- Improved `req.error` to always turn each recorded error into an instance of `Error` with its own stack trace.
|
|
950
992
|
Multiple errors are finally thrown as an array of these errors with `.message = 'MULTIPLE_ERRORS'`
|
|
951
993
|
and `.details = this` (the latter is for compatibility to former releases).
|
|
952
994
|
|
|
@@ -1040,7 +1082,7 @@ stay intact until the transaction is committed or rolled back.
|
|
|
1040
1082
|
- The `file` option of file-based messaging is now on top level (before it was in `credentials`)
|
|
1041
1083
|
- Optimized Search: `cds.env.features.optimized_search=true` is now the default behavior.
|
|
1042
1084
|
- `cds build` no longer generates CF manifest files for Nodejs and HANA db deployer modules.
|
|
1043
|
-
- `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.
|
|
1085
|
+
- `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.
|
|
1044
1086
|
- Remote services: Batched `GET` requests will not fetch CSRF tokens
|
|
1045
1087
|
- CQN now uses `xpr` correctly instead of brackets in `where`
|
|
1046
1088
|
- `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.
|
|
@@ -1053,19 +1095,19 @@ stay intact until the transaction is committed or rolled back.
|
|
|
1053
1095
|
- `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.
|
|
1054
1096
|
- `cds deploy` reads Cloud Foundry file `config.json` to get org and space information.
|
|
1055
1097
|
- New REST adapter replaced old (limited) implementation
|
|
1056
|
-
- Default
|
|
1057
|
-
Note that this is a breaking change for
|
|
1098
|
+
- Default behavior for runtime integrity checks. From now on no integrity checks will be done by default.
|
|
1099
|
+
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.
|
|
1058
1100
|
- `cds build` no longer copies `.env` or `default-env.json` files into the deployment folder.
|
|
1059
|
-
- OData `POST`, `PATCH
|
|
1060
|
-
+ It is now sufficient to have a custom `READ` handler in order to adjust the response (e.g
|
|
1101
|
+
- 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:
|
|
1102
|
+
+ 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.
|
|
1061
1103
|
+ 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.
|
|
1062
1104
|
+ 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.
|
|
1063
1105
|
+ Modification logs are now followed by corresponding access logs.
|
|
1064
1106
|
+ More details can be found in cds v6.0.0 release notes.
|
|
1065
1107
|
- Message for PreconditionFailedError is now configurable in messages.properties
|
|
1066
1108
|
- Remove circular references in Kibana logging
|
|
1067
|
-
- Error sanitization in production is skipped for custom errors with HTTP code `5xx`. From now on,
|
|
1068
|
-
Note that this is a breaking change for
|
|
1109
|
+
- 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.
|
|
1110
|
+
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.
|
|
1069
1111
|
|
|
1070
1112
|
### Fixed
|
|
1071
1113
|
|
|
@@ -1091,7 +1133,7 @@ In such scenarios, now the HTTP `404 Not Found` status code is returned rather t
|
|
|
1091
1133
|
- All entities in `@sap/cds/common` have now proper CDS doc comments
|
|
1092
1134
|
- `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.
|
|
1093
1135
|
- Pass options from `cds.parse.expr` to `cdsc.parse.expr`.
|
|
1094
|
-
- Avoid error that is caused e.g
|
|
1136
|
+
- 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.
|
|
1095
1137
|
- Correct URL generation for `Integer64` and `Decimal` for remote services
|
|
1096
1138
|
- Operation parameters from structured type and annotated with @open are not filtered from the input query
|
|
1097
1139
|
- 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`.
|
|
@@ -1114,7 +1156,7 @@ In such scenarios, now the HTTP `404 Not Found` status code is returned rather t
|
|
|
1114
1156
|
- `cds version` now handles array-valued entries for `folders.db`and `folders.srv` gracefully when looking for MTX sidecar
|
|
1115
1157
|
- OData access of entities named `get` and `set`
|
|
1116
1158
|
- missing brackets for OR condition in `.where()` when requesting by navigation
|
|
1117
|
-
- `cds build` now correctly supports
|
|
1159
|
+
- `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 "."
|
|
1118
1160
|
- `cds build <dir>` is now correctly executed if called by npm script or mta build.
|
|
1119
1161
|
- `cds deploy` now shows a better error message on INSERT errors (on SQLite).
|
|
1120
1162
|
|
|
@@ -1161,8 +1203,8 @@ In such scenarios, now the HTTP `404 Not Found` status code is returned rather t
|
|
|
1161
1203
|
- Ignored requests in batch requests
|
|
1162
1204
|
- `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.
|
|
1163
1205
|
- Multiple errors did not have correct HTTP response status code
|
|
1164
|
-
- `POST|PUT|PATCH` requests with `charset` directive in `Content-Type` header (e.g
|
|
1165
|
-
- Call
|
|
1206
|
+
- `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
|
|
1207
|
+
- Call SAP HANA procedure:
|
|
1166
1208
|
+ accepted are any symbols in a procedure name if it is delimited with a double quotation (`"`)
|
|
1167
1209
|
+ 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
|
|
1168
1210
|
- `@odata.context` considers `cds.env.odata.contextAbsoluteUrl` when requesting an OData Service
|
|
@@ -1230,7 +1272,7 @@ In such scenarios, now the HTTP `404 Not Found` status code is returned rather t
|
|
|
1230
1272
|
- URL encoding for remote services for CQN queries
|
|
1231
1273
|
- `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.
|
|
1232
1274
|
- Endless loop in localization handling
|
|
1233
|
-
- Ensure service
|
|
1275
|
+
- Ensure service implementation while extending entity from the service
|
|
1234
1276
|
- Post-processing of custom draft queries
|
|
1235
1277
|
- `cds build` no longer omits unused CDS type definitions, leading to Java compiler errors
|
|
1236
1278
|
|
|
@@ -1239,7 +1281,7 @@ In such scenarios, now the HTTP `404 Not Found` status code is returned rather t
|
|
|
1239
1281
|
### Added
|
|
1240
1282
|
|
|
1241
1283
|
- Enable custom audit logging implementation by subclassing or prepending `cds.AuditLogService`
|
|
1242
|
-
- Log authentication/authorization traces, for example, authentication strategy
|
|
1284
|
+
- Log authentication/authorization traces, for example, authentication strategy and access control decisions to facilitate troubleshooting in debug mode.
|
|
1243
1285
|
- Bound functions and actions calls with odata-v2 from remote service
|
|
1244
1286
|
- Beta support for procedure calls with table output data (SAP HANA only)
|
|
1245
1287
|
+ 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.
|
|
@@ -1512,7 +1554,7 @@ In such scenarios, now the HTTP `404 Not Found` status code is returned rather t
|
|
|
1512
1554
|
|
|
1513
1555
|
### Fixed
|
|
1514
1556
|
|
|
1515
|
-
- Instance-based restriction for activation of draft
|
|
1557
|
+
- Instance-based restriction for activation of draft-enabled entities
|
|
1516
1558
|
- `.columns('*')` on projections of remote services using renamed properties
|
|
1517
1559
|
- GraphQL filters on nested fields are now applied correctly
|
|
1518
1560
|
- Performance degradation during the processing of `where exists`
|