From 0ad95600956fd9a223397c36b0aa0a18cdfb3a35 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Mon, 22 Oct 2018 11:54:41 -0400 Subject: [PATCH] Strip out HTTP --- CHANGELOG.md | 4 ++++ example/handle_error.dart | 1 + example/json.dart | 1 + example/main.dart | 1 + example/view.dart | 1 + lib/angel_framework.dart | 5 ++++- lib/src/http/http.dart | 4 ---- performance/hello/main.dart | 1 + test/accepts_test.dart | 1 + test/controller_test.dart | 1 + test/detach_test.dart | 1 + test/di_test.dart | 1 + test/encoders_buffer_test.dart | 1 + test/extension_test.dart | 1 + test/general_test.dart | 1 + test/hooked_test.dart | 1 + test/parameter_meta_test.dart | 1 + test/precontained_test.dart | 1 + test/primitives_test.dart | 1 + test/repeat_request_test.dart | 1 + test/routing_test.dart | 1 + test/serialize_test.dart | 1 + test/server_test.dart | 1 + test/services_test.dart | 1 + test/streaming_test.dart | 1 + 25 files changed, 30 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73d69b90..414c0706 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2.0.0-alpha.8 +* 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. + # 2.0.0-alpha.7 * Force a tigher contract on services. They now must return `Data` on all methods except for `index`, which returns a `List`. diff --git a/example/handle_error.dart b/example/handle_error.dart index 2e7fab11..d4e6a799 100644 --- a/example/handle_error.dart +++ b/example/handle_error.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:io'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:logging/logging.dart'; main() async { diff --git a/example/json.dart b/example/json.dart index 0fc28946..1969f510 100644 --- a/example/json.dart +++ b/example/json.dart @@ -4,6 +4,7 @@ import 'dart:isolate'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; main() async { int x = 0; diff --git a/example/main.dart b/example/main.dart index d52378fc..8beb3aea 100644 --- a/example/main.dart +++ b/example/main.dart @@ -1,5 +1,6 @@ import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:logging/logging.dart'; main() async { diff --git a/example/view.dart b/example/view.dart index b117993f..570d4a32 100644 --- a/example/view.dart +++ b/example/view.dart @@ -1,5 +1,6 @@ import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; main() async { var app = new Angel(reflector: MirrorsReflector()); diff --git a/lib/angel_framework.dart b/lib/angel_framework.dart index b9713ff5..3f63c839 100644 --- a/lib/angel_framework.dart +++ b/lib/angel_framework.dart @@ -1,5 +1,8 @@ /// An easily-extensible web server framework in Dart. library angel_framework; +export 'package:angel_http_exception/angel_http_exception.dart'; +export 'package:angel_model/angel_model.dart'; +export 'package:angel_route/angel_route.dart'; +export 'package:body_parser/body_parser.dart' show FileUploadInfo; export 'src/core/core.dart'; -export 'src/http/http.dart'; diff --git a/lib/src/http/http.dart b/lib/src/http/http.dart index 3ccd949d..d5187841 100644 --- a/lib/src/http/http.dart +++ b/lib/src/http/http.dart @@ -3,10 +3,6 @@ library angel_framework.http; import 'dart:async'; import 'dart:io'; -export 'package:angel_http_exception/angel_http_exception.dart'; -export 'package:angel_model/angel_model.dart'; -export 'package:angel_route/angel_route.dart'; -export 'package:body_parser/body_parser.dart' show FileUploadInfo; export 'angel_http.dart'; export 'controller.dart'; export 'http_request_context.dart'; diff --git a/performance/hello/main.dart b/performance/hello/main.dart index 717cc548..cb6a054f 100644 --- a/performance/hello/main.dart +++ b/performance/hello/main.dart @@ -6,6 +6,7 @@ import 'dart:io'; import 'dart:isolate'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; main() async { var isolates = []; diff --git a/test/accepts_test.dart b/test/accepts_test.dart index a7752d0b..7503f816 100644 --- a/test/accepts_test.dart +++ b/test/accepts_test.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:mock_request/mock_request.dart'; import 'package:test/test.dart'; diff --git a/test/controller_test.dart b/test/controller_test.dart index 35604b07..cc0f9f24 100644 --- a/test/controller_test.dart +++ b/test/controller_test.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:http/http.dart' as http; import 'package:mock_request/mock_request.dart'; import 'package:test/test.dart'; diff --git a/test/detach_test.dart b/test/detach_test.dart index eaa600d0..57f4d628 100644 --- a/test/detach_test.dart +++ b/test/detach_test.dart @@ -1,5 +1,6 @@ import 'dart:convert'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:mock_request/mock_request.dart'; import 'package:test/test.dart'; diff --git a/test/di_test.dart b/test/di_test.dart index e9cdbc97..70c2dc3e 100644 --- a/test/di_test.dart +++ b/test/di_test.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:angel_container/angel_container.dart'; +import 'package:angel_framework/http.dart'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; import 'package:http/http.dart' as http; diff --git a/test/encoders_buffer_test.dart b/test/encoders_buffer_test.dart index 66732c7a..0cc0ca09 100644 --- a/test/encoders_buffer_test.dart +++ b/test/encoders_buffer_test.dart @@ -5,6 +5,7 @@ import 'dart:io'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:mock_request/mock_request.dart'; import 'package:test/test.dart'; diff --git a/test/extension_test.dart b/test/extension_test.dart index 1fce7b68..23f05d77 100644 --- a/test/extension_test.dart +++ b/test/extension_test.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:mock_request/mock_request.dart'; import 'package:test/test.dart'; diff --git a/test/general_test.dart b/test/general_test.dart index 1692064b..129a3241 100644 --- a/test/general_test.dart +++ b/test/general_test.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'dart:convert'; import 'package:http/http.dart' as http; import 'package:test/test.dart'; diff --git a/test/hooked_test.dart b/test/hooked_test.dart index 2dbee135..bee62afb 100644 --- a/test/hooked_test.dart +++ b/test/hooked_test.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:http/http.dart' as http; import 'package:test/test.dart'; import 'common.dart'; diff --git a/test/parameter_meta_test.dart b/test/parameter_meta_test.dart index faa6e4b4..6b65ca70 100644 --- a/test/parameter_meta_test.dart +++ b/test/parameter_meta_test.dart @@ -3,6 +3,7 @@ import 'dart:convert'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:mock_request/mock_request.dart'; import 'package:test/test.dart'; diff --git a/test/precontained_test.dart b/test/precontained_test.dart index 22d38e79..dd2e42dd 100644 --- a/test/precontained_test.dart +++ b/test/precontained_test.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:mock_request/mock_request.dart'; import 'package:test/test.dart'; diff --git a/test/primitives_test.dart b/test/primitives_test.dart index 5d503534..c91c19b9 100644 --- a/test/primitives_test.dart +++ b/test/primitives_test.dart @@ -3,6 +3,7 @@ import 'dart:io' show stderr; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:mock_request/mock_request.dart'; import 'package:test/test.dart'; diff --git a/test/repeat_request_test.dart b/test/repeat_request_test.dart index 94d1e8a9..42af1ade 100644 --- a/test/repeat_request_test.dart +++ b/test/repeat_request_test.dart @@ -3,6 +3,7 @@ import 'dart:convert'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:mock_request/mock_request.dart'; import 'package:test/test.dart'; diff --git a/test/routing_test.dart b/test/routing_test.dart index b841fd10..c81cfca7 100644 --- a/test/routing_test.dart +++ b/test/routing_test.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:http/http.dart' as http; import 'package:io/ansi.dart'; import 'package:logging/logging.dart'; diff --git a/test/serialize_test.dart b/test/serialize_test.dart index a800dc05..b3d3ccd5 100644 --- a/test/serialize_test.dart +++ b/test/serialize_test.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:http/http.dart' as http; import 'package:http_parser/http_parser.dart'; import 'package:test/test.dart'; diff --git a/test/server_test.dart b/test/server_test.dart index a084f2aa..e0717bf0 100644 --- a/test/server_test.dart +++ b/test/server_test.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:matcher/matcher.dart'; import 'package:mock_request/mock_request.dart'; import 'package:test/test.dart'; diff --git a/test/services_test.dart b/test/services_test.dart index 45c5c585..025441ec 100644 --- a/test/services_test.dart +++ b/test/services_test.dart @@ -1,5 +1,6 @@ import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'dart:convert'; import 'package:http/http.dart' as http; import 'package:stack_trace/stack_trace.dart'; diff --git a/test/streaming_test.dart b/test/streaming_test.dart index 471c2283..a7d21d15 100644 --- a/test/streaming_test.dart +++ b/test/streaming_test.dart @@ -5,6 +5,7 @@ import 'dart:io'; import 'package:angel_container/mirrors.dart'; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:logging/logging.dart'; import 'package:mock_request/mock_request.dart'; import 'package:test/test.dart';