backendless 7.0.2 → 7.0.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 +29 -8
- package/dist/backendless.js.map +1 -1
- package/dist/backendless.min.js +2 -2
- package/es/logging/index.js +1 -2
- package/lib/logging/index.js +1 -2
- package/package.json +2 -2
- package/src/logging/index.js +1 -2
package/dist/backendless.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* ********************************************************************************************************************
|
|
3
|
-
* Backendless SDK for JavaScript. Version: 7.0.
|
|
3
|
+
* Backendless SDK for JavaScript. Version: 7.0.3
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2012-2023 BACKENDLESS.COM. All Rights Reserved.
|
|
6
6
|
*
|
|
@@ -7072,7 +7072,7 @@ var Logging = /*#__PURE__*/function () {
|
|
|
7072
7072
|
this.messages = [];
|
|
7073
7073
|
this.numOfMessages = 10;
|
|
7074
7074
|
this.timeFrequency = 1;
|
|
7075
|
-
this.messagesLimit =
|
|
7075
|
+
this.messagesLimit = 1000;
|
|
7076
7076
|
}
|
|
7077
7077
|
}, {
|
|
7078
7078
|
key: "loadLoggingLevels",
|
|
@@ -7150,7 +7150,6 @@ var Logging = /*#__PURE__*/function () {
|
|
|
7150
7150
|
'log-level': logLevel,
|
|
7151
7151
|
timestamp: Date.now()
|
|
7152
7152
|
});
|
|
7153
|
-
this.checkMessagesLimit();
|
|
7154
7153
|
this.checkMessagesLen();
|
|
7155
7154
|
}
|
|
7156
7155
|
}, {
|
|
@@ -12339,6 +12338,7 @@ var Request = /*#__PURE__*/function (_EventEmitter) {
|
|
|
12339
12338
|
_this.queryParams = {};
|
|
12340
12339
|
_this.encoding = 'utf8';
|
|
12341
12340
|
_this.timeout = 0;
|
|
12341
|
+
_this.withCredentials = null;
|
|
12342
12342
|
return _this;
|
|
12343
12343
|
}
|
|
12344
12344
|
|
|
@@ -12490,6 +12490,19 @@ var Request = /*#__PURE__*/function (_EventEmitter) {
|
|
|
12490
12490
|
return this;
|
|
12491
12491
|
}
|
|
12492
12492
|
|
|
12493
|
+
/**
|
|
12494
|
+
* set withCredentials option
|
|
12495
|
+
*
|
|
12496
|
+
* @param {Boolean} value
|
|
12497
|
+
* @returns {Request}
|
|
12498
|
+
*/
|
|
12499
|
+
}, {
|
|
12500
|
+
key: "setWithCredentials",
|
|
12501
|
+
value: function setWithCredentials(value) {
|
|
12502
|
+
this.withCredentials = value;
|
|
12503
|
+
return this;
|
|
12504
|
+
}
|
|
12505
|
+
|
|
12493
12506
|
/**
|
|
12494
12507
|
* A number specifying request timeout in milliseconds.
|
|
12495
12508
|
* @param {Number} ms
|
|
@@ -12558,7 +12571,8 @@ var Request = /*#__PURE__*/function (_EventEmitter) {
|
|
|
12558
12571
|
if (Request.verbose) {
|
|
12559
12572
|
console.log(this.method.toUpperCase(), decodeURIComponent(path), body, this.headers);
|
|
12560
12573
|
}
|
|
12561
|
-
var
|
|
12574
|
+
var withCredentials = typeof this.withCredentials === 'boolean' ? this.withCredentials : Request.withCredentials;
|
|
12575
|
+
var request = Request.send(path, this.method.toUpperCase(), this.headers, body, this.encoding, this.timeout, withCredentials).then(parseBody).then(checkStatus).then(unwrapBody).then(cacheResponse).then(flushCache);
|
|
12562
12576
|
request.then(function (result) {
|
|
12563
12577
|
_this3.emit(RESPONSE_EVENT, result);
|
|
12564
12578
|
_this3.emit(DONE_EVENT, null, result);
|
|
@@ -12641,11 +12655,12 @@ Object.defineProperty(_request.Request, 'FormData', {
|
|
|
12641
12655
|
}
|
|
12642
12656
|
});
|
|
12643
12657
|
_request.Request.XMLHttpRequest = typeof XMLHttpRequest !== 'undefined' ? XMLHttpRequest : undefined;
|
|
12644
|
-
_request.Request.send = function (path, method, headers, body, encoding, timeout) {
|
|
12658
|
+
_request.Request.send = function (path, method, headers, body, encoding, timeout, withCredentials) {
|
|
12645
12659
|
var sender = typeof _request.Request.XMLHttpRequest !== 'undefined' ? _clientBrowser.sendXmlHttpRequest : _clientNode.sendNodeAPIRequest;
|
|
12646
|
-
return sender(path, method, headers, body, encoding, timeout);
|
|
12660
|
+
return sender(path, method, headers, body, encoding, timeout, withCredentials);
|
|
12647
12661
|
};
|
|
12648
12662
|
_request.Request.verbose = false;
|
|
12663
|
+
_request.Request.withCredentials = false;
|
|
12649
12664
|
_request.Request.methods = ['get', 'post', 'put', 'patch', 'delete'];
|
|
12650
12665
|
_request.Request.methods.forEach(function (method) {
|
|
12651
12666
|
_request.Request[method] = function (path, body) {
|
|
@@ -12668,7 +12683,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
12668
12683
|
});
|
|
12669
12684
|
exports.sendNodeAPIRequest = sendNodeAPIRequest;
|
|
12670
12685
|
var _utils = __webpack_require__(0);
|
|
12671
|
-
function sendNodeAPIRequest(path, method, headers, body, encoding, timeout) {
|
|
12686
|
+
function sendNodeAPIRequest(path, method, headers, body, encoding, timeout, withCredentials) {
|
|
12672
12687
|
return new Promise(function (resolve, reject) {
|
|
12673
12688
|
var u = __webpack_require__(6).parse(path);
|
|
12674
12689
|
var form = (0, _utils.isFormData)(body) && body;
|
|
@@ -12681,6 +12696,9 @@ function sendNodeAPIRequest(path, method, headers, body, encoding, timeout) {
|
|
|
12681
12696
|
headers: headers,
|
|
12682
12697
|
timeout: timeout
|
|
12683
12698
|
};
|
|
12699
|
+
if (typeof withCredentials === 'boolean') {
|
|
12700
|
+
options.withCredentials = withCredentials;
|
|
12701
|
+
}
|
|
12684
12702
|
var _send = function _send() {
|
|
12685
12703
|
var Buffer = __webpack_require__(1).Buffer;
|
|
12686
12704
|
var httpClient = __webpack_require__(https ? 7 : 8);
|
|
@@ -12785,7 +12803,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
12785
12803
|
});
|
|
12786
12804
|
exports.sendXmlHttpRequest = sendXmlHttpRequest;
|
|
12787
12805
|
var _request2 = __webpack_require__(2);
|
|
12788
|
-
function sendXmlHttpRequest(path, method, headers, body, encoding, timeout) {
|
|
12806
|
+
function sendXmlHttpRequest(path, method, headers, body, encoding, timeout, withCredentials) {
|
|
12789
12807
|
return new Promise(function sendRequest(resolve, reject) {
|
|
12790
12808
|
var request = new _request2.Request.XMLHttpRequest();
|
|
12791
12809
|
request.timeout = timeout;
|
|
@@ -12793,6 +12811,9 @@ function sendXmlHttpRequest(path, method, headers, body, encoding, timeout) {
|
|
|
12793
12811
|
request.responseType = 'arraybuffer';
|
|
12794
12812
|
}
|
|
12795
12813
|
request.open(method.toUpperCase(), path, true);
|
|
12814
|
+
if (typeof withCredentials === 'boolean') {
|
|
12815
|
+
request.withCredentials = withCredentials;
|
|
12816
|
+
}
|
|
12796
12817
|
request.onload = function handleLoadEvent() {
|
|
12797
12818
|
var headers = parseHeaders(request.getAllResponseHeaders());
|
|
12798
12819
|
var _request = request,
|