@sap/cds-dk 9.7.1 → 9.7.2
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 +10 -0
- package/lib/build/provider/mtx-sidecar/index.js +1 -1
- package/lib/build/util.js +18 -8
- package/lib/init/template/approuter/files/values.yaml.hbs +1 -0
- package/lib/init/template/initial/files/readme.md +2 -4
- package/lib/init/template/kyma/index.js +6 -2
- package/lib/util/cf.js +1 -1
- package/npm-shrinkwrap.json +16 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,16 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
8
8
|
|
|
9
|
+
## Version 9.7.2 - tbd
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- `cds build --for mtx-sidecar` correctly resolves `@source` in custom MTX sidecar services.
|
|
14
|
+
- `cds build` now utilises caching for workspace resolution, which will speed up build times for projects with many workspaces.
|
|
15
|
+
- `cds add` commands don't augment Helm Charts if not managed by CAP.
|
|
16
|
+
- `cds add approuter` for Kyma configures token exchange for managed approuter scenarios.
|
|
17
|
+
- `cds bind` reports additional error information while accessing Cloud Foundry services.
|
|
18
|
+
|
|
9
19
|
## Version 9.7.1 - 2026-02-05
|
|
10
20
|
|
|
11
21
|
### Fixed
|
|
@@ -148,7 +148,7 @@ module.exports = class extends require('../nodejs') {
|
|
|
148
148
|
// existing compilation error messages that have been downgraded to warnings
|
|
149
149
|
// see cap/issues/issues/16401#issuecomment-7205397
|
|
150
150
|
const messages = []
|
|
151
|
-
const model = cds.load(modelFilePaths, { sync: true, messages })
|
|
151
|
+
const model = cds.load(modelFilePaths, { sync: true, messages, cwd: this.task.src })
|
|
152
152
|
messages.forEach(msg => this.messages.push(msg))
|
|
153
153
|
return model
|
|
154
154
|
}
|
package/lib/build/util.js
CHANGED
|
@@ -326,33 +326,43 @@ function filterFeaturePaths(model, modelPaths) {
|
|
|
326
326
|
return sources
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
+
// spawning npm ls is expensive. In projects with many workspaces,
|
|
330
|
+
// this can significantly increase build time, despite the result being the same.
|
|
331
|
+
const _cachedWsRoots = new Map()
|
|
329
332
|
/**
|
|
330
333
|
* Read installed npm workspaces using 'npm ls -ws --json'.
|
|
331
334
|
* There is currently no easier way for this, as workspaces
|
|
332
|
-
* could contain globs. Glob resolution will be supported
|
|
335
|
+
* could contain globs. Glob resolution will be supported.
|
|
336
|
+
* The result is cached by workspace root!
|
|
333
337
|
* natively in the future (fs.glob is in experimental state as of Node23).
|
|
334
338
|
* @param {import('fs').PathLike} wsRoot - the root directory of the workspace
|
|
335
339
|
* @returns {Promise<string[]>} list of package paths, or an empty array if either
|
|
336
340
|
* no workspaces are defined or have not been installed.
|
|
337
341
|
*/
|
|
338
342
|
async function _execNpmWs(wsRoot) {
|
|
343
|
+
const cached = _cachedWsRoots.get(wsRoot)
|
|
344
|
+
if (cached) {
|
|
345
|
+
return cached
|
|
346
|
+
}
|
|
347
|
+
/** @type {string[]} */
|
|
348
|
+
let result = []
|
|
339
349
|
try {
|
|
340
350
|
const cmdLine = 'npm ls -ws --json'
|
|
341
351
|
DEBUG?.(`execute ${cmdLine}`)
|
|
342
352
|
// @ts-expect-error - TODO: shell should be a string. But can probably be removed altogether?
|
|
343
|
-
const
|
|
344
|
-
|
|
345
|
-
const jsonResult = JSON.parse(result.stdout)
|
|
353
|
+
const { stdout } = await execAsync(cmdLine, { shell: IS_WIN, stdio: ['inherit', 'pipe', 'inherit'], cwd: wsRoot })
|
|
354
|
+
const jsonResult = JSON.parse(stdout)
|
|
346
355
|
if (jsonResult.dependencies) {
|
|
347
|
-
|
|
356
|
+
result = Object.keys(jsonResult.dependencies)
|
|
348
357
|
} else if (jsonResult.name) {
|
|
349
|
-
|
|
358
|
+
result = [jsonResult.name]
|
|
350
359
|
}
|
|
351
360
|
} catch (/** @type {{stderr: string}} */e) {
|
|
352
|
-
e.stderr = e.stderr?.replace(/npm ERR! /
|
|
361
|
+
e.stderr = e.stderr?.replace(/npm ERR! /gi, '')
|
|
353
362
|
throw e
|
|
354
363
|
}
|
|
355
|
-
|
|
364
|
+
_cachedWsRoots.set(wsRoot, result)
|
|
365
|
+
return result
|
|
356
366
|
}
|
|
357
367
|
|
|
358
368
|
function _validateWsDependencies(wsRoot, dependencies, devDependencies) {
|
|
@@ -11,14 +11,12 @@ File or Folder | Purpose
|
|
|
11
11
|
`srv/` | your service models and code go here
|
|
12
12
|
`readme.md` | this getting started guide
|
|
13
13
|
|
|
14
|
-
|
|
15
14
|
## Next Steps
|
|
16
15
|
|
|
17
16
|
- Open a new terminal and run `cds watch`
|
|
18
17
|
- (in VS Code simply choose _**Terminal** > Run Task > cds watch_)
|
|
19
|
-
- Start
|
|
20
|
-
|
|
18
|
+
- Start with your domain model, in a CDS file in `db/`
|
|
21
19
|
|
|
22
20
|
## Learn More
|
|
23
21
|
|
|
24
|
-
Learn more
|
|
22
|
+
Learn more at <https://cap.cloud.sap>.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { join } = require('path')
|
|
2
2
|
const cds = require('../../../cds')
|
|
3
|
-
const { exists, rimraf, copy, yaml } = cds.utils
|
|
3
|
+
const { exists, rimraf, copy, yaml, fs } = cds.utils
|
|
4
4
|
const { readProject } = require('../../projectReader')
|
|
5
5
|
const { merge } = require('../../merge')
|
|
6
6
|
const { ask4 } = require('../../../util/question')
|
|
@@ -21,7 +21,11 @@ module.exports = class KymaTemplate extends require('../../plugin') {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
static hasInProduction() {
|
|
24
|
-
|
|
24
|
+
if (exists('chart/Chart.yaml')) {
|
|
25
|
+
const chartYaml = yaml.parse(fs.readFileSync(join(cds.root, 'chart', 'Chart.yaml'), 'utf8'))
|
|
26
|
+
return chartYaml.annotations?.["app.kubernetes.io/managed-by"] === 'cds-dk/helm'
|
|
27
|
+
}
|
|
28
|
+
return false
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
async canRun() {
|
package/lib/util/cf.js
CHANGED
|
@@ -101,7 +101,7 @@ module.exports = new class CfUtil {
|
|
|
101
101
|
if (err.response?.data?.errors[0]) {
|
|
102
102
|
throw JSON.stringify(err.response.data.errors[0], null, 4);
|
|
103
103
|
}
|
|
104
|
-
throw err.message
|
|
104
|
+
throw `${err.name} ${err.code} ${err.status||''}: ${err.message} while accessing ${url}`;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/cds-dk",
|
|
3
|
-
"version": "9.7.
|
|
3
|
+
"version": "9.7.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@sap/cds-dk",
|
|
9
|
-
"version": "9.7.
|
|
9
|
+
"version": "9.7.2",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@cap-js/asyncapi": "^1.0.0",
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
"node_modules/@sap/cds": {
|
|
92
|
-
"version": "9.7.
|
|
93
|
-
"integrity": "sha512-
|
|
92
|
+
"version": "9.7.1",
|
|
93
|
+
"integrity": "sha512-DCMCB3FiQoWVeHQulSFbZMkmuoW0z6tJRP85Xv2Bd2Cl2J2I4+LQD1GKDiUXrlJXm0CtKsFQcrsxcQmUeO5uXw==",
|
|
94
94
|
"license": "SEE LICENSE IN LICENSE",
|
|
95
95
|
"dependencies": {
|
|
96
96
|
"@sap/cds-compiler": "^6.4",
|
|
@@ -116,8 +116,8 @@
|
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
"node_modules/@sap/cds-compiler": {
|
|
119
|
-
"version": "6.7.
|
|
120
|
-
"integrity": "sha512-
|
|
119
|
+
"version": "6.7.3",
|
|
120
|
+
"integrity": "sha512-MlKvr3b7meSD4UsMr/u5eXUS0q226MyHg/+x5xKOxxdqhh1yGGnJD0lj0USqo4S3rggFfCSgWypTAjD7VLZdUw==",
|
|
121
121
|
"license": "SEE LICENSE IN LICENSE",
|
|
122
122
|
"bin": {
|
|
123
123
|
"cdsc": "bin/cdsc.js",
|
|
@@ -137,8 +137,8 @@
|
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
139
|
"node_modules/@sap/cds-mtxs": {
|
|
140
|
-
"version": "3.7.
|
|
141
|
-
"integrity": "sha512-
|
|
140
|
+
"version": "3.7.1",
|
|
141
|
+
"integrity": "sha512-yMsD6C4UAPozvm4TNUojAFYYC13au45hamr+S7cXT7K9ufYl7zzLGQ3Z/bE91D57z0IfryCXMsxk437P3cEJuA==",
|
|
142
142
|
"license": "SEE LICENSE IN LICENSE",
|
|
143
143
|
"dependencies": {
|
|
144
144
|
"@sap/hdi-deploy": "^5"
|
|
@@ -251,12 +251,12 @@
|
|
|
251
251
|
"license": "MIT"
|
|
252
252
|
},
|
|
253
253
|
"node_modules/axios": {
|
|
254
|
-
"version": "1.13.
|
|
255
|
-
"integrity": "sha512-
|
|
254
|
+
"version": "1.13.5",
|
|
255
|
+
"integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==",
|
|
256
256
|
"license": "MIT",
|
|
257
257
|
"dependencies": {
|
|
258
|
-
"follow-redirects": "^1.15.
|
|
259
|
-
"form-data": "^4.0.
|
|
258
|
+
"follow-redirects": "^1.15.11",
|
|
259
|
+
"form-data": "^4.0.5",
|
|
260
260
|
"proxy-from-env": "^1.1.0"
|
|
261
261
|
}
|
|
262
262
|
},
|
|
@@ -1334,8 +1334,8 @@
|
|
|
1334
1334
|
}
|
|
1335
1335
|
},
|
|
1336
1336
|
"node_modules/qs": {
|
|
1337
|
-
"version": "6.14.
|
|
1338
|
-
"integrity": "sha512-
|
|
1337
|
+
"version": "6.14.2",
|
|
1338
|
+
"integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==",
|
|
1339
1339
|
"license": "BSD-3-Clause",
|
|
1340
1340
|
"dependencies": {
|
|
1341
1341
|
"side-channel": "^1.1.0"
|
|
@@ -1447,8 +1447,8 @@
|
|
|
1447
1447
|
}
|
|
1448
1448
|
},
|
|
1449
1449
|
"node_modules/semver": {
|
|
1450
|
-
"version": "7.7.
|
|
1451
|
-
"integrity": "sha512-
|
|
1450
|
+
"version": "7.7.4",
|
|
1451
|
+
"integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
|
|
1452
1452
|
"devOptional": true,
|
|
1453
1453
|
"license": "ISC",
|
|
1454
1454
|
"bin": {
|