backendless 7.4.0 → 7.4.1
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/backendless.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* ********************************************************************************************************************
|
|
3
|
-
* Backendless SDK for JavaScript. Version: 7.4.
|
|
3
|
+
* Backendless SDK for JavaScript. Version: 7.4.1
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2012-2023 BACKENDLESS.COM. All Rights Reserved.
|
|
6
6
|
*
|
|
@@ -12642,8 +12642,8 @@ function ensureComponentEncoding(uriComponent) {
|
|
|
12642
12642
|
}
|
|
12643
12643
|
return uriComponent;
|
|
12644
12644
|
}
|
|
12645
|
-
function encodePath(path) {
|
|
12646
|
-
if (path.endsWith('/')) {
|
|
12645
|
+
function encodePath(path, keepLastSlash) {
|
|
12646
|
+
if (!keepLastSlash && path.endsWith('/')) {
|
|
12647
12647
|
path = path.slice(0, -1);
|
|
12648
12648
|
}
|
|
12649
12649
|
return path.split('/').map(ensureComponentEncoding).join('/');
|
|
@@ -12651,7 +12651,8 @@ function encodePath(path) {
|
|
|
12651
12651
|
function ensureEncoding(path) {
|
|
12652
12652
|
try {
|
|
12653
12653
|
var url = new URL(path);
|
|
12654
|
-
|
|
12654
|
+
var keepLastSlash = path.endsWith('/');
|
|
12655
|
+
return url.origin + encodePath(url.pathname, keepLastSlash) + url.search;
|
|
12655
12656
|
} catch (_unused) {
|
|
12656
12657
|
return encodePath(path);
|
|
12657
12658
|
}
|
|
@@ -13069,7 +13070,8 @@ function sendNodeAPIRequest(path, method, headers, body, encoding, timeout, with
|
|
|
13069
13070
|
return new Promise(function (resolve, reject) {
|
|
13070
13071
|
var u = __webpack_require__(8).parse(path);
|
|
13071
13072
|
var form = (0, _utils.isFormData)(body) && body;
|
|
13072
|
-
var
|
|
13073
|
+
var keepLastSlash = path.endsWith('/');
|
|
13074
|
+
var pathname = !keepLastSlash && u.pathname.endsWith('/') ? u.pathname.slice(0, -1) : u.pathname;
|
|
13073
13075
|
var https = u.protocol === 'https:';
|
|
13074
13076
|
var options = {
|
|
13075
13077
|
host: u.hostname,
|