@sap/cds-dk 8.7.2 → 8.8.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.
- package/CHANGELOG.md +39 -3
- package/bin/bind.js +7 -8
- package/bin/cds.js +2 -4
- package/bin/compile/index.js +2 -1
- package/bin/deploy/index.js +10 -5
- package/bin/lint.js +10 -4
- package/bin/watch.js +48 -7
- package/lib/bind/{cfKeyProvider.js → cf.js} +43 -53
- package/lib/bind/k8s.js +138 -0
- package/lib/bind/plugin.js +48 -0
- package/lib/bind/shared.js +267 -0
- package/lib/build/buildTaskEngine.js +1 -1
- package/lib/build/plugins/helm/files/subcharts/content-deployment/Chart.yaml +0 -2
- package/lib/build/plugins/helm/files/subcharts/web-application/Chart.yaml +1 -3
- package/lib/build/plugins/helm/files/subcharts/web-application/templates/service-binding.yaml +3 -0
- package/lib/build/plugins/helm/files/subcharts/web-application/values.schema.json +3 -0
- package/lib/build/plugins/helm/files/subcharts/web-application/values.yaml +2 -1
- package/lib/build/util.js +1 -1
- package/lib/compile/to-mermaid.js +1 -2
- package/lib/deploy/to-hana/hana.js +4 -4
- package/lib/deploy/to-hana/mtaUtil.js +0 -13
- package/lib/import/common.js +6 -7
- package/lib/init/constants.js +1 -1
- package/lib/init/merge.js +42 -33
- package/lib/init/projectReader.js +15 -7
- package/lib/init/registries/mta.js +9 -3
- package/lib/init/template/approuter/files/mta.yaml.hbs +2 -2
- package/lib/init/template/approuter/files/package.json +1 -1
- package/lib/init/template/approuter/files/xs-app.json.hbs +0 -11
- package/lib/init/template/approuter/index.js +2 -2
- package/lib/init/template/cloud-logging/files/package.json.hbs +12 -1
- package/lib/init/template/cloud-logging/files/values.yaml.hbs +0 -2
- package/lib/init/template/cloud-logging/index.js +8 -15
- package/lib/init/template/destination/files/values.yaml +4 -4
- package/lib/init/template/destination/index.js +1 -1
- package/lib/init/template/html5-repo/files/app-package.json.hbs +0 -2
- package/lib/init/template/html5-repo/files/containerize.yaml.hbs +25 -0
- package/lib/init/template/html5-repo/files/mta.yaml.hbs +1 -2
- package/lib/init/template/html5-repo/files/package.json.hbs +1 -1
- package/lib/init/template/html5-repo/files/ui-resources/package.json.hbs +11 -0
- package/lib/init/template/html5-repo/files/ui5-deploy.yaml.hbs +4 -7
- package/lib/init/template/html5-repo/files/values.yaml.hbs +6 -4
- package/lib/init/template/html5-repo/index.js +22 -10
- package/lib/init/template/http/index.js +1 -1
- package/lib/init/template/ias/files/mta.yaml.hbs +1 -1
- package/lib/init/template/ias/files/sidecar.package.json.hbs +12 -0
- package/lib/init/template/ias/index.js +1 -3
- package/lib/init/template/multitenancy/files/mta.yaml.hbs +8 -10
- package/lib/init/template/multitenancy/index.js +1 -1
- package/lib/init/template/portal/files/mta.yaml.hbs +9 -0
- package/lib/init/template/portal/index.js +3 -1
- package/lib/init/template/sample/files/app/admin-books/webapp/manifest.json +119 -119
- package/lib/init/template/sample/files/app/browse/webapp/manifest.json +1 -1
- package/lib/init/template/telemetry/index.js +0 -13
- package/lib/init/template/typer/files/package.json +3 -0
- package/lib/init/template/workzone-standard/files/cdm.json.hbs +97 -0
- package/lib/init/template/workzone-standard/files/mta.yaml.hbs +23 -0
- package/lib/init/template/workzone-standard/index.js +70 -39
- package/lib/init/template/xsuaa/files/mta.yaml.hbs +2 -2
- package/lib/init/template/xsuaa/files/values.yaml.hbs +0 -2
- package/lib/init/template/xsuaa/index.js +22 -10
- package/lib/lint/Linter.js +242 -201
- package/lib/lint/io.js +4 -7
- package/lib/mtx/util/cf.js +1 -2
- package/lib/util/cf.js +104 -84
- package/lib/util/command.js +1 -2
- package/lib/util/git.js +1 -1
- package/npm-shrinkwrap.json +60 -43
- package/package.json +1 -1
- package/bin/deploy/to-cf.js +0 -0
- package/bin/deploy/via-mta.js +0 -0
- package/lib/bind/KubernetesApiAccessor.js +0 -81
- package/lib/bind/bindingManager.js +0 -89
- package/lib/bind/bindingResolver.js +0 -54
- package/lib/bind/bindingUtil.js +0 -129
- package/lib/bind/index.js +0 -127
- package/lib/bind/kubernetesCredentialsProvider.js +0 -84
- package/lib/bind/userCdsrcJsonStorageProvider.js +0 -92
- package/lib/init/template/destination/files/package.sidecar.json +0 -7
- package/lib/init/template/html5-repo/files/package.sidecar.json +0 -7
- package/lib/init/template/telemetry/files/package.json.hbs +0 -18
|
@@ -1,144 +1,144 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"crossNavigation": {
|
|
22
|
-
"inbounds": {
|
|
23
|
-
"intent-Books-manage": {
|
|
24
|
-
"signature": {
|
|
25
|
-
"parameters": {},
|
|
26
|
-
"additionalParameters": "allowed"
|
|
27
|
-
},
|
|
28
|
-
"semanticObject": "Books",
|
|
29
|
-
"action": "manage"
|
|
30
|
-
}
|
|
2
|
+
"_version": "1.49.0",
|
|
3
|
+
"sap.app": {
|
|
4
|
+
"id": "admin-books",
|
|
5
|
+
"applicationVersion": {
|
|
6
|
+
"version": "1.0.0"
|
|
7
|
+
},
|
|
8
|
+
"type": "application",
|
|
9
|
+
"title": "{{appTitle}}",
|
|
10
|
+
"description": "{{appDescription}}",
|
|
11
|
+
"i18n": "i18n/i18n.properties",
|
|
12
|
+
"dataSources": {
|
|
13
|
+
"AdminService": {
|
|
14
|
+
"uri": "odata/v4/admin/",
|
|
15
|
+
"type": "OData",
|
|
16
|
+
"settings": {
|
|
17
|
+
"odataVersion": "4.0"
|
|
31
18
|
}
|
|
32
19
|
}
|
|
33
20
|
},
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
21
|
+
"crossNavigation": {
|
|
22
|
+
"inbounds": {
|
|
23
|
+
"intent-Books-manage": {
|
|
24
|
+
"signature": {
|
|
25
|
+
"parameters": {},
|
|
26
|
+
"additionalParameters": "allowed"
|
|
27
|
+
},
|
|
28
|
+
"semanticObject": "Books",
|
|
29
|
+
"action": "manage"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"sap.ui": {
|
|
35
|
+
"technology": "UI5",
|
|
36
|
+
"fullWidth": false,
|
|
37
|
+
"deviceTypes": {
|
|
38
|
+
"desktop": true,
|
|
39
|
+
"tablet": true,
|
|
40
|
+
"phone": true
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"sap.ui5": {
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"minUI5Version": "1.115.1",
|
|
46
|
+
"libs": {
|
|
47
|
+
"sap.fe.templates": {}
|
|
41
48
|
}
|
|
42
49
|
},
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"sap.fe.templates": {}
|
|
48
|
-
}
|
|
50
|
+
"models": {
|
|
51
|
+
"i18n": {
|
|
52
|
+
"type": "sap.ui.model.resource.ResourceModel",
|
|
53
|
+
"uri": "i18n/i18n.properties"
|
|
49
54
|
},
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"autoExpandSelect": true,
|
|
60
|
-
"earlyRequests": true,
|
|
61
|
-
"groupProperties": {
|
|
62
|
-
"default": {
|
|
63
|
-
"submit": "Auto"
|
|
64
|
-
}
|
|
55
|
+
"": {
|
|
56
|
+
"dataSource": "AdminService",
|
|
57
|
+
"settings": {
|
|
58
|
+
"operationMode": "Server",
|
|
59
|
+
"autoExpandSelect": true,
|
|
60
|
+
"earlyRequests": true,
|
|
61
|
+
"groupProperties": {
|
|
62
|
+
"default": {
|
|
63
|
+
"submit": "Auto"
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"routing": {
|
|
70
|
+
"routes": [
|
|
71
|
+
{
|
|
72
|
+
"pattern": ":?query:",
|
|
73
|
+
"name": "BooksList",
|
|
74
|
+
"target": "BooksList"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"pattern": "Books({key}):?query:",
|
|
78
|
+
"name": "BooksDetails",
|
|
79
|
+
"target": "BooksDetails"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"pattern": "Books({key}/author({key2}):?query:",
|
|
83
|
+
"name": "AuthorsDetails",
|
|
84
|
+
"target": "AuthorsDetails"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"targets": {
|
|
88
|
+
"BooksList": {
|
|
89
|
+
"type": "Component",
|
|
90
|
+
"id": "BooksList",
|
|
91
|
+
"name": "sap.fe.templates.ListReport",
|
|
92
|
+
"options": {
|
|
93
|
+
"settings": {
|
|
94
|
+
"entitySet": "Books",
|
|
95
|
+
"initialLoad": true,
|
|
96
|
+
"navigation": {
|
|
97
|
+
"Books": {
|
|
98
|
+
"detail": {
|
|
99
|
+
"route": "BooksDetails"
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"BooksDetails": {
|
|
107
|
+
"type": "Component",
|
|
108
|
+
"id": "BooksDetailsList",
|
|
109
|
+
"name": "sap.fe.templates.ObjectPage",
|
|
110
|
+
"options": {
|
|
111
|
+
"settings": {
|
|
112
|
+
"entitySet": "Books",
|
|
113
|
+
"navigation": {
|
|
114
|
+
"Authors": {
|
|
115
|
+
"detail": {
|
|
116
|
+
"route": "AuthorsDetails"
|
|
118
117
|
}
|
|
119
118
|
}
|
|
120
119
|
}
|
|
121
120
|
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"AuthorsDetails": {
|
|
124
|
+
"type": "Component",
|
|
125
|
+
"id": "AuthorsDetailsList",
|
|
126
|
+
"name": "sap.fe.templates.ObjectPage",
|
|
127
|
+
"options": {
|
|
128
|
+
"settings": {
|
|
129
|
+
"entitySet": "Authors"
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
132
|
}
|
|
134
|
-
},
|
|
135
|
-
"contentDensities": {
|
|
136
|
-
"compact": true,
|
|
137
|
-
"cozy": true
|
|
138
133
|
}
|
|
139
134
|
},
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
135
|
+
"contentDensities": {
|
|
136
|
+
"compact": true,
|
|
137
|
+
"cozy": true
|
|
143
138
|
}
|
|
139
|
+
},
|
|
140
|
+
"sap.fiori": {
|
|
141
|
+
"registrationIds": [],
|
|
142
|
+
"archeType": "transactional"
|
|
144
143
|
}
|
|
144
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
const cds = require('../../../cds')
|
|
2
|
-
const { readProject } = require('../../projectReader')
|
|
3
|
-
const { merge, sort } = require('../../merge')
|
|
4
2
|
|
|
5
3
|
module.exports = class extends require('../../plugin') {
|
|
6
4
|
|
|
@@ -8,18 +6,7 @@ module.exports = class extends require('../../plugin') {
|
|
|
8
6
|
return !!env.requires?.telemetry || cds.cli.argv?.includes('telemetry') || !!cds.cli.options?.add?.telemetry
|
|
9
7
|
}
|
|
10
8
|
|
|
11
|
-
async canRun() {
|
|
12
|
-
return true
|
|
13
|
-
}
|
|
14
|
-
|
|
15
9
|
requires() {
|
|
16
10
|
return ['cloud-logging']
|
|
17
11
|
}
|
|
18
|
-
|
|
19
|
-
async run() {
|
|
20
|
-
const project = readProject();
|
|
21
|
-
project.profile ??= 'production'
|
|
22
|
-
await merge(__dirname, 'files/package.json.hbs').into('package.json', { with: project })
|
|
23
|
-
await sort('package.json', 'dependencies')
|
|
24
|
-
}
|
|
25
12
|
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_version": "3.0.0",
|
|
3
|
+
"identification": {
|
|
4
|
+
"title": "{{appName}}",
|
|
5
|
+
"id": "{{appName}}-workzone",
|
|
6
|
+
"entityType": "bundle"
|
|
7
|
+
},
|
|
8
|
+
"payload": {
|
|
9
|
+
"catalogs": [
|
|
10
|
+
{
|
|
11
|
+
"_version": "3.0.0",
|
|
12
|
+
"identification": {
|
|
13
|
+
"id": "{{appName}}-catalog",
|
|
14
|
+
"title": "{{#literal}}{{title}}{{/literal}}",
|
|
15
|
+
"entityType": "catalog",
|
|
16
|
+
"i18n": "i18n/catalog.properties"
|
|
17
|
+
},
|
|
18
|
+
"payload": {
|
|
19
|
+
"viz": [
|
|
20
|
+
{{#apps}}
|
|
21
|
+
{
|
|
22
|
+
"appId": "{{manifestAppId}}",
|
|
23
|
+
"vizId": "{{vizId}}"
|
|
24
|
+
}{{#isNotLast}},{{/isNotLast}}
|
|
25
|
+
{{/apps}}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"groups": [
|
|
31
|
+
{
|
|
32
|
+
"_version": "3.0.0",
|
|
33
|
+
"identification": {
|
|
34
|
+
"id": "{{appName}}-group",
|
|
35
|
+
"title": "{{#literal}}{{title}}{{/literal}}",
|
|
36
|
+
"entityType": "group",
|
|
37
|
+
"i18n": "i18n/group.properties"
|
|
38
|
+
},
|
|
39
|
+
"payload": {
|
|
40
|
+
"viz": [
|
|
41
|
+
{{#apps}}
|
|
42
|
+
{
|
|
43
|
+
"id": "{{appName}}{{app}}-001",
|
|
44
|
+
"appId": "{{manifestAppId}}",
|
|
45
|
+
"vizId": "{{vizId}}"
|
|
46
|
+
}{{#isNotLast}},{{/isNotLast}}
|
|
47
|
+
{{/apps}}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"sites": [
|
|
53
|
+
{
|
|
54
|
+
"_version": "3.0.0",
|
|
55
|
+
"identification": {
|
|
56
|
+
"id": "{{appName}}-site",
|
|
57
|
+
"entityType": "site",
|
|
58
|
+
"title": "{{appName}}",
|
|
59
|
+
"description": "{{appDescription}}"
|
|
60
|
+
},
|
|
61
|
+
"payload": {
|
|
62
|
+
"config": {
|
|
63
|
+
"ushellConfig": {
|
|
64
|
+
"renderers": {
|
|
65
|
+
"fiori2": {
|
|
66
|
+
"componentData": {
|
|
67
|
+
"config": {
|
|
68
|
+
"applications": {
|
|
69
|
+
"Shell-home": {}
|
|
70
|
+
},
|
|
71
|
+
"enableSearch": true,
|
|
72
|
+
"enablePersonalization": true,
|
|
73
|
+
"enableSetTheme": true,
|
|
74
|
+
"enableSetLanguage": true
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"groupsOrder": ["{{appName}}-group"],
|
|
82
|
+
"sap.cloud.portal": {
|
|
83
|
+
"config": {
|
|
84
|
+
"theme.id": "sap_horizon",
|
|
85
|
+
"theme.active": [
|
|
86
|
+
"sap_horizon",
|
|
87
|
+
"sap_horizon_dark",
|
|
88
|
+
"sap_horizon_hcw",
|
|
89
|
+
"sap_horizon_hcb"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -40,6 +40,12 @@ modules:
|
|
|
40
40
|
ServiceKeyName: {{appName}}-auth-key
|
|
41
41
|
sap.cloud.service: {{strippedAppName}}.service
|
|
42
42
|
|
|
43
|
+
- name: {{appName}}-mtx
|
|
44
|
+
type: nodejs
|
|
45
|
+
path: {{#isNodejs}}gen/{{/isNodejs}}mtx/sidecar
|
|
46
|
+
requires:
|
|
47
|
+
- name: {{appName}}-html5-repo-host
|
|
48
|
+
|
|
43
49
|
resources:
|
|
44
50
|
- name: {{appName}}-destination
|
|
45
51
|
type: org.cloudfoundry.managed-service
|
|
@@ -49,6 +55,17 @@ resources:
|
|
|
49
55
|
config:
|
|
50
56
|
HTML5Runtime_enabled: true
|
|
51
57
|
init_data:
|
|
58
|
+
{{#hasMultitenancy}}
|
|
59
|
+
subaccount:
|
|
60
|
+
existing_destinations_policy: update
|
|
61
|
+
destinations:
|
|
62
|
+
- Name: {{appName}}-workzone-runtime
|
|
63
|
+
Authentication: NoAuthentication
|
|
64
|
+
Type: HTTP
|
|
65
|
+
ProxyType: Internet
|
|
66
|
+
URL: https://${org}.launchpad.${default-domain}
|
|
67
|
+
CEP.HTML5contentprovider: true
|
|
68
|
+
{{/hasMultitenancy}}
|
|
52
69
|
instance:
|
|
53
70
|
existing_destinations_policy: update
|
|
54
71
|
destinations:
|
|
@@ -66,3 +83,9 @@ resources:
|
|
|
66
83
|
name: srv-api # must be used in xs-app.json as well
|
|
67
84
|
url: ~{srv-url}
|
|
68
85
|
forwardAuthToken: true
|
|
86
|
+
|
|
87
|
+
- name: {{appName}}-html5-repo-host
|
|
88
|
+
type: org.cloudfoundry.managed-service
|
|
89
|
+
parameters:
|
|
90
|
+
service: html5-apps-repo
|
|
91
|
+
service-plan: app-host
|
|
@@ -1,57 +1,88 @@
|
|
|
1
1
|
const cds = require('../../../cds')
|
|
2
|
+
const { read, write } = cds.utils
|
|
2
3
|
const { readProject } = require('../../projectReader')
|
|
3
4
|
const { merge } = require('../../merge')
|
|
4
5
|
const { join } = require('path')
|
|
5
|
-
const { destination, destinations, srv4 } = require('../../registries/mta')
|
|
6
|
+
const { destination, destinations, srv4, html5RepoHost, mtxSidecar4 } = require('../../registries/mta')
|
|
6
7
|
const { odataApi } = require('../../registries/xs-app')
|
|
7
8
|
|
|
8
9
|
module.exports = class extends require('../../plugin') {
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
options() {
|
|
12
|
+
return {
|
|
13
|
+
'cdm': {
|
|
14
|
+
describe: 'Add Common Data Model',
|
|
15
|
+
type: 'boolean'
|
|
16
|
+
}
|
|
12
17
|
}
|
|
18
|
+
}
|
|
13
19
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
static help() {
|
|
21
|
+
return 'SAP BTP Work Zone, Standard Edition'
|
|
22
|
+
}
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
requires() {
|
|
25
|
+
return ['html5-repo', 'destination']
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static hasInProduction(env) {
|
|
29
|
+
return !!env.requires?.workzone || cds.cli.options.add.has('workzone-standard')
|
|
30
|
+
}
|
|
21
31
|
|
|
22
|
-
|
|
32
|
+
async run() {
|
|
33
|
+
await merge({ cds: { requires: { workzone: true } } }).into('package.json')
|
|
34
|
+
|
|
35
|
+
if (cds.cli.options.cdm) {
|
|
23
36
|
const project = readProject()
|
|
24
|
-
|
|
25
|
-
await Promise.all(appUIPaths.map(p => {
|
|
26
|
-
project.uiApp = p
|
|
27
|
-
return merge(__dirname, 'files/manifest.json.hbs').into(join(appPath, p, 'webapp/manifest.json'), { project })
|
|
28
|
-
}))
|
|
29
|
-
await merge({ cds: { requires: { workzone: true } } }).into('package.json')
|
|
37
|
+
await merge(join(__dirname, 'files/cdm.json.hbs')).into('app/workzone/cdm.json', { project })
|
|
30
38
|
}
|
|
39
|
+
}
|
|
31
40
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
async combine() {
|
|
42
|
+
const project = readProject()
|
|
43
|
+
const { isJava, hasMta, srvPath, apps, appPath, appName, appUIPaths, hasMultitenancy } = project
|
|
44
|
+
|
|
45
|
+
await Promise.all(appUIPaths.map(p => {
|
|
46
|
+
project.uiApp = p
|
|
47
|
+
return merge(__dirname, 'files/manifest.json.hbs').into(join(appPath, p, 'webapp/manifest.json'), { project })
|
|
48
|
+
}))
|
|
49
|
+
|
|
50
|
+
await Promise.all(apps.map(async ({ app }) => {
|
|
51
|
+
const additions = [odataApi]
|
|
52
|
+
const overwrites = [{
|
|
53
|
+
item: [odataApi, 'destination'],
|
|
54
|
+
withValue: `${appName}-srv-api`
|
|
55
|
+
}]
|
|
56
|
+
project.app = app
|
|
57
|
+
await merge(__dirname, 'files/xs-app.json.hbs').into(join(appPath, app, 'xs-app.json'), { with: project, additions, overwrites })
|
|
58
|
+
}))
|
|
59
|
+
|
|
60
|
+
if (hasMultitenancy) {
|
|
61
|
+
const mtxPackageJson = await read('mtx/sidecar/package.json')
|
|
62
|
+
mtxPackageJson.cds.requires['html5-host'] = true
|
|
63
|
+
delete mtxPackageJson.cds.requires['html5-repo']
|
|
64
|
+
// delete mtxPackageJson.cds.requires['html5-runtime']
|
|
65
|
+
// delete mtxPackageJson.cds.requires['destinations']
|
|
66
|
+
await write('mtx/sidecar/package.json', mtxPackageJson, { spaces: 2 })
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (hasMta) {
|
|
70
|
+
const srv = srv4(srvPath)
|
|
71
|
+
const additions = [srv, destinations, destination, {
|
|
72
|
+
in: [destination, 'requires'],
|
|
73
|
+
where: { name: 'srv-api' }
|
|
74
|
+
}]
|
|
75
|
+
const relationships = []
|
|
76
|
+
if (hasMultitenancy) {
|
|
77
|
+
additions.push(html5RepoHost)
|
|
78
|
+
relationships.push({
|
|
79
|
+
insert: [html5RepoHost, 'name'],
|
|
80
|
+
into: [mtxSidecar4(isJava ? 'mtx/sidecar' : 'gen/mtx/sidecar'), 'requires', 'name']
|
|
81
|
+
})
|
|
55
82
|
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
await merge(__dirname, 'files/mta.yaml.hbs').into('mta.yaml', { with: project, additions, relationships })
|
|
86
|
+
}
|
|
56
87
|
}
|
|
57
88
|
}
|
|
@@ -15,11 +15,11 @@ modules:
|
|
|
15
15
|
{{/hasMultitenancy}}
|
|
16
16
|
|
|
17
17
|
resources:
|
|
18
|
-
- name: {{appName}}-auth
|
|
18
|
+
- name: {{appName}}-auth{{#servicePlan}}-{{servicePlan}}{{/servicePlan}}
|
|
19
19
|
type: org.cloudfoundry.managed-service
|
|
20
20
|
parameters:
|
|
21
21
|
service: xsuaa
|
|
22
|
-
service-plan: application
|
|
22
|
+
service-plan: {{#servicePlan}}{{servicePlan}}{{/servicePlan}}{{^servicePlan}}application{{/servicePlan}}
|
|
23
23
|
path: ./xs-security.json
|
|
24
24
|
config:
|
|
25
25
|
xsappname: {{appName}}-${org}-${space}
|
|
@@ -20,10 +20,8 @@ xsuaa:
|
|
|
20
20
|
servicePlanName: application
|
|
21
21
|
parameters:
|
|
22
22
|
tenant-mode: {{#hasMultitenancy}}shared{{/hasMultitenancy}}{{^hasMultitenancy}}dedicated{{/hasMultitenancy}}
|
|
23
|
-
{{#hasApprouter}}
|
|
24
23
|
oauth2-configuration:
|
|
25
24
|
redirect-uris:
|
|
26
25
|
{{=<% %>=}}
|
|
27
26
|
- https://*.{{ tpl .Values.global.domain . }}/**
|
|
28
27
|
<%={{ }}=%>
|
|
29
|
-
{{/hasApprouter}}
|