@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.
Files changed (88) hide show
  1. package/bin/add.js +3 -1
  2. package/bin/build.js +2 -1
  3. package/bin/cds.js +1 -1
  4. package/bin/compile/index.js +11 -0
  5. package/bin/extend.js +5 -1
  6. package/bin/init.js +31 -37
  7. package/bin/repl.js +23 -43
  8. package/bin/watch.js +5 -9
  9. package/lib/bind/bindingResolver.js +2 -1
  10. package/lib/bind/index.js +1 -1
  11. package/lib/build/buildPlugin.js +18 -3
  12. package/lib/build/buildTaskEngine.js +2 -1
  13. package/lib/build/buildTaskFactory.js +33 -9
  14. package/lib/build/buildTaskProvider.js +1 -1
  15. package/lib/build/buildTaskProviderFactory.js +15 -61
  16. package/lib/build/constants.js +2 -0
  17. package/lib/build/index.js +5 -2
  18. package/lib/build/plugins.js +35 -0
  19. package/lib/build/provider/edmxBuildPlugin.js +9 -1
  20. package/lib/build/provider/featureToggleBuildPlugin.js +2 -3
  21. package/lib/build/provider/internalBuildPlugin.js +4 -0
  22. package/lib/build/provider/internalBuildTaskProvider.js +1 -1
  23. package/lib/build/provider/java/index.js +12 -6
  24. package/lib/build/provider/nodejs/index.js +3 -2
  25. package/lib/build/util.js +5 -0
  26. package/lib/client/base_command.js +8 -18
  27. package/lib/client/download_legacy.js +2 -10
  28. package/lib/client/params.js +6 -4
  29. package/lib/client/settings_manager.js +38 -35
  30. package/lib/compile/openapi/csdl2openapi.js +1 -1
  31. package/lib/deploy/to-hana/hana.js +53 -35
  32. package/lib/index.js +7 -1
  33. package/lib/init/constants.js +4 -2
  34. package/lib/init/template/_merging/registry-mta.js +12 -0
  35. package/lib/init/template/enterprise-messaging/files/event-mesh.json.hbs +1 -1
  36. package/lib/init/template/enterprise-messaging/index.js +1 -1
  37. package/lib/init/template/enterprise-messaging-shared/files/event-mesh.json.hbs +1 -1
  38. package/lib/init/template/enterprise-messaging-shared/index.js +19 -5
  39. package/lib/init/template/helm/index.js +1 -1
  40. package/lib/init/template/helm/subcharts/content-deployment/Chart.yaml +4 -4
  41. package/lib/init/template/helm/subcharts/content-deployment/templates/_helpers.tpl +4 -2
  42. package/lib/init/template/helm/subcharts/content-deployment/templates/job.yaml +4 -3
  43. package/lib/init/template/helm/subcharts/content-deployment/values.schema.json +9 -83
  44. package/lib/init/template/helm/subcharts/content-deployment/values.yaml +54 -15
  45. package/lib/init/template/helm/subcharts/service-instance/Chart.yaml +4 -4
  46. package/lib/init/template/helm/subcharts/service-instance/templates/serviceinstance.yaml +1 -1
  47. package/lib/init/template/helm/subcharts/service-instance/values.schema.json +0 -17
  48. package/lib/init/template/helm/subcharts/service-instance/values.yaml +28 -0
  49. package/lib/init/template/helm/subcharts/web-application/Chart.yaml +5 -5
  50. package/lib/init/template/helm/subcharts/web-application/templates/_api.tpl +60 -0
  51. package/lib/init/template/helm/subcharts/web-application/templates/_helpers.tpl +34 -73
  52. package/lib/init/template/helm/subcharts/web-application/templates/api-rule.yaml +4 -4
  53. package/lib/init/template/helm/subcharts/web-application/templates/deployment.yaml +96 -17
  54. package/lib/init/template/helm/subcharts/web-application/templates/network-policy.yaml +19 -3
  55. package/lib/init/template/helm/subcharts/web-application/templates/pod-disruption-budget.yaml +3 -3
  56. package/lib/init/template/helm/subcharts/web-application/templates/rbac.yaml +26 -0
  57. package/lib/init/template/helm/subcharts/web-application/templates/secret.yaml +1 -1
  58. package/lib/init/template/helm/subcharts/web-application/templates/service-account.yaml +1 -1
  59. package/lib/init/template/helm/subcharts/web-application/templates/service-binding.yaml +1 -1
  60. package/lib/init/template/helm/subcharts/web-application/templates/service.yaml +21 -3
  61. package/lib/init/template/helm/subcharts/web-application/templates/virtual-service.yaml +36 -0
  62. package/lib/init/template/helm/subcharts/web-application/values.schema.json +535 -142
  63. package/lib/init/template/helm/subcharts/web-application/values.yaml +168 -44
  64. package/lib/init/template/local-messaging/files/package.json.hbs +15 -0
  65. package/lib/init/template/local-messaging/index.js +25 -0
  66. package/lib/init/template/mta/index.js +2 -2
  67. package/lib/init/template/nodejs/files/.gitignore.hbs +3 -0
  68. package/lib/init/template/nodejs/files/.vscode/launch.json +0 -3
  69. package/lib/init/template/notifications/files/mta.yaml.hbs +17 -0
  70. package/lib/init/template/notifications/files/package.json.hbs +5 -0
  71. package/lib/init/template/notifications/index.js +43 -0
  72. package/lib/init/template/typer/files/package.json +1 -1
  73. package/lib/init/util/projectReader.js +1 -0
  74. package/lib/util/pruneAxiosErrors.js +4 -1
  75. package/lib/util/term.js +1 -2
  76. package/lib/watch/livereload-server.js +38 -2
  77. package/lib/watch/node-watch.js +3 -2
  78. package/npm-shrinkwrap.json +438 -2205
  79. package/package.json +2 -2
  80. package/lib/init/template/helm/subcharts/content-deployment/templating.md +0 -37
  81. package/lib/init/template/helm/subcharts/content-deployment/values-lint.yaml +0 -5
  82. package/lib/init/template/helm/subcharts/content-deployment/values.md +0 -1011
  83. package/lib/init/template/helm/subcharts/service-instance/templating.md +0 -18
  84. package/lib/init/template/helm/subcharts/service-instance/values-lint.yaml +0 -2
  85. package/lib/init/template/helm/subcharts/service-instance/values.md +0 -186
  86. package/lib/init/template/helm/subcharts/web-application/templating.md +0 -51
  87. package/lib/init/template/helm/subcharts/web-application/values-lint.yaml +0 -8
  88. 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.internal.labels" . | nindent 4 }}
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 }}
@@ -2,5 +2,5 @@
2
2
  apiVersion: v1
3
3
  kind: ServiceAccount
4
4
  metadata:
5
- name: {{ include "web-application.internal.fullname" . }}
5
+ name: {{ include "web-application.fullname" . }}
6
6
  {{- 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.internal.labels" $ | nindent 4 }}
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.internal.fullname" . }}
5
- labels: {{- include "web-application.internal.labels" . | nindent 4 }}
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.internal.selectorLabels" . | nindent 4 }}
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 }}