@@ -6,7 +6,7 @@ import com.powersync.connectors.PowerSyncBackendConnector
66import com.powersync.connectors.PowerSyncCredentials
77import com.powersync.db.crud.CrudEntry
88import com.powersync.db.crud.UpdateType
9- import com.powersync.db.runWrappedSuspending
9+ import com.powersync.db.runWrapped
1010import io.github.jan.supabase.SupabaseClient
1111import io.github.jan.supabase.annotations.SupabaseInternal
1212import io.github.jan.supabase.auth.Auth
@@ -115,7 +115,7 @@ public class SupabaseConnector(
115115 email : String ,
116116 password : String ,
117117 ) {
118- runWrappedSuspending {
118+ runWrapped {
119119 supabaseClient.auth.signInWith(Email ) {
120120 this .email = email
121121 this .password = password
@@ -127,7 +127,7 @@ public class SupabaseConnector(
127127 email : String ,
128128 password : String ,
129129 ) {
130- runWrappedSuspending {
130+ runWrapped {
131131 supabaseClient.auth.signUpWith(Email ) {
132132 this .email = email
133133 this .password = password
@@ -136,7 +136,7 @@ public class SupabaseConnector(
136136 }
137137
138138 public suspend fun signOut () {
139- runWrappedSuspending {
139+ runWrapped {
140140 supabaseClient.auth.signOut()
141141 }
142142 }
@@ -146,7 +146,7 @@ public class SupabaseConnector(
146146 public val sessionStatus: StateFlow <SessionStatus > = supabaseClient.auth.sessionStatus
147147
148148 public suspend fun loginAnonymously () {
149- runWrappedSuspending {
149+ runWrapped {
150150 supabaseClient.auth.signInAnonymously()
151151 }
152152 }
@@ -155,7 +155,7 @@ public class SupabaseConnector(
155155 * Get credentials for PowerSync.
156156 */
157157 override suspend fun fetchCredentials (): PowerSyncCredentials =
158- runWrappedSuspending {
158+ runWrapped {
159159 check(supabaseClient.auth.sessionStatus.value is SessionStatus .Authenticated ) { " Supabase client is not authenticated" }
160160
161161 // Use Supabase token for PowerSync
@@ -178,8 +178,8 @@ public class SupabaseConnector(
178178 * If this call throws an error, it is retried periodically.
179179 */
180180 override suspend fun uploadData (database : PowerSyncDatabase ) {
181- return runWrappedSuspending {
182- val transaction = database.getNextCrudTransaction() ? : return @runWrappedSuspending
181+ return runWrapped {
182+ val transaction = database.getNextCrudTransaction() ? : return @runWrapped
183183
184184 var lastEntry: CrudEntry ? = null
185185 try {
@@ -227,7 +227,7 @@ public class SupabaseConnector(
227227 Logger .e(" Data upload error: ${e.message} " )
228228 Logger .e(" Discarding entry: $lastEntry " )
229229 transaction.complete(null )
230- return @runWrappedSuspending
230+ return @runWrapped
231231 }
232232
233233 Logger .e(" Data upload error - retrying last entry: $lastEntry , $e " )
0 commit comments