diff --git a/packages/framework/.idea/dbnavigator.xml b/packages/framework/.idea/dbnavigator.xml
deleted file mode 100644
index 11ef66c4..00000000
--- a/packages/framework/.idea/dbnavigator.xml
+++ /dev/null
@@ -1,451 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/encodings.xml b/packages/framework/.idea/encodings.xml
deleted file mode 100644
index 97626ba4..00000000
--- a/packages/framework/.idea/encodings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/jsLibraryMappings.xml b/packages/framework/.idea/jsLibraryMappings.xml
deleted file mode 100644
index f3e502d1..00000000
--- a/packages/framework/.idea/jsLibraryMappings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/libraries/Dart_Packages.xml b/packages/framework/.idea/libraries/Dart_Packages.xml
deleted file mode 100644
index 088c8509..00000000
--- a/packages/framework/.idea/libraries/Dart_Packages.xml
+++ /dev/null
@@ -1,525 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/libraries/Dart_SDK.xml b/packages/framework/.idea/libraries/Dart_SDK.xml
deleted file mode 100644
index ed937c05..00000000
--- a/packages/framework/.idea/libraries/Dart_SDK.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/misc.xml b/packages/framework/.idea/misc.xml
deleted file mode 100644
index 1719e444..00000000
--- a/packages/framework/.idea/misc.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/modules.xml b/packages/framework/.idea/modules.xml
deleted file mode 100644
index e6494b43..00000000
--- a/packages/framework/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/All_Tests.xml b/packages/framework/.idea/runConfigurations/All_Tests.xml
deleted file mode 100644
index dcd3564d..00000000
--- a/packages/framework/.idea/runConfigurations/All_Tests.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/All_Tests__PRODUCTION_.xml b/packages/framework/.idea/runConfigurations/All_Tests__PRODUCTION_.xml
deleted file mode 100644
index 09ab904c..00000000
--- a/packages/framework/.idea/runConfigurations/All_Tests__PRODUCTION_.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/All_Tests__for_coverage_.xml b/packages/framework/.idea/runConfigurations/All_Tests__for_coverage_.xml
deleted file mode 100644
index c5727acc..00000000
--- a/packages/framework/.idea/runConfigurations/All_Tests__for_coverage_.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/Controller_Tests.xml b/packages/framework/.idea/runConfigurations/Controller_Tests.xml
deleted file mode 100644
index 16c24846..00000000
--- a/packages/framework/.idea/runConfigurations/Controller_Tests.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/DI_Tests.xml b/packages/framework/.idea/runConfigurations/DI_Tests.xml
deleted file mode 100644
index 002c3572..00000000
--- a/packages/framework/.idea/runConfigurations/DI_Tests.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/Hooked_Tests.xml b/packages/framework/.idea/runConfigurations/Hooked_Tests.xml
deleted file mode 100644
index 592565a1..00000000
--- a/packages/framework/.idea/runConfigurations/Hooked_Tests.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/Match_routes__even_with_query_params_in_routing_test_dart.xml b/packages/framework/.idea/runConfigurations/Match_routes__even_with_query_params_in_routing_test_dart.xml
deleted file mode 100644
index 3df4dee3..00000000
--- a/packages/framework/.idea/runConfigurations/Match_routes__even_with_query_params_in_routing_test_dart.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/Middleware_via_metadata_in_routing_test_dart.xml b/packages/framework/.idea/runConfigurations/Middleware_via_metadata_in_routing_test_dart.xml
deleted file mode 100644
index 41e6ad8d..00000000
--- a/packages/framework/.idea/runConfigurations/Middleware_via_metadata_in_routing_test_dart.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/Routing_Tests.xml b/packages/framework/.idea/runConfigurations/Routing_Tests.xml
deleted file mode 100644
index 3790ba95..00000000
--- a/packages/framework/.idea/runConfigurations/Routing_Tests.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/can_fetch_data_in_services_test_dart.xml b/packages/framework/.idea/runConfigurations/can_fetch_data_in_services_test_dart.xml
deleted file mode 100644
index 5dbab496..00000000
--- a/packages/framework/.idea/runConfigurations/can_fetch_data_in_services_test_dart.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/cannot_write_after_close_in_streaming_test_dart.xml b/packages/framework/.idea/runConfigurations/cannot_write_after_close_in_streaming_test_dart.xml
deleted file mode 100644
index e0ee83ca..00000000
--- a/packages/framework/.idea/runConfigurations/cannot_write_after_close_in_streaming_test_dart.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/encoding_in_encoders_buffer_test_dart.xml b/packages/framework/.idea/runConfigurations/encoding_in_encoders_buffer_test_dart.xml
deleted file mode 100644
index f13ca17d..00000000
--- a/packages/framework/.idea/runConfigurations/encoding_in_encoders_buffer_test_dart.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/encoding_in_streaming_test_dart.xml b/packages/framework/.idea/runConfigurations/encoding_in_streaming_test_dart.xml
deleted file mode 100644
index f3885511..00000000
--- a/packages/framework/.idea/runConfigurations/encoding_in_streaming_test_dart.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/handle_error_dart.xml b/packages/framework/.idea/runConfigurations/handle_error_dart.xml
deleted file mode 100644
index 5df40720..00000000
--- a/packages/framework/.idea/runConfigurations/handle_error_dart.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/injects_header_or_throws_in_parameter_meta_test_dart.xml b/packages/framework/.idea/runConfigurations/injects_header_or_throws_in_parameter_meta_test_dart.xml
deleted file mode 100644
index 92114127..00000000
--- a/packages/framework/.idea/runConfigurations/injects_header_or_throws_in_parameter_meta_test_dart.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/injects_session_or_throws_in_parameter_meta_test_dart.xml b/packages/framework/.idea/runConfigurations/injects_session_or_throws_in_parameter_meta_test_dart.xml
deleted file mode 100644
index 17a6c854..00000000
--- a/packages/framework/.idea/runConfigurations/injects_session_or_throws_in_parameter_meta_test_dart.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/json_dart.xml b/packages/framework/.idea/runConfigurations/json_dart.xml
deleted file mode 100644
index 0c6db2aa..00000000
--- a/packages/framework/.idea/runConfigurations/json_dart.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/main_dart.xml b/packages/framework/.idea/runConfigurations/main_dart.xml
deleted file mode 100644
index 750f7262..00000000
--- a/packages/framework/.idea/runConfigurations/main_dart.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/metadata_in_hooked_test_dart.xml b/packages/framework/.idea/runConfigurations/metadata_in_hooked_test_dart.xml
deleted file mode 100644
index 618cdc73..00000000
--- a/packages/framework/.idea/runConfigurations/metadata_in_hooked_test_dart.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/only_match_route_with_matching_method_in_routing_test_dart.xml b/packages/framework/.idea/runConfigurations/only_match_route_with_matching_method_in_routing_test_dart.xml
deleted file mode 100644
index f030feb7..00000000
--- a/packages/framework/.idea/runConfigurations/only_match_route_with_matching_method_in_routing_test_dart.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/performance__hello__DEV_.xml b/packages/framework/.idea/runConfigurations/performance__hello__DEV_.xml
deleted file mode 100644
index 1925a88c..00000000
--- a/packages/framework/.idea/runConfigurations/performance__hello__DEV_.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/performance__hello__PRODUCTION_.xml b/packages/framework/.idea/runConfigurations/performance__hello__PRODUCTION_.xml
deleted file mode 100644
index 56888d49..00000000
--- a/packages/framework/.idea/runConfigurations/performance__hello__PRODUCTION_.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/performance__hello__raw.xml b/packages/framework/.idea/runConfigurations/performance__hello__raw.xml
deleted file mode 100644
index a13c2280..00000000
--- a/packages/framework/.idea/runConfigurations/performance__hello__raw.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/tests_in_find_one_test_dart.xml b/packages/framework/.idea/runConfigurations/tests_in_find_one_test_dart.xml
deleted file mode 100644
index ad42b586..00000000
--- a/packages/framework/.idea/runConfigurations/tests_in_find_one_test_dart.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/tests_in_framework.xml b/packages/framework/.idea/runConfigurations/tests_in_framework.xml
deleted file mode 100644
index 4278d0e6..00000000
--- a/packages/framework/.idea/runConfigurations/tests_in_framework.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/tests_in_framework__PRODUCTION_.xml b/packages/framework/.idea/runConfigurations/tests_in_framework__PRODUCTION_.xml
deleted file mode 100644
index 263eac1e..00000000
--- a/packages/framework/.idea/runConfigurations/tests_in_framework__PRODUCTION_.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/tests_in_server_test_dart__PRODUCTION_.xml b/packages/framework/.idea/runConfigurations/tests_in_server_test_dart__PRODUCTION_.xml
deleted file mode 100644
index 06ec9c23..00000000
--- a/packages/framework/.idea/runConfigurations/tests_in_server_test_dart__PRODUCTION_.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/runConfigurations/view_dart.xml b/packages/framework/.idea/runConfigurations/view_dart.xml
deleted file mode 100644
index de62a90c..00000000
--- a/packages/framework/.idea/runConfigurations/view_dart.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/vcs.xml b/packages/framework/.idea/vcs.xml
deleted file mode 100644
index 94a25f7f..00000000
--- a/packages/framework/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/.idea/workspace.xml b/packages/framework/.idea/workspace.xml
deleted file mode 100644
index 4109bc84..00000000
--- a/packages/framework/.idea/workspace.xml
+++ /dev/null
@@ -1,1616 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- handleRe
- get container
- Parameter
- log
- mirrors
- dart:mirror
- dart:io
- _Par
- waterfall
- wtf
- errorHan
- nested
- _parent =
- headers['content
- skip
- Provi
- contentTy
- abc
- /chained
- flatten
- sendRe
- enableB
- Hooks
- Middleware
- /meta
- complet
- parseI
- read(
- as
- serviceP
-
-
- FutureOr
- var body = await getBody(rs);
-
- =
- {
- 'accept'
- 'content-type'
- 403
- (RequestContext req, res)
- headers: headers.cast<String, String>(),
- this.
- 'text/html'
- 'application/json'
- as $1
- as Map$1
- IsInstanceOf
- [Iterable]
- _foldStringDynamic(result)
- Angel(MirrorsReflector())
- json.encode
- Angel(reflector: M
- dart:convert
- dart:io
- json.decode
- rawRequest.
- rawResponse.
- ));
- req
- req.container
- close()
-
-
- C:\Users\thosa\Source\Angel\framework\lib
- C:\Users\thosa\Source\Angel\framework\lib\src\http
- C:\Users\thosa\Source\Angel\framework\test
- $PROJECT_DIR$/lib/src
- $PROJECT_DIR$/lib
- $PROJECT_DIR$/test
- $PROJECT_DIR$
- $PROJECT_DIR$/lib/src/core
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- DEFINITION_ORDER
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- project
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1481236071442
-
-
- 1481236071442
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1534732811445
-
-
-
- 1534732811445
-
-
- 1534732848038
-
-
-
- 1534732848038
-
-
- 1534732927698
-
-
-
- 1534732927698
-
-
- 1534733134792
-
-
-
- 1534733134792
-
-
- 1534733155846
-
-
-
- 1534733155846
-
-
- 1534733208240
-
-
-
- 1534733208240
-
-
- 1534733242302
-
-
-
- 1534733242302
-
-
- 1534733436519
-
-
-
- 1534733436520
-
-
- 1534733754509
-
-
-
- 1534733754509
-
-
- 1534733780470
-
-
-
- 1534733780470
-
-
- 1534734389546
-
-
-
- 1534734389546
-
-
- 1534735099537
-
-
-
- 1534735099537
-
-
- 1534735212786
-
-
-
- 1534735212787
-
-
- 1534735654118
-
-
-
- 1534735654118
-
-
- 1534735707304
-
-
-
- 1534735707304
-
-
- 1534735919739
-
-
-
- 1534735919739
-
-
- 1534736377619
-
-
-
- 1534736377619
-
-
- 1534736459394
-
-
-
- 1534736459394
-
-
- 1534736798816
-
-
-
- 1534736798816
-
-
- 1534737069329
-
-
-
- 1534737069329
-
-
- 1534738194991
-
-
-
- 1534738194991
-
-
- 1534738209023
-
-
-
- 1534738209023
-
-
- 1534794125343
-
-
-
- 1534794125343
-
-
- 1534794207777
-
-
-
- 1534794207778
-
-
- 1534794372882
-
-
-
- 1534794372882
-
-
- 1534794629985
-
-
-
- 1534794629985
-
-
- 1534794764995
-
-
-
- 1534794764995
-
-
- 1534794944288
-
-
-
- 1534794944288
-
-
- 1534795218407
-
-
-
- 1534795218407
-
-
- 1534796466854
-
-
-
- 1534796466854
-
-
- 1534797818435
-
-
-
- 1534797818435
-
-
- 1534798410411
-
-
-
- 1534798410411
-
-
- 1534798717707
-
-
-
- 1534798717707
-
-
- 1534812824990
-
-
-
- 1534812824990
-
-
- 1534813505067
-
-
-
- 1534813505067
-
-
- 1534813932227
-
-
-
- 1534813932227
-
-
- 1534814859355
-
-
-
- 1534814859355
-
-
- 1534815148128
-
-
-
- 1534815148128
-
-
- 1534815933898
-
-
-
- 1534815933898
-
-
- 1534816646962
-
-
-
- 1534816646962
-
-
- 1534819472503
-
-
-
- 1534819472503
-
-
- 1534861361523
-
-
-
- 1534861361524
-
-
- 1534861733989
-
-
-
- 1534861733990
-
-
- 1534877443455
-
-
-
- 1534877443455
-
-
- 1534877529522
-
-
-
- 1534877529522
-
-
- 1536696871863
-
-
-
- 1536696871864
-
-
- 1536697507787
-
-
-
- 1536697507787
-
-
- 1536698069495
-
-
-
- 1536698069495
-
-
- 1536698423774
-
-
-
- 1536698423774
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- No facets are configured
-
-
-
-
-
-
-
-
-
-
-
- jquery
-
-
-
-
-
-
-
-
-
-
-
- 1.8
-
-
-
-
-
-
-
-
-
-
-
- framework
-
-
-
-
-
-
-
-
-
-
-
-
- Dart SDK
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/framework/CHANGELOG.md b/packages/framework/CHANGELOG.md
index ec19e706..57e594d2 100644
--- a/packages/framework/CHANGELOG.md
+++ b/packages/framework/CHANGELOG.md
@@ -1,5 +1,10 @@
# Change Log
+## 4.1.1
+
+* Updated link to `Angel3` home page
+* Fixed pedantic warnings
+
## 4.1.0
* Replaced `http_server` with `belatuk_http_server`
diff --git a/packages/framework/README.md b/packages/framework/README.md
index 034a8515..9f8fdd26 100644
--- a/packages/framework/README.md
+++ b/packages/framework/README.md
@@ -1,15 +1,14 @@
# Angel3 Framework
-[![version](https://img.shields.io/badge/pub-v4.1.0-brightgreen)](https://pub.dartlang.org/packages/angel3_framework)
+[![version](https://img.shields.io/badge/pub-v4.1.1-brightgreen)](https://pub.dartlang.org/packages/angel3_framework)
[![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)
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/framework/LICENSE)
-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. Angel3 is designed to keep the core minimal but extensible. Angel3 won't dictate which database or web templating engine to use. Everything is customizable, so that Angel3 can grow to support your application as your use cases increases in complexity.
-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).
+This is the core of the [Angel3](https://github.com/dukefirehawk/angel/tree/angel3) framework. To build real-world applications, please see the [User Guide](https://angel3-docs.dukefirehawk.com).
```dart
import 'package:angel3_container/mirrors.dart';
@@ -19,7 +18,7 @@ void main() async {
var app = Angel(reflector: MirrorsReflector());
// Index route. Returns JSON.
- app.get('/', (req, res) => res.write('Welcome to Angel!'));
+ app.get('/', (req, res) => res.write('Welcome to Angel3!'));
// Accepts a URL like /greet/foo or /greet/bob.
app.get(
diff --git a/packages/framework/TODO.md b/packages/framework/TODO.md
index ab388e20..bdb4dbef 100644
--- a/packages/framework/TODO.md
+++ b/packages/framework/TODO.md
@@ -1,8 +1,8 @@
-* Migrate http_server to shelf
+# TO DO
+
+* Remove dependency on http_server
* Support for [Trestle](https://github.com/dart-bridge/trestle), use this as default, set up migration system around this
* Angel CLI
* Angel bootstrap project
* More docs
* Make tutorials, videos
-* Launch!
-* Get a nice launch process, so we can pre-compile things before running. Also support a sort of hot-reload
diff --git a/packages/framework/example/controller.dart b/packages/framework/example/controller.dart
index d4de54d6..7cebbbb4 100644
--- a/packages/framework/example/controller.dart
+++ b/packages/framework/example/controller.dart
@@ -37,7 +37,7 @@ class ArtistsController extends Controller {
}
@Expose.post
- form(RequestContext req) async {
+ Future form(RequestContext req) async {
// Deserialize the body into an artist.
var artist = await req.deserializeBody((m) {
return Artist(name: m!['name'] as String? ?? '(unknown name)');
diff --git a/packages/framework/example/http2/body_parsing.dart b/packages/framework/example/http2/body_parsing.dart
index 92bb9a25..bdb5052b 100644
--- a/packages/framework/example/http2/body_parsing.dart
+++ b/packages/framework/example/http2/body_parsing.dart
@@ -41,6 +41,6 @@ void main() async {
// HTTP/1.x requests will fallback to `AngelHttp`
http2.onHttp1.listen(http1.handleRequest);
- SecureServerSocket server = await http2.startServer('127.0.0.1', 3000);
+ var server = await http2.startServer('127.0.0.1', 3000);
print('Listening at https://${server.address.address}:${server.port}');
}
diff --git a/packages/framework/example/http2/pretty_logging.dart b/packages/framework/example/http2/pretty_logging.dart
deleted file mode 100644
index 14f55e3f..00000000
--- a/packages/framework/example/http2/pretty_logging.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-import 'package:logging/logging.dart';
-
-/// Prints the contents of a [LogRecord] with pretty colors.
-void prettyLog(LogRecord record) {
- print(record.toString());
-
- if (record.error != null) print(record.error.toString());
- if (record.stackTrace != null) print(record.stackTrace.toString());
-}
diff --git a/packages/framework/example/http2/server_push.dart b/packages/framework/example/http2/server_push.dart
index e73c862d..4123e7b6 100644
--- a/packages/framework/example/http2/server_push.dart
+++ b/packages/framework/example/http2/server_push.dart
@@ -57,6 +57,6 @@ void main() async {
// HTTP/1.x requests will fallback to `AngelHttp`
http2.onHttp1.listen(http1.handleRequest);
- SecureServerSocket server = await http2.startServer('127.0.0.1', 3000);
+ var server = await http2.startServer('127.0.0.1', 3000);
print('Listening at https://${server.address.address}:${server.port}');
}
diff --git a/packages/framework/example/json.dart b/packages/framework/example/json.dart
index 4a820273..4ca5767a 100644
--- a/packages/framework/example/json.dart
+++ b/packages/framework/example/json.dart
@@ -5,10 +5,10 @@ import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_framework/http.dart';
void main() async {
- int x = 0;
+ var x = 0;
var c = Completer();
var exit = ReceivePort();
- List isolates = [];
+ var isolates = [];
exit.listen((_) {
if (++x >= 50) {
@@ -16,7 +16,7 @@ void main() async {
}
});
- for (int i = 1; i < Platform.numberOfProcessors; i++) {
+ for (var i = 1; i < Platform.numberOfProcessors; i++) {
var isolate = await Isolate.spawn(serverMain, null);
isolates.add(isolate);
print('Spawned isolate #${i + 1}...');
@@ -30,16 +30,16 @@ void main() async {
await c.future;
}
-serverMain(_) async {
+void serverMain(_) async {
var app = Angel();
var http =
AngelHttp.custom(app, startShared, useZone: false); // Run a cluster
app.get('/', (req, res) {
return res.serialize({
- "foo": "bar",
- "one": [2, "three"],
- "bar": {"baz": "quux"}
+ 'foo': 'bar',
+ 'one': [2, 'three'],
+ 'bar': {'baz': 'quux'}
});
});
@@ -48,6 +48,6 @@ serverMain(_) async {
print(e.stackTrace);
};
- HttpServer server = await http.startServer('127.0.0.1', 3000);
+ var server = await http.startServer('127.0.0.1', 3000);
print('Listening at http://${server.address.address}:${server.port}');
}
diff --git a/packages/framework/example/main.dart b/packages/framework/example/main.dart
index a2a382ef..f0f7f3e2 100644
--- a/packages/framework/example/main.dart
+++ b/packages/framework/example/main.dart
@@ -49,7 +49,7 @@ void main() async {
});
var http = AngelHttp(app);
- HttpServer server = await http.startServer('127.0.0.1', 3000);
+ var server = await http.startServer('127.0.0.1', 3000);
var url = 'http://${server.address.address}:${server.port}';
print('Listening at $url');
print('Visit these pages to see Angel in action:');
diff --git a/packages/framework/example/view.dart b/packages/framework/example/view.dart
index 8502c4b6..dfac7d06 100644
--- a/packages/framework/example/view.dart
+++ b/packages/framework/example/view.dart
@@ -14,7 +14,7 @@ void main() async {
app.get('/', (req, res) => res.render('index', {'foo': 'bar'}));
var http = AngelHttp(app);
- HttpServer server = await http.startServer('127.0.0.1', 3000);
+ var server = await http.startServer('127.0.0.1', 3000);
var url = 'http://${server.address.address}:${server.port}';
print('Listening at $url');
}
diff --git a/packages/framework/lib/src/core/anonymous_service.dart b/packages/framework/lib/src/core/anonymous_service.dart
index a4c9e471..6c6c3ef1 100644
--- a/packages/framework/lib/src/core/anonymous_service.dart
+++ b/packages/framework/lib/src/core/anonymous_service.dart
@@ -33,30 +33,32 @@ class AnonymousService extends Service {
}
@override
- index([Map? params]) =>
+ Future> index([Map? params]) =>
Future.sync(() => _index != null ? _index!(params) : super.index(params));
@override
- read(Id id, [Map? params]) => Future.sync(
+ Future read(Id id, [Map? params]) => Future.sync(
() => _read != null ? _read!(id, params) : super.read(id, params));
@override
- create(Data data, [Map? params]) => Future.sync(() =>
- _create != null ? _create!(data, params) : super.create(data, params));
+ Future create(Data data, [Map? params]) =>
+ Future.sync(() => _create != null
+ ? _create!(data, params)
+ : super.create(data, params));
@override
- modify(Id id, Data data, [Map? params]) =>
+ Future modify(Id id, Data data, [Map? params]) =>
Future.sync(() => _modify != null
? _modify!(id, data, params)
: super.modify(id, data, params));
@override
- update(Id id, Data data, [Map? params]) =>
+ Future update(Id id, Data data, [Map? params]) =>
Future.sync(() => _update != null
? _update!(id, data, params)
: super.update(id, data, params));
@override
- remove(Id id, [Map? params]) => Future.sync(
+ Future remove(Id id, [Map? params]) => Future.sync(
() => _remove != null ? _remove!(id, params) : super.remove(id, params));
}
diff --git a/packages/framework/lib/src/core/controller.dart b/packages/framework/lib/src/core/controller.dart
index fd29b0de..62cdcc46 100644
--- a/packages/framework/lib/src/core/controller.dart
+++ b/packages/framework/lib/src/core/controller.dart
@@ -51,10 +51,10 @@ class Controller {
Router router, Reflector reflector) async {
// Load global expose decl
var classMirror = reflector.reflectClass(runtimeType)!;
- Expose? exposeDecl = findExpose(reflector);
+ var exposeDecl = findExpose(reflector);
if (exposeDecl == null) {
- throw Exception("All controllers must carry an @Expose() declaration.");
+ throw Exception('All controllers must carry an @Expose() declaration.');
}
var routable = Routable();
@@ -64,9 +64,7 @@ class Controller {
// Pre-reflect methods
var instanceMirror = reflector.reflectInstance(this);
- final handlers = []
- ..addAll(exposeDecl.middleware!)
- ..addAll(middleware);
+ final handlers = [...exposeDecl.middleware!, ...middleware];
final routeBuilder =
_routeBuilder(reflector, instanceMirror, routable, handlers);
await configureRoutes(routable);
@@ -109,10 +107,11 @@ class Controller {
var reflectedMethod =
instanceMirror!.getField(methodName).reflectee as Function?;
- var middleware = []
- ..addAll(handlers)
- ..addAll(exposeDecl.middleware!);
- String? name =
+ var middleware = [
+ ...handlers,
+ ...exposeDecl.middleware!
+ ];
+ var name =
exposeDecl.as?.isNotEmpty == true ? exposeDecl.as : methodName;
// Check if normal
diff --git a/packages/framework/lib/src/core/driver.dart b/packages/framework/lib/src/core/driver.dart
index 37432379..c22c999b 100644
--- a/packages/framework/lib/src/core/driver.dart
+++ b/packages/framework/lib/src/core/driver.dart
@@ -71,8 +71,8 @@ abstract class Driver<
return Future.value(_server);
});
}).catchError((error) {
- log.severe("Failed to create server", error);
- throw ArgumentError("[Driver]Failed to create server");
+ log.severe('Failed to create server', error);
+ throw ArgumentError('[Driver]Failed to create server');
});
}
@@ -125,7 +125,7 @@ abstract class Driver<
Future handleRawRequest(Request request, Response response) {
return createRequestContext(request, response).then((req) {
return createResponseContext(request, response, req).then((res) {
- handle() {
+ Future handle() {
var path = req.path;
if (path == '/') path = '';
@@ -334,7 +334,7 @@ abstract class Driver<
if (!res.isBuffered) return res.close().then(_cleanup);
- Future finalizers = ignoreFinalizers == true
+ var finalizers = ignoreFinalizers == true
? Future.value()
: Future.forEach(app.responseFinalizers, (dynamic f) => f(req, res));
@@ -366,7 +366,7 @@ abstract class Driver<
if (allowedEncodings != null) {
for (var encodingName in allowedEncodings) {
Converter, List>? encoder;
- String key = encodingName;
+ var key = encodingName;
if (res.encoders.containsKey(encodingName)) {
encoder = res.encoders[encodingName];
diff --git a/packages/framework/lib/src/core/hooked_service.dart b/packages/framework/lib/src/core/hooked_service.dart
index cb21e815..9b70723a 100644
--- a/packages/framework/lib/src/core/hooked_service.dart
+++ b/packages/framework/lib/src/core/hooked_service.dart
@@ -96,7 +96,8 @@ class HookedService>
/// Adds hooks to this instance.
void addHooks(Angel app) {
var hooks = getAnnotation(inner, app.container!.reflector);
- List> before = [], after = [];
+ var before = >[];
+ var after = >[];
if (hooks != null) {
before.addAll(hooks.before.cast());
@@ -106,9 +107,10 @@ class HookedService>
void applyListeners(
Function fn, HookedServiceEventDispatcher dispatcher,
[bool? isAfter]) {
- Hooks? hooks = getAnnotation(fn, app.container!.reflector);
- final listeners = >[]
- ..addAll(isAfter == true ? after : before);
+ var hooks = getAnnotation(fn, app.container!.reflector);
+ final listeners = >[
+ ...isAfter == true ? after : before
+ ];
if (hooks != null) {
listeners.addAll((isAfter == true ? hooks.after : hooks.before).cast());
diff --git a/packages/framework/lib/src/core/hostname_parser.dart b/packages/framework/lib/src/core/hostname_parser.dart
index 8394b671..627e2397 100644
--- a/packages/framework/lib/src/core/hostname_parser.dart
+++ b/packages/framework/lib/src/core/hostname_parser.dart
@@ -4,7 +4,7 @@ import 'package:string_scanner/string_scanner.dart';
/// Parses a string into a [RegExp] that is matched against hostnames.
class HostnameSyntaxParser {
final SpanScanner _scanner;
- final _safe = RegExp(r"[0-9a-zA-Z-_:]+");
+ final _safe = RegExp(r'[0-9a-zA-Z-_:]+');
HostnameSyntaxParser(String hostname)
: _scanner = SpanScanner(hostname, sourceUrl: hostname);
@@ -33,7 +33,7 @@ class HostnameSyntaxParser {
}
}
} else {
- String part = _parseHostnamePart();
+ var part = _parseHostnamePart();
if (part.isNotEmpty) {
if (_scanner.scan('.')) {
var subPart = _parseHostnamePart(shouldThrow: false);
@@ -70,12 +70,12 @@ class HostnameSyntaxParser {
} else if (_scanner.scan('+')) {
return r'[^$]+';
} else if (_scanner.scan(_safe)) {
- return _scanner.lastMatch?[0] ?? "";
+ return _scanner.lastMatch?[0] ?? '';
} else if (!_scanner.isDone && shouldThrow) {
var s = String.fromCharCode(_scanner.peekChar()!);
throw _formatExc('Unexpected character "$s".');
} else {
- return "";
+ return '';
}
}
}
diff --git a/packages/framework/lib/src/core/injection.dart b/packages/framework/lib/src/core/injection.dart
index d5268a01..fce2a249 100644
--- a/packages/framework/lib/src/core/injection.dart
+++ b/packages/framework/lib/src/core/injection.dart
@@ -12,8 +12,7 @@ RequestHandler ioc(Function handler, {Iterable optional = const []}) {
RequestHandler? contained;
if (req.app?.container != null) {
- InjectionRequest injection =
- preInject(handler, req.app!.container!.reflector);
+ var injection = preInject(handler, req.app!.container!.reflector);
//if (injection != null) {
injection.optional.addAll(optional);
contained = handleContained(handler, injection);
@@ -104,9 +103,9 @@ RequestHandler handleContained(Function handler, InjectionRequest injection,
injection.parameters.values.any((p) => p.match != null) &&
!suitableForInjection(req, res, injection)) return Future.value(true);
- List args = [];
+ var args = [];
- Map named = {};
+ var named = {};
for (var r in injection.required) {
args.add(await resolveInjection(r, injection, req, res, true, container));
diff --git a/packages/framework/lib/src/core/metadata.dart b/packages/framework/lib/src/core/metadata.dart
index f2ee7b04..4d8004ee 100644
--- a/packages/framework/lib/src/core/metadata.dart
+++ b/packages/framework/lib/src/core/metadata.dart
@@ -58,7 +58,7 @@ class Expose {
head = Expose(null, method: 'HEAD');
const Expose(this.path,
- {this.method = "GET",
+ {this.method = 'GET',
this.middleware = const [],
this.as,
this.allowNull = const []});
@@ -101,7 +101,7 @@ class Parameter {
this.required});
/// Returns an error that can be thrown when the parameter is not present.
- get error {
+ Object? get error {
if (cookie?.isNotEmpty == true) {
return AngelHttpException.badRequest(
message: 'Missing required cookie "$cookie".');
@@ -120,7 +120,7 @@ class Parameter {
}
/// Obtains a value for this parameter from a [RequestContext].
- getValue(RequestContext req) {
+ dynamic getValue(RequestContext req) {
if (cookie?.isNotEmpty == true) {
return req.cookies.firstWhere((c) => c.name == cookie).value;
}
diff --git a/packages/framework/lib/src/core/request_context.dart b/packages/framework/lib/src/core/request_context.dart
index c9b0f5ad..520df530 100644
--- a/packages/framework/lib/src/core/request_context.dart
+++ b/packages/framework/lib/src/core/request_context.dart
@@ -31,7 +31,7 @@ part 'injection.dart';
abstract class RequestContext {
/// Similar to [Angel.shutdownHooks], allows for logic to be executed
/// when a [RequestContext] is done being processed.
- final log = Logger('RequestContext');
+ final _log = Logger('RequestContext');
final List Function()> shutdownHooks = [];
@@ -43,7 +43,7 @@ abstract class RequestContext {
Map _bodyFields = {};
List _bodyList = [];
List _uploadedFiles = [];
- MediaType _contentType = MediaType("text", "plain");
+ MediaType _contentType = MediaType('text', 'plain');
/// The underlying [RawRequest] provided by the driver.
RawRequest get rawRequest;
@@ -86,7 +86,7 @@ abstract class RequestContext {
try {
_contentType = MediaType.parse(headers!.contentType.toString());
} catch (e) {
- log.warning(
+ _log.warning(
'Invalid media type [${headers!.contentType.toString()}]', e);
}
}
@@ -101,7 +101,7 @@ abstract class RequestContext {
/// Is this an **XMLHttpRequest**?
bool get isXhr {
- return headers?.value("X-Requested-With")?.trim().toLowerCase() ==
+ return headers?.value('X-Requested-With')?.trim().toLowerCase() ==
'xmlhttprequest';
}
@@ -221,6 +221,7 @@ abstract class RequestContext {
// Change to assert
if (contentTypeString == null) {
+ _log.severe('RequestContext.accepts is null');
throw ArgumentError(
'RequestContext.accepts expects the `contentType` parameter to NOT be null.');
}
@@ -259,9 +260,7 @@ abstract class RequestContext {
if (!_hasParsedBody) {
_hasParsedBody = true;
- var contentBody = body;
- //TODO: Relook at this
- contentBody ??= Stream.empty();
+ var contentBody = body ?? Stream.empty();
if (contentType.type == 'application' && contentType.subtype == 'json') {
_uploadedFiles = [];
@@ -332,7 +331,7 @@ class UploadedFile {
final HttpMultipartFormData formData;
final log = Logger('UploadedFile');
- MediaType _contentType = MediaType("multipart", "form-data");
+ MediaType _contentType = MediaType('multipart', 'form-data');
UploadedFile(this.formData);
diff --git a/packages/framework/lib/src/core/response_context.dart b/packages/framework/lib/src/core/response_context.dart
index 1c7ff9a3..850c3037 100644
--- a/packages/framework/lib/src/core/response_context.dart
+++ b/packages/framework/lib/src/core/response_context.dart
@@ -146,7 +146,7 @@ abstract class ResponseContext
Future download(File file, {String? filename}) async {
if (!isOpen) throw closed();
- headers["Content-Disposition"] =
+ headers['Content-Disposition'] =
'attachment; filename="${filename ?? file.path}"';
contentType = MediaType.parse(lookupMimeType(file.path)!);
headers['content-length'] = file.lengthSync().toString();
@@ -179,10 +179,10 @@ abstract class ResponseContext
///
/// You can override the [contentType] sent; by default it is `application/javascript`.
Future jsonp(value,
- {String callbackName = "callback", MediaType? contentType}) {
+ {String callbackName = 'callback', MediaType? contentType}) {
if (!isOpen) throw closed();
this.contentType = contentType ?? MediaType('application', 'javascript');
- write("$callbackName(${serializer(value)})");
+ write('$callbackName(${serializer(value)})');
return close();
}
@@ -238,7 +238,7 @@ abstract class ResponseContext
Future redirectTo(String name, [Map? params, int? code]) async {
if (!isOpen) throw closed();
Route? _findRoute(Router r) {
- for (Route route in r.routes) {
+ for (var route in r.routes) {
if (route is SymlinkRoute) {
final m = _findRoute(route.router);
@@ -249,7 +249,7 @@ abstract class ResponseContext
return null;
}
- Route? matched = _findRoute(app!);
+ var matched = _findRoute(app!);
if (matched != null) {
await redirect(
@@ -267,21 +267,20 @@ abstract class ResponseContext
Future redirectToAction(String action, [Map? params, int? code]) {
if (!isOpen) throw closed();
// UserController@show
- List split = action.split("@");
+ var split = action.split('@');
if (split.length < 2) {
throw Exception(
"Controller redirects must take the form of 'Controller@action'. You gave: $action");
}
- Controller? controller =
- app!.controllers[split[0].replaceAll(_straySlashes, '')];
+ var controller = app!.controllers[split[0].replaceAll(_straySlashes, '')];
if (controller == null) {
throw Exception("Could not find a controller named '${split[0]}'");
}
- Route? matched = controller.routeMappings[split[1]];
+ var matched = controller.routeMappings[split[1]];
if (matched == null) {
throw Exception(
@@ -293,7 +292,7 @@ abstract class ResponseContext
.path
.toString()
.replaceAll(_straySlashes, '');
- String tail = "";
+ var tail = '';
if (params != null) {
tail = matched
.makeUri(params.keys.fold