@aws-amplify/datastore 3.12.0 → 3.12.1
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,22 @@
|
|
|
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
|
+
## [3.12.1](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/datastore@3.12.0...@aws-amplify/datastore@3.12.1) (2022-06-18)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* decrease error handler verbosity on self recovering errors ([#9987](https://github.com/aws-amplify/amplify-js/issues/9987)) ([67ccf09](https://github.com/aws-amplify/amplify-js/commit/67ccf09a93221a06d4560300cfd67fdd9efeda71))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Reverts
|
|
15
|
+
|
|
16
|
+
* Revert "fix: decrease error handler verbosity on self recovering errors (#9987)" (#10004) ([eb73ad7](https://github.com/aws-amplify/amplify-js/commit/eb73ad70b3eee0632eaed4bae00f1d2179ae45b5)), closes [#9987](https://github.com/aws-amplify/amplify-js/issues/9987) [#10004](https://github.com/aws-amplify/amplify-js/issues/10004)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# [3.12.0](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/datastore@3.11.3...@aws-amplify/datastore@3.12.0) (2022-06-15)
|
|
7
23
|
|
|
8
24
|
|
|
@@ -23841,12 +23841,24 @@ var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "../../node
|
|
|
23841
23841
|
var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "../../node_modules/axios/lib/helpers/parseHeaders.js");
|
|
23842
23842
|
var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "../../node_modules/axios/lib/helpers/isURLSameOrigin.js");
|
|
23843
23843
|
var createError = __webpack_require__(/*! ../core/createError */ "../../node_modules/axios/lib/core/createError.js");
|
|
23844
|
+
var defaults = __webpack_require__(/*! ../defaults */ "../../node_modules/axios/lib/defaults.js");
|
|
23845
|
+
var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "../../node_modules/axios/lib/cancel/Cancel.js");
|
|
23844
23846
|
|
|
23845
23847
|
module.exports = function xhrAdapter(config) {
|
|
23846
23848
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
23847
23849
|
var requestData = config.data;
|
|
23848
23850
|
var requestHeaders = config.headers;
|
|
23849
23851
|
var responseType = config.responseType;
|
|
23852
|
+
var onCanceled;
|
|
23853
|
+
function done() {
|
|
23854
|
+
if (config.cancelToken) {
|
|
23855
|
+
config.cancelToken.unsubscribe(onCanceled);
|
|
23856
|
+
}
|
|
23857
|
+
|
|
23858
|
+
if (config.signal) {
|
|
23859
|
+
config.signal.removeEventListener('abort', onCanceled);
|
|
23860
|
+
}
|
|
23861
|
+
}
|
|
23850
23862
|
|
|
23851
23863
|
if (utils.isFormData(requestData)) {
|
|
23852
23864
|
delete requestHeaders['Content-Type']; // Let the browser set it
|
|
@@ -23884,7 +23896,13 @@ module.exports = function xhrAdapter(config) {
|
|
|
23884
23896
|
request: request
|
|
23885
23897
|
};
|
|
23886
23898
|
|
|
23887
|
-
settle(
|
|
23899
|
+
settle(function _resolve(value) {
|
|
23900
|
+
resolve(value);
|
|
23901
|
+
done();
|
|
23902
|
+
}, function _reject(err) {
|
|
23903
|
+
reject(err);
|
|
23904
|
+
done();
|
|
23905
|
+
}, response);
|
|
23888
23906
|
|
|
23889
23907
|
// Clean up request
|
|
23890
23908
|
request = null;
|
|
@@ -23937,14 +23955,15 @@ module.exports = function xhrAdapter(config) {
|
|
|
23937
23955
|
|
|
23938
23956
|
// Handle timeout
|
|
23939
23957
|
request.ontimeout = function handleTimeout() {
|
|
23940
|
-
var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
|
|
23958
|
+
var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
23959
|
+
var transitional = config.transitional || defaults.transitional;
|
|
23941
23960
|
if (config.timeoutErrorMessage) {
|
|
23942
23961
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
23943
23962
|
}
|
|
23944
23963
|
reject(createError(
|
|
23945
23964
|
timeoutErrorMessage,
|
|
23946
23965
|
config,
|
|
23947
|
-
|
|
23966
|
+
transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
|
|
23948
23967
|
request));
|
|
23949
23968
|
|
|
23950
23969
|
// Clean up request
|
|
@@ -23998,18 +24017,22 @@ module.exports = function xhrAdapter(config) {
|
|
|
23998
24017
|
request.upload.addEventListener('progress', config.onUploadProgress);
|
|
23999
24018
|
}
|
|
24000
24019
|
|
|
24001
|
-
if (config.cancelToken) {
|
|
24020
|
+
if (config.cancelToken || config.signal) {
|
|
24002
24021
|
// Handle cancellation
|
|
24003
|
-
|
|
24022
|
+
// eslint-disable-next-line func-names
|
|
24023
|
+
onCanceled = function(cancel) {
|
|
24004
24024
|
if (!request) {
|
|
24005
24025
|
return;
|
|
24006
24026
|
}
|
|
24007
|
-
|
|
24027
|
+
reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);
|
|
24008
24028
|
request.abort();
|
|
24009
|
-
reject(cancel);
|
|
24010
|
-
// Clean up request
|
|
24011
24029
|
request = null;
|
|
24012
|
-
}
|
|
24030
|
+
};
|
|
24031
|
+
|
|
24032
|
+
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
24033
|
+
if (config.signal) {
|
|
24034
|
+
config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
|
|
24035
|
+
}
|
|
24013
24036
|
}
|
|
24014
24037
|
|
|
24015
24038
|
if (!requestData) {
|
|
@@ -24056,6 +24079,11 @@ function createInstance(defaultConfig) {
|
|
|
24056
24079
|
// Copy context to instance
|
|
24057
24080
|
utils.extend(instance, context);
|
|
24058
24081
|
|
|
24082
|
+
// Factory for creating new instances
|
|
24083
|
+
instance.create = function create(instanceConfig) {
|
|
24084
|
+
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
|
24085
|
+
};
|
|
24086
|
+
|
|
24059
24087
|
return instance;
|
|
24060
24088
|
}
|
|
24061
24089
|
|
|
@@ -24065,15 +24093,11 @@ var axios = createInstance(defaults);
|
|
|
24065
24093
|
// Expose Axios class to allow class inheritance
|
|
24066
24094
|
axios.Axios = Axios;
|
|
24067
24095
|
|
|
24068
|
-
// Factory for creating new instances
|
|
24069
|
-
axios.create = function create(instanceConfig) {
|
|
24070
|
-
return createInstance(mergeConfig(axios.defaults, instanceConfig));
|
|
24071
|
-
};
|
|
24072
|
-
|
|
24073
24096
|
// Expose Cancel & CancelToken
|
|
24074
24097
|
axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "../../node_modules/axios/lib/cancel/Cancel.js");
|
|
24075
24098
|
axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "../../node_modules/axios/lib/cancel/CancelToken.js");
|
|
24076
24099
|
axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "../../node_modules/axios/lib/cancel/isCancel.js");
|
|
24100
|
+
axios.VERSION = __webpack_require__(/*! ./env/data */ "../../node_modules/axios/lib/env/data.js").version;
|
|
24077
24101
|
|
|
24078
24102
|
// Expose all/spread
|
|
24079
24103
|
axios.all = function all(promises) {
|
|
@@ -24147,11 +24171,42 @@ function CancelToken(executor) {
|
|
|
24147
24171
|
}
|
|
24148
24172
|
|
|
24149
24173
|
var resolvePromise;
|
|
24174
|
+
|
|
24150
24175
|
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
24151
24176
|
resolvePromise = resolve;
|
|
24152
24177
|
});
|
|
24153
24178
|
|
|
24154
24179
|
var token = this;
|
|
24180
|
+
|
|
24181
|
+
// eslint-disable-next-line func-names
|
|
24182
|
+
this.promise.then(function(cancel) {
|
|
24183
|
+
if (!token._listeners) return;
|
|
24184
|
+
|
|
24185
|
+
var i;
|
|
24186
|
+
var l = token._listeners.length;
|
|
24187
|
+
|
|
24188
|
+
for (i = 0; i < l; i++) {
|
|
24189
|
+
token._listeners[i](cancel);
|
|
24190
|
+
}
|
|
24191
|
+
token._listeners = null;
|
|
24192
|
+
});
|
|
24193
|
+
|
|
24194
|
+
// eslint-disable-next-line func-names
|
|
24195
|
+
this.promise.then = function(onfulfilled) {
|
|
24196
|
+
var _resolve;
|
|
24197
|
+
// eslint-disable-next-line func-names
|
|
24198
|
+
var promise = new Promise(function(resolve) {
|
|
24199
|
+
token.subscribe(resolve);
|
|
24200
|
+
_resolve = resolve;
|
|
24201
|
+
}).then(onfulfilled);
|
|
24202
|
+
|
|
24203
|
+
promise.cancel = function reject() {
|
|
24204
|
+
token.unsubscribe(_resolve);
|
|
24205
|
+
};
|
|
24206
|
+
|
|
24207
|
+
return promise;
|
|
24208
|
+
};
|
|
24209
|
+
|
|
24155
24210
|
executor(function cancel(message) {
|
|
24156
24211
|
if (token.reason) {
|
|
24157
24212
|
// Cancellation has already been requested
|
|
@@ -24172,6 +24227,37 @@ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
|
|
24172
24227
|
}
|
|
24173
24228
|
};
|
|
24174
24229
|
|
|
24230
|
+
/**
|
|
24231
|
+
* Subscribe to the cancel signal
|
|
24232
|
+
*/
|
|
24233
|
+
|
|
24234
|
+
CancelToken.prototype.subscribe = function subscribe(listener) {
|
|
24235
|
+
if (this.reason) {
|
|
24236
|
+
listener(this.reason);
|
|
24237
|
+
return;
|
|
24238
|
+
}
|
|
24239
|
+
|
|
24240
|
+
if (this._listeners) {
|
|
24241
|
+
this._listeners.push(listener);
|
|
24242
|
+
} else {
|
|
24243
|
+
this._listeners = [listener];
|
|
24244
|
+
}
|
|
24245
|
+
};
|
|
24246
|
+
|
|
24247
|
+
/**
|
|
24248
|
+
* Unsubscribe from the cancel signal
|
|
24249
|
+
*/
|
|
24250
|
+
|
|
24251
|
+
CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
|
|
24252
|
+
if (!this._listeners) {
|
|
24253
|
+
return;
|
|
24254
|
+
}
|
|
24255
|
+
var index = this._listeners.indexOf(listener);
|
|
24256
|
+
if (index !== -1) {
|
|
24257
|
+
this._listeners.splice(index, 1);
|
|
24258
|
+
}
|
|
24259
|
+
};
|
|
24260
|
+
|
|
24175
24261
|
/**
|
|
24176
24262
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
24177
24263
|
* cancels the `CancelToken`.
|
|
@@ -24245,14 +24331,14 @@ function Axios(instanceConfig) {
|
|
|
24245
24331
|
*
|
|
24246
24332
|
* @param {Object} config The config specific for this request (merged with this.defaults)
|
|
24247
24333
|
*/
|
|
24248
|
-
Axios.prototype.request = function request(config) {
|
|
24334
|
+
Axios.prototype.request = function request(configOrUrl, config) {
|
|
24249
24335
|
/*eslint no-param-reassign:0*/
|
|
24250
24336
|
// Allow for axios('example/url'[, config]) a la fetch API
|
|
24251
|
-
if (typeof
|
|
24252
|
-
config = arguments[1] || {};
|
|
24253
|
-
config.url = arguments[0];
|
|
24254
|
-
} else {
|
|
24337
|
+
if (typeof configOrUrl === 'string') {
|
|
24255
24338
|
config = config || {};
|
|
24339
|
+
config.url = configOrUrl;
|
|
24340
|
+
} else {
|
|
24341
|
+
config = configOrUrl || {};
|
|
24256
24342
|
}
|
|
24257
24343
|
|
|
24258
24344
|
config = mergeConfig(this.defaults, config);
|
|
@@ -24270,9 +24356,9 @@ Axios.prototype.request = function request(config) {
|
|
|
24270
24356
|
|
|
24271
24357
|
if (transitional !== undefined) {
|
|
24272
24358
|
validator.assertOptions(transitional, {
|
|
24273
|
-
silentJSONParsing: validators.transitional(validators.boolean
|
|
24274
|
-
forcedJSONParsing: validators.transitional(validators.boolean
|
|
24275
|
-
clarifyTimeoutError: validators.transitional(validators.boolean
|
|
24359
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
24360
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
24361
|
+
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
24276
24362
|
}, false);
|
|
24277
24363
|
}
|
|
24278
24364
|
|
|
@@ -24511,6 +24597,7 @@ var utils = __webpack_require__(/*! ./../utils */ "../../node_modules/axios/lib/
|
|
|
24511
24597
|
var transformData = __webpack_require__(/*! ./transformData */ "../../node_modules/axios/lib/core/transformData.js");
|
|
24512
24598
|
var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "../../node_modules/axios/lib/cancel/isCancel.js");
|
|
24513
24599
|
var defaults = __webpack_require__(/*! ../defaults */ "../../node_modules/axios/lib/defaults.js");
|
|
24600
|
+
var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "../../node_modules/axios/lib/cancel/Cancel.js");
|
|
24514
24601
|
|
|
24515
24602
|
/**
|
|
24516
24603
|
* Throws a `Cancel` if cancellation has been requested.
|
|
@@ -24519,6 +24606,10 @@ function throwIfCancellationRequested(config) {
|
|
|
24519
24606
|
if (config.cancelToken) {
|
|
24520
24607
|
config.cancelToken.throwIfRequested();
|
|
24521
24608
|
}
|
|
24609
|
+
|
|
24610
|
+
if (config.signal && config.signal.aborted) {
|
|
24611
|
+
throw new Cancel('canceled');
|
|
24612
|
+
}
|
|
24522
24613
|
}
|
|
24523
24614
|
|
|
24524
24615
|
/**
|
|
@@ -24636,7 +24727,8 @@ module.exports = function enhanceError(error, config, code, request, response) {
|
|
|
24636
24727
|
stack: this.stack,
|
|
24637
24728
|
// Axios
|
|
24638
24729
|
config: this.config,
|
|
24639
|
-
code: this.code
|
|
24730
|
+
code: this.code,
|
|
24731
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
24640
24732
|
};
|
|
24641
24733
|
};
|
|
24642
24734
|
return error;
|
|
@@ -24670,17 +24762,6 @@ module.exports = function mergeConfig(config1, config2) {
|
|
|
24670
24762
|
config2 = config2 || {};
|
|
24671
24763
|
var config = {};
|
|
24672
24764
|
|
|
24673
|
-
var valueFromConfig2Keys = ['url', 'method', 'data'];
|
|
24674
|
-
var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
|
|
24675
|
-
var defaultToConfig2Keys = [
|
|
24676
|
-
'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
|
|
24677
|
-
'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
|
|
24678
|
-
'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
|
|
24679
|
-
'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
|
|
24680
|
-
'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
|
|
24681
|
-
];
|
|
24682
|
-
var directMergeKeys = ['validateStatus'];
|
|
24683
|
-
|
|
24684
24765
|
function getMergedValue(target, source) {
|
|
24685
24766
|
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
24686
24767
|
return utils.merge(target, source);
|
|
@@ -24692,52 +24773,75 @@ module.exports = function mergeConfig(config1, config2) {
|
|
|
24692
24773
|
return source;
|
|
24693
24774
|
}
|
|
24694
24775
|
|
|
24776
|
+
// eslint-disable-next-line consistent-return
|
|
24695
24777
|
function mergeDeepProperties(prop) {
|
|
24696
24778
|
if (!utils.isUndefined(config2[prop])) {
|
|
24697
|
-
|
|
24779
|
+
return getMergedValue(config1[prop], config2[prop]);
|
|
24698
24780
|
} else if (!utils.isUndefined(config1[prop])) {
|
|
24699
|
-
|
|
24781
|
+
return getMergedValue(undefined, config1[prop]);
|
|
24700
24782
|
}
|
|
24701
24783
|
}
|
|
24702
24784
|
|
|
24703
|
-
|
|
24785
|
+
// eslint-disable-next-line consistent-return
|
|
24786
|
+
function valueFromConfig2(prop) {
|
|
24704
24787
|
if (!utils.isUndefined(config2[prop])) {
|
|
24705
|
-
|
|
24788
|
+
return getMergedValue(undefined, config2[prop]);
|
|
24706
24789
|
}
|
|
24707
|
-
}
|
|
24708
|
-
|
|
24709
|
-
utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
|
|
24790
|
+
}
|
|
24710
24791
|
|
|
24711
|
-
|
|
24792
|
+
// eslint-disable-next-line consistent-return
|
|
24793
|
+
function defaultToConfig2(prop) {
|
|
24712
24794
|
if (!utils.isUndefined(config2[prop])) {
|
|
24713
|
-
|
|
24795
|
+
return getMergedValue(undefined, config2[prop]);
|
|
24714
24796
|
} else if (!utils.isUndefined(config1[prop])) {
|
|
24715
|
-
|
|
24797
|
+
return getMergedValue(undefined, config1[prop]);
|
|
24716
24798
|
}
|
|
24717
|
-
}
|
|
24799
|
+
}
|
|
24718
24800
|
|
|
24719
|
-
|
|
24801
|
+
// eslint-disable-next-line consistent-return
|
|
24802
|
+
function mergeDirectKeys(prop) {
|
|
24720
24803
|
if (prop in config2) {
|
|
24721
|
-
|
|
24804
|
+
return getMergedValue(config1[prop], config2[prop]);
|
|
24722
24805
|
} else if (prop in config1) {
|
|
24723
|
-
|
|
24724
|
-
}
|
|
24806
|
+
return getMergedValue(undefined, config1[prop]);
|
|
24807
|
+
}
|
|
24808
|
+
}
|
|
24809
|
+
|
|
24810
|
+
var mergeMap = {
|
|
24811
|
+
'url': valueFromConfig2,
|
|
24812
|
+
'method': valueFromConfig2,
|
|
24813
|
+
'data': valueFromConfig2,
|
|
24814
|
+
'baseURL': defaultToConfig2,
|
|
24815
|
+
'transformRequest': defaultToConfig2,
|
|
24816
|
+
'transformResponse': defaultToConfig2,
|
|
24817
|
+
'paramsSerializer': defaultToConfig2,
|
|
24818
|
+
'timeout': defaultToConfig2,
|
|
24819
|
+
'timeoutMessage': defaultToConfig2,
|
|
24820
|
+
'withCredentials': defaultToConfig2,
|
|
24821
|
+
'adapter': defaultToConfig2,
|
|
24822
|
+
'responseType': defaultToConfig2,
|
|
24823
|
+
'xsrfCookieName': defaultToConfig2,
|
|
24824
|
+
'xsrfHeaderName': defaultToConfig2,
|
|
24825
|
+
'onUploadProgress': defaultToConfig2,
|
|
24826
|
+
'onDownloadProgress': defaultToConfig2,
|
|
24827
|
+
'decompress': defaultToConfig2,
|
|
24828
|
+
'maxContentLength': defaultToConfig2,
|
|
24829
|
+
'maxBodyLength': defaultToConfig2,
|
|
24830
|
+
'transport': defaultToConfig2,
|
|
24831
|
+
'httpAgent': defaultToConfig2,
|
|
24832
|
+
'httpsAgent': defaultToConfig2,
|
|
24833
|
+
'cancelToken': defaultToConfig2,
|
|
24834
|
+
'socketPath': defaultToConfig2,
|
|
24835
|
+
'responseEncoding': defaultToConfig2,
|
|
24836
|
+
'validateStatus': mergeDirectKeys
|
|
24837
|
+
};
|
|
24838
|
+
|
|
24839
|
+
utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
|
|
24840
|
+
var merge = mergeMap[prop] || mergeDeepProperties;
|
|
24841
|
+
var configValue = merge(prop);
|
|
24842
|
+
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
24725
24843
|
});
|
|
24726
24844
|
|
|
24727
|
-
var axiosKeys = valueFromConfig2Keys
|
|
24728
|
-
.concat(mergeDeepPropertiesKeys)
|
|
24729
|
-
.concat(defaultToConfig2Keys)
|
|
24730
|
-
.concat(directMergeKeys);
|
|
24731
|
-
|
|
24732
|
-
var otherKeys = Object
|
|
24733
|
-
.keys(config1)
|
|
24734
|
-
.concat(Object.keys(config2))
|
|
24735
|
-
.filter(function filterAxiosKeys(key) {
|
|
24736
|
-
return axiosKeys.indexOf(key) === -1;
|
|
24737
|
-
});
|
|
24738
|
-
|
|
24739
|
-
utils.forEach(otherKeys, mergeDeepProperties);
|
|
24740
|
-
|
|
24741
24845
|
return config;
|
|
24742
24846
|
};
|
|
24743
24847
|
|
|
@@ -24904,7 +25008,7 @@ var defaults = {
|
|
|
24904
25008
|
}],
|
|
24905
25009
|
|
|
24906
25010
|
transformResponse: [function transformResponse(data) {
|
|
24907
|
-
var transitional = this.transitional;
|
|
25011
|
+
var transitional = this.transitional || defaults.transitional;
|
|
24908
25012
|
var silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
24909
25013
|
var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
24910
25014
|
var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
|
|
@@ -24939,12 +25043,12 @@ var defaults = {
|
|
|
24939
25043
|
|
|
24940
25044
|
validateStatus: function validateStatus(status) {
|
|
24941
25045
|
return status >= 200 && status < 300;
|
|
24942
|
-
}
|
|
24943
|
-
};
|
|
25046
|
+
},
|
|
24944
25047
|
|
|
24945
|
-
|
|
24946
|
-
|
|
24947
|
-
|
|
25048
|
+
headers: {
|
|
25049
|
+
common: {
|
|
25050
|
+
'Accept': 'application/json, text/plain, */*'
|
|
25051
|
+
}
|
|
24948
25052
|
}
|
|
24949
25053
|
};
|
|
24950
25054
|
|
|
@@ -24962,6 +25066,19 @@ module.exports = defaults;
|
|
|
24962
25066
|
|
|
24963
25067
|
/***/ }),
|
|
24964
25068
|
|
|
25069
|
+
/***/ "../../node_modules/axios/lib/env/data.js":
|
|
25070
|
+
/*!***********************************************************!*\
|
|
25071
|
+
!*** /root/amplify-js/node_modules/axios/lib/env/data.js ***!
|
|
25072
|
+
\***********************************************************/
|
|
25073
|
+
/*! no static exports found */
|
|
25074
|
+
/***/ (function(module, exports) {
|
|
25075
|
+
|
|
25076
|
+
module.exports = {
|
|
25077
|
+
"version": "0.26.0"
|
|
25078
|
+
};
|
|
25079
|
+
|
|
25080
|
+
/***/ }),
|
|
25081
|
+
|
|
24965
25082
|
/***/ "../../node_modules/axios/lib/helpers/bind.js":
|
|
24966
25083
|
/*!***************************************************************!*\
|
|
24967
25084
|
!*** /root/amplify-js/node_modules/axios/lib/helpers/bind.js ***!
|
|
@@ -25178,7 +25295,7 @@ module.exports = function isAbsoluteURL(url) {
|
|
|
25178
25295
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
25179
25296
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
25180
25297
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
25181
|
-
return /^([a-z][a-z\d
|
|
25298
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
25182
25299
|
};
|
|
25183
25300
|
|
|
25184
25301
|
|
|
@@ -25194,6 +25311,8 @@ module.exports = function isAbsoluteURL(url) {
|
|
|
25194
25311
|
"use strict";
|
|
25195
25312
|
|
|
25196
25313
|
|
|
25314
|
+
var utils = __webpack_require__(/*! ./../utils */ "../../node_modules/axios/lib/utils.js");
|
|
25315
|
+
|
|
25197
25316
|
/**
|
|
25198
25317
|
* Determines whether the payload is an error thrown by Axios
|
|
25199
25318
|
*
|
|
@@ -25201,7 +25320,7 @@ module.exports = function isAbsoluteURL(url) {
|
|
|
25201
25320
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
25202
25321
|
*/
|
|
25203
25322
|
module.exports = function isAxiosError(payload) {
|
|
25204
|
-
return (
|
|
25323
|
+
return utils.isObject(payload) && (payload.isAxiosError === true);
|
|
25205
25324
|
};
|
|
25206
25325
|
|
|
25207
25326
|
|
|
@@ -25425,7 +25544,7 @@ module.exports = function spread(callback) {
|
|
|
25425
25544
|
"use strict";
|
|
25426
25545
|
|
|
25427
25546
|
|
|
25428
|
-
var
|
|
25547
|
+
var VERSION = __webpack_require__(/*! ../env/data */ "../../node_modules/axios/lib/env/data.js").version;
|
|
25429
25548
|
|
|
25430
25549
|
var validators = {};
|
|
25431
25550
|
|
|
@@ -25437,48 +25556,26 @@ var validators = {};
|
|
|
25437
25556
|
});
|
|
25438
25557
|
|
|
25439
25558
|
var deprecatedWarnings = {};
|
|
25440
|
-
var currentVerArr = pkg.version.split('.');
|
|
25441
|
-
|
|
25442
|
-
/**
|
|
25443
|
-
* Compare package versions
|
|
25444
|
-
* @param {string} version
|
|
25445
|
-
* @param {string?} thanVersion
|
|
25446
|
-
* @returns {boolean}
|
|
25447
|
-
*/
|
|
25448
|
-
function isOlderVersion(version, thanVersion) {
|
|
25449
|
-
var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
|
|
25450
|
-
var destVer = version.split('.');
|
|
25451
|
-
for (var i = 0; i < 3; i++) {
|
|
25452
|
-
if (pkgVersionArr[i] > destVer[i]) {
|
|
25453
|
-
return true;
|
|
25454
|
-
} else if (pkgVersionArr[i] < destVer[i]) {
|
|
25455
|
-
return false;
|
|
25456
|
-
}
|
|
25457
|
-
}
|
|
25458
|
-
return false;
|
|
25459
|
-
}
|
|
25460
25559
|
|
|
25461
25560
|
/**
|
|
25462
25561
|
* Transitional option validator
|
|
25463
|
-
* @param {function|boolean?} validator
|
|
25464
|
-
* @param {string?} version
|
|
25465
|
-
* @param {string} message
|
|
25562
|
+
* @param {function|boolean?} validator - set to false if the transitional option has been removed
|
|
25563
|
+
* @param {string?} version - deprecated version / removed since version
|
|
25564
|
+
* @param {string?} message - some message with additional info
|
|
25466
25565
|
* @returns {function}
|
|
25467
25566
|
*/
|
|
25468
25567
|
validators.transitional = function transitional(validator, version, message) {
|
|
25469
|
-
var isDeprecated = version && isOlderVersion(version);
|
|
25470
|
-
|
|
25471
25568
|
function formatMessage(opt, desc) {
|
|
25472
|
-
return '[Axios v' +
|
|
25569
|
+
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
|
25473
25570
|
}
|
|
25474
25571
|
|
|
25475
25572
|
// eslint-disable-next-line func-names
|
|
25476
25573
|
return function(value, opt, opts) {
|
|
25477
25574
|
if (validator === false) {
|
|
25478
|
-
throw new Error(formatMessage(opt, ' has been removed in ' + version));
|
|
25575
|
+
throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));
|
|
25479
25576
|
}
|
|
25480
25577
|
|
|
25481
|
-
if (
|
|
25578
|
+
if (version && !deprecatedWarnings[opt]) {
|
|
25482
25579
|
deprecatedWarnings[opt] = true;
|
|
25483
25580
|
// eslint-disable-next-line no-console
|
|
25484
25581
|
console.warn(
|
|
@@ -25524,7 +25621,6 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
25524
25621
|
}
|
|
25525
25622
|
|
|
25526
25623
|
module.exports = {
|
|
25527
|
-
isOlderVersion: isOlderVersion,
|
|
25528
25624
|
assertOptions: assertOptions,
|
|
25529
25625
|
validators: validators
|
|
25530
25626
|
};
|
|
@@ -25555,7 +25651,7 @@ var toString = Object.prototype.toString;
|
|
|
25555
25651
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
25556
25652
|
*/
|
|
25557
25653
|
function isArray(val) {
|
|
25558
|
-
return
|
|
25654
|
+
return Array.isArray(val);
|
|
25559
25655
|
}
|
|
25560
25656
|
|
|
25561
25657
|
/**
|
|
@@ -25596,7 +25692,7 @@ function isArrayBuffer(val) {
|
|
|
25596
25692
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
25597
25693
|
*/
|
|
25598
25694
|
function isFormData(val) {
|
|
25599
|
-
return (
|
|
25695
|
+
return toString.call(val) === '[object FormData]';
|
|
25600
25696
|
}
|
|
25601
25697
|
|
|
25602
25698
|
/**
|
|
@@ -25610,7 +25706,7 @@ function isArrayBufferView(val) {
|
|
|
25610
25706
|
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
|
25611
25707
|
result = ArrayBuffer.isView(val);
|
|
25612
25708
|
} else {
|
|
25613
|
-
result = (val) && (val.buffer) && (val.buffer
|
|
25709
|
+
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
|
|
25614
25710
|
}
|
|
25615
25711
|
return result;
|
|
25616
25712
|
}
|
|
@@ -25717,7 +25813,7 @@ function isStream(val) {
|
|
|
25717
25813
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
25718
25814
|
*/
|
|
25719
25815
|
function isURLSearchParams(val) {
|
|
25720
|
-
return
|
|
25816
|
+
return toString.call(val) === '[object URLSearchParams]';
|
|
25721
25817
|
}
|
|
25722
25818
|
|
|
25723
25819
|
/**
|
|
@@ -25891,17 +25987,6 @@ module.exports = {
|
|
|
25891
25987
|
};
|
|
25892
25988
|
|
|
25893
25989
|
|
|
25894
|
-
/***/ }),
|
|
25895
|
-
|
|
25896
|
-
/***/ "../../node_modules/axios/package.json":
|
|
25897
|
-
/*!********************************************************!*\
|
|
25898
|
-
!*** /root/amplify-js/node_modules/axios/package.json ***!
|
|
25899
|
-
\********************************************************/
|
|
25900
|
-
/*! exports provided: name, version, description, main, scripts, repository, keywords, author, license, bugs, homepage, devDependencies, browser, jsdelivr, unpkg, typings, dependencies, bundlesize, default */
|
|
25901
|
-
/***/ (function(module) {
|
|
25902
|
-
|
|
25903
|
-
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\"}]}");
|
|
25904
|
-
|
|
25905
25990
|
/***/ }),
|
|
25906
25991
|
|
|
25907
25992
|
/***/ "../../node_modules/base64-js/index.js":
|
|
@@ -71160,7 +71245,7 @@ var getAmplifyUserAgent = function getAmplifyUserAgent() {
|
|
|
71160
71245
|
__webpack_require__.r(__webpack_exports__);
|
|
71161
71246
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; });
|
|
71162
71247
|
// generated by genversion
|
|
71163
|
-
var version = '4.5.
|
|
71248
|
+
var version = '4.5.7';
|
|
71164
71249
|
|
|
71165
71250
|
/***/ }),
|
|
71166
71251
|
|