@sap/cds-dk 9.8.1 → 9.8.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 CHANGED
@@ -6,6 +6,18 @@ 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.8.2 - 2026-03-25
10
+
11
+ ### Added
12
+
13
+ - `cds init` now removes the `.vscode` folder when creating projects in SAP Business Application Studio in order to restore compatibility with other project generators. This is a temporary solution likely to be reverted in cds-dk 10.
14
+
15
+ ### Fixed
16
+
17
+ - `cds add workzone` for Kyma correctly adds the `html5-apps-repo-runtime` to its `Chart.yaml`.
18
+ - `cds add app-front` in combination with `cds add ias` correctly includes all `IASDependencyName` settings.
19
+ - `cds build` has improved performance in some scenarios.
20
+
9
21
  ## Version 9.8.1 - 2026-03-13
10
22
 
11
23
  ### Fixed
@@ -227,14 +227,7 @@ module.exports = class Plugin {
227
227
  DEBUG?.(`model: ${relativePaths(cds.root, files).join(", ")}`)
228
228
 
229
229
  const options = { ...this.options(), cwd: cds.root }
230
-
231
- this.context._modelCache ??= new Map()
232
- const cacheKey = JSON.stringify({ files, options })
233
- if (!this.context._modelCache.has(cacheKey)) {
234
- const _load = cds.load(files, options)
235
- this.context._modelCache.set(cacheKey, _load)
236
- }
237
- return this.context._modelCache.get(cacheKey)
230
+ return cds.load(files, options)
238
231
  }
239
232
 
240
233
  /**
@@ -253,13 +246,7 @@ module.exports = class Plugin {
253
246
  }
254
247
 
255
248
  const options = this.options()
256
- this.context._modelCache ??= new Map()
257
- const cacheKey = JSON.stringify({ files: sources.base, options })
258
- if (!this.context._modelCache.has(cacheKey)) {
259
- const _load = cds.load(sources.base, options)
260
- this.context._modelCache.set(cacheKey, _load)
261
- }
262
- return this.context._modelCache.get(cacheKey)
249
+ return cds.load(sources.base, options)
263
250
  }
264
251
 
265
252
  options() {
@@ -6,12 +6,6 @@ modules:
6
6
  type: {{language}}
7
7
  path: {{& srvPath}}
8
8
 
9
- - name: {{appName}}
10
- type: approuter.nodejs
11
- path: {{& approuterPath}}
12
- requires:
13
- - name: {{appName}}-html5-runtime
14
-
15
9
  - name: {{appName}}-app-deployer
16
10
  type: com.sap.application.content
17
11
  path: {{#isNodejs}}gen{{/isNodejs}}{{#isJava}}.{{/isJava}}
@@ -25,19 +19,22 @@ modules:
25
19
  target-path: {{#isNodejs}}{{& appPath }}{{/isNodejs}}{{#isJava}}resources{{/isJava}}
26
20
  {{/apps}}
27
21
  requires:
28
- - name: srv-api
29
22
  {{#hasXsuaa}}
30
23
  - name: {{appName}}-auth
31
24
  {{/hasXsuaa}}
25
+ - name: srv-api
32
26
  - name: {{appName}}-app-front
33
27
  parameters:
34
- content-target: true
28
+ content-target: true{{#hasIas}}
29
+ config:
30
+ IASDependencyName: {{appName}}-ias-api{{/hasIas}}
35
31
  parameters:
36
32
  config:
37
33
  destinations:
38
34
  - name: srv-api
39
35
  url: ~{srv-api/srv-url}
40
- forwardAuthToken: true
36
+ forwardAuthToken: true{{#hasIas}}
37
+ IASDependencyName: {{appName}}-ias-api{{/hasIas}}
41
38
  {{#hasUI5}}
42
39
  - name: ui5
43
40
  url: https://ui5.sap.com
@@ -1,7 +1,7 @@
1
- const { join } = require('path')
1
+ const { join } = require('node:path')
2
2
  const { readProject } = require('../../projectReader')
3
3
  const { merge } = require('../../merge')
4
- const { srv4, appDeployer, appFront } = require('../../registries/mta')
4
+ const { srv4, appDeployer, appFront, xsuaa } = require('../../registries/mta')
5
5
  const { odataApi } = require('../../registries/xs-app')
6
6
  const { renderAndCopy } = require('../../template')
7
7
  const { exists } = require('../../../cds').utils
@@ -45,7 +45,10 @@ module.exports = class extends require('../../plugin') {
45
45
 
46
46
  async combine() {
47
47
  const project = readProject()
48
- const { srvPath, appPath, addMta, apps } = project
48
+ const {
49
+ srvPath, appPath, apps,
50
+ hasMta, addMta, hasXsuaa, addSample, addApprouter, addWorkzoneStandard, addXsuaa, addIas
51
+ } = project
49
52
 
50
53
  await Promise.all(apps.map(async ({ app }) => {
51
54
  project.app = app
@@ -59,21 +62,31 @@ module.exports = class extends require('../../plugin') {
59
62
  // await merge({ cds: { requires: { 'app-front':true } } }).into('mtx/sidecar/package.json')
60
63
  // }
61
64
 
62
- if (addMta) {
65
+ const affected = addXsuaa || addApprouter || addWorkzoneStandard || addSample || addIas
66
+ if (addMta || affected && hasMta) {
63
67
  const srv = srv4(srvPath)
64
68
  project.apps = apps
65
- const appModules = project.apps.map(app => ({
66
- in: 'modules',
67
- where: { type: 'html5', path: `${appPath}${app.app}` }
68
- }))
69
- const additions = [srv, appDeployer, appFront, ...appModules]
70
69
  const relationships = [{
71
70
  insert: [appFront, 'name'],
72
71
  into: [appDeployer, 'requires', 'name'],
73
72
  }]
73
+ const appModules = []
74
+ for (const { app } of project.apps) {
75
+ const html5App = { in: 'modules', where: { type: 'html5', path: `${appPath}${app}` } }
76
+ relationships.push({
77
+ insert: [html5App],
78
+ into: [appDeployer, 'build-parameters.requires'],
79
+ })
80
+ }
81
+ if (hasXsuaa) {
82
+ relationships.push({
83
+ insert: [xsuaa, 'name'],
84
+ into: [appDeployer, 'requires']
85
+ })
86
+ }
74
87
  await merge(__dirname, 'files/mta.yaml.hbs').into('mta.yaml', {
75
88
  with: project,
76
- additions,
89
+ additions: [srv, appDeployer, appFront, ...appModules],
77
90
  relationships
78
91
  })
79
92
  }
@@ -24,6 +24,15 @@ modules:
24
24
  - name: {{appName}}-app-deployer
25
25
  type: com.sap.application.content
26
26
  path: {{#isNodejs}}gen{{/isNodejs}}{{#isJava}}.{{/isJava}}
27
+ build-parameters:
28
+ build-result: {{#isNodejs}}{{& appPath }}{{/isNodejs}}{{#isJava}}resources{{/isJava}}
29
+ requires:
30
+ {{#apps}}
31
+ - name: {{strippedAppName}}{{strippedApp}}
32
+ artifacts:
33
+ - {{app}}.zip
34
+ target-path: {{#isNodejs}}{{& appPath }}{{/isNodejs}}{{#isJava}}resources{{/isJava}}
35
+ {{/apps}}
27
36
  requires:
28
37
  {{#hasXsuaa}}
29
38
  - name: {{appName}}-auth
@@ -35,15 +44,6 @@ modules:
35
44
  config:
36
45
  HTML5Runtime_enabled: true{{#hasIas}}
37
46
  IASDependencyName: {{appName}}-ias-api{{/hasIas}}
38
- build-parameters:
39
- build-result: {{#isNodejs}}{{& appPath }}{{/isNodejs}}{{#isJava}}resources{{/isJava}}
40
- requires:
41
- {{#apps}}
42
- - name: {{strippedAppName}}{{strippedApp}}
43
- artifacts:
44
- - {{app}}.zip
45
- target-path: {{#isNodejs}}{{& appPath }}{{/isNodejs}}{{#isJava}}resources{{/isJava}}
46
- {{/apps}}
47
47
  {{#hasWorkzoneStandard}}
48
48
  {{#hasMultitenancy}}
49
49
  parameters:
@@ -0,0 +1,19 @@
1
+ node_modules/
2
+ target/
3
+ _out/
4
+ gen/
5
+
6
+ .cdsrc-private.json
7
+ default-*.json
8
+ *.sqlite
9
+
10
+ # MTA
11
+ mta_archives/
12
+ *_mta_build_tmp
13
+ *.mtar
14
+
15
+ # Other
16
+ .DS_Store
17
+
18
+ # @cap-js/cds-typer
19
+ @cds-models
@@ -1,7 +1,7 @@
1
1
  const { join } = require('path')
2
2
  const cds = require('../../../cds')
3
- const { mkdirp, path } = cds.utils
4
- const { env4 } = require('../../projectReader')
3
+ const { mkdirp, path, rimraf } = cds.utils
4
+ const { env4, readProject } = require('../../projectReader')
5
5
  const { renderAndCopy } = require('../../template')
6
6
 
7
7
  module.exports = class extends require('../../plugin') {
@@ -10,6 +10,13 @@ module.exports = class extends require('../../plugin') {
10
10
  const { db, srv, app } = env4('production').folders
11
11
  await renderAndCopy(join(__dirname, 'files'), cds.root, { projectName: path.basename(cds.root) })
12
12
  await Promise.all([db, srv, app].map(p => mkdirp(p)))
13
- }
14
13
 
14
+ // cds10: remove
15
+ // Delete .vscode folder if running in BAS
16
+ const { isBas } = readProject()
17
+ if (isBas) {
18
+ const vscodeFolder = join(cds.root, '.vscode')
19
+ await rimraf(vscodeFolder)
20
+ }
21
+ }
15
22
  }
@@ -81,17 +81,17 @@ module.exports = class KymaTemplate extends require('../../plugin') {
81
81
  async combine() {
82
82
  // REVISIT: This must be moved to the respective plugins
83
83
  const {
84
- addHana, addMultitenancy, addXsuaa,
85
- addApprouter, addIas, addAms, hasXsuaa, hasMultitenancy,
86
- addHtml5Repo, hasHtml5Repo,
84
+ addHana, addMultitenancy, addXsuaa, hasApprouter,
85
+ addApprouter, addIas, addAms, hasXsuaa, hasMultitenancy, addWorkzoneStandard,
86
+ addHtml5Repo, hasHtml5Repo
87
87
  } = readProject()
88
88
 
89
- if (addHtml5Repo || addApprouter && hasHtml5Repo) {
89
+ if (addHtml5Repo || addWorkzoneStandard || addApprouter && hasHtml5Repo) {
90
90
  if (addHtml5Repo) {
91
91
  await KymaTemplate.mergeDependency('service-instance', 'html5-apps-repo-host')
92
92
  await KymaTemplate.mergeDependency('content-deployment', 'html5-apps-deployer')
93
93
  }
94
- if (addApprouter) {
94
+ if (hasApprouter && hasHtml5Repo) {
95
95
  await KymaTemplate.mergeDependency('service-instance', 'html5-apps-repo-runtime')
96
96
  }
97
97
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "9.8.1",
3
+ "version": "9.8.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sap/cds-dk",
9
- "version": "9.8.1",
9
+ "version": "9.8.2",
10
10
  "license": "SEE LICENSE IN LICENSE",
11
11
  "dependencies": {
12
12
  "@cap-js/asyncapi": "^1.0.0",
@@ -53,8 +53,8 @@
53
53
  }
54
54
  },
55
55
  "node_modules/@cap-js/openapi": {
56
- "version": "1.3.1",
57
- "integrity": "sha512-2QqqZlOxfvp/DDmGgTdwbBAAMjaPrrdPCbNC4+z6wjn2jXXk40j0XX7DHNnF4BU8R9LFxaUCHt2x8/9PzE83uA==",
56
+ "version": "1.4.0",
57
+ "integrity": "sha512-/LRSwn4SDxAi3qKwl09zoOhEVGaPGlYOPz/0S3UBnaMJVvaLyPiKbbaOtOnrrgulUX5OXt+ujPIQznOsbTzuAw==",
58
58
  "license": "Apache-2.0",
59
59
  "dependencies": {
60
60
  "pluralize": "^8.0.0"
@@ -103,8 +103,8 @@
103
103
  }
104
104
  },
105
105
  "node_modules/@sap/cds": {
106
- "version": "9.8.2",
107
- "integrity": "sha512-B85qUoUCVHN8gqHdD4nY+0LM1hEGGllEqWnMxsIBijBv3KXB4tOkf/krC8POieKZGMFRHylAcW1fAYVgbLqppw==",
106
+ "version": "9.8.3",
107
+ "integrity": "sha512-up/kNVCZK8bOTyye1QN2BjMpH+IgcdyhT3U9mS3TqkpmjNE2JXq8Qz1iNAN+nYcXRWJ1XAUNpgebLfuh/49MGQ==",
108
108
  "license": "SEE LICENSE IN LICENSE",
109
109
  "dependencies": {
110
110
  "@sap/cds-compiler": "^6.4",
@@ -151,8 +151,8 @@
151
151
  }
152
152
  },
153
153
  "node_modules/@sap/cds-mtxs": {
154
- "version": "3.8.0",
155
- "integrity": "sha512-8P/CKQbdbKH/1ZmgrRWiReXFb9MjLf/TjEH/MrbiJEGWCIv/bTKL6nNb0BIcBa7HQhekVqapa/cwx241NEnAVQ==",
154
+ "version": "3.8.1",
155
+ "integrity": "sha512-FUm1of08WsZ1O3eur7OGj7ZYp9Gy3RuYEGBZK+zosSPyJ3QrBhBzKwYvbh2DJdbv3P/xuk46NGg5yz914qZxrw==",
156
156
  "license": "SEE LICENSE IN LICENSE",
157
157
  "dependencies": {
158
158
  "@sap/hdi-deploy": "^5"
@@ -295,8 +295,8 @@
295
295
  "optional": true
296
296
  },
297
297
  "node_modules/better-sqlite3": {
298
- "version": "12.6.2",
299
- "integrity": "sha512-8VYKM3MjCa9WcaSAI3hzwhmyHVlH8tiGFwf0RlTsZPWJ1I5MkzjiudCo4KC4DxOaL/53A5B1sI/IbldNFDbsKA==",
298
+ "version": "12.8.0",
299
+ "integrity": "sha512-RxD2Vd96sQDjQr20kdP+F+dK/1OUNiVOl200vKBZY8u0vTwysfolF6Hq+3ZK2+h8My9YvZhHsF+RSGZW2VYrPQ==",
300
300
  "hasInstallScript": true,
301
301
  "license": "MIT",
302
302
  "optional": true,
@@ -1125,8 +1125,8 @@
1125
1125
  }
1126
1126
  },
1127
1127
  "node_modules/micromatch/node_modules/picomatch": {
1128
- "version": "2.3.1",
1129
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
1128
+ "version": "2.3.2",
1129
+ "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
1130
1130
  "license": "MIT",
1131
1131
  "engines": {
1132
1132
  "node": ">=8.6"
@@ -1217,8 +1217,8 @@
1217
1217
  "license": "MIT"
1218
1218
  },
1219
1219
  "node_modules/node-abi": {
1220
- "version": "3.88.0",
1221
- "integrity": "sha512-At6b4UqIEVudaqPsXjmUO1r/N5BUr4yhDGs5PkBE8/oG5+TfLPhFechiskFsnT6Ql0VfUXbalUUCbfXxtj7K+w==",
1220
+ "version": "3.89.0",
1221
+ "integrity": "sha512-6u9UwL0HlAl21+agMN3YAMXcKByMqwGx+pq+P76vii5f7hTPtKDp08/H9py6DY+cfDw7kQNTGEj/rly3IgbNQA==",
1222
1222
  "license": "MIT",
1223
1223
  "optional": true,
1224
1224
  "dependencies": {
@@ -1454,8 +1454,8 @@
1454
1454
  "license": "MIT"
1455
1455
  },
1456
1456
  "node_modules/sax": {
1457
- "version": "1.5.0",
1458
- "integrity": "sha512-21IYA3Q5cQf089Z6tgaUTr7lDAyzoTPx5HRtbhsME8Udispad8dC/+sziTNugOEx54ilvatQ9YCzl4KQLPcRHA==",
1457
+ "version": "1.6.0",
1458
+ "integrity": "sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==",
1459
1459
  "license": "BlueOak-1.0.0",
1460
1460
  "engines": {
1461
1461
  "node": ">=11.0.0"
@@ -1798,8 +1798,8 @@
1798
1798
  "license": "ISC"
1799
1799
  },
1800
1800
  "node_modules/ws": {
1801
- "version": "8.19.0",
1802
- "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",
1801
+ "version": "8.20.0",
1802
+ "integrity": "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==",
1803
1803
  "license": "MIT",
1804
1804
  "engines": {
1805
1805
  "node": ">=10.0.0"
@@ -1829,8 +1829,8 @@
1829
1829
  }
1830
1830
  },
1831
1831
  "node_modules/yaml": {
1832
- "version": "2.8.2",
1833
- "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==",
1832
+ "version": "2.8.3",
1833
+ "integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==",
1834
1834
  "license": "ISC",
1835
1835
  "bin": {
1836
1836
  "yaml": "bin.mjs"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "9.8.1",
3
+ "version": "9.8.2",
4
4
  "description": "Command line client and development toolkit for the SAP Cloud Application Programming Model",
5
5
  "homepage": "https://cap.cloud.sap/",
6
6
  "keywords": [