@cap-js/ord 1.3.7 → 1.3.8

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/index.js CHANGED
@@ -4,4 +4,5 @@ module.exports = {
4
4
  ord: require("./ord.js"),
5
5
  Logger: require("./logger.js"),
6
6
  constants: require("./constants.js"),
7
+ authentication: require("./authentication.js"),
7
8
  };
@@ -1,7 +1,7 @@
1
- import cds from "@sap/cds";
2
- import { ord, getMetadata, defaults, authentication, logger } from "./es-module.mjs";
1
+ const cds = require("@sap/cds");
2
+ const { ord, getMetadata, defaults, authentication, Logger } = require("./index.js");
3
3
 
4
- export class OpenResourceDiscoveryService extends cds.ApplicationService {
4
+ class OpenResourceDiscoveryService extends cds.ApplicationService {
5
5
  init() {
6
6
  cds.app.get(`${this.path}`, cds.middlewares.before, (_, res) => {
7
7
  return res.status(200).send(defaults.baseTemplate);
@@ -22,7 +22,7 @@ export class OpenResourceDiscoveryService extends cds.ApplicationService {
22
22
  const { contentType, response } = await getMetadata(req.url);
23
23
  return res.status(200).contentType(contentType).send(response);
24
24
  } catch (error) {
25
- logger.Logger.error(error, "Error while processing the resource definition document");
25
+ Logger.error(error, "Error while processing the resource definition document");
26
26
  return res.status(500).send(error.message);
27
27
  }
28
28
  });
@@ -30,3 +30,5 @@ export class OpenResourceDiscoveryService extends cds.ApplicationService {
30
30
  return super.init();
31
31
  }
32
32
  }
33
+
34
+ module.exports = { OpenResourceDiscoveryService };
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@cap-js/ord",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "description": "CAP Plugin for generating ORD document.",
5
5
  "repository": "cap-js/ord",
6
6
  "author": "SAP SE (https://www.sap.com)",
7
7
  "homepage": "https://cap.cloud.sap/",
8
8
  "license": "Apache-2.0",
9
9
  "workspaces": [
10
- "xmpl"
10
+ "xmpl",
11
+ "xmpl_java"
11
12
  ],
12
13
  "main": "cds-plugin.js",
13
14
  "files": [
@@ -23,7 +24,7 @@
23
24
  "cds:version": "cds v -i"
24
25
  },
25
26
  "devDependencies": {
26
- "eslint": "^8",
27
+ "eslint": "^9.2.0",
27
28
  "jest": "^29.7.0",
28
29
  "prettier": "3.5.3"
29
30
  },
package/lib/es-module.mjs DELETED
@@ -1,6 +0,0 @@
1
- // matches commonjs.js to es-module so that we can use the same code in cap services
2
- export { default as defaults } from "./defaults.js";
3
- export { default as getMetadata } from "./metaData.js";
4
- export { default as ord } from "./ord.js";
5
- export { default as authentication } from "./authentication.js";
6
- export { default as logger } from "./logger.js";