@aws-amplify/storage 6.8.4 → 6.8.5-local-stack.00864ae.0
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/errors/types/validation.js +1 -1
- package/dist/cjs/errors/types/validation.js.map +1 -1
- package/dist/cjs/errors/utils/assertValidationError.js +1 -2
- package/dist/cjs/errors/utils/assertValidationError.js.map +1 -1
- package/dist/cjs/internals/apis/list.js +1 -2
- package/dist/cjs/internals/apis/list.js.map +1 -1
- package/dist/cjs/providers/s3/apis/copy.js +1 -2
- package/dist/cjs/providers/s3/apis/copy.js.map +1 -1
- package/dist/cjs/providers/s3/apis/downloadData.js +1 -2
- package/dist/cjs/providers/s3/apis/downloadData.js.map +1 -1
- package/dist/cjs/providers/s3/apis/getProperties.js +1 -2
- package/dist/cjs/providers/s3/apis/getProperties.js.map +1 -1
- package/dist/cjs/providers/s3/apis/getUrl.js +1 -2
- package/dist/cjs/providers/s3/apis/getUrl.js.map +1 -1
- package/dist/cjs/providers/s3/apis/internal/copy.js +1 -1
- package/dist/cjs/providers/s3/apis/internal/copy.js.map +1 -1
- package/dist/cjs/providers/s3/apis/internal/uploadData/multipart/uploadCache.js +1 -1
- package/dist/cjs/providers/s3/apis/internal/uploadData/multipart/uploadCache.js.map +1 -1
- package/dist/cjs/providers/s3/apis/list.js +1 -2
- package/dist/cjs/providers/s3/apis/list.js.map +1 -1
- package/dist/cjs/providers/s3/apis/remove.js +1 -2
- package/dist/cjs/providers/s3/apis/remove.js.map +1 -1
- package/dist/cjs/providers/s3/apis/server/copy.js +1 -2
- package/dist/cjs/providers/s3/apis/server/copy.js.map +1 -1
- package/dist/cjs/providers/s3/apis/server/getProperties.js +1 -2
- package/dist/cjs/providers/s3/apis/server/getProperties.js.map +1 -1
- package/dist/cjs/providers/s3/apis/server/getUrl.js +1 -2
- package/dist/cjs/providers/s3/apis/server/getUrl.js.map +1 -1
- package/dist/cjs/providers/s3/apis/server/list.js +1 -2
- package/dist/cjs/providers/s3/apis/server/list.js.map +1 -1
- package/dist/cjs/providers/s3/apis/server/remove.js +1 -2
- package/dist/cjs/providers/s3/apis/server/remove.js.map +1 -1
- package/dist/cjs/providers/s3/apis/uploadData.js +1 -2
- package/dist/cjs/providers/s3/apis/uploadData.js.map +1 -1
- package/dist/cjs/providers/s3/utils/client/runtime/base64/index.browser.js +1 -2
- package/dist/cjs/providers/s3/utils/client/runtime/base64/index.browser.js.map +1 -1
- package/dist/cjs/providers/s3/utils/client/runtime/base64/index.native.js +1 -2
- package/dist/cjs/providers/s3/utils/client/runtime/base64/index.native.js.map +1 -1
- package/dist/cjs/providers/s3/utils/client/utils/serializeHelpers.js +2 -2
- package/dist/cjs/providers/s3/utils/client/utils/serializeHelpers.js.map +1 -1
- package/dist/cjs/providers/s3/utils/userAgent.js +1 -2
- package/dist/cjs/providers/s3/utils/userAgent.js.map +1 -1
- package/dist/cjs/providers/s3/utils/validateMultipartUploadXML.js +1 -2
- package/dist/cjs/providers/s3/utils/validateMultipartUploadXML.js.map +1 -1
- package/dist/cjs/providers/s3/utils/validateObjectUrl.js +1 -2
- package/dist/cjs/providers/s3/utils/validateObjectUrl.js.map +1 -1
- package/dist/esm/internals/apis/copy.d.ts +2 -1
- package/dist/esm/internals/apis/getUrl.d.ts +2 -1
- package/dist/esm/internals/apis/listPaths/resolveLocationsForCurrentSession.d.ts +2 -2
- package/dist/esm/internals/apis/uploadData.d.ts +2 -1
- package/dist/esm/providers/s3/apis/internal/copy.mjs +1 -1
- package/dist/esm/providers/s3/apis/internal/copy.mjs.map +1 -1
- package/dist/esm/providers/s3/apis/internal/downloadData.d.ts +1 -1
- package/dist/esm/providers/s3/apis/internal/uploadData/multipart/uploadCache.d.ts +2 -2
- package/dist/esm/providers/s3/apis/internal/uploadData/multipart/uploadCache.mjs +1 -1
- package/dist/esm/providers/s3/apis/internal/uploadData/multipart/uploadCache.mjs.map +1 -1
- package/dist/esm/providers/s3/utils/client/s3control/getDataAccess.d.ts +2 -2
- package/dist/esm/providers/s3/utils/client/s3control/listCallerAccessGrants.d.ts +2 -2
- package/dist/esm/providers/s3/utils/client/s3data/abortMultipartUpload.d.ts +4 -4
- package/dist/esm/providers/s3/utils/client/s3data/completeMultipartUpload.d.ts +4 -4
- package/dist/esm/providers/s3/utils/client/s3data/copyObject.d.ts +4 -4
- package/dist/esm/providers/s3/utils/client/s3data/createMultipartUpload.d.ts +4 -4
- package/dist/esm/providers/s3/utils/client/s3data/deleteObject.d.ts +4 -4
- package/dist/esm/providers/s3/utils/client/s3data/getObject.d.ts +4 -4
- package/dist/esm/providers/s3/utils/client/s3data/headObject.d.ts +4 -4
- package/dist/esm/providers/s3/utils/client/s3data/listObjectsV2.d.ts +4 -4
- package/dist/esm/providers/s3/utils/client/s3data/listParts.d.ts +4 -4
- package/dist/esm/providers/s3/utils/client/s3data/putObject.d.ts +4 -4
- package/dist/esm/providers/s3/utils/client/s3data/uploadPart.d.ts +4 -4
- package/dist/esm/providers/s3/utils/client/utils/deserializeHelpers.d.ts +1 -1
- package/dist/esm/providers/s3/utils/client/utils/integrityHelpers.d.ts +2 -2
- package/dist/esm/providers/s3/utils/client/utils/parsePayload.d.ts +1 -1
- package/dist/esm/providers/s3/utils/hexUtils.d.ts +2 -2
- package/package.json +117 -118
|
@@ -30,7 +30,7 @@ var StorageValidationErrorCode;
|
|
|
30
30
|
StorageValidationErrorCode["InvalidCustomEndpoint"] = "InvalidCustomEndpoint";
|
|
31
31
|
StorageValidationErrorCode["ForcePathStyleEndpointNotSupported"] = "ForcePathStyleEndpointNotSupported";
|
|
32
32
|
StorageValidationErrorCode["DnsIncompatibleBucketName"] = "DnsIncompatibleBucketName";
|
|
33
|
-
})(StorageValidationErrorCode
|
|
33
|
+
})(StorageValidationErrorCode || (exports.StorageValidationErrorCode = StorageValidationErrorCode = {}));
|
|
34
34
|
exports.validationErrorMap = {
|
|
35
35
|
[StorageValidationErrorCode.NoCredentials]: {
|
|
36
36
|
message: 'Credentials should not be empty.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sources":["../../../../src/errors/types/validation.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.validationErrorMap = exports.StorageValidationErrorCode = void 0;\nvar StorageValidationErrorCode;\n(function (StorageValidationErrorCode) {\n StorageValidationErrorCode[\"NoCredentials\"] = \"NoCredentials\";\n StorageValidationErrorCode[\"NoIdentityId\"] = \"NoIdentityId\";\n StorageValidationErrorCode[\"NoKey\"] = \"NoKey\";\n StorageValidationErrorCode[\"NoSourceKey\"] = \"NoSourceKey\";\n StorageValidationErrorCode[\"NoDestinationKey\"] = \"NoDestinationKey\";\n StorageValidationErrorCode[\"NoSourcePath\"] = \"NoSourcePath\";\n StorageValidationErrorCode[\"NoDestinationPath\"] = \"NoDestinationPath\";\n StorageValidationErrorCode[\"NoBucket\"] = \"NoBucket\";\n StorageValidationErrorCode[\"NoRegion\"] = \"NoRegion\";\n StorageValidationErrorCode[\"InvalidStorageBucket\"] = \"InvalidStorageBucket\";\n StorageValidationErrorCode[\"InvalidCopyOperationStorageBucket\"] = \"InvalidCopyOperationStorageBucket\";\n StorageValidationErrorCode[\"InvalidStorageOperationPrefixInput\"] = \"InvalidStorageOperationPrefixInput\";\n StorageValidationErrorCode[\"InvalidStorageOperationInput\"] = \"InvalidStorageOperationInput\";\n StorageValidationErrorCode[\"InvalidAWSAccountID\"] = \"InvalidAWSAccountID\";\n StorageValidationErrorCode[\"InvalidStoragePathInput\"] = \"InvalidStoragePathInput\";\n StorageValidationErrorCode[\"InvalidUploadSource\"] = \"InvalidUploadSource\";\n StorageValidationErrorCode[\"ObjectIsTooLarge\"] = \"ObjectIsTooLarge\";\n StorageValidationErrorCode[\"UrlExpirationMaxLimitExceed\"] = \"UrlExpirationMaxLimitExceed\";\n StorageValidationErrorCode[\"InvalidLocationCredentialsCacheSize\"] = \"InvalidLocationCredentialsCacheSize\";\n StorageValidationErrorCode[\"LocationCredentialsStoreDestroyed\"] = \"LocationCredentialsStoreDestroyed\";\n StorageValidationErrorCode[\"InvalidS3Uri\"] = \"InvalidS3Uri\";\n StorageValidationErrorCode[\"InvalidCustomEndpoint\"] = \"InvalidCustomEndpoint\";\n StorageValidationErrorCode[\"ForcePathStyleEndpointNotSupported\"] = \"ForcePathStyleEndpointNotSupported\";\n StorageValidationErrorCode[\"DnsIncompatibleBucketName\"] = \"DnsIncompatibleBucketName\";\n})(StorageValidationErrorCode
|
|
1
|
+
{"version":3,"file":"validation.js","sources":["../../../../src/errors/types/validation.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.validationErrorMap = exports.StorageValidationErrorCode = void 0;\nvar StorageValidationErrorCode;\n(function (StorageValidationErrorCode) {\n StorageValidationErrorCode[\"NoCredentials\"] = \"NoCredentials\";\n StorageValidationErrorCode[\"NoIdentityId\"] = \"NoIdentityId\";\n StorageValidationErrorCode[\"NoKey\"] = \"NoKey\";\n StorageValidationErrorCode[\"NoSourceKey\"] = \"NoSourceKey\";\n StorageValidationErrorCode[\"NoDestinationKey\"] = \"NoDestinationKey\";\n StorageValidationErrorCode[\"NoSourcePath\"] = \"NoSourcePath\";\n StorageValidationErrorCode[\"NoDestinationPath\"] = \"NoDestinationPath\";\n StorageValidationErrorCode[\"NoBucket\"] = \"NoBucket\";\n StorageValidationErrorCode[\"NoRegion\"] = \"NoRegion\";\n StorageValidationErrorCode[\"InvalidStorageBucket\"] = \"InvalidStorageBucket\";\n StorageValidationErrorCode[\"InvalidCopyOperationStorageBucket\"] = \"InvalidCopyOperationStorageBucket\";\n StorageValidationErrorCode[\"InvalidStorageOperationPrefixInput\"] = \"InvalidStorageOperationPrefixInput\";\n StorageValidationErrorCode[\"InvalidStorageOperationInput\"] = \"InvalidStorageOperationInput\";\n StorageValidationErrorCode[\"InvalidAWSAccountID\"] = \"InvalidAWSAccountID\";\n StorageValidationErrorCode[\"InvalidStoragePathInput\"] = \"InvalidStoragePathInput\";\n StorageValidationErrorCode[\"InvalidUploadSource\"] = \"InvalidUploadSource\";\n StorageValidationErrorCode[\"ObjectIsTooLarge\"] = \"ObjectIsTooLarge\";\n StorageValidationErrorCode[\"UrlExpirationMaxLimitExceed\"] = \"UrlExpirationMaxLimitExceed\";\n StorageValidationErrorCode[\"InvalidLocationCredentialsCacheSize\"] = \"InvalidLocationCredentialsCacheSize\";\n StorageValidationErrorCode[\"LocationCredentialsStoreDestroyed\"] = \"LocationCredentialsStoreDestroyed\";\n StorageValidationErrorCode[\"InvalidS3Uri\"] = \"InvalidS3Uri\";\n StorageValidationErrorCode[\"InvalidCustomEndpoint\"] = \"InvalidCustomEndpoint\";\n StorageValidationErrorCode[\"ForcePathStyleEndpointNotSupported\"] = \"ForcePathStyleEndpointNotSupported\";\n StorageValidationErrorCode[\"DnsIncompatibleBucketName\"] = \"DnsIncompatibleBucketName\";\n})(StorageValidationErrorCode || (exports.StorageValidationErrorCode = StorageValidationErrorCode = {}));\nexports.validationErrorMap = {\n [StorageValidationErrorCode.NoCredentials]: {\n message: 'Credentials should not be empty.',\n },\n [StorageValidationErrorCode.NoIdentityId]: {\n message: 'Missing identity ID when accessing objects in protected or private access level.',\n },\n [StorageValidationErrorCode.NoKey]: {\n message: 'Missing key in api call.',\n },\n [StorageValidationErrorCode.NoSourceKey]: {\n message: 'Missing source key in copy api call.',\n },\n [StorageValidationErrorCode.NoDestinationKey]: {\n message: 'Missing destination key in copy api call.',\n },\n [StorageValidationErrorCode.NoSourcePath]: {\n message: 'Missing source path in copy api call.',\n },\n [StorageValidationErrorCode.NoDestinationPath]: {\n message: 'Missing destination path in copy api call.',\n },\n [StorageValidationErrorCode.NoBucket]: {\n message: 'Missing bucket name while accessing object.',\n },\n [StorageValidationErrorCode.NoRegion]: {\n message: 'Missing region while accessing object.',\n },\n [StorageValidationErrorCode.UrlExpirationMaxLimitExceed]: {\n message: 'Url Expiration can not be greater than 7 Days.',\n },\n [StorageValidationErrorCode.ObjectIsTooLarge]: {\n message: 'Object size cannot not be greater than 5TB.',\n },\n [StorageValidationErrorCode.InvalidUploadSource]: {\n message: 'Upload source type can only be a `Blob`, `File`, `ArrayBuffer`, or `string`.',\n },\n [StorageValidationErrorCode.InvalidStorageOperationInput]: {\n message: 'Path or key parameter must be specified in the input. Both can not be specified at the same time.',\n },\n [StorageValidationErrorCode.InvalidAWSAccountID]: {\n message: 'Invalid AWS account ID was provided.',\n },\n [StorageValidationErrorCode.InvalidStorageOperationPrefixInput]: {\n message: 'Both path and prefix can not be specified at the same time.',\n },\n [StorageValidationErrorCode.InvalidStoragePathInput]: {\n message: 'Input `path` does not allow a leading slash (/).',\n },\n [StorageValidationErrorCode.InvalidLocationCredentialsCacheSize]: {\n message: 'locationCredentialsCacheSize must be a positive integer.',\n },\n [StorageValidationErrorCode.LocationCredentialsStoreDestroyed]: {\n message: `Location-specific credentials store has been destroyed.`,\n },\n [StorageValidationErrorCode.InvalidS3Uri]: {\n message: 'Invalid S3 URI.',\n },\n [StorageValidationErrorCode.InvalidStorageBucket]: {\n message: 'Unable to lookup bucket from provided name in Amplify configuration.',\n },\n [StorageValidationErrorCode.InvalidCopyOperationStorageBucket]: {\n message: 'Missing bucket option in either source or destination.',\n },\n [StorageValidationErrorCode.InvalidCustomEndpoint]: {\n message: 'Invalid S3 custom endpoint.',\n },\n [StorageValidationErrorCode.ForcePathStyleEndpointNotSupported]: {\n message: 'Path style URLs are not supported with S3 Transfer Acceleration.',\n },\n [StorageValidationErrorCode.DnsIncompatibleBucketName]: {\n message: `The bucket name isn't DNS compatible.`,\n },\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,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AAC,0BAA0B,CAAC,yBAAyB,GAAG;AAC5D,QAAQ,OAAO,EAAE,CAAC,qCAAqC,CAAC;AACxD,KAAK;AACL,CAAC;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
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.assertValidationError =
|
|
6
|
+
exports.assertValidationError = assertValidationError;
|
|
7
7
|
const validation_1 = require("../types/validation");
|
|
8
8
|
const StorageError_1 = require("../StorageError");
|
|
9
9
|
function assertValidationError(assertion, name) {
|
|
@@ -12,5 +12,4 @@ function assertValidationError(assertion, name) {
|
|
|
12
12
|
throw new StorageError_1.StorageError({ name, message, recoverySuggestion });
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
exports.assertValidationError = assertValidationError;
|
|
16
15
|
//# sourceMappingURL=assertValidationError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertValidationError.js","sources":["../../../../src/errors/utils/assertValidationError.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.assertValidationError =
|
|
1
|
+
{"version":3,"file":"assertValidationError.js","sources":["../../../../src/errors/utils/assertValidationError.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.assertValidationError = assertValidationError;\nconst validation_1 = require(\"../types/validation\");\nconst StorageError_1 = require(\"../StorageError\");\nfunction assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = validation_1.validationErrorMap[name];\n if (!assertion) {\n throw new StorageError_1.StorageError({ name, message, recoverySuggestion });\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;AACrD,MAAM,YAAY,GAAG,OAAO,CAAC,qBAAqB,CAAC;AACnD,MAAM,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC;AACjD,SAAS,qBAAqB,CAAC,SAAS,EAAE,IAAI,EAAE;AAChD,IAAI,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC;AACjF,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,MAAM,IAAI,cAAc,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AACpF;AACA;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
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.list =
|
|
6
|
+
exports.list = list;
|
|
7
7
|
const core_1 = require("@aws-amplify/core");
|
|
8
8
|
const list_1 = require("../../providers/s3/apis/internal/list");
|
|
9
9
|
/**
|
|
@@ -29,5 +29,4 @@ function list(input) {
|
|
|
29
29
|
// given in input can only be Gen2 signature, the return can only ben Gen2 signature.
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
exports.list = list;
|
|
33
32
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sources":["../../../../src/internals/apis/list.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.list =
|
|
1
|
+
{"version":3,"file":"list.js","sources":["../../../../src/internals/apis/list.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.list = list;\nconst core_1 = require(\"@aws-amplify/core\");\nconst list_1 = require(\"../../providers/s3/apis/internal/list\");\n/**\n * @internal\n */\nfunction list(input) {\n return (0, list_1.list)(core_1.Amplify, {\n path: input.path,\n options: {\n bucket: input.options?.bucket,\n subpathStrategy: input.options?.subpathStrategy,\n useAccelerateEndpoint: input.options?.useAccelerateEndpoint,\n listAll: input.options?.listAll,\n expectedBucketOwner: input.options?.expectedBucketOwner,\n // Pagination options\n nextToken: input.options?.nextToken,\n pageSize: input.options?.pageSize,\n // Advanced options\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n customEndpoint: input?.options?.customEndpoint,\n },\n // Type casting is necessary because `listInternal` supports both Gen1 and Gen2 signatures, but here\n // given in input can only be Gen2 signature, the return can only ben Gen2 signature.\n });\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,IAAI,GAAG,IAAI;AACnB,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,MAAM,GAAG,OAAO,CAAC,uCAAuC,CAAC;AAC/D;AACA;AACA;AACA,SAAS,IAAI,CAAC,KAAK,EAAE;AACrB,IAAI,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE;AAC5C,QAAQ,IAAI,EAAE,KAAK,CAAC,IAAI;AACxB,QAAQ,OAAO,EAAE;AACjB,YAAY,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,MAAM;AACzC,YAAY,eAAe,EAAE,KAAK,CAAC,OAAO,EAAE,eAAe;AAC3D,YAAY,qBAAqB,EAAE,KAAK,CAAC,OAAO,EAAE,qBAAqB;AACvE,YAAY,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO;AAC3C,YAAY,mBAAmB,EAAE,KAAK,CAAC,OAAO,EAAE,mBAAmB;AACnE;AACA,YAAY,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS;AAC/C,YAAY,QAAQ,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ;AAC7C;AACA,YAAY,2BAA2B,EAAE,KAAK,CAAC,OAAO,EAAE,2BAA2B;AACnF,YAAY,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc;AAC1D,SAAS;AACT;AACA;AACA,KAAK,CAAC;AACN;;"}
|
|
@@ -3,11 +3,10 @@
|
|
|
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.copy =
|
|
6
|
+
exports.copy = copy;
|
|
7
7
|
const core_1 = require("@aws-amplify/core");
|
|
8
8
|
const copy_1 = require("./internal/copy");
|
|
9
9
|
function copy(input) {
|
|
10
10
|
return (0, copy_1.copy)(core_1.Amplify, input);
|
|
11
11
|
}
|
|
12
|
-
exports.copy = copy;
|
|
13
12
|
//# sourceMappingURL=copy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy.js","sources":["../../../../../src/providers/s3/apis/copy.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.copy =
|
|
1
|
+
{"version":3,"file":"copy.js","sources":["../../../../../src/providers/s3/apis/copy.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.copy = copy;\nconst core_1 = require(\"@aws-amplify/core\");\nconst copy_1 = require(\"./internal/copy\");\nfunction copy(input) {\n return (0, copy_1.copy)(core_1.Amplify, input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,IAAI,GAAG,IAAI;AACnB,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;AACzC,SAAS,IAAI,CAAC,KAAK,EAAE;AACrB,IAAI,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC;AAClD;;"}
|
|
@@ -3,10 +3,9 @@
|
|
|
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.downloadData =
|
|
6
|
+
exports.downloadData = downloadData;
|
|
7
7
|
const downloadData_1 = require("./internal/downloadData");
|
|
8
8
|
function downloadData(input) {
|
|
9
9
|
return (0, downloadData_1.downloadData)(input);
|
|
10
10
|
}
|
|
11
|
-
exports.downloadData = downloadData;
|
|
12
11
|
//# sourceMappingURL=downloadData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"downloadData.js","sources":["../../../../../src/providers/s3/apis/downloadData.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.downloadData =
|
|
1
|
+
{"version":3,"file":"downloadData.js","sources":["../../../../../src/providers/s3/apis/downloadData.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.downloadData = downloadData;\nconst downloadData_1 = require(\"./internal/downloadData\");\nfunction downloadData(input) {\n return (0, downloadData_1.downloadData)(input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,YAAY;AACnC,MAAM,cAAc,GAAG,OAAO,CAAC,yBAAyB,CAAC;AACzD,SAAS,YAAY,CAAC,KAAK,EAAE;AAC7B,IAAI,OAAO,IAAI,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC;AAClD;;"}
|
|
@@ -3,11 +3,10 @@
|
|
|
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.getProperties =
|
|
6
|
+
exports.getProperties = getProperties;
|
|
7
7
|
const core_1 = require("@aws-amplify/core");
|
|
8
8
|
const getProperties_1 = require("./internal/getProperties");
|
|
9
9
|
function getProperties(input) {
|
|
10
10
|
return (0, getProperties_1.getProperties)(core_1.Amplify, input);
|
|
11
11
|
}
|
|
12
|
-
exports.getProperties = getProperties;
|
|
13
12
|
//# sourceMappingURL=getProperties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProperties.js","sources":["../../../../../src/providers/s3/apis/getProperties.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.getProperties =
|
|
1
|
+
{"version":3,"file":"getProperties.js","sources":["../../../../../src/providers/s3/apis/getProperties.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.getProperties = getProperties;\nconst core_1 = require(\"@aws-amplify/core\");\nconst getProperties_1 = require(\"./internal/getProperties\");\nfunction getProperties(input) {\n return (0, getProperties_1.getProperties)(core_1.Amplify, input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,eAAe,GAAG,OAAO,CAAC,0BAA0B,CAAC;AAC3D,SAAS,aAAa,CAAC,KAAK,EAAE;AAC9B,IAAI,OAAO,IAAI,eAAe,CAAC,aAAa,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC;AACpE;;"}
|
|
@@ -3,11 +3,10 @@
|
|
|
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.getUrl =
|
|
6
|
+
exports.getUrl = getUrl;
|
|
7
7
|
const core_1 = require("@aws-amplify/core");
|
|
8
8
|
const getUrl_1 = require("./internal/getUrl");
|
|
9
9
|
function getUrl(input) {
|
|
10
10
|
return (0, getUrl_1.getUrl)(core_1.Amplify, input);
|
|
11
11
|
}
|
|
12
|
-
exports.getUrl = getUrl;
|
|
13
12
|
//# sourceMappingURL=getUrl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUrl.js","sources":["../../../../../src/providers/s3/apis/getUrl.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.getUrl =
|
|
1
|
+
{"version":3,"file":"getUrl.js","sources":["../../../../../src/providers/s3/apis/getUrl.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.getUrl = getUrl;\nconst core_1 = require(\"@aws-amplify/core\");\nconst getUrl_1 = require(\"./internal/getUrl\");\nfunction getUrl(input) {\n return (0, getUrl_1.getUrl)(core_1.Amplify, input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,MAAM,GAAG,MAAM;AACvB,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC7C,SAAS,MAAM,CAAC,KAAK,EAAE;AACvB,IAAI,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC;AACtD;;"}
|
|
@@ -124,7 +124,7 @@ const serviceCopy = async ({ source, destination, bucket, s3Config, notModifiedS
|
|
|
124
124
|
Bucket: bucket,
|
|
125
125
|
CopySource: source,
|
|
126
126
|
Key: destination,
|
|
127
|
-
MetadataDirective: 'COPY',
|
|
127
|
+
MetadataDirective: 'COPY', // Copies over metadata like contentType as well
|
|
128
128
|
CopySourceIfMatch: eTag,
|
|
129
129
|
CopySourceIfUnmodifiedSince: notModifiedSince,
|
|
130
130
|
ExpectedSourceBucketOwner: expectedSourceBucketOwner,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy.js","sources":["../../../../../../src/providers/s3/apis/internal/copy.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.copyWithKey = exports.copy = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst utils_2 = require(\"../../utils\");\nconst validation_1 = require(\"../../../../errors/types/validation\");\nconst assertValidationError_1 = require(\"../../../../errors/utils/assertValidationError\");\nconst s3data_1 = require(\"../../utils/client/s3data\");\nconst userAgent_1 = require(\"../../utils/userAgent\");\nconst utils_3 = require(\"../../../../utils\");\nconst isCopyInputWithPath = (input) => (0, utils_2.isInputWithPath)(input.source);\nconst storageBucketAssertion = (sourceBucket, destBucket) => {\n /** For multi-bucket, both source and destination bucket needs to be passed in\n * or both can be undefined and we fallback to singleton's default value\n */\n (0, assertValidationError_1.assertValidationError)(\n // Both src & dest bucket option is present is acceptable\n (sourceBucket !== undefined && destBucket !== undefined) ||\n // or both are undefined is also acceptable\n (!destBucket && !sourceBucket), validation_1.StorageValidationErrorCode.InvalidCopyOperationStorageBucket);\n};\nconst copy = async (amplify, input) => {\n return isCopyInputWithPath(input)\n ? copyWithPath(amplify, input)\n : (0, exports.copyWithKey)(amplify, input);\n};\nexports.copy = copy;\nconst copyWithPath = async (amplify, input) => {\n const { source, destination } = input;\n storageBucketAssertion(source.bucket, destination.bucket);\n const { bucket: sourceBucket } = await (0, utils_2.resolveS3ConfigAndInput)(amplify, {\n path: input.source.path,\n options: {\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n ...input.source,\n },\n });\n // The bucket, region, credentials of s3 client are resolved from destination.\n // Whereas the source bucket and path are a input parameter of S3 copy operation.\n const { s3Config, bucket: destBucket, identityId, } = await (0, utils_2.resolveS3ConfigAndInput)(amplify, {\n path: input.destination.path,\n options: {\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n customEndpoint: input.options?.customEndpoint,\n ...input.destination,\n },\n }); // resolveS3ConfigAndInput does not make extra API calls or storage access if called repeatedly.\n (0, assertValidationError_1.assertValidationError)(!!source.path, validation_1.StorageValidationErrorCode.NoSourcePath);\n (0, assertValidationError_1.assertValidationError)(!!destination.path, validation_1.StorageValidationErrorCode.NoDestinationPath);\n const { objectKey: sourcePath } = (0, utils_2.validateStorageOperationInput)(source, identityId);\n const { objectKey: destinationPath } = (0, utils_2.validateStorageOperationInput)(destination, identityId);\n (0, utils_2.validateBucketOwnerID)(source.expectedBucketOwner);\n (0, utils_2.validateBucketOwnerID)(destination.expectedBucketOwner);\n const finalCopySource = `${sourceBucket}/${sourcePath}`;\n const finalCopyDestination = destinationPath;\n utils_3.logger.debug(`copying \"${finalCopySource}\" to \"${finalCopyDestination}\".`);\n await serviceCopy({\n source: finalCopySource,\n destination: finalCopyDestination,\n bucket: destBucket,\n s3Config,\n notModifiedSince: input.source.notModifiedSince,\n eTag: input.source.eTag,\n expectedSourceBucketOwner: input.source?.expectedBucketOwner,\n expectedBucketOwner: input.destination?.expectedBucketOwner,\n });\n return { path: finalCopyDestination };\n};\n/** @deprecated Use {@link copyWithPath} instead. */\nconst copyWithKey = async (amplify, input) => {\n const { source, destination } = input;\n storageBucketAssertion(source.bucket, destination.bucket);\n (0, assertValidationError_1.assertValidationError)(!!source.key, validation_1.StorageValidationErrorCode.NoSourceKey);\n (0, assertValidationError_1.assertValidationError)(!!destination.key, validation_1.StorageValidationErrorCode.NoDestinationKey);\n (0, utils_2.validateBucketOwnerID)(source.expectedBucketOwner);\n (0, utils_2.validateBucketOwnerID)(destination.expectedBucketOwner);\n const { bucket: sourceBucket, keyPrefix: sourceKeyPrefix } = await (0, utils_2.resolveS3ConfigAndInput)(amplify, {\n ...input,\n options: {\n // @ts-expect-error: 'options' does not exist on type 'CopyInput'. In case of JS users set the location\n // credentials provider option, resolveS3ConfigAndInput will throw validation error.\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n ...input.source,\n },\n });\n // The bucket, region, credentials of s3 client are resolved from destination.\n // Whereas the source bucket and path are a input parameter of S3 copy operation.\n const { s3Config, bucket: destBucket, keyPrefix: destinationKeyPrefix, } = await (0, utils_2.resolveS3ConfigAndInput)(amplify, {\n ...input,\n options: {\n // @ts-expect-error: 'options' does not exist on type 'CopyInput'. In case of JS users set the location\n // credentials provider option, resolveS3ConfigAndInput will throw validation error.\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n ...input.destination,\n },\n }); // resolveS3ConfigAndInput does not make extra API calls or storage access if called repeatedly.\n // TODO(ashwinkumar6) V6-logger: warn `You may copy files from another user if the source level is \"protected\", currently it's ${srcLevel}`\n const finalCopySource = `${sourceBucket}/${sourceKeyPrefix}${source.key}`;\n const finalCopyDestination = `${destinationKeyPrefix}${destination.key}`;\n utils_3.logger.debug(`copying \"${finalCopySource}\" to \"${finalCopyDestination}\".`);\n await serviceCopy({\n source: finalCopySource,\n destination: finalCopyDestination,\n bucket: destBucket,\n s3Config,\n notModifiedSince: input.source.notModifiedSince,\n eTag: input.source.eTag,\n expectedSourceBucketOwner: input.source?.expectedBucketOwner,\n expectedBucketOwner: input.destination?.expectedBucketOwner,\n });\n return {\n key: destination.key,\n };\n};\nexports.copyWithKey = copyWithKey;\nconst serviceCopy = async ({ source, destination, bucket, s3Config, notModifiedSince, eTag, expectedSourceBucketOwner, expectedBucketOwner, }) => {\n await (0, s3data_1.copyObject)({\n ...s3Config,\n userAgentValue: (0, userAgent_1.getStorageUserAgentValue)(utils_1.StorageAction.Copy),\n }, {\n Bucket: bucket,\n CopySource: source,\n Key: destination,\n MetadataDirective: 'COPY',\n CopySourceIfMatch: eTag,\n CopySourceIfUnmodifiedSince: notModifiedSince,\n ExpectedSourceBucketOwner: expectedSourceBucketOwner,\n ExpectedBucketOwner: expectedBucketOwner,\n });\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAm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,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB;AACvD,QAAQ,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;AAC/B,QAAQ,yBAAyB,EAAE,KAAK,CAAC,MAAM,EAAE,mBAAmB;AACpE,QAAQ,mBAAmB,EAAE,KAAK,CAAC,WAAW,EAAE,mBAAmB;AACnE,KAAK,CAAC;AACN,IAAI,OAAO;AACX,QAAQ,GAAG,EAAE,WAAW,CAAC,GAAG;AAC5B,KAAK;AACL,CAAC;AACD,OAAO,CAAC,WAAW,GAAG,WAAW;AACjC,MAAM,WAAW,GAAG,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,yBAAyB,EAAE,mBAAmB,GAAG,KAAK;AAClJ,IAAI,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE;AACnC,QAAQ,GAAG,QAAQ;AACnB,QAAQ,cAAc,EAAE,IAAI,WAAW,CAAC,wBAAwB,EAAE,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC;AAC7F,KAAK,EAAE;AACP,QAAQ,MAAM,EAAE,MAAM;AACtB,QAAQ,UAAU,EAAE,MAAM;AAC1B,QAAQ,GAAG,EAAE,WAAW;AACxB,QAAQ,iBAAiB,EAAE,MAAM;AACjC,QAAQ,iBAAiB,EAAE,IAAI;AAC/B,QAAQ,2BAA2B,EAAE,gBAAgB;AACrD,QAAQ,yBAAyB,EAAE,yBAAyB;AAC5D,QAAQ,mBAAmB,EAAE,mBAAmB;AAChD,KAAK,CAAC;AACN,CAAC;;"}
|
|
1
|
+
{"version":3,"file":"copy.js","sources":["../../../../../../src/providers/s3/apis/internal/copy.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.copyWithKey = exports.copy = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst utils_2 = require(\"../../utils\");\nconst validation_1 = require(\"../../../../errors/types/validation\");\nconst assertValidationError_1 = require(\"../../../../errors/utils/assertValidationError\");\nconst s3data_1 = require(\"../../utils/client/s3data\");\nconst userAgent_1 = require(\"../../utils/userAgent\");\nconst utils_3 = require(\"../../../../utils\");\nconst isCopyInputWithPath = (input) => (0, utils_2.isInputWithPath)(input.source);\nconst storageBucketAssertion = (sourceBucket, destBucket) => {\n /** For multi-bucket, both source and destination bucket needs to be passed in\n * or both can be undefined and we fallback to singleton's default value\n */\n (0, assertValidationError_1.assertValidationError)(\n // Both src & dest bucket option is present is acceptable\n (sourceBucket !== undefined && destBucket !== undefined) ||\n // or both are undefined is also acceptable\n (!destBucket && !sourceBucket), validation_1.StorageValidationErrorCode.InvalidCopyOperationStorageBucket);\n};\nconst copy = async (amplify, input) => {\n return isCopyInputWithPath(input)\n ? copyWithPath(amplify, input)\n : (0, exports.copyWithKey)(amplify, input);\n};\nexports.copy = copy;\nconst copyWithPath = async (amplify, input) => {\n const { source, destination } = input;\n storageBucketAssertion(source.bucket, destination.bucket);\n const { bucket: sourceBucket } = await (0, utils_2.resolveS3ConfigAndInput)(amplify, {\n path: input.source.path,\n options: {\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n ...input.source,\n },\n });\n // The bucket, region, credentials of s3 client are resolved from destination.\n // Whereas the source bucket and path are a input parameter of S3 copy operation.\n const { s3Config, bucket: destBucket, identityId, } = await (0, utils_2.resolveS3ConfigAndInput)(amplify, {\n path: input.destination.path,\n options: {\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n customEndpoint: input.options?.customEndpoint,\n ...input.destination,\n },\n }); // resolveS3ConfigAndInput does not make extra API calls or storage access if called repeatedly.\n (0, assertValidationError_1.assertValidationError)(!!source.path, validation_1.StorageValidationErrorCode.NoSourcePath);\n (0, assertValidationError_1.assertValidationError)(!!destination.path, validation_1.StorageValidationErrorCode.NoDestinationPath);\n const { objectKey: sourcePath } = (0, utils_2.validateStorageOperationInput)(source, identityId);\n const { objectKey: destinationPath } = (0, utils_2.validateStorageOperationInput)(destination, identityId);\n (0, utils_2.validateBucketOwnerID)(source.expectedBucketOwner);\n (0, utils_2.validateBucketOwnerID)(destination.expectedBucketOwner);\n const finalCopySource = `${sourceBucket}/${sourcePath}`;\n const finalCopyDestination = destinationPath;\n utils_3.logger.debug(`copying \"${finalCopySource}\" to \"${finalCopyDestination}\".`);\n await serviceCopy({\n source: finalCopySource,\n destination: finalCopyDestination,\n bucket: destBucket,\n s3Config,\n notModifiedSince: input.source.notModifiedSince,\n eTag: input.source.eTag,\n expectedSourceBucketOwner: input.source?.expectedBucketOwner,\n expectedBucketOwner: input.destination?.expectedBucketOwner,\n });\n return { path: finalCopyDestination };\n};\n/** @deprecated Use {@link copyWithPath} instead. */\nconst copyWithKey = async (amplify, input) => {\n const { source, destination } = input;\n storageBucketAssertion(source.bucket, destination.bucket);\n (0, assertValidationError_1.assertValidationError)(!!source.key, validation_1.StorageValidationErrorCode.NoSourceKey);\n (0, assertValidationError_1.assertValidationError)(!!destination.key, validation_1.StorageValidationErrorCode.NoDestinationKey);\n (0, utils_2.validateBucketOwnerID)(source.expectedBucketOwner);\n (0, utils_2.validateBucketOwnerID)(destination.expectedBucketOwner);\n const { bucket: sourceBucket, keyPrefix: sourceKeyPrefix } = await (0, utils_2.resolveS3ConfigAndInput)(amplify, {\n ...input,\n options: {\n // @ts-expect-error: 'options' does not exist on type 'CopyInput'. In case of JS users set the location\n // credentials provider option, resolveS3ConfigAndInput will throw validation error.\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n ...input.source,\n },\n });\n // The bucket, region, credentials of s3 client are resolved from destination.\n // Whereas the source bucket and path are a input parameter of S3 copy operation.\n const { s3Config, bucket: destBucket, keyPrefix: destinationKeyPrefix, } = await (0, utils_2.resolveS3ConfigAndInput)(amplify, {\n ...input,\n options: {\n // @ts-expect-error: 'options' does not exist on type 'CopyInput'. In case of JS users set the location\n // credentials provider option, resolveS3ConfigAndInput will throw validation error.\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n ...input.destination,\n },\n }); // resolveS3ConfigAndInput does not make extra API calls or storage access if called repeatedly.\n // TODO(ashwinkumar6) V6-logger: warn `You may copy files from another user if the source level is \"protected\", currently it's ${srcLevel}`\n const finalCopySource = `${sourceBucket}/${sourceKeyPrefix}${source.key}`;\n const finalCopyDestination = `${destinationKeyPrefix}${destination.key}`;\n utils_3.logger.debug(`copying \"${finalCopySource}\" to \"${finalCopyDestination}\".`);\n await serviceCopy({\n source: finalCopySource,\n destination: finalCopyDestination,\n bucket: destBucket,\n s3Config,\n notModifiedSince: input.source.notModifiedSince,\n eTag: input.source.eTag,\n expectedSourceBucketOwner: input.source?.expectedBucketOwner,\n expectedBucketOwner: input.destination?.expectedBucketOwner,\n });\n return {\n key: destination.key,\n };\n};\nexports.copyWithKey = copyWithKey;\nconst serviceCopy = async ({ source, destination, bucket, s3Config, notModifiedSince, eTag, expectedSourceBucketOwner, expectedBucketOwner, }) => {\n await (0, s3data_1.copyObject)({\n ...s3Config,\n userAgentValue: (0, userAgent_1.getStorageUserAgentValue)(utils_1.StorageAction.Copy),\n }, {\n Bucket: bucket,\n CopySource: source,\n Key: destination,\n MetadataDirective: 'COPY', // Copies over metadata like contentType as well\n CopySourceIfMatch: eTag,\n CopySourceIfUnmodifiedSince: notModifiedSince,\n ExpectedSourceBucketOwner: expectedSourceBucketOwner,\n ExpectedBucketOwner: expectedBucketOwner,\n });\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;AACtC,MAAM,YAAY,G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MAAM,CAAC,IAAI;AAC/B,QAAQ,yBAAyB,EAAE,KAAK,CAAC,MAAM,EAAE,mBAAmB;AACpE,QAAQ,mBAAmB,EAAE,KAAK,CAAC,WAAW,EAAE,mBAAmB;AACnE,KAAK,CAAC;AACN,IAAI,OAAO;AACX,QAAQ,GAAG,EAAE,WAAW,CAAC,GAAG;AAC5B,KAAK;AACL,CAAC;AACD,OAAO,CAAC,WAAW,GAAG,WAAW;AACjC,MAAM,WAAW,GAAG,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,yBAAyB,EAAE,mBAAmB,GAAG,KAAK;AAClJ,IAAI,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE;AACnC,QAAQ,GAAG,QAAQ;AACnB,QAAQ,cAAc,EAAE,IAAI,WAAW,CAAC,wBAAwB,EAAE,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC;AAC7F,KAAK,EAAE;AACP,QAAQ,MAAM,EAAE,MAAM;AACtB,QAAQ,UAAU,EAAE,MAAM;AAC1B,QAAQ,GAAG,EAAE,WAAW;AACxB,QAAQ,iBAAiB,EAAE,MAAM;AACjC,QAAQ,iBAAiB,EAAE,IAAI;AAC/B,QAAQ,2BAA2B,EAAE,gBAAgB;AACrD,QAAQ,yBAAyB,EAAE,yBAAyB;AAC5D,QAAQ,mBAAmB,EAAE,mBAAmB;AAChD,KAAK,CAAC;AACN,CAAC;;"}
|
|
@@ -56,7 +56,7 @@ const listCachedUploadTasks = async (resumableUploadsCache) => {
|
|
|
56
56
|
const serializeUploadOptions = (options = {}) => {
|
|
57
57
|
const unserializableOptionProperties = [
|
|
58
58
|
'onProgress',
|
|
59
|
-
'resumableUploadsCache',
|
|
59
|
+
'resumableUploadsCache', // Internally injected implementation not set by customers
|
|
60
60
|
'locationCredentialsProvider', // Internally injected implementation not set by customers
|
|
61
61
|
];
|
|
62
62
|
const serializableOptions = Object.fromEntries(Object.entries(options).filter(([key]) => !unserializableOptionProperties.includes(key)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadCache.js","sources":["../../../../../../../../src/providers/s3/apis/internal/uploadData/multipart/uploadCache.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.removeCachedUpload = exports.cacheMultipartUpload = exports.getUploadsCacheKey = exports.serializeUploadOptions = exports.findCachedUploadParts = void 0;\nconst constants_1 = require(\"../../../../utils/constants\");\nconst s3data_1 = require(\"../../../../utils/client/s3data\");\nconst utils_1 = require(\"../../../../../../utils\");\nconst ONE_HOUR = 1000 * 60 * 60;\n/**\n * Find the cached multipart upload id and get the parts that have been uploaded\n * with ListParts API. If the cached upload is expired(1 hour), return null.\n */\nconst findCachedUploadParts = async ({ resumableUploadsCache, cacheKey, s3Config, bucket, finalKey, }) => {\n const cachedUploads = await listCachedUploadTasks(resumableUploadsCache);\n if (!cachedUploads[cacheKey] ||\n cachedUploads[cacheKey].lastTouched < Date.now() - ONE_HOUR // Uploads are cached for 1 hour\n ) {\n return null;\n }\n const cachedUpload = cachedUploads[cacheKey];\n cachedUpload.lastTouched = Date.now();\n await resumableUploadsCache.setItem(constants_1.UPLOADS_STORAGE_KEY, JSON.stringify(cachedUploads));\n try {\n const { Parts = [] } = await (0, s3data_1.listParts)(s3Config, {\n Bucket: bucket,\n Key: finalKey,\n UploadId: cachedUpload.uploadId,\n });\n return {\n parts: Parts,\n uploadId: cachedUpload.uploadId,\n finalCrc32: cachedUpload.finalCrc32,\n };\n }\n catch (e) {\n utils_1.logger.debug('failed to list cached parts, removing cached upload.');\n await (0, exports.removeCachedUpload)(resumableUploadsCache, cacheKey);\n return null;\n }\n};\nexports.findCachedUploadParts = findCachedUploadParts;\nconst listCachedUploadTasks = async (resumableUploadsCache) => {\n try {\n return JSON.parse((await resumableUploadsCache.getItem(constants_1.UPLOADS_STORAGE_KEY)) ?? '{}');\n }\n catch (e) {\n utils_1.logger.debug('failed to parse cached uploads record.');\n return {};\n }\n};\n/**\n * Serialize the uploadData API options to string so it can be hashed.\n */\nconst serializeUploadOptions = (options = {}) => {\n const unserializableOptionProperties = [\n 'onProgress',\n 'resumableUploadsCache'
|
|
1
|
+
{"version":3,"file":"uploadCache.js","sources":["../../../../../../../../src/providers/s3/apis/internal/uploadData/multipart/uploadCache.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.removeCachedUpload = exports.cacheMultipartUpload = exports.getUploadsCacheKey = exports.serializeUploadOptions = exports.findCachedUploadParts = void 0;\nconst constants_1 = require(\"../../../../utils/constants\");\nconst s3data_1 = require(\"../../../../utils/client/s3data\");\nconst utils_1 = require(\"../../../../../../utils\");\nconst ONE_HOUR = 1000 * 60 * 60;\n/**\n * Find the cached multipart upload id and get the parts that have been uploaded\n * with ListParts API. If the cached upload is expired(1 hour), return null.\n */\nconst findCachedUploadParts = async ({ resumableUploadsCache, cacheKey, s3Config, bucket, finalKey, }) => {\n const cachedUploads = await listCachedUploadTasks(resumableUploadsCache);\n if (!cachedUploads[cacheKey] ||\n cachedUploads[cacheKey].lastTouched < Date.now() - ONE_HOUR // Uploads are cached for 1 hour\n ) {\n return null;\n }\n const cachedUpload = cachedUploads[cacheKey];\n cachedUpload.lastTouched = Date.now();\n await resumableUploadsCache.setItem(constants_1.UPLOADS_STORAGE_KEY, JSON.stringify(cachedUploads));\n try {\n const { Parts = [] } = await (0, s3data_1.listParts)(s3Config, {\n Bucket: bucket,\n Key: finalKey,\n UploadId: cachedUpload.uploadId,\n });\n return {\n parts: Parts,\n uploadId: cachedUpload.uploadId,\n finalCrc32: cachedUpload.finalCrc32,\n };\n }\n catch (e) {\n utils_1.logger.debug('failed to list cached parts, removing cached upload.');\n await (0, exports.removeCachedUpload)(resumableUploadsCache, cacheKey);\n return null;\n }\n};\nexports.findCachedUploadParts = findCachedUploadParts;\nconst listCachedUploadTasks = async (resumableUploadsCache) => {\n try {\n return JSON.parse((await resumableUploadsCache.getItem(constants_1.UPLOADS_STORAGE_KEY)) ?? '{}');\n }\n catch (e) {\n utils_1.logger.debug('failed to parse cached uploads record.');\n return {};\n }\n};\n/**\n * Serialize the uploadData API options to string so it can be hashed.\n */\nconst serializeUploadOptions = (options = {}) => {\n const unserializableOptionProperties = [\n 'onProgress',\n 'resumableUploadsCache', // Internally injected implementation not set by customers\n 'locationCredentialsProvider', // Internally injected implementation not set by customers\n ];\n const serializableOptions = Object.fromEntries(Object.entries(options).filter(([key]) => !unserializableOptionProperties.includes(key)));\n return JSON.stringify(serializableOptions);\n};\nexports.serializeUploadOptions = serializeUploadOptions;\n/**\n * Get the cache key of a multipart upload. Data source cached by different: size, content type, bucket, access level,\n * key. If the data source is a File instance, the upload is additionally indexed by file name and last modified time.\n * So the library always created a new multipart upload if the file is modified.\n */\nconst getUploadsCacheKey = ({ file, size, contentType, bucket, accessLevel, key, optionsHash, }) => {\n let levelStr;\n const resolvedContentType = contentType ?? file?.type ?? 'application/octet-stream';\n // If no access level is defined, we're using custom gen2 access rules\n if (accessLevel === undefined) {\n levelStr = 'custom';\n }\n else {\n levelStr = accessLevel === 'guest' ? 'public' : accessLevel;\n }\n const baseId = `${optionsHash}_${size}_${resolvedContentType}_${bucket}_${levelStr}_${key}`;\n if (file) {\n return `${file.name}_${file.lastModified}_${baseId}`;\n }\n else {\n return baseId;\n }\n};\nexports.getUploadsCacheKey = getUploadsCacheKey;\nconst cacheMultipartUpload = async (resumableUploadsCache, cacheKey, fileMetadata) => {\n const cachedUploads = await listCachedUploadTasks(resumableUploadsCache);\n cachedUploads[cacheKey] = {\n ...fileMetadata,\n lastTouched: Date.now(),\n };\n await resumableUploadsCache.setItem(constants_1.UPLOADS_STORAGE_KEY, JSON.stringify(cachedUploads));\n};\nexports.cacheMultipartUpload = cacheMultipartUpload;\nconst removeCachedUpload = async (resumableUploadsCache, cacheKey) => {\n const cachedUploads = await listCachedUploadTasks(resumableUploadsCache);\n delete cachedUploads[cacheKey];\n await resumableUploadsCache.setItem(constants_1.UPLOADS_STORAGE_KEY, JSON.stringify(cachedUploads));\n};\nexports.removeCachedUpload = removeCachedUpload;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,GAAG,MAAM;AAChK,MAAM,WAAW,GAAG,OAAO,CAAC,6BAA6B,CAAC;AAC1D,MAAM,QAAQ,GAAG,OAAO,CAAC,iCAAiC,CAAC;AAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,yBAAyB,CAAC;AAClD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE;AAC/B;AACA;AACA;AACA;AACA,MAAM,qBAAqB,GAAG,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAG,KAAK;AAC1G,IAAI,MAAM,aAAa,GAAG,MAAM,qBAAqB,CAAC,qBAAqB,CAAC;AAC5E,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC;AAChC,QAAQ,aAAa,CAAC,QAAQ,CAAC,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ;AACnE,MAAM;AACN,QAAQ,OAAO,IAAI;AACnB;AACA,IAAI,MAAM,YAAY,GAAG,aAAa,CAAC,QAAQ,CAAC;AAChD,IAAI,YAAY,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,EAAE;AACzC,IAAI,MAAM,qBAAqB,CAA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qBAAqB,EAAE,QAAQ,EAAE,YAAY,KAAK;AACtF,IAAI,MAAM,aAAa,GAAG,MAAM,qBAAqB,CAAC,qBAAqB,CAAC;AAC5E,IAAI,aAAa,CAAC,QAAQ,CAAC,GAAG;AAC9B,QAAQ,GAAG,YAAY;AACvB,QAAQ,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE;AAC/B,KAAK;AACL,IAAI,MAAM,qBAAqB,CAAC,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACvG,CAAC;AACD,OAAO,CAAC,oBAAoB,GAAG,oBAAoB;AACnD,MAAM,kBAAkB,GAAG,OAAO,qBAAqB,EAAE,QAAQ,KAAK;AACtE,IAAI,MAAM,aAAa,GAAG,MAAM,qBAAqB,CAAC,qBAAqB,CAAC;AAC5E,IAAI,OAAO,aAAa,CAAC,QAAQ,CAAC;AAClC,IAAI,MAAM,qBAAqB,CAAC,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACvG,CAAC;AACD,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.list =
|
|
4
|
+
exports.list = list;
|
|
5
5
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
6
|
// SPDX-License-Identifier: Apache-2.0
|
|
7
7
|
const core_1 = require("@aws-amplify/core");
|
|
@@ -9,5 +9,4 @@ const list_1 = require("./internal/list");
|
|
|
9
9
|
function list(input) {
|
|
10
10
|
return (0, list_1.list)(core_1.Amplify, input ?? {});
|
|
11
11
|
}
|
|
12
|
-
exports.list = list;
|
|
13
12
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sources":["../../../../../src/providers/s3/apis/list.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.list =
|
|
1
|
+
{"version":3,"file":"list.js","sources":["../../../../../src/providers/s3/apis/list.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.list = list;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst core_1 = require(\"@aws-amplify/core\");\nconst list_1 = require(\"./internal/list\");\nfunction list(input) {\n return (0, list_1.list)(core_1.Amplify, input ?? {});\n}\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,IAAI,GAAG,IAAI;AACnB;AACA;AACA,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;AACzC,SAAS,IAAI,CAAC,KAAK,EAAE;AACrB,IAAI,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC;AACxD;;"}
|
|
@@ -3,11 +3,10 @@
|
|
|
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.remove =
|
|
6
|
+
exports.remove = remove;
|
|
7
7
|
const core_1 = require("@aws-amplify/core");
|
|
8
8
|
const remove_1 = require("./internal/remove");
|
|
9
9
|
function remove(input) {
|
|
10
10
|
return (0, remove_1.remove)(core_1.Amplify, input);
|
|
11
11
|
}
|
|
12
|
-
exports.remove = remove;
|
|
13
12
|
//# sourceMappingURL=remove.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.js","sources":["../../../../../src/providers/s3/apis/remove.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.remove =
|
|
1
|
+
{"version":3,"file":"remove.js","sources":["../../../../../src/providers/s3/apis/remove.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.remove = remove;\nconst core_1 = require(\"@aws-amplify/core\");\nconst remove_1 = require(\"./internal/remove\");\nfunction remove(input) {\n return (0, remove_1.remove)(core_1.Amplify, input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,MAAM,GAAG,MAAM;AACvB,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC7C,SAAS,MAAM,CAAC,KAAK,EAAE;AACvB,IAAI,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC;AACtD;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.copy =
|
|
4
|
+
exports.copy = copy;
|
|
5
5
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
6
|
// SPDX-License-Identifier: Apache-2.0
|
|
7
7
|
const adapter_core_1 = require("@aws-amplify/core/internals/adapter-core");
|
|
@@ -9,5 +9,4 @@ const copy_1 = require("../internal/copy");
|
|
|
9
9
|
function copy(contextSpec, input) {
|
|
10
10
|
return (0, copy_1.copy)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);
|
|
11
11
|
}
|
|
12
|
-
exports.copy = copy;
|
|
13
12
|
//# sourceMappingURL=copy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy.js","sources":["../../../../../../src/providers/s3/apis/server/copy.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.copy =
|
|
1
|
+
{"version":3,"file":"copy.js","sources":["../../../../../../src/providers/s3/apis/server/copy.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.copy = copy;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst adapter_core_1 = require(\"@aws-amplify/core/internals/adapter-core\");\nconst copy_1 = require(\"../internal/copy\");\nfunction copy(contextSpec, input) {\n return (0, copy_1.copy)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);\n}\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,IAAI,GAAG,IAAI;AACnB;AACA;AACA,MAAM,cAAc,GAAG,OAAO,CAAC,0CAA0C,CAAC;AAC1E,MAAM,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAC1C,SAAS,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE;AAClC,IAAI,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,IAAI,cAAc,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC;AACpG;;"}
|
|
@@ -3,11 +3,10 @@
|
|
|
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.getProperties =
|
|
6
|
+
exports.getProperties = getProperties;
|
|
7
7
|
const adapter_core_1 = require("@aws-amplify/core/internals/adapter-core");
|
|
8
8
|
const getProperties_1 = require("../internal/getProperties");
|
|
9
9
|
function getProperties(contextSpec, input) {
|
|
10
10
|
return (0, getProperties_1.getProperties)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);
|
|
11
11
|
}
|
|
12
|
-
exports.getProperties = getProperties;
|
|
13
12
|
//# sourceMappingURL=getProperties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProperties.js","sources":["../../../../../../src/providers/s3/apis/server/getProperties.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.getProperties =
|
|
1
|
+
{"version":3,"file":"getProperties.js","sources":["../../../../../../src/providers/s3/apis/server/getProperties.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.getProperties = getProperties;\nconst adapter_core_1 = require(\"@aws-amplify/core/internals/adapter-core\");\nconst getProperties_1 = require(\"../internal/getProperties\");\nfunction getProperties(contextSpec, input) {\n return (0, getProperties_1.getProperties)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC,MAAM,cAAc,GAAG,OAAO,CAAC,0CAA0C,CAAC;AAC1E,MAAM,eAAe,GAAG,OAAO,CAAC,2BAA2B,CAAC;AAC5D,SAAS,aAAa,CAAC,WAAW,EAAE,KAAK,EAAE;AAC3C,IAAI,OAAO,IAAI,eAAe,CAAC,aAAa,EAAE,IAAI,cAAc,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC;AACtH;;"}
|
|
@@ -3,11 +3,10 @@
|
|
|
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.getUrl =
|
|
6
|
+
exports.getUrl = getUrl;
|
|
7
7
|
const adapter_core_1 = require("@aws-amplify/core/internals/adapter-core");
|
|
8
8
|
const getUrl_1 = require("../internal/getUrl");
|
|
9
9
|
function getUrl(contextSpec, input) {
|
|
10
10
|
return (0, getUrl_1.getUrl)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);
|
|
11
11
|
}
|
|
12
|
-
exports.getUrl = getUrl;
|
|
13
12
|
//# sourceMappingURL=getUrl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUrl.js","sources":["../../../../../../src/providers/s3/apis/server/getUrl.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.getUrl =
|
|
1
|
+
{"version":3,"file":"getUrl.js","sources":["../../../../../../src/providers/s3/apis/server/getUrl.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.getUrl = getUrl;\nconst adapter_core_1 = require(\"@aws-amplify/core/internals/adapter-core\");\nconst getUrl_1 = require(\"../internal/getUrl\");\nfunction getUrl(contextSpec, input) {\n return (0, getUrl_1.getUrl)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,MAAM,GAAG,MAAM;AACvB,MAAM,cAAc,GAAG,OAAO,CAAC,0CAA0C,CAAC;AAC1E,MAAM,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC;AAC9C,SAAS,MAAM,CAAC,WAAW,EAAE,KAAK,EAAE;AACpC,IAAI,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,IAAI,cAAc,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC;AACxG;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.list =
|
|
4
|
+
exports.list = list;
|
|
5
5
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
6
|
// SPDX-License-Identifier: Apache-2.0
|
|
7
7
|
const adapter_core_1 = require("@aws-amplify/core/internals/adapter-core");
|
|
@@ -9,5 +9,4 @@ const list_1 = require("../internal/list");
|
|
|
9
9
|
function list(contextSpec, input) {
|
|
10
10
|
return (0, list_1.list)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input ?? {});
|
|
11
11
|
}
|
|
12
|
-
exports.list = list;
|
|
13
12
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sources":["../../../../../../src/providers/s3/apis/server/list.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.list =
|
|
1
|
+
{"version":3,"file":"list.js","sources":["../../../../../../src/providers/s3/apis/server/list.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.list = list;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst adapter_core_1 = require(\"@aws-amplify/core/internals/adapter-core\");\nconst list_1 = require(\"../internal/list\");\nfunction list(contextSpec, input) {\n return (0, list_1.list)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input ?? {});\n}\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,IAAI,GAAG,IAAI;AACnB;AACA;AACA,MAAM,cAAc,GAAG,OAAO,CAAC,0CAA0C,CAAC;AAC1E,MAAM,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAC1C,SAAS,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE;AAClC,IAAI,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,IAAI,cAAc,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC;AAC1G;;"}
|
|
@@ -3,11 +3,10 @@
|
|
|
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.remove =
|
|
6
|
+
exports.remove = remove;
|
|
7
7
|
const adapter_core_1 = require("@aws-amplify/core/internals/adapter-core");
|
|
8
8
|
const remove_1 = require("../internal/remove");
|
|
9
9
|
function remove(contextSpec, input) {
|
|
10
10
|
return (0, remove_1.remove)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);
|
|
11
11
|
}
|
|
12
|
-
exports.remove = remove;
|
|
13
12
|
//# sourceMappingURL=remove.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.js","sources":["../../../../../../src/providers/s3/apis/server/remove.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.remove =
|
|
1
|
+
{"version":3,"file":"remove.js","sources":["../../../../../../src/providers/s3/apis/server/remove.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.remove = remove;\nconst adapter_core_1 = require(\"@aws-amplify/core/internals/adapter-core\");\nconst remove_1 = require(\"../internal/remove\");\nfunction remove(contextSpec, input) {\n return (0, remove_1.remove)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,MAAM,GAAG,MAAM;AACvB,MAAM,cAAc,GAAG,OAAO,CAAC,0CAA0C,CAAC;AAC1E,MAAM,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC;AAC9C,SAAS,MAAM,CAAC,WAAW,EAAE,KAAK,EAAE;AACpC,IAAI,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,IAAI,cAAc,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC;AACxG;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
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.uploadData =
|
|
6
|
+
exports.uploadData = uploadData;
|
|
7
7
|
const core_1 = require("@aws-amplify/core");
|
|
8
8
|
const uploadData_1 = require("./internal/uploadData");
|
|
9
9
|
function uploadData(input) {
|
|
@@ -17,5 +17,4 @@ function uploadData(input) {
|
|
|
17
17
|
},
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
|
-
exports.uploadData = uploadData;
|
|
21
20
|
//# sourceMappingURL=uploadData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadData.js","sources":["../../../../../src/providers/s3/apis/uploadData.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.uploadData =
|
|
1
|
+
{"version":3,"file":"uploadData.js","sources":["../../../../../src/providers/s3/apis/uploadData.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.uploadData = uploadData;\nconst core_1 = require(\"@aws-amplify/core\");\nconst uploadData_1 = require(\"./internal/uploadData\");\nfunction uploadData(input) {\n return (0, uploadData_1.uploadData)({\n ...input,\n options: {\n ...input?.options,\n // This option enables caching in-progress multipart uploads.\n // It's ONLY needed for client-side API.\n resumableUploadsCache: core_1.defaultStorage,\n },\n });\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,UAAU,GAAG,UAAU;AAC/B,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,YAAY,GAAG,OAAO,CAAC,uBAAuB,CAAC;AACrD,SAAS,UAAU,CAAC,KAAK,EAAE;AAC3B,IAAI,OAAO,IAAI,YAAY,CAAC,UAAU,EAAE;AACxC,QAAQ,GAAG,KAAK;AAChB,QAAQ,OAAO,EAAE;AACjB,YAAY,GAAG,KAAK,EAAE,OAAO;AAC7B;AACA;AACA,YAAY,qBAAqB,EAAE,MAAM,CAAC,cAAc;AACxD,SAAS;AACT,KAAK,CAAC;AACN;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
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.toBase64 =
|
|
6
|
+
exports.toBase64 = toBase64;
|
|
7
7
|
function bytesToBase64(bytes) {
|
|
8
8
|
const base64Str = Array.from(bytes, x => String.fromCodePoint(x)).join('');
|
|
9
9
|
return btoa(base64Str);
|
|
@@ -14,5 +14,4 @@ function toBase64(input) {
|
|
|
14
14
|
}
|
|
15
15
|
return bytesToBase64(new Uint8Array(input.buffer, input.byteOffset, input.byteLength));
|
|
16
16
|
}
|
|
17
|
-
exports.toBase64 = toBase64;
|
|
18
17
|
//# sourceMappingURL=index.browser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.browser.js","sources":["../../../../../../../../src/providers/s3/utils/client/runtime/base64/index.browser.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.toBase64 =
|
|
1
|
+
{"version":3,"file":"index.browser.js","sources":["../../../../../../../../src/providers/s3/utils/client/runtime/base64/index.browser.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.toBase64 = toBase64;\nfunction bytesToBase64(bytes) {\n const base64Str = Array.from(bytes, x => String.fromCodePoint(x)).join('');\n return btoa(base64Str);\n}\nfunction toBase64(input) {\n if (typeof input === 'string') {\n return bytesToBase64(new TextEncoder().encode(input));\n }\n return bytesToBase64(new Uint8Array(input.buffer, input.byteOffset, input.byteLength));\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,QAAQ,GAAG,QAAQ;AAC3B,SAAS,aAAa,CAAC,KAAK,EAAE;AAC9B,IAAI,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;AAC9E,IAAI,OAAO,IAAI,CAAC,SAAS,CAAC;AAC1B;AACA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,OAAO,aAAa,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC7D;AACA,IAAI,OAAO,aAAa,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;AAC1F;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
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.toBase64 =
|
|
6
|
+
exports.toBase64 = toBase64;
|
|
7
7
|
const buffer_1 = require("buffer");
|
|
8
8
|
function toBase64(input) {
|
|
9
9
|
if (typeof input === 'string') {
|
|
@@ -11,5 +11,4 @@ function toBase64(input) {
|
|
|
11
11
|
}
|
|
12
12
|
return buffer_1.Buffer.from(input.buffer).toString('base64');
|
|
13
13
|
}
|
|
14
|
-
exports.toBase64 = toBase64;
|
|
15
14
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","sources":["../../../../../../../../src/providers/s3/utils/client/runtime/base64/index.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.toBase64 =
|
|
1
|
+
{"version":3,"file":"index.native.js","sources":["../../../../../../../../src/providers/s3/utils/client/runtime/base64/index.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.toBase64 = toBase64;\nconst buffer_1 = require(\"buffer\");\nfunction toBase64(input) {\n if (typeof input === 'string') {\n return buffer_1.Buffer.from(input, 'utf-8').toString('base64');\n }\n return buffer_1.Buffer.from(input.buffer).toString('base64');\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,QAAQ,GAAG,QAAQ;AAC3B,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AAClC,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;AACtE;AACA,IAAI,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAChE;;"}
|