Skip to content

v0.6.0

Choose a tag to compare

@charleypeng charleypeng released this 15 Jul 03:36
· 29 commits to main since this release

feat

  • Add unified result extension methods and static factories for 20 HTTP status codes (202, 405, 406, 410, 415, 422, 429, 500–504)
  • Add generic AsStatus() extension and UnifiedResult.Status<T>() static factory for custom HttpStatusCode — covers any status code not explicitly enumerated
  • Add parameterless ConfigureAuditTrail() overload — enables audit trail with default options without requiring a callback
  • Add AuditTrailFormat enum with Default, DotnetLogger, JsonStyle, and Compact presets — configurable via AuditTrailOptions.LogFormat
  • Add SharkOption.ShowStartupBanner (default true) — allows disabling the startup banner

feat (Phase 5 — Lifecycle & startup integrity)

  • #25 Startup banner: Sharkable now prints a formatted banner (version, environment, UTC timestamp) to the console at the end of UseShark()
  • #20 Lifecycle hooks: SharkOption.ConfigureOnStarted() / ConfigureOnStopped() — register callbacks that fire on IHostApplicationLifetime.ApplicationStarted / ApplicationStopping
  • #22 Readiness gate: InternalShark.StartupCompleted opens after all wiring completes; /healthz returns 503 until then
  • #23 Warmup: IWarmupService interface + SharkOption.ConfigureWarmup<T>() — resolves and runs a warmup task synchronously before the readiness gate opens (30s timeout)
  • #27 Eager singleton: [SingletonService(Eager = true)] — eagerly resolves the singleton from DI during UseShark(), before the server accepts requests
  • #26 Pipeline injection points: UseSharkOptions.AddBeforeAuth() / AddAfterAuth() / AddAfterEndpoints() — inject custom middleware at specific pipeline positions
  • #21 Liveness probe: /livez endpoint mapped alongside /healthz — returns {"status":"alive"} unconditionally, not blocked by readiness/shutdown gates
  • #24 DI validation: SharkOption.ValidateOnStart<T>() — calls GetRequiredService<T>() during UseShark(), fails fast on missing registrations

docs

  • Document all unified result extension methods and static factories in EN + ZH
  • Add service registration guide covering [ScopedService], [TransientService], [SingletonService] attributes (EN + ZH)
  • Add lifecycle hooks, startup banner, warmup, eager singleton, pipeline injection, DI validation guide (EN + ZH)
  • Update health checks guide with readiness gate and liveness probe details (EN + ZH)

Full Changelog: v0.5.7...v0.6.0