diana_generator 0.15.1
diana_generator: ^0.15.1 copied to clipboard
Code generator for the Diana backend framework. Resolves the dependency injection graph at build time and emits the application composition root.
Changelog #
0.15.1 #
- Package metadata for pub.dev: MIT license, repository/documentation
links, topics, and an
example/. analyzerconstraint now admits up to 14.x andbuild5.x.dart formatapplied (no behavior change).
0.15.0 #
- Version bump only (kept in lockstep with the workspace).
0.14.0 #
- STOMP support: reads
@MessageMapping/@SendTo(with exact diagnostics), discoversStompEndpoint/StompPublisher, and emits the broker field + oneregisterMappingper handler in the context constructor. Apps without STOMP are byte-identical.
0.13.0 #
- Query-method generation: abstract
@Repositoryclasses extendingDianaRepository<E>are implemented as$Repo$X(CRUD + every name-derived query compiled to a fluent knex chain). Deterministic longest-match name parser with ~20 exact build diagnostics; the database-connector message now mentions DianaRepository.
0.12.0 #
@Scheduled(cron:)support: cron carried on the summary and emitted asschedule(cron: '...'); build diagnostics for the cron field count and for combining cron with fixedRate/fixedDelay. Byte-identical for apps without cron.
0.11.0 #
@Cacheablemethods route through a discoveredDianaCacheStoreprovider when present: the$Aspect$Xproxy gains aDianaCacheStorefield and astatic const CacheSpecper cached method (vs the built-inMethodCachefield otherwise — byte-identical for store-less apps). New diagnostics for duplicate/non-singleton stores.
0.10.0 #
- Generalized proxy pipeline:
$Aspect$Xsubclasses compose@Timed/@Cacheable/@Retryable/@CircuitBreaker/@Transactionalin a fixed order with per-method state fields; transactional-only classes keep the byte-identical$Tx$Xshape. Generic methods re-declare their type parameters on overrides. New exact diagnostics for aspect placement, signatures and value ranges.
0.9.0 #
- Version bump only (kept in lockstep with the workspace).
0.8.1 #
- Version bump only (kept in lockstep with the workspace).
0.8.0 #
- Discovers a
DianaObservabilityprovider and wires its observer into the server, scheduler, event bus and database, plus/actuator/metrics(compile-time gated) and always-on liveness/readiness routes. New diagnostics for duplicate/non-singleton observability providers.
0.7.0 #
- Scheduler emission forwards
perIsolate: truefrom the annotation (omitted when false — byte-identical output for existing apps).
0.6.0 #
@Transactionalsupport: reads annotated methods (capturing full signatures), injects diana_data'sDatabaseinto@Repository/service providers via a framework-injectable seam, opens/migrates/closes the connection in the context lifecycle, and emits$Tx$Xproxy subclasses that wrap each transactional method in an ambient transaction. New connector-cardinality and@Transactionalplacement/signature diagnostics. Apps without data emit byte-identical output.
0.5.0 #
@Secured/@RolesAllowedsupport:SecurityInfocaptured on routes, controllers, WebSocket controllers and gRPC services (method replaces controller); guards fromdiana_auth(referenced by import URL only) appended last in HTTP route and WebSocket handshake middleware; agrpcAuthInterceptorwired from the app'sAuthenticationMiddleware(server-wide). New diagnostics for empty roles, misplaced annotations and gRPC security.@Principalparameter binding viabindPrincipal. OpenAPI gains a bearer scheme and per-operationsecurity. Apps without security emit byte-identical output.
0.4.0 #
@EventListenersupport: listener methods are validated (signature, non-nullable class-typed event parameter, singleton scope) and registered on aDianaEventBusin the generatedDianaContextconstructor;DianaEventPublisherconstructor parameters are satisfied by the context's bus;runDianahands the bus to the runtime for the cross-isolate bridge. Apps without events emit byte-identical output.
0.3.0 #
@Consumes/@Producesclassification and emission: annotated routes decode through the request's codec registry and negotiate the response format; MIME sets are projected into the OpenAPI document.- Body-codec discovery: singleton
BodyCodecimplementations are wired intoDianaServer(bodyCodecs: ...)in the composition root. - Server-Sent Events:
Stream<ServerSentEvent>andStream<DTO>route returns compile tosseResponse(...); OpenAPI marks themtext/event-stream. New diagnostics for unsupported stream shapes and invalid@ResponseStatus/@Producescombinations. @GrpcServicesupport: validates the class extends apackage:grpcService, injects it as a singleton and wires aDianaGrpcServerintoDianaApp.grpcServer(served oninitialize(), stopped first ondispose()). Apps without gRPC services emit byte-identical output.
0.2.0 #
- Lifecycle wiring (
@PostConstruct/@PreDestroy,DianaAppcomposition root,DianaOverrides). - CORS, static files, multipart,
@Scheduled, WebSocket handshake interceptors. - Native JSON codecs (
@Json/@JsonField) and OpenAPI 3 generation from the shared route-classification pass.
0.1.0 #
- Initial release: three-builder pipeline (metadata → part files → bootstrap), compile-time DI graph resolution with exact-message diagnostics, route adapters, validators, config binders.