@powersync/common 1.57.0 → 1.57.2

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.
@@ -2110,7 +2110,7 @@ class SyncStatus {
2110
2110
  });
2111
2111
  }
2112
2112
  /**
2113
- * All sync streams currently being tracked in teh database.
2113
+ * All sync streams currently being tracked in the database.
2114
2114
  *
2115
2115
  * This returns null when the database is currently being opened and we don't have reliable information about all
2116
2116
  * included streams yet.
@@ -8604,7 +8604,7 @@ function requireDist () {
8604
8604
 
8605
8605
  var distExports = requireDist();
8606
8606
 
8607
- var version = "1.57.0";
8607
+ var version = "1.57.2";
8608
8608
  var PACKAGE = {
8609
8609
  version: version};
8610
8610
 
@@ -9218,6 +9218,9 @@ class AbstractRemote {
9218
9218
  if (!res.ok || !res.body) {
9219
9219
  const text = await res.text();
9220
9220
  this.logger.error(`Could not POST streaming to ${path} - ${res.status} - ${res.statusText}: ${text}`);
9221
+ if (res.status === 401) {
9222
+ this.invalidateCredentials();
9223
+ }
9221
9224
  const error = new Error(`HTTP ${res.statusText}: ${text}`);
9222
9225
  error.status = res.status;
9223
9226
  throw error;
@@ -10355,7 +10358,12 @@ class TriggerManagerImpl {
10355
10358
  // destination table consistent.
10356
10359
  await this.db.writeTransaction(async (tx) => {
10357
10360
  const callbackResult = await options.onChange({
10358
- ...tx,
10361
+ execute: (query, params) => tx.execute(query, params),
10362
+ executeBatch: (query, params) => tx.executeBatch(query, params),
10363
+ executeRaw: (query, params) => tx.executeRaw(query, params),
10364
+ get: (query, params) => tx.get(query, params),
10365
+ getAll: (query, params) => tx.getAll(query, params),
10366
+ getOptional: (query, params) => tx.getOptional(query, params),
10359
10367
  destinationTable: destination,
10360
10368
  withDiff: async (query, params, options) => {
10361
10369
  // Wrap the query to expose the destination table