raiser_generator 2.0.1
raiser_generator: ^2.0.1 copied to clipboard
Code generator for the Raiser domain event library. Auto-discovers and registers handlers.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
2.0.1 - 2026-01-08 #
Changed #
- Migrated generator implementation away from deprecated analyzer element APIs to remove deprecation warnings.
2.0.0 - 2026-01-08 #
Changed #
- Updated documentation and examples from
DomainEventtoRaiserEvent(matches core library breaking change) - Updated dependency constraints to
raiser: ^2.0.0andraiser_annotation: ^2.0.0
1.0.0 - 2024-12-19 #
Added #
- Two-phase builder system
- Phase 1:
raiser_collecting— Discovers annotated handlers and middleware per file - Phase 2:
raiser_aggregating— Generates consolidated registration code
- Phase 1:
- Automatic handler discovery — Scans codebase for
@RaiserHandlerannotations - Automatic middleware discovery — Scans codebase for
@RaiserMiddlewareannotations - Generated registration functions
initRaiser()— Registers all handlers without dependenciesinitRaiserWithFactories()— Registers handlers with dependency injection support- Named bus functions —
initRaiser{BusName}()for handlers on specific buses
- Dependency injection support
- Factory parameter generation for handlers with constructor dependencies
- Preserves constructor parameter names and types
- Priority support — Respects priority ordering from annotations
- Type-safe code generation — Generates strongly-typed registration code
- Build configuration — Excludes generated files (.g.dart, .freezed.dart, .gr.dart, .config.dart)
- Comprehensive examples demonstrating basic and advanced usage patterns
- Full test coverage for all generation scenarios