Skip to content

Commit d5ddc64

Browse files
committed
Merge branch 'main' into revert-952-rm-cds.middlewares.after
2 parents 3338dab + 5700c96 commit d5ddc64

File tree

113 files changed

+4246
-2496
lines changed

Some content is hidden

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

113 files changed

+4246
-2496
lines changed

.devcontainer/devcontainer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
2-
"image":"mcr.microsoft.com/devcontainers/universal:2",
2+
"image":"mcr.microsoft.com/vscode/devcontainers/javascript-node:22",
33
"customizations": {
44
"vscode": {
55
"extensions": [
66
"fcrespo82.markdown-table-formatter",
77
"vue.volar"
88
]
99
}
10-
}
10+
},
11+
"runArgs": [
12+
// disable IPv6, see https://github.com/vitejs/vite/issues/16522
13+
"--sysctl", "net.ipv6.conf.all.disable_ipv6=1"
14+
]
1115
}

.github/etc/create-review.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ module.exports = async ({ github, require, exec, core }) => {
7171
const diffs = {}
7272
data.filter(obj => extname(obj.filename) === '.md')
7373
.forEach(obj => {
74-
diffs[obj.filename.replace('./', '')] = obj.patch.split('\n')
74+
diffs[obj.filename.replace('./', '')] = obj.patch?.split('\n') ?? []
7575
})
7676

7777
if (existsSync(markdownlintLogFile)) {

.github/workflows/PR-SAP.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
run: |
1919
git config --global credential.helper "cache --timeout=3600"
2020
echo -e "url=https://user:${GH_TOKEN}@github.com\n" | git credential approve
21-
echo -e "url=https://user:${GH_TOKEN_PARENT}@github.tools.sap\n" | git credential approve
21+
echo -e "url=https://user:${GH_TOKEN_TOOLS_DOCS}@github.tools.sap\n" | git credential approve
2222
git clone --depth 1 --no-single-branch https://github.tools.sap/cap/docs docs
2323
cd docs
2424
git checkout $GITHUB_HEAD_REF || git checkout main
@@ -27,7 +27,7 @@ jobs:
2727
git checkout $GITHUB_HEAD_REF
2828
env:
2929
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
GH_TOKEN_PARENT: ${{ secrets.GH_TOKEN_PARENT }}
30+
GH_TOKEN_TOOLS_DOCS: ${{ secrets.GH_TOKEN_TOOLS_DOCS }}
3131
- name: Use Node.js
3232
uses: actions/setup-node@v4
3333
with:
@@ -44,6 +44,7 @@ jobs:
4444
working-directory: docs
4545
env:
4646
NODE_OPTIONS: "--max-old-space-size=6144"
47+
VITE_CAPIRE_CI_HOST: "github.com"
4748
- name: Find broken anchor links
4849
working-directory: docs
4950
run: |

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run: |
2020
git config --global credential.helper "cache --timeout=3600"
2121
echo -e "url=https://user:${GH_TOKEN}@github.com\n" | git credential approve
22-
echo -e "url=https://user:${GH_TOKEN_PARENT}@github.tools.sap\n" | git credential approve
22+
echo -e "url=https://user:${GH_TOKEN_TOOLS_DOCS}@github.tools.sap\n" | git credential approve
2323
git clone --depth 1 --no-single-branch https://github.tools.sap/cap/docs docs
2424
cd docs
2525
git checkout $GITHUB_HEAD_REF || git checkout main
@@ -28,7 +28,7 @@ jobs:
2828
git checkout $GITHUB_HEAD_REF
2929
env:
3030
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
GH_TOKEN_PARENT: ${{ secrets.GH_TOKEN_PARENT }}
31+
GH_TOKEN_TOOLS_DOCS: ${{ secrets.GH_TOKEN_TOOLS_DOCS }}
3232
- name: Use Node.js
3333
uses: actions/setup-node@v4
3434
with:

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18
1+
v20

.vitepress/config.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ const base = process.env.GH_BASE || '/docs/'
55
import { defineConfig } from 'vitepress'
66
import languages from './languages'
77
import path from 'node:path'
8+
import { Menu } from './menu.js'
9+
10+
const menu = await Menu.from ('./menu.md')
811

912
const config = defineConfig({
1013

@@ -35,6 +38,8 @@ const config = defineConfig({
3538
},
3639

3740
themeConfig: {
41+
sidebar: menu.items,
42+
nav: menu.navbar,
3843
logo: '/cap-logo.svg',
3944
outline: [2,3],
4045
socialLinks: [
@@ -65,7 +70,7 @@ const config = defineConfig({
6570

6671
vite: {
6772
build: {
68-
chunkSizeWarningLimit: 5000, // chunk for local search index dominates
73+
chunkSizeWarningLimit: 6000, // chunk for local search index dominates
6974
},
7075
css: {
7176
preprocessorOptions: {
@@ -101,8 +106,8 @@ config.rewrites = rewrites
101106
// Add custom capire info to the theme config
102107
config.themeConfig.capire = {
103108
versions: {
104-
java_services: '3.7.2',
105-
java_cds4j: '3.7.2'
109+
java_services: '3.10.1',
110+
java_cds4j: '3.10.1'
106111
},
107112
gotoLinks: [],
108113
maven_host_base: 'https://repo1.maven.org/maven2'

.vitepress/theme/components/ConfigInspect.vue

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
</div>
1616
<div class="vp-code-group vp-doc" v-else>
1717
<CodeGroup :groups="[
18-
{ id: 'pkg-priv', label: '~/.cdsrc.json', lang: 'json', group, code: pkgStr, private: true },
19-
{ id: 'pkg', label: 'package/.cdsrc.json', lang: 'json', group, code: pkgStr },
20-
{ id: 'js', label: '.cdsrc.js', lang: 'js', group, code: jsStr },
21-
{ id: 'yml', label: '.cdsrc.yaml', lang: 'yml', group, code: ymlStr },
18+
{ id: 'pkg-rc', label: 'package.json', lang: 'json', group, code: pkgStr },
19+
{ id: 'pkg-priv', label: '~/.cdsrc.json', lang: 'json', group, code: rcJsonStr, private: true },
20+
{ id: 'pkg', label: '.cdsrc.json', lang: 'json', group, code: rcJsonStr },
21+
{ id: 'js', label: '.cdsrc.js', lang: 'js', group, code: rcJsStr },
22+
{ id: 'yml', label: '.cdsrc.yaml', lang: 'yml', group, code: rcYmlStr },
2223
{ id: 'env', label: '.env file', lang: 'properties', group, code: propStr },
2324
{ id: 'shl', label: 'Linux/macOS Shells', lang: 'sh', group, code: 'export '+envStr, transient: true },
2425
{ id: 'shp', label: 'Powershell', lang: 'powershell', group, code: '$Env:'+envStr, transient: true },
@@ -80,18 +81,18 @@
8081
FloatingVue.options.themes.cfgPopper = { $extend: 'dropdown' }
8182
8283
const slots = useSlots()
83-
//@ts-expect-error
8484
const slotVal = slots.default?.().at(0)?.children?.toString().trim() ?? 'error: provide <Config>your_key:value</Config>'
8585
86-
const [key, val] = slotVal.split(/\s*[:=]\s*/)
86+
const [key, val] = slotVal.split(/\s*[:=]\s*(.*)/) // split on first `:` or `=`
8787
const label = labelProp || `${keyOnly ? key: slotVal}`
8888
8989
const cfgKey = ref()
9090
const popperVisible = ref(false)
9191
const group = ref()
9292
const pkgStr = ref()
93-
const jsStr = ref()
94-
const ymlStr = ref()
93+
const rcJsonStr = ref()
94+
const rcJsStr = ref()
95+
const rcYmlStr = ref()
9596
const propStr = ref()
9697
const envStr = ref()
9798
const javaAppyml = ref()
@@ -116,14 +117,16 @@
116117
const pkg = toJson(key, jsonVal ?? value)
117118
118119
pkgStr.value = JSON.stringify(pkg, null, 2)
119-
jsStr.value = 'module.exports = ' + pkgStr.value.replace(/"(\w*?)":/g, '$1:')
120+
rcJsonStr.value = JSON.stringify(pkg.cds??{}, null, 2)
121+
rcJsStr.value = 'module.exports = ' + rcJsonStr.value.replace(/"(\w*?)":/g, '$1:')
122+
rcYmlStr.value = yaml.stringify(pkg.cds)
120123
propStr.value = `${key}=${jsonVal ? JSON.stringify(jsonVal) : value}`
121124
122125
let envKey = key.replaceAll('_', '__').replaceAll('.', '_')
123126
if (/^[a-z_]+$/.test(envKey)) envKey = envKey.toUpperCase() // only uppercase if not camelCase
124127
envStr.value = `${envKey}=${jsonVal ? JSON.stringify(jsonVal) : value}`
125128
126-
javaAppyml.value = ymlStr.value = yaml.stringify(pkg)
129+
javaAppyml.value = yaml.stringify(pkg)
127130
javaEnvStr.value = `-D${propStr.value}`
128131
})
129132

.vitepress/theme/styles.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
--vp-c-text-1: rgba(255, 255, 245, 0.86);
5858

5959
/* brightness fine-tuned to turn #fff into --vp-c-bg */
60-
img, svg.adapt-dark {
60+
img, svg.adapt-dark,
61+
video.bright { // assuming videos are usually dark, only darken them if marked as bright
6162
filter: brightness(.884) invert(1) hue-rotate(177deg)
6263
}
6364
img.mute-dark {

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ npm run docs:dev
2626

2727
Which usually starts a dev server on http://localhost:5173/ like this:
2828

29-
```
29+
```sh
3030
vitepress v1.0.0...
3131

3232
➜ Local: http://localhost:5173/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ npm run start
3535
```
3636

3737
This will respond with:
38-
```
38+
```sh
3939
vitepress v1...
4040

4141
➜ Local: http://localhost:5173/docs/

0 commit comments

Comments
 (0)