@aws-amplify/datastore 3.7.8-unstable.5 → 3.7.9-api-logging.2
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.
|
@@ -69939,11 +69939,12 @@ function () {
|
|
|
69939
69939
|
/*!***********************************************!*\
|
|
69940
69940
|
!*** ../core/lib-esm/Logger/ConsoleLogger.js ***!
|
|
69941
69941
|
\***********************************************/
|
|
69942
|
-
/*! exports provided: LOG_TYPE, ConsoleLogger */
|
|
69942
|
+
/*! exports provided: LOG_LEVELS, LOG_TYPE, ConsoleLogger */
|
|
69943
69943
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
69944
69944
|
|
|
69945
69945
|
"use strict";
|
|
69946
69946
|
__webpack_require__.r(__webpack_exports__);
|
|
69947
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOG_LEVELS", function() { return LOG_LEVELS; });
|
|
69947
69948
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOG_TYPE", function() { return LOG_TYPE; });
|
|
69948
69949
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsoleLogger", function() { return ConsoleLogger; });
|
|
69949
69950
|
/* harmony import */ var _Util_Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Util/Constants */ "../core/lib-esm/Util/Constants.js");
|
|
@@ -70051,6 +70052,10 @@ function () {
|
|
|
70051
70052
|
this._pluggables = [];
|
|
70052
70053
|
}
|
|
70053
70054
|
|
|
70055
|
+
ConsoleLogger.addPluggable = function (pluggable) {
|
|
70056
|
+
ConsoleLogger.pluggables.push(pluggable);
|
|
70057
|
+
};
|
|
70058
|
+
|
|
70054
70059
|
ConsoleLogger.prototype._padding = function (n) {
|
|
70055
70060
|
return n < 10 ? '0' + n : '' + n;
|
|
70056
70061
|
};
|
|
@@ -70065,6 +70070,67 @@ function () {
|
|
|
70065
70070
|
this._config = config;
|
|
70066
70071
|
return this._config;
|
|
70067
70072
|
};
|
|
70073
|
+
|
|
70074
|
+
ConsoleLogger.prototype._logGlobal = function (type) {
|
|
70075
|
+
var e_1, _a;
|
|
70076
|
+
|
|
70077
|
+
var msg = [];
|
|
70078
|
+
|
|
70079
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
70080
|
+
msg[_i - 1] = arguments[_i];
|
|
70081
|
+
}
|
|
70082
|
+
|
|
70083
|
+
try {
|
|
70084
|
+
for (var _b = __values(ConsoleLogger.pluggables), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
70085
|
+
var pluggable = _c.value;
|
|
70086
|
+
|
|
70087
|
+
var event_1 = this._generateGenericEvent(type, msg);
|
|
70088
|
+
|
|
70089
|
+
pluggable.pushLog(event_1);
|
|
70090
|
+
}
|
|
70091
|
+
} catch (e_1_1) {
|
|
70092
|
+
e_1 = {
|
|
70093
|
+
error: e_1_1
|
|
70094
|
+
};
|
|
70095
|
+
} finally {
|
|
70096
|
+
try {
|
|
70097
|
+
if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
|
|
70098
|
+
} finally {
|
|
70099
|
+
if (e_1) throw e_1.error;
|
|
70100
|
+
}
|
|
70101
|
+
}
|
|
70102
|
+
};
|
|
70103
|
+
|
|
70104
|
+
ConsoleLogger.prototype._generateGenericEvent = function (type, msg) {
|
|
70105
|
+
var strMessage = '';
|
|
70106
|
+
var data;
|
|
70107
|
+
|
|
70108
|
+
if (msg.length === 1 && typeof msg[0] === 'string') {
|
|
70109
|
+
strMessage = msg[0];
|
|
70110
|
+
} else if (msg.length === 1) {
|
|
70111
|
+
data = msg[0];
|
|
70112
|
+
} else if (typeof msg[0] === 'string') {
|
|
70113
|
+
var obj = msg.slice(1);
|
|
70114
|
+
|
|
70115
|
+
if (obj.length === 1) {
|
|
70116
|
+
obj = obj[0];
|
|
70117
|
+
}
|
|
70118
|
+
|
|
70119
|
+
strMessage = msg[0];
|
|
70120
|
+
data = obj;
|
|
70121
|
+
} else {
|
|
70122
|
+
data = msg;
|
|
70123
|
+
}
|
|
70124
|
+
|
|
70125
|
+
var event = {
|
|
70126
|
+
data: data,
|
|
70127
|
+
level: type,
|
|
70128
|
+
message: strMessage,
|
|
70129
|
+
source: this.name,
|
|
70130
|
+
timestamp: Date.now()
|
|
70131
|
+
};
|
|
70132
|
+
return event;
|
|
70133
|
+
};
|
|
70068
70134
|
/**
|
|
70069
70135
|
* Write log
|
|
70070
70136
|
* @method
|
|
@@ -70075,7 +70141,7 @@ function () {
|
|
|
70075
70141
|
|
|
70076
70142
|
|
|
70077
70143
|
ConsoleLogger.prototype._log = function (type) {
|
|
70078
|
-
var
|
|
70144
|
+
var e_2, _a;
|
|
70079
70145
|
|
|
70080
70146
|
var msg = [];
|
|
70081
70147
|
|
|
@@ -70083,6 +70149,8 @@ function () {
|
|
|
70083
70149
|
msg[_i - 1] = arguments[_i];
|
|
70084
70150
|
}
|
|
70085
70151
|
|
|
70152
|
+
this._logGlobal.apply(this, __spread([type], msg));
|
|
70153
|
+
|
|
70086
70154
|
var logger_level_name = this.level;
|
|
70087
70155
|
|
|
70088
70156
|
if (ConsoleLogger.LOG_LEVEL) {
|
|
@@ -70143,15 +70211,15 @@ function () {
|
|
|
70143
70211
|
};
|
|
70144
70212
|
plugin.pushLogs([logEvent]);
|
|
70145
70213
|
}
|
|
70146
|
-
} catch (
|
|
70147
|
-
|
|
70148
|
-
error:
|
|
70214
|
+
} catch (e_2_1) {
|
|
70215
|
+
e_2 = {
|
|
70216
|
+
error: e_2_1
|
|
70149
70217
|
};
|
|
70150
70218
|
} finally {
|
|
70151
70219
|
try {
|
|
70152
70220
|
if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
|
|
70153
70221
|
} finally {
|
|
70154
|
-
if (
|
|
70222
|
+
if (e_2) throw e_2.error;
|
|
70155
70223
|
}
|
|
70156
70224
|
}
|
|
70157
70225
|
};
|
|
@@ -70270,6 +70338,7 @@ function () {
|
|
|
70270
70338
|
return this._pluggables;
|
|
70271
70339
|
};
|
|
70272
70340
|
|
|
70341
|
+
ConsoleLogger.pluggables = [];
|
|
70273
70342
|
ConsoleLogger.LOG_LEVEL = null;
|
|
70274
70343
|
return ConsoleLogger;
|
|
70275
70344
|
}();
|
|
@@ -70282,12 +70351,14 @@ function () {
|
|
|
70282
70351
|
/*!***************************************!*\
|
|
70283
70352
|
!*** ../core/lib-esm/Logger/index.js ***!
|
|
70284
70353
|
\***************************************/
|
|
70285
|
-
/*! exports provided: LOG_TYPE, ConsoleLogger */
|
|
70354
|
+
/*! exports provided: LOG_LEVELS, LOG_TYPE, ConsoleLogger */
|
|
70286
70355
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
70287
70356
|
|
|
70288
70357
|
"use strict";
|
|
70289
70358
|
__webpack_require__.r(__webpack_exports__);
|
|
70290
70359
|
/* harmony import */ var _ConsoleLogger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ConsoleLogger */ "../core/lib-esm/Logger/ConsoleLogger.js");
|
|
70360
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LOG_LEVELS", function() { return _ConsoleLogger__WEBPACK_IMPORTED_MODULE_0__["LOG_LEVELS"]; });
|
|
70361
|
+
|
|
70291
70362
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LOG_TYPE", function() { return _ConsoleLogger__WEBPACK_IMPORTED_MODULE_0__["LOG_TYPE"]; });
|
|
70292
70363
|
|
|
70293
70364
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConsoleLogger", function() { return _ConsoleLogger__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]; });
|
|
@@ -70865,62 +70936,950 @@ function () {
|
|
|
70865
70936
|
});
|
|
70866
70937
|
};
|
|
70867
70938
|
|
|
70868
|
-
return GoogleOAuth;
|
|
70869
|
-
}();
|
|
70939
|
+
return GoogleOAuth;
|
|
70940
|
+
}();
|
|
70941
|
+
|
|
70942
|
+
|
|
70943
|
+
/**
|
|
70944
|
+
* @deprecated use named import
|
|
70945
|
+
*/
|
|
70946
|
+
|
|
70947
|
+
/* harmony default export */ __webpack_exports__["default"] = (GoogleOAuth);
|
|
70948
|
+
|
|
70949
|
+
/***/ }),
|
|
70950
|
+
|
|
70951
|
+
/***/ "../core/lib-esm/OAuthHelper/index.js":
|
|
70952
|
+
/*!********************************************!*\
|
|
70953
|
+
!*** ../core/lib-esm/OAuthHelper/index.js ***!
|
|
70954
|
+
\********************************************/
|
|
70955
|
+
/*! exports provided: GoogleOAuth, FacebookOAuth */
|
|
70956
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
70957
|
+
|
|
70958
|
+
"use strict";
|
|
70959
|
+
__webpack_require__.r(__webpack_exports__);
|
|
70960
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GoogleOAuth", function() { return GoogleOAuth; });
|
|
70961
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FacebookOAuth", function() { return FacebookOAuth; });
|
|
70962
|
+
/* harmony import */ var _GoogleOAuth__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GoogleOAuth */ "../core/lib-esm/OAuthHelper/GoogleOAuth.js");
|
|
70963
|
+
/* harmony import */ var _FacebookOAuth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FacebookOAuth */ "../core/lib-esm/OAuthHelper/FacebookOAuth.js");
|
|
70964
|
+
/*
|
|
70965
|
+
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
70966
|
+
*
|
|
70967
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
70968
|
+
* the License. A copy of the License is located at
|
|
70969
|
+
*
|
|
70970
|
+
* http://aws.amazon.com/apache2.0/
|
|
70971
|
+
*
|
|
70972
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
70973
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
70974
|
+
* and limitations under the License.
|
|
70975
|
+
*/
|
|
70976
|
+
|
|
70977
|
+
|
|
70978
|
+
var GoogleOAuth = new _GoogleOAuth__WEBPACK_IMPORTED_MODULE_0__["GoogleOAuth"]();
|
|
70979
|
+
var FacebookOAuth = new _FacebookOAuth__WEBPACK_IMPORTED_MODULE_1__["FacebookOAuth"]();
|
|
70980
|
+
|
|
70981
|
+
/***/ }),
|
|
70982
|
+
|
|
70983
|
+
/***/ "../core/lib-esm/Parser.js":
|
|
70984
|
+
/*!*********************************!*\
|
|
70985
|
+
!*** ../core/lib-esm/Parser.js ***!
|
|
70986
|
+
\*********************************/
|
|
70987
|
+
/*! exports provided: parseMobileHubConfig, Parser, default */
|
|
70988
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
70989
|
+
|
|
70990
|
+
"use strict";
|
|
70991
|
+
__webpack_require__.r(__webpack_exports__);
|
|
70992
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseMobileHubConfig", function() { return parseMobileHubConfig; });
|
|
70993
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Parser", function() { return Parser; });
|
|
70994
|
+
/* harmony import */ var _Logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Logger */ "../core/lib-esm/Logger/index.js");
|
|
70995
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
70996
|
+
__assign = Object.assign || function (t) {
|
|
70997
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
70998
|
+
s = arguments[i];
|
|
70999
|
+
|
|
71000
|
+
for (var p in s) {
|
|
71001
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
71002
|
+
}
|
|
71003
|
+
}
|
|
71004
|
+
|
|
71005
|
+
return t;
|
|
71006
|
+
};
|
|
71007
|
+
|
|
71008
|
+
return __assign.apply(this, arguments);
|
|
71009
|
+
};
|
|
71010
|
+
|
|
71011
|
+
|
|
71012
|
+
var logger = new _Logger__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('Parser');
|
|
71013
|
+
var parseMobileHubConfig = function parseMobileHubConfig(config) {
|
|
71014
|
+
var amplifyConfig = {}; // Analytics
|
|
71015
|
+
|
|
71016
|
+
if (config['aws_mobile_analytics_app_id']) {
|
|
71017
|
+
var Analytics = {
|
|
71018
|
+
AWSPinpoint: {
|
|
71019
|
+
appId: config['aws_mobile_analytics_app_id'],
|
|
71020
|
+
region: config['aws_mobile_analytics_app_region']
|
|
71021
|
+
}
|
|
71022
|
+
};
|
|
71023
|
+
amplifyConfig.Analytics = Analytics;
|
|
71024
|
+
} // Auth
|
|
71025
|
+
|
|
71026
|
+
|
|
71027
|
+
if (config['aws_cognito_identity_pool_id'] || config['aws_user_pools_id']) {
|
|
71028
|
+
amplifyConfig.Auth = {
|
|
71029
|
+
userPoolId: config['aws_user_pools_id'],
|
|
71030
|
+
userPoolWebClientId: config['aws_user_pools_web_client_id'],
|
|
71031
|
+
region: config['aws_cognito_region'],
|
|
71032
|
+
identityPoolId: config['aws_cognito_identity_pool_id'],
|
|
71033
|
+
identityPoolRegion: config['aws_cognito_region'],
|
|
71034
|
+
mandatorySignIn: config['aws_mandatory_sign_in'] === 'enable'
|
|
71035
|
+
};
|
|
71036
|
+
} // Storage
|
|
71037
|
+
|
|
71038
|
+
|
|
71039
|
+
var storageConfig;
|
|
71040
|
+
|
|
71041
|
+
if (config['aws_user_files_s3_bucket']) {
|
|
71042
|
+
storageConfig = {
|
|
71043
|
+
AWSS3: {
|
|
71044
|
+
bucket: config['aws_user_files_s3_bucket'],
|
|
71045
|
+
region: config['aws_user_files_s3_bucket_region'],
|
|
71046
|
+
dangerouslyConnectToHttpEndpointForTesting: config['aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing']
|
|
71047
|
+
}
|
|
71048
|
+
};
|
|
71049
|
+
} else {
|
|
71050
|
+
storageConfig = config ? config.Storage || config : {};
|
|
71051
|
+
} // Logging
|
|
71052
|
+
|
|
71053
|
+
|
|
71054
|
+
if (config['Logging']) {
|
|
71055
|
+
amplifyConfig.Logging = __assign(__assign({}, config['Logging']), {
|
|
71056
|
+
region: config['aws_project_region']
|
|
71057
|
+
});
|
|
71058
|
+
} // Geo
|
|
71059
|
+
|
|
71060
|
+
|
|
71061
|
+
if (config['geo']) {
|
|
71062
|
+
amplifyConfig.Geo = Object.assign({}, config.geo);
|
|
71063
|
+
|
|
71064
|
+
if (config.geo['amazon_location_service']) {
|
|
71065
|
+
amplifyConfig.Geo = {
|
|
71066
|
+
AmazonLocationService: config.geo['amazon_location_service']
|
|
71067
|
+
};
|
|
71068
|
+
}
|
|
71069
|
+
}
|
|
71070
|
+
|
|
71071
|
+
amplifyConfig.Analytics = Object.assign({}, amplifyConfig.Analytics, config.Analytics);
|
|
71072
|
+
amplifyConfig.Auth = Object.assign({}, amplifyConfig.Auth, config.Auth);
|
|
71073
|
+
amplifyConfig.Storage = Object.assign({}, storageConfig);
|
|
71074
|
+
amplifyConfig.Logging = Object.assign({}, amplifyConfig.Logging, config.Logging);
|
|
71075
|
+
logger.debug('parse config', config, 'to amplifyconfig', amplifyConfig);
|
|
71076
|
+
return amplifyConfig;
|
|
71077
|
+
};
|
|
71078
|
+
/**
|
|
71079
|
+
* @deprecated use per-function export
|
|
71080
|
+
*/
|
|
71081
|
+
|
|
71082
|
+
var Parser =
|
|
71083
|
+
/** @class */
|
|
71084
|
+
function () {
|
|
71085
|
+
function Parser() {}
|
|
71086
|
+
|
|
71087
|
+
Parser.parseMobilehubConfig = parseMobileHubConfig;
|
|
71088
|
+
return Parser;
|
|
71089
|
+
}();
|
|
71090
|
+
|
|
71091
|
+
|
|
71092
|
+
/**
|
|
71093
|
+
* @deprecated use per-function export
|
|
71094
|
+
*/
|
|
71095
|
+
|
|
71096
|
+
/* harmony default export */ __webpack_exports__["default"] = (Parser);
|
|
71097
|
+
|
|
71098
|
+
/***/ }),
|
|
71099
|
+
|
|
71100
|
+
/***/ "../core/lib-esm/Platform/index.js":
|
|
71101
|
+
/*!*****************************************!*\
|
|
71102
|
+
!*** ../core/lib-esm/Platform/index.js ***!
|
|
71103
|
+
\*****************************************/
|
|
71104
|
+
/*! exports provided: Platform, getAmplifyUserAgent, default */
|
|
71105
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
71106
|
+
|
|
71107
|
+
"use strict";
|
|
71108
|
+
__webpack_require__.r(__webpack_exports__);
|
|
71109
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Platform", function() { return Platform; });
|
|
71110
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAmplifyUserAgent", function() { return getAmplifyUserAgent; });
|
|
71111
|
+
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./version */ "../core/lib-esm/Platform/version.js");
|
|
71112
|
+
/*
|
|
71113
|
+
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
71114
|
+
*
|
|
71115
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
71116
|
+
* the License. A copy of the License is located at
|
|
71117
|
+
*
|
|
71118
|
+
* http://aws.amazon.com/apache2.0/
|
|
71119
|
+
*
|
|
71120
|
+
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
71121
|
+
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
71122
|
+
* and limitations under the License.
|
|
71123
|
+
*/
|
|
71124
|
+
|
|
71125
|
+
var BASE_USER_AGENT = "aws-amplify/" + _version__WEBPACK_IMPORTED_MODULE_0__["version"];
|
|
71126
|
+
var Platform = {
|
|
71127
|
+
userAgent: BASE_USER_AGENT + " js",
|
|
71128
|
+
product: '',
|
|
71129
|
+
navigator: null,
|
|
71130
|
+
isReactNative: false
|
|
71131
|
+
};
|
|
71132
|
+
|
|
71133
|
+
if (typeof navigator !== 'undefined' && navigator.product) {
|
|
71134
|
+
Platform.product = navigator.product || '';
|
|
71135
|
+
Platform.navigator = navigator || null;
|
|
71136
|
+
|
|
71137
|
+
switch (navigator.product) {
|
|
71138
|
+
case 'ReactNative':
|
|
71139
|
+
Platform.userAgent = BASE_USER_AGENT + " react-native";
|
|
71140
|
+
Platform.isReactNative = true;
|
|
71141
|
+
break;
|
|
71142
|
+
|
|
71143
|
+
default:
|
|
71144
|
+
Platform.userAgent = BASE_USER_AGENT + " js";
|
|
71145
|
+
Platform.isReactNative = false;
|
|
71146
|
+
break;
|
|
71147
|
+
}
|
|
71148
|
+
}
|
|
71149
|
+
|
|
71150
|
+
var getAmplifyUserAgent = function getAmplifyUserAgent() {
|
|
71151
|
+
return Platform.userAgent;
|
|
71152
|
+
};
|
|
71153
|
+
/**
|
|
71154
|
+
* @deprecated use named import
|
|
71155
|
+
*/
|
|
71156
|
+
|
|
71157
|
+
/* harmony default export */ __webpack_exports__["default"] = (Platform);
|
|
71158
|
+
|
|
71159
|
+
/***/ }),
|
|
71160
|
+
|
|
71161
|
+
/***/ "../core/lib-esm/Platform/version.js":
|
|
71162
|
+
/*!*******************************************!*\
|
|
71163
|
+
!*** ../core/lib-esm/Platform/version.js ***!
|
|
71164
|
+
\*******************************************/
|
|
71165
|
+
/*! exports provided: version */
|
|
71166
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
71167
|
+
|
|
71168
|
+
"use strict";
|
|
71169
|
+
__webpack_require__.r(__webpack_exports__);
|
|
71170
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; });
|
|
71171
|
+
// generated by genversion
|
|
71172
|
+
var version = '4.4.1';
|
|
71173
|
+
|
|
71174
|
+
/***/ }),
|
|
71175
|
+
|
|
71176
|
+
/***/ "../core/lib-esm/Providers/APIProvider/APILoggingProvider.js":
|
|
71177
|
+
/*!*******************************************************************!*\
|
|
71178
|
+
!*** ../core/lib-esm/Providers/APIProvider/APILoggingProvider.js ***!
|
|
71179
|
+
\*******************************************************************/
|
|
71180
|
+
/*! exports provided: APILoggingProvider */
|
|
71181
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
71182
|
+
|
|
71183
|
+
"use strict";
|
|
71184
|
+
__webpack_require__.r(__webpack_exports__);
|
|
71185
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APILoggingProvider", function() { return APILoggingProvider; });
|
|
71186
|
+
/* harmony import */ var _Logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Logger */ "../core/lib-esm/Logger/index.js");
|
|
71187
|
+
/* harmony import */ var _loggerConnectivity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./loggerConnectivity */ "../core/lib-esm/Providers/APIProvider/loggerConnectivity.js");
|
|
71188
|
+
/* harmony import */ var _types_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../types/types */ "../core/lib-esm/types/types.js");
|
|
71189
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ */ "../core/lib-esm/index.js");
|
|
71190
|
+
/* harmony import */ var _CloudWatchEventFormatter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CloudWatchEventFormatter */ "../core/lib-esm/Providers/APIProvider/CloudWatchEventFormatter.js");
|
|
71191
|
+
/* harmony import */ var _Fetch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Fetch */ "../core/lib-esm/Providers/APIProvider/Fetch.js");
|
|
71192
|
+
/* harmony import */ var _Util_Constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Util/Constants */ "../core/lib-esm/Util/Constants.js");
|
|
71193
|
+
/* harmony import */ var _Util_StringUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Util/StringUtils */ "../core/lib-esm/Util/StringUtils.js");
|
|
71194
|
+
function _typeof(obj) {
|
|
71195
|
+
"@babel/helpers - typeof";
|
|
71196
|
+
|
|
71197
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
71198
|
+
return typeof obj;
|
|
71199
|
+
} : function (obj) {
|
|
71200
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
71201
|
+
}, _typeof(obj);
|
|
71202
|
+
}
|
|
71203
|
+
|
|
71204
|
+
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
71205
|
+
function adopt(value) {
|
|
71206
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
71207
|
+
resolve(value);
|
|
71208
|
+
});
|
|
71209
|
+
}
|
|
71210
|
+
|
|
71211
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
71212
|
+
function fulfilled(value) {
|
|
71213
|
+
try {
|
|
71214
|
+
step(generator.next(value));
|
|
71215
|
+
} catch (e) {
|
|
71216
|
+
reject(e);
|
|
71217
|
+
}
|
|
71218
|
+
}
|
|
71219
|
+
|
|
71220
|
+
function rejected(value) {
|
|
71221
|
+
try {
|
|
71222
|
+
step(generator["throw"](value));
|
|
71223
|
+
} catch (e) {
|
|
71224
|
+
reject(e);
|
|
71225
|
+
}
|
|
71226
|
+
}
|
|
71227
|
+
|
|
71228
|
+
function step(result) {
|
|
71229
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
71230
|
+
}
|
|
71231
|
+
|
|
71232
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
71233
|
+
});
|
|
71234
|
+
};
|
|
71235
|
+
|
|
71236
|
+
var __generator = undefined && undefined.__generator || function (thisArg, body) {
|
|
71237
|
+
var _ = {
|
|
71238
|
+
label: 0,
|
|
71239
|
+
sent: function sent() {
|
|
71240
|
+
if (t[0] & 1) throw t[1];
|
|
71241
|
+
return t[1];
|
|
71242
|
+
},
|
|
71243
|
+
trys: [],
|
|
71244
|
+
ops: []
|
|
71245
|
+
},
|
|
71246
|
+
f,
|
|
71247
|
+
y,
|
|
71248
|
+
t,
|
|
71249
|
+
g;
|
|
71250
|
+
return g = {
|
|
71251
|
+
next: verb(0),
|
|
71252
|
+
"throw": verb(1),
|
|
71253
|
+
"return": verb(2)
|
|
71254
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
71255
|
+
return this;
|
|
71256
|
+
}), g;
|
|
71257
|
+
|
|
71258
|
+
function verb(n) {
|
|
71259
|
+
return function (v) {
|
|
71260
|
+
return step([n, v]);
|
|
71261
|
+
};
|
|
71262
|
+
}
|
|
71263
|
+
|
|
71264
|
+
function step(op) {
|
|
71265
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
71266
|
+
|
|
71267
|
+
while (_) {
|
|
71268
|
+
try {
|
|
71269
|
+
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;
|
|
71270
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
71271
|
+
|
|
71272
|
+
switch (op[0]) {
|
|
71273
|
+
case 0:
|
|
71274
|
+
case 1:
|
|
71275
|
+
t = op;
|
|
71276
|
+
break;
|
|
71277
|
+
|
|
71278
|
+
case 4:
|
|
71279
|
+
_.label++;
|
|
71280
|
+
return {
|
|
71281
|
+
value: op[1],
|
|
71282
|
+
done: false
|
|
71283
|
+
};
|
|
71284
|
+
|
|
71285
|
+
case 5:
|
|
71286
|
+
_.label++;
|
|
71287
|
+
y = op[1];
|
|
71288
|
+
op = [0];
|
|
71289
|
+
continue;
|
|
71290
|
+
|
|
71291
|
+
case 7:
|
|
71292
|
+
op = _.ops.pop();
|
|
71293
|
+
|
|
71294
|
+
_.trys.pop();
|
|
71295
|
+
|
|
71296
|
+
continue;
|
|
71297
|
+
|
|
71298
|
+
default:
|
|
71299
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
71300
|
+
_ = 0;
|
|
71301
|
+
continue;
|
|
71302
|
+
}
|
|
71303
|
+
|
|
71304
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
71305
|
+
_.label = op[1];
|
|
71306
|
+
break;
|
|
71307
|
+
}
|
|
71308
|
+
|
|
71309
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
71310
|
+
_.label = t[1];
|
|
71311
|
+
t = op;
|
|
71312
|
+
break;
|
|
71313
|
+
}
|
|
71314
|
+
|
|
71315
|
+
if (t && _.label < t[2]) {
|
|
71316
|
+
_.label = t[2];
|
|
71317
|
+
|
|
71318
|
+
_.ops.push(op);
|
|
71319
|
+
|
|
71320
|
+
break;
|
|
71321
|
+
}
|
|
71322
|
+
|
|
71323
|
+
if (t[2]) _.ops.pop();
|
|
71324
|
+
|
|
71325
|
+
_.trys.pop();
|
|
71326
|
+
|
|
71327
|
+
continue;
|
|
71328
|
+
}
|
|
71329
|
+
|
|
71330
|
+
op = body.call(thisArg, _);
|
|
71331
|
+
} catch (e) {
|
|
71332
|
+
op = [6, e];
|
|
71333
|
+
y = 0;
|
|
71334
|
+
} finally {
|
|
71335
|
+
f = t = 0;
|
|
71336
|
+
}
|
|
71337
|
+
}
|
|
71338
|
+
|
|
71339
|
+
if (op[0] & 5) throw op[1];
|
|
71340
|
+
return {
|
|
71341
|
+
value: op[0] ? op[1] : void 0,
|
|
71342
|
+
done: true
|
|
71343
|
+
};
|
|
71344
|
+
}
|
|
71345
|
+
};
|
|
71346
|
+
|
|
71347
|
+
var __read = undefined && undefined.__read || function (o, n) {
|
|
71348
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
71349
|
+
if (!m) return o;
|
|
71350
|
+
var i = m.call(o),
|
|
71351
|
+
r,
|
|
71352
|
+
ar = [],
|
|
71353
|
+
e;
|
|
71354
|
+
|
|
71355
|
+
try {
|
|
71356
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
71357
|
+
ar.push(r.value);
|
|
71358
|
+
}
|
|
71359
|
+
} catch (error) {
|
|
71360
|
+
e = {
|
|
71361
|
+
error: error
|
|
71362
|
+
};
|
|
71363
|
+
} finally {
|
|
71364
|
+
try {
|
|
71365
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
71366
|
+
} finally {
|
|
71367
|
+
if (e) throw e.error;
|
|
71368
|
+
}
|
|
71369
|
+
}
|
|
71370
|
+
|
|
71371
|
+
return ar;
|
|
71372
|
+
};
|
|
71373
|
+
|
|
71374
|
+
var __spread = undefined && undefined.__spread || function () {
|
|
71375
|
+
for (var ar = [], i = 0; i < arguments.length; i++) {
|
|
71376
|
+
ar = ar.concat(__read(arguments[i]));
|
|
71377
|
+
}
|
|
71378
|
+
|
|
71379
|
+
return ar;
|
|
71380
|
+
};
|
|
71381
|
+
|
|
71382
|
+
|
|
71383
|
+
|
|
71384
|
+
|
|
71385
|
+
|
|
71386
|
+
|
|
71387
|
+
|
|
71388
|
+
|
|
71389
|
+
|
|
71390
|
+
var logger = new _Logger__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('APILoggingProvider');
|
|
71391
|
+
var HTTPS = 'https';
|
|
71392
|
+
var LOCALHOST = 'http://localhost';
|
|
71393
|
+
var DEFAULT_INTERVAL = 3000; // Exclude these to avoid infinite loop
|
|
71394
|
+
|
|
71395
|
+
var DEFAULT_CLASS_EXCLUDE_LIST = ['APILoggingProvider', 'AWSCloudWatch', 'Retry'];
|
|
71396
|
+
var LAMBDA_PAYLOAD_LIMIT = 6 * 1024 * 1024; // 6MB
|
|
71397
|
+
|
|
71398
|
+
/*
|
|
71399
|
+
Todo:
|
|
71400
|
+
* Refactor this into a FSM - managing state will become complex when remote config functionality gets added in P1
|
|
71401
|
+
*/
|
|
71402
|
+
|
|
71403
|
+
var APILoggingProvider =
|
|
71404
|
+
/** @class */
|
|
71405
|
+
function () {
|
|
71406
|
+
function APILoggingProvider(config) {
|
|
71407
|
+
this.online = false;
|
|
71408
|
+
this.eventBuffer = [];
|
|
71409
|
+
this.configure(config);
|
|
71410
|
+
}
|
|
71411
|
+
|
|
71412
|
+
APILoggingProvider.prototype.getProviderName = function () {
|
|
71413
|
+
return APILoggingProvider.PROVIDER_NAME;
|
|
71414
|
+
};
|
|
71415
|
+
|
|
71416
|
+
APILoggingProvider.prototype.getCategoryName = function () {
|
|
71417
|
+
return APILoggingProvider.CATEGORY;
|
|
71418
|
+
};
|
|
71419
|
+
|
|
71420
|
+
APILoggingProvider.prototype.configure = function (config) {
|
|
71421
|
+
try {
|
|
71422
|
+
this.validateConfig(config);
|
|
71423
|
+
this.config = this.normalizeConfig(config);
|
|
71424
|
+
|
|
71425
|
+
if (this.config.enabled === true) {
|
|
71426
|
+
this.initialize();
|
|
71427
|
+
} else {
|
|
71428
|
+
this.disable();
|
|
71429
|
+
}
|
|
71430
|
+
|
|
71431
|
+
return this.config;
|
|
71432
|
+
} catch (error) {
|
|
71433
|
+
logger.error('Unable to start: ', error);
|
|
71434
|
+
}
|
|
71435
|
+
};
|
|
71436
|
+
|
|
71437
|
+
APILoggingProvider.prototype.pushLog = function (event) {
|
|
71438
|
+
var _a;
|
|
71439
|
+
|
|
71440
|
+
if (((_a = this.config) === null || _a === void 0 ? void 0 : _a.enabled) === false) {
|
|
71441
|
+
return;
|
|
71442
|
+
}
|
|
71443
|
+
|
|
71444
|
+
if (!this.verifyEvent(event)) {
|
|
71445
|
+
return;
|
|
71446
|
+
}
|
|
71447
|
+
|
|
71448
|
+
switch (this.config.eventFormat) {
|
|
71449
|
+
case _types_types__WEBPACK_IMPORTED_MODULE_2__["EVENT_FORMAT"].CLOUDWATCH:
|
|
71450
|
+
var cloudWatchEvent = Object(_CloudWatchEventFormatter__WEBPACK_IMPORTED_MODULE_4__["cloudWatchEventFromGeneric"])(event);
|
|
71451
|
+
this.eventBuffer.push(cloudWatchEvent);
|
|
71452
|
+
break;
|
|
71453
|
+
|
|
71454
|
+
case _types_types__WEBPACK_IMPORTED_MODULE_2__["EVENT_FORMAT"].GENERIC:
|
|
71455
|
+
default:
|
|
71456
|
+
this.eventBuffer.push(event);
|
|
71457
|
+
break;
|
|
71458
|
+
}
|
|
71459
|
+
};
|
|
71460
|
+
|
|
71461
|
+
APILoggingProvider.prototype.validateConfig = function (config) {
|
|
71462
|
+
if (typeof (config === null || config === void 0 ? void 0 : config.endpoint) !== 'string') {
|
|
71463
|
+
throw new Error("Invalid configuration. `config.endpoint` must be a string. Received: " + _typeof(config === null || config === void 0 ? void 0 : config.endpoint));
|
|
71464
|
+
}
|
|
71465
|
+
|
|
71466
|
+
var protocolStr = config.endpoint.substring(0, 5).toLowerCase();
|
|
71467
|
+
var isUsingLocalhost = config.endpoint.substring(0, LOCALHOST.length).toLowerCase() === LOCALHOST;
|
|
71468
|
+
|
|
71469
|
+
if (protocolStr !== HTTPS && !isUsingLocalhost) {
|
|
71470
|
+
throw new Error("Invalid configuration. Only HTTPS endpoints are supported. Received: " + protocolStr);
|
|
71471
|
+
}
|
|
71472
|
+
};
|
|
71473
|
+
|
|
71474
|
+
APILoggingProvider.prototype.normalizeConfig = function (config) {
|
|
71475
|
+
var _a, _b, _c, _d;
|
|
71476
|
+
|
|
71477
|
+
var normalizedConfig = {
|
|
71478
|
+
endpoint: config.endpoint,
|
|
71479
|
+
apiKey: config.apiKey,
|
|
71480
|
+
metadata: config.metadata,
|
|
71481
|
+
enabled: (_a = config.enabled) !== null && _a !== void 0 ? _a : true,
|
|
71482
|
+
level: (_b = config.level) !== null && _b !== void 0 ? _b : _Logger__WEBPACK_IMPORTED_MODULE_0__["LOG_TYPE"].WARN,
|
|
71483
|
+
eventFormat: (_c = config.eventFormat) !== null && _c !== void 0 ? _c : _types_types__WEBPACK_IMPORTED_MODULE_2__["EVENT_FORMAT"].CLOUDWATCH,
|
|
71484
|
+
bufferInterval: (_d = config.bufferInterval) !== null && _d !== void 0 ? _d : DEFAULT_INTERVAL,
|
|
71485
|
+
excludeClassList: config.excludeClassList instanceof Array ? __spread(DEFAULT_CLASS_EXCLUDE_LIST, config.excludeClassList) : DEFAULT_CLASS_EXCLUDE_LIST
|
|
71486
|
+
};
|
|
71487
|
+
return normalizedConfig;
|
|
71488
|
+
};
|
|
71489
|
+
|
|
71490
|
+
APILoggingProvider.prototype.initialize = function () {
|
|
71491
|
+
this.subscribeConnectivity();
|
|
71492
|
+
};
|
|
71493
|
+
|
|
71494
|
+
APILoggingProvider.prototype.disable = function () {
|
|
71495
|
+
this.clearInterval();
|
|
71496
|
+
this.unsubscribeConnectivity();
|
|
71497
|
+
this.eventBuffer = [];
|
|
71498
|
+
};
|
|
71499
|
+
|
|
71500
|
+
APILoggingProvider.prototype.subscribeConnectivity = function () {
|
|
71501
|
+
var _this = this;
|
|
71502
|
+
|
|
71503
|
+
if (this.connectivity) {
|
|
71504
|
+
return;
|
|
71505
|
+
}
|
|
71506
|
+
|
|
71507
|
+
this.connectivity = new _loggerConnectivity__WEBPACK_IMPORTED_MODULE_1__["default"]();
|
|
71508
|
+
this.connectivity.status().subscribe(function (_a) {
|
|
71509
|
+
var online = _a.online;
|
|
71510
|
+
|
|
71511
|
+
if (online && !_this.online) {
|
|
71512
|
+
_this.startInterval();
|
|
71513
|
+
} else {
|
|
71514
|
+
_this.clearInterval();
|
|
71515
|
+
}
|
|
71516
|
+
|
|
71517
|
+
_this.online = online;
|
|
71518
|
+
logger.debug('Connectivity status: ', online);
|
|
71519
|
+
});
|
|
71520
|
+
};
|
|
71521
|
+
|
|
71522
|
+
APILoggingProvider.prototype.unsubscribeConnectivity = function () {
|
|
71523
|
+
if (this.connectivity) {
|
|
71524
|
+
this.connectivity.unsubscribe();
|
|
71525
|
+
this.connectivity = undefined;
|
|
71526
|
+
}
|
|
71527
|
+
};
|
|
71528
|
+
|
|
71529
|
+
APILoggingProvider.prototype.startInterval = function () {
|
|
71530
|
+
var _this = this;
|
|
71531
|
+
|
|
71532
|
+
if (this.bufferInterval) {
|
|
71533
|
+
this.clearInterval();
|
|
71534
|
+
}
|
|
71535
|
+
|
|
71536
|
+
this.bufferInterval = setInterval(function () {
|
|
71537
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
71538
|
+
var error_1;
|
|
71539
|
+
return __generator(this, function (_a) {
|
|
71540
|
+
switch (_a.label) {
|
|
71541
|
+
case 0:
|
|
71542
|
+
_a.trys.push([0, 2,, 3]);
|
|
71543
|
+
|
|
71544
|
+
return [4
|
|
71545
|
+
/*yield*/
|
|
71546
|
+
, this.uploadEvents()];
|
|
71547
|
+
|
|
71548
|
+
case 1:
|
|
71549
|
+
_a.sent();
|
|
71550
|
+
|
|
71551
|
+
return [3
|
|
71552
|
+
/*break*/
|
|
71553
|
+
, 3];
|
|
71554
|
+
|
|
71555
|
+
case 2:
|
|
71556
|
+
error_1 = _a.sent();
|
|
71557
|
+
logger.error("Could not upload log events", error_1);
|
|
71558
|
+
return [3
|
|
71559
|
+
/*break*/
|
|
71560
|
+
, 3];
|
|
71561
|
+
|
|
71562
|
+
case 3:
|
|
71563
|
+
return [2
|
|
71564
|
+
/*return*/
|
|
71565
|
+
];
|
|
71566
|
+
}
|
|
71567
|
+
});
|
|
71568
|
+
});
|
|
71569
|
+
}, this.config.bufferInterval);
|
|
71570
|
+
};
|
|
71571
|
+
|
|
71572
|
+
APILoggingProvider.prototype.clearInterval = function () {
|
|
71573
|
+
clearInterval(this.bufferInterval);
|
|
71574
|
+
this.bufferInterval = undefined;
|
|
71575
|
+
};
|
|
71576
|
+
/*
|
|
71577
|
+
Filter out events that don't adhere to config settings
|
|
71578
|
+
*/
|
|
71579
|
+
|
|
71580
|
+
|
|
71581
|
+
APILoggingProvider.prototype.verifyEvent = function (event) {
|
|
71582
|
+
var level = event.level,
|
|
71583
|
+
source = event.source;
|
|
71584
|
+
var configLevelValue = _Logger__WEBPACK_IMPORTED_MODULE_0__["LOG_LEVELS"][this.config.level];
|
|
71585
|
+
var eventLevelValue = _Logger__WEBPACK_IMPORTED_MODULE_0__["LOG_LEVELS"][level];
|
|
71586
|
+
|
|
71587
|
+
if (eventLevelValue < configLevelValue) {
|
|
71588
|
+
return false;
|
|
71589
|
+
}
|
|
71590
|
+
|
|
71591
|
+
if (this.config.excludeClassList.includes(source)) {
|
|
71592
|
+
return false;
|
|
71593
|
+
}
|
|
71594
|
+
|
|
71595
|
+
return true;
|
|
71596
|
+
};
|
|
71597
|
+
|
|
71598
|
+
APILoggingProvider.prototype.uploadEvents = function () {
|
|
71599
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
71600
|
+
var eventBatch, body, options;
|
|
71601
|
+
|
|
71602
|
+
var _this = this;
|
|
71603
|
+
|
|
71604
|
+
return __generator(this, function (_a) {
|
|
71605
|
+
switch (_a.label) {
|
|
71606
|
+
case 0:
|
|
71607
|
+
eventBatch = this.generateEventBatch(this.eventBuffer);
|
|
71608
|
+
|
|
71609
|
+
if (eventBatch.length < 1) {
|
|
71610
|
+
return [2
|
|
71611
|
+
/*return*/
|
|
71612
|
+
];
|
|
71613
|
+
}
|
|
71614
|
+
|
|
71615
|
+
body = {
|
|
71616
|
+
logEvents: eventBatch,
|
|
71617
|
+
metadata: this.config.metadata
|
|
71618
|
+
};
|
|
71619
|
+
options = Object(_Fetch__WEBPACK_IMPORTED_MODULE_5__["postOptions"])(body);
|
|
71620
|
+
return [4
|
|
71621
|
+
/*yield*/
|
|
71622
|
+
, Object(___WEBPACK_IMPORTED_MODULE_3__["jitteredExponentialRetry"])(function (endpoint, options) {
|
|
71623
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
71624
|
+
var res, error_2;
|
|
71625
|
+
return __generator(this, function (_a) {
|
|
71626
|
+
switch (_a.label) {
|
|
71627
|
+
case 0:
|
|
71628
|
+
_a.trys.push([0, 2,, 3]);
|
|
71629
|
+
|
|
71630
|
+
return [4
|
|
71631
|
+
/*yield*/
|
|
71632
|
+
, fetch(endpoint, options)];
|
|
71633
|
+
|
|
71634
|
+
case 1:
|
|
71635
|
+
res = _a.sent();
|
|
71636
|
+
if (!res.ok) throw new Error("Request Failed. Status: " + res.status + " - " + res.statusText);
|
|
71637
|
+
return [3
|
|
71638
|
+
/*break*/
|
|
71639
|
+
, 3];
|
|
71640
|
+
|
|
71641
|
+
case 2:
|
|
71642
|
+
error_2 = _a.sent(); // fetch will only fail in the event of a network error. Don't retry
|
|
71643
|
+
|
|
71644
|
+
if (error_2.message === 'Failed to fetch') {
|
|
71645
|
+
throw new ___WEBPACK_IMPORTED_MODULE_3__["NonRetryableError"](error_2.message);
|
|
71646
|
+
} // all other errors are logged and retried
|
|
71647
|
+
|
|
71648
|
+
|
|
71649
|
+
logger.warn(error_2);
|
|
71650
|
+
throw error_2;
|
|
71651
|
+
|
|
71652
|
+
case 3:
|
|
71653
|
+
return [2
|
|
71654
|
+
/*return*/
|
|
71655
|
+
];
|
|
71656
|
+
}
|
|
71657
|
+
});
|
|
71658
|
+
});
|
|
71659
|
+
}, [this.config.endpoint, options])];
|
|
71660
|
+
|
|
71661
|
+
case 1:
|
|
71662
|
+
_a.sent(); // remove events from buffer after the request succeeds
|
|
71663
|
+
|
|
71664
|
+
|
|
71665
|
+
this.eventBuffer.splice(0, eventBatch.length);
|
|
71666
|
+
return [2
|
|
71667
|
+
/*return*/
|
|
71668
|
+
];
|
|
71669
|
+
}
|
|
71670
|
+
});
|
|
71671
|
+
});
|
|
71672
|
+
};
|
|
71673
|
+
|
|
71674
|
+
APILoggingProvider.prototype.generateEventBatch = function (buffer) {
|
|
71675
|
+
switch (this.config.eventFormat) {
|
|
71676
|
+
case _types_types__WEBPACK_IMPORTED_MODULE_2__["EVENT_FORMAT"].CLOUDWATCH:
|
|
71677
|
+
return Object(_CloudWatchEventFormatter__WEBPACK_IMPORTED_MODULE_4__["cloudWatchLogEventBatch"])(buffer);
|
|
71678
|
+
|
|
71679
|
+
case _types_types__WEBPACK_IMPORTED_MODULE_2__["EVENT_FORMAT"].GENERIC:
|
|
71680
|
+
default:
|
|
71681
|
+
return this.genericLogEventBatch(buffer);
|
|
71682
|
+
}
|
|
71683
|
+
};
|
|
71684
|
+
|
|
71685
|
+
APILoggingProvider.prototype.genericLogEventBatch = function (buffer) {
|
|
71686
|
+
var totalByteSize = 0;
|
|
71687
|
+
var currentEventIdx = 0;
|
|
71688
|
+
|
|
71689
|
+
while (currentEventIdx < buffer.length) {
|
|
71690
|
+
var currentEvent = buffer[currentEventIdx];
|
|
71691
|
+
var eventSize = Object(_Util_StringUtils__WEBPACK_IMPORTED_MODULE_7__["getStringByteSize"])(JSON.stringify(currentEvent));
|
|
71692
|
+
|
|
71693
|
+
if (totalByteSize + eventSize > LAMBDA_PAYLOAD_LIMIT) {
|
|
71694
|
+
break;
|
|
71695
|
+
}
|
|
71696
|
+
|
|
71697
|
+
totalByteSize += eventSize;
|
|
71698
|
+
currentEventIdx += 1;
|
|
71699
|
+
}
|
|
71700
|
+
|
|
71701
|
+
return buffer.slice(0, currentEventIdx);
|
|
71702
|
+
};
|
|
71703
|
+
|
|
71704
|
+
APILoggingProvider.PROVIDER_NAME = _Util_Constants__WEBPACK_IMPORTED_MODULE_6__["API_LOGGING_PROVIDER_NAME"];
|
|
71705
|
+
APILoggingProvider.CATEGORY = _Util_Constants__WEBPACK_IMPORTED_MODULE_6__["API_LOGGING_PROVIDER_CATEGORY"];
|
|
71706
|
+
return APILoggingProvider;
|
|
71707
|
+
}();
|
|
71708
|
+
|
|
71709
|
+
|
|
71710
|
+
|
|
71711
|
+
/***/ }),
|
|
71712
|
+
|
|
71713
|
+
/***/ "../core/lib-esm/Providers/APIProvider/CloudWatchEventFormatter.js":
|
|
71714
|
+
/*!*************************************************************************!*\
|
|
71715
|
+
!*** ../core/lib-esm/Providers/APIProvider/CloudWatchEventFormatter.js ***!
|
|
71716
|
+
\*************************************************************************/
|
|
71717
|
+
/*! exports provided: cloudWatchEventFromGeneric, truncateOversizedEvent, cloudWatchLogEventBatch */
|
|
71718
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
71719
|
+
|
|
71720
|
+
"use strict";
|
|
71721
|
+
__webpack_require__.r(__webpack_exports__);
|
|
71722
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloudWatchEventFromGeneric", function() { return cloudWatchEventFromGeneric; });
|
|
71723
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "truncateOversizedEvent", function() { return truncateOversizedEvent; });
|
|
71724
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloudWatchLogEventBatch", function() { return cloudWatchLogEventBatch; });
|
|
71725
|
+
/* harmony import */ var _Util_Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Util/Constants */ "../core/lib-esm/Util/Constants.js");
|
|
71726
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ */ "../core/lib-esm/index.js");
|
|
71727
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
71728
|
+
var t = {};
|
|
71729
|
+
|
|
71730
|
+
for (var p in s) {
|
|
71731
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
71732
|
+
}
|
|
71733
|
+
|
|
71734
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
71735
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
71736
|
+
}
|
|
71737
|
+
return t;
|
|
71738
|
+
};
|
|
71739
|
+
|
|
71740
|
+
|
|
71741
|
+
|
|
71742
|
+
var logger = new ___WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('APILoggingProvider');
|
|
71743
|
+
var TRUNCATE_MAX_LENGTH = 5000;
|
|
71744
|
+
var cloudWatchEventFromGeneric = function cloudWatchEventFromGeneric(event) {
|
|
71745
|
+
var timestamp = event.timestamp,
|
|
71746
|
+
message = __rest(event, ["timestamp"]);
|
|
71747
|
+
|
|
71748
|
+
return {
|
|
71749
|
+
timestamp: timestamp,
|
|
71750
|
+
message: JSON.stringify(message)
|
|
71751
|
+
};
|
|
71752
|
+
};
|
|
71753
|
+
var truncateOversizedEvent = function truncateOversizedEvent(event) {
|
|
71754
|
+
var timestamp = event.timestamp,
|
|
71755
|
+
message = event.message;
|
|
71756
|
+
|
|
71757
|
+
try {
|
|
71758
|
+
var messageJson = JSON.parse(message);
|
|
71759
|
+
var truncatedObj = {
|
|
71760
|
+
level: messageJson.level,
|
|
71761
|
+
"class": messageJson["class"],
|
|
71762
|
+
message: messageJson.message.substring(0, TRUNCATE_MAX_LENGTH)
|
|
71763
|
+
};
|
|
71764
|
+
|
|
71765
|
+
if (messageJson.data != null) {
|
|
71766
|
+
truncatedObj['data'] = "OBJECT SIZE EXCEEDS CLOUDWATCH EVENT LIMIT. Truncated: " + JSON.stringify(messageJson.data).substring(0, TRUNCATE_MAX_LENGTH);
|
|
71767
|
+
}
|
|
71768
|
+
|
|
71769
|
+
return {
|
|
71770
|
+
timestamp: timestamp,
|
|
71771
|
+
message: JSON.stringify(truncatedObj)
|
|
71772
|
+
};
|
|
71773
|
+
} catch (error) {
|
|
71774
|
+
logger.warn('Could not truncate oversized event', error);
|
|
71775
|
+
var truncated = JSON.stringify({
|
|
71776
|
+
level: 'UNKNOWN',
|
|
71777
|
+
"class": 'Unknown',
|
|
71778
|
+
message: 'OBJECT SIZE EXCEEDS CLOUDWATCH EVENT LIMIT. Could not parse event to truncate'
|
|
71779
|
+
});
|
|
71780
|
+
return {
|
|
71781
|
+
timestamp: timestamp,
|
|
71782
|
+
message: truncated
|
|
71783
|
+
};
|
|
71784
|
+
}
|
|
71785
|
+
};
|
|
71786
|
+
var cloudWatchLogEventBatch = function cloudWatchLogEventBatch(buffer) {
|
|
71787
|
+
var totalByteSize = 0;
|
|
71788
|
+
var currentEventIdx = 0;
|
|
71789
|
+
|
|
71790
|
+
while (currentEventIdx < buffer.length) {
|
|
71791
|
+
var currentEvent = buffer[currentEventIdx];
|
|
71792
|
+
var eventSize = Object(___WEBPACK_IMPORTED_MODULE_1__["getStringByteSize"])(currentEvent.message) + _Util_Constants__WEBPACK_IMPORTED_MODULE_0__["AWS_CLOUDWATCH_BASE_BUFFER_SIZE"];
|
|
71793
|
+
|
|
71794
|
+
if (eventSize > _Util_Constants__WEBPACK_IMPORTED_MODULE_0__["AWS_CLOUDWATCH_MAX_EVENT_SIZE"]) {
|
|
71795
|
+
var errString = "Log event exceeds maximum size for CloudWatch logs. Log size: " + eventSize + ". Truncating log message.";
|
|
71796
|
+
logger.debug(errString);
|
|
71797
|
+
currentEvent = truncateOversizedEvent(currentEvent);
|
|
71798
|
+
buffer[currentEventIdx] = currentEvent;
|
|
71799
|
+
eventSize = new TextEncoder().encode(currentEvent.message).length + _Util_Constants__WEBPACK_IMPORTED_MODULE_0__["AWS_CLOUDWATCH_BASE_BUFFER_SIZE"];
|
|
71800
|
+
}
|
|
71801
|
+
|
|
71802
|
+
if (totalByteSize + eventSize > _Util_Constants__WEBPACK_IMPORTED_MODULE_0__["AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE"]) {
|
|
71803
|
+
break;
|
|
71804
|
+
}
|
|
71805
|
+
|
|
71806
|
+
totalByteSize += eventSize;
|
|
71807
|
+
currentEventIdx += 1;
|
|
71808
|
+
}
|
|
71809
|
+
|
|
71810
|
+
return buffer.slice(0, currentEventIdx);
|
|
71811
|
+
};
|
|
71812
|
+
|
|
71813
|
+
/***/ }),
|
|
71814
|
+
|
|
71815
|
+
/***/ "../core/lib-esm/Providers/APIProvider/Fetch.js":
|
|
71816
|
+
/*!******************************************************!*\
|
|
71817
|
+
!*** ../core/lib-esm/Providers/APIProvider/Fetch.js ***!
|
|
71818
|
+
\******************************************************/
|
|
71819
|
+
/*! exports provided: postOptions */
|
|
71820
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
71821
|
+
|
|
71822
|
+
"use strict";
|
|
71823
|
+
__webpack_require__.r(__webpack_exports__);
|
|
71824
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "postOptions", function() { return postOptions; });
|
|
71825
|
+
var postOptions = function postOptions(body) {
|
|
71826
|
+
return {
|
|
71827
|
+
method: 'POST',
|
|
71828
|
+
mode: 'cors',
|
|
71829
|
+
cache: 'no-cache',
|
|
71830
|
+
credentials: 'same-origin',
|
|
71831
|
+
headers: {
|
|
71832
|
+
'Content-Type': 'application/json'
|
|
71833
|
+
},
|
|
71834
|
+
body: JSON.stringify(body)
|
|
71835
|
+
};
|
|
71836
|
+
};
|
|
71837
|
+
|
|
71838
|
+
/***/ }),
|
|
70870
71839
|
|
|
71840
|
+
/***/ "../core/lib-esm/Providers/APIProvider/LoggerReachability/index.js":
|
|
71841
|
+
/*!*************************************************************************!*\
|
|
71842
|
+
!*** ../core/lib-esm/Providers/APIProvider/LoggerReachability/index.js ***!
|
|
71843
|
+
\*************************************************************************/
|
|
71844
|
+
/*! exports provided: ReachabilityMonitor */
|
|
71845
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
70871
71846
|
|
|
70872
|
-
|
|
70873
|
-
|
|
70874
|
-
*/
|
|
71847
|
+
"use strict";
|
|
71848
|
+
__webpack_require__.r(__webpack_exports__);
|
|
71849
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReachabilityMonitor", function() { return ReachabilityMonitor; });
|
|
71850
|
+
/* harmony import */ var _Util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Util */ "../core/lib-esm/Util/index.js");
|
|
70875
71851
|
|
|
70876
|
-
|
|
71852
|
+
var ReachabilityMonitor = new _Util__WEBPACK_IMPORTED_MODULE_0__["Reachability"]().networkMonitor();
|
|
70877
71853
|
|
|
70878
71854
|
/***/ }),
|
|
70879
71855
|
|
|
70880
|
-
/***/ "../core/lib-esm/
|
|
70881
|
-
|
|
70882
|
-
!*** ../core/lib-esm/
|
|
70883
|
-
|
|
70884
|
-
/*! exports provided:
|
|
71856
|
+
/***/ "../core/lib-esm/Providers/APIProvider/index.js":
|
|
71857
|
+
/*!******************************************************!*\
|
|
71858
|
+
!*** ../core/lib-esm/Providers/APIProvider/index.js ***!
|
|
71859
|
+
\******************************************************/
|
|
71860
|
+
/*! exports provided: APILoggingProvider */
|
|
70885
71861
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
70886
71862
|
|
|
70887
71863
|
"use strict";
|
|
70888
71864
|
__webpack_require__.r(__webpack_exports__);
|
|
70889
|
-
/* harmony
|
|
70890
|
-
/* harmony
|
|
70891
|
-
/* harmony import */ var _GoogleOAuth__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GoogleOAuth */ "../core/lib-esm/OAuthHelper/GoogleOAuth.js");
|
|
70892
|
-
/* harmony import */ var _FacebookOAuth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FacebookOAuth */ "../core/lib-esm/OAuthHelper/FacebookOAuth.js");
|
|
70893
|
-
/*
|
|
70894
|
-
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
70895
|
-
*
|
|
70896
|
-
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
70897
|
-
* the License. A copy of the License is located at
|
|
70898
|
-
*
|
|
70899
|
-
* http://aws.amazon.com/apache2.0/
|
|
70900
|
-
*
|
|
70901
|
-
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
70902
|
-
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
70903
|
-
* and limitations under the License.
|
|
70904
|
-
*/
|
|
71865
|
+
/* harmony import */ var _APILoggingProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./APILoggingProvider */ "../core/lib-esm/Providers/APIProvider/APILoggingProvider.js");
|
|
71866
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "APILoggingProvider", function() { return _APILoggingProvider__WEBPACK_IMPORTED_MODULE_0__["APILoggingProvider"]; });
|
|
70905
71867
|
|
|
70906
71868
|
|
|
70907
|
-
var GoogleOAuth = new _GoogleOAuth__WEBPACK_IMPORTED_MODULE_0__["GoogleOAuth"]();
|
|
70908
|
-
var FacebookOAuth = new _FacebookOAuth__WEBPACK_IMPORTED_MODULE_1__["FacebookOAuth"]();
|
|
70909
71869
|
|
|
70910
71870
|
/***/ }),
|
|
70911
71871
|
|
|
70912
|
-
/***/ "../core/lib-esm/
|
|
70913
|
-
|
|
70914
|
-
!*** ../core/lib-esm/
|
|
70915
|
-
|
|
70916
|
-
/*! exports provided:
|
|
71872
|
+
/***/ "../core/lib-esm/Providers/APIProvider/loggerConnectivity.js":
|
|
71873
|
+
/*!*******************************************************************!*\
|
|
71874
|
+
!*** ../core/lib-esm/Providers/APIProvider/loggerConnectivity.js ***!
|
|
71875
|
+
\*******************************************************************/
|
|
71876
|
+
/*! exports provided: default */
|
|
70917
71877
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
70918
71878
|
|
|
70919
71879
|
"use strict";
|
|
70920
71880
|
__webpack_require__.r(__webpack_exports__);
|
|
70921
|
-
/* harmony
|
|
70922
|
-
/* harmony
|
|
70923
|
-
/* harmony import */ var _Logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Logger */ "../core/lib-esm/Logger/index.js");
|
|
71881
|
+
/* harmony import */ var zen_observable_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! zen-observable-ts */ "../../node_modules/zen-observable-ts/lib/bundle.esm.js");
|
|
71882
|
+
/* harmony import */ var _LoggerReachability__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LoggerReachability */ "../core/lib-esm/Providers/APIProvider/LoggerReachability/index.js");
|
|
70924
71883
|
var __assign = undefined && undefined.__assign || function () {
|
|
70925
71884
|
__assign = Object.assign || function (t) {
|
|
70926
71885
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -70938,167 +71897,54 @@ var __assign = undefined && undefined.__assign || function () {
|
|
|
70938
71897
|
};
|
|
70939
71898
|
|
|
70940
71899
|
|
|
70941
|
-
|
|
70942
|
-
var parseMobileHubConfig = function parseMobileHubConfig(config) {
|
|
70943
|
-
var amplifyConfig = {}; // Analytics
|
|
71900
|
+
// TODO: refactor this to a singleton that supports numerous observers
|
|
70944
71901
|
|
|
70945
|
-
|
|
70946
|
-
|
|
70947
|
-
|
|
70948
|
-
|
|
70949
|
-
|
|
70950
|
-
|
|
71902
|
+
var LoggerConnectivity =
|
|
71903
|
+
/** @class */
|
|
71904
|
+
function () {
|
|
71905
|
+
function LoggerConnectivity() {
|
|
71906
|
+
this.connectionStatus = {
|
|
71907
|
+
online: false
|
|
70951
71908
|
};
|
|
70952
|
-
|
|
70953
|
-
} // Auth
|
|
70954
|
-
|
|
71909
|
+
}
|
|
70955
71910
|
|
|
70956
|
-
|
|
70957
|
-
|
|
70958
|
-
userPoolId: config['aws_user_pools_id'],
|
|
70959
|
-
userPoolWebClientId: config['aws_user_pools_web_client_id'],
|
|
70960
|
-
region: config['aws_cognito_region'],
|
|
70961
|
-
identityPoolId: config['aws_cognito_identity_pool_id'],
|
|
70962
|
-
identityPoolRegion: config['aws_cognito_region'],
|
|
70963
|
-
mandatorySignIn: config['aws_mandatory_sign_in'] === 'enable'
|
|
70964
|
-
};
|
|
70965
|
-
} // Storage
|
|
71911
|
+
LoggerConnectivity.prototype.status = function () {
|
|
71912
|
+
var _this = this;
|
|
70966
71913
|
|
|
71914
|
+
if (this.observer) {
|
|
71915
|
+
throw new Error('Subscriber already exists');
|
|
71916
|
+
}
|
|
70967
71917
|
|
|
70968
|
-
|
|
71918
|
+
return new zen_observable_ts__WEBPACK_IMPORTED_MODULE_0__["default"](function (observer) {
|
|
71919
|
+
_this.observer = observer;
|
|
71920
|
+
_this.subscription = _LoggerReachability__WEBPACK_IMPORTED_MODULE_1__["ReachabilityMonitor"].subscribe(function (_a) {
|
|
71921
|
+
var online = _a.online;
|
|
71922
|
+
_this.connectionStatus.online = online;
|
|
70969
71923
|
|
|
70970
|
-
|
|
70971
|
-
storageConfig = {
|
|
70972
|
-
AWSS3: {
|
|
70973
|
-
bucket: config['aws_user_files_s3_bucket'],
|
|
70974
|
-
region: config['aws_user_files_s3_bucket_region'],
|
|
70975
|
-
dangerouslyConnectToHttpEndpointForTesting: config['aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing']
|
|
70976
|
-
}
|
|
70977
|
-
};
|
|
70978
|
-
} else {
|
|
70979
|
-
storageConfig = config ? config.Storage || config : {};
|
|
70980
|
-
} // Logging
|
|
71924
|
+
var observerResult = __assign({}, _this.connectionStatus);
|
|
70981
71925
|
|
|
71926
|
+
observer.next(observerResult);
|
|
71927
|
+
});
|
|
71928
|
+
return function () {
|
|
71929
|
+
clearTimeout(_this.timeout);
|
|
70982
71930
|
|
|
70983
|
-
|
|
70984
|
-
|
|
70985
|
-
region: config['aws_project_region']
|
|
71931
|
+
_this.unsubscribe();
|
|
71932
|
+
};
|
|
70986
71933
|
});
|
|
70987
|
-
}
|
|
70988
|
-
|
|
70989
|
-
|
|
70990
|
-
if (config['geo']) {
|
|
70991
|
-
amplifyConfig.Geo = Object.assign({}, config.geo);
|
|
71934
|
+
};
|
|
70992
71935
|
|
|
70993
|
-
|
|
70994
|
-
|
|
70995
|
-
|
|
70996
|
-
|
|
71936
|
+
LoggerConnectivity.prototype.unsubscribe = function () {
|
|
71937
|
+
if (this.subscription) {
|
|
71938
|
+
clearTimeout(this.timeout);
|
|
71939
|
+
this.subscription.unsubscribe();
|
|
71940
|
+
this.observer = undefined;
|
|
70997
71941
|
}
|
|
70998
|
-
}
|
|
70999
|
-
|
|
71000
|
-
amplifyConfig.Analytics = Object.assign({}, amplifyConfig.Analytics, config.Analytics);
|
|
71001
|
-
amplifyConfig.Auth = Object.assign({}, amplifyConfig.Auth, config.Auth);
|
|
71002
|
-
amplifyConfig.Storage = Object.assign({}, storageConfig);
|
|
71003
|
-
amplifyConfig.Logging = Object.assign({}, amplifyConfig.Logging, config.Logging);
|
|
71004
|
-
logger.debug('parse config', config, 'to amplifyconfig', amplifyConfig);
|
|
71005
|
-
return amplifyConfig;
|
|
71006
|
-
};
|
|
71007
|
-
/**
|
|
71008
|
-
* @deprecated use per-function export
|
|
71009
|
-
*/
|
|
71010
|
-
|
|
71011
|
-
var Parser =
|
|
71012
|
-
/** @class */
|
|
71013
|
-
function () {
|
|
71014
|
-
function Parser() {}
|
|
71942
|
+
};
|
|
71015
71943
|
|
|
71016
|
-
|
|
71017
|
-
return Parser;
|
|
71944
|
+
return LoggerConnectivity;
|
|
71018
71945
|
}();
|
|
71019
71946
|
|
|
71020
|
-
|
|
71021
|
-
/**
|
|
71022
|
-
* @deprecated use per-function export
|
|
71023
|
-
*/
|
|
71024
|
-
|
|
71025
|
-
/* harmony default export */ __webpack_exports__["default"] = (Parser);
|
|
71026
|
-
|
|
71027
|
-
/***/ }),
|
|
71028
|
-
|
|
71029
|
-
/***/ "../core/lib-esm/Platform/index.js":
|
|
71030
|
-
/*!*****************************************!*\
|
|
71031
|
-
!*** ../core/lib-esm/Platform/index.js ***!
|
|
71032
|
-
\*****************************************/
|
|
71033
|
-
/*! exports provided: Platform, getAmplifyUserAgent, default */
|
|
71034
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
71035
|
-
|
|
71036
|
-
"use strict";
|
|
71037
|
-
__webpack_require__.r(__webpack_exports__);
|
|
71038
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Platform", function() { return Platform; });
|
|
71039
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAmplifyUserAgent", function() { return getAmplifyUserAgent; });
|
|
71040
|
-
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./version */ "../core/lib-esm/Platform/version.js");
|
|
71041
|
-
/*
|
|
71042
|
-
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
71043
|
-
*
|
|
71044
|
-
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
71045
|
-
* the License. A copy of the License is located at
|
|
71046
|
-
*
|
|
71047
|
-
* http://aws.amazon.com/apache2.0/
|
|
71048
|
-
*
|
|
71049
|
-
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
71050
|
-
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
71051
|
-
* and limitations under the License.
|
|
71052
|
-
*/
|
|
71053
|
-
|
|
71054
|
-
var BASE_USER_AGENT = "aws-amplify/" + _version__WEBPACK_IMPORTED_MODULE_0__["version"];
|
|
71055
|
-
var Platform = {
|
|
71056
|
-
userAgent: BASE_USER_AGENT + " js",
|
|
71057
|
-
product: '',
|
|
71058
|
-
navigator: null,
|
|
71059
|
-
isReactNative: false
|
|
71060
|
-
};
|
|
71061
|
-
|
|
71062
|
-
if (typeof navigator !== 'undefined' && navigator.product) {
|
|
71063
|
-
Platform.product = navigator.product || '';
|
|
71064
|
-
Platform.navigator = navigator || null;
|
|
71065
|
-
|
|
71066
|
-
switch (navigator.product) {
|
|
71067
|
-
case 'ReactNative':
|
|
71068
|
-
Platform.userAgent = BASE_USER_AGENT + " react-native";
|
|
71069
|
-
Platform.isReactNative = true;
|
|
71070
|
-
break;
|
|
71071
|
-
|
|
71072
|
-
default:
|
|
71073
|
-
Platform.userAgent = BASE_USER_AGENT + " js";
|
|
71074
|
-
Platform.isReactNative = false;
|
|
71075
|
-
break;
|
|
71076
|
-
}
|
|
71077
|
-
}
|
|
71078
|
-
|
|
71079
|
-
var getAmplifyUserAgent = function getAmplifyUserAgent() {
|
|
71080
|
-
return Platform.userAgent;
|
|
71081
|
-
};
|
|
71082
|
-
/**
|
|
71083
|
-
* @deprecated use named import
|
|
71084
|
-
*/
|
|
71085
|
-
|
|
71086
|
-
/* harmony default export */ __webpack_exports__["default"] = (Platform);
|
|
71087
|
-
|
|
71088
|
-
/***/ }),
|
|
71089
|
-
|
|
71090
|
-
/***/ "../core/lib-esm/Platform/version.js":
|
|
71091
|
-
/*!*******************************************!*\
|
|
71092
|
-
!*** ../core/lib-esm/Platform/version.js ***!
|
|
71093
|
-
\*******************************************/
|
|
71094
|
-
/*! exports provided: version */
|
|
71095
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
71096
|
-
|
|
71097
|
-
"use strict";
|
|
71098
|
-
__webpack_require__.r(__webpack_exports__);
|
|
71099
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; });
|
|
71100
|
-
// generated by genversion
|
|
71101
|
-
var version = '4.4.0';
|
|
71947
|
+
/* harmony default export */ __webpack_exports__["default"] = (LoggerConnectivity);
|
|
71102
71948
|
|
|
71103
71949
|
/***/ }),
|
|
71104
71950
|
|
|
@@ -72111,7 +72957,7 @@ function () {
|
|
|
72111
72957
|
/*!******************************************!*\
|
|
72112
72958
|
!*** ../core/lib-esm/Providers/index.js ***!
|
|
72113
72959
|
\******************************************/
|
|
72114
|
-
/*! exports provided: AWSCloudWatchProvider */
|
|
72960
|
+
/*! exports provided: AWSCloudWatchProvider, APILoggingProvider */
|
|
72115
72961
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
72116
72962
|
|
|
72117
72963
|
"use strict";
|
|
@@ -72119,6 +72965,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
72119
72965
|
/* harmony import */ var _AWSCloudWatchProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AWSCloudWatchProvider */ "../core/lib-esm/Providers/AWSCloudWatchProvider.js");
|
|
72120
72966
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AWSCloudWatchProvider", function() { return _AWSCloudWatchProvider__WEBPACK_IMPORTED_MODULE_0__["AWSCloudWatchProvider"]; });
|
|
72121
72967
|
|
|
72968
|
+
/* harmony import */ var _APIProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./APIProvider */ "../core/lib-esm/Providers/APIProvider/index.js");
|
|
72969
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "APILoggingProvider", function() { return _APIProvider__WEBPACK_IMPORTED_MODULE_1__["APILoggingProvider"]; });
|
|
72970
|
+
|
|
72971
|
+
|
|
72122
72972
|
|
|
72123
72973
|
|
|
72124
72974
|
/***/ }),
|
|
@@ -73123,7 +73973,7 @@ function () {
|
|
|
73123
73973
|
/*!*****************************************!*\
|
|
73124
73974
|
!*** ../core/lib-esm/Util/Constants.js ***!
|
|
73125
73975
|
\*****************************************/
|
|
73126
|
-
/*! 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 */
|
|
73976
|
+
/*! 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 */
|
|
73127
73977
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
73128
73978
|
|
|
73129
73979
|
"use strict";
|
|
@@ -73135,6 +73985,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
73135
73985
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AWS_CLOUDWATCH_PROVIDER_NAME", function() { return AWS_CLOUDWATCH_PROVIDER_NAME; });
|
|
73136
73986
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NO_CREDS_ERROR_STRING", function() { return NO_CREDS_ERROR_STRING; });
|
|
73137
73987
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RETRY_ERROR_CODES", function() { return RETRY_ERROR_CODES; });
|
|
73988
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "API_LOGGING_PROVIDER_NAME", function() { return API_LOGGING_PROVIDER_NAME; });
|
|
73989
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "API_LOGGING_PROVIDER_CATEGORY", function() { return API_LOGGING_PROVIDER_CATEGORY; });
|
|
73138
73990
|
/*
|
|
73139
73991
|
* Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
73140
73992
|
*
|
|
@@ -73155,6 +74007,8 @@ var AWS_CLOUDWATCH_CATEGORY = 'Logging';
|
|
|
73155
74007
|
var AWS_CLOUDWATCH_PROVIDER_NAME = 'AWSCloudWatch';
|
|
73156
74008
|
var NO_CREDS_ERROR_STRING = 'No credentials';
|
|
73157
74009
|
var RETRY_ERROR_CODES = ['ResourceNotFoundException', 'InvalidSequenceTokenException'];
|
|
74010
|
+
var API_LOGGING_PROVIDER_NAME = 'API';
|
|
74011
|
+
var API_LOGGING_PROVIDER_CATEGORY = 'Logging';
|
|
73158
74012
|
|
|
73159
74013
|
|
|
73160
74014
|
/***/ }),
|
|
@@ -73368,7 +74222,7 @@ function () {
|
|
|
73368
74222
|
|
|
73369
74223
|
"use strict";
|
|
73370
74224
|
__webpack_require__.r(__webpack_exports__);
|
|
73371
|
-
/* harmony import */ var
|
|
74225
|
+
/* harmony import */ var _JS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../JS */ "../core/lib-esm/JS.js");
|
|
73372
74226
|
/* harmony import */ var zen_observable_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! zen-observable-ts */ "../../node_modules/zen-observable-ts/lib/bundle.esm.js");
|
|
73373
74227
|
var __values = undefined && undefined.__values || function (o) {
|
|
73374
74228
|
var s = typeof Symbol === "function" && Symbol.iterator,
|
|
@@ -73396,13 +74250,13 @@ function () {
|
|
|
73396
74250
|
function ReachabilityNavigator() {}
|
|
73397
74251
|
|
|
73398
74252
|
ReachabilityNavigator.prototype.networkMonitor = function (netInfo) {
|
|
73399
|
-
if (Object(
|
|
74253
|
+
if (Object(_JS__WEBPACK_IMPORTED_MODULE_0__["browserOrNode"])().isNode) {
|
|
73400
74254
|
return zen_observable_ts__WEBPACK_IMPORTED_MODULE_1__["default"].from([{
|
|
73401
74255
|
online: true
|
|
73402
74256
|
}]);
|
|
73403
74257
|
}
|
|
73404
74258
|
|
|
73405
|
-
var globalObj = Object(
|
|
74259
|
+
var globalObj = Object(_JS__WEBPACK_IMPORTED_MODULE_0__["isWebWorker"])() ? self : window;
|
|
73406
74260
|
return new zen_observable_ts__WEBPACK_IMPORTED_MODULE_1__["default"](function (observer) {
|
|
73407
74261
|
observer.next({
|
|
73408
74262
|
online: globalObj.navigator.onLine
|
|
@@ -73695,7 +74549,7 @@ var __spread = undefined && undefined.__spread || function () {
|
|
|
73695
74549
|
};
|
|
73696
74550
|
|
|
73697
74551
|
|
|
73698
|
-
var logger = new _Logger_ConsoleLogger__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('
|
|
74552
|
+
var logger = new _Logger_ConsoleLogger__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('Retry');
|
|
73699
74553
|
|
|
73700
74554
|
var NonRetryableError =
|
|
73701
74555
|
/** @class */
|
|
@@ -73738,7 +74592,7 @@ function retry(functionToRetry, args, delayFn, attempt) {
|
|
|
73738
74592
|
throw Error('functionToRetry must be a function');
|
|
73739
74593
|
}
|
|
73740
74594
|
|
|
73741
|
-
logger.debug(functionToRetry.name + " attempt #" + attempt + " with
|
|
74595
|
+
logger.debug(functionToRetry.name + " attempt #" + attempt + " with these vars: " + JSON.stringify(args));
|
|
73742
74596
|
_a.label = 1;
|
|
73743
74597
|
|
|
73744
74598
|
case 1:
|
|
@@ -73831,13 +74685,16 @@ var jitteredExponentialRetry = function jitteredExponentialRetry(functionToRetry
|
|
|
73831
74685
|
/*!*******************************************!*\
|
|
73832
74686
|
!*** ../core/lib-esm/Util/StringUtils.js ***!
|
|
73833
74687
|
\*******************************************/
|
|
73834
|
-
/*! exports provided: urlSafeEncode, urlSafeDecode */
|
|
74688
|
+
/*! exports provided: urlSafeEncode, urlSafeDecode, getStringByteSize */
|
|
73835
74689
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
73836
74690
|
|
|
73837
74691
|
"use strict";
|
|
73838
74692
|
__webpack_require__.r(__webpack_exports__);
|
|
73839
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "urlSafeEncode", function() { return urlSafeEncode; });
|
|
74693
|
+
/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "urlSafeEncode", function() { return urlSafeEncode; });
|
|
73840
74694
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "urlSafeDecode", function() { return urlSafeDecode; });
|
|
74695
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getStringByteSize", function() { return getStringByteSize; });
|
|
74696
|
+
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../ */ "../core/lib-esm/index.js");
|
|
74697
|
+
|
|
73841
74698
|
function urlSafeEncode(str) {
|
|
73842
74699
|
return str.split('').map(function (_char) {
|
|
73843
74700
|
return _char.charCodeAt(0).toString(16).padStart(2, '0');
|
|
@@ -73848,6 +74705,18 @@ function urlSafeDecode(hex) {
|
|
|
73848
74705
|
return String.fromCharCode(parseInt(_char2, 16));
|
|
73849
74706
|
}).join('');
|
|
73850
74707
|
}
|
|
74708
|
+
var getStringByteSize = function getStringByteSize(str) {
|
|
74709
|
+
if (Object(___WEBPACK_IMPORTED_MODULE_0__["browserOrNode"])().isBrowser || Blob !== undefined) {
|
|
74710
|
+
return new Blob([str]).size;
|
|
74711
|
+
}
|
|
74712
|
+
|
|
74713
|
+
if (Buffer !== undefined) {
|
|
74714
|
+
return Buffer.byteLength(str, 'utf8');
|
|
74715
|
+
}
|
|
74716
|
+
|
|
74717
|
+
throw new Error('Cannot compute string length. Blob and Buffer are undefined');
|
|
74718
|
+
};
|
|
74719
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/buffer/index.js */ "../../node_modules/buffer/index.js").Buffer))
|
|
73851
74720
|
|
|
73852
74721
|
/***/ }),
|
|
73853
74722
|
|
|
@@ -73855,7 +74724,7 @@ function urlSafeDecode(hex) {
|
|
|
73855
74724
|
/*!*************************************!*\
|
|
73856
74725
|
!*** ../core/lib-esm/Util/index.js ***!
|
|
73857
74726
|
\*************************************/
|
|
73858
|
-
/*! 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 */
|
|
74727
|
+
/*! 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 */
|
|
73859
74728
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
73860
74729
|
|
|
73861
74730
|
"use strict";
|
|
@@ -73881,6 +74750,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
73881
74750
|
|
|
73882
74751
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "urlSafeDecode", function() { return _StringUtils__WEBPACK_IMPORTED_MODULE_4__["urlSafeDecode"]; });
|
|
73883
74752
|
|
|
74753
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getStringByteSize", function() { return _StringUtils__WEBPACK_IMPORTED_MODULE_4__["getStringByteSize"]; });
|
|
74754
|
+
|
|
73884
74755
|
/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Constants */ "../core/lib-esm/Util/Constants.js");
|
|
73885
74756
|
/* 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"]; });
|
|
73886
74757
|
|
|
@@ -73896,6 +74767,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
73896
74767
|
|
|
73897
74768
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RETRY_ERROR_CODES", function() { return _Constants__WEBPACK_IMPORTED_MODULE_5__["RETRY_ERROR_CODES"]; });
|
|
73898
74769
|
|
|
74770
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "API_LOGGING_PROVIDER_NAME", function() { return _Constants__WEBPACK_IMPORTED_MODULE_5__["API_LOGGING_PROVIDER_NAME"]; });
|
|
74771
|
+
|
|
74772
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "API_LOGGING_PROVIDER_CATEGORY", function() { return _Constants__WEBPACK_IMPORTED_MODULE_5__["API_LOGGING_PROVIDER_CATEGORY"]; });
|
|
74773
|
+
|
|
73899
74774
|
|
|
73900
74775
|
|
|
73901
74776
|
|
|
@@ -73945,7 +74820,7 @@ var USER_AGENT_HEADER = 'x-amz-user-agent';
|
|
|
73945
74820
|
/*!********************************!*\
|
|
73946
74821
|
!*** ../core/lib-esm/index.js ***!
|
|
73947
74822
|
\********************************/
|
|
73948
|
-
/*! 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 */
|
|
74823
|
+
/*! 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 */
|
|
73949
74824
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
73950
74825
|
|
|
73951
74826
|
"use strict";
|
|
@@ -74014,6 +74889,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
74014
74889
|
/* harmony import */ var _Providers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Providers */ "../core/lib-esm/Providers/index.js");
|
|
74015
74890
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AWSCloudWatchProvider", function() { return _Providers__WEBPACK_IMPORTED_MODULE_10__["AWSCloudWatchProvider"]; });
|
|
74016
74891
|
|
|
74892
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "APILoggingProvider", function() { return _Providers__WEBPACK_IMPORTED_MODULE_10__["APILoggingProvider"]; });
|
|
74893
|
+
|
|
74017
74894
|
/* harmony import */ var _OAuthHelper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./OAuthHelper */ "../core/lib-esm/OAuthHelper/index.js");
|
|
74018
74895
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FacebookOAuth", function() { return _OAuthHelper__WEBPACK_IMPORTED_MODULE_11__["FacebookOAuth"]; });
|
|
74019
74896
|
|
|
@@ -74070,6 +74947,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
74070
74947
|
|
|
74071
74948
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "urlSafeDecode", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["urlSafeDecode"]; });
|
|
74072
74949
|
|
|
74950
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getStringByteSize", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["getStringByteSize"]; });
|
|
74951
|
+
|
|
74073
74952
|
/* 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"]; });
|
|
74074
74953
|
|
|
74075
74954
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AWS_CLOUDWATCH_CATEGORY", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["AWS_CLOUDWATCH_CATEGORY"]; });
|
|
@@ -74084,6 +74963,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
74084
74963
|
|
|
74085
74964
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RETRY_ERROR_CODES", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["RETRY_ERROR_CODES"]; });
|
|
74086
74965
|
|
|
74966
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "API_LOGGING_PROVIDER_NAME", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["API_LOGGING_PROVIDER_NAME"]; });
|
|
74967
|
+
|
|
74968
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "API_LOGGING_PROVIDER_CATEGORY", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["API_LOGGING_PROVIDER_CATEGORY"]; });
|
|
74969
|
+
|
|
74087
74970
|
/*
|
|
74088
74971
|
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
74089
74972
|
*
|
|
@@ -74130,6 +75013,25 @@ var Constants = {
|
|
|
74130
75013
|
|
|
74131
75014
|
/***/ }),
|
|
74132
75015
|
|
|
75016
|
+
/***/ "../core/lib-esm/types/types.js":
|
|
75017
|
+
/*!**************************************!*\
|
|
75018
|
+
!*** ../core/lib-esm/types/types.js ***!
|
|
75019
|
+
\**************************************/
|
|
75020
|
+
/*! exports provided: EVENT_FORMAT */
|
|
75021
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
75022
|
+
|
|
75023
|
+
"use strict";
|
|
75024
|
+
__webpack_require__.r(__webpack_exports__);
|
|
75025
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EVENT_FORMAT", function() { return EVENT_FORMAT; });
|
|
75026
|
+
var EVENT_FORMAT;
|
|
75027
|
+
|
|
75028
|
+
(function (EVENT_FORMAT) {
|
|
75029
|
+
EVENT_FORMAT["GENERIC"] = "GENERIC";
|
|
75030
|
+
EVENT_FORMAT["CLOUDWATCH"] = "CLOUDWATCH";
|
|
75031
|
+
})(EVENT_FORMAT || (EVENT_FORMAT = {}));
|
|
75032
|
+
|
|
75033
|
+
/***/ }),
|
|
75034
|
+
|
|
74133
75035
|
/***/ "../core/node_modules/@aws-crypto/sha256-js/build/RawSha256.js":
|
|
74134
75036
|
/*!*********************************************************************!*\
|
|
74135
75037
|
!*** ../core/node_modules/@aws-crypto/sha256-js/build/RawSha256.js ***!
|