Skip to content

Commit 422f178

Browse files
update from main
2 parents 0bb04bc + 35d1ff9 commit 422f178

File tree

23 files changed

+347
-330
lines changed

23 files changed

+347
-330
lines changed
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
// Copy this template: `cp lib/app_config_template.dart lib/app_config.dart`
2+
// Edit lib/app_config.dart and enter your Supabase and PowerSync project details.
13
class AppConfig {
2-
static const String supabaseUrl = 'https://jrimaqxlgrpjipgssldo.supabase.co';
3-
static const String supabaseAnonKey =
4-
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpyaW1hcXhsZ3JwamlwZ3NzbGRvIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTE1ODY5MTAsImV4cCI6MjAwNzE2MjkxMH0.K-Qb-YFz0oVpLshUEezGU-Do-sX08zKqBzVccDoZp_Y';
4+
static const String supabaseUrl = 'https://foo.supabase.co';
5+
static const String supabaseAnonKey = 'foo';
56
}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
// Copy this template: `cp lib/app_config_template.dart lib/app_config.dart`
2+
// Edit lib/app_config.dart and enter your Supabase and PowerSync project details.
13
class AppConfig {
2-
static const String supabaseUrl = 'https://jrimaqxlgrpjipgssldo.supabase.co';
3-
static const String supabaseAnonKey =
4-
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpyaW1hcXhsZ3JwamlwZ3NzbGRvIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTE1ODY5MTAsImV4cCI6MjAwNzE2MjkxMH0.K-Qb-YFz0oVpLshUEezGU-Do-sX08zKqBzVccDoZp_Y';
4+
static const String supabaseUrl = 'https://foo.supabase.co';
5+
static const String supabaseAnonKey = 'foo';
56
}
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
// Copy this template: `cp lib/app_config_template.dart lib/app_config.dart`
2+
// Edit lib/app_config.dart and enter your Supabase and PowerSync project details.
13
class AppConfig {
2-
static const String supabaseUrl = 'https://aaaaaaaaaaaa.supabase.co';
3-
static const String supabaseAnonKey = 'eyeyeyeyeyeye';
4-
static const String powersyncUrl =
5-
'https://65130c9db6679a3682ba380a.powersync.journeyapps.com';
4+
static const String supabaseUrl = 'https://foo.supabase.co';
5+
static const String supabaseAnonKey = 'foo';
6+
static const String powersyncUrl = 'https://foo.powersync.journeyapps.com';
67
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
// Copy this template: `cp lib/app_config_template.dart lib/app_config.dart`
2+
// Edit lib/app_config.dart and enter your Supabase and PowerSync project details.
13
class AppConfig {
2-
static const String supabaseUrl = 'https://jrimaqxlgrpjipgssldo.supabase.co';
3-
static const String supabaseAnonKey =
4-
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpyaW1hcXhsZ3JwamlwZ3NzbGRvIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTE1ODY5MTAsImV4cCI6MjAwNzE2MjkxMH0.K-Qb-YFz0oVpLshUEezGU-Do-sX08zKqBzVccDoZp_Y';
5-
static const String powersyncUrl =
6-
'https://64d392172a3c226cddbd5070.powersync.journeyapps.com';
4+
static const String supabaseUrl = 'https://foo.supabase.co';
5+
static const String supabaseAnonKey = 'foo';
6+
static const String powersyncUrl = 'https://foo.powersync.journeyapps.com';
77
static const String supabaseStorageBucket =
8-
''; // Optional if you want to test out attachments
8+
''; // Optional. Only required when syncing attachments and using Supabase Storage. See packages/powersync_attachments_helper.
99
}

demos/supabase-todolist/lib/attachments/photo_capture_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class _TakePhotoWidgetState extends State<TakePhotoWidget> {
5858
int photoSize = await photo.length();
5959

6060
TodoItem.addPhoto(photoId, widget.todoId);
61-
attachmentQueue.savePhoto(photoId, photoSize);
61+
attachmentQueue.saveFile(photoId, photoSize);
6262
} catch (e) {
6363
log.info('Error taking photo: $e');
6464
}

demos/supabase-todolist/lib/attachments/queue.dart

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,15 @@ class PhotoAttachmentQueue extends AbstractAttachmentQueue {
3939
}
4040

4141
@override
42-
Future<Attachment> savePhoto(String photoId, int size) async {
43-
String filename = '$photoId.jpg';
42+
Future<Attachment> saveFile(String fileId, int size,
43+
{mediaType = 'image/jpeg'}) async {
44+
String filename = '$fileId.jpg';
45+
4446
Attachment photoAttachment = Attachment(
45-
id: photoId,
47+
id: fileId,
4648
filename: filename,
4749
state: AttachmentState.queuedUpload.index,
48-
mediaType: 'image/jpeg',
50+
mediaType: mediaType,
4951
localUri: getLocalFilePathSuffix(filename),
5052
size: size,
5153
);
@@ -54,10 +56,11 @@ class PhotoAttachmentQueue extends AbstractAttachmentQueue {
5456
}
5557

5658
@override
57-
Future<Attachment> deletePhoto(String photoId) async {
58-
String filename = '$photoId.jpg';
59+
Future<Attachment> deleteFile(String fileId) async {
60+
String filename = '$fileId.jpg';
61+
5962
Attachment photoAttachment = Attachment(
60-
id: photoId,
63+
id: fileId,
6164
filename: filename,
6265
state: AttachmentState.queuedDelete.index);
6366

demos/supabase-todolist/lib/widgets/todo_item_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class TodoItemWidget extends StatelessWidget {
2323

2424
Future<void> deleteTodo(TodoItem todo) async {
2525
if (todo.photoId != null) {
26-
attachmentQueue.deletePhoto(todo.photoId!);
26+
attachmentQueue.deleteFile(todo.photoId!);
2727
}
2828
await todo.delete();
2929
}

demos/supabase-todolist/pubspec.lock

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ packages:
1313
dependency: transitive
1414
description:
1515
name: archive
16-
sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d"
16+
sha256: "0763b45fa9294197a2885c8567927e2830ade852e5c896fd4ab7e0e348d0f373"
1717
url: "https://pub.dev"
1818
source: hosted
19-
version: "3.4.10"
19+
version: "3.5.0"
2020
async:
2121
dependency: transitive
2222
description:
@@ -97,14 +97,6 @@ packages:
9797
url: "https://pub.dev"
9898
source: hosted
9999
version: "1.18.0"
100-
convert:
101-
dependency: transitive
102-
description:
103-
name: convert
104-
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
105-
url: "https://pub.dev"
106-
source: hosted
107-
version: "3.1.1"
108100
cross_file:
109101
dependency: transitive
110102
description:
@@ -212,10 +204,10 @@ packages:
212204
dependency: transitive
213205
description:
214206
name: functions_client
215-
sha256: "9a0ab83a525c8691a6724746e642de755a299afa04158807787364cd9e718001"
207+
sha256: a70b0dd9a1c35d05d1141557f7e49ffe4de5f450ffde31755a9eeeadca03b8ee
216208
url: "https://pub.dev"
217209
source: hosted
218-
version: "2.0.0"
210+
version: "2.1.0"
219211
gotrue:
220212
dependency: transitive
221213
description:
@@ -260,10 +252,10 @@ packages:
260252
dependency: transitive
261253
description:
262254
name: js
263-
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
255+
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
264256
url: "https://pub.dev"
265257
source: hosted
266-
version: "0.6.7"
258+
version: "0.7.1"
267259
jwt_decode:
268260
dependency: transitive
269261
description:
@@ -364,10 +356,10 @@ packages:
364356
dependency: "direct main"
365357
description:
366358
name: path_provider
367-
sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
359+
sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161
368360
url: "https://pub.dev"
369361
source: hosted
370-
version: "2.1.2"
362+
version: "2.1.3"
371363
path_provider_android:
372364
dependency: transitive
373365
description:
@@ -490,18 +482,18 @@ packages:
490482
dependency: transitive
491483
description:
492484
name: shared_preferences
493-
sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02"
485+
sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180
494486
url: "https://pub.dev"
495487
source: hosted
496-
version: "2.2.2"
488+
version: "2.2.3"
497489
shared_preferences_android:
498490
dependency: transitive
499491
description:
500492
name: shared_preferences_android
501-
sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06"
493+
sha256: "1ee8bf911094a1b592de7ab29add6f826a7331fb854273d55918693d5364a1f2"
502494
url: "https://pub.dev"
503495
source: hosted
504-
version: "2.2.1"
496+
version: "2.2.2"
505497
shared_preferences_foundation:
506498
dependency: transitive
507499
description:
@@ -575,10 +567,10 @@ packages:
575567
dependency: transitive
576568
description:
577569
name: sqlite3_flutter_libs
578-
sha256: d6c31c8511c441d1f12f20b607343df1afe4eddf24a1cf85021677c8eea26060
570+
sha256: fb2a106a2ea6042fe57de2c47074cc31539a941819c91e105b864744605da3f5
579571
url: "https://pub.dev"
580572
source: hosted
581-
version: "0.5.20"
573+
version: "0.5.21"
582574
sqlite_async:
583575
dependency: "direct main"
584576
description:
@@ -687,10 +679,10 @@ packages:
687679
dependency: transitive
688680
description:
689681
name: url_launcher_android
690-
sha256: d4ed0711849dd8e33eb2dd69c25db0d0d3fdc37e0a62e629fe32f57a22db2745
682+
sha256: "360a6ed2027f18b73c8d98e159dda67a61b7f2e0f6ec26e86c3ada33b0621775"
691683
url: "https://pub.dev"
692684
source: hosted
693-
version: "6.3.0"
685+
version: "6.3.1"
694686
url_launcher_ios:
695687
dependency: transitive
696688
description:

packages/powersync/CHANGELOG.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 1.3.1
2+
3+
- Fix "Checksum mismatch" issue when calling `PowerSyncDatabase.connect` multiple times.
4+
5+
## 1.3.0
6+
7+
- Add `crudThrottleTime` option to arguments when running `PowerSyncDatabase.connect` to set throttle time for crud operations.
8+
19
## 1.3.0-alpha.4
210

311
- Merge master branch in and resolve conflicts
@@ -15,10 +23,6 @@
1523

1624
- Added initial support for Web platform.
1725

18-
## 1.3.0
19-
20-
- Add `crudThrottleTime` option to arguments when running `PowerSyncDatabase.connect` to set throttle time for crud operations.
21-
2226
## 1.2.2
2327

2428
- Deprecate DevConnector and related

0 commit comments

Comments
 (0)