@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 +7 -1
- package/dist/index.js.map +2 -2
- package/dist/index.js.meta.json +1 -1
- package/dist/package.json +4 -4
- package/dist/src/db/couch/connections.d.ts +1 -1
- package/dist/src/db/couch/connections.js +9 -1
- package/dist/src/db/couch/connections.js.map +1 -1
- package/package.json +4 -4
- package/src/db/couch/connections.ts +9 -1
- package/src/db/tests/connections.spec.ts +22 -0
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
|
-
|
|
56198
|
+
// clean out any auth credentials
|
|
56199
|
+
sqlUrl: getUrlInfo(sqlUrl).url,
|
|
56194
56200
|
auth: {
|
|
56195
56201
|
username,
|
|
56196
56202
|
password
|