Skip to content

Commit d3b87a6

Browse files
authored
Merge pull request #175 from GetStream/upload-core
2 parents 3f6b93d + b8a7640 commit d3b87a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1962
-110
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
name: Build
22

3-
on:
4-
push:
5-
pull_request:
3+
on: [push, pull_request]
64

5+
# cancel in progress builds
6+
# new pushes to the same branch will cancel old builds.
7+
concurrency:
8+
group: ${{ github.head_ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
build:
913
runs-on: ubuntu-latest
@@ -12,7 +16,6 @@ jobs:
1216
matrix:
1317
channel:
1418
- dev
15-
# - stable
1619

1720
steps:
1821
- uses: actions/checkout@v2

melos.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: stream_feed_flutter
22

33
packages:
44
- packages/**
5-
- example/**
65

76
scripts:
87
format:

packages/stream_feed/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.0+2: 22/12/2021
2+
3+
- fix: export image_storage_client.dart
4+
15
## 0.4.0+1: 07/12/2021
26

37
- fix: support null values `extraData`'s map

packages/stream_feed/example/main.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ Future<void> main() async {
4040
final user1 = clientWithSecret.flatFeed('user', '1');
4141

4242
// Create an activity object
43-
var activity = Activity(actor: 'User:1', verb: 'pin', object: 'Place:42');
43+
var activity =
44+
const Activity(actor: 'User:1', verb: 'pin', object: 'Place:42');
4445

4546
// Add an activity to the feed
4647
final pinActivity = await user1.addActivity(activity);
@@ -77,7 +78,7 @@ Future<void> main() async {
7778
secret: secret,
7879
appId: appId,
7980
runner: Runner.server,
80-
options: StreamHttpClientOptions(location: Location.usEast),
81+
options: const StreamHttpClientOptions(location: Location.usEast),
8182
);
8283

8384
final userToken = client.frontendToken('user.id');
@@ -103,7 +104,7 @@ Future<void> main() async {
103104
object: "3",
104105
time: now,
105106
foreignId: "like:3",
106-
extraData: {
107+
extraData: const {
107108
'popularity': 100,
108109
});
109110

@@ -207,7 +208,7 @@ Future<void> main() async {
207208
// Add the activity to Eric's feed and to Jessica's notification feed
208209
activity = Activity(
209210
actor: 'user:Eric',
210-
extraData: {
211+
extraData: const {
211212
'message': "@Jessica check out getstream.io it's awesome!",
212213
},
213214
verb: 'tweet',
@@ -316,7 +317,7 @@ Future<void> main() async {
316317

317318
// First create a collection entry with upsert api
318319
await clientWithSecret.collections.upsert('food', [
319-
CollectionEntry(id: 'cheese-burger', data: {'name': 'Cheese Burger'}),
320+
const CollectionEntry(id: 'cheese-burger', data: {'name': 'Cheese Burger'}),
320321
]);
321322

322323
// Then create a user
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export 'analytics_client.dart';
22
export 'file_storage_client.dart';
33
export 'flat_feed.dart';
4+
export 'image_storage_client.dart';
45
export 'reactions_client.dart';
56
export 'stream_feed_client.dart';
67
export 'stream_user.dart';

packages/stream_feed/lib/src/client/stream_feed_client_impl.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class StreamFeedClientImpl implements StreamFeedClient {
3838
StreamFeedClientImpl(
3939
this.apiKey, {
4040
this.secret,
41-
this.userToken,
41+
this.userToken, //TODO(sacha): remove this and call _ensureCredentials
42+
//in the getters instead (collections etc)
4243
this.appId,
4344
this.fayeUrl = 'wss://faye-us-east.stream-io-api.com/faye',
4445
this.runner = Runner.client,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export 'location.dart';
22
export 'stream_http_client.dart' show StreamHttpClientOptions;
33
export 'token.dart';
4+
export 'typedefs.dart';

packages/stream_feed/lib/src/core/http/stream_http_client_options.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class StreamHttpClientOptions {
4040

4141
/// Get the current user agent
4242
String get _userAgent => 'stream-feed-dart-client-${CurrentPlatform.name}-'
43-
'${packageVersion.split('+')[0]}';
43+
'${packageVersion.split('+')[0]}'; //TODO(sacha):add a parameter to StreamHttpClientOptions to specify the package used (llc,core,ui)
4444

4545
/// Generates a baseUrl using the provided [serviceName]
4646
String _getBaseUrl(String serviceName) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
/// Current package version
22
/// Used in [HttpClient] to build the `x-stream-client` header
3-
const String packageVersion = '0.4.0+1';
3+
const String packageVersion = '0.4.0+2';

packages/stream_feed/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: stream_feed
22
description: Stream Feed official Dart SDK. Build your own feed experience using Dart and Flutter.
3-
version: 0.4.0+1
3+
version: 0.4.0+2
44
repository: https://github.com/GetStream/stream-feed-flutter
55
issue_tracker: https://github.com/GetStream/stream-feed-flutter/issues
66
homepage: https://getstream.io/

0 commit comments

Comments
 (0)