8000 September Release (#2141) · capire/docs@19ef554 · GitHub
[go: up one dir, main page]

Skip to content

Commit 19ef554

Browse files
renejeglinskyBraunMatthiasmatthia.braun@sap.comsmahatibeckermarc
authored
September Release (#2141)
Co-authored-by: BraunMatthias <59841349+BraunMatthias@users.noreply.github.com> Co-authored-by: matthia.braun@sap.com <matthias@W-5CG3323MK3> Co-authored-by: Mahati Shankar <93712176+smahati@users.noreply.github.com> Co-authored-by: Marc Becker <marc.becker@sap.com> Co-authored-by: ecklie <52252271+ecklie@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: chgeo <7470719+chgeo@users.noreply.github.com> Co-authored-by: Christian Georgi <christian.georgi@sap.com> Co-authored-by: Daniel O'Grady <daniel.o-grady@sap.com> Co-authored-by: Daniel O'Grady <103028279+daogrady@users.noreply.github.com> Co-authored-by: Christian Georgi <chgeo@users.noreply.github.com> Co-authored-by: Steffen Waldmann <steffen.waldmann@sap.com> Co-authored-by: sjvans <30337871+sjvans@users.noreply.github.com> Co-authored-by: Johannes Vogel <31311694+johannes-vogel@users.noreply.github.com> Co-authored-by: Adrian Görler <adrian.goerler@sap.com> Co-authored-by: Dr. David A. Kunz <david.kunz@sap.com> Co-authored-by: Daniel Hutzel <daniel.hutzel@sap.com> Co-authored-by: Dietrich Mostowoj <34100436+dimamost@users.noreply.github.com> Co-authored-by: Evgeny Andreev <eugene.andreev@gmail.com> Co-authored-by: Johannes Vogt <j.vogt@sap.com> Co-authored-by: Matthias Schur <107557548+MattSchur@users.noreply.github.com> Co-authored-by: Markus Ofterdinger <markus.ofterdinger@sap.com>
2 parents 1981c14 + 3972baa commit 19ef554

File tree

136 files changed

+1291
-1121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+1291
-1121
lines changed

.github/eslint-plugin/index.js

100644100755
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,15 @@
1010
import * as fs from 'node:fs'
1111
import * as path from 'node:path'
1212

13-
const RULES_BASE_PATH = path.join('tools', 'cds-lint', 'rules');
14-
const EXAMPLES_BASE_PATH = path.join('tools', 'cds-lint', 'examples');
13+
const RULES_BASE_PATH = path.join(import.meta.dirname, '../../tools/cds-lint/rules');
14+
const EXAMPLES_BASE_PATH = RULES_BASE_PATH
1515
const MENU_FILE_NAME = '_menu.md';
1616

1717
/**
1818
* Get a list of all rule description files.
1919
* @returns {string[]} An array of rule description file names.
2020
*/
21-
const getRuleDescriptionFiles = () =>
22-
fs.readdirSync(RULES_BASE_PATH)
23-
.filter(file => file.endsWith('.md'))
24-
.filter(file => !['index.md', MENU_FILE_NAME].includes(file))
25-
.sort()
21+
const getRuleDescriptionFiles = () => fs.globSync(path.join(RULES_BASE_PATH, '*/index.md')).sort()
2622

2723
/**
2824
* Generates the menu markdown file
@@ -33,12 +29,13 @@ const getRuleDescriptionFiles = () =>
3329
function generateMenuMarkdown () {
3430
const rules = getRuleDescriptionFiles();
3531
const menu = rules.map(rule => {
36-
const clean = rule.replace('.md', '');
37-
return `# [${clean}](${clean})`
32+
const folderPath = path.posix.dirname(path.relative(RULES_BASE_PATH, rule));
33+
const name = path.basename(folderPath);
34+
return `# [${name}](${folderPath}/)`
3835
}).join('\n');
39-
const menuFilePath = path.join(RULES_BASE_PATH, '_menu.md')
36+
const menuFilePath = path.join(RULES_BASE_PATH, MENU_FILE_NAME)
4037
fs.writeFileSync(menuFilePath, menu);
41-
console.info(`generated menu to ${menuFilePath}`)
38+
console.info(`generated menu to ${path.relative(process.cwd(), menuFilePath)}`);
4239
}
4340

4441
/**
@@ -52,11 +49,12 @@ function generateJsRuleStub (ruleName) {
5249
console.error('Please provide a rule name, e.g. "no-shared-handler-variables" as second argument');
5350
process.exit(1);
5451
}
55-
const stubFilePath = path.join(RULES_BASE_PATH, ruleName + '.md');
52+
const stubFilePath = path.join(RULES_BASE_PATH, ruleName, 'index.md');
5653
if (fs.existsSync(stubFilePath)) {
5754
console.error(`file ${stubFilePath} already exists, will not overwrite`);
5855
process.exit(2);
5956
}
57+
fs.mkdirSync(path.dirname(stubFilePath), { recursive: true });
6058
const stub = fs.readFileSync(path.join(import.meta.dirname, 'js-rule-stub.md'), 'utf-8').replaceAll('$RULE_NAME', ruleName);
6159
fs.writeFileSync(stubFilePath, stub);
6260
console.info(`generated stub to ${stubFilePath}`);

.github/eslint-plugin/js-rule-stub.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ status: released
33
---
44

55
<script setup>
6-
import PlaygroundBadge from '../components/PlaygroundBadge.vue'
6+
import PlaygroundBadge from '../../components/PlaygroundBadge.vue'
77
</script>
88

99
# $RULE_NAME
@@ -22,7 +22,7 @@ This rule was introduced in `@sap/eslint-plugin-cds x.y.z`.
2222
DESCRIPTION OF CORRECT EXAMPLE
2323

2424
::: code-group
25-
<<< ../examples/$RULE_NAME/correct/srv/admin-service.js#snippet{js:line-numbers} [srv/admin-service.js]
25+
<<< correct/srv/admin-service.js#snippet{js:line-numbers} [srv/admin-service.js]
2626
:::
2727
<PlaygroundBadge
2828
name="$RULE_NAME"
@@ -35,7 +35,7 @@ DESCRIPTION OF CORRECT EXAMPLE
3535
DESCRIPTION OF INCORRECT EXAMPLE
3636

3737
::: code-group
38-
<<< ../examples/$RULE_NAME/incorrect/srv/admin-service.js#snippet{js:line-numbers} [srv/admin-service.js]
38+
<<< incorrect/srv/admin-service.js#snippet{js:line-numbers} [srv/admin-service.js]
3939
:::
4040
<PlaygroundBadge
4141
name="$RULE_NAME"

.vitepress/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ config.rewrites = rewrites
106106
// Add custom capire info to the theme config
107107
config.themeConfig.capire = {
108108
versions: {
109-
java_services: '4.3.1',
110-
java_cds4j: '4.3.0'
109+
java_services: '4.4.0',
110+
java_cds4j: '4.4.1'
111111
},
112112
gotoLinks: []
113113
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2019-2025 SAP SE
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

eslint.config.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import cds from '@sap/cds/eslint.config.mjs'
22
import vue from 'eslint-plugin-vue'
3+
import globals from 'globals'
34

45
export default [
56
{
@@ -12,11 +13,14 @@ export default [
1213
...cds.recommended,
1314
...vue.configs['flat/essential'],
1415
{
15-
files: ['*.vue', '**/*.vue'],
16+
files: ['*.vue', '**/*.vue', '**/*.js'],
1617
languageOptions: {
1718
parserOptions: {
1819
parser: '@typescript-eslint/parser'
1920
},
21+
globals: {
22+
...globals.browser
23+
}
2024
},
2125
rules: {
2226
'vue/multi-word-component-names': 0,

get-started/troubleshooting.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,7 @@ Now you can build the archive with:
626626
mbt build -t gen --mtar mta.tar -e less.mtaext
627627
```
628628

629-
::: warning
630-
This approach is only recommended
629+
::: warning Not recommended for production deployments
631630
- For test deployments during _development_. For _production_ deployments, self-contained archives are preferrable.
632631
- If all your dependencies are available in _public_ registries like npmjs.org or Maven Central. Dependencies from _corporate_ registries are not resolvable in this mode.
633632
:::
@@ -768,7 +767,16 @@ If you receive an error response `404 Not Found: Requested route ('<route>') doe
768767
769768
:::
770769
770+
### Why do I get a _404 Cannot GET /_ error?
771771
772+
For security reasons, the **index page is not served in production** by default in both [Node.js](../node.js/cds-server#toggle-generic-index-page) and [Java](../java/developing-applications/configuring#production-profile).
773+
774+
If you try to access your backend URL, you will therefore see a _404 Cannot GET /_ error.
775+
This also means you **cannot use the `/` path as a health status indicator**. See the [Health Checks guide](../guides/deployment/health-checks) for the correct paths.
776+
777+
Only if absolutely required and you understand the security implications to your application, you can enable this page in your deployment.
778+
779+
Learn more about the generic index page in [Java](../java/developing-applications/properties#cds-indexPage) and in [Node.js](../node.js/cds-server#toggle-generic-index-page).{.learn-more}
772780
773781
## CAP on Kyma
774782

guides/databases-hana.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ status: released
99

1010
[SAP HANA Cloud](https://www.sap.com/products/technology-platform/hana.html) is supported as the CAP standard database and recommended for productive use with full support for schema evolution and multitenancy.
1111

12-
::: warning
12+
::: warning Validation strategy
1313

1414
CAP isn't validated with other variants of SAP HANA, like "SAP HANA Database as a Service" or "SAP HANA (on premise)".
1515

16+
The database services are validated against the latest maintained QRC version of SAP HANA Cloud. It's not guaranteed that outdated versions are fully functional with the latest database services.
17+
18+
[See the official SAP HANA Cloud documentation for their maintenance strategy.](https://help.sap.com/docs/HANA_CLOUD_CN/1f64fe39189f4176bf659e737d62222a/6ced4d164e234b74aa9bea82435ce9a8.html){.learn-more}
19+
1620
:::
1721

1822
## Setup & Configuration
@@ -53,9 +57,6 @@ The datasource for SAP HANA is then auto-configured based on available service b
5357

5458
:::
5559

56-
57-
58-
5960
## Running `cds build`
6061

6162
Deployment to SAP HANA is done via the [SAP HANA Deployment Infrastructure (HDI)](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-developer-guide-for-cloud-foundry-multitarget-applications-sap-business-app-studio/sap-hdi-deployer?) which in turn requires running `cds build` to generate all the deployable HDI artifacts. For example, run this in [capire/bookshop](https://github.com/capire/bookshop):
@@ -201,7 +202,7 @@ cds deploy --to hana
201202
Behind the scenes, `cds deploy` does the following:
202203

203204
* Compiles the CDS model to SAP HANA files (usually in _gen/db_, or _db/src/gen_)
204-
* Generates _[.hdbtabledata](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-deployment-infrastructure-hdi-reference/table-data-hdbtabledata?)_ files for the [CSV files](databases#providing-initial-data) in the project. If a _[.hdbtabledata](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-deployment-infrastructure-hdi-reference/table-data-hdbtabledata?)_ file is already present next to the CSV files, no new file is generated.
205+
* Generates _[.hdbtabledata](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-deployment-infrastructure-hdi-reference/table-data-hdbtabledata)_ files for the [CSV files](databases#providing-initial-data) in the project. If a _[.hdbtabledata](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-deployment-infrastructure-hdi-reference/table-data-hdbtabledata)_ file is already present next to the CSV files, no new file is generated.
205206
* Creates a Cloud Foundry service of type `hdi-shared`, which creates an HDI container. Also, you can explicitly specify the name like so: `cds deploy --to hana:<myService>`.
206207
* Starts `@sap/hdi-deploy` locally. If you need a tunnel to access the database, you can specify its address with `--tunnel-address <host:port>`.
207208
* Stores the binding information with profile `hybrid` in the _.cdsrc-private.json_ file of your project. You can use a different profile with parameter `--for`. With this information, `cds watch`/`run` can fetch the SAP HANA credentials at runtime, so that the server can connect to it.
@@ -651,7 +652,7 @@ Only use CSV files for _configuration data_ that can't be changed by application
651652

652653
:::
653654

654-
Yet, if you need to support initial data with user changes, you can use the `include_filter` option that _[.hdbtabledata](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-deployment-infrastructure-hdi-reference/table-data-hdbtabledata?version=2024_1_QRC)_ offers.
655+
Yet, if you need to support initial data with user changes, you can use the `include_filter` option that _[.hdbtabledata](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-deployment-infrastructure-hdi-reference/table-data-hdbtabledata)_ offers.
655656

656657

657658

guides/deployment/to-cf.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,22 +194,20 @@ Two deployment options are available:
194194

195195
#### Option A: SAP Cloud Portal
196196

197-
If you intend to deploy user interface applications, you also need to set up the [HTML5 Application Repository](https://discovery-center.cloud.sap/serviceCatalog/html5-application-repository-service) in combination with the [SAP Cloud Portal service](https://discovery-center.cloud.sap/serviceCatalog/cloud-portal-service):
197+
If you intend to deploy **multi-tenant** user interface applications, you also need to set up the [HTML5 Application Repository](https://discovery-center.cloud.sap/serviceCatalog/html5-application-repository-service) in combination with the [SAP Cloud Portal service](https://discovery-center.cloud.sap/serviceCatalog/cloud-portal-service):
198198

199199
```sh
200200
cds add portal
201201
```
202202

203-
#### Option B: SAP Build Work Zone, Standard Edition <Beta />
203+
#### Option B: SAP BTP Application Frontend <Beta />
204204

205-
For **single-tenant applications**, you can use [SAP Build Work Zone, Standard Edition](https://discovery-center.cloud.sap/serviceCatalog/sap-build-work-zone-standard-edition):
205+
For **single-tenant** applications, you can use the new [SAP BTP Application Frontend](https://help.sap.com/docs/application-frontend-service) service:
206206

207207
```sh
208-
cds add workzone
208+
cds add app-front
209209
```
210210

211-
**Important:** This also requires you to set up SAP Build Work Zone, Standard Edition [according to the SAP Learning tutorial](https://developers.sap.com/tutorials/spa-configure-workzone.html).
212-
213211
### 6. Optional: Multitenancy { #add-multitenancy }
214212

215213
To enable multitenancy for production, run the following command:

guides/extensibility/composition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Add the dependency to the reuse package to your `pom.xml`:
134134
:::
135135

136136
As Maven dependencies are - in contrast to `npm` packages - downloaded into a global cache, you need to make the artifacts from the reuse package available in your project locally.
137-
The CDS Maven Plugin provides a simple goal named `resolve`, that performs this task for you and extracts reuse packages into the `target/cds/` folder of the Maven project.
137+
The CDS Maven Plugin provides a simple goal named `resolve`, that performs this task for you and extracts reuse packages into the `target/cds/` folder of the CAP project.
138138
Include this goal into the `pom.xml`, if not already present:
139139

140140
::: code-group

guides/multitenancy/index.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,18 @@ cds add multitenancy
175175
"devDependencies": {
176176
"@cap-js/sqlite": "^2"
177177
},
178+
"engines": {
179+
"node": ">=20"
180+
},
178181
"scripts": {
179182
"start": "cds-serve",
180183
"build": "cds build ../.. --for mtx-sidecar --production && npm ci --prefix gen"
181184
},
182185
"cds": {
183-
"profile": "mtx-sidecar"
186+
"profiles": [
187+
"mtx-sidecar",
188+
"java"
189+
]
184190
}
185191
}
186192
```
@@ -772,6 +778,13 @@ cds up --to k8s
772778

773779
:::
774780

781+
:::tip Ensure a unique metadata container
782+
To prevent potential conflicts during the initial creation of the MTXS metadata container (`t0`), it is recommended to perform the initial deployment with only one instance of the MTXS sidecar.
783+
784+
Alternatively, you can run `cds-mtx upgrade t0` beforehand, such as in a [Cloud Foundry hook](#run-as-cloud-foundry-hook).
785+
:::
786+
787+
775788
### Subscribe
776789

777790
**Create a BTP subaccount** to subscribe to your deployed application. This subaccount has to be in the same region as the provider subaccount, for example, `us10`.
@@ -980,6 +993,8 @@ cds watch --profile dev
980993

981994
:::
982995

996+
<div id="hana-tms" />
997+
983998
## SaaS Dependencies {#saas-dependencies}
984999
Some of the xsuaa-based services your application consumes need to be registered as _reuse services_ to work in multitenant environments. This holds true for the usage of both the SaaS Registry service and the Subscription Manager Service (SMS).
9851000

0 commit comments

Comments
 (0)
0