@sap/cds-dk 7.1.0 → 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 (56) hide show
  1. package/bin/build.js +3 -3
  2. package/bin/cds.js +2 -1
  3. package/bin/compile/index.js +5 -1
  4. package/bin/gen.js +27 -0
  5. package/bin/help.js +2 -1
  6. package/bin/watch.js +3 -4
  7. package/bin/watched.js +2 -3
  8. package/lib/bind/bindingUtil.js +1 -0
  9. package/lib/build/buildTaskEngine.js +13 -17
  10. package/lib/build/buildTaskFactory.js +23 -27
  11. package/lib/build/buildTaskHandler.js +6 -12
  12. package/lib/build/buildTaskProviderFactory.js +9 -12
  13. package/lib/build/constants.js +2 -1
  14. package/lib/build/index.js +1 -1
  15. package/lib/build/provider/buildTaskHandlerInternal.js +2 -2
  16. package/lib/build/provider/buildTaskProviderInternal.js +15 -25
  17. package/lib/build/provider/fiori/index.js +4 -3
  18. package/lib/build/provider/hana/index.js +14 -7
  19. package/lib/build/provider/java/index.js +2 -2
  20. package/lib/build/provider/nodejs/index.js +51 -18
  21. package/lib/build/util.js +11 -19
  22. package/lib/compile/openapi/csdl2openapi.js +30 -21
  23. package/lib/compile/openapi/index.js +7 -3
  24. package/lib/import/common.js +1 -1
  25. package/lib/import/message.js +6 -1
  26. package/lib/import/odata/metadataconverter/MetadataConverter.js +13 -9
  27. package/lib/import/odata/v4parser.js +26 -12
  28. package/lib/init/constants.js +6 -11
  29. package/lib/init/index.js +84 -71
  30. package/lib/init/template/_merging/registry-mta.js +0 -12
  31. package/lib/init/template/approuter/files/mta.yaml.hbs +1 -1
  32. package/lib/init/template/approuter/index.js +7 -6
  33. package/lib/init/template/cf-manifest/files/services-manifest.yml.hbs +0 -5
  34. package/lib/init/template/cf-manifest/index.js +2 -2
  35. package/lib/init/template/h2/index.js +16 -0
  36. package/lib/init/template/hana/index.js +2 -3
  37. package/lib/init/template/helm/chart/values.root.schema.json +0 -5
  38. package/lib/init/template/helm/chart/values.schema.json +0 -4
  39. package/lib/init/template/helm/index.js +1 -1
  40. package/lib/init/template/lint/index.js +3 -7
  41. package/lib/init/template/multitenancy/files/package.json.hbs +0 -3
  42. package/lib/init/template/multitenancy/index.js +2 -0
  43. package/lib/init/template/nodejs/index.js +3 -3
  44. package/lib/init/template/pipeline/index.js +2 -4
  45. package/lib/init/template/sample/index.js +5 -7
  46. package/lib/init/template/sqlite/index.js +8 -3
  47. package/lib/init/template/tiny-sample/index.js +16 -30
  48. package/lib/init/util/mvn.js +25 -1
  49. package/lib/init/util/projectReader.js +3 -7
  50. package/lib/init/util/template.js +7 -6
  51. package/lib/watch/node-watch.js +6 -1
  52. package/npm-shrinkwrap.json +46 -84
  53. package/package.json +5 -4
  54. package/lib/init/template/auditlog/files/mta.yaml.hbs +0 -14
  55. package/lib/init/template/auditlog/files/package.json.hbs +0 -27
  56. package/lib/init/template/auditlog/index.js +0 -74
@@ -1,7 +1,8 @@
1
1
  const Mustache = require('mustache')
2
- const { copy, read, write, exists, readdir, path, isdir } = require('../../cds').utils
2
+ const cds = require('../../cds')
3
+ const { copy, read, write, exists, readdir, path, isdir } = cds.utils
3
4
 
4
- async function copyFiles(from, into, replacements, overwrite = false) {
5
+ async function renderAndCopy(from, into, replacements, overwrite = cds.cli.options.force) {
5
6
  const dirents = await readdir(from)
6
7
  await Promise.all(dirents.map(async dirent => {
7
8
  const fileNew = Mustache.render(dirent, replacements)
@@ -9,7 +10,7 @@ async function copyFiles(from, into, replacements, overwrite = false) {
9
10
  const dest = path.join(into, fileNew)
10
11
 
11
12
  if (isdir(src)) {
12
- return copyFiles(path.join(from, dirent), dest, replacements, overwrite)
13
+ return renderAndCopy(path.join(from, dirent), dest, replacements, overwrite)
13
14
  } else if (path.extname(dirent) === '.hbs') {
14
15
  const destinationPath = dest.replace('.hbs', '')
15
16
  if (overwrite || !exists(destinationPath)) {
@@ -23,11 +24,11 @@ async function copyFiles(from, into, replacements, overwrite = false) {
23
24
  }
24
25
 
25
26
  async function render(src, templateValues) {
26
- const content = await read(src, 'utf-8');
27
- return Mustache.render(content, templateValues);
27
+ const content = await read(src, 'utf-8')
28
+ return Mustache.render(content, templateValues)
28
29
  }
29
30
 
30
31
  module.exports = {
31
32
  render,
32
- copyFiles
33
+ renderAndCopy
33
34
  }
@@ -1,5 +1,6 @@
1
1
  const cds = require ('../cds')
2
2
  const DEBUG = cds.debug('cli|watch')
3
+ const { relative } = require('path')
3
4
 
4
5
  module.exports = ({ cwd, script, ext, includes=RegExp(), ignore=RegExp(), env={}, delay=200, options={} })=>{
5
6
 
@@ -52,7 +53,11 @@ module.exports = ({ cwd, script, ext, includes=RegExp(), ignore=RegExp(), env={}
52
53
  // Watching for touched files...
53
54
  const watch = require('node-watch')
54
55
  const include = RegExp(`\\.(${ext.replace(/,/g,'|')})$|${includes.source}`)
55
- const filter = f => !ignore.test(f) && include.test(f)
56
+ const filter = f => {
57
+ const isIn = !ignore.test(f) && include.test(f)
58
+ if (!isIn) DEBUG?. (`ignored: ${relative(cwd||process.cwd(), f)}`)
59
+ return isIn
60
+ }
56
61
  const watcher = watch (cwd||process.cwd(),{ recursive:true, filter, delay:0 })
57
62
  if (DEBUG) watcher.on('close', ()=> DEBUG('⚡️', 'cds watch - file watcher closed'))
58
63
  watcher.on('change', restart)
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sap/cds-dk",
9
- "version": "7.1.0",
9
+ "version": "7.2.0",
10
10
  "license": "SEE LICENSE IN LICENSE",
11
11
  "dependencies": {
12
12
  "@sap/cds": "^7",
13
13
  "@sap/cds-foss": "^4.0.2",
14
14
  "@sap/cds-mtxs": "^1.9.0",
15
15
  "@sap/eslint-plugin-cds": "^2.6.0",
16
- "axios": ">=0.21",
16
+ "@sap/hdi-deploy": "^4.8.0",
17
+ "axios": "^1",
17
18
  "eslint": "^8",
18
19
  "express": "^4.17.3",
19
20
  "livereload-js": "^4.0.1",
20
- "md5": "^2.3.0",
21
21
  "mustache": "^4.0.1",
22
22
  "node-watch": ">=0.7",
23
23
  "pluralize": "^8.0.0",
@@ -53,14 +53,14 @@
53
53
  }
54
54
  },
55
55
  "node_modules/@eslint-community/regexpp": {
56
- "version": "4.6.2",
56
+ "version": "4.8.0",
57
57
  "license": "MIT",
58
58
  "engines": {
59
59
  "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
60
60
  }
61
61
  },
62
62
  "node_modules/@eslint/eslintrc": {
63
- "version": "2.1.1",
63
+ "version": "2.1.2",
64
64
  "license": "MIT",
65
65
  "dependencies": {
66
66
  "ajv": "^6.12.4",
@@ -100,7 +100,7 @@
100
100
  "license": "MIT"
101
101
  },
102
102
  "node_modules/@eslint/js": {
103
- "version": "8.46.0",
103
+ "version": "8.48.0",
104
104
  "license": "MIT",
105
105
  "engines": {
106
106
  "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -112,7 +112,7 @@
112
112
  "optional": true
113
113
  },
114
114
  "node_modules/@humanwhocodes/config-array": {
115
- "version": "0.11.10",
115
+ "version": "0.11.11",
116
116
  "license": "Apache-2.0",
117
117
  "dependencies": {
118
118
  "@humanwhocodes/object-schema": "^1.2.1",
@@ -249,7 +249,7 @@
249
249
  }
250
250
  },
251
251
  "node_modules/@sap/cds": {
252
- "version": "7.1.0",
252
+ "version": "7.2.0",
253
253
  "license": "SEE LICENSE IN LICENSE",
254
254
  "dependencies": {
255
255
  "@sap/cds-compiler": "^4",
@@ -265,7 +265,7 @@
265
265
  }
266
266
  },
267
267
  "node_modules/@sap/cds-compiler": {
268
- "version": "4.1.2",
268
+ "version": "4.2.2",
269
269
  "license": "SEE LICENSE IN LICENSE",
270
270
  "dependencies": {
271
271
  "antlr4": "4.9.3"
@@ -280,7 +280,7 @@
280
280
  }
281
281
  },
282
282
  "node_modules/@sap/cds-fiori": {
283
- "version": "1.0.0",
283
+ "version": "1.1.0",
284
284
  "license": "SEE LICENSE IN LICENSE",
285
285
  "peerDependencies": {
286
286
  "@sap/cds": ">=7",
@@ -302,11 +302,11 @@
302
302
  }
303
303
  },
304
304
  "node_modules/@sap/cds-mtxs": {
305
- "version": "1.10.0",
305
+ "version": "1.11.0",
306
306
  "license": "SEE LICENSE IN LICENSE",
307
307
  "dependencies": {
308
308
  "@sap/hdi-deploy": "^4",
309
- "axios": ">=0.27.2"
309
+ "axios": "^1"
310
310
  },
311
311
  "bin": {
312
312
  "cds-mtx": "bin/cds-mtx.js",
@@ -328,7 +328,7 @@
328
328
  }
329
329
  },
330
330
  "node_modules/@sap/hana-client": {
331
- "version": "2.17.21",
331
+ "version": "2.17.22",
332
332
  "hasInstallScript": true,
333
333
  "license": "SEE LICENSE IN developer-license-3_1.txt",
334
334
  "dependencies": {
@@ -339,13 +339,13 @@
339
339
  }
340
340
  },
341
341
  "node_modules/@sap/hdi": {
342
- "version": "4.4.0",
342
+ "version": "4.5.0",
343
343
  "license": "See LICENSE file",
344
344
  "dependencies": {
345
345
  "async": "3.2.3"
346
346
  },
347
347
  "engines": {
348
- "node": ">=12 <=18"
348
+ "node": ">=12 <=20"
349
349
  },
350
350
  "peerDependencies": {
351
351
  "@sap/hana-client": "^2 >= 2.5",
@@ -361,11 +361,11 @@
361
361
  }
362
362
  },
363
363
  "node_modules/@sap/hdi-deploy": {
364
- "version": "4.7.1",
364
+ "version": "4.8.0",
365
365
  "license": "See LICENSE file",
366
366
  "dependencies": {
367
- "@sap/hana-client": "2.17.21",
368
- "@sap/hdi": "4.4.0",
367
+ "@sap/hana-client": "2.17.22",
368
+ "@sap/hdi": "4.5.0",
369
369
  "@sap/xsenv": "3.4.0",
370
370
  "async": "3.2.3",
371
371
  "dotenv": "10.0.0",
@@ -374,7 +374,7 @@
374
374
  "micromatch": "4.0.4"
375
375
  },
376
376
  "engines": {
377
- "node": "^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0"
377
+ "node": "^12.0.0 || ^14.0.0 || ^16.0.0 || ^18.0.0 || ^20.0.0"
378
378
  }
379
379
  },
380
380
  "node_modules/@sap/xsenv": {
@@ -482,39 +482,16 @@
482
482
  "optional": true
483
483
  },
484
484
  "node_modules/agentkeepalive": {
485
- "version": "4.3.0",
485
+ "version": "4.5.0",
486
486
  "license": "MIT",
487
487
  "optional": true,
488
488
  "dependencies": {
489
- "debug": "^4.1.0",
490
- "depd": "^2.0.0",
491
489
  "humanize-ms": "^1.2.1"
492
490
  },
493
491
  "engines": {
494
492
  "node": ">= 8.0.0"
495
493
  }
496
494
  },
497
- "node_modules/agentkeepalive/node_modules/debug": {
498
- "version": "4.3.4",
499
- "license": "MIT",
500
- "optional": true,
501
- "dependencies": {
502
- "ms": "2.1.2"
503
- },
504
- "engines": {
505
- "node": ">=6.0"
506
- },
507
- "peerDependenciesMeta": {
508
- "supports-color": {
509
- "optional": true
510
- }
511
- }
512
- },
513
- "node_modules/agentkeepalive/node_modules/ms": {
514
- "version": "2.1.2",
515
- "license": "MIT",
516
- "optional": true
517
- },
518
495
  "node_modules/aggregate-error": {
519
496
  "version": "3.1.0",
520
497
  "license": "MIT",
@@ -609,7 +586,7 @@
609
586
  "license": "MIT"
610
587
  },
611
588
  "node_modules/axios": {
612
- "version": "1.4.0",
589
+ "version": "1.5.0",
613
590
  "license": "MIT",
614
591
  "dependencies": {
615
592
  "follow-redirects": "^1.15.0",
@@ -762,13 +739,6 @@
762
739
  "url": "https://github.com/chalk/chalk?sponsor=1"
763
740
  }
764
741
  },
765
- "node_modules/charenc": {
766
- "version": "0.0.2",
767
- "license": "BSD-3-Clause",
768
- "engines": {
769
- "node": "*"
770
- }
771
- },
772
742
  "node_modules/chownr": {
773
743
  "version": "2.0.0",
774
744
  "license": "ISC",
@@ -877,13 +847,6 @@
877
847
  "node": ">= 8"
878
848
  }
879
849
  },
880
- "node_modules/crypt": {
881
- "version": "0.0.2",
882
- "license": "BSD-3-Clause",
883
- "engines": {
884
- "node": "*"
885
- }
886
- },
887
850
  "node_modules/debug": {
888
851
  "version": "3.1.0",
889
852
  "license": "MIT",
@@ -1010,13 +973,13 @@
1010
973
  }
1011
974
  },
1012
975
  "node_modules/eslint": {
1013
- "version": "8.46.0",
976
+ "version": "8.48.0",
1014
977
  "license": "MIT",
1015
978
  "dependencies": {
1016
979
  "@eslint-community/eslint-utils": "^4.2.0",
1017
980
  "@eslint-community/regexpp": "^4.6.1",
1018
- "@eslint/eslintrc": "^2.1.1",
1019
- "@eslint/js": "^8.46.0",
981
+ "@eslint/eslintrc": "^2.1.2",
982
+ "@eslint/js": "8.48.0",
1020
983
  "@humanwhocodes/config-array": "^0.11.10",
1021
984
  "@humanwhocodes/module-importer": "^1.0.1",
1022
985
  "@nodelib/fs.walk": "^1.2.8",
@@ -1027,7 +990,7 @@
1027
990
  "doctrine": "^3.0.0",
1028
991
  "escape-string-regexp": "^4.0.0",
1029
992
  "eslint-scope": "^7.2.2",
1030
- "eslint-visitor-keys": "^3.4.2",
993
+ "eslint-visitor-keys": "^3.4.3",
1031
994
  "espree": "^9.6.1",
1032
995
  "esquery": "^1.4.2",
1033
996
  "esutils": "^2.0.2",
@@ -1076,7 +1039,7 @@
1076
1039
  }
1077
1040
  },
1078
1041
  "node_modules/eslint-visitor-keys": {
1079
- "version": "3.4.2",
1042
+ "version": "3.4.3",
1080
1043
  "license": "Apache-2.0",
1081
1044
  "engines": {
1082
1045
  "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -1291,14 +1254,15 @@
1291
1254
  }
1292
1255
  },
1293
1256
  "node_modules/flat-cache": {
1294
- "version": "3.0.4",
1257
+ "version": "3.1.0",
1295
1258
  "license": "MIT",
1296
1259
  "dependencies": {
1297
- "flatted": "^3.1.0",
1260
+ "flatted": "^3.2.7",
1261
+ "keyv": "^4.5.3",
1298
1262
  "rimraf": "^3.0.2"
1299
1263
  },
1300
1264
  "engines": {
1301
- "node": "^10.12.0 || >=12.0.0"
1265
+ "node": ">=12.0.0"
1302
1266
  }
1303
1267
  },
1304
1268
  "node_modules/flatted": {
@@ -1436,7 +1400,7 @@
1436
1400
  }
1437
1401
  },
1438
1402
  "node_modules/globals": {
1439
- "version": "13.20.0",
1403
+ "version": "13.21.0",
1440
1404
  "license": "MIT",
1441
1405
  "dependencies": {
1442
1406
  "type-fest": "^0.20.2"
@@ -1697,10 +1661,6 @@
1697
1661
  "node": ">= 0.10"
1698
1662
  }
1699
1663
  },
1700
- "node_modules/is-buffer": {
1701
- "version": "1.1.6",
1702
- "license": "MIT"
1703
- },
1704
1664
  "node_modules/is-extglob": {
1705
1665
  "version": "2.1.1",
1706
1666
  "license": "MIT",
@@ -1759,6 +1719,10 @@
1759
1719
  "js-yaml": "bin/js-yaml.js"
1760
1720
  }
1761
1721
  },
1722
+ "node_modules/json-buffer": {
1723
+ "version": "3.0.1",
1724
+ "license": "MIT"
1725
+ },
1762
1726
  "node_modules/json-schema-traverse": {
1763
1727
  "version": "0.4.1",
1764
1728
  "license": "MIT"
@@ -1767,6 +1731,13 @@
1767
1731
  "version": "1.0.1",
1768
1732
  "license": "MIT"
1769
1733
  },
1734
+ "node_modules/keyv": {
1735
+ "version": "4.5.3",
1736
+ "license": "MIT",
1737
+ "dependencies": {
1738
+ "json-buffer": "3.0.1"
1739
+ }
1740
+ },
1770
1741
  "node_modules/levn": {
1771
1742
  "version": "0.4.1",
1772
1743
  "license": "MIT",
@@ -1841,15 +1812,6 @@
1841
1812
  "license": "ISC",
1842
1813
  "optional": true
1843
1814
  },
1844
- "node_modules/md5": {
1845
- "version": "2.3.0",
1846
- "license": "BSD-3-Clause",
1847
- "dependencies": {
1848
- "charenc": "0.0.2",
1849
- "crypt": "0.0.2",
1850
- "is-buffer": "~1.1.6"
1851
- }
1852
- },
1853
1815
  "node_modules/media-typer": {
1854
1816
  "version": "0.3.0",
1855
1817
  "license": "MIT",
@@ -2069,7 +2031,7 @@
2069
2031
  }
2070
2032
  },
2071
2033
  "node_modules/node-fetch": {
2072
- "version": "2.6.12",
2034
+ "version": "2.7.0",
2073
2035
  "license": "MIT",
2074
2036
  "optional": true,
2075
2037
  "dependencies": {
@@ -2155,7 +2117,7 @@
2155
2117
  }
2156
2118
  },
2157
2119
  "node_modules/node-watch": {
2158
- "version": "0.7.3",
2120
+ "version": "0.7.4",
2159
2121
  "license": "MIT",
2160
2122
  "engines": {
2161
2123
  "node": ">=6"
@@ -3044,7 +3006,7 @@
3044
3006
  }
3045
3007
  },
3046
3008
  "node_modules/yaml": {
3047
- "version": "2.3.1",
3009
+ "version": "2.3.2",
3048
3010
  "license": "ISC",
3049
3011
  "engines": {
3050
3012
  "node": ">= 14"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "7.1.0",
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",
@@ -39,5 +39,6 @@
39
39
  "lib/",
40
40
  "npm-shrinkwrap.json",
41
41
  "LICENSE"
42
- ]
42
+ ],
43
+ "_hasShrinkwrap": true
43
44
  }
@@ -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
- }