Skip to content

Releases: AJAYMYTH/AfterLink

v2.0.2

Choose a tag to compare

@AJAYMYTH AJAYMYTH released this 07 Jul 11:02

Full Changelog: v2.0.1...v2.0.2

v2.0.1

Choose a tag to compare

@AJAYMYTH AJAYMYTH released this 06 Jul 08:27

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/cluster using Redis.Cluster when configured with a nodes array or cluster flag.
  • Dart SDK: Migrated from the streaming-only messagepack dependency to the standard msgpack_dart package, resolving compilation issues and ensuring robust, standard-compliant MessagePack serialization. All tests are passing cleanly.

v1.2.4

Choose a tag to compare

@AJAYMYTH AJAYMYTH released this 06 Jun 10:56

First release with @AJAYMYTH scope published to GitHub Packages and npm

v1.2.1

Choose a tag to compare

@AJAYMYTH AJAYMYTH released this 03 Jun 14:18

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