@powersync/web 1.38.6 → 1.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3844,7 +3844,7 @@ class SyncStatus {
3844
3844
  });
3845
3845
  }
3846
3846
  /**
3847
- * All sync streams currently being tracked in teh database.
3847
+ * All sync streams currently being tracked in the database.
3848
3848
  *
3849
3849
  * This returns null when the database is currently being opened and we don't have reliable information about all
3850
3850
  * included streams yet.
@@ -12709,7 +12709,7 @@ function requireDist () {
12709
12709
 
12710
12710
  var distExports = requireDist();
12711
12711
 
12712
- var version = "1.57.0";
12712
+ var version = "1.57.2";
12713
12713
  var PACKAGE = {
12714
12714
  version: version};
12715
12715
 
@@ -13323,6 +13323,9 @@ class AbstractRemote {
13323
13323
  if (!res.ok || !res.body) {
13324
13324
  const text = await res.text();
13325
13325
  this.logger.error(`Could not POST streaming to ${path} - ${res.status} - ${res.statusText}: ${text}`);
13326
+ if (res.status === 401) {
13327
+ this.invalidateCredentials();
13328
+ }
13326
13329
  const error = new Error(`HTTP ${res.statusText}: ${text}`);
13327
13330
  error.status = res.status;
13328
13331
  throw error;
@@ -14460,7 +14463,12 @@ class TriggerManagerImpl {
14460
14463
  // destination table consistent.
14461
14464
  await this.db.writeTransaction(async (tx) => {
14462
14465
  const callbackResult = await options.onChange({
14463
- ...tx,
14466
+ execute: (query, params) => tx.execute(query, params),
14467
+ executeBatch: (query, params) => tx.executeBatch(query, params),
14468
+ executeRaw: (query, params) => tx.executeRaw(query, params),
14469
+ get: (query, params) => tx.get(query, params),
14470
+ getAll: (query, params) => tx.getAll(query, params),
14471
+ getOptional: (query, params) => tx.getOptional(query, params),
14464
14472
  destinationTable: destination,
14465
14473
  withDiff: async (query, params, options) => {
14466
14474
  // Wrap the query to expose the destination table