@sap/cds-dk 6.7.2 → 6.8.1

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 (122) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/bin/deploy/index.js +1 -1
  3. package/bin/import.js +5 -3
  4. package/bin/login.js +29 -9
  5. package/bin/watch.js +4 -0
  6. package/lib/bind/bindingUtil.js +2 -2
  7. package/lib/bind/userCdsrcJsonStorageProvider.js +1 -1
  8. package/lib/client/auth_manager.js +3 -1
  9. package/lib/client/helper/errors.js +6 -1
  10. package/lib/client/params.js +22 -20
  11. package/lib/client/settings_manager.js +17 -3
  12. package/lib/compile/openapi/csdl2openapi.js +2 -1
  13. package/lib/import/asyncapi/importAsyncAPI.js +32 -0
  14. package/lib/import/asyncapi/index.js +15 -0
  15. package/lib/import/asyncapi/parserContext.js +351 -0
  16. package/lib/import/asyncapi/utils.js +18 -0
  17. package/lib/import/common.js +21 -67
  18. package/lib/import/importapi.js +23 -2
  19. package/lib/import/message.js +11 -1
  20. package/lib/import/odata/index.js +14 -11
  21. package/lib/import/odata/metadataconverter/MetadataConverter.js +35 -35
  22. package/lib/import/odata/util/MultiMap.js +5 -5
  23. package/lib/import/odata/v2parser.js +1 -0
  24. package/lib/import/odata/v4parser.js +1281 -1139
  25. package/lib/init/constants.js +10 -3
  26. package/lib/init/template/_merging/registry-mta.js +33 -36
  27. package/lib/init/template/approuter/files/mtxs-configmap-java.yaml +20 -0
  28. package/lib/init/template/approuter/files/mtxs-configmap-nodejs.yaml +12 -0
  29. package/lib/init/template/approuter/index.js +24 -33
  30. package/lib/init/template/auditlog/files/package.json.hbs +27 -0
  31. package/lib/init/template/auditlog/index.js +12 -6
  32. package/lib/init/template/cf-manifest/index.js +1 -1
  33. package/lib/init/template/connectivity/index.js +1 -1
  34. package/lib/init/template/destinations/index.js +4 -2
  35. package/lib/init/template/enterprise-messaging/files/package.json.hbs +19 -0
  36. package/lib/init/template/enterprise-messaging/index.js +15 -13
  37. package/lib/init/template/enterprise-messaging-shared/files/event-mesh.json.hbs +31 -0
  38. package/lib/init/template/enterprise-messaging-shared/files/mta.yaml.hbs +15 -0
  39. package/lib/init/template/enterprise-messaging-shared/files/package.json.hbs +22 -0
  40. package/lib/init/template/enterprise-messaging-shared/files/values.yaml +7 -0
  41. package/lib/init/template/enterprise-messaging-shared/index.js +51 -0
  42. package/lib/init/template/extensibility/files/package.json.hbs +20 -0
  43. package/lib/init/template/extensibility/index.js +4 -16
  44. package/lib/init/template/file-based-messaging/files/package.json.hbs +19 -0
  45. package/lib/init/template/file-based-messaging/index.js +25 -0
  46. package/lib/init/template/hana/files/package.json.hbs +33 -0
  47. package/lib/init/template/hana/index.js +38 -65
  48. package/lib/init/template/helm/chart/templates/_deployment_helpers.tpl +0 -12
  49. package/lib/init/template/helm/chart/templates/_helpers.tpl +1 -121
  50. package/lib/init/template/helm/index.js +1 -1
  51. package/lib/init/template/html5-repo/index.js +1 -1
  52. package/lib/init/template/java/index.js +2 -2
  53. package/lib/init/template/kibana-logging/files/package.json.hbs +17 -0
  54. package/lib/init/template/kibana-logging/index.js +6 -19
  55. package/lib/init/template/lint/index.js +1 -1
  56. package/lib/init/template/mta/index.js +2 -2
  57. package/lib/init/template/multitenancy/files/mtxs-configmap-java.yaml +3 -5
  58. package/lib/init/template/multitenancy/files/mtxs-configmap-nodejs.yaml +3 -10
  59. package/lib/init/template/multitenancy/files/package.json.hbs +5 -4
  60. package/lib/init/template/multitenancy/index.js +22 -19
  61. package/lib/init/template/nodejs/files/.vscode/launch.json +11 -3
  62. package/lib/init/template/nodejs/index.js +1 -1
  63. package/lib/init/template/pipeline/index.js +1 -1
  64. package/lib/init/template/redis-messaging/files/mta.yaml.hbs +14 -0
  65. package/lib/init/template/redis-messaging/files/package.json.hbs +22 -0
  66. package/lib/init/template/redis-messaging/index.js +50 -0
  67. package/lib/init/template/samples/index.js +3 -3
  68. package/lib/init/template/sqlite/files/package.json.hbs +12 -4
  69. package/lib/init/template/sqlite/index.js +5 -1
  70. package/lib/init/template/toggles/files/package.json.hbs +20 -0
  71. package/lib/init/template/toggles/index.js +3 -9
  72. package/lib/init/template/xsuaa/files/package.json.hbs +28 -0
  73. package/lib/init/template/xsuaa/index.js +8 -23
  74. package/lib/init/util/{md5Tracking.js → md5.js} +1 -1
  75. package/lib/init/util/merge.js +4 -9
  76. package/lib/init/util/{mvnArchetypeUtil.js → mvn.js} +3 -0
  77. package/lib/init/util/projectReader.js +25 -107
  78. package/lib/init/util/xml.js +56 -0
  79. package/lib/lint/checks.js +1 -1
  80. package/lib/lint/io.js +1 -1
  81. package/lib/{init/util/commandUtil.js → util/command.js} +4 -2
  82. package/lib/{init/util/fsUtil.js → util/fs.js} +2 -2
  83. package/npm-shrinkwrap.json +29 -28
  84. package/package.json +5 -4
  85. package/lib/init/template/approuter/files/cds.cdsrc.json +0 -7
  86. package/lib/init/template/approuter/files/cds.cdsrc.json.hbs +0 -9
  87. package/lib/init/template/approuter/files/cds.package.json +0 -9
  88. package/lib/init/template/approuter/files/cds.package.json.hbs +0 -11
  89. package/lib/init/template/auditlog/files/dependencies.package.json +0 -5
  90. package/lib/init/template/enterprise-messaging/files/cds.package.json +0 -9
  91. package/lib/init/template/enterprise-messaging/files/cds.profile.package.json.hbs +0 -11
  92. package/lib/init/template/enterprise-messaging/files/cdsrc.json +0 -7
  93. package/lib/init/template/enterprise-messaging/files/cdsrc.json.hbs +0 -9
  94. package/lib/init/template/extensibility/files/cds.package.json +0 -7
  95. package/lib/init/template/extensibility/files/cds.package.json.hbs +0 -9
  96. package/lib/init/template/extensibility/files/cdsrc.json +0 -5
  97. package/lib/init/template/extensibility/files/cdsrc.json.hbs +0 -7
  98. package/lib/init/template/hana/files/java/cds.json.hbs +0 -7
  99. package/lib/init/template/hana/files/java/cds.profile.json.hbs +0 -12
  100. package/lib/init/template/hana/files/java/cds.shortcut.json.hbs +0 -5
  101. package/lib/init/template/hana/files/java/cds.shortcut.profile.json.hbs +0 -8
  102. package/lib/init/template/hana/files/nodejs/cds.json.hbs +0 -9
  103. package/lib/init/template/hana/files/nodejs/cds.profile.json.hbs +0 -14
  104. package/lib/init/template/hana/files/nodejs/cds.shortcut.json.hbs +0 -7
  105. package/lib/init/template/hana/files/nodejs/cds.shortcut.profile.json.hbs +0 -10
  106. package/lib/init/template/hana/files/nodejs/dependencies.package.json +0 -5
  107. package/lib/init/template/helm/chart/templates/_sapcp_helpers.tpl +0 -103
  108. package/lib/init/template/kibana-logging/files/cds.profile.package.json.hbs +0 -9
  109. package/lib/init/template/toggles/files/cds.package.json +0 -7
  110. package/lib/init/template/toggles/files/cds.package.json.hbs +0 -9
  111. package/lib/init/template/toggles/files/cdsrc.json +0 -5
  112. package/lib/init/template/toggles/files/cdsrc.json.hbs +0 -7
  113. package/lib/init/template/xsuaa/files/cds.cdsrc.json +0 -7
  114. package/lib/init/template/xsuaa/files/cds.cdsrc.json.hbs +0 -9
  115. package/lib/init/template/xsuaa/files/cds.package.json +0 -9
  116. package/lib/init/template/xsuaa/files/cds.package.json.hbs +0 -11
  117. package/lib/init/template/xsuaa/files/dependencies.package.json +0 -6
  118. package/lib/init/util/versionCompare.js +0 -73
  119. /package/lib/init/template/hana/files/{java/db → db}/package.json +0 -0
  120. /package/lib/init/template/hana/files/{common/src → src}/.hdiconfig +0 -0
  121. /package/lib/init/template/hana/files/{common/undeploy.json → undeploy.json} +0 -0
  122. /package/lib/init/util/{templateUtil.js → template.js} +0 -0
@@ -0,0 +1,56 @@
1
+ const cds = require('../../cds')
2
+ const { read } = cds.utils
3
+ const LOG = console
4
+
5
+ /*
6
+ Remove the _text attributes and convert value it into array
7
+ input : "groupId":[{"_text":["customer"]}]
8
+ output: "groupId":["customer"]
9
+ */
10
+ function _removeTextAttributes(value, parentElement) {
11
+ const parentKeys = Object.keys(parentElement._parent)
12
+ const key = parentKeys[parentKeys.length - 1]
13
+ const _text = parentElement._parent[key]
14
+ if (_text.length > 0) {
15
+ _text[_text.length - 1] = value
16
+ } else {
17
+ parentElement._parent[key] = value
18
+ }
19
+ }
20
+
21
+ /**
22
+ * Parse a given string containing xml
23
+ * used to remove the _text object from converted json i.e. from xml-js.
24
+ * example: converted json has "groupId":[{"_text":["customer"]}]
25
+ * and after removing textAttributes (using this function): "groupId":["customer"]
26
+ * @param xml string to parse
27
+ * @returns parsed json object
28
+ */
29
+
30
+ async function parseXml(pomXmlPath) {
31
+ const xmljs = require('xml-js')
32
+ const xmljsParse = {}
33
+ try {
34
+ const xml = await read(pomXmlPath, 'utf-8')
35
+ xmljsParse.project = JSON.parse(xmljs.xml2json(xml, {
36
+ ignoreComment: true,
37
+ compact: true,
38
+ alwaysArray: true,
39
+ ignoreDeclaration: true,
40
+ attributesKey: "$",
41
+ trim: true,
42
+ nativeType: true,
43
+ ignoreInstruction: true,
44
+ ignoreCdata: true,
45
+ ignoreDoctype: true,
46
+ textFn: _removeTextAttributes
47
+ })).project[0]
48
+ return xmljsParse
49
+ } catch (e) {
50
+ // REVISIT: We shouldn't continue with errors
51
+ LOG.error(`Failed to read file ${pomXmlPath} - skip pom.xml data`)
52
+ LOG.error(e)
53
+ }
54
+ }
55
+
56
+ module.exports = { parseXml }
@@ -2,7 +2,7 @@ const fs = require("fs");
2
2
  const os = require("os");
3
3
  const path = require("path");
4
4
  const term = require("../util/term");
5
- const commandUtil = require("../init/util/commandUtil");
5
+ const commandUtil = require("../util/command");
6
6
 
7
7
  const IS_WIN = os.platform() === "win32";
8
8
  const { URLS } = require("../init/constants");
package/lib/lint/io.js CHANGED
@@ -2,7 +2,7 @@ const path = require("path");
2
2
  const yaml = require("@sap/cds-foss")("yaml");
3
3
  const term = require("../util/term");
4
4
  const { read, write, exists } = require('../cds').utils;
5
- const { readJSONC } = require("../init/util/fsUtil");
5
+ const { readJSONC } = require("../util/fs");
6
6
  const JSONC = require('../util/jsonc');
7
7
 
8
8
  module.exports = {
@@ -1,10 +1,12 @@
1
+ // REVISIT: Consolidate with lib/util/exec.js
2
+
1
3
  const cp = require('child_process');
2
4
  const os = require('os');
3
- const cds = require('../../cds');
5
+ const cds = require('../cds');
4
6
  const DEBUG = cds.debug('cli');
5
7
 
6
8
 
7
- const { IS_WIN } = require('../constants');
9
+ const { IS_WIN } = require('../init/constants');
8
10
 
9
11
  class CommandUtil {
10
12
 
@@ -1,6 +1,6 @@
1
1
  const { yaml: YAML } = require('@sap/cds-foss')
2
- const JSONC = require('../../util/jsonc');
3
- const { read, write } = require('../../cds').utils;
2
+ const JSONC = require('./jsonc');
3
+ const { read, write } = require('../cds').utils;
4
4
 
5
5
  // REVISIT: Consider merging with template util
6
6
 
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "6.7.2",
3
+ "version": "6.8.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sap/cds-dk",
9
- "version": "6.7.2",
9
+ "version": "6.8.1",
10
10
  "license": "SEE LICENSE IN LICENSE",
11
11
  "dependencies": {
12
- "@sap/cds": "^6.7.0",
12
+ "@sap/cds": "~6.8.0",
13
+ "@sap/cds-compiler": "~3.9.0",
13
14
  "@sap/cds-foss": "^4",
14
- "@sap/cds-mtxs": "^1.7.0",
15
+ "@sap/cds-mtxs": "~1.8.0",
15
16
  "@sap/eslint-plugin-cds": "^2.6.0",
16
17
  "axios": ">=0.21",
17
18
  "eslint": "^8",
18
- "express": "^4.17.1",
19
+ "express": "^4.17.3",
19
20
  "livereload-js": "^4.0.1",
20
21
  "md5": "^2.3.0",
21
22
  "mustache": "^4.0.1",
@@ -46,19 +47,19 @@
46
47
  }
47
48
  },
48
49
  "node_modules/@eslint-community/regexpp": {
49
- "version": "4.5.0",
50
+ "version": "4.5.1",
50
51
  "license": "MIT",
51
52
  "engines": {
52
53
  "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
53
54
  }
54
55
  },
55
56
  "node_modules/@eslint/eslintrc": {
56
- "version": "2.0.2",
57
+ "version": "2.0.3",
57
58
  "license": "MIT",
58
59
  "dependencies": {
59
60
  "ajv": "^6.12.4",
60
61
  "debug": "^4.3.2",
61
- "espree": "^9.5.1",
62
+ "espree": "^9.5.2",
62
63
  "globals": "^13.19.0",
63
64
  "ignore": "^5.2.0",
64
65
  "import-fresh": "^3.2.1",
@@ -74,7 +75,7 @@
74
75
  }
75
76
  },
76
77
  "node_modules/@eslint/js": {
77
- "version": "8.39.0",
78
+ "version": "8.40.0",
78
79
  "license": "MIT",
79
80
  "engines": {
80
81
  "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -182,7 +183,7 @@
182
183
  }
183
184
  },
184
185
  "node_modules/@sap/cds": {
185
- "version": "6.7.2",
186
+ "version": "6.8.1",
186
187
  "license": "SEE LICENSE IN LICENSE",
187
188
  "dependencies": {
188
189
  "@sap/cds-compiler": "^3.2.0",
@@ -197,7 +198,7 @@
197
198
  }
198
199
  },
199
200
  "node_modules/@sap/cds-compiler": {
200
- "version": "3.8.2",
201
+ "version": "3.9.2",
201
202
  "license": "SEE LICENSE IN LICENSE",
202
203
  "dependencies": {
203
204
  "antlr4": "4.9.3"
@@ -212,12 +213,12 @@
212
213
  }
213
214
  },
214
215
  "node_modules/@sap/cds-foss": {
215
- "version": "4.0.0",
216
+ "version": "4.0.1",
216
217
  "license": "See LICENSE in LICENSE",
217
218
  "dependencies": {
218
219
  "big.js": "^6.1.1",
219
220
  "generic-pool": "^3.8.2",
220
- "uuid": "^8.3.2",
221
+ "uuid": "^9.0.0",
221
222
  "xmlbuilder": "^15.1.1",
222
223
  "yaml": "^2.1.1"
223
224
  },
@@ -226,7 +227,7 @@
226
227
  }
227
228
  },
228
229
  "node_modules/@sap/cds-mtxs": {
229
- "version": "1.7.3",
230
+ "version": "1.8.1",
230
231
  "license": "SEE LICENSE IN LICENSE",
231
232
  "dependencies": {
232
233
  "@sap/hdi-deploy": "^4",
@@ -686,7 +687,7 @@
686
687
  "license": "MIT"
687
688
  },
688
689
  "node_modules/axios": {
689
- "version": "1.3.6",
690
+ "version": "1.4.0",
690
691
  "license": "MIT",
691
692
  "dependencies": {
692
693
  "follow-redirects": "^1.15.0",
@@ -1082,13 +1083,13 @@
1082
1083
  }
1083
1084
  },
1084
1085
  "node_modules/eslint": {
1085
- "version": "8.39.0",
1086
+ "version": "8.40.0",
1086
1087
  "license": "MIT",
1087
1088
  "dependencies": {
1088
1089
  "@eslint-community/eslint-utils": "^4.2.0",
1089
1090
  "@eslint-community/regexpp": "^4.4.0",
1090
- "@eslint/eslintrc": "^2.0.2",
1091
- "@eslint/js": "8.39.0",
1091
+ "@eslint/eslintrc": "^2.0.3",
1092
+ "@eslint/js": "8.40.0",
1092
1093
  "@humanwhocodes/config-array": "^0.11.8",
1093
1094
  "@humanwhocodes/module-importer": "^1.0.1",
1094
1095
  "@nodelib/fs.walk": "^1.2.8",
@@ -1099,8 +1100,8 @@
1099
1100
  "doctrine": "^3.0.0",
1100
1101
  "escape-string-regexp": "^4.0.0",
1101
1102
  "eslint-scope": "^7.2.0",
1102
- "eslint-visitor-keys": "^3.4.0",
1103
- "espree": "^9.5.1",
1103
+ "eslint-visitor-keys": "^3.4.1",
1104
+ "espree": "^9.5.2",
1104
1105
  "esquery": "^1.4.2",
1105
1106
  "esutils": "^2.0.2",
1106
1107
  "fast-deep-equal": "^3.1.3",
@@ -1151,7 +1152,7 @@
1151
1152
  }
1152
1153
  },
1153
1154
  "node_modules/eslint-visitor-keys": {
1154
- "version": "3.4.0",
1155
+ "version": "3.4.1",
1155
1156
  "license": "Apache-2.0",
1156
1157
  "engines": {
1157
1158
  "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -1161,12 +1162,12 @@
1161
1162
  }
1162
1163
  },
1163
1164
  "node_modules/espree": {
1164
- "version": "9.5.1",
1165
+ "version": "9.5.2",
1165
1166
  "license": "BSD-2-Clause",
1166
1167
  "dependencies": {
1167
1168
  "acorn": "^8.8.0",
1168
1169
  "acorn-jsx": "^5.3.2",
1169
- "eslint-visitor-keys": "^3.4.0"
1170
+ "eslint-visitor-keys": "^3.4.1"
1170
1171
  },
1171
1172
  "engines": {
1172
1173
  "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -2056,7 +2057,7 @@
2056
2057
  "optional": true
2057
2058
  },
2058
2059
  "node_modules/node-fetch": {
2059
- "version": "2.6.9",
2060
+ "version": "2.6.11",
2060
2061
  "license": "MIT",
2061
2062
  "optional": true,
2062
2063
  "dependencies": {
@@ -2760,13 +2761,13 @@
2760
2761
  }
2761
2762
  },
2762
2763
  "node_modules/tar": {
2763
- "version": "6.1.13",
2764
+ "version": "6.1.14",
2764
2765
  "license": "ISC",
2765
2766
  "optional": true,
2766
2767
  "dependencies": {
2767
2768
  "chownr": "^2.0.0",
2768
2769
  "fs-minipass": "^2.0.0",
2769
- "minipass": "^4.0.0",
2770
+ "minipass": "^5.0.0",
2770
2771
  "minizlib": "^2.1.1",
2771
2772
  "mkdirp": "^1.0.3",
2772
2773
  "yallist": "^4.0.0"
@@ -2776,7 +2777,7 @@
2776
2777
  }
2777
2778
  },
2778
2779
  "node_modules/tar/node_modules/minipass": {
2779
- "version": "4.2.8",
2780
+ "version": "5.0.0",
2780
2781
  "license": "ISC",
2781
2782
  "optional": true,
2782
2783
  "engines": {
@@ -2889,7 +2890,7 @@
2889
2890
  }
2890
2891
  },
2891
2892
  "node_modules/uuid": {
2892
- "version": "8.3.2",
2893
+ "version": "9.0.0",
2893
2894
  "license": "MIT",
2894
2895
  "bin": {
2895
2896
  "uuid": "dist/bin/uuid"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "6.7.2",
3
+ "version": "6.8.1",
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": [
@@ -16,13 +16,14 @@
16
16
  },
17
17
  "main": "lib/index.js",
18
18
  "dependencies": {
19
- "@sap/cds": "^6.7.0",
19
+ "@sap/cds": "~6.8.0",
20
+ "@sap/cds-compiler": "~3.9.0",
20
21
  "@sap/cds-foss": "^4",
21
- "@sap/cds-mtxs": "^1.7.0",
22
+ "@sap/cds-mtxs": "~1.8.0",
22
23
  "@sap/eslint-plugin-cds": "^2.6.0",
23
24
  "axios": ">=0.21",
24
25
  "eslint": "^8",
25
- "express": "^4.17.1",
26
+ "express": "^4.17.3",
26
27
  "livereload-js": "^4.0.1",
27
28
  "md5": "^2.3.0",
28
29
  "mustache": "^4.0.1",
@@ -1,7 +0,0 @@
1
- {
2
- "requires": {
3
- "approuter": {
4
- "kind": "cloudfoundry"
5
- }
6
- }
7
- }
@@ -1,9 +0,0 @@
1
- {
2
- "requires": {
3
- "[{{cap.for}}]": {
4
- "approuter": {
5
- "kind": "cloudfoundry"
6
- }
7
- }
8
- }
9
- }
@@ -1,9 +0,0 @@
1
- {
2
- "cds": {
3
- "requires": {
4
- "approuter": {
5
- "kind": "cloudfoundry"
6
- }
7
- }
8
- }
9
- }
@@ -1,11 +0,0 @@
1
- {
2
- "cds": {
3
- "requires": {
4
- "[{{cap.for}}]": {
5
- "approuter": {
6
- "kind": "cloudfoundry"
7
- }
8
- }
9
- }
10
- }
11
- }
@@ -1,5 +0,0 @@
1
- {
2
- "dependencies": {
3
- "@sap/audit-logging": "^5"
4
- }
5
- }
@@ -1,9 +0,0 @@
1
- {
2
- "cds": {
3
- "requires": {
4
- "messaging": {
5
- "kind": "enterprise-messaging"
6
- }
7
- }
8
- }
9
- }
@@ -1,11 +0,0 @@
1
- {
2
- "cds": {
3
- "requires": {
4
- "[{{cap.for}}]": {
5
- "messaging": {
6
- "kind": "enterprise-messaging"
7
- }
8
- }
9
- }
10
- }
11
- }
@@ -1,7 +0,0 @@
1
- {
2
- "requires": {
3
- "messaging": {
4
- "kind": "enterprise-messaging"
5
- }
6
- }
7
- }
@@ -1,9 +0,0 @@
1
- {
2
- "requires": {
3
- "[{{cap.for}}]": {
4
- "messaging": {
5
- "kind": "enterprise-messaging"
6
- }
7
- }
8
- }
9
- }
@@ -1,7 +0,0 @@
1
- {
2
- "cds": {
3
- "requires": {
4
- "extensibility": true
5
- }
6
- }
7
- }
@@ -1,9 +0,0 @@
1
- {
2
- "cds": {
3
- "requires": {
4
- "[{{cap.for}}]": {
5
- "extensibility": true
6
- }
7
- }
8
- }
9
- }
@@ -1,5 +0,0 @@
1
- {
2
- "requires": {
3
- "extensibility": true
4
- }
5
- }
@@ -1,7 +0,0 @@
1
- {
2
- "requires": {
3
- "[{{cap.for}}]": {
4
- "extensibility": true
5
- }
6
- }
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "requires": {
3
- "db": {
4
- "kind": "{{#cap.isMultitenant}}hana-mt{{/cap.isMultitenant}}{{^cap.isMultitenant}}hana-cloud{{/cap.isMultitenant}}"
5
- }
6
- }
7
- }
@@ -1,12 +0,0 @@
1
- {
2
- "requires": {
3
- "[{{cap.for}}]": {
4
- "db": {
5
- "kind": "{{#cap.isMultitenant}}hana-mt{{/cap.isMultitenant}}{{^cap.isMultitenant}}hana-cloud{{/cap.isMultitenant}}"
6
- }
7
- },
8
- "db": {
9
- "kind": "{{#cap.isMultitenant}}sqlite{{/cap.isMultitenant}}{{^cap.isMultitenant}}sql{{/cap.isMultitenant}}"
10
- }
11
- }
12
- }
@@ -1,5 +0,0 @@
1
- {
2
- "requires": {
3
- "db": "{{#cap.isMultitenant}}hana-mt{{/cap.isMultitenant}}{{^cap.isMultitenant}}hana-cloud{{/cap.isMultitenant}}"
4
- }
5
- }
@@ -1,8 +0,0 @@
1
- {
2
- "requires": {
3
- "[{{cap.for}}]": {
4
- "db": "{{#cap.isMultitenant}}hana-mt{{/cap.isMultitenant}}{{^cap.isMultitenant}}hana-cloud{{/cap.isMultitenant}}"
5
- },
6
- "db": "{{#cap.isMultitenant}}sqlite{{/cap.isMultitenant}}{{^cap.isMultitenant}}sql{{/cap.isMultitenant}}"
7
- }
8
- }
@@ -1,9 +0,0 @@
1
- {
2
- "cds": {
3
- "requires": {
4
- "db": {
5
- "kind": "{{#cap.isMultitenant}}sql-mt{{/cap.isMultitenant}}{{^cap.isMultitenant}}hana-cloud{{/cap.isMultitenant}}"
6
- }
7
- }
8
- }
9
- }
@@ -1,14 +0,0 @@
1
- {
2
- "cds": {
3
- "requires": {
4
- "[{{cap.for}}]": {
5
- "db": {
6
- "kind": "{{#cap.isMultitenant}}hana-mt{{/cap.isMultitenant}}{{^cap.isMultitenant}}hana-cloud{{/cap.isMultitenant}}"
7
- }
8
- },
9
- "db": {
10
- "kind": "{{#cap.isMultitenant}}sqlite{{/cap.isMultitenant}}{{^cap.isMultitenant}}sql{{/cap.isMultitenant}}"
11
- }
12
- }
13
- }
14
- }
@@ -1,7 +0,0 @@
1
- {
2
- "cds": {
3
- "requires": {
4
- "db": "{{#cap.isMultitenant}}sql-mt{{/cap.isMultitenant}}{{^cap.isMultitenant}}hana-cloud{{/cap.isMultitenant}}"
5
- }
6
- }
7
- }
@@ -1,10 +0,0 @@
1
- {
2
- "cds": {
3
- "requires": {
4
- "[{{cap.for}}]": {
5
- "db": "{{#cap.isMultitenant}}hana-mt{{/cap.isMultitenant}}{{^cap.isMultitenant}}hana-cloud{{/cap.isMultitenant}}"
6
- },
7
- "db": "{{#cap.isMultitenant}}sqlite{{/cap.isMultitenant}}{{^cap.isMultitenant}}sql{{/cap.isMultitenant}}"
8
- }
9
- }
10
- }
@@ -1,5 +0,0 @@
1
- {
2
- "dependencies": {
3
- "hdb": "^0.19.0"
4
- }
5
- }
@@ -1,103 +0,0 @@
1
-
2
- {{/*
3
- SAPCP Service Bindings: volume mounts
4
- */}}
5
- {{- define "cap.sapcp.bindingsVolumeMounts" }}
6
- {{- $ := . -}}
7
- {{- range $key, $binding := .bindings }}
8
- - name: {{ $key | replace "_" "-" }}-secret
9
- mountPath: /bindings/{{ $key }}
10
- readOnly: true
11
- {{- end }}
12
- {{- end }}
13
-
14
- {{/*
15
- SAPCP Service Bindings: volumes
16
- */}}
17
- {{- define "cap.sapcp.bindingsVolumes" -}}
18
- {{- $ := . -}}
19
- {{ range $bindingName, $binding := .bindings -}}
20
- {{- $secret := include "cap.sapcp.bindingSecretName" (dict "root" $.root "name" $.name "bindingName" $bindingName "binding" $binding) }}
21
- - name: {{ $bindingName | replace "_" "-" }}-secret
22
- secret:
23
- secretName: {{ $secret | quote }}
24
- {{- end -}}
25
- {{- end -}}
26
-
27
-
28
- {{/*
29
- Binding Secret Name
30
- */}}
31
- {{- define "cap.sapcp.bindingName" -}}
32
- {{ print $.root.Release.Name "-" $.name "-" $.bindingName | replace "_" "-" }}
33
- {{- end -}}
34
-
35
- {{/*
36
- SAPCP Service Bindings: bindings
37
- */}}
38
- {{- define "cap.sapcp.bindings" -}}
39
- {{- $ := . -}}
40
- {{- range $name, $params := .bindings }}
41
- {{- if not $params.fromSecret }}
42
- ---
43
- apiVersion: services.cloud.sap.com/v1
44
- kind: ServiceBinding
45
- metadata:
46
- namespace: {{ $.Release.Namespace }}
47
- name: {{ include "cap.sapcp.bindingName" (dict "root" $.root "name" $.name "bindingName" $name) }}
48
- labels: {{- include "cap.labels" $ | nindent 4 }}
49
- spec:
50
- serviceInstanceName: {{include "cap.sapcp.serviceInstanceName" (dict "binding" $params "release" $.Release.Name) }}
51
- {{- if $params.externalName }}
52
- externalName: {{ $params.externalName }}
53
- {{- end }}
54
- {{- if $params.secretName }}
55
- secretName: {{ $params.secretName }}
56
- {{- end }}
57
- {{- if $params.parameters }}
58
- parameters: {{ $params.parameters | toYaml | nindent 4 }}
59
- {{- end }}
60
- {{- if $params.parametersFrom }}
61
- parametersFrom: {{ $params.parametersFrom | toYaml | nindent 4 }}
62
- {{- end }}
63
- {{- if $params.credentialsRotationPolicy }}
64
- credentialsRotationPolicy: {{ $params.credentialsRotationPolicy | toYaml | nindent 4 }}
65
- {{- end }}
66
- {{- end }}
67
- {{- end }}
68
- {{- end }}
69
-
70
- {{/*
71
- Binding Secret Name
72
- */}}
73
- {{- define "cap.sapcp.bindingSecretName" -}}
74
- {{- $secretName := include "cap.sapcp.bindingName" . }}
75
- {{- if .binding.fromSecret }}
76
- {{- $secretName = .binding.fromSecret}}
77
- {{- else if .binding.secretName }}
78
- {{- $secretName = .binding.secretName }}
79
- {{- end }}
80
- {{- $secretName }}
81
- {{- end }}
82
-
83
- {{/*
84
- Service Instance
85
- from web-application helm chart
86
- */}}
87
- {{- define "cap.sapcp.serviceInstanceName" -}}
88
- {{- if .binding.serviceInstanceFullname }}
89
- {{- if gt (len .binding.serviceInstanceFullname) 63 }}
90
- {{- fail (printf "name exceeds 63 characters: '%s'" .binding.serviceInstanceFullname) }}
91
- {{- end }}
92
- {{- .binding.serviceInstanceFullname }}
93
- {{- else }}
94
- {{- $name := .binding.serviceInstanceName }}
95
- {{- if not (hasPrefix .release $name)}}
96
- {{- $name = printf "%s-%s" .release $name }}
97
- {{- end }}
98
- {{- if gt (len $name) 63 }}
99
- {{- fail (printf "name exceeds 63 characters: '%s'" $name) }}
100
- {{- end }}
101
- {{- $name }}
102
- {{- end }}
103
- {{- end }}
@@ -1,9 +0,0 @@
1
- {
2
- "cds": {
3
- "features": {
4
- "[{{cap.for}}]": {
5
- "kibana_formatter": true
6
- }
7
- }
8
- }
9
- }