@sap/cds-dk 7.3.0 → 7.3.2
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/bin/add.js +3 -1
- package/bin/build.js +2 -1
- package/bin/cds.js +1 -1
- package/bin/compile/index.js +11 -0
- package/bin/extend.js +5 -1
- package/bin/init.js +31 -37
- package/bin/repl.js +23 -43
- package/bin/watch.js +5 -9
- package/lib/bind/bindingResolver.js +2 -1
- package/lib/bind/index.js +1 -1
- package/lib/build/buildPlugin.js +18 -3
- package/lib/build/buildTaskEngine.js +2 -1
- package/lib/build/buildTaskFactory.js +33 -9
- package/lib/build/buildTaskProvider.js +1 -1
- package/lib/build/buildTaskProviderFactory.js +15 -61
- package/lib/build/constants.js +2 -0
- package/lib/build/index.js +5 -2
- package/lib/build/plugins.js +35 -0
- package/lib/build/provider/edmxBuildPlugin.js +9 -1
- package/lib/build/provider/featureToggleBuildPlugin.js +2 -3
- package/lib/build/provider/internalBuildPlugin.js +4 -0
- package/lib/build/provider/internalBuildTaskProvider.js +1 -1
- package/lib/build/provider/java/index.js +12 -6
- package/lib/build/provider/nodejs/index.js +3 -2
- package/lib/build/util.js +5 -0
- package/lib/client/base_command.js +8 -18
- package/lib/client/download_legacy.js +2 -10
- package/lib/client/params.js +6 -4
- package/lib/client/settings_manager.js +38 -35
- package/lib/compile/openapi/csdl2openapi.js +1 -1
- package/lib/deploy/to-hana/hana.js +53 -35
- package/lib/index.js +7 -1
- package/lib/init/constants.js +4 -2
- package/lib/init/template/_merging/registry-mta.js +12 -0
- package/lib/init/template/enterprise-messaging/files/event-mesh.json.hbs +1 -1
- package/lib/init/template/enterprise-messaging/index.js +1 -1
- package/lib/init/template/enterprise-messaging-shared/files/event-mesh.json.hbs +1 -1
- package/lib/init/template/enterprise-messaging-shared/index.js +19 -5
- package/lib/init/template/helm/index.js +1 -1
- package/lib/init/template/helm/subcharts/content-deployment/Chart.yaml +4 -4
- package/lib/init/template/helm/subcharts/content-deployment/templates/_helpers.tpl +4 -2
- package/lib/init/template/helm/subcharts/content-deployment/templates/job.yaml +4 -3
- package/lib/init/template/helm/subcharts/content-deployment/values.schema.json +9 -83
- package/lib/init/template/helm/subcharts/content-deployment/values.yaml +54 -15
- package/lib/init/template/helm/subcharts/service-instance/Chart.yaml +4 -4
- package/lib/init/template/helm/subcharts/service-instance/templates/serviceinstance.yaml +1 -1
- package/lib/init/template/helm/subcharts/service-instance/values.schema.json +0 -17
- package/lib/init/template/helm/subcharts/service-instance/values.yaml +28 -0
- package/lib/init/template/helm/subcharts/web-application/Chart.yaml +5 -5
- package/lib/init/template/helm/subcharts/web-application/templates/_api.tpl +60 -0
- package/lib/init/template/helm/subcharts/web-application/templates/_helpers.tpl +34 -73
- package/lib/init/template/helm/subcharts/web-application/templates/api-rule.yaml +4 -4
- package/lib/init/template/helm/subcharts/web-application/templates/deployment.yaml +96 -17
- package/lib/init/template/helm/subcharts/web-application/templates/network-policy.yaml +19 -3
- package/lib/init/template/helm/subcharts/web-application/templates/pod-disruption-budget.yaml +3 -3
- package/lib/init/template/helm/subcharts/web-application/templates/rbac.yaml +26 -0
- package/lib/init/template/helm/subcharts/web-application/templates/secret.yaml +1 -1
- package/lib/init/template/helm/subcharts/web-application/templates/service-account.yaml +1 -1
- package/lib/init/template/helm/subcharts/web-application/templates/service-binding.yaml +1 -1
- package/lib/init/template/helm/subcharts/web-application/templates/service.yaml +21 -3
- package/lib/init/template/helm/subcharts/web-application/templates/virtual-service.yaml +36 -0
- package/lib/init/template/helm/subcharts/web-application/values.schema.json +535 -142
- package/lib/init/template/helm/subcharts/web-application/values.yaml +168 -44
- package/lib/init/template/local-messaging/files/package.json.hbs +15 -0
- package/lib/init/template/local-messaging/index.js +25 -0
- package/lib/init/template/mta/index.js +2 -2
- package/lib/init/template/nodejs/files/.gitignore.hbs +3 -0
- package/lib/init/template/nodejs/files/.vscode/launch.json +0 -3
- package/lib/init/template/notifications/files/mta.yaml.hbs +17 -0
- package/lib/init/template/notifications/files/package.json.hbs +5 -0
- package/lib/init/template/notifications/index.js +43 -0
- package/lib/init/template/typer/files/package.json +1 -1
- package/lib/init/util/projectReader.js +1 -0
- package/lib/util/pruneAxiosErrors.js +4 -1
- package/lib/util/term.js +1 -2
- package/lib/watch/livereload-server.js +38 -2
- package/lib/watch/node-watch.js +3 -2
- package/npm-shrinkwrap.json +438 -2205
- package/package.json +2 -2
- package/lib/init/template/helm/subcharts/content-deployment/templating.md +0 -37
- package/lib/init/template/helm/subcharts/content-deployment/values-lint.yaml +0 -5
- package/lib/init/template/helm/subcharts/content-deployment/values.md +0 -1011
- package/lib/init/template/helm/subcharts/service-instance/templating.md +0 -18
- package/lib/init/template/helm/subcharts/service-instance/values-lint.yaml +0 -2
- package/lib/init/template/helm/subcharts/service-instance/values.md +0 -186
- package/lib/init/template/helm/subcharts/web-application/templating.md +0 -51
- package/lib/init/template/helm/subcharts/web-application/values-lint.yaml +0 -8
- package/lib/init/template/helm/subcharts/web-application/values.md +0 -1363
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
{{- if .Values.rbac.rules }}
|
|
3
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
4
|
+
kind: Role
|
|
5
|
+
metadata:
|
|
6
|
+
labels: {{- include "web-application.labels" . | nindent 4 }}
|
|
7
|
+
name: {{ include "web-application.fullname" . }}
|
|
8
|
+
rules:
|
|
9
|
+
{{- .Values.rbac.rules | toYaml | nindent 2}}
|
|
10
|
+
---
|
|
11
|
+
{{- end }}
|
|
12
|
+
{{- if or .Values.rbac.rules .Values.rbac.role .Values.rbac.clusterRole }}
|
|
13
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
14
|
+
kind: RoleBinding
|
|
15
|
+
metadata:
|
|
16
|
+
labels: {{- include "web-application.labels" . | nindent 4 }}
|
|
17
|
+
name: {{ include "web-application.fullname" . }}
|
|
18
|
+
subjects:
|
|
19
|
+
- kind: ServiceAccount
|
|
20
|
+
name: {{ tpl (default (include "web-application.fullname" .) .Values.serviceAccountName) . }}
|
|
21
|
+
namespace: {{ .Release.Namespace }}
|
|
22
|
+
roleRef:
|
|
23
|
+
kind: {{ ternary "Role" "ClusterRole" (empty .Values.rbac.clusterRole) }}
|
|
24
|
+
name: {{ tpl (default (include "web-application.fullname" .) (default .Values.rbac.role .Values.rbac.clusterRole)) . }}
|
|
25
|
+
apiGroup: rbac.authorization.k8s.io
|
|
26
|
+
{{- end }}
|
|
@@ -4,7 +4,7 @@ kind: Secret
|
|
|
4
4
|
type: kubernetes.io/dockerconfigjson
|
|
5
5
|
metadata:
|
|
6
6
|
name: {{ include "web-application.internal.imagePullSecretName" . }}
|
|
7
|
-
labels: {{- include "web-application.
|
|
7
|
+
labels: {{- include "web-application.labels" . | nindent 4 }}
|
|
8
8
|
data:
|
|
9
9
|
.dockerconfigjson: {{ default .Values.global.imagePullSecret.dockerconfigjson .Values.imagePullSecret.dockerconfigjson }}
|
|
10
10
|
{{- end }}
|
|
@@ -8,7 +8,7 @@ apiVersion: services.cloud.sap.com/v1
|
|
|
8
8
|
kind: ServiceBinding
|
|
9
9
|
metadata:
|
|
10
10
|
name: {{ include "web-application.internal.bindingName" (dict "root" $ "name" $name) }}
|
|
11
|
-
labels: {{- include "web-application.
|
|
11
|
+
labels: {{- include "web-application.labels" $ | nindent 4 }}
|
|
12
12
|
spec:
|
|
13
13
|
serviceInstanceName: {{include "web-application.internal.serviceInstanceName" (dict "binding" $mergedParams "root" $) }}
|
|
14
14
|
secretKey: credentials
|
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
apiVersion: v1
|
|
2
2
|
kind: Service
|
|
3
3
|
metadata:
|
|
4
|
-
name: {{ include "web-application.
|
|
5
|
-
labels: {{- include "web-application.
|
|
4
|
+
name: {{ include "web-application.fullname" . }}
|
|
5
|
+
labels: {{- include "web-application.labels" . | nindent 4 }}
|
|
6
6
|
spec:
|
|
7
7
|
ports:
|
|
8
8
|
- port: {{ .Values.port }}
|
|
9
9
|
targetPort: {{ .Values.port }}
|
|
10
10
|
protocol: TCP
|
|
11
|
-
selector: {{- include "web-application.
|
|
11
|
+
selector: {{- include "web-application.selectorLabels" . | nindent 4 }}
|
|
12
|
+
{{- if .Values.prometheus.enabled }}
|
|
13
|
+
---
|
|
14
|
+
apiVersion: v1
|
|
15
|
+
kind: Service
|
|
16
|
+
metadata:
|
|
17
|
+
name: {{ include "web-application.fullname" . }}-metrics
|
|
18
|
+
labels: {{- include "web-application.labels" . | nindent 4 }}
|
|
19
|
+
annotations:
|
|
20
|
+
prometheus.io/scrape: "true"
|
|
21
|
+
prometheus.io/path: {{ .Values.prometheus.path }}
|
|
22
|
+
prometheus.io/port: {{ .Values.prometheus.port | default .Values.port | quote }}
|
|
23
|
+
spec:
|
|
24
|
+
ports:
|
|
25
|
+
- port: {{ .Values.prometheus.port | default .Values.port }}
|
|
26
|
+
targetPort: {{ .Values.prometheus.port | default .Values.port }}
|
|
27
|
+
protocol: TCP
|
|
28
|
+
selector: {{- include "web-application.selectorLabels" . | nindent 4 }}
|
|
29
|
+
{{- end }}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{{- if include "web-application.internal.TENANT_HOST_PATTERN" . -}}
|
|
2
|
+
apiVersion: networking.istio.io/v1beta1
|
|
3
|
+
kind: VirtualService
|
|
4
|
+
metadata:
|
|
5
|
+
name: {{ include "web-application.fullname" . }}-multitenancy
|
|
6
|
+
labels: {{- include "web-application.labels" . | nindent 4 }}
|
|
7
|
+
spec:
|
|
8
|
+
gateways:
|
|
9
|
+
- {{ tpl (default .Values.expose.gateway .Values.expose.tenantGateway) $ }}
|
|
10
|
+
hosts:
|
|
11
|
+
- "*"
|
|
12
|
+
http:
|
|
13
|
+
- corsPolicy:
|
|
14
|
+
allowHeaders:
|
|
15
|
+
- Authorization
|
|
16
|
+
- Content-Type
|
|
17
|
+
- "*"
|
|
18
|
+
allowMethods:
|
|
19
|
+
- GET
|
|
20
|
+
- POST
|
|
21
|
+
- PUT
|
|
22
|
+
- DELETE
|
|
23
|
+
- PATCH
|
|
24
|
+
allowOrigins:
|
|
25
|
+
- regex: .*
|
|
26
|
+
match:
|
|
27
|
+
- uri:
|
|
28
|
+
regex: /.*
|
|
29
|
+
headers:
|
|
30
|
+
Host:
|
|
31
|
+
regex: {{ tpl (include "web-application.internal.TENANT_HOST_PATTERN" .) . }}
|
|
32
|
+
route:
|
|
33
|
+
- weight: 100
|
|
34
|
+
destination:
|
|
35
|
+
host: "{{ include "web-application.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local"
|
|
36
|
+
{{- end }}
|