@sap/cds-dk 7.7.0 → 7.7.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/import.js CHANGED
@@ -1,7 +1,7 @@
1
1
  module.exports = Object.assign(_import, {
2
2
  _name: 'import',
3
3
  options: ['--out', '--as', '--include-namespaces', '--from', '--config'],
4
- flags: ['--dry', '--force', '--no-copy', '--no-save', '--keep-namespace'],
4
+ flags: ['--dry', '--force', '--no-copy', '--no-save', '--keep-namespace', '--beta'],
5
5
  shortcuts: ['-o', '-as', '-ns', undefined, '-c', '-', '-f'],
6
6
  help: `
7
7
  # SYNOPSIS
@@ -47,6 +47,10 @@ module.exports = Object.assign(_import, {
47
47
  *-c | --config* <JSON Object>
48
48
  Adds the provided JSON Object as custom configuration data to the package.json.
49
49
 
50
+ *--beta*
51
+ Enables beta mode in cds import.
52
+ - Populates default value for optional action and function parameters in the CSN or CDS.
53
+
50
54
  *Below options are valid for OData only*
51
55
 
52
56
  *--keep-namespace*
@@ -21,16 +21,16 @@ class JavaBuildPlugin extends EdmxBuildPlugin {
21
21
  if (!model) {
22
22
  return
23
23
  }
24
- const odata = await this._compileForOdata(model, compileDest)
24
+ await this._compileForJava(model, compileDest)
25
25
 
26
26
  if (!this.hasBuildOption(CONTENT_EDMX, false)) {
27
27
  // generate edmx files containing all features
28
28
  // REVISIT: localized edmx for backward compatibility
29
29
  if (!this.hasBuildOption(CONTENT_LOCALIZED_EDMX, false)) {
30
- await this.compileToEdmx(odata, compileDest, { [FLAVOR_LOCALIZED_EDMX]: true })
30
+ await this.compileToEdmx(model, compileDest, { [FLAVOR_LOCALIZED_EDMX]: true })
31
31
  }
32
32
  // non-localized edmx
33
- await this.compileToEdmx(odata, path.join(compileDest, 'odata', cds.env.odata.version), { [FLAVOR_LOCALIZED_EDMX]: this.hasBuildOption(FLAVOR_LOCALIZED_EDMX, true) })
33
+ await this.compileToEdmx(model, path.join(compileDest, 'odata', cds.env.odata.version), { [FLAVOR_LOCALIZED_EDMX]: this.hasBuildOption(FLAVOR_LOCALIZED_EDMX, true) })
34
34
  }
35
35
 
36
36
  if (!this.hasBuildOption(CONTENT_LANGUAGE_BUNDLES, false)) {
@@ -65,7 +65,7 @@ class JavaBuildPlugin extends EdmxBuildPlugin {
65
65
  })
66
66
  }
67
67
 
68
- async _compileForOdata(model, csnDest, compileOptions = {}) {
68
+ async _compileForJava(model, csnDest, compileOptions = {}) {
69
69
  // csn for service providers
70
70
  const m = cds.compile.for.java(model, {
71
71
  ...this._options4odata(),
@@ -56,10 +56,6 @@ class MtxExtensionBuildPlugin extends InternalBuildPlugin {
56
56
  await this.compileToJson(extensionModel, path.join(destExt, 'extension.csn'))
57
57
  await this.collectLanguageBundles(extensionModel, path.join(destExt, 'i18n'))
58
58
 
59
- // perform SQL backend validation to prevent extension deployment problems later on
60
- // REVISIT: disabled - causing stack overflow errors in LinkedCSN for some scenarios
61
- // cds.compile.to.sql(model)
62
-
63
59
  const files = Object.keys(await cds.deploy.resources(model))
64
60
  if (files.length > 0) {
65
61
  const dataDest = path.join(destExt, 'data')
@@ -99,7 +95,7 @@ class MtxExtensionBuildPlugin extends InternalBuildPlugin {
99
95
  // add all resources contained in 'gen/ext' folder
100
96
  return new ResourcesTarBuilder(this).writeTarFile(path.join(dest, 'extension.tgz'), destExt)
101
97
  }
102
-
98
+
103
99
  _lintExtModel(extModel, model, saasPkgPath) {
104
100
  const linter = this._linter()
105
101
  if (!linter) {
@@ -131,12 +127,34 @@ class MtxExtensionBuildPlugin extends InternalBuildPlugin {
131
127
  }
132
128
  return linter
133
129
  }
134
-
130
+
135
131
  static _getSaasPkgPath() {
136
132
  // cds.env.extends holds the SaaS app package name, also if the extends field is defined on root level
133
+ let saasPkgPath = this._getWorkspacePath(cds.env.extends || '_base')
134
+ if (!saasPkgPath) {
135
+ // older projects might not have a workspace definition
136
+ saasPkgPath = this._getNodeModulesPath(saasPkgPath)
137
+ }
138
+ return saasPkgPath
139
+ }
140
+
141
+ static _getWorkspacePath(pkg) {
142
+ const pkgJson = require(path.join(cds.root, 'package.json'))
143
+ if (pkgJson.workspaces) {
144
+ try {
145
+ // loading package.json of SaaS app - might not exist for older projects
146
+ return path.dirname(require.resolve(path.join(pkg, 'package.json'), { paths: [cds.root] }))
147
+ } catch (e) {
148
+ if (e.code !== 'MODULE_NOT_FOUND') throw e
149
+ throw new BuildError(`The SaaS application base model is missing. Did you execute 'cds pull' and 'npm install'?`)
150
+ }
151
+ }
152
+ }
153
+
154
+ static _getNodeModulesPath() {
137
155
  const saasPkgPath = path.join(cds.root, 'node_modules', cds.env.extends || '_base')
138
156
  if (!fs.existsSync(saasPkgPath)) {
139
- throw new BuildError(`The SaaS application base model '${path.relative(cds.root, saasPkgPath)}' is missing. Did you run the 'cds pull' command?`)
157
+ throw new BuildError(`The SaaS application base model is missing. Did you execute 'cds pull' and 'npm install'?`)
140
158
  }
141
159
  return saasPkgPath
142
160
  }
@@ -57,7 +57,7 @@ Therefore, specifying the CDS model is not required when calling 'cds deploy'.`;
57
57
 
58
58
  const fromFile = vcapFile && exists(vcapFile) ? await read(vcapFile) : {};
59
59
  const fromEnv = this.getFromEnv('VCAP_SERVICES', 'SERVICE_REPLACEMENTS');
60
- let vcapEnv = { ...fromFile, ...fromEnv };
60
+ let vcapEnv = { ...fromEnv, ...fromFile };
61
61
  if (process.env.TARGET_CONTAINER) {
62
62
  vcapEnv.TARGET_CONTAINER = process.env.TARGET_CONTAINER;
63
63
  }
@@ -82,30 +82,32 @@ Therefore, specifying the CDS model is not required when calling 'cds deploy'.`;
82
82
  }
83
83
 
84
84
  const hasVCAPEnv = Object.keys(vcapEnv).length > 0;
85
+ let serviceKeyName
85
86
  if (!serviceName && hasVCAPEnv) {
86
87
  await fs.mkdir(dest, { recursive: true });
87
- }
88
- const { cfServiceInstanceName, cfServiceInstanceKeyName, serviceKey } =
88
+ } else {
89
+ const { cfServiceInstanceName, cfServiceInstanceKeyName, serviceKey } =
89
90
  await this._getOrCreateCFService(projectPath, dest, serviceName, tunnelAddress);
90
91
 
91
- serviceName ??= cfServiceInstanceName;
92
- if (!vcapEnv.VCAP_SERVICES || serviceName) {
93
- vcapEnv.VCAP_SERVICES = this._getVCAPServicesEntry(cfServiceInstanceName, serviceKey);
94
- }
92
+ serviceName ??= cfServiceInstanceName;
93
+ serviceKeyName ??= cfServiceInstanceKeyName
94
+ if (!vcapEnv.VCAP_SERVICES || serviceName) {
95
+ vcapEnv.VCAP_SERVICES = this._getVCAPServicesEntry(cfServiceInstanceName, serviceKey);
96
+ }
95
97
 
96
- if (storeCredentials) {
97
- await this._addInstanceToDefaultEnvJson([dest, projectPath], cfServiceInstanceName, serviceKey);
98
+ if (storeCredentials) {
99
+ await this._addInstanceToDefaultEnvJson([dest, projectPath], cfServiceInstanceName, serviceKey);
100
+ }
98
101
  }
99
102
 
100
103
  console.log(`${bold('Starting deployment to SAP HANA ...')}`);
101
-
102
104
  DEBUG?.({ dest, vcapEnv, hdiOptions })
103
105
  await hdi.deploy(dest, vcapEnv, hdiOptions);
104
106
 
105
107
  if (!hasVCAPEnv) {
106
108
  const bindOptions = {
107
109
  ...options,
108
- to: `${serviceName}:${cfServiceInstanceKeyName}`,
110
+ to: `${serviceName}:${serviceKeyName}`,
109
111
  for: options.for,
110
112
  kind: task.for
111
113
  }
@@ -227,12 +229,12 @@ Therefore, specifying the CDS model is not required when calling 'cds deploy'.`;
227
229
 
228
230
  _getVCAPServicesEntry(serviceInstanceName, serviceKey) {
229
231
  return {
230
- hana: [
231
- {
232
- name: serviceInstanceName,
233
- tags: ['hana'],
234
- credentials: serviceKey
235
- }
232
+ hana: [
233
+ {
234
+ name: serviceInstanceName,
235
+ tags: ['hana'],
236
+ credentials: serviceKey
237
+ }
236
238
  ]
237
239
  };
238
240
  }
@@ -16,7 +16,7 @@ let optionsMapping = {
16
16
  'no-save': 'no_save'
17
17
  };
18
18
 
19
- let apiOptions = ['includeNamespaces', 'keepNamespace'];
19
+ let apiOptions = ['includeNamespaces', 'keepNamespace', 'beta'];
20
20
  let commonOptions = ['no_copy', 'no_save', 'out', 'dry', 'as', 'from', 'force', 'config'];
21
21
 
22
22
  async function generateEDMX2JSON(edmx) {
@@ -64,7 +64,7 @@ async function cds_import_from_edmx(filepath, options = { keepNamespace: false }
64
64
  filepath = await common.isValidInputFile(path.resolve(process.cwd(), filepath));
65
65
  const src = await common.getContentFromFile(filepath);
66
66
  // takes the api specific options and reads it from env
67
- let odataOptions = { include_namespaces: options.includeNamespaces, keep_namespace: options.keepNamespace };
67
+ let odataOptions = { include_namespaces: options.includeNamespaces, keep_namespace: options.keepNamespace, beta: options.beta};
68
68
  if (cds.env.import) {
69
69
  common.readEnvVariables(odataOptions, false);
70
70
  }
@@ -82,7 +82,7 @@ const known_vocabularies = {
82
82
  'com.sap.vocabularies.UI.v1': 'UI',
83
83
  };
84
84
 
85
- function _initialize(parserContext, mockServerUc) {
85
+ function _initialize(parserContext) {
86
86
  parserContext.unboundedActions = {};
87
87
  parserContext.unboundedFunctions = {};
88
88
  parserContext.entityTypes = [];
@@ -103,7 +103,8 @@ function _initialize(parserContext, mockServerUc) {
103
103
  parserContext.entityToBoundedActions = {};
104
104
  parserContext.entityToBoundedFunctions = {};
105
105
  parserContext.entityContainerAnnotations = {};
106
- parserContext.mockServerUc = mockServerUc;
106
+ parserContext.mockServerUc = true;
107
+ parserContext.beta = false;
107
108
  }
108
109
  function _isJson(edmx) {
109
110
  let isJson = false;
@@ -290,7 +291,7 @@ function _replaceSpecialCharacters(text) {
290
291
  return text.replace(/(?:\\[rn]|[\r\n]+)+/gm, "\n").replace(/\s+/g, ' ').replace(/"/g, "&quot;").trim();
291
292
  }
292
293
 
293
- function _resolveCoreTerm(annotationTerm, annotationTermObject, csnDefsTargetObject) {
294
+ function _resolveCoreTerm(annotationTerm, annotationTermObject, csnDefsTargetObject, parserContext) {
294
295
  if (annotationTerm === "@Core.Description" || annotationTerm === "@Core.LongDescription") {
295
296
  // we don't capture `null` value for doc
296
297
  if (annotationTermObject === null) return;
@@ -313,9 +314,10 @@ function _resolveCoreTerm(annotationTerm, annotationTermObject, csnDefsTargetObj
313
314
  if (annotationTermObject === null) annotationTermObject = true;
314
315
 
315
316
  if (annotationTerm === "@Core.OptionalParameter") {
316
- _updateElementObjectForDefaultValue(csnDefsTargetObject, annotationTermObject.DefaultValue);
317
- }
318
- else {
317
+ if (parserContext.beta) {
318
+ _updateElementObjectForDefaultValue(csnDefsTargetObject, annotationTermObject.DefaultValue);
319
+ }
320
+ } else {
319
321
  _captureAnnotationInCSN(annotationTerm, annotationTermObject, csnDefsTargetObject);
320
322
  }
321
323
  }
@@ -403,13 +405,13 @@ function _parseValidationTerm(annotationTerm, annotationTermObject, csnDefsTarge
403
405
  _captureAnnotationInCSN(annotationTerm, annotationTermObject, csnDefsTargetObject);
404
406
  }
405
407
 
406
- function _parseAnnotationTerms(annotationTerm, annotationTermObject, csnDefsTargetObject) {
408
+ function _parseAnnotationTerms(annotationTerm, annotationTermObject, csnDefsTargetObject, parserContext) {
407
409
  const term = annotationTerm.split('.');
408
410
  const vocabAlias = term[0];
409
411
 
410
412
  switch (vocabAlias) {
411
413
  case "@Core":
412
- _resolveCoreTerm(annotationTerm, annotationTermObject, csnDefsTargetObject);
414
+ _resolveCoreTerm(annotationTerm, annotationTermObject, csnDefsTargetObject, parserContext);
413
415
  break;
414
416
  case "@Capabilities":
415
417
  _parseCapabilitiesTerm(annotationTerm, annotationTermObject, csnDefsTargetObject);
@@ -458,7 +460,7 @@ function _captureAnnotationWithinElement(sourceObject, targetObject, parserConte
458
460
  Object.keys(sourceObject).forEach(key => {
459
461
  if (key.startsWith('@')) {
460
462
  element = _resolveAnotationTerm(JSON.stringify(key), parserContext);
461
- _parseAnnotationTerms(element, sourceObject[key], targetObject);
463
+ _parseAnnotationTerms(element, sourceObject[key], targetObject, parserContext);
462
464
  }
463
465
  });
464
466
  }
@@ -1210,7 +1212,7 @@ function _parseAnnotations(schemaAnnotations, csnDefs, parserContext) {
1210
1212
  let annotationTerms = schemaAnnotations[annotationTargetPath];
1211
1213
  Object.keys(annotationTerms).forEach(annotationTerm => {
1212
1214
  let annotationTermObject = schemaAnnotations[annotationTargetPath][annotationTerm];
1213
- _parseAnnotationTerms(annotationTerm, annotationTermObject, csnDefsTargetObject);
1215
+ _parseAnnotationTerms(annotationTerm, annotationTermObject, csnDefsTargetObject, parserContext);
1214
1216
  });
1215
1217
  }
1216
1218
  });
@@ -1684,7 +1686,12 @@ async function getEdmxv4CSN(edmx, ignorePersistenceSkip, mockServerUc, importerC
1684
1686
  let name_space = [];
1685
1687
 
1686
1688
  const parserContext = {};
1687
- _initialize(parserContext, mockServerUc);
1689
+ _initialize(parserContext);
1690
+ parserContext.mockServerUc = mockServerUc;
1691
+
1692
+ if (importerContext.beta) {
1693
+ parserContext.beta = importerContext.beta
1694
+ }
1688
1695
 
1689
1696
  if (importerContext.include_all_namespaces) {
1690
1697
  name_space.push(true);
@@ -4,7 +4,7 @@ module.exports = {
4
4
  COMMAND_INIT: 'init',
5
5
  COMMAND_ADD: 'add',
6
6
 
7
- MAVEN_ARCHETYPE_VERSION: '2.6.1',
7
+ MAVEN_ARCHETYPE_VERSION: '2.7.0',
8
8
 
9
9
  OPTIONS: Object.freeze({
10
10
  JAVA: 'java',
@@ -50,7 +50,7 @@ module.exports = {
50
50
  REGEX_JAVA_PACKAGE: /^[a-z_][a-z0-9_]*(\.[a-z_][a-z0-9_]*)*$/g,
51
51
  // copied from mbt error message
52
52
  REGEX_JAVA_VERSION: /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/,
53
- REGEX_PROJECT_NAME: /[^0-9a-zA-Z_-]/g,
53
+ REGEX_PROJECT_NAME: /[^0-9a-zA-Z_-]+/g,
54
54
 
55
55
  URLS: Object.freeze({
56
56
  PIPELINE_HELP: 'https://sap.github.io/jenkins-library/',
package/lib/init/index.js CHANGED
@@ -8,7 +8,7 @@ const {
8
8
  HANA, APPROUTER, XSUAA, APPLICATION_LOGGING, ENTERPRISE_MESSAGING,
9
9
  MTA, MULTITENANCY, PIPELINE,
10
10
  TINY_SAMPLE, SAMPLE
11
- } = OPTIONS
11
+ } = OPTIONS
12
12
 
13
13
  const cds = require('..'), { exists, readdir } = cds.utils
14
14
  const DEBUG = /\b(y|all|cli)\b/.test(process.env.DEBUG) ? console.debug : undefined
@@ -334,13 +334,9 @@ module.exports = class CDSGenerator {
334
334
 
335
335
  // remove duplicates by using a set
336
336
  const invalidChars = new Set(projectName.match(REGEX_PROJECT_NAME));
337
- switch (invalidChars.size) {
338
- case 0:
339
- break;
340
- case 1:
341
- throw `Project name ${projectName} contains an invalid character (${[...invalidChars].join(', ')}). Specify a different project name.`
342
- default:
343
- throw `Project name ${projectName} contains invalid characters (${[...invalidChars].join(', ')}). Specify a different project name.`
337
+ if (invalidChars.size > 0) {
338
+ throw `Project name '${projectName}' contains at least one character ('${[...invalidChars]}') which is not supported in npm package names.
339
+ Specify a different project name by replacing characters with '_' or '-', for example '${projectName.replace(REGEX_PROJECT_NAME, '_')}' or '${projectName.replace(REGEX_PROJECT_NAME, '-')}'.`
344
340
  }
345
341
  }
346
342
 
package/lib/init/mvn.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- const { URLS, MAVEN_ARCHETYPE_VERSION, OPTIONS: { JAVA_MVN, JAVA_PACKAGE, SAMPLES, HANA }, REGEX_JAVA_PACKAGE } = require('./constants');
2
+ const { URLS, MAVEN_ARCHETYPE_VERSION, OPTIONS: { JAVA_MVN, JAVA_PACKAGE, HANA }, REGEX_JAVA_PACKAGE } = require('./constants');
3
3
 
4
4
  const cp = require('child_process');
5
5
  const util = require('util');
@@ -143,10 +143,6 @@ class MvnArchetypeUtil {
143
143
  params.set(`-DtargetPlatform`, `cloudfoundry`);
144
144
  }
145
145
 
146
- const hasSamples = !!(options.add && options.add.has(SAMPLES));
147
- params.set(`-DincludeModel`, hasSamples);
148
- params.set(`-DincludeIntegrationTest`, hasSamples);
149
-
150
146
  if (options[JAVA_MVN]) {
151
147
  this._scanMvnParams(options[JAVA_MVN], params);
152
148
  }
@@ -4,4 +4,4 @@ name: content-deployment
4
4
  sources:
5
5
  - https://github.tools.sap/unified-runtime/content-deployment
6
6
  type: application
7
- version: 1.4.0
7
+ version: 1.5.0
@@ -23,6 +23,9 @@ spec:
23
23
  serviceAccountName: {{ tpl (.Values.serviceAccountName | default (include "content-deployment.internal.fullname" .)) $ }}
24
24
  containers:
25
25
  - image: {{ include "content-deployment.internal.imageName" . }}
26
+ {{- if ( or .Values.global.imagePullPolicy .Values.imagePullPolicy ) }}
27
+ imagePullPolicy: {{ .Values.imagePullPolicy | default .Values.global.imagePullPolicy }}
28
+ {{- end }}
26
29
  name: {{ include "content-deployment.internal.name" . }}
27
30
  env:
28
31
  - name: EXIT
@@ -58,6 +58,9 @@
58
58
  "$ref": "#/definitions/ImageRegistry"
59
59
  }
60
60
  }
61
+ },
62
+ "imagePullPolicy": {
63
+ "$ref": "#/definitions/ImagePullPolicy"
61
64
  }
62
65
  }
63
66
  },
@@ -133,6 +136,9 @@
133
136
  }
134
137
  }
135
138
  },
139
+ "imagePullPolicy": {
140
+ "$ref": "#/definitions/ImagePullPolicy"
141
+ },
136
142
  "resources": {
137
143
  "$id": "#/properties/resources",
138
144
  "type": "object",
@@ -506,6 +512,12 @@
506
512
  "title": "Image tag",
507
513
  "type": "string",
508
514
  "$comment": "Copied from https://github.com/containers/image/blob/18d58d29fdc4fc32fb8a8a6d186b829b217f1bf5/docker/reference/regexp.go#L68-L70",
509
- "pattern": "^((?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?/)?[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?)(?::([\\w][\\w.-]{0,127}))?(?:@([A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}))?$" }
515
+ "pattern": "^((?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?/)?[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?)(?::([\\w][\\w.-]{0,127}))?(?:@([A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}))?$"
516
+ },
517
+ "ImagePullPolicy": {
518
+ "title": "ImagePullPolicy",
519
+ "type": "string",
520
+ "enum": ["Always", "IfNotPresent", "Never"]
521
+ }
510
522
  }
511
523
  }
@@ -15,7 +15,7 @@ global:
15
15
  _internal:
16
16
  content-deployment:
17
17
  versions:
18
- 1.4.0: true
18
+ 1.5.0: true
19
19
  # Will be used instead of the `.Chart.Name`, e.g. when generating the Deployment name.
20
20
  # nameOverride: name
21
21
 
@@ -5,4 +5,4 @@ name: web-application
5
5
  sources:
6
6
  - https://github.tools.sap/unified-runtime/web-application
7
7
  type: application
8
- version: 1.10.0
8
+ version: 1.11.0
@@ -190,6 +190,7 @@ spec:
190
190
  maxSkew: {{ $constraint.maxSkew }}
191
191
  topologyKey: {{ $constraint.topologyKey }}
192
192
  whenUnsatisfiable: {{ $constraint.whenUnsatisfiable }}
193
+ matchLabelKeys: {{ $constraint.matchLabelKeys | default (list "pod-template-hash") | toYaml | nindent 10 }}
193
194
  {{- end }}
194
195
  volumes:
195
196
  - emptyDir: {}
@@ -3,6 +3,10 @@ kind: Service
3
3
  metadata:
4
4
  name: {{ include "web-application.fullname" . }}
5
5
  labels: {{- include "web-application.labels" . | nindent 4 }}
6
+ {{- if .Values.annotations.service }}
7
+ annotations:
8
+ {{- tpl (toYaml .Values.annotations.service) $ | nindent 4 }}
9
+ {{- end }}
6
10
  spec:
7
11
  ports:
8
12
  - port: {{ .Values.port }}
@@ -317,6 +317,12 @@
317
317
  "ScheduleAnyway",
318
318
  "DoNotSchedule"
319
319
  ]
320
+ },
321
+ "matchLabelKeys": {
322
+ "type": "array",
323
+ "items": {
324
+ "type": "string"
325
+ }
320
326
  }
321
327
  }
322
328
  },
@@ -824,7 +830,17 @@
824
830
  "type": "string"
825
831
  }
826
832
  }
833
+ },
834
+ "service": {
835
+ "type": "object",
836
+ "title": "Annotations to add to the Service",
837
+ "patternProperties": {
838
+ ".*": {
839
+ "type": "string"
840
+ }
841
+ }
827
842
  }
843
+
828
844
  }
829
845
  },
830
846
  "sidecars": {
@@ -15,7 +15,7 @@ global:
15
15
  _internal:
16
16
  web-application:
17
17
  versions:
18
- 1.10.0: true
18
+ 1.11.0: true
19
19
  ## Will be used instead of the `.Chart.Name`, e.g. when generating the Deployment name.
20
20
  # nameOverride: name
21
21
 
@@ -84,9 +84,13 @@ availability:
84
84
  - topologyKey: topology.kubernetes.io/zone
85
85
  maxSkew: 1
86
86
  whenUnsatisfiable: ScheduleAnyway
87
+ matchLabelKeys:
88
+ - pod-template-hash
87
89
  - topologyKey: kubernetes.io/hostname
88
90
  maxSkew: 1
89
91
  whenUnsatisfiable: ScheduleAnyway
92
+ matchLabelKeys:
93
+ - pod-template-hash
90
94
  # Health-check configuration
91
95
  health:
92
96
  # Liveness-probe configuration.
@@ -219,6 +223,8 @@ bindings:
219
223
  annotations:
220
224
  ## Annotations to add to the Deployment and underlying Pods
221
225
  deployment: {}
226
+ ## Annotations to add to the Service
227
+ service: {}
222
228
  # sidecars:
223
229
  # sidecar-1:
224
230
  # image:
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "7.7.0",
3
+ "version": "7.7.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sap/cds-dk",
9
- "version": "7.7.0",
9
+ "version": "7.7.2",
10
10
  "license": "SEE LICENSE IN LICENSE",
11
11
  "dependencies": {
12
12
  "@sap/cds": "^7",
@@ -215,7 +215,7 @@
215
215
  }
216
216
  },
217
217
  "node_modules/@sap/cds": {
218
- "version": "7.7.0",
218
+ "version": "7.7.2",
219
219
  "license": "SEE LICENSE IN LICENSE",
220
220
  "dependencies": {
221
221
  "@cap-js/cds-types": "<1",
@@ -232,7 +232,7 @@
232
232
  }
233
233
  },
234
234
  "node_modules/@sap/cds-compiler": {
235
- "version": "4.7.4",
235
+ "version": "4.7.6",
236
236
  "license": "SEE LICENSE IN LICENSE",
237
237
  "dependencies": {
238
238
  "antlr4": "4.9.3"
@@ -280,7 +280,7 @@
280
280
  }
281
281
  },
282
282
  "node_modules/@sap/eslint-plugin-cds": {
283
- "version": "2.6.5",
283
+ "version": "2.6.7",
284
284
  "license": "See LICENSE file",
285
285
  "dependencies": {
286
286
  "@sap/cds": ">=5.6.0",
@@ -617,11 +617,11 @@
617
617
  }
618
618
  },
619
619
  "node_modules/body-parser": {
620
- "version": "1.20.1",
620
+ "version": "1.20.2",
621
621
  "license": "MIT",
622
622
  "dependencies": {
623
623
  "bytes": "3.1.2",
624
- "content-type": "~1.0.4",
624
+ "content-type": "~1.0.5",
625
625
  "debug": "2.6.9",
626
626
  "depd": "2.0.0",
627
627
  "destroy": "1.2.0",
@@ -629,7 +629,7 @@
629
629
  "iconv-lite": "0.4.24",
630
630
  "on-finished": "2.4.1",
631
631
  "qs": "6.11.0",
632
- "raw-body": "2.5.1",
632
+ "raw-body": "2.5.2",
633
633
  "type-is": "~1.6.18",
634
634
  "unpipe": "1.0.0"
635
635
  },
@@ -1231,12 +1231,12 @@
1231
1231
  }
1232
1232
  },
1233
1233
  "node_modules/express": {
1234
- "version": "4.18.2",
1234
+ "version": "4.18.3",
1235
1235
  "license": "MIT",
1236
1236
  "dependencies": {
1237
1237
  "accepts": "~1.3.8",
1238
1238
  "array-flatten": "1.1.1",
1239
- "body-parser": "1.20.1",
1239
+ "body-parser": "1.20.2",
1240
1240
  "content-disposition": "0.5.4",
1241
1241
  "content-type": "~1.0.4",
1242
1242
  "cookie": "0.5.0",
@@ -1621,7 +1621,7 @@
1621
1621
  "optional": true
1622
1622
  },
1623
1623
  "node_modules/hasown": {
1624
- "version": "2.0.1",
1624
+ "version": "2.0.2",
1625
1625
  "license": "MIT",
1626
1626
  "dependencies": {
1627
1627
  "function-bind": "^1.1.2"
@@ -2446,7 +2446,7 @@
2446
2446
  }
2447
2447
  },
2448
2448
  "node_modules/prebuild-install": {
2449
- "version": "7.1.1",
2449
+ "version": "7.1.2",
2450
2450
  "license": "MIT",
2451
2451
  "optional": true,
2452
2452
  "dependencies": {
@@ -2564,7 +2564,7 @@
2564
2564
  }
2565
2565
  },
2566
2566
  "node_modules/raw-body": {
2567
- "version": "2.5.1",
2567
+ "version": "2.5.2",
2568
2568
  "license": "MIT",
2569
2569
  "dependencies": {
2570
2570
  "bytes": "3.1.2",
@@ -2777,15 +2777,15 @@
2777
2777
  "optional": true
2778
2778
  },
2779
2779
  "node_modules/set-function-length": {
2780
- "version": "1.2.1",
2780
+ "version": "1.2.2",
2781
2781
  "license": "MIT",
2782
2782
  "dependencies": {
2783
- "define-data-property": "^1.1.2",
2783
+ "define-data-property": "^1.1.4",
2784
2784
  "es-errors": "^1.3.0",
2785
2785
  "function-bind": "^1.1.2",
2786
- "get-intrinsic": "^1.2.3",
2786
+ "get-intrinsic": "^1.2.4",
2787
2787
  "gopd": "^1.0.1",
2788
- "has-property-descriptors": "^1.0.1"
2788
+ "has-property-descriptors": "^1.0.2"
2789
2789
  },
2790
2790
  "engines": {
2791
2791
  "node": ">= 0.4"
@@ -2813,10 +2813,10 @@
2813
2813
  }
2814
2814
  },
2815
2815
  "node_modules/side-channel": {
2816
- "version": "1.0.5",
2816
+ "version": "1.0.6",
2817
2817
  "license": "MIT",
2818
2818
  "dependencies": {
2819
- "call-bind": "^1.0.6",
2819
+ "call-bind": "^1.0.7",
2820
2820
  "es-errors": "^1.3.0",
2821
2821
  "get-intrinsic": "^1.2.4",
2822
2822
  "object-inspect": "^1.13.1"
@@ -3297,7 +3297,7 @@
3297
3297
  }
3298
3298
  },
3299
3299
  "node_modules/yaml": {
3300
- "version": "2.4.0",
3300
+ "version": "2.4.1",
3301
3301
  "license": "ISC",
3302
3302
  "bin": {
3303
3303
  "yaml": "bin.mjs"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/cds-dk",
3
- "version": "7.7.0",
3
+ "version": "7.7.2",
4
4
  "description": "Command line client and development toolkit for the SAP Cloud Application Programming Model",
5
5
  "homepage": "https://cap.cloud.sap/",
6
6
  "keywords": [