darto_inject 1.0.1 copy "darto_inject: ^1.0.1" to clipboard
darto_inject: ^1.0.1 copied to clipboard

Typed dependency injection for Darto — Provider<T>, request scope, lifecycle hooks and per-test overrides. No codegen, no decorators.

1.0.1 #

  • Fix a runtime type error when disposing a provider read through a dynamic-narrowed handle (e.g. during di.warmup() / readAsync<dynamic>): the disposer is now bound with the provider's reified type via disposerFor(value), avoiding a covariant field-read crash.

1.0.0 #

  • Initial release.
  • Provider<T> (sync) and AsyncProvider<T> (async) — typed factories with app- or request-scope.
  • Di container: caches instances per scope, supports override(...) for tests and runs onDispose callbacks in reverse-creation order.
  • Context extension c.read(provider) / c.readAsync(provider) and built-in contextProvider exposing the current Context inside request-scope factories.
  • di(container).middleware() — registers a Darto middleware that opens a request scope per request and disposes it on completion.
  • Feature(providers, routes) + app.install([prefix], feature) — group a set of providers with their routes; install once.
1
likes
150
points
32
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Typed dependency injection for Darto — Provider<T>, request scope, lifecycle hooks and per-test overrides. No codegen, no decorators.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

darto

More

Packages that depend on darto_inject