Updated framework

This commit is contained in:
thomashii 2021-06-22 16:17:15 +08:00
parent c68e1c2216
commit 96fb385631
4 changed files with 198 additions and 153 deletions

View file

@ -1,63 +1,84 @@
# 4.0.4 # Change Log
## 4.1.0
* Replaced `http_server` with `belatuk_http_server`
## 4.0.4
* Fixed response returning incorrect status code * Fixed response returning incorrect status code
# 4.0.3 ## 4.0.3
* Fixed "Primitive after parsed param injection" test case * Fixed "Primitive after parsed param injection" test case
* Fixed "Cannot remove all unless explicitly set" test case * Fixed "Cannot remove all unless explicitly set" test case
* Fixed "null" test case * Fixed "null" test case
# 4.0.2 ## 4.0.2
* Updated README * Updated README
# 4.0.1 ## 4.0.1
* Updated README * Updated README
# 4.0.0 ## 4.0.0
* Migrated to support Dart SDK 2.12.x NNBD * Migrated to support Dart SDK 2.12.x NNBD
# 3.0.0 ## 3.0.0
* Migrated to work with Dart SDK 2.12.x Non NNBD * Migrated to work with Dart SDK 2.12.x Non NNBD
# 2.1.1 ## 2.1.1
* `AngelHttp.uri` now returns an empty `Uri` if the server is not listening. * `AngelHttp.uri` now returns an empty `Uri` if the server is not listening.
# 2.1.0 ## 2.1.0
* This release was originally planned to be `2.0.5`, but it adds several features, and has * This release was originally planned to be `2.0.5`, but it adds several features, and has
therefore been bumped to `2.1.0`. therefore been bumped to `2.1.0`.
* Fix a new (did not appear before 2.6/2.7) type error causing compilation to fail. * Fix a new (did not appear before 2.6/2.7) type error causing compilation to fail.
https://github.com/angel-dart/framework/issues/249 <https://github.com/angel-dart/framework/issues/249>
# 2.0.5-beta ## 2.0.5-beta
* Make `@Expose()` in `Controller` optional. https://github.com/angel-dart/angel/issues/107
* Add `allowHttp1` to `AngelHttp2` constructors. https://github.com/angel-dart/angel/issues/108 * Make `@Expose()` in `Controller` optional. <https://github.com/angel-dart/angel/issues/107>
* Add `deserializeBody` and `decodeBody` to `RequestContext`. https://github.com/angel-dart/angel/issues/109 * Add `allowHttp1` to `AngelHttp2` constructors. <https://github.com/angel-dart/angel/issues/108>
* Add `HostnameRouter`, which allows for routing based on hostname. https://github.com/angel-dart/angel/issues/110 * Add `deserializeBody` and `decodeBody` to `RequestContext`. <https://github.com/angel-dart/angel/issues/109>
* Add `HostnameRouter`, which allows for routing based on hostname. <https://github.com/angel-dart/angel/issues/110>
* Default to using `ThrowingReflector`, instead of `EmptyReflector`. This will give a more descriptive * Default to using `ThrowingReflector`, instead of `EmptyReflector`. This will give a more descriptive
error when trying to use controllers, etc. without reflection enabled. error when trying to use controllers, etc. without reflection enabled.
* `mountController` returns the mounted controller. * `mountController` returns the mounted controller.
# 2.0.4+1 ## 2.0.4+1
* Run `Controller.configureRoutes` before mounting `@Expose` routes. * Run `Controller.configureRoutes` before mounting `@Expose` routes.
* Make `Controller.configureServer` always return a `Future`. * Make `Controller.configureServer` always return a `Future`.
# 2.0.4 ## 2.0.4
* Prepare for Dart SDK change to `Stream<List<int>>` that are now * Prepare for Dart SDK change to `Stream<List<int>>` that are now
`Stream<Uint8List>`. `Stream<Uint8List>`.
* Accept any content type if accept header is missing. See * Accept any content type if accept header is missing. See
[this PR](https://github.com/angel-dart/framework/pull/239). [this PR](https://github.com/angel-dart/framework/pull/239).
# 2.0.3 ## 2.0.3
* Patch up a bug caused by an upstream change to Dart's stream semantics.
See more: https://github.com/angel-dart/angel/issues/106#issuecomment-499564485 * Patch up a bug caused by an upstream change to Dart's stream semantics.
See more: <https://github.com/angel-dart/angel/issues/106#issuecomment-499564485>
## 2.0.2+1
# 2.0.2+1
* Fix a bug in the implementation of `Controller.applyRoutes`. * Fix a bug in the implementation of `Controller.applyRoutes`.
# 2.0.2 ## 2.0.2
* Make `ResponseContext` *explicitly* implement `StreamConsumer` (though technically it already did???) * Make `ResponseContext` *explicitly* implement `StreamConsumer` (though technically it already did???)
* Split `Controller.configureServer` to create `Controller.applyRoutes`. * Split `Controller.configureServer` to create `Controller.applyRoutes`.
# 2.0.1 ## 2.0.1
* Tracked down a bug in `Driver.runPipeline` that allowed fallback * Tracked down a bug in `Driver.runPipeline` that allowed fallback
handlers to run, even after the response was closed. handlers to run, even after the response was closed.
* Add `RequestContext.shutdownHooks`. * Add `RequestContext.shutdownHooks`.
@ -66,237 +87,260 @@ handlers to run, even after the response was closed.
* Use a `Container.has<Stopwatch>` check in `Driver.sendResponse`. * Use a `Container.has<Stopwatch>` check in `Driver.sendResponse`.
* Remove unnecessary `new` and `const`. * Remove unnecessary `new` and `const`.
# 2.0.0 ## 2.0.0
* Angel 2! :angel: :rocket: * Angel 2! :angel: :rocket:
# 2.0.0-rc.10 ## 2.0.0-rc.10
* Fix an error that prevented `AngelHttp2.custom` from working properly. * Fix an error that prevented `AngelHttp2.custom` from working properly.
* Add `startSharedHttp2`. * Add `startSharedHttp2`.
# 2.0.0-rc.9 ## 2.0.0-rc.9
* Fix some bugs in the `HookedService` implementation that skipped * Fix some bugs in the `HookedService` implementation that skipped
the outputs of `before` events. the outputs of `before` events.
# 2.0.0-rc.8 ## 2.0.0-rc.8
* Fix `MapService` flaw where clients could remove all records, even if `allowRemoveAll` were `false`. * Fix `MapService` flaw where clients could remove all records, even if `allowRemoveAll` were `false`.
# 2.0.0-rc.7 ## 2.0.0-rc.7
* `AnonymousService` can override `readData`. * `AnonymousService` can override `readData`.
* `Service.map` now overrides `readData`. * `Service.map` now overrides `readData`.
* `HookedService.readData` forwards to `inner`. * `HookedService.readData` forwards to `inner`.
# 2.0.0-rc.6 ## 2.0.0-rc.6
* Make `redirect` and `download` methods asynchronous. * Make `redirect` and `download` methods asynchronous.
# 2.0.0-rc.5 ## 2.0.0-rc.5
* Make `serializer` `FutureOr<String> Function(Object)`. * Make `serializer` `FutureOr<String> Function(Object)`.
* Make `ResponseContext.serialize` return `Future<bool>`. * Make `ResponseContext.serialize` return `Future<bool>`.
# 2.0.0-rc.4 ## 2.0.0-rc.4
* Support resolution of asynchronous injections in controllers and `ioc`. * Support resolution of asynchronous injections in controllers and `ioc`.
* Inject `RequestContext` and `ResponseContext` into requests. * Inject `RequestContext` and `ResponseContext` into requests.
# 2.0.0-rc.3 ## 2.0.0-rc.3
* `MapService.modify` was not actually modifying items. * `MapService.modify` was not actually modifying items.
# 2.0.0-rc.2 ## 2.0.0-rc.2
* Fixes Pub analyzer lints (see `angel_route@3.0.6`) * Fixes Pub analyzer lints (see `angel_route@3.0.6`)
# 2.0.0-rc.1 ## 2.0.0-rc.1
* Fix logic error that allowed content to be written to streaming responses after `close` was closed. * Fix logic error that allowed content to be written to streaming responses after `close` was closed.
# 2.0.0-rc.0 ## 2.0.0-rc.0
* Log a warning when no `reflector` is provided. * Log a warning when no `reflector` is provided.
* Add `AngelEnvironment` class. * Add `AngelEnvironment` class.
* Add `Angel.environment`. * Add `Angel.environment`.
* Deprecated `app.isProduction` in favor of `app.environment.isProduction`. * Deprecated `app.isProduction` in favor of `app.environment.isProduction`.
* Allow setting of `bodyAsObject`, `bodyAsMap`, or `bodyAsList` **exactly once**. * Allow setting of `bodyAsObject`, `bodyAsMap`, or `bodyAsList` **exactly once**.
* Resolve named singletons in `resolveInjection`. * Resolve named singletons in `resolveInjection`.
* Fix a bug where `Service.parseId<double>` would attempt to parse an `int`. * Fix a bug where `Service.parseId<double>` would attempt to parse an `int`.
* Replace as Data cast in Service.dart with a method that throws a 400 on error. * Replace as Data cast in Service.dart with a method that throws a 400 on error.
# 2.0.0-alpha.24 ## 2.0.0-alpha.24
* Add `AngelEnv` class to `core`. * Add `AngelEnv` class to `core`.
* Deprecate `Angel.isProduction`, in favor of `AngelEnv`. * Deprecate `Angel.isProduction`, in favor of `AngelEnv`.
# 2.0.0-alpha.23 ## 2.0.0-alpha.23
* `ResponseContext.render` sets `charset` to `utf8` in `contentType`. * `ResponseContext.render` sets `charset` to `utf8` in `contentType`.
# 2.0.0-alpha.22 ## 2.0.0-alpha.22
* Update pipeline handling mechanism, and inject a `MiddlewarePipelineIterator`.
* This allows routes to know where in the resolution process they exist, at runtime. * Update pipeline handling mechanism, and inject a `MiddlewarePipelineIterator`.
* This allows routes to know where in the resolution process they exist, at runtime.
## 2.0.0-alpha.21
# 2.0.0-alpha.21
* Update for `angel_route@3.0.4` compatibility. * Update for `angel_route@3.0.4` compatibility.
* Add `readAsBytes` and `readAsString` to `UploadedFile`. * Add `readAsBytes` and `readAsString` to `UploadedFile`.
* URI-decode path components in HTTP2. * URI-decode path components in HTTP2.
# 2.0.0-alpha.20 ## 2.0.0-alpha.20
* Inject the `MiddlewarePipeline` into requests. * Inject the `MiddlewarePipeline` into requests.
# 2.0.0-alpha.19 ## 2.0.0-alpha.19
* `parseBody` checks for null content type, and throws a `400` if none was given. * `parseBody` checks for null content type, and throws a `400` if none was given.
* Add `ResponseContext.contentLength`. * Add `ResponseContext.contentLength`.
* Update `streamFile` to set content length, and also to work on `HEAD` requests. * Update `streamFile` to set content length, and also to work on `HEAD` requests.
# 2.0.0-alpha.18 ## 2.0.0-alpha.18
* Upgrade `http2` dependency. * Upgrade `http2` dependency.
* Upgrade `uuid` dependency. * Upgrade `uuid` dependency.
* Fixed a bug that prevented body parsing from ever completing with `http2`. * Fixed a bug that prevented body parsing from ever completing with `http2`.
* Add `Providers.hashCode`. * Add `Providers.hashCode`.
# 2.0.0-alpha.17 ## 2.0.0-alpha.17
* Revert the migration to `lumberjack` for now. In the future, when it's more * Revert the migration to `lumberjack` for now. In the future, when it's more
stable, there'll be a conversion, perhaps. stable, there'll be a conversion, perhaps.
# 2.0.0-alpha.16 ## 2.0.0-alpha.16
* Use `package:lumberjack` for logging. * Use `package:lumberjack` for logging.
# 2.0.0-alpha.15 ## 2.0.0-alpha.15
* Remove dependency on `body_parser`. * Remove dependency on `body_parser`.
* `RequestContext` now exposes a `Stream<List<int>> get body` getter. * `RequestContext` now exposes a `Stream<List<int>> get body` getter.
* Calling `RequestContext.parseBody()` parses its contents. * Calling `RequestContext.parseBody()` parses its contents.
* Added `bodyAsMap`, `bodyAsList`, `bodyAsObject`, and `uploadedFiles` to `RequestContext`. * Added `bodyAsMap`, `bodyAsList`, `bodyAsObject`, and `uploadedFiles` to `RequestContext`.
* Removed `Angel.keepRawRequestBuffers` and anything that had to do with buffering request bodies. * Removed `Angel.keepRawRequestBuffers` and anything that had to do with buffering request bodies.
## 2.0.0-alpha.14
# 2.0.0-alpha.14
* Patch `HttpResponseContext._openStream` to send content-length. * Patch `HttpResponseContext._openStream` to send content-length.
# 2.0.0-alpha.13 ## 2.0.0-alpha.13
- Fixed a logic error in `HttpResponseContext` that prevented status codes from being sent. * Fixed a logic error in `HttpResponseContext` that prevented status codes from being sent.
# 2.0.0-alpha.12 ## 2.0.0-alpha.12
- Remove `ResponseContext.sendFile`. * Remove `ResponseContext.sendFile`.
- Add `Angel.mimeTypeResolver`. * Add `Angel.mimeTypeResolver`.
- Fix a bug where an unknown MIME type on `streamFile` would return a 500. * Fix a bug where an unknown MIME type on `streamFile` would return a 500.
# 2.0.0-alpha.11 ## 2.0.0-alpha.11
- Add `readMany` to `Service`. * Add `readMany` to `Service`.
- Allow `ResponseContext.redirect` to take a `Uri`. * Allow `ResponseContext.redirect` to take a `Uri`.
- Add `Angel.mountController`. * Add `Angel.mountController`.
- Add `Angel.findServiceOf`. * Add `Angel.findServiceOf`.
- Roll in HTTP/2. See `pkg:angel_framework/http2.dart`. * Roll in HTTP/2. See `pkg:angel_framework/http2.dart`.
# 2.0.0-alpha.10 ## 2.0.0-alpha.10
- All calls to `Service.parseId` are now affixed with the `<Id>` argument. * All calls to `Service.parseId` are now affixed with the `<Id>` argument.
- Added `uri` getter to `AngelHttp`. * Added `uri` getter to `AngelHttp`.
- The default for `parseQuery` now wraps query parameters in `Map<String, dynamic>.from`. * The default for `parseQuery` now wraps query parameters in `Map<String, dynamic>.from`.
This resolves a bug in `package:angel_validate`. This resolves a bug in `package:angel_validate`.
# 2.0.0-alpha.9 ## 2.0.0-alpha.9
- Add `Service.map`. * Add `Service.map`.
# 2.0.0-alpha.8 ## 2.0.0-alpha.8
- No longer export HTTP-specific code from `angel_framework.dart`. * No longer export HTTP-specific code from `angel_framework.dart`.
An import of `import 'package:angel_framework/http.dart';` will be necessary in most cases now. An import of `import 'package:angel_framework/http.dart';` will be necessary in most cases now.
# 2.0.0-alpha.7 ## 2.0.0-alpha.7
- Force a tigher contract on services. They now must return `Data` on all * Force a tigher contract on services. They now must return `Data` on all
methods except for `index`, which returns a `List<Data>`. methods except for `index`, which returns a `List<Data>`.
# 2.0.0-alpha.6 ## 2.0.0-alpha.6
- Allow passing a custom `Container` to `handleContained` and co. * Allow passing a custom `Container` to `handleContained` and co.
# 2.0.0-alpha.5 ## 2.0.0-alpha.5
- `MapService` methods now explicitly return `Map<String, dynamic>`. * `MapService` methods now explicitly return `Map<String, dynamic>`.
# 2.0.0-alpha.4 ## 2.0.0-alpha.4
- Renamed `waterfall` to `chain`. * Renamed `waterfall` to `chain`.
- Renamed `Routable.service` to `Routable.findService`. * Renamed `Routable.service` to `Routable.findService`.
- Also `Routable.findHookedService`. * Also `Routable.findHookedService`.
# 2.0.0-alpha.3 ## 2.0.0-alpha.3
- Added `<Id, Data>` type parameters to `Service`. * Added `<Id, Data>` type parameters to `Service`.
- `HookedService` now follows suit, and takes a third parameter, pointing to the inner service. * `HookedService` now follows suit, and takes a third parameter, pointing to the inner service.
- `Routable.use` now uses the generic parameters added to `Service`. * `Routable.use` now uses the generic parameters added to `Service`.
- Added generic usage to `HookedServiceListener`, etc. * Added generic usage to `HookedServiceListener`, etc.
- All service methods take `Map<String, dynamic>` as `params` now. * All service methods take `Map<String, dynamic>` as `params` now.
# 2.0.0-alpha.2 ## 2.0.0-alpha.2
- Added `ResponseContext.detach`. * Added `ResponseContext.detach`.
# 2.0.0-alpha.1 ## 2.0.0-alpha.1
- Removed `Angel.injectEncoders`. * Removed `Angel.injectEncoders`.
- Added `Providers.toJson`. * Added `Providers.toJson`.
- Moved `Providers.graphql` to `Providers.graphQL`. * Moved `Providers.graphql` to `Providers.graphQL`.
- `Angel.optimizeForProduction` no longer calls `preInject`, * `Angel.optimizeForProduction` no longer calls `preInject`,
as it does not need to. as it does not need to.
- Rename `ResponseContext.enableBuffer` to `ResponseContext.useBuffer`. * Rename `ResponseContext.enableBuffer` to `ResponseContext.useBuffer`.
# 2.0.0-alpha ## 2.0.0-alpha
- Removed `random_string` dependency. * Removed `random_string` dependency.
- Moved reflection to `package:angel_container`. * Moved reflection to `package:angel_container`.
- Upgraded `package:file` to `5.0.0`. * Upgraded `package:file` to `5.0.0`.
- `ResponseContext.sendFile` now uses `package:file`. * `ResponseContext.sendFile` now uses `package:file`.
- Abandon `ContentType` in favor of `MediaType`. * Abandon `ContentType` in favor of `MediaType`.
- Changed view engine to use `Map<String, dynamic>`. * Changed view engine to use `Map<String, dynamic>`.
- Remove dependency on `package:json_god` by default. * Remove dependency on `package:json_god` by default.
- Remove dependency on `package:dart2_constant`. * Remove dependency on `package:dart2_constant`.
- Moved `lib/hooks.dart` into `package:angel_hooks`. * Moved `lib/hooks.dart` into `package:angel_hooks`.
- Moved `TypedService` into `package:angel_typed_service`. * Moved `TypedService` into `package:angel_typed_service`.
- Completely removed the `AngelBase` class. * Completely removed the `AngelBase` class.
- Removed all `@deprecated` symbols. * Removed all `@deprecated` symbols.
- `Service.toId` was renamed to `Service.parseId`; it also now uses its * `Service.toId` was renamed to `Service.parseId`; it also now uses its
single type argument to determine how to parse a value. \* In addition, this method was also made `static`. single type argument to determine how to parse a value. \* In addition, this method was also made `static`.
- `RequestContext` and `ResponseContext` are now generic, and take a * `RequestContext` and `ResponseContext` are now generic, and take a
single type argument pointing to the underlying request/response type, single type argument pointing to the underlying request/response type,
respectively. respectively.
- `RequestContext.io` and `ResponseContext.io` are now permanently * `RequestContext.io` and `ResponseContext.io` are now permanently
gone. gone.
- `HttpRequestContextImpl` and `HttpResponseContextImpl` were renamed to * `HttpRequestContextImpl` and `HttpResponseContextImpl` were renamed to
`HttpRequestContext` and `HttpResponseContext`. `HttpRequestContext` and `HttpResponseContext`.
- Lazy-parsing request bodies is now the default; `Angel.lazyParseBodies` was replaced * Lazy-parsing request bodies is now the default; `Angel.lazyParseBodies` was replaced
with `Angel.eagerParseRequestBodies`. with `Angel.eagerParseRequestBodies`.
- `Angel.storeOriginalBuffer` -> `Angel.storeRawRequestBuffers`. * `Angel.storeOriginalBuffer` -> `Angel.storeRawRequestBuffers`.
- The methods `lazyBody`, `lazyFiles`, and `lazyOriginalBuffer` on `ResponseContext` were all * The methods `lazyBody`, `lazyFiles`, and `lazyOriginalBuffer` on `ResponseContext` were all
replaced with `parseBody`, `parseUploadedFiles`, and `parseRawRequestBuffer`, respectively. replaced with `parseBody`, `parseUploadedFiles`, and `parseRawRequestBuffer`, respectively.
- Removed the synchronous equivalents of the above methods (`body`, `files`, and `originalBuffer`), * Removed the synchronous equivalents of the above methods (`body`, `files`, and `originalBuffer`),
as well as `query`. as well as `query`.
- Removed `Angel.injections` and `RequestContext.injections`. * Removed `Angel.injections` and `RequestContext.injections`.
- Removed `Angel.inject` and `RequestContext.inject`. * Removed `Angel.inject` and `RequestContext.inject`.
- Removed a dependency on `package:pool`, which also meant removing `AngelHttp.throttle`. * Removed a dependency on `package:pool`, which also meant removing `AngelHttp.throttle`.
- Remove the `RequestMiddleware` typedef; from now on, one should use `ResponseContext.end` * Remove the `RequestMiddleware` typedef; from now on, one should use `ResponseContext.end`
exclusively to close responses. exclusively to close responses.
- `waterfall` will now only accept `RequestHandler`. * `waterfall` will now only accept `RequestHandler`.
- `Routable`, and all of its subclasses, now extend `Router<RequestHandler>`, and therefore only * `Routable`, and all of its subclasses, now extend `Router<RequestHandler>`, and therefore only
take routes in the form of `FutureOr myFunc(RequestContext, ResponseContext res)`. take routes in the form of `FutureOr myFunc(RequestContext, ResponseContext res)`.
- `@Middleware` now takes an `Iterable` of `RequestHandler`s. * `@Middleware` now takes an `Iterable` of `RequestHandler`s.
- `@Expose.path` now _must_ be a `String`, not just any `Pattern`. * `@Expose.path` now _must_ be a `String`, not just any `Pattern`.
- `@Expose.middleware` now takes `Iterable<RequestHandler>`, instead of just `List`. * `@Expose.middleware` now takes `Iterable<RequestHandler>`, instead of just `List`.
- `createDynamicHandler` was renamed to `ioc`, and is now used to run IoC-aware handlers in a * `createDynamicHandler` was renamed to `ioc`, and is now used to run IoC-aware handlers in a
type-safe manner. type-safe manner.
- `RequestContext.params` is now a `Map<String, dynamic>`, rather than just a `Map`. * `RequestContext.params` is now a `Map<String, dynamic>`, rather than just a `Map`.
- Removed `RequestContext.grab`. * Removed `RequestContext.grab`.
- Removed `RequestContext.properties`. * Removed `RequestContext.properties`.
- Removed the defunct `debug` property where it still existed. * Removed the defunct `debug` property where it still existed.
- `Routable.use` now only accepts a `Service`. * `Routable.use` now only accepts a `Service`.
- Removed `Angel.createZoneForRequest`. * Removed `Angel.createZoneForRequest`.
- Removed `Angel.defaultZoneCreator`. * Removed `Angel.defaultZoneCreator`.
- Added all flags to the `Angel` constructor, ex. `Angel.eagerParseBodies`. * Added all flags to the `Angel` constructor, ex. `Angel.eagerParseBodies`.
- Fix a bug where synchronous errors in `handleRequest` would not be caught. * Fix a bug where synchronous errors in `handleRequest` would not be caught.
- `AngelHttp.useZone` now defaults to `false`. * `AngelHttp.useZone` now defaults to `false`.
- `ResponseContext` now starts in streaming mode by default; the response buffer is opt-in, * `ResponseContext` now starts in streaming mode by default; the response buffer is opt-in,
as in many cases it is unnecessary and slows down response time. as in many cases it is unnecessary and slows down response time.
- `ResponseContext.streaming` was replaced by `ResponseContext.isBuffered`. * `ResponseContext.streaming` was replaced by `ResponseContext.isBuffered`.
- Made `LockableBytesBuilder` public. * Made `LockableBytesBuilder` public.
- Removed the now-obsolete `ResponseContext.willCloseItself`. * Removed the now-obsolete `ResponseContext.willCloseItself`.
- Removed `ResponseContext.dispose`. * Removed `ResponseContext.dispose`.
- Removed the now-obsolete `ResponseContext.end`. * Removed the now-obsolete `ResponseContext.end`.
- Removed the now-obsolete `ResponseContext.releaseCorrespondingRequest`. * Removed the now-obsolete `ResponseContext.releaseCorrespondingRequest`.
- `preInject` now takes a `Reflector` as its second argument. * `preInject` now takes a `Reflector` as its second argument.
- `Angel.reflector` defaults to `const EmptyReflector()`, disabling * `Angel.reflector` defaults to `const EmptyReflector()`, disabling
reflection out-of-the-box. reflection out-of-the-box.

View file

@ -1,5 +1,6 @@
# angel3_framework # Angel3 Framework
[![version](https://img.shields.io/badge/pub-v4.0.4-brightgreen)](https://pub.dartlang.org/packages/angel3_framework)
[![version](https://img.shields.io/badge/pub-v4.1.0-brightgreen)](https://pub.dartlang.org/packages/angel3_framework)
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety) [![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
[![Gitter](https://img.shields.io/gitter/room/angel_dart/discussion)](https://gitter.im/angel_dart/discussion) [![Gitter](https://img.shields.io/gitter/room/angel_dart/discussion)](https://gitter.im/angel_dart/discussion)
@ -7,14 +8,14 @@
A high-powered HTTP server with support for dependency injection, sophisticated routing and more. A high-powered HTTP server with support for dependency injection, sophisticated routing and more.
This is the core of the [Angel](https://github.com/dukefirehawk/angel/tree/angel3) framework. This is the core of the [Angel3](https://github.com/dukefirehawk/angel/tree/angel3) framework.
To build real-world applications, please see the [homepage](https://angel-dart.dev). To build real-world applications, please see the [homepage](https://angel-dart.dev).
```dart ```dart
import 'package:angel3_container/mirrors.dart'; import 'package:angel3_container/mirrors.dart';
import 'package:angel3_framework/angel3_framework.dart'; import 'package:angel3_framework/angel3_framework.dart';
main() async { void main() async {
var app = Angel(reflector: MirrorsReflector()); var app = Angel(reflector: MirrorsReflector());
// Index route. Returns JSON. // Index route. Returns JSON.

View file

@ -13,7 +13,7 @@ import 'dart:io'
import 'package:angel3_container/angel3_container.dart'; import 'package:angel3_container/angel3_container.dart';
import 'package:http_parser/http_parser.dart'; import 'package:http_parser/http_parser.dart';
import 'package:http_server/http_server.dart'; import 'package:belatuk_http_server/belatuk_http_server.dart';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'package:mime/mime.dart'; import 'package:mime/mime.dart';
import 'package:path/path.dart' as p; import 'package:path/path.dart' as p;

View file

@ -1,5 +1,5 @@
name: angel3_framework name: angel3_framework
version: 4.0.4 version: 4.1.0
description: A high-powered HTTP server with dependency injection, routing and much more. description: A high-powered HTTP server with dependency injection, routing and much more.
homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/framework homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/framework
environment: environment:
@ -15,7 +15,7 @@ dependencies:
charcode: ^1.2.0 charcode: ^1.2.0
file: ^6.1.0 file: ^6.1.0
http_parser: ^4.0.0 http_parser: ^4.0.0
http_server: ^1.0.0 belatuk_http_server: ^2.0.0
http2: ^2.0.0 http2: ^2.0.0
logging: ^1.0.0 logging: ^1.0.0
matcher: ^0.12.10 matcher: ^0.12.10