diana 0.15.1
diana: ^0.15.1 copied to clipboard
Spring-inspired, annotation-driven backend framework for Dart: compile- time dependency injection, declarative controllers, middleware and validation.
Changelog #
0.15.1 #
- Package metadata for pub.dev: MIT license, repository/documentation
links, topics, and an
example/. xmlconstraint now admits 7.x.- Shorter pub.dev description;
dart formatapplied (no behavior change).
0.15.0 #
- Version bump only (kept in lockstep with the workspace).
0.14.0 #
- STOMP 1.2 over WebSockets (
stomp/frame.dart,stomp/broker.dart): aStompFramecodec, an in-memoryStompBroker, theStompEndpointbase,StompPublisher,StompMessageandStompRelayEvent. Topic publishes relay across isolates through the event bus.
0.13.0 #
- Version bump only (kept in lockstep with the workspace).
0.12.0 #
- New dependency-free
CronExpression(cron.dart): 6-field Spring-style parser with macros,nextAfterin local time.DianaScheduler.schedulegains acronparameter (exactly one of fixedRate/fixedDelay/cron); cron runs are re-armed after completion so they never overlap.
0.11.0 #
- New pluggable
@Cacheablebackend contract inaspects.dart:DianaCacheStore(wrap-stylerun<V>(spec, key, miss)),CacheSpec, andInMemoryCacheStore(the exposed per-isolate default).
0.10.0 #
- New aspect runtime (
aspects.dart):runTimed,MethodCache(TTL+LRU, single-flight, errors never cached),RetryPolicy,CircuitBreakerPolicyandCircuitOpenException— the helpers behind the generated$Aspect$Xproxies.DianaObservergains theobserveTimedMethodno-op hook.
0.9.0 #
- Request body size limit:
server.maxBodyBytes(default 10 MiB) caps every non-multipart body read throughDianaRequestwith streaming enforcement (413);server.multipart.maxSizenow bounds the raw multipart stream, part headers included. - Shutdown drains in-flight remote-event dispatches before
dispose();dispatchRemotetolerates listeners registered mid-dispatch. Hijacked streaming responses send a real reason phrase and strip CR/LF from header values. - Multi-isolate startup is coordinated and fail-closed: no isolate serves until all are initialized, and a startup failure shuts down already-spawned workers before rethrowing.
0.8.1 #
- Multi-isolate shutdown never hangs: worker dispose failures are reported,
hung workers are killed after
DianaRuntime.workerShutdownTimeout, dead worker isolates are detected and skipped. Scheduler: no moreTimerleak onfixedDelayre-arms; synchronous task throws reachonError. Multipart fields decode as UTF-8; zero-length chunks no longer truncate streamed responses; SSE source errors stop the heartbeat; denied CORS responses carryVary: Origin; the event bus tolerates listeners registered mid-dispatch.
0.8.0 #
- Added the neutral
DianaObservercontract (observer.dart) and threaded an optionalobserverthroughDianaServer,DianaSchedulerandDianaEventBus;DianaScheduler.schedulegainedname. NewlivenessEndpointHandler/readinessEndpointHandler.
0.7.0 #
DianaScheduler.schedulegainsperIsolate(defaultfalse): with multi-isolate serving, leader-only tasks are skipped in worker isolates so a schedule runs once per process. NewDianaRuntime.isWorkerIsolate(set before a worker's bootstrap runs).
0.6.0 #
- Version bump only (kept in lockstep with the workspace;
diana_databuilds on this release).
0.5.0 #
- Added
principalAttributeKeyandbindPrincipal<T>(DianaRequest)tobinding.dart— the cross-package contract used bydiana_auth's authentication middleware and by generated@Principal()adapters.
0.4.0 #
- Application events:
DianaEventPublisher(injectable interface) andDianaEventBus— awaited local dispatch in registration order with subtype matching (publish), plusbroadcastfor cross-isolate delivery. DianaRuntimebridges broadcast events hub-and-spoke across worker isolates (exactly-once per isolate);DianaRunnablegains an optionaleventBus. Unsendable broadcast events fail fast withArgumentError.
0.3.0 #
- Content negotiation: pluggable
BodyCodecinterface with aBodyCodecRegistry; codecs are discovered through DI (any singleton implementingBodyCodec). New helpersdecodeMapBody/decodeListBody(415/400 semantics) andnegotiatedResponse(Accept-driven, 406 viaNotAcceptableException). - XML out of the box:
XmlCodec(application/xml,text/xml) with a documented Map↔XML convention — register it with@Component() class AppXmlCodec extends XmlCodec {}. - Server-Sent Events:
ServerSentEvent(+.json), spec-compliant encoder (encodeSse, id/event/retry/multi-line data, heartbeats) andsseResponse. Streamed responses useDianaResponse.streamwith a newbodyStreamfield; the relic adapter serves them over a hijacked socket with chunked framing so events flush immediately. - New config key
server.sse.heartbeatSeconds(default 15,0disables). DianaRequestnow carries the codec registry (codecs) alongsidelimits.
0.2.0 #
- Application lifecycle:
@PostConstruct/@PreDestroy,DianaApp,DianaRuntime.runwith graceful shutdown,DianaOverridesfor tests. - Configuration profiles, typed lists and
section(). - HTTPS (TLS) and experimental multi-isolate serving.
- CORS (
@CrossOrigin, global config, automatic preflight). - Static file serving with SPA fallback.
- Multipart uploads, raw
Stringbodies and 406 Accept negotiation. - Native JSON codegen (
@Json/@JsonField). - OpenAPI 3 document generation and
/openapi.json. - Actuator endpoints
/actuator/healthand/info. @Scheduledtasks (fixedRate/fixedDelay).- WebSocket handshake interceptors.
0.1.0 #
- Initial release: compile-time DI, controllers/routing on relic,
parameter/body binding, DTO validation, middleware chains, configuration,
HttpExceptionhierarchy with@ControllerAdvice, WebSocket support.