@aws-amplify/storage 4.4.5 → 4.4.6-unstable.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/dist/aws-amplify-storage.js +20 -11
- package/dist/aws-amplify-storage.js.map +1 -1
- package/dist/aws-amplify-storage.min.js +2 -2
- package/dist/aws-amplify-storage.min.js.map +1 -1
- package/lib/providers/AWSS3Provider.js +2 -2
- package/lib/providers/AWSS3Provider.js.map +1 -1
- package/lib-esm/providers/AWSS3Provider.js +2 -2
- package/lib-esm/providers/AWSS3Provider.js.map +1 -1
- package/package.json +3 -3
- package/src/providers/AWSS3Provider.ts +3 -0
|
@@ -44856,6 +44856,8 @@ function Parser(options) {
|
|
|
44856
44856
|
this.replaceCDATAstr = replaceCDATAstr;
|
|
44857
44857
|
this.replaceCDATAarr = replaceCDATAarr;
|
|
44858
44858
|
|
|
44859
|
+
this.processTextOrObjNode = processTextOrObjNode
|
|
44860
|
+
|
|
44859
44861
|
if (this.options.format) {
|
|
44860
44862
|
this.indentate = indentate;
|
|
44861
44863
|
this.tagEndChar = '>\n';
|
|
@@ -44892,10 +44894,7 @@ Parser.prototype.parse = function(jObj) {
|
|
|
44892
44894
|
Parser.prototype.j2x = function(jObj, level) {
|
|
44893
44895
|
let attrStr = '';
|
|
44894
44896
|
let val = '';
|
|
44895
|
-
|
|
44896
|
-
const len = keys.length;
|
|
44897
|
-
for (let i = 0; i < len; i++) {
|
|
44898
|
-
const key = keys[i];
|
|
44897
|
+
for (let key in jObj) {
|
|
44899
44898
|
if (typeof jObj[key] === 'undefined') {
|
|
44900
44899
|
// supress undefined node
|
|
44901
44900
|
} else if (jObj[key] === null) {
|
|
@@ -44944,8 +44943,7 @@ Parser.prototype.j2x = function(jObj, level) {
|
|
|
44944
44943
|
} else if (item === null) {
|
|
44945
44944
|
val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
|
|
44946
44945
|
} else if (typeof item === 'object') {
|
|
44947
|
-
|
|
44948
|
-
val += this.buildObjNode(result.val, key, result.attrStr, level);
|
|
44946
|
+
val += this.processTextOrObjNode(item, key, level)
|
|
44949
44947
|
} else {
|
|
44950
44948
|
val += this.buildTextNode(item, key, '', level);
|
|
44951
44949
|
}
|
|
@@ -44960,14 +44958,22 @@ Parser.prototype.j2x = function(jObj, level) {
|
|
|
44960
44958
|
attrStr += ' ' + Ks[j] + '="' + this.options.attrValueProcessor('' + jObj[key][Ks[j]]) + '"';
|
|
44961
44959
|
}
|
|
44962
44960
|
} else {
|
|
44963
|
-
|
|
44964
|
-
val += this.buildObjNode(result.val, key, result.attrStr, level);
|
|
44961
|
+
val += this.processTextOrObjNode(jObj[key], key, level)
|
|
44965
44962
|
}
|
|
44966
44963
|
}
|
|
44967
44964
|
}
|
|
44968
44965
|
return {attrStr: attrStr, val: val};
|
|
44969
44966
|
};
|
|
44970
44967
|
|
|
44968
|
+
function processTextOrObjNode (object, key, level) {
|
|
44969
|
+
const result = this.j2x(object, level + 1);
|
|
44970
|
+
if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {
|
|
44971
|
+
return this.buildTextNode(result.val, key, result.attrStr, level);
|
|
44972
|
+
} else {
|
|
44973
|
+
return this.buildObjNode(result.val, key, result.attrStr, level);
|
|
44974
|
+
}
|
|
44975
|
+
}
|
|
44976
|
+
|
|
44971
44977
|
function replaceCDATAstr(str, cdata) {
|
|
44972
44978
|
str = this.options.tagValueProcessor('' + str);
|
|
44973
44979
|
if (this.options.cdataPositionChar === '' || str === '') {
|
|
@@ -44990,7 +44996,7 @@ function replaceCDATAarr(str, cdata) {
|
|
|
44990
44996
|
}
|
|
44991
44997
|
|
|
44992
44998
|
function buildObjectNode(val, key, attrStr, level) {
|
|
44993
|
-
if (attrStr &&
|
|
44999
|
+
if (attrStr && val.indexOf('<') === -1) {
|
|
44994
45000
|
return (
|
|
44995
45001
|
this.indentate(level) +
|
|
44996
45002
|
'<' +
|
|
@@ -49136,7 +49142,9 @@ function () {
|
|
|
49136
49142
|
AWSS3Provider.prototype._createNewS3Client = function (config, emitter) {
|
|
49137
49143
|
var region = config.region,
|
|
49138
49144
|
cancelTokenSource = config.cancelTokenSource,
|
|
49139
|
-
dangerouslyConnectToHttpEndpointForTesting = config.dangerouslyConnectToHttpEndpointForTesting
|
|
49145
|
+
dangerouslyConnectToHttpEndpointForTesting = config.dangerouslyConnectToHttpEndpointForTesting,
|
|
49146
|
+
_a = config.useAccelerateEndpoint,
|
|
49147
|
+
useAccelerateEndpoint = _a === void 0 ? false : _a;
|
|
49140
49148
|
var localTestingConfig = {};
|
|
49141
49149
|
|
|
49142
49150
|
if (dangerouslyConnectToHttpEndpointForTesting) {
|
|
@@ -49155,7 +49163,8 @@ function () {
|
|
|
49155
49163
|
credentials: this._credentialsProvider,
|
|
49156
49164
|
customUserAgent: Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["getAmplifyUserAgent"])()
|
|
49157
49165
|
}, localTestingConfig), {
|
|
49158
|
-
requestHandler: new _axios_http_handler__WEBPACK_IMPORTED_MODULE_5__["AxiosHttpHandler"]({}, emitter, cancelTokenSource)
|
|
49166
|
+
requestHandler: new _axios_http_handler__WEBPACK_IMPORTED_MODULE_5__["AxiosHttpHandler"]({}, emitter, cancelTokenSource),
|
|
49167
|
+
useAccelerateEndpoint: useAccelerateEndpoint
|
|
49159
49168
|
}));
|
|
49160
49169
|
return s3client;
|
|
49161
49170
|
};
|