raiser_generator 3.0.1
raiser_generator: ^3.0.1 copied to clipboard
Code generator for the Raiser domain event library. Auto-discovers and registers handlers.
Changelog #
All notable changes to this workspace will be documented in this file.
The format is based on Keep a Changelog, and this workspace adheres to Semantic Versioning.
This is a lockstep workspace: all packages share the same version and release notes.
[Unreleased] #
3.0.1 - 2026-01-22 #
Changed #
- Updated dependencies to use latest versions:
zooper_flutter_core: ^2.0.0bounded: ^1.0.0
3.0.0 - 2026-01-10 #
Changed #
- BREAKING:
RaiserEventis now a pureabstract interface classinstead of a base class with implementation.- Note: Using
RaiserEventis completely optional -EventBusworks with ANY type. - If you choose to use
RaiserEvent, you must explicitly implement all three required properties:id,occurredOn, andmetadata. - No more automatic property initialization - implement the interface explicitly.
- This change allows events to use composition and multiple interfaces without inheritance constraints.
- Note: Using
RaiserEventnow implementsZooperDomainEventfromzooper_flutter_corepackage.- Event IDs in
RaiserEventnow useEventIdtype (ULID-based) instead ofString.- IDs are generated via
EventId.fromUlid()for better uniqueness guarantees. - Access raw string value via
event.id.valuewhen needed.
- IDs are generated via
- Renamed
RaiserEvent.timestampproperty tooccurredOnfor clarity and DDD alignment. - Removed
aggregateIdas a direct property fromRaiserEvent.- Store aggregate identifiers in the
metadatamap instead:metadata: {'aggregateId': 'user-123'}. - Access via
event.metadata['aggregateId'] as String?.
- Store aggregate identifiers in the
- Removed helper mixins and convenience extensions.
- Updated generator dependency constraints to
raiser: ^3.0.0andraiser_annotation: ^3.0.0.
Important Note #
EventBus is fully generic and does not require RaiserEvent. You can publish and subscribe to any type. The RaiserEvent interface is purely optional for users who want standardized domain event metadata.
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 #
- BREAKING: Renamed
DomainEventtoRaiserEventto avoid naming conflicts with other packages. - Updated documentation references from
DomainEventtoRaiserEvent. - Updated generator dependency constraints to
raiser: ^2.0.0andraiser_annotation: ^2.0.0.
1.0.0 - 2024-12-19 #
Added #
- EventBus — Central dispatcher for publishing and routing domain events.
- DomainEvent — Base class with automatic ID generation, timestamps, and optional aggregate ID.
- EventHandler — Type-safe interface for class-based event handlers.
- Subscription — Handle for cancelling handler registrations.
- Priority-based ordering — Higher priority handlers execute first.
- Error handling strategies.
- AggregateException — Collects multiple handler errors when using
continueOnError. - @RaiserHandler annotation for marking event handler classes.
- @RaiserMiddleware annotation for marking middleware classes.
- Support for dependency injection through annotation metadata.
- Two-phase builder system (
raiser_collecting→raiser_aggregating). - Automatic handler discovery and middleware discovery.
- Generated registration functions (
initRaiser(),initRaiserWithFactories(), and named bus variants). - Dependency injection factory parameter generation.
- Priority support and type-safe code generation.