Repository navigation
v0.4.0
Changes since v0.3.2
All changes are additive and back-compatible with v0.3.2.
New features
- terminate() method added to OcppClient and OcppServer for graceful shutdown (#5)
- Websocket internals exposed in Client and Server for connection lifecycle hooks (#5)
- Inbound MessageId injection — incoming CALL payloads now include
payload.messageIdso handlers can read the on-wire OCPP-J MessageId (#6) - Configurable request timeout — Protocol, Client, and Server constructors accept an optional
callTimeoutMsparameter (default 10000) (#8) - Caller-supplied outbound MessageId —
callRequestaccepts an optionalmessageIdparameter; when supplied, it is used verbatim as the on-wire MessageId (#9)
Bug fixes
- setTimeout leak —
Protocol.callRequestno longer leaks a 10s timer on every successful response. The timer is now cleared in bothonCallResultandonCallError(#7)
Why this release
Closes the patch-package patch lifecycle in evercharge/central-ocpp. Central-ocpp has been carrying a 558-line patches/ocpp-ts+0.3.0.patch for nearly a year that added most of the above features as monkey-patches. v0.4.0 lands them as proper source edits so central-ocpp can consume @evercharge/ocpp-ts@^0.4.0 directly from GitHub Packages.
Part of CLOUD-4224.