)` or in `@mandatory.message`, `@assert.format.message`, or `@assert.range.message`, you can either specify a plain text, or a [I18n text bundle key](../uis/i18n#externalizing-texts-bundles).
Actually, we saw this already in the [sample in the introduction](#introduction):
@@ -499,7 +499,7 @@ If you use a message key, the message is automatically looked up in the message
## Field Control
-Declarative constraints can also be used to do field control in Fiori UIs, i.e. to add visual indicators to mandatory or readonly fields, or to hide fields. In particular, CAP automatically adds respective OData annotations to generated EDMX $metadata documents for the CDS listed below.
+Declarative constraints can also be used to do field control in Fiori UIs, that is, to add visual indicators to mandatory or readonly fields, or to hide fields. In particular, CAP automatically adds respective OData annotations to generated EDMX $metadata documents for the CDS listed below.
### `@mandatory`
diff --git a/guides/services/consuming-services.md b/guides/services/consuming-services.md
index 39872356bf..305f73e8e3 100644
--- a/guides/services/consuming-services.md
+++ b/guides/services/consuming-services.md
@@ -146,7 +146,7 @@ This adds the API in CDS format to the _srv/external_ folder and also copies the
-Further, it adds the API as an external service to your _package.json_. You use this declaration later to connect to the remote service [using a destination](#use-destinations-with-node-js).
+Further, it adds the API as an external service to your _package.json_. You use this declaration later to connect to the remote service [using a destination](#use-destinations-with-nodejs).
```json
"cds": {
@@ -1501,7 +1501,7 @@ You can change the destination lookup behavior as follows:
```
-Setting the [`selectionStrategy`](https://sap.github.io/cloud-sdk/docs/js/features/connectivity/destination#multi-tenancy) property for the [destination options](#use-destinations-with-node-js) to `alwaysProvider`, you can ensure that the destination is always read from your provider subaccount. With that you ensure that a subscriber cannot overwrite your destination.
+Setting the [`selectionStrategy`](https://sap.github.io/cloud-sdk/docs/js/features/connectivity/destination#multi-tenancy) property for the [destination options](#use-destinations-with-nodejs) to `alwaysProvider`, you can ensure that the destination is always read from your provider subaccount. With that you ensure that a subscriber cannot overwrite your destination.
Set the destination option `jwt` to `null`, if you don't want to pass the request's JWT to SAP Cloud SDK. Passing the request's JWT to SAP Cloud SDK has implications on, amongst others, the effective defaults for selection strategy and isolation level. In rare cases, these defaults are not suitable, for example when the request to the upstream server does not depend on the current user. Please see [Authentication and JSON Web Token (JWT) Retrieval](https://sap.github.io/cloud-sdk/docs/js/features/connectivity/destinations#authentication-and-json-web-token-jwt-retrieval) for more details.
diff --git a/guides/uis/fiori.md b/guides/uis/fiori.md
index 6d6513c8d2..78236f9d36 100644
--- a/guides/uis/fiori.md
+++ b/guides/uis/fiori.md
@@ -266,7 +266,7 @@ entity TravelService.Travels.drafts : TravelService.Travels { ... }
```
:::
-You can access this entity definition from the model at runtime, for example, to add custom handlers to draft events or to access draft data. In a CAP Node.js service implementation, use the [`.drafts`](../../node.js/cds-reflect#drafts) reference as a shortcut to access the draft entity:
+You can access this entity definition from the model at runtime, for example, to add custom handlers to draft events or to access draft data. In a CAP Node.js service implementation, use the [`.drafts`](../../node.js/cds-reflect#-drafts) reference as a shortcut to access the draft entity:
```js
const { Travels } = this.entities
@@ -401,7 +401,7 @@ Select.from(FOO).where(o -> o.ID().eq(201) .and( //> reads draft data
);
```
-In CAP Node.js, use the [`Foo.drafts`](../../node.js/cds-reflect#drafts) references to access draft data:
+In CAP Node.js, use the [`Foo.drafts`](../../node.js/cds-reflect#-drafts) references to access draft data:
```js {3}
const { Foo } = this.entities
@@ -409,7 +409,7 @@ SELECT.from (Foo, 201) // reads active data only
SELECT.from (Foo.drafts, 201) // reads draft data, if exists
```
-Even better, use [`req.subject`](../../node.js/events#subject), which automatically resolves to the correct entity instance - active or draft - based on the current request context. For example, in custom action handlers triggered for both active and draft data:
+Even better, use [`req.subject`](../../node.js/events#-subject), which automatically resolves to the correct entity instance - active or draft - based on the current request context. For example, in custom action handlers triggered for both active and draft data:
```js
this.on ('approveTravel', req => UPDATE (req.subject) .with ({ status: 'A' }))
@@ -634,7 +634,7 @@ The Cache Control feature is currently supported only on the Java runtime.
In addition to adding [restrictions on services, entities, and actions/functions](../security/authorization#restrictions), there are cases where you want to hide certain UI elements for specific users. You can do this using annotations such as `@UI.Hidden` or `@UI.CreateHidden` together with `$edmJson` pointing to a singleton.
-First, define the [singleton](../protocols/odata#singletons) in your service and annotate it with [`@cds.persistence.skip`](../databases/cdl-to-ddl#cds-persistence-skip) so that no database artifact is created:
+First, define the [singleton](../protocols/odata#singletons) in your service and annotate it with [`@cds.persistence.skip`](../databases/cdl-to-ddl#cdspersistenceskip) so that no database artifact is created:
```cds
@odata.singleton @cds.persistence.skip
diff --git a/guides/uis/i18n.md b/guides/uis/i18n.md
index 840afa2747..8bc2066df9 100644
--- a/guides/uis/i18n.md
+++ b/guides/uis/i18n.md
@@ -73,7 +73,7 @@ bookshop/
-By default, text bundles are fetched from folders named *_i18n* or *i18n* in the neighborhood of models, i.e. all folders that contain `.cds` sources or parent folders thereof. For example, given the following project layout and sources:
+By default, text bundles are fetched from folders named *_i18n* or *i18n* in the neighborhood of models, that is, all folders that contain `.cds` sources or parent folders thereof. For example, given the following project layout and sources:
```zsh
bookshop/
@@ -241,7 +241,7 @@ In effect, this means:
- We support incoming locales as [language tags](https://www.ietf.org/rfc/bcp/bcp47.txt) using hyphens to separate sub tags 1, for example `en-GB`.
- We always normalize these to underscores, which is `en_GB`.
- Always use underscores in filenames, for example, `i18n_en_GB.properties`
-- Always use underscores when filling `LOCALE` columns of localized text tables (e.g. in CSV files).
+- Always use underscores when filling `LOCALE` columns of localized text tables (for example, in CSV files).
1 CAP Node.js also supports underscore separated tags, for example `en_GB`.
diff --git a/java/building-plugins.md b/java/building-plugins.md
index e14f749da2..d974205382 100644
--- a/java/building-plugins.md
+++ b/java/building-plugins.md
@@ -87,7 +87,7 @@ Additionally, the `resolve` goal from the CDS Maven Plugin needs to be added, to
:::
::: details Scope of the Reuse Package
-Usually you would declare the dependency to the reuse package in the `srv` module of your CAP Java project. Since CAP Java 4.4.0 this makes the reuse models available to all CDS files in the CAP project. The models are extracted to the root `target/cds` folder. In case you want to make the reuse models only available within the Maven module that declared the dependency (e.g. `srv`) set the configuration `to` of the `resolve` goal to `${project.build.directory}`. In earlier versions of CAP Java reuse models where only available within CDS files placed in the Maven module that declared the dependency by default.
+Usually you would declare the dependency to the reuse package in the `srv` module of your CAP Java project. Since CAP Java 4.4.0 this makes the reuse models available to all CDS files in the CAP project. The models are extracted to the root `target/cds` folder. In case you want to make the reuse models only available within the Maven module that declared the dependency (for example, `srv`) set the configuration `to` of the `resolve` goal to `${project.build.directory}`. In earlier versions of CAP Java reuse models where only available within CDS files placed in the Maven module that declared the dependency by default.
:::
When your Maven build is set up correctly, you can use the reuse models in your CDS files using the standard `using` directive:
diff --git a/java/change-tracking.md b/java/change-tracking.md
index 680adc74d5..6a20ad44dd 100644
--- a/java/change-tracking.md
+++ b/java/change-tracking.md
@@ -213,7 +213,7 @@ Elements from the `@changelog` annotation value must always be prefixed by the a
:::warning Validation required
If the target of the association is missing, for example, when an entity is updated with the ID for a customer
that does not exist, the changelog entry is not created. You need to validate
-such cases in the custom code or use annotations, for example, [`@assert.target`](../guides/services/constraints#assert-target).
+such cases in the custom code or use annotations, for example, [`@assert.target`](../guides/services/constraints#asserttarget).
:::
### Caveats of Identifiers
diff --git a/java/cqn-services/persistence-services.md b/java/cqn-services/persistence-services.md
index 734e82fec1..f087445657 100644
--- a/java/cqn-services/persistence-services.md
+++ b/java/cqn-services/persistence-services.md
@@ -184,7 +184,7 @@ cds add postgres
```
::: warning
-Automatic schema deployment isn't suitable for productive use. Consider using production-ready tools like Flyway or Liquibase. See more on that in the [Database guide for PostgreSQL](../../guides/databases/postgres#using-liquibase-java)
+Automatic schema deployment isn't suitable for productive use. Consider using production-ready tools like Flyway or Liquibase. See more on that in the [Database guide for PostgreSQL](../../guides/databases/postgres#using-liquibase-in-cap-java)
:::
#### Configure the Connection Data Explicitly { #postgres-connection }
diff --git a/java/event-handlers/indicating-errors.md b/java/event-handlers/indicating-errors.md
index a129cd1863..2ba23ab4c3 100644
--- a/java/event-handlers/indicating-errors.md
+++ b/java/event-handlers/indicating-errors.md
@@ -167,7 +167,7 @@ In case of actions and functions SAP Fiori also requires the message target to b
When creating a message target, the correct parameter needs to be selected to specify what the relative message target path refers to.
By default a message target always refers to the CQN statement of the event. In case of CRUD events this is the targeted entity. In case of bound actions and functions this is the entity that the action or function was bound to.
-As CRUD event handlers are often called from within bound actions or functions (e.g. `draftActivate`), CAP's OData adapter adds a parameter prefix to a message target referring to the `cqn` parameter only when required.
+As CRUD event handlers are often called from within bound actions or functions (for example, `draftActivate`), CAP's OData adapter adds a parameter prefix to a message target referring to the `cqn` parameter only when required.
::: info
When using the `target(String)` API, which specifies the full target as a `String`, no additional parameter prefixes are added by CAP's OData adapter. When using this API, [draft state messages](../../guides/uis/fiori#validating-drafts) can't be invalidated automatically on `PATCH`.
diff --git a/java/event-queues.md b/java/event-queues.md
index 3211862e6f..a36e634dd1 100644
--- a/java/event-queues.md
+++ b/java/event-queues.md
@@ -524,7 +524,7 @@ A startup log entry shows the configured version:
2024-12-19T11:21:33.253+01:00 INFO 3420 --- [main] cds.services.impl.utils.BuildInfo : application.deployment.version: 1.0.0-SNAPSHOT
```
-To bypass the version check for a specific custom outbox, set [`cds.outbox.services.MyCustomOutbox.checkVersion: false`](./developing-applications/properties#cds-outbox-services--checkVersion).
+To bypass the version check for a specific custom outbox, set [`cds.outbox.services.MyCustomOutbox.checkVersion: false`](./developing-applications/properties#cds-outbox-services-key-checkversion).
## Troubleshooting
diff --git a/java/messaging.md b/java/messaging.md
index 7cc48c9f38..db959e79db 100644
--- a/java/messaging.md
+++ b/java/messaging.md
@@ -470,7 +470,7 @@ Example:
}
```
-[Learn more about _default-env.json_.](../node.js/cds-env#in-default-env-json){.learn-more}
+[Learn more about _default-env.json_.](../node.js/cds-env#in-default-envjson){.learn-more}
#### VCAP_SERVICES Template for SAP Event Mesh
diff --git a/java/migration.md b/java/migration.md
index e2597ed296..fb08289ef6 100644
--- a/java/migration.md
+++ b/java/migration.md
@@ -69,6 +69,14 @@ CAP Java 5 uses Spring Boot 4 and Spring Security 7 as the underlying framework.
You must also upgrade the [BTP Security Library](https://github.com/SAP/cloud-security-services-integration-library) to version 4.0.0 or later.
+#### Test Code Changes { #spring-boot-4-test-code }
+
+While regular CAP Java application code rarely touches Spring Boot APIs directly, test code typically does. Spring Boot 4 introduces a new module structure for its testing support, which results in package name changes that can break existing test classes. Common examples are the test slice annotations (such as `@AutoConfigureMockMvc`, `@WebMvcTest`, or `@DataJpaTest`) that were relocated as part of this restructuring.
+
+Refer to the [Test Code section of the Spring Boot 4.0 Migration Guide](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Migration-Guide#test-code) for the complete list of affected packages and classes.
+
+These package renames are already covered by the [OpenRewrite community recipes](https://docs.openrewrite.org/recipes/java/spring/boot4) for Spring Boot 4, so you can apply them automatically together with the [CAP Java OpenRewrite migrations](#automatic-cap-java-migrations-with-openrewrite) above. The same applies to the commercial recipes offered by the [Moderne platform](https://www.moderne.ai/).
+
### Minimum Versions
CAP Java 5.0 increased some minimum required versions:
diff --git a/java/security.md b/java/security.md
index 6e12c42f7d..f76fdc3fdd 100644
--- a/java/security.md
+++ b/java/security.md
@@ -157,7 +157,7 @@ public class ActuatorSecurityConfig {
In case you want to write your own custom security configuration that acts as a last line of defense and handles any request you need to disable the CAP security configurations by setting cds.security.authentication.authConfig.enabled: false, as Spring Security forbids registering multiple security configurations with an any request security matcher.
-If you even want to deactivate OAuth token validation for XSUAA or IAS, e.g. to establish an own authentication strategy,
+If you even want to deactivate OAuth token validation for XSUAA or IAS, for example, to establish an own authentication strategy,
the following properties can be used:
| Configuration Property | Description | Default
diff --git a/java/versions.md b/java/versions.md
index 6a58fb6766..20079ba528 100644
--- a/java/versions.md
+++ b/java/versions.md
@@ -61,35 +61,35 @@ CAP Java uses various dependencies that are also used by the applications themse
If the applications decide to manage the versions of these dependencies, it's helpful to know the minimum versions of these dependencies that CAP Java requires.
The following table lists these minimum versions for various common dependencies, based on the latest release:
-#### Active Version 4.x { #dependencies-version-4 }
+#### Active Version 5.x { #dependencies-version-5 }
| Dependency | Minimum Version | Recommended Version |
| --- | --- | --- |
-| CAP Java | n/a | [latest 4.x](https://central.sonatype.com/artifact/com.sap.cds/cds-services-bom/versions) |
-| JDK | 17 | 21 |
-| Maven | 3.8.8 | 3.9.9 |
-| @sap/cds-dk | 8 | [latest](https://www.npmjs.com/package/@sap/cds-dk) |
-| @sap/cds-compiler | 5 | [latest](https://www.npmjs.com/package/@sap/cds-compiler) |
-| Spring Boot | 3.0 | [latest 3.x](https://central.sonatype.com/artifact/org.springframework.boot/spring-boot/versions) |
-| XSUAA | 3.1 | [latest](https://central.sonatype.com/artifact/com.sap.cloud.security/java-bom/versions) |
+| CAP Java | n/a | [latest 5.x](https://central.sonatype.com/artifact/com.sap.cds/cds-services-bom/versions) |
+| JDK | 21 | 25 |
+| Maven | 3.9.14 | [latest 3.9.x](https://maven.apache.org/download.cgi) (not 4.x) |
+| @sap/cds-dk | 9 | [latest 10.x](https://www.npmjs.com/package/@sap/cds-dk) |
+| @sap/cds-compiler | 6 | [latest 7.x](https://www.npmjs.com/package/@sap/cds-compiler) |
+| Spring Boot | 4.0 | [latest 4.x](https://central.sonatype.com/artifact/org.springframework.boot/spring-boot/versions) |
+| XSUAA | 4.0 | [latest 4.x](https://central.sonatype.com/artifact/com.sap.cloud.security/java-bom/versions) |
| SAP Cloud SDK | 5.9 | [latest](https://central.sonatype.com/artifact/com.sap.cloud.sdk/sdk-modules-bom/versions) |
-| Java Logging | 3.7 | [latest](https://central.sonatype.com/artifact/com.sap.hcp.cf.logging/cf-java-logging-support-servlet-jakarta/versions) |
-| Node.js | 20 | 22 |
+| Java Logging | 3.7 | [latest 4.x](https://central.sonatype.com/artifact/com.sap.hcp.cf.logging/cf-java-logging-support-servlet-jakarta/versions) |
+| Node.js | 22 | 24 |
-#### Maintenance Version 3.10.x { #dependencies-version-3 }
+#### Maintenance Version 4.9.x { #dependencies-version-4 }
| Dependency | Minimum Version | Recommended Version |
| --- | --- | --- |
-| CAP Java | n/a | [latest 3.10.x](https://central.sonatype.com/artifact/com.sap.cds/cds-services-bom/versions) |
+| CAP Java | n/a | [latest 4.9.x](https://central.sonatype.com/artifact/com.sap.cds/cds-services-bom/versions) |
| JDK | 17 | 21 |
| Maven | 3.8.8 | 3.9.9 |
-| @sap/cds-dk | 7 | [latest 8.x](https://www.npmjs.com/package/@sap/cds-dk) |
-| @sap/cds-compiler | 4 | [latest 5.x](https://www.npmjs.com/package/@sap/cds-compiler) |
+| @sap/cds-dk | 9 | [latest 9.x](https://www.npmjs.com/package/@sap/cds-dk) |
+| @sap/cds-compiler | 6 | [latest 6.x](https://www.npmjs.com/package/@sap/cds-compiler) |
| Spring Boot | 3.0 | [latest 3.x](https://central.sonatype.com/artifact/org.springframework.boot/spring-boot/versions) |
| XSUAA | 3.0 | [latest](https://central.sonatype.com/artifact/com.sap.cloud.security/java-bom/versions) |
| SAP Cloud SDK | 5.9 | [latest](https://central.sonatype.com/artifact/com.sap.cloud.sdk/sdk-modules-bom/versions) |
| Java Logging | 3.7 | [latest](https://central.sonatype.com/artifact/com.sap.hcp.cf.logging/cf-java-logging-support-servlet-jakarta/versions) |
-| Node.js | 18 | 20 |
+| Node.js | 22 | 22 |
### Consistent Versions
diff --git a/java/working-with-cql/query-api.md b/java/working-with-cql/query-api.md
index 34af880760..9c03f4dbec 100644
--- a/java/working-with-cql/query-api.md
+++ b/java/working-with-cql/query-api.md
@@ -188,7 +188,7 @@ Select.from(BOOKS).byParams("title", "author.name");
#### Filtering Map Data
-You can also filter by _content_ of [map data](../cds-data.md#cds-map) (i.e. elements of type `cds.Map`).
+You can also filter by _content_ of [map data](../cds-data.md#cds-map) (that is, elements of type `cds.Map`).
Let's use this model as an example:
@@ -899,7 +899,7 @@ The pagination isn't stateful. If rows are inserted or removed before a subseque
#### Sorting by Map Data
-You can also sort by _content_ of [map data](../cds-data.md#cds-map) (i.e. elements of type `cds.Map`). Considering this model
+You can also sort by _content_ of [map data](../cds-data.md#cds-map) (that is, elements of type `cds.Map`). Considering this model
```cds
entity Product : cuid {
diff --git a/java/working-with-cql/query-execution.md b/java/working-with-cql/query-execution.md
index b2f7a32a68..d6501d7929 100644
--- a/java/working-with-cql/query-execution.md
+++ b/java/working-with-cql/query-execution.md
@@ -223,7 +223,7 @@ long deleteCount = service.run(delete).rowCount();
## Views and Projections { #views }
-With CDS [views](../../cds/cdl#views-projections) you can derive new entities from existing ones, for example to rename or exclude certain elements, or to add [virtual elements](../../cds/cdl#virtual-elements-in-views) for specific use cases.
+With CDS [views](../../cds/cdl#views--projections) you can derive new entities from existing ones, for example to rename or exclude certain elements, or to add [virtual elements](../../cds/cdl#virtual-elements-in-views) for specific use cases.
From the CDS model the CDS compiler generates [DDL](../../guides/databases/cdl-to-ddl) files, which include SQL views for the CDS views. These views are deployed to the [database](../cqn-services/persistence-services#database-support) and used by the CAP runtime to read data.
diff --git a/node.js/_menu.md b/node.js/_menu.md
index b433647b63..a55ba84d4e 100644
--- a/node.js/_menu.md
+++ b/node.js/_menu.md
@@ -2,8 +2,8 @@
# [cds. compile()](cds-compile)
- ## [cds. compile()](cds-compile#cds-compile)
- ## [cds. compile.to ...](cds-compile#cds-compile-to)
+ ## [cds. compile()](cds-compile#cds-compile-)
+ ## [cds. compile.to ...](cds-compile#cds-compile-to-)
## [cds. load()](cds-compile#cds-load)
## [cds. parse()](cds-compile#cds-parse)
## [cds. minify()](cds-compile#cds-minify)
diff --git a/node.js/app-services.md b/node.js/app-services.md
index bcfdce896f..da2f5c6c30 100644
--- a/node.js/app-services.md
+++ b/node.js/app-services.md
@@ -113,7 +113,7 @@ This method is adding request handlers for handling managed data, as documented
### _static_ handle_paging() {.method}
-This method is adding request handlers for paging & implicit sorting, as documented in the [Providing Services guide](../guides/services/served-ootb#pagination-sorting).
+This method is adding request handlers for paging & implicit sorting, as documented in the [Providing Services guide](../guides/services/served-ootb#pagination--sorting).
@@ -164,20 +164,23 @@ When CAP's generic handlers run a CRUD operation, the result follows a consisten
| Operation | Return value |
|-----------------------|-----------------------------------------------------------------------------------------------|
| `READ` | Array of matching records, or a single record / `null` when read by key |
-| `INSERT` / `CREATE` | Array with `.affected` (rows written); iterate to access the inserted rows' primary keys |
-| `UPDATE` / `UPSERT` | Array with `.affected` (rows changed); populated with rows from a `RETURNING` clause |
-| `DELETE` | Array with `.affected` (rows deleted); populated with rows from a `RETURNING` clause |
+| `CREATE` | Array with `.affected` (rows created); iterate to access the created rows' generated keys |
+| `UPDATE` | Array with `.affected` (rows changed); reserved for rows from a `RETURNING` clause |
+| `UPSERT` | Array with `.affected` (rows written); reserved for rows from a `RETURNING` clause |
+| `DELETE` | Array with `.affected` (rows deleted); reserved for rows from a `RETURNING` clause |
-For `INSERT`s, the result is a lazy array: iterating it (`[...result]`, `for…of`, `JSON.stringify`) materializes the generated primary keys of the inserted rows. Direct index access works after the first iteration.
+For `CREATE`, the array will be populated with rows from an SQL `RETURNING` clause once that is supported. Until then, the result is a lazy array that computes the created rows' generated primary keys on demand: iterating it (`[...result]`, `for…of`, `JSON.stringify`) populates those keys, avoiding the cost when you don't need them.
+
+> [!warning] Iterate before indexing
+> Direct index access (`result[0]`) returns `undefined` until the array has been iterated at least once. Spread or loop over the result first.
```js
-const inserted = await srv.create(Books).entries({title:'Catweazle'})
-inserted.affected // 1
-const [row] = [...inserted] // materializes — row holds the generated key
-inserted[0] // same row (materialized above)
+const created = await srv.create(Books).entries({title:'Catweazle'})
+created.affected // 1
+const [row] = [...created] // iterate first — row holds the generated key
```
-For `UPDATE`, `UPSERT`, and `DELETE`, the array is reserved for rows returned by a SQL `RETURNING` clause. But `RETURNING` is not yet supported, so the array currently is always empty:
+For `UPDATE`, `UPSERT`, and `DELETE`, the array is reserved for rows returned by an SQL `RETURNING` clause. Unlike `CREATE`, there are no generated keys to synthesize client-side, so — with `RETURNING` not yet supported — the array is currently always empty:
```js
const updated = await srv.update(Books).set({discount:'10%'}).where({stock:{'>':111}})
diff --git a/node.js/authentication.md b/node.js/authentication.md
index 4b8cc3db00..7ccf58eaf4 100644
--- a/node.js/authentication.md
+++ b/node.js/authentication.md
@@ -17,7 +17,7 @@ uacp: This page is linked from the Help Portal at https://help.sap.com/products/
[user]: #cds-user
[`cds.context.user`]: #cds-user
-Represents the currently logged-in user as filled into [`cds.context.user`](events#user) by authentication middlewares.
+Represents the currently logged-in user as filled into [`cds.context.user`](events#-user) by authentication middlewares.
Simply create instances of `cds.User` or of subclasses thereof in custom middlewares.
For example:
@@ -429,7 +429,7 @@ export default function custom_auth(req: Req, res: Response, next: NextFunction)
}
```
-[Learn more about customizing the user ID in this example.](cds-serve#customization-of-cds-context-user){.learn-more}
+[Learn more about customizing the user ID in this example.](cds-serve#customization-of-cdscontextuser){.learn-more}
## Authentication in Production
diff --git a/node.js/best-practices.md b/node.js/best-practices.md
index 02d0e135b0..792a06e42c 100644
--- a/node.js/best-practices.md
+++ b/node.js/best-practices.md
@@ -251,7 +251,7 @@ Handling CSRF at the _App Router_ level ensures consistency across instances. Th
With _Cross-Origin Resource Sharing_ (CORS) the server that hosts the UI can tell the browser about servers it trusts to provide resources. In addition, so-called "preflight" requests tell the browser if the cross-origin server will process a request with a specific method and a specific origin.
-If not running in production, CAP's [built-in server.js](cds-server#built-in-server-js) allows all origins.
+If not running in production, CAP's [built-in server.js](cds-server#built-in-serverjs) allows all origins.
#### Custom CORS Implementation
@@ -368,7 +368,7 @@ The following articles might be of interest:
## Timestamps
-When using [timestamps](events#timestamp) (for example for managed dates) the Node.js runtime offers a way to easily deal with that without knowing the format of the time string. The `req` object contains a property `timestamp` that holds the current time (specifically `new Date()`, which is comparable to `CURRENT_TIMESTAMP` in SQL). It also stays the same until the request finished, so if it is used in multiple places in the same transaction or request it will always be the same.
+When using [timestamps](events#-timestamp) (for example for managed dates) the Node.js runtime offers a way to easily deal with that without knowing the format of the time string. The `req` object contains a property `timestamp` that holds the current time (specifically `new Date()`, which is comparable to `CURRENT_TIMESTAMP` in SQL). It also stays the same until the request finished, so if it is used in multiple places in the same transaction or request it will always be the same.
Example:
@@ -379,7 +379,7 @@ srv.before("UPDATE", "EntityName", (req) => {
});
```
-Internally the [timestamp](events#timestamp) is a JavaScript `Date` object, that is converted to the right format, when sent to the database. So if in any case a date string is needed, the best solution would be to initialize a Date object, that is then translated to the correct UTC String for the database.
+Internally the [timestamp](events#-timestamp) is a JavaScript `Date` object, that is converted to the right format, when sent to the database. So if in any case a date string is needed, the best solution would be to initialize a Date object, that is then translated to the correct UTC String for the database.
## Decimals and Int64 as Strings { #decimals-int64 }
diff --git a/node.js/cds-compile.md b/node.js/cds-compile.md
index a70e9c1763..8a36471650 100644
--- a/node.js/cds-compile.md
+++ b/node.js/cds-compile.md
@@ -248,7 +248,7 @@ const doc = cds.compile.to.asyncapi(csn_file)
## cds. load (files) {.method #cds-load }
Loads and parses a model from one or more files into a single effective model.
-It's essentially a [shortcut to `cds.compile ([...])`](#cds-compile). In addition emits event `cds 'loaded'`.
+It's essentially a [shortcut to `cds.compile ([...])`](#cds-compile-). In addition emits event `cds 'loaded'`.
Declaration:
@@ -287,7 +287,7 @@ The three main methods are offered as classic functions, as well as [tagged temp
### cds. parse. cdl() {.method #parse-cdl }
Parses a source string in _[CDL](../cds/cdl)_ syntax and returns it as a parsed model according to the [_CSN spec_](../cds/csn). Supports tagged template strings as well as plain string arguments.
-It's essentially a [shortcut to `cds.compile (..., {flavor:'parsed'})`](#cds-compile).
+It's essentially a [shortcut to `cds.compile (..., {flavor:'parsed'})`](#cds-compile-).
Examples:
```js
@@ -462,7 +462,7 @@ This is the right place to, for example, add custom elements required at runtime
### compile.to.dbx {.event}
-Emitted every time before database-specific artifacts, i.e. SQL DDL scripts, are generated from the model.
+Emitted every time before database-specific artifacts, that is, SQL DDL scripts, are generated from the model.
This is the right place to, for example, add custom elements required in your persistence.
diff --git a/node.js/cds-connect.md b/node.js/cds-connect.md
index 812b292275..a6ae411bf0 100644
--- a/node.js/cds-connect.md
+++ b/node.js/cds-connect.md
@@ -25,7 +25,7 @@ Use `cds.connect.to()` to connect to services configured in a project's `cds.req
const ReviewsService = await cds.connect.to('ReviewsService')
```
-The method returns a _Promise_ resolving to a _[Service](../cds/cdl#services)_ instance which acts as a client proxy to the service's API, allowing you to call its methods and access its data using common [`cds.Service`](core-services#consuming-services) methods, e.g.:
+The method returns a _Promise_ resolving to a _[Service](../cds/cdl#services)_ instance which acts as a client proxy to the service's API, allowing you to call its methods and access its data using common [`cds.Service`](core-services#consuming-services) methods, for example:
```js
let reviews = await ReviewsService.read ('Reviews')
@@ -58,7 +58,7 @@ const db2 = await cds.connect.to ({
### cds. services {#cds-connect-caching .property}
-When connecting to a service using `cds.connect.to()`, the service instance is cached in [`cds.services`](cds-facade#cds-services) under the service name. This means that subsequent calls to `cds.connect.to()` with the same service name will all return the same instance. As services constructed by [`cds.serve`](cds-serve#cds-serve) are registered with [`cds.services`](cds-facade#cds-services) as well, a connect finds and returns them as local service connections.
+When connecting to a service using `cds.connect.to()`, the service instance is cached in [`cds.services`](cds-facade#cds-services) under the service name. This means that subsequent calls to `cds.connect.to()` with the same service name will all return the same instance. As services constructed by [`cds.serve`](cds-serve#cds-serve-) are registered with [`cds.services`](cds-facade#cds-services) as well, a connect finds and returns them as local service connections.
You can also access cached service instance like this:
diff --git a/node.js/cds-facade.md b/node.js/cds-facade.md
index 0372114874..f5959ebfd6 100644
--- a/node.js/cds-facade.md
+++ b/node.js/cds-facade.md
@@ -183,7 +183,7 @@ Known values for `cds.cli.command` are `add`, `build`, `compile`, `deploy`, `imp
### cds. entities {.property}
-Convenience shortcut to [`cds.model.entities`](cds-reflect#entities).
+Convenience shortcut to [`cds.model.entities`](cds-reflect#-entities).
Returns an iterable dictionary of entity definitions in the model, which can be used like this:
- Accessing named entities directly:
diff --git a/node.js/cds-i18n.md b/node.js/cds-i18n.md
index 619e3f1cce..36ca56818a 100644
--- a/node.js/cds-i18n.md
+++ b/node.js/cds-i18n.md
@@ -60,7 +60,7 @@ ORDER_EXCEEDS_STOCK = The order of {quantity} books exceeds available stock {sto
### Direct Usage
-In addition, you can use both standard bundles directly in your code, with [`.at(key)`](#at-key) the central method to obtain localized texts:
+In addition, you can use both standard bundles directly in your code, with [`.at(key)`](#at-key-) the central method to obtain localized texts:
```js
[dev] cds repl
@@ -137,7 +137,7 @@ function cds.i18n.bundle4 (file : string, options?)
function cds.i18n.bundle4 (model : CSN, options?)
```
-Factory method to create instances of [`I18nBundle`](#i18nbundle). The first argument is either a string used as the bundle's [`file`/`basename`](#–-file-basename), or a CDS model.
+Factory method to create instances of [`I18nBundle`](#i18nbundle). The first argument is either a string used as the bundle's [`file`/`basename`](#-file--basename), or a CDS model.
```js
const b1 = cds.i18n.bundle4('foo')
@@ -278,7 +278,7 @@ You can alternatively pass in a CSN definition instead of an i18n key to look up
### `key4 (csn)` {.method}
-This method is used by [`bundle.at()`](#at-key) to determine an i18n key for a CSN definition. In essence, the implementation works like that:
+This method is used by [`bundle.at()`](#at-key-) to determine an i18n key for a CSN definition. In essence, the implementation works like that:
```js
const a = csn['@title']
@@ -299,7 +299,7 @@ return a.match(/{i18n>(.+)}/)[1]
function texts4 (locale: string) => Texts
```
-This method is used by [`bundle.at()`](#at-key) to obtain the set of translated texts for a specific locale.
+This method is used by [`bundle.at()`](#at-key-) to obtain the set of translated texts for a specific locale.
For example, try this in `cds repl`: {.indent}
```js
@@ -417,8 +417,8 @@ An array of root directories up to which to recurse up the filesystem hierarchy
### – `leafs` {.property}
-The leafs of the filesystem hierarchy to start fetch i18n folders recursively. Determined by `model?.$sources.map(path.dirname)` if a [`model`](#–-model) (or [`cds.model`](cds-facade#cds-model)) is given.
-*Default*: [`roots`](#–-roots). {.indent}
+The leafs of the filesystem hierarchy to start fetch i18n folders recursively. Determined by `model?.$sources.map(path.dirname)` if a [`model`](#-model) (or [`cds.model`](cds-facade#cds-model)) is given.
+*Default*: [`roots`](#-roots). {.indent}
### – `folders` {.property}
diff --git a/node.js/cds-ql.md b/node.js/cds-ql.md
index 29b2f0899c..a3ea81e72f 100644
--- a/node.js/cds-ql.md
+++ b/node.js/cds-ql.md
@@ -82,7 +82,7 @@ const { Books } = cds.entities
let q1 = SELECT.from (Books) .where `ID=${201}`
```
-[Learn more about using reflected definitions from a service's model](core-services#entities){.learn-more}
+[Learn more about using reflected definitions from a service's model](core-services#-entities){.learn-more}
#### Not Locked in to SQL
@@ -114,7 +114,7 @@ let books = await cats.run (query)
> `CatalogService` might be a remote service connected via OData. In this case, the query would be translated to an OData request sent via HTTP.
-The APIs are also available through [`cds.Service`'s CRUD-style Convenience API](core-services#crud-style-api), e.g.:
+The APIs are also available through [`cds.Service`'s CRUD-style Convenience API](core-services#crud-style-api), for example:
```js
const db = cds.db
@@ -205,7 +205,7 @@ let input = 201 //> might be entered by end users
let books = await SELECT.from `Books` .where ('ID='+input)
let bookz = await SELECT.from `Books` .where (`ID=${input}`)
```
-> **Note** also that tagged template strings never have surrounding parentheses! I.e., the third line above does the very same string concatenation as the second line.
+> **Note** also that tagged template strings never have surrounding parentheses! That means, the third line above does the very same string concatenation as the second line.
A malicious user might enter some SQL code fragment like that:
diff --git a/node.js/cds-reflect.md b/node.js/cds-reflect.md
index 330aa4e0ad..1b2731998e 100644
--- a/node.js/cds-reflect.md
+++ b/node.js/cds-reflect.md
@@ -137,8 +137,8 @@ for (let each of m.entities('my.bookshop')) console.log (each.name)
```
> [!info]
-> Note: In the dictionaries returned by `.entities` there are no entries for [`.texts`](#texts) entities, as these are generated, and hence living in a shadow world. They did show up in former releases, which caused a lot of confusion, and was fixed since cds 9.6.
-> They are always accessible via the main entity's [`.texts`](#texts) property, e.g. `Books.texts`.
+> Note: In the dictionaries returned by `.entities` there are no entries for [`.texts`](#-texts) entities, as these are generated, and hence living in a shadow world. They did show up in former releases, which caused a lot of confusion, and was fixed since cds 9.6.
+> They are always accessible via the main entity's [`.texts`](#-texts) property, for example `Books.texts`.
### each() {#each .method }
@@ -254,11 +254,11 @@ All objects of a linked model containing CSN definitions are instances of this c
For example, that applies to:
-- *`cds.model` [.definitions](#definitions), [.services](#services), [.entities](#entities)*
-- *`cds.service` [.entities](#entities-1), [.events](#events), [.actions](#actions-1)*
-- *`cds.entity` [.keys](#keys), [.associations](#associations), [.compositions](#compositions), [.actions](#actions)*
-- *`cds.struct` [.elements](#elements)* (hence also *`cds.entity` .elements*)
-- *`cds.Association` [.foreignKeys](#foreignkeys)*
+- *`cds.model` [.definitions](#-definitions), [.services](#-services), [.entities](#-entities)*
+- *`cds.service` [.entities](#-entities-1), [.events](#-events), [.actions](#-actions-1)*
+- *`cds.entity` [.keys](#-keys), [.associations](#-associations), [.compositions](#-compositions), [.actions](#-actions)*
+- *`cds.struct` [.elements](#-elements)* (hence also *`cds.entity` .elements*)
+- *`cds.Association` [.foreignKeys](#-foreignkeys)*
Instances of `LinkedDefinitions` allow both, object-style access, as well as array-like access.
For example:
diff --git a/node.js/cds-server.md b/node.js/cds-server.md
index e0124088e7..3d0bb0eae6 100644
--- a/node.js/cds-server.md
+++ b/node.js/cds-server.md
@@ -10,7 +10,7 @@ status: released
-CAP Node.js servers are bootstrapped through a [built-in `server.js` module](#built-in-server-js), which can be accessed through [`cds.server`](#cds-server). You can plug-in custom logic to the default bootstrapping choreography using a [custom `server.js`](#custom-server-js) in your project.
+CAP Node.js servers are bootstrapped through a [built-in `server.js` module](#built-in-serverjs), which can be accessed through [`cds.server`](#cds-server). You can plug-in custom logic to the default bootstrapping choreography using a [custom `server.js`](#custom-server-js) in your project.
@@ -85,8 +85,8 @@ module.exports = async function cds_server(options) {
### cds. server() {.method}
This is essentially a shortcut getter to `require('@sap/cds/server')`, that is, it loads and returns
-the [built-in `server.js`](#built-in-server-js) implementation.
-You'd mainly use this in [custom `server.js`](#custom-server-js) to delegate to the default implementation, [as shown below](#override-cds-server).
+the [built-in `server.js`](#built-in-serverjs) implementation.
+You'd mainly use this in [custom `server.js`](#custom-server-js) to delegate to the default implementation, [as shown below](#override-cdsserver).
@@ -265,7 +265,7 @@ The built-in CORS middleware can be enabled explicitly with cds.server.c
The default generic _index.html_ page is not served if `NODE_ENV` is set to `production`. Set cds.server.index: true to activate explicitly also in production-like test environments, for example for deployed PoCs. You must not do this in real production environments!
-[See the **Generic *index.html*** page in action.](../get-started/bookshop#generic-index-html) {.learn-more}
+[See the **Generic *index.html*** page in action.](../get-started/bookshop#generic-indexhtml) {.learn-more}
diff --git a/node.js/cds-test.md b/node.js/cds-test.md
index e01f222cdb..7ecf182e86 100644
--- a/node.js/cds-test.md
+++ b/node.js/cds-test.md
@@ -75,13 +75,13 @@ Let's analyze the highlighted the code above line by line:
```js :line-numbers=2
const ... cds.test... // > loads the cds-test module
```
-- By accessing [`cds.test`](#class-cds-test-test) the `cds-test` module is loaded, which ensures that...
+- By accessing [`cds.test`](#class-cdstesttest) the `cds-test` module is loaded, which ensures that...
- Functions like [`describe`](https://vitest.dev/api/describe.html), [`test`](https://vitest.dev/api/test.html), [`it`](https://vitest.dev/api/test.html), etc. are made available in test scope.
```js :line-numbers=2
const { GET, ... } = cds.test ('@capire/bookshop')
```
-- Calling the [`cds.test()`](#cds-test) function launches a CAP server for the given CAP project.
+- Calling the [`cds.test()`](#cdstest) function launches a CAP server for the given CAP project.
```js :line-numbers=3
defaults.auth = { username: 'alice' }
@@ -171,7 +171,7 @@ To keep your tests portable across different test runners, it's recommended to a
### Dos and Don'ts
::: danger Don't load `cds.env` before `cds.test()`
-To ensure [`cds.env`](cds-env), and hence all plugins, are loaded from the test's target folder, the call to [`cds.test()`](#cds-test) is the first thing you do in your tests. Any references to [`cds`](cds-facade) sub modules or any imports of which have to go after. → See also: [`CDS_TEST_ENV_CHECK`.](#cds-test-env-check)
+To ensure [`cds.env`](cds-env), and hence all plugins, are loaded from the test's target folder, the call to [`cds.test()`](#cdstest) is the first thing you do in your tests. Any references to [`cds`](cds-facade) sub modules or any imports of which have to go after. → See also: [`CDS_TEST_ENV_CHECK`.](#cds_test_env_check)
:::
::: warning Keep it simple, stupid!
@@ -181,14 +181,14 @@ Using these bells and whistles might also cause conflicts with generic features
:::
::: tip Avoid `process.chdir()` -> prefer `cds.test.in()`
-CAP servers need to be launched from a specific project home directory. Don't use `process.chdir()` for this, as that may leave test containers in failed state, leading to failing subsequent tests. -> Specify the target folder in the call to [`cds.test()`](#cds-test), or use [`cds.test.in()`](#test-in-folder) instead.
+CAP servers need to be launched from a specific project home directory. Don't use `process.chdir()` for this, as that may leave test containers in failed state, leading to failing subsequent tests. -> Specify the target folder in the call to [`cds.test()`](#cdstest), or use [`cds.test.in()`](#test-in-folder-) instead.
:::
## Class `cds.test.Test`
-Instances of this class are returned by [`cds.test()`](#cds-test), for example:
+Instances of this class are returned by [`cds.test()`](#cdstest), for example:
```js
const test = cds.test()
@@ -207,7 +207,7 @@ test.run().in(_dirname)
### cds.test() {.method}
-This method is the most convenient way to start a test server. It's actually just a convenient shortcut to construct a new instance of class `Test` and call [`test.run()`](#test-run), defined as follows:
+This method is the most convenient way to start a test server. It's actually just a convenient shortcut to construct a new instance of class `Test` and call [`test.run()`](#test-run-), defined as follows:
```js
const { Test } = cds.test
@@ -391,7 +391,7 @@ The implementation redirects any console operations in a `beforeAll()` hook, cle
### test. run (...) {.method}
-This is the method behind [`cds.test()`](#cds-test) to start a CDS server, that is the following are equivalent:
+This is the method behind [`cds.test()`](#cdstest) to start a CDS server, that is the following are equivalent:
```js
cds.test(...)
@@ -412,7 +412,7 @@ cds.test('serve','srv/cat-service.cds')
cds.test('serve','CatalogService')
```
-You can optionally add [`test.in(folder)`](#test-in-folder) in fluent style to run the test in a specific folder:
+You can optionally add [`test.in(folder)`](#test-in-folder-) in fluent style to run the test in a specific folder:
```js
cds.test('serve','srv/cat-service.cds').in('/cap/samples/bookshop')
@@ -435,7 +435,7 @@ cds.test().in('/cap/samples/bookshop') //> equivalent
### test. in (folder, ...) {.method}
-Safely switches [`cds.root`](cds-facade#cds-root) to the specified target folder. Most frequently you'd use it in combination with starting a server with [`cds.test()`](#cds-test) in fluent style like that:
+Safely switches [`cds.root`](cds-facade#cds-root) to the specified target folder. Most frequently you'd use it in combination with starting a server with [`cds.test()`](#cdstest) in fluent style like that:
```js
let test = cds.test(...).in(__dirname)
@@ -460,7 +460,7 @@ cds.test(__dirname) //> target folder: __dirname
This would result in the test server started from `__dirname`, but erroneously using `cds.env` loaded from `./`.
-As these mistakes end up in hard-to-resolve follow up errors, [`test.in()`](#test-in-folder) can detect this if environment variable `CDS_TEST_ENV_CHECK` is set. The previous code will then result into an error like that:
+As these mistakes end up in hard-to-resolve follow up errors, [`test.in()`](#test-in-folder-) can detect this if environment variable `CDS_TEST_ENV_CHECK` is set. The previous code will then result into an error like that:
```sh
CDS_TEST_ENV_CHECK=y jest cds.test.test.js
diff --git a/node.js/core-services.md b/node.js/core-services.md
index 8ea29f4681..6a77ea334b 100644
--- a/node.js/core-services.md
+++ b/node.js/core-services.md
@@ -258,7 +258,7 @@ await srv.read ('GET','/Books/206')
await srv.send ('submitOrder', { book:206, quantity:1 })
```
-[Using typed APIs for actions and functions](../guides/services/custom-actions#calling-actions-functions):
+[Using typed APIs for actions and functions](../guides/services/custom-actions#calling-actions--functions):
```js
await srv.submitOrder({ book:206, quantity:1 })
@@ -353,7 +353,7 @@ function constructor (
)
```
-> *Arguments fill in equally named properties [`name`](#name), [`model`](#model), [`options`](#options).*
+> *Arguments fill in equally named properties [`name`](#-name), [`model`](#-model), [`options`](#-options).*
**Don't override the constructor** in subclasses, rather override [`srv.init()`](#srv-init).
@@ -420,7 +420,7 @@ for (let d of this.entities) //... d is a CSN definition
#### Similarity _and_ difference to `cds.entities`
-These properties are very similar in nature and behavior to [`cds.entities`](cds-facade#cds-entities), which is a sortcut to [`cds.model.entities`](cds-reflect#entities). However, note this difference:
+These properties are very similar in nature and behavior to [`cds.entities`](cds-facade#cds-entities), which is a sortcut to [`cds.model.entities`](cds-reflect#-entities). However, note this difference:
While both of these work with [`cds.entities`](cds-facade#cds-entities):
```js
@@ -520,9 +520,11 @@ class BooksService extends cds.ApplicationService {
**Methods `.on`, `.before`, `.after`** refer to corresponding *phases* during request processing:
-- **`.on`** handlers _fulfill_ requests, for example, by reading/writing data from/to databases
-- **`.before`** handlers run before the `.on` handlers, e.g., for validating inbound data
-- **`.after`** handlers run after the `.on` handlers, e.g., to enrich outbound data
+|Method | Description | Example
+| --- | --- | --- |
+| `.on`| handlers _fulfill_ requests | reading/writing data from/to databases |
+| `.before` | handlers run before the `.on` handlers | validating inbound data |
+| `.after` | handlers run after the `.on` handlers | enrich outbound data |
**Argument `event`** can be one of:
@@ -535,9 +537,9 @@ class BooksService extends cds.ApplicationService {
**Argument `entity`** can be one of:
-- A `CSN definition` of an entity served by this service → i.e., from [`this.entities`](#entities)
+- A `CSN definition` of an entity served by this service → from [`this.entities`](#-entities)
- A `string` corresponding to the _name_ of an entity served by this service
-- A `path` navigating from a served entity to associated ones → e.g., `Books/author`
+- A `path` navigating from a served entity to associated ones, e.g., `Books/author`
**Multiple `events` or `entities`** – for both parameters, you can also specify:
@@ -691,9 +693,9 @@ Books.data = {
::: details Noteworthy in these examples...
-- The `READ` handler is using the [`req.target`](./events.md#target) property which points to the CSN definition of the entity addressed by the incoming request → matching one of `Books` or `Authors` we obtained from [`this.entities`](#entities) above.
+- The `READ` handler is using the [`req.target`](./events.md#-target) property which points to the CSN definition of the entity addressed by the incoming request → matching one of `Books` or `Authors` we obtained from [`this.entities`](#-entities) above.
-- The `UPDATE` handler is using the [`req.params`](./events.md#params) property which provides access to passed in entity keys.
+- The `UPDATE` handler is using the [`req.params`](./events.md#-params) property which provides access to passed in entity keys.
:::
@@ -820,7 +822,7 @@ Use this method to send synchronous requests to a service for execution.
- `method` is an HTTP method
- `path` can be an arbitrary URL, starting with a leading `'/'`, it is passed to a service without any modification as a string
-To call bound / unbound actions and functions from the service, further variants of `srv.send` are additionally supported, as described in the section [Calling Actions / Functions](../guides/services/custom-actions#calling-actions-functions). Basically, use the action or function name instead of the HTTP method.
+To call bound / unbound actions and functions from the service, further variants of `srv.send` are additionally supported, as described in the section [Calling Actions / Functions](../guides/services/custom-actions#calling-actions--functions). Basically, use the action or function name instead of the HTTP method.
Examples:
diff --git a/node.js/events.md b/node.js/events.md
index c9f325a6f1..bebf5b5509 100644
--- a/node.js/events.md
+++ b/node.js/events.md
@@ -88,7 +88,7 @@ this.on ('*', req => {
```
Keep in mind that multiple requests (that is, instances of `cds.Request`) may share the same incoming HTTP request and outgoing HTTP response (for example, in case of an OData batch request).
-See sections [`req`](#req) and [`res`](#res) of `cds.Request` to learn more about accessing the request and response objects of individual requests within an incoming batch request.
+See sections [`req`](#-req) and [`res`](#-res) of `cds.Request` to learn more about accessing the request and response objects of individual requests within an incoming batch request.
@@ -155,7 +155,7 @@ On the other hand, setting `req.user` in a custom authentication middleware is d
-Class [`cds.Event`] represents event messages in [asynchronous messaging](messaging), providing access to the [event](#event) name, payload [data](#data), and optional [headers](#headers). It also serves as **the base class for [`cds.Request`](#cds-request)** and hence for all synchronous interactions.
+Class [`cds.Event`] represents event messages in [asynchronous messaging](messaging), providing access to the [event](#-event) name, payload [data](#-data), and optional [headers](#-headers). It also serves as **the base class for [`cds.Request`](#cds-request)** and hence for all synchronous interactions.
@@ -242,7 +242,7 @@ Additional note about OData: For requests that are part of a changeset, the even
-Class `cds.Request` extends [`cds.Event`] with additional features to represent and deal with synchronous requests to services in [event handlers](./core-services#srv-handle-event), such as the [query](#query), additional [request parameters](#params), the [authenticated user](#user), and [methods to send responses](#req-reply-results).
+Class `cds.Request` extends [`cds.Event`] with additional features to represent and deal with synchronous requests to services in [event handlers](./core-services#srv-handle-event), such as the [query](#-query), additional [request parameters](#-params), the [authenticated user](#-user), and [methods to send responses](#req-reply-results).
[Router]: https://expressjs.com/en/4x/api.html#router
@@ -254,13 +254,13 @@ Class `cds.Request` extends [`cds.Event`] with additional features to represent
### . req {.property}
-Provides access to the express request object of individual requests within an incoming batch request. For convenience, in the case of non-batch requests, it points to the same request object as [`req.http.req`](#http).
+Provides access to the express request object of individual requests within an incoming batch request. For convenience, in the case of non-batch requests, it points to the same request object as [`req.http.req`](#-http).
### . res {.property}
-Provides access to the express response object of individual requests within an incoming batch request. For convenience, in the case of non-batch requests, it points to the same response object as [`req.http.res`](#http).
+Provides access to the express response object of individual requests within an incoming batch request. For convenience, in the case of non-batch requests, it points to the same response object as [`req.http.res`](#-http).
@@ -294,7 +294,7 @@ For example:
{style="font-style:italic;width:80%;"}
-[See also `req.path` to learn how to access full navigation paths.](#path){.learn-more}
+[See also `req.path` to learn how to access full navigation paths.](#-path){.learn-more}
[See _Entity Definitions_ in the CSN reference.](../cds/csn#entity-definitions){.learn-more}
[Learn more about linked models and definitions.](cds-reflect){.learn-more}
@@ -303,7 +303,7 @@ For example:
### . path {.property}
Captures the full canonicalized path information of incoming requests with navigation.
-For requests without navigation, `req.path` is identical to [`req.target.name`](#target) (or [`req.entity`](#entity), which is a shortcut for that).
+For requests without navigation, `req.path` is identical to [`req.target.name`](#-target) (or [`req.entity`](#-entity), which is a shortcut for that).
Examples based on [cap/samples/bookshop AdminService](https://github.com/capire/bookshop/blob/main/srv/admin-service.cds):
@@ -314,14 +314,14 @@ Examples based on [cap/samples/bookshop AdminService](https://github.com/capire/
| Books(201)/author | AdminService.Books/author | AdminService.Authors |
{style="font-style:italic"}
-[See also `req.target`](#target){.learn-more}
+[See also `req.target`](#-target){.learn-more}
### . entity {.property}
-This is a convenience shortcut to [`msg.target.name`](#target).
+This is a convenience shortcut to [`msg.target.name`](#-target).
@@ -545,7 +545,7 @@ All errors are collected in property `req.errors`, which is initially `undefined
if (req.errors) ... //> errors occurred
```
-After each phase of request processing, i.e. _before_ / _on_ / _after_, the framework checks whether errors got recorded in `req.errors`. If so, it automatically [rejects](#req-reject) the request with an aggregate error containing all recorded errors, and the request is not processed further. So, in essence, the above ends up in the equivalent of:
+After each phase of request processing, that is, _before_ / _on_ / _after_, the framework checks whether errors got recorded in `req.errors`. If so, it automatically [rejects](#req-reject) the request with an aggregate error containing all recorded errors, and the request is not processed further. So, in essence, the above ends up in the equivalent of:
```js
return req.reject ({
@@ -570,7 +570,7 @@ req.info ('Some information message')
req.warn ('Some warning message')
```
-The methods are similar to [`req.error()`](#req-error), also accepting the [same arguments](#req-reject), but the messages are collected in `req.messages` instead of `req.errors`, not decorated with stack traces, and returned in a HTTP response header (e.g. `sap-messages`), instead of the response body.
+The methods are similar to [`req.error()`](#req-error), also accepting the [same arguments](#req-reject), but the messages are collected in `req.messages` instead of `req.errors`, not decorated with stack traces, and returned in a HTTP response header (for example, `sap-messages`), instead of the response body.
::: warning User Input & Injection Vulnerabilities
Ensure proper validation of the message text if it contains values from user input.
diff --git a/node.js/fiori.md b/node.js/fiori.md
index fd09ec3efd..dce63a3a7d 100644
--- a/node.js/fiori.md
+++ b/node.js/fiori.md
@@ -79,7 +79,7 @@ srv.on('EDIT', MyEntity, /*...*/)
The `EDIT` event is triggered when the user starts editing an active entity.
As a result, a new entry to `MyEntity.drafts` is created.
-For logical reasons handlers for the `EDIT` event are registered on the active entity, i.e. `MyEntity` in the code above, not on the `MyEntity.drafts` entity.
+For logical reasons handlers for the `EDIT` event are registered on the active entity, that is, `MyEntity` in the code above, not on the `MyEntity.drafts` entity.
### `PATCH`
@@ -105,7 +105,7 @@ srv.on('SAVE', MyEntity.drafts, /*...*/)
The `SAVE` event is triggered when the user saves / activates a draft. This results in either a CREATE or an UPDATE on the active entity depending on whether the draft was created via `NEW` or `EDIT`.
> [!note]
-> The `SAVE` event is also available for non-draft, i.e. active entities. In that case it acts as an convenience shortcut for registering handlers for the combination of `CREATE` and `UPDATE` events. In contrast to that, the `SAVE` event on draft entities is a distinct event that is only triggered when **activating** a draft.
+> The `SAVE` event is also available for non-draft, that is, active entities. In that case it acts as an convenience shortcut for registering handlers for the combination of `CREATE` and `UPDATE` events. In contrast to that, the `SAVE` event on draft entities is a distinct event that is only triggered when **activating** a draft.
diff --git a/package-lock.json b/package-lock.json
index 5d29b6c315..c088223cc1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -952,9 +952,9 @@
}
},
"node_modules/@oxc-project/types": {
- "version": "0.137.0",
- "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.137.0.tgz",
- "integrity": "sha512-WT+Gb24i8hmvo85AIv2oEYouEXkRlKAlT9WaCa3TfLgNCN+GhrJOGZuIlMouAh38Qe4QOx26eUOVsq70qXrywA==",
+ "version": "0.139.0",
+ "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.139.0.tgz",
+ "integrity": "sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw==",
"dev": true,
"license": "MIT",
"funding": {
@@ -1290,9 +1290,9 @@
}
},
"node_modules/@rolldown/binding-android-arm64": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.3.tgz",
- "integrity": "sha512-DT6Z3PhvioeHMvxo+xHc3KtqggrI7CCTXCmC2h/5zUlp5jVitv7XEy+9q5/7v8IolhlioawpMo8Kg0EEBy7J0g==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.5.tgz",
+ "integrity": "sha512-lZg8fqIv2v7FF237bwMgzGZEJvGL79/s5knJ/i6FmsGF4XXlzccZ4jb+TrFIxtSSxFtIpdsgrPZeMk1I9AFcyQ==",
"cpu": [
"arm64"
],
@@ -1307,9 +1307,9 @@
}
},
"node_modules/@rolldown/binding-darwin-arm64": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.3.tgz",
- "integrity": "sha512-0NwgwsjM7LrsuVnXMK3koTpagBNOhloc/BNjKqZjv4V5zI5r13qx69uVhRx+o5Z0yy4Hzq+lpy7TAgUG/ocvrw==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.5.tgz",
+ "integrity": "sha512-51Bnx9pNiMRKSUNtBfySkNJ9vMU9Hh3I1ozDd6gyPPYzaXCfnptUcEZxXGYFn+ul2dtcMUiqGR1Yai2K10uoTw==",
"cpu": [
"arm64"
],
@@ -1324,9 +1324,9 @@
}
},
"node_modules/@rolldown/binding-darwin-x64": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.3.tgz",
- "integrity": "sha512-YtiBp4disu6V560loT6PjMdiRaWmVvDNrUunAalbiFx2ggeJwxdAsgZMcoGP17uyAsTwAj5V1niksxlHnVQ1Sw==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.5.tgz",
+ "integrity": "sha512-Tm+gbfC0aHu1tBA/JvKQh32S0K6YgCHkiAF4/W6xX0K0RmNuc94VeK419dJoE65R5aRxmo+noZQSWrAMF6yb6g==",
"cpu": [
"x64"
],
@@ -1341,9 +1341,9 @@
}
},
"node_modules/@rolldown/binding-freebsd-x64": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.3.tgz",
- "integrity": "sha512-yD3EkEdXk2LypPxnf/kSZHirarsI8gcPzc62SukhR9VJTyvV+F9Q/GxWNuCojc7sXyuVC4DxRGhdDK4X8VSsbw==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.5.tgz",
+ "integrity": "sha512-JMzDKCCXq93YccG5gz3hvOs1oXRKAf0XYpfOS88e+wZrC8Iugj6j68867vrYZkvpDDpKn/KoKORThmchMpF6TA==",
"cpu": [
"x64"
],
@@ -1358,9 +1358,9 @@
}
},
"node_modules/@rolldown/binding-linux-arm-gnueabihf": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.3.tgz",
- "integrity": "sha512-c+8vieQbsD7HNAHKIA34w0GJ9FedFFuJGD+7E6vz7Q3uqAIugL5p45fhlsj4UaAsHpcmlqugBWMhA0/j7o0sIg==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.5.tgz",
+ "integrity": "sha512-uML21j2K5TfPGutKxub+M+nLjZIrWjXQ5Grx4lCe/nimTj9B4L63zHpjXLl4y0L3mcm2htEQIb06oCG/szerNw==",
"cpu": [
"arm"
],
@@ -1375,9 +1375,9 @@
}
},
"node_modules/@rolldown/binding-linux-arm64-gnu": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.3.tgz",
- "integrity": "sha512-50jD0uUwLvur7Zz9LHz17kaAdTPjn5wN93hEgjvmYFRZwiR7ZJYovTd5ipyWJDAnXKvZ+wgc+/Ika6dwSF5OcA==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.5.tgz",
+ "integrity": "sha512-navSiuTMogvnQoZoM/v+l3ZWo50/NTwSHSzheABx/RCnmUPaKwq9qSo4Br2OYRs21+Fz8uFqITZM3H4opOB0/Q==",
"cpu": [
"arm64"
],
@@ -1395,9 +1395,9 @@
}
},
"node_modules/@rolldown/binding-linux-arm64-musl": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.3.tgz",
- "integrity": "sha512-BO9+oPL8K9poZJBfYPsXNtYjPE5uM3qeehT3aFcW4LITOl+iSqhp0abzjR2nWBUNjIZeKXjAEWBZ64WjNoHd6w==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.5.tgz",
+ "integrity": "sha512-lAryqH7IteztmCXQXk0etKj4wBQ7Gx5S6LjKhsgp9zb8I5bsuvU/2llH1hDQcjsFeqIsovMVN339/8pUDDBXxA==",
"cpu": [
"arm64"
],
@@ -1415,9 +1415,9 @@
}
},
"node_modules/@rolldown/binding-linux-ppc64-gnu": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.3.tgz",
- "integrity": "sha512-f3VpLB1vQ0Eo6ecr/6cekLnvYMFF4YBFoVGkfkvPLq1bAkbAwHYQPZKoAmG6OJyTcxxoC+AvezGx/S1obNC0Mw==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.5.tgz",
+ "integrity": "sha512-fsK/sNBnxzBlL4O1JNrZakVQxPspqpED5dLtNsZS9oOKmtSpdNIzxH2kkol5HYTWJN47sE20ztMJPxfZ89qGOg==",
"cpu": [
"ppc64"
],
@@ -1435,9 +1435,9 @@
}
},
"node_modules/@rolldown/binding-linux-s390x-gnu": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.3.tgz",
- "integrity": "sha512-AmurZ26Pqx/RI9N1gzEOCklkKXl927yjfXWUUS0O7Puh8ARM/Ob8qfrD3qnWksScdw6cSrW5PSHE9DyLu7+PtA==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.5.tgz",
+ "integrity": "sha512-gLYb4BIadlfTOYT5gO503n8zQjXflgzpD0FcyKh0Mzx3rqCZKnHoJWV9xe1KXUJ5lx2JfcSHr/mhzS0PC/McAA==",
"cpu": [
"s390x"
],
@@ -1455,9 +1455,9 @@
}
},
"node_modules/@rolldown/binding-linux-x64-gnu": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.3.tgz",
- "integrity": "sha512-JJpqs8bRGITDOdbkNKnlojzBabbOHrqjSvDr0IVsZObE1lBcPjxItUEY9eWIDbxaJ3cGrXPWGfGkIxFijg/URg==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.5.tgz",
+ "integrity": "sha512-FjcpEKUyJygHgs1o50VYNvkt5+7Le/VEdYt0AkRpkL33MnyQfwr8l5mXwMmfmTbyMPr5vJLC+8/Gd9gXnwU1QQ==",
"cpu": [
"x64"
],
@@ -1475,9 +1475,9 @@
}
},
"node_modules/@rolldown/binding-linux-x64-musl": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.3.tgz",
- "integrity": "sha512-rSJcdjPxzA/by/6/rYs+v+bXU7UjvnbUWz8MJb6kh6+knqB1dCrtHg0uu7C/4haqJvqdkYHQ5IGn+tCH9GLW/g==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.5.tgz",
+ "integrity": "sha512-Me+PfPI2TMeOQk0gYWfLQZtTktrmzbr8cDboqX83XKc7UrgAi55gF+2dUkWdxd19n55Essp2yeca+O9N5rBxHg==",
"cpu": [
"x64"
],
@@ -1495,9 +1495,9 @@
}
},
"node_modules/@rolldown/binding-openharmony-arm64": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.3.tgz",
- "integrity": "sha512-hQ3/PYkDJICgevvyNcVrihVeqq7k1Pp3VZ9lY+dauAYUJKO+auqApvANhvR1An9BhmqYKvW2Mu1F9u4DXSMLxQ==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.5.tgz",
+ "integrity": "sha512-yc5WrLzXks6zCQfn9Oxr8pORKyl/pF+QjHmW/Qx3qu0oyrrNC+y2JLTU1E2rcWYAmzlnqngWXHQjy51VzW70Vw==",
"cpu": [
"arm64"
],
@@ -1512,9 +1512,9 @@
}
},
"node_modules/@rolldown/binding-wasm32-wasi": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.3.tgz",
- "integrity": "sha512-Elcv/BtML9lXrV6JuKITc/grN2kYV9gjsQpW8Jfw4ioK0TOkjBjye0nnyqQNy9STNaI20lXNaQBRrD5gSgR0Yg==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.5.tgz",
+ "integrity": "sha512-VbQGPX2b4r48TAMIM2cjgluIM1HYutm4pcTEJsle7iEP7sB1dFqtPLBVbdLAZCxy1txCcPxf4QFf4v8uvltPqA==",
"cpu": [
"wasm32"
],
@@ -1531,9 +1531,9 @@
}
},
"node_modules/@rolldown/binding-win32-arm64-msvc": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.3.tgz",
- "integrity": "sha512-2DrEfhluH9yhiaFApmsjsjwrSYbNcY1oFTzYSP1a535jDbV98zCFanA/96TBUd0iDFcxGmw9QRExwGCXz3U+/g==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.5.tgz",
+ "integrity": "sha512-gHv82k63z4qpV5+Q1y/12KrK0ltWBukVDI8nZcbT7Tt/ZlOIVwppazneq0F93oDxTo3IgAMEDIoQh3E2n6mVsw==",
"cpu": [
"arm64"
],
@@ -1548,9 +1548,9 @@
}
},
"node_modules/@rolldown/binding-win32-x64-msvc": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.3.tgz",
- "integrity": "sha512-OL4OMk7UPXOeVGGd3qo5zJyPIljf4AFgk5QAkPPS+OoLuOOozhuaQGC18MxVTnw/06q93gShAJzlwnSCY9YtqA==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.5.tgz",
+ "integrity": "sha512-tTZuDBPw85tEN5PQi1pnEBzDy0Z49HtScLAbD5t6hyeU92A95pRWaSMw1GZZi/RwgSgUIl0xrSlXIT/9QzvYSA==",
"cpu": [
"x64"
],
@@ -5808,9 +5808,9 @@
"license": "ISC"
},
"node_modules/picomatch": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
- "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz",
+ "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==",
"dev": true,
"license": "MIT",
"engines": {
@@ -5990,13 +5990,13 @@
"license": "MIT"
},
"node_modules/rolldown": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.3.tgz",
- "integrity": "sha512-1F1eEtUBtFvcGm1HQ9TiUIUHPQG7mSAODrhIzjxoUEFuo8OcbrGLiVLkevNgj84TE4lnHvnumwFjhJO5Eu135g==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.5.tgz",
+ "integrity": "sha512-t9z29cJjXf/vxQ8dyhCSpt6H6aSwHTk8cT5I3iy6SMXuFpk5mB6PL6XfC8PCwrPTx93udwKUm9HRteAlTGBLiA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@oxc-project/types": "=0.137.0",
+ "@oxc-project/types": "=0.139.0",
"@rolldown/pluginutils": "^1.0.0"
},
"bin": {
@@ -6006,21 +6006,21 @@
"node": "^20.19.0 || >=22.12.0"
},
"optionalDependencies": {
- "@rolldown/binding-android-arm64": "1.1.3",
- "@rolldown/binding-darwin-arm64": "1.1.3",
- "@rolldown/binding-darwin-x64": "1.1.3",
- "@rolldown/binding-freebsd-x64": "1.1.3",
- "@rolldown/binding-linux-arm-gnueabihf": "1.1.3",
- "@rolldown/binding-linux-arm64-gnu": "1.1.3",
- "@rolldown/binding-linux-arm64-musl": "1.1.3",
- "@rolldown/binding-linux-ppc64-gnu": "1.1.3",
- "@rolldown/binding-linux-s390x-gnu": "1.1.3",
- "@rolldown/binding-linux-x64-gnu": "1.1.3",
- "@rolldown/binding-linux-x64-musl": "1.1.3",
- "@rolldown/binding-openharmony-arm64": "1.1.3",
- "@rolldown/binding-wasm32-wasi": "1.1.3",
- "@rolldown/binding-win32-arm64-msvc": "1.1.3",
- "@rolldown/binding-win32-x64-msvc": "1.1.3"
+ "@rolldown/binding-android-arm64": "1.1.5",
+ "@rolldown/binding-darwin-arm64": "1.1.5",
+ "@rolldown/binding-darwin-x64": "1.1.5",
+ "@rolldown/binding-freebsd-x64": "1.1.5",
+ "@rolldown/binding-linux-arm-gnueabihf": "1.1.5",
+ "@rolldown/binding-linux-arm64-gnu": "1.1.5",
+ "@rolldown/binding-linux-arm64-musl": "1.1.5",
+ "@rolldown/binding-linux-ppc64-gnu": "1.1.5",
+ "@rolldown/binding-linux-s390x-gnu": "1.1.5",
+ "@rolldown/binding-linux-x64-gnu": "1.1.5",
+ "@rolldown/binding-linux-x64-musl": "1.1.5",
+ "@rolldown/binding-openharmony-arm64": "1.1.5",
+ "@rolldown/binding-wasm32-wasi": "1.1.5",
+ "@rolldown/binding-win32-arm64-msvc": "1.1.5",
+ "@rolldown/binding-win32-x64-msvc": "1.1.5"
}
},
"node_modules/rollup": {
@@ -6663,16 +6663,16 @@
}
},
"node_modules/vite": {
- "version": "8.1.3",
- "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.3.tgz",
- "integrity": "sha512-Ds+gBRbj0lwRO2Y5hwnUBdxSwlAve9LeRyU4sNnAr0ewW0gWF0n5bgXgUzbgZ49MV9BVUAQUFYVcDUcilUExMA==",
+ "version": "8.1.4",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.4.tgz",
+ "integrity": "sha512-bTT9PsdWO+MQMNG9ZXIP/qM9wGh37DFxTV/sPq9cFpHr3w4jkgef032PkAL9jAqhk3Nz8NQw3O8n6/xFkqO4QQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"lightningcss": "^1.32.0",
- "picomatch": "^4.0.4",
+ "picomatch": "^4.0.5",
"postcss": "^8.5.16",
- "rolldown": "~1.1.3",
+ "rolldown": "~1.1.4",
"tinyglobby": "^0.2.17"
},
"bin": {
diff --git a/package.json b/package.json
index 5616464e2e..033b51ba9e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@capire/docs",
- "version": "2026.6.0",
+ "version": "2026.6.1",
"description": "Capire on VitePress",
"type": "module",
"scripts": {
diff --git a/redirects.md b/redirects.md
index 2c7c01f270..82d4445c9d 100644
--- a/redirects.md
+++ b/redirects.md
@@ -42,6 +42,7 @@
- [guides/using-services](guides/integration/calesi)
- [guides/databases-hana](guides/databases/hana)
- [guides/databases-postgres](guides/databases/postgres)
+- [guides/databases-sqlite](guides/databases/sqlite)
- [security](guides/security/)
- [security/aspects](guides/security/overview)
diff --git a/tools/apis/cds-build.md b/tools/apis/cds-build.md
index 0d9528617d..b41965ecf5 100644
--- a/tools/apis/cds-build.md
+++ b/tools/apis/cds-build.md
@@ -65,7 +65,7 @@ The CDS build system auto-detects all required build tasks by invoking the stati
The compiled CSN model can be accessed using the asynchronous methods `model()` or `basemodel()`.
- The method `model()` returns a CSN model for the scope defined by the `options.model` setting. If [feature toggles](../../guides/extensibility/feature-toggles) are enabled, this model also includes any toggled feature enhancements.
-- To get a CSN model without features, use the method `baseModel()` instead. The model can be used as input for further [model processing](../../node.js/cds-compile#cds-compile-to), like `to.edmx`, `to.hdbtable`, `for.odata`, etc.
+- To get a CSN model without features, use the method `baseModel()` instead. The model can be used as input for further [model processing](../../node.js/cds-compile#cds-compile-to-), like `to.edmx`, `to.hdbtable`, `for.odata`, etc.
- Use [`cds.reflect`](../../node.js/cds-reflect) to access advanced query and filter functionality on the CDS model.
## Add build task type to cds schema
diff --git a/tools/cds-cli.md b/tools/cds-cli.md
index c71e8f1bde..fe8eb4d20d 100644
--- a/tools/cds-cli.md
+++ b/tools/cds-cli.md
@@ -258,7 +258,7 @@ The result could look like this for a typical _Books_ entity from the _Bookshop_
- `author.ID` refers to a key from the _...Authors.json_ file that is created at the same time. If the _Authors_ entity is excluded, though, no such foreign key would be created, which cuts the association off.
- Data for _compositions_, like the `texts` composition to `Books.texts`, is always created.
- A random unique number for each record, _29894036_ here, is added to each string property, to help you correlate properties more easily.
-- Data for elements annotated with a regular expression using [`assert.format`](../guides/services/constraints#assert-format) can be generated using the NPM package [randexp](https://www.npmjs.com/package/randexp), which you need to installed manually.
+- Data for elements annotated with a regular expression using [`assert.format`](../guides/services/constraints#assertformat) can be generated using the NPM package [randexp](https://www.npmjs.com/package/randexp), which you need to installed manually.
- Other constraints like [type formats](../cds/types), [enums](../cds/cdl#enums), and [validation constraints](../guides/services/constraints) are respected as well, in a best effort way.
:::
@@ -397,7 +397,7 @@ Compiles the specified models to [CSN](../cds/csn) or other formats.
[See simple examples in the getting started page](../get-started/bookshop).{.learn-more}
-[For the set of built-in compile 'formats', see the `cds.compile.to` API](../node.js/cds-compile#cds-compile-to).{.learn-more}
+[For the set of built-in compile 'formats', see the `cds.compile.to` API](../node.js/cds-compile#cds-compile-to-).{.learn-more}
In addition, the following formats are available:
@@ -482,8 +482,8 @@ could look like this:
```cds [srv/data-service.cds]
using { sap.capire.flights as my } from '../db/schema';
-@data.product @hcql @rest @odata
-service sap.capire.flights.data {
+@hcql @rest @odata
+service FlightsService {
@readonly entity Flights as projection on my.Flights;
@readonly entity Airlines as projection on my.Airlines;
@readonly entity Airports as projection on my.Airports;
@@ -503,9 +503,11 @@ The command generates the API client package into a new folder _apis/data-servic
 {style="filter: drop-shadow(0 2px 5px rgba(0,0,0,.40));"}
The `service.csn` contains only the interface defined in the service, removing the query part of the entities and all the underlying model.
-In addition, there are i18n bundles with the localized metadata relevant
-for the interface, and a _data_ folder with test data
-that exactly matches the structure of the entities in the API.
+In addition (and as shown in the screenshot):
+
+- with the `--texts` option, i18n bundles are included with the localized metadata relevant for the interface
+- with the `--data` option, initial data that exactly matches the structure of the entities in the API is included
+- with the `--plugin` option, a `cds-plugin.js` entrypoint file is included for plug & play
`cds export` also adds a _package.json_. The package name combines the application name (from the main _package.json_) with the file name of the data service. In our example, this results in `@capire/xflights-data-service`.
You can change this name as appropriate.
diff --git a/tools/cds-typer.md b/tools/cds-typer.md
index a2f5e45493..ffa0464628 100644
--- a/tools/cds-typer.md
+++ b/tools/cds-typer.md
@@ -455,7 +455,7 @@ const { Books } = require('../@cds-models/sap/capire/bookshop')
const { Books } = require('#cds-models/sap/capire/bookshop')
```
-These imports will behave like [`cds.entities('sap.capire.bookshop')`](../node.js/cds-reflect#entities) during runtime, but offer you code completion and type hinting at design time:
+These imports will behave like [`cds.entities('sap.capire.bookshop')`](../node.js/cds-reflect#-entities) during runtime, but offer you code completion and type hinting at design time:
```js twoslash
// @noErrors