diff --git a/packages/merge_map/README.md b/packages/merge_map/README.md index 21a94bb1..3a257a5a 100644 --- a/packages/merge_map/README.md +++ b/packages/merge_map/README.md @@ -1,10 +1,13 @@ # angel3_merge_map + [![version](https://img.shields.io/badge/pub-v2.0.2-brightgreen)](https://pub.dartlang.org/packages/angel3_merge_map) [![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/merge_map/LICENSE) +**DEPRECATED: Replaced by [`belatuk_merge_map`](https://pub.dartlang.org/packages/belatuk_merge_map) package** + Combine multiple Maps into one. Equivalent to [Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) in JS. @@ -22,4 +25,4 @@ void main() { // {hello: world, foo: {bar: baz, john: doe, this: overrides previous maps}} } -``` \ No newline at end of file +``` diff --git a/packages/orm/angel_orm_postgres/CHANGELOG.md b/packages/orm/angel_orm_postgres/CHANGELOG.md index 572deb6d..27d426ed 100644 --- a/packages/orm/angel_orm_postgres/CHANGELOG.md +++ b/packages/orm/angel_orm_postgres/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 3.1.0 + +* Updated linter to `package:lints` + ## 3.0.1 * Fixed json data issue diff --git a/packages/orm/angel_orm_postgres/LICENSE b/packages/orm/angel_orm_postgres/LICENSE index 8f65b579..df5e0635 100644 --- a/packages/orm/angel_orm_postgres/LICENSE +++ b/packages/orm/angel_orm_postgres/LICENSE @@ -1,21 +1,29 @@ -MIT License (MIT) +BSD 3-Clause License -Copyright (c) 2021 dukefirehawk.com +Copyright (c) 2021, dukefirehawk.com +All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/orm/angel_orm_postgres/README.md b/packages/orm/angel_orm_postgres/README.md index 41edfc8b..b79751f8 100644 --- a/packages/orm/angel_orm_postgres/README.md +++ b/packages/orm/angel_orm_postgres/README.md @@ -1,10 +1,9 @@ # Angel3 ORM for Postgresql -[![version](https://img.shields.io/badge/pub-v4.0.1-brightgreen)](https://pub.dartlang.org/packages/angel3_orm_postgres) +![Pub Version (including pre-releases)](https://img.shields.io/pub/v/angel3_orm_postgres?include_prereleases) [![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/orm/angel_orm_postgres/LICENSE) +[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm_postgres/LICENSE) Postgresql support for Angel3 ORM. Supported version: 9, 10, 11 and 12. diff --git a/packages/orm/angel_orm_postgres/analysis_options.yaml b/packages/orm/angel_orm_postgres/analysis_options.yaml index c230cee7..ea2c9e94 100644 --- a/packages/orm/angel_orm_postgres/analysis_options.yaml +++ b/packages/orm/angel_orm_postgres/analysis_options.yaml @@ -1,4 +1 @@ -include: package:pedantic/analysis_options.yaml -analyzer: - strong-mode: - implicit-casts: false \ No newline at end of file +include: package:lints/recommended.yaml \ No newline at end of file diff --git a/packages/orm/angel_orm_postgres/pubspec.yaml b/packages/orm/angel_orm_postgres/pubspec.yaml index ac2d2dc1..1a9d9f6b 100644 --- a/packages/orm/angel_orm_postgres/pubspec.yaml +++ b/packages/orm/angel_orm_postgres/pubspec.yaml @@ -1,17 +1,17 @@ name: angel3_orm_postgres -version: 3.0.1 +version: 3.1.0 description: PostgreSQL support for Angel3 ORM. Includes functionality for querying and transactions. homepage: https://angel3-framework.web.app/ -repository: https://github.com/dukefirehawk/angel/tree/angel3/packages/orm/angel_orm_postgres +repository: https://github.com/dukefirehawk/angel/tree/master/packages/orm/angel_orm_postgres environment: sdk: '>=2.12.0 <3.0.0' dependencies: angel3_orm: ^4.0.0 logging: ^1.0.1 pool: ^1.5.0 - postgres: ^2.3.2 + postgres: ^2.4.1 dev_dependencies: - angel3_pretty_logging: ^3.0.0 - test: ^1.17.0 - pedantic: ^1.11.0 + belatuk_pretty_logging: ^4.0.0 angel3_orm_test: ^3.0.0 + test: ^1.17.5 + lints: ^1.0.0 diff --git a/packages/orm/angel_orm_postgres/test/all_test.dart b/packages/orm/angel_orm_postgres/test/all_test.dart index e24da978..015799d8 100644 --- a/packages/orm/angel_orm_postgres/test/all_test.dart +++ b/packages/orm/angel_orm_postgres/test/all_test.dart @@ -1,6 +1,6 @@ import 'package:angel3_orm_test/angel3_orm_test.dart'; import 'package:logging/logging.dart'; -import 'package:angel3_pretty_logging/angel3_pretty_logging.dart'; +import 'package:belatuk_pretty_logging/belatuk_pretty_logging.dart'; import 'package:test/test.dart'; import 'common.dart'; diff --git a/packages/pretty_logging/README.md b/packages/pretty_logging/README.md index b695f8cc..d9b087f3 100644 --- a/packages/pretty_logging/README.md +++ b/packages/pretty_logging/README.md @@ -6,6 +6,8 @@ [![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/pretty_logging/LICENSE) +**DEPRECATED: Replaced by [`belatuk_pretty_logging`](https://pub.dartlang.org/packages/belatuk_pretty_logging) package** + Standalone helper for colorful logging output, using pkg:io AnsiCode. ## Installation diff --git a/packages/security/CHANGELOG.md b/packages/security/CHANGELOG.md index 444ead67..e32f8924 100644 --- a/packages/security/CHANGELOG.md +++ b/packages/security/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 3.1.0 + +* Updated linter to `package:lints` + ## 3.0.1 * Run `dartfmt -w .` to correct the formating diff --git a/packages/security/LICENSE b/packages/security/LICENSE index b593ac86..df5e0635 100644 --- a/packages/security/LICENSE +++ b/packages/security/LICENSE @@ -1,21 +1,29 @@ -MIT License +BSD 3-Clause License -Copyright (c) 2021 dukefirehawk.com +Copyright (c) 2021, dukefirehawk.com +All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/security/README.md b/packages/security/README.md index e8244d6e..d01b2d27 100644 --- a/packages/security/README.md +++ b/packages/security/README.md @@ -1,12 +1,10 @@ # Angel3 Security -[![version](https://img.shields.io/badge/pub-v3.0.1-brightgreen)](https://pub.dartlang.org/packages/angel3_security) +![Pub Version (including pre-releases)](https://img.shields.io/pub/v/angel3_security?include_prereleases) [![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/master/packages/security/LICENSE) -[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/security/LICENSE) - -Angel3 middleware designed to enhance application security by patching common Web security -holes. +Angel3 middleware designed to enhance application security by patching common Web security holes. **This package is currently going through a major overhaul, for version 2.** diff --git a/packages/security/analysis_options.yaml b/packages/security/analysis_options.yaml index c230cee7..ea2c9e94 100644 --- a/packages/security/analysis_options.yaml +++ b/packages/security/analysis_options.yaml @@ -1,4 +1 @@ -include: package:pedantic/analysis_options.yaml -analyzer: - strong-mode: - implicit-casts: false \ No newline at end of file +include: package:lints/recommended.yaml \ No newline at end of file diff --git a/packages/security/example/cookie_signer.dart b/packages/security/example/cookie_signer.dart index d8430c54..16d0d9ad 100644 --- a/packages/security/example/cookie_signer.dart +++ b/packages/security/example/cookie_signer.dart @@ -4,7 +4,7 @@ import 'package:angel3_framework/angel3_framework.dart'; import 'package:angel3_framework/http.dart'; import 'package:angel3_security/angel3_security.dart'; import 'package:logging/logging.dart'; -import 'package:angel3_pretty_logging/angel3_pretty_logging.dart'; +import 'package:belatuk_pretty_logging/belatuk_pretty_logging.dart'; void main() async { // Logging boilerplate. diff --git a/packages/security/example/main.dart b/packages/security/example/main.dart index 96fc0902..2b863a99 100644 --- a/packages/security/example/main.dart +++ b/packages/security/example/main.dart @@ -2,7 +2,7 @@ import 'package:angel3_framework/angel3_framework.dart'; import 'package:angel3_framework/http.dart'; import 'package:angel3_security/angel3_security.dart'; import 'package:logging/logging.dart'; -import 'package:angel3_pretty_logging/angel3_pretty_logging.dart'; +import 'package:belatuk_pretty_logging/belatuk_pretty_logging.dart'; void main() async { // Logging boilerplate. diff --git a/packages/security/pubspec.yaml b/packages/security/pubspec.yaml index 91afdaea..4e12cc5f 100644 --- a/packages/security/pubspec.yaml +++ b/packages/security/pubspec.yaml @@ -1,18 +1,18 @@ name: angel3_security -version: 3.0.1 -description: Angel infrastructure for improving security, rate limiting, and more -homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/security +version: 3.1.0 +description: Angel3 infrastructure for improving security, rate limiting, and more +homepage: https://github.com/dukefirehawk/angel/tree/master/packages/security environment: sdk: '>=2.12.0 <3.0.0' dependencies: - angel3_framework: ^4.0.0 + angel3_framework: ^4.2.0 crypto: ^3.0.1 dev_dependencies: angel3_auth: ^4.0.0 - angel3_production: ^3.0.0 + angel3_production: ^3.1.0 angel3_redis: ^2.0.0 angel3_test: ^4.0.0 angel3_validate: ^4.0.0 - angel3_pretty_logging: ^3.0.0 - pedantic: ^1.11.1 - test: ^1.17.8 + belatuk_pretty_logging: ^4.0.0 + test: ^1.17.5 + lints: ^1.0.0 diff --git a/packages/shelf/CHANGELOG.md b/packages/shelf/CHANGELOG.md index b8ed3643..a12ed4e2 100644 --- a/packages/shelf/CHANGELOG.md +++ b/packages/shelf/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 3.0.0-dev.2 + +* Updated to use `package:belatuk_pretty_logging` + ## 3.0.0-dev.1 * Migrated to support Dart SDK 2.12.x NNBD diff --git a/packages/shelf/README.md b/packages/shelf/README.md index 1ba956e3..e4b7995d 100644 --- a/packages/shelf/README.md +++ b/packages/shelf/README.md @@ -3,7 +3,7 @@ ![Pub Version (including pre-releases)](https://img.shields.io/pub/v/angel3_shelf?include_prereleases) [![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/dart-backend/belatuk-common-utilities)](https://github.com/dukefirehawk/angel/tree/angel3/packages/shelf/LICENSE) +[![License](https://img.shields.io/github/license/dart-backend/belatuk-common-utilities)](https://github.com/dukefirehawk/angel/tree/master/packages/shelf/LICENSE) **Replacement of `package:angel_shelf` with breaking changes to support NNBD.** diff --git a/packages/shelf/example/angel_in_shelf.dart b/packages/shelf/example/angel_in_shelf.dart index 4701eaa4..cc41b81e 100644 --- a/packages/shelf/example/angel_in_shelf.dart +++ b/packages/shelf/example/angel_in_shelf.dart @@ -3,7 +3,7 @@ import 'package:angel3_container/mirrors.dart'; import 'package:angel3_framework/angel3_framework.dart'; import 'package:angel3_shelf/angel3_shelf.dart'; import 'package:logging/logging.dart'; -import 'package:angel3_pretty_logging/angel3_pretty_logging.dart'; +import 'package:belatuk_pretty_logging/belatuk_pretty_logging.dart'; import 'package:shelf/shelf.dart' as shelf; import 'package:shelf/shelf_io.dart' as shelf_io; import 'package:shelf_static/shelf_static.dart'; diff --git a/packages/shelf/example/main.dart b/packages/shelf/example/main.dart index bf9fa632..9cd9f7c2 100644 --- a/packages/shelf/example/main.dart +++ b/packages/shelf/example/main.dart @@ -3,7 +3,7 @@ import 'package:angel3_framework/angel3_framework.dart'; import 'package:angel3_framework/http.dart'; import 'package:angel3_shelf/angel3_shelf.dart'; import 'package:logging/logging.dart'; -import 'package:angel3_pretty_logging/angel3_pretty_logging.dart'; +import 'package:belatuk_pretty_logging/belatuk_pretty_logging.dart'; import 'package:shelf_static/shelf_static.dart'; void main() async { diff --git a/packages/shelf/pubspec.yaml b/packages/shelf/pubspec.yaml index ea5775dc..b8d47682 100644 --- a/packages/shelf/pubspec.yaml +++ b/packages/shelf/pubspec.yaml @@ -1,12 +1,12 @@ name: angel3_shelf -version: 3.0.0-dev.1 +version: 3.0.0-dev.2 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/angel3/packages/shelf +repository: https://github.com/dukefirehawk/angel/tree/master/packages/shelf environment: sdk: '>=2.12.0 <3.0.0' dependencies: - angel3_framework: ^4.1.0 + angel3_framework: ^4.2.0 angel3_container: ^3.0.0 angel3_mock_request: ^2.0.0 path: ^1.8.0 @@ -17,7 +17,7 @@ dependencies: http: ^0.13.0 dev_dependencies: angel3_test: ^4.0.0 - angel3_pretty_logging: ^3.0.0 + belatuk_pretty_logging: ^4.0.0 shelf_static: ^1.0.0 - test: ^1.17.7 + test: ^1.17.5 lints: ^1.0.0 diff --git a/packages/shelf/test/embed_shelf_test.dart b/packages/shelf/test/embed_shelf_test.dart index 5e47d85c..642a470d 100644 --- a/packages/shelf/test/embed_shelf_test.dart +++ b/packages/shelf/test/embed_shelf_test.dart @@ -7,7 +7,7 @@ import 'package:angel3_test/angel3_test.dart'; import 'package:charcode/charcode.dart'; import 'package:http/http.dart' as http; import 'package:logging/logging.dart'; -import 'package:angel3_pretty_logging/angel3_pretty_logging.dart'; +import 'package:belatuk_pretty_logging/belatuk_pretty_logging.dart'; import 'package:shelf/shelf.dart' as shelf; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; diff --git a/packages/test/CHANGELOG.md b/packages/test/CHANGELOG.md index 33f56ed8..e0c2104b 100644 --- a/packages/test/CHANGELOG.md +++ b/packages/test/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 4.1.0 + +* Updated linter to `package:lints` + ## 4.0.3 * Updated README diff --git a/packages/test/LICENSE b/packages/test/LICENSE index 8f65b579..df5e0635 100644 --- a/packages/test/LICENSE +++ b/packages/test/LICENSE @@ -1,21 +1,29 @@ -MIT License (MIT) +BSD 3-Clause License -Copyright (c) 2021 dukefirehawk.com +Copyright (c) 2021, dukefirehawk.com +All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/test/README.md b/packages/test/README.md index 6c0d3dd1..ee6b0813 100644 --- a/packages/test/README.md +++ b/packages/test/README.md @@ -1,24 +1,15 @@ # Angel3 Testing Library -[![version](https://img.shields.io/badge/pub-v4.0.3-brightgreen)](https://pub.dartlang.org/packages/angel3_test) +![Pub Version (including pre-releases)](https://img.shields.io/pub/v/angel3_test?include_prereleases) [![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/test/LICENSE) +[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/master/packages/test/LICENSE) Testing utility library for the Angel3 framework. ## TestClient -The `TestClient` class is a custom `angel3_client` that sends mock requests to your server. -This means that you will not have to bind your server to HTTP to run. -Plus, it is an `angel3_client`, and thus supports services and other goodies. - -The `TestClient` also supports WebSockets. WebSockets cannot be mocked (yet!) within this library, -so calling the `websocket()` function will also bind your server to HTTP, if it is not already listening. - -The return value is a `WebSockets` client instance -(from [`package:angel3_websocket`](https://github.com/dukefirehawk/angel/tree/angel3/packages/websocket)); +The `TestClient` class is a custom `angel3_client` that sends mock requests to your server. This means that you will not have to bind your server to HTTP to run. Plus, it is an `angel3_client`, and thus supports services and other goodies. The `TestClient` also supports WebSockets. WebSockets cannot be mocked (yet!) within this library, so calling the `websocket()` function will also bind your server to HTTP, if it is not already listening. The return value is a `WebSockets` client instance (from [`package:angel3_websocket`](https://github.com/dukefirehawk/angel/tree/angel3/packages/websocket)); ```dart var ws = await client.websocket('/ws'); @@ -30,11 +21,10 @@ ws.onData.listen(...); ## Matchers -Several `Matcher`s are bundled with this package, and run on any `package:http` `Response`, -not just those returned by Angel. +Several `Matcher`s are bundled with this package, and run on any `package:http` `Response`, not just those returned by Angel. ```dart -test('foo', () async { +void test('foo', () async { var res = await client.get('/foo'); expect(res, allOf([ isJson({'foo': 'bar'}), @@ -49,18 +39,14 @@ test('foo', () async { ])); }); -test('error', () async { +void test('error', () async { var res = await client.get('/error'); expect(res, isAngelHttpException()); expect(res, isAngelHttpException(statusCode: 404, message: ..., errors: [...])) // Optional }); ``` -`hasValidBody` is one of the most powerful `Matcher`s in this library, because it allows you to validate a JSON body against a [validation schema](https://github.com/dukefirehawk/angel/tree/angel3/packages/validate). - -Angel provides a comprehensive validation library that integrates tightly with the very `matcher` package that you already use for testing. - -[`package:angel3_validate`](https://github.com/dukefirehawk/angel/tree/angel3/packages//validate) +`hasValidBody` is one of the most powerful `Matcher`s in this library, because it allows you to validate a JSON body against a validation schema. Angel3 provides a comprehensive [validation library]() that integrates tightly with the `matcher` package that you already use for testing. ```dart test('validate response', () async { diff --git a/packages/test/analysis_options.yaml b/packages/test/analysis_options.yaml index c230cee7..ea2c9e94 100644 --- a/packages/test/analysis_options.yaml +++ b/packages/test/analysis_options.yaml @@ -1,4 +1 @@ -include: package:pedantic/analysis_options.yaml -analyzer: - strong-mode: - implicit-casts: false \ No newline at end of file +include: package:lints/recommended.yaml \ No newline at end of file diff --git a/packages/test/lib/src/client.dart b/packages/test/lib/src/client.dart index 71bb569f..29bf8e19 100644 --- a/packages/test/lib/src/client.dart +++ b/packages/test/lib/src/client.dart @@ -106,7 +106,9 @@ class TestClient extends client.BaseAngelClient { if (authToken?.isNotEmpty == true) { rq.headers.add('authorization', 'Bearer $authToken'); } - rq..cookies.addAll(cookies)..session.addAll(session); + rq + ..cookies.addAll(cookies) + ..session.addAll(session); await request.finalize().pipe(rq); diff --git a/packages/test/pubspec.yaml b/packages/test/pubspec.yaml index ae7d9e62..26a06dc1 100644 --- a/packages/test/pubspec.yaml +++ b/packages/test/pubspec.yaml @@ -1,22 +1,22 @@ name: angel3_test -version: 4.0.3 +version: 4.1.0 description: Testing utility library for the Angel3 framework. Use with package:test. homepage: https://angel3-framework.web.app/ -repository: https://github.com/dukefirehawk/angel/tree/angel3/packages/test +repository: https://github.com/dukefirehawk/angel/tree/master/packages/test environment: sdk: '>=2.12.0 <3.0.0' dependencies: - angel3_client: ^4.0.0 - angel3_framework: ^4.0.0 + angel3_client: ^4.1.0 + angel3_framework: ^4.2.0 angel3_http_exception: ^3.0.0 angel3_validate: ^4.0.0 - angel3_websocket: ^4.0.0 + angel3_websocket: ^4.1.0 angel3_mock_request: ^2.0.0 angel3_container: ^3.0.0 http: ^0.13.1 matcher: ^0.12.10 web_socket_channel: ^2.0.0 dev_dependencies: - test: ^1.17.4 - pedantic: ^1.11.0 + test: ^1.17.5 + lints: ^1.0.0