@sap/cds 6.8.2 → 6.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/bin/build/util.js +1 -1
- package/bin/version.js +3 -0
- package/lib/req/request.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
- The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|
5
5
|
- This project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
+
## Version 6.8.3 - 2023-06-13
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- `cds build` no longer reports CAP Java Classic runtime usage by mistake.
|
|
12
|
+
- `cds version` prints the local `@sap/cds` version, even if called from a different `@sap/cds` installation.
|
|
13
|
+
- User challenges handling in case of `cds.env.auth.restrict_all_services: false`
|
|
14
|
+
|
|
7
15
|
## Version 6.8.2 - 2023-05-26
|
|
8
16
|
|
|
9
17
|
### Fixed
|
package/bin/build/util.js
CHANGED
|
@@ -88,7 +88,7 @@ async function isOldJavaStack(dirs) {
|
|
|
88
88
|
if (files.length > 0) {
|
|
89
89
|
return (await Promise.all(files.map(async file => {
|
|
90
90
|
const content = await fs.promises.readFile(file, 'utf-8')
|
|
91
|
-
return content && /<groupId>\s*com\.sap\.cloud\.servicesdk
|
|
91
|
+
return content && /<groupId>\s*com\.sap\.cloud\.servicesdk\.prov\s*<\/groupId>/.test(content)
|
|
92
92
|
}))).some(result => result)
|
|
93
93
|
}
|
|
94
94
|
return false
|
package/bin/version.js
CHANGED
|
@@ -57,6 +57,7 @@ function list_versions(args, options) { //NOSONAR
|
|
|
57
57
|
function info(o) {
|
|
58
58
|
const { npmGlobalModules } = require('./utils/modules');
|
|
59
59
|
const main = _findPackage (require.main.filename)
|
|
60
|
+
const sap_cds = require.resolve('@sap/cds/package.json', {paths:[process.cwd(), __dirname]})
|
|
60
61
|
return {
|
|
61
62
|
// REVISIT: Why do we need all these different hard-coded ways, including proliferation of arguments?
|
|
62
63
|
..._versions4(main, {}, true), // usually sap/cds-dk or sap/cds
|
|
@@ -66,6 +67,7 @@ function info(o) {
|
|
|
66
67
|
..._versions4(process.cwd(), {}, null, o),
|
|
67
68
|
..._versions4('..', {}, null, o),
|
|
68
69
|
..._findMTX(),
|
|
70
|
+
'@sap/cds': require(sap_cds).version, // ensure effective sap/cds version is listed
|
|
69
71
|
'Node.js': process.version,
|
|
70
72
|
'home': __dirname.slice(0,-4)
|
|
71
73
|
}
|
|
@@ -84,6 +86,7 @@ function _versions4 (pkg_name, info, parent, o={}) {
|
|
|
84
86
|
}
|
|
85
87
|
const pkg = require(path)
|
|
86
88
|
info[o.label || pkg.name] = pkg.version
|
|
89
|
+
// console.log(o.label || pkg.name, pkg.version, path)
|
|
87
90
|
if (!parent || o.all) for (let d in pkg.dependencies) { // recurse sap packages in dependencies...
|
|
88
91
|
if (!(d in info) && (d.startsWith('@sap/') || d.startsWith('@cap-js/'))) _versions4(d, info, pkg.name, o)
|
|
89
92
|
}
|
package/lib/req/request.js
CHANGED
|
@@ -127,7 +127,7 @@ class Request extends require('./event') {
|
|
|
127
127
|
warn (...args) { return this._messages.add (3, ...args) }
|
|
128
128
|
error (...args) { return this._errors.add (4, ...args) }
|
|
129
129
|
reject (...args) {
|
|
130
|
-
if (args[0] === 401 && this._.req?.login) return this._.req.login()
|
|
130
|
+
if (args[0] === 401 && this._.req?.login && !this._.req?.logIn) return this._.req.login()
|
|
131
131
|
let e = this.error(...args)
|
|
132
132
|
if (!e.stack) Error.captureStackTrace (e = Object.assign(new Error,e), this.reject)
|
|
133
133
|
throw e
|