Files
bun.sh/packages
Claude Bot 7dbe714fa6 Implement ServerWebSocket.getSubscriptions() getter
Adds a new getSubscriptions getter to ServerWebSocket that returns an array
of all topics the WebSocket is currently subscribed to.

Implementation details:
- Added getTopicsCount() and getTopics() methods to uWS WebSocket.h
- Created uws_ws_get_topics_as_js_array() in libuwsockets.cpp that constructs
  a JSArray directly using JSC APIs, avoiding Zig FFI complexity
- Uses iterateTopics() internally to populate the array
- Exposed as a getter property in server.classes.ts
- Added comprehensive test coverage

The getter returns an empty array when there are no subscriptions.
2025-11-02 01:37:59 +00:00
..