@aws-amplify/storage 6.6.8-unstable.fab71a7.0 → 6.6.8
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/cjs/providers/s3/types/index.js +0 -3
- package/dist/cjs/providers/s3/types/index.js.map +1 -1
- package/dist/cjs/providers/s3/utils/md5.js +2 -12
- package/dist/cjs/providers/s3/utils/md5.js.map +1 -1
- package/dist/cjs/providers/s3/utils/md5.native.js +2 -12
- package/dist/cjs/providers/s3/utils/md5.native.js.map +1 -1
- package/dist/esm/providers/s3/types/index.d.ts +1 -2
- package/dist/esm/providers/s3/types/index.mjs +1 -1
- package/dist/esm/providers/s3/types/inputs.d.ts +14 -14
- package/dist/esm/providers/s3/types/options.d.ts +20 -20
- package/dist/esm/providers/s3/utils/md5.mjs +2 -12
- package/dist/esm/providers/s3/utils/md5.mjs.map +1 -1
- package/dist/esm/providers/s3/utils/md5.native.mjs +2 -12
- package/dist/esm/providers/s3/utils/md5.native.mjs.map +1 -1
- package/package.json +107 -107
- package/src/providers/s3/apis/internal/list.ts +3 -3
- package/src/providers/s3/apis/uploadData/multipart/uploadHandlers.ts +2 -2
- package/src/providers/s3/types/index.ts +14 -17
- package/src/providers/s3/types/inputs.ts +28 -28
- package/src/providers/s3/types/options.ts +20 -20
- package/src/providers/s3/utils/md5.native.ts +2 -10
- package/src/providers/s3/utils/md5.ts +2 -10
- package/dist/cjs/providers/s3/types/errors.js +0 -12
- package/dist/cjs/providers/s3/types/errors.js.map +0 -1
- package/dist/esm/providers/s3/types/errors.d.ts +0 -5
- package/dist/esm/providers/s3/types/errors.mjs +0 -11
- package/dist/esm/providers/s3/types/errors.mjs.map +0 -1
- package/src/providers/s3/types/errors.ts +0 -8
|
@@ -3,7 +3,4 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.S3Exception = void 0;
|
|
7
|
-
var errors_1 = require("./errors");
|
|
8
|
-
Object.defineProperty(exports, "S3Exception", { enumerable: true, get: function () { return errors_1.S3Exception; } });
|
|
9
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/providers/s3/types/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/providers/s3/types/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -8,18 +8,8 @@ const md5_js_1 = require("@smithy/md5-js");
|
|
|
8
8
|
const utils_1 = require("./client/utils");
|
|
9
9
|
const calculateContentMd5 = async (content) => {
|
|
10
10
|
const hasher = new md5_js_1.Md5();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
else if (ArrayBuffer.isView(content) || content instanceof ArrayBuffer) {
|
|
15
|
-
const blob = new Blob([content]);
|
|
16
|
-
const buffer = await readFile(blob);
|
|
17
|
-
hasher.update(buffer);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
const buffer = await readFile(content);
|
|
21
|
-
hasher.update(buffer);
|
|
22
|
-
}
|
|
11
|
+
const buffer = content instanceof Blob ? await readFile(content) : content;
|
|
12
|
+
hasher.update(buffer);
|
|
23
13
|
const digest = await hasher.digest();
|
|
24
14
|
return (0, utils_1.toBase64)(digest);
|
|
25
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"md5.js","sources":["../../../../../src/providers/s3/utils/md5.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.calculateContentMd5 = void 0;\nconst md5_js_1 = require(\"@smithy/md5-js\");\nconst utils_1 = require(\"./client/utils\");\nconst calculateContentMd5 = async (content) => {\n const hasher = new md5_js_1.Md5();\n
|
|
1
|
+
{"version":3,"file":"md5.js","sources":["../../../../../src/providers/s3/utils/md5.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.calculateContentMd5 = void 0;\nconst md5_js_1 = require(\"@smithy/md5-js\");\nconst utils_1 = require(\"./client/utils\");\nconst calculateContentMd5 = async (content) => {\n const hasher = new md5_js_1.Md5();\n const buffer = content instanceof Blob ? await readFile(content) : content;\n hasher.update(buffer);\n const digest = await hasher.digest();\n return (0, utils_1.toBase64)(digest);\n};\nexports.calculateContentMd5 = calculateContentMd5;\nconst readFile = (file) => new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n resolve(reader.result);\n };\n reader.onabort = () => {\n reject(new Error('Read aborted'));\n };\n reader.onerror = () => {\n reject(reader.error);\n };\n reader.readAsArrayBuffer(file);\n});\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,mBAAmB,GAAG,KAAK,CAAC,CAAC;AACrC,MAAM,QAAQ,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC1C,MAAM,mBAAmB,GAAG,OAAO,OAAO,KAAK;AAC/C,IAAI,MAAM,MAAM,GAAG,IAAI,QAAQ,CAAC,GAAG,EAAE,CAAC;AACtC,IAAI,MAAM,MAAM,GAAG,OAAO,YAAY,IAAI,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AAC/E,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC1B,IAAI,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC;AACzC,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AACzC,CAAC,CAAC;AACF,OAAO,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;AAClD,MAAM,QAAQ,GAAG,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;AAC5D,IAAI,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;AACpC,IAAI,MAAM,CAAC,MAAM,GAAG,MAAM;AAC1B,QAAQ,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,KAAK,CAAC;AACN,IAAI,MAAM,CAAC,OAAO,GAAG,MAAM;AAC3B,QAAQ,MAAM,CAAC,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;AAC1C,KAAK,CAAC;AACN,IAAI,MAAM,CAAC,OAAO,GAAG,MAAM;AAC3B,QAAQ,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC7B,KAAK,CAAC;AACN,IAAI,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC,CAAC;;"}
|
|
@@ -12,18 +12,8 @@ const utils_1 = require("./client/utils");
|
|
|
12
12
|
// TODO: This file should be removable when we drop support for React Native 0.71
|
|
13
13
|
const calculateContentMd5 = async (content) => {
|
|
14
14
|
const hasher = new md5_js_1.Md5();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
else if (ArrayBuffer.isView(content) || content instanceof ArrayBuffer) {
|
|
19
|
-
const blob = new Blob([content]);
|
|
20
|
-
const buffer = await readFile(blob);
|
|
21
|
-
hasher.update(buffer);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
const buffer = await readFile(content);
|
|
25
|
-
hasher.update(buffer);
|
|
26
|
-
}
|
|
15
|
+
const buffer = content instanceof Blob ? await readFile(content) : content;
|
|
16
|
+
hasher.update(buffer);
|
|
27
17
|
const digest = await hasher.digest();
|
|
28
18
|
return (0, utils_1.toBase64)(digest);
|
|
29
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"md5.native.js","sources":["../../../../../src/providers/s3/utils/md5.native.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.calculateContentMd5 = void 0;\nconst buffer_1 = require(\"buffer\");\nconst md5_js_1 = require(\"@smithy/md5-js\");\nconst utils_1 = require(\"./client/utils\");\n// The FileReader in React Native 0.71 did not support `readAsArrayBuffer`. This native implementation accomodates this\n// by attempting to use `readAsArrayBuffer` and changing the file reading strategy if it throws an error.\n// TODO: This file should be removable when we drop support for React Native 0.71\nconst calculateContentMd5 = async (content) => {\n const hasher = new md5_js_1.Md5();\n
|
|
1
|
+
{"version":3,"file":"md5.native.js","sources":["../../../../../src/providers/s3/utils/md5.native.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.calculateContentMd5 = void 0;\nconst buffer_1 = require(\"buffer\");\nconst md5_js_1 = require(\"@smithy/md5-js\");\nconst utils_1 = require(\"./client/utils\");\n// The FileReader in React Native 0.71 did not support `readAsArrayBuffer`. This native implementation accomodates this\n// by attempting to use `readAsArrayBuffer` and changing the file reading strategy if it throws an error.\n// TODO: This file should be removable when we drop support for React Native 0.71\nconst calculateContentMd5 = async (content) => {\n const hasher = new md5_js_1.Md5();\n const buffer = content instanceof Blob ? await readFile(content) : content;\n hasher.update(buffer);\n const digest = await hasher.digest();\n return (0, utils_1.toBase64)(digest);\n};\nexports.calculateContentMd5 = calculateContentMd5;\nconst readFile = (file) => new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n resolve(reader.result);\n };\n reader.onabort = () => {\n reject(new Error('Read aborted'));\n };\n reader.onerror = () => {\n reject(reader.error);\n };\n try {\n reader.readAsArrayBuffer(file);\n }\n catch (e) {\n reader.onload = () => {\n // reference: https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL\n // response from readAsDataURL is always prepended with \"data:*/*;base64,\"\n const [, base64Data] = reader.result.split(',');\n const arrayBuffer = buffer_1.Buffer.from(base64Data, 'base64');\n resolve(arrayBuffer);\n };\n reader.readAsDataURL(file);\n }\n});\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,mBAAmB,GAAG,KAAK,CAAC,CAAC;AACrC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACnC,MAAM,QAAQ,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC1C;AACA;AACA;AACA,MAAM,mBAAmB,GAAG,OAAO,OAAO,KAAK;AAC/C,IAAI,MAAM,MAAM,GAAG,IAAI,QAAQ,CAAC,GAAG,EAAE,CAAC;AACtC,IAAI,MAAM,MAAM,GAAG,OAAO,YAAY,IAAI,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AAC/E,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC1B,IAAI,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC;AACzC,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AACzC,CAAC,CAAC;AACF,OAAO,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;AAClD,MAAM,QAAQ,GAAG,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;AAC5D,IAAI,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;AACpC,IAAI,MAAM,CAAC,MAAM,GAAG,MAAM;AAC1B,QAAQ,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,KAAK,CAAC;AACN,IAAI,MAAM,CAAC,OAAO,GAAG,MAAM;AAC3B,QAAQ,MAAM,CAAC,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;AAC1C,KAAK,CAAC;AACN,IAAI,MAAM,CAAC,OAAO,GAAG,MAAM;AAC3B,QAAQ,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC7B,KAAK,CAAC;AACN,IAAI,IAAI;AACR,QAAQ,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACvC,KAAK;AACL,IAAI,OAAO,CAAC,EAAE;AACd,QAAQ,MAAM,CAAC,MAAM,GAAG,MAAM;AAC9B;AACA;AACA,YAAY,MAAM,GAAG,UAAU,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC5D,YAAY,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AAC3E,YAAY,OAAO,CAAC,WAAW,CAAC,CAAC;AACjC,SAAS,CAAC;AACV,QAAQ,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AACnC,KAAK;AACL,CAAC,CAAC;;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { GetUrlWithKeyOptions, GetUrlWithPathOptions, UploadDataWithPathOptions, UploadDataWithKeyOptions, GetPropertiesWithKeyOptions, GetPropertiesWithPathOptions, ListAllWithPrefixOptions, ListPaginateWithPrefixOptions, ListAllWithPathOptions, ListPaginateWithPathOptions, RemoveOptions, DownloadDataWithPathOptions, DownloadDataWithKeyOptions, CopyDestinationWithKeyOptions, CopySourceWithKeyOptions, } from './options';
|
|
2
2
|
export { UploadDataOutput, UploadDataWithPathOutput, DownloadDataOutput, DownloadDataWithPathOutput, RemoveOutput, RemoveWithPathOutput, ListAllOutput, ListAllWithPathOutput, ListPaginateOutput, ListPaginateWithPathOutput, GetPropertiesOutput, GetPropertiesWithPathOutput, CopyOutput, CopyWithPathOutput, GetUrlOutput, GetUrlWithPathOutput, ListOutputItem, ListOutputItemWithPath, } from './outputs';
|
|
3
3
|
export { CopyInput, CopyWithPathInput, GetPropertiesInput, GetPropertiesWithPathInput, GetUrlInput, GetUrlWithPathInput, RemoveWithPathInput, RemoveInput, DownloadDataInput, DownloadDataWithPathInput, UploadDataInput, UploadDataWithPathInput, ListAllInput, ListPaginateInput, ListAllWithPathInput, ListPaginateWithPathInput, } from './inputs';
|
|
4
|
-
export { S3Exception } from './errors';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { StorageCopyInputWithKey, StorageCopyInputWithPath, StorageDownloadDataInputWithKey, StorageDownloadDataInputWithPath, StorageGetPropertiesInputWithKey, StorageGetPropertiesInputWithPath, StorageGetUrlInputWithKey, StorageGetUrlInputWithPath, StorageListInputWithPath, StorageListInputWithPrefix, StorageRemoveInputWithKey, StorageRemoveInputWithPath, StorageUploadDataInputWithKey, StorageUploadDataInputWithPath } from '../../../types';
|
|
2
|
-
import {
|
|
2
|
+
import { CopyDestinationWithKeyOptions, CopySourceWithKeyOptions, DownloadDataWithKeyOptions, DownloadDataWithPathOptions, GetPropertiesWithKeyOptions, GetPropertiesWithPathOptions, GetUrlWithKeyOptions, GetUrlWithPathOptions, ListAllWithPathOptions, ListAllWithPrefixOptions, ListPaginateWithPathOptions, ListPaginateWithPrefixOptions, RemoveOptions, UploadDataWithKeyOptions, UploadDataWithPathOptions } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated Use {@link CopyWithPathInput} instead.
|
|
5
5
|
* Input type for S3 copy API.
|
|
6
6
|
*/
|
|
7
|
-
export type CopyInput = StorageCopyInputWithKey<
|
|
7
|
+
export type CopyInput = StorageCopyInputWithKey<CopySourceWithKeyOptions, CopyDestinationWithKeyOptions>;
|
|
8
8
|
/**
|
|
9
9
|
* Input type with path for S3 copy API.
|
|
10
10
|
*/
|
|
@@ -13,38 +13,38 @@ export type CopyWithPathInput = StorageCopyInputWithPath;
|
|
|
13
13
|
* @deprecated Use {@link GetPropertiesWithPathInput} instead.
|
|
14
14
|
* Input type for S3 getProperties API.
|
|
15
15
|
*/
|
|
16
|
-
export type GetPropertiesInput = StorageGetPropertiesInputWithKey<
|
|
16
|
+
export type GetPropertiesInput = StorageGetPropertiesInputWithKey<GetPropertiesWithKeyOptions>;
|
|
17
17
|
/**
|
|
18
18
|
* Input type with for S3 getProperties API.
|
|
19
19
|
*/
|
|
20
|
-
export type GetPropertiesWithPathInput = StorageGetPropertiesInputWithPath<
|
|
20
|
+
export type GetPropertiesWithPathInput = StorageGetPropertiesInputWithPath<GetPropertiesWithPathOptions>;
|
|
21
21
|
/**
|
|
22
22
|
* @deprecated Use {@link GetUrlWithPathInput} instead.
|
|
23
23
|
* Input type for S3 getUrl API.
|
|
24
24
|
*/
|
|
25
|
-
export type GetUrlInput = StorageGetUrlInputWithKey<
|
|
25
|
+
export type GetUrlInput = StorageGetUrlInputWithKey<GetUrlWithKeyOptions>;
|
|
26
26
|
/**
|
|
27
27
|
* Input type with path for S3 getUrl API.
|
|
28
28
|
*/
|
|
29
|
-
export type GetUrlWithPathInput = StorageGetUrlInputWithPath<
|
|
29
|
+
export type GetUrlWithPathInput = StorageGetUrlInputWithPath<GetUrlWithPathOptions>;
|
|
30
30
|
/**
|
|
31
31
|
* Input type with path for S3 list API. Lists all bucket objects.
|
|
32
32
|
*/
|
|
33
|
-
export type ListAllWithPathInput = StorageListInputWithPath<
|
|
33
|
+
export type ListAllWithPathInput = StorageListInputWithPath<ListAllWithPathOptions>;
|
|
34
34
|
/**
|
|
35
35
|
* Input type with path for S3 list API. Lists bucket objects with pagination.
|
|
36
36
|
*/
|
|
37
|
-
export type ListPaginateWithPathInput = StorageListInputWithPath<
|
|
37
|
+
export type ListPaginateWithPathInput = StorageListInputWithPath<ListPaginateWithPathOptions>;
|
|
38
38
|
/**
|
|
39
39
|
* @deprecated Use {@link ListAllWithPathInput} instead.
|
|
40
40
|
* Input type for S3 list API. Lists all bucket objects.
|
|
41
41
|
*/
|
|
42
|
-
export type ListAllInput = StorageListInputWithPrefix<
|
|
42
|
+
export type ListAllInput = StorageListInputWithPrefix<ListAllWithPrefixOptions>;
|
|
43
43
|
/**
|
|
44
44
|
* @deprecated Use {@link ListPaginateWithPathInput} instead.
|
|
45
45
|
* Input type for S3 list API. Lists bucket objects with pagination.
|
|
46
46
|
*/
|
|
47
|
-
export type ListPaginateInput = StorageListInputWithPrefix<
|
|
47
|
+
export type ListPaginateInput = StorageListInputWithPrefix<ListPaginateWithPrefixOptions>;
|
|
48
48
|
/**
|
|
49
49
|
* @deprecated Use {@link RemoveWithPathInput} instead.
|
|
50
50
|
* Input type with key for S3 remove API.
|
|
@@ -58,17 +58,17 @@ export type RemoveWithPathInput = StorageRemoveInputWithPath<Omit<RemoveOptions,
|
|
|
58
58
|
* @deprecated Use {@link DownloadDataWithPathInput} instead.
|
|
59
59
|
* Input type for S3 downloadData API.
|
|
60
60
|
*/
|
|
61
|
-
export type DownloadDataInput = StorageDownloadDataInputWithKey<
|
|
61
|
+
export type DownloadDataInput = StorageDownloadDataInputWithKey<DownloadDataWithKeyOptions>;
|
|
62
62
|
/**
|
|
63
63
|
* Input type with path for S3 downloadData API.
|
|
64
64
|
*/
|
|
65
|
-
export type DownloadDataWithPathInput = StorageDownloadDataInputWithPath<
|
|
65
|
+
export type DownloadDataWithPathInput = StorageDownloadDataInputWithPath<DownloadDataWithPathOptions>;
|
|
66
66
|
/**
|
|
67
67
|
* @deprecated Use {@link UploadDataWithPathInput} instead.
|
|
68
68
|
* Input type for S3 uploadData API.
|
|
69
69
|
*/
|
|
70
|
-
export type UploadDataInput = StorageUploadDataInputWithKey<
|
|
70
|
+
export type UploadDataInput = StorageUploadDataInputWithKey<UploadDataWithKeyOptions>;
|
|
71
71
|
/**
|
|
72
72
|
* Input type with path for S3 uploadData API.
|
|
73
73
|
*/
|
|
74
|
-
export type UploadDataWithPathInput = StorageUploadDataInputWithPath<
|
|
74
|
+
export type UploadDataWithPathInput = StorageUploadDataInputWithPath<UploadDataWithPathOptions>;
|
|
@@ -56,33 +56,33 @@ interface TransferOptions {
|
|
|
56
56
|
/**
|
|
57
57
|
* Input options type for S3 getProperties API.
|
|
58
58
|
*/
|
|
59
|
-
/** @deprecated Use {@link
|
|
60
|
-
export type
|
|
61
|
-
export type
|
|
59
|
+
/** @deprecated Use {@link GetPropertiesWithPathOptions} instead. */
|
|
60
|
+
export type GetPropertiesWithKeyOptions = ReadOptions & CommonOptions;
|
|
61
|
+
export type GetPropertiesWithPathOptions = CommonOptions;
|
|
62
62
|
/**
|
|
63
63
|
* Input options type for S3 getProperties API.
|
|
64
64
|
*/
|
|
65
65
|
export type RemoveOptions = WriteOptions & CommonOptions;
|
|
66
66
|
/**
|
|
67
|
-
* @deprecated Use {@link
|
|
67
|
+
* @deprecated Use {@link ListAllWithPathOptions} instead.
|
|
68
68
|
* Input options type with prefix for S3 list all API.
|
|
69
69
|
*/
|
|
70
|
-
export type
|
|
70
|
+
export type ListAllWithPrefixOptions = StorageListAllOptions & ReadOptions & CommonOptions;
|
|
71
71
|
/**
|
|
72
|
-
* @deprecated Use {@link
|
|
72
|
+
* @deprecated Use {@link ListPaginateWithPathOptions} instead.
|
|
73
73
|
* Input options type with prefix for S3 list API to paginate items.
|
|
74
74
|
*/
|
|
75
|
-
export type
|
|
75
|
+
export type ListPaginateWithPrefixOptions = StorageListPaginateOptions & ReadOptions & CommonOptions;
|
|
76
76
|
/**
|
|
77
77
|
* Input options type with path for S3 list all API.
|
|
78
78
|
*/
|
|
79
|
-
export type
|
|
79
|
+
export type ListAllWithPathOptions = Omit<StorageListAllOptions, 'accessLevel'> & CommonOptions & {
|
|
80
80
|
subpathStrategy?: StorageSubpathStrategy;
|
|
81
81
|
};
|
|
82
82
|
/**
|
|
83
83
|
* Input options type with path for S3 list API to paginate items.
|
|
84
84
|
*/
|
|
85
|
-
export type
|
|
85
|
+
export type ListPaginateWithPathOptions = Omit<StorageListPaginateOptions, 'accessLevel'> & CommonOptions & {
|
|
86
86
|
subpathStrategy?: StorageSubpathStrategy;
|
|
87
87
|
};
|
|
88
88
|
/**
|
|
@@ -113,16 +113,16 @@ export type GetUrlOptions = CommonOptions & {
|
|
|
113
113
|
*/
|
|
114
114
|
contentType?: string;
|
|
115
115
|
};
|
|
116
|
-
/** @deprecated Use {@link
|
|
117
|
-
export type
|
|
118
|
-
export type
|
|
116
|
+
/** @deprecated Use {@link GetUrlWithPathOptions} instead. */
|
|
117
|
+
export type GetUrlWithKeyOptions = ReadOptions & GetUrlOptions;
|
|
118
|
+
export type GetUrlWithPathOptions = GetUrlOptions;
|
|
119
119
|
/**
|
|
120
120
|
* Input options type for S3 downloadData API.
|
|
121
121
|
*/
|
|
122
122
|
export type DownloadDataOptions = CommonOptions & TransferOptions & BytesRangeOptions;
|
|
123
|
-
/** @deprecated Use {@link
|
|
124
|
-
export type
|
|
125
|
-
export type
|
|
123
|
+
/** @deprecated Use {@link DownloadDataWithPathOptions} instead. */
|
|
124
|
+
export type DownloadDataWithKeyOptions = ReadOptions & DownloadDataOptions;
|
|
125
|
+
export type DownloadDataWithPathOptions = DownloadDataOptions;
|
|
126
126
|
export type UploadDataOptions = CommonOptions & TransferOptions & {
|
|
127
127
|
/**
|
|
128
128
|
* The default content-disposition header value of the file when downloading it.
|
|
@@ -148,17 +148,17 @@ export type UploadDataOptions = CommonOptions & TransferOptions & {
|
|
|
148
148
|
*/
|
|
149
149
|
metadata?: Record<string, string>;
|
|
150
150
|
};
|
|
151
|
-
/** @deprecated Use {@link
|
|
152
|
-
export type
|
|
153
|
-
export type
|
|
151
|
+
/** @deprecated Use {@link UploadDataWithPathOptions} instead. */
|
|
152
|
+
export type UploadDataWithKeyOptions = WriteOptions & UploadDataOptions;
|
|
153
|
+
export type UploadDataWithPathOptions = UploadDataOptions;
|
|
154
154
|
/** @deprecated This may be removed in the next major version. */
|
|
155
|
-
export type
|
|
155
|
+
export type CopySourceWithKeyOptions = ReadOptions & {
|
|
156
156
|
/** @deprecated This may be removed in the next major version. */
|
|
157
157
|
key: string;
|
|
158
158
|
bucket?: StorageBucket;
|
|
159
159
|
};
|
|
160
160
|
/** @deprecated This may be removed in the next major version. */
|
|
161
|
-
export type
|
|
161
|
+
export type CopyDestinationWithKeyOptions = WriteOptions & {
|
|
162
162
|
/** @deprecated This may be removed in the next major version. */
|
|
163
163
|
key: string;
|
|
164
164
|
bucket?: StorageBucket;
|
|
@@ -10,18 +10,8 @@ import '@aws-amplify/core/internals/utils';
|
|
|
10
10
|
// SPDX-License-Identifier: Apache-2.0
|
|
11
11
|
const calculateContentMd5 = async (content) => {
|
|
12
12
|
const hasher = new Md5();
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
else if (ArrayBuffer.isView(content) || content instanceof ArrayBuffer) {
|
|
17
|
-
const blob = new Blob([content]);
|
|
18
|
-
const buffer = await readFile(blob);
|
|
19
|
-
hasher.update(buffer);
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
const buffer = await readFile(content);
|
|
23
|
-
hasher.update(buffer);
|
|
24
|
-
}
|
|
13
|
+
const buffer = content instanceof Blob ? await readFile(content) : content;
|
|
14
|
+
hasher.update(buffer);
|
|
25
15
|
const digest = await hasher.digest();
|
|
26
16
|
return toBase64(digest);
|
|
27
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"md5.mjs","sources":["../../../../../src/providers/s3/utils/md5.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Md5 } from '@smithy/md5-js';\nimport { toBase64 } from './client/utils';\nexport const calculateContentMd5 = async (content) => {\n const hasher = new Md5();\n
|
|
1
|
+
{"version":3,"file":"md5.mjs","sources":["../../../../../src/providers/s3/utils/md5.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Md5 } from '@smithy/md5-js';\nimport { toBase64 } from './client/utils';\nexport const calculateContentMd5 = async (content) => {\n const hasher = new Md5();\n const buffer = content instanceof Blob ? await readFile(content) : content;\n hasher.update(buffer);\n const digest = await hasher.digest();\n return toBase64(digest);\n};\nconst readFile = (file) => new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n resolve(reader.result);\n };\n reader.onabort = () => {\n reject(new Error('Read aborted'));\n };\n reader.onerror = () => {\n reject(reader.error);\n };\n reader.readAsArrayBuffer(file);\n});\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;AAGY,MAAC,mBAAmB,GAAG,OAAO,OAAO,KAAK;AACtD,IAAI,MAAM,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;AAC7B,IAAI,MAAM,MAAM,GAAG,OAAO,YAAY,IAAI,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AAC/E,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC1B,IAAI,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC;AACzC,IAAI,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC5B,EAAE;AACF,MAAM,QAAQ,GAAG,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;AAC5D,IAAI,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;AACpC,IAAI,MAAM,CAAC,MAAM,GAAG,MAAM;AAC1B,QAAQ,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,KAAK,CAAC;AACN,IAAI,MAAM,CAAC,OAAO,GAAG,MAAM;AAC3B,QAAQ,MAAM,CAAC,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;AAC1C,KAAK,CAAC;AACN,IAAI,MAAM,CAAC,OAAO,GAAG,MAAM;AAC3B,QAAQ,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC7B,KAAK,CAAC;AACN,IAAI,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC,CAAC;;;;"}
|
|
@@ -14,18 +14,8 @@ import '@aws-amplify/core/internals/utils';
|
|
|
14
14
|
// TODO: This file should be removable when we drop support for React Native 0.71
|
|
15
15
|
const calculateContentMd5 = async (content) => {
|
|
16
16
|
const hasher = new Md5();
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
else if (ArrayBuffer.isView(content) || content instanceof ArrayBuffer) {
|
|
21
|
-
const blob = new Blob([content]);
|
|
22
|
-
const buffer = await readFile(blob);
|
|
23
|
-
hasher.update(buffer);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
const buffer = await readFile(content);
|
|
27
|
-
hasher.update(buffer);
|
|
28
|
-
}
|
|
17
|
+
const buffer = content instanceof Blob ? await readFile(content) : content;
|
|
18
|
+
hasher.update(buffer);
|
|
29
19
|
const digest = await hasher.digest();
|
|
30
20
|
return toBase64(digest);
|
|
31
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"md5.native.mjs","sources":["../../../../../src/providers/s3/utils/md5.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Buffer } from 'buffer';\nimport { Md5 } from '@smithy/md5-js';\nimport { toBase64 } from './client/utils';\n// The FileReader in React Native 0.71 did not support `readAsArrayBuffer`. This native implementation accomodates this\n// by attempting to use `readAsArrayBuffer` and changing the file reading strategy if it throws an error.\n// TODO: This file should be removable when we drop support for React Native 0.71\nexport const calculateContentMd5 = async (content) => {\n const hasher = new Md5();\n
|
|
1
|
+
{"version":3,"file":"md5.native.mjs","sources":["../../../../../src/providers/s3/utils/md5.native.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Buffer } from 'buffer';\nimport { Md5 } from '@smithy/md5-js';\nimport { toBase64 } from './client/utils';\n// The FileReader in React Native 0.71 did not support `readAsArrayBuffer`. This native implementation accomodates this\n// by attempting to use `readAsArrayBuffer` and changing the file reading strategy if it throws an error.\n// TODO: This file should be removable when we drop support for React Native 0.71\nexport const calculateContentMd5 = async (content) => {\n const hasher = new Md5();\n const buffer = content instanceof Blob ? await readFile(content) : content;\n hasher.update(buffer);\n const digest = await hasher.digest();\n return toBase64(digest);\n};\nconst readFile = (file) => new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n resolve(reader.result);\n };\n reader.onabort = () => {\n reject(new Error('Read aborted'));\n };\n reader.onerror = () => {\n reject(reader.error);\n };\n try {\n reader.readAsArrayBuffer(file);\n }\n catch (e) {\n reader.onload = () => {\n // reference: https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL\n // response from readAsDataURL is always prepended with \"data:*/*;base64,\"\n const [, base64Data] = reader.result.split(',');\n const arrayBuffer = Buffer.from(base64Data, 'base64');\n resolve(arrayBuffer);\n };\n reader.readAsDataURL(file);\n }\n});\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AAIA;AACA;AACA;AACY,MAAC,mBAAmB,GAAG,OAAO,OAAO,KAAK;AACtD,IAAI,MAAM,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;AAC7B,IAAI,MAAM,MAAM,GAAG,OAAO,YAAY,IAAI,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AAC/E,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC1B,IAAI,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC;AACzC,IAAI,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC5B,EAAE;AACF,MAAM,QAAQ,GAAG,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;AAC5D,IAAI,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;AACpC,IAAI,MAAM,CAAC,MAAM,GAAG,MAAM;AAC1B,QAAQ,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,KAAK,CAAC;AACN,IAAI,MAAM,CAAC,OAAO,GAAG,MAAM;AAC3B,QAAQ,MAAM,CAAC,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;AAC1C,KAAK,CAAC;AACN,IAAI,MAAM,CAAC,OAAO,GAAG,MAAM;AAC3B,QAAQ,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC7B,KAAK,CAAC;AACN,IAAI,IAAI;AACR,QAAQ,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACvC,KAAK;AACL,IAAI,OAAO,CAAC,EAAE;AACd,QAAQ,MAAM,CAAC,MAAM,GAAG,MAAM;AAC9B;AACA;AACA,YAAY,MAAM,GAAG,UAAU,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC5D,YAAY,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AAClE,YAAY,OAAO,CAAC,WAAW,CAAC,CAAC;AACjC,SAAS,CAAC;AACV,QAAQ,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AACnC,KAAK;AACL,CAAC,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,109 +1,109 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
2
|
+
"name": "@aws-amplify/storage",
|
|
3
|
+
"version": "6.6.8",
|
|
4
|
+
"description": "Storage category of aws-amplify",
|
|
5
|
+
"main": "./dist/cjs/index.js",
|
|
6
|
+
"module": "./dist/esm/index.mjs",
|
|
7
|
+
"react-native": {
|
|
8
|
+
"./dist/cjs/index": "./src/index.ts",
|
|
9
|
+
"fast-xml-parser": "fast-xml-parser",
|
|
10
|
+
"buffer": "buffer"
|
|
11
|
+
},
|
|
12
|
+
"typings": "./dist/esm/index.d.ts",
|
|
13
|
+
"browser": {
|
|
14
|
+
"./dist/esm/providers/s3/utils/client/runtime/base64/index.native.mjs": "./dist/esm/providers/s3/utils/client/runtime/base64/index.browser.mjs",
|
|
15
|
+
"./dist/esm/providers/s3/utils/client/runtime/s3TransferHandler/fetch.mjs": "./dist/esm/providers/s3/utils/client/runtime/s3TransferHandler/xhr.mjs",
|
|
16
|
+
"./dist/esm/providers/s3/utils/client/runtime/xmlParser/pureJs.mjs": "./dist/esm/providers/s3/utils/client/runtime/xmlParser/dom.mjs",
|
|
17
|
+
"fast-xml-parser": false,
|
|
18
|
+
"buffer": false
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
|
|
26
|
+
"build-with-test": "npm test && npm run build",
|
|
27
|
+
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
|
|
28
|
+
"build:esm-cjs": "rollup --forceExit -c rollup.config.mjs",
|
|
29
|
+
"build:watch": "npm run build:esm-cjs -- --watch",
|
|
30
|
+
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
|
|
31
|
+
"clean": "npm run clean:size && rimraf lib-esm lib dist",
|
|
32
|
+
"clean:size": "rimraf dual-publish-tmp tmp*",
|
|
33
|
+
"format": "echo \"Not implemented\"",
|
|
34
|
+
"lint": "eslint '**/*.{ts,tsx}' && npm run ts-coverage",
|
|
35
|
+
"lint:fix": "eslint '**/*.{ts,tsx}' --fix",
|
|
36
|
+
"ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 90.31"
|
|
37
|
+
},
|
|
38
|
+
"typesVersions": {
|
|
39
|
+
">=4.2": {
|
|
40
|
+
"s3": [
|
|
41
|
+
"./dist/esm/providers/s3/index.d.ts"
|
|
42
|
+
],
|
|
43
|
+
"server": [
|
|
44
|
+
"./dist/esm/server.d.ts"
|
|
45
|
+
],
|
|
46
|
+
"s3/server": [
|
|
47
|
+
"./dist/esm/providers/s3/server.d.ts"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "https://github.com/aws-amplify/amplify-js.git"
|
|
54
|
+
},
|
|
55
|
+
"author": "Amazon Web Services",
|
|
56
|
+
"license": "Apache-2.0",
|
|
57
|
+
"bugs": {
|
|
58
|
+
"url": "https://github.com/aws/aws-amplify/issues"
|
|
59
|
+
},
|
|
60
|
+
"homepage": "https://aws-amplify.github.io/",
|
|
61
|
+
"files": [
|
|
62
|
+
"dist/cjs",
|
|
63
|
+
"dist/esm",
|
|
64
|
+
"src",
|
|
65
|
+
"server",
|
|
66
|
+
"s3"
|
|
67
|
+
],
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"@aws-sdk/types": "3.398.0",
|
|
70
|
+
"@smithy/md5-js": "2.0.7",
|
|
71
|
+
"buffer": "4.9.2",
|
|
72
|
+
"fast-xml-parser": "^4.4.1",
|
|
73
|
+
"tslib": "^2.5.0"
|
|
74
|
+
},
|
|
75
|
+
"exports": {
|
|
76
|
+
".": {
|
|
77
|
+
"types": "./dist/esm/index.d.ts",
|
|
78
|
+
"import": "./dist/esm/index.mjs",
|
|
79
|
+
"require": "./dist/cjs/index.js",
|
|
80
|
+
"react-native": "./src/index.ts"
|
|
81
|
+
},
|
|
82
|
+
"./server": {
|
|
83
|
+
"types": "./dist/esm/server.d.ts",
|
|
84
|
+
"import": "./dist/esm/server.mjs",
|
|
85
|
+
"require": "./dist/cjs/server.js"
|
|
86
|
+
},
|
|
87
|
+
"./s3": {
|
|
88
|
+
"types": "./dist/esm/providers/s3/index.d.ts",
|
|
89
|
+
"import": "./dist/esm/providers/s3/index.mjs",
|
|
90
|
+
"require": "./dist/cjs/providers/s3/index.js",
|
|
91
|
+
"react-native": "./src/providers/s3/index.ts"
|
|
92
|
+
},
|
|
93
|
+
"./s3/server": {
|
|
94
|
+
"types": "./dist/esm/providers/s3/server.d.ts",
|
|
95
|
+
"import": "./dist/esm/providers/s3/server.mjs",
|
|
96
|
+
"require": "./dist/cjs/providers/s3/server.js"
|
|
97
|
+
},
|
|
98
|
+
"./package.json": "./package.json"
|
|
99
|
+
},
|
|
100
|
+
"peerDependencies": {
|
|
101
|
+
"@aws-amplify/core": "^6.1.0"
|
|
102
|
+
},
|
|
103
|
+
"devDependencies": {
|
|
104
|
+
"@aws-amplify/core": "6.4.3",
|
|
105
|
+
"@aws-amplify/react-native": "1.1.6",
|
|
106
|
+
"typescript": "5.0.2"
|
|
107
|
+
},
|
|
108
|
+
"gitHead": "56ded04a14ba8c22ecbb4e1e5cec52afbf0c6ee9"
|
|
109
109
|
}
|
|
@@ -21,8 +21,8 @@ import {
|
|
|
21
21
|
validateStorageOperationInputWithPrefix,
|
|
22
22
|
} from '../../utils';
|
|
23
23
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
ListAllWithPathOptions,
|
|
25
|
+
ListPaginateWithPathOptions,
|
|
26
26
|
ResolvedS3Config,
|
|
27
27
|
} from '../../types/options';
|
|
28
28
|
import {
|
|
@@ -267,7 +267,7 @@ const mapCommonPrefixesToExcludedSubpaths = (
|
|
|
267
267
|
};
|
|
268
268
|
|
|
269
269
|
const getDelimiter = (
|
|
270
|
-
options?:
|
|
270
|
+
options?: ListAllWithPathOptions | ListPaginateWithPathOptions,
|
|
271
271
|
): string | undefined => {
|
|
272
272
|
if (options?.subpathStrategy?.strategy === 'exclude') {
|
|
273
273
|
return options?.subpathStrategy?.delimiter ?? DEFAULT_DELIMITER;
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from '../../../utils/constants';
|
|
18
18
|
import {
|
|
19
19
|
ResolvedS3Config,
|
|
20
|
-
|
|
20
|
+
UploadDataWithKeyOptions,
|
|
21
21
|
} from '../../../types/options';
|
|
22
22
|
import { StorageError } from '../../../../../errors/StorageError';
|
|
23
23
|
import { CanceledError } from '../../../../../errors/CanceledError';
|
|
@@ -99,7 +99,7 @@ export const getMultipartUploadHandlers = (
|
|
|
99
99
|
|
|
100
100
|
// Resolve "key" specific options
|
|
101
101
|
if (inputType === STORAGE_INPUT_KEY) {
|
|
102
|
-
const accessLevel = (uploadDataOptions as
|
|
102
|
+
const accessLevel = (uploadDataOptions as UploadDataWithKeyOptions)
|
|
103
103
|
?.accessLevel;
|
|
104
104
|
|
|
105
105
|
resolvedKeyPrefix = resolvedS3Options.keyPrefix;
|
|
@@ -2,23 +2,21 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
GetUrlWithKeyOptions,
|
|
6
|
+
GetUrlWithPathOptions,
|
|
7
|
+
UploadDataWithPathOptions,
|
|
8
|
+
UploadDataWithKeyOptions,
|
|
9
|
+
GetPropertiesWithKeyOptions,
|
|
10
|
+
GetPropertiesWithPathOptions,
|
|
11
|
+
ListAllWithPrefixOptions,
|
|
12
|
+
ListPaginateWithPrefixOptions,
|
|
13
|
+
ListAllWithPathOptions,
|
|
14
|
+
ListPaginateWithPathOptions,
|
|
15
15
|
RemoveOptions,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
CopyWithPathSourceOptions,
|
|
21
|
-
CopyWithPathDestinationOptions,
|
|
16
|
+
DownloadDataWithPathOptions,
|
|
17
|
+
DownloadDataWithKeyOptions,
|
|
18
|
+
CopyDestinationWithKeyOptions,
|
|
19
|
+
CopySourceWithKeyOptions,
|
|
22
20
|
} from './options';
|
|
23
21
|
export {
|
|
24
22
|
UploadDataOutput,
|
|
@@ -58,4 +56,3 @@ export {
|
|
|
58
56
|
ListAllWithPathInput,
|
|
59
57
|
ListPaginateWithPathInput,
|
|
60
58
|
} from './inputs';
|
|
61
|
-
export { S3Exception } from './errors';
|
|
@@ -18,21 +18,21 @@ import {
|
|
|
18
18
|
StorageUploadDataInputWithPath,
|
|
19
19
|
} from '../../../types';
|
|
20
20
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
CopyDestinationWithKeyOptions,
|
|
22
|
+
CopySourceWithKeyOptions,
|
|
23
|
+
DownloadDataWithKeyOptions,
|
|
24
|
+
DownloadDataWithPathOptions,
|
|
25
|
+
GetPropertiesWithKeyOptions,
|
|
26
|
+
GetPropertiesWithPathOptions,
|
|
27
|
+
GetUrlWithKeyOptions,
|
|
28
|
+
GetUrlWithPathOptions,
|
|
29
|
+
ListAllWithPathOptions,
|
|
30
|
+
ListAllWithPrefixOptions,
|
|
31
|
+
ListPaginateWithPathOptions,
|
|
32
|
+
ListPaginateWithPrefixOptions,
|
|
33
33
|
RemoveOptions,
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
UploadDataWithKeyOptions,
|
|
35
|
+
UploadDataWithPathOptions,
|
|
36
36
|
} from '../types';
|
|
37
37
|
|
|
38
38
|
// TODO: support use accelerate endpoint option
|
|
@@ -41,8 +41,8 @@ import {
|
|
|
41
41
|
* Input type for S3 copy API.
|
|
42
42
|
*/
|
|
43
43
|
export type CopyInput = StorageCopyInputWithKey<
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
CopySourceWithKeyOptions,
|
|
45
|
+
CopyDestinationWithKeyOptions
|
|
46
46
|
>;
|
|
47
47
|
/**
|
|
48
48
|
* Input type with path for S3 copy API.
|
|
@@ -54,48 +54,48 @@ export type CopyWithPathInput = StorageCopyInputWithPath;
|
|
|
54
54
|
* Input type for S3 getProperties API.
|
|
55
55
|
*/
|
|
56
56
|
export type GetPropertiesInput =
|
|
57
|
-
StorageGetPropertiesInputWithKey<
|
|
57
|
+
StorageGetPropertiesInputWithKey<GetPropertiesWithKeyOptions>;
|
|
58
58
|
/**
|
|
59
59
|
* Input type with for S3 getProperties API.
|
|
60
60
|
*/
|
|
61
61
|
export type GetPropertiesWithPathInput =
|
|
62
|
-
StorageGetPropertiesInputWithPath<
|
|
62
|
+
StorageGetPropertiesInputWithPath<GetPropertiesWithPathOptions>;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* @deprecated Use {@link GetUrlWithPathInput} instead.
|
|
66
66
|
* Input type for S3 getUrl API.
|
|
67
67
|
*/
|
|
68
|
-
export type GetUrlInput = StorageGetUrlInputWithKey<
|
|
68
|
+
export type GetUrlInput = StorageGetUrlInputWithKey<GetUrlWithKeyOptions>;
|
|
69
69
|
/**
|
|
70
70
|
* Input type with path for S3 getUrl API.
|
|
71
71
|
*/
|
|
72
72
|
export type GetUrlWithPathInput =
|
|
73
|
-
StorageGetUrlInputWithPath<
|
|
73
|
+
StorageGetUrlInputWithPath<GetUrlWithPathOptions>;
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* Input type with path for S3 list API. Lists all bucket objects.
|
|
77
77
|
*/
|
|
78
78
|
export type ListAllWithPathInput =
|
|
79
|
-
StorageListInputWithPath<
|
|
79
|
+
StorageListInputWithPath<ListAllWithPathOptions>;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Input type with path for S3 list API. Lists bucket objects with pagination.
|
|
83
83
|
*/
|
|
84
84
|
export type ListPaginateWithPathInput =
|
|
85
|
-
StorageListInputWithPath<
|
|
85
|
+
StorageListInputWithPath<ListPaginateWithPathOptions>;
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* @deprecated Use {@link ListAllWithPathInput} instead.
|
|
89
89
|
* Input type for S3 list API. Lists all bucket objects.
|
|
90
90
|
*/
|
|
91
|
-
export type ListAllInput = StorageListInputWithPrefix<
|
|
91
|
+
export type ListAllInput = StorageListInputWithPrefix<ListAllWithPrefixOptions>;
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
94
|
* @deprecated Use {@link ListPaginateWithPathInput} instead.
|
|
95
95
|
* Input type for S3 list API. Lists bucket objects with pagination.
|
|
96
96
|
*/
|
|
97
97
|
export type ListPaginateInput =
|
|
98
|
-
StorageListInputWithPrefix<
|
|
98
|
+
StorageListInputWithPrefix<ListPaginateWithPrefixOptions>;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* @deprecated Use {@link RemoveWithPathInput} instead.
|
|
@@ -115,23 +115,23 @@ export type RemoveWithPathInput = StorageRemoveInputWithPath<
|
|
|
115
115
|
* Input type for S3 downloadData API.
|
|
116
116
|
*/
|
|
117
117
|
export type DownloadDataInput =
|
|
118
|
-
StorageDownloadDataInputWithKey<
|
|
118
|
+
StorageDownloadDataInputWithKey<DownloadDataWithKeyOptions>;
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
121
|
* Input type with path for S3 downloadData API.
|
|
122
122
|
*/
|
|
123
123
|
export type DownloadDataWithPathInput =
|
|
124
|
-
StorageDownloadDataInputWithPath<
|
|
124
|
+
StorageDownloadDataInputWithPath<DownloadDataWithPathOptions>;
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
127
|
* @deprecated Use {@link UploadDataWithPathInput} instead.
|
|
128
128
|
* Input type for S3 uploadData API.
|
|
129
129
|
*/
|
|
130
130
|
export type UploadDataInput =
|
|
131
|
-
StorageUploadDataInputWithKey<
|
|
131
|
+
StorageUploadDataInputWithKey<UploadDataWithKeyOptions>;
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
134
|
* Input type with path for S3 uploadData API.
|
|
135
135
|
*/
|
|
136
136
|
export type UploadDataWithPathInput =
|
|
137
|
-
StorageUploadDataInputWithPath<
|
|
137
|
+
StorageUploadDataInputWithPath<UploadDataWithPathOptions>;
|
|
@@ -74,9 +74,9 @@ interface TransferOptions {
|
|
|
74
74
|
/**
|
|
75
75
|
* Input options type for S3 getProperties API.
|
|
76
76
|
*/
|
|
77
|
-
/** @deprecated Use {@link
|
|
78
|
-
export type
|
|
79
|
-
export type
|
|
77
|
+
/** @deprecated Use {@link GetPropertiesWithPathOptions} instead. */
|
|
78
|
+
export type GetPropertiesWithKeyOptions = ReadOptions & CommonOptions;
|
|
79
|
+
export type GetPropertiesWithPathOptions = CommonOptions;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Input options type for S3 getProperties API.
|
|
@@ -84,25 +84,25 @@ export type GetPropertiesOptionsWithPath = CommonOptions;
|
|
|
84
84
|
export type RemoveOptions = WriteOptions & CommonOptions;
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
|
-
* @deprecated Use {@link
|
|
87
|
+
* @deprecated Use {@link ListAllWithPathOptions} instead.
|
|
88
88
|
* Input options type with prefix for S3 list all API.
|
|
89
89
|
*/
|
|
90
|
-
export type
|
|
90
|
+
export type ListAllWithPrefixOptions = StorageListAllOptions &
|
|
91
91
|
ReadOptions &
|
|
92
92
|
CommonOptions;
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
|
-
* @deprecated Use {@link
|
|
95
|
+
* @deprecated Use {@link ListPaginateWithPathOptions} instead.
|
|
96
96
|
* Input options type with prefix for S3 list API to paginate items.
|
|
97
97
|
*/
|
|
98
|
-
export type
|
|
98
|
+
export type ListPaginateWithPrefixOptions = StorageListPaginateOptions &
|
|
99
99
|
ReadOptions &
|
|
100
100
|
CommonOptions;
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
103
|
* Input options type with path for S3 list all API.
|
|
104
104
|
*/
|
|
105
|
-
export type
|
|
105
|
+
export type ListAllWithPathOptions = Omit<
|
|
106
106
|
StorageListAllOptions,
|
|
107
107
|
'accessLevel'
|
|
108
108
|
> &
|
|
@@ -113,7 +113,7 @@ export type ListAllOptionsWithPath = Omit<
|
|
|
113
113
|
/**
|
|
114
114
|
* Input options type with path for S3 list API to paginate items.
|
|
115
115
|
*/
|
|
116
|
-
export type
|
|
116
|
+
export type ListPaginateWithPathOptions = Omit<
|
|
117
117
|
StorageListPaginateOptions,
|
|
118
118
|
'accessLevel'
|
|
119
119
|
> &
|
|
@@ -150,9 +150,9 @@ export type GetUrlOptions = CommonOptions & {
|
|
|
150
150
|
contentType?: string;
|
|
151
151
|
};
|
|
152
152
|
|
|
153
|
-
/** @deprecated Use {@link
|
|
154
|
-
export type
|
|
155
|
-
export type
|
|
153
|
+
/** @deprecated Use {@link GetUrlWithPathOptions} instead. */
|
|
154
|
+
export type GetUrlWithKeyOptions = ReadOptions & GetUrlOptions;
|
|
155
|
+
export type GetUrlWithPathOptions = GetUrlOptions;
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
158
|
* Input options type for S3 downloadData API.
|
|
@@ -161,9 +161,9 @@ export type DownloadDataOptions = CommonOptions &
|
|
|
161
161
|
TransferOptions &
|
|
162
162
|
BytesRangeOptions;
|
|
163
163
|
|
|
164
|
-
/** @deprecated Use {@link
|
|
165
|
-
export type
|
|
166
|
-
export type
|
|
164
|
+
/** @deprecated Use {@link DownloadDataWithPathOptions} instead. */
|
|
165
|
+
export type DownloadDataWithKeyOptions = ReadOptions & DownloadDataOptions;
|
|
166
|
+
export type DownloadDataWithPathOptions = DownloadDataOptions;
|
|
167
167
|
|
|
168
168
|
export type UploadDataOptions = CommonOptions &
|
|
169
169
|
TransferOptions & {
|
|
@@ -192,19 +192,19 @@ export type UploadDataOptions = CommonOptions &
|
|
|
192
192
|
metadata?: Record<string, string>;
|
|
193
193
|
};
|
|
194
194
|
|
|
195
|
-
/** @deprecated Use {@link
|
|
196
|
-
export type
|
|
197
|
-
export type
|
|
195
|
+
/** @deprecated Use {@link UploadDataWithPathOptions} instead. */
|
|
196
|
+
export type UploadDataWithKeyOptions = WriteOptions & UploadDataOptions;
|
|
197
|
+
export type UploadDataWithPathOptions = UploadDataOptions;
|
|
198
198
|
|
|
199
199
|
/** @deprecated This may be removed in the next major version. */
|
|
200
|
-
export type
|
|
200
|
+
export type CopySourceWithKeyOptions = ReadOptions & {
|
|
201
201
|
/** @deprecated This may be removed in the next major version. */
|
|
202
202
|
key: string;
|
|
203
203
|
bucket?: StorageBucket;
|
|
204
204
|
};
|
|
205
205
|
|
|
206
206
|
/** @deprecated This may be removed in the next major version. */
|
|
207
|
-
export type
|
|
207
|
+
export type CopyDestinationWithKeyOptions = WriteOptions & {
|
|
208
208
|
/** @deprecated This may be removed in the next major version. */
|
|
209
209
|
key: string;
|
|
210
210
|
bucket?: StorageBucket;
|
|
@@ -14,16 +14,8 @@ export const calculateContentMd5 = async (
|
|
|
14
14
|
content: Blob | string | ArrayBuffer | ArrayBufferView,
|
|
15
15
|
): Promise<string> => {
|
|
16
16
|
const hasher = new Md5();
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} else if (ArrayBuffer.isView(content) || content instanceof ArrayBuffer) {
|
|
20
|
-
const blob = new Blob([content]);
|
|
21
|
-
const buffer = await readFile(blob);
|
|
22
|
-
hasher.update(buffer);
|
|
23
|
-
} else {
|
|
24
|
-
const buffer = await readFile(content);
|
|
25
|
-
hasher.update(buffer);
|
|
26
|
-
}
|
|
17
|
+
const buffer = content instanceof Blob ? await readFile(content) : content;
|
|
18
|
+
hasher.update(buffer);
|
|
27
19
|
const digest = await hasher.digest();
|
|
28
20
|
|
|
29
21
|
return toBase64(digest);
|
|
@@ -9,16 +9,8 @@ export const calculateContentMd5 = async (
|
|
|
9
9
|
content: Blob | string | ArrayBuffer | ArrayBufferView,
|
|
10
10
|
): Promise<string> => {
|
|
11
11
|
const hasher = new Md5();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} else if (ArrayBuffer.isView(content) || content instanceof ArrayBuffer) {
|
|
15
|
-
const blob = new Blob([content]);
|
|
16
|
-
const buffer = await readFile(blob);
|
|
17
|
-
hasher.update(buffer);
|
|
18
|
-
} else {
|
|
19
|
-
const buffer = await readFile(content);
|
|
20
|
-
hasher.update(buffer);
|
|
21
|
-
}
|
|
12
|
+
const buffer = content instanceof Blob ? await readFile(content) : content;
|
|
13
|
+
hasher.update(buffer);
|
|
22
14
|
const digest = await hasher.digest();
|
|
23
15
|
|
|
24
16
|
return toBase64(digest);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.S3Exception = void 0;
|
|
7
|
-
(function (S3Exception) {
|
|
8
|
-
S3Exception["NotFoundException"] = "NotFoundException";
|
|
9
|
-
S3Exception["ForbiddenException"] = "ForbiddenException";
|
|
10
|
-
S3Exception["BadRequestException"] = "BadRequestException";
|
|
11
|
-
})(exports.S3Exception || (exports.S3Exception = {}));
|
|
12
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sources":["../../../../../src/providers/s3/types/errors.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.S3Exception = void 0;\nvar S3Exception;\n(function (S3Exception) {\n S3Exception[\"NotFoundException\"] = \"NotFoundException\";\n S3Exception[\"ForbiddenException\"] = \"ForbiddenException\";\n S3Exception[\"BadRequestException\"] = \"BadRequestException\";\n})(S3Exception = exports.S3Exception || (exports.S3Exception = {}));\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,WAAW,GAAG,KAAK,CAAC,CAAC;AAE7B,CAAC,UAAU,WAAW,EAAE;AACxB,IAAI,WAAW,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,CAAC;AAC3D,IAAI,WAAW,CAAC,oBAAoB,CAAC,GAAG,oBAAoB,CAAC;AAC7D,IAAI,WAAW,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAAC;AAC/D,CAAC,EAAgB,OAAO,CAAC,WAAW,KAAK,OAAO,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC;;"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
var S3Exception;
|
|
4
|
-
(function (S3Exception) {
|
|
5
|
-
S3Exception["NotFoundException"] = "NotFoundException";
|
|
6
|
-
S3Exception["ForbiddenException"] = "ForbiddenException";
|
|
7
|
-
S3Exception["BadRequestException"] = "BadRequestException";
|
|
8
|
-
})(S3Exception || (S3Exception = {}));
|
|
9
|
-
|
|
10
|
-
export { S3Exception };
|
|
11
|
-
//# sourceMappingURL=errors.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.mjs","sources":["../../../../../src/providers/s3/types/errors.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport var S3Exception;\n(function (S3Exception) {\n S3Exception[\"NotFoundException\"] = \"NotFoundException\";\n S3Exception[\"ForbiddenException\"] = \"ForbiddenException\";\n S3Exception[\"BadRequestException\"] = \"BadRequestException\";\n})(S3Exception || (S3Exception = {}));\n"],"names":[],"mappings":"AAAA;AACA;AACU,IAAC,YAAY;AACvB,CAAC,UAAU,WAAW,EAAE;AACxB,IAAI,WAAW,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,CAAC;AAC3D,IAAI,WAAW,CAAC,oBAAoB,CAAC,GAAG,oBAAoB,CAAC;AAC7D,IAAI,WAAW,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAAC;AAC/D,CAAC,EAAE,WAAW,KAAK,WAAW,GAAG,EAAE,CAAC,CAAC;;;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
export enum S3Exception {
|
|
5
|
-
NotFoundException = 'NotFoundException',
|
|
6
|
-
ForbiddenException = 'ForbiddenException',
|
|
7
|
-
BadRequestException = 'BadRequestException',
|
|
8
|
-
}
|