@aws-amplify/datastore 3.7.7-cloud-logging.3 → 3.7.7-unstable.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.
@@ -27859,24 +27859,6 @@ function isnan (val) {
27859
27859
 
27860
27860
  /***/ }),
27861
27861
 
27862
- /***/ "../../node_modules/fast-text-encoding/text.min.js":
27863
- /*!********************************************************************!*\
27864
- !*** /root/amplify-js/node_modules/fast-text-encoding/text.min.js ***!
27865
- \********************************************************************/
27866
- /*! no static exports found */
27867
- /***/ (function(module, exports, __webpack_require__) {
27868
-
27869
- /* WEBPACK VAR INJECTION */(function(global, Buffer) {(function(l){function m(){}function k(a,c){a=void 0===a?"utf-8":a;c=void 0===c?{fatal:!1}:c;if(-1===r.indexOf(a.toLowerCase()))throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+a+"') is invalid.");if(c.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.");}function t(a){return Buffer.from(a.buffer,a.byteOffset,a.byteLength).toString("utf-8")}function u(a){var c=URL.createObjectURL(new Blob([a],{type:"text/plain;charset=UTF-8"}));
27870
- try{var f=new XMLHttpRequest;f.open("GET",c,!1);f.send();return f.responseText}catch(e){return q(a)}finally{URL.revokeObjectURL(c)}}function q(a){for(var c=0,f=Math.min(65536,a.length+1),e=new Uint16Array(f),h=[],d=0;;){var b=c<a.length;if(!b||d>=f-1){h.push(String.fromCharCode.apply(null,e.subarray(0,d)));if(!b)return h.join("");a=a.subarray(c);d=c=0}b=a[c++];if(0===(b&128))e[d++]=b;else if(192===(b&224)){var g=a[c++]&63;e[d++]=(b&31)<<6|g}else if(224===(b&240)){g=a[c++]&63;var n=a[c++]&63;e[d++]=
27871
- (b&31)<<12|g<<6|n}else if(240===(b&248)){g=a[c++]&63;n=a[c++]&63;var v=a[c++]&63;b=(b&7)<<18|g<<12|n<<6|v;65535<b&&(b-=65536,e[d++]=b>>>10&1023|55296,b=56320|b&1023);e[d++]=b}}}if(l.TextEncoder&&l.TextDecoder)return!1;var r=["utf-8","utf8","unicode-1-1-utf-8"];Object.defineProperty(m.prototype,"encoding",{value:"utf-8"});m.prototype.encode=function(a,c){c=void 0===c?{stream:!1}:c;if(c.stream)throw Error("Failed to encode: the 'stream' option is unsupported.");c=0;for(var f=a.length,e=0,h=Math.max(32,
27872
- f+(f>>>1)+7),d=new Uint8Array(h>>>3<<3);c<f;){var b=a.charCodeAt(c++);if(55296<=b&&56319>=b){if(c<f){var g=a.charCodeAt(c);56320===(g&64512)&&(++c,b=((b&1023)<<10)+(g&1023)+65536)}if(55296<=b&&56319>=b)continue}e+4>d.length&&(h+=8,h*=1+c/a.length*2,h=h>>>3<<3,g=new Uint8Array(h),g.set(d),d=g);if(0===(b&4294967168))d[e++]=b;else{if(0===(b&4294965248))d[e++]=b>>>6&31|192;else if(0===(b&4294901760))d[e++]=b>>>12&15|224,d[e++]=b>>>6&63|128;else if(0===(b&4292870144))d[e++]=b>>>18&7|240,d[e++]=b>>>12&
27873
- 63|128,d[e++]=b>>>6&63|128;else continue;d[e++]=b&63|128}}return d.slice?d.slice(0,e):d.subarray(0,e)};Object.defineProperty(k.prototype,"encoding",{value:"utf-8"});Object.defineProperty(k.prototype,"fatal",{value:!1});Object.defineProperty(k.prototype,"ignoreBOM",{value:!1});var p=q;"function"===typeof Buffer&&Buffer.from?p=t:"function"===typeof Blob&&"function"===typeof URL&&"function"===typeof URL.createObjectURL&&(p=u);k.prototype.decode=function(a,c){c=void 0===c?{stream:!1}:c;if(c.stream)throw Error("Failed to decode: the 'stream' option is unsupported.");
27874
- a=a instanceof Uint8Array?a:a.buffer instanceof ArrayBuffer?new Uint8Array(a.buffer):new Uint8Array(a);return p(a)};l.TextEncoder=m;l.TextDecoder=k})("undefined"!==typeof window?window:"undefined"!==typeof global?global:this);
27875
-
27876
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../buffer/index.js */ "../../node_modules/buffer/index.js").Buffer))
27877
-
27878
- /***/ }),
27879
-
27880
27862
  /***/ "../../node_modules/graphql/error/GraphQLError.mjs":
27881
27863
  /*!********************************************************************!*\
27882
27864
  !*** /root/amplify-js/node_modules/graphql/error/GraphQLError.mjs ***!
@@ -61935,7 +61917,7 @@ function () {
61935
61917
  * Delete the current authenticated user
61936
61918
  * @return {Promise}
61937
61919
  **/
61938
- // TODO: Check return type void
61920
+ //TODO: Check return type void
61939
61921
 
61940
61922
 
61941
61923
  AuthClass.prototype.deleteUser = function () {
@@ -69791,7 +69773,6 @@ var LOG_LEVELS = {
69791
69773
  WARN: 4,
69792
69774
  ERROR: 5
69793
69775
  };
69794
- var COMPATIBLE_PLUGINS = [_Util_Constants__WEBPACK_IMPORTED_MODULE_0__["AWS_CLOUDWATCH_CATEGORY"]];
69795
69776
  var LOG_TYPE;
69796
69777
 
69797
69778
  (function (LOG_TYPE) {
@@ -69801,13 +69782,12 @@ var LOG_TYPE;
69801
69782
  LOG_TYPE["WARN"] = "WARN";
69802
69783
  LOG_TYPE["VERBOSE"] = "VERBOSE";
69803
69784
  })(LOG_TYPE || (LOG_TYPE = {}));
69804
-
69805
- var cloudWatchExcludeList = ['AWSCloudWatch', 'Amplify', 'Credentials', 'AuthClass', 'CloudLogger'];
69806
69785
  /**
69807
69786
  * Write logs
69808
69787
  * @class Logger
69809
69788
  */
69810
69789
 
69790
+
69811
69791
  var ConsoleLogger =
69812
69792
  /** @class */
69813
69793
  function () {
@@ -69823,19 +69803,8 @@ function () {
69823
69803
  this.name = name;
69824
69804
  this.level = level;
69825
69805
  this._pluggables = [];
69826
- this.addPluggable = this.addPluggable.bind(this);
69827
69806
  }
69828
69807
 
69829
- ConsoleLogger.globalPluggables = function (pluggable) {
69830
- if (pluggable && COMPATIBLE_PLUGINS.includes(pluggable.getCategoryName())) {
69831
- ConsoleLogger._globalpluggables.push(pluggable);
69832
- }
69833
- };
69834
-
69835
- ConsoleLogger.clearGlobalPluggables = function () {
69836
- ConsoleLogger._globalpluggables = [];
69837
- };
69838
-
69839
69808
  ConsoleLogger.prototype._padding = function (n) {
69840
69809
  return n < 10 ? '0' + n : '' + n;
69841
69810
  };
@@ -69850,20 +69819,6 @@ function () {
69850
69819
  this._config = config;
69851
69820
  return this._config;
69852
69821
  };
69853
-
69854
- ConsoleLogger.prototype._checkPluggables = function () {
69855
- if (this._pluggables.length !== ConsoleLogger._globalpluggables.length) {
69856
- if (ConsoleLogger._globalpluggables.length > 0) {
69857
- ConsoleLogger._globalpluggables.forEach(this.addPluggable);
69858
-
69859
- return;
69860
- }
69861
-
69862
- if (ConsoleLogger._globalpluggables.length === 0) {
69863
- this._pluggables = [];
69864
- }
69865
- }
69866
- };
69867
69822
  /**
69868
69823
  * Write log
69869
69824
  * @method
@@ -69876,49 +69831,12 @@ function () {
69876
69831
  ConsoleLogger.prototype._log = function (type) {
69877
69832
  var e_1, _a;
69878
69833
 
69879
- var _this = this;
69880
-
69881
69834
  var msg = [];
69882
69835
 
69883
69836
  for (var _i = 1; _i < arguments.length; _i++) {
69884
69837
  msg[_i - 1] = arguments[_i];
69885
69838
  }
69886
69839
 
69887
- if (!cloudWatchExcludeList.includes(this.name)) {
69888
- this._checkPluggables();
69889
- }
69890
-
69891
- var generateMessage = function generateMessage(msg) {};
69892
-
69893
- var generateCloudMessage = function generateCloudMessage(msg) {
69894
- var message = '';
69895
- var data;
69896
-
69897
- if (msg.length === 1 && typeof msg[0] === 'string') {
69898
- message = msg[0];
69899
- } else if (msg.length === 1) {
69900
- data = msg[0];
69901
- } else if (typeof msg[0] === 'string') {
69902
- var obj = msg.slice(1);
69903
-
69904
- if (obj.length === 1) {
69905
- obj = obj[0];
69906
- }
69907
-
69908
- message = msg[0];
69909
- data = obj;
69910
- } else {
69911
- data = msg;
69912
- }
69913
-
69914
- return JSON.stringify({
69915
- level: type,
69916
- "class": _this.name,
69917
- message: message,
69918
- data: data
69919
- });
69920
- };
69921
-
69922
69840
  var logger_level_name = this.level;
69923
69841
 
69924
69842
  if (ConsoleLogger.LOG_LEVEL) {
@@ -69932,72 +69850,62 @@ function () {
69932
69850
  var logger_level = LOG_LEVELS[logger_level_name];
69933
69851
  var type_level = LOG_LEVELS[type];
69934
69852
 
69935
- if (type_level >= logger_level) {
69936
- var log = console.log.bind(console);
69853
+ if (!(type_level >= logger_level)) {
69854
+ // Do nothing if type is not greater than or equal to logger level (handle undefined)
69855
+ return;
69856
+ }
69937
69857
 
69938
- if (type === LOG_TYPE.ERROR && console.error) {
69939
- log = console.error.bind(console);
69940
- }
69858
+ var log = console.log.bind(console);
69941
69859
 
69942
- if (type === LOG_TYPE.WARN && console.warn) {
69943
- log = console.warn.bind(console);
69944
- }
69860
+ if (type === LOG_TYPE.ERROR && console.error) {
69861
+ log = console.error.bind(console);
69862
+ }
69945
69863
 
69946
- var prefix = "[" + type + "] " + this._ts() + " " + this.name;
69947
- var message = '';
69948
- var data = void 0;
69864
+ if (type === LOG_TYPE.WARN && console.warn) {
69865
+ log = console.warn.bind(console);
69866
+ }
69949
69867
 
69950
- if (msg.length === 1 && typeof msg[0] === 'string') {
69951
- message = msg[0];
69952
- log(prefix + " - " + message);
69953
- } else if (msg.length === 1) {
69954
- data = msg[0];
69955
- log(prefix, data);
69956
- } else if (typeof msg[0] === 'string') {
69957
- var obj = msg.slice(1);
69868
+ var prefix = "[" + type + "] " + this._ts() + " " + this.name;
69869
+ var message = '';
69958
69870
 
69959
- if (obj.length === 1) {
69960
- obj = obj[0];
69961
- }
69871
+ if (msg.length === 1 && typeof msg[0] === 'string') {
69872
+ message = prefix + " - " + msg[0];
69873
+ log(message);
69874
+ } else if (msg.length === 1) {
69875
+ message = prefix + " " + msg[0];
69876
+ log(prefix, msg[0]);
69877
+ } else if (typeof msg[0] === 'string') {
69878
+ var obj = msg.slice(1);
69962
69879
 
69963
- message = msg[0];
69964
- data = obj;
69965
- log(prefix + " - " + message, data);
69966
- } else {
69967
- data = msg;
69968
- log(prefix, data);
69880
+ if (obj.length === 1) {
69881
+ obj = obj[0];
69969
69882
  }
69970
- }
69971
69883
 
69972
- if (ConsoleLogger.CLOUD_LOG_LEVEL != null && !cloudWatchExcludeList.includes(this.name)) {
69973
- var cloudMessage = generateCloudMessage(msg);
69974
-
69975
- try {
69976
- for (var _b = __values(this._pluggables), _c = _b.next(); !_c.done; _c = _b.next()) {
69977
- var plugin = _c.value;
69978
- var logger_level_1 = LOG_LEVELS[ConsoleLogger.CLOUD_LOG_LEVEL];
69979
- var type_level_1 = LOG_LEVELS[type];
69980
- var logEvent = {
69981
- message: cloudMessage,
69982
- timestamp: Date.now()
69983
- };
69884
+ message = prefix + " - " + msg[0] + " " + obj;
69885
+ log(prefix + " - " + msg[0], obj);
69886
+ } else {
69887
+ message = prefix + " " + msg;
69888
+ log(prefix, msg);
69889
+ }
69984
69890
 
69985
- if (type_level_1 >= logger_level_1) {
69986
- plugin.pushLogs([logEvent]);
69987
- } else {
69988
- plugin.pushLogs([]);
69989
- }
69990
- }
69991
- } catch (e_1_1) {
69992
- e_1 = {
69993
- error: e_1_1
69891
+ try {
69892
+ for (var _b = __values(this._pluggables), _c = _b.next(); !_c.done; _c = _b.next()) {
69893
+ var plugin = _c.value;
69894
+ var logEvent = {
69895
+ message: message,
69896
+ timestamp: Date.now()
69994
69897
  };
69898
+ plugin.pushLogs([logEvent]);
69899
+ }
69900
+ } catch (e_1_1) {
69901
+ e_1 = {
69902
+ error: e_1_1
69903
+ };
69904
+ } finally {
69905
+ try {
69906
+ if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
69995
69907
  } finally {
69996
- try {
69997
- if (_c && !_c.done && (_a = _b["return"])) _a.call(_b);
69998
- } finally {
69999
- if (e_1) throw e_1.error;
70000
- }
69908
+ if (e_1) throw e_1.error;
70001
69909
  }
70002
69910
  }
70003
69911
  };
@@ -70105,8 +70013,10 @@ function () {
70105
70013
  };
70106
70014
 
70107
70015
  ConsoleLogger.prototype.addPluggable = function (pluggable) {
70108
- if (pluggable && COMPATIBLE_PLUGINS.includes(pluggable.getCategoryName())) {
70016
+ if (pluggable && pluggable.getCategoryName() === _Util_Constants__WEBPACK_IMPORTED_MODULE_0__["AWS_CLOUDWATCH_CATEGORY"]) {
70109
70017
  this._pluggables.push(pluggable);
70018
+
70019
+ pluggable.configure(this._config);
70110
70020
  }
70111
70021
  };
70112
70022
 
@@ -70114,9 +70024,7 @@ function () {
70114
70024
  return this._pluggables;
70115
70025
  };
70116
70026
 
70117
- ConsoleLogger._globalpluggables = [];
70118
70027
  ConsoleLogger.LOG_LEVEL = null;
70119
- ConsoleLogger.CLOUD_LOG_LEVEL = null;
70120
70028
  return ConsoleLogger;
70121
70029
  }();
70122
70030
 
@@ -70964,15 +70872,6 @@ __webpack_require__.r(__webpack_exports__);
70964
70872
  /* harmony import */ var _Platform__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Platform */ "../core/lib-esm/Platform/index.js");
70965
70873
  /* harmony import */ var _Parser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Parser */ "../core/lib-esm/Parser.js");
70966
70874
  /* harmony import */ var _Util_Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Util/Constants */ "../core/lib-esm/Util/Constants.js");
70967
- function _typeof(obj) {
70968
- "@babel/helpers - typeof";
70969
-
70970
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
70971
- return typeof obj;
70972
- } : function (obj) {
70973
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
70974
- }, _typeof(obj);
70975
- }
70976
70875
  /*
70977
70876
  * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
70978
70877
  *
@@ -70985,8 +70884,6 @@ function _typeof(obj) {
70985
70884
  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
70986
70885
  * and limitations under the License.
70987
70886
  */
70988
-
70989
-
70990
70887
  var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
70991
70888
  function adopt(value) {
70992
70889
  return value instanceof P ? value : new P(function (resolve) {
@@ -71130,44 +71027,62 @@ var __generator = undefined && undefined.__generator || function (thisArg, body)
71130
71027
  }
71131
71028
  };
71132
71029
 
71030
+ var __read = undefined && undefined.__read || function (o, n) {
71031
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
71032
+ if (!m) return o;
71033
+ var i = m.call(o),
71034
+ r,
71035
+ ar = [],
71036
+ e;
71037
+
71038
+ try {
71039
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
71040
+ ar.push(r.value);
71041
+ }
71042
+ } catch (error) {
71043
+ e = {
71044
+ error: error
71045
+ };
71046
+ } finally {
71047
+ try {
71048
+ if (r && !r.done && (m = i["return"])) m.call(i);
71049
+ } finally {
71050
+ if (e) throw e.error;
71051
+ }
71052
+ }
71053
+
71054
+ return ar;
71055
+ };
71056
+
71057
+ var __spread = undefined && undefined.__spread || function () {
71058
+ for (var ar = [], i = 0; i < arguments.length; i++) {
71059
+ ar = ar.concat(__read(arguments[i]));
71060
+ }
71133
71061
 
71062
+ return ar;
71063
+ };
71134
71064
 
71135
71065
 
71136
71066
 
71137
71067
 
71138
71068
 
71139
71069
 
71140
- if (typeof window === 'undefined' || (typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object' && !window.TextEncoder) {
71141
- __webpack_require__(/*! fast-text-encoding */ "../../node_modules/fast-text-encoding/text.min.js");
71142
- }
71143
71070
 
71144
71071
  var logger = new _Logger__WEBPACK_IMPORTED_MODULE_2__["ConsoleLogger"]('AWSCloudWatch');
71145
- var INTERVAL = 30000;
71146
71072
 
71147
71073
  var AWSCloudWatchProvider =
71148
71074
  /** @class */
71149
71075
  function () {
71150
71076
  function AWSCloudWatchProvider(config) {
71151
- this._initialized = false;
71152
- console.log('cstr', config);
71153
-
71154
- if (!this._initialized) {
71155
- this.configure(config);
71156
- this._dataTracker = {
71157
- eventUploadInProgress: false,
71158
- logEvents: [],
71159
- verifiedLogGroup: {
71160
- logGroupName: this._config.logGroupName
71161
- }
71162
- };
71163
- this._currentLogBatch = [];
71164
-
71165
- this._initiateLogPushInterval();
71166
-
71167
- this._initialized = true;
71168
- }
71169
- } // public static instance: AWSCloudWatchProvider;
71077
+ this.configure(config);
71078
+ this._dataTracker = {
71079
+ eventUploadInProgress: false,
71080
+ logEvents: []
71081
+ };
71082
+ this._currentLogBatch = [];
71170
71083
 
71084
+ this._initiateLogPushInterval();
71085
+ }
71171
71086
 
71172
71087
  AWSCloudWatchProvider.prototype.getProviderName = function () {
71173
71088
  return AWSCloudWatchProvider.PROVIDER_NAME;
@@ -71181,12 +71096,6 @@ function () {
71181
71096
  return this._dataTracker.logEvents;
71182
71097
  };
71183
71098
 
71184
- AWSCloudWatchProvider.prototype.setPreFlightCheck = function (cb) {
71185
- if (typeof cb === 'function') {
71186
- this._preFlightCheck = cb;
71187
- }
71188
- };
71189
-
71190
71099
  AWSCloudWatchProvider.prototype.configure = function (config) {
71191
71100
  if (!config) return this._config || {};
71192
71101
  var conf = Object.assign({}, this._config, Object(_Parser__WEBPACK_IMPORTED_MODULE_4__["parseMobileHubConfig"])(config).Logging, config);
@@ -71440,27 +71349,8 @@ function () {
71440
71349
  };
71441
71350
 
71442
71351
  AWSCloudWatchProvider.prototype.pushLogs = function (logs) {
71443
- logger.debug('pushing log events to Cloudwatch buffer');
71444
- this._dataTracker.logEvents = this._dataTracker.logEvents.concat(logs);
71445
- };
71446
-
71447
- AWSCloudWatchProvider.prototype.pause = function () {
71448
- this._processing = false;
71449
-
71450
- if (this._timer) {
71451
- clearInterval(this._timer);
71452
- }
71453
- };
71454
-
71455
- AWSCloudWatchProvider.prototype.resume = function () {
71456
- this._processing = true;
71457
-
71458
- this._initiateLogPushInterval();
71459
- };
71460
-
71461
- AWSCloudWatchProvider.prototype.clear = function () {
71462
- this._dataTracker.logEvents = [];
71463
- this._currentLogBatch = [];
71352
+ logger.debug('pushing log events to Cloudwatch...');
71353
+ this._dataTracker.logEvents = __spread(this._dataTracker.logEvents, logs);
71464
71354
  };
71465
71355
 
71466
71356
  AWSCloudWatchProvider.prototype._validateLogGroupExistsAndCreate = function (logGroupName) {
@@ -71777,33 +71667,13 @@ function () {
71777
71667
  return __generator(this, function (_a) {
71778
71668
  switch (_a.label) {
71779
71669
  case 0:
71780
- _a.trys.push([0, 4,, 5]);
71781
-
71782
- return [4
71783
- /*yield*/
71784
- , this._preFlightCheck()];
71785
-
71786
- case 1:
71787
- /**
71788
- * CloudWatch has restrictions on the size of the log events that get sent up.
71789
- * We need to track both the size of each event and the total size of the batch
71790
- * of logs.
71791
- *
71792
- * We also need to ensure that the logs in the batch are sorted in chronological order.
71793
- * https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html
71794
- */
71795
- if (!_a.sent()) {
71796
- this.clear();
71797
- return [2
71798
- /*return*/
71799
- ];
71800
- }
71670
+ _a.trys.push([0, 3,, 4]);
71801
71671
 
71802
71672
  return [4
71803
71673
  /*yield*/
71804
71674
  , this._getNextSequenceToken()];
71805
71675
 
71806
- case 2:
71676
+ case 1:
71807
71677
  seqToken = _a.sent();
71808
71678
  logBatch = this._currentLogBatch.length === 0 ? this._getBufferedBatchOfLogs() : this._currentLogBatch;
71809
71679
  putLogsPayload = {
@@ -71817,7 +71687,7 @@ function () {
71817
71687
  /*yield*/
71818
71688
  , this._sendLogEvents(putLogsPayload)];
71819
71689
 
71820
- case 3:
71690
+ case 2:
71821
71691
  sendLogEventsResponse = _a.sent();
71822
71692
  this._nextSequenceToken = sendLogEventsResponse.nextSequenceToken;
71823
71693
  this._dataTracker.eventUploadInProgress = false;
@@ -71826,7 +71696,7 @@ function () {
71826
71696
  /*return*/
71827
71697
  , sendLogEventsResponse];
71828
71698
 
71829
- case 4:
71699
+ case 3:
71830
71700
  err_5 = _a.sent();
71831
71701
  logger.error("error during _safeUploadLogEvents: " + err_5);
71832
71702
 
@@ -71843,9 +71713,9 @@ function () {
71843
71713
 
71844
71714
  return [3
71845
71715
  /*break*/
71846
- , 5];
71716
+ , 4];
71847
71717
 
71848
- case 5:
71718
+ case 4:
71849
71719
  return [2
71850
71720
  /*return*/
71851
71721
  ];
@@ -71964,7 +71834,6 @@ function () {
71964
71834
  case 3:
71965
71835
  err_7 = _a.sent();
71966
71836
  logger.error("error when calling _safeUploadLogEvents in the timer interval - " + err_7);
71967
- this.pause();
71968
71837
  return [3
71969
71838
  /*break*/
71970
71839
  , 4];
@@ -71976,7 +71845,7 @@ function () {
71976
71845
  }
71977
71846
  });
71978
71847
  });
71979
- }, INTERVAL);
71848
+ }, 2000);
71980
71849
  };
71981
71850
 
71982
71851
  AWSCloudWatchProvider.prototype._getDocUploadPermissibility = function () {
@@ -73008,7 +72877,7 @@ function () {
73008
72877
  /*!*****************************************!*\
73009
72878
  !*** ../core/lib-esm/Util/Constants.js ***!
73010
72879
  \*****************************************/
73011
- /*! 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, AMAZON_KINESIS_LOGGING_PROVIDER_NAME, AMAZON_KINESIS_LOGGING_CATEGORY */
72880
+ /*! 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 */
73012
72881
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
73013
72882
 
73014
72883
  "use strict";
@@ -73020,8 +72889,6 @@ __webpack_require__.r(__webpack_exports__);
73020
72889
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AWS_CLOUDWATCH_PROVIDER_NAME", function() { return AWS_CLOUDWATCH_PROVIDER_NAME; });
73021
72890
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NO_CREDS_ERROR_STRING", function() { return NO_CREDS_ERROR_STRING; });
73022
72891
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RETRY_ERROR_CODES", function() { return RETRY_ERROR_CODES; });
73023
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AMAZON_KINESIS_LOGGING_PROVIDER_NAME", function() { return AMAZON_KINESIS_LOGGING_PROVIDER_NAME; });
73024
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AMAZON_KINESIS_LOGGING_CATEGORY", function() { return AMAZON_KINESIS_LOGGING_CATEGORY; });
73025
72892
  /*
73026
72893
  * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
73027
72894
  *
@@ -73035,14 +72902,11 @@ __webpack_require__.r(__webpack_exports__);
73035
72902
  * and limitations under the License.
73036
72903
  */
73037
72904
  // Logging constants
73038
- // Cloudwatch
73039
72905
  var AWS_CLOUDWATCH_BASE_BUFFER_SIZE = 26;
73040
72906
  var AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE = 1048576;
73041
72907
  var AWS_CLOUDWATCH_MAX_EVENT_SIZE = 256000;
73042
72908
  var AWS_CLOUDWATCH_CATEGORY = 'Logging';
73043
72909
  var AWS_CLOUDWATCH_PROVIDER_NAME = 'AWSCloudWatch';
73044
- var AMAZON_KINESIS_LOGGING_CATEGORY = 'KinesisLogging';
73045
- var AMAZON_KINESIS_LOGGING_PROVIDER_NAME = 'AmazonKinesisLogging';
73046
72910
  var NO_CREDS_ERROR_STRING = 'No credentials';
73047
72911
  var RETRY_ERROR_CODES = ['ResourceNotFoundException', 'InvalidSequenceTokenException'];
73048
72912
 
@@ -73745,7 +73609,7 @@ function urlSafeDecode(hex) {
73745
73609
  /*!*************************************!*\
73746
73610
  !*** ../core/lib-esm/Util/index.js ***!
73747
73611
  \*************************************/
73748
- /*! 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, AMAZON_KINESIS_LOGGING_PROVIDER_NAME, AMAZON_KINESIS_LOGGING_CATEGORY */
73612
+ /*! 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 */
73749
73613
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
73750
73614
 
73751
73615
  "use strict";
@@ -73786,10 +73650,6 @@ __webpack_require__.r(__webpack_exports__);
73786
73650
 
73787
73651
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RETRY_ERROR_CODES", function() { return _Constants__WEBPACK_IMPORTED_MODULE_5__["RETRY_ERROR_CODES"]; });
73788
73652
 
73789
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AMAZON_KINESIS_LOGGING_PROVIDER_NAME", function() { return _Constants__WEBPACK_IMPORTED_MODULE_5__["AMAZON_KINESIS_LOGGING_PROVIDER_NAME"]; });
73790
-
73791
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AMAZON_KINESIS_LOGGING_CATEGORY", function() { return _Constants__WEBPACK_IMPORTED_MODULE_5__["AMAZON_KINESIS_LOGGING_CATEGORY"]; });
73792
-
73793
73653
 
73794
73654
 
73795
73655
 
@@ -73839,7 +73699,7 @@ var USER_AGENT_HEADER = 'x-amz-user-agent';
73839
73699
  /*!********************************!*\
73840
73700
  !*** ../core/lib-esm/index.js ***!
73841
73701
  \********************************/
73842
- /*! 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, AMAZON_KINESIS_LOGGING_PROVIDER_NAME, AMAZON_KINESIS_LOGGING_CATEGORY, Amplify, default */
73702
+ /*! 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 */
73843
73703
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
73844
73704
 
73845
73705
  "use strict";
@@ -73978,10 +73838,6 @@ __webpack_require__.r(__webpack_exports__);
73978
73838
 
73979
73839
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RETRY_ERROR_CODES", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["RETRY_ERROR_CODES"]; });
73980
73840
 
73981
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AMAZON_KINESIS_LOGGING_PROVIDER_NAME", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["AMAZON_KINESIS_LOGGING_PROVIDER_NAME"]; });
73982
-
73983
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AMAZON_KINESIS_LOGGING_CATEGORY", function() { return _Util__WEBPACK_IMPORTED_MODULE_18__["AMAZON_KINESIS_LOGGING_CATEGORY"]; });
73984
-
73985
73841
  /*
73986
73842
  * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
73987
73843
  *
@@ -82429,32 +82285,24 @@ function () {
82429
82285
  case 4:
82430
82286
  _b.sent();
82431
82287
 
82432
- logger.debug('Debug info before sync');
82433
- return [4
82434
- /*yield*/
82435
- , this.storage.logDebugInfo()];
82436
-
82437
- case 5:
82438
- _b.sent();
82439
-
82440
82288
  return [4
82441
82289
  /*yield*/
82442
82290
  , checkSchemaVersion(this.storage, schema.version)];
82443
82291
 
82444
- case 6:
82292
+ case 5:
82445
82293
  _b.sent();
82446
82294
 
82447
82295
  aws_appsync_graphqlEndpoint = this.amplifyConfig.aws_appsync_graphqlEndpoint;
82448
82296
  if (!aws_appsync_graphqlEndpoint) return [3
82449
82297
  /*break*/
82450
- , 8];
82298
+ , 7];
82451
82299
  logger.debug('GraphQL endpoint available', aws_appsync_graphqlEndpoint);
82452
82300
  _a = this;
82453
82301
  return [4
82454
82302
  /*yield*/
82455
82303
  , this.processSyncExpressions()];
82456
82304
 
82457
- case 7:
82305
+ case 6:
82458
82306
  _a.syncPredicates = _b.sent();
82459
82307
  this.sync = new _sync__WEBPACK_IMPORTED_MODULE_7__["SyncEngine"](schema, namespaceResolver, syncClasses, userClasses, this.storage, modelInstanceCreator, this.conflictHandler, this.errorHandler, this.syncPredicates, this.amplifyConfig, this.authModeStrategy);
82460
82308
  fullSyncIntervalInMilliseconds = this.fullSyncInterval * 1000 * 60;
@@ -82472,16 +82320,6 @@ function () {
82472
82320
  _this.initResolve();
82473
82321
  }
82474
82322
 
82475
- if (type === _sync__WEBPACK_IMPORTED_MODULE_7__["ControlMessage"].SYNC_ENGINE_SYNC_QUERIES_READY) {
82476
- logger.debug('Debug info after sync');
82477
-
82478
- _this.storage.logDebugInfo();
82479
- }
82480
-
82481
- logger.debug({
82482
- event: type,
82483
- data: data
82484
- });
82485
82323
  _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Hub"].dispatch('datastore', {
82486
82324
  event: type,
82487
82325
  data: data
@@ -82495,21 +82333,21 @@ function () {
82495
82333
  });
82496
82334
  return [3
82497
82335
  /*break*/
82498
- , 9];
82336
+ , 8];
82499
82337
 
82500
- case 8:
82338
+ case 7:
82501
82339
  logger.warn("Data won't be synchronized. No GraphQL endpoint configured. Did you forget `Amplify.configure(awsconfig)`?", {
82502
82340
  config: this.amplifyConfig
82503
82341
  });
82504
82342
  this.initResolve();
82505
- _b.label = 9;
82343
+ _b.label = 8;
82506
82344
 
82507
- case 9:
82345
+ case 8:
82508
82346
  return [4
82509
82347
  /*yield*/
82510
82348
  , this.initialized];
82511
82349
 
82512
- case 10:
82350
+ case 9:
82513
82351
  _b.sent();
82514
82352
 
82515
82353
  return [2
@@ -89505,33 +89343,6 @@ function () {
89505
89343
  });
89506
89344
  };
89507
89345
 
89508
- StorageClass.prototype.logDebugInfo = function () {
89509
- return __awaiter(this, void 0, void 0, function () {
89510
- var results;
89511
- return __generator(this, function (_a) {
89512
- switch (_a.label) {
89513
- case 0:
89514
- if (!(typeof this.adapter.getDebugInfo === 'function')) return [3
89515
- /*break*/
89516
- , 2];
89517
- return [4
89518
- /*yield*/
89519
- , this.adapter.getDebugInfo()];
89520
-
89521
- case 1:
89522
- results = _a.sent();
89523
- logger.debug('DB Debug Info', results);
89524
- _a.label = 2;
89525
-
89526
- case 2:
89527
- return [2
89528
- /*return*/
89529
- ];
89530
- }
89531
- });
89532
- });
89533
- };
89534
-
89535
89346
  return StorageClass;
89536
89347
  }();
89537
89348
 
@@ -89637,18 +89448,6 @@ function () {
89637
89448
  return this.storage.batchSave(modelConstructor, items);
89638
89449
  };
89639
89450
 
89640
- ExclusiveStorage.prototype.logDebugInfo = function () {
89641
- return __awaiter(this, void 0, void 0, function () {
89642
- return __generator(this, function (_a) {
89643
- return [2
89644
- /*return*/
89645
- , this.runExclusive(function (storage) {
89646
- return storage.logDebugInfo();
89647
- })];
89648
- });
89649
- });
89650
- };
89651
-
89652
89451
  ExclusiveStorage.prototype.init = function () {
89653
89452
  return __awaiter(this, void 0, void 0, function () {
89654
89453
  return __generator(this, function (_a) {