Use new @cap-js-community/odata-v2-adapter

This commit is contained in:
Christian Georgi
2023-04-11 19:10:32 +02:00
committed by Christian Georgi
parent 59a200a6fe
commit e672fd1bed
3 changed files with 237 additions and 235 deletions

View File

@@ -4,7 +4,7 @@
"dependencies": {
"@capire/bookstore": "*",
"@sap/cds": ">=5",
"@sap/cds-odata-v2-adapter-proxy": "^1.9.0",
"@cap-js-community/odata-v2-adapter": "^1",
"express": "^4.17.1",
"passport": ">=0.4.1"
},

View File

@@ -1,6 +1,6 @@
// install OData v2 adapter
const cds = require("@sap/cds")
const proxy = require('@sap/cds-odata-v2-adapter-proxy')
const proxy = require('@cap-js-community/odata-v2-adapter')
const opts = global.it ? { target:'auto' } : {} // for tests, set 'auto' to detect port dynamically
cds.on('bootstrap', app => app.use(proxy(opts))) // install proxy
cds.log('cov2ap','silent') // suppress anoying log outpout, e.g. for `npm run mocha -- --reporter nyan`