@sap/cds 6.8.2 → 6.8.4

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 CHANGED
@@ -4,6 +4,20 @@
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.4 - 2023-06-14
8
+
9
+ ### Fixed
10
+
11
+ - `$metadata` requests for multitenant applications
12
+
13
+ ## Version 6.8.3 - 2023-06-13
14
+
15
+ ### Fixed
16
+
17
+ - `cds build` no longer reports CAP Java Classic runtime usage by mistake.
18
+ - `cds version` prints the local `@sap/cds` version, even if called from a different `@sap/cds` installation.
19
+ - User challenges handling in case of `cds.env.auth.restrict_all_services: false`
20
+
7
21
  ## Version 6.8.2 - 2023-05-26
8
22
 
9
23
  ### 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/.test(content) && !(/<groupId>\s*com\.sap\.cds\s*<\/groupId>/.test(content) && /<artifactId>\s*cds-/.test(content))
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
  }
@@ -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
@@ -22,7 +22,7 @@ const metadata = service => {
22
22
  const { 'cds.xt.ModelProviderService': mps } = cds.services
23
23
  let edmx = mps
24
24
  ? await mps.getEdmx({ tenant, model: service.model, service: service.definition.name, locale })
25
- : cds.mtx && cds.mtx.isExtended(tenant)
25
+ : cds.mtx && (await cds.mtx.isExtended(tenant))
26
26
  ? await cds.mtx.getEdmx(tenant, service.definition.name, locale)
27
27
  : cds.localize(
28
28
  service.model,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds",
3
- "version": "6.8.2",
3
+ "version": "6.8.4",
4
4
  "description": "SAP Cloud Application Programming Model - CDS for Node.js",
5
5
  "homepage": "https://cap.cloud.sap/",
6
6
  "keywords": [