@neoimpulse/cap-js-notifications 1.0.8 → 1.0.10
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/package.json +8 -8
- package/srv/notifyToConsole.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neoimpulse/cap-js-notifications",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "A CDS plugin to provide an easy action for the notification service",
|
|
5
5
|
"main": "cds-plugin.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"README.md"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@sap-cloud-sdk/connectivity": "^
|
|
34
|
-
"@sap-cloud-sdk/http-client": "^
|
|
35
|
-
"@sap-cloud-sdk/
|
|
33
|
+
"@sap-cloud-sdk/connectivity": "^4",
|
|
34
|
+
"@sap-cloud-sdk/http-client": "^4",
|
|
35
|
+
"@sap-cloud-sdk/resilience": "^4"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@sap/cds": ">=
|
|
39
|
-
"@sap/cds-dk": ">=
|
|
40
|
-
"prettier": "^3
|
|
41
|
-
"semantic-release": "^24
|
|
38
|
+
"@sap/cds": ">=9",
|
|
39
|
+
"@sap/cds-dk": ">=9",
|
|
40
|
+
"prettier": "^3",
|
|
41
|
+
"semantic-release": "^24"
|
|
42
42
|
},
|
|
43
43
|
"cds": {
|
|
44
44
|
"requires": {
|
package/srv/notifyToConsole.js
CHANGED
|
@@ -9,7 +9,7 @@ module.exports = class NotifyToConsole extends cds.Service {
|
|
|
9
9
|
LOG._info && LOG.info(`Listening to events: ${eventsToListen.join(", ")}`);
|
|
10
10
|
|
|
11
11
|
this.on(eventsToListen, (req) => {
|
|
12
|
-
LOG._debug && LOG.debug("Handling notification event
|
|
12
|
+
LOG._debug && LOG.debug("Handling notification event", req.event);
|
|
13
13
|
const type = req.event;
|
|
14
14
|
let message = req.data;
|
|
15
15
|
message.type = type;
|
|
@@ -21,8 +21,8 @@ module.exports = class NotifyToConsole extends cds.Service {
|
|
|
21
21
|
"\n---------------------------------------------------------------\n"
|
|
22
22
|
);
|
|
23
23
|
|
|
24
|
-
const { NotificationTypeKey, NotificationTypeVersion } =
|
|
25
|
-
const types = cds.notifications.local.types;
|
|
24
|
+
const { NotificationTypeKey, NotificationTypeVersion } = message;
|
|
25
|
+
const types = cds.notifications.local.types;
|
|
26
26
|
|
|
27
27
|
if (!(NotificationTypeKey in types)) {
|
|
28
28
|
LOG._warn && LOG.warn(`Notification Type ${NotificationTypeKey} is not in the notification types file`);
|