backendless 7.4.1 → 7.4.3
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 +13 -10
- package/dist/backendless.js.map +1 -1
- package/dist/backendless.min.js +2 -2
- package/package.json +2 -2
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.3
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2012-2023 BACKENDLESS.COM. All Rights Reserved.
|
|
6
6
|
*
|
|
@@ -12583,6 +12583,7 @@ exports.castArray = void 0;
|
|
|
12583
12583
|
exports.ensureEncoding = ensureEncoding;
|
|
12584
12584
|
exports.getFormData = getFormData;
|
|
12585
12585
|
exports.isStream = exports.isObject = exports.isNodeJS = exports.isFormData = exports.isBrowser = void 0;
|
|
12586
|
+
exports.normalizeTrailingSlashInPath = normalizeTrailingSlashInPath;
|
|
12586
12587
|
exports.setFormData = setFormData;
|
|
12587
12588
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12588
12589
|
/**
|
|
@@ -12642,21 +12643,25 @@ function ensureComponentEncoding(uriComponent) {
|
|
|
12642
12643
|
}
|
|
12643
12644
|
return uriComponent;
|
|
12644
12645
|
}
|
|
12645
|
-
function encodePath(path
|
|
12646
|
-
if (!keepLastSlash && path.endsWith('/')) {
|
|
12647
|
-
path = path.slice(0, -1);
|
|
12648
|
-
}
|
|
12646
|
+
function encodePath(path) {
|
|
12649
12647
|
return path.split('/').map(ensureComponentEncoding).join('/');
|
|
12650
12648
|
}
|
|
12651
12649
|
function ensureEncoding(path) {
|
|
12652
12650
|
try {
|
|
12653
12651
|
var url = new URL(path);
|
|
12654
|
-
|
|
12655
|
-
return url.origin + encodePath(url.pathname, keepLastSlash) + url.search;
|
|
12652
|
+
return url.origin + encodePath(normalizeTrailingSlashInPath(path, url)) + url.search;
|
|
12656
12653
|
} catch (_unused) {
|
|
12657
12654
|
return encodePath(path);
|
|
12658
12655
|
}
|
|
12659
12656
|
}
|
|
12657
|
+
function normalizeTrailingSlashInPath(originPath, _ref) {
|
|
12658
|
+
var pathname = _ref.pathname;
|
|
12659
|
+
if (originPath.includes('?')) {
|
|
12660
|
+
originPath = originPath.split('?')[0];
|
|
12661
|
+
}
|
|
12662
|
+
var keepTrailingSlash = originPath.endsWith('/');
|
|
12663
|
+
return !keepTrailingSlash && pathname.endsWith('/') ? pathname.slice(0, -1) : pathname;
|
|
12664
|
+
}
|
|
12660
12665
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
|
|
12661
12666
|
|
|
12662
12667
|
/***/ }),
|
|
@@ -13070,13 +13075,11 @@ function sendNodeAPIRequest(path, method, headers, body, encoding, timeout, with
|
|
|
13070
13075
|
return new Promise(function (resolve, reject) {
|
|
13071
13076
|
var u = __webpack_require__(8).parse(path);
|
|
13072
13077
|
var form = (0, _utils.isFormData)(body) && body;
|
|
13073
|
-
var keepLastSlash = path.endsWith('/');
|
|
13074
|
-
var pathname = !keepLastSlash && u.pathname.endsWith('/') ? u.pathname.slice(0, -1) : u.pathname;
|
|
13075
13078
|
var https = u.protocol === 'https:';
|
|
13076
13079
|
var options = {
|
|
13077
13080
|
host: u.hostname,
|
|
13078
13081
|
port: u.port || (https ? 443 : 80),
|
|
13079
|
-
path:
|
|
13082
|
+
path: (0, _utils.normalizeTrailingSlashInPath)(path, u) + (u.search || ''),
|
|
13080
13083
|
method: method,
|
|
13081
13084
|
headers: headers,
|
|
13082
13085
|
timeout: timeout
|