Repository navigation
Releases: AJAYMYTH/AfterLink
Release list
v2.0.2
v2.0.1
Release v2.0.1
This release contains critical fixes for NPM publishing, the addition of Redis Cluster support to the clustering package, and dependencies & serialization fixes for the Dart Client SDK.
Key Changes:
- npm Publishing: Renamed root workspace package to avoid name collision. Updated scope-renaming script to recursively replace scope names inside code and markdown documentation.
- Redis Cluster Support: Enabled cluster-wide pub/sub and slot routing in
@afterlink/clusterusingRedis.Clusterwhen configured with anodesarray orclusterflag. - Dart SDK: Migrated from the streaming-only
messagepackdependency to the standardmsgpack_dartpackage, resolving compilation issues and ensuring robust, standard-compliant MessagePack serialization. All tests are passing cleanly.
v1.2.4
v1.2.1
This patch release resolves several critical issues in the SDK (including ES module resolution, JWT
authentication handling, and WebSocket bridge framing) and introduces the new TcpClient wrapper in
@afterlink/core with full TypeScript typings.
### 🛠️ Bug Fixes
* **Connection Auth Validation (`require` ➡️ `import`):** Replaced synchronous `require('jose')` with `await
import('jose')inConnection._validateAuth. josev6 is ESM-only; the previous synchronous require crashed withERR_REQUIRE_ESMon Node 18+ andReferenceError: TextEncoder is not definedon older runtimes (affects both TCP and WebSockets). * **Handshake Authentication Flow:** UpdatedConnection._handleHandshaketo be async and await_validateAuth. Previously, the JWT verification promise resolved *after* the session was constructed, resulting in session.user always being null and allowing invalid tokens to pass unchecked. * **Session User Context:** Decoded JWT payloads are now stored inthis._jwtPayloadand populated insession.
userduring theHELLOhandshake. All route handlers and middleware now receive the correct user context via req.session.user. * **WebSocket Bridge JWT Auth:** Updated handleWsHandshaketo be async to properly verify theauthfield from theHELLOpayload usingjwtVerify. WebSocket sessions now populate session.useridentically to TCP sessions. * **WebSocket Frame Coalescing:** Fixed silent frame loss occurring when bothHELLOandREQUESTarrived in the same TCP packet. Buffer bytes following theHELLOframe are now preserved and processed immediately. * **CORS Behavior on WebSocket Bridge:** Connections without anOriginheader are now permitted whencors.
originsis empty (default). Node.js test clients will no longer receive a403 Forbidden` error in local
development.
### ✨ New Features & Enhancements
* **`TcpClient` in `@afterlink/core`:** Added a wrapper class for TCP connections wrapping `net.Socket` with
native AfterLink framing. Features Promise-based connect(helloData) and request(route, body), and handles
HELLO_ACK, PING/PONG, and SERVER_CLOSING automatically.
* TypeScript Typings: Added complete typings for TcpClient, TcpClientOptions, and HelloData interfaces
in packages/core/types/index.d.ts.
Full Changelog: https://github.com/AJAYMYTH/AfterLink/commits/v1.2.1