Repository navigation
1.2.0 — Plug Feature Parity
Closes the critical gaps between Nexus and Elixir's Plug framework. Adds 10 new source files, 9 test suites (98 tests), bringing the total to 581 tests across 68 suites.
Highlights
- ModulePlug protocol — lightweight alternative to
ConfigurablePlugfor plugs with plain init parameters - Header helpers —
putRespHeader,getRespHeader,putReqHeader, etc. onConnection - Nested assigns — dot-path notation for hierarchical data:
conn.assign(dotPath: "user.role", value: "admin") - onError plug — centralized error handling that catches downstream errors
- Fetch session — explicit session loading control with
fetchSession,fetchSessionIfMissing - Route params access —
pathParameters,queryParameters, typedgetParameter(_:as:) - ContentNegotiation — validates
Acceptheaders, returns 406 on mismatch - Timeout — wraps plug execution with configurable duration, 503 on timeout
- PlugBuilder — declarative plug composition via Swift
@resultBuilder - Test helpers —
Connection.make(),.makeJSON(),.makeForm()factory methods
Fixes
- Linux CI: compression gracefully no-ops on platforms without Apple's
Compressionframework - Fixed sendFile race condition
Full changelog
https://github.com/Spectro-ORM/Nexus/blob/main/CHANGELOG.md
Full diff: 1.1.1...1.2.0