backendless 7.4.5 → 7.4.6
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 +25 -11
- package/dist/backendless.js.map +1 -1
- package/dist/backendless.min.js +2 -2
- package/es/index.js +4 -1
- package/es/logging/index.js +17 -9
- package/es/urls.js +3 -0
- package/lib/index.js +4 -1
- package/lib/logging/index.js +17 -9
- package/lib/urls.js +3 -0
- package/package.json +1 -1
- package/src/index.js +5 -1
- package/src/logging/index.js +25 -12
- package/src/urls.js +7 -0
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.6
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2012-2023 BACKENDLESS.COM. All Rights Reserved.
|
|
6
6
|
*
|
|
@@ -6789,7 +6789,10 @@ var Backendless = /*#__PURE__*/function () {
|
|
|
6789
6789
|
if (this.domain) {
|
|
6790
6790
|
return this.domain + this.apiURI;
|
|
6791
6791
|
}
|
|
6792
|
-
|
|
6792
|
+
if (this.appId && this.apiKey) {
|
|
6793
|
+
return [this.serverURL, this.appId, this.apiKey].join('/');
|
|
6794
|
+
}
|
|
6795
|
+
return null;
|
|
6793
6796
|
},
|
|
6794
6797
|
set: function set(appPath) {
|
|
6795
6798
|
throw new Error("Setting '".concat(appPath, "' value to Backendless.appPath directly is not possible, ") + 'instead you must use Backendless.initApp(APP_ID, API_KEY) for setup the value');
|
|
@@ -7386,13 +7389,15 @@ var Logging = /*#__PURE__*/function () {
|
|
|
7386
7389
|
this.stopFlushInterval();
|
|
7387
7390
|
messages = (0, _toConsumableArray2["default"])(this.messages);
|
|
7388
7391
|
this.messages = [];
|
|
7389
|
-
this.flushRequest =
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7392
|
+
this.flushRequest = Promise.resolve().then(function () {
|
|
7393
|
+
return _this2.app.request.put({
|
|
7394
|
+
url: _this2.app.urls.logging(),
|
|
7395
|
+
data: messages
|
|
7396
|
+
})["catch"](function (error) {
|
|
7397
|
+
_this2.messages = [].concat((0, _toConsumableArray2["default"])(messages), (0, _toConsumableArray2["default"])(_this2.messages));
|
|
7398
|
+
_this2.checkMessagesLimit();
|
|
7399
|
+
throw error;
|
|
7400
|
+
});
|
|
7396
7401
|
})["finally"](function () {
|
|
7397
7402
|
return delete _this2.flushRequest;
|
|
7398
7403
|
});
|
|
@@ -7430,7 +7435,10 @@ var Logging = /*#__PURE__*/function () {
|
|
|
7430
7435
|
}
|
|
7431
7436
|
this.checkMessagesLenTimer = setTimeout(function () {
|
|
7432
7437
|
if (_this3.messages.length >= _this3.numOfMessages) {
|
|
7433
|
-
_this3.flush()
|
|
7438
|
+
_this3.flush()["catch"](function (error) {
|
|
7439
|
+
// eslint-disable-next-line no-console
|
|
7440
|
+
console.error('Could not flush log messages immediately: ', error);
|
|
7441
|
+
});
|
|
7434
7442
|
} else {
|
|
7435
7443
|
_this3.startFlushInterval();
|
|
7436
7444
|
}
|
|
@@ -7449,7 +7457,10 @@ var Logging = /*#__PURE__*/function () {
|
|
|
7449
7457
|
var _this4 = this;
|
|
7450
7458
|
if (!this.flushInterval) {
|
|
7451
7459
|
this.flushInterval = setTimeout(function () {
|
|
7452
|
-
|
|
7460
|
+
_this4.flush()["catch"](function (error) {
|
|
7461
|
+
// eslint-disable-next-line no-console
|
|
7462
|
+
console.error('Could not flush log messages with timer: ', error);
|
|
7463
|
+
});
|
|
7453
7464
|
}, this.timeFrequency * 1000);
|
|
7454
7465
|
}
|
|
7455
7466
|
}
|
|
@@ -10369,6 +10380,9 @@ var Urls = /*#__PURE__*/function () {
|
|
|
10369
10380
|
(0, _createClass2["default"])(Urls, [{
|
|
10370
10381
|
key: "root",
|
|
10371
10382
|
value: function root() {
|
|
10383
|
+
if (!this.app.appPath) {
|
|
10384
|
+
throw new Error('Backendless API is not configured, make sure you run Backendless.initApp(...) ' + 'before the operation');
|
|
10385
|
+
}
|
|
10372
10386
|
return this.app.appPath;
|
|
10373
10387
|
}
|
|
10374
10388
|
|