@aws-amplify/predictions 4.0.43 → 4.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.0.44](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.43...@aws-amplify/predictions@4.0.44) (2022-06-18)
7
+
8
+ **Note:** Version bump only for package @aws-amplify/predictions
9
+
10
+
11
+
12
+
13
+
6
14
  ## [4.0.43](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.42...@aws-amplify/predictions@4.0.43) (2022-06-15)
7
15
 
8
16
  **Note:** Version bump only for package @aws-amplify/predictions
@@ -87276,12 +87276,24 @@ var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "../../node
87276
87276
  var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "../../node_modules/axios/lib/helpers/parseHeaders.js");
87277
87277
  var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "../../node_modules/axios/lib/helpers/isURLSameOrigin.js");
87278
87278
  var createError = __webpack_require__(/*! ../core/createError */ "../../node_modules/axios/lib/core/createError.js");
87279
+ var defaults = __webpack_require__(/*! ../defaults */ "../../node_modules/axios/lib/defaults.js");
87280
+ var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "../../node_modules/axios/lib/cancel/Cancel.js");
87279
87281
 
87280
87282
  module.exports = function xhrAdapter(config) {
87281
87283
  return new Promise(function dispatchXhrRequest(resolve, reject) {
87282
87284
  var requestData = config.data;
87283
87285
  var requestHeaders = config.headers;
87284
87286
  var responseType = config.responseType;
87287
+ var onCanceled;
87288
+ function done() {
87289
+ if (config.cancelToken) {
87290
+ config.cancelToken.unsubscribe(onCanceled);
87291
+ }
87292
+
87293
+ if (config.signal) {
87294
+ config.signal.removeEventListener('abort', onCanceled);
87295
+ }
87296
+ }
87285
87297
 
87286
87298
  if (utils.isFormData(requestData)) {
87287
87299
  delete requestHeaders['Content-Type']; // Let the browser set it
@@ -87319,7 +87331,13 @@ module.exports = function xhrAdapter(config) {
87319
87331
  request: request
87320
87332
  };
87321
87333
 
87322
- settle(resolve, reject, response);
87334
+ settle(function _resolve(value) {
87335
+ resolve(value);
87336
+ done();
87337
+ }, function _reject(err) {
87338
+ reject(err);
87339
+ done();
87340
+ }, response);
87323
87341
 
87324
87342
  // Clean up request
87325
87343
  request = null;
@@ -87372,14 +87390,15 @@ module.exports = function xhrAdapter(config) {
87372
87390
 
87373
87391
  // Handle timeout
87374
87392
  request.ontimeout = function handleTimeout() {
87375
- var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
87393
+ var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
87394
+ var transitional = config.transitional || defaults.transitional;
87376
87395
  if (config.timeoutErrorMessage) {
87377
87396
  timeoutErrorMessage = config.timeoutErrorMessage;
87378
87397
  }
87379
87398
  reject(createError(
87380
87399
  timeoutErrorMessage,
87381
87400
  config,
87382
- config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
87401
+ transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
87383
87402
  request));
87384
87403
 
87385
87404
  // Clean up request
@@ -87433,18 +87452,22 @@ module.exports = function xhrAdapter(config) {
87433
87452
  request.upload.addEventListener('progress', config.onUploadProgress);
87434
87453
  }
87435
87454
 
87436
- if (config.cancelToken) {
87455
+ if (config.cancelToken || config.signal) {
87437
87456
  // Handle cancellation
87438
- config.cancelToken.promise.then(function onCanceled(cancel) {
87457
+ // eslint-disable-next-line func-names
87458
+ onCanceled = function(cancel) {
87439
87459
  if (!request) {
87440
87460
  return;
87441
87461
  }
87442
-
87462
+ reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);
87443
87463
  request.abort();
87444
- reject(cancel);
87445
- // Clean up request
87446
87464
  request = null;
87447
- });
87465
+ };
87466
+
87467
+ config.cancelToken && config.cancelToken.subscribe(onCanceled);
87468
+ if (config.signal) {
87469
+ config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
87470
+ }
87448
87471
  }
87449
87472
 
87450
87473
  if (!requestData) {
@@ -87491,6 +87514,11 @@ function createInstance(defaultConfig) {
87491
87514
  // Copy context to instance
87492
87515
  utils.extend(instance, context);
87493
87516
 
87517
+ // Factory for creating new instances
87518
+ instance.create = function create(instanceConfig) {
87519
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
87520
+ };
87521
+
87494
87522
  return instance;
87495
87523
  }
87496
87524
 
@@ -87500,15 +87528,11 @@ var axios = createInstance(defaults);
87500
87528
  // Expose Axios class to allow class inheritance
87501
87529
  axios.Axios = Axios;
87502
87530
 
87503
- // Factory for creating new instances
87504
- axios.create = function create(instanceConfig) {
87505
- return createInstance(mergeConfig(axios.defaults, instanceConfig));
87506
- };
87507
-
87508
87531
  // Expose Cancel & CancelToken
87509
87532
  axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "../../node_modules/axios/lib/cancel/Cancel.js");
87510
87533
  axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "../../node_modules/axios/lib/cancel/CancelToken.js");
87511
87534
  axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "../../node_modules/axios/lib/cancel/isCancel.js");
87535
+ axios.VERSION = __webpack_require__(/*! ./env/data */ "../../node_modules/axios/lib/env/data.js").version;
87512
87536
 
87513
87537
  // Expose all/spread
87514
87538
  axios.all = function all(promises) {
@@ -87582,11 +87606,42 @@ function CancelToken(executor) {
87582
87606
  }
87583
87607
 
87584
87608
  var resolvePromise;
87609
+
87585
87610
  this.promise = new Promise(function promiseExecutor(resolve) {
87586
87611
  resolvePromise = resolve;
87587
87612
  });
87588
87613
 
87589
87614
  var token = this;
87615
+
87616
+ // eslint-disable-next-line func-names
87617
+ this.promise.then(function(cancel) {
87618
+ if (!token._listeners) return;
87619
+
87620
+ var i;
87621
+ var l = token._listeners.length;
87622
+
87623
+ for (i = 0; i < l; i++) {
87624
+ token._listeners[i](cancel);
87625
+ }
87626
+ token._listeners = null;
87627
+ });
87628
+
87629
+ // eslint-disable-next-line func-names
87630
+ this.promise.then = function(onfulfilled) {
87631
+ var _resolve;
87632
+ // eslint-disable-next-line func-names
87633
+ var promise = new Promise(function(resolve) {
87634
+ token.subscribe(resolve);
87635
+ _resolve = resolve;
87636
+ }).then(onfulfilled);
87637
+
87638
+ promise.cancel = function reject() {
87639
+ token.unsubscribe(_resolve);
87640
+ };
87641
+
87642
+ return promise;
87643
+ };
87644
+
87590
87645
  executor(function cancel(message) {
87591
87646
  if (token.reason) {
87592
87647
  // Cancellation has already been requested
@@ -87607,6 +87662,37 @@ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
87607
87662
  }
87608
87663
  };
87609
87664
 
87665
+ /**
87666
+ * Subscribe to the cancel signal
87667
+ */
87668
+
87669
+ CancelToken.prototype.subscribe = function subscribe(listener) {
87670
+ if (this.reason) {
87671
+ listener(this.reason);
87672
+ return;
87673
+ }
87674
+
87675
+ if (this._listeners) {
87676
+ this._listeners.push(listener);
87677
+ } else {
87678
+ this._listeners = [listener];
87679
+ }
87680
+ };
87681
+
87682
+ /**
87683
+ * Unsubscribe from the cancel signal
87684
+ */
87685
+
87686
+ CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
87687
+ if (!this._listeners) {
87688
+ return;
87689
+ }
87690
+ var index = this._listeners.indexOf(listener);
87691
+ if (index !== -1) {
87692
+ this._listeners.splice(index, 1);
87693
+ }
87694
+ };
87695
+
87610
87696
  /**
87611
87697
  * Returns an object that contains a new `CancelToken` and a function that, when called,
87612
87698
  * cancels the `CancelToken`.
@@ -87680,14 +87766,14 @@ function Axios(instanceConfig) {
87680
87766
  *
87681
87767
  * @param {Object} config The config specific for this request (merged with this.defaults)
87682
87768
  */
87683
- Axios.prototype.request = function request(config) {
87769
+ Axios.prototype.request = function request(configOrUrl, config) {
87684
87770
  /*eslint no-param-reassign:0*/
87685
87771
  // Allow for axios('example/url'[, config]) a la fetch API
87686
- if (typeof config === 'string') {
87687
- config = arguments[1] || {};
87688
- config.url = arguments[0];
87689
- } else {
87772
+ if (typeof configOrUrl === 'string') {
87690
87773
  config = config || {};
87774
+ config.url = configOrUrl;
87775
+ } else {
87776
+ config = configOrUrl || {};
87691
87777
  }
87692
87778
 
87693
87779
  config = mergeConfig(this.defaults, config);
@@ -87705,9 +87791,9 @@ Axios.prototype.request = function request(config) {
87705
87791
 
87706
87792
  if (transitional !== undefined) {
87707
87793
  validator.assertOptions(transitional, {
87708
- silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
87709
- forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
87710
- clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')
87794
+ silentJSONParsing: validators.transitional(validators.boolean),
87795
+ forcedJSONParsing: validators.transitional(validators.boolean),
87796
+ clarifyTimeoutError: validators.transitional(validators.boolean)
87711
87797
  }, false);
87712
87798
  }
87713
87799
 
@@ -87946,6 +88032,7 @@ var utils = __webpack_require__(/*! ./../utils */ "../../node_modules/axios/lib/
87946
88032
  var transformData = __webpack_require__(/*! ./transformData */ "../../node_modules/axios/lib/core/transformData.js");
87947
88033
  var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "../../node_modules/axios/lib/cancel/isCancel.js");
87948
88034
  var defaults = __webpack_require__(/*! ../defaults */ "../../node_modules/axios/lib/defaults.js");
88035
+ var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "../../node_modules/axios/lib/cancel/Cancel.js");
87949
88036
 
87950
88037
  /**
87951
88038
  * Throws a `Cancel` if cancellation has been requested.
@@ -87954,6 +88041,10 @@ function throwIfCancellationRequested(config) {
87954
88041
  if (config.cancelToken) {
87955
88042
  config.cancelToken.throwIfRequested();
87956
88043
  }
88044
+
88045
+ if (config.signal && config.signal.aborted) {
88046
+ throw new Cancel('canceled');
88047
+ }
87957
88048
  }
87958
88049
 
87959
88050
  /**
@@ -88071,7 +88162,8 @@ module.exports = function enhanceError(error, config, code, request, response) {
88071
88162
  stack: this.stack,
88072
88163
  // Axios
88073
88164
  config: this.config,
88074
- code: this.code
88165
+ code: this.code,
88166
+ status: this.response && this.response.status ? this.response.status : null
88075
88167
  };
88076
88168
  };
88077
88169
  return error;
@@ -88105,17 +88197,6 @@ module.exports = function mergeConfig(config1, config2) {
88105
88197
  config2 = config2 || {};
88106
88198
  var config = {};
88107
88199
 
88108
- var valueFromConfig2Keys = ['url', 'method', 'data'];
88109
- var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
88110
- var defaultToConfig2Keys = [
88111
- 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
88112
- 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
88113
- 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
88114
- 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
88115
- 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
88116
- ];
88117
- var directMergeKeys = ['validateStatus'];
88118
-
88119
88200
  function getMergedValue(target, source) {
88120
88201
  if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
88121
88202
  return utils.merge(target, source);
@@ -88127,51 +88208,74 @@ module.exports = function mergeConfig(config1, config2) {
88127
88208
  return source;
88128
88209
  }
88129
88210
 
88211
+ // eslint-disable-next-line consistent-return
88130
88212
  function mergeDeepProperties(prop) {
88131
88213
  if (!utils.isUndefined(config2[prop])) {
88132
- config[prop] = getMergedValue(config1[prop], config2[prop]);
88214
+ return getMergedValue(config1[prop], config2[prop]);
88133
88215
  } else if (!utils.isUndefined(config1[prop])) {
88134
- config[prop] = getMergedValue(undefined, config1[prop]);
88216
+ return getMergedValue(undefined, config1[prop]);
88135
88217
  }
88136
88218
  }
88137
88219
 
88138
- utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
88220
+ // eslint-disable-next-line consistent-return
88221
+ function valueFromConfig2(prop) {
88139
88222
  if (!utils.isUndefined(config2[prop])) {
88140
- config[prop] = getMergedValue(undefined, config2[prop]);
88223
+ return getMergedValue(undefined, config2[prop]);
88141
88224
  }
88142
- });
88143
-
88144
- utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
88225
+ }
88145
88226
 
88146
- utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
88227
+ // eslint-disable-next-line consistent-return
88228
+ function defaultToConfig2(prop) {
88147
88229
  if (!utils.isUndefined(config2[prop])) {
88148
- config[prop] = getMergedValue(undefined, config2[prop]);
88230
+ return getMergedValue(undefined, config2[prop]);
88149
88231
  } else if (!utils.isUndefined(config1[prop])) {
88150
- config[prop] = getMergedValue(undefined, config1[prop]);
88232
+ return getMergedValue(undefined, config1[prop]);
88151
88233
  }
88152
- });
88234
+ }
88153
88235
 
88154
- utils.forEach(directMergeKeys, function merge(prop) {
88236
+ // eslint-disable-next-line consistent-return
88237
+ function mergeDirectKeys(prop) {
88155
88238
  if (prop in config2) {
88156
- config[prop] = getMergedValue(config1[prop], config2[prop]);
88239
+ return getMergedValue(config1[prop], config2[prop]);
88157
88240
  } else if (prop in config1) {
88158
- config[prop] = getMergedValue(undefined, config1[prop]);
88241
+ return getMergedValue(undefined, config1[prop]);
88159
88242
  }
88160
- });
88161
-
88162
- var axiosKeys = valueFromConfig2Keys
88163
- .concat(mergeDeepPropertiesKeys)
88164
- .concat(defaultToConfig2Keys)
88165
- .concat(directMergeKeys);
88243
+ }
88166
88244
 
88167
- var otherKeys = Object
88168
- .keys(config1)
88169
- .concat(Object.keys(config2))
88170
- .filter(function filterAxiosKeys(key) {
88171
- return axiosKeys.indexOf(key) === -1;
88172
- });
88245
+ var mergeMap = {
88246
+ 'url': valueFromConfig2,
88247
+ 'method': valueFromConfig2,
88248
+ 'data': valueFromConfig2,
88249
+ 'baseURL': defaultToConfig2,
88250
+ 'transformRequest': defaultToConfig2,
88251
+ 'transformResponse': defaultToConfig2,
88252
+ 'paramsSerializer': defaultToConfig2,
88253
+ 'timeout': defaultToConfig2,
88254
+ 'timeoutMessage': defaultToConfig2,
88255
+ 'withCredentials': defaultToConfig2,
88256
+ 'adapter': defaultToConfig2,
88257
+ 'responseType': defaultToConfig2,
88258
+ 'xsrfCookieName': defaultToConfig2,
88259
+ 'xsrfHeaderName': defaultToConfig2,
88260
+ 'onUploadProgress': defaultToConfig2,
88261
+ 'onDownloadProgress': defaultToConfig2,
88262
+ 'decompress': defaultToConfig2,
88263
+ 'maxContentLength': defaultToConfig2,
88264
+ 'maxBodyLength': defaultToConfig2,
88265
+ 'transport': defaultToConfig2,
88266
+ 'httpAgent': defaultToConfig2,
88267
+ 'httpsAgent': defaultToConfig2,
88268
+ 'cancelToken': defaultToConfig2,
88269
+ 'socketPath': defaultToConfig2,
88270
+ 'responseEncoding': defaultToConfig2,
88271
+ 'validateStatus': mergeDirectKeys
88272
+ };
88173
88273
 
88174
- utils.forEach(otherKeys, mergeDeepProperties);
88274
+ utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
88275
+ var merge = mergeMap[prop] || mergeDeepProperties;
88276
+ var configValue = merge(prop);
88277
+ (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
88278
+ });
88175
88279
 
88176
88280
  return config;
88177
88281
  };
@@ -88339,7 +88443,7 @@ var defaults = {
88339
88443
  }],
88340
88444
 
88341
88445
  transformResponse: [function transformResponse(data) {
88342
- var transitional = this.transitional;
88446
+ var transitional = this.transitional || defaults.transitional;
88343
88447
  var silentJSONParsing = transitional && transitional.silentJSONParsing;
88344
88448
  var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
88345
88449
  var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
@@ -88374,12 +88478,12 @@ var defaults = {
88374
88478
 
88375
88479
  validateStatus: function validateStatus(status) {
88376
88480
  return status >= 200 && status < 300;
88377
- }
88378
- };
88481
+ },
88379
88482
 
88380
- defaults.headers = {
88381
- common: {
88382
- 'Accept': 'application/json, text/plain, */*'
88483
+ headers: {
88484
+ common: {
88485
+ 'Accept': 'application/json, text/plain, */*'
88486
+ }
88383
88487
  }
88384
88488
  };
88385
88489
 
@@ -88397,6 +88501,19 @@ module.exports = defaults;
88397
88501
 
88398
88502
  /***/ }),
88399
88503
 
88504
+ /***/ "../../node_modules/axios/lib/env/data.js":
88505
+ /*!***********************************************************!*\
88506
+ !*** /root/amplify-js/node_modules/axios/lib/env/data.js ***!
88507
+ \***********************************************************/
88508
+ /*! no static exports found */
88509
+ /***/ (function(module, exports) {
88510
+
88511
+ module.exports = {
88512
+ "version": "0.26.0"
88513
+ };
88514
+
88515
+ /***/ }),
88516
+
88400
88517
  /***/ "../../node_modules/axios/lib/helpers/bind.js":
88401
88518
  /*!***************************************************************!*\
88402
88519
  !*** /root/amplify-js/node_modules/axios/lib/helpers/bind.js ***!
@@ -88613,7 +88730,7 @@ module.exports = function isAbsoluteURL(url) {
88613
88730
  // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
88614
88731
  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
88615
88732
  // by any combination of letters, digits, plus, period, or hyphen.
88616
- return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
88733
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
88617
88734
  };
88618
88735
 
88619
88736
 
@@ -88629,6 +88746,8 @@ module.exports = function isAbsoluteURL(url) {
88629
88746
  "use strict";
88630
88747
 
88631
88748
 
88749
+ var utils = __webpack_require__(/*! ./../utils */ "../../node_modules/axios/lib/utils.js");
88750
+
88632
88751
  /**
88633
88752
  * Determines whether the payload is an error thrown by Axios
88634
88753
  *
@@ -88636,7 +88755,7 @@ module.exports = function isAbsoluteURL(url) {
88636
88755
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
88637
88756
  */
88638
88757
  module.exports = function isAxiosError(payload) {
88639
- return (typeof payload === 'object') && (payload.isAxiosError === true);
88758
+ return utils.isObject(payload) && (payload.isAxiosError === true);
88640
88759
  };
88641
88760
 
88642
88761
 
@@ -88860,7 +88979,7 @@ module.exports = function spread(callback) {
88860
88979
  "use strict";
88861
88980
 
88862
88981
 
88863
- var pkg = __webpack_require__(/*! ./../../package.json */ "../../node_modules/axios/package.json");
88982
+ var VERSION = __webpack_require__(/*! ../env/data */ "../../node_modules/axios/lib/env/data.js").version;
88864
88983
 
88865
88984
  var validators = {};
88866
88985
 
@@ -88872,48 +88991,26 @@ var validators = {};
88872
88991
  });
88873
88992
 
88874
88993
  var deprecatedWarnings = {};
88875
- var currentVerArr = pkg.version.split('.');
88876
-
88877
- /**
88878
- * Compare package versions
88879
- * @param {string} version
88880
- * @param {string?} thanVersion
88881
- * @returns {boolean}
88882
- */
88883
- function isOlderVersion(version, thanVersion) {
88884
- var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
88885
- var destVer = version.split('.');
88886
- for (var i = 0; i < 3; i++) {
88887
- if (pkgVersionArr[i] > destVer[i]) {
88888
- return true;
88889
- } else if (pkgVersionArr[i] < destVer[i]) {
88890
- return false;
88891
- }
88892
- }
88893
- return false;
88894
- }
88895
88994
 
88896
88995
  /**
88897
88996
  * Transitional option validator
88898
- * @param {function|boolean?} validator
88899
- * @param {string?} version
88900
- * @param {string} message
88997
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
88998
+ * @param {string?} version - deprecated version / removed since version
88999
+ * @param {string?} message - some message with additional info
88901
89000
  * @returns {function}
88902
89001
  */
88903
89002
  validators.transitional = function transitional(validator, version, message) {
88904
- var isDeprecated = version && isOlderVersion(version);
88905
-
88906
89003
  function formatMessage(opt, desc) {
88907
- return '[Axios v' + pkg.version + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
89004
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
88908
89005
  }
88909
89006
 
88910
89007
  // eslint-disable-next-line func-names
88911
89008
  return function(value, opt, opts) {
88912
89009
  if (validator === false) {
88913
- throw new Error(formatMessage(opt, ' has been removed in ' + version));
89010
+ throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));
88914
89011
  }
88915
89012
 
88916
- if (isDeprecated && !deprecatedWarnings[opt]) {
89013
+ if (version && !deprecatedWarnings[opt]) {
88917
89014
  deprecatedWarnings[opt] = true;
88918
89015
  // eslint-disable-next-line no-console
88919
89016
  console.warn(
@@ -88959,7 +89056,6 @@ function assertOptions(options, schema, allowUnknown) {
88959
89056
  }
88960
89057
 
88961
89058
  module.exports = {
88962
- isOlderVersion: isOlderVersion,
88963
89059
  assertOptions: assertOptions,
88964
89060
  validators: validators
88965
89061
  };
@@ -88990,7 +89086,7 @@ var toString = Object.prototype.toString;
88990
89086
  * @returns {boolean} True if value is an Array, otherwise false
88991
89087
  */
88992
89088
  function isArray(val) {
88993
- return toString.call(val) === '[object Array]';
89089
+ return Array.isArray(val);
88994
89090
  }
88995
89091
 
88996
89092
  /**
@@ -89031,7 +89127,7 @@ function isArrayBuffer(val) {
89031
89127
  * @returns {boolean} True if value is an FormData, otherwise false
89032
89128
  */
89033
89129
  function isFormData(val) {
89034
- return (typeof FormData !== 'undefined') && (val instanceof FormData);
89130
+ return toString.call(val) === '[object FormData]';
89035
89131
  }
89036
89132
 
89037
89133
  /**
@@ -89045,7 +89141,7 @@ function isArrayBufferView(val) {
89045
89141
  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
89046
89142
  result = ArrayBuffer.isView(val);
89047
89143
  } else {
89048
- result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
89144
+ result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
89049
89145
  }
89050
89146
  return result;
89051
89147
  }
@@ -89152,7 +89248,7 @@ function isStream(val) {
89152
89248
  * @returns {boolean} True if value is a URLSearchParams object, otherwise false
89153
89249
  */
89154
89250
  function isURLSearchParams(val) {
89155
- return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
89251
+ return toString.call(val) === '[object URLSearchParams]';
89156
89252
  }
89157
89253
 
89158
89254
  /**
@@ -89326,17 +89422,6 @@ module.exports = {
89326
89422
  };
89327
89423
 
89328
89424
 
89329
- /***/ }),
89330
-
89331
- /***/ "../../node_modules/axios/package.json":
89332
- /*!********************************************************!*\
89333
- !*** /root/amplify-js/node_modules/axios/package.json ***!
89334
- \********************************************************/
89335
- /*! exports provided: name, version, description, main, scripts, repository, keywords, author, license, bugs, homepage, devDependencies, browser, jsdelivr, unpkg, typings, dependencies, bundlesize, default */
89336
- /***/ (function(module) {
89337
-
89338
- module.exports = JSON.parse("{\"name\":\"axios\",\"version\":\"0.21.4\",\"description\":\"Promise based HTTP client for the browser and node.js\",\"main\":\"index.js\",\"scripts\":{\"test\":\"grunt test\",\"start\":\"node ./sandbox/server.js\",\"build\":\"NODE_ENV=production grunt build\",\"preversion\":\"npm test\",\"version\":\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\",\"postversion\":\"git push && git push --tags\",\"examples\":\"node ./examples/server.js\",\"coveralls\":\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\",\"fix\":\"eslint --fix lib/**/*.js\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/axios/axios.git\"},\"keywords\":[\"xhr\",\"http\",\"ajax\",\"promise\",\"node\"],\"author\":\"Matt Zabriskie\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/axios/axios/issues\"},\"homepage\":\"https://axios-http.com\",\"devDependencies\":{\"coveralls\":\"^3.0.0\",\"es6-promise\":\"^4.2.4\",\"grunt\":\"^1.3.0\",\"grunt-banner\":\"^0.6.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-clean\":\"^1.1.0\",\"grunt-contrib-watch\":\"^1.0.0\",\"grunt-eslint\":\"^23.0.0\",\"grunt-karma\":\"^4.0.0\",\"grunt-mocha-test\":\"^0.13.3\",\"grunt-ts\":\"^6.0.0-beta.19\",\"grunt-webpack\":\"^4.0.2\",\"istanbul-instrumenter-loader\":\"^1.0.0\",\"jasmine-core\":\"^2.4.1\",\"karma\":\"^6.3.2\",\"karma-chrome-launcher\":\"^3.1.0\",\"karma-firefox-launcher\":\"^2.1.0\",\"karma-jasmine\":\"^1.1.1\",\"karma-jasmine-ajax\":\"^0.1.13\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-sauce-launcher\":\"^4.3.6\",\"karma-sinon\":\"^1.0.5\",\"karma-sourcemap-loader\":\"^0.3.8\",\"karma-webpack\":\"^4.0.2\",\"load-grunt-tasks\":\"^3.5.2\",\"minimist\":\"^1.2.0\",\"mocha\":\"^8.2.1\",\"sinon\":\"^4.5.0\",\"terser-webpack-plugin\":\"^4.2.3\",\"typescript\":\"^4.0.5\",\"url-search-params\":\"^0.10.0\",\"webpack\":\"^4.44.2\",\"webpack-dev-server\":\"^3.11.0\"},\"browser\":{\"./lib/adapters/http.js\":\"./lib/adapters/xhr.js\"},\"jsdelivr\":\"dist/axios.min.js\",\"unpkg\":\"dist/axios.min.js\",\"typings\":\"./index.d.ts\",\"dependencies\":{\"follow-redirects\":\"^1.14.0\"},\"bundlesize\":[{\"path\":\"./dist/axios.min.js\",\"threshold\":\"5kB\"}]}");
89339
-
89340
89425
  /***/ }),
89341
89426
 
89342
89427
  /***/ "../../node_modules/base64-js/index.js":
@@ -97977,7 +98062,7 @@ __webpack_require__.r(__webpack_exports__);
97977
98062
  /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_3__);
97978
98063
  /* harmony import */ var _common_StorageErrorStrings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/StorageErrorStrings */ "../storage/lib-esm/common/StorageErrorStrings.js");
97979
98064
  /*
97980
- * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
98065
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
97981
98066
  *
97982
98067
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
97983
98068
  * the License. A copy of the License is located at
@@ -98153,10 +98238,12 @@ function () {
98153
98238
  }
98154
98239
 
98155
98240
  if (emitter) {
98241
+ // TODO: Unify linting rules across JS repo
98156
98242
  axiosRequest.onUploadProgress = function (event) {
98157
98243
  emitter.emit(SEND_UPLOAD_PROGRESS_EVENT, event);
98158
98244
  logger.debug(event);
98159
- };
98245
+ }; // TODO: Unify linting rules across JS repo
98246
+
98160
98247
 
98161
98248
  axiosRequest.onDownloadProgress = function (event) {
98162
98249
  emitter.emit(SEND_DOWNLOAD_PROGRESS_EVENT, event);