Skip to content

1.2.0 — Plug Feature Parity

Choose a tag to compare

@Maartz Maartz released this 29 Mar 17:34
· 28 commits to main since this release

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 ConfigurablePlug for plugs with plain init parameters
  • Header helpers — putRespHeader, getRespHeader, putReqHeader, etc. on Connection
  • 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, typed getParameter(_:as:)
  • ContentNegotiation — validates Accept headers, 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 Compression framework
  • Fixed sendFile race condition

Full changelog

https://github.com/Spectro-ORM/Nexus/blob/main/CHANGELOG.md

Full diff: 1.1.1...1.2.0