@sap/cds-dk 6.0.4 → 6.1.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 (97) hide show
  1. package/CHANGELOG.md +40 -1
  2. package/bin/add.js +29 -16
  3. package/bin/compile/index.js +6 -1
  4. package/bin/fix-redirects.js +4 -2
  5. package/bin/init.js +5 -0
  6. package/bin/login.js +8 -2
  7. package/bin/pull.js +58 -0
  8. package/bin/push.js +52 -0
  9. package/bin/subscribe.js +45 -0
  10. package/lib/bind/bindingUtil.js +1 -2
  11. package/lib/client/activate.js +1 -1
  12. package/lib/client/auth_manager.js +7 -3
  13. package/lib/client/extend.js +1 -1
  14. package/lib/client/helper/cf_helper.js +1 -0
  15. package/lib/client/helper/url_helper.js +7 -3
  16. package/lib/client/index.js +1 -1
  17. package/lib/client/params.js +4 -2
  18. package/lib/client/pull.js +51 -0
  19. package/lib/client/push.js +49 -0
  20. package/lib/client/settings_manager.js +74 -21
  21. package/lib/compile/openapi/csdl2openapi.js +135 -163
  22. package/lib/compile/openapi/index.js +0 -1
  23. package/lib/import/common.js +9 -1
  24. package/lib/import/odata/metadataconverter/MetadataConverter.js +17 -4
  25. package/lib/import/odata/v2parser.js +0 -1
  26. package/lib/import/odata/v4parser.js +103 -29
  27. package/lib/import/openapi/importOpenAPI.js +3 -3
  28. package/lib/init/constants.js +9 -3
  29. package/lib/init/template/_merging/registry-mta.js +290 -0
  30. package/lib/init/template/approuter/index.js +22 -32
  31. package/lib/init/template/auditlog/index.js +7 -9
  32. package/lib/init/template/extensibility/files/cds.package.json +7 -0
  33. package/lib/init/template/extensibility/files/cds.package.json.hbs +9 -0
  34. package/lib/init/template/extensibility/files/xs-security.json.hbs +26 -0
  35. package/lib/init/template/extensibility/index.js +48 -0
  36. package/lib/init/template/hana/files/java/cdsrc.json.hbs +1 -1
  37. package/lib/init/template/hana/files/java/profile.cdsrc.json.hbs +2 -2
  38. package/lib/init/template/hana/files/mta.yaml.hbs +10 -0
  39. package/lib/init/template/hana/files/nodejs/cds.package.json.hbs +1 -1
  40. package/lib/init/template/hana/files/nodejs/cds.profile.package.json.hbs +2 -2
  41. package/lib/init/template/hana/index.js +74 -61
  42. package/lib/init/template/kibana-logging/index.js +31 -37
  43. package/lib/init/template/lint/files/.eslint/rules/no-entity-moo.js +14 -14
  44. package/lib/init/template/mta/files/mta.yaml.hbs +1 -1
  45. package/lib/init/template/mta/index.js +13 -7
  46. package/lib/init/template/mtx/index.js +2 -142
  47. package/lib/init/template/multitenancy/files/cds.package.json +7 -0
  48. package/lib/init/template/multitenancy/files/cds.package.json.hbs +9 -0
  49. package/lib/init/template/{mtx → multitenancy}/files/dependencies.package.json +1 -1
  50. package/lib/init/template/multitenancy/files/java/.cdsrc.json +19 -0
  51. package/lib/init/template/multitenancy/files/java/package.json +31 -0
  52. package/lib/init/template/{mtx → multitenancy}/files/mta.yaml.hbs +13 -6
  53. package/lib/init/template/multitenancy/files/xs-security.json.hbs +18 -0
  54. package/lib/init/template/multitenancy/index.js +109 -0
  55. package/lib/init/template/nodejs/files/package.json.hbs +3 -0
  56. package/lib/init/template/templateBase.js +2 -1
  57. package/lib/init/template/toggles/files/cds.package.json +7 -0
  58. package/lib/init/template/toggles/files/cds.package.json.hbs +9 -0
  59. package/lib/init/template/toggles/index.js +24 -0
  60. package/lib/init/template/xsuaa/files/mta.yaml.hbs +10 -0
  61. package/lib/init/template/xsuaa/index.js +44 -33
  62. package/lib/init/util/projectReader.js +12 -7
  63. package/lib/init/util/templateUtil.js +112 -110
  64. package/lib/k8s/ChartAdder.js +11 -3
  65. package/lib/k8s/ChartBuilder.js +6 -0
  66. package/lib/k8s/buildModel.js +1 -3
  67. package/lib/k8s/connectivity/index.js +5 -5
  68. package/lib/k8s/deployment/index.js +2 -4
  69. package/lib/k8s/deployment/subchart/Chart.yaml +1 -1
  70. package/lib/k8s/deployment/subchart/templates/_helpers.tpl +22 -11
  71. package/lib/k8s/deployment/subchart/templates/deployment.yaml +12 -5
  72. package/lib/k8s/deployment/subchart/templates/network-policy.yaml +3 -1
  73. package/lib/k8s/deployment/subchart/templates/pod-disruption-budget.yaml +1 -1
  74. package/lib/k8s/deployment/subchart/values.md +812 -0
  75. package/lib/k8s/deployment/subchart/values.schema.json +125 -30
  76. package/lib/k8s/deployment/subchart/values.yaml +7 -3
  77. package/lib/k8s/hana-deployer/index.js +10 -0
  78. package/lib/k8s/hana-deployer/templates/hana-deployer-job.yaml +8 -0
  79. package/lib/k8s/html5-apps-deployer/index.js +10 -0
  80. package/lib/k8s/html5-apps-deployer/templates/html5-apps-deployer-job.yaml +8 -0
  81. package/lib/k8s/index.js +2 -2
  82. package/lib/k8s/resources/helm/chart/templates/_deployment_helpers.tpl +1 -159
  83. package/lib/k8s/resources/helm/chart/templates/_helpers.tpl +0 -33
  84. package/lib/k8s/resources/helm/chart/templates/_sapcp_helpers.tpl +1 -1
  85. package/lib/k8s/resources/helm/chart/values.schema.json +449 -0
  86. package/lib/lint/Linter.js +155 -158
  87. package/lib/lint/io.js +13 -5
  88. package/npm-shrinkwrap.json +510 -86
  89. package/package.json +5 -4
  90. package/lib/init/template/_merging/existences.js +0 -297
  91. package/lib/init/template/mtx/files/cds.package.json +0 -12
  92. package/lib/init/template/mtx/files/cds.package.json.hbs +0 -14
  93. package/lib/init/template/mtx/files/java/.cdsrc.json +0 -17
  94. package/lib/init/template/mtx/files/java/package.json +0 -43
  95. package/lib/init/template/mtx/files/java/server.js +0 -30
  96. package/lib/init/template/mtx/files/xs-security.json.hbs +0 -48
  97. package/lib/lint/.eslintrc.js +0 -3
@@ -18,7 +18,7 @@ spec:
18
18
  automountServiceAccountToken: false
19
19
  serviceAccountName: {{ .Values.serviceAccountName }}
20
20
  containers:
21
- - image: "{{ required ".Values.image.repository is required!" .Values.image.repository }}:{{ .Values.image.tag }}"
21
+ - image: {{ include "web-application.imageName" . }}
22
22
  name: {{ include "web-application.name" . }}
23
23
  ports:
24
24
  - name: http
@@ -30,10 +30,17 @@ spec:
30
30
  name: {{ $secretName }}
31
31
  {{- end }}
32
32
  env:
33
- {{- include "cap.web-application.env" . | indent 8 }}
34
33
  {{- range $k, $v := .Values.env }}
35
34
  - name: {{ $k }}
36
- value: {{ tpl ($v | toString) $ | quote }}
35
+ value: {{ $v | quote }}
36
+ {{- end }}
37
+ {{- if not .Values.env.APPLICATION_NAME }}
38
+ - name: APPLICATION_NAME
39
+ value: {{ include "web-application.fullname" . }}
40
+ {{- end }}
41
+ {{- if not .Values.env.APPLICATION_URI }}
42
+ - name: APPLICATION_URI
43
+ value: {{ include "web-application.applicationUri" . }}
37
44
  {{- end }}
38
45
  {{- if .Values.bindings }}
39
46
  - name: SERVICE_BINDING_ROOT
@@ -79,7 +86,7 @@ spec:
79
86
  - name: {{ $volume.name | quote }}
80
87
  {{- toYaml $volume.volumeMount | nindent 10 }}
81
88
  {{- end }}
82
- {{- include "cap.web-application.serviceMounts" . | nindent 8 }}
89
+ {{- include "web-application.serviceMounts" . | nindent 8 }}
83
90
  resources:
84
91
  {{- toYaml .Values.resources | nindent 10 }}
85
92
  securityContext:
@@ -103,7 +110,7 @@ spec:
103
110
  volumes:
104
111
  - emptyDir: {}
105
112
  name: tmp
106
- {{- include "cap.web-application.serviceVolumes" . | nindent 6 }}
113
+ {{- include "web-application.serviceVolumes" . | nindent 6 }}
107
114
  {{- range $volume := .Values.additionalVolumes }}
108
115
  -
109
116
  {{- omit $volume "volumeMount" | toYaml | nindent 8 }}
@@ -9,7 +9,9 @@ spec:
9
9
  - podSelector:
10
10
  matchLabels:
11
11
  app: istio-ingressgateway
12
- namespaceSelector: {}
12
+ namespaceSelector:
13
+ matchLabels:
14
+ name: istio-system
13
15
  podSelector:
14
16
  matchLabels: {{- include "web-application.selectorLabels" . | nindent 6 }}
15
17
  policyTypes:
@@ -1,5 +1,5 @@
1
1
  {{- if .Values.ha.enabled }}
2
- apiVersion: policy/v1beta1
2
+ apiVersion: policy/v1
3
3
  kind: PodDisruptionBudget
4
4
  metadata:
5
5
  name: {{ include "web-application.fullname" . }}