Skip to content

Commit ab69610

Browse files
authored
Merge branch 'main' into effective-audit-log-config
2 parents de00aa8 + a29a386 commit ab69610

File tree

163 files changed

+18462
-2492
lines changed

Some content is hidden

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

163 files changed

+18462
-2492
lines changed

.github/cli/grab-cli-texts.sh

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ${dir}/grab-cli-texts.js @sap/cds-dk "cds add --help" ${proj} > $
1414
${dir}/grab-cli-texts.js @cap-js/cds-typer "cds-typer --help" ${proj} > ${dir}/../../tools/assets/help/cds-typer.out.md
1515
${dir}/grab-cli-texts.js @sap/cds-dk "cds --help" ${proj} > ${dir}/../../tools/assets/help/cds-help.out.md
1616
${dir}/grab-cli-texts.js @sap/cds-dk "cds watch --help" ${proj} > ${dir}/../../tools/assets/help/cds-watch.out.md
17+
${dir}/grab-cli-texts.js @sap/cds-dk "cds repl --help" ${proj} > ${dir}/../../tools/assets/help/cds-repl.out.md
1718
${dir}/grab-cli-texts.js @sap/cds-dk "cds version" ${proj} > ${dir}/../../tools/assets/help/cds-version.out.md
1819
${dir}/grab-cli-texts.js @sap/cds-dk "cds version --markdown" ${proj} > ${dir}/../../tools/assets/help/cds-version-md.out.md
1920
${dir}/grab-cli-texts.js @sap/cds-dk "cds env requires.db" ${proj} > ${dir}/../../tools/assets/help/cds-env-requires-db.out.md

.github/renovate.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
],
77
"rebaseWhen": "conflicted",
88
"includePaths": [
9-
".vitepress/config.ts",
9+
".vitepress/config.*",
1010
".github/workflows/",
1111
"package.json",
1212
"**/*.md"
@@ -37,7 +37,7 @@
3737
"customManagers": [
3838
{
3939
"customType": "regex",
40-
"fileMatch": [ ".vitepress/config.ts" ],
40+
"fileMatch": [ ".vitepress/config.*" ],
4141
"matchStrings": [
4242
"java_services\\s*:\\s*'(?<currentValue>.*?)'"
4343
],
@@ -47,7 +47,7 @@
4747
},
4848
{
4949
"customType": "regex",
50-
"fileMatch": [ ".vitepress/config.ts" ],
50+
"fileMatch": [ ".vitepress/config.*" ],
5151
"matchStrings": [
5252
"java_cds4j\\s*:\\s*'(?<currentValue>.*?)'"
5353
],

.github/workflows/PR-SAP.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: PR Build (SAP)
33
on:
44
pull_request:
55
branches: [main]
6+
merge_group:
67

78
concurrency:
89
group: pr-sap-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -30,7 +31,7 @@ jobs:
3031
- name: Use Node.js
3132
uses: actions/setup-node@v4
3233
with:
33-
node-version: 18.x
34+
node-version: 22
3435
cache: 'npm'
3536
cache-dependency-path: docs/package-lock.json
3637
- run: npm ci

.github/workflows/PR.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: PR Build
22

33
on:
44
pull_request:
5+
merge_group:
56

67
concurrency:
78
group: pr-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -16,7 +17,7 @@ jobs:
1617
- name: Use Node.js
1718
uses: actions/setup-node@v4
1819
with:
19-
node-version: 18.x
20+
node-version: 22
2021
cache: 'npm'
2122
- name: Run CDS snippet checker
2223
run: |

.github/workflows/lint.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [main]
66
paths:
77
- '**.md'
8+
merge_group:
89
workflow_dispatch:
910

1011
jobs:
@@ -31,7 +32,7 @@ jobs:
3132
- name: Use Node.js
3233
uses: actions/setup-node@v4
3334
with:
34-
node-version: 18.x
35+
node-version: 22
3536
cache: 'npm'
3637
cache-dependency-path: docs/package-lock.json
3738
- run: npm ci

.github/workflows/main.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Use Node.js
3232
uses: actions/setup-node@v4
3333
with:
34-
node-version: 18.x
34+
node-version: 22
3535
cache: 'npm'
3636
- run: npm ci
3737
- run: npm test
@@ -42,7 +42,7 @@ jobs:
4242
SITE_HOSTNAME: https://cap.js.org
4343
VITE_CAPIRE_PREVIEW: true
4444
- name: Upload artifact
45-
uses: actions/upload-pages-artifact@v1
45+
uses: actions/upload-pages-artifact@v2
4646
with:
4747
name: github-pages
4848
path: .vitepress/dist
@@ -57,4 +57,4 @@ jobs:
5757
steps:
5858
- name: Deploy to GitHub Pages
5959
id: deployment
60-
uses: actions/deploy-pages@v1
60+
uses: actions/deploy-pages@v3

.vitepress/config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ config.rewrites = rewrites
101101
// Add custom capire info to the theme config
102102
config.themeConfig.capire = {
103103
versions: {
104-
java_services: '3.4.0',
105-
java_cds4j: '3.4.0'
104+
java_services: '3.6.0',
105+
java_cds4j: '3.6.1'
106106
},
107107
gotoLinks: [],
108108
maven_host_base: 'https://repo1.maven.org/maven2'

.vitepress/theme/Layout.vue

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ import ShortcutsList from './components/ShortcutsList.vue'
55
import ImplVariants from './components/implvariants/ImplVariants.vue'
66
import NavScreenMenuItem from './components/implvariants/NavScreenMenuItem.vue'
77
import Ribbon from './components/Ribbon.vue'
8-
// import ScrollToTop from './components/ScrollToTop.vue'
8+
import ScrollToTop from './components/ScrollToTopSimple.vue'
9+
import WasThisHelpful from './components/WasThisHelpful.vue'
10+
import { useRoute } from 'vitepress'
911
1012
const isPreview = !!import.meta.env.VITE_CAPIRE_PREVIEW
1113
1214
const { Layout } = DefaultTheme
1315
const { frontmatter } = useData()
1416
17+
const route = useRoute()
18+
1519
</script>
1620

1721
<template>
@@ -24,6 +28,9 @@ const { frontmatter } = useData()
2428
<template #doc-top>
2529
<slot name="doc-top" />
2630
</template>
31+
<template #doc-after>
32+
<WasThisHelpful :key="route.path" />
33+
</template>
2734
<template #not-found>
2835
<slot name="not-found" />
2936
</template>

.vitepress/theme/components/ConfigInspect.vue

+23-15
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@
1010
<div class="vp-code-group vp-doc" v-if="java">
1111
<CodeGroup :groups="[
1212
{ id: 'java-appyml', label: 'application.yml', lang: 'yml', group, code: javaAppyml },
13-
{ id: 'java-sysprop', label: 'System property', lang: 'properties', group, code: javaEnvStr }
13+
{ id: 'java-sysprop', label: 'System property', lang: 'properties', group, code: javaEnvStr, transient: true }
1414
]" />
1515
</div>
1616
<div class="vp-code-group vp-doc" v-else>
1717
<CodeGroup :groups="[
1818
{ id: 'pkg', label: 'package/.cdsrc.json', lang: 'json', group, code: pkgStr },
19+
{ id: 'js', label: '.cdsrc.js', lang: 'js', group, code: jsStr },
20+
{ id: 'yml', label: '.cdsrc.yaml', lang: 'yml', group, code: ymlStr },
1921
{ id: 'env', label: '.env file', lang: 'properties', group, code: propStr },
20-
{ id: 'shl', label: 'Linux/macOS Shells', lang: 'sh', group, code: envStr },
21-
{ id: 'shp', label: 'Powershell', lang: 'powershell', group, code: '$Env:'+envStr },
22-
{ id: 'shw', label: 'Cmd Shell', lang: 'cmd', group, code: 'set '+envStr }
22+
{ id: 'shl', label: 'Linux/macOS Shells', lang: 'sh', group, code: envStr, transient: true },
23+
{ id: 'shp', label: 'Powershell', lang: 'powershell', group, code: '$Env:'+envStr, transient: true },
24+
{ id: 'shw', label: 'Cmd Shell', lang: 'cmd', group, code: 'set '+envStr, transient: true }
2325
]" />
2426
</div>
2527
</template>
@@ -32,12 +34,21 @@
3234
import FloatingVue from 'floating-vue'
3335
import yaml from 'yaml'
3436
37+
const { java, keyOnly, filesOnly, label:labelProp } = defineProps<{
38+
java?: boolean,
39+
keyOnly?: boolean,
40+
filesOnly?: boolean,
41+
label?: string
42+
}>()
43+
3544
// sub component that renders code blocks similar to the markdown `::: code-block` syntax
3645
const CodeGroup = defineComponent(
3746
({ groups }) => () => [
38-
h('div', { class: 'tabs' }, groups.flatMap((b, idx) => [
39-
h('input', { type: 'radio', name: 'group', id: `${b.group}-${b.id}`, checked: idx === 0 }),
40-
h('label', { for: `${b.group}-${b.id}` }, b.label)
47+
h('div', { class: 'tabs' }, groups
48+
.filter((b) => filesOnly ? !b.transient : true)
49+
.flatMap((b, idx) => [
50+
h('input', { type: 'radio', name: 'group', id: `${b.group}-${b.id}`, checked: idx === 0 }),
51+
h('label', { for: `${b.group}-${b.id}` }, b.label)
4152
])),
4253
h('div', { class: 'blocks' }, groups.flatMap((b, idx) => [
4354
h('div', { class: ['language-'+b.lang, idx === 0 ? 'active': ''] }, [
@@ -54,16 +65,11 @@
5465
]))
5566
], {
5667
props: {
57-
groups: { type: Array<{id:string, group:string, code:string, label:string, lang:string }>, required: true }
68+
groups: { type: Array<{id:string, group:string, code:string, label:string, lang:string, transient?:boolean }>, required: true }
5869
}
5970
}
6071
)
6172
62-
const { java, keyOnly, label:labelProp } = defineProps<{
63-
java?: boolean,
64-
keyOnly?: boolean,
65-
label?: string
66-
}>()
6773
FloatingVue.options.themes.cfgPopper = { $extend: 'dropdown' }
6874
6975
const slots = useSlots()
@@ -76,6 +82,8 @@
7682
const popperVisible = ref(false)
7783
const group = ref()
7884
const pkgStr = ref()
85+
const jsStr = ref()
86+
const ymlStr = ref()
7987
const propStr = ref()
8088
const envStr = ref()
8189
const javaAppyml = ref()
@@ -100,12 +108,12 @@
100108
const pkg = toJson(key, jsonVal ?? value)
101109
102110
pkgStr.value = JSON.stringify(pkg, null, 2)
111+
jsStr.value = 'module.exports = ' + pkgStr.value.replace(/"(\w*?)":/g, '$1:')
103112
propStr.value = `${key}=${jsonVal ? JSON.stringify(jsonVal) : value}`
104113
envStr.value = `${key.replaceAll('_', '__').replaceAll('.', '_').toUpperCase()}=${jsonVal ? JSON.stringify(jsonVal) : value}`
105114
106-
javaAppyml.value = yaml.stringify(pkg)
115+
javaAppyml.value = ymlStr.value = yaml.stringify(pkg)
107116
javaEnvStr.value = `-D${propStr.value}`
108-
109117
})
110118
111119
function toJson(key:string, value:string): Record<string, any> {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!-- eslint-disable vue/valid-template-root -->
2+
<template />
3+
4+
<script setup>
5+
import { onMounted } from 'vue'
6+
7+
// Add back-to-top behavior to the outline's 'On this page' title
8+
onMounted(() => {
9+
const e = document.getElementById('doc-outline-aria-label')
10+
if (e) e.onclick = ()=> document.location = '#'
11+
})
12+
</script>

.vitepress/theme/components/ShortcutsList.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ watch(visible, isVisible => {
8484
})
8585
8686
function onKeyDown(event) {
87+
const { tagName, isContentEditable } = document.activeElement
88+
if (tagName === 'INPUT' || tagName === 'TEXTAREA' || isContentEditable) return
8789
if (document.activeElement === document.querySelectorAll(querySelectorSearchInput)[0]) return // search is active
8890
if (event.altKey || event.ctrlKey || event.metaKey) return // only simple keys for now
8991
if (event.key === 'Shift' && visible.value) {
@@ -92,7 +94,7 @@ function onKeyDown(event) {
9294
}
9395
const cmd = commands.value.find(cmd => !!cmd.keys.find(k => k.value === event.key))
9496
const enabled = cmd && cmd.run && ('enabled' in cmd ? cmd.enabled() : true)
95-
if (enabled) {
97+
if (enabled) {
9698
event.preventDefault()
9799
cmd.run(event)
98100
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<template>
2+
<Badge
3+
type="info"
4+
text="Under Construction"
5+
title="This section is under construction and may not be complete. Check back later for updates..."
6+
/>
7+
</template>

0 commit comments

Comments
 (0)