Skip to content

Commit f3ed310

Browse files
committed
Merge branch 'main' into feat/cupertino
2 parents 0264076 + d729fa4 commit f3ed310

Some content is hidden

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

47 files changed

+4154
-98
lines changed

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,51 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## 2025-06-10
7+
8+
### Changes
9+
10+
---
11+
12+
Packages with breaking changes:
13+
14+
- There are no breaking changes in this release.
15+
16+
Packages with other changes:
17+
18+
- [`functions_client` - `v2.4.3`](#functions_client---v243)
19+
- [`gotrue` - `v2.13.0`](#gotrue---v2130)
20+
- [`realtime_client` - `v2.5.1`](#realtime_client---v251)
21+
- [`supabase` - `v2.8.0`](#supabase---v280)
22+
- [`supabase_flutter` - `v2.9.1`](#supabase_flutter---v291)
23+
24+
Packages with dependency updates only:
25+
26+
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
27+
28+
- `supabase_flutter` - `v2.9.1`
29+
30+
---
31+
32+
#### `functions_client` - `v2.4.3`
33+
34+
- **FIX**(functions_client): Handle binary data request properly and improve test coverage ([#1184](https://github.com/supabase/supabase-flutter/issues/1184)). ([e6c9420e](https://github.com/supabase/supabase-flutter/commit/e6c9420e5c3c310c2aac7f9626727e68e1b7ddf3))
35+
36+
#### `gotrue` - `v2.13.0`
37+
38+
- **REFACTOR**(gotrue): Remove unused _currentUser field and update currentUser documentation. ([#1168](https://github.com/supabase/supabase-flutter/issues/1168)). ([88ed5d88](https://github.com/supabase/supabase-flutter/commit/88ed5d88508842465a7085c95c93e5059297e9c1))
39+
- **FIX**(auth): Validate uuid params in admin methods ([#1171](https://github.com/supabase/supabase-flutter/issues/1171)). ([369dcc24](https://github.com/supabase/supabase-flutter/commit/369dcc24313bfe8fa95ad6eac50041916f88cad3))
40+
- **FEAT**(gotrue): Add phone mfa enrollment ([#1188](https://github.com/supabase/supabase-flutter/issues/1188)). ([944afcde](https://github.com/supabase/supabase-flutter/commit/944afcde66e2b52621f5a01c849b62ea37081c66))
41+
42+
#### `realtime_client` - `v2.5.1`
43+
44+
- **FIX**(realtime): Send version when joining channel and remove jwt check ([#1166](https://github.com/supabase/supabase-flutter/issues/1166)). ([9ccd890d](https://github.com/supabase/supabase-flutter/commit/9ccd890d950a1c009fd77320033fc7a87783dbcd))
45+
46+
#### `supabase` - `v2.8.0`
47+
48+
- **FEAT**: Add standard client headers ([#1130](https://github.com/supabase/supabase-flutter/issues/1130)). ([f33c9fe2](https://github.com/supabase/supabase-flutter/commit/f33c9fe2f67fc83d19904a53e0b71e7cec5cee53))
49+
50+
651
## 2025-04-28
752

853
### Changes

infra/gotrue/docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
version: '3'
33
services:
44
gotrue: # Signup enabled, autoconfirm on
5-
image: supabase/auth:v2.151.0
5+
image: supabase/auth:v2.175.0
66
ports:
77
- '9998:9998'
88
environment:
@@ -27,6 +27,8 @@ services:
2727
GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI: http://localhost:9998/callback
2828
GOTRUE_SECURITY_MANUAL_LINKING_ENABLED: 'true'
2929
GOTRUE_EXTERNAL_ANONYMOUS_USERS_ENABLED: 'true'
30+
GOTRUE_MFA_PHONE_ENROLL_ENABLED: 'true'
31+
GOTRUE_MFA_PHONE_VERIFY_ENABLED: 'true'
3032

3133
depends_on:
3234
- db

packages/functions_client/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.4.3
2+
3+
- **FIX**(functions_client): Handle binary data request properly and improve test coverage ([#1184](https://github.com/supabase/supabase-flutter/issues/1184)). ([e6c9420e](https://github.com/supabase/supabase-flutter/commit/e6c9420e5c3c310c2aac7f9626727e68e1b7ddf3))
4+
15
## 2.4.2
26

37
- **FIX**: FunctionException implements Exception ([#1134](https://github.com/supabase/supabase-flutter/issues/1134)). ([79edb81c](https://github.com/supabase/supabase-flutter/commit/79edb81c478ade80baab32c70740e988a692c85d))

packages/functions_client/lib/src/functions_client.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,16 @@ class FunctionsClient {
119119
} else {
120120
final bodyRequest = http.Request(method.value, uri);
121121

122-
final String? bodyStr;
123122
if (body == null) {
124-
bodyStr = null;
123+
// No body to set
125124
} else if (body is String) {
126-
bodyStr = body;
125+
bodyRequest.body = body;
126+
} else if (body is Uint8List) {
127+
bodyRequest.bodyBytes = body;
127128
} else {
128-
bodyStr = await _isolate.encode(body);
129+
final bodyStr = await _isolate.encode(body);
130+
bodyRequest.body = bodyStr;
129131
}
130-
if (bodyStr != null) bodyRequest.body = bodyStr;
131132
request = bodyRequest;
132133
}
133134

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
const version = '2.4.2';
1+
const version = '2.4.3';

packages/functions_client/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: functions_client
22
description: A dart client library for the Supabase functions.
3-
version: 2.4.2
3+
version: 2.4.3
44
homepage: 'https://supabase.com'
55
repository: 'https://github.com/supabase/supabase-flutter/tree/main/packages/functions_client'
66
documentation: 'https://supabase.com/docs/reference/dart/functions-invoke'

packages/functions_client/test/custom_http_client.dart

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class CustomHttpClient extends BaseClient {
2424
headers: {
2525
"Content-Type": "application/json",
2626
},
27+
reasonPhrase: "Enhance Your Calm",
2728
);
2829
} else if (request.url.path.endsWith('sse')) {
2930
return StreamedResponse(
@@ -32,8 +33,37 @@ class CustomHttpClient extends BaseClient {
3233
headers: {
3334
"Content-Type": "text/event-stream",
3435
});
36+
} else if (request.url.path.endsWith('binary')) {
37+
return StreamedResponse(
38+
Stream.value([1, 2, 3, 4, 5]),
39+
200,
40+
request: request,
41+
headers: {
42+
"Content-Type": "application/octet-stream",
43+
},
44+
);
45+
} else if (request.url.path.endsWith('text')) {
46+
return StreamedResponse(
47+
Stream.value(utf8.encode('Hello World')),
48+
200,
49+
request: request,
50+
headers: {
51+
"Content-Type": "text/plain",
52+
},
53+
);
54+
} else if (request.url.path.endsWith('empty-json')) {
55+
return StreamedResponse(
56+
Stream.value([]),
57+
200,
58+
request: request,
59+
headers: {
60+
"Content-Type": "application/json",
61+
},
62+
);
3563
} else {
3664
final Stream<List<int>> stream;
65+
final Map<String, String> headers;
66+
3767
if (request is MultipartRequest) {
3868
stream = Stream.value(
3969
utf8.encode(jsonEncode([
@@ -44,16 +74,27 @@ class CustomHttpClient extends BaseClient {
4474
}
4575
])),
4676
);
77+
headers = {"Content-Type": "application/json"};
4778
} else {
48-
stream = Stream.value(utf8.encode(jsonEncode({"key": "Hello World"})));
79+
// Check if the request contains binary data (Uint8List)
80+
final isOctetStream =
81+
request.headers['Content-Type'] == 'application/octet-stream';
82+
if (isOctetStream) {
83+
// Return the original binary data
84+
final bodyBytes = (request as Request).bodyBytes;
85+
stream = Stream.value(bodyBytes);
86+
headers = {"Content-Type": "application/octet-stream"};
87+
} else {
88+
stream =
89+
Stream.value(utf8.encode(jsonEncode({"key": "Hello World"})));
90+
headers = {"Content-Type": "application/json"};
91+
}
4992
}
5093
return StreamedResponse(
5194
stream,
5295
200,
5396
request: request,
54-
headers: {
55-
"Content-Type": "application/json",
56-
},
97+
headers: headers,
5798
);
5899
}
59100
}

0 commit comments

Comments
 (0)