@sap/cds-dk 7.0.1 → 7.0.3
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 +36 -40
- package/bin/bind.js +0 -1
- package/bin/build.js +4 -0
- package/bin/cds.js +14 -8
- package/bin/compile/index.js +3 -3
- package/bin/deploy/to-hana.js +1 -1
- package/bin/help.js +2 -3
- package/bin/init.js +2 -2
- package/lib/bind/cfKeyProvider.js +1 -0
- package/lib/bind/index.js +3 -0
- package/lib/bind/userCdsrcJsonStorageProvider.js +2 -10
- package/lib/build/buildTaskEngine.js +1 -1
- package/lib/build/constants.js +16 -14
- package/lib/build/provider/buildTaskHandlerFeatureToggles.js +2 -1
- package/lib/build/provider/java/index.js +2 -2
- package/lib/build/provider/mtx/resourcesTarBuilder.js +2 -6
- package/lib/build/provider/mtx-sidecar/index.js +15 -11
- package/lib/build/util.js +8 -0
- package/lib/cds.js +2 -2
- package/lib/client/base_command.js +3 -6
- package/lib/compile/asyncapi/components/messages/index.js +41 -18
- package/lib/compile/asyncapi/index.js +23 -2
- package/lib/import/odata/metadataconverter/MetadataConverter.js +1 -0
- package/lib/init/constants.js +5 -5
- package/lib/init/index.js +68 -76
- package/lib/init/template/_merging/registry-mta.js +2 -2
- package/lib/init/template/approuter/index.js +10 -7
- package/lib/init/template/auditlog/index.js +3 -4
- package/lib/init/template/cf-manifest/files/manifest.yml.hbs +15 -23
- package/lib/init/template/cf-manifest/files/services-manifest.yml.hbs +22 -17
- package/lib/init/template/cf-manifest/index.js +5 -5
- package/lib/init/template/connectivity/index.js +2 -3
- package/lib/init/template/data/index.js +6 -6
- package/lib/init/template/destination/index.js +3 -5
- package/lib/init/template/enterprise-messaging/index.js +4 -5
- package/lib/init/template/enterprise-messaging-shared/index.js +3 -4
- package/lib/init/template/extensibility/index.js +2 -3
- package/lib/init/template/file-based-messaging/index.js +2 -2
- package/lib/init/template/hana/files/mta.yaml.hbs +1 -1
- package/lib/init/template/hana/index.js +39 -63
- package/lib/init/template/helm/index.js +15 -14
- package/lib/init/template/html5-repo/index.js +3 -7
- package/lib/init/template/java/index.js +6 -6
- package/lib/init/template/kibana/files/mta.yaml.hbs +29 -0
- package/lib/init/template/kibana/index.js +54 -0
- package/lib/init/template/lint/index.js +8 -7
- package/lib/init/template/mta/index.js +3 -2
- package/lib/init/template/multitenancy/files/package.json.hbs +0 -3
- package/lib/init/template/multitenancy/files/package.sidecar.json.hbs +1 -1
- package/lib/init/template/multitenancy/index.js +25 -40
- package/lib/init/template/nodejs/index.js +4 -5
- package/lib/init/template/pipeline/index.js +3 -3
- package/lib/init/template/redis-messaging/index.js +3 -4
- package/lib/init/template/sample/files/app/_i18n/i18n.properties +3 -32
- package/lib/init/template/sample/files/app/_i18n/i18n_de.properties +2 -2
- package/lib/init/template/sample/files/app/admin-books/fiori-service.cds +6 -7
- package/lib/init/template/sample/files/app/admin-books/webapp/Component.js +3 -3
- package/lib/init/template/sample/files/app/admin-books/webapp/i18n/i18n.properties +3 -11
- package/lib/init/template/sample/files/app/admin-books/webapp/manifest.json +117 -113
- package/lib/init/template/sample/files/app/appconfig/fioriSandboxConfig.json +38 -0
- package/lib/init/template/sample/files/app/browse/fiori-service.cds +56 -0
- package/lib/init/template/sample/files/app/browse/webapp/Component.js +7 -0
- package/lib/init/template/sample/files/app/browse/webapp/i18n/i18n.properties +4 -0
- package/lib/init/template/sample/files/app/browse/webapp/manifest.json +139 -0
- package/lib/init/template/sample/files/app/common.cds +78 -81
- package/lib/init/template/sample/files/app/services.cds +1 -0
- package/lib/init/template/sample/files/srv/admin-service.cds +1 -1
- package/lib/init/template/sample/files/srv/cat-service.cds +1 -1
- package/lib/init/template/sample/index.js +6 -5
- package/lib/init/template/sqlite/index.js +1 -1
- package/lib/init/template/templateBase.js +9 -19
- package/lib/init/template/tiny-sample/index.js +6 -6
- package/lib/init/template/toggles/index.js +1 -2
- package/lib/init/template/typer/files/xsconfig.json +0 -1
- package/lib/init/template/typer/index.js +1 -1
- package/lib/init/template/xsuaa/index.js +3 -4
- package/lib/init/util/indent.js +57 -0
- package/lib/init/util/merge.js +71 -15
- package/lib/init/util/mvn.js +24 -10
- package/lib/init/util/projectReader.js +53 -169
- package/lib/init/util/template.js +12 -11
- package/lib/init/util/xml.js +6 -6
- package/lib/util/pruneAxiosErrors.js +22 -0
- package/lib/watch/open.js +6 -3
- package/npm-shrinkwrap.json +20 -37
- package/package.json +1 -2
- package/lib/init/template/kibana-logging/files/cds.package.json +0 -7
- package/lib/init/template/kibana-logging/files/mta.yaml.hbs +0 -14
- package/lib/init/template/kibana-logging/index.js +0 -45
- /package/lib/init/template/{kibana-logging → kibana}/files/package.json.hbs +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
require('axios').interceptors.response.use(
|
|
2
|
+
response => response,
|
|
3
|
+
axError => {
|
|
4
|
+
const { url, method } = axError.config ?? {};
|
|
5
|
+
const { code, response } = axError;
|
|
6
|
+
const { status, data } = response ?? {};
|
|
7
|
+
const reason = data?.error /* RFC 6749 */ ?? axError.message;
|
|
8
|
+
const message = (url && method ? `${method.toUpperCase()} ${url} ` : '') +
|
|
9
|
+
'failed' +
|
|
10
|
+
(status || code ? ':' : '') +
|
|
11
|
+
(status ? ` ${status}` : '') +
|
|
12
|
+
(code ? ` ${code}` : '') +
|
|
13
|
+
`. ${reason}.` +
|
|
14
|
+
(data ? ` Details: '${data.error_description /* RFC 6749 */ || require('util').inspect(data)}'.` : '');
|
|
15
|
+
|
|
16
|
+
const error = new Error(message);
|
|
17
|
+
if (require('../').debug('req')) {
|
|
18
|
+
error.cause = axError;
|
|
19
|
+
}
|
|
20
|
+
return Promise.reject(error);
|
|
21
|
+
}
|
|
22
|
+
);
|
package/lib/watch/open.js
CHANGED
|
@@ -50,7 +50,10 @@ function _open(args) {
|
|
|
50
50
|
args = ['/c', 'start'].concat(args)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
const delay = parseInt(process.env.CDS_WATCH_OPEN_DELAY) || 1000
|
|
54
|
+
setTimeout(() => {
|
|
55
|
+
childProcess.execFile(command, args, null, err => {
|
|
56
|
+
err && console.error(`Error opening '${command} ${args}' : ${err.message}`)
|
|
57
|
+
})
|
|
58
|
+
}, delay);
|
|
56
59
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/cds-dk",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@sap/cds-dk",
|
|
9
|
-
"version": "7.0.
|
|
9
|
+
"version": "7.0.3",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@sap/cds": "^7",
|
|
13
|
-
"@sap/cds-compiler": "^4",
|
|
14
13
|
"@sap/cds-foss": "^4.0.2",
|
|
15
14
|
"@sap/cds-mtxs": "^1.9.0",
|
|
16
15
|
"@sap/eslint-plugin-cds": "^2.6.0",
|
|
@@ -29,17 +28,6 @@
|
|
|
29
28
|
"cds": "bin/cds.js",
|
|
30
29
|
"cds-ts": "bin/cds-ts.js"
|
|
31
30
|
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@types/jest": "^29",
|
|
34
|
-
"chai": "^4.3.7",
|
|
35
|
-
"chai-as-promised": "^7.1.1",
|
|
36
|
-
"chai-subset": "^1.6.0",
|
|
37
|
-
"eslint-plugin-cds-dk": "file:.eslint",
|
|
38
|
-
"jest": "^29",
|
|
39
|
-
"semver": "^7",
|
|
40
|
-
"ts-node": "^10.9.1",
|
|
41
|
-
"typescript": "^5.0.4"
|
|
42
|
-
},
|
|
43
31
|
"optionalDependencies": {
|
|
44
32
|
"sqlite3": "^5.0.4"
|
|
45
33
|
}
|
|
@@ -72,12 +60,12 @@
|
|
|
72
60
|
}
|
|
73
61
|
},
|
|
74
62
|
"node_modules/@eslint/eslintrc": {
|
|
75
|
-
"version": "2.0
|
|
63
|
+
"version": "2.1.0",
|
|
76
64
|
"license": "MIT",
|
|
77
65
|
"dependencies": {
|
|
78
66
|
"ajv": "^6.12.4",
|
|
79
67
|
"debug": "^4.3.2",
|
|
80
|
-
"espree": "^9.
|
|
68
|
+
"espree": "^9.6.0",
|
|
81
69
|
"globals": "^13.19.0",
|
|
82
70
|
"ignore": "^5.2.0",
|
|
83
71
|
"import-fresh": "^3.2.1",
|
|
@@ -93,7 +81,7 @@
|
|
|
93
81
|
}
|
|
94
82
|
},
|
|
95
83
|
"node_modules/@eslint/js": {
|
|
96
|
-
"version": "8.
|
|
84
|
+
"version": "8.44.0",
|
|
97
85
|
"license": "MIT",
|
|
98
86
|
"engines": {
|
|
99
87
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
|
@@ -132,7 +120,7 @@
|
|
|
132
120
|
"license": "BSD-3-Clause"
|
|
133
121
|
},
|
|
134
122
|
"node_modules/@mapbox/node-pre-gyp": {
|
|
135
|
-
"version": "1.0.
|
|
123
|
+
"version": "1.0.11",
|
|
136
124
|
"license": "BSD-3-Clause",
|
|
137
125
|
"optional": true,
|
|
138
126
|
"dependencies": {
|
|
@@ -201,7 +189,7 @@
|
|
|
201
189
|
}
|
|
202
190
|
},
|
|
203
191
|
"node_modules/@sap/cds": {
|
|
204
|
-
"version": "7.0.
|
|
192
|
+
"version": "7.0.3",
|
|
205
193
|
"license": "SEE LICENSE IN LICENSE",
|
|
206
194
|
"dependencies": {
|
|
207
195
|
"@sap/cds-compiler": ">=3.9",
|
|
@@ -254,7 +242,7 @@
|
|
|
254
242
|
}
|
|
255
243
|
},
|
|
256
244
|
"node_modules/@sap/cds-mtxs": {
|
|
257
|
-
"version": "1.9.
|
|
245
|
+
"version": "1.9.2",
|
|
258
246
|
"license": "SEE LICENSE IN LICENSE",
|
|
259
247
|
"dependencies": {
|
|
260
248
|
"@sap/hdi-deploy": "^4",
|
|
@@ -263,9 +251,6 @@
|
|
|
263
251
|
"bin": {
|
|
264
252
|
"cds-mtx": "bin/cds-mtx.js",
|
|
265
253
|
"cds-mtx-migrate": "bin/cds-mtx-migrate.js"
|
|
266
|
-
},
|
|
267
|
-
"peerDependencies": {
|
|
268
|
-
"@sap/cds": ">=6"
|
|
269
254
|
}
|
|
270
255
|
},
|
|
271
256
|
"node_modules/@sap/eslint-plugin-cds": {
|
|
@@ -591,7 +576,7 @@
|
|
|
591
576
|
}
|
|
592
577
|
},
|
|
593
578
|
"node_modules/acorn": {
|
|
594
|
-
"version": "8.
|
|
579
|
+
"version": "8.10.0",
|
|
595
580
|
"license": "MIT",
|
|
596
581
|
"bin": {
|
|
597
582
|
"acorn": "bin/acorn"
|
|
@@ -1030,7 +1015,7 @@
|
|
|
1030
1015
|
}
|
|
1031
1016
|
},
|
|
1032
1017
|
"node_modules/detect-libc": {
|
|
1033
|
-
"version": "2.0.
|
|
1018
|
+
"version": "2.0.2",
|
|
1034
1019
|
"license": "Apache-2.0",
|
|
1035
1020
|
"optional": true,
|
|
1036
1021
|
"engines": {
|
|
@@ -1110,13 +1095,13 @@
|
|
|
1110
1095
|
}
|
|
1111
1096
|
},
|
|
1112
1097
|
"node_modules/eslint": {
|
|
1113
|
-
"version": "8.
|
|
1098
|
+
"version": "8.45.0",
|
|
1114
1099
|
"license": "MIT",
|
|
1115
1100
|
"dependencies": {
|
|
1116
1101
|
"@eslint-community/eslint-utils": "^4.2.0",
|
|
1117
1102
|
"@eslint-community/regexpp": "^4.4.0",
|
|
1118
|
-
"@eslint/eslintrc": "^2.0
|
|
1119
|
-
"@eslint/js": "8.
|
|
1103
|
+
"@eslint/eslintrc": "^2.1.0",
|
|
1104
|
+
"@eslint/js": "8.44.0",
|
|
1120
1105
|
"@humanwhocodes/config-array": "^0.11.10",
|
|
1121
1106
|
"@humanwhocodes/module-importer": "^1.0.1",
|
|
1122
1107
|
"@nodelib/fs.walk": "^1.2.8",
|
|
@@ -1128,7 +1113,7 @@
|
|
|
1128
1113
|
"escape-string-regexp": "^4.0.0",
|
|
1129
1114
|
"eslint-scope": "^7.2.0",
|
|
1130
1115
|
"eslint-visitor-keys": "^3.4.1",
|
|
1131
|
-
"espree": "^9.
|
|
1116
|
+
"espree": "^9.6.0",
|
|
1132
1117
|
"esquery": "^1.4.2",
|
|
1133
1118
|
"esutils": "^2.0.2",
|
|
1134
1119
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -1138,7 +1123,6 @@
|
|
|
1138
1123
|
"globals": "^13.19.0",
|
|
1139
1124
|
"graphemer": "^1.4.0",
|
|
1140
1125
|
"ignore": "^5.2.0",
|
|
1141
|
-
"import-fresh": "^3.0.0",
|
|
1142
1126
|
"imurmurhash": "^0.1.4",
|
|
1143
1127
|
"is-glob": "^4.0.0",
|
|
1144
1128
|
"is-path-inside": "^3.0.3",
|
|
@@ -1148,9 +1132,8 @@
|
|
|
1148
1132
|
"lodash.merge": "^4.6.2",
|
|
1149
1133
|
"minimatch": "^3.1.2",
|
|
1150
1134
|
"natural-compare": "^1.4.0",
|
|
1151
|
-
"optionator": "^0.9.
|
|
1135
|
+
"optionator": "^0.9.3",
|
|
1152
1136
|
"strip-ansi": "^6.0.1",
|
|
1153
|
-
"strip-json-comments": "^3.1.0",
|
|
1154
1137
|
"text-table": "^0.2.0"
|
|
1155
1138
|
},
|
|
1156
1139
|
"bin": {
|
|
@@ -1164,7 +1147,7 @@
|
|
|
1164
1147
|
}
|
|
1165
1148
|
},
|
|
1166
1149
|
"node_modules/eslint-scope": {
|
|
1167
|
-
"version": "7.2.
|
|
1150
|
+
"version": "7.2.1",
|
|
1168
1151
|
"license": "BSD-2-Clause",
|
|
1169
1152
|
"dependencies": {
|
|
1170
1153
|
"esrecurse": "^4.3.0",
|
|
@@ -1188,10 +1171,10 @@
|
|
|
1188
1171
|
}
|
|
1189
1172
|
},
|
|
1190
1173
|
"node_modules/espree": {
|
|
1191
|
-
"version": "9.
|
|
1174
|
+
"version": "9.6.1",
|
|
1192
1175
|
"license": "BSD-2-Clause",
|
|
1193
1176
|
"dependencies": {
|
|
1194
|
-
"acorn": "^8.
|
|
1177
|
+
"acorn": "^8.9.0",
|
|
1195
1178
|
"acorn-jsx": "^5.3.2",
|
|
1196
1179
|
"eslint-visitor-keys": "^3.4.1"
|
|
1197
1180
|
},
|
|
@@ -1829,7 +1812,7 @@
|
|
|
1829
1812
|
}
|
|
1830
1813
|
},
|
|
1831
1814
|
"node_modules/make-dir/node_modules/semver": {
|
|
1832
|
-
"version": "6.3.
|
|
1815
|
+
"version": "6.3.1",
|
|
1833
1816
|
"license": "ISC",
|
|
1834
1817
|
"optional": true,
|
|
1835
1818
|
"bin": {
|
|
@@ -2544,7 +2527,7 @@
|
|
|
2544
2527
|
"license": "ISC"
|
|
2545
2528
|
},
|
|
2546
2529
|
"node_modules/semver": {
|
|
2547
|
-
"version": "7.5.
|
|
2530
|
+
"version": "7.5.4",
|
|
2548
2531
|
"license": "ISC",
|
|
2549
2532
|
"dependencies": {
|
|
2550
2533
|
"lru-cache": "^6.0.0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/cds-dk",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3",
|
|
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": [
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"main": "lib/index.js",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@sap/cds": "^7",
|
|
20
|
-
"@sap/cds-compiler": "^4",
|
|
21
20
|
"@sap/cds-foss": "^4.0.2",
|
|
22
21
|
"@sap/cds-mtxs": "^1.9.0",
|
|
23
22
|
"@sap/eslint-plugin-cds": "^2.6.0",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
modules:
|
|
3
|
-
- name: {{appName}}-srv
|
|
4
|
-
type: {{language}}
|
|
5
|
-
path: {{& srvPath}}
|
|
6
|
-
requires:
|
|
7
|
-
- name: {{appName}}-cf-logging
|
|
8
|
-
|
|
9
|
-
resources:
|
|
10
|
-
- name: {{appName}}-cf-logging
|
|
11
|
-
type: org.cloudfoundry.managed-service
|
|
12
|
-
parameters:
|
|
13
|
-
service: application-logs
|
|
14
|
-
service-plan: lite
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const { join } = require('path')
|
|
2
|
-
const cds = require('../../../cds')
|
|
3
|
-
const { readProject } = require('../../util/projectReader')
|
|
4
|
-
const { mergeJSON, mergeYAML } = require('../../util/merge')
|
|
5
|
-
const { srvNode4, srvJava4, kibanaLogging } = require('../_merging/registry-mta')
|
|
6
|
-
|
|
7
|
-
module.exports = class KibanaLoggingTemplate extends require('../templateBase') {
|
|
8
|
-
|
|
9
|
-
async canRun() {
|
|
10
|
-
const { hasMta, hasHelm } = await readProject(this.options)
|
|
11
|
-
if (hasHelm && !hasMta) {
|
|
12
|
-
throw `'cds add kibana-logging' is not available for Kyma yet`
|
|
13
|
-
}
|
|
14
|
-
return true
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
async run() {
|
|
18
|
-
const project = await readProject(this.options)
|
|
19
|
-
const { isJava } = project
|
|
20
|
-
if (isJava) cds.error(`kibana-logging is not implemented for project type Java yet`)
|
|
21
|
-
await mergeJSON('package.json', join(__dirname, 'files', 'package.json.hbs'), project)
|
|
22
|
-
await this.runDependentMerging()
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async runDependentMerging() {
|
|
26
|
-
const project = await readProject(this.options)
|
|
27
|
-
const { hasMta, isNodejs, srvPath } = project
|
|
28
|
-
|
|
29
|
-
if (hasMta) {
|
|
30
|
-
const srv = (isNodejs ? srvNode4 : srvJava4)(srvPath)
|
|
31
|
-
await mergeYAML(
|
|
32
|
-
'mta.yaml',
|
|
33
|
-
join(__dirname, 'files', 'mta.yaml.hbs'),
|
|
34
|
-
project,
|
|
35
|
-
{
|
|
36
|
-
additions: [srv, kibanaLogging],
|
|
37
|
-
relationships: [{
|
|
38
|
-
insert: [kibanaLogging, 'name'],
|
|
39
|
-
into: [srv, 'requires', 'name']
|
|
40
|
-
}],
|
|
41
|
-
}
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
File without changes
|