@aws-amplify/core 4.4.1-unstable.6 → 4.4.2-api-logging.4
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/CHANGELOG.md +8 -0
- package/dist/aws-amplify-core.js +1041 -202
- package/dist/aws-amplify-core.js.map +1 -1
- package/dist/aws-amplify-core.min.js +7 -7
- package/dist/aws-amplify-core.min.js.map +1 -1
- package/lib/Logger/ConsoleLogger.d.ts +12 -1
- package/lib/Logger/ConsoleLogger.js +69 -6
- package/lib/Logger/ConsoleLogger.js.map +1 -1
- package/lib/Platform/version.d.ts +1 -1
- package/lib/Platform/version.js +1 -1
- package/lib/Providers/APIProvider/APILoggingProvider.d.ts +28 -0
- package/lib/Providers/APIProvider/APILoggingProvider.js +320 -0
- package/lib/Providers/APIProvider/APILoggingProvider.js.map +1 -0
- package/lib/Providers/APIProvider/CloudWatchEventFormatter.d.ts +5 -0
- package/lib/Providers/APIProvider/CloudWatchEventFormatter.js +78 -0
- package/lib/Providers/APIProvider/CloudWatchEventFormatter.js.map +1 -0
- package/lib/Providers/APIProvider/Fetch.d.ts +10 -0
- package/lib/Providers/APIProvider/Fetch.js +13 -0
- package/lib/Providers/APIProvider/Fetch.js.map +1 -0
- package/lib/Providers/APIProvider/LoggerReachability/index.d.ts +3 -0
- package/lib/Providers/APIProvider/LoggerReachability/index.js +5 -0
- package/lib/Providers/APIProvider/LoggerReachability/index.js.map +1 -0
- package/lib/Providers/APIProvider/LoggerReachability/index.native.d.ts +3 -0
- package/lib/Providers/APIProvider/LoggerReachability/index.native.js +9 -0
- package/lib/Providers/APIProvider/LoggerReachability/index.native.js.map +1 -0
- package/lib/Providers/APIProvider/index.d.ts +1 -0
- package/lib/Providers/APIProvider/index.js +5 -0
- package/lib/Providers/APIProvider/index.js.map +1 -0
- package/lib/Providers/APIProvider/loggerConnectivity.d.ts +14 -0
- package/lib/Providers/APIProvider/loggerConnectivity.js +55 -0
- package/lib/Providers/APIProvider/loggerConnectivity.js.map +1 -0
- package/lib/Providers/AWSCloudWatchProvider.js +8 -1
- package/lib/Providers/AWSCloudWatchProvider.js.map +1 -1
- package/lib/Providers/index.d.ts +1 -0
- package/lib/Providers/index.js +2 -0
- package/lib/Providers/index.js.map +1 -1
- package/lib/Util/Constants.d.ts +3 -1
- package/lib/Util/Constants.js +4 -0
- package/lib/Util/Constants.js.map +1 -1
- package/lib/Util/Reachability.js +7 -5
- package/lib/Util/Reachability.js.map +1 -1
- package/lib/Util/Retry.js +2 -2
- package/lib/Util/Retry.js.map +1 -1
- package/lib/Util/StringUtils.d.ts +1 -0
- package/lib/Util/StringUtils.js +11 -6
- package/lib/Util/StringUtils.js.map +1 -1
- package/lib/types/index.js +4 -0
- package/lib/types/index.js.map +1 -1
- package/lib/types/types.d.ts +38 -1
- package/lib/types/types.js +4 -0
- package/lib/types/types.js.map +1 -1
- package/lib-esm/Logger/ConsoleLogger.d.ts +12 -1
- package/lib-esm/Logger/ConsoleLogger.js +67 -4
- package/lib-esm/Logger/ConsoleLogger.js.map +1 -1
- package/lib-esm/Platform/version.d.ts +1 -1
- package/lib-esm/Platform/version.js +1 -1
- package/lib-esm/Providers/APIProvider/APILoggingProvider.d.ts +28 -0
- package/lib-esm/Providers/APIProvider/APILoggingProvider.js +315 -0
- package/lib-esm/Providers/APIProvider/APILoggingProvider.js.map +1 -0
- package/lib-esm/Providers/APIProvider/CloudWatchEventFormatter.d.ts +5 -0
- package/lib-esm/Providers/APIProvider/CloudWatchEventFormatter.js +76 -0
- package/lib-esm/Providers/APIProvider/CloudWatchEventFormatter.js.map +1 -0
- package/lib-esm/Providers/APIProvider/Fetch.d.ts +10 -0
- package/lib-esm/Providers/APIProvider/Fetch.js +11 -0
- package/lib-esm/Providers/APIProvider/Fetch.js.map +1 -0
- package/lib-esm/Providers/APIProvider/LoggerReachability/index.d.ts +3 -0
- package/lib-esm/Providers/APIProvider/LoggerReachability/index.js +3 -0
- package/lib-esm/Providers/APIProvider/LoggerReachability/index.js.map +1 -0
- package/lib-esm/Providers/APIProvider/LoggerReachability/index.native.d.ts +3 -0
- package/lib-esm/Providers/APIProvider/LoggerReachability/index.native.js +4 -0
- package/lib-esm/Providers/APIProvider/LoggerReachability/index.native.js.map +1 -0
- package/lib-esm/Providers/APIProvider/index.d.ts +1 -0
- package/lib-esm/Providers/APIProvider/index.js +2 -0
- package/lib-esm/Providers/APIProvider/index.js.map +1 -0
- package/lib-esm/Providers/APIProvider/loggerConnectivity.d.ts +14 -0
- package/lib-esm/Providers/APIProvider/loggerConnectivity.js +50 -0
- package/lib-esm/Providers/APIProvider/loggerConnectivity.js.map +1 -0
- package/lib-esm/Providers/AWSCloudWatchProvider.js +8 -1
- package/lib-esm/Providers/AWSCloudWatchProvider.js.map +1 -1
- package/lib-esm/Providers/index.d.ts +1 -0
- package/lib-esm/Providers/index.js +1 -0
- package/lib-esm/Providers/index.js.map +1 -1
- package/lib-esm/Util/Constants.d.ts +3 -1
- package/lib-esm/Util/Constants.js +3 -1
- package/lib-esm/Util/Constants.js.map +1 -1
- package/lib-esm/Util/Reachability.js +5 -3
- package/lib-esm/Util/Reachability.js.map +1 -1
- package/lib-esm/Util/Retry.js +2 -2
- package/lib-esm/Util/Retry.js.map +1 -1
- package/lib-esm/Util/StringUtils.d.ts +1 -0
- package/lib-esm/Util/StringUtils.js +11 -6
- package/lib-esm/Util/StringUtils.js.map +1 -1
- package/lib-esm/types/index.js +1 -0
- package/lib-esm/types/index.js.map +1 -1
- package/lib-esm/types/types.d.ts +38 -1
- package/lib-esm/types/types.js +3 -0
- package/lib-esm/types/types.js.map +1 -1
- package/package.json +2 -2
- package/src/Logger/ConsoleLogger.ts +54 -2
- package/src/Platform/version.ts +1 -1
- package/src/Providers/APIProvider/APILoggingProvider.ts +286 -0
- package/src/Providers/APIProvider/CloudWatchEventFormatter.ts +100 -0
- package/src/Providers/APIProvider/Fetch.ts +10 -0
- package/src/Providers/APIProvider/LoggerReachability/index.native.ts +4 -0
- package/src/Providers/APIProvider/LoggerReachability/index.ts +2 -0
- package/src/Providers/APIProvider/index.ts +1 -0
- package/src/Providers/APIProvider/loggerConnectivity.ts +49 -0
- package/src/Providers/AWSCloudWatchProvider.ts +9 -1
- package/src/Providers/index.ts +1 -0
- package/src/Util/Constants.ts +4 -0
- package/src/Util/Reachability.ts +9 -7
- package/src/Util/Retry.ts +2 -2
- package/src/Util/StringUtils.ts +15 -6
- package/src/types/types.ts +106 -62
package/dist/aws-amplify-core.js
CHANGED
|
@@ -31566,11 +31566,12 @@ function () {
|
|
|
31566
31566
|
/*!*****************************************!*\
|
|
31567
31567
|
!*** ./lib-esm/Logger/ConsoleLogger.js ***!
|
|
31568
31568
|
\*****************************************/
|
|
31569
|
-
/*! exports provided: LOG_TYPE, ConsoleLogger */
|
|
31569
|
+
/*! exports provided: LOG_LEVELS, LOG_TYPE, ConsoleLogger */
|
|
31570
31570
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
31571
31571
|
|
|
31572
31572
|
"use strict";
|
|
31573
31573
|
__webpack_require__.r(__webpack_exports__);
|
|
31574
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOG_LEVELS", function() { return LOG_LEVELS; });
|
|
31574
31575
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOG_TYPE", function() { return LOG_TYPE; });
|
|
31575
31576
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsoleLogger", function() { return ConsoleLogger; });
|
|
31576
31577
|
/* harmony import */ var _Util_Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Util/Constants */ "./lib-esm/Util/Constants.js");
|
|
@@ -31678,6 +31679,10 @@ function () {
|
|
|
31678
31679
|
this._pluggables = [];
|
|
31679
31680
|
}
|
|
31680
31681
|
|
|
31682
|
+
ConsoleLogger.addPluggable = function (pluggable) {
|
|
31683
|
+
ConsoleLogger.pluggables.push(pluggable);
|
|
31684
|
+
};
|
|
31685
|
+
|
|
31681
31686
|
ConsoleLogger.prototype._padding = function (n) {
|
|
31682
31687
|
return n < 10 ? '0' + n : '' + n;
|
|
31683
31688
|
};
|
|
@@ -31692,6 +31697,75 @@ function () {
|
|
|
31692
31697
|
this._config = config;
|
|
31693
31698
|
return this._config;
|
|
31694
31699
|
};
|
|
31700
|
+
|
|
31701
|
+
ConsoleLogger.prototype._logGlobal = function (type) {
|
|
31702
|
+
var e_1, _a;
|
|
31703
|
+
|
|
31704
|
+
var msg = [];
|
|
31705
|
+
|
|
31706
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
31707
|
+
msg[_i - 1] = arguments[_i];
|
|
31708
|
+
}
|
|
31709
|
+
|
|
31710
|
+
try {
|
|
31711
|
+
for (var _b = __values(ConsoleLogger.pluggables), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
31712
|
+
var pluggable = _c.value;
|
|
31713
|
+
pluggable.pushLogs([this._generateLoggerEvent(type, msg)]);
|
|
31714
|
+
}
|
|
31715
|
+
} catch (e_1_1) {
|
|
31716
|
+
e_1 = {
|
|
31717
|
+
error: e_1_1
|
|
31718
|
+
};
|
|
31719
|
+
} finally {
|
|
31720
|
+
try {
|
|
31721
|
+
if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
|
|
31722
|
+
} finally {
|
|
31723
|
+
if (e_1) throw e_1.error;
|
|
31724
|
+
}
|
|
31725
|
+
}
|
|
31726
|
+
};
|
|
31727
|
+
|
|
31728
|
+
ConsoleLogger.prototype._generateLoggerEvent = function (type, msg) {
|
|
31729
|
+
var strMessage = '';
|
|
31730
|
+
var data;
|
|
31731
|
+
var error;
|
|
31732
|
+
|
|
31733
|
+
if (msg.length === 1 && typeof msg[0] === 'string') {
|
|
31734
|
+
strMessage = msg[0];
|
|
31735
|
+
} else if (msg.length === 1) {
|
|
31736
|
+
data = msg[0];
|
|
31737
|
+
} else if (typeof msg[0] === 'string') {
|
|
31738
|
+
var obj = msg.slice(1);
|
|
31739
|
+
|
|
31740
|
+
if (obj.length === 1) {
|
|
31741
|
+
obj = obj[0];
|
|
31742
|
+
}
|
|
31743
|
+
|
|
31744
|
+
strMessage = msg[0];
|
|
31745
|
+
|
|
31746
|
+
if (obj instanceof Error) {
|
|
31747
|
+
error = {
|
|
31748
|
+
message: obj.message,
|
|
31749
|
+
name: obj.name
|
|
31750
|
+
};
|
|
31751
|
+
}
|
|
31752
|
+
|
|
31753
|
+
data = obj;
|
|
31754
|
+
} else {
|
|
31755
|
+
data = msg;
|
|
31756
|
+
}
|
|
31757
|
+
|
|
31758
|
+
return {
|
|
31759
|
+
message: strMessage,
|
|
31760
|
+
timestamp: Date.now(),
|
|
31761
|
+
loggerInfo: {
|
|
31762
|
+
level: type.toLowerCase(),
|
|
31763
|
+
name: this.name,
|
|
31764
|
+
data: data,
|
|
31765
|
+
error: error
|
|
31766
|
+
}
|
|
31767
|
+
};
|
|
31768
|
+
};
|
|
31695
31769
|
/**
|
|
31696
31770
|
* Write log
|
|
31697
31771
|
* @method
|
|
@@ -31702,7 +31776,7 @@ function () {
|
|
|
31702
31776
|
|
|
31703
31777
|
|
|
31704
31778
|
ConsoleLogger.prototype._log = function (type) {
|
|
31705
|
-
var
|
|
31779
|
+
var e_2, _a;
|
|
31706
31780
|
|
|
31707
31781
|
var msg = [];
|
|
31708
31782
|
|
|
@@ -31710,6 +31784,8 @@ function () {
|
|
|
31710
31784
|
msg[_i - 1] = arguments[_i];
|
|
31711
31785
|
}
|
|
31712
31786
|
|
|
31787
|
+
this._logGlobal.apply(this, __spread([type], msg));
|
|
31788
|
+
|
|
31713
31789
|
var logger_level_name = this.level;
|
|
31714
31790
|
|
|
31715
31791
|
if (ConsoleLogger.LOG_LEVEL) {
|
|
@@ -31770,15 +31846,15 @@ function () {
|
|
|
31770
31846
|
};
|
|
31771
31847
|
plugin.pushLogs([logEvent]);
|
|
31772
31848
|
}
|
|
31773
|
-
} catch (
|
|
31774
|
-
|
|
31775
|
-
error:
|
|
31849
|
+
} catch (e_2_1) {
|
|
31850
|
+
e_2 = {
|
|
31851
|
+
error: e_2_1
|
|
31776
31852
|
};
|
|
31777
31853
|
} finally {
|
|
31778
31854
|
try {
|
|
31779
31855
|
if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
|
|
31780
31856
|
} finally {
|
|
31781
|
-
if (
|
|
31857
|
+
if (e_2) throw e_2.error;
|
|
31782
31858
|
}
|
|
31783
31859
|
}
|
|
31784
31860
|
};
|
|
@@ -31897,6 +31973,7 @@ function () {
|
|
|
31897
31973
|
return this._pluggables;
|
|
31898
31974
|
};
|
|
31899
31975
|
|
|
31976
|
+
ConsoleLogger.pluggables = [];
|
|
31900
31977
|
ConsoleLogger.LOG_LEVEL = null;
|
|
31901
31978
|
return ConsoleLogger;
|
|
31902
31979
|
}();
|
|
@@ -31909,12 +31986,14 @@ function () {
|
|
|
31909
31986
|
/*!*********************************!*\
|
|
31910
31987
|
!*** ./lib-esm/Logger/index.js ***!
|
|
31911
31988
|
\*********************************/
|
|
31912
|
-
/*! exports provided: LOG_TYPE, ConsoleLogger */
|
|
31989
|
+
/*! exports provided: LOG_LEVELS, LOG_TYPE, ConsoleLogger */
|
|
31913
31990
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
31914
31991
|
|
|
31915
31992
|
"use strict";
|
|
31916
31993
|
__webpack_require__.r(__webpack_exports__);
|
|
31917
31994
|
/* harmony import */ var _ConsoleLogger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ConsoleLogger */ "./lib-esm/Logger/ConsoleLogger.js");
|
|
31995
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LOG_LEVELS", function() { return _ConsoleLogger__WEBPACK_IMPORTED_MODULE_0__["LOG_LEVELS"]; });
|
|
31996
|
+
|
|
31918
31997
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LOG_TYPE", function() { return _ConsoleLogger__WEBPACK_IMPORTED_MODULE_0__["LOG_TYPE"]; });
|
|
31919
31998
|
|
|
31920
31999
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConsoleLogger", function() { return _ConsoleLogger__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]; });
|
|
@@ -32492,62 +32571,872 @@ function () {
|
|
|
32492
32571
|
});
|
|
32493
32572
|
};
|
|
32494
32573
|
|
|
32495
|
-
return GoogleOAuth;
|
|
32574
|
+
return GoogleOAuth;
|
|
32575
|
+
}();
|
|
32576
|
+
|
|
32577
|
+
|
|
32578
|
+
/**
|
|
32579
|
+
* @deprecated use named import
|
|
32580
|
+
*/
|
|
32581
|
+
|
|
32582
|
+
/* harmony default export */ __webpack_exports__["default"] = (GoogleOAuth);
|
|
32583
|
+
|
|
32584
|
+
/***/ }),
|
|
32585
|
+
|
|
32586
|
+
/***/ "./lib-esm/OAuthHelper/index.js":
|
|
32587
|
+
/*!**************************************!*\
|
|
32588
|
+
!*** ./lib-esm/OAuthHelper/index.js ***!
|
|
32589
|
+
\**************************************/
|
|
32590
|
+
/*! exports provided: GoogleOAuth, FacebookOAuth */
|
|
32591
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
32592
|
+
|
|
32593
|
+
"use strict";
|
|
32594
|
+
__webpack_require__.r(__webpack_exports__);
|
|
32595
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GoogleOAuth", function() { return GoogleOAuth; });
|
|
32596
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FacebookOAuth", function() { return FacebookOAuth; });
|
|
32597
|
+
/* harmony import */ var _GoogleOAuth__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GoogleOAuth */ "./lib-esm/OAuthHelper/GoogleOAuth.js");
|
|
32598
|
+
/* harmony import */ var _FacebookOAuth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FacebookOAuth */ "./lib-esm/OAuthHelper/FacebookOAuth.js");
|
|
32599
|
+
/*
|
|
32600
|
+
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
32601
|
+
*
|
|
32602
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
32603
|
+
* the License. A copy of the License is located at
|
|
32604
|
+
*
|
|
32605
|
+
* http://aws.amazon.com/apache2.0/
|
|
32606
|
+
*
|
|
32607
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
32608
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
32609
|
+
* and limitations under the License.
|
|
32610
|
+
*/
|
|
32611
|
+
|
|
32612
|
+
|
|
32613
|
+
var GoogleOAuth = new _GoogleOAuth__WEBPACK_IMPORTED_MODULE_0__["GoogleOAuth"]();
|
|
32614
|
+
var FacebookOAuth = new _FacebookOAuth__WEBPACK_IMPORTED_MODULE_1__["FacebookOAuth"]();
|
|
32615
|
+
|
|
32616
|
+
/***/ }),
|
|
32617
|
+
|
|
32618
|
+
/***/ "./lib-esm/Parser.js":
|
|
32619
|
+
/*!***************************!*\
|
|
32620
|
+
!*** ./lib-esm/Parser.js ***!
|
|
32621
|
+
\***************************/
|
|
32622
|
+
/*! exports provided: parseMobileHubConfig, Parser, default */
|
|
32623
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
32624
|
+
|
|
32625
|
+
"use strict";
|
|
32626
|
+
__webpack_require__.r(__webpack_exports__);
|
|
32627
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseMobileHubConfig", function() { return parseMobileHubConfig; });
|
|
32628
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Parser", function() { return Parser; });
|
|
32629
|
+
/* harmony import */ var _Logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Logger */ "./lib-esm/Logger/index.js");
|
|
32630
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
32631
|
+
__assign = Object.assign || function (t) {
|
|
32632
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
32633
|
+
s = arguments[i];
|
|
32634
|
+
|
|
32635
|
+
for (var p in s) {
|
|
32636
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
32637
|
+
}
|
|
32638
|
+
}
|
|
32639
|
+
|
|
32640
|
+
return t;
|
|
32641
|
+
};
|
|
32642
|
+
|
|
32643
|
+
return __assign.apply(this, arguments);
|
|
32644
|
+
};
|
|
32645
|
+
|
|
32646
|
+
|
|
32647
|
+
var logger = new _Logger__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('Parser');
|
|
32648
|
+
var parseMobileHubConfig = function parseMobileHubConfig(config) {
|
|
32649
|
+
var amplifyConfig = {}; // Analytics
|
|
32650
|
+
|
|
32651
|
+
if (config['aws_mobile_analytics_app_id']) {
|
|
32652
|
+
var Analytics = {
|
|
32653
|
+
AWSPinpoint: {
|
|
32654
|
+
appId: config['aws_mobile_analytics_app_id'],
|
|
32655
|
+
region: config['aws_mobile_analytics_app_region']
|
|
32656
|
+
}
|
|
32657
|
+
};
|
|
32658
|
+
amplifyConfig.Analytics = Analytics;
|
|
32659
|
+
} // Auth
|
|
32660
|
+
|
|
32661
|
+
|
|
32662
|
+
if (config['aws_cognito_identity_pool_id'] || config['aws_user_pools_id']) {
|
|
32663
|
+
amplifyConfig.Auth = {
|
|
32664
|
+
userPoolId: config['aws_user_pools_id'],
|
|
32665
|
+
userPoolWebClientId: config['aws_user_pools_web_client_id'],
|
|
32666
|
+
region: config['aws_cognito_region'],
|
|
32667
|
+
identityPoolId: config['aws_cognito_identity_pool_id'],
|
|
32668
|
+
identityPoolRegion: config['aws_cognito_region'],
|
|
32669
|
+
mandatorySignIn: config['aws_mandatory_sign_in'] === 'enable'
|
|
32670
|
+
};
|
|
32671
|
+
} // Storage
|
|
32672
|
+
|
|
32673
|
+
|
|
32674
|
+
var storageConfig;
|
|
32675
|
+
|
|
32676
|
+
if (config['aws_user_files_s3_bucket']) {
|
|
32677
|
+
storageConfig = {
|
|
32678
|
+
AWSS3: {
|
|
32679
|
+
bucket: config['aws_user_files_s3_bucket'],
|
|
32680
|
+
region: config['aws_user_files_s3_bucket_region'],
|
|
32681
|
+
dangerouslyConnectToHttpEndpointForTesting: config['aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing']
|
|
32682
|
+
}
|
|
32683
|
+
};
|
|
32684
|
+
} else {
|
|
32685
|
+
storageConfig = config ? config.Storage || config : {};
|
|
32686
|
+
} // Logging
|
|
32687
|
+
|
|
32688
|
+
|
|
32689
|
+
if (config['Logging']) {
|
|
32690
|
+
amplifyConfig.Logging = __assign(__assign({}, config['Logging']), {
|
|
32691
|
+
region: config['aws_project_region']
|
|
32692
|
+
});
|
|
32693
|
+
} // Geo
|
|
32694
|
+
|
|
32695
|
+
|
|
32696
|
+
if (config['geo']) {
|
|
32697
|
+
amplifyConfig.Geo = Object.assign({}, config.geo);
|
|
32698
|
+
|
|
32699
|
+
if (config.geo['amazon_location_service']) {
|
|
32700
|
+
amplifyConfig.Geo = {
|
|
32701
|
+
AmazonLocationService: config.geo['amazon_location_service']
|
|
32702
|
+
};
|
|
32703
|
+
}
|
|
32704
|
+
}
|
|
32705
|
+
|
|
32706
|
+
amplifyConfig.Analytics = Object.assign({}, amplifyConfig.Analytics, config.Analytics);
|
|
32707
|
+
amplifyConfig.Auth = Object.assign({}, amplifyConfig.Auth, config.Auth);
|
|
32708
|
+
amplifyConfig.Storage = Object.assign({}, storageConfig);
|
|
32709
|
+
amplifyConfig.Logging = Object.assign({}, amplifyConfig.Logging, config.Logging);
|
|
32710
|
+
logger.debug('parse config', config, 'to amplifyconfig', amplifyConfig);
|
|
32711
|
+
return amplifyConfig;
|
|
32712
|
+
};
|
|
32713
|
+
/**
|
|
32714
|
+
* @deprecated use per-function export
|
|
32715
|
+
*/
|
|
32716
|
+
|
|
32717
|
+
var Parser =
|
|
32718
|
+
/** @class */
|
|
32719
|
+
function () {
|
|
32720
|
+
function Parser() {}
|
|
32721
|
+
|
|
32722
|
+
Parser.parseMobilehubConfig = parseMobileHubConfig;
|
|
32723
|
+
return Parser;
|
|
32724
|
+
}();
|
|
32725
|
+
|
|
32726
|
+
|
|
32727
|
+
/**
|
|
32728
|
+
* @deprecated use per-function export
|
|
32729
|
+
*/
|
|
32730
|
+
|
|
32731
|
+
/* harmony default export */ __webpack_exports__["default"] = (Parser);
|
|
32732
|
+
|
|
32733
|
+
/***/ }),
|
|
32734
|
+
|
|
32735
|
+
/***/ "./lib-esm/Platform/index.js":
|
|
32736
|
+
/*!***********************************!*\
|
|
32737
|
+
!*** ./lib-esm/Platform/index.js ***!
|
|
32738
|
+
\***********************************/
|
|
32739
|
+
/*! exports provided: Platform, getAmplifyUserAgent, default */
|
|
32740
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
32741
|
+
|
|
32742
|
+
"use strict";
|
|
32743
|
+
__webpack_require__.r(__webpack_exports__);
|
|
32744
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Platform", function() { return Platform; });
|
|
32745
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAmplifyUserAgent", function() { return getAmplifyUserAgent; });
|
|
32746
|
+
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./version */ "./lib-esm/Platform/version.js");
|
|
32747
|
+
/*
|
|
32748
|
+
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
32749
|
+
*
|
|
32750
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
32751
|
+
* the License. A copy of the License is located at
|
|
32752
|
+
*
|
|
32753
|
+
* http://aws.amazon.com/apache2.0/
|
|
32754
|
+
*
|
|
32755
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
32756
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
32757
|
+
* and limitations under the License.
|
|
32758
|
+
*/
|
|
32759
|
+
|
|
32760
|
+
var BASE_USER_AGENT = "aws-amplify/" + _version__WEBPACK_IMPORTED_MODULE_0__["version"];
|
|
32761
|
+
var Platform = {
|
|
32762
|
+
userAgent: BASE_USER_AGENT + " js",
|
|
32763
|
+
product: '',
|
|
32764
|
+
navigator: null,
|
|
32765
|
+
isReactNative: false
|
|
32766
|
+
};
|
|
32767
|
+
|
|
32768
|
+
if (typeof navigator !== 'undefined' && navigator.product) {
|
|
32769
|
+
Platform.product = navigator.product || '';
|
|
32770
|
+
Platform.navigator = navigator || null;
|
|
32771
|
+
|
|
32772
|
+
switch (navigator.product) {
|
|
32773
|
+
case 'ReactNative':
|
|
32774
|
+
Platform.userAgent = BASE_USER_AGENT + " react-native";
|
|
32775
|
+
Platform.isReactNative = true;
|
|
32776
|
+
break;
|
|
32777
|
+
|
|
32778
|
+
default:
|
|
32779
|
+
Platform.userAgent = BASE_USER_AGENT + " js";
|
|
32780
|
+
Platform.isReactNative = false;
|
|
32781
|
+
break;
|
|
32782
|
+
}
|
|
32783
|
+
}
|
|
32784
|
+
|
|
32785
|
+
var getAmplifyUserAgent = function getAmplifyUserAgent() {
|
|
32786
|
+
return Platform.userAgent;
|
|
32787
|
+
};
|
|
32788
|
+
/**
|
|
32789
|
+
* @deprecated use named import
|
|
32790
|
+
*/
|
|
32791
|
+
|
|
32792
|
+
/* harmony default export */ __webpack_exports__["default"] = (Platform);
|
|
32793
|
+
|
|
32794
|
+
/***/ }),
|
|
32795
|
+
|
|
32796
|
+
/***/ "./lib-esm/Platform/version.js":
|
|
32797
|
+
/*!*************************************!*\
|
|
32798
|
+
!*** ./lib-esm/Platform/version.js ***!
|
|
32799
|
+
\*************************************/
|
|
32800
|
+
/*! exports provided: version */
|
|
32801
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
32802
|
+
|
|
32803
|
+
"use strict";
|
|
32804
|
+
__webpack_require__.r(__webpack_exports__);
|
|
32805
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; });
|
|
32806
|
+
// generated by genversion
|
|
32807
|
+
var version = '4.4.1';
|
|
32808
|
+
|
|
32809
|
+
/***/ }),
|
|
32810
|
+
|
|
32811
|
+
/***/ "./lib-esm/Providers/APIProvider/APILoggingProvider.js":
|
|
32812
|
+
/*!*************************************************************!*\
|
|
32813
|
+
!*** ./lib-esm/Providers/APIProvider/APILoggingProvider.js ***!
|
|
32814
|
+
\*************************************************************/
|
|
32815
|
+
/*! exports provided: APILoggingProvider */
|
|
32816
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
32817
|
+
|
|
32818
|
+
"use strict";
|
|
32819
|
+
__webpack_require__.r(__webpack_exports__);
|
|
32820
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APILoggingProvider", function() { return APILoggingProvider; });
|
|
32821
|
+
/* harmony import */ var _Logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Logger */ "./lib-esm/Logger/index.js");
|
|
32822
|
+
/* harmony import */ var _loggerConnectivity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./loggerConnectivity */ "./lib-esm/Providers/APIProvider/loggerConnectivity.js");
|
|
32823
|
+
/* harmony import */ var _types_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../types/types */ "./lib-esm/types/types.js");
|
|
32824
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ */ "./lib-esm/index.js");
|
|
32825
|
+
/* harmony import */ var _Fetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Fetch */ "./lib-esm/Providers/APIProvider/Fetch.js");
|
|
32826
|
+
/* harmony import */ var _Util_Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Util/Constants */ "./lib-esm/Util/Constants.js");
|
|
32827
|
+
/* harmony import */ var _Util_StringUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Util/StringUtils */ "./lib-esm/Util/StringUtils.js");
|
|
32828
|
+
function _typeof(obj) {
|
|
32829
|
+
"@babel/helpers - typeof";
|
|
32830
|
+
|
|
32831
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
32832
|
+
return typeof obj;
|
|
32833
|
+
} : function (obj) {
|
|
32834
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
32835
|
+
}, _typeof(obj);
|
|
32836
|
+
}
|
|
32837
|
+
|
|
32838
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
32839
|
+
__assign = Object.assign || function (t) {
|
|
32840
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
32841
|
+
s = arguments[i];
|
|
32842
|
+
|
|
32843
|
+
for (var p in s) {
|
|
32844
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
32845
|
+
}
|
|
32846
|
+
}
|
|
32847
|
+
|
|
32848
|
+
return t;
|
|
32849
|
+
};
|
|
32850
|
+
|
|
32851
|
+
return __assign.apply(this, arguments);
|
|
32852
|
+
};
|
|
32853
|
+
|
|
32854
|
+
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
32855
|
+
function adopt(value) {
|
|
32856
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
32857
|
+
resolve(value);
|
|
32858
|
+
});
|
|
32859
|
+
}
|
|
32860
|
+
|
|
32861
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
32862
|
+
function fulfilled(value) {
|
|
32863
|
+
try {
|
|
32864
|
+
step(generator.next(value));
|
|
32865
|
+
} catch (e) {
|
|
32866
|
+
reject(e);
|
|
32867
|
+
}
|
|
32868
|
+
}
|
|
32869
|
+
|
|
32870
|
+
function rejected(value) {
|
|
32871
|
+
try {
|
|
32872
|
+
step(generator["throw"](value));
|
|
32873
|
+
} catch (e) {
|
|
32874
|
+
reject(e);
|
|
32875
|
+
}
|
|
32876
|
+
}
|
|
32877
|
+
|
|
32878
|
+
function step(result) {
|
|
32879
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
32880
|
+
}
|
|
32881
|
+
|
|
32882
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32883
|
+
});
|
|
32884
|
+
};
|
|
32885
|
+
|
|
32886
|
+
var __generator = undefined && undefined.__generator || function (thisArg, body) {
|
|
32887
|
+
var _ = {
|
|
32888
|
+
label: 0,
|
|
32889
|
+
sent: function sent() {
|
|
32890
|
+
if (t[0] & 1) throw t[1];
|
|
32891
|
+
return t[1];
|
|
32892
|
+
},
|
|
32893
|
+
trys: [],
|
|
32894
|
+
ops: []
|
|
32895
|
+
},
|
|
32896
|
+
f,
|
|
32897
|
+
y,
|
|
32898
|
+
t,
|
|
32899
|
+
g;
|
|
32900
|
+
return g = {
|
|
32901
|
+
next: verb(0),
|
|
32902
|
+
"throw": verb(1),
|
|
32903
|
+
"return": verb(2)
|
|
32904
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
32905
|
+
return this;
|
|
32906
|
+
}), g;
|
|
32907
|
+
|
|
32908
|
+
function verb(n) {
|
|
32909
|
+
return function (v) {
|
|
32910
|
+
return step([n, v]);
|
|
32911
|
+
};
|
|
32912
|
+
}
|
|
32913
|
+
|
|
32914
|
+
function step(op) {
|
|
32915
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32916
|
+
|
|
32917
|
+
while (_) {
|
|
32918
|
+
try {
|
|
32919
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
32920
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
32921
|
+
|
|
32922
|
+
switch (op[0]) {
|
|
32923
|
+
case 0:
|
|
32924
|
+
case 1:
|
|
32925
|
+
t = op;
|
|
32926
|
+
break;
|
|
32927
|
+
|
|
32928
|
+
case 4:
|
|
32929
|
+
_.label++;
|
|
32930
|
+
return {
|
|
32931
|
+
value: op[1],
|
|
32932
|
+
done: false
|
|
32933
|
+
};
|
|
32934
|
+
|
|
32935
|
+
case 5:
|
|
32936
|
+
_.label++;
|
|
32937
|
+
y = op[1];
|
|
32938
|
+
op = [0];
|
|
32939
|
+
continue;
|
|
32940
|
+
|
|
32941
|
+
case 7:
|
|
32942
|
+
op = _.ops.pop();
|
|
32943
|
+
|
|
32944
|
+
_.trys.pop();
|
|
32945
|
+
|
|
32946
|
+
continue;
|
|
32947
|
+
|
|
32948
|
+
default:
|
|
32949
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
32950
|
+
_ = 0;
|
|
32951
|
+
continue;
|
|
32952
|
+
}
|
|
32953
|
+
|
|
32954
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
32955
|
+
_.label = op[1];
|
|
32956
|
+
break;
|
|
32957
|
+
}
|
|
32958
|
+
|
|
32959
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
32960
|
+
_.label = t[1];
|
|
32961
|
+
t = op;
|
|
32962
|
+
break;
|
|
32963
|
+
}
|
|
32964
|
+
|
|
32965
|
+
if (t && _.label < t[2]) {
|
|
32966
|
+
_.label = t[2];
|
|
32967
|
+
|
|
32968
|
+
_.ops.push(op);
|
|
32969
|
+
|
|
32970
|
+
break;
|
|
32971
|
+
}
|
|
32972
|
+
|
|
32973
|
+
if (t[2]) _.ops.pop();
|
|
32974
|
+
|
|
32975
|
+
_.trys.pop();
|
|
32976
|
+
|
|
32977
|
+
continue;
|
|
32978
|
+
}
|
|
32979
|
+
|
|
32980
|
+
op = body.call(thisArg, _);
|
|
32981
|
+
} catch (e) {
|
|
32982
|
+
op = [6, e];
|
|
32983
|
+
y = 0;
|
|
32984
|
+
} finally {
|
|
32985
|
+
f = t = 0;
|
|
32986
|
+
}
|
|
32987
|
+
}
|
|
32988
|
+
|
|
32989
|
+
if (op[0] & 5) throw op[1];
|
|
32990
|
+
return {
|
|
32991
|
+
value: op[0] ? op[1] : void 0,
|
|
32992
|
+
done: true
|
|
32993
|
+
};
|
|
32994
|
+
}
|
|
32995
|
+
};
|
|
32996
|
+
|
|
32997
|
+
var __read = undefined && undefined.__read || function (o, n) {
|
|
32998
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
32999
|
+
if (!m) return o;
|
|
33000
|
+
var i = m.call(o),
|
|
33001
|
+
r,
|
|
33002
|
+
ar = [],
|
|
33003
|
+
e;
|
|
33004
|
+
|
|
33005
|
+
try {
|
|
33006
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
33007
|
+
ar.push(r.value);
|
|
33008
|
+
}
|
|
33009
|
+
} catch (error) {
|
|
33010
|
+
e = {
|
|
33011
|
+
error: error
|
|
33012
|
+
};
|
|
33013
|
+
} finally {
|
|
33014
|
+
try {
|
|
33015
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
33016
|
+
} finally {
|
|
33017
|
+
if (e) throw e.error;
|
|
33018
|
+
}
|
|
33019
|
+
}
|
|
33020
|
+
|
|
33021
|
+
return ar;
|
|
33022
|
+
};
|
|
33023
|
+
|
|
33024
|
+
var __spread = undefined && undefined.__spread || function () {
|
|
33025
|
+
for (var ar = [], i = 0; i < arguments.length; i++) {
|
|
33026
|
+
ar = ar.concat(__read(arguments[i]));
|
|
33027
|
+
}
|
|
33028
|
+
|
|
33029
|
+
return ar;
|
|
33030
|
+
};
|
|
33031
|
+
|
|
33032
|
+
|
|
33033
|
+
|
|
33034
|
+
|
|
33035
|
+
|
|
33036
|
+
|
|
33037
|
+
|
|
33038
|
+
|
|
33039
|
+
var logger = new _Logger__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('APILoggingProvider');
|
|
33040
|
+
var HTTPS = 'https';
|
|
33041
|
+
var LOCALHOST = 'http://localhost';
|
|
33042
|
+
var DEFAULT_INTERVAL = 3000; // Exclude these to avoid infinite loop
|
|
33043
|
+
|
|
33044
|
+
var DEFAULT_CLASS_EXCLUDE_LIST = ['APILoggingProvider', 'AWSCloudWatch', 'Retry'];
|
|
33045
|
+
var LAMBDA_PAYLOAD_LIMIT = 6 * 1024 * 1024; // 6MB
|
|
33046
|
+
|
|
33047
|
+
/*
|
|
33048
|
+
Todo:
|
|
33049
|
+
* Refactor this into a FSM - managing state will become complex when remote config functionality gets added in P1
|
|
33050
|
+
*/
|
|
33051
|
+
|
|
33052
|
+
var APILoggingProvider =
|
|
33053
|
+
/** @class */
|
|
33054
|
+
function () {
|
|
33055
|
+
function APILoggingProvider(config) {
|
|
33056
|
+
this.online = false;
|
|
33057
|
+
this.eventBuffer = [];
|
|
33058
|
+
this.configure(config);
|
|
33059
|
+
}
|
|
33060
|
+
|
|
33061
|
+
APILoggingProvider.prototype.getProviderName = function () {
|
|
33062
|
+
return APILoggingProvider.PROVIDER_NAME;
|
|
33063
|
+
};
|
|
33064
|
+
|
|
33065
|
+
APILoggingProvider.prototype.getCategoryName = function () {
|
|
33066
|
+
return APILoggingProvider.CATEGORY;
|
|
33067
|
+
};
|
|
33068
|
+
|
|
33069
|
+
APILoggingProvider.prototype.configure = function (config) {
|
|
33070
|
+
try {
|
|
33071
|
+
this.validateConfig(config);
|
|
33072
|
+
this.config = this.normalizeConfig(config);
|
|
33073
|
+
|
|
33074
|
+
if (this.config.enabled === true) {
|
|
33075
|
+
this.initialize();
|
|
33076
|
+
} else {
|
|
33077
|
+
this.disable();
|
|
33078
|
+
}
|
|
33079
|
+
|
|
33080
|
+
return this.config;
|
|
33081
|
+
} catch (error) {
|
|
33082
|
+
logger.error('Unable to start: ', error);
|
|
33083
|
+
}
|
|
33084
|
+
};
|
|
33085
|
+
|
|
33086
|
+
APILoggingProvider.prototype.pushLogs = function (events) {
|
|
33087
|
+
var _this = this;
|
|
33088
|
+
|
|
33089
|
+
var _a;
|
|
33090
|
+
|
|
33091
|
+
if (((_a = this.config) === null || _a === void 0 ? void 0 : _a.enabled) === false) {
|
|
33092
|
+
return;
|
|
33093
|
+
}
|
|
33094
|
+
|
|
33095
|
+
events.forEach(function (event) {
|
|
33096
|
+
if (!Object(_types_types__WEBPACK_IMPORTED_MODULE_2__["isLoggerEvent"])(event)) {
|
|
33097
|
+
return;
|
|
33098
|
+
}
|
|
33099
|
+
|
|
33100
|
+
var message = event.message,
|
|
33101
|
+
timestamp = event.timestamp,
|
|
33102
|
+
_a = event.loggerInfo,
|
|
33103
|
+
level = _a.level,
|
|
33104
|
+
data = _a.data,
|
|
33105
|
+
name = _a.name,
|
|
33106
|
+
_b = _a.error,
|
|
33107
|
+
_c = _b === void 0 ? {} : _b,
|
|
33108
|
+
errorMessage = _c.message,
|
|
33109
|
+
errorName = _c.name;
|
|
33110
|
+
|
|
33111
|
+
var error = errorName && errorMessage && {
|
|
33112
|
+
errorMessage: errorMessage,
|
|
33113
|
+
errorName: errorName
|
|
33114
|
+
};
|
|
33115
|
+
var combinedEvent = {
|
|
33116
|
+
level: level,
|
|
33117
|
+
error: error,
|
|
33118
|
+
message: message,
|
|
33119
|
+
context: {
|
|
33120
|
+
category: name,
|
|
33121
|
+
data: __assign(__assign({}, data), _this.config.metadata),
|
|
33122
|
+
logTime: timestamp
|
|
33123
|
+
}
|
|
33124
|
+
};
|
|
33125
|
+
|
|
33126
|
+
if (_this.verifyEvent(combinedEvent)) {
|
|
33127
|
+
_this.eventBuffer.push(combinedEvent);
|
|
33128
|
+
}
|
|
33129
|
+
});
|
|
33130
|
+
};
|
|
33131
|
+
|
|
33132
|
+
APILoggingProvider.prototype.validateConfig = function (config) {
|
|
33133
|
+
if (typeof (config === null || config === void 0 ? void 0 : config.endpoint) !== 'string') {
|
|
33134
|
+
throw new Error("Invalid configuration. `config.endpoint` must be a string. Received: " + _typeof(config === null || config === void 0 ? void 0 : config.endpoint));
|
|
33135
|
+
}
|
|
33136
|
+
|
|
33137
|
+
var protocolStr = config.endpoint.substring(0, 5).toLowerCase();
|
|
33138
|
+
var isUsingLocalhost = config.endpoint.substring(0, LOCALHOST.length).toLowerCase() === LOCALHOST;
|
|
33139
|
+
|
|
33140
|
+
if (protocolStr !== HTTPS && !isUsingLocalhost) {
|
|
33141
|
+
throw new Error("Invalid configuration. Only HTTPS endpoints are supported. Received: " + protocolStr);
|
|
33142
|
+
}
|
|
33143
|
+
};
|
|
33144
|
+
|
|
33145
|
+
APILoggingProvider.prototype.normalizeConfig = function (config) {
|
|
33146
|
+
var _a, _b, _c;
|
|
33147
|
+
|
|
33148
|
+
var normalizedConfig = {
|
|
33149
|
+
endpoint: config.endpoint,
|
|
33150
|
+
apiKey: config.apiKey,
|
|
33151
|
+
metadata: config.metadata,
|
|
33152
|
+
enabled: (_a = config.enabled) !== null && _a !== void 0 ? _a : true,
|
|
33153
|
+
level: (_b = config.level) !== null && _b !== void 0 ? _b : _Logger__WEBPACK_IMPORTED_MODULE_0__["LOG_TYPE"].WARN,
|
|
33154
|
+
bufferInterval: (_c = config.bufferInterval) !== null && _c !== void 0 ? _c : DEFAULT_INTERVAL,
|
|
33155
|
+
excludeClassList: config.excludeClassList instanceof Array ? __spread(DEFAULT_CLASS_EXCLUDE_LIST, config.excludeClassList) : DEFAULT_CLASS_EXCLUDE_LIST
|
|
33156
|
+
};
|
|
33157
|
+
return normalizedConfig;
|
|
33158
|
+
};
|
|
33159
|
+
|
|
33160
|
+
APILoggingProvider.prototype.initialize = function () {
|
|
33161
|
+
this.subscribeConnectivity();
|
|
33162
|
+
};
|
|
33163
|
+
|
|
33164
|
+
APILoggingProvider.prototype.disable = function () {
|
|
33165
|
+
this.clearInterval();
|
|
33166
|
+
this.unsubscribeConnectivity();
|
|
33167
|
+
this.eventBuffer = [];
|
|
33168
|
+
};
|
|
33169
|
+
|
|
33170
|
+
APILoggingProvider.prototype.subscribeConnectivity = function () {
|
|
33171
|
+
var _this = this;
|
|
33172
|
+
|
|
33173
|
+
if (this.connectivity) {
|
|
33174
|
+
return;
|
|
33175
|
+
}
|
|
33176
|
+
|
|
33177
|
+
this.connectivity = new _loggerConnectivity__WEBPACK_IMPORTED_MODULE_1__["default"]();
|
|
33178
|
+
this.connectivity.status().subscribe(function (_a) {
|
|
33179
|
+
var online = _a.online;
|
|
33180
|
+
|
|
33181
|
+
if (online && !_this.online) {
|
|
33182
|
+
_this.startInterval();
|
|
33183
|
+
} else {
|
|
33184
|
+
_this.clearInterval();
|
|
33185
|
+
}
|
|
33186
|
+
|
|
33187
|
+
_this.online = online;
|
|
33188
|
+
logger.debug('Connectivity status: ', online);
|
|
33189
|
+
});
|
|
33190
|
+
};
|
|
33191
|
+
|
|
33192
|
+
APILoggingProvider.prototype.unsubscribeConnectivity = function () {
|
|
33193
|
+
if (this.connectivity) {
|
|
33194
|
+
this.connectivity.unsubscribe();
|
|
33195
|
+
this.connectivity = undefined;
|
|
33196
|
+
}
|
|
33197
|
+
};
|
|
33198
|
+
|
|
33199
|
+
APILoggingProvider.prototype.startInterval = function () {
|
|
33200
|
+
var _this = this;
|
|
33201
|
+
|
|
33202
|
+
if (this.bufferInterval) {
|
|
33203
|
+
this.clearInterval();
|
|
33204
|
+
}
|
|
33205
|
+
|
|
33206
|
+
this.bufferInterval = setInterval(function () {
|
|
33207
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
33208
|
+
var error_1;
|
|
33209
|
+
return __generator(this, function (_a) {
|
|
33210
|
+
switch (_a.label) {
|
|
33211
|
+
case 0:
|
|
33212
|
+
_a.trys.push([0, 2,, 3]);
|
|
33213
|
+
|
|
33214
|
+
return [4
|
|
33215
|
+
/*yield*/
|
|
33216
|
+
, this.uploadEvents()];
|
|
33217
|
+
|
|
33218
|
+
case 1:
|
|
33219
|
+
_a.sent();
|
|
33220
|
+
|
|
33221
|
+
return [3
|
|
33222
|
+
/*break*/
|
|
33223
|
+
, 3];
|
|
33224
|
+
|
|
33225
|
+
case 2:
|
|
33226
|
+
error_1 = _a.sent();
|
|
33227
|
+
logger.error("Could not upload log events", error_1);
|
|
33228
|
+
return [3
|
|
33229
|
+
/*break*/
|
|
33230
|
+
, 3];
|
|
33231
|
+
|
|
33232
|
+
case 3:
|
|
33233
|
+
return [2
|
|
33234
|
+
/*return*/
|
|
33235
|
+
];
|
|
33236
|
+
}
|
|
33237
|
+
});
|
|
33238
|
+
});
|
|
33239
|
+
}, this.config.bufferInterval);
|
|
33240
|
+
};
|
|
33241
|
+
|
|
33242
|
+
APILoggingProvider.prototype.clearInterval = function () {
|
|
33243
|
+
clearInterval(this.bufferInterval);
|
|
33244
|
+
this.bufferInterval = undefined;
|
|
33245
|
+
};
|
|
33246
|
+
/*
|
|
33247
|
+
Filter out events that don't adhere to config settings
|
|
33248
|
+
*/
|
|
33249
|
+
|
|
33250
|
+
|
|
33251
|
+
APILoggingProvider.prototype.verifyEvent = function (event) {
|
|
33252
|
+
var level = event.level,
|
|
33253
|
+
context = event.context;
|
|
33254
|
+
var configLevelValue = _Logger__WEBPACK_IMPORTED_MODULE_0__["LOG_LEVELS"][this.config.level];
|
|
33255
|
+
var eventLevelValue = _Logger__WEBPACK_IMPORTED_MODULE_0__["LOG_LEVELS"][level];
|
|
33256
|
+
|
|
33257
|
+
if (eventLevelValue < configLevelValue) {
|
|
33258
|
+
return false;
|
|
33259
|
+
}
|
|
33260
|
+
|
|
33261
|
+
if (this.config.excludeClassList.includes(context.category)) {
|
|
33262
|
+
return false;
|
|
33263
|
+
}
|
|
33264
|
+
|
|
33265
|
+
return true;
|
|
33266
|
+
};
|
|
33267
|
+
|
|
33268
|
+
APILoggingProvider.prototype.uploadEvents = function () {
|
|
33269
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
33270
|
+
var eventBatch, body, options;
|
|
33271
|
+
|
|
33272
|
+
var _this = this;
|
|
33273
|
+
|
|
33274
|
+
return __generator(this, function (_a) {
|
|
33275
|
+
switch (_a.label) {
|
|
33276
|
+
case 0:
|
|
33277
|
+
eventBatch = this.genericLogEventBatch(this.eventBuffer);
|
|
33278
|
+
|
|
33279
|
+
if (eventBatch.length < 1) {
|
|
33280
|
+
return [2
|
|
33281
|
+
/*return*/
|
|
33282
|
+
];
|
|
33283
|
+
}
|
|
33284
|
+
|
|
33285
|
+
body = {
|
|
33286
|
+
logs: eventBatch
|
|
33287
|
+
};
|
|
33288
|
+
options = Object(_Fetch__WEBPACK_IMPORTED_MODULE_4__["postOptions"])(body);
|
|
33289
|
+
return [4
|
|
33290
|
+
/*yield*/
|
|
33291
|
+
, Object(___WEBPACK_IMPORTED_MODULE_3__["jitteredExponentialRetry"])(function (endpoint, options) {
|
|
33292
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
33293
|
+
var error_2;
|
|
33294
|
+
return __generator(this, function (_a) {
|
|
33295
|
+
switch (_a.label) {
|
|
33296
|
+
case 0:
|
|
33297
|
+
_a.trys.push([0, 2,, 3]);
|
|
33298
|
+
|
|
33299
|
+
return [4
|
|
33300
|
+
/*yield*/
|
|
33301
|
+
, fetch(endpoint, options)];
|
|
33302
|
+
|
|
33303
|
+
case 1:
|
|
33304
|
+
_a.sent(); // fetch doesnt return info for no-cors request
|
|
33305
|
+
|
|
33306
|
+
|
|
33307
|
+
return [3
|
|
33308
|
+
/*break*/
|
|
33309
|
+
, 3];
|
|
33310
|
+
|
|
33311
|
+
case 2:
|
|
33312
|
+
error_2 = _a.sent(); // fetch will only fail in the event of a network error. Don't retry
|
|
33313
|
+
|
|
33314
|
+
if (error_2.message === 'Failed to fetch') {
|
|
33315
|
+
throw new ___WEBPACK_IMPORTED_MODULE_3__["NonRetryableError"](error_2.message);
|
|
33316
|
+
} // all other errors are logged and retried
|
|
33317
|
+
|
|
33318
|
+
|
|
33319
|
+
logger.warn(error_2);
|
|
33320
|
+
throw error_2;
|
|
33321
|
+
|
|
33322
|
+
case 3:
|
|
33323
|
+
return [2
|
|
33324
|
+
/*return*/
|
|
33325
|
+
];
|
|
33326
|
+
}
|
|
33327
|
+
});
|
|
33328
|
+
});
|
|
33329
|
+
}, [this.config.endpoint, options])];
|
|
33330
|
+
|
|
33331
|
+
case 1:
|
|
33332
|
+
_a.sent(); // remove events from buffer after the request succeeds
|
|
33333
|
+
|
|
33334
|
+
|
|
33335
|
+
this.eventBuffer.splice(0, eventBatch.length);
|
|
33336
|
+
return [2
|
|
33337
|
+
/*return*/
|
|
33338
|
+
];
|
|
33339
|
+
}
|
|
33340
|
+
});
|
|
33341
|
+
});
|
|
33342
|
+
};
|
|
33343
|
+
|
|
33344
|
+
APILoggingProvider.prototype.genericLogEventBatch = function (buffer) {
|
|
33345
|
+
var totalByteSize = 0;
|
|
33346
|
+
var currentEventIdx = 0;
|
|
33347
|
+
|
|
33348
|
+
while (currentEventIdx < buffer.length) {
|
|
33349
|
+
var currentEvent = buffer[currentEventIdx];
|
|
33350
|
+
var eventSize = Object(_Util_StringUtils__WEBPACK_IMPORTED_MODULE_6__["getStringByteSize"])(JSON.stringify(currentEvent));
|
|
33351
|
+
|
|
33352
|
+
if (totalByteSize + eventSize > LAMBDA_PAYLOAD_LIMIT) {
|
|
33353
|
+
break;
|
|
33354
|
+
}
|
|
33355
|
+
|
|
33356
|
+
totalByteSize += eventSize;
|
|
33357
|
+
currentEventIdx += 1;
|
|
33358
|
+
}
|
|
33359
|
+
|
|
33360
|
+
return buffer.slice(0, currentEventIdx);
|
|
33361
|
+
};
|
|
33362
|
+
|
|
33363
|
+
APILoggingProvider.PROVIDER_NAME = _Util_Constants__WEBPACK_IMPORTED_MODULE_5__["API_LOGGING_PROVIDER_NAME"];
|
|
33364
|
+
APILoggingProvider.CATEGORY = _Util_Constants__WEBPACK_IMPORTED_MODULE_5__["API_LOGGING_PROVIDER_CATEGORY"];
|
|
33365
|
+
return APILoggingProvider;
|
|
32496
33366
|
}();
|
|
32497
33367
|
|
|
32498
33368
|
|
|
32499
|
-
/**
|
|
32500
|
-
* @deprecated use named import
|
|
32501
|
-
*/
|
|
32502
33369
|
|
|
32503
|
-
|
|
33370
|
+
/***/ }),
|
|
33371
|
+
|
|
33372
|
+
/***/ "./lib-esm/Providers/APIProvider/Fetch.js":
|
|
33373
|
+
/*!************************************************!*\
|
|
33374
|
+
!*** ./lib-esm/Providers/APIProvider/Fetch.js ***!
|
|
33375
|
+
\************************************************/
|
|
33376
|
+
/*! exports provided: postOptions */
|
|
33377
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
33378
|
+
|
|
33379
|
+
"use strict";
|
|
33380
|
+
__webpack_require__.r(__webpack_exports__);
|
|
33381
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "postOptions", function() { return postOptions; });
|
|
33382
|
+
var postOptions = function postOptions(body) {
|
|
33383
|
+
return {
|
|
33384
|
+
method: 'POST',
|
|
33385
|
+
mode: 'no-cors',
|
|
33386
|
+
cache: 'no-cache',
|
|
33387
|
+
credentials: 'same-origin',
|
|
33388
|
+
headers: {
|
|
33389
|
+
'Content-Type': 'application/json'
|
|
33390
|
+
},
|
|
33391
|
+
body: JSON.stringify(body)
|
|
33392
|
+
};
|
|
33393
|
+
};
|
|
32504
33394
|
|
|
32505
33395
|
/***/ }),
|
|
32506
33396
|
|
|
32507
|
-
/***/ "./lib-esm/
|
|
32508
|
-
|
|
32509
|
-
!*** ./lib-esm/
|
|
32510
|
-
|
|
32511
|
-
/*! exports provided:
|
|
33397
|
+
/***/ "./lib-esm/Providers/APIProvider/LoggerReachability/index.js":
|
|
33398
|
+
/*!*******************************************************************!*\
|
|
33399
|
+
!*** ./lib-esm/Providers/APIProvider/LoggerReachability/index.js ***!
|
|
33400
|
+
\*******************************************************************/
|
|
33401
|
+
/*! exports provided: ReachabilityMonitor */
|
|
32512
33402
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
32513
33403
|
|
|
32514
33404
|
"use strict";
|
|
32515
33405
|
__webpack_require__.r(__webpack_exports__);
|
|
32516
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
32517
|
-
/* harmony
|
|
32518
|
-
|
|
32519
|
-
|
|
32520
|
-
|
|
32521
|
-
|
|
32522
|
-
|
|
32523
|
-
|
|
32524
|
-
|
|
32525
|
-
|
|
32526
|
-
|
|
32527
|
-
|
|
32528
|
-
|
|
32529
|
-
|
|
32530
|
-
|
|
32531
|
-
|
|
33406
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReachabilityMonitor", function() { return ReachabilityMonitor; });
|
|
33407
|
+
/* harmony import */ var _Util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Util */ "./lib-esm/Util/index.js");
|
|
33408
|
+
|
|
33409
|
+
var ReachabilityMonitor = new _Util__WEBPACK_IMPORTED_MODULE_0__["Reachability"]().networkMonitor();
|
|
33410
|
+
|
|
33411
|
+
/***/ }),
|
|
33412
|
+
|
|
33413
|
+
/***/ "./lib-esm/Providers/APIProvider/index.js":
|
|
33414
|
+
/*!************************************************!*\
|
|
33415
|
+
!*** ./lib-esm/Providers/APIProvider/index.js ***!
|
|
33416
|
+
\************************************************/
|
|
33417
|
+
/*! exports provided: APILoggingProvider */
|
|
33418
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
33419
|
+
|
|
33420
|
+
"use strict";
|
|
33421
|
+
__webpack_require__.r(__webpack_exports__);
|
|
33422
|
+
/* harmony import */ var _APILoggingProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./APILoggingProvider */ "./lib-esm/Providers/APIProvider/APILoggingProvider.js");
|
|
33423
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "APILoggingProvider", function() { return _APILoggingProvider__WEBPACK_IMPORTED_MODULE_0__["APILoggingProvider"]; });
|
|
32532
33424
|
|
|
32533
33425
|
|
|
32534
|
-
var GoogleOAuth = new _GoogleOAuth__WEBPACK_IMPORTED_MODULE_0__["GoogleOAuth"]();
|
|
32535
|
-
var FacebookOAuth = new _FacebookOAuth__WEBPACK_IMPORTED_MODULE_1__["FacebookOAuth"]();
|
|
32536
33426
|
|
|
32537
33427
|
/***/ }),
|
|
32538
33428
|
|
|
32539
|
-
/***/ "./lib-esm/
|
|
32540
|
-
|
|
32541
|
-
!*** ./lib-esm/
|
|
32542
|
-
|
|
32543
|
-
/*! exports provided:
|
|
33429
|
+
/***/ "./lib-esm/Providers/APIProvider/loggerConnectivity.js":
|
|
33430
|
+
/*!*************************************************************!*\
|
|
33431
|
+
!*** ./lib-esm/Providers/APIProvider/loggerConnectivity.js ***!
|
|
33432
|
+
\*************************************************************/
|
|
33433
|
+
/*! exports provided: default */
|
|
32544
33434
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
32545
33435
|
|
|
32546
33436
|
"use strict";
|
|
32547
33437
|
__webpack_require__.r(__webpack_exports__);
|
|
32548
|
-
/* harmony
|
|
32549
|
-
/* harmony
|
|
32550
|
-
/* harmony import */ var _Logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Logger */ "./lib-esm/Logger/index.js");
|
|
33438
|
+
/* harmony import */ var zen_observable_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! zen-observable-ts */ "../../node_modules/zen-observable-ts/lib/bundle.esm.js");
|
|
33439
|
+
/* harmony import */ var _LoggerReachability__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LoggerReachability */ "./lib-esm/Providers/APIProvider/LoggerReachability/index.js");
|
|
32551
33440
|
var __assign = undefined && undefined.__assign || function () {
|
|
32552
33441
|
__assign = Object.assign || function (t) {
|
|
32553
33442
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -32565,167 +33454,54 @@ var __assign = undefined && undefined.__assign || function () {
|
|
|
32565
33454
|
};
|
|
32566
33455
|
|
|
32567
33456
|
|
|
32568
|
-
|
|
32569
|
-
var parseMobileHubConfig = function parseMobileHubConfig(config) {
|
|
32570
|
-
var amplifyConfig = {}; // Analytics
|
|
33457
|
+
// TODO: refactor this to a singleton that supports numerous observers
|
|
32571
33458
|
|
|
32572
|
-
|
|
32573
|
-
|
|
32574
|
-
|
|
32575
|
-
|
|
32576
|
-
|
|
32577
|
-
|
|
33459
|
+
var LoggerConnectivity =
|
|
33460
|
+
/** @class */
|
|
33461
|
+
function () {
|
|
33462
|
+
function LoggerConnectivity() {
|
|
33463
|
+
this.connectionStatus = {
|
|
33464
|
+
online: false
|
|
32578
33465
|
};
|
|
32579
|
-
|
|
32580
|
-
} // Auth
|
|
32581
|
-
|
|
33466
|
+
}
|
|
32582
33467
|
|
|
32583
|
-
|
|
32584
|
-
|
|
32585
|
-
userPoolId: config['aws_user_pools_id'],
|
|
32586
|
-
userPoolWebClientId: config['aws_user_pools_web_client_id'],
|
|
32587
|
-
region: config['aws_cognito_region'],
|
|
32588
|
-
identityPoolId: config['aws_cognito_identity_pool_id'],
|
|
32589
|
-
identityPoolRegion: config['aws_cognito_region'],
|
|
32590
|
-
mandatorySignIn: config['aws_mandatory_sign_in'] === 'enable'
|
|
32591
|
-
};
|
|
32592
|
-
} // Storage
|
|
33468
|
+
LoggerConnectivity.prototype.status = function () {
|
|
33469
|
+
var _this = this;
|
|
32593
33470
|
|
|
33471
|
+
if (this.observer) {
|
|
33472
|
+
throw new Error('Subscriber already exists');
|
|
33473
|
+
}
|
|
32594
33474
|
|
|
32595
|
-
|
|
33475
|
+
return new zen_observable_ts__WEBPACK_IMPORTED_MODULE_0__["default"](function (observer) {
|
|
33476
|
+
_this.observer = observer;
|
|
33477
|
+
_this.subscription = _LoggerReachability__WEBPACK_IMPORTED_MODULE_1__["ReachabilityMonitor"].subscribe(function (_a) {
|
|
33478
|
+
var online = _a.online;
|
|
33479
|
+
_this.connectionStatus.online = online;
|
|
32596
33480
|
|
|
32597
|
-
|
|
32598
|
-
storageConfig = {
|
|
32599
|
-
AWSS3: {
|
|
32600
|
-
bucket: config['aws_user_files_s3_bucket'],
|
|
32601
|
-
region: config['aws_user_files_s3_bucket_region'],
|
|
32602
|
-
dangerouslyConnectToHttpEndpointForTesting: config['aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing']
|
|
32603
|
-
}
|
|
32604
|
-
};
|
|
32605
|
-
} else {
|
|
32606
|
-
storageConfig = config ? config.Storage || config : {};
|
|
32607
|
-
} // Logging
|
|
33481
|
+
var observerResult = __assign({}, _this.connectionStatus);
|
|
32608
33482
|
|
|
33483
|
+
observer.next(observerResult);
|
|
33484
|
+
});
|
|
33485
|
+
return function () {
|
|
33486
|
+
clearTimeout(_this.timeout);
|
|
32609
33487
|
|
|
32610
|
-
|
|
32611
|
-
|
|
32612
|
-
region: config['aws_project_region']
|
|
33488
|
+
_this.unsubscribe();
|
|
33489
|
+
};
|
|
32613
33490
|
});
|
|
32614
|
-
}
|
|
32615
|
-
|
|
32616
|
-
|
|
32617
|
-
if (config['geo']) {
|
|
32618
|
-
amplifyConfig.Geo = Object.assign({}, config.geo);
|
|
33491
|
+
};
|
|
32619
33492
|
|
|
32620
|
-
|
|
32621
|
-
|
|
32622
|
-
|
|
32623
|
-
|
|
33493
|
+
LoggerConnectivity.prototype.unsubscribe = function () {
|
|
33494
|
+
if (this.subscription) {
|
|
33495
|
+
clearTimeout(this.timeout);
|
|
33496
|
+
this.subscription.unsubscribe();
|
|
33497
|
+
this.observer = undefined;
|
|
32624
33498
|
}
|
|
32625
|
-
}
|
|
32626
|
-
|
|
32627
|
-
amplifyConfig.Analytics = Object.assign({}, amplifyConfig.Analytics, config.Analytics);
|
|
32628
|
-
amplifyConfig.Auth = Object.assign({}, amplifyConfig.Auth, config.Auth);
|
|
32629
|
-
amplifyConfig.Storage = Object.assign({}, storageConfig);
|
|
32630
|
-
amplifyConfig.Logging = Object.assign({}, amplifyConfig.Logging, config.Logging);
|
|
32631
|
-
logger.debug('parse config', config, 'to amplifyconfig', amplifyConfig);
|
|
32632
|
-
return amplifyConfig;
|
|
32633
|
-
};
|
|
32634
|
-
/**
|
|
32635
|
-
* @deprecated use per-function export
|
|
32636
|
-
*/
|
|
32637
|
-
|
|
32638
|
-
var Parser =
|
|
32639
|
-
/** @class */
|
|
32640
|
-
function () {
|
|
32641
|
-
function Parser() {}
|
|
33499
|
+
};
|
|
32642
33500
|
|
|
32643
|
-
|
|
32644
|
-
return Parser;
|
|
33501
|
+
return LoggerConnectivity;
|
|
32645
33502
|
}();
|
|
32646
33503
|
|
|
32647
|
-
|
|
32648
|
-
/**
|
|
32649
|
-
* @deprecated use per-function export
|
|
32650
|
-
*/
|
|
32651
|
-
|
|
32652
|
-
/* harmony default export */ __webpack_exports__["default"] = (Parser);
|
|
32653
|
-
|
|
32654
|
-
/***/ }),
|
|
32655
|
-
|
|
32656
|
-
/***/ "./lib-esm/Platform/index.js":
|
|
32657
|
-
/*!***********************************!*\
|
|
32658
|
-
!*** ./lib-esm/Platform/index.js ***!
|
|
32659
|
-
\***********************************/
|
|
32660
|
-
/*! exports provided: Platform, getAmplifyUserAgent, default */
|
|
32661
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
32662
|
-
|
|
32663
|
-
"use strict";
|
|
32664
|
-
__webpack_require__.r(__webpack_exports__);
|
|
32665
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Platform", function() { return Platform; });
|
|
32666
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAmplifyUserAgent", function() { return getAmplifyUserAgent; });
|
|
32667
|
-
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./version */ "./lib-esm/Platform/version.js");
|
|
32668
|
-
/*
|
|
32669
|
-
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
32670
|
-
*
|
|
32671
|
-
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
32672
|
-
* the License. A copy of the License is located at
|
|
32673
|
-
*
|
|
32674
|
-
* http://aws.amazon.com/apache2.0/
|
|
32675
|
-
*
|
|
32676
|
-
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
32677
|
-
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
32678
|
-
* and limitations under the License.
|
|
32679
|
-
*/
|
|
32680
|
-
|
|
32681
|
-
var BASE_USER_AGENT = "aws-amplify/" + _version__WEBPACK_IMPORTED_MODULE_0__["version"];
|
|
32682
|
-
var Platform = {
|
|
32683
|
-
userAgent: BASE_USER_AGENT + " js",
|
|
32684
|
-
product: '',
|
|
32685
|
-
navigator: null,
|
|
32686
|
-
isReactNative: false
|
|
32687
|
-
};
|
|
32688
|
-
|
|
32689
|
-
if (typeof navigator !== 'undefined' && navigator.product) {
|
|
32690
|
-
Platform.product = navigator.product || '';
|
|
32691
|
-
Platform.navigator = navigator || null;
|
|
32692
|
-
|
|
32693
|
-
switch (navigator.product) {
|
|
32694
|
-
case 'ReactNative':
|
|
32695
|
-
Platform.userAgent = BASE_USER_AGENT + " react-native";
|
|
32696
|
-
Platform.isReactNative = true;
|
|
32697
|
-
break;
|
|
32698
|
-
|
|
32699
|
-
default:
|
|
32700
|
-
Platform.userAgent = BASE_USER_AGENT + " js";
|
|
32701
|
-
Platform.isReactNative = false;
|
|
32702
|
-
break;
|
|
32703
|
-
}
|
|
32704
|
-
}
|
|
32705
|
-
|
|
32706
|
-
var getAmplifyUserAgent = function getAmplifyUserAgent() {
|
|
32707
|
-
return Platform.userAgent;
|
|
32708
|
-
};
|
|
32709
|
-
/**
|
|
32710
|
-
* @deprecated use named import
|
|
32711
|
-
*/
|
|
32712
|
-
|
|
32713
|
-
/* harmony default export */ __webpack_exports__["default"] = (Platform);
|
|
32714
|
-
|
|
32715
|
-
/***/ }),
|
|
32716
|
-
|
|
32717
|
-
/***/ "./lib-esm/Platform/version.js":
|
|
32718
|
-
/*!*************************************!*\
|
|
32719
|
-
!*** ./lib-esm/Platform/version.js ***!
|
|
32720
|
-
\*************************************/
|
|
32721
|
-
/*! exports provided: version */
|
|
32722
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
32723
|
-
|
|
32724
|
-
"use strict";
|
|
32725
|
-
__webpack_require__.r(__webpack_exports__);
|
|
32726
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; });
|
|
32727
|
-
// generated by genversion
|
|
32728
|
-
var version = '4.4.0';
|
|
33504
|
+
/* harmony default export */ __webpack_exports__["default"] = (LoggerConnectivity);
|
|
32729
33505
|
|
|
32730
33506
|
/***/ }),
|
|
32731
33507
|
|
|
@@ -33223,7 +33999,15 @@ function () {
|
|
|
33223
33999
|
|
|
33224
34000
|
AWSCloudWatchProvider.prototype.pushLogs = function (logs) {
|
|
33225
34001
|
logger.debug('pushing log events to Cloudwatch...');
|
|
33226
|
-
|
|
34002
|
+
var formattedLogs = logs.map(function (_a) {
|
|
34003
|
+
var message = _a.message,
|
|
34004
|
+
timestamp = _a.timestamp;
|
|
34005
|
+
return {
|
|
34006
|
+
message: message,
|
|
34007
|
+
timestamp: timestamp
|
|
34008
|
+
};
|
|
34009
|
+
});
|
|
34010
|
+
this._dataTracker.logEvents = __spread(this._dataTracker.logEvents, formattedLogs);
|
|
33227
34011
|
};
|
|
33228
34012
|
|
|
33229
34013
|
AWSCloudWatchProvider.prototype._validateLogGroupExistsAndCreate = function (logGroupName) {
|
|
@@ -33738,7 +34522,7 @@ function () {
|
|
|
33738
34522
|
/*!************************************!*\
|
|
33739
34523
|
!*** ./lib-esm/Providers/index.js ***!
|
|
33740
34524
|
\************************************/
|
|
33741
|
-
/*! exports provided: AWSCloudWatchProvider */
|
|
34525
|
+
/*! exports provided: AWSCloudWatchProvider, APILoggingProvider */
|
|
33742
34526
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
33743
34527
|
|
|
33744
34528
|
"use strict";
|
|
@@ -33746,6 +34530,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
33746
34530
|
/* harmony import */ var _AWSCloudWatchProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AWSCloudWatchProvider */ "./lib-esm/Providers/AWSCloudWatchProvider.js");
|
|
33747
34531
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AWSCloudWatchProvider", function() { return _AWSCloudWatchProvider__WEBPACK_IMPORTED_MODULE_0__["AWSCloudWatchProvider"]; });
|
|
33748
34532
|
|
|
34533
|
+
/* harmony import */ var _APIProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./APIProvider */ "./lib-esm/Providers/APIProvider/index.js");
|
|
34534
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "APILoggingProvider", function() { return _APIProvider__WEBPACK_IMPORTED_MODULE_1__["APILoggingProvider"]; });
|
|
34535
|
+
|
|
34536
|
+
|
|
33749
34537
|
|
|
33750
34538
|
|
|
33751
34539
|
/***/ }),
|
|
@@ -34750,7 +35538,7 @@ function () {
|
|
|
34750
35538
|
/*!***********************************!*\
|
|
34751
35539
|
!*** ./lib-esm/Util/Constants.js ***!
|
|
34752
35540
|
\***********************************/
|
|
34753
|
-
/*! exports provided: AWS_CLOUDWATCH_BASE_BUFFER_SIZE, AWS_CLOUDWATCH_CATEGORY, AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE, AWS_CLOUDWATCH_MAX_EVENT_SIZE, AWS_CLOUDWATCH_PROVIDER_NAME, NO_CREDS_ERROR_STRING, RETRY_ERROR_CODES */
|
|
35541
|
+
/*! exports provided: AWS_CLOUDWATCH_BASE_BUFFER_SIZE, AWS_CLOUDWATCH_CATEGORY, AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE, AWS_CLOUDWATCH_MAX_EVENT_SIZE, AWS_CLOUDWATCH_PROVIDER_NAME, NO_CREDS_ERROR_STRING, RETRY_ERROR_CODES, API_LOGGING_PROVIDER_NAME, API_LOGGING_PROVIDER_CATEGORY */
|
|
34754
35542
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
34755
35543
|
|
|
34756
35544
|
"use strict";
|
|
@@ -34762,6 +35550,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
34762
35550
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AWS_CLOUDWATCH_PROVIDER_NAME", function() { return AWS_CLOUDWATCH_PROVIDER_NAME; });
|
|
34763
35551
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NO_CREDS_ERROR_STRING", function() { return NO_CREDS_ERROR_STRING; });
|
|
34764
35552
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RETRY_ERROR_CODES", function() { return RETRY_ERROR_CODES; });
|
|
35553
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "API_LOGGING_PROVIDER_NAME", function() { return API_LOGGING_PROVIDER_NAME; });
|
|
35554
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "API_LOGGING_PROVIDER_CATEGORY", function() { return API_LOGGING_PROVIDER_CATEGORY; });
|
|
34765
35555
|
/*
|
|
34766
35556
|
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
34767
35557
|
*
|
|
@@ -34782,6 +35572,8 @@ var AWS_CLOUDWATCH_CATEGORY = 'Logging';
|
|
|
34782
35572
|
var AWS_CLOUDWATCH_PROVIDER_NAME = 'AWSCloudWatch';
|
|
34783
35573
|
var NO_CREDS_ERROR_STRING = 'No credentials';
|
|
34784
35574
|
var RETRY_ERROR_CODES = ['ResourceNotFoundException', 'InvalidSequenceTokenException'];
|
|
35575
|
+
var API_LOGGING_PROVIDER_NAME = 'API';
|
|
35576
|
+
var API_LOGGING_PROVIDER_CATEGORY = 'Logging';
|
|
34785
35577
|
|
|
34786
35578
|
|
|
34787
35579
|
/***/ }),
|
|
@@ -34995,7 +35787,7 @@ function () {
|
|
|
34995
35787
|
|
|
34996
35788
|
"use strict";
|
|
34997
35789
|
__webpack_require__.r(__webpack_exports__);
|
|
34998
|
-
/* harmony import */ var
|
|
35790
|
+
/* harmony import */ var _JS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../JS */ "./lib-esm/JS.js");
|
|
34999
35791
|
/* harmony import */ var zen_observable_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! zen-observable-ts */ "../../node_modules/zen-observable-ts/lib/bundle.esm.js");
|
|
35000
35792
|
var __values = undefined && undefined.__values || function (o) {
|
|
35001
35793
|
var s = typeof Symbol === "function" && Symbol.iterator,
|
|
@@ -35023,13 +35815,13 @@ function () {
|
|
|
35023
35815
|
function ReachabilityNavigator() {}
|
|
35024
35816
|
|
|
35025
35817
|
ReachabilityNavigator.prototype.networkMonitor = function (netInfo) {
|
|
35026
|
-
if (Object(
|
|
35818
|
+
if (Object(_JS__WEBPACK_IMPORTED_MODULE_0__["browserOrNode"])().isNode) {
|
|
35027
35819
|
return zen_observable_ts__WEBPACK_IMPORTED_MODULE_1__["default"].from([{
|
|
35028
35820
|
online: true
|
|
35029
35821
|
}]);
|
|
35030
35822
|
}
|
|
35031
35823
|
|
|
35032
|
-
var globalObj = Object(
|
|
35824
|
+
var globalObj = Object(_JS__WEBPACK_IMPORTED_MODULE_0__["isWebWorker"])() ? self : window;
|
|
35033
35825
|
return new zen_observable_ts__WEBPACK_IMPORTED_MODULE_1__["default"](function (observer) {
|
|
35034
35826
|
observer.next({
|
|
35035
35827
|
online: globalObj.navigator.onLine
|
|
@@ -35322,7 +36114,7 @@ var __spread = undefined && undefined.__spread || function () {
|
|
|
35322
36114
|
};
|
|
35323
36115
|
|
|
35324
36116
|
|
|
35325
|
-
var logger = new _Logger_ConsoleLogger__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('
|
|
36117
|
+
var logger = new _Logger_ConsoleLogger__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('Retry');
|
|
35326
36118
|
|
|
35327
36119
|
var NonRetryableError =
|
|
35328
36120
|
/** @class */
|
|
@@ -35365,7 +36157,7 @@ function retry(functionToRetry, args, delayFn, attempt) {
|
|
|
35365
36157
|
throw Error('functionToRetry must be a function');
|
|
35366
36158
|
}
|
|
35367
36159
|
|
|
35368
|
-
logger.debug(functionToRetry.name + " attempt #" + attempt + " with
|
|
36160
|
+
logger.debug(functionToRetry.name + " attempt #" + attempt + " with these vars: " + JSON.stringify(args));
|
|
35369
36161
|
_a.label = 1;
|
|
35370
36162
|
|
|
35371
36163
|
case 1:
|
|
@@ -35458,13 +36250,16 @@ var jitteredExponentialRetry = function jitteredExponentialRetry(functionToRetry
|
|
|
35458
36250
|
/*!*************************************!*\
|
|
35459
36251
|
!*** ./lib-esm/Util/StringUtils.js ***!
|
|
35460
36252
|
\*************************************/
|
|
35461
|
-
/*! exports provided: urlSafeEncode, urlSafeDecode */
|
|
36253
|
+
/*! exports provided: urlSafeEncode, urlSafeDecode, getStringByteSize */
|
|
35462
36254
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
35463
36255
|
|
|
35464
36256
|
"use strict";
|
|
35465
36257
|
__webpack_require__.r(__webpack_exports__);
|
|
35466
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "urlSafeEncode", function() { return urlSafeEncode; });
|
|
36258
|
+
/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "urlSafeEncode", function() { return urlSafeEncode; });
|
|
35467
36259
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "urlSafeDecode", function() { return urlSafeDecode; });
|
|
36260
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getStringByteSize", function() { return getStringByteSize; });
|
|
36261
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../ */ "./lib-esm/index.js");
|
|
36262
|
+
|
|
35468
36263
|
function urlSafeEncode(str) {
|
|
35469
36264
|
return str.split('').map(function (_char) {
|
|
35470
36265
|
return _char.charCodeAt(0).toString(16).padStart(2, '0');
|
|
@@ -35475,6 +36270,18 @@ function urlSafeDecode(hex) {
|
|
|
35475
36270
|
return String.fromCharCode(parseInt(_char2, 16));
|
|
35476
36271
|
}).join('');
|
|
35477
36272
|
}
|
|
36273
|
+
var getStringByteSize = function getStringByteSize(str) {
|
|
36274
|
+
if (Object(___WEBPACK_IMPORTED_MODULE_0__["browserOrNode"])().isBrowser || Blob !== undefined) {
|
|
36275
|
+
return new Blob([str]).size;
|
|
36276
|
+
}
|
|
36277
|
+
|
|
36278
|
+
if (Buffer !== undefined) {
|
|
36279
|
+
return Buffer.byteLength(str, 'utf8');
|
|
36280
|
+
}
|
|
36281
|
+
|
|
36282
|
+
throw new Error('Cannot compute string length. Blob and Buffer are undefined');
|
|
36283
|
+
};
|
|
36284
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/buffer/index.js */ "../../node_modules/buffer/index.js").Buffer))
|
|
35478
36285
|
|
|
35479
36286
|
/***/ }),
|
|
35480
36287
|
|
|
@@ -35482,7 +36289,7 @@ function urlSafeDecode(hex) {
|
|
|
35482
36289
|
/*!*******************************!*\
|
|
35483
36290
|
!*** ./lib-esm/Util/index.js ***!
|
|
35484
36291
|
\*******************************/
|
|
35485
|
-
/*! exports provided: NonRetryableError, retry, jitteredExponentialRetry, Mutex, Reachability, DateUtils, urlSafeEncode, urlSafeDecode, AWS_CLOUDWATCH_BASE_BUFFER_SIZE, AWS_CLOUDWATCH_CATEGORY, AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE, AWS_CLOUDWATCH_MAX_EVENT_SIZE, AWS_CLOUDWATCH_PROVIDER_NAME, NO_CREDS_ERROR_STRING, RETRY_ERROR_CODES */
|
|
36292
|
+
/*! exports provided: NonRetryableError, retry, jitteredExponentialRetry, Mutex, Reachability, DateUtils, urlSafeEncode, urlSafeDecode, getStringByteSize, AWS_CLOUDWATCH_BASE_BUFFER_SIZE, AWS_CLOUDWATCH_CATEGORY, AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE, AWS_CLOUDWATCH_MAX_EVENT_SIZE, AWS_CLOUDWATCH_PROVIDER_NAME, NO_CREDS_ERROR_STRING, RETRY_ERROR_CODES, API_LOGGING_PROVIDER_NAME, API_LOGGING_PROVIDER_CATEGORY */
|
|
35486
36293
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
35487
36294
|
|
|
35488
36295
|
"use strict";
|
|
@@ -35508,6 +36315,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
35508
36315
|
|
|
35509
36316
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "urlSafeDecode", function() { return _StringUtils__WEBPACK_IMPORTED_MODULE_4__["urlSafeDecode"]; });
|
|
35510
36317
|
|
|
36318
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getStringByteSize", function() { return _StringUtils__WEBPACK_IMPORTED_MODULE_4__["getStringByteSize"]; });
|
|
36319
|
+
|
|
35511
36320
|
/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Constants */ "./lib-esm/Util/Constants.js");
|
|
35512
36321
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AWS_CLOUDWATCH_BASE_BUFFER_SIZE", function() { return _Constants__WEBPACK_IMPORTED_MODULE_5__["AWS_CLOUDWATCH_BASE_BUFFER_SIZE"]; });
|
|
35513
36322
|
|
|
@@ -35523,6 +36332,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
35523
36332
|
|
|
35524
36333
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RETRY_ERROR_CODES", function() { return _Constants__WEBPACK_IMPORTED_MODULE_5__["RETRY_ERROR_CODES"]; });
|
|
35525
36334
|
|
|
36335
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "API_LOGGING_PROVIDER_NAME", function() { return _Constants__WEBPACK_IMPORTED_MODULE_5__["API_LOGGING_PROVIDER_NAME"]; });
|
|
36336
|
+
|
|
36337
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "API_LOGGING_PROVIDER_CATEGORY", function() { return _Constants__WEBPACK_IMPORTED_MODULE_5__["API_LOGGING_PROVIDER_CATEGORY"]; });
|
|
36338
|
+
|
|
35526
36339
|
|
|
35527
36340
|
|
|
35528
36341
|
|
|
@@ -35572,7 +36385,7 @@ var USER_AGENT_HEADER = 'x-amz-user-agent';
|
|
|
35572
36385
|
/*!**************************!*\
|
|
35573
36386
|
!*** ./lib-esm/index.js ***!
|
|
35574
36387
|
\**************************/
|
|
35575
|
-
/*! exports provided: AmplifyClass, ClientDevice, ConsoleLogger, Logger, missingConfig, invalidParameter, Hub, I18n, isEmpty, sortByField, objectLessAttributes, filenameToContentType, isTextFile, generateRandomString, makeQuerablePromise, isWebWorker, browserOrNode, transferKeyToLowerCase, transferKeyToUpperCase, isStrictObject, JS, Signer, parseMobileHubConfig, Parser, AWSCloudWatchProvider, FacebookOAuth, GoogleOAuth, Linking, AppState, AsyncStorage, Credentials, CredentialsClass, ServiceWorker, StorageHelper, MemoryStorage, UniversalStorage, Platform, getAmplifyUserAgent, INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER, INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER, USER_AGENT_HEADER, Constants, NonRetryableError, retry, jitteredExponentialRetry, Mutex, Reachability, DateUtils, urlSafeEncode, urlSafeDecode, AWS_CLOUDWATCH_BASE_BUFFER_SIZE, AWS_CLOUDWATCH_CATEGORY, AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE, AWS_CLOUDWATCH_MAX_EVENT_SIZE, AWS_CLOUDWATCH_PROVIDER_NAME, NO_CREDS_ERROR_STRING, RETRY_ERROR_CODES, Amplify, default */
|
|
36388
|
+
/*! exports provided: AmplifyClass, ClientDevice, ConsoleLogger, Logger, missingConfig, invalidParameter, Hub, I18n, isEmpty, sortByField, objectLessAttributes, filenameToContentType, isTextFile, generateRandomString, makeQuerablePromise, isWebWorker, browserOrNode, transferKeyToLowerCase, transferKeyToUpperCase, isStrictObject, JS, Signer, parseMobileHubConfig, Parser, AWSCloudWatchProvider, APILoggingProvider, FacebookOAuth, GoogleOAuth, Linking, AppState, AsyncStorage, Credentials, CredentialsClass, ServiceWorker, StorageHelper, MemoryStorage, UniversalStorage, Platform, getAmplifyUserAgent, INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER, INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER, USER_AGENT_HEADER, Constants, NonRetryableError, retry, jitteredExponentialRetry, Mutex, Reachability, DateUtils, urlSafeEncode, urlSafeDecode, getStringByteSize, AWS_CLOUDWATCH_BASE_BUFFER_SIZE, AWS_CLOUDWATCH_CATEGORY, AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE, AWS_CLOUDWATCH_MAX_EVENT_SIZE, AWS_CLOUDWATCH_PROVIDER_NAME, NO_CREDS_ERROR_STRING, RETRY_ERROR_CODES, API_LOGGING_PROVIDER_NAME, API_LOGGING_PROVIDER_CATEGORY, Amplify, default */
|
|
35576
36389
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
35577
36390
|
|
|
35578
36391
|
"use strict";
|
|
@@ -35641,6 +36454,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
35641
36454
|
/* harmony import */ var _Providers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Providers */ "./lib-esm/Providers/index.js");
|
|
35642
36455
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AWSCloudWatchProvider", function() { return _Providers__WEBPACK_IMPORTED_MODULE_10__["AWSCloudWatchProvider"]; });
|
|
35643
36456
|
|
|
36457
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "APILoggingProvider", function() { return _Providers__WEBPACK_IMPORTED_MODULE_10__["APILoggingProvider"]; });
|
|
36458
|
+
|
|
35644
36459
|
/* harmony import */ var _OAuthHelper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./OAuthHelper */ "./lib-esm/OAuthHelper/index.js");
|
|
35645
36460
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FacebookOAuth", function() { return _OAuthHelper__WEBPACK_IMPORTED_MODULE_11__["FacebookOAuth"]; });
|
|
35646
36461
|
|
|
@@ -35697,6 +36512,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
35697
36512
|
|
|
35698
36513
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "urlSafeDecode", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["urlSafeDecode"]; });
|
|
35699
36514
|
|
|
36515
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getStringByteSize", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["getStringByteSize"]; });
|
|
36516
|
+
|
|
35700
36517
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AWS_CLOUDWATCH_BASE_BUFFER_SIZE", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["AWS_CLOUDWATCH_BASE_BUFFER_SIZE"]; });
|
|
35701
36518
|
|
|
35702
36519
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AWS_CLOUDWATCH_CATEGORY", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["AWS_CLOUDWATCH_CATEGORY"]; });
|
|
@@ -35711,6 +36528,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
35711
36528
|
|
|
35712
36529
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RETRY_ERROR_CODES", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["RETRY_ERROR_CODES"]; });
|
|
35713
36530
|
|
|
36531
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "API_LOGGING_PROVIDER_NAME", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["API_LOGGING_PROVIDER_NAME"]; });
|
|
36532
|
+
|
|
36533
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "API_LOGGING_PROVIDER_CATEGORY", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["API_LOGGING_PROVIDER_CATEGORY"]; });
|
|
36534
|
+
|
|
35714
36535
|
/*
|
|
35715
36536
|
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
35716
36537
|
*
|
|
@@ -35757,6 +36578,24 @@ var Constants = {
|
|
|
35757
36578
|
|
|
35758
36579
|
/***/ }),
|
|
35759
36580
|
|
|
36581
|
+
/***/ "./lib-esm/types/types.js":
|
|
36582
|
+
/*!********************************!*\
|
|
36583
|
+
!*** ./lib-esm/types/types.js ***!
|
|
36584
|
+
\********************************/
|
|
36585
|
+
/*! exports provided: isLoggerEvent */
|
|
36586
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
36587
|
+
|
|
36588
|
+
"use strict";
|
|
36589
|
+
__webpack_require__.r(__webpack_exports__);
|
|
36590
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLoggerEvent", function() { return isLoggerEvent; });
|
|
36591
|
+
function isLoggerEvent(inputLogEvent) {
|
|
36592
|
+
return inputLogEvent && !!Object.keys(inputLogEvent).find(function (k) {
|
|
36593
|
+
return k === 'loggerInfo';
|
|
36594
|
+
});
|
|
36595
|
+
}
|
|
36596
|
+
|
|
36597
|
+
/***/ }),
|
|
36598
|
+
|
|
35760
36599
|
/***/ "./node_modules/@aws-crypto/sha256-js/build/RawSha256.js":
|
|
35761
36600
|
/*!***************************************************************!*\
|
|
35762
36601
|
!*** ./node_modules/@aws-crypto/sha256-js/build/RawSha256.js ***!
|