@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.
- package/CHANGELOG.md +52 -0
- package/bin/cds.js +1 -1
- package/bin/compile/index.js +3 -2
- package/bin/env.js +3 -3
- package/bin/up.js +22 -16
- package/bin/util/containerize.js +27 -14
- package/lib/build/provider/internalBuildPlugin.js +23 -0
- package/lib/build/util.js +33 -16
- package/lib/import/common.js +7 -1
- package/lib/import/odata/v4parser.js +25 -38
- package/lib/init/constants.js +1 -1
- package/lib/init/index.js +7 -1
- package/lib/init/projectReader.js +21 -10
- package/lib/init/template/ams/index.js +2 -2
- package/lib/init/template/app-frontend/files/ui5.yaml.hbs +1 -0
- package/lib/init/template/app-frontend/index.js +2 -2
- package/lib/init/template/application-logging/index.js +2 -2
- package/lib/init/template/approuter/index.js +9 -5
- package/lib/init/template/attachments/index.js +4 -2
- package/lib/init/template/audit-logging/index.js +4 -2
- package/lib/init/template/cloud-logging/index.js +4 -2
- package/lib/init/template/connectivity/index.js +2 -2
- package/lib/init/template/console/files/package.json +5 -0
- package/lib/init/template/console/index.js +25 -0
- package/lib/init/template/containerize/index.js +4 -2
- package/lib/init/template/destination/index.js +4 -2
- package/lib/init/template/dynatrace/files/package.json.hbs +2 -2
- package/lib/init/template/dynatrace/index.js +4 -2
- package/lib/init/template/enterprise-messaging/files/mta.yaml.hbs +3 -1
- package/lib/init/template/enterprise-messaging/index.js +4 -2
- package/lib/init/template/enterprise-messaging-shared/index.js +4 -2
- package/lib/init/template/github-actions/files/workflows/release.yaml.hbs +2 -2
- package/lib/init/template/github-actions/index.js +4 -4
- package/lib/init/template/hana/index.js +4 -4
- package/lib/init/template/helm/index.js +6 -3
- package/lib/init/template/helm-unified-runtime/index.js +1 -0
- package/lib/init/template/html5-repo/files/ui5.yaml.hbs +1 -0
- package/lib/init/template/html5-repo/index.js +9 -7
- package/lib/init/template/ias/index.js +2 -2
- package/lib/init/template/java/index.js +14 -0
- package/lib/init/template/kafka/index.js +4 -2
- package/lib/init/template/kyma/index.js +124 -13
- package/lib/init/template/malware-scanner/index.js +4 -2
- package/lib/init/template/mta/index.js +1 -1
- package/lib/init/template/multitenancy/index.js +7 -4
- package/lib/init/template/nodejs/files/.vscode/extensions.json +0 -3
- package/lib/init/template/pipeline/files/ui5.yaml.hbs +1 -0
- package/lib/init/template/portal/index.js +6 -3
- package/lib/init/template/postgres/index.js +2 -2
- package/lib/init/template/redis/index.js +2 -3
- package/lib/init/template/redis-messaging/index.js +2 -3
- package/lib/init/template/sample/files/_i18n/i18n_de.properties +9 -0
- package/lib/init/template/sample/files/_i18n/i18n_fr.properties +1 -0
- package/lib/init/template/sample/files/app/_i18n/i18n.properties +17 -0
- package/lib/init/template/sample/files/app/_i18n/i18n_de.properties +16 -2
- package/lib/init/template/sample/files/app/admin-authors/webapp/i18n/i18n.properties +3 -11
- package/lib/init/template/sample/files/app/admin-authors/webapp/i18n/i18n_de.properties +3 -0
- package/lib/init/template/sample/files/app/admin-authors/webapp/i18n/i18n_en.properties +3 -0
- package/lib/init/template/sample/files/app/admin-authors/webapp/manifest.json +1 -1
- package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n.properties +3 -11
- package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n_de.properties +3 -0
- package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n_en.properties +3 -0
- package/lib/init/template/sample/files/app/admin-books/webapp/manifest.json +1 -1
- package/lib/init/template/sample/files/app/appconfig/fioriSandboxConfig.json +6 -6
- package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n.properties +3 -11
- package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n_de.properties +3 -0
- package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n_en.properties +3 -0
- package/lib/init/template/sample/files/app/browse/webapp/manifest.json +1 -1
- package/lib/init/template/sample/files/app/common.cds +2 -1
- package/lib/init/template/sample/files/app/fiori-apps.html +32 -12
- package/lib/init/template/sample/files/app/genres/fiori-service.cds +1 -1
- package/lib/init/template/sample/files/app/genres/webapp/i18n/i18n.properties +3 -4
- package/lib/init/template/sample/files/app/genres/webapp/i18n/i18n_de.properties +3 -2
- package/lib/init/template/sample/files/app/genres/webapp/i18n/i18n_en.properties +3 -0
- package/lib/init/template/sample/files/app/genres/webapp/manifest.json +2 -2
- package/lib/init/template/sample/files/db/data/sap.capire.bookshop-Genres.texts.csv +43 -0
- package/lib/init/template/sample/index.js +14 -1
- package/lib/init/template/sqlite/files/package.json.hbs +13 -0
- package/lib/init/template/sqlite/index.js +1 -1
- package/lib/init/template/xsuaa/index.js +5 -2
- package/lib/lint/eslintHelp.json +1 -1
- package/lib/util/checksum.js +19 -10
- package/lib/util/fs.js +8 -1
- package/lib/util/glob.js +26 -13
- package/lib/util/term.js +3 -1
- package/lib/watch/livereload-server.js +4 -3
- package/lib/watch/node-watch.js +5 -8
- package/lib/watch/watcher.js +136 -0
- package/npm-shrinkwrap.json +110 -117
- package/package.json +2 -3
- package/lib/init/template/sample/files/app/_i18n/i18n_en.properties +0 -8
- package/lib/init/template/sqlite/files/package.json +0 -5
- /package/lib/init/template/{helm → kyma}/files/Chart.yaml.hbs +0 -0
- /package/lib/init/template/{containerize → kyma}/files/containerize.yaml.hbs +0 -0
- /package/lib/init/template/{helm → kyma}/files/values.schema.json +0 -0
- /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 {
|
|
13
|
-
if (
|
|
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,
|
|
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
|
-
|
|
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 (
|
|
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,
|
|
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 (
|
|
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,
|
|
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 (
|
|
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
|
|
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
|
|
6
|
-
|
|
12
|
+
static hasInProduction() {
|
|
13
|
+
return exists('chart/Chart.yaml')
|
|
7
14
|
}
|
|
8
15
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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,
|
|
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 (
|
|
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,
|
|
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 (
|
|
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
|
|
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({
|
|
@@ -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,
|
|
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 (
|
|
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,
|
|
16
|
-
if (
|
|
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,
|
|
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 (
|
|
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,
|
|
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 (
|
|
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
|
|
@@ -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
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
|
@@ -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
|
-
"
|
|
91
|
+
"ManageAuthors": {
|
|
92
92
|
"semanticObject": "Authors",
|
|
93
93
|
"action": "manage",
|
|
94
|
-
"title": "
|
|
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
|
-
|
|
2
|
-
|
|
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
|