@sap/cds-dk 6.7.1 → 6.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 +31 -0
- package/bin/deploy/index.js +1 -1
- package/bin/import.js +5 -3
- package/bin/login.js +29 -9
- package/bin/migrate.js +6 -2
- package/bin/watch.js +16 -0
- package/lib/bind/bindingUtil.js +2 -2
- package/lib/bind/userCdsrcJsonStorageProvider.js +1 -1
- package/lib/client/auth_manager.js +3 -1
- package/lib/client/helper/errors.js +6 -1
- package/lib/client/params.js +22 -20
- package/lib/client/settings_manager.js +17 -3
- package/lib/compile/openapi/csdl2openapi.js +4 -1
- package/lib/import/asyncapi/importAsyncAPI.js +32 -0
- package/lib/import/asyncapi/index.js +15 -0
- package/lib/import/asyncapi/parserContext.js +351 -0
- package/lib/import/asyncapi/utils.js +18 -0
- package/lib/import/common.js +21 -67
- package/lib/import/importapi.js +23 -2
- package/lib/import/message.js +11 -1
- package/lib/import/odata/index.js +14 -11
- package/lib/import/odata/metadataconverter/MetadataConverter.js +35 -35
- package/lib/import/odata/util/MultiMap.js +5 -5
- package/lib/import/odata/v2parser.js +1 -0
- package/lib/import/odata/v4parser.js +1281 -1139
- package/lib/init/constants.js +10 -3
- package/lib/init/template/_merging/registry-mta.js +33 -36
- package/lib/init/template/approuter/files/mtxs-configmap-java.yaml +20 -0
- package/lib/init/template/approuter/files/mtxs-configmap-nodejs.yaml +12 -0
- package/lib/init/template/approuter/index.js +24 -33
- package/lib/init/template/auditlog/files/package.json.hbs +27 -0
- package/lib/init/template/auditlog/index.js +12 -6
- package/lib/init/template/cf-manifest/index.js +1 -1
- package/lib/init/template/connectivity/index.js +1 -1
- package/lib/init/template/destinations/index.js +4 -2
- package/lib/init/template/enterprise-messaging/files/package.json.hbs +19 -0
- package/lib/init/template/enterprise-messaging/index.js +15 -13
- package/lib/init/template/enterprise-messaging-shared/files/event-mesh.json.hbs +31 -0
- package/lib/init/template/enterprise-messaging-shared/files/mta.yaml.hbs +15 -0
- package/lib/init/template/enterprise-messaging-shared/files/package.json.hbs +22 -0
- package/lib/init/template/enterprise-messaging-shared/files/values.yaml +7 -0
- package/lib/init/template/enterprise-messaging-shared/index.js +51 -0
- package/lib/init/template/extensibility/files/package.json.hbs +20 -0
- package/lib/init/template/extensibility/index.js +4 -16
- package/lib/init/template/file-based-messaging/files/package.json.hbs +19 -0
- package/lib/init/template/file-based-messaging/index.js +25 -0
- package/lib/init/template/hana/files/package.json.hbs +33 -0
- package/lib/init/template/hana/index.js +38 -65
- package/lib/init/template/helm/chart/templates/_deployment_helpers.tpl +0 -12
- package/lib/init/template/helm/chart/templates/_helpers.tpl +1 -121
- package/lib/init/template/helm/index.js +1 -1
- package/lib/init/template/html5-repo/index.js +1 -1
- package/lib/init/template/java/index.js +2 -2
- package/lib/init/template/kibana-logging/files/package.json.hbs +17 -0
- package/lib/init/template/kibana-logging/index.js +6 -19
- package/lib/init/template/lint/index.js +1 -1
- package/lib/init/template/mta/index.js +2 -2
- package/lib/init/template/multitenancy/files/mtxs-configmap-java.yaml +3 -5
- package/lib/init/template/multitenancy/files/mtxs-configmap-nodejs.yaml +3 -10
- package/lib/init/template/multitenancy/files/package.json.hbs +5 -4
- package/lib/init/template/multitenancy/index.js +22 -19
- package/lib/init/template/nodejs/files/.vscode/launch.json +11 -3
- package/lib/init/template/nodejs/index.js +1 -1
- package/lib/init/template/pipeline/index.js +1 -1
- package/lib/init/template/redis-messaging/files/mta.yaml.hbs +14 -0
- package/lib/init/template/redis-messaging/files/package.json.hbs +22 -0
- package/lib/init/template/redis-messaging/index.js +50 -0
- package/lib/init/template/samples/index.js +3 -3
- package/lib/init/template/sqlite/files/package.json.hbs +12 -4
- package/lib/init/template/sqlite/index.js +5 -1
- package/lib/init/template/toggles/files/package.json.hbs +20 -0
- package/lib/init/template/toggles/index.js +3 -9
- package/lib/init/template/xsuaa/files/package.json.hbs +28 -0
- package/lib/init/template/xsuaa/index.js +8 -23
- package/lib/init/util/{md5Tracking.js → md5.js} +1 -1
- package/lib/init/util/merge.js +4 -9
- package/lib/init/util/{mvnArchetypeUtil.js → mvn.js} +3 -0
- package/lib/init/util/projectReader.js +25 -107
- package/lib/init/util/xml.js +56 -0
- package/lib/lint/checks.js +1 -1
- package/lib/lint/io.js +1 -1
- package/lib/{init/util/commandUtil.js → util/command.js} +4 -2
- package/lib/{init/util/fsUtil.js → util/fs.js} +2 -2
- package/npm-shrinkwrap.json +335 -2212
- package/package.json +5 -4
- package/lib/init/template/approuter/files/cds.cdsrc.json +0 -7
- package/lib/init/template/approuter/files/cds.cdsrc.json.hbs +0 -9
- package/lib/init/template/approuter/files/cds.package.json +0 -9
- package/lib/init/template/approuter/files/cds.package.json.hbs +0 -11
- package/lib/init/template/auditlog/files/dependencies.package.json +0 -5
- package/lib/init/template/enterprise-messaging/files/cds.package.json +0 -9
- package/lib/init/template/enterprise-messaging/files/cds.profile.package.json.hbs +0 -11
- package/lib/init/template/enterprise-messaging/files/cdsrc.json +0 -7
- package/lib/init/template/enterprise-messaging/files/cdsrc.json.hbs +0 -9
- package/lib/init/template/extensibility/files/cds.package.json +0 -7
- package/lib/init/template/extensibility/files/cds.package.json.hbs +0 -9
- package/lib/init/template/extensibility/files/cdsrc.json +0 -5
- package/lib/init/template/extensibility/files/cdsrc.json.hbs +0 -7
- package/lib/init/template/hana/files/java/cds.json.hbs +0 -7
- package/lib/init/template/hana/files/java/cds.profile.json.hbs +0 -12
- package/lib/init/template/hana/files/java/cds.shortcut.json.hbs +0 -5
- package/lib/init/template/hana/files/java/cds.shortcut.profile.json.hbs +0 -8
- package/lib/init/template/hana/files/nodejs/cds.json.hbs +0 -9
- package/lib/init/template/hana/files/nodejs/cds.profile.json.hbs +0 -14
- package/lib/init/template/hana/files/nodejs/cds.shortcut.json.hbs +0 -7
- package/lib/init/template/hana/files/nodejs/cds.shortcut.profile.json.hbs +0 -10
- package/lib/init/template/hana/files/nodejs/dependencies.package.json +0 -5
- package/lib/init/template/helm/chart/templates/_sapcp_helpers.tpl +0 -103
- package/lib/init/template/kibana-logging/files/cds.profile.package.json.hbs +0 -9
- package/lib/init/template/toggles/files/cds.package.json +0 -7
- package/lib/init/template/toggles/files/cds.package.json.hbs +0 -9
- package/lib/init/template/toggles/files/cdsrc.json +0 -5
- package/lib/init/template/toggles/files/cdsrc.json.hbs +0 -7
- package/lib/init/template/xsuaa/files/cds.cdsrc.json +0 -7
- package/lib/init/template/xsuaa/files/cds.cdsrc.json.hbs +0 -9
- package/lib/init/template/xsuaa/files/cds.package.json +0 -9
- package/lib/init/template/xsuaa/files/cds.package.json.hbs +0 -11
- package/lib/init/template/xsuaa/files/dependencies.package.json +0 -6
- package/lib/init/util/versionCompare.js +0 -73
- /package/lib/init/template/hana/files/{java/db → db}/package.json +0 -0
- /package/lib/init/template/hana/files/{common/src → src}/.hdiconfig +0 -0
- /package/lib/init/template/hana/files/{common/undeploy.json → undeploy.json} +0 -0
- /package/lib/init/util/{templateUtil.js → template.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/cds-dk",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.8.0",
|
|
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": [
|
|
@@ -16,13 +16,14 @@
|
|
|
16
16
|
},
|
|
17
17
|
"main": "lib/index.js",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@sap/cds": "
|
|
19
|
+
"@sap/cds": "~6.8.0",
|
|
20
|
+
"@sap/cds-compiler": "~3.9.0",
|
|
20
21
|
"@sap/cds-foss": "^4",
|
|
21
|
-
"@sap/cds-mtxs": "
|
|
22
|
+
"@sap/cds-mtxs": "~1.8.0",
|
|
22
23
|
"@sap/eslint-plugin-cds": "^2.6.0",
|
|
23
24
|
"axios": ">=0.21",
|
|
24
25
|
"eslint": "^8",
|
|
25
|
-
"express": "^4.17.
|
|
26
|
+
"express": "^4.17.3",
|
|
26
27
|
"livereload-js": "^4.0.1",
|
|
27
28
|
"md5": "^2.3.0",
|
|
28
29
|
"mustache": "^4.0.1",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"requires": {
|
|
3
|
-
"[{{cap.for}}]": {
|
|
4
|
-
"db": {
|
|
5
|
-
"kind": "{{#cap.isMultitenant}}hana-mt{{/cap.isMultitenant}}{{^cap.isMultitenant}}hana-cloud{{/cap.isMultitenant}}"
|
|
6
|
-
}
|
|
7
|
-
},
|
|
8
|
-
"db": {
|
|
9
|
-
"kind": "{{#cap.isMultitenant}}sqlite{{/cap.isMultitenant}}{{^cap.isMultitenant}}sql{{/cap.isMultitenant}}"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"requires": {
|
|
3
|
-
"[{{cap.for}}]": {
|
|
4
|
-
"db": "{{#cap.isMultitenant}}hana-mt{{/cap.isMultitenant}}{{^cap.isMultitenant}}hana-cloud{{/cap.isMultitenant}}"
|
|
5
|
-
},
|
|
6
|
-
"db": "{{#cap.isMultitenant}}sqlite{{/cap.isMultitenant}}{{^cap.isMultitenant}}sql{{/cap.isMultitenant}}"
|
|
7
|
-
}
|
|
8
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cds": {
|
|
3
|
-
"requires": {
|
|
4
|
-
"[{{cap.for}}]": {
|
|
5
|
-
"db": {
|
|
6
|
-
"kind": "{{#cap.isMultitenant}}hana-mt{{/cap.isMultitenant}}{{^cap.isMultitenant}}hana-cloud{{/cap.isMultitenant}}"
|
|
7
|
-
}
|
|
8
|
-
},
|
|
9
|
-
"db": {
|
|
10
|
-
"kind": "{{#cap.isMultitenant}}sqlite{{/cap.isMultitenant}}{{^cap.isMultitenant}}sql{{/cap.isMultitenant}}"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cds": {
|
|
3
|
-
"requires": {
|
|
4
|
-
"[{{cap.for}}]": {
|
|
5
|
-
"db": "{{#cap.isMultitenant}}hana-mt{{/cap.isMultitenant}}{{^cap.isMultitenant}}hana-cloud{{/cap.isMultitenant}}"
|
|
6
|
-
},
|
|
7
|
-
"db": "{{#cap.isMultitenant}}sqlite{{/cap.isMultitenant}}{{^cap.isMultitenant}}sql{{/cap.isMultitenant}}"
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
{{/*
|
|
3
|
-
SAPCP Service Bindings: volume mounts
|
|
4
|
-
*/}}
|
|
5
|
-
{{- define "cap.sapcp.bindingsVolumeMounts" }}
|
|
6
|
-
{{- $ := . -}}
|
|
7
|
-
{{- range $key, $binding := .bindings }}
|
|
8
|
-
- name: {{ $key | replace "_" "-" }}-secret
|
|
9
|
-
mountPath: /bindings/{{ $key }}
|
|
10
|
-
readOnly: true
|
|
11
|
-
{{- end }}
|
|
12
|
-
{{- end }}
|
|
13
|
-
|
|
14
|
-
{{/*
|
|
15
|
-
SAPCP Service Bindings: volumes
|
|
16
|
-
*/}}
|
|
17
|
-
{{- define "cap.sapcp.bindingsVolumes" -}}
|
|
18
|
-
{{- $ := . -}}
|
|
19
|
-
{{ range $bindingName, $binding := .bindings -}}
|
|
20
|
-
{{- $secret := include "cap.sapcp.bindingSecretName" (dict "root" $.root "name" $.name "bindingName" $bindingName "binding" $binding) }}
|
|
21
|
-
- name: {{ $bindingName | replace "_" "-" }}-secret
|
|
22
|
-
secret:
|
|
23
|
-
secretName: {{ $secret | quote }}
|
|
24
|
-
{{- end -}}
|
|
25
|
-
{{- end -}}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{{/*
|
|
29
|
-
Binding Secret Name
|
|
30
|
-
*/}}
|
|
31
|
-
{{- define "cap.sapcp.bindingName" -}}
|
|
32
|
-
{{ print $.root.Release.Name "-" $.name "-" $.bindingName | replace "_" "-" }}
|
|
33
|
-
{{- end -}}
|
|
34
|
-
|
|
35
|
-
{{/*
|
|
36
|
-
SAPCP Service Bindings: bindings
|
|
37
|
-
*/}}
|
|
38
|
-
{{- define "cap.sapcp.bindings" -}}
|
|
39
|
-
{{- $ := . -}}
|
|
40
|
-
{{- range $name, $params := .bindings }}
|
|
41
|
-
{{- if not $params.fromSecret }}
|
|
42
|
-
---
|
|
43
|
-
apiVersion: services.cloud.sap.com/v1
|
|
44
|
-
kind: ServiceBinding
|
|
45
|
-
metadata:
|
|
46
|
-
namespace: {{ $.Release.Namespace }}
|
|
47
|
-
name: {{ include "cap.sapcp.bindingName" (dict "root" $.root "name" $.name "bindingName" $name) }}
|
|
48
|
-
labels: {{- include "cap.labels" $ | nindent 4 }}
|
|
49
|
-
spec:
|
|
50
|
-
serviceInstanceName: {{include "cap.sapcp.serviceInstanceName" (dict "binding" $params "release" $.Release.Name) }}
|
|
51
|
-
{{- if $params.externalName }}
|
|
52
|
-
externalName: {{ $params.externalName }}
|
|
53
|
-
{{- end }}
|
|
54
|
-
{{- if $params.secretName }}
|
|
55
|
-
secretName: {{ $params.secretName }}
|
|
56
|
-
{{- end }}
|
|
57
|
-
{{- if $params.parameters }}
|
|
58
|
-
parameters: {{ $params.parameters | toYaml | nindent 4 }}
|
|
59
|
-
{{- end }}
|
|
60
|
-
{{- if $params.parametersFrom }}
|
|
61
|
-
parametersFrom: {{ $params.parametersFrom | toYaml | nindent 4 }}
|
|
62
|
-
{{- end }}
|
|
63
|
-
{{- if $params.credentialsRotationPolicy }}
|
|
64
|
-
credentialsRotationPolicy: {{ $params.credentialsRotationPolicy | toYaml | nindent 4 }}
|
|
65
|
-
{{- end }}
|
|
66
|
-
{{- end }}
|
|
67
|
-
{{- end }}
|
|
68
|
-
{{- end }}
|
|
69
|
-
|
|
70
|
-
{{/*
|
|
71
|
-
Binding Secret Name
|
|
72
|
-
*/}}
|
|
73
|
-
{{- define "cap.sapcp.bindingSecretName" -}}
|
|
74
|
-
{{- $secretName := include "cap.sapcp.bindingName" . }}
|
|
75
|
-
{{- if .binding.fromSecret }}
|
|
76
|
-
{{- $secretName = .binding.fromSecret}}
|
|
77
|
-
{{- else if .binding.secretName }}
|
|
78
|
-
{{- $secretName = .binding.secretName }}
|
|
79
|
-
{{- end }}
|
|
80
|
-
{{- $secretName }}
|
|
81
|
-
{{- end }}
|
|
82
|
-
|
|
83
|
-
{{/*
|
|
84
|
-
Service Instance
|
|
85
|
-
from web-application helm chart
|
|
86
|
-
*/}}
|
|
87
|
-
{{- define "cap.sapcp.serviceInstanceName" -}}
|
|
88
|
-
{{- if .binding.serviceInstanceFullname }}
|
|
89
|
-
{{- if gt (len .binding.serviceInstanceFullname) 63 }}
|
|
90
|
-
{{- fail (printf "name exceeds 63 characters: '%s'" .binding.serviceInstanceFullname) }}
|
|
91
|
-
{{- end }}
|
|
92
|
-
{{- .binding.serviceInstanceFullname }}
|
|
93
|
-
{{- else }}
|
|
94
|
-
{{- $name := .binding.serviceInstanceName }}
|
|
95
|
-
{{- if not (hasPrefix .release $name)}}
|
|
96
|
-
{{- $name = printf "%s-%s" .release $name }}
|
|
97
|
-
{{- end }}
|
|
98
|
-
{{- if gt (len $name) 63 }}
|
|
99
|
-
{{- fail (printf "name exceeds 63 characters: '%s'" $name) }}
|
|
100
|
-
{{- end }}
|
|
101
|
-
{{- $name }}
|
|
102
|
-
{{- end }}
|
|
103
|
-
{{- end }}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* VersionComparer
|
|
3
|
-
* Simple semver comparer w/o the complex stuff. It only compares major, minor, patch, and build
|
|
4
|
-
* segments.
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* const versionCompare = require('./versionCompare');
|
|
8
|
-
* versionCompare(v1, v2) > 0 -> v1 > v2
|
|
9
|
-
* versionCompare(v1, v2) < 0 -> v1 < v2
|
|
10
|
-
* versionCompare(v1, v2) === 0 -> v1 = v2
|
|
11
|
-
* 1.2.3-SNAPSHOT > 1.2.3
|
|
12
|
-
* 1.2.3-SNAPSHOT = 1.2.3-SNAPSHOT
|
|
13
|
-
* 1.2.3-SNAPSHOT > 1.2.3-0
|
|
14
|
-
* 1.2.3-SNAPSHOT > 1.2.3-12
|
|
15
|
-
* -> SNAPSHOT corresponds to maxInt
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
"use strict";
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const _REGEX = /^(\d*)\.(\d+)\.(\d+)(?:-(\d+|SNAPSHOT))?$/i;
|
|
22
|
-
const SNAPSHOT = 'SNAPSHOT';
|
|
23
|
-
|
|
24
|
-
module.exports = function versionCompare(a, b) { //NOSONAR
|
|
25
|
-
|
|
26
|
-
const parsedA = _REGEX.exec(a);
|
|
27
|
-
const parsedB = _REGEX.exec(b);
|
|
28
|
-
|
|
29
|
-
let errMessage = "";
|
|
30
|
-
if (parsedA.length < 4 || parsedA.length > 5) {
|
|
31
|
-
errMessage = `Invalid parameter a: ${a}. `;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (parsedB.length < 4 || parsedB.length > 5) {
|
|
35
|
-
errMessage = errMessage + `Invalid parameter b: ${b}.`;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (errMessage) {
|
|
39
|
-
throw new Error(errMessage);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const majorA = parseInt(parsedA[1]);
|
|
43
|
-
const majorB = parseInt(parsedB[1]);
|
|
44
|
-
if (majorA !== majorB) {
|
|
45
|
-
return (majorA > majorB ? 1 : -1);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const minorA = parseInt(parsedA[2]);
|
|
49
|
-
const minorB = parseInt(parsedB[2]);
|
|
50
|
-
if (minorA !== minorB) {
|
|
51
|
-
return (minorA > minorB ? 1 : -1);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const patchA = parseInt(parsedA[3]);
|
|
55
|
-
const patchB = parseInt(parsedB[3]);
|
|
56
|
-
if (patchA !== patchB) {
|
|
57
|
-
return (patchA > patchB ? 1 : -1);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (parsedA[4] === SNAPSHOT) {
|
|
61
|
-
parsedA[4] = `${Number.MAX_SAFE_INTEGER}`;
|
|
62
|
-
}
|
|
63
|
-
if (parsedB[4] === SNAPSHOT) {
|
|
64
|
-
parsedB[4] = `${Number.MAX_SAFE_INTEGER}`;
|
|
65
|
-
}
|
|
66
|
-
const buildA = (parsedA[4] ? parseInt(parsedA[4]) : 0);
|
|
67
|
-
const buildB = (parsedB[4] ? parseInt(parsedB[4]) : 0);
|
|
68
|
-
if (buildA !== buildB) {
|
|
69
|
-
return (buildA > buildB ? 1 : -1);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return 0;
|
|
73
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|