Updated package framework
This commit is contained in:
parent
fb00912c5f
commit
b7728bc761
8 changed files with 49 additions and 40 deletions
|
@ -1,8 +1,11 @@
|
||||||
# 2.3.0
|
# 2.3.0
|
||||||
|
* Changed Dart SDK requirements for all packages to ">=2.10.0 <3.0.0"
|
||||||
* Upgrade angel_http_exception to 1.3.0
|
* Upgrade angel_http_exception to 1.3.0
|
||||||
* Upgrade angel_cli to 2.3.0. Rename not working.
|
* Upgrade angel_cli to 2.3.0. Rename not working.
|
||||||
* Upgrade angel_route to 3.3.0
|
* Upgrade angel_route to 3.3.0
|
||||||
* Upgrade angel_model to 1.3.0
|
* Upgrade angel_model to 1.3.0
|
||||||
|
* Upgrade angel_container to 1.3.0
|
||||||
|
* Upgrade angel_framework to 2.3.0
|
||||||
|
|
||||||
|
|
||||||
# 2.2.0
|
# 2.2.0
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
name: angel_container
|
name: angel_container
|
||||||
version: 1.1.0
|
version: 1.3.0
|
||||||
author: Tobe O <thosakwe@gmail.com>
|
author: Tobe O <thosakwe@gmail.com>
|
||||||
description: A hierarchical DI container, and pluggable backends for reflection.
|
description: A hierarchical DI container, and pluggable backends for reflection.
|
||||||
homepage: https://github.com/angel-dart/container.git
|
homepage: https://github.com/angel-dart/container.git
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.10.0 <2.12.0"
|
sdk: ">=2.10.0 <3.0.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
collection: ^1.14.13
|
collection: ^1.15.0
|
||||||
quiver: ^2.1.5
|
quiver: ^2.1.5
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
pedantic: ^1.9.2
|
pedantic: ^1.11.0
|
||||||
test: ^1.15.7
|
test: ^1.16.5
|
|
@ -2,7 +2,6 @@ import 'dart:async';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel_framework/angel_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel_framework/http.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:pretty_logging/pretty_logging.dart';
|
|
||||||
|
|
||||||
Future<void> apiConfigurer(Angel app) async {
|
Future<void> apiConfigurer(Angel app) async {
|
||||||
app.get('/', (req, res) => 'Hello, API!');
|
app.get('/', (req, res) => 'Hello, API!');
|
||||||
|
@ -18,7 +17,7 @@ Future<void> frontendConfigurer(Angel app) async {
|
||||||
main() async {
|
main() async {
|
||||||
// Logging set up/boilerplate
|
// Logging set up/boilerplate
|
||||||
hierarchicalLoggingEnabled = true;
|
hierarchicalLoggingEnabled = true;
|
||||||
Logger.root.onRecord.listen(prettyLog);
|
//Logger.root.onRecord.listen(prettyLog);
|
||||||
|
|
||||||
var app = Angel(logger: Logger('angel'));
|
var app = Angel(logger: Logger('angel'));
|
||||||
var http = AngelHttp(app);
|
var http = AngelHttp(app);
|
||||||
|
|
|
@ -2,11 +2,10 @@ import 'package:angel_container/mirrors.dart';
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel_framework/angel_framework.dart';
|
||||||
import 'package:angel_framework/http.dart';
|
import 'package:angel_framework/http.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:pretty_logging/pretty_logging.dart';
|
|
||||||
|
|
||||||
main() async {
|
main() async {
|
||||||
// Logging set up/boilerplate
|
// Logging set up/boilerplate
|
||||||
Logger.root.onRecord.listen(prettyLog);
|
//Logger.root.onRecord.listen(prettyLog);
|
||||||
|
|
||||||
// Create our server.
|
// Create our server.
|
||||||
var app = Angel(
|
var app = Angel(
|
||||||
|
|
|
@ -1,41 +1,48 @@
|
||||||
name: angel_framework
|
name: angel_framework
|
||||||
version: 2.1.1
|
version: 2.3.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.
|
||||||
author: Tobe O <thosakwe@gmail.com>
|
author: Tobe O <thosakwe@gmail.com>
|
||||||
homepage: https://github.com/angel-dart/angel_framework
|
homepage: https://github.com/angel-dart/angel_framework
|
||||||
|
publish_to: none
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.10.0 <2.12.0"
|
sdk: ">=2.10.0 <3.0.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
angel_container: # ^1.0.4
|
angel_container: ^1.3.0
|
||||||
path: ../container/angel_container
|
angel_http_exception: ^1.3.0
|
||||||
angel_http_exception: #^1.0.0
|
angel_model: ^1.3.0
|
||||||
path: ../http_exception
|
angel_route: ^3.3.0
|
||||||
angel_model: #^1.0.0
|
|
||||||
path: ../model
|
|
||||||
angel_route: #^3.0.0
|
|
||||||
path: ../route
|
|
||||||
charcode: ^1.0.0
|
charcode: ^1.0.0
|
||||||
combinator: ^1.0.0
|
combinator: ^1.0.0
|
||||||
file: ^5.0.0
|
file: ^6.1.0
|
||||||
http_parser: ^3.0.0
|
http_parser: ^4.0.0
|
||||||
http_server: ^0.9.0
|
http_server: ^0.9.0
|
||||||
http2: "^1.0.0"
|
http2: ^2.0.0
|
||||||
logging: ">=0.11.3 <1.0.0"
|
logging: ^1.0.0
|
||||||
matcher: ^0.12.0
|
matcher: ^0.12.0
|
||||||
merge_map: ^1.0.0
|
merge_map: ^1.0.0
|
||||||
meta: ^1.0.0
|
meta: ^1.0.0
|
||||||
mime: ^0.9.3
|
mime: ^0.9.0
|
||||||
mock_request: ^1.0.0
|
mock_request: ^1.0.0
|
||||||
path: ^1.0.0
|
path: ^1.0.0
|
||||||
# pedantic: ^1.0.0
|
# pedantic: ^1.0.0
|
||||||
quiver_hashcode: ^2.0.0
|
quiver_hashcode: ^2.0.0
|
||||||
recase: ^2.0.0
|
recase: ^3.0.1
|
||||||
stack_trace: ^1.0.0
|
stack_trace: ^1.0.0
|
||||||
string_scanner: ^1.0.0
|
string_scanner: ^1.0.0
|
||||||
tuple: ^1.0.0
|
tuple: ^1.0.3
|
||||||
uuid: ^2.0.0-rc.1
|
uuid: ^3.0.1
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
http: ^0.12.0
|
http: ^0.13.0
|
||||||
io: ^0.3.0
|
io: ^1.0.0
|
||||||
pretty_logging: ^1.0.0
|
#pretty_logging: ^1.0.0
|
||||||
test: ^1.15.7
|
test: ^1.15.7
|
||||||
|
dependency_overrides:
|
||||||
|
angel_route:
|
||||||
|
path: ../route
|
||||||
|
angel_http_exception:
|
||||||
|
path: ../http_exception
|
||||||
|
angel_model:
|
||||||
|
path: ../model
|
||||||
|
angel_container:
|
||||||
|
path: ../container/angel_container
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ main() {
|
||||||
|
|
||||||
test("middleware", () async {
|
test("middleware", () async {
|
||||||
var rgx = RegExp("^Hello, world!");
|
var rgx = RegExp("^Hello, world!");
|
||||||
var response = await client.get("$url/todos/0");
|
var response = await client.get(Uri.parse("$url/todos/0"));
|
||||||
print('Response: ${response.body}');
|
print('Response: ${response.body}');
|
||||||
|
|
||||||
expect(rgx.firstMatch(response.body)?.start, equals(0));
|
expect(rgx.firstMatch(response.body)?.start, equals(0));
|
||||||
|
@ -152,7 +152,7 @@ main() {
|
||||||
|
|
||||||
test("controller in group", () async {
|
test("controller in group", () async {
|
||||||
var rgx = RegExp("^Hello, world!");
|
var rgx = RegExp("^Hello, world!");
|
||||||
var response = await client.get("$url/ctrl_group/todos/0");
|
var response = await client.get(Uri.parse("$url/ctrl_group/todos/0"));
|
||||||
print('Response: ${response.body}');
|
print('Response: ${response.body}');
|
||||||
|
|
||||||
expect(rgx.firstMatch(response.body)?.start, equals(0));
|
expect(rgx.firstMatch(response.body)?.start, equals(0));
|
||||||
|
@ -164,7 +164,7 @@ main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("named actions", () async {
|
test("named actions", () async {
|
||||||
var response = await client.get("$url/redirect");
|
var response = await client.get(Uri.parse("$url/redirect"));
|
||||||
print('Response: ${response.body}');
|
print('Response: ${response.body}');
|
||||||
expect(response.body, equals("Hello, \"world!\""));
|
expect(response.body, equals("Hello, \"world!\""));
|
||||||
});
|
});
|
||||||
|
|
|
@ -71,32 +71,33 @@ main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("singleton in route", () async {
|
test("singleton in route", () async {
|
||||||
validateTodoSingleton(await client.get("$url/errands"));
|
validateTodoSingleton(await client.get(Uri.parse("$url/errands")));
|
||||||
});
|
});
|
||||||
|
|
||||||
test("singleton in controller", () async {
|
test("singleton in controller", () async {
|
||||||
validateTodoSingleton(await client.get("$url/errands2"));
|
validateTodoSingleton(await client.get(Uri.parse("$url/errands2")));
|
||||||
});
|
});
|
||||||
|
|
||||||
test("make in route", () async {
|
test("make in route", () async {
|
||||||
var response = await client.get("$url/errands3");
|
var response = await client.get(Uri.parse("$url/errands3"));
|
||||||
var text = await json.decode(response.body) as String;
|
var text = await json.decode(response.body) as String;
|
||||||
expect(text, equals(TEXT));
|
expect(text, equals(TEXT));
|
||||||
});
|
});
|
||||||
|
|
||||||
test("make in controller", () async {
|
test("make in controller", () async {
|
||||||
var response = await client.get("$url/errands4");
|
var response = await client.get(Uri.parse("$url/errands4"));
|
||||||
var text = await json.decode(response.body) as String;
|
var text = await json.decode(response.body) as String;
|
||||||
expect(text, equals(TEXT));
|
expect(text, equals(TEXT));
|
||||||
});
|
});
|
||||||
|
|
||||||
test('resolve from future in controller', () async {
|
test('resolve from future in controller', () async {
|
||||||
var response = await client.post('$url/errands4/async', body: 'hey');
|
var response =
|
||||||
|
await client.post(Uri.parse('$url/errands4/async'), body: 'hey');
|
||||||
expect(response.body, json.encode({'bar': 'hey'}));
|
expect(response.body, json.encode({'bar': 'hey'}));
|
||||||
});
|
});
|
||||||
|
|
||||||
test('resolve from future in route', () async {
|
test('resolve from future in route', () async {
|
||||||
var response = await client.post('$url/async', body: 'yes');
|
var response = await client.post(Uri.parse('$url/async'), body: 'yes');
|
||||||
expect(response.body, json.encode({'baz': 'yes'}));
|
expect(response.body, json.encode({'baz': 'yes'}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ name: angel_model
|
||||||
version: 1.3.0
|
version: 1.3.0
|
||||||
description: Angel's basic data model class, no longer with the added weight of the whole framework.
|
description: Angel's basic data model class, no longer with the added weight of the whole framework.
|
||||||
author: Tobe O <thosakwe@gmail.com>
|
author: Tobe O <thosakwe@gmail.com>
|
||||||
homepage: https://github.com/angel-dart/model
|
homepage: https://github.com/dukefirehawk/angel/packages/model
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.10.0 <3.0.0"
|
sdk: ">=2.10.0 <3.0.0"
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
|
Loading…
Reference in a new issue