@aws-amplify/storage 4.4.26 → 4.4.27

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,18 @@
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.4.27](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.26...@aws-amplify/storage@4.4.27) (2022-06-18)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * remove comments ([b5c6825](https://github.com/aws-amplify/amplify-js/commit/b5c6825a28e58986b26cce662f8db7a3623146e7))
12
+ * update axios ([67316d7](https://github.com/aws-amplify/amplify-js/commit/67316d78fd829b9d4875a25d00719b175738e594))
13
+
14
+
15
+
16
+
17
+
6
18
  ## [4.4.26](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.4.25...@aws-amplify/storage@4.4.26) (2022-06-15)
7
19
 
8
20
  **Note:** Version bump only for package @aws-amplify/storage
@@ -40254,12 +40254,24 @@ var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "../../node
40254
40254
  var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "../../node_modules/axios/lib/helpers/parseHeaders.js");
40255
40255
  var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "../../node_modules/axios/lib/helpers/isURLSameOrigin.js");
40256
40256
  var createError = __webpack_require__(/*! ../core/createError */ "../../node_modules/axios/lib/core/createError.js");
40257
+ var defaults = __webpack_require__(/*! ../defaults */ "../../node_modules/axios/lib/defaults.js");
40258
+ var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "../../node_modules/axios/lib/cancel/Cancel.js");
40257
40259
 
40258
40260
  module.exports = function xhrAdapter(config) {
40259
40261
  return new Promise(function dispatchXhrRequest(resolve, reject) {
40260
40262
  var requestData = config.data;
40261
40263
  var requestHeaders = config.headers;
40262
40264
  var responseType = config.responseType;
40265
+ var onCanceled;
40266
+ function done() {
40267
+ if (config.cancelToken) {
40268
+ config.cancelToken.unsubscribe(onCanceled);
40269
+ }
40270
+
40271
+ if (config.signal) {
40272
+ config.signal.removeEventListener('abort', onCanceled);
40273
+ }
40274
+ }
40263
40275
 
40264
40276
  if (utils.isFormData(requestData)) {
40265
40277
  delete requestHeaders['Content-Type']; // Let the browser set it
@@ -40297,7 +40309,13 @@ module.exports = function xhrAdapter(config) {
40297
40309
  request: request
40298
40310
  };
40299
40311
 
40300
- settle(resolve, reject, response);
40312
+ settle(function _resolve(value) {
40313
+ resolve(value);
40314
+ done();
40315
+ }, function _reject(err) {
40316
+ reject(err);
40317
+ done();
40318
+ }, response);
40301
40319
 
40302
40320
  // Clean up request
40303
40321
  request = null;
@@ -40350,14 +40368,15 @@ module.exports = function xhrAdapter(config) {
40350
40368
 
40351
40369
  // Handle timeout
40352
40370
  request.ontimeout = function handleTimeout() {
40353
- var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
40371
+ var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
40372
+ var transitional = config.transitional || defaults.transitional;
40354
40373
  if (config.timeoutErrorMessage) {
40355
40374
  timeoutErrorMessage = config.timeoutErrorMessage;
40356
40375
  }
40357
40376
  reject(createError(
40358
40377
  timeoutErrorMessage,
40359
40378
  config,
40360
- config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
40379
+ transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
40361
40380
  request));
40362
40381
 
40363
40382
  // Clean up request
@@ -40411,18 +40430,22 @@ module.exports = function xhrAdapter(config) {
40411
40430
  request.upload.addEventListener('progress', config.onUploadProgress);
40412
40431
  }
40413
40432
 
40414
- if (config.cancelToken) {
40433
+ if (config.cancelToken || config.signal) {
40415
40434
  // Handle cancellation
40416
- config.cancelToken.promise.then(function onCanceled(cancel) {
40435
+ // eslint-disable-next-line func-names
40436
+ onCanceled = function(cancel) {
40417
40437
  if (!request) {
40418
40438
  return;
40419
40439
  }
40420
-
40440
+ reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);
40421
40441
  request.abort();
40422
- reject(cancel);
40423
- // Clean up request
40424
40442
  request = null;
40425
- });
40443
+ };
40444
+
40445
+ config.cancelToken && config.cancelToken.subscribe(onCanceled);
40446
+ if (config.signal) {
40447
+ config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
40448
+ }
40426
40449
  }
40427
40450
 
40428
40451
  if (!requestData) {
@@ -40469,6 +40492,11 @@ function createInstance(defaultConfig) {
40469
40492
  // Copy context to instance
40470
40493
  utils.extend(instance, context);
40471
40494
 
40495
+ // Factory for creating new instances
40496
+ instance.create = function create(instanceConfig) {
40497
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
40498
+ };
40499
+
40472
40500
  return instance;
40473
40501
  }
40474
40502
 
@@ -40478,15 +40506,11 @@ var axios = createInstance(defaults);
40478
40506
  // Expose Axios class to allow class inheritance
40479
40507
  axios.Axios = Axios;
40480
40508
 
40481
- // Factory for creating new instances
40482
- axios.create = function create(instanceConfig) {
40483
- return createInstance(mergeConfig(axios.defaults, instanceConfig));
40484
- };
40485
-
40486
40509
  // Expose Cancel & CancelToken
40487
40510
  axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "../../node_modules/axios/lib/cancel/Cancel.js");
40488
40511
  axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "../../node_modules/axios/lib/cancel/CancelToken.js");
40489
40512
  axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "../../node_modules/axios/lib/cancel/isCancel.js");
40513
+ axios.VERSION = __webpack_require__(/*! ./env/data */ "../../node_modules/axios/lib/env/data.js").version;
40490
40514
 
40491
40515
  // Expose all/spread
40492
40516
  axios.all = function all(promises) {
@@ -40560,11 +40584,42 @@ function CancelToken(executor) {
40560
40584
  }
40561
40585
 
40562
40586
  var resolvePromise;
40587
+
40563
40588
  this.promise = new Promise(function promiseExecutor(resolve) {
40564
40589
  resolvePromise = resolve;
40565
40590
  });
40566
40591
 
40567
40592
  var token = this;
40593
+
40594
+ // eslint-disable-next-line func-names
40595
+ this.promise.then(function(cancel) {
40596
+ if (!token._listeners) return;
40597
+
40598
+ var i;
40599
+ var l = token._listeners.length;
40600
+
40601
+ for (i = 0; i < l; i++) {
40602
+ token._listeners[i](cancel);
40603
+ }
40604
+ token._listeners = null;
40605
+ });
40606
+
40607
+ // eslint-disable-next-line func-names
40608
+ this.promise.then = function(onfulfilled) {
40609
+ var _resolve;
40610
+ // eslint-disable-next-line func-names
40611
+ var promise = new Promise(function(resolve) {
40612
+ token.subscribe(resolve);
40613
+ _resolve = resolve;
40614
+ }).then(onfulfilled);
40615
+
40616
+ promise.cancel = function reject() {
40617
+ token.unsubscribe(_resolve);
40618
+ };
40619
+
40620
+ return promise;
40621
+ };
40622
+
40568
40623
  executor(function cancel(message) {
40569
40624
  if (token.reason) {
40570
40625
  // Cancellation has already been requested
@@ -40585,6 +40640,37 @@ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
40585
40640
  }
40586
40641
  };
40587
40642
 
40643
+ /**
40644
+ * Subscribe to the cancel signal
40645
+ */
40646
+
40647
+ CancelToken.prototype.subscribe = function subscribe(listener) {
40648
+ if (this.reason) {
40649
+ listener(this.reason);
40650
+ return;
40651
+ }
40652
+
40653
+ if (this._listeners) {
40654
+ this._listeners.push(listener);
40655
+ } else {
40656
+ this._listeners = [listener];
40657
+ }
40658
+ };
40659
+
40660
+ /**
40661
+ * Unsubscribe from the cancel signal
40662
+ */
40663
+
40664
+ CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
40665
+ if (!this._listeners) {
40666
+ return;
40667
+ }
40668
+ var index = this._listeners.indexOf(listener);
40669
+ if (index !== -1) {
40670
+ this._listeners.splice(index, 1);
40671
+ }
40672
+ };
40673
+
40588
40674
  /**
40589
40675
  * Returns an object that contains a new `CancelToken` and a function that, when called,
40590
40676
  * cancels the `CancelToken`.
@@ -40658,14 +40744,14 @@ function Axios(instanceConfig) {
40658
40744
  *
40659
40745
  * @param {Object} config The config specific for this request (merged with this.defaults)
40660
40746
  */
40661
- Axios.prototype.request = function request(config) {
40747
+ Axios.prototype.request = function request(configOrUrl, config) {
40662
40748
  /*eslint no-param-reassign:0*/
40663
40749
  // Allow for axios('example/url'[, config]) a la fetch API
40664
- if (typeof config === 'string') {
40665
- config = arguments[1] || {};
40666
- config.url = arguments[0];
40667
- } else {
40750
+ if (typeof configOrUrl === 'string') {
40668
40751
  config = config || {};
40752
+ config.url = configOrUrl;
40753
+ } else {
40754
+ config = configOrUrl || {};
40669
40755
  }
40670
40756
 
40671
40757
  config = mergeConfig(this.defaults, config);
@@ -40683,9 +40769,9 @@ Axios.prototype.request = function request(config) {
40683
40769
 
40684
40770
  if (transitional !== undefined) {
40685
40771
  validator.assertOptions(transitional, {
40686
- silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
40687
- forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
40688
- clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')
40772
+ silentJSONParsing: validators.transitional(validators.boolean),
40773
+ forcedJSONParsing: validators.transitional(validators.boolean),
40774
+ clarifyTimeoutError: validators.transitional(validators.boolean)
40689
40775
  }, false);
40690
40776
  }
40691
40777
 
@@ -40924,6 +41010,7 @@ var utils = __webpack_require__(/*! ./../utils */ "../../node_modules/axios/lib/
40924
41010
  var transformData = __webpack_require__(/*! ./transformData */ "../../node_modules/axios/lib/core/transformData.js");
40925
41011
  var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "../../node_modules/axios/lib/cancel/isCancel.js");
40926
41012
  var defaults = __webpack_require__(/*! ../defaults */ "../../node_modules/axios/lib/defaults.js");
41013
+ var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "../../node_modules/axios/lib/cancel/Cancel.js");
40927
41014
 
40928
41015
  /**
40929
41016
  * Throws a `Cancel` if cancellation has been requested.
@@ -40932,6 +41019,10 @@ function throwIfCancellationRequested(config) {
40932
41019
  if (config.cancelToken) {
40933
41020
  config.cancelToken.throwIfRequested();
40934
41021
  }
41022
+
41023
+ if (config.signal && config.signal.aborted) {
41024
+ throw new Cancel('canceled');
41025
+ }
40935
41026
  }
40936
41027
 
40937
41028
  /**
@@ -41049,7 +41140,8 @@ module.exports = function enhanceError(error, config, code, request, response) {
41049
41140
  stack: this.stack,
41050
41141
  // Axios
41051
41142
  config: this.config,
41052
- code: this.code
41143
+ code: this.code,
41144
+ status: this.response && this.response.status ? this.response.status : null
41053
41145
  };
41054
41146
  };
41055
41147
  return error;
@@ -41083,17 +41175,6 @@ module.exports = function mergeConfig(config1, config2) {
41083
41175
  config2 = config2 || {};
41084
41176
  var config = {};
41085
41177
 
41086
- var valueFromConfig2Keys = ['url', 'method', 'data'];
41087
- var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
41088
- var defaultToConfig2Keys = [
41089
- 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
41090
- 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
41091
- 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
41092
- 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
41093
- 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
41094
- ];
41095
- var directMergeKeys = ['validateStatus'];
41096
-
41097
41178
  function getMergedValue(target, source) {
41098
41179
  if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
41099
41180
  return utils.merge(target, source);
@@ -41105,51 +41186,74 @@ module.exports = function mergeConfig(config1, config2) {
41105
41186
  return source;
41106
41187
  }
41107
41188
 
41189
+ // eslint-disable-next-line consistent-return
41108
41190
  function mergeDeepProperties(prop) {
41109
41191
  if (!utils.isUndefined(config2[prop])) {
41110
- config[prop] = getMergedValue(config1[prop], config2[prop]);
41192
+ return getMergedValue(config1[prop], config2[prop]);
41111
41193
  } else if (!utils.isUndefined(config1[prop])) {
41112
- config[prop] = getMergedValue(undefined, config1[prop]);
41194
+ return getMergedValue(undefined, config1[prop]);
41113
41195
  }
41114
41196
  }
41115
41197
 
41116
- utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
41198
+ // eslint-disable-next-line consistent-return
41199
+ function valueFromConfig2(prop) {
41117
41200
  if (!utils.isUndefined(config2[prop])) {
41118
- config[prop] = getMergedValue(undefined, config2[prop]);
41201
+ return getMergedValue(undefined, config2[prop]);
41119
41202
  }
41120
- });
41121
-
41122
- utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
41203
+ }
41123
41204
 
41124
- utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
41205
+ // eslint-disable-next-line consistent-return
41206
+ function defaultToConfig2(prop) {
41125
41207
  if (!utils.isUndefined(config2[prop])) {
41126
- config[prop] = getMergedValue(undefined, config2[prop]);
41208
+ return getMergedValue(undefined, config2[prop]);
41127
41209
  } else if (!utils.isUndefined(config1[prop])) {
41128
- config[prop] = getMergedValue(undefined, config1[prop]);
41210
+ return getMergedValue(undefined, config1[prop]);
41129
41211
  }
41130
- });
41212
+ }
41131
41213
 
41132
- utils.forEach(directMergeKeys, function merge(prop) {
41214
+ // eslint-disable-next-line consistent-return
41215
+ function mergeDirectKeys(prop) {
41133
41216
  if (prop in config2) {
41134
- config[prop] = getMergedValue(config1[prop], config2[prop]);
41217
+ return getMergedValue(config1[prop], config2[prop]);
41135
41218
  } else if (prop in config1) {
41136
- config[prop] = getMergedValue(undefined, config1[prop]);
41137
- }
41138
- });
41139
-
41140
- var axiosKeys = valueFromConfig2Keys
41141
- .concat(mergeDeepPropertiesKeys)
41142
- .concat(defaultToConfig2Keys)
41143
- .concat(directMergeKeys);
41144
-
41145
- var otherKeys = Object
41146
- .keys(config1)
41147
- .concat(Object.keys(config2))
41148
- .filter(function filterAxiosKeys(key) {
41149
- return axiosKeys.indexOf(key) === -1;
41150
- });
41219
+ return getMergedValue(undefined, config1[prop]);
41220
+ }
41221
+ }
41222
+
41223
+ var mergeMap = {
41224
+ 'url': valueFromConfig2,
41225
+ 'method': valueFromConfig2,
41226
+ 'data': valueFromConfig2,
41227
+ 'baseURL': defaultToConfig2,
41228
+ 'transformRequest': defaultToConfig2,
41229
+ 'transformResponse': defaultToConfig2,
41230
+ 'paramsSerializer': defaultToConfig2,
41231
+ 'timeout': defaultToConfig2,
41232
+ 'timeoutMessage': defaultToConfig2,
41233
+ 'withCredentials': defaultToConfig2,
41234
+ 'adapter': defaultToConfig2,
41235
+ 'responseType': defaultToConfig2,
41236
+ 'xsrfCookieName': defaultToConfig2,
41237
+ 'xsrfHeaderName': defaultToConfig2,
41238
+ 'onUploadProgress': defaultToConfig2,
41239
+ 'onDownloadProgress': defaultToConfig2,
41240
+ 'decompress': defaultToConfig2,
41241
+ 'maxContentLength': defaultToConfig2,
41242
+ 'maxBodyLength': defaultToConfig2,
41243
+ 'transport': defaultToConfig2,
41244
+ 'httpAgent': defaultToConfig2,
41245
+ 'httpsAgent': defaultToConfig2,
41246
+ 'cancelToken': defaultToConfig2,
41247
+ 'socketPath': defaultToConfig2,
41248
+ 'responseEncoding': defaultToConfig2,
41249
+ 'validateStatus': mergeDirectKeys
41250
+ };
41151
41251
 
41152
- utils.forEach(otherKeys, mergeDeepProperties);
41252
+ utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
41253
+ var merge = mergeMap[prop] || mergeDeepProperties;
41254
+ var configValue = merge(prop);
41255
+ (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
41256
+ });
41153
41257
 
41154
41258
  return config;
41155
41259
  };
@@ -41317,7 +41421,7 @@ var defaults = {
41317
41421
  }],
41318
41422
 
41319
41423
  transformResponse: [function transformResponse(data) {
41320
- var transitional = this.transitional;
41424
+ var transitional = this.transitional || defaults.transitional;
41321
41425
  var silentJSONParsing = transitional && transitional.silentJSONParsing;
41322
41426
  var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
41323
41427
  var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
@@ -41352,12 +41456,12 @@ var defaults = {
41352
41456
 
41353
41457
  validateStatus: function validateStatus(status) {
41354
41458
  return status >= 200 && status < 300;
41355
- }
41356
- };
41459
+ },
41357
41460
 
41358
- defaults.headers = {
41359
- common: {
41360
- 'Accept': 'application/json, text/plain, */*'
41461
+ headers: {
41462
+ common: {
41463
+ 'Accept': 'application/json, text/plain, */*'
41464
+ }
41361
41465
  }
41362
41466
  };
41363
41467
 
@@ -41375,6 +41479,19 @@ module.exports = defaults;
41375
41479
 
41376
41480
  /***/ }),
41377
41481
 
41482
+ /***/ "../../node_modules/axios/lib/env/data.js":
41483
+ /*!***********************************************************!*\
41484
+ !*** /root/amplify-js/node_modules/axios/lib/env/data.js ***!
41485
+ \***********************************************************/
41486
+ /*! no static exports found */
41487
+ /***/ (function(module, exports) {
41488
+
41489
+ module.exports = {
41490
+ "version": "0.26.0"
41491
+ };
41492
+
41493
+ /***/ }),
41494
+
41378
41495
  /***/ "../../node_modules/axios/lib/helpers/bind.js":
41379
41496
  /*!***************************************************************!*\
41380
41497
  !*** /root/amplify-js/node_modules/axios/lib/helpers/bind.js ***!
@@ -41591,7 +41708,7 @@ module.exports = function isAbsoluteURL(url) {
41591
41708
  // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
41592
41709
  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
41593
41710
  // by any combination of letters, digits, plus, period, or hyphen.
41594
- return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
41711
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
41595
41712
  };
41596
41713
 
41597
41714
 
@@ -41607,6 +41724,8 @@ module.exports = function isAbsoluteURL(url) {
41607
41724
  "use strict";
41608
41725
 
41609
41726
 
41727
+ var utils = __webpack_require__(/*! ./../utils */ "../../node_modules/axios/lib/utils.js");
41728
+
41610
41729
  /**
41611
41730
  * Determines whether the payload is an error thrown by Axios
41612
41731
  *
@@ -41614,7 +41733,7 @@ module.exports = function isAbsoluteURL(url) {
41614
41733
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
41615
41734
  */
41616
41735
  module.exports = function isAxiosError(payload) {
41617
- return (typeof payload === 'object') && (payload.isAxiosError === true);
41736
+ return utils.isObject(payload) && (payload.isAxiosError === true);
41618
41737
  };
41619
41738
 
41620
41739
 
@@ -41838,7 +41957,7 @@ module.exports = function spread(callback) {
41838
41957
  "use strict";
41839
41958
 
41840
41959
 
41841
- var pkg = __webpack_require__(/*! ./../../package.json */ "../../node_modules/axios/package.json");
41960
+ var VERSION = __webpack_require__(/*! ../env/data */ "../../node_modules/axios/lib/env/data.js").version;
41842
41961
 
41843
41962
  var validators = {};
41844
41963
 
@@ -41850,48 +41969,26 @@ var validators = {};
41850
41969
  });
41851
41970
 
41852
41971
  var deprecatedWarnings = {};
41853
- var currentVerArr = pkg.version.split('.');
41854
-
41855
- /**
41856
- * Compare package versions
41857
- * @param {string} version
41858
- * @param {string?} thanVersion
41859
- * @returns {boolean}
41860
- */
41861
- function isOlderVersion(version, thanVersion) {
41862
- var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
41863
- var destVer = version.split('.');
41864
- for (var i = 0; i < 3; i++) {
41865
- if (pkgVersionArr[i] > destVer[i]) {
41866
- return true;
41867
- } else if (pkgVersionArr[i] < destVer[i]) {
41868
- return false;
41869
- }
41870
- }
41871
- return false;
41872
- }
41873
41972
 
41874
41973
  /**
41875
41974
  * Transitional option validator
41876
- * @param {function|boolean?} validator
41877
- * @param {string?} version
41878
- * @param {string} message
41975
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
41976
+ * @param {string?} version - deprecated version / removed since version
41977
+ * @param {string?} message - some message with additional info
41879
41978
  * @returns {function}
41880
41979
  */
41881
41980
  validators.transitional = function transitional(validator, version, message) {
41882
- var isDeprecated = version && isOlderVersion(version);
41883
-
41884
41981
  function formatMessage(opt, desc) {
41885
- return '[Axios v' + pkg.version + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
41982
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
41886
41983
  }
41887
41984
 
41888
41985
  // eslint-disable-next-line func-names
41889
41986
  return function(value, opt, opts) {
41890
41987
  if (validator === false) {
41891
- throw new Error(formatMessage(opt, ' has been removed in ' + version));
41988
+ throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));
41892
41989
  }
41893
41990
 
41894
- if (isDeprecated && !deprecatedWarnings[opt]) {
41991
+ if (version && !deprecatedWarnings[opt]) {
41895
41992
  deprecatedWarnings[opt] = true;
41896
41993
  // eslint-disable-next-line no-console
41897
41994
  console.warn(
@@ -41937,7 +42034,6 @@ function assertOptions(options, schema, allowUnknown) {
41937
42034
  }
41938
42035
 
41939
42036
  module.exports = {
41940
- isOlderVersion: isOlderVersion,
41941
42037
  assertOptions: assertOptions,
41942
42038
  validators: validators
41943
42039
  };
@@ -41968,7 +42064,7 @@ var toString = Object.prototype.toString;
41968
42064
  * @returns {boolean} True if value is an Array, otherwise false
41969
42065
  */
41970
42066
  function isArray(val) {
41971
- return toString.call(val) === '[object Array]';
42067
+ return Array.isArray(val);
41972
42068
  }
41973
42069
 
41974
42070
  /**
@@ -42009,7 +42105,7 @@ function isArrayBuffer(val) {
42009
42105
  * @returns {boolean} True if value is an FormData, otherwise false
42010
42106
  */
42011
42107
  function isFormData(val) {
42012
- return (typeof FormData !== 'undefined') && (val instanceof FormData);
42108
+ return toString.call(val) === '[object FormData]';
42013
42109
  }
42014
42110
 
42015
42111
  /**
@@ -42023,7 +42119,7 @@ function isArrayBufferView(val) {
42023
42119
  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
42024
42120
  result = ArrayBuffer.isView(val);
42025
42121
  } else {
42026
- result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
42122
+ result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
42027
42123
  }
42028
42124
  return result;
42029
42125
  }
@@ -42130,7 +42226,7 @@ function isStream(val) {
42130
42226
  * @returns {boolean} True if value is a URLSearchParams object, otherwise false
42131
42227
  */
42132
42228
  function isURLSearchParams(val) {
42133
- return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
42229
+ return toString.call(val) === '[object URLSearchParams]';
42134
42230
  }
42135
42231
 
42136
42232
  /**
@@ -42304,17 +42400,6 @@ module.exports = {
42304
42400
  };
42305
42401
 
42306
42402
 
42307
- /***/ }),
42308
-
42309
- /***/ "../../node_modules/axios/package.json":
42310
- /*!********************************************************!*\
42311
- !*** /root/amplify-js/node_modules/axios/package.json ***!
42312
- \********************************************************/
42313
- /*! exports provided: name, version, description, main, scripts, repository, keywords, author, license, bugs, homepage, devDependencies, browser, jsdelivr, unpkg, typings, dependencies, bundlesize, default */
42314
- /***/ (function(module) {
42315
-
42316
- 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\"}]}");
42317
-
42318
42403
  /***/ }),
42319
42404
 
42320
42405
  /***/ "../../node_modules/base64-js/index.js":
@@ -50955,7 +51040,7 @@ __webpack_require__.r(__webpack_exports__);
50955
51040
  /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_3__);
50956
51041
  /* harmony import */ var _common_StorageErrorStrings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/StorageErrorStrings */ "./lib-esm/common/StorageErrorStrings.js");
50957
51042
  /*
50958
- * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
51043
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
50959
51044
  *
50960
51045
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
50961
51046
  * the License. A copy of the License is located at
@@ -51131,10 +51216,12 @@ function () {
51131
51216
  }
51132
51217
 
51133
51218
  if (emitter) {
51219
+ // TODO: Unify linting rules across JS repo
51134
51220
  axiosRequest.onUploadProgress = function (event) {
51135
51221
  emitter.emit(SEND_UPLOAD_PROGRESS_EVENT, event);
51136
51222
  logger.debug(event);
51137
- };
51223
+ }; // TODO: Unify linting rules across JS repo
51224
+
51138
51225
 
51139
51226
  axiosRequest.onDownloadProgress = function (event) {
51140
51227
  emitter.emit(SEND_DOWNLOAD_PROGRESS_EVENT, event);