Published 8.0.0

This commit is contained in:
thomashii 2023-06-10 12:10:21 +08:00
parent b83adcd51a
commit d6960acfbf
59 changed files with 669 additions and 631 deletions

View file

@ -34,8 +34,8 @@
* Updated: angel3_orm_mysql * Updated: angel3_orm_mysql
* Updated: angel3_orm_service * Updated: angel3_orm_service
* Updated: angel3_orm_test * Updated: angel3_orm_test
* Updated: angel3_orm_cache * Updated: angel3_cache
* Updated: angel3_orm_cors * Updated: angel3_cors
* Updated: angel3_mustache * Updated: angel3_mustache
* Updated: angel3_proxy * Updated: angel3_proxy
* Updated: angel3_redis * Updated: angel3_redis

View file

@ -55,18 +55,14 @@ Branch: `master`
For more details, checkout [Project Status](https://github.com/dukefirehawk/angel/wiki/Project-Status) For more details, checkout [Project Status](https://github.com/dukefirehawk/angel/wiki/Project-Status)
### Next Release 8.0.0
* Branch: `feature/v8`
* Update all `angel3_` packages to require dart >= 3.0.x
* Resolve issues related to generated container
* Improve HTTP and ORM performance
* Improve ORM for MySQL
* Add cache support in ORM (using Redis)
## Release Notes ## Release Notes
### Release 7.0.0 (Current) ### Release 8.0.0 (Current)
* Update all `angel3_` packages to require dart >= 3.0.x
* Resolve issues related to generated container
### Release 7.0.0
* Updated all `angel3_` packages to 7.0.0 * Updated all `angel3_` packages to 7.0.0
* Updated all `angel3_` packages to require dart >= 2.17.x * Updated all `angel3_` packages to require dart >= 2.17.x
@ -86,6 +82,16 @@ For more details, checkout [Project Status](https://github.com/dukefirehawk/ange
* Removed deprecated API * Removed deprecated API
* [**Breaking**] `error` for `AngelHttpException` is no longer mandatory * [**Breaking**] `error` for `AngelHttpException` is no longer mandatory
## TODO
* Improve HTTP and ORM performance
* Improve ORM for MySQL
* Add cache support in ORM (using Redis)
* Upgrade and release angel3_oauth2 8.0.0 (5 failed test cases)
* Upgrade and release angel3_auth_twitter 8.0.0 (issue: oauth1 don't support http 1.0.0)
* Upgrade and release angel3_mongo 8.0.0 (issue: mongo_dart don't support http 1.0.0)
* Upgrade and release angel3_shelf 8.0.0 (2 failed test cases)
## Installation and Setup ## Installation and Setup
### Create a new project by cloning from boilerplate templates ### Create a new project by cloning from boilerplate templates

View file

@ -20,16 +20,16 @@ dev_dependencies:
io: ^1.0.0 io: ^1.0.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request

View file

@ -13,18 +13,18 @@ dependencies:
dev_dependencies: dev_dependencies:
logging: ^1.2.0 logging: ^1.2.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request
angel3_auth: # angel3_auth:
path: ../auth # path: ../auth

View file

@ -17,26 +17,26 @@ dev_dependencies:
http: ^1.0.0 http: ^1.0.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request
angel3_test: # angel3_test:
path: ../test # path: ../test
angel3_websocket: # angel3_websocket:
path: ../websocket # path: ../websocket
angel3_client: # angel3_client:
path: ../client # path: ../client
angel3_auth: # angel3_auth:
path: ../auth # path: ../auth
angel3_validate: # angel3_validate:
path: ../validate # path: ../validate

View file

@ -20,22 +20,23 @@ dev_dependencies:
angel3_container: ^8.0.0 angel3_container: ^8.0.0
angel3_auth: ^8.0.0 angel3_auth: ^8.0.0
async: ^2.11.0 async: ^2.11.0
quiver: ^3.2.0
build_runner: ^2.4.0 build_runner: ^2.4.0
build_web_compilers: ^4.0.0 build_web_compilers: ^4.0.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request
angel3_auth: # angel3_auth:
path: ../auth # path: ../auth

Binary file not shown.

View file

@ -9,76 +9,80 @@ void main() {
test('sets method,body,headers,path', () async { test('sets method,body,headers,path', () async {
await app.post(Uri.parse('/post'), await app.post(Uri.parse('/post'),
headers: {'method': 'post'}, body: 'post'); headers: {'method': 'post'}, body: 'post');
expect(app.client.spec!.method, 'POST'); expect((app.client as SpecClient).spec!.method, 'POST');
expect(app.client.spec!.path, '/post'); expect((app.client as SpecClient).spec!.path, '/post');
expect(app.client.spec!.headers['method'], 'post'); expect((app.client as SpecClient).spec!.headers['method'], 'post');
expect(await read(app.client.spec!.request.finalize()), 'post'); expect(await read((app.client as SpecClient).spec!.request.finalize()),
'post');
}); });
group('service methods', () { group('service methods', () {
test('index', () async { test('index', () async {
await todoService.index(); await todoService.index();
expect(app.client.spec!.method, 'GET'); expect((app.client as SpecClient).spec!.method, 'GET');
expect(app.client.spec!.path, '/api/todos'); expect((app.client as SpecClient).spec!.path, '/api/todos');
}); });
test('read', () async { test('read', () async {
await todoService.read('sleep'); await todoService.read('sleep');
expect(app.client.spec!.method, 'GET'); expect((app.client as SpecClient).spec!.method, 'GET');
expect(app.client.spec!.path, '/api/todos/sleep'); expect((app.client as SpecClient).spec!.path, '/api/todos/sleep');
}); });
test('create', () async { test('create', () async {
await todoService.create({}); await todoService.create({});
expect(app.client.spec!.method, 'POST'); expect((app.client as SpecClient).spec!.method, 'POST');
expect(app.client.spec!.headers['content-type'], expect((app.client as SpecClient).spec!.headers['content-type'],
startsWith('application/json')); startsWith('application/json'));
expect(app.client.spec!.path, '/api/todos'); expect((app.client as SpecClient).spec!.path, '/api/todos');
expect(await read(app.client.spec!.request.finalize()), '{}'); expect(await read((app.client as SpecClient).spec!.request.finalize()),
'{}');
}); });
test('modify', () async { test('modify', () async {
await todoService.modify('sleep', {}); await todoService.modify('sleep', {});
expect(app.client.spec!.method, 'PATCH'); expect((app.client as SpecClient).spec!.method, 'PATCH');
expect(app.client.spec!.headers['content-type'], expect((app.client as SpecClient).spec!.headers['content-type'],
startsWith('application/json')); startsWith('application/json'));
expect(app.client.spec!.path, '/api/todos/sleep'); expect((app.client as SpecClient).spec!.path, '/api/todos/sleep');
expect(await read(app.client.spec!.request.finalize()), '{}'); expect(await read((app.client as SpecClient).spec!.request.finalize()),
'{}');
}); });
test('update', () async { test('update', () async {
await todoService.update('sleep', {}); await todoService.update('sleep', {});
expect(app.client.spec!.method, 'POST'); expect((app.client as SpecClient).spec!.method, 'POST');
expect(app.client.spec!.headers['content-type'], expect((app.client as SpecClient).spec!.headers['content-type'],
startsWith('application/json')); startsWith('application/json'));
expect(app.client.spec!.path, '/api/todos/sleep'); expect((app.client as SpecClient).spec!.path, '/api/todos/sleep');
expect(await read(app.client.spec!.request.finalize()), '{}'); expect(await read((app.client as SpecClient).spec!.request.finalize()),
'{}');
}); });
test('remove', () async { test('remove', () async {
await todoService.remove('sleep'); await todoService.remove('sleep');
expect(app.client.spec!.method, 'DELETE'); expect((app.client as SpecClient).spec!.method, 'DELETE');
expect(app.client.spec!.path, '/api/todos/sleep'); expect((app.client as SpecClient).spec!.path, '/api/todos/sleep');
}); });
}); });
group('authentication', () { group('authentication', () {
test('no type defaults to token', () async { test('no type defaults to token', () async {
await app.authenticate(credentials: '<jwt>'); await app.authenticate(credentials: '<jwt>');
expect(app.client.spec!.path, '/auth/token'); expect((app.client as SpecClient).spec!.path, '/auth/token');
}); });
test('sets type', () async { test('sets type', () async {
await app.authenticate(type: 'local'); await app.authenticate(type: 'local');
expect(app.client.spec!.path, '/auth/local'); expect((app.client as SpecClient).spec!.path, '/auth/local');
}); });
test('credentials send right body', () async { test('credentials send right body', () async {
await app await app
.authenticate(type: 'local', credentials: {'username': 'password'}); .authenticate(type: 'local', credentials: {'username': 'password'});
print(app.client.spec?.headers); print((app.client as SpecClient).spec?.headers);
expect( expect(
await read(app.client.spec!.request.finalize()), await read((app.client as SpecClient).spec!.request.finalize()),
json.encode({'username': 'password'}), json.encode({'username': 'password'}),
); );
}); });

View file

@ -9,8 +9,10 @@ Future<String> read(Stream<List<int>> stream) =>
stream.transform(utf8.decoder).join(); stream.transform(utf8.decoder).join();
class MockAngel extends BaseAngelClient { class MockAngel extends BaseAngelClient {
final SpecClient specClient = SpecClient();
@override @override
final SpecClient client = SpecClient(); get client => specClient;
MockAngel() : super(SpecClient(), 'http://localhost:3000'); MockAngel() : super(SpecClient(), 'http://localhost:3000');

View file

@ -1,4 +1,5 @@
import 'package:angel3_model/angel3_model.dart'; import 'package:angel3_model/angel3_model.dart';
import 'package:quiver/core.dart';
class Postcard extends Model { class Postcard extends Model {
String? location; String? location;
@ -25,4 +26,7 @@ class Postcard extends Model {
Map toJson() { Map toJson() {
return {'id': id, 'location': location, 'message': message}; return {'id': id, 'location': location, 'message': message};
} }
@override
int get hashCode => hash2(id, location);
} }

View file

@ -17,16 +17,16 @@ dev_dependencies:
lints: ^2.1.0 lints: ^2.1.0
belatuk_pretty_logging: ^6.0.0 belatuk_pretty_logging: ^6.0.0
test: ^1.24.0 test: ^1.24.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request

View file

@ -13,6 +13,6 @@ dev_dependencies:
build_test: ^2.1.0 build_test: ^2.1.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../angel_container # path: ../angel_container

View file

@ -12,26 +12,26 @@ dev_dependencies:
http: ^1.0.0 http: ^1.0.0
lints: ^2.1.0 lints: ^2.1.0
test: ^1.24.0 test: ^1.24.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request
angel3_auth: # angel3_auth:
path: ../auth # path: ../auth
angel3_client: # angel3_client:
path: ../client # path: ../client
angel3_websocket: # angel3_websocket:
path: ../websocket # path: ../websocket
angel3_validate: # angel3_validate:
path: ../validate # path: ../validate
angel3_test: # angel3_test:
path: ../test # path: ../test

View file

@ -3,6 +3,7 @@
## 8.0.0 ## 8.0.0
* Require Dart >= 3.0 * Require Dart >= 3.0
* Updated `http` to 1.0.0
## 7.0.4 ## 7.0.4

View file

@ -31,19 +31,19 @@ dependencies:
uuid: ^3.0.0 uuid: ^3.0.0
collection: ^1.17.0 collection: ^1.17.0
dev_dependencies: dev_dependencies:
http: ^0.13.1 http: ^1.0.0
io: ^1.0.0 io: ^1.0.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request

View file

@ -19,23 +19,23 @@ dev_dependencies:
http: ^1.0.0 http: ^1.0.0
logging: ^1.2.0 logging: ^1.2.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request
angel3_auth: # angel3_auth:
path: ../auth # path: ../auth
angel3_client: # angel3_client:
path: ../client # path: ../client
angel3_websocket: # angel3_websocket:
path: ../websocket # path: ../websocket

View file

@ -18,30 +18,30 @@ dev_dependencies:
html: ^0.15.0 html: ^0.15.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../../container/angel_container # path: ../../container/angel_container
angel3_framework: # angel3_framework:
path: ../../framework # path: ../../framework
angel3_http_exception: # angel3_http_exception:
path: ../../http_exception # path: ../../http_exception
angel3_model: # angel3_model:
path: ../../model # path: ../../model
angel3_route: # angel3_route:
path: ../../route # path: ../../route
angel3_mock_request: # angel3_mock_request:
path: ../../mock_request # path: ../../mock_request
angel3_auth: # angel3_auth:
path: ../../auth # path: ../../auth
angel3_client: # angel3_client:
path: ../../client # path: ../../client
angel3_websocket: # angel3_websocket:
path: ../../websocket # path: ../../websocket
angel3_validate: # angel3_validate:
path: ../../validate # path: ../../validate
angel3_test: # angel3_test:
path: ../../test # path: ../../test
jael3: # jael3:
path: ../jael # path: ../jael
jael3_preprocessor: # jael3_preprocessor:
path: ../jael_preprocessor # path: ../jael_preprocessor

View file

@ -23,8 +23,8 @@ dependencies:
async: ^2.11.0 async: ^2.11.0
executables: executables:
jael3_language_server: jael3_language_server jael3_language_server: jael3_language_server
dependency_overrides: # dependency_overrides:
jael3: # jael3:
path: ../jael # path: ../jael
jael3_preprocessor: # jael3_preprocessor:
path: ../jael_preprocessor # path: ../jael_preprocessor

View file

@ -14,6 +14,6 @@ dev_dependencies:
belatuk_code_buffer: ^5.0.0 belatuk_code_buffer: ^5.0.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
jael3: # jael3:
path: ../jael # path: ../jael

View file

@ -18,8 +18,8 @@ dev_dependencies:
build_runner: ^2.4.0 build_runner: ^2.4.0
build_web_compilers: ^4.0.0 build_web_compilers: ^4.0.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
jael3: # jael3:
path: ../jael # path: ../jael
jael3_preprocessor: # jael3_preprocessor:
path: ../jael_preprocessor # path: ../jael_preprocessor

View file

@ -12,26 +12,26 @@ dev_dependencies:
path: ^1.8.0 path: ^1.8.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request
angel3_test: # angel3_test:
path: ../test # path: ../test
angel3_websocket: # angel3_websocket:
path: ../websocket # path: ../websocket
angel3_client: # angel3_client:
path: ../client # path: ../client
angel3_auth: # angel3_auth:
path: ../auth # path: ../auth
angel3_validate: # angel3_validate:
path: ../validate # path: ../validate

View file

@ -1,5 +1,9 @@
# Change Log # Change Log
## 8.0.0
* Require Dart >= 3.0
## 7.0.0 ## 7.0.0
* Require Dart >= 2.17 * Require Dart >= 2.17

View file

@ -13,26 +13,26 @@ dev_dependencies:
angel3_test: ^8.0.0 angel3_test: ^8.0.0
lints: ^2.1.0 lints: ^2.1.0
test: ^1.24.0 test: ^1.24.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request
angel3_test: # angel3_test:
path: ../test # path: ../test
angel3_websocket: # angel3_websocket:
path: ../websocket # path: ../websocket
angel3_client: # angel3_client:
path: ../client # path: ../client
angel3_auth: # angel3_auth:
path: ../auth # path: ../auth
angel3_validate: # angel3_validate:
path: ../validate # path: ../validate

View file

@ -3,6 +3,7 @@
## 8.0.0 ## 8.0.0
* Require Dart >= 3.0 * Require Dart >= 3.0
* Updated `http` to 1.0.0
## 7.0.1 ## 7.0.1

View file

@ -9,7 +9,7 @@ dependencies:
charcode: ^1.3.0 charcode: ^1.3.0
dev_dependencies: dev_dependencies:
#angel3_framework: ^7.0.0 #angel3_framework: ^7.0.0
http: ^0.13.0 http: ^1.0.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
# dependency_overrides: # dependency_overrides:

View file

@ -22,11 +22,11 @@ Future Function(Angel app) mustache(Directory viewsDirectory,
return (Angel app) async { return (Angel app) async {
app.viewGenerator = (String name, [Map? data]) async { app.viewGenerator = (String name, [Map? data]) async {
//var partialsProvider; //var partialsProvider;
var partialsProvider = (String name) { partialsProvider(String name) {
var template = cache.getPartialSync(name, app)!; var template = cache.getPartialSync(name, app)!;
//return render(template, data ?? {}, partial: partialsProvider); //return render(template, data ?? {}, partial: partialsProvider);
return viewer.Template(template, name: name); return viewer.Template(template, name: name);
}; }
var viewTemplate = await (cache.getView(name, app)); var viewTemplate = await (cache.getView(name, app));
//return await render(viewTemplate, data ?? {}, partial: partialsProvider); //return await render(viewTemplate, data ?? {}, partial: partialsProvider);

View file

@ -1,5 +1,5 @@
name: angel3_mustache name: angel3_mustache
version: 7.0.0 version: 8.0.0
description: A service that renders Mustache template into HTML view for Angel3 description: A service that renders Mustache template into HTML view for Angel3
homepage: https://angel3-framework.web.app/ homepage: https://angel3-framework.web.app/
repository: https://github.com/dukefirehawk/angel/tree/master/packages/mustache repository: https://github.com/dukefirehawk/angel/tree/master/packages/mustache
@ -14,16 +14,16 @@ dev_dependencies:
http: ^1.0.0 http: ^1.0.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request

View file

@ -9,6 +9,6 @@ dependencies:
angel3_orm: ^8.0.0 angel3_orm: ^8.0.0
dev_dependencies: dev_dependencies:
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_orm: # angel3_orm:
path: ../angel_orm # path: ../angel_orm

View file

@ -16,8 +16,8 @@ dependencies:
logging: ^1.2.0 logging: ^1.2.0
dev_dependencies: dev_dependencies:
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_orm: # angel3_orm:
path: ../angel_orm # path: ../angel_orm
angel3_migration: # angel3_migration:
path: ../angel_migration # path: ../angel_migration

View file

@ -19,10 +19,10 @@ dev_dependencies:
build_runner: ^2.4.0 build_runner: ^2.4.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_serialize: # angel3_serialize:
path: ../../serialize/angel_serialize # path: ../../serialize/angel_serialize
angel3_serialize_generator: # angel3_serialize_generator:
path: ../../serialize/angel_serialize_generator # path: ../../serialize/angel_serialize_generator
angel3_model: # angel3_model:
path: ../../model # path: ../../model

View file

@ -30,25 +30,25 @@ dev_dependencies:
postgres: ^2.4.0 postgres: ^2.4.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../../container/angel_container # path: ../../container/angel_container
angel3_framework: # angel3_framework:
path: ../../framework # path: ../../framework
angel3_http_exception: # angel3_http_exception:
path: ../../http_exception # path: ../../http_exception
angel3_model: # angel3_model:
path: ../../model # path: ../../model
angel3_route: # angel3_route:
path: ../../route # path: ../../route
angel3_mock_request: # angel3_mock_request:
path: ../../mock_request # path: ../../mock_request
angel3_serialize: # angel3_serialize:
path: ../../serialize/angel_serialize # path: ../../serialize/angel_serialize
angel3_serialize_generator: # angel3_serialize_generator:
path: ../../serialize/angel_serialize_generator # path: ../../serialize/angel_serialize_generator
angel3_orm: # angel3_orm:
path: ../angel_orm # path: ../angel_orm
angel3_migration: # angel3_migration:
path: ../angel_migration # path: ../angel_migration

View file

@ -1,5 +1,9 @@
# Change Log # Change Log
## 8.0.0
* Require Dart >= 3.0
## 7.1.0-beta.1 ## 7.1.0-beta.1
* [Breaking] Require Dart >= 2.19 * [Breaking] Require Dart >= 2.19

View file

@ -9,7 +9,7 @@ class MariaDbExecutor extends QueryExecutor {
final MySqlConnection _connection; final MySqlConnection _connection;
TransactionContext? _transactionContext; //TransactionContext? _transactionContext;
MariaDbExecutor(this._connection, {Logger? logger}) { MariaDbExecutor(this._connection, {Logger? logger}) {
this.logger = logger ?? Logger('MariaDbExecutor'); this.logger = logger ?? Logger('MariaDbExecutor');
@ -78,9 +78,10 @@ class MariaDbExecutor extends QueryExecutor {
Future<T> transaction<T>(FutureOr<T> Function(QueryExecutor) f) async { Future<T> transaction<T>(FutureOr<T> Function(QueryExecutor) f) async {
T? returnValue = await _connection.transaction((ctx) async { T? returnValue = await _connection.transaction((ctx) async {
try { try {
// TODO: To be refactored
//logger.fine('Entering transaction'); //logger.fine('Entering transaction');
//var tx = MariaDbExecutor(conn, logger: logger); //var tx = MariaDbExecutor(conn, logger: logger);
_transactionContext = ctx; //TransactionContext transactionContext = ctx;
return await f(this); return await f(this);
} catch (e) { } catch (e) {
logger.severe('Failed to run transaction', e); logger.severe('Failed to run transaction', e);

View file

@ -18,18 +18,18 @@ dev_dependencies:
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_serialize: # angel3_serialize:
path: ../../serialize/angel_serialize # path: ../../serialize/angel_serialize
angel3_serialize_generator: # angel3_serialize_generator:
path: ../../serialize/angel_serialize_generator # path: ../../serialize/angel_serialize_generator
angel3_model: # angel3_model:
path: ../../model # path: ../../model
angel3_orm_test: # angel3_orm_test:
path: ../angel_orm_test # path: ../angel_orm_test
angel3_orm: # angel3_orm:
path: ../angel_orm # path: ../angel_orm
angel3_orm_generator: # angel3_orm_generator:
path: ../angel_orm_generator # path: ../angel_orm_generator
angel3_migration: # angel3_migration:
path: ../angel_migration # path: ../angel_migration

View file

@ -3,7 +3,7 @@ import 'dart:io';
import 'package:angel3_orm/angel3_orm.dart'; import 'package:angel3_orm/angel3_orm.dart';
import 'package:angel3_orm_mysql/angel3_orm_mysql.dart'; import 'package:angel3_orm_mysql/angel3_orm_mysql.dart';
import 'package:logging/logging.dart'; import 'package:logging/logging.dart';
import 'package:mysql1/mysql1.dart'; //import 'package:mysql1/mysql1.dart';
import 'package:mysql_client/mysql_client.dart'; import 'package:mysql_client/mysql_client.dart';
List tmpTables = []; List tmpTables = [];
@ -49,7 +49,7 @@ String extractTableName(String createQuery) {
} }
// Executor for MariaDB // Executor for MariaDB
Future<MariaDbExecutor> _connectToMariaDb(List<String> schemas) async { /* Future<MariaDbExecutor> _connectToMariaDb(List<String> schemas) async {
var settings = ConnectionSettings( var settings = ConnectionSettings(
host: 'localhost', host: 'localhost',
port: 3306, port: 3306,
@ -81,7 +81,7 @@ Future<MariaDbExecutor> _connectToMariaDb(List<String> schemas) async {
} }
return MariaDbExecutor(connection, logger: logger); return MariaDbExecutor(connection, logger: logger);
} } */
// Executor for MySQL // Executor for MySQL
// create user 'test'@'localhost' identified by 'test123'; // create user 'test'@'localhost' identified by 'test123';

View file

@ -17,18 +17,18 @@ dev_dependencies:
angel3_orm_test: ^8.0.0 angel3_orm_test: ^8.0.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_serialize: # angel3_serialize:
path: ../../serialize/angel_serialize # path: ../../serialize/angel_serialize
angel3_serialize_generator: # angel3_serialize_generator:
path: ../../serialize/angel_serialize_generator # path: ../../serialize/angel_serialize_generator
angel3_model: # angel3_model:
path: ../../model # path: ../../model
angel3_orm_test: # angel3_orm_test:
path: ../angel_orm_test # path: ../angel_orm_test
angel3_orm_generator: # angel3_orm_generator:
path: ../angel_orm_generator # path: ../angel_orm_generator
angel3_orm: # angel3_orm:
path: ../angel_orm # path: ../angel_orm
angel3_migration: # angel3_migration:
path: ../angel_migration # path: ../angel_migration

View file

@ -63,7 +63,7 @@ Future<PostgreSqlExecutorPool> connectToPostgresPool1(
Future<PostgreSqlPoolExecutor> connectToPostgresPool( Future<PostgreSqlPoolExecutor> connectToPostgresPool(
Iterable<String> schemas) async { Iterable<String> schemas) async {
var _pool = PgPool( var dbPool = PgPool(
PgEndpoint( PgEndpoint(
host: 'localhost', host: 'localhost',
port: 5432, port: 5432,
@ -83,5 +83,5 @@ Future<PostgreSqlPoolExecutor> connectToPostgresPool(
// } // }
//}); //});
return PostgreSqlPoolExecutor(_pool, logger: Logger.root); return PostgreSqlPoolExecutor(dbPool, logger: Logger.root);
} }

View file

@ -19,26 +19,26 @@ dev_dependencies:
angel3_framework: ^8.0.0 angel3_framework: ^8.0.0
build_runner: ^2.4.0 build_runner: ^2.4.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../../container/angel_container # path: ../../container/angel_container
angel3_framework: # angel3_framework:
path: ../../framework # path: ../../framework
angel3_http_exception: # angel3_http_exception:
path: ../../http_exception # path: ../../http_exception
angel3_model: # angel3_model:
path: ../../model # path: ../../model
angel3_route: # angel3_route:
path: ../../route # path: ../../route
angel3_mock_request: # angel3_mock_request:
path: ../../mock_request # path: ../../mock_request
angel3_serialize: # angel3_serialize:
path: ../../serialize/angel_serialize # path: ../../serialize/angel_serialize
angel3_serialize_generator: # angel3_serialize_generator:
path: ../../serialize/angel_serialize_generator # path: ../../serialize/angel_serialize_generator
angel3_orm: # angel3_orm:
path: ../angel_orm # path: ../angel_orm
angel3_migration: # angel3_migration:
path: ../angel_migration # path: ../angel_migration
angel3_orm_generator: # angel3_orm_generator:
path: ../angel_orm_generator # path: ../angel_orm_generator

View file

@ -1,5 +1,9 @@
# Change Log # Change Log
## 8.0.0
* Require Dart >= 3.0
## 7.0.0 ## 7.0.0
* Require Dart >= 2.17 * Require Dart >= 2.17

View file

@ -1,17 +1,17 @@
name: angel3_paginate name: angel3_paginate
version: 7.0.0 version: 8.0.0
description: Platform-agnostic pagination library, with custom support for the Angel3 framework. description: Platform-agnostic pagination library, with custom support for the Angel3 framework.
homepage: https://angel3-framework.web.app/ homepage: https://angel3-framework.web.app/
repository: https://github.com/dukefirehawk/angel/tree/master/packages/paginate repository: https://github.com/dukefirehawk/angel/tree/master/packages/paginate
environment: environment:
sdk: '>=3.0.0 <4.0.0' sdk: '>=3.0.0 <4.0.0'
dependencies: dependencies:
angel3_framework: ^7.0.0 angel3_framework: ^8.0.0
dev_dependencies: dev_dependencies:
angel3_test: ^7.0.0 angel3_test: ^8.0.0
logging: ^1.0.1 logging: ^1.2.0
test: ^1.21.0 test: ^1.24.0
lints: ^2.0.0 lints: ^2.1.0
# dependency_overrides: # dependency_overrides:
# angel3_framework: # angel3_framework:
# path: ../framework # path: ../framework

View file

@ -2,12 +2,12 @@ import 'package:angel3_paginate/angel3_paginate.dart';
import 'package:test/test.dart'; import 'package:test/test.dart';
// Count-down from 100, then 101 at the end... // Count-down from 100, then 101 at the end...
final List<int> DATA = List<int>.generate(100, (i) => 100 - i)..add(101); final List<int> data = List<int>.generate(100, (i) => 100 - i)..add(101);
void main() { void main() {
group('cache', () { group('cache', () {
var cached = Paginator<int>(DATA), var cached = Paginator<int>(data),
uncached = Paginator<int>(DATA, useCache: false); uncached = Paginator<int>(data, useCache: false);
test('always cache current', () { test('always cache current', () {
expect(cached.current, cached.current); expect(cached.current, cached.current);
@ -34,7 +34,7 @@ void main() {
}); });
test('default state', () { test('default state', () {
var paginator = Paginator<int>(DATA); var paginator = Paginator<int>(data);
expect(paginator.index, 0); expect(paginator.index, 0);
expect(paginator.pageNumber, 1); expect(paginator.pageNumber, 1);
expect(paginator.itemsPerPage, 5); expect(paginator.itemsPerPage, 5);
@ -51,56 +51,56 @@ void main() {
group('paginate', () { group('paginate', () {
test('first page', () { test('first page', () {
var paginator = Paginator<int>(DATA); var paginator = Paginator<int>(data);
expect(paginator.pageNumber, 1); expect(paginator.pageNumber, 1);
var r = paginator.current!; var r = paginator.current!;
print(r.toJson()); print(r.toJson());
expect(r.total, DATA.length); expect(r.total, data.length);
expect(r.itemsPerPage, 5); expect(r.itemsPerPage, 5);
expect(r.previousPage, -1); expect(r.previousPage, -1);
expect(r.currentPage, 1); expect(r.currentPage, 1);
expect(r.nextPage, 2); expect(r.nextPage, 2);
expect(r.startIndex, 0); expect(r.startIndex, 0);
expect(r.endIndex, 4); expect(r.endIndex, 4);
expect(r.data, DATA.skip(r.startIndex!).take(r.itemsPerPage!).toList()); expect(r.data, data.skip(r.startIndex!).take(r.itemsPerPage!).toList());
}); });
}); });
test('third page', () { test('third page', () {
var paginator = Paginator<int>(DATA)..goToPage(3); var paginator = Paginator<int>(data)..goToPage(3);
expect(paginator.pageNumber, 3); expect(paginator.pageNumber, 3);
var r = paginator.current!; var r = paginator.current!;
print(r.toJson()); print(r.toJson());
expect(r.total, DATA.length); expect(r.total, data.length);
expect(r.itemsPerPage, 5); expect(r.itemsPerPage, 5);
expect(r.previousPage, 2); expect(r.previousPage, 2);
expect(r.currentPage, 3); expect(r.currentPage, 3);
expect(r.nextPage, 4); expect(r.nextPage, 4);
expect(r.startIndex, 10); expect(r.startIndex, 10);
expect(r.endIndex, 14); expect(r.endIndex, 14);
expect(r.data, DATA.skip(r.startIndex!).take(r.itemsPerPage!).toList()); expect(r.data, data.skip(r.startIndex!).take(r.itemsPerPage!).toList());
paginator.back(); paginator.back();
expect(paginator.pageNumber, 2); expect(paginator.pageNumber, 2);
}); });
test('last page', () { test('last page', () {
var paginator = Paginator<int>(DATA); var paginator = Paginator<int>(data);
paginator.goToPage(paginator.lastPageNumber); paginator.goToPage(paginator.lastPageNumber);
var r = paginator.current!; var r = paginator.current!;
expect(r.total, DATA.length); expect(r.total, data.length);
expect(r.itemsPerPage, 5); expect(r.itemsPerPage, 5);
expect(r.previousPage, paginator.lastPageNumber - 1); expect(r.previousPage, paginator.lastPageNumber - 1);
expect(r.currentPage, paginator.lastPageNumber); expect(r.currentPage, paginator.lastPageNumber);
expect(r.nextPage, -1); expect(r.nextPage, -1);
expect(r.startIndex, (paginator.lastPageNumber - 1) * 5); expect(r.startIndex, (paginator.lastPageNumber - 1) * 5);
expect(r.endIndex, r.startIndex); expect(r.endIndex, r.startIndex);
expect(r.data, [DATA.last]); expect(r.data, [data.last]);
expect(r.data, DATA.skip(r.startIndex!).take(r.itemsPerPage!).toList()); expect(r.data, data.skip(r.startIndex!).take(r.itemsPerPage!).toList());
}); });
test('dump pages', () { test('dump pages', () {
var paginator = Paginator<int>(DATA); var paginator = Paginator<int>(data);
print('${paginator.lastPageNumber} page(s) of data:'); print('${paginator.lastPageNumber} page(s) of data:');
do { do {

View file

@ -15,16 +15,16 @@ dependencies:
intl: ^0.18.0 intl: ^0.18.0
dev_dependencies: dev_dependencies:
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request

View file

@ -1,5 +1,5 @@
name: angel3_proxy name: angel3_proxy
version: 7.0.1 version: 8.0.0
description: Angel middleware to forward requests to another server (i.e. pub serve). description: Angel middleware to forward requests to another server (i.e. pub serve).
homepage: https://angel3-framework.web.app/ homepage: https://angel3-framework.web.app/
repository: https://github.com/dukefirehawk/angel/tree/master/packages/proxy repository: https://github.com/dukefirehawk/angel/tree/master/packages/proxy
@ -16,26 +16,26 @@ dev_dependencies:
logging: ^1.2.0 logging: ^1.2.0
lints: ^2.1.0 lints: ^2.1.0
test: ^1.24.0 test: ^1.24.0
dependency_overrides: # dependency_overrides:
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request
angel3_test: # angel3_test:
path: ../test # path: ../test
angel3_websocket: # angel3_websocket:
path: ../websocket # path: ../websocket
angel3_client: # angel3_client:
path: ../client # path: ../client
angel3_auth: # angel3_auth:
path: ../auth # path: ../auth
angel3_validate: # angel3_validate:
path: ../validate # path: ../validate

View file

@ -12,16 +12,16 @@ dependencies:
dev_dependencies: dev_dependencies:
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request

View file

@ -3,7 +3,8 @@
## 8.0.0 ## 8.0.0
* Require Dart >= 3.0 * Require Dart >= 3.0
* Breaking: Updated `build_web_compilers` to 4.0.0 * Updated `build_web_compilers` to 4.0.0
* Updated `http` to 1.0.0
## 7.0.0 ## 7.0.0

View file

@ -12,6 +12,6 @@ dependencies:
dev_dependencies: dev_dependencies:
build_runner: ^2.4.0 build_runner: ^2.4.0
build_web_compilers: ^4.0.0 build_web_compilers: ^4.0.0
http: ^0.13.0 http: ^1.0.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0

View file

@ -19,30 +19,30 @@ dev_dependencies:
logging: ^1.2.0 logging: ^1.2.0
resp_client: ^1.2.0 resp_client: ^1.2.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_production: # angel3_production:
path: ../production # path: ../production
angel3_redis: # angel3_redis:
path: ../redis # path: ../redis
angel3_test: # angel3_test:
path: ../test # path: ../test
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request
angel3_auth: # angel3_auth:
path: ../auth # path: ../auth
angel3_client: # angel3_client:
path: ../client # path: ../client
angel3_websocket: # angel3_websocket:
path: ../websocket # path: ../websocket
angel3_validate: # angel3_validate:
path: ../validate # path: ../validate

View file

@ -13,16 +13,16 @@ dev_dependencies:
logging: ^1.2.0 logging: ^1.2.0
lints: ^2.1.0 lints: ^2.1.0
test: ^1.24.0 test: ^1.24.0
dependency_overrides: # dependency_overrides:
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request

View file

@ -17,28 +17,28 @@ dev_dependencies:
logging: ^1.2.0 logging: ^1.2.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_static: # angel3_static:
path: ../static # path: ../static
angel3_websocket: # angel3_websocket:
path: ../websocket # path: ../websocket
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request
angel3_auth: # angel3_auth:
path: ../auth # path: ../auth
angel3_client: # angel3_client:
path: ../client # path: ../client
angel3_test: # angel3_test:
path: ../test # path: ../test
angel3_validate: # angel3_validate:
path: ../validate # path: ../validate

View file

@ -12,7 +12,7 @@ dependencies:
quiver: ^3.2.0 quiver: ^3.2.0
dev_dependencies: dev_dependencies:
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_model: # angel3_model:
path: ../../model # path: ../../model

View file

@ -1,5 +1,5 @@
name: angel3_serialize_generator name: angel3_serialize_generator
version: 7.2.0-beta.1 version: 8.0.0
description: Angel3 model serialization generators, designed for use with Angel. Combine with angel_serialize for flexible modeling. description: Angel3 model serialization generators, designed for use with Angel. Combine with angel_serialize for flexible modeling.
homepage: https://angel3-framework.web.app/ homepage: https://angel3-framework.web.app/
repository: https://github.com/dukefirehawk/angel/tree/master/packages/serialize/angel_serialize_generator repository: https://github.com/dukefirehawk/angel/tree/master/packages/serialize/angel_serialize_generator
@ -24,8 +24,8 @@ dev_dependencies:
collection: ^1.17.0 collection: ^1.17.0
lints: ^2.1.0 lints: ^2.1.0
test: ^1.24.0 test: ^1.24.0
dependency_overrides: # dependency_overrides:
angel3_model: # angel3_model:
path: ../../model # path: ../../model
angel3_serialize: # angel3_serialize:
path: ../angel_serialize # path: ../angel_serialize

View file

@ -20,27 +20,27 @@ dev_dependencies:
matcher: ^0.12.10 matcher: ^0.12.10
lints: ^2.1.0 lints: ^2.1.0
test: ^1.24.0 test: ^1.24.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request
angel3_auth: # angel3_auth:
path: ../auth # path: ../auth
angel3_client: # angel3_client:
path: ../client # path: ../client
angel3_websocket: # angel3_websocket:
path: ../websocket # path: ../websocket
angel3_validate: # angel3_validate:
path: ../validate # path: ../validate
angel3_test: # angel3_test:
path: ../test # path: ../test

View file

@ -14,26 +14,26 @@ dev_dependencies:
angel3_test: ^8.0.0 angel3_test: ^8.0.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_websocket: # angel3_websocket:
path: ../websocket # path: ../websocket
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request
angel3_auth: # angel3_auth:
path: ../auth # path: ../auth
angel3_client: # angel3_client:
path: ../client # path: ../client
angel3_test: # angel3_test:
path: ../test # path: ../test
angel3_validate: # angel3_validate:
path: ../validate # path: ../validate

View file

@ -19,24 +19,24 @@ dependencies:
dev_dependencies: dev_dependencies:
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request
angel3_auth: # angel3_auth:
path: ../auth # path: ../auth
angel3_client: # angel3_client:
path: ../client # path: ../client
angel3_websocket: # angel3_websocket:
path: ../websocket # path: ../websocket
angel3_validate: # angel3_validate:
path: ../validate # path: ../validate

View file

@ -9,16 +9,16 @@ dependencies:
angel3_framework: ^8.0.0 angel3_framework: ^8.0.0
user_agent_analyzer: ^5.0.0 user_agent_analyzer: ^5.0.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../../container/angel_container # path: ../../container/angel_container
angel3_http_exception: # angel3_http_exception:
path: ../../http_exception # path: ../../http_exception
angel3_model: # angel3_model:
path: ../../model # path: ../../model
angel3_route: # angel3_route:
path: ../../route # path: ../../route
angel3_mock_request: # angel3_mock_request:
path: ../../mock_request # path: ../../mock_request
angel3_framework: # angel3_framework:
path: ../../framework # path: ../../framework

View file

@ -16,16 +16,16 @@ dev_dependencies:
logging: ^1.2.0 logging: ^1.2.0
lints: ^2.1.0 lints: ^2.1.0
test: ^1.24.0 test: ^1.24.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request

View file

@ -20,22 +20,23 @@ dependencies:
dev_dependencies: dev_dependencies:
angel3_container: ^8.0.0 angel3_container: ^8.0.0
angel3_model: ^8.0.0 angel3_model: ^8.0.0
quiver: ^3.2.0
test: ^1.24.0 test: ^1.24.0
lints: ^2.1.0 lints: ^2.1.0
dependency_overrides: # dependency_overrides:
angel3_container: # angel3_container:
path: ../container/angel_container # path: ../container/angel_container
angel3_framework: # angel3_framework:
path: ../framework # path: ../framework
angel3_http_exception: # angel3_http_exception:
path: ../http_exception # path: ../http_exception
angel3_model: # angel3_model:
path: ../model # path: ../model
angel3_route: # angel3_route:
path: ../route # path: ../route
angel3_mock_request: # angel3_mock_request:
path: ../mock_request # path: ../mock_request
angel3_auth: # angel3_auth:
path: ../auth # path: ../auth
angel3_client: # angel3_client:
path: ../client # path: ../client

View file

@ -1,5 +1,6 @@
import 'package:angel3_framework/angel3_framework.dart'; import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_websocket/server.dart'; import 'package:angel3_websocket/server.dart';
import 'package:quiver/core.dart';
class Game { class Game {
final String? playerOne, playerTwo; final String? playerOne, playerTwo;
@ -19,6 +20,9 @@ class Game {
other is Game && other is Game &&
other.playerOne == playerOne && other.playerOne == playerOne &&
other.playerTwo == playerTwo; other.playerTwo == playerTwo;
@override
int get hashCode => hash2(playerOne, playerTwo);
} }
const Game johnVsBob = Game(playerOne: 'John', playerTwo: 'Bob'); const Game johnVsBob = Game(playerOne: 'John', playerTwo: 'Bob');