From b46356898816aca206751e3a51ddd895b551063f Mon Sep 17 00:00:00 2001 From: thomashii Date: Sun, 12 Sep 2021 10:52:19 +0800 Subject: [PATCH] Updated sync --- packages/sync/.gitignore | 13 --------- packages/sync/CHANGELOG.md | 5 ++++ packages/sync/LICENSE | 42 +++++++++++++++++------------ packages/sync/README.md | 8 +++--- packages/sync/analysis_options.yaml | 5 +--- packages/sync/example/main.dart | 4 +-- packages/sync/lib/angel3_sync.dart | 2 +- packages/sync/pubspec.yaml | 8 +++--- packages/sync/test/all_test.dart | 4 +-- 9 files changed, 44 insertions(+), 47 deletions(-) delete mode 100644 packages/sync/.gitignore diff --git a/packages/sync/.gitignore b/packages/sync/.gitignore deleted file mode 100644 index 321543c9..00000000 --- a/packages/sync/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -# See https://www.dartlang.org/tools/private-files.html - -# Files and directories created by pub -.packages -.pub/ -build/ -# If you're building an application, you may want to check-in your pubspec.lock -pubspec.lock - -# Directory created by dartdoc -# If you don't generate documentation locally you can remove this line. -doc/api/ -.dart_tool \ No newline at end of file diff --git a/packages/sync/CHANGELOG.md b/packages/sync/CHANGELOG.md index c2a1dcd5..e593cb2f 100644 --- a/packages/sync/CHANGELOG.md +++ b/packages/sync/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 4.1.0 + +* Updated to use `belatuk_pub_sub` package +* Upgraded from `pendantic` to `lints` linter + ## 4.0.0 * Updated to use `angel3` packages diff --git a/packages/sync/LICENSE b/packages/sync/LICENSE index b593ac86..df5e0635 100644 --- a/packages/sync/LICENSE +++ b/packages/sync/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/sync/README.md b/packages/sync/README.md index 1f46dbca..ddf43ecf 100644 --- a/packages/sync/README.md +++ b/packages/sync/README.md @@ -1,23 +1,23 @@ # Angel3 Sync -[![version](https://img.shields.io/badge/pub-v4.0.0-brightgreen)](https://pub.dartlang.org/packages/angel3_sync) +[![version](https://img.shields.io/badge/pub-v4.1.0-brightgreen)](https://pub.dev/packages/angel3_sync) [![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/sync/LICENSE) -Easily synchronize and scale WebSockets using package:angel3_pub_sub. +Easily synchronize and scale WebSockets using package:belatuk_pub_sub. ## Usage This package exposes `PubSubSynchronizationChannel`, which can simply be dropped into any `AngelWebSocket` constructor. Once you've set that up, instances of your application will automatically fire events in-sync. That's all you have to do -to scale a real-time application with Angel! +to scale a real-time application with Angel3! ```dart await app.configure(AngelWebSocket( - synchronizationChannel: new PubSubSynchronizationChannel( + synchronizationChannel: PubSubSynchronizationChannel( pub_sub.IsolateClient('', adapter.receivePort.sendPort), ), )); diff --git a/packages/sync/analysis_options.yaml b/packages/sync/analysis_options.yaml index c230cee7..ea2c9e94 100644 --- a/packages/sync/analysis_options.yaml +++ b/packages/sync/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/sync/example/main.dart b/packages/sync/example/main.dart index f654f10c..9699bfa5 100644 --- a/packages/sync/example/main.dart +++ b/packages/sync/example/main.dart @@ -5,8 +5,8 @@ import 'package:angel3_sync/angel3_sync.dart'; import 'package:angel3_test/angel3_test.dart'; import 'package:angel3_websocket/io.dart' as client; import 'package:angel3_websocket/server.dart'; -import 'package:angel3_pub_sub/isolate.dart' as pub_sub; -import 'package:angel3_pub_sub/angel3_pub_sub.dart' as pub_sub; +import 'package:belatuk_pub_sub/isolate.dart' as pub_sub; +import 'package:belatuk_pub_sub/belatuk_pub_sub.dart' as pub_sub; import 'package:test/test.dart'; void main() { diff --git a/packages/sync/lib/angel3_sync.dart b/packages/sync/lib/angel3_sync.dart index 6c463bd9..e9cc4e05 100644 --- a/packages/sync/lib/angel3_sync.dart +++ b/packages/sync/lib/angel3_sync.dart @@ -1,6 +1,6 @@ import 'dart:async'; import 'package:angel3_websocket/angel3_websocket.dart'; -import 'package:angel3_pub_sub/angel3_pub_sub.dart' as pub_sub; +import 'package:belatuk_pub_sub/belatuk_pub_sub.dart' as pub_sub; import 'package:stream_channel/stream_channel.dart'; /// Synchronizes WebSockets using `package:pub_sub`. diff --git a/packages/sync/pubspec.yaml b/packages/sync/pubspec.yaml index e18fc0fe..6ce1b401 100644 --- a/packages/sync/pubspec.yaml +++ b/packages/sync/pubspec.yaml @@ -1,6 +1,6 @@ name: angel3_sync -version: 4.0.0 -description: Easily synchronize and scale WebSockets using package:angel3_pub_sub for Angel3. +version: 4.1.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 environment: @@ -8,9 +8,9 @@ environment: dependencies: angel3_framework: ^4.1.0 angel3_websocket: ^4.0.0 - angel3_pub_sub: ^3.0.0 + belatuk_pub_sub: ^4.0.0 stream_channel: ^2.1.0 dev_dependencies: angel3_test: ^4.0.0 test: ^1.17.8 - pedantic: ^1.11.1 \ No newline at end of file + lints: ^1.0.0 \ No newline at end of file diff --git a/packages/sync/test/all_test.dart b/packages/sync/test/all_test.dart index 4f628ce4..e732e841 100644 --- a/packages/sync/test/all_test.dart +++ b/packages/sync/test/all_test.dart @@ -5,8 +5,8 @@ import 'package:angel3_sync/angel3_sync.dart'; import 'package:angel3_test/angel3_test.dart'; import 'package:angel3_websocket/io.dart' as client; import 'package:angel3_websocket/server.dart'; -import 'package:angel3_pub_sub/isolate.dart' as pub_sub; -import 'package:angel3_pub_sub/angel3_pub_sub.dart' as pub_sub; +import 'package:belatuk_pub_sub/isolate.dart' as pub_sub; +import 'package:belatuk_pub_sub/belatuk_pub_sub.dart' as pub_sub; import 'package:test/test.dart'; void main() {