File tree Expand file tree Collapse file tree
supabase-anonymous-auth/lib
supabase-edge-function-auth/lib
supabase-todolist-drift/lib
supabase-todolist-optional-sync/lib
supabase-trello/lib/protocol Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ import './app_config.dart';
55Future <void > loadSupabase () async {
66 await Supabase .initialize (
77 url: AppConfig .supabaseUrl,
8- anonKey : AppConfig .supabaseAnonKey,
8+ publishableKey : AppConfig .supabaseAnonKey,
99 );
1010}
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ import './app_config.dart';
55Future <void > loadSupabase () async {
66 await Supabase .initialize (
77 url: AppConfig .supabaseUrl,
8- anonKey : AppConfig .supabaseAnonKey,
8+ publishableKey : AppConfig .supabaseAnonKey,
99 );
1010}
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ import './app_config.dart';
55Future <void > loadSupabase () async {
66 await Supabase .initialize (
77 url: AppConfig .supabaseUrl,
8- anonKey : AppConfig .supabaseAnonKey,
8+ publishableKey : AppConfig .supabaseAnonKey,
99 );
1010}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ part 'supabase.g.dart';
1212Future <void > loadSupabase () async {
1313 await Supabase .initialize (
1414 url: AppConfig .supabaseUrl,
15- anonKey : AppConfig .supabaseAnonKey,
15+ publishableKey : AppConfig .supabaseAnonKey,
1616 );
1717}
1818
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ import './app_config.dart';
55Future <void > loadSupabase () async {
66 await Supabase .initialize (
77 url: AppConfig .supabaseUrl,
8- anonKey : AppConfig .supabaseAnonKey,
8+ publishableKey : AppConfig .supabaseAnonKey,
99 );
1010}
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ import './app_config.dart';
55Future <void > loadSupabase () async {
66 await Supabase .initialize (
77 url: AppConfig .supabaseUrl,
8- anonKey : AppConfig .supabaseAnonKey,
8+ publishableKey : AppConfig .supabaseAnonKey,
99 );
1010}
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ class PowerSyncClient {
187187 Future <void > _loadSupabase () async {
188188 await Supabase .initialize (
189189 url: dotenv.env['SUPABASE_URL' ]! ,
190- anonKey : dotenv.env['SUPABASE_ANON_KEY' ]! ,
190+ publishableKey : dotenv.env['SUPABASE_ANON_KEY' ]! ,
191191 );
192192 }
193193
Original file line number Diff line number Diff line change 1- ## 2.3.0 (unreleased)
1+ ## 2.3.0
22
33- Add ` SyncOptions.httpClient ` to ` SyncOptions ` . It can be set to make PowerSync use a custom HTTP client when connecting to the PowerSync Service.
4+ - Support ` sqlite3_web ` versions 0.9.x.
45
56## 2.2.0
67
Original file line number Diff line number Diff line change 1- const String libraryVersion = '2.2 .0' ;
1+ const String libraryVersion = '2.3 .0' ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import 'sync_worker.dart';
1414import 'worker_utils.dart' ;
1515
1616final _isSharedWorker = globalContext.has ('SharedWorkerGlobalScope' );
17+ final _isDedicatedWorker = globalContext.has ('DedicatedWorkerGlobalScope' );
1718
1819void main () {
1920 final controller = PowerSyncAsyncSqliteController ();
@@ -71,4 +72,14 @@ final class _Environment implements WorkerEnvironment {
7172 final Stream <MessageEvent > incomingMessages;
7273
7374 _Environment (this .connector, this .incomingMessages);
75+
76+ @override
77+ void close () {
78+ // Don't close shared workers when sqlite3_web asks us to: The worker is
79+ // also used for sync, not just for databases. So we shouldn't close it
80+ // just because a database has been closed.
81+ if (_isDedicatedWorker) {
82+ (globalContext as DedicatedWorkerGlobalScope ).close ();
83+ }
84+ }
7485}
You can’t perform that action at this time.
0 commit comments