Add cds-types (#761)

Also add Node 22 to CI
This commit is contained in:
Christian Georgi
2024-09-16 14:52:43 +02:00
committed by GitHub
parent 2f91f7d2d4
commit eb9a5ed971
4 changed files with 3306 additions and 3134 deletions

View File

@@ -15,7 +15,7 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: [20.x, 18.x] node-version: [22.x, 20.x, 18.x]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -33,6 +33,6 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: 22.x
- run: npm ci - run: npm ci
- run: npm run lint - run: npm run lint

View File

@@ -49,6 +49,7 @@ class DataService extends cds.ApplicationService { init(){
module.exports = { DataService } module.exports = { DataService }
/** @returns {cds.Service} */
function findDataSource(dataSourceName, entityName) { function findDataSource(dataSourceName, entityName) {
for (let srv of Object.values(cds.services)) { // all connected services for (let srv of Object.values(cds.services)) { // all connected services
if (!srv.name) continue // FIXME intermediate/pending in cds.services ? if (!srv.name) continue // FIXME intermediate/pending in cds.services ?

6370
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -5,46 +5,47 @@
"repository": "https://github.com/sap-samples/cloud-cap-samples.git", "repository": "https://github.com/sap-samples/cloud-cap-samples.git",
"author": "daniel.hutzel@sap.com", "author": "daniel.hutzel@sap.com",
"dependencies": { "dependencies": {
"@sap/cds": ">=8" "@sap/cds": ">=8"
}, },
"workspaces": [ "workspaces": [
"./bookshop", "./bookshop",
"./bookstore", "./bookstore",
"./common", "./common",
"./data-viewer", "./data-viewer",
"./fiori", "./fiori",
"./hello", "./hello",
"./media", "./media",
"./orders", "./orders",
"./loggers", "./loggers",
"./reviews" "./reviews"
], ],
"devDependencies": { "devDependencies": {
"@cap-js/sqlite": "^1", "@cap-js/cds-types": "^0",
"axios": "^1", "@cap-js/sqlite": "^1",
"chai": "^4.3.4", "axios": "^1",
"chai-as-promised": "^7.1.1", "chai": "^4.3.4",
"chai-subset": "^1.6.0", "chai-as-promised": "^7.1.1",
"eslint": "^9", "chai-subset": "^1.6.0",
"semver": "^7" "eslint": "^9",
"semver": "^7"
}, },
"scripts": { "scripts": {
"bookshop": "cds watch bookshop", "bookshop": "cds watch bookshop",
"start": "cds watch fiori", "start": "cds watch fiori",
"fiori": "cds watch fiori", "fiori": "cds watch fiori",
"hello": "cds watch hello", "hello": "cds watch hello",
"media": "cds watch media", "media": "cds watch media",
"lint": "eslint", "lint": "eslint",
"test": "npx jest --silent", "test": "npx jest --silent",
"jest": "npx jest --silent", "jest": "npx jest --silent",
"mocha": "CDS_TEST_SILENT=y npx mocha", "mocha": "CDS_TEST_SILENT=y npx mocha",
"test:hello": "cd hello && npm test" "test:hello": "cd hello && npm test"
}, },
"mocha": { "mocha": {
"recursive": true, "recursive": true,
"parallel": true, "parallel": true,
"timeout": 6666 "timeout": 6666
}, },
"license": "SEE LICENSE IN LICENSE", "license": "SEE LICENSE IN LICENSE",
"private": true "private": true
} }