You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* WIP: Type-safe parser registry with ResolveBody and K defaults
- Add createParserRegistry factory with typed ParserMap/Registry
- Add ResolveBody<T, O> helper for content-type → body type cascade
- Default K to never (no default contentType = PlainBody)
- Make AMQPSessionOptions, AMQPSession, AMQPQueue generic on T/K
- Add serializeBody with contentType constrained to parser keys
- Update type-safety tests for ResolveBody and parser-aware queues
- QueuePublishOptions now constrains contentType to registered parsers
Known issues: downstream classes (Exchange, RPC) not yet threaded with T/K
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: AMQPParser<In, Out>, rename Registry to ParserRegistry, add JsonSerializable
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* style: apply prettier formatting fixes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add createCoderRegistry factory with typed registry
Adds CoderMap/CoderRegistry types and a createCoderRegistry() factory
parallel to createParserRegistry(), with optional built-in gzip/deflate
coders via the useDefaults flag.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: standalone serializeAndEncode and decodeAndParse with sync fast path
Extract logic from AMQPCodecRegistry into standalone exported functions that
accept ParserRegistry/CoderRegistry objects directly. Returns a sync result
when no coder is involved, or a Promise when encoding/decoding is needed.
Also adds a standalone decodeMessage helper for use in Task 4.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: replace CodecMode with P/C/KP/KC generics across all classes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: remove unnecessary any casts and eslint-disable comments
Use ParserMap/CoderMap base types for standalone function parameters
instead of ParserRegistry<any>/CoderRegistry<any>. This eliminates
all type casts at call sites and ~20 eslint-disable comments.
ResolveBody now uses InferParserInput<P[O]> instead of structural match.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: remove AMQPCodecRegistry class, export decodeAndParse and inference types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test: rewrite codec registry tests for standalone functions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test: rewrite type-safety tests for P/C/KP/KC generic system
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test: update session codec integration tests for new API
Replace AMQPCodecRegistry/CodecMode with createCoderRegistry and P/C/KP/KC generics.
Fix serializeBody call, unused properties params, q.publish leftover, and RPC handler return types.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: update rawBody → _rawBytes in remaining test files, extend eslint config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: replace any with unknown/never in ParserMap types, format test.ts
Method shorthand on AMQPParser gives bivariance, so AMQPParser<unknown,
unknown> accepts narrower parsers. Inference helpers use unknown/never
in the slot we discard so eslint no-explicit-any is satisfied without
disable comments.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Anders Bälter <anders@84codes.com>
0 commit comments