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