Skip to content

Commit b8ff918

Browse files
Merge pull request #894 from cap-js/main
April Release 2024-05-03
2 parents efb6544 + 51ccfe8 commit b8ff918

File tree

86 files changed

+2218
-1463
lines changed

Some content is hidden

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

86 files changed

+2218
-1463
lines changed

.github/renovate.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,59 @@
4747
"depNameTemplate": "com.sap.cds:cds4j-api",
4848
"datasourceTemplate": "maven",
4949
"versioningTemplate": "maven"
50+
},
51+
{
52+
"fileMatch": ["\\.md$"],
53+
"matchStrings": [
54+
"<em>\\s*@sap/cds:\\s*</em>\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)",
55+
"\\|\\s*@sap/cds\\s*\\|\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)\\s*\\|"
56+
],
57+
"depNameTemplate": "@sap/cds",
58+
"datasourceTemplate": "npm"
59+
},
60+
{
61+
"fileMatch": ["\\.md$"],
62+
"matchStrings": [
63+
"<em>\\s*@sap/cds-compiler:\\s*</em>\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)",
64+
"\\|\\s*@sap/cds-compiler\\s*\\|\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)\\s*\\|"
65+
],
66+
"depNameTemplate": "@sap/cds-compiler",
67+
"datasourceTemplate": "npm"
68+
},
69+
{
70+
"fileMatch": ["\\.md$"],
71+
"matchStrings": [
72+
"<em>\\s*@sap/cds-dk:\\s*</em>\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)",
73+
"\\|\\s*@sap/cds-dk\\s*\\|\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)\\s*\\|"
74+
],
75+
"depNameTemplate": "@sap/cds-dk",
76+
"datasourceTemplate": "npm"
77+
},
78+
{
79+
"fileMatch": ["\\.md$"],
80+
"matchStrings": [
81+
"<em>\\s*@sap/cds-mtxs:\\s*</em>\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)",
82+
"\\|\\s*@sap/cds-mtxs\\s*\\|\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)\\s*\\|"
83+
],
84+
"depNameTemplate": "@sap/cds-mtxs",
85+
"datasourceTemplate": "npm"
86+
},
87+
{
88+
"fileMatch": ["\\.md$"],
89+
"matchStrings": [
90+
"<em>\\s*@sap/eslint-plugin-cds:\\s*</em>\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)",
91+
"\\|\\s*@sap/eslint-plugin-cds\\s*\\|\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)\\s*\\|"
92+
],
93+
"depNameTemplate": "@sap/eslint-plugin-cds",
94+
"datasourceTemplate": "npm"
95+
},
96+
{
97+
"fileMatch": ["\\.md$"],
98+
"matchStrings": [
99+
"<em>\\s*Node.js:\\s*</em>\\s*(?<currentValue>v\\d+\\.\\d+\\.\\d+)",
100+
"\\|\\s*Node.js\\s*\\|\\s*(?<currentValue>v\\d+\\.\\d+\\.\\d+)\\s*\\|"
101+
],
102+
"depNameTemplate": "nodejs",
103+
"datasourceTemplate": "node"
50104
}
51105
]}

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ jobs:
3737
- run: npm test
3838
- run: npm run docs:build
3939
env:
40-
SITE_HOSTNAME: https://cap-js.github.io/docs
40+
GH_BASE: /
41+
SITE_HOSTNAME: https://cap.js.org
4142
VITE_CAPIRE_PREVIEW: true
4243
- name: Upload artifact
4344
uses: actions/upload-pages-artifact@v1

.vitepress/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ if (!siteURL.pathname.endsWith('/')) siteURL.pathname += '/'
2222
const redirectLinks: Record<string, string> = {}
2323

2424
const latestVersions = {
25-
java_services: '2.8.1',
26-
java_cds4j: '2.8.1'
25+
java_services: '2.9.0',
26+
java_cds4j: '2.9.0'
2727
}
2828

2929
const localSearchOptions = {

.vitepress/menu.js

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
import path from 'node:path'
22
import fs from 'node:fs'
33

4+
import rulesSidebar from '../tools/cds-lint/sidebar.js'
5+
const dynamicItems = (item) => {
6+
if (item.text.includes('#items:rules-sidebar')) {
7+
item.text = item.text.replace('#items:rules-sidebar', '')
8+
item.items = rulesSidebar()
9+
item.collapsed = true
10+
}
11+
}
12+
413
/**
514
* Construct sidebar from markdown
615
*/
@@ -36,10 +45,14 @@ export function sidebar (file = 'menu.md', filter=(_)=>true) {
3645
}
3746

3847
const _absolute = link => link && ( link[0] === '/' ? link : '/'+link ).replace('@external/', '')
39-
const _item = ({ link, text, ...etc }) => ({
40-
text: text.replace(/<!--.*-->/, ''), ...(link ? { link: _absolute(link) } : {}),
41-
...etc
42-
})
48+
const _item = ({ link, text, ...etc }) => {
49+
const item = {
50+
text: text.replace(/<!--.*-->/, ''), ...(link ? { link: _absolute(link) } : {}),
51+
...etc
52+
}
53+
dynamicItems(item)
54+
return item
55+
}
4356

4457
/**
4558
* Use sidebar as nav

.vitepress/theme/components/Alpha.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<template>
2+
<Badge
3+
type="warning"
4+
text="alpha"
5+
title="Alpha features are experimental. They may never be generally available. If released subsequently, the APIs and behavior might change."
6+
/>
7+
</template>

.vitepress/theme/components/Beta.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<template>
2+
<Badge
3+
type="warning"
4+
text="beta"
5+
title="Beta features are planned to be generally available in subsequent releases, however, APIs and their behavior are not final and may change in the general release."
6+
/>
7+
</template>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<template>
2+
<Badge
3+
type="warning"
4+
text="concept"
5+
title="Concept features are ideas for potential future enhancements and an opportunity for you to give feedback. This is not a commitment to implement the feature though."
6+
/>
7+
</template>
108 KB
Binary file not shown.

.vitepress/theme/components/Since.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<template>
2+
<Badge type="info" :text="`requires ${of} ${version}`" :title="`This feature is only available as of ${of} version ${version} or higher.`" />
3+
</template>
4+
5+
<script setup lang="ts">
6+
defineProps(['version', 'of'])
7+
</script>

.vitepress/theme/custom.scss

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
--vp-local-search-highlight-bg: mark;
4040
--vp-local-search-highlight-text: black;
4141

42-
--vp-sidebar-width: 290px;
42+
--vp-sidebar-width: 300px;
4343
--vp-nav-height: 44px;
4444

4545
/* inverts image colors in dark mode */
@@ -112,27 +112,38 @@ main {
112112

113113
pre.log {
114114
font-size: var(--vp-code-font-size);
115-
line-height: 1.4em;
116-
font-style: italic;
117-
padding: 20px !important;
118-
border-radius: 8px;
119-
overflow: hidden;
115+
line-height: var(--vp-code-line-height);
116+
padding: 12px 22px !important;
117+
overflow-x: auto;
118+
margin: 16px -24px; // same negative margin technique is used in Vitepress
119+
@media (min-width: 640px) {
120+
margin: unset;
121+
border-radius: 8px;
122+
}
120123
span {
121124
&.cmd {
122-
color: #FFCB6B;
125+
color: #6F42C1;
126+
.dark & { color: #B392F0; }
127+
}
128+
&.args {
129+
color: #032F62;
130+
.dark & { color: #9ECBFF; }
123131
}
124132
&.flags {
125-
color: #C3E88D;
133+
color: #005CC5;
134+
.dark & { color: #79B8FF; }
126135
}
127136
&.cwd {
128137
color: #777;
138+
.dark & { color: #999; }
129139
}
130140
&.livereload {
131141
color: #FDEC87
132142
}
133143
}
134144
em {
135145
color: #00ab00e0;
146+
font-style: normal;
136147
}
137148
b {
138149
color: #ee0000e0;

0 commit comments

Comments
 (0)