Skip to content

Commit

Permalink
Refactor SpinifySubscriptionMixin to use specific implementation clas…
Browse files Browse the repository at this point in the history
…ses for client and server subscriptions
  • Loading branch information
PlugFox committed Jun 12, 2024
1 parent 1735d95 commit 2da3139
Show file tree
Hide file tree
Showing 13 changed files with 989 additions and 2,095 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ generate: get
@dart pub global activate protoc_plugin
@protoc --proto_path=lib/src/protobuf --dart_out=lib/src/protobuf lib/src/protobuf/client.proto
@dart run build_runner build --delete-conflicting-outputs
@dart format -l 80 lib/src/model/pubspec.yaml.g.dart lib/src/protobuf/
@dart format -l 80 lib/src/model/pubspec.yaml.g.dart lib/src/protobuf/ test/

gen: generate

Expand Down
1 change: 1 addition & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ targets:
sources:
- $package$
- lib/**
- test/**
- pubspec.yaml
builders:
pubspec_generator:
Expand Down
2 changes: 1 addition & 1 deletion lib/src/model/channel_events.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extension type SpinifyChannelEvents<T extends SpinifyChannelEvent>(
SpinifyChannelEvents<SpinifyRefresh> refresh({String? channel}) =>
filter<SpinifyRefresh>(channel: channel);

/// Filtered stream of data of [SpinifyChannelEvent].
/// Filtered stream of [SpinifyChannelEvent].
SpinifyChannelEvents<S> filter<S extends SpinifyChannelEvent>(
{String? channel}) =>
SpinifyChannelEvents<S>(transform<S>(StreamTransformer<T, S>.fromHandlers(
Expand Down
19 changes: 13 additions & 6 deletions lib/src/model/pubspec.yaml.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ sealed class Pubspec {
/// Build date and time (UTC)
static final DateTime timestamp = DateTime.utc(
2024,
5,
4,
22,
21,
6,
924,
885,
12,
9,
42,
10,
506,
936,
);

/// Name
Expand Down Expand Up @@ -440,6 +440,13 @@ sealed class Pubspec {
'benchmark_harness': r'^2.2.2',
'lints': r'^3.0.0',
'test': r'^1.24.4',
'fake_async': r'^1.3.1',
'mockito': <String, Object>{
'git': <String, Object>{
'url': r'https://github.com/dart-lang/mockito.git',
'ref': r'master',
},
},
};

/// Dependency overrides
Expand Down
Loading

0 comments on commit 2da3139

Please sign in to comment.