@aws-amplify/storage 6.9.2-unstable.43e28a6.0 → 6.9.2-unstable.f94a30b.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.
@@ -62,7 +62,9 @@ exports.defaultConfig = {
62
62
  endpointResolver,
63
63
  retryDecider: exports.retryDecider,
64
64
  computeDelay: aws_client_utils_1.jitteredBackoff,
65
- userAgentValue: (0, utils_1.getAmplifyUserAgent)(),
65
+ get userAgentValue() {
66
+ return (0, utils_1.getAmplifyUserAgent)();
67
+ },
66
68
  uriEscapePath: false, // Required by S3. See https://github.com/aws/aws-sdk-js-v3/blob/9ba012dfa3a3429aa2db0f90b3b0b3a7a31f9bc3/packages/signature-v4/src/SignatureV4.ts#L76-L83
67
69
  };
68
70
  //# sourceMappingURL=base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sources":["../../../../../../../src/providers/s3/utils/client/s3control/base.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.defaultConfig = exports.retryDecider = exports.parseXmlError = exports.SERVICE_NAME = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst aws_client_utils_1 = require(\"@aws-amplify/core/internals/aws-client-utils\");\nconst utils_2 = require(\"../utils\");\nconst assertValidationError_1 = require(\"../../../../../errors/utils/assertValidationError\");\nconst validation_1 = require(\"../../../../../errors/types/validation\");\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nexports.SERVICE_NAME = 's3';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region, and input parameters.\n */\nconst endpointResolver = (options, apiInput) => {\n const { region, customEndpoint } = options;\n const { AccountId: accountId } = apiInput;\n let endpoint;\n if (customEndpoint) {\n (0, assertValidationError_1.assertValidationError)(!customEndpoint.includes('://'), validation_1.StorageValidationErrorCode.InvalidCustomEndpoint);\n endpoint = new utils_1.AmplifyUrl(`https://${accountId}.${customEndpoint}`);\n }\n else {\n endpoint = new utils_1.AmplifyUrl(`https://${accountId}.s3-control.${region}.${(0, aws_client_utils_1.getDnsSuffix)(region)}`);\n }\n return { url: endpoint };\n};\n/**\n * Error parser for the XML payload of S3 control plane error response. The\n * error's `Code` and `Message` locates at the nested `Error` element instead of\n * the XML root element.\n *\n * @example\n * ```\n * \t<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n * \t<ErrorResponse>\n * \t <Error>\n * \t\t <Code>AccessDenied</Code>\n * \t\t <Message>Access Denied</Message>\n * \t\t</Error>\n * \t\t<RequestId>656c76696e6727732072657175657374</RequestId>\n * \t\t<HostId>Uuag1LuByRx9e6j5Onimru9pO4ZVKnJ2Qz7/C1NPcfTWAtRPfTaOFg==</HostId>\n * \t</ErrorResponse>\n * \t```\n *\n * @internal\n */\nexports.parseXmlError = (0, utils_2.createXmlErrorParser)();\n/**\n * @internal\n */\nexports.retryDecider = (0, utils_2.createRetryDecider)(exports.parseXmlError);\n/**\n * @internal\n */\nexports.defaultConfig = {\n service: exports.SERVICE_NAME,\n endpointResolver,\n retryDecider: exports.retryDecider,\n computeDelay: aws_client_utils_1.jitteredBackoff,\n userAgentValue: (0, utils_1.getAmplifyUserAgent)(),\n uriEscapePath: false, // Required by S3. See https://github.com/aws/aws-sdk-js-v3/blob/9ba012dfa3a3429aa2db0f90b3b0b3a7a31f9bc3/packages/signature-v4/src/SignatureV4.ts#L76-L83\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,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,YAAY,GAAG,MAAM;AACpG,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,kBAAkB,GAAG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CAAC,kBAAkB,EAAE,OAAO,CAAC,aAAa,CAAC;AAC7E;AACA;AACA;AACA,OAAO,CAAC,aAAa,GAAG;AACxB,IAAI,OAAO,EAAE,OAAO,CAAC,YAAY;AACjC,IAAI,gBAAgB;AACpB,IAAI,YAAY,EAAE,OAAO,CAAC,YAAY;AACtC,IAAI,YAAY,EAAE,kBAAkB,CAAC,eAAe;AACpD,IAAI,cAAc,EAAE,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtD,IAAI,aAAa,EAAE,KAAK;AACxB,CAAC;;"}
1
+ {"version":3,"file":"base.js","sources":["../../../../../../../src/providers/s3/utils/client/s3control/base.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.defaultConfig = exports.retryDecider = exports.parseXmlError = exports.SERVICE_NAME = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst aws_client_utils_1 = require(\"@aws-amplify/core/internals/aws-client-utils\");\nconst utils_2 = require(\"../utils\");\nconst assertValidationError_1 = require(\"../../../../../errors/utils/assertValidationError\");\nconst validation_1 = require(\"../../../../../errors/types/validation\");\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nexports.SERVICE_NAME = 's3';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region, and input parameters.\n */\nconst endpointResolver = (options, apiInput) => {\n const { region, customEndpoint } = options;\n const { AccountId: accountId } = apiInput;\n let endpoint;\n if (customEndpoint) {\n (0, assertValidationError_1.assertValidationError)(!customEndpoint.includes('://'), validation_1.StorageValidationErrorCode.InvalidCustomEndpoint);\n endpoint = new utils_1.AmplifyUrl(`https://${accountId}.${customEndpoint}`);\n }\n else {\n endpoint = new utils_1.AmplifyUrl(`https://${accountId}.s3-control.${region}.${(0, aws_client_utils_1.getDnsSuffix)(region)}`);\n }\n return { url: endpoint };\n};\n/**\n * Error parser for the XML payload of S3 control plane error response. The\n * error's `Code` and `Message` locates at the nested `Error` element instead of\n * the XML root element.\n *\n * @example\n * ```\n * \t<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n * \t<ErrorResponse>\n * \t <Error>\n * \t\t <Code>AccessDenied</Code>\n * \t\t <Message>Access Denied</Message>\n * \t\t</Error>\n * \t\t<RequestId>656c76696e6727732072657175657374</RequestId>\n * \t\t<HostId>Uuag1LuByRx9e6j5Onimru9pO4ZVKnJ2Qz7/C1NPcfTWAtRPfTaOFg==</HostId>\n * \t</ErrorResponse>\n * \t```\n *\n * @internal\n */\nexports.parseXmlError = (0, utils_2.createXmlErrorParser)();\n/**\n * @internal\n */\nexports.retryDecider = (0, utils_2.createRetryDecider)(exports.parseXmlError);\n/**\n * @internal\n */\nexports.defaultConfig = {\n service: exports.SERVICE_NAME,\n endpointResolver,\n retryDecider: exports.retryDecider,\n computeDelay: aws_client_utils_1.jitteredBackoff,\n get userAgentValue() {\n return (0, utils_1.getAmplifyUserAgent)();\n },\n uriEscapePath: false, // Required by S3. See https://github.com/aws/aws-sdk-js-v3/blob/9ba012dfa3a3429aa2db0f90b3b0b3a7a31f9bc3/packages/signature-v4/src/SignatureV4.ts#L76-L83\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,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,YAAY,GAAG,MAAM;AACpG,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,kBAAkB,GAAG,OAAO,CAAC,8CAA8C,CAAC;AAClF,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,uBAAuB,GAAG,OAAO,CAAC,mDAAmD,CAAC;AAC5F,MAAM,YAAY,GAAG,OAAO,CAAC,wCAAwC,CA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OAAO,CAAC,YAAY;AACtC,IAAI,YAAY,EAAE,kBAAkB,CAAC,eAAe;AACpD,IAAI,IAAI,cAAc,GAAG;AACzB,QAAQ,OAAO,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACjD,KAAK;AACL,IAAI,aAAa,EAAE,KAAK;AACxB,CAAC;;"}
@@ -94,7 +94,9 @@ exports.defaultConfig = {
94
94
  endpointResolver,
95
95
  retryDecider: exports.retryDecider,
96
96
  computeDelay: aws_client_utils_1.jitteredBackoff,
97
- userAgentValue: (0, utils_1.getAmplifyUserAgent)(),
97
+ get userAgentValue() {
98
+ return (0, utils_1.getAmplifyUserAgent)();
99
+ },
98
100
  useAccelerateEndpoint: false,
99
101
  uriEscapePath: false, // Required by S3. See https://github.com/aws/aws-sdk-js-v3/blob/9ba012dfa3a3429aa2db0f90b3b0b3a7a31f9bc3/packages/signature-v4/src/SignatureV4.ts#L76-L83
100
102
  };
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sources":["../../../../../../../src/providers/s3/utils/client/s3data/base.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.defaultConfig = exports.retryDecider = exports.parseXmlError = exports.isDnsCompatibleBucketName = exports.SERVICE_NAME = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst aws_client_utils_1 = require(\"@aws-amplify/core/internals/aws-client-utils\");\nconst utils_2 = require(\"../utils\");\nconst constants_1 = require(\"../../constants\");\nconst assertValidationError_1 = require(\"../../../../../errors/utils/assertValidationError\");\nconst validation_1 = require(\"../../../../../errors/types/validation\");\nconst DOMAIN_PATTERN = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/;\nconst IP_ADDRESS_PATTERN = /(\\d+\\.){3}\\d+/;\nconst DOTS_PATTERN = /\\.\\./;\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nexports.SERVICE_NAME = 's3';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region, and input parameters.\n */\nconst endpointResolver = (options, apiInput) => {\n const { region, useAccelerateEndpoint, customEndpoint, forcePathStyle } = options;\n let endpoint;\n // 1. get base endpoint\n if (customEndpoint) {\n if (customEndpoint === constants_1.LOCAL_TESTING_S3_ENDPOINT) {\n endpoint = new utils_1.AmplifyUrl(customEndpoint);\n }\n (0, assertValidationError_1.assertValidationError)(!customEndpoint.includes('://'), validation_1.StorageValidationErrorCode.InvalidCustomEndpoint);\n endpoint = new utils_1.AmplifyUrl(`https://${customEndpoint}`);\n }\n else if (useAccelerateEndpoint) {\n // this ErrorCode isn't expose yet since forcePathStyle param isn't publicly exposed\n (0, assertValidationError_1.assertValidationError)(!forcePathStyle, validation_1.StorageValidationErrorCode.ForcePathStyleEndpointNotSupported);\n endpoint = new utils_1.AmplifyUrl(`https://s3-accelerate.${(0, aws_client_utils_1.getDnsSuffix)(region)}`);\n }\n else {\n endpoint = new utils_1.AmplifyUrl(`https://s3.${region}.${(0, aws_client_utils_1.getDnsSuffix)(region)}`);\n }\n // 2. inject bucket name\n if (apiInput?.Bucket) {\n (0, assertValidationError_1.assertValidationError)((0, exports.isDnsCompatibleBucketName)(apiInput.Bucket), validation_1.StorageValidationErrorCode.DnsIncompatibleBucketName);\n if (forcePathStyle || apiInput.Bucket.includes('.')) {\n endpoint.pathname = `/${apiInput.Bucket}`;\n }\n else {\n endpoint.host = `${apiInput.Bucket}.${endpoint.host}`;\n }\n }\n return { url: endpoint };\n};\n/**\n * Determines whether a given string is DNS compliant per the rules outlined by\n * S3. Length, capitaization, and leading dot restrictions are enforced by the\n * DOMAIN_PATTERN regular expression.\n * @internal\n *\n * @see https://github.com/aws/aws-sdk-js-v3/blob/f2da6182298d4d6b02e84fb723492c07c27469a8/packages/middleware-bucket-endpoint/src/bucketHostnameUtils.ts#L39-L48\n * @see https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html\n */\nconst isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) &&\n !IP_ADDRESS_PATTERN.test(bucketName) &&\n !DOTS_PATTERN.test(bucketName);\nexports.isDnsCompatibleBucketName = isDnsCompatibleBucketName;\n/**\n * Error parser for the XML payload of S3 data plane error response. The error's\n * `Code` and `Message` locates directly at the XML root element.\n *\n * @example\n * ```\n * <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n * \t<Error>\n * \t\t<Code>NoSuchKey</Code>\n * \t\t<Message>The resource you requested does not exist</Message>\n * \t\t<Resource>/mybucket/myfoto.jpg</Resource>\n * \t\t<RequestId>4442587FB7D0A2F9</RequestId>\n * \t</Error>\n * \t```\n *\n * @internal\n */\nexports.parseXmlError = (0, utils_2.createXmlErrorParser)({ noErrorWrapping: true });\n/**\n * @internal\n */\nexports.retryDecider = (0, utils_2.createRetryDecider)(exports.parseXmlError);\n/**\n * @internal\n */\nexports.defaultConfig = {\n service: exports.SERVICE_NAME,\n endpointResolver,\n retryDecider: exports.retryDecider,\n computeDelay: aws_client_utils_1.jitteredBackoff,\n userAgentValue: (0, utils_1.getAmplifyUserAgent)(),\n useAccelerateEndpoint: false,\n uriEscapePath: false, // Required by S3. See https://github.com/aws/aws-sdk-js-v3/blob/9ba012dfa3a3429aa2db0f90b3b0b3a7a31f9bc3/packages/signature-v4/src/SignatureV4.ts#L76-L83\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,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,yBAAyB,GAAG,OAAO,CAAC,YAAY,GAAG,MAAM;AACxI,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,kBAAkB,GAAG,OAAO,CAAC,8CAA8C,CAAC;AAClF,MAAM,OAAO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O,CAAC,YAAY,GAAG,IAAI,OAAO,CAAC,kBAAkB,EAAE,OAAO,CAAC,aAAa,CAAC;AAC7E;AACA;AACA;AACA,OAAO,CAAC,aAAa,GAAG;AACxB,IAAI,OAAO,EAAE,OAAO,CAAC,YAAY;AACjC,IAAI,gBAAgB;AACpB,IAAI,YAAY,EAAE,OAAO,CAAC,YAAY;AACtC,IAAI,YAAY,EAAE,kBAAkB,CAAC,eAAe;AACpD,IAAI,cAAc,EAAE,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACtD,IAAI,qBAAqB,EAAE,KAAK;AAChC,IAAI,aAAa,EAAE,KAAK;AACxB,CAAC;;"}
1
+ {"version":3,"file":"base.js","sources":["../../../../../../../src/providers/s3/utils/client/s3data/base.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.defaultConfig = exports.retryDecider = exports.parseXmlError = exports.isDnsCompatibleBucketName = exports.SERVICE_NAME = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst aws_client_utils_1 = require(\"@aws-amplify/core/internals/aws-client-utils\");\nconst utils_2 = require(\"../utils\");\nconst constants_1 = require(\"../../constants\");\nconst assertValidationError_1 = require(\"../../../../../errors/utils/assertValidationError\");\nconst validation_1 = require(\"../../../../../errors/types/validation\");\nconst DOMAIN_PATTERN = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/;\nconst IP_ADDRESS_PATTERN = /(\\d+\\.){3}\\d+/;\nconst DOTS_PATTERN = /\\.\\./;\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nexports.SERVICE_NAME = 's3';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region, and input parameters.\n */\nconst endpointResolver = (options, apiInput) => {\n const { region, useAccelerateEndpoint, customEndpoint, forcePathStyle } = options;\n let endpoint;\n // 1. get base endpoint\n if (customEndpoint) {\n if (customEndpoint === constants_1.LOCAL_TESTING_S3_ENDPOINT) {\n endpoint = new utils_1.AmplifyUrl(customEndpoint);\n }\n (0, assertValidationError_1.assertValidationError)(!customEndpoint.includes('://'), validation_1.StorageValidationErrorCode.InvalidCustomEndpoint);\n endpoint = new utils_1.AmplifyUrl(`https://${customEndpoint}`);\n }\n else if (useAccelerateEndpoint) {\n // this ErrorCode isn't expose yet since forcePathStyle param isn't publicly exposed\n (0, assertValidationError_1.assertValidationError)(!forcePathStyle, validation_1.StorageValidationErrorCode.ForcePathStyleEndpointNotSupported);\n endpoint = new utils_1.AmplifyUrl(`https://s3-accelerate.${(0, aws_client_utils_1.getDnsSuffix)(region)}`);\n }\n else {\n endpoint = new utils_1.AmplifyUrl(`https://s3.${region}.${(0, aws_client_utils_1.getDnsSuffix)(region)}`);\n }\n // 2. inject bucket name\n if (apiInput?.Bucket) {\n (0, assertValidationError_1.assertValidationError)((0, exports.isDnsCompatibleBucketName)(apiInput.Bucket), validation_1.StorageValidationErrorCode.DnsIncompatibleBucketName);\n if (forcePathStyle || apiInput.Bucket.includes('.')) {\n endpoint.pathname = `/${apiInput.Bucket}`;\n }\n else {\n endpoint.host = `${apiInput.Bucket}.${endpoint.host}`;\n }\n }\n return { url: endpoint };\n};\n/**\n * Determines whether a given string is DNS compliant per the rules outlined by\n * S3. Length, capitaization, and leading dot restrictions are enforced by the\n * DOMAIN_PATTERN regular expression.\n * @internal\n *\n * @see https://github.com/aws/aws-sdk-js-v3/blob/f2da6182298d4d6b02e84fb723492c07c27469a8/packages/middleware-bucket-endpoint/src/bucketHostnameUtils.ts#L39-L48\n * @see https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html\n */\nconst isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) &&\n !IP_ADDRESS_PATTERN.test(bucketName) &&\n !DOTS_PATTERN.test(bucketName);\nexports.isDnsCompatibleBucketName = isDnsCompatibleBucketName;\n/**\n * Error parser for the XML payload of S3 data plane error response. The error's\n * `Code` and `Message` locates directly at the XML root element.\n *\n * @example\n * ```\n * <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n * \t<Error>\n * \t\t<Code>NoSuchKey</Code>\n * \t\t<Message>The resource you requested does not exist</Message>\n * \t\t<Resource>/mybucket/myfoto.jpg</Resource>\n * \t\t<RequestId>4442587FB7D0A2F9</RequestId>\n * \t</Error>\n * \t```\n *\n * @internal\n */\nexports.parseXmlError = (0, utils_2.createXmlErrorParser)({ noErrorWrapping: true });\n/**\n * @internal\n */\nexports.retryDecider = (0, utils_2.createRetryDecider)(exports.parseXmlError);\n/**\n * @internal\n */\nexports.defaultConfig = {\n service: exports.SERVICE_NAME,\n endpointResolver,\n retryDecider: exports.retryDecider,\n computeDelay: aws_client_utils_1.jitteredBackoff,\n get userAgentValue() {\n return (0, utils_1.getAmplifyUserAgent)();\n },\n useAccelerateEndpoint: false,\n uriEscapePath: false, // Required by S3. See https://github.com/aws/aws-sdk-js-v3/blob/9ba012dfa3a3429aa2db0f90b3b0b3a7a31f9bc3/packages/signature-v4/src/SignatureV4.ts#L76-L83\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,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,yBAAyB,GAAG,OAAO,CAAC,YAAY,GAAG,MAAM;AACxI,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,kBAAkB,GAAG,OAAO,CAAC,8CAA8C,CAAC;AAClF,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;AACnC,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC;AAC9C,MAAM,uBAAuB,GAAG,OAAO,CAAC,mDAAmD,CAAC;AAC5F,MAAM,YAAY,GAAG,OAAO,CA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,IAAI,gBAAgB;AACpB,IAAI,YAAY,EAAE,OAAO,CAAC,YAAY;AACtC,IAAI,YAAY,EAAE,kBAAkB,CAAC,eAAe;AACpD,IAAI,IAAI,cAAc,GAAG;AACzB,QAAQ,OAAO,IAAI,OAAO,CAAC,mBAAmB,GAAG;AACjD,KAAK;AACL,IAAI,qBAAqB,EAAE,KAAK;AAChC,IAAI,aAAa,EAAE,KAAK;AACxB,CAAC;;"}
@@ -65,6 +65,6 @@ export declare const defaultConfig: {
65
65
  };
66
66
  retryDecider: import("../utils/createRetryDecider").RetryDecider;
67
67
  computeDelay: (attempt: number) => number;
68
- userAgentValue: string;
68
+ readonly userAgentValue: string;
69
69
  uriEscapePath: boolean;
70
70
  };
@@ -64,7 +64,9 @@ const defaultConfig = {
64
64
  endpointResolver,
65
65
  retryDecider,
66
66
  computeDelay: jitteredBackoff,
67
- userAgentValue: getAmplifyUserAgent(),
67
+ get userAgentValue() {
68
+ return getAmplifyUserAgent();
69
+ },
68
70
  uriEscapePath: false, // Required by S3. See https://github.com/aws/aws-sdk-js-v3/blob/9ba012dfa3a3429aa2db0f90b3b0b3a7a31f9bc3/packages/signature-v4/src/SignatureV4.ts#L76-L83
69
71
  };
70
72
 
@@ -1 +1 @@
1
- {"version":3,"file":"base.mjs","sources":["../../../../../../../src/providers/s3/utils/client/s3control/base.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyUrl, getAmplifyUserAgent, } from '@aws-amplify/core/internals/utils';\nimport { getDnsSuffix, jitteredBackoff, } from '@aws-amplify/core/internals/aws-client-utils';\nimport { createRetryDecider, createXmlErrorParser } from '../utils';\nimport { assertValidationError } from '../../../../../errors/utils/assertValidationError';\nimport { StorageValidationErrorCode } from '../../../../../errors/types/validation';\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nexport const SERVICE_NAME = 's3';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region, and input parameters.\n */\nconst endpointResolver = (options, apiInput) => {\n const { region, customEndpoint } = options;\n const { AccountId: accountId } = apiInput;\n let endpoint;\n if (customEndpoint) {\n assertValidationError(!customEndpoint.includes('://'), StorageValidationErrorCode.InvalidCustomEndpoint);\n endpoint = new AmplifyUrl(`https://${accountId}.${customEndpoint}`);\n }\n else {\n endpoint = new AmplifyUrl(`https://${accountId}.s3-control.${region}.${getDnsSuffix(region)}`);\n }\n return { url: endpoint };\n};\n/**\n * Error parser for the XML payload of S3 control plane error response. The\n * error's `Code` and `Message` locates at the nested `Error` element instead of\n * the XML root element.\n *\n * @example\n * ```\n * \t<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n * \t<ErrorResponse>\n * \t <Error>\n * \t\t <Code>AccessDenied</Code>\n * \t\t <Message>Access Denied</Message>\n * \t\t</Error>\n * \t\t<RequestId>656c76696e6727732072657175657374</RequestId>\n * \t\t<HostId>Uuag1LuByRx9e6j5Onimru9pO4ZVKnJ2Qz7/C1NPcfTWAtRPfTaOFg==</HostId>\n * \t</ErrorResponse>\n * \t```\n *\n * @internal\n */\nexport const parseXmlError = createXmlErrorParser();\n/**\n * @internal\n */\nexport const retryDecider = createRetryDecider(parseXmlError);\n/**\n * @internal\n */\nexport const defaultConfig = {\n service: SERVICE_NAME,\n endpointResolver,\n retryDecider,\n computeDelay: jitteredBackoff,\n userAgentValue: getAmplifyUserAgent(),\n uriEscapePath: false, // Required by S3. See https://github.com/aws/aws-sdk-js-v3/blob/9ba012dfa3a3429aa2db0f90b3b0b3a7a31f9bc3/packages/signature-v4/src/SignatureV4.ts#L76-L83\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;AAMA;AACA;AACA;AACY,MAAC,YAAY,GAAG;AAC5B;AACA;AACA;AACA,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,QAAQ,KAAK;AAChD,IAAI,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO;AAC9C,IAAI,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,QAAQ;AAC7C,IAAI,IAAI,QAAQ;AAChB,IAAI,IAAI,cAAc,EAAE;AACxB,QAAQ,qBAAqB,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,0BAA0B,CAAC,qBAAqB,CAAC;AAChH,QAAQ,QAAQ,GAAG,IAAI,UAAU,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC;AAC3E;AACA,SAAS;AACT,QAAQ,QAAQ,GAAG,IAAI,UAAU,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACtG;AACA,IAAI,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE;AAC5B,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,aAAa,GAAG,oBAAoB;AACjD;AACA;AACA;AACY,MAAC,YAAY,GAAG,kBAAkB,CAAC,aAAa;AAC5D;AACA;AACA;AACY,MAAC,aAAa,GAAG;AAC7B,IAAI,OAAO,EAAE,YAAY;AACzB,IAAI,gBAAgB;AACpB,IAAI,YAAY;AAChB,IAAI,YAAY,EAAE,eAAe;AACjC,IAAI,cAAc,EAAE,mBAAmB,EAAE;AACzC,IAAI,aAAa,EAAE,KAAK;AACxB;;;;"}
1
+ {"version":3,"file":"base.mjs","sources":["../../../../../../../src/providers/s3/utils/client/s3control/base.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyUrl, getAmplifyUserAgent, } from '@aws-amplify/core/internals/utils';\nimport { getDnsSuffix, jitteredBackoff, } from '@aws-amplify/core/internals/aws-client-utils';\nimport { createRetryDecider, createXmlErrorParser } from '../utils';\nimport { assertValidationError } from '../../../../../errors/utils/assertValidationError';\nimport { StorageValidationErrorCode } from '../../../../../errors/types/validation';\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nexport const SERVICE_NAME = 's3';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region, and input parameters.\n */\nconst endpointResolver = (options, apiInput) => {\n const { region, customEndpoint } = options;\n const { AccountId: accountId } = apiInput;\n let endpoint;\n if (customEndpoint) {\n assertValidationError(!customEndpoint.includes('://'), StorageValidationErrorCode.InvalidCustomEndpoint);\n endpoint = new AmplifyUrl(`https://${accountId}.${customEndpoint}`);\n }\n else {\n endpoint = new AmplifyUrl(`https://${accountId}.s3-control.${region}.${getDnsSuffix(region)}`);\n }\n return { url: endpoint };\n};\n/**\n * Error parser for the XML payload of S3 control plane error response. The\n * error's `Code` and `Message` locates at the nested `Error` element instead of\n * the XML root element.\n *\n * @example\n * ```\n * \t<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n * \t<ErrorResponse>\n * \t <Error>\n * \t\t <Code>AccessDenied</Code>\n * \t\t <Message>Access Denied</Message>\n * \t\t</Error>\n * \t\t<RequestId>656c76696e6727732072657175657374</RequestId>\n * \t\t<HostId>Uuag1LuByRx9e6j5Onimru9pO4ZVKnJ2Qz7/C1NPcfTWAtRPfTaOFg==</HostId>\n * \t</ErrorResponse>\n * \t```\n *\n * @internal\n */\nexport const parseXmlError = createXmlErrorParser();\n/**\n * @internal\n */\nexport const retryDecider = createRetryDecider(parseXmlError);\n/**\n * @internal\n */\nexport const defaultConfig = {\n service: SERVICE_NAME,\n endpointResolver,\n retryDecider,\n computeDelay: jitteredBackoff,\n get userAgentValue() {\n return getAmplifyUserAgent();\n },\n uriEscapePath: false, // Required by S3. See https://github.com/aws/aws-sdk-js-v3/blob/9ba012dfa3a3429aa2db0f90b3b0b3a7a31f9bc3/packages/signature-v4/src/SignatureV4.ts#L76-L83\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;AAM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
82
  retryDecider: import("../utils/createRetryDecider").RetryDecider;
83
83
  computeDelay: (attempt: number) => number;
84
- userAgentValue: string;
84
+ readonly userAgentValue: string;
85
85
  useAccelerateEndpoint: boolean;
86
86
  uriEscapePath: boolean;
87
87
  };
@@ -95,7 +95,9 @@ const defaultConfig = {
95
95
  endpointResolver,
96
96
  retryDecider,
97
97
  computeDelay: jitteredBackoff,
98
- userAgentValue: getAmplifyUserAgent(),
98
+ get userAgentValue() {
99
+ return getAmplifyUserAgent();
100
+ },
99
101
  useAccelerateEndpoint: false,
100
102
  uriEscapePath: false, // Required by S3. See https://github.com/aws/aws-sdk-js-v3/blob/9ba012dfa3a3429aa2db0f90b3b0b3a7a31f9bc3/packages/signature-v4/src/SignatureV4.ts#L76-L83
101
103
  };
@@ -1 +1 @@
1
- {"version":3,"file":"base.mjs","sources":["../../../../../../../src/providers/s3/utils/client/s3data/base.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyUrl, getAmplifyUserAgent, } from '@aws-amplify/core/internals/utils';\nimport { getDnsSuffix, jitteredBackoff, } from '@aws-amplify/core/internals/aws-client-utils';\nimport { createRetryDecider, createXmlErrorParser } from '../utils';\nimport { LOCAL_TESTING_S3_ENDPOINT } from '../../constants';\nimport { assertValidationError } from '../../../../../errors/utils/assertValidationError';\nimport { StorageValidationErrorCode } from '../../../../../errors/types/validation';\nconst DOMAIN_PATTERN = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/;\nconst IP_ADDRESS_PATTERN = /(\\d+\\.){3}\\d+/;\nconst DOTS_PATTERN = /\\.\\./;\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nexport const SERVICE_NAME = 's3';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region, and input parameters.\n */\nconst endpointResolver = (options, apiInput) => {\n const { region, useAccelerateEndpoint, customEndpoint, forcePathStyle } = options;\n let endpoint;\n // 1. get base endpoint\n if (customEndpoint) {\n if (customEndpoint === LOCAL_TESTING_S3_ENDPOINT) {\n endpoint = new AmplifyUrl(customEndpoint);\n }\n assertValidationError(!customEndpoint.includes('://'), StorageValidationErrorCode.InvalidCustomEndpoint);\n endpoint = new AmplifyUrl(`https://${customEndpoint}`);\n }\n else if (useAccelerateEndpoint) {\n // this ErrorCode isn't expose yet since forcePathStyle param isn't publicly exposed\n assertValidationError(!forcePathStyle, StorageValidationErrorCode.ForcePathStyleEndpointNotSupported);\n endpoint = new AmplifyUrl(`https://s3-accelerate.${getDnsSuffix(region)}`);\n }\n else {\n endpoint = new AmplifyUrl(`https://s3.${region}.${getDnsSuffix(region)}`);\n }\n // 2. inject bucket name\n if (apiInput?.Bucket) {\n assertValidationError(isDnsCompatibleBucketName(apiInput.Bucket), StorageValidationErrorCode.DnsIncompatibleBucketName);\n if (forcePathStyle || apiInput.Bucket.includes('.')) {\n endpoint.pathname = `/${apiInput.Bucket}`;\n }\n else {\n endpoint.host = `${apiInput.Bucket}.${endpoint.host}`;\n }\n }\n return { url: endpoint };\n};\n/**\n * Determines whether a given string is DNS compliant per the rules outlined by\n * S3. Length, capitaization, and leading dot restrictions are enforced by the\n * DOMAIN_PATTERN regular expression.\n * @internal\n *\n * @see https://github.com/aws/aws-sdk-js-v3/blob/f2da6182298d4d6b02e84fb723492c07c27469a8/packages/middleware-bucket-endpoint/src/bucketHostnameUtils.ts#L39-L48\n * @see https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html\n */\nexport const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) &&\n !IP_ADDRESS_PATTERN.test(bucketName) &&\n !DOTS_PATTERN.test(bucketName);\n/**\n * Error parser for the XML payload of S3 data plane error response. The error's\n * `Code` and `Message` locates directly at the XML root element.\n *\n * @example\n * ```\n * <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n * \t<Error>\n * \t\t<Code>NoSuchKey</Code>\n * \t\t<Message>The resource you requested does not exist</Message>\n * \t\t<Resource>/mybucket/myfoto.jpg</Resource>\n * \t\t<RequestId>4442587FB7D0A2F9</RequestId>\n * \t</Error>\n * \t```\n *\n * @internal\n */\nexport const parseXmlError = createXmlErrorParser({ noErrorWrapping: true });\n/**\n * @internal\n */\nexport const retryDecider = createRetryDecider(parseXmlError);\n/**\n * @internal\n */\nexport const defaultConfig = {\n service: SERVICE_NAME,\n endpointResolver,\n retryDecider,\n computeDelay: jitteredBackoff,\n userAgentValue: getAmplifyUserAgent(),\n useAccelerateEndpoint: false,\n uriEscapePath: false, // Required by S3. See https://github.com/aws/aws-sdk-js-v3/blob/9ba012dfa3a3429aa2db0f90b3b0b3a7a31f9bc3/packages/signature-v4/src/SignatureV4.ts#L76-L83\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AACA;AAOA,MAAM,cAAc,GAAG,oCAAoC;AAC3D,MAAM,kBAAkB,GAAG,eAAe;AAC1C,MAAM,YAAY,GAAG,MAAM;AAC3B;AACA;AACA;AACY,MAAC,YAAY,GAAG;AAC5B;AACA;AACA;AACA,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,QAAQ,KAAK;AAChD,IAAI,MAAM,EAAE,MAAM,EAAE,qBAAqB,EAAE,cAAc,EAAE,cAAc,EAAE,GAAG,OAAO;AACrF,IAAI,IAAI,QAAQ;AAChB;AACA,IAAI,IAAI,cAAc,EAAE;AACxB,QAAQ,IAAI,cAAc,KAAK,yBAAyB,EAAE;AAC1D,YAAY,QAAQ,GAAG,IAAI,UAAU,CAAC,cAAc,CAAC;AACrD;AACA,QAAQ,qBAAqB,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,0BAA0B,CAAC,qBAAqB,CAAC;AAChH,QAAQ,QAAQ,GAAG,IAAI,UAAU,CAAC,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC;AAC9D;AACA,SAAS,IAAI,qBAAqB,EAAE;AACpC;AACA,QAAQ,qBAAqB,CAAC,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A;AACY,MAAC,YAAY,GAAG,kBAAkB,CAAC,aAAa;AAC5D;AACA;AACA;AACY,MAAC,aAAa,GAAG;AAC7B,IAAI,OAAO,EAAE,YAAY;AACzB,IAAI,gBAAgB;AACpB,IAAI,YAAY;AAChB,IAAI,YAAY,EAAE,eAAe;AACjC,IAAI,cAAc,EAAE,mBAAmB,EAAE;AACzC,IAAI,qBAAqB,EAAE,KAAK;AAChC,IAAI,aAAa,EAAE,KAAK;AACxB;;;;"}
1
+ {"version":3,"file":"base.mjs","sources":["../../../../../../../src/providers/s3/utils/client/s3data/base.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyUrl, getAmplifyUserAgent, } from '@aws-amplify/core/internals/utils';\nimport { getDnsSuffix, jitteredBackoff, } from '@aws-amplify/core/internals/aws-client-utils';\nimport { createRetryDecider, createXmlErrorParser } from '../utils';\nimport { LOCAL_TESTING_S3_ENDPOINT } from '../../constants';\nimport { assertValidationError } from '../../../../../errors/utils/assertValidationError';\nimport { StorageValidationErrorCode } from '../../../../../errors/types/validation';\nconst DOMAIN_PATTERN = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/;\nconst IP_ADDRESS_PATTERN = /(\\d+\\.){3}\\d+/;\nconst DOTS_PATTERN = /\\.\\./;\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nexport const SERVICE_NAME = 's3';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region, and input parameters.\n */\nconst endpointResolver = (options, apiInput) => {\n const { region, useAccelerateEndpoint, customEndpoint, forcePathStyle } = options;\n let endpoint;\n // 1. get base endpoint\n if (customEndpoint) {\n if (customEndpoint === LOCAL_TESTING_S3_ENDPOINT) {\n endpoint = new AmplifyUrl(customEndpoint);\n }\n assertValidationError(!customEndpoint.includes('://'), StorageValidationErrorCode.InvalidCustomEndpoint);\n endpoint = new AmplifyUrl(`https://${customEndpoint}`);\n }\n else if (useAccelerateEndpoint) {\n // this ErrorCode isn't expose yet since forcePathStyle param isn't publicly exposed\n assertValidationError(!forcePathStyle, StorageValidationErrorCode.ForcePathStyleEndpointNotSupported);\n endpoint = new AmplifyUrl(`https://s3-accelerate.${getDnsSuffix(region)}`);\n }\n else {\n endpoint = new AmplifyUrl(`https://s3.${region}.${getDnsSuffix(region)}`);\n }\n // 2. inject bucket name\n if (apiInput?.Bucket) {\n assertValidationError(isDnsCompatibleBucketName(apiInput.Bucket), StorageValidationErrorCode.DnsIncompatibleBucketName);\n if (forcePathStyle || apiInput.Bucket.includes('.')) {\n endpoint.pathname = `/${apiInput.Bucket}`;\n }\n else {\n endpoint.host = `${apiInput.Bucket}.${endpoint.host}`;\n }\n }\n return { url: endpoint };\n};\n/**\n * Determines whether a given string is DNS compliant per the rules outlined by\n * S3. Length, capitaization, and leading dot restrictions are enforced by the\n * DOMAIN_PATTERN regular expression.\n * @internal\n *\n * @see https://github.com/aws/aws-sdk-js-v3/blob/f2da6182298d4d6b02e84fb723492c07c27469a8/packages/middleware-bucket-endpoint/src/bucketHostnameUtils.ts#L39-L48\n * @see https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html\n */\nexport const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) &&\n !IP_ADDRESS_PATTERN.test(bucketName) &&\n !DOTS_PATTERN.test(bucketName);\n/**\n * Error parser for the XML payload of S3 data plane error response. The error's\n * `Code` and `Message` locates directly at the XML root element.\n *\n * @example\n * ```\n * <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n * \t<Error>\n * \t\t<Code>NoSuchKey</Code>\n * \t\t<Message>The resource you requested does not exist</Message>\n * \t\t<Resource>/mybucket/myfoto.jpg</Resource>\n * \t\t<RequestId>4442587FB7D0A2F9</RequestId>\n * \t</Error>\n * \t```\n *\n * @internal\n */\nexport const parseXmlError = createXmlErrorParser({ noErrorWrapping: true });\n/**\n * @internal\n */\nexport const retryDecider = createRetryDecider(parseXmlError);\n/**\n * @internal\n */\nexport const defaultConfig = {\n service: SERVICE_NAME,\n endpointResolver,\n retryDecider,\n computeDelay: jitteredBackoff,\n get userAgentValue() {\n return getAmplifyUserAgent();\n },\n useAccelerateEndpoint: false,\n uriEscapePath: false, // Required by S3. See https://github.com/aws/aws-sdk-js-v3/blob/9ba012dfa3a3429aa2db0f90b3b0b3a7a31f9bc3/packages/signature-v4/src/SignatureV4.ts#L76-L83\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AACA;AAOA,MAAM,cAAc,GAAG,oCAAoC;AAC3D,MAAM,kBAAkB,GAAG,eAAe;AAC1C,MAAM,YAAY,GAAG,MAAM;AAC3B;AACA;AACA;AACY,MAAC,YAAY,GAAG;AAC5B;AACA;AACA;AACA,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,QAAQ,KAAK;AAChD,IAAI,MAAM,EAAE,MAAM,EAAE,qBAAqB,EAAE,cAAc,EAAE,cAAc,EAAE,GAAG,OAAO;AACrF,IAAI,IAAI,QAAQ;AAChB;AACA,IAAI,IAAI,cAAc,EAAE;AACxB,QAAQ,IAAI,cAAc,KAAK,yBAAyB,EAAE;AAC1D,YAAY,QAAQ,GAAG,IAAI,UAAU,CAAC,cAAc,CAAC;AACrD;AACA,QAAQ,qBAAqB,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,0BAA0B,CAAC,qBAAqB,CAAC;AAChH,QAAQ,QAAQ,GAAG,IAAI,UAAU,CAAC,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC;AAC9D;AACA,SAAS,IAAI,qBAAqB,EAAE;AACpC;AACA,QAAQ,qBAAqB,CAAC,CAAC,cAAc,EAAE,0BAA0B,CAAC,kCAAkC,CAAC;AAC7G,QAAQ,QAAQ,GAAG,IAAI,UAAU,CAAC,CAAC,sBAAsB,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAClF;AACA,SAAS;AACT,QAAQ,QA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ACjC,IAAI,IAAI,cAAc,GAAG;AACzB,QAAQ,OAAO,mBAAmB,EAAE;AACpC,KAAK;AACL,IAAI,qBAAqB,EAAE,KAAK;AAChC,IAAI,aAAa,EAAE,KAAK;AACxB;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/storage",
3
- "version": "6.9.2-unstable.43e28a6.0+43e28a6",
3
+ "version": "6.9.2-unstable.f94a30b.0+f94a30b",
4
4
  "description": "Storage category of aws-amplify",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.mjs",
@@ -108,12 +108,12 @@
108
108
  "./package.json": "./package.json"
109
109
  },
110
110
  "peerDependencies": {
111
- "@aws-amplify/core": "6.12.2-unstable.43e28a6.0+43e28a6"
111
+ "@aws-amplify/core": "6.12.2-unstable.f94a30b.0+f94a30b"
112
112
  },
113
113
  "devDependencies": {
114
- "@aws-amplify/core": "6.12.2-unstable.43e28a6.0+43e28a6",
115
- "@aws-amplify/react-native": "1.1.11-unstable.43e28a6.0+43e28a6",
114
+ "@aws-amplify/core": "6.12.2-unstable.f94a30b.0+f94a30b",
115
+ "@aws-amplify/react-native": "1.1.11-unstable.f94a30b.0+f94a30b",
116
116
  "@types/node": "20.14.12"
117
117
  },
118
- "gitHead": "43e28a6e4393ea50d2ec6857ffb1cbbf8256b75d"
118
+ "gitHead": "f94a30b71e4e5abbce1ad8c215fbb67386721bff"
119
119
  }
@@ -107,6 +107,8 @@ export const defaultConfig = {
107
107
  endpointResolver,
108
108
  retryDecider,
109
109
  computeDelay: jitteredBackoff,
110
- userAgentValue: getAmplifyUserAgent(),
110
+ get userAgentValue() {
111
+ return getAmplifyUserAgent();
112
+ },
111
113
  uriEscapePath: false, // Required by S3. See https://github.com/aws/aws-sdk-js-v3/blob/9ba012dfa3a3429aa2db0f90b3b0b3a7a31f9bc3/packages/signature-v4/src/SignatureV4.ts#L76-L83
112
114
  };
@@ -153,7 +153,9 @@ export const defaultConfig = {
153
153
  endpointResolver,
154
154
  retryDecider,
155
155
  computeDelay: jitteredBackoff,
156
- userAgentValue: getAmplifyUserAgent(),
156
+ get userAgentValue() {
157
+ return getAmplifyUserAgent();
158
+ },
157
159
  useAccelerateEndpoint: false,
158
160
  uriEscapePath: false, // Required by S3. See https://github.com/aws/aws-sdk-js-v3/blob/9ba012dfa3a3429aa2db0f90b3b0b3a7a31f9bc3/packages/signature-v4/src/SignatureV4.ts#L76-L83
159
161
  };