Commit e039805
authored
Large scale refactoring (#14)
* Update CI
* Add example
* Update launch.json and Makefile
* Update Spinify implementation and deprecate old version
* Refactor deprecated transport files
* Refactor nested exception visitor in SpinifyException
* Refactor health check and connection timers
* Change transport
* Refactor transport implementation and WebSocket connection
- Refactor the transport implementation in Spinify to use the WebSocket interface.
- Add a new method `_webSocketConnect` to handle WebSocket connection.
- Remove the deprecated `web_socket_stub.dart` file.
Closes #123
* Refactor transport implementation and WebSocket connection
* Update version and dependencies in pubspec.yaml.g.dart
* Add mockito
* Refactor WebSocket connection and transport implementation
* Refactor WebSocket connection and transport implementation
* Add codec test
* Refactor encoding benchmarks for protobuf commands
* Refactor _doOnReady method to handle different Spinify connection states
* Refactor _setState method to handle different Spinify connection states
* Refactor SpinifyReplyException constructor to include error parameter
* Add configuration file for issue templates
* Refactor WebSocket$JS to use synchronous StreamController
* Refactor SpinifyMetrics class to include getters for messagesSent and messagesReceived
* Refactor SpinifyMetrics class to include getters for messagesSent and messagesReceived
* Refactor SpinifyMetrics class to remove unused import
* Refactor SpinifyMetrics class to remove unused import and include getters for messagesSent and messagesReceived
Refactor WebSocket$JS to use synchronous StreamController
* Refactor SpinifyMetrics class to include handleDone method for handling WebSocket disconnection
* Add close codes
* Added missing literal
* Refactor SpinifyMetrics class to include handleDone method for handling WebSocket disconnection
* Normalize disconnect code and reason in SpinifyDisconnectCode
* Refactor error handling in Spinify connect method
* Update tests
* Normalize disconnect code and reason in SpinifyDisconnectCode
* Add test for server subscriptions
* Refactor SpinifyReplyResult mixin and add test for server subscriptions
* Refactor Spinify connect method error handling
* Refactor Makefile to generate coverage report for unit tests only
* Refactor Spinify connect method to enforce channel validation
* Refactor Spinify presence and presenceStats methods to handle subscription not found
* Refactor Spinify.dart to use synchronous broadcasting for state and event controllers
* Refactor Spinify.dart to remove unused code and add internal annotation
* Refactor codec_test.dart to remove unused import
* Refactor Pubspec.dart to update timestamp
* Refactor Spinify.dart to use synchronous broadcasting for state and event controllers
* Check ping - pong
* Refactor Spinify.dart to start refresh connection timer and expect ping messages
* Refactor exception.dart to add SpinifyRPCException
* Refactor Spinify_test.dart to update exception types in client.send and client.rpc
* Refactor Spinify.dart to handle subscription errors and prevent duplicate subscriptions
* Refactor Spinify.dart to handle subscription removal and error handling
* Refactor Spinify.dart to handle subscription removal and error handling
* Refactor SpinifyProtobufReplyDecoder to handle error messages in Spinify.dart
* Cover protobuf codec
* Refactor SpinifyServerSubscription test to use a fake WebSocket and handle server subscription
* Refactor SpinifyServerSubscription test to include additional assertions
* Refactor Spinify.dart to handle subscription removal and error handling
* Refactor Spinify.dart to handle subscription removal and error handling
* Refactor Spinify.dart to handle subscription removal, error handling, and token refresh
* Refactor Spinify.dart to handle invalid ping interval
* Refactor WebSocket$Fake and Spinify to improve null safety and connection handling
* Update .gitignore to exclude reports and .reports directories
* Refactor Makefile to simplify build pipeline and add CI support
* Refactor Spinify.dart to improve null safety, connection handling, and error handling
* Refactor Spinify_test.dart to handle disconnection during connection
* Refactor Spinify_test.dart to remove skipped test case
* Refactor Spinify_test.dart to remove redundant try-catch block and improve disconnection handling
* Refactor asyncGuarded function to add optional error ignoring capability
* Refactor Spinify.dart to improve null safety, connection handling, and error handling
* Refactor Spinify.dart to improve null safety, connection handling, and error handling
* Refactor Spinify.dart to improve error handling and connection handling
* Refactor unit tests and improve asyncGuarded error handling
* Add utility functions for map and list equality checks; enhance equality and hashCode implementations in model classes
* Add hasId property to SpinifyReply subclasses to indicate ID presence; enhance unit tests for reply instances
* Implement Comparable for SpinifyStateBase and add comprehensive unit tests for state instances
* Enhance unit tests for SpinifyState by adding comprehensive mapping checks for all state types
* Add unit tests for SpinifyStatesStream to validate stream behavior for all state types
* Add metric test
* Add subscription test
* Refactor guarded functions to remove debugger calls and add unit tests for utility functions
* Add mutex benchmark for measuring performance of different mutex implementations
* Refactor mutex benchmark to use different mutex implementations
* Refactor mutex benchmark to use different mutex implementations
* Refactor mutex benchmark to use different mutex implementations and add a new mutex implementation called _MutexEncapsulated
* Refactor mutex benchmark to include new mutex implementation and remove commented code
* Refactor mutex benchmark to use different mutex implementations and add new mutex implementation
* Refactor mutex implementation to introduce _Mutex$Request class and update locking mechanisms
* Add mutex lock for all spinify interactives methods
* Add tests for multiple connections and closure behavior in spinify client
* Refactor Spinify interface and exception handling; remove deprecated transport and enhance mutex release logic
* Enhance mutex handling in Spinify close and removeSubscription methods; improve error handling and clean up test cases
* Refactor mutex test cases to improve value handling and ensure correct locking behavior
* Refactor value handling in util test cases to ensure correct order of operations during locking
* Enhance disconnect method in Spinify to support forced disconnection; improve mutex handling and ensure all operations complete before disconnecting
* Update tests
* Enhance Spinify error handling during connection retries; improve test cases for temporary and permanent connection errors
* Update Spinify tests to verify connection retry behavior and state transitions; adjust expected retry and disconnect metrics
* Refactor Spinify subscriptions: remove unused server subscription test and update test imports; enhance ping timer management in spinify_test
* Update test
* Check server subscriptions
* Enhance SpinifyChannelEvent: add copyWith method for channel modification; update event handling in _SpinifyClientSubscriptionImpl
* Refactor Spinify subscription states: add toString methods for better debugging; enhance unsubscribe logic in Spinify and _SpinifyClientSubscriptionImpl
* Disable echo server and smoke test at CI
* Update GitHub Actions workflow: modify pub-cache environment variable and improve caching logic for dependencies
* Update smoke tests1 parent f91ea04 commit e039805
61 files changed
Lines changed: 10805 additions & 3613 deletions
File tree
- .github
- ISSUE_TEMPLATE
- workflows
- .vscode
- benchmark
- example/echo
- lib
- src
- model
- protobuf
- util
- test
- smoke
- unit
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
6 | 23 | | |
7 | 24 | | |
8 | 25 | | |
| |||
16 | 33 | | |
17 | 34 | | |
18 | 35 | | |
19 | | - | |
| 36 | + | |
20 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
21 | 48 | | |
22 | 49 | | |
23 | 50 | | |
| |||
29 | 56 | | |
30 | 57 | | |
31 | 58 | | |
32 | | - | |
| 59 | + | |
33 | 60 | | |
34 | 61 | | |
35 | 62 | | |
| |||
51 | 78 | | |
52 | 79 | | |
53 | 80 | | |
54 | | - | |
55 | | - | |
| 81 | + | |
| 82 | + | |
56 | 83 | | |
57 | 84 | | |
58 | 85 | | |
| |||
63 | 90 | | |
64 | 91 | | |
65 | 92 | | |
| 93 | + | |
66 | 94 | | |
67 | 95 | | |
68 | 96 | | |
69 | | - | |
70 | | - | |
| 97 | + | |
| 98 | + | |
71 | 99 | | |
72 | | - | |
| 100 | + | |
73 | 101 | | |
74 | 102 | | |
75 | | - | |
| 103 | + | |
| 104 | + | |
76 | 105 | | |
77 | 106 | | |
78 | 107 | | |
| |||
99 | 128 | | |
100 | 129 | | |
101 | 130 | | |
102 | | - | |
| 131 | + | |
103 | 132 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments