@sap/cds-dk 7.1.1 → 7.2.0

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 (50) hide show
  1. package/bin/build.js +3 -3
  2. package/bin/compile/index.js +5 -1
  3. package/bin/gen.js +27 -0
  4. package/bin/help.js +2 -1
  5. package/bin/watch.js +3 -4
  6. package/bin/watched.js +2 -3
  7. package/lib/bind/bindingUtil.js +1 -0
  8. package/lib/build/buildTaskEngine.js +12 -17
  9. package/lib/build/buildTaskFactory.js +23 -27
  10. package/lib/build/buildTaskHandler.js +2 -5
  11. package/lib/build/buildTaskProviderFactory.js +9 -12
  12. package/lib/build/constants.js +2 -1
  13. package/lib/build/index.js +1 -1
  14. package/lib/build/provider/buildTaskHandlerInternal.js +2 -2
  15. package/lib/build/provider/buildTaskProviderInternal.js +15 -25
  16. package/lib/build/provider/hana/index.js +14 -7
  17. package/lib/build/provider/nodejs/index.js +51 -18
  18. package/lib/build/util.js +11 -19
  19. package/lib/compile/openapi/csdl2openapi.js +30 -21
  20. package/lib/compile/openapi/index.js +7 -3
  21. package/lib/import/common.js +1 -1
  22. package/lib/init/constants.js +6 -11
  23. package/lib/init/index.js +84 -71
  24. package/lib/init/template/_merging/registry-mta.js +0 -12
  25. package/lib/init/template/approuter/files/mta.yaml.hbs +1 -1
  26. package/lib/init/template/approuter/index.js +7 -6
  27. package/lib/init/template/cf-manifest/files/services-manifest.yml.hbs +0 -5
  28. package/lib/init/template/cf-manifest/index.js +2 -2
  29. package/lib/init/template/h2/index.js +16 -0
  30. package/lib/init/template/hana/index.js +2 -3
  31. package/lib/init/template/helm/chart/values.root.schema.json +0 -5
  32. package/lib/init/template/helm/chart/values.schema.json +0 -4
  33. package/lib/init/template/helm/index.js +1 -1
  34. package/lib/init/template/lint/index.js +3 -7
  35. package/lib/init/template/multitenancy/files/package.json.hbs +0 -3
  36. package/lib/init/template/multitenancy/index.js +2 -0
  37. package/lib/init/template/nodejs/index.js +3 -3
  38. package/lib/init/template/pipeline/index.js +2 -4
  39. package/lib/init/template/sample/index.js +5 -7
  40. package/lib/init/template/sqlite/index.js +8 -3
  41. package/lib/init/template/tiny-sample/index.js +16 -30
  42. package/lib/init/util/mvn.js +25 -1
  43. package/lib/init/util/projectReader.js +3 -7
  44. package/lib/init/util/template.js +7 -6
  45. package/lib/watch/node-watch.js +6 -1
  46. package/npm-shrinkwrap.json +324 -307
  47. package/package.json +3 -3
  48. package/lib/init/template/auditlog/files/mta.yaml.hbs +0 -14
  49. package/lib/init/template/auditlog/files/package.json.hbs +0 -27
  50. package/lib/init/template/auditlog/index.js +0 -74
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "7.1.1",
3
+ "version": "7.2.0",
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": [
@@ -20,11 +20,11 @@
20
20
  "@sap/cds-foss": "^4.0.2",
21
21
  "@sap/cds-mtxs": "^1.9.0",
22
22
  "@sap/eslint-plugin-cds": "^2.6.0",
23
- "axios": ">=0.21",
23
+ "@sap/hdi-deploy": "^4.8.0",
24
+ "axios": "^1",
24
25
  "eslint": "^8",
25
26
  "express": "^4.17.3",
26
27
  "livereload-js": "^4.0.1",
27
- "md5": "^2.3.0",
28
28
  "mustache": "^4.0.1",
29
29
  "node-watch": ">=0.7",
30
30
  "pluralize": "^8.0.0",
@@ -1,14 +0,0 @@
1
- ---
2
- modules:
3
- - name: {{appName}}-srv
4
- type: {{language}}
5
- path: {{& srvPath}}
6
- requires:
7
- - name: {{appName}}-auditlog
8
-
9
- resources:
10
- - name: {{appName}}-auditlog
11
- type: org.cloudfoundry.managed-service
12
- parameters:
13
- service: auditlog-api
14
- service-plan: default
@@ -1,27 +0,0 @@
1
- {
2
- {{#isNodejs}}
3
- "dependencies": {
4
- "@sap/audit-logging": "^5"
5
- },
6
- "cds": {
7
- {{/isNodejs}}
8
- "requires": {
9
- {{#profile}}
10
- "[{{profile}}]": {
11
- {{/profile}}
12
- {{#shortcut}}
13
- "audit-log": "service"
14
- {{/shortcut}}
15
- {{^shortcut}}
16
- "audit-log": {
17
- "kind": "service"
18
- }
19
- {{/shortcut}}
20
- {{#profile}}
21
- }
22
- {{/profile}}
23
- }
24
- {{#isNodejs}}
25
- }
26
- {{/isNodejs}}
27
- }
@@ -1,74 +0,0 @@
1
- const cds = require('../../../cds')
2
- const { read } = cds.utils
3
- const { join } = require('path')
4
- const { readProject } = require('../../util/projectReader')
5
- const { mergeJSON, mergeYAML } = require('../../util/merge')
6
- const { parseMd5File, writeMd5File } = require('../../util/md5')
7
- const { srvNode4, srvJava4, auditlog } = require('../_merging/registry-mta')
8
-
9
- module.exports = class AuditlogTemplate extends require('../templateBase') {
10
-
11
- static hasFacet(env) {
12
- return env.requires?.['audit-log']
13
- }
14
-
15
- async run() {
16
- const project = await readProject()
17
- const { configFile } = project
18
- project.shortcut = !(await read(configFile)).cds?.requires?.['audit-log']?.kind
19
- await mergeJSON(configFile, join(__dirname, 'files', 'package.json.hbs'), project)
20
- }
21
-
22
- async runDependentMerging(context = {}) {
23
- const project = await readProject()
24
- const { isNodejs, hasMta, hasHelm, srvPath } = project
25
-
26
- if (hasMta) {
27
- const srv = (isNodejs ? srvNode4 : srvJava4)(srvPath)
28
- await mergeYAML(
29
- 'mta.yaml',
30
- join(__dirname, 'files', 'mta.yaml.hbs'),
31
- project,
32
- {
33
- additions: [srv, auditlog],
34
- relationships: [{
35
- insert: [auditlog, 'name'],
36
- into: [srv, 'requires', 'name']
37
- }]
38
- }
39
- )
40
- }
41
-
42
- if (hasHelm) {
43
- //in case facet is being added to the already exisiting charts folder
44
- let isIndependentCommand = false
45
- if(Object.keys(context).length == 0){
46
- isIndependentCommand = true
47
- context.oldTrackingData = context.newTrackingData = await parseMd5File(join('chart', '.cds-add-helm-files.md5'))
48
- }
49
-
50
- await mergeYAML(
51
- join('chart', 'values.yaml'),
52
- {
53
- srv: { bindings: {
54
- auditlog: { serviceInstanceName: 'auditlog' }
55
- }},
56
- auditlog: {
57
- serviceOfferingName: 'auditlog-api',
58
- servicePlanName: 'default'
59
- }
60
- }
61
- )
62
-
63
- // copy service instance chart if it is not present
64
- const HelmTemplate = require(`../helm`);
65
- const helmTemplate = new HelmTemplate(context.oldTrackingData, context.newTrackingData);
66
- isIndependentCommand = isIndependentCommand | await helmTemplate.addSubChart('service-instance');
67
-
68
- // add dependency entry in chart.yaml
69
- await helmTemplate.addDependency('service-instance', 'auditlog');
70
-
71
- if(isIndependentCommand) await writeMd5File(join('chart', '.cds-add-helm-files.md5'), context.newTrackingData)
72
- }
73
- }
74
- }