Skip to main content

diana_generator 0.15.1 copy "diana_generator: ^0.15.1" to clipboard
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/.
  • analyzer constraint now admits up to 14.x and build 5.x.
  • dart format applied (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), discovers StompEndpoint/StompPublisher, and emits the broker field + one registerMapping per handler in the context constructor. Apps without STOMP are byte-identical.

0.13.0 #

  • Query-method generation: abstract @Repository classes extending DianaRepository<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 as schedule(cron: '...'); build diagnostics for the cron field count and for combining cron with fixedRate/fixedDelay. Byte-identical for apps without cron.

0.11.0 #

  • @Cacheable methods route through a discovered DianaCacheStore provider when present: the $Aspect$X proxy gains a DianaCacheStore field and a static const CacheSpec per cached method (vs the built-in MethodCache field otherwise — byte-identical for store-less apps). New diagnostics for duplicate/non-singleton stores.

0.10.0 #

  • Generalized proxy pipeline: $Aspect$X subclasses compose @Timed/@Cacheable/@Retryable/@CircuitBreaker/@Transactional in a fixed order with per-method state fields; transactional-only classes keep the byte-identical $Tx$X shape. 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 DianaObservability provider 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: true from the annotation (omitted when false — byte-identical output for existing apps).

0.6.0 #

  • @Transactional support: reads annotated methods (capturing full signatures), injects diana_data's Database into @Repository/service providers via a framework-injectable seam, opens/migrates/closes the connection in the context lifecycle, and emits $Tx$X proxy subclasses that wrap each transactional method in an ambient transaction. New connector-cardinality and @Transactional placement/signature diagnostics. Apps without data emit byte-identical output.

0.5.0 #

  • @Secured/@RolesAllowed support: SecurityInfo captured on routes, controllers, WebSocket controllers and gRPC services (method replaces controller); guards from diana_auth (referenced by import URL only) appended last in HTTP route and WebSocket handshake middleware; a grpcAuthInterceptor wired from the app's AuthenticationMiddleware (server-wide). New diagnostics for empty roles, misplaced annotations and gRPC security. @Principal parameter binding via bindPrincipal. OpenAPI gains a bearer scheme and per-operation security. Apps without security emit byte-identical output.

0.4.0 #

  • @EventListener support: listener methods are validated (signature, non-nullable class-typed event parameter, singleton scope) and registered on a DianaEventBus in the generated DianaContext constructor; DianaEventPublisher constructor parameters are satisfied by the context's bus; runDiana hands the bus to the runtime for the cross-isolate bridge. Apps without events emit byte-identical output.

0.3.0 #

  • @Consumes/@Produces classification 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 BodyCodec implementations are wired into DianaServer(bodyCodecs: ...) in the composition root.
  • Server-Sent Events: Stream<ServerSentEvent> and Stream<DTO> route returns compile to sseResponse(...); OpenAPI marks them text/event-stream. New diagnostics for unsupported stream shapes and invalid @ResponseStatus/@Produces combinations.
  • @GrpcService support: validates the class extends a package:grpc Service, injects it as a singleton and wires a DianaGrpcServer into DianaApp.grpcServer (served on initialize(), stopped first on dispose()). Apps without gRPC services emit byte-identical output.

0.2.0 #

  • Lifecycle wiring (@PostConstruct/@PreDestroy, DianaApp composition 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.
0
likes
160
points
153
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Code generator for the Diana backend framework. Resolves the dependency injection graph at build time and emits the application composition root.

Repository (GitHub)
View/report issues

Topics

#codegen #build-runner #dependency-injection

License

MIT (license)

Dependencies

analyzer, build, code_builder, collection, dart_style, diana_annotation, glob, path, source_gen

More

Packages that depend on diana_generator