@aws-amplify/ui-react-storage 3.18.0 → 3.18.2
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/browser.js +1 -1
- package/dist/{createStorageBrowser-S_PgkSVv.js → createStorageBrowser-MHepTg8D.js} +6 -1
- package/dist/esm/components/StorageBrowser/actions/handlers/zipdownload.mjs +5 -0
- package/dist/esm/version.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +4 -4
package/dist/browser.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var internals = require('@aws-amplify/storage/internals');
|
|
6
6
|
require('aws-amplify');
|
|
7
7
|
require('@aws-amplify/ui');
|
|
8
|
-
var createStorageBrowser = require('./createStorageBrowser-
|
|
8
|
+
var createStorageBrowser = require('./createStorageBrowser-MHepTg8D.js');
|
|
9
9
|
require('@zip.js/zip.js');
|
|
10
10
|
require('aws-amplify/storage');
|
|
11
11
|
require('react');
|
|
@@ -582,6 +582,11 @@ const download = async (state, { config, data, options }) => {
|
|
|
582
582
|
mode: 'cors',
|
|
583
583
|
signal: state.batchAbort.signal,
|
|
584
584
|
});
|
|
585
|
+
if (!response.ok) {
|
|
586
|
+
// Release the connection — the error body (S3 error XML) is never consumed.
|
|
587
|
+
response.body?.cancel().catch(() => { });
|
|
588
|
+
throw new Error(`Failed to download ${key}: ${response.status} ${response.statusText}`);
|
|
589
|
+
}
|
|
585
590
|
if (!response.body)
|
|
586
591
|
throw new Error(`Empty response body for ${key}`);
|
|
587
592
|
const size = data.size ?? +(response.headers.get('content-length') ?? 0);
|
|
@@ -3912,7 +3917,7 @@ const componentsDefault = {
|
|
|
3912
3917
|
Title,
|
|
3913
3918
|
};
|
|
3914
3919
|
|
|
3915
|
-
const VERSION = '3.18.
|
|
3920
|
+
const VERSION = '3.18.2';
|
|
3916
3921
|
|
|
3917
3922
|
const Fallback = () => (React__namespace["default"].createElement("div", { className: STORAGE_BROWSER_BLOCK_TO_BE_UPDATED },
|
|
3918
3923
|
React__namespace["default"].createElement("div", { className: `${STORAGE_BROWSER_BLOCK_TO_BE_UPDATED}__error-boundary` }, "Something went wrong.")));
|
|
@@ -188,6 +188,11 @@ const download = async (state, { config, data, options }) => {
|
|
|
188
188
|
mode: 'cors',
|
|
189
189
|
signal: state.batchAbort.signal,
|
|
190
190
|
});
|
|
191
|
+
if (!response.ok) {
|
|
192
|
+
// Release the connection — the error body (S3 error XML) is never consumed.
|
|
193
|
+
response.body?.cancel().catch(() => { });
|
|
194
|
+
throw new Error(`Failed to download ${key}: ${response.status} ${response.statusText}`);
|
|
195
|
+
}
|
|
191
196
|
if (!response.body)
|
|
192
197
|
throw new Error(`Empty response body for ${key}`);
|
|
193
198
|
const size = data.size ?? +(response.headers.get('content-length') ?? 0);
|
package/dist/esm/version.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var uiReactCore = require('@aws-amplify/ui-react-core');
|
|
|
9
9
|
var auth = require('aws-amplify/auth');
|
|
10
10
|
var storage = require('aws-amplify/storage');
|
|
11
11
|
var internal = require('@aws-amplify/ui-react/internal');
|
|
12
|
-
var createStorageBrowser = require('./createStorageBrowser-
|
|
12
|
+
var createStorageBrowser = require('./createStorageBrowser-MHepTg8D.js');
|
|
13
13
|
require('@aws-amplify/storage/internals');
|
|
14
14
|
require('aws-amplify');
|
|
15
15
|
require('@zip.js/zip.js');
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.18.
|
|
1
|
+
export declare const VERSION = "3.18.2";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui-react-storage",
|
|
3
|
-
"version": "3.18.
|
|
3
|
+
"version": "3.18.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/esm/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"typecheck": "tsc --noEmit && tsc --project tsconfig.sw.json --noEmit"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@aws-amplify/ui": "6.15.
|
|
54
|
-
"@aws-amplify/ui-react": "6.15.
|
|
55
|
-
"@aws-amplify/ui-react-core": "3.6.
|
|
53
|
+
"@aws-amplify/ui": "6.15.6",
|
|
54
|
+
"@aws-amplify/ui-react": "6.15.6",
|
|
55
|
+
"@aws-amplify/ui-react-core": "3.6.6",
|
|
56
56
|
"tslib": "^2.5.2",
|
|
57
57
|
"@zip.js/zip.js": "^2.7.53"
|
|
58
58
|
},
|