@cap-js/ord 1.3.12 → 1.3.13
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/lib/constants.js +2 -2
- package/lib/interopCsn.js +2 -0
- package/lib/ord-service.js +2 -3
- package/package.json +10 -4
package/lib/constants.js
CHANGED
|
@@ -14,7 +14,7 @@ const BLOCKED_SERVICE_NAME = Object.freeze({
|
|
|
14
14
|
|
|
15
15
|
const ORD_ACCESS_STRATEGY = Object.freeze({
|
|
16
16
|
Open: "open",
|
|
17
|
-
Basic: "
|
|
17
|
+
Basic: "basic-auth",
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
const AUTH_TYPE_ORD_ACCESS_STRATEGY_MAP = Object.freeze({
|
|
@@ -60,7 +60,7 @@ const LEVEL = Object.freeze({
|
|
|
60
60
|
subEntity: "sub-entity",
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
const OPEN_RESOURCE_DISCOVERY_VERSION = "1.
|
|
63
|
+
const OPEN_RESOURCE_DISCOVERY_VERSION = "1.12";
|
|
64
64
|
|
|
65
65
|
const ORD_EXTENSIONS_PREFIX = "@ORD.Extensions.";
|
|
66
66
|
|
package/lib/interopCsn.js
CHANGED
|
@@ -103,6 +103,8 @@ function add_meta_info(csn) {
|
|
|
103
103
|
csn["csnInteropEffective"] = "1.0";
|
|
104
104
|
csn.meta ??= {};
|
|
105
105
|
csn.meta.flavor = "effective";
|
|
106
|
+
// Remove compiler creator information – not relevant for ORD interop and leaks build details
|
|
107
|
+
if (csn.meta.creator) delete csn.meta.creator;
|
|
106
108
|
|
|
107
109
|
let services = Object.entries(csn.definitions).filter(([, def]) => def.kind === "service");
|
|
108
110
|
if (services.length === 1) {
|
package/lib/ord-service.js
CHANGED
|
@@ -3,8 +3,7 @@ const { ord, getMetadata, defaults, authentication, Logger } = require("./index.
|
|
|
3
3
|
|
|
4
4
|
class OpenResourceDiscoveryService extends cds.ApplicationService {
|
|
5
5
|
init() {
|
|
6
|
-
|
|
7
|
-
cds.app.get(`${this.path}`, cds.middlewares.before, (_, res) => {
|
|
6
|
+
cds.app.get(`${this.path}`, (_, res) => {
|
|
8
7
|
return res.status(200).send(defaults.baseTemplate);
|
|
9
8
|
});
|
|
10
9
|
|
|
@@ -23,7 +22,7 @@ class OpenResourceDiscoveryService extends cds.ApplicationService {
|
|
|
23
22
|
const { contentType, response } = await getMetadata(req.url);
|
|
24
23
|
return res.status(200).contentType(contentType).send(response);
|
|
25
24
|
} catch (error) {
|
|
26
|
-
|
|
25
|
+
Logger.error(error, "Error while processing the resource definition document");
|
|
27
26
|
return res.status(500).send(error.message);
|
|
28
27
|
}
|
|
29
28
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cap-js/ord",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.13",
|
|
4
4
|
"description": "CAP Plugin for generating ORD document.",
|
|
5
5
|
"repository": "cap-js/ord",
|
|
6
6
|
"author": "SAP SE (https://www.sap.com)",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"license": "Apache-2.0",
|
|
9
9
|
"workspaces": [
|
|
10
10
|
"xmpl",
|
|
11
|
-
"xmpl_java"
|
|
11
|
+
"xmpl_java",
|
|
12
|
+
"__tests__/integration-test-app"
|
|
12
13
|
],
|
|
13
14
|
"main": "cds-plugin.js",
|
|
14
15
|
"files": [
|
|
@@ -20,13 +21,15 @@
|
|
|
20
21
|
"scripts": {
|
|
21
22
|
"lint": "npx eslint .",
|
|
22
23
|
"test": "jest --ci --collectCoverage",
|
|
24
|
+
"test:integration": "jest __tests__/integration.test.js --testTimeout=30000 --testPathIgnorePatterns=/node_modules/ --forceExit",
|
|
23
25
|
"update-snapshot": "jest --ci --updateSnapshot",
|
|
24
26
|
"cds:version": "cds v -i"
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|
|
27
29
|
"eslint": "^9.2.0",
|
|
28
30
|
"jest": "^30.0.0",
|
|
29
|
-
"prettier": "3.6.2"
|
|
31
|
+
"prettier": "3.6.2",
|
|
32
|
+
"supertest": "^6.3.4"
|
|
30
33
|
},
|
|
31
34
|
"peerDependencies": {
|
|
32
35
|
"@sap/cds": ">=8.9.4",
|
|
@@ -35,10 +38,13 @@
|
|
|
35
38
|
"dependencies": {
|
|
36
39
|
"@cap-js/asyncapi": "^1.0.3",
|
|
37
40
|
"@cap-js/openapi": "^1.2.1",
|
|
38
|
-
"bcryptjs": "3.0.
|
|
41
|
+
"bcryptjs": "3.0.3",
|
|
39
42
|
"cli-progress": "^3.12.0",
|
|
40
43
|
"lodash": "^4.17.21"
|
|
41
44
|
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=18 <23"
|
|
47
|
+
},
|
|
42
48
|
"cds": {
|
|
43
49
|
"requires": {
|
|
44
50
|
"SAP ORD Service": {
|