@sap/cds-dk 8.9.1 → 8.9.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 +23 -0
- package/lib/bind/cf.js +2 -0
- package/lib/build/provider/hana/template/package.json +1 -1
- package/lib/build/provider/mtx-extension/index.js +2 -2
- package/lib/index.js +10 -1
- package/lib/init/constants.js +1 -1
- package/lib/init/template/destination/files/mta.yaml.hbs +1 -1
- package/lib/init/template/html5-repo/index.js +1 -1
- package/lib/init/template/pipeline/files/app-package.json.hbs +20 -0
- package/lib/init/template/pipeline/files/ui5-deploy.yaml.hbs +25 -0
- package/lib/init/template/pipeline/files/ui5.yaml.hbs +6 -0
- package/lib/init/template/pipeline/index.js +17 -1
- package/lib/init/template/workzone-standard/files/mta.yaml.hbs +1 -1
- package/lib/init/template/workzone-standard/files/xs-app.json.hbs +1 -1
- package/lib/init/template/workzone-standard/index.js +2 -2
- package/npm-shrinkwrap.json +23 -33
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,29 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
9
9
|
|
|
10
|
+
## Version 8.9.3 - 2025-04-24
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- `cds add workzone` uses the backend destination `srv-api` instead of `{{appName}}-srv-api` on Cloud Foundry.
|
|
15
|
+
- `cds init` uses latest Maven Java archetype version 3.9.1 for creating Java projects.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- `cds add pipeline` also creates UI5 resources if required.
|
|
20
|
+
|
|
21
|
+
## Version 8.9.2 - 2025-04-16
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- `cds bind` gives better error messages if the Cloud Foundry org or space are not found.
|
|
26
|
+
- `cds add html5-repo` works in combination with multitenancy when no app router or Work Zone is set up.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- The Node version in `gen/db/package.json` file generated by `cds build` is now `>=18`, matching to what `@sap/hdi-deploy` specifies.
|
|
31
|
+
- `cds` commands now fail if used in combination with the upcoming `@sap/cds` version 9.
|
|
32
|
+
|
|
10
33
|
## Version 8.9.1 - 2025-04-04
|
|
11
34
|
|
|
12
35
|
### Fixed
|
package/lib/bind/cf.js
CHANGED
|
@@ -41,7 +41,9 @@ module.exports = new class CFBind extends require('./plugin') {
|
|
|
41
41
|
if (org && space) {
|
|
42
42
|
// org and space can be overwritten by currently logged in org and space
|
|
43
43
|
const orgObj = await cf.org(org);
|
|
44
|
+
if (!orgObj) throw `org ${bold(org)} not found when resolving service instance ${bold(instance)} in ${bold(this.target.apiEndpoint)}`;
|
|
44
45
|
const spaceObj = await cf.space(orgObj.guid, space);
|
|
46
|
+
if (!spaceObj) throw `space ${bold(space)} not found in org ${bold(org)} when resolving service instance ${bold(instance)} in ${bold(this.target.apiEndpoint)}`;
|
|
45
47
|
spaceGuid = spaceObj.guid;
|
|
46
48
|
orgGuid = orgObj.guid;
|
|
47
49
|
} else {
|
|
@@ -124,8 +124,8 @@ class MtxExtensionBuildPlugin extends InternalBuildPlugin {
|
|
|
124
124
|
_linter() {
|
|
125
125
|
let linter
|
|
126
126
|
try {
|
|
127
|
-
// Make sure cds-mtxs APIs are loaded
|
|
128
|
-
linter = require('@sap/cds-mtxs').xt?.linter
|
|
127
|
+
// Make sure cds-mtxs APIs are loaded, from local mtxs preferrably
|
|
128
|
+
linter = require(require.resolve('@sap/cds-mtxs', { paths: [cds.root, __dirname] })).xt?.linter
|
|
129
129
|
if (!linter) {
|
|
130
130
|
this.pushMessage('MTXS linter cannot be loaded. Update of @sap/cds-dk and @sap/cds-mtxs modules required? Skipping extension model lint step.')
|
|
131
131
|
return null // too old mtxs
|
package/lib/index.js
CHANGED
|
@@ -39,7 +39,6 @@ const REQUIRED_CDS_MAJOR = 7, REQUIRED_CDS_MINOR = 2
|
|
|
39
39
|
const [major, minor] = cds.version.split('.').map(Number)
|
|
40
40
|
if (major < REQUIRED_CDS_MAJOR || major === REQUIRED_CDS_MAJOR && minor < REQUIRED_CDS_MINOR) {
|
|
41
41
|
const [dkVersion] = require('../package.json').version.split('.')
|
|
42
|
-
|
|
43
42
|
console.error(`
|
|
44
43
|
This application uses '@sap/cds' version ${major}.${minor}, which is not compatible with the installed '@sap/cds-dk' version ${dkVersion}.
|
|
45
44
|
You can either:
|
|
@@ -49,6 +48,16 @@ if (major < REQUIRED_CDS_MAJOR || major === REQUIRED_CDS_MAJOR && minor < REQUIR
|
|
|
49
48
|
process.exit(1)
|
|
50
49
|
}
|
|
51
50
|
|
|
51
|
+
const EXCLUDED_CDS_MAJOR = 9
|
|
52
|
+
if (major >= EXCLUDED_CDS_MAJOR) {
|
|
53
|
+
const [dkVersion] = require('../package.json').version.split('.')
|
|
54
|
+
console.error(`
|
|
55
|
+
This application uses '@sap/cds' version ${major}, which is not compatible with the installed '@sap/cds-dk' version ${dkVersion}.
|
|
56
|
+
Update '@sap/cds-dk' to the latest version.
|
|
57
|
+
`)
|
|
58
|
+
process.exit(1)
|
|
59
|
+
}
|
|
60
|
+
|
|
52
61
|
cds.extend (cds.constructor) .with (CdsDk)
|
|
53
62
|
|
|
54
63
|
class CdsDkAdd {
|
package/lib/init/constants.js
CHANGED
|
@@ -76,7 +76,7 @@ module.exports = class Html5RepoTemplate extends require('../../plugin') {
|
|
|
76
76
|
insert: [html5RepoHost, 'name'],
|
|
77
77
|
into: [appDeployer, 'requires', 'name'],
|
|
78
78
|
}]
|
|
79
|
-
if (hasApprouter || hasWorkzoneStandard) {
|
|
79
|
+
if (hasApprouter || hasWorkzoneStandard || hasMultitenancy) {
|
|
80
80
|
additions.push(html5Runtime)
|
|
81
81
|
}
|
|
82
82
|
if (hasApprouter) {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{app}}"{{#hasUI5}},
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "webapp/index.html",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "ui5 build preload --clean-dest --config ui5-deploy.yaml",
|
|
7
|
+
"build-local": "ui5 build preload --clean-dest",
|
|
8
|
+
"start": "ui5 serve"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@ui5/cli": "^4",
|
|
12
|
+
"ui5-task-zipper": "^3"
|
|
13
|
+
},
|
|
14
|
+
"ui5": {
|
|
15
|
+
"dependencies": [
|
|
16
|
+
"ui5-task-zipper"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
{{/hasUI5}}
|
|
20
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
# yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json
|
|
3
|
+
specVersion: '3.1'
|
|
4
|
+
metadata:
|
|
5
|
+
name: {{app}}
|
|
6
|
+
type: application
|
|
7
|
+
resources:
|
|
8
|
+
configuration:
|
|
9
|
+
propertiesFileSourceEncoding: UTF-8
|
|
10
|
+
builder:
|
|
11
|
+
resources:
|
|
12
|
+
excludes:
|
|
13
|
+
- "/test/**"
|
|
14
|
+
- "/localService/**"
|
|
15
|
+
customTasks:
|
|
16
|
+
- name: ui5-task-zipper
|
|
17
|
+
afterTask: generateVersionInfo
|
|
18
|
+
configuration:
|
|
19
|
+
archiveName: {{app}}
|
|
20
|
+
additionalFiles:
|
|
21
|
+
- xs-app.json
|
|
22
|
+
{{#isTypescript}}
|
|
23
|
+
- name: ui5-tooling-transpile-task
|
|
24
|
+
afterTask: replaceVersion
|
|
25
|
+
{{/isTypescript}}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
const { join } = require('path')
|
|
1
|
+
const { join } = require('path')
|
|
2
2
|
const cds = require('../../../cds')
|
|
3
3
|
const { exists, copy } = cds.utils
|
|
4
|
+
const { readProject } = require('../../projectReader')
|
|
5
|
+
const { merge } = require('../../merge')
|
|
4
6
|
const { URLS } = require('../../constants')
|
|
5
7
|
|
|
6
8
|
module.exports = class PipelineTemplate extends require('../../plugin') {
|
|
@@ -23,6 +25,20 @@ module.exports = class PipelineTemplate extends require('../../plugin') {
|
|
|
23
25
|
|
|
24
26
|
async run() {
|
|
25
27
|
await copy(join(__dirname, 'files')).to(cds.root)
|
|
28
|
+
|
|
29
|
+
const project = readProject()
|
|
30
|
+
const { apps, appPath, hasUI5 } = project
|
|
31
|
+
|
|
32
|
+
if (hasUI5) { // UI5 integration might be needed even without HTML5 repo
|
|
33
|
+
for (const { app } of apps) {
|
|
34
|
+
project.app = app
|
|
35
|
+
await Promise.all([
|
|
36
|
+
merge(__dirname, 'files/app-package.json.hbs').into(join(appPath, app, 'package.json'), { project }),
|
|
37
|
+
merge(__dirname, 'files/ui5.yaml.hbs').into(join(appPath, app, 'ui5.yaml'), { project }),
|
|
38
|
+
merge(__dirname, 'files/ui5-deploy.yaml.hbs').into(join(appPath, app, 'ui5-deploy.yaml'), { project })
|
|
39
|
+
])
|
|
40
|
+
}
|
|
41
|
+
}
|
|
26
42
|
}
|
|
27
43
|
|
|
28
44
|
async finalize() {
|
|
@@ -40,7 +40,7 @@ module.exports = class extends require('../../plugin') {
|
|
|
40
40
|
|
|
41
41
|
async combine() {
|
|
42
42
|
const project = readProject()
|
|
43
|
-
const { isJava, hasMta, srvPath, apps, appPath,
|
|
43
|
+
const { isJava, hasMta, srvPath, apps, appPath, appUIPaths, hasMultitenancy } = project
|
|
44
44
|
|
|
45
45
|
await Promise.all(appUIPaths.map(p => {
|
|
46
46
|
project.uiApp = p
|
|
@@ -51,7 +51,7 @@ module.exports = class extends require('../../plugin') {
|
|
|
51
51
|
const additions = [odataApi]
|
|
52
52
|
const overwrites = [{
|
|
53
53
|
item: [odataApi, 'destination'],
|
|
54
|
-
withValue:
|
|
54
|
+
withValue: `srv-api`
|
|
55
55
|
}]
|
|
56
56
|
project.app = app
|
|
57
57
|
await merge(__dirname, 'files/xs-app.json.hbs').into(join(appPath, app, 'xs-app.json'), { with: project, additions, overwrites })
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/cds-dk",
|
|
3
|
-
"version": "8.9.
|
|
3
|
+
"version": "8.9.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@sap/cds-dk",
|
|
9
|
-
"version": "8.9.
|
|
9
|
+
"version": "8.9.3",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@cap-js/asyncapi": "^1.0.0",
|
|
13
13
|
"@cap-js/openapi": "^1.0.0",
|
|
14
|
-
"@sap/cds": "
|
|
14
|
+
"@sap/cds": "^7 || ^8",
|
|
15
15
|
"@sap/cds-foss": "^5.0.0",
|
|
16
|
-
"@sap/cds-mtxs": "
|
|
17
|
-
"@sap/eslint-plugin-cds": "
|
|
16
|
+
"@sap/cds-mtxs": "^1.9.0 || ^2",
|
|
17
|
+
"@sap/eslint-plugin-cds": "^3.0.1",
|
|
18
18
|
"@sap/hdi-deploy": "^5",
|
|
19
19
|
"axios": "^1",
|
|
20
20
|
"eslint": "^9",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"node_modules/@cap-js/db-service": {
|
|
46
|
-
"version": "1.
|
|
46
|
+
"version": "1.20.0",
|
|
47
47
|
"license": "SEE LICENSE",
|
|
48
48
|
"optional": true,
|
|
49
49
|
"dependencies": {
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"node_modules/@cap-js/sqlite": {
|
|
67
|
-
"version": "1.
|
|
67
|
+
"version": "1.11.0",
|
|
68
68
|
"license": "SEE LICENSE",
|
|
69
69
|
"optional": true,
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@cap-js/db-service": "^1.
|
|
71
|
+
"@cap-js/db-service": "^1.20.0",
|
|
72
72
|
"better-sqlite3": "^11.0.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"node_modules/@eslint-community/eslint-utils": {
|
|
79
|
-
"version": "4.
|
|
79
|
+
"version": "4.6.1",
|
|
80
80
|
"license": "MIT",
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"eslint-visitor-keys": "^3.4.3"
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
"node_modules/@eslint/config-array": {
|
|
112
|
-
"version": "0.
|
|
112
|
+
"version": "0.20.0",
|
|
113
113
|
"license": "Apache-2.0",
|
|
114
114
|
"dependencies": {
|
|
115
115
|
"@eslint/object-schema": "^2.1.6",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
"node_modules/@eslint/core": {
|
|
131
|
-
"version": "0.
|
|
131
|
+
"version": "0.13.0",
|
|
132
132
|
"license": "Apache-2.0",
|
|
133
133
|
"dependencies": {
|
|
134
134
|
"@types/json-schema": "^7.0.15"
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
161
|
"node_modules/@eslint/js": {
|
|
162
|
-
"version": "9.
|
|
162
|
+
"version": "9.25.1",
|
|
163
163
|
"license": "MIT",
|
|
164
164
|
"engines": {
|
|
165
165
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
@@ -183,16 +183,6 @@
|
|
|
183
183
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
184
184
|
}
|
|
185
185
|
},
|
|
186
|
-
"node_modules/@eslint/plugin-kit/node_modules/@eslint/core": {
|
|
187
|
-
"version": "0.13.0",
|
|
188
|
-
"license": "Apache-2.0",
|
|
189
|
-
"dependencies": {
|
|
190
|
-
"@types/json-schema": "^7.0.15"
|
|
191
|
-
},
|
|
192
|
-
"engines": {
|
|
193
|
-
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
186
|
"node_modules/@humanfs/core": {
|
|
197
187
|
"version": "0.19.1",
|
|
198
188
|
"license": "Apache-2.0",
|
|
@@ -245,7 +235,7 @@
|
|
|
245
235
|
}
|
|
246
236
|
},
|
|
247
237
|
"node_modules/@sap/cds": {
|
|
248
|
-
"version": "8.9.
|
|
238
|
+
"version": "8.9.2",
|
|
249
239
|
"license": "SEE LICENSE IN LICENSE",
|
|
250
240
|
"dependencies": {
|
|
251
241
|
"@sap/cds-compiler": ">=5.1",
|
|
@@ -275,7 +265,7 @@
|
|
|
275
265
|
}
|
|
276
266
|
},
|
|
277
267
|
"node_modules/@sap/cds-compiler": {
|
|
278
|
-
"version": "5.9.
|
|
268
|
+
"version": "5.9.2",
|
|
279
269
|
"license": "SEE LICENSE IN LICENSE",
|
|
280
270
|
"dependencies": {
|
|
281
271
|
"antlr4": "4.9.3"
|
|
@@ -311,7 +301,7 @@
|
|
|
311
301
|
}
|
|
312
302
|
},
|
|
313
303
|
"node_modules/@sap/cds-mtxs": {
|
|
314
|
-
"version": "2.7.
|
|
304
|
+
"version": "2.7.2",
|
|
315
305
|
"license": "SEE LICENSE IN LICENSE",
|
|
316
306
|
"dependencies": {
|
|
317
307
|
"@sap/hdi-deploy": ">=4",
|
|
@@ -836,7 +826,7 @@
|
|
|
836
826
|
}
|
|
837
827
|
},
|
|
838
828
|
"node_modules/detect-libc": {
|
|
839
|
-
"version": "2.0.
|
|
829
|
+
"version": "2.0.4",
|
|
840
830
|
"license": "Apache-2.0",
|
|
841
831
|
"optional": true,
|
|
842
832
|
"engines": {
|
|
@@ -844,7 +834,7 @@
|
|
|
844
834
|
}
|
|
845
835
|
},
|
|
846
836
|
"node_modules/dotenv": {
|
|
847
|
-
"version": "16.
|
|
837
|
+
"version": "16.5.0",
|
|
848
838
|
"license": "BSD-2-Clause",
|
|
849
839
|
"engines": {
|
|
850
840
|
"node": ">=12"
|
|
@@ -936,17 +926,17 @@
|
|
|
936
926
|
}
|
|
937
927
|
},
|
|
938
928
|
"node_modules/eslint": {
|
|
939
|
-
"version": "9.
|
|
929
|
+
"version": "9.25.1",
|
|
940
930
|
"license": "MIT",
|
|
941
931
|
"dependencies": {
|
|
942
932
|
"@eslint-community/eslint-utils": "^4.2.0",
|
|
943
933
|
"@eslint-community/regexpp": "^4.12.1",
|
|
944
|
-
"@eslint/config-array": "^0.
|
|
945
|
-
"@eslint/config-helpers": "^0.2.
|
|
946
|
-
"@eslint/core": "^0.
|
|
934
|
+
"@eslint/config-array": "^0.20.0",
|
|
935
|
+
"@eslint/config-helpers": "^0.2.1",
|
|
936
|
+
"@eslint/core": "^0.13.0",
|
|
947
937
|
"@eslint/eslintrc": "^3.3.1",
|
|
948
|
-
"@eslint/js": "9.
|
|
949
|
-
"@eslint/plugin-kit": "^0.2.
|
|
938
|
+
"@eslint/js": "9.25.1",
|
|
939
|
+
"@eslint/plugin-kit": "^0.2.8",
|
|
950
940
|
"@humanfs/node": "^0.16.6",
|
|
951
941
|
"@humanwhocodes/module-importer": "^1.0.1",
|
|
952
942
|
"@humanwhocodes/retry": "^0.4.2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/cds-dk",
|
|
3
|
-
"version": "8.9.
|
|
3
|
+
"version": "8.9.3",
|
|
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": [
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@cap-js/asyncapi": "^1.0.0",
|
|
21
21
|
"@cap-js/openapi": "^1.0.0",
|
|
22
|
-
"@sap/cds": "
|
|
22
|
+
"@sap/cds": "^7 || ^8",
|
|
23
23
|
"@sap/cds-foss": "^5.0.0",
|
|
24
|
-
"@sap/cds-mtxs": "
|
|
25
|
-
"@sap/eslint-plugin-cds": "
|
|
24
|
+
"@sap/cds-mtxs": "^1.9.0 || ^2",
|
|
25
|
+
"@sap/eslint-plugin-cds": "^3.0.1",
|
|
26
26
|
"@sap/hdi-deploy": "^5",
|
|
27
27
|
"axios": "^1",
|
|
28
28
|
"eslint": "^9",
|