Resolved shelf warnings
This commit is contained in:
parent
308d6df606
commit
1708c1f870
6 changed files with 10 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
# Change Log
|
||||
|
||||
## 7.0.0
|
||||
## 7.0.0-beta.1
|
||||
|
||||
* Require Dart >= 2.17
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import 'package:angel3_mock_request/angel3_mock_request.dart';
|
|||
import 'package:shelf/shelf.dart' as shelf;
|
||||
|
||||
class ShelfRequestContext extends RequestContext {
|
||||
@override
|
||||
final Angel app;
|
||||
final Angel angelApp;
|
||||
|
||||
@override
|
||||
final Container container;
|
||||
@override
|
||||
|
@ -20,7 +20,8 @@ class ShelfRequestContext extends RequestContext {
|
|||
@override
|
||||
final MockHttpHeaders headers = MockHttpHeaders();
|
||||
|
||||
ShelfRequestContext(this.app, this.container, this.rawRequest, this.path) {
|
||||
ShelfRequestContext(
|
||||
this.angelApp, this.container, this.rawRequest, this.path) {
|
||||
rawRequest.headers.forEach(headers.add);
|
||||
}
|
||||
|
||||
|
@ -53,7 +54,7 @@ class ShelfRequestContext extends RequestContext {
|
|||
|
||||
@override
|
||||
String get method {
|
||||
if (!app.allowMethodOverrides) {
|
||||
if (!angelApp.allowMethodOverrides) {
|
||||
return originalMethod;
|
||||
} else {
|
||||
return headers.value('x-http-method-override')?.toUpperCase() ??
|
||||
|
|
|
@ -6,8 +6,7 @@ import 'package:shelf/shelf.dart' as shelf;
|
|||
import 'shelf_request.dart';
|
||||
|
||||
class ShelfResponseContext extends ResponseContext<ShelfResponseContext> {
|
||||
@override
|
||||
final Angel app;
|
||||
final Angel angelApp;
|
||||
|
||||
final StreamController<List<int>> _ctrl = StreamController();
|
||||
bool _isOpen = true;
|
||||
|
@ -15,7 +14,7 @@ class ShelfResponseContext extends ResponseContext<ShelfResponseContext> {
|
|||
final bool _wasClosedByHandler = false;
|
||||
bool _handlersAreDone = false;
|
||||
|
||||
ShelfResponseContext(this.app);
|
||||
ShelfResponseContext(this.angelApp);
|
||||
|
||||
ShelfRequestContext? _correspondingRequest;
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ version: 7.0.0-beta.1
|
|||
description: Shelf interop with Angel3. Use this to wrap existing server code.
|
||||
homepage: https://angel3-framework.web.app/
|
||||
repository: https://github.com/dukefirehawk/angel/tree/master/packages/shelf
|
||||
publish_to: none
|
||||
environment:
|
||||
sdk: '>=2.17.0 <3.0.0'
|
||||
dependencies:
|
||||
|
|
|
@ -89,7 +89,7 @@ void main() {
|
|||
print('Response: $body');
|
||||
expect(json.decode(body), {'error': 'crime'});
|
||||
} on HttpException catch (e, st) {
|
||||
print('HTTP Exception: ' + e.message);
|
||||
print('HTTP Exception: ${e.message}');
|
||||
print(st);
|
||||
rethrow;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: angel3_sync
|
||||
version: 6.0.0
|
||||
version: 7.0.0
|
||||
description: Easily synchronize and scale WebSockets using belatuk_pub_sub in Angel3.
|
||||
homepage: https://angel3-framework.web.app/
|
||||
repository: https://github.com/dukefirehawk/angel/tree/angel3/packages/sync
|
||||
|
|
Loading…
Reference in a new issue