File tree Expand file tree Collapse file tree 4 files changed +50
-48
lines changed
Expand file tree Collapse file tree 4 files changed +50
-48
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,15 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
66and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
77
8- ## Version 1.2.0 - 2024-09-02
8+ ## Version 1.2.0 - 2024-09-04
99
1010### Added
1111
1212- Support SAP Push Channel Protocol (PCP)
1313- Option to include or exclude identifiers
1414- Option to include or exclude current user
1515- Better CDS context handling
16+ - CDS 8.2 compatibility
1617
1718## Version 1.1.1 - 2024-08-01
1819
Original file line number Diff line number Diff line change 5252 "@cap-js-community/websocket" : " ./" ,
5353 "@cap-js/sqlite" : " ^1.7.3" ,
5454 "@eslint/js" : " ^9.9.1" ,
55- "@sap/cds" : " ^8.1.1 " ,
55+ "@sap/cds" : " ^8.2.0 " ,
5656 "@sap/cds-dk" : " ^8.1.2" ,
5757 "@socket.io/redis-adapter" : " ^8.3.0" ,
5858 "@socket.io/redis-streams-adapter" : " ^0.2.2" ,
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class PCPFormat extends BaseFormat {
2424 if ( splitPos !== - 1 ) {
2525 const result = { } ;
2626 const pcpFields = extractPcpFields ( data . substring ( 0 , splitPos ) ) ;
27- const operation = this . service . operations ( ) . find ( ( operation ) => {
27+ const operation = Object . values ( this . service . operations || { } ) . find ( ( operation ) => {
2828 return (
2929 operation [ "@websocket.pcp.action" ] === ( pcpFields [ "pcp-action" ] || MESSAGE ) ||
3030 operation [ "@ws.pcp.action" ] === ( pcpFields [ "pcp-action" ] || MESSAGE ) ||
@@ -54,10 +54,11 @@ class PCPFormat extends BaseFormat {
5454
5555 compose ( event , data ) {
5656 const eventDefinition = this . service . events ( ) [ event ] ;
57- const messageElement = eventDefinition ?. elements ?. find ( ( element ) => {
57+ const eventElements = Object . values ( eventDefinition ?. elements || { } ) ;
58+ const messageElement = eventElements . find ( ( element ) => {
5859 return element [ "@websocket.pcp.message" ] || element [ "@ws.pcp.message" ] ;
5960 } ) ;
60- const actionElement = eventDefinition ?. elements ? .find ( ( element ) => {
61+ const actionElement = eventElements . find ( ( element ) => {
6162 return element [ "@websocket.pcp.action" ] || element [ "@ws.pcp.action" ] ;
6263 } ) ;
6364 const message =
You can’t perform that action at this time.
0 commit comments