@sap/cds-dk 9.5.0 → 9.6.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 (96) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/bin/cds.js +1 -1
  3. package/bin/compile/index.js +3 -2
  4. package/bin/env.js +3 -3
  5. package/bin/up.js +22 -16
  6. package/bin/util/containerize.js +27 -14
  7. package/lib/build/provider/internalBuildPlugin.js +23 -0
  8. package/lib/build/util.js +33 -16
  9. package/lib/import/common.js +7 -1
  10. package/lib/import/odata/v4parser.js +25 -38
  11. package/lib/init/constants.js +1 -1
  12. package/lib/init/index.js +7 -1
  13. package/lib/init/projectReader.js +21 -10
  14. package/lib/init/template/ams/index.js +2 -2
  15. package/lib/init/template/app-frontend/files/ui5.yaml.hbs +1 -0
  16. package/lib/init/template/app-frontend/index.js +2 -2
  17. package/lib/init/template/application-logging/index.js +2 -2
  18. package/lib/init/template/approuter/index.js +9 -5
  19. package/lib/init/template/attachments/index.js +4 -2
  20. package/lib/init/template/audit-logging/index.js +4 -2
  21. package/lib/init/template/cloud-logging/index.js +4 -2
  22. package/lib/init/template/connectivity/index.js +2 -2
  23. package/lib/init/template/console/files/package.json +5 -0
  24. package/lib/init/template/console/index.js +25 -0
  25. package/lib/init/template/containerize/index.js +4 -2
  26. package/lib/init/template/destination/index.js +4 -2
  27. package/lib/init/template/dynatrace/files/package.json.hbs +2 -2
  28. package/lib/init/template/dynatrace/index.js +4 -2
  29. package/lib/init/template/enterprise-messaging/files/mta.yaml.hbs +3 -1
  30. package/lib/init/template/enterprise-messaging/index.js +4 -2
  31. package/lib/init/template/enterprise-messaging-shared/index.js +4 -2
  32. package/lib/init/template/github-actions/files/workflows/release.yaml.hbs +2 -2
  33. package/lib/init/template/github-actions/index.js +4 -4
  34. package/lib/init/template/hana/index.js +4 -4
  35. package/lib/init/template/helm/index.js +6 -3
  36. package/lib/init/template/helm-unified-runtime/index.js +1 -0
  37. package/lib/init/template/html5-repo/files/ui5.yaml.hbs +1 -0
  38. package/lib/init/template/html5-repo/index.js +9 -7
  39. package/lib/init/template/ias/index.js +2 -2
  40. package/lib/init/template/java/index.js +14 -0
  41. package/lib/init/template/kafka/index.js +4 -2
  42. package/lib/init/template/kyma/index.js +124 -13
  43. package/lib/init/template/malware-scanner/index.js +4 -2
  44. package/lib/init/template/mta/index.js +1 -1
  45. package/lib/init/template/multitenancy/index.js +7 -4
  46. package/lib/init/template/nodejs/files/.vscode/extensions.json +0 -3
  47. package/lib/init/template/pipeline/files/ui5.yaml.hbs +1 -0
  48. package/lib/init/template/portal/index.js +6 -3
  49. package/lib/init/template/postgres/index.js +2 -2
  50. package/lib/init/template/redis/index.js +2 -3
  51. package/lib/init/template/redis-messaging/index.js +2 -3
  52. package/lib/init/template/sample/files/_i18n/i18n_de.properties +9 -0
  53. package/lib/init/template/sample/files/_i18n/i18n_fr.properties +1 -0
  54. package/lib/init/template/sample/files/app/_i18n/i18n.properties +17 -0
  55. package/lib/init/template/sample/files/app/_i18n/i18n_de.properties +16 -2
  56. package/lib/init/template/sample/files/app/admin-authors/webapp/i18n/i18n.properties +3 -11
  57. package/lib/init/template/sample/files/app/admin-authors/webapp/i18n/i18n_de.properties +3 -0
  58. package/lib/init/template/sample/files/app/admin-authors/webapp/i18n/i18n_en.properties +3 -0
  59. package/lib/init/template/sample/files/app/admin-authors/webapp/manifest.json +1 -1
  60. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n.properties +3 -11
  61. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n_de.properties +3 -0
  62. package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n_en.properties +3 -0
  63. package/lib/init/template/sample/files/app/admin-books/webapp/manifest.json +1 -1
  64. package/lib/init/template/sample/files/app/appconfig/fioriSandboxConfig.json +6 -6
  65. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n.properties +3 -11
  66. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n_de.properties +3 -0
  67. package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n_en.properties +3 -0
  68. package/lib/init/template/sample/files/app/browse/webapp/manifest.json +1 -1
  69. package/lib/init/template/sample/files/app/common.cds +2 -1
  70. package/lib/init/template/sample/files/app/fiori-apps.html +32 -12
  71. package/lib/init/template/sample/files/app/genres/fiori-service.cds +1 -1
  72. package/lib/init/template/sample/files/app/genres/webapp/i18n/i18n.properties +3 -4
  73. package/lib/init/template/sample/files/app/genres/webapp/i18n/i18n_de.properties +3 -2
  74. package/lib/init/template/sample/files/app/genres/webapp/i18n/i18n_en.properties +3 -0
  75. package/lib/init/template/sample/files/app/genres/webapp/manifest.json +2 -2
  76. package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Genres.texts.csv +43 -0
  77. package/lib/init/template/sample/index.js +14 -1
  78. package/lib/init/template/sqlite/files/package.json.hbs +13 -0
  79. package/lib/init/template/sqlite/index.js +1 -1
  80. package/lib/init/template/xsuaa/index.js +5 -2
  81. package/lib/lint/eslintHelp.json +1 -1
  82. package/lib/util/checksum.js +19 -10
  83. package/lib/util/fs.js +8 -1
  84. package/lib/util/glob.js +26 -13
  85. package/lib/util/term.js +3 -1
  86. package/lib/watch/livereload-server.js +4 -3
  87. package/lib/watch/node-watch.js +5 -8
  88. package/lib/watch/watcher.js +136 -0
  89. package/npm-shrinkwrap.json +110 -117
  90. package/package.json +2 -3
  91. package/lib/init/template/sample/files/app/_i18n/i18n_en.properties +0 -8
  92. package/lib/init/template/sqlite/files/package.json +0 -5
  93. /package/lib/init/template/{helm → kyma}/files/Chart.yaml.hbs +0 -0
  94. /package/lib/init/template/{containerize → kyma}/files/containerize.yaml.hbs +0 -0
  95. /package/lib/init/template/{helm → kyma}/files/values.schema.json +0 -0
  96. /package/lib/init/template/{helm → kyma}/files/values.yaml.hbs +0 -0
@@ -9,8 +9,8 @@ const { renderAndCopy } = require('../../template')
9
9
  module.exports = class Html5RepoTemplate extends require('../../plugin') {
10
10
 
11
11
  requires() {
12
- const { hasHelm, hasHelmUnifiedRuntime } = readProject()
13
- if (hasHelm || hasHelmUnifiedRuntime) return ['destination']
12
+ const { hasKyma } = readProject()
13
+ if (hasKyma) return ['destination']
14
14
  }
15
15
 
16
16
  static help() {
@@ -37,8 +37,8 @@ module.exports = class Html5RepoTemplate extends require('../../plugin') {
37
37
  const project = readProject()
38
38
  const {
39
39
  isJava, srvPath, appPath, apps,
40
- hasApprouter, addApprouter, addContainerize, addMultitenancy, addWorkzoneStandard,
41
- addSample, hasMta, addMta, hasXsuaa, hasMultitenancy, addHelm, addHelmUnifiedRuntime, hasUI5
40
+ hasApprouter, addApprouter, addContainerize, addKyma, addHelm, addHelmUnifiedRuntime, addMultitenancy, addWorkzoneStandard, addXsuaa,
41
+ addSample, hasMta, addMta, hasXsuaa, hasMultitenancy, hasUI5
42
42
  } = project
43
43
 
44
44
  await Promise.all(apps.map(async ({ app }) => {
@@ -65,7 +65,7 @@ module.exports = class Html5RepoTemplate extends require('../../plugin') {
65
65
  await merge({ cds: { requires: { 'html5-repo': true } } }).into('mtx/sidecar/package.json')
66
66
  }
67
67
 
68
- if (addMta || (addApprouter || addWorkzoneStandard || addMultitenancy || addSample) && hasMta) {
68
+ if (addMta || (addXsuaa || addApprouter || addWorkzoneStandard || addMultitenancy || addSample) && hasMta) {
69
69
  const srv = srv4(srvPath)
70
70
  project.apps = apps
71
71
  const relationships = [{
@@ -109,7 +109,9 @@ module.exports = class Html5RepoTemplate extends require('../../plugin') {
109
109
  })
110
110
  }
111
111
 
112
- if (addContainerize) {
112
+ // cds10
113
+ // needed because of adding kyma to cli options in case of helm
114
+ if (addContainerize || (addKyma && !addHelm && !addHelmUnifiedRuntime)) {
113
115
  const additions = [{
114
116
  in: 'modules',
115
117
  where: { name: `${project.appName}-html5-deployer` }
@@ -117,7 +119,7 @@ module.exports = class Html5RepoTemplate extends require('../../plugin') {
117
119
  await merge(__dirname, '/files/containerize.yaml.hbs').into('containerize.yaml', { with: project, additions })
118
120
  }
119
121
 
120
- if (addHelm || addHelmUnifiedRuntime) {
122
+ if (addKyma) {
121
123
  await renderAndCopy(join(__dirname, 'files/html5-deployer.package.json.hbs'), 'app/html5-deployer/package.json', project)
122
124
  await merge(__dirname, 'files/values.yaml.hbs').into('chart/values.yaml', { with: project })
123
125
  }
@@ -24,7 +24,7 @@ module.exports = class IasTemplate extends require('../../plugin') {
24
24
 
25
25
  async combine() {
26
26
  const project = readProject()
27
- const { isJava, addMta, hasMta, addCfManifest, addHelm, addHelmUnifiedRuntime, addMultitenancy, hasApprouter, hasMultitenancy, srvPath } = project
27
+ const { isJava, addMta, hasMta, addCfManifest, addKyma, addMultitenancy, hasApprouter, hasMultitenancy, srvPath } = project
28
28
 
29
29
  if (addMultitenancy) {
30
30
  const conf = exists('mtx/sidecar/package.json') ? await read('mtx/sidecar/package.json') : {}
@@ -63,7 +63,7 @@ module.exports = class IasTemplate extends require('../../plugin') {
63
63
  await merge(__dirname, 'files/mta.yaml.hbs').into('mta.yaml', { project, additions, overwrites })
64
64
  }
65
65
 
66
- if (addHelm || addHelmUnifiedRuntime) {
66
+ if (addKyma) {
67
67
  const identity = { in: 'dependencies', where: { 'alias': 'identity' } }
68
68
  await merge(__dirname, 'files/Chart.yaml.hbs').into('chart/Chart.yaml', { project, additions: [identity] })
69
69
  await merge(__dirname, 'files/values.yaml.hbs').into('chart/values.yaml', { project })
@@ -3,6 +3,7 @@ const cds = require('../../../cds')
3
3
  const { exists, copy, rimraf, fs:{promises:{ mkdtemp }}, path } = cds.utils, { join } = path
4
4
  const cmd = require('../../../util/command')
5
5
  const mvn = require('../../mvn')
6
+ const { merge } = require('../../merge')
6
7
  const { bold, info, link } = require('../../../util/term')
7
8
  const { URLS, OPTIONS: { NODEJS, JAVA }, COMMAND_ADD } = require('../../constants')
8
9
  const { command, options } = cds.cli
@@ -33,9 +34,22 @@ module.exports = class JavaTemplate extends require('../../plugin') {
33
34
  console.log(`using Maven archetype version ${archetypeVersion}`)
34
35
 
35
36
  const temp = await mkdtemp(join(os.tmpdir(), `${path.basename(cds.root)}_`))
37
+ // preserve existing package.json (if any)
38
+ let preservedPackageJsonPath
39
+ if (exists('package.json')) {
40
+ preservedPackageJsonPath = join(temp, 'package.json')
41
+ await copy('package.json').to(preservedPackageJsonPath)
42
+ }
36
43
  try {
37
44
  await cmd.spawnCommand('mvn', params, { cwd: temp })
38
45
  await copy(join(temp, artifactId)).to(cds.root)
46
+ if (preservedPackageJsonPath) {
47
+ // merge template package.json into preserved one
48
+ // (not the other way around)
49
+ // to give preserved values precedence
50
+ await merge('package.json').into(preservedPackageJsonPath)
51
+ await copy(preservedPackageJsonPath).to('package.json')
52
+ }
39
53
  } catch (err) {
40
54
  if (err.code === 'ENOENT' && err.path === 'mvn') {
41
55
  throw `Maven executable 'mvn' not found. Follow ${info(URLS.MAVEN_INSTALL_HELP)} and install Maven on your machine.`
@@ -4,6 +4,7 @@ const { readProject } = require('../../projectReader')
4
4
  const { merge } = require('../../merge')
5
5
  const { srv4, kafkaMessaging } = require('../../registries/mta')
6
6
  const mvn = require('../../mvn')
7
+ const KymaTemplate = require('../kyma')
7
8
 
8
9
  module.exports = class KafkaTemplate extends require('../../plugin') {
9
10
 
@@ -28,7 +29,7 @@ module.exports = class KafkaTemplate extends require('../../plugin') {
28
29
 
29
30
  async combine() {
30
31
  const project = readProject()
31
- const { addMta, srvPath, addHelm, addHelmUnifiedRuntime } = project
32
+ const { addMta, srvPath, addKyma } = project
32
33
 
33
34
  if (addMta) {
34
35
  const srv = srv4(srvPath)
@@ -42,8 +43,9 @@ module.exports = class KafkaTemplate extends require('../../plugin') {
42
43
  })
43
44
  }
44
45
 
45
- if (addHelm || addHelmUnifiedRuntime) {
46
+ if (addKyma) {
46
47
  await merge(__dirname, 'files/values.yaml').into('chart/values.yaml')
48
+ await KymaTemplate.mergeDependency("service-instance", "kafka")
47
49
  }
48
50
  }
49
51
  }
@@ -1,23 +1,134 @@
1
- const cds = require('../../../../lib/cds')
1
+ const { join } = require('path')
2
+ const cds = require('../../../cds')
3
+ const { exists, rimraf, copy, yaml } = cds.utils
4
+ const { readProject } = require('../../projectReader')
5
+ const { merge } = require('../../merge')
6
+ const { ask4 } = require('../../../util/question')
7
+ const { execSync } = require('child_process')
8
+ const { mvn } = require('../../add')
2
9
 
3
- module.exports = class extends require('../../plugin') {
10
+ module.exports = class KymaTemplate extends require('../../plugin') {
4
11
 
5
- static help() {
6
- return 'Kyma deployment using Helm charts'
12
+ static hasInProduction() {
13
+ return exists('chart/Chart.yaml')
7
14
  }
8
15
 
9
- options() {
10
- return {
11
- 'unified-runtime': {
12
- type: 'boolean'
13
- }
16
+ async canRun() {
17
+ const hasInProduction = KymaTemplate.hasInProduction()
18
+ if (cds.cli.options.force) {
19
+ await rimraf(join('chart'))
20
+ await rimraf('containerize.yaml')
21
+ return true
22
+ } else if (hasInProduction) {
23
+ throw `Chart already exists. Use --force to overwrite.`
24
+ }
25
+ return true
26
+ }
27
+
28
+ static help() {
29
+ return 'Kyma deployment using Helm charts'
30
+ }
31
+
32
+ async run() {
33
+ const project = readProject()
34
+
35
+ let imagePullSecret, registry, domain, tag
36
+ if (!KymaTemplate.hasInProduction() && !project.isBas /* don't run this for the BAS Yeoman generator */) {
37
+ try {
38
+ const domainGuess = execSync(`kubectl config view --minify --output jsonpath="{.clusters[*].cluster.server}"`, { stdio: "pipe" }).toString()
39
+ const domainStartIndex = domainGuess.indexOf('api.')
40
+ if (domainStartIndex !== -1) domain = domainGuess.substring(domainStartIndex + 4)
41
+ } catch (error) { /* ignore */ }
42
+
43
+ //REVISIT: remove cds10
44
+ if (exists('containerize.yaml')) {
45
+ const { repository: r, tag: t } = yaml.parse(join(cds.root, 'containerize.yaml'))
46
+ if (r) registry = r
47
+ if (t) tag = t
48
+ }
49
+ if (!cds.cli.options.y && !cds.cli.options.force) {
50
+ registry ??= await ask4([`registry server: `])
51
+ domain ??= await ask4([`cluster domain: `])
52
+ }
53
+ }
54
+ project.registry = registry ?? '<registry-server>'
55
+ project.domain = domain ?? '<cluster-domain>'
56
+ project.imagePullSecret = imagePullSecret ?? 'docker-registry'
57
+ project.tag = tag ?? 'latest'
58
+ await copy(join(__dirname, 'files', 'values.schema.json')).to('chart/values.schema.json')
59
+ await merge(__dirname, 'files/Chart.yaml.hbs').into('chart/Chart.yaml', { with: project })
60
+ await merge(__dirname, 'files/values.yaml.hbs').into('chart/values.yaml', { with: project })
61
+ await merge(__dirname, '/files/containerize.yaml.hbs').into('containerize.yaml', { with: project })
62
+ await KymaTemplate.mergeDependency('web-application', 'srv')
63
+ if (project.isJava) await mvn.add('k8s')
64
+
65
+ }
66
+
67
+ options() {
68
+ return {
69
+ 'unified-runtime': {
70
+ type: 'boolean'
71
+ },
72
+ 'y': {
73
+ type: 'boolean',
14
74
  }
15
75
  }
76
+ }
16
77
 
17
- requires() {
18
- if (cds.cli.options['unified-runtime']) {
19
- return ['helm-unified-runtime', 'containerize']
78
+ async combine() {
79
+ // REVISIT: This must be moved to the respective plugins
80
+ const {
81
+ addHana, addMultitenancy, addXsuaa,
82
+ addApprouter, addIas, addAms, hasXsuaa, hasMultitenancy,
83
+ addHtml5Repo, hasHtml5Repo,
84
+ } = readProject()
85
+
86
+ if (addHtml5Repo || addApprouter && hasHtml5Repo) {
87
+ if (addHtml5Repo) {
88
+ await KymaTemplate.mergeDependency('service-instance', 'html5-apps-repo-host')
89
+ await KymaTemplate.mergeDependency('content-deployment', 'html5-apps-deployer')
90
+ }
91
+ if (addApprouter) {
92
+ await KymaTemplate.mergeDependency('service-instance', 'html5-apps-repo-runtime')
93
+ }
94
+ }
95
+ if (addMultitenancy || addXsuaa || addIas || addAms) {
96
+ if (addMultitenancy) {
97
+ await KymaTemplate.mergeDependency('web-application', 'sidecar')
98
+ }
99
+ if (hasXsuaa && hasMultitenancy) {
100
+ await KymaTemplate.mergeDependency('service-instance', 'saas-registry')
101
+ } else if (hasMultitenancy) {
102
+ await KymaTemplate.mergeDependency('service-instance', 'subscription-manager')
20
103
  }
21
- return ['helm', 'containerize']
22
104
  }
105
+ if (addHana || addMultitenancy) {
106
+ if (hasMultitenancy) {
107
+ await KymaTemplate.mergeDependency('service-instance', 'service-manager')
108
+ } else {
109
+ await KymaTemplate.mergeDependency('service-instance', 'hana')
110
+ await KymaTemplate.mergeDependency('content-deployment', 'hana-deployer')
111
+ }
112
+ }
113
+ }
114
+
115
+ static async mergeDependency(name, alias) {
116
+ const project = readProject()
117
+
118
+ await merge({
119
+ dependencies: [{
120
+ name,
121
+ alias,
122
+ version: '>0.0.0',
123
+ ...((cds.cli.options["unified-runtime"] || project.hasHelmUnifiedRuntime) && { repository: 'https://int.repositories.cloud.sap/artifactory/virtual-unified-runtime-helm-dmz' })
124
+ }]
125
+ }).into('chart/Chart.yaml', {
126
+ with: project,
127
+ additions: [{
128
+ in: 'dependencies',
129
+ where: { alias }
130
+ }]}
131
+ )
132
+
133
+ }
23
134
  }
@@ -1,6 +1,7 @@
1
1
  const { readProject } = require('../../projectReader')
2
2
  const { merge } = require('../../merge')
3
3
  const { srv4, malwareScanner } = require('../../registries/mta')
4
+ const KymaTemplate = require('../kyma')
4
5
 
5
6
  module.exports = class MalwareScannerTemplate extends require('../../plugin') {
6
7
 
@@ -22,7 +23,7 @@ module.exports = class MalwareScannerTemplate extends require('../../plugin') {
22
23
 
23
24
  async combine() {
24
25
  const project = readProject()
25
- const { addMta, addHelm, addHelmUnifiedRuntime, srvPath } = project
26
+ const { addMta, addKyma, srvPath } = project
26
27
 
27
28
  if (addMta) {
28
29
  const srv = srv4(srvPath)
@@ -36,8 +37,9 @@ module.exports = class MalwareScannerTemplate extends require('../../plugin') {
36
37
  })
37
38
  }
38
39
 
39
- if (addHelm || addHelmUnifiedRuntime) {
40
+ if (addKyma) {
40
41
  await merge(__dirname, 'files', 'values.yaml').into('chart/values.yaml')
42
+ await KymaTemplate.mergeDependency('service-instance', 'malware-scanner')
41
43
  }
42
44
  }
43
45
  }
@@ -1,7 +1,7 @@
1
1
  const cds = require('../../../cds')
2
2
  const { exists } = cds.utils
3
- const { bold } = require('../../../util/term')
4
3
  const { readProject } = require('../../projectReader')
4
+ const { bold } = require('../../../util/term')
5
5
  const { merge, sort } = require('../../merge')
6
6
  const { mvn } = require('../../add')
7
7
 
@@ -30,6 +30,7 @@ module.exports = class MultitenancyTemplate extends require('../../plugin') {
30
30
  if (isJava) {
31
31
  const packageJson = await read('package.json')
32
32
  packageJson.workspaces = ['mtx/sidecar']
33
+ packageJson.devDependencies ??= {}
33
34
  packageJson.devDependencies['@sap/cds-mtxs'] ??= '^3'
34
35
  await write('package.json', packageJson, { spaces: 2 })
35
36
  await sort('package.json', 'devDependencies')
@@ -42,8 +43,8 @@ module.exports = class MultitenancyTemplate extends require('../../plugin') {
42
43
  async combine() {
43
44
  const project = readProject()
44
45
  const {
45
- isNodejs, isJava, addMta, hasMta, addHelm, addHelmUnifiedRuntime,
46
- addXsuaa, hasXsuaa, addIas, hasIas, hasHana, addContainerize, hasApprouter,
46
+ isNodejs, isJava, addMta, hasMta,
47
+ addXsuaa, hasXsuaa, addIas, hasIas, hasHana, addContainerize, addKyma, addHelm, addHelmUnifiedRuntime, hasApprouter,
47
48
  srvPath, appName
48
49
  } = project
49
50
 
@@ -83,7 +84,7 @@ module.exports = class MultitenancyTemplate extends require('../../plugin') {
83
84
  await merge(templateMtaPath).into('mta.yaml', { with: project, additions, relationships })
84
85
  }
85
86
 
86
- if (addHelm || addHelmUnifiedRuntime) {
87
+ if (addKyma) {
87
88
  await merge(__dirname, 'files/values.yaml.hbs').into('chart/values.yaml', { with: project })
88
89
  const applicationWorkload = hasApprouter ? 'approuter' : 'srv'
89
90
  await merge({
@@ -99,7 +100,9 @@ module.exports = class MultitenancyTemplate extends require('../../plugin') {
99
100
  }).into('chart/values.yaml',{ forceOverwrite: true })
100
101
  }
101
102
 
102
- if (addContainerize) {
103
+ // cds10 move to if above
104
+ // needed because of adding kyma to cli options in case of helm
105
+ if (addContainerize || (addKyma && !addHelm && !addHelmUnifiedRuntime)) {
103
106
  const deletions = []
104
107
  if (hasHana) {
105
108
  deletions.push({
@@ -5,8 +5,5 @@
5
5
  "mechatroner.rainbow-csv",
6
6
  "qwtel.sqlite-viewer",
7
7
  "humao.rest-client"
8
- ],
9
- "unwantedRecommendations": [
10
-
11
8
  ]
12
9
  }
@@ -17,6 +17,7 @@ builder:
17
17
  afterTask: generateVersionInfo
18
18
  configuration:
19
19
  archiveName: {{app}}
20
+ relativePaths: true
20
21
  additionalFiles:
21
22
  - xs-app.json
22
23
  {{#isTypescript}}
@@ -4,6 +4,7 @@ const { readProject } = require('../../projectReader')
4
4
  const { merge } = require('../../merge')
5
5
  const { srv4, portal, portalDeployer, xsuaa, html5RepoHost, appDeployer, approuter, mtxSidecar4 } = require('../../registries/mta')
6
6
  const { renderAndCopy } = require('../../template')
7
+ const KymaTemplate = require('../kyma')
7
8
 
8
9
  module.exports = class PortalTemplate extends require('../../plugin') {
9
10
 
@@ -28,7 +29,7 @@ module.exports = class PortalTemplate extends require('../../plugin') {
28
29
 
29
30
  async combine() {
30
31
  const project = readProject()
31
- const { appName, isJava, addMta, hasMta, srvPath, addHtml5Repo, addXsuaa, addApprouter, addMultitenancy, addHelm, addHelmUnifiedRuntime, addContainerize, hasApprouter, hasHtml5Repo, hasMultitenancy, hasXsuaa } = project
32
+ const { appName, isJava, addMta, hasMta, srvPath, addHtml5Repo, addXsuaa, addApprouter, addMultitenancy, addKyma, addContainerize, hasApprouter, hasHtml5Repo, hasMultitenancy, hasXsuaa } = project
32
33
 
33
34
  if (addMultitenancy) {
34
35
  await merge(__dirname, 'files/package.sidecar.json').into('mtx/sidecar/package.json')
@@ -77,7 +78,7 @@ module.exports = class PortalTemplate extends require('../../plugin') {
77
78
  })
78
79
  }
79
80
 
80
- if (addContainerize) {
81
+ if (addContainerize || addKyma) {
81
82
  const additions = [{
82
83
  in: 'modules',
83
84
  where: { name: `${appName}-portal-deployer` }
@@ -85,8 +86,10 @@ module.exports = class PortalTemplate extends require('../../plugin') {
85
86
  await merge(__dirname, '/files/containerize.yaml.hbs').into('containerize.yaml', { with: project, additions })
86
87
  }
87
88
 
88
- if (addHelm || addHelmUnifiedRuntime) {
89
+ if (addKyma) {
89
90
  await merge(__dirname, 'files/values.yaml.hbs').into('chart/values.yaml', { with: project })
91
+ await KymaTemplate.mergeDependency('service-instance', 'portal')
92
+ await KymaTemplate.mergeDependency('content-deployment', 'portal-deployer')
90
93
  }
91
94
  }
92
95
  }
@@ -12,8 +12,8 @@ module.exports = class PostgresTemplate extends require('../../plugin') {
12
12
  }
13
13
 
14
14
  async canRun() {
15
- const { hasMta, hasHelm, hasHelmUnifiedRuntime } = readProject()
16
- if ((hasHelm || hasHelmUnifiedRuntime) && !hasMta) throw `'cds add postgres' is not available for Kyma yet`
15
+ const { hasMta, hasKyma } = readProject()
16
+ if (hasKyma && !hasMta) throw `'cds add postgres' is not available for Kyma yet`
17
17
  return true
18
18
  }
19
19
 
@@ -9,10 +9,9 @@ module.exports = class extends require('../../plugin') {
9
9
  }
10
10
 
11
11
  async canRun() {
12
- const { hasMta, hasHelm, hasHelmUnifiedRuntime, isJava } = readProject()
13
- const onlyHelm = !hasMta && (hasHelmUnifiedRuntime || hasHelm)
12
+ const { hasMta, hasKyma, isJava } = readProject()
14
13
  if (isJava) throw `'cds add redis' is not available for Java yet`
15
- if (onlyHelm) throw `'cds add redis' is not available for Kyma yet`
14
+ if (hasKyma && !hasMta) throw `'cds add redis' is not available for Kyma yet`
16
15
  return true
17
16
  }
18
17
 
@@ -14,10 +14,9 @@ module.exports = class RedisMessagingTemplate extends require('../../plugin') {
14
14
  }
15
15
 
16
16
  async canRun() {
17
- const { hasMta, hasHelm, hasHelmUnifiedRuntime, isJava } = readProject()
18
- const onlyHelm = !hasMta && (hasHelmUnifiedRuntime || hasHelm)
17
+ const { hasMta, hasKyma, isJava } = readProject()
19
18
  if (isJava) throw `'cds add redis-messaging' is not available for Java yet`
20
- if (onlyHelm) throw `'cds add redis-messaging' is not available for Kyma yet`
19
+ if (hasKyma && !hasMta) throw `'cds add redis-messaging' is not available for Kyma yet`
21
20
  return true
22
21
  }
23
22
 
@@ -1,5 +1,6 @@
1
1
  Books = Bücher
2
2
  Book = Buch
3
+ ID = ID
3
4
  Title = Titel
4
5
  Description = Beschreibung
5
6
  Stock = Bestand
@@ -10,3 +11,11 @@ Currency = Währung
10
11
  Authors = Autoren
11
12
  Author = Autor
12
13
  AuthorID = ID des Autors
14
+ Name = Name
15
+ DateOfBirth = Geburtsort
16
+ DateOfDeath = Todesdatum
17
+ PlaceOfBirth = Geburtsort
18
+ PlaceOfDeath = Todesort
19
+
20
+ Genres = Genre
21
+ Genre = Genre
@@ -1,5 +1,6 @@
1
1
  Books = Livres
2
2
  Book = Livre
3
+ ID = ID
3
4
  Title = Titre
4
5
  Description = Description
5
6
  Stock = Action
@@ -0,0 +1,17 @@
1
+ Age = Age
2
+ Lifetime = Lifetime
3
+
4
+ Details = Details
5
+ SubGenres = Subgenres
6
+
7
+ NumCode = Numeric Code
8
+ MinorUnit = Minor Unit
9
+ Exponent = Exponent
10
+
11
+ General = General
12
+ Translations = Translations
13
+ Admin = Administrator
14
+ Languages = Languages
15
+
16
+ Extended = Extended
17
+ Currencies = Currencies
@@ -1,3 +1,17 @@
1
- AuthorName = Name des Autors
2
1
  Age = Alter
3
- Price = Preis
2
+ Lifetime = Lebenszeitraum
3
+
4
+ Details = Details
5
+ SubGenres = Subgenres
6
+
7
+ NumCode = Numeric Code
8
+ MinorUnit = Minor Unit
9
+ Exponent = Exponent
10
+
11
+ General = Allgemein
12
+ Translations = Übersetzungen
13
+ Admin = Administrator
14
+ Languages = Sprachen
15
+
16
+ Extended = Erweitert
17
+ Currencies = Währungen
@@ -1,11 +1,3 @@
1
- # This is the resource bundle of itelo
2
- # __ldi.translation.uuid=c3431418-9caf-11e8-98d0-529269fb1459
3
-
4
- # JCI app descriptor contains lower case TITLE
5
- appTitle=Manage Authors
6
-
7
- # JCI app descriptor contains lower case DESCRIPTION
8
- appSubTitle=CAP Sample Application
9
-
10
- # JCI app descriptor contains lower case DESCRIPTION
11
- appDescription=Bookshop Authors
1
+ appTitle = Manage Authors
2
+ appSubTitle = CAP Sample Application
3
+ appDescription = CAP Sample Application to Manage Authors
@@ -0,0 +1,3 @@
1
+ appTitle = Verwalte Autoren
2
+ appSubTitle = CAP Beispielanwendung
3
+ appDescription = CAP Beispielanwendung zur Verwaltung von Autoren
@@ -0,0 +1,3 @@
1
+ appTitle = Manage Authors
2
+ appSubTitle = CAP Sample Application
3
+ appDescription = CAP Sample Application to Manage Authors
@@ -32,7 +32,7 @@
32
32
  "semanticObject": "Authors",
33
33
  "action": "manage",
34
34
  "title": "{{appTitle}}",
35
- "info": "{{appInfo}}",
35
+ "info": "{{appDescription}}",
36
36
  "subTitle": "{{appSubTitle}}",
37
37
  "icon": "sap-icon://SAP-icons-TNT/user",
38
38
  "indicatorDataSource": {
@@ -1,11 +1,3 @@
1
- # This is the resource bundle of itelo
2
- # __ldi.translation.uuid=c3431418-9caf-11e8-98d0-529269fb1459
3
-
4
- # JCI app descriptor contains lower case TITLE
5
- appTitle=Manage Books
6
-
7
- # JCI app descriptor contains lower case DESCRIPTION
8
- appSubTitle=CAP Sample Application
9
-
10
- # JCI app descriptor contains lower case DESCRIPTION
11
- appDescription=CDS Sample Service
1
+ appTitle = Manage Books
2
+ appSubTitle = CAP Sample Application
3
+ appDescription = CAP Sample Application to Manage Books
@@ -0,0 +1,3 @@
1
+ appTitle = Verwalte Bücher
2
+ appSubTitle = CAP Beispielanwendung
3
+ appDescription = CAP Beispielanwendung zur Verwaltung von Büchern
@@ -0,0 +1,3 @@
1
+ appTitle = Manage Books
2
+ appSubTitle = CAP Sample Application
3
+ appDescription = CAP Sample Application to Manage Books
@@ -28,7 +28,7 @@
28
28
  "semanticObject": "Books",
29
29
  "action": "manage",
30
30
  "title": "{{appTitle}}",
31
- "info": "{{appInfo}}",
31
+ "info": "{{appDescription}}",
32
32
  "subTitle": "{{appSubTitle}}",
33
33
  "icon": "sap-icon://course-book"
34
34
  }
@@ -84,14 +84,14 @@
84
84
  },
85
85
  "resolutionResult": {
86
86
  "applicationType": "SAPUI5",
87
- "additionalInformation": "SAPUI5.Component=bookshop",
87
+ "additionalInformation": "SAPUI5.Component=bookshop.browse",
88
88
  "url": "/browse/webapp"
89
89
  }
90
90
  },
91
- "BrowseAuthors": {
91
+ "ManageAuthors": {
92
92
  "semanticObject": "Authors",
93
93
  "action": "manage",
94
- "title": "Browse Authors",
94
+ "title": "Manage Authors",
95
95
  "signature": {
96
96
  "parameters": {
97
97
  "Books.author.ID":{
@@ -102,7 +102,7 @@
102
102
  },
103
103
  "resolutionResult": {
104
104
  "applicationType": "SAPUI5",
105
- "additionalInformation": "SAPUI5.Component=authors",
105
+ "additionalInformation": "SAPUI5.Component=bookshop.admin-authors",
106
106
  "url": "/admin-authors/webapp"
107
107
  }
108
108
  },
@@ -120,7 +120,7 @@
120
120
  },
121
121
  "resolutionResult": {
122
122
  "applicationType": "SAPUI5",
123
- "additionalInformation": "SAPUI5.Component=genres",
123
+ "additionalInformation": "SAPUI5.Component=bookshop.genres",
124
124
  "url": "/genres/webapp"
125
125
  }
126
126
  },
@@ -134,7 +134,7 @@
134
134
  },
135
135
  "resolutionResult": {
136
136
  "applicationType": "SAPUI5",
137
- "additionalInformation": "SAPUI5.Component=books",
137
+ "additionalInformation": "SAPUI5.Component=bookshop.admin-books",
138
138
  "url": "/admin-books/webapp"
139
139
  }
140
140
  }
@@ -1,11 +1,3 @@
1
- # This is the resource bundle of itelo
2
- # __ldi.translation.uuid=c3431418-9caf-11e8-98d0-529269fb1459
3
-
4
- # JCI app descriptor contains lower case TITLE
5
- appTitle=Browse Books
6
-
7
- # JCI app descriptor contains lower case DESCRIPTION
8
- appSubTitle=CAP Sample Application
9
-
10
- # JCI app descriptor contains lower case DESCRIPTION
11
- appDescription=CDS Sample Service
1
+ appTitle = Browse Books
2
+ appSubTitle = CAP Sample Application
3
+ appDescription = CAP Sample Application to Browse Books