boxlang-express 0.2.6

Released .

  • Filled in the STOMP 1.2 gaps identified in a spec-compliance pass over Stomp.bx/StompFrameCodec.bx: RECEIPT now sent for any client frame carrying a receipt header (previously only DISCONNECT); full ACK/NACK support (SUBSCRIBE's ack header, an ack header on MESSAGE under client/client-individual modes, cumulative acking in client mode); BEGIN/COMMIT/ABORT transactions, scoped per connection per spec; bidirectional heartbeat negotiation (heart-beat:cx,cy on CONNECT, each direction's interval computed independently per spec section 6, plus server-side monitoring that closes a connection whose negotiated incoming heartbeats stop arriving); and content-length honored on both read and write so a body with an embedded NUL byte round-trips correctly instead of being silently truncated at the first one. app.ws()'s WebSocket handshake now also negotiates the v12.stomp/v11.stomp/v10.stomp Sec-WebSocket-Protocol subprotocols, for client libraries (stomp.js and others) that send and expect one echoed back — harmless to every other app.ws() route, confirmed directly: a client that never sends that header skips negotiation entirely. See Stomp.bx, StompFrameCodec.bx, and tests/specs/StompSpec.bx (20 specs, up from 12).
  • Followed up with a parity pass against SocketBox (Ortus's own WebSocket/STOMP library, read directly from source for this — its README and WebSocketSTOMP.cfc) to close the remaining real gaps: exchanges/bindings (direct/topic/fanout/distribution, plus a custom-exchange escape hatch via a class config key), a live connection registry (getConnections()/getConnectionDetails()) with connectionMetadata threaded through authenticate()/authorize() and echoed back as CONNECTED headers, and server-side listeners (options.listeners) that react to a destination from plain server code via a new StompMessage.bx wrapper (auto-JSON-deserializing body, getConnection() null for a server-originated message). Deliberately still not built: multi-node clustering (SocketBox's ClusterManager/ClusterPeer — a distributed- systems feature with no cache-abstraction or multi-node deployment story here to build it against) and binary bodies (a transport limit of WebSocket text frames, not a broker choice). Found and fixed a new, previously-undiscovered BoxLang landmine while building this: a function parameter (or local var) holding an actual null can't be referenced by name at all — not read, reassigned, or passed through to another function, only isNull()-checked — unlike a variables.-scope member, which tolerates storing and reading back a real null directly. Worked around with a "" sentinel converted to a real null only via a direct variables.x = javacast("null","") assignment (see StompMessage.bx's init()); now documented in docs/ARCHITECTURE.md's landmines list alongside a second, smaller one (a bare # inside a BoxLang string literal needs escaping as ##, which broke TopicExchange.bx's own # wildcard match on first write). See tests/specs/StompParitySpec.bx (10 new specs). Full suite: 230/230.