@sap/cds-dk 9.4.1 → 9.4.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.
Files changed (75) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/bin/data-products/index.js +10 -2
  3. package/bin/data-products/prepare-csn.js +63 -26
  4. package/bin/help.js +2 -2
  5. package/bin/import.js +7 -2
  6. package/bin/up.js +25 -4
  7. package/bin/util/containerize.js +142 -0
  8. package/lib/build/buildTaskEngine.js +5 -2
  9. package/lib/build/plugin.js +1 -1
  10. package/lib/build/plugins/helm/index.js +6 -7
  11. package/lib/build/provider/hana/index.js +10 -2
  12. package/lib/import/common.js +3 -3
  13. package/lib/import/message.js +1 -1
  14. package/lib/init/constants.js +3 -1
  15. package/lib/init/index.js +4 -5
  16. package/lib/init/projectReader.js +101 -77
  17. package/lib/init/registries/mta.js +3 -0
  18. package/lib/init/registries/xs-app.js +7 -1
  19. package/lib/init/template/ams/index.js +7 -6
  20. package/lib/init/template/app-frontend/files/mta.yaml.hbs +0 -7
  21. package/lib/init/template/app-frontend/index.js +2 -2
  22. package/lib/init/template/application-logging/index.js +13 -10
  23. package/lib/init/template/approuter/files/mta.yaml.hbs +7 -0
  24. package/lib/init/template/approuter/index.js +30 -18
  25. package/lib/init/template/attachments/index.js +3 -3
  26. package/lib/init/template/audit-logging/index.js +4 -4
  27. package/lib/init/template/cloud-logging/index.js +13 -10
  28. package/lib/init/template/connectivity/index.js +3 -3
  29. package/lib/init/template/containerize/files/containerize.yaml.hbs +1 -2
  30. package/lib/init/template/destination/index.js +5 -9
  31. package/lib/init/template/dynatrace/index.js +13 -10
  32. package/lib/init/template/enterprise-messaging/index.js +5 -5
  33. package/lib/init/template/enterprise-messaging-shared/index.js +4 -4
  34. package/lib/init/template/extensibility/index.js +2 -2
  35. package/lib/init/template/file-based-messaging/index.js +2 -2
  36. package/lib/init/template/github-actions/files/kyma-setup/action.yaml +0 -2
  37. package/lib/init/template/github-actions/index.js +3 -3
  38. package/lib/init/template/hana/index.js +19 -22
  39. package/lib/init/template/helm/index.js +47 -50
  40. package/lib/init/template/html5-repo/files/containerize.yaml.hbs +0 -10
  41. package/lib/init/template/html5-repo/files/mta.yaml.hbs +3 -7
  42. package/lib/init/template/html5-repo/files/values.yaml.hbs +6 -0
  43. package/lib/init/template/html5-repo/files/xs-app.json.hbs +5 -3
  44. package/lib/init/template/html5-repo/index.js +10 -8
  45. package/lib/init/template/http/index.js +31 -10
  46. package/lib/init/template/ias/files/mta.yaml.hbs +3 -0
  47. package/lib/init/template/ias/files/values.yaml.hbs +4 -1
  48. package/lib/init/template/ias/index.js +10 -11
  49. package/lib/init/template/kafka/index.js +3 -3
  50. package/lib/init/template/local-messaging/index.js +2 -2
  51. package/lib/init/template/malware-scanner/index.js +3 -7
  52. package/lib/init/template/mta/files/mta.yaml.hbs +10 -0
  53. package/lib/init/template/multitenancy/index.js +8 -10
  54. package/lib/init/template/notifications/index.js +2 -2
  55. package/lib/init/template/pipeline/index.js +5 -1
  56. package/lib/init/template/portal/files/mta.yaml.hbs +6 -0
  57. package/lib/init/template/portal/index.js +7 -7
  58. package/lib/init/template/postgres/index.js +4 -4
  59. package/lib/init/template/redis/index.js +2 -2
  60. package/lib/init/template/redis-messaging/index.js +2 -2
  61. package/lib/init/template/sample/files/app/admin-books/fiori-service.cds +2 -2
  62. package/lib/init/template/sample/files/javascript/admin-service.js.hbs +24 -0
  63. package/lib/init/template/sample/files/javascript/cat-service.js.hbs +43 -0
  64. package/lib/init/template/sample/files/typescript/admin-service.ts.hbs +16 -0
  65. package/lib/init/template/sample/files/typescript/cat-service.ts.hbs +31 -0
  66. package/lib/init/template/test/files/test/test.xs.hbs +1 -1
  67. package/lib/init/template/test/index.js +2 -2
  68. package/lib/init/template/tiny-sample/index.js +1 -1
  69. package/lib/init/template/workzone-standard/index.js +5 -6
  70. package/lib/init/template/xsuaa/files/mta.yaml.hbs +0 -2
  71. package/lib/init/template/xsuaa/index.js +24 -19
  72. package/lib/lint/eslintHelp.json +1 -1
  73. package/lib/util/question.js +1 -1
  74. package/npm-shrinkwrap.json +22 -22
  75. package/package.json +1 -1
@@ -33,35 +33,41 @@ module.exports = class XsuaaTemplate extends require('../../plugin') {
33
33
 
34
34
  async combine() {
35
35
  const project = readProject()
36
- const { hasMultitenancy, hasMta, hasHelm, hasHelmUnifiedRuntime, isJava, srvPath } = project
36
+ const { addMultitenancy, addMta, hasMta, addHelm, hasHelm, hasHelmUnifiedRuntime, addHelmUnifiedRuntime, isJava, srvPath } = project
37
37
 
38
38
  const cds = require('../../../../lib')
39
39
  const xsSecurity = await (async () => {
40
40
  try {
41
41
  const models = await cds.load(cds.env.folders.srv)
42
42
  return cds.compile.to.xsuaa(models)
43
- } catch (error) { /* ignore */ }
43
+ } catch { /* ignore */ }
44
44
  })() ?? { scopes: [], attributes: [], 'role-templates': [], 'authorities-inheritance': false }
45
45
 
46
46
  const additions = xsSecurity.scopes.map(scope => ({ in: 'scopes', where: { name: scope.name } }))
47
47
  await merge(xsSecurity).into('xs-security.json', { project, additions })
48
48
 
49
- if (hasMta) {
50
- const srv = srv4(srvPath)
49
+ if (addMta || addMultitenancy && hasMta) {
50
+ const additions = [], overwrites = [], relationships = []
51
51
  const { plan } = cds.cli.options
52
52
  const xsuaa = plan ? xsuaa4(plan) : xsuaaDefault
53
- const additions = [srv, xsuaa]
54
- const mtxSidecar = mtxSidecar4(isJava ? 'mtx/sidecar' : 'gen/mtx/sidecar')
55
- if (hasMultitenancy && isJava) additions.push(mtxSidecar)
56
- const overwrites = hasMultitenancy ? [{ item: [xsuaa, 'parameters.config.tenant-mode'], withValue: 'shared' }] : []
57
- const relationships = [{
58
- insert: [xsuaa, 'name'],
59
- into: [srv, 'requires', 'name']
60
- }]
61
- if (hasMultitenancy) relationships.push({
62
- insert: [xsuaa, 'name'],
63
- into: [mtxSidecar, 'requires', 'name']
64
- })
53
+ additions.push(xsuaa)
54
+ if (addMta) {
55
+ const srv = srv4(srvPath)
56
+ additions.push(srv)
57
+ relationships.push({
58
+ insert: [xsuaa, 'name'],
59
+ into: [srv, 'requires', 'name']
60
+ })
61
+ }
62
+ if (addMultitenancy) {
63
+ const mtxSidecar = mtxSidecar4(isJava ? 'mtx/sidecar' : 'gen/mtx/sidecar')
64
+ additions.push(mtxSidecar)
65
+ overwrites.push({ item: [mtxSidecar, 'parameters.tenant-mode'], withValue: 'shared' })
66
+ relationships.push({
67
+ insert: [xsuaa, 'name'],
68
+ into: [mtxSidecar, 'requires', 'name']
69
+ })
70
+ }
65
71
  if (plan) project.servicePlan = plan
66
72
 
67
73
  project.hasRoles = xsSecurity['role-templates'].length > 0
@@ -75,12 +81,11 @@ module.exports = class XsuaaTemplate extends require('../../plugin') {
75
81
  })
76
82
  }
77
83
  }
78
-
79
84
  await merge(__dirname, 'files/mta.yaml.hbs').into('mta.yaml', { project, additions, overwrites, relationships })
80
85
  }
81
86
 
82
- if (hasHelm || hasHelmUnifiedRuntime) {
83
- const overwrites = hasMultitenancy ? [{ item: 'xsuaa.parameters.tenant-mode', withValue: 'shared' }] : []
87
+ if (addHelm || addHelmUnifiedRuntime || addMultitenancy && (hasHelm || hasHelmUnifiedRuntime)) {
88
+ const overwrites = addMultitenancy ? [{ item: 'xsuaa.parameters.tenant-mode', withValue: 'shared' }] : []
84
89
  await merge(__dirname, 'files/values.yaml.hbs').into('chart/values.yaml', { with: project, overwrites })
85
90
  await merge({
86
91
  xsuaa: {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "9.37.0",
2
+ "version": "9.38.0",
3
3
  "help": "\n# SYNOPSIS\n\n *cds lint* [options] file.js [file.js] [dir]\n\n Runs environment checks and/or checks the specified models\n based on the ESLint framework\n\n# OPTIONS\n \n Basic configuration:\n --no-config-lookup Disable look up for eslint.config.js\n -c, --config path::String Use this configuration instead of eslint.config.js, eslint.config.mjs, or eslint.config.cjs\n --inspect-config Open the config inspector with the current configuration\n --ext [String] Specify additional file extensions to lint\n --global [String] Define global variables\n --parser String Specify the parser to be used\n --parser-options Object Specify parser options\n \n Specify Rules and Plugins:\n --plugin [String] Specify plugins\n --rule Object Specify rules\n \n Fix Problems:\n --fix Automatically fix problems\n --fix-dry-run Automatically fix problems without saving the changes to the file system\n --fix-type Array Specify the types of fixes to apply (directive, problem, suggestion, layout)\n \n Ignore Files:\n --no-ignore Disable use of ignore files and patterns\n --ignore-pattern [String] Patterns of files to ignore\n \n Use stdin:\n --stdin Lint code provided on <STDIN> - default: false\n --stdin-filename String Specify filename to process STDIN as\n \n Handle Warnings:\n --quiet Report errors only - default: false\n --max-warnings Int Number of warnings to trigger nonzero exit code - default: -1\n \n Output:\n -o, --output-file path::String Specify file to write report to\n -f, --format String Use a specific output format - default: stylish\n --color, --no-color Force enabling/disabling of color\n \n Inline configuration comments:\n --no-inline-config Prevent comments from changing config or rules\n --report-unused-disable-directives Adds reported errors for unused eslint-disable and eslint-enable directives\n --report-unused-disable-directives-severity String Chooses severity level for reporting unused eslint-disable and eslint-enable directives - either: off, warn, error, 0, 1, or 2\n --report-unused-inline-configs String Adds reported errors for unused eslint inline config comments - either: off, warn, error, 0, 1, or 2\n \n Caching:\n --cache Only check changed files - default: false\n --cache-file path::String Path to the cache file. Deprecated: use --cache-location - default: .eslintcache\n --cache-location path::String Path to the cache file or directory\n --cache-strategy String Strategy to use for detecting changed files in the cache - either: metadata or content - default: metadata\n \n Suppressing Violations:\n --suppress-all Suppress all violations - default: false\n --suppress-rule [String] Suppress specific rules\n --suppressions-location path::String Specify the location of the suppressions file\n --prune-suppressions Prune unused suppressions - default: false\n --pass-on-unpruned-suppressions Ignore unused suppressions - default: false\n \n Miscellaneous:\n --init Run config initialization wizard - default: false\n --env-info Output execution environment information - default: false\n --no-error-on-unmatched-pattern Prevent errors when pattern is unmatched\n --exit-on-fatal-error Exit with exit code 2 in case of fatal error - default: false\n --no-warn-ignored Suppress warnings when the file list includes ignored files\n --pass-on-no-patterns Exit with exit code 0 in case no file patterns are passed\n --debug Output debugging information\n -h, --help Show help\n -v, --version Output the version number\n --print-config path::String Print the configuration for the given file\n --stats Add statistics to the lint report - default: false\n --flag [String] Enable a feature flag\n --mcp Start the ESLint MCP server\n --concurrency Int|String Number of linting threads, auto to choose automatically, off for no multithreading - default: off\n \n",
4
4
  "options": [
5
5
  "--config",
@@ -25,7 +25,7 @@ async function ask4(...args) {
25
25
  await askQuestion(question)
26
26
  }
27
27
  rl.close()
28
- return answers
28
+ return Array.isArray(args) ? answers[0] : answers
29
29
  }
30
30
 
31
31
  module.exports = { ask4 }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "9.4.1",
3
+ "version": "9.4.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sap/cds-dk",
9
- "version": "9.4.1",
9
+ "version": "9.4.3",
10
10
  "license": "SEE LICENSE IN LICENSE",
11
11
  "dependencies": {
12
12
  "@cap-js/asyncapi": "^1.0.0",
@@ -42,8 +42,8 @@
42
42
  }
43
43
  },
44
44
  "node_modules/@cap-js/db-service": {
45
- "version": "2.5.1",
46
- "integrity": "sha512-dpz9lvOepcXOgE8uTs9abCotLcCt1odpwlrUT4AW2pnSrMB0EVMRbHKVIlufmrm8Kh/Y5c2d6ODald8eahsEDw==",
45
+ "version": "2.6.0",
46
+ "integrity": "sha512-t72/FcAYFbPdx+5iV+lVKcwF2MLOx8II3jJdlC1dX/KXQORoS3wDFwWbakP0f/eharE5hfa7KMFJqrSMtDigbQ==",
47
47
  "devOptional": true,
48
48
  "license": "Apache-2.0",
49
49
  "dependencies": {
@@ -65,12 +65,12 @@
65
65
  }
66
66
  },
67
67
  "node_modules/@cap-js/sqlite": {
68
- "version": "2.0.3",
69
- "integrity": "sha512-Zm2JLpPuddFkeqM47TX7V7IC6x3WOfn5lTRbaiVOMvRQoshCNXTkjv083ssfiwF/jF/46/PSVox+fTElozg6XA==",
68
+ "version": "2.0.4",
69
+ "integrity": "sha512-QPVkycLJG6EubtjrPeiK4dTI1zPH/nabvhiYnTeg2AbeQ8mbazm5pjmcLrzOOKF/5bGS8KQo2J+49fU5LPRR3A==",
70
70
  "license": "Apache-2.0",
71
71
  "optional": true,
72
72
  "dependencies": {
73
- "@cap-js/db-service": "^2",
73
+ "@cap-js/db-service": "^2.6.0",
74
74
  "better-sqlite3": "^12.0.0"
75
75
  },
76
76
  "peerDependencies": {
@@ -78,8 +78,8 @@
78
78
  }
79
79
  },
80
80
  "node_modules/@eslint/js": {
81
- "version": "9.37.0",
82
- "integrity": "sha512-jaS+NJ+hximswBG6pjNX0uEJZkrT0zwpVi3BA3vX22aFGjJjmgSTSmPpZCRKmoBL5VY/M6p0xsSJx7rk7sy5gg==",
81
+ "version": "9.38.0",
82
+ "integrity": "sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A==",
83
83
  "license": "MIT",
84
84
  "peer": true,
85
85
  "engines": {
@@ -90,11 +90,11 @@
90
90
  }
91
91
  },
92
92
  "node_modules/@sap/cds": {
93
- "version": "9.4.2",
94
- "integrity": "sha512-+MtNRviAgyZnPkSkT9sZ52rKRrNcTSpjIL88HfPtS5VzWX17Niu9PRANba/dd8aF4lxSQEEqb85zqJkga6MwKA==",
93
+ "version": "9.4.4",
94
+ "integrity": "sha512-JJCHeEJF4xzFyZSf2ToocvVE9dyHfNLTRXOauOxlmpfyaLg97G7Qp+L4bD132eB0onBG9bQj3eH8DzBm0hVvIw==",
95
95
  "license": "SEE LICENSE IN LICENSE",
96
96
  "dependencies": {
97
- "@sap/cds-compiler": "^6.1",
97
+ "@sap/cds-compiler": "^6.3",
98
98
  "@sap/cds-fiori": "^2",
99
99
  "js-yaml": "^4.1.0"
100
100
  },
@@ -120,8 +120,8 @@
120
120
  }
121
121
  },
122
122
  "node_modules/@sap/cds-compiler": {
123
- "version": "6.4.2",
124
- "integrity": "sha512-kjhq8GxzCLIfsM4aln9saxkifPC26MYuAqT82QB7RGZDVFM5Pw09Dp6TcKCSp65hut0YgHkvHlVGWMZWWBJNdA==",
123
+ "version": "6.4.6",
124
+ "integrity": "sha512-auAjRh9t0KKj4LiGAr/fxikZRIngx9YXVHTJWf0LeaGv0ZpYOi6iWbSnU1XRB2e6hsf+Ou1w5oTOHooC5sZfog==",
125
125
  "license": "SEE LICENSE IN LICENSE",
126
126
  "bin": {
127
127
  "cdsc": "bin/cdsc.js",
@@ -133,8 +133,8 @@
133
133
  }
134
134
  },
135
135
  "node_modules/@sap/cds-fiori": {
136
- "version": "2.1.0",
137
- "integrity": "sha512-EoNtPT5aVurxwsqHQfW2FgnXA3Ysu9GvihR0jTQNUZ4pVlHHFkfFehH6G2DIHKyfTROWaahegJsMpiwpE8clkg==",
136
+ "version": "2.1.1",
137
+ "integrity": "sha512-X+4v4LBAT8HIt0zr28/kJNS15nlNlcM97vAMW+agLrmK134nyBiMwUMcp8BMhxlG9B2PykrnAKH56D9O3tfoBg==",
138
138
  "license": "SEE LICENSE IN LICENSE",
139
139
  "peerDependencies": {
140
140
  "@sap/cds": ">=8",
@@ -142,8 +142,8 @@
142
142
  }
143
143
  },
144
144
  "node_modules/@sap/cds-mtxs": {
145
- "version": "3.3.1",
146
- "integrity": "sha512-66yWxkVlqu5FsOHxDF8w2JJSlcbgtT2PTegBSECEq9+fjMOaqlxnBHpXXTODCUgK762Ad3kyCUZqW///gmpuMA==",
145
+ "version": "3.4.3",
146
+ "integrity": "sha512-vgABFr7huaKWGx2fWHeGom5bVgsQKD7/gqkC7aQ/7yC9hdZdrx0mz4iZ0ASHUZ5PZWp2FWLD+eaJ9sXKUGHgpA==",
147
147
  "license": "SEE LICENSE IN LICENSE",
148
148
  "dependencies": {
149
149
  "@sap/hdi-deploy": "^5"
@@ -261,8 +261,8 @@
261
261
  "license": "MIT"
262
262
  },
263
263
  "node_modules/axios": {
264
- "version": "1.12.2",
265
- "integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==",
264
+ "version": "1.13.1",
265
+ "integrity": "sha512-hU4EGxxt+j7TQijx1oYdAjw4xuIp1wRQSsbMFwSthCWeBQur1eF+qJ5iQ5sN3Tw8YRzQNKb8jszgBdMDVqwJcw==",
266
266
  "license": "MIT",
267
267
  "dependencies": {
268
268
  "follow-redirects": "^1.15.6",
@@ -1213,8 +1213,8 @@
1213
1213
  "license": "MIT"
1214
1214
  },
1215
1215
  "node_modules/node-abi": {
1216
- "version": "3.78.0",
1217
- "integrity": "sha512-E2wEyrgX/CqvicaQYU3Ze1PFGjc4QYPGsjUrlYkqAE0WjHEZwgOsGMPMzkMse4LjJbDmaEuDX3CM036j5K2DSQ==",
1216
+ "version": "3.79.0",
1217
+ "integrity": "sha512-Pr/5KdBQGG8TirdkS0qN3B+f3eo8zTOfZQWAxHoJqopMz2/uvRnG+S4fWu/6AZxKei2CP2p/psdQ5HFC2Ap5BA==",
1218
1218
  "license": "MIT",
1219
1219
  "optional": true,
1220
1220
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "9.4.1",
3
+ "version": "9.4.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": [