@budibase/backend-core 2.29.8 → 2.29.9

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.
package/dist/index.js CHANGED
@@ -56188,9 +56188,15 @@ var getCouchInfo = (connection) => {
56188
56188
  throw new Error("CouchDB password not set");
56189
56189
  }
56190
56190
  const authCookie = Buffer.from(`${username}:${password}`).toString("base64");
56191
+ let sqlUrl = environment_default.COUCH_DB_SQL_URL;
56192
+ if (!sqlUrl && urlInfo.url) {
56193
+ const parsed = new URL(urlInfo.url);
56194
+ sqlUrl = urlInfo.url.replace(parsed.port, "4984");
56195
+ }
56191
56196
  return {
56192
56197
  url: urlInfo.url,
56193
- sqlUrl: environment_default.COUCH_DB_SQL_URL,
56198
+ // clean out any auth credentials
56199
+ sqlUrl: getUrlInfo(sqlUrl).url,
56194
56200
  auth: {
56195
56201
  username,
56196
56202
  password