@aws-amplify/storage 6.7.16-unstable.81afde8.0 → 6.7.16-unstable.980e3f8.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.
Files changed (216) hide show
  1. package/dist/cjs/errors/CanceledError.js.map +1 -1
  2. package/dist/cjs/errors/IntegrityError.js.map +1 -1
  3. package/dist/cjs/errors/StorageError.js.map +1 -1
  4. package/dist/cjs/errors/constants.js.map +1 -1
  5. package/dist/cjs/errors/types/validation.js.map +1 -1
  6. package/dist/cjs/errors/utils/assertValidationError.js.map +1 -1
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/cjs/internals/apis/copy.js.map +1 -1
  9. package/dist/cjs/internals/apis/downloadData.js.map +1 -1
  10. package/dist/cjs/internals/apis/getDataAccess.js.map +1 -1
  11. package/dist/cjs/internals/apis/getProperties.js.map +1 -1
  12. package/dist/cjs/internals/apis/getUrl.js.map +1 -1
  13. package/dist/cjs/internals/apis/list.js.map +1 -1
  14. package/dist/cjs/internals/apis/listCallerAccessGrants.js.map +1 -1
  15. package/dist/cjs/internals/apis/listPaths/getHighestPrecedenceUserGroup.js.map +1 -1
  16. package/dist/cjs/internals/apis/listPaths/index.js.map +1 -1
  17. package/dist/cjs/internals/apis/listPaths/listPaths.js.map +1 -1
  18. package/dist/cjs/internals/apis/listPaths/resolveLocationsForCurrentSession.js.map +1 -1
  19. package/dist/cjs/internals/apis/remove.js.map +1 -1
  20. package/dist/cjs/internals/apis/uploadData.js.map +1 -1
  21. package/dist/cjs/internals/index.js.map +1 -1
  22. package/dist/cjs/internals/utils/constants.js.map +1 -1
  23. package/dist/cjs/providers/s3/apis/copy.js.map +1 -1
  24. package/dist/cjs/providers/s3/apis/downloadData.js.map +1 -1
  25. package/dist/cjs/providers/s3/apis/getProperties.js.map +1 -1
  26. package/dist/cjs/providers/s3/apis/getUrl.js.map +1 -1
  27. package/dist/cjs/providers/s3/apis/index.js.map +1 -1
  28. package/dist/cjs/providers/s3/apis/internal/copy.js.map +1 -1
  29. package/dist/cjs/providers/s3/apis/internal/downloadData.js.map +1 -1
  30. package/dist/cjs/providers/s3/apis/internal/getProperties.js.map +1 -1
  31. package/dist/cjs/providers/s3/apis/internal/getUrl.js.map +1 -1
  32. package/dist/cjs/providers/s3/apis/internal/list.js.map +1 -1
  33. package/dist/cjs/providers/s3/apis/internal/remove.js.map +1 -1
  34. package/dist/cjs/providers/s3/apis/internal/uploadData/byteLength.js.map +1 -1
  35. package/dist/cjs/providers/s3/apis/internal/uploadData/index.js.map +1 -1
  36. package/dist/cjs/providers/s3/apis/internal/uploadData/multipart/calculatePartSize.js.map +1 -1
  37. package/dist/cjs/providers/s3/apis/internal/uploadData/multipart/getDataChunker.js.map +1 -1
  38. package/dist/cjs/providers/s3/apis/internal/uploadData/multipart/index.js.map +1 -1
  39. package/dist/cjs/providers/s3/apis/internal/uploadData/multipart/initialUpload.js.map +1 -1
  40. package/dist/cjs/providers/s3/apis/internal/uploadData/multipart/progressTracker.js.map +1 -1
  41. package/dist/cjs/providers/s3/apis/internal/uploadData/multipart/uploadCache.js.map +1 -1
  42. package/dist/cjs/providers/s3/apis/internal/uploadData/multipart/uploadHandlers.js.map +1 -1
  43. package/dist/cjs/providers/s3/apis/internal/uploadData/multipart/uploadPartExecutor.js.map +1 -1
  44. package/dist/cjs/providers/s3/apis/internal/uploadData/putObjectJob.js.map +1 -1
  45. package/dist/cjs/providers/s3/apis/list.js.map +1 -1
  46. package/dist/cjs/providers/s3/apis/remove.js.map +1 -1
  47. package/dist/cjs/providers/s3/apis/server/copy.js.map +1 -1
  48. package/dist/cjs/providers/s3/apis/server/getProperties.js.map +1 -1
  49. package/dist/cjs/providers/s3/apis/server/getUrl.js.map +1 -1
  50. package/dist/cjs/providers/s3/apis/server/index.js.map +1 -1
  51. package/dist/cjs/providers/s3/apis/server/list.js.map +1 -1
  52. package/dist/cjs/providers/s3/apis/server/remove.js.map +1 -1
  53. package/dist/cjs/providers/s3/apis/uploadData.js.map +1 -1
  54. package/dist/cjs/providers/s3/index.js.map +1 -1
  55. package/dist/cjs/providers/s3/server.js.map +1 -1
  56. package/dist/cjs/providers/s3/utils/client/runtime/base64/index.browser.js.map +1 -1
  57. package/dist/cjs/providers/s3/utils/client/runtime/base64/index.native.js.map +1 -1
  58. package/dist/cjs/providers/s3/utils/client/runtime/constants.js.map +1 -1
  59. package/dist/cjs/providers/s3/utils/client/runtime/contentSha256middleware.js.map +1 -1
  60. package/dist/cjs/providers/s3/utils/client/runtime/index.browser.js.map +1 -1
  61. package/dist/cjs/providers/s3/utils/client/runtime/index.js.map +1 -1
  62. package/dist/cjs/providers/s3/utils/client/runtime/index.native.js.map +1 -1
  63. package/dist/cjs/providers/s3/utils/client/runtime/s3TransferHandler/fetch.js.map +1 -1
  64. package/dist/cjs/providers/s3/utils/client/runtime/s3TransferHandler/xhr.js.map +1 -1
  65. package/dist/cjs/providers/s3/utils/client/runtime/xhrTransferHandler.js.map +1 -1
  66. package/dist/cjs/providers/s3/utils/client/runtime/xmlParser/dom.js.map +1 -1
  67. package/dist/cjs/providers/s3/utils/client/runtime/xmlParser/pureJs.js.map +1 -1
  68. package/dist/cjs/providers/s3/utils/client/s3control/base.js.map +1 -1
  69. package/dist/cjs/providers/s3/utils/client/s3control/getDataAccess.js.map +1 -1
  70. package/dist/cjs/providers/s3/utils/client/s3control/index.js.map +1 -1
  71. package/dist/cjs/providers/s3/utils/client/s3control/listCallerAccessGrants.js.map +1 -1
  72. package/dist/cjs/providers/s3/utils/client/s3data/abortMultipartUpload.js.map +1 -1
  73. package/dist/cjs/providers/s3/utils/client/s3data/base.js.map +1 -1
  74. package/dist/cjs/providers/s3/utils/client/s3data/completeMultipartUpload.js.map +1 -1
  75. package/dist/cjs/providers/s3/utils/client/s3data/copyObject.js.map +1 -1
  76. package/dist/cjs/providers/s3/utils/client/s3data/createMultipartUpload.js.map +1 -1
  77. package/dist/cjs/providers/s3/utils/client/s3data/deleteObject.js.map +1 -1
  78. package/dist/cjs/providers/s3/utils/client/s3data/getObject.js.map +1 -1
  79. package/dist/cjs/providers/s3/utils/client/s3data/headObject.js.map +1 -1
  80. package/dist/cjs/providers/s3/utils/client/s3data/index.js.map +1 -1
  81. package/dist/cjs/providers/s3/utils/client/s3data/listObjectsV2.js.map +1 -1
  82. package/dist/cjs/providers/s3/utils/client/s3data/listParts.js.map +1 -1
  83. package/dist/cjs/providers/s3/utils/client/s3data/putObject.js.map +1 -1
  84. package/dist/cjs/providers/s3/utils/client/s3data/uploadPart.js.map +1 -1
  85. package/dist/cjs/providers/s3/utils/client/utils/createRetryDecider.js.map +1 -1
  86. package/dist/cjs/providers/s3/utils/client/utils/deserializeHelpers.js.map +1 -1
  87. package/dist/cjs/providers/s3/utils/client/utils/index.js.map +1 -1
  88. package/dist/cjs/providers/s3/utils/client/utils/integrityHelpers.js.map +1 -1
  89. package/dist/cjs/providers/s3/utils/client/utils/parsePayload.js.map +1 -1
  90. package/dist/cjs/providers/s3/utils/client/utils/serializeHelpers.js.map +1 -1
  91. package/dist/cjs/providers/s3/utils/constants.js.map +1 -1
  92. package/dist/cjs/providers/s3/utils/constructContentDisposition.js.map +1 -1
  93. package/dist/cjs/providers/s3/utils/crc32.js.map +1 -1
  94. package/dist/cjs/providers/s3/utils/getCombinedCrc32.js.map +1 -1
  95. package/dist/cjs/providers/s3/utils/getCombinedCrc32.native.js.map +1 -1
  96. package/dist/cjs/providers/s3/utils/hexUtils.js.map +1 -1
  97. package/dist/cjs/providers/s3/utils/index.js.map +1 -1
  98. package/dist/cjs/providers/s3/utils/isInputWithPath.js.map +1 -1
  99. package/dist/cjs/providers/s3/utils/md5.js.map +1 -1
  100. package/dist/cjs/providers/s3/utils/readFile.js.map +1 -1
  101. package/dist/cjs/providers/s3/utils/readFile.native.js.map +1 -1
  102. package/dist/cjs/providers/s3/utils/resolveIdentityId.js.map +1 -1
  103. package/dist/cjs/providers/s3/utils/resolveS3ConfigAndInput.js.map +1 -1
  104. package/dist/cjs/providers/s3/utils/transferTask.js.map +1 -1
  105. package/dist/cjs/providers/s3/utils/urlDecoder.js.map +1 -1
  106. package/dist/cjs/providers/s3/utils/userAgent.js.map +1 -1
  107. package/dist/cjs/providers/s3/utils/validateBucketOwnerID.js.map +1 -1
  108. package/dist/cjs/providers/s3/utils/validateMultipartUploadXML.js.map +1 -1
  109. package/dist/cjs/providers/s3/utils/validateObjectUrl.js.map +1 -1
  110. package/dist/cjs/providers/s3/utils/validateStorageOperationInput.js.map +1 -1
  111. package/dist/cjs/providers/s3/utils/validateStorageOperationInputWithPrefix.js.map +1 -1
  112. package/dist/cjs/server.js.map +1 -1
  113. package/dist/cjs/utils/index.js.map +1 -1
  114. package/dist/cjs/utils/logger.js.map +1 -1
  115. package/dist/cjs/utils/resolvePrefix.js.map +1 -1
  116. package/dist/esm/errors/CanceledError.mjs.map +1 -1
  117. package/dist/esm/errors/IntegrityError.mjs.map +1 -1
  118. package/dist/esm/errors/StorageError.mjs.map +1 -1
  119. package/dist/esm/errors/types/validation.mjs.map +1 -1
  120. package/dist/esm/errors/utils/assertValidationError.mjs.map +1 -1
  121. package/dist/esm/internals/apis/getDataAccess.mjs.map +1 -1
  122. package/dist/esm/internals/apis/list.mjs.map +1 -1
  123. package/dist/esm/internals/apis/listCallerAccessGrants.mjs.map +1 -1
  124. package/dist/esm/internals/apis/listPaths/getHighestPrecedenceUserGroup.mjs.map +1 -1
  125. package/dist/esm/internals/apis/listPaths/listPaths.mjs.map +1 -1
  126. package/dist/esm/internals/apis/listPaths/resolveLocationsForCurrentSession.mjs.map +1 -1
  127. package/dist/esm/internals/apis/uploadData.mjs.map +1 -1
  128. package/dist/esm/internals/utils/constants.mjs.map +1 -1
  129. package/dist/esm/providers/s3/apis/copy.mjs.map +1 -1
  130. package/dist/esm/providers/s3/apis/downloadData.mjs.map +1 -1
  131. package/dist/esm/providers/s3/apis/getProperties.mjs.map +1 -1
  132. package/dist/esm/providers/s3/apis/getUrl.mjs.map +1 -1
  133. package/dist/esm/providers/s3/apis/internal/copy.mjs.map +1 -1
  134. package/dist/esm/providers/s3/apis/internal/downloadData.mjs.map +1 -1
  135. package/dist/esm/providers/s3/apis/internal/getProperties.mjs.map +1 -1
  136. package/dist/esm/providers/s3/apis/internal/getUrl.mjs +1 -1
  137. package/dist/esm/providers/s3/apis/internal/getUrl.mjs.map +1 -1
  138. package/dist/esm/providers/s3/apis/internal/list.mjs.map +1 -1
  139. package/dist/esm/providers/s3/apis/internal/remove.mjs.map +1 -1
  140. package/dist/esm/providers/s3/apis/internal/uploadData/byteLength.mjs.map +1 -1
  141. package/dist/esm/providers/s3/apis/internal/uploadData/index.mjs.map +1 -1
  142. package/dist/esm/providers/s3/apis/internal/uploadData/multipart/calculatePartSize.mjs.map +1 -1
  143. package/dist/esm/providers/s3/apis/internal/uploadData/multipart/getDataChunker.mjs +1 -1
  144. package/dist/esm/providers/s3/apis/internal/uploadData/multipart/getDataChunker.mjs.map +1 -1
  145. package/dist/esm/providers/s3/apis/internal/uploadData/multipart/initialUpload.mjs.map +1 -1
  146. package/dist/esm/providers/s3/apis/internal/uploadData/multipart/progressTracker.mjs.map +1 -1
  147. package/dist/esm/providers/s3/apis/internal/uploadData/multipart/uploadCache.mjs.map +1 -1
  148. package/dist/esm/providers/s3/apis/internal/uploadData/multipart/uploadHandlers.mjs +1 -1
  149. package/dist/esm/providers/s3/apis/internal/uploadData/multipart/uploadHandlers.mjs.map +1 -1
  150. package/dist/esm/providers/s3/apis/internal/uploadData/multipart/uploadPartExecutor.mjs.map +1 -1
  151. package/dist/esm/providers/s3/apis/internal/uploadData/putObjectJob.mjs.map +1 -1
  152. package/dist/esm/providers/s3/apis/list.mjs.map +1 -1
  153. package/dist/esm/providers/s3/apis/remove.mjs.map +1 -1
  154. package/dist/esm/providers/s3/apis/server/copy.mjs.map +1 -1
  155. package/dist/esm/providers/s3/apis/server/getProperties.mjs.map +1 -1
  156. package/dist/esm/providers/s3/apis/server/getUrl.mjs.map +1 -1
  157. package/dist/esm/providers/s3/apis/server/list.mjs.map +1 -1
  158. package/dist/esm/providers/s3/apis/server/remove.mjs.map +1 -1
  159. package/dist/esm/providers/s3/apis/uploadData.mjs.map +1 -1
  160. package/dist/esm/providers/s3/utils/client/runtime/base64/index.browser.mjs.map +1 -1
  161. package/dist/esm/providers/s3/utils/client/runtime/base64/index.native.mjs.map +1 -1
  162. package/dist/esm/providers/s3/utils/client/runtime/constants.mjs.map +1 -1
  163. package/dist/esm/providers/s3/utils/client/runtime/contentSha256middleware.mjs.map +1 -1
  164. package/dist/esm/providers/s3/utils/client/runtime/xhrTransferHandler.mjs +1 -1
  165. package/dist/esm/providers/s3/utils/client/runtime/xhrTransferHandler.mjs.map +1 -1
  166. package/dist/esm/providers/s3/utils/client/runtime/xmlParser/dom.mjs.map +1 -1
  167. package/dist/esm/providers/s3/utils/client/runtime/xmlParser/pureJs.mjs.map +1 -1
  168. package/dist/esm/providers/s3/utils/client/s3control/base.mjs.map +1 -1
  169. package/dist/esm/providers/s3/utils/client/s3control/getDataAccess.mjs.map +1 -1
  170. package/dist/esm/providers/s3/utils/client/s3control/listCallerAccessGrants.mjs.map +1 -1
  171. package/dist/esm/providers/s3/utils/client/s3data/abortMultipartUpload.mjs.map +1 -1
  172. package/dist/esm/providers/s3/utils/client/s3data/base.mjs.map +1 -1
  173. package/dist/esm/providers/s3/utils/client/s3data/completeMultipartUpload.mjs.map +1 -1
  174. package/dist/esm/providers/s3/utils/client/s3data/copyObject.mjs +1 -1
  175. package/dist/esm/providers/s3/utils/client/s3data/copyObject.mjs.map +1 -1
  176. package/dist/esm/providers/s3/utils/client/s3data/createMultipartUpload.mjs +1 -1
  177. package/dist/esm/providers/s3/utils/client/s3data/createMultipartUpload.mjs.map +1 -1
  178. package/dist/esm/providers/s3/utils/client/s3data/deleteObject.mjs.map +1 -1
  179. package/dist/esm/providers/s3/utils/client/s3data/getObject.mjs +1 -1
  180. package/dist/esm/providers/s3/utils/client/s3data/getObject.mjs.map +1 -1
  181. package/dist/esm/providers/s3/utils/client/s3data/headObject.mjs +1 -1
  182. package/dist/esm/providers/s3/utils/client/s3data/headObject.mjs.map +1 -1
  183. package/dist/esm/providers/s3/utils/client/s3data/listObjectsV2.mjs +1 -1
  184. package/dist/esm/providers/s3/utils/client/s3data/listObjectsV2.mjs.map +1 -1
  185. package/dist/esm/providers/s3/utils/client/s3data/listParts.mjs.map +1 -1
  186. package/dist/esm/providers/s3/utils/client/s3data/putObject.mjs +1 -1
  187. package/dist/esm/providers/s3/utils/client/s3data/putObject.mjs.map +1 -1
  188. package/dist/esm/providers/s3/utils/client/s3data/uploadPart.mjs.map +1 -1
  189. package/dist/esm/providers/s3/utils/client/utils/createRetryDecider.mjs.map +1 -1
  190. package/dist/esm/providers/s3/utils/client/utils/deserializeHelpers.mjs.map +1 -1
  191. package/dist/esm/providers/s3/utils/client/utils/integrityHelpers.mjs.map +1 -1
  192. package/dist/esm/providers/s3/utils/client/utils/parsePayload.mjs.map +1 -1
  193. package/dist/esm/providers/s3/utils/client/utils/serializeHelpers.mjs.map +1 -1
  194. package/dist/esm/providers/s3/utils/constants.mjs.map +1 -1
  195. package/dist/esm/providers/s3/utils/constructContentDisposition.mjs.map +1 -1
  196. package/dist/esm/providers/s3/utils/crc32.mjs +1 -1
  197. package/dist/esm/providers/s3/utils/crc32.mjs.map +1 -1
  198. package/dist/esm/providers/s3/utils/getCombinedCrc32.mjs.map +1 -1
  199. package/dist/esm/providers/s3/utils/getCombinedCrc32.native.mjs.map +1 -1
  200. package/dist/esm/providers/s3/utils/hexUtils.mjs.map +1 -1
  201. package/dist/esm/providers/s3/utils/isInputWithPath.mjs.map +1 -1
  202. package/dist/esm/providers/s3/utils/md5.mjs.map +1 -1
  203. package/dist/esm/providers/s3/utils/readFile.mjs.map +1 -1
  204. package/dist/esm/providers/s3/utils/readFile.native.mjs.map +1 -1
  205. package/dist/esm/providers/s3/utils/resolveIdentityId.mjs.map +1 -1
  206. package/dist/esm/providers/s3/utils/resolveS3ConfigAndInput.mjs.map +1 -1
  207. package/dist/esm/providers/s3/utils/transferTask.mjs.map +1 -1
  208. package/dist/esm/providers/s3/utils/urlDecoder.mjs.map +1 -1
  209. package/dist/esm/providers/s3/utils/userAgent.mjs.map +1 -1
  210. package/dist/esm/providers/s3/utils/validateBucketOwnerID.mjs.map +1 -1
  211. package/dist/esm/providers/s3/utils/validateMultipartUploadXML.mjs.map +1 -1
  212. package/dist/esm/providers/s3/utils/validateObjectUrl.mjs.map +1 -1
  213. package/dist/esm/providers/s3/utils/validateStorageOperationInput.mjs.map +1 -1
  214. package/dist/esm/providers/s3/utils/validateStorageOperationInputWithPrefix.mjs.map +1 -1
  215. package/dist/esm/utils/resolvePrefix.mjs.map +1 -1
  216. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"CanceledError.js","sources":["../../../src/errors/CanceledError.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.isCancelError = exports.CanceledError = void 0;\nconst StorageError_1 = require(\"./StorageError\");\n/**\n * Internal-only class for CanceledError thrown by XHR handler or multipart upload when cancellation is invoked\n * without overwriting behavior.\n *\n * @internal\n */\nclass CanceledError extends StorageError_1.StorageError {\n constructor(params = {}) {\n super({\n name: 'CanceledError',\n message: 'Upload is canceled by user',\n ...params,\n });\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = CanceledError;\n Object.setPrototypeOf(this, CanceledError.prototype);\n }\n}\nexports.CanceledError = CanceledError;\n/**\n * Check if an error is caused by user calling `cancel()` on a upload/download task. If an overwriting error is\n * supplied to `task.cancel(errorOverwrite)`, this function will return `false`.\n * @param {unknown} error The unknown exception to be checked.\n * @returns - A boolean indicating if the error was from an upload cancellation\n */\nconst isCancelError = (error) => !!error && error instanceof CanceledError;\nexports.isCancelError = isCancelError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AACvD,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,SAAS,cAAc,CAAC,YAAY,CAAC;AACxD,IAAI,WAAW,CAAC,MAAM,GAAG,EAAE,EAAE;AAC7B,QAAQ,KAAK,CAAC;AACd,YAAY,IAAI,EAAE,eAAe;AACjC,YAAY,OAAO,EAAE,4BAA4B;AACjD,YAAY,GAAG,MAAM;AACrB,SAAS,CAAC,CAAC;AACX;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;AACzC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;AAC7D,KAAK;AACL,CAAC;AACD,OAAO,CAAC,aAAa,GAAG,aAAa,CAAC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,KAAK,YAAY,aAAa,CAAC;AAC3E,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
1
+ {"version":3,"file":"CanceledError.js","sources":["../../../src/errors/CanceledError.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.isCancelError = exports.CanceledError = void 0;\nconst StorageError_1 = require(\"./StorageError\");\n/**\n * Internal-only class for CanceledError thrown by XHR handler or multipart upload when cancellation is invoked\n * without overwriting behavior.\n *\n * @internal\n */\nclass CanceledError extends StorageError_1.StorageError {\n constructor(params = {}) {\n super({\n name: 'CanceledError',\n message: 'Upload is canceled by user',\n ...params,\n });\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = CanceledError;\n Object.setPrototypeOf(this, CanceledError.prototype);\n }\n}\nexports.CanceledError = CanceledError;\n/**\n * Check if an error is caused by user calling `cancel()` on a upload/download task. If an overwriting error is\n * supplied to `task.cancel(errorOverwrite)`, this function will return `false`.\n * @param {unknown} error The unknown exception to be checked.\n * @returns - A boolean indicating if the error was from an upload cancellation\n */\nconst isCancelError = (error) => !!error && error instanceof CanceledError;\nexports.isCancelError = isCancelError;\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,aAAa,GAAG,MAAM;AACtD,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,SAAS,cAAc,CAAC,YAAY,CAAC;AACxD,IAAI,WAAW,CAAC,MAAM,GAAG,EAAE,EAAE;AAC7B,QAAQ,KAAK,CAAC;AACd,YAAY,IAAI,EAAE,eAAe;AACjC,YAAY,OAAO,EAAE,4BAA4B;AACjD,YAAY,GAAG,MAAM;AACrB,SAAS,CAAC;AACV;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,aAAa;AACxC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC;AAC5D;AACA;AACA,OAAO,CAAC,aAAa,GAAG,aAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,KAAK,YAAY,aAAa;AAC1E,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"IntegrityError.js","sources":["../../../src/errors/IntegrityError.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.IntegrityError = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst StorageError_1 = require(\"./StorageError\");\nclass IntegrityError extends StorageError_1.StorageError {\n constructor(params = {\n name: utils_1.AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n recoverySuggestion: 'This may be a bug. Please reach out to library authors.',\n }) {\n super(params);\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = IntegrityError;\n Object.setPrototypeOf(this, IntegrityError.prototype);\n }\n}\nexports.IntegrityError = IntegrityError;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,cAAc,GAAG,KAAK,CAAC,CAAC;AAChC;AACA;AACA,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACjD,MAAM,cAAc,SAAS,cAAc,CAAC,YAAY,CAAC;AACzD,IAAI,WAAW,CAAC,MAAM,GAAG;AACzB,QAAQ,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO;AAC9C,QAAQ,OAAO,EAAE,gCAAgC;AACjD,QAAQ,kBAAkB,EAAE,yDAAyD;AACrF,KAAK,EAAE;AACP,QAAQ,KAAK,CAAC,MAAM,CAAC,CAAC;AACtB;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC;AAC1C,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;AAC9D,KAAK;AACL,CAAC;AACD,OAAO,CAAC,cAAc,GAAG,cAAc;;"}
1
+ {"version":3,"file":"IntegrityError.js","sources":["../../../src/errors/IntegrityError.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.IntegrityError = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst StorageError_1 = require(\"./StorageError\");\nclass IntegrityError extends StorageError_1.StorageError {\n constructor(params = {\n name: utils_1.AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n recoverySuggestion: 'This may be a bug. Please reach out to library authors.',\n }) {\n super(params);\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = IntegrityError;\n Object.setPrototypeOf(this, IntegrityError.prototype);\n }\n}\nexports.IntegrityError = IntegrityError;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,cAAc,GAAG,MAAM;AAC/B;AACA;AACA,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;AAChD,MAAM,cAAc,SAAS,cAAc,CAAC,YAAY,CAAC;AACzD,IAAI,WAAW,CAAC,MAAM,GAAG;AACzB,QAAQ,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO;AAC9C,QAAQ,OAAO,EAAE,gCAAgC;AACjD,QAAQ,kBAAkB,EAAE,yDAAyD;AACrF,KAAK,EAAE;AACP,QAAQ,KAAK,CAAC,MAAM,CAAC;AACrB;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,cAAc;AACzC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC;AAC7D;AACA;AACA,OAAO,CAAC,cAAc,GAAG,cAAc;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"StorageError.js","sources":["../../../src/errors/StorageError.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StorageError = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nclass StorageError extends utils_1.AmplifyError {\n constructor(params) {\n super(params);\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = StorageError;\n Object.setPrototypeOf(this, StorageError.prototype);\n }\n}\nexports.StorageError = StorageError;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;AAC9B;AACA;AACA,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,YAAY,SAAS,OAAO,CAAC,YAAY,CAAC;AAChD,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC,CAAC;AACtB;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,YAAY,CAAC;AACxC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AAC5D,KAAK;AACL,CAAC;AACD,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
1
+ {"version":3,"file":"StorageError.js","sources":["../../../src/errors/StorageError.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StorageError = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nclass StorageError extends utils_1.AmplifyError {\n constructor(params) {\n super(params);\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = StorageError;\n Object.setPrototypeOf(this, StorageError.prototype);\n }\n}\nexports.StorageError = StorageError;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,YAAY,GAAG,MAAM;AAC7B;AACA;AACA,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,YAAY,SAAS,OAAO,CAAC,YAAY,CAAC;AAChD,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC;AACrB;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,YAAY;AACvC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC;AAC3D;AACA;AACA,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../src/errors/constants.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.INVALID_STORAGE_INPUT = void 0;\nexports.INVALID_STORAGE_INPUT = 'InvalidStorageInput';\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,qBAAqB,GAAG,KAAK,CAAC,CAAC;AACvC,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../src/errors/constants.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.INVALID_STORAGE_INPUT = void 0;\nexports.INVALID_STORAGE_INPUT = 'InvalidStorageInput';\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,MAAM;AACtC,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;;"}
@@ -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 = exports.StorageValidationErrorCode || (exports.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,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,0BAA0B,GAAG,KAAK,CAAC,CAAC;AACzE,IAAI,0BAA0B,CAAC;AAC/B,CAAC,UAAU,0BAA0B,EAAE;AACvC,IAAI,0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AK;AACL,IAAI,CAAC,0BAA0B,CAAC,yBAAyB,GAAG;AAC5D,QAAQ,OAAO,EAAE,CAAC,qCAAqC,CAAC;AACxD,KAAK;AACL,CAAC;;"}
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 || (exports.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,EAAE,CAAC;AAC7D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,0BAA0B,GAAG,MAAM;AACxE,IAAI,0BAA0B;AAC9B,CAAC,UAAU,0BAA0B,EAAE;AACvC,IAAI,0BAA0B,CAAC,eAAe,CAAC,GAAG,eAAe;AACjE,IAAI,0BAA0B,CAAC,cAAc,CAAC,GAAG,cAAc;AAC/D,IAAI,0BAA0B,C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C/D,QAAQ,OAAO,EAAE,mGAAmG;AACpH,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,mBAAmB,GAAG;AACtD,QAAQ,OAAO,EAAE,sCAAsC;AACvD,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,kCAAkC,GAAG;AACrE,QAAQ,OAAO,EAAE,6DAA6D;AAC9E,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,uBAAuB,GAAG;AAC1D,QAAQ,OAAO,EAAE,kDAAkD;AACnE,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,mCAAmC,GAAG;AACtE,QAAQ,OAAO,EAAE,0DAA0D;AAC3E,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,iCAAiC,GAAG;AACpE,QAAQ,OAAO,EAAE,CAAC,uDAAuD,CAAC;AAC1E,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,YAAY,GAAG;AAC/C,QAAQ,OAAO,EAAE,iBAAiB;AAClC,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,oBAAoB,GAAG;AACvD,QAAQ,OAAO,EAAE,sEAAsE;AACvF,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,iCAAiC,GAAG;AACpE,QAAQ,OAAO,EAAE,wDAAwD;AACzE,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,qBAAqB,GAAG;AACxD,QAAQ,OAAO,EAAE,6BAA6B;AAC9C,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,kCAAkC,GAAG;AACrE,QAAQ,OAAO,EAAE,kEAAkE;AACnF,KAAK;AACL,IAAI,CAAC,0BAA0B,CAAC,yBAAyB,GAAG;AAC5D,QAAQ,OAAO,EAAE,CAAC,qCAAqC,CAAC;AACxD,KAAK;AACL,CAAC;;"}
@@ -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 = void 0;\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}\nexports.assertValidationError = assertValidationError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,qBAAqB,GAAG,KAAK,CAAC,CAAC;AACvC,MAAM,YAAY,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACpD,MAAM,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAClD,SAAS,qBAAqB,CAAC,SAAS,EAAE,IAAI,EAAE;AAChD,IAAI,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAClF,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,MAAM,IAAI,cAAc,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC,CAAC;AACrF,KAAK;AACL,CAAC;AACD,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;;"}
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 = void 0;\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}\nexports.assertValidationError = assertValidationError;\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,MAAM;AACtC,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;AACA,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_PART_SIZE = exports.StorageError = exports.isCancelError = exports.getUrl = exports.copy = exports.getProperties = exports.list = exports.remove = exports.downloadData = exports.uploadData = void 0;\nvar s3_1 = require(\"./providers/s3\");\nObject.defineProperty(exports, \"uploadData\", { enumerable: true, get: function () { return s3_1.uploadData; } });\nObject.defineProperty(exports, \"downloadData\", { enumerable: true, get: function () { return s3_1.downloadData; } });\nObject.defineProperty(exports, \"remove\", { enumerable: true, get: function () { return s3_1.remove; } });\nObject.defineProperty(exports, \"list\", { enumerable: true, get: function () { return s3_1.list; } });\nObject.defineProperty(exports, \"getProperties\", { enumerable: true, get: function () { return s3_1.getProperties; } });\nObject.defineProperty(exports, \"copy\", { enumerable: true, get: function () { return s3_1.copy; } });\nObject.defineProperty(exports, \"getUrl\", { enumerable: true, get: function () { return s3_1.getUrl; } });\nvar CanceledError_1 = require(\"./errors/CanceledError\");\nObject.defineProperty(exports, \"isCancelError\", { enumerable: true, get: function () { return CanceledError_1.isCancelError; } });\nvar StorageError_1 = require(\"./errors/StorageError\");\nObject.defineProperty(exports, \"StorageError\", { enumerable: true, get: function () { return StorageError_1.StorageError; } });\nvar constants_1 = require(\"./providers/s3/utils/constants\");\nObject.defineProperty(exports, \"DEFAULT_PART_SIZE\", { enumerable: true, get: function () { return constants_1.DEFAULT_PART_SIZE; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,UAAU,GAAG,KAAK,CAAC,CAAC;AACtN,IAAI,IAAI,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACrC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC;AACjH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC;AACrH,MAAM,CAAC,cA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AAC/H,IAAI,WAAW,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;AAC5D,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,WAAW,CAAC,iBAAiB,CAAC,EAAE,EAAE,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_PART_SIZE = exports.StorageError = exports.isCancelError = exports.getUrl = exports.copy = exports.getProperties = exports.list = exports.remove = exports.downloadData = exports.uploadData = void 0;\nvar s3_1 = require(\"./providers/s3\");\nObject.defineProperty(exports, \"uploadData\", { enumerable: true, get: function () { return s3_1.uploadData; } });\nObject.defineProperty(exports, \"downloadData\", { enumerable: true, get: function () { return s3_1.downloadData; } });\nObject.defineProperty(exports, \"remove\", { enumerable: true, get: function () { return s3_1.remove; } });\nObject.defineProperty(exports, \"list\", { enumerable: true, get: function () { return s3_1.list; } });\nObject.defineProperty(exports, \"getProperties\", { enumerable: true, get: function () { return s3_1.getProperties; } });\nObject.defineProperty(exports, \"copy\", { enumerable: true, get: function () { return s3_1.copy; } });\nObject.defineProperty(exports, \"getUrl\", { enumerable: true, get: function () { return s3_1.getUrl; } });\nvar CanceledError_1 = require(\"./errors/CanceledError\");\nObject.defineProperty(exports, \"isCancelError\", { enumerable: true, get: function () { return CanceledError_1.isCancelError; } });\nvar StorageError_1 = require(\"./errors/StorageError\");\nObject.defineProperty(exports, \"StorageError\", { enumerable: true, get: function () { return StorageError_1.StorageError; } });\nvar constants_1 = require(\"./providers/s3/utils/constants\");\nObject.defineProperty(exports, \"DEFAULT_PART_SIZE\", { enumerable: true, get: function () { return constants_1.DEFAULT_PART_SIZE; } });\n"],"names":[],"mappings":";;AACA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,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;AACpG,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;AACxG,IAAI,eAAe,GAAG,OAAO,CAAC,wBAAwB,CAAC;AACvD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC;AACjI,IAAI,cAAc,GAAG,OAAO,CAAC,uBAAuB,CAAC;AACrD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,cAAc,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC;AAC9H,IAAI,WAAW,GAAG,OAAO,CAAC,gCAAgC,CAAC;AAC3D,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,WAAW,CAAC,iBAAiB,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"copy.js","sources":["../../../../src/internals/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 = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst copy_1 = require(\"../../providers/s3/apis/internal/copy\");\n/**\n * @internal\n */\nconst copy = (input) => (0, copy_1.copy)(core_1.Amplify, {\n source: {\n path: input.source.path,\n bucket: input.source.bucket,\n eTag: input.source.eTag,\n notModifiedSince: input.source.notModifiedSince,\n expectedBucketOwner: input.source.expectedBucketOwner,\n },\n destination: {\n path: input.destination.path,\n bucket: input.destination.bucket,\n expectedBucketOwner: input.destination.expectedBucketOwner,\n },\n options: {\n // Advanced options\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n customEndpoint: input?.options?.customEndpoint,\n },\n // Type casting is necessary because `copyInternal` 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});\nexports.copy = copy;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;AACtB,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,MAAM,GAAG,OAAO,CAAC,uCAAuC,CAAC,CAAC;AAChE;AACA;AACA;AACA,MAAM,IAAI,GAAG,CAAC,KAAK,KAAK,IAAI,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE;AACzD,IAAI,MAAM,EAAE;AACZ,QAAQ,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;AAC/B,QAAQ,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;AACnC,QAAQ,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;AAC/B,QAAQ,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB;AACvD,QAAQ,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,mBAAmB;AAC7D,KAAK;AACL,IAAI,WAAW,EAAE;AACjB,QAAQ,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI;AACpC,QAAQ,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,MAAM;AACxC,QAAQ,mBAAmB,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB;AAClE,KAAK;AACL,IAAI,OAAO,EAAE;AACb;AACA,QAAQ,2BAA2B,EAAE,KAAK,CAAC,OAAO,EAAE,2BAA2B;AAC/E,QAAQ,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc;AACtD,KAAK;AACL;AACA;AACA,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,IAAI,GAAG,IAAI;;"}
1
+ {"version":3,"file":"copy.js","sources":["../../../../src/internals/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 = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst copy_1 = require(\"../../providers/s3/apis/internal/copy\");\n/**\n * @internal\n */\nconst copy = (input) => (0, copy_1.copy)(core_1.Amplify, {\n source: {\n path: input.source.path,\n bucket: input.source.bucket,\n eTag: input.source.eTag,\n notModifiedSince: input.source.notModifiedSince,\n expectedBucketOwner: input.source.expectedBucketOwner,\n },\n destination: {\n path: input.destination.path,\n bucket: input.destination.bucket,\n expectedBucketOwner: input.destination.expectedBucketOwner,\n },\n options: {\n // Advanced options\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n customEndpoint: input?.options?.customEndpoint,\n },\n // Type casting is necessary because `copyInternal` 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});\nexports.copy = copy;\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,MAAM;AACrB,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,MAAM,GAAG,OAAO,CAAC,uCAAuC,CAAC;AAC/D;AACA;AACA;AACA,MAAM,IAAI,GAAG,CAAC,KAAK,KAAK,IAAI,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE;AACzD,IAAI,MAAM,EAAE;AACZ,QAAQ,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;AAC/B,QAAQ,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;AACnC,QAAQ,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;AAC/B,QAAQ,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB;AACvD,QAAQ,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,mBAAmB;AAC7D,KAAK;AACL,IAAI,WAAW,EAAE;AACjB,QAAQ,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI;AACpC,QAAQ,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,MAAM;AACxC,QAAQ,mBAAmB,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB;AAClE,KAAK;AACL,IAAI,OAAO,EAAE;AACb;AACA,QAAQ,2BAA2B,EAAE,KAAK,CAAC,OAAO,EAAE,2BAA2B;AAC/E,QAAQ,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc;AACtD,KAAK;AACL;AACA;AACA,CAAC,CAAC;AACF,OAAO,CAAC,IAAI,GAAG,IAAI;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"downloadData.js","sources":["../../../../src/internals/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 = void 0;\nconst downloadData_1 = require(\"../../providers/s3/apis/internal/downloadData\");\n/**\n * @internal\n */\nconst downloadData = (input) => (0, downloadData_1.downloadData)({\n path: input.path,\n options: {\n useAccelerateEndpoint: input?.options?.useAccelerateEndpoint,\n bucket: input?.options?.bucket,\n locationCredentialsProvider: input?.options?.locationCredentialsProvider,\n bytesRange: input?.options?.bytesRange,\n onProgress: input?.options?.onProgress,\n expectedBucketOwner: input?.options?.expectedBucketOwner,\n customEndpoint: input?.options?.customEndpoint,\n },\n // Type casting is necessary because `downloadDataInternal` 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});\nexports.downloadData = downloadData;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;AAC9B,MAAM,cAAc,GAAG,OAAO,CAAC,+CAA+C,CAAC,CAAC;AAChF;AACA;AACA;AACA,MAAM,YAAY,GAAG,CAAC,KAAK,KAAK,IAAI,cAAc,CAAC,YAAY,EAAE;AACjE,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI;AACpB,IAAI,OAAO,EAAE;AACb,QAAQ,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,qBAAqB;AACpE,QAAQ,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;AACtC,QAAQ,2BAA2B,EAAE,KAAK,EAAE,OAAO,EAAE,2BAA2B;AAChF,QAAQ,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU;AAC9C,QAAQ,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU;AAC9C,QAAQ,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB;AAChE,QAAQ,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc;AACtD,KAAK;AACL;AACA;AACA,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
1
+ {"version":3,"file":"downloadData.js","sources":["../../../../src/internals/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 = void 0;\nconst downloadData_1 = require(\"../../providers/s3/apis/internal/downloadData\");\n/**\n * @internal\n */\nconst downloadData = (input) => (0, downloadData_1.downloadData)({\n path: input.path,\n options: {\n useAccelerateEndpoint: input?.options?.useAccelerateEndpoint,\n bucket: input?.options?.bucket,\n locationCredentialsProvider: input?.options?.locationCredentialsProvider,\n bytesRange: input?.options?.bytesRange,\n onProgress: input?.options?.onProgress,\n expectedBucketOwner: input?.options?.expectedBucketOwner,\n customEndpoint: input?.options?.customEndpoint,\n },\n // Type casting is necessary because `downloadDataInternal` 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});\nexports.downloadData = downloadData;\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,MAAM;AAC7B,MAAM,cAAc,GAAG,OAAO,CAAC,+CAA+C,CAAC;AAC/E;AACA;AACA;AACA,MAAM,YAAY,GAAG,CAAC,KAAK,KAAK,IAAI,cAAc,CAAC,YAAY,EAAE;AACjE,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI;AACpB,IAAI,OAAO,EAAE;AACb,QAAQ,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,qBAAqB;AACpE,QAAQ,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;AACtC,QAAQ,2BAA2B,EAAE,KAAK,EAAE,OAAO,EAAE,2BAA2B;AAChF,QAAQ,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU;AAC9C,QAAQ,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU;AAC9C,QAAQ,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB;AAChE,QAAQ,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc;AACtD,KAAK;AACL;AACA;AACA,CAAC,CAAC;AACF,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getDataAccess.js","sources":["../../../../src/internals/apis/getDataAccess.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.getDataAccess = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst userAgent_1 = require(\"../../providers/s3/utils/userAgent\");\nconst s3control_1 = require(\"../../providers/s3/utils/client/s3control\");\nconst StorageError_1 = require(\"../../errors/StorageError\");\nconst utils_2 = require(\"../../utils\");\nconst constants_1 = require(\"../utils/constants\");\n/**\n * @internal\n */\nconst getDataAccess = async (input) => {\n const targetType = input.scope.endsWith('*') ? undefined : 'Object';\n const clientCredentialsProvider = async (options) => {\n const { credentials } = await input.credentialsProvider(options);\n return credentials;\n };\n const result = await (0, s3control_1.getDataAccess)({\n credentials: clientCredentialsProvider,\n customEndpoint: input.customEndpoint,\n region: input.region,\n userAgentValue: (0, userAgent_1.getStorageUserAgentValue)(utils_1.StorageAction.GetDataAccess),\n }, {\n AccountId: input.accountId,\n Target: input.scope,\n Permission: input.permission,\n TargetType: targetType,\n DurationSeconds: constants_1.DEFAULT_CRED_TTL,\n });\n const grantCredentials = result.Credentials;\n // Ensure that S3 returned credentials (this shouldn't happen)\n if (!grantCredentials ||\n !grantCredentials.AccessKeyId ||\n !grantCredentials.SecretAccessKey ||\n !grantCredentials.SessionToken ||\n !grantCredentials.Expiration) {\n throw new StorageError_1.StorageError({\n name: utils_1.AmplifyErrorCode.Unknown,\n message: 'Service did not return valid temporary credentials.',\n });\n }\n else {\n utils_2.logger.debug(`Retrieved credentials for: ${result.MatchedGrantTarget}`);\n }\n const { AccessKeyId: accessKeyId, SecretAccessKey: secretAccessKey, SessionToken: sessionToken, Expiration: expiration, } = grantCredentials;\n return {\n credentials: {\n accessKeyId,\n secretAccessKey,\n sessionToken,\n expiration,\n },\n scope: result.MatchedGrantTarget,\n };\n};\nexports.getDataAccess = getDataAccess;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,WAAW,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC;AAClE,MAAM,WAAW,GAAG,OAAO,CAAC,2CAA2C,CAAC,CAAC;AACzE,MAAM,cAAc,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAC5D,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACvC,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAClD;AACA;AACA;AACA,MAAM,aAAa,GAAG,OAAO,KAAK,KAAK;AACvC,IAAI,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,QAAQ,CAAC;AACxE,IAAI,MAAM,yBAAyB,GAAG,OAAO,OAAO,KAAK;AACzD,QAAQ,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,KAAK,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;AACzE,QAAQ,OAAO,WAAW,CAAC;AAC3B,KAAK,CAAC;AACN,IAAI,MAAM,MAAM,GAAG,MAAM,IAAI,WAAW,CAAC,aAAa,EAAE;AACxD,QAAQ,WAAW,EAAE,yBAAyB;AAC9C,QAAQ,cAAc,EAAE,KAAK,CAAC,cAAc;AAC5C,QAAQ,MAAM,EAAE,KAAK,CAAC,MAAM;AAC5B,QAAQ,cAAc,EAA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CAAC;AACF,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
1
+ {"version":3,"file":"getDataAccess.js","sources":["../../../../src/internals/apis/getDataAccess.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.getDataAccess = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst userAgent_1 = require(\"../../providers/s3/utils/userAgent\");\nconst s3control_1 = require(\"../../providers/s3/utils/client/s3control\");\nconst StorageError_1 = require(\"../../errors/StorageError\");\nconst utils_2 = require(\"../../utils\");\nconst constants_1 = require(\"../utils/constants\");\n/**\n * @internal\n */\nconst getDataAccess = async (input) => {\n const targetType = input.scope.endsWith('*') ? undefined : 'Object';\n const clientCredentialsProvider = async (options) => {\n const { credentials } = await input.credentialsProvider(options);\n return credentials;\n };\n const result = await (0, s3control_1.getDataAccess)({\n credentials: clientCredentialsProvider,\n customEndpoint: input.customEndpoint,\n region: input.region,\n userAgentValue: (0, userAgent_1.getStorageUserAgentValue)(utils_1.StorageAction.GetDataAccess),\n }, {\n AccountId: input.accountId,\n Target: input.scope,\n Permission: input.permission,\n TargetType: targetType,\n DurationSeconds: constants_1.DEFAULT_CRED_TTL,\n });\n const grantCredentials = result.Credentials;\n // Ensure that S3 returned credentials (this shouldn't happen)\n if (!grantCredentials ||\n !grantCredentials.AccessKeyId ||\n !grantCredentials.SecretAccessKey ||\n !grantCredentials.SessionToken ||\n !grantCredentials.Expiration) {\n throw new StorageError_1.StorageError({\n name: utils_1.AmplifyErrorCode.Unknown,\n message: 'Service did not return valid temporary credentials.',\n });\n }\n else {\n utils_2.logger.debug(`Retrieved credentials for: ${result.MatchedGrantTarget}`);\n }\n const { AccessKeyId: accessKeyId, SecretAccessKey: secretAccessKey, SessionToken: sessionToken, Expiration: expiration, } = grantCredentials;\n return {\n credentials: {\n accessKeyId,\n secretAccessKey,\n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AE,KAAK,CAAC,KAAK;AAC3B,QAAQ,UAAU,EAAE,KAAK,CAAC,UAAU;AACpC,QAAQ,UAAU,EAAE,UAAU;AAC9B,QAAQ,eAAe,EAAE,WAAW,CAAC,gBAAgB;AACrD,KAAK,CAAC;AACN,IAAI,MAAM,gBAAgB,GAAG,MAAM,CAAC,WAAW;AAC/C;AACA,IAAI,IAAI,CAAC,gBAAgB;AACzB,QAAQ,CAAC,gBAAgB,CAAC,WAAW;AACrC,QAAQ,CAAC,gBAAgB,CAAC,eAAe;AACzC,QAAQ,CAAC,gBAAgB,CAAC,YAAY;AACtC,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE;AACtC,QAAQ,MAAM,IAAI,cAAc,CAAC,YAAY,CAAC;AAC9C,YAAY,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO;AAClD,YAAY,OAAO,EAAE,qDAAqD;AAC1E,SAAS,CAAC;AACV;AACA,SAAS;AACT,QAAQ,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,2BAA2B,EAAE,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;AACvF;AACA,IAAI,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,GAAG,GAAG,gBAAgB;AAChJ,IAAI,OAAO;AACX,QAAQ,WAAW,EAAE;AACrB,YAAY,WAAW;AACvB,YAAY,eAAe;AAC3B,YAAY,YAAY;AACxB,YAAY,UAAU;AACtB,SAAS;AACT,QAAQ,KAAK,EAAE,MAAM,CAAC,kBAAkB;AACxC,KAAK;AACL,CAAC;AACD,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getProperties.js","sources":["../../../../src/internals/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 = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst getProperties_1 = require(\"../../providers/s3/apis/internal/getProperties\");\n/**\n * @internal\n */\nconst getProperties = (input) => (0, getProperties_1.getProperties)(core_1.Amplify, {\n path: input.path,\n options: {\n useAccelerateEndpoint: input?.options?.useAccelerateEndpoint,\n bucket: input?.options?.bucket,\n locationCredentialsProvider: input?.options?.locationCredentialsProvider,\n expectedBucketOwner: input?.options?.expectedBucketOwner,\n customEndpoint: input?.options?.customEndpoint,\n },\n // Type casting is necessary because `getPropertiesInternal` 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});\nexports.getProperties = getProperties;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/B,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,eAAe,GAAG,OAAO,CAAC,gDAAgD,CAAC,CAAC;AAClF;AACA;AACA;AACA,MAAM,aAAa,GAAG,CAAC,KAAK,KAAK,IAAI,eAAe,CAAC,aAAa,EAAE,MAAM,CAAC,OAAO,EAAE;AACpF,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI;AACpB,IAAI,OAAO,EAAE;AACb,QAAQ,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,qBAAqB;AACpE,QAAQ,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;AACtC,QAAQ,2BAA2B,EAAE,KAAK,EAAE,OAAO,EAAE,2BAA2B;AAChF,QAAQ,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB;AAChE,QAAQ,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc;AACtD,KAAK;AACL;AACA;AACA,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
1
+ {"version":3,"file":"getProperties.js","sources":["../../../../src/internals/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 = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst getProperties_1 = require(\"../../providers/s3/apis/internal/getProperties\");\n/**\n * @internal\n */\nconst getProperties = (input) => (0, getProperties_1.getProperties)(core_1.Amplify, {\n path: input.path,\n options: {\n useAccelerateEndpoint: input?.options?.useAccelerateEndpoint,\n bucket: input?.options?.bucket,\n locationCredentialsProvider: input?.options?.locationCredentialsProvider,\n expectedBucketOwner: input?.options?.expectedBucketOwner,\n customEndpoint: input?.options?.customEndpoint,\n },\n // Type casting is necessary because `getPropertiesInternal` 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});\nexports.getProperties = getProperties;\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,MAAM;AAC9B,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,eAAe,GAAG,OAAO,CAAC,gDAAgD,CAAC;AACjF;AACA;AACA;AACA,MAAM,aAAa,GAAG,CAAC,KAAK,KAAK,IAAI,eAAe,CAAC,aAAa,EAAE,MAAM,CAAC,OAAO,EAAE;AACpF,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI;AACpB,IAAI,OAAO,EAAE;AACb,QAAQ,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,qBAAqB;AACpE,QAAQ,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;AACtC,QAAQ,2BAA2B,EAAE,KAAK,EAAE,OAAO,EAAE,2BAA2B;AAChF,QAAQ,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB;AAChE,QAAQ,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc;AACtD,KAAK;AACL;AACA;AACA,CAAC,CAAC;AACF,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getUrl.js","sources":["../../../../src/internals/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 = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst getUrl_1 = require(\"../../providers/s3/apis/internal/getUrl\");\n/**\n * @internal\n */\nconst getUrl = (input) => (0, getUrl_1.getUrl)(core_1.Amplify, {\n path: input.path,\n options: {\n useAccelerateEndpoint: input?.options?.useAccelerateEndpoint,\n bucket: input?.options?.bucket,\n validateObjectExistence: input?.options?.validateObjectExistence,\n expiresIn: input?.options?.expiresIn,\n contentDisposition: input?.options?.contentDisposition,\n contentType: input?.options?.contentType,\n expectedBucketOwner: input?.options?.expectedBucketOwner,\n // Advanced options\n locationCredentialsProvider: input?.options?.locationCredentialsProvider,\n customEndpoint: input?.options?.customEndpoint,\n },\n // Type casting is necessary because `getPropertiesInternal` 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});\nexports.getUrl = getUrl;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;AACxB,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,OAAO,CAAC,yCAAyC,CAAC,CAAC;AACpE;AACA;AACA;AACA,MAAM,MAAM,GAAG,CAAC,KAAK,KAAK,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE;AAC/D,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI;AACpB,IAAI,OAAO,EAAE;AACb,QAAQ,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,qBAAqB;AACpE,QAAQ,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;AACtC,QAAQ,uBAAuB,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAuB;AACxE,QAAQ,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS;AAC5C,QAAQ,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,kBAAkB;AAC9D,QAAQ,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;AAChD,QAAQ,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB;AAChE;AACA,QAAQ,2BAA2B,EAAE,KAAK,EAAE,OAAO,EAAE,2BAA2B;AAChF,QAAQ,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc;AACtD,KAAK;AACL;AACA;AACA,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,MAAM,GAAG,MAAM;;"}
1
+ {"version":3,"file":"getUrl.js","sources":["../../../../src/internals/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 = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst getUrl_1 = require(\"../../providers/s3/apis/internal/getUrl\");\n/**\n * @internal\n */\nconst getUrl = (input) => (0, getUrl_1.getUrl)(core_1.Amplify, {\n path: input.path,\n options: {\n useAccelerateEndpoint: input?.options?.useAccelerateEndpoint,\n bucket: input?.options?.bucket,\n validateObjectExistence: input?.options?.validateObjectExistence,\n expiresIn: input?.options?.expiresIn,\n contentDisposition: input?.options?.contentDisposition,\n contentType: input?.options?.contentType,\n expectedBucketOwner: input?.options?.expectedBucketOwner,\n // Advanced options\n locationCredentialsProvider: input?.options?.locationCredentialsProvider,\n customEndpoint: input?.options?.customEndpoint,\n },\n // Type casting is necessary because `getPropertiesInternal` 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});\nexports.getUrl = getUrl;\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,yCAAyC,CAAC;AACnE;AACA;AACA;AACA,MAAM,MAAM,GAAG,CAAC,KAAK,KAAK,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE;AAC/D,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI;AACpB,IAAI,OAAO,EAAE;AACb,QAAQ,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,qBAAqB;AACpE,QAAQ,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;AACtC,QAAQ,uBAAuB,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAuB;AACxE,QAAQ,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS;AAC5C,QAAQ,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,kBAAkB;AAC9D,QAAQ,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;AAChD,QAAQ,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB;AAChE;AACA,QAAQ,2BAA2B,EAAE,KAAK,EAAE,OAAO,EAAE,2BAA2B;AAChF,QAAQ,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc;AACtD,KAAK;AACL;AACA;AACA,CAAC,CAAC;AACF,OAAO,CAAC,MAAM,GAAG,MAAM;;"}
@@ -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 = void 0;\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}\nexports.list = list;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;AACtB,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,MAAM,GAAG,OAAO,CAAC,uCAAuC,CAAC,CAAC;AAChE;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,CAAC;AACP,CAAC;AACD,OAAO,CAAC,IAAI,GAAG,IAAI;;"}
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 = void 0;\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}\nexports.list = list;\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,MAAM;AACrB,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;AACA,OAAO,CAAC,IAAI,GAAG,IAAI;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"listCallerAccessGrants.js","sources":["../../../../src/internals/apis/listCallerAccessGrants.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.listCallerAccessGrants = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst utils_2 = require(\"../../utils\");\nconst s3control_1 = require(\"../../providers/s3/utils/client/s3control\");\nconst StorageError_1 = require(\"../../errors/StorageError\");\nconst userAgent_1 = require(\"../../providers/s3/utils/userAgent\");\nconst constants_1 = require(\"../utils/constants\");\n/**\n * @internal\n */\nconst listCallerAccessGrants = async (input) => {\n const { credentialsProvider, accountId, region, nextToken, pageSize, customEndpoint, } = input;\n utils_2.logger.debug(`listing available locations from account ${input.accountId}`);\n if (!!pageSize && pageSize > constants_1.MAX_PAGE_SIZE) {\n utils_2.logger.debug(`defaulting pageSize to ${constants_1.MAX_PAGE_SIZE}.`);\n }\n const clientCredentialsProvider = async (options) => {\n const { credentials } = await credentialsProvider(options);\n return credentials;\n };\n const { CallerAccessGrantsList, NextToken } = await (0, s3control_1.listCallerAccessGrants)({\n credentials: clientCredentialsProvider,\n customEndpoint,\n region,\n userAgentValue: (0, userAgent_1.getStorageUserAgentValue)(utils_1.StorageAction.ListCallerAccessGrants),\n }, {\n AccountId: accountId,\n NextToken: nextToken,\n MaxResults: pageSize ?? constants_1.MAX_PAGE_SIZE,\n AllowedByApplication: true,\n });\n const accessGrants = CallerAccessGrantsList?.map(grant => {\n assertGrantScope(grant.GrantScope);\n return {\n scope: grant.GrantScope,\n permission: grant.Permission,\n type: parseGrantType(grant.GrantScope),\n };\n }) ?? [];\n return {\n locations: accessGrants,\n nextToken: NextToken,\n };\n};\nexports.listCallerAccessGrants = listCallerAccessGrants;\nconst parseGrantType = (grantScope) => {\n const bucketScopeReg = /^s3:\\/\\/(.*)\\/\\*$/;\n const possibleBucketName = grantScope.match(bucketScopeReg)?.[1];\n if (!grantScope.endsWith('*')) {\n return 'OBJECT';\n }\n else if (grantScope.endsWith('/*') &&\n possibleBucketName &&\n possibleBucketName.indexOf('/') === -1) {\n return 'BUCKET';\n }\n else {\n return 'PREFIX';\n }\n};\nfunction assertGrantScope(value) {\n if (typeof value !== 'string' || !value.startsWith('s3://')) {\n throw new StorageError_1.StorageError({\n name: 'InvalidGrantScope',\n message: `Expected a valid grant scope, got ${value}`,\n });\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,sBAAsB,GAAG,KAAK,CAAC,CAAC;AACxC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACvC,MAAM,WAAW,GAAG,OAAO,CAAC,2CAA2C,CAAC,CAAC;AACzE,MAAM,cAAc,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAC5D,MAAM,WAAW,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC;AAClE,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAClD;AACA;AACA;AACA,MAAM,sBAAsB,GAAG,OAAO,KAAK,KAAK;AAChD,IAAI,MAAM,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,GAAG,GAAG,KAAK,CAAC;AACnG,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,yCAAyC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACxF,IAAI,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,GAAG,WAAW,CAAC,aAAa,EAAE;AAC5D,QAAQ,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,uBAAuB,EAAE,WAAW,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AU,KAAK;AACvC,IAAI,MAAM,cAAc,GAAG,mBAAmB,CAAC;AAC/C,IAAI,MAAM,kBAAkB,GAAG,UAAU,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACnC,QAAQ,OAAO,QAAQ,CAAC;AACxB,KAAK;AACL,SAAS,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;AACtC,QAAQ,kBAAkB;AAC1B,QAAQ,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;AAChD,QAAQ,OAAO,QAAQ,CAAC;AACxB,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,QAAQ,CAAC;AACxB,KAAK;AACL,CAAC,CAAC;AACF,SAAS,gBAAgB,CAAC,KAAK,EAAE;AACjC,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;AACjE,QAAQ,MAAM,IAAI,cAAc,CAAC,YAAY,CAAC;AAC9C,YAAY,IAAI,EAAE,mBAAmB;AACrC,YAAY,OAAO,EAAE,CAAC,kCAAkC,EAAE,KAAK,CAAC,CAAC;AACjE,SAAS,CAAC,CAAC;AACX,KAAK;AACL;;"}
1
+ {"version":3,"file":"listCallerAccessGrants.js","sources":["../../../../src/internals/apis/listCallerAccessGrants.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.listCallerAccessGrants = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst utils_2 = require(\"../../utils\");\nconst s3control_1 = require(\"../../providers/s3/utils/client/s3control\");\nconst StorageError_1 = require(\"../../errors/StorageError\");\nconst userAgent_1 = require(\"../../providers/s3/utils/userAgent\");\nconst constants_1 = require(\"../utils/constants\");\n/**\n * @internal\n */\nconst listCallerAccessGrants = async (input) => {\n const { credentialsProvider, accountId, region, nextToken, pageSize, customEndpoint, } = input;\n utils_2.logger.debug(`listing available locations from account ${input.accountId}`);\n if (!!pageSize && pageSize > constants_1.MAX_PAGE_SIZE) {\n utils_2.logger.debug(`defaulting pageSize to ${constants_1.MAX_PAGE_SIZE}.`);\n }\n const clientCredentialsProvider = async (options) => {\n const { credentials } = await credentialsProvider(options);\n return credentials;\n };\n const { CallerAccessGrantsList, NextToken } = await (0, s3control_1.listCallerAccessGrants)({\n credentials: clientCredentialsProvider,\n customEndpoint,\n region,\n userAgentValue: (0, userAgent_1.getStorageUserAgentValue)(utils_1.StorageAction.ListCallerAccessGrants),\n }, {\n AccountId: accountId,\n NextToken: nextToken,\n MaxResults: pageSize ?? constants_1.MAX_PAGE_SIZE,\n AllowedByApplication: true,\n });\n const accessGrants = CallerAccessGrantsList?.map(grant => {\n assertGrantScope(grant.GrantScope);\n return {\n scope: grant.GrantScope,\n permission: grant.Permission,\n type: parseGrantType(grant.GrantScope),\n };\n }) ?? [];\n return {\n locations: accessGrants,\n nextToken: NextToken,\n };\n};\nexports.listCallerAccessGrants = listCallerAccessGrants;\nconst parseGrantType = (grantScope) => {\n const bucketScopeReg = /^s3:\\/\\/(.*)\\/\\*$/;\n const possibleBucketName = grantScope.match(bucketScopeReg)?.[1];\n if (!grantScope.endsWith('*')) {\n return 'OBJECT';\n }\n else if (grantScope.endsWith('/*') &&\n possibleBucketName &&\n possibleBucketName.indexOf('/') === -1) {\n return 'BUCKET';\n }\n else {\n return 'PREFIX';\n }\n};\nfunction assertGrantScope(value) {\n if (typeof value !== 'string' || !value.startsWith('s3://')) {\n throw new StorageError_1.StorageError({\n name: 'InvalidGrantScope',\n message: `Expected a valid grant scope, got ${value}`,\n });\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY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gB,CAAC,KAAK,EAAE;AACjC,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;AACjE,QAAQ,MAAM,IAAI,cAAc,CAAC,YAAY,CAAC;AAC9C,YAAY,IAAI,EAAE,mBAAmB;AACrC,YAAY,OAAO,EAAE,CAAC,kCAAkC,EAAE,KAAK,CAAC,CAAC;AACjE,SAAS,CAAC;AACV;AACA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getHighestPrecedenceUserGroup.js","sources":["../../../../../src/internals/apis/listPaths/getHighestPrecedenceUserGroup.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.getHighestPrecedenceUserGroup = void 0;\n/**\n * Given the Cognito user groups associated to current user session\n * and all the user group configurations defined by backend.\n * This function returns the user group with the highest precedence.\n * Reference: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-user-groups.html#assigning-precedence-values-to-groups\n *\n * @param {UserGroupConfig} userGroupsFromConfig - User groups with their precedence values based on Amplify outputs.\n * @param {string[]} currentUserGroups - The list of current user's groups.\n * @returns {string | undefined} - The user group with the highest precedence (0), or undefined if no matching group is found.\n */\nconst getHighestPrecedenceUserGroup = (userGroupsFromConfig, currentUserGroups) => {\n if (userGroupsFromConfig && currentUserGroups) {\n const precedenceMap = userGroupsFromConfig.reduce((acc, group) => {\n Object.entries(group).forEach(([key, value]) => {\n acc[key] = value.precedence;\n });\n return acc;\n }, {});\n const sortedUserGroup = currentUserGroups\n .filter(group => Object.prototype.hasOwnProperty.call(precedenceMap, group))\n .sort((a, b) => precedenceMap[a] - precedenceMap[b]);\n return sortedUserGroup[0];\n }\n return undefined;\n};\nexports.getHighestPrecedenceUserGroup = getHighestPrecedenceUserGroup;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,6BAA6B,GAAG,KAAK,CAAC,CAAC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,6BAA6B,GAAG,CAAC,oBAAoB,EAAE,iBAAiB,KAAK;AACnF,IAAI,IAAI,oBAAoB,IAAI,iBAAiB,EAAE;AACnD,QAAQ,MAAM,aAAa,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,KAAK;AAC1E,YAAY,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK;AAC5D,gBAAgB,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC;AAC5C,aAAa,CAAC,CAAC;AACf,YAAY,OAAO,GAAG,CAAC;AACvB,SAAS,EAAE,EAAE,CAAC,CAAC;AACf,QAAQ,MAAM,eAAe,GAAG,iBAAiB;AACjD,aAAa,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;AACxF,aAAa,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AACjE,QAAQ,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC;AAClC,KAAK;AACL,IAAI,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AACF,OAAO,CAAC,6BAA6B,GAAG,6BAA6B;;"}
1
+ {"version":3,"file":"getHighestPrecedenceUserGroup.js","sources":["../../../../../src/internals/apis/listPaths/getHighestPrecedenceUserGroup.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.getHighestPrecedenceUserGroup = void 0;\n/**\n * Given the Cognito user groups associated to current user session\n * and all the user group configurations defined by backend.\n * This function returns the user group with the highest precedence.\n * Reference: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-user-groups.html#assigning-precedence-values-to-groups\n *\n * @param {UserGroupConfig} userGroupsFromConfig - User groups with their precedence values based on Amplify outputs.\n * @param {string[]} currentUserGroups - The list of current user's groups.\n * @returns {string | undefined} - The user group with the highest precedence (0), or undefined if no matching group is found.\n */\nconst getHighestPrecedenceUserGroup = (userGroupsFromConfig, currentUserGroups) => {\n if (userGroupsFromConfig && currentUserGroups) {\n const precedenceMap = userGroupsFromConfig.reduce((acc, group) => {\n Object.entries(group).forEach(([key, value]) => {\n acc[key] = value.precedence;\n });\n return acc;\n }, {});\n const sortedUserGroup = currentUserGroups\n .filter(group => Object.prototype.hasOwnProperty.call(precedenceMap, group))\n .sort((a, b) => precedenceMap[a] - precedenceMap[b]);\n return sortedUserGroup[0];\n }\n return undefined;\n};\nexports.getHighestPrecedenceUserGroup = getHighestPrecedenceUserGroup;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,6BAA6B,GAAG,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,6BAA6B,GAAG,CAAC,oBAAoB,EAAE,iBAAiB,KAAK;AACnF,IAAI,IAAI,oBAAoB,IAAI,iBAAiB,EAAE;AACnD,QAAQ,MAAM,aAAa,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,KAAK;AAC1E,YAAY,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK;AAC5D,gBAAgB,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,UAAU;AAC3C,aAAa,CAAC;AACd,YAAY,OAAO,GAAG;AACtB,SAAS,EAAE,EAAE,CAAC;AACd,QAAQ,MAAM,eAAe,GAAG;AAChC,aAAa,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC;AACvF,aAAa,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;AAChE,QAAQ,OAAO,eAAe,CAAC,CAAC,CAAC;AACjC;AACA,IAAI,OAAO,SAAS;AACpB,CAAC;AACD,OAAO,CAAC,6BAA6B,GAAG,6BAA6B;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/internals/apis/listPaths/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.listPaths = void 0;\nvar listPaths_1 = require(\"./listPaths\");\nObject.defineProperty(exports, \"listPaths\", { enumerable: true, get: function () { return listPaths_1.listPaths; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;AAC3B,IAAI,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACzC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,WAAW,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/internals/apis/listPaths/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.listPaths = void 0;\nvar listPaths_1 = require(\"./listPaths\");\nObject.defineProperty(exports, \"listPaths\", { enumerable: true, get: function () { return listPaths_1.listPaths; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,SAAS,GAAG,MAAM;AAC1B,IAAI,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;AACxC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,WAAW,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"listPaths.js","sources":["../../../../../src/internals/apis/listPaths/listPaths.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.listPaths = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst resolveLocationsForCurrentSession_1 = require(\"./resolveLocationsForCurrentSession\");\nconst getHighestPrecedenceUserGroup_1 = require(\"./getHighestPrecedenceUserGroup\");\nconst listPaths = async () => {\n const { buckets } = core_1.Amplify.getConfig().Storage.S3;\n const { groups } = core_1.Amplify.getConfig().Auth.Cognito;\n if (!buckets) {\n return { locations: [] };\n }\n const { tokens, identityId } = await (0, core_1.fetchAuthSession)();\n const currentUserGroups = tokens?.accessToken.payload['cognito:groups'];\n const userGroupToUse = (0, getHighestPrecedenceUserGroup_1.getHighestPrecedenceUserGroup)(groups, currentUserGroups);\n const locations = (0, resolveLocationsForCurrentSession_1.resolveLocationsForCurrentSession)({\n buckets,\n isAuthenticated: !!tokens,\n identityId,\n userGroup: userGroupToUse,\n });\n return { locations };\n};\nexports.listPaths = listPaths;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;AAC3B,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,mCAAmC,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AAC3F,MAAM,+BAA+B,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAAC;AACnF,MAAM,SAAS,GAAG,YAAY;AAC9B,IAAI,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;AAC9D,IAAI,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;AAC/D,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;AACjC,KAAK;AACL,IAAI,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,MAAM,CAAC,gBAAgB,GAAG,CAAC;AACxE,IAAI,MAAM,iBAAiB,GAAG,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC5E,IAAI,MAAM,cAAc,GAAG,IAAI,+BAA+B,CAAC,6BAA6B,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAC;AACzH,IAAI,MAAM,SAAS,GAAG,IAAI,mCAAmC,CAAC,iCAAiC,EAAE;AACjG,QAAQ,OAAO;AACf,QAAQ,eAAe,EAAE,CAAC,CAAC,MAAM;AACjC,QAAQ,UAAU;AAClB,QAAQ,SAAS,EAAE,cAAc;AACjC,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,EAAE,SAAS,EAAE,CAAC;AACzB,CAAC,CAAC;AACF,OAAO,CAAC,SAAS,GAAG,SAAS;;"}
1
+ {"version":3,"file":"listPaths.js","sources":["../../../../../src/internals/apis/listPaths/listPaths.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.listPaths = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst resolveLocationsForCurrentSession_1 = require(\"./resolveLocationsForCurrentSession\");\nconst getHighestPrecedenceUserGroup_1 = require(\"./getHighestPrecedenceUserGroup\");\nconst listPaths = async () => {\n const { buckets } = core_1.Amplify.getConfig().Storage.S3;\n const { groups } = core_1.Amplify.getConfig().Auth.Cognito;\n if (!buckets) {\n return { locations: [] };\n }\n const { tokens, identityId } = await (0, core_1.fetchAuthSession)();\n const currentUserGroups = tokens?.accessToken.payload['cognito:groups'];\n const userGroupToUse = (0, getHighestPrecedenceUserGroup_1.getHighestPrecedenceUserGroup)(groups, currentUserGroups);\n const locations = (0, resolveLocationsForCurrentSession_1.resolveLocationsForCurrentSession)({\n buckets,\n isAuthenticated: !!tokens,\n identityId,\n userGroup: userGroupToUse,\n });\n return { locations };\n};\nexports.listPaths = listPaths;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,SAAS,GAAG,MAAM;AAC1B,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,mCAAmC,GAAG,OAAO,CAAC,qCAAqC,CAAC;AAC1F,MAAM,+BAA+B,GAAG,OAAO,CAAC,iCAAiC,CAAC;AAClF,MAAM,SAAS,GAAG,YAAY;AAC9B,IAAI,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE;AAC7D,IAAI,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO;AAC9D,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE;AAChC;AACA,IAAI,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,MAAM,CAAC,gBAAgB,GAAG;AACvE,IAAI,MAAM,iBAAiB,GAAG,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC;AAC3E,IAAI,MAAM,cAAc,GAAG,IAAI,+BAA+B,CAAC,6BAA6B,EAAE,MAAM,EAAE,iBAAiB,CAAC;AACxH,IAAI,MAAM,SAAS,GAAG,IAAI,mCAAmC,CAAC,iCAAiC,EAAE;AACjG,QAAQ,OAAO;AACf,QAAQ,eAAe,EAAE,CAAC,CAAC,MAAM;AACjC,QAAQ,UAAU;AAClB,QAAQ,SAAS,EAAE,cAAc;AACjC,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,SAAS,EAAE;AACxB,CAAC;AACD,OAAO,CAAC,SAAS,GAAG,SAAS;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveLocationsForCurrentSession.js","sources":["../../../../../src/internals/apis/listPaths/resolveLocationsForCurrentSession.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveLocationsForCurrentSession = void 0;\nconst constants_1 = require(\"../../utils/constants\");\nconst resolvePermissions = (accessRule, isAuthenticated, groups) => {\n if (!isAuthenticated) {\n return {\n permission: accessRule.guest,\n };\n }\n if (groups) {\n const selectedKey = Object.keys(accessRule).find(access => access.includes(groups));\n return {\n permission: selectedKey ? accessRule[selectedKey] : undefined,\n };\n }\n return {\n permission: accessRule.authenticated,\n };\n};\nconst resolveLocationsForCurrentSession = ({ buckets, isAuthenticated, identityId, userGroup, }) => {\n const locations = [];\n for (const [, bucketInfo] of Object.entries(buckets)) {\n const { bucketName, paths } = bucketInfo;\n if (!paths) {\n continue;\n }\n for (const [path, accessRules] of Object.entries(paths)) {\n const shouldIncludeEntityIdPath = !userGroup &&\n path.includes(constants_1.ENTITY_IDENTITY_URL) &&\n isAuthenticated &&\n identityId;\n if (shouldIncludeEntityIdPath) {\n locations.push({\n type: 'PREFIX',\n permission: accessRules.entityidentity,\n bucket: bucketName,\n prefix: path.replace(constants_1.ENTITY_IDENTITY_URL, identityId),\n });\n }\n const location = {\n type: 'PREFIX',\n ...resolvePermissions(accessRules, isAuthenticated, userGroup),\n bucket: bucketName,\n prefix: path,\n };\n if (location.permission)\n locations.push(location);\n }\n }\n return locations;\n};\nexports.resolveLocationsForCurrentSession = resolveLocationsForCurrentSession;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,iCAAiC,GAAG,KAAK,CAAC,CAAC;AACnD,MAAM,WAAW,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AACrD,MAAM,kBAAkB,GAAG,CAAC,UAAU,EAAE,eAAe,EAAE,MAAM,KAAK;AACpE,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,QAAQ,OAAO;AACf,YAAY,UAAU,EAAE,UAAU,CAAC,KAAK;AACxC,SAAS,CAAC;AACV,KAAK;AACL,IAAI,IAAI,MAAM,EAAE;AAChB,QAAQ,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AAC5F,QAA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kB,CAAC,WAAW,EAAE,eAAe,EAAE,SAAS,CAAC;AAC9E,gBAAgB,MAAM,EAAE,UAAU;AAClC,gBAAgB,MAAM,EAAE,IAAI;AAC5B,aAAa,CAAC;AACd,YAAY,IAAI,QAAQ,CAAC,UAAU;AACnC,gBAAgB,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzC,SAAS;AACT,KAAK;AACL,IAAI,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AACF,OAAO,CAAC,iCAAiC,GAAG,iCAAiC;;"}
1
+ {"version":3,"file":"resolveLocationsForCurrentSession.js","sources":["../../../../../src/internals/apis/listPaths/resolveLocationsForCurrentSession.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveLocationsForCurrentSession = void 0;\nconst constants_1 = require(\"../../utils/constants\");\nconst resolvePermissions = (accessRule, isAuthenticated, groups) => {\n if (!isAuthenticated) {\n return {\n permission: accessRule.guest,\n };\n }\n if (groups) {\n const selectedKey = Object.keys(accessRule).find(access => access.includes(groups));\n return {\n permission: selectedKey ? accessRule[selectedKey] : undefined,\n };\n }\n return {\n permission: accessRule.authenticated,\n };\n};\nconst resolveLocationsForCurrentSession = ({ buckets, isAuthenticated, identityId, userGroup, }) => {\n const locations = [];\n for (const [, bucketInfo] of Object.entries(buckets)) {\n const { bucketName, paths } = bucketInfo;\n if (!paths) {\n continue;\n }\n for (const [path, accessRules] of Object.entries(paths)) {\n const shouldIncludeEntityIdPath = !userGroup &&\n path.includes(constants_1.ENTITY_IDENTITY_URL) &&\n isAuthenticated &&\n identityId;\n if (shouldIncludeEntityIdPath) {\n locations.push({\n type: 'PREFIX',\n permission: accessRules.entityidentity,\n bucket: bucketName,\n prefix: path.replace(constants_1.ENTITY_IDENTITY_URL, identityId),\n });\n }\n const location = {\n type: 'PREFIX',\n ...resolvePermissions(accessRules, isAuthenticated, userGroup),\n bucket: bucketName,\n prefix: path,\n };\n if (location.permission)\n locations.push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CAAC,EAAE;AACjE,YAAY,MAAM,yBAAyB,GAAG,CAAC,SAAS;AACxD,gBAAgB,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,mBAAmB,CAAC;AAC9D,gBAAgB,eAAe;AAC/B,gBAAgB,UAAU;AAC1B,YAAY,IAAI,yBAAyB,EAAE;AAC3C,gBAAgB,SAAS,CAAC,IAAI,CAAC;AAC/B,oBAAoB,IAAI,EAAE,QAAQ;AAClC,oBAAoB,UAAU,EAAE,WAAW,CAAC,cAAc;AAC1D,oBAAoB,MAAM,EAAE,UAAU;AACtC,oBAAoB,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,UAAU,CAAC;AACrF,iBAAiB,CAAC;AAClB;AACA,YAAY,MAAM,QAAQ,GAAG;AAC7B,gBAAgB,IAAI,EAAE,QAAQ;AAC9B,gBAAgB,GAAG,kBAAkB,CAAC,WAAW,EAAE,eAAe,EAAE,SAAS,CAAC;AAC9E,gBAAgB,MAAM,EAAE,UAAU;AAClC,gBAAgB,MAAM,EAAE,IAAI;AAC5B,aAAa;AACb,YAAY,IAAI,QAAQ,CAAC,UAAU;AACnC,gBAAgB,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;AACxC;AACA;AACA,IAAI,OAAO,SAAS;AACpB,CAAC;AACD,OAAO,CAAC,iCAAiC,GAAG,iCAAiC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"remove.js","sources":["../../../../src/internals/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 = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst remove_1 = require(\"../../providers/s3/apis/internal/remove\");\n/**\n * @internal\n */\nconst remove = (input) => (0, remove_1.remove)(core_1.Amplify, {\n path: input.path,\n options: {\n useAccelerateEndpoint: input?.options?.useAccelerateEndpoint,\n bucket: input?.options?.bucket,\n expectedBucketOwner: input?.options?.expectedBucketOwner,\n locationCredentialsProvider: input?.options?.locationCredentialsProvider,\n customEndpoint: input?.options?.customEndpoint,\n },\n // Type casting is necessary because `removeInternal` 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});\nexports.remove = remove;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;AACxB,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,OAAO,CAAC,yCAAyC,CAAC,CAAC;AACpE;AACA;AACA;AACA,MAAM,MAAM,GAAG,CAAC,KAAK,KAAK,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE;AAC/D,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI;AACpB,IAAI,OAAO,EAAE;AACb,QAAQ,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,qBAAqB;AACpE,QAAQ,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;AACtC,QAAQ,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB;AAChE,QAAQ,2BAA2B,EAAE,KAAK,EAAE,OAAO,EAAE,2BAA2B;AAChF,QAAQ,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc;AACtD,KAAK;AACL;AACA;AACA,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,MAAM,GAAG,MAAM;;"}
1
+ {"version":3,"file":"remove.js","sources":["../../../../src/internals/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 = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst remove_1 = require(\"../../providers/s3/apis/internal/remove\");\n/**\n * @internal\n */\nconst remove = (input) => (0, remove_1.remove)(core_1.Amplify, {\n path: input.path,\n options: {\n useAccelerateEndpoint: input?.options?.useAccelerateEndpoint,\n bucket: input?.options?.bucket,\n expectedBucketOwner: input?.options?.expectedBucketOwner,\n locationCredentialsProvider: input?.options?.locationCredentialsProvider,\n customEndpoint: input?.options?.customEndpoint,\n },\n // Type casting is necessary because `removeInternal` 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});\nexports.remove = remove;\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,yCAAyC,CAAC;AACnE;AACA;AACA;AACA,MAAM,MAAM,GAAG,CAAC,KAAK,KAAK,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE;AAC/D,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI;AACpB,IAAI,OAAO,EAAE;AACb,QAAQ,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,qBAAqB;AACpE,QAAQ,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM;AACtC,QAAQ,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB;AAChE,QAAQ,2BAA2B,EAAE,KAAK,EAAE,OAAO,EAAE,2BAA2B;AAChF,QAAQ,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc;AACtD,KAAK;AACL;AACA;AACA,CAAC,CAAC;AACF,OAAO,CAAC,MAAM,GAAG,MAAM;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"uploadData.js","sources":["../../../../src/internals/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 = void 0;\nconst uploadData_1 = require(\"../../providers/s3/apis/internal/uploadData\");\n/**\n * @internal\n */\nconst uploadData = (input) => {\n const { data, path, options } = input;\n return (0, uploadData_1.uploadData)({\n path,\n data,\n options: {\n useAccelerateEndpoint: options?.useAccelerateEndpoint,\n bucket: options?.bucket,\n onProgress: options?.onProgress,\n contentDisposition: options?.contentDisposition,\n contentEncoding: options?.contentEncoding,\n contentType: options?.contentType,\n metadata: options?.metadata,\n preventOverwrite: options?.preventOverwrite,\n expectedBucketOwner: options?.expectedBucketOwner,\n checksumAlgorithm: options?.checksumAlgorithm,\n // Advanced options\n locationCredentialsProvider: options?.locationCredentialsProvider,\n customEndpoint: options?.customEndpoint,\n },\n // Type casting is necessary because `uploadDataInternal` 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};\nexports.uploadData = uploadData;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,UAAU,GAAG,KAAK,CAAC,CAAC;AAC5B,MAAM,YAAY,GAAG,OAAO,CAAC,6CAA6C,CAAC,CAAC;AAC5E;AACA;AACA;AACA,MAAM,UAAU,GAAG,CAAC,KAAK,KAAK;AAC9B,IAAI,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAC1C,IAAI,OAAO,IAAI,YAAY,CAAC,UAAU,EAAE;AACxC,QAAQ,IAAI;AACZ,QAAQ,IAAI;AACZ,QAAQ,OAAO,EAAE;AACjB,YAAY,qBAAqB,EAAE,OAAO,EAAE,qBAAqB;AACjE,YAAY,MAAM,EAAE,OAAO,EAAE,MAAM;AACnC,YAAY,UAAU,EAAE,OAAO,EAAE,UAAU;AAC3C,YAAY,kBAAkB,EAAE,OAAO,EAAE,kBAAkB;AAC3D,YAAY,eAAe,EAAE,OAAO,EAAE,eAAe;AACrD,YAAY,WAAW,EAAE,OAAO,EAAE,WAAW;AAC7C,YAAY,QAAQ,EAAE,OAAO,EAAE,QAAQ;AACvC,YAAY,gBAAgB,EAAE,OAAO,EAAE,gBAAgB;AACvD,YAAY,mBAAmB,EAAE,OAAO,EAAE,mBAAmB;AAC7D,YAAY,iBAAiB,EAAE,OAAO,EAAE,iBAAiB;AACzD;AACA,YAAY,2BAA2B,EAAE,OAAO,EAAE,2BAA2B;AAC7E,YAAY,cAAc,EAAE,OAAO,EAAE,cAAc;AACnD,SAAS;AACT;AACA;AACA,KAAK,CAAC,CAAC;AACP,CAAC,CAAC;AACF,OAAO,CAAC,UAAU,GAAG,UAAU;;"}
1
+ {"version":3,"file":"uploadData.js","sources":["../../../../src/internals/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 = void 0;\nconst uploadData_1 = require(\"../../providers/s3/apis/internal/uploadData\");\n/**\n * @internal\n */\nconst uploadData = (input) => {\n const { data, path, options } = input;\n return (0, uploadData_1.uploadData)({\n path,\n data,\n options: {\n useAccelerateEndpoint: options?.useAccelerateEndpoint,\n bucket: options?.bucket,\n onProgress: options?.onProgress,\n contentDisposition: options?.contentDisposition,\n contentEncoding: options?.contentEncoding,\n contentType: options?.contentType,\n metadata: options?.metadata,\n preventOverwrite: options?.preventOverwrite,\n expectedBucketOwner: options?.expectedBucketOwner,\n checksumAlgorithm: options?.checksumAlgorithm,\n // Advanced options\n locationCredentialsProvider: options?.locationCredentialsProvider,\n customEndpoint: options?.customEndpoint,\n },\n // Type casting is necessary because `uploadDataInternal` 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};\nexports.uploadData = uploadData;\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,MAAM;AAC3B,MAAM,YAAY,GAAG,OAAO,CAAC,6CAA6C,CAAC;AAC3E;AACA;AACA;AACA,MAAM,UAAU,GAAG,CAAC,KAAK,KAAK;AAC9B,IAAI,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK;AACzC,IAAI,OAAO,IAAI,YAAY,CAAC,UAAU,EAAE;AACxC,QAAQ,IAAI;AACZ,QAAQ,IAAI;AACZ,QAAQ,OAAO,EAAE;AACjB,YAAY,qBAAqB,EAAE,OAAO,EAAE,qBAAqB;AACjE,YAAY,MAAM,EAAE,OAAO,EAAE,MAAM;AACnC,YAAY,UAAU,EAAE,OAAO,EAAE,UAAU;AAC3C,YAAY,kBAAkB,EAAE,OAAO,EAAE,kBAAkB;AAC3D,YAAY,eAAe,EAAE,OAAO,EAAE,eAAe;AACrD,YAAY,WAAW,EAAE,OAAO,EAAE,WAAW;AAC7C,YAAY,QAAQ,EAAE,OAAO,EAAE,QAAQ;AACvC,YAAY,gBAAgB,EAAE,OAAO,EAAE,gBAAgB;AACvD,YAAY,mBAAmB,EAAE,OAAO,EAAE,mBAAmB;AAC7D,YAAY,iBAAiB,EAAE,OAAO,EAAE,iBAAiB;AACzD;AACA,YAAY,2BAA2B,EAAE,OAAO,EAAE,2BAA2B;AAC7E,YAAY,cAAc,EAAE,OAAO,EAAE,cAAc;AACnD,SAAS;AACT;AACA;AACA,KAAK,CAAC;AACN,CAAC;AACD,OAAO,CAAC,UAAU,GAAG,UAAU;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/internals/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validationErrorMap = exports.StorageValidationErrorCode = exports.assertValidationError = exports.listPaths = exports.copy = exports.downloadData = exports.uploadData = exports.remove = exports.getUrl = exports.getProperties = exports.list = exports.listCallerAccessGrants = exports.getDataAccess = void 0;\nvar getDataAccess_1 = require(\"./apis/getDataAccess\");\nObject.defineProperty(exports, \"getDataAccess\", { enumerable: true, get: function () { return getDataAccess_1.getDataAccess; } });\nvar listCallerAccessGrants_1 = require(\"./apis/listCallerAccessGrants\");\nObject.defineProperty(exports, \"listCallerAccessGrants\", { enumerable: true, get: function () { return listCallerAccessGrants_1.listCallerAccessGrants; } });\nvar list_1 = require(\"./apis/list\");\nObject.defineProperty(exports, \"list\", { enumerable: true, get: function () { return list_1.list; } });\nvar getProperties_1 = require(\"./apis/getProperties\");\nObject.defineProperty(exports, \"getProperties\", { enumerable: true, get: function () { return getProperties_1.getProperties; } });\nvar getUrl_1 = require(\"./apis/getUrl\");\nObject.defineProperty(exports, \"getUrl\", { enumerable: true, get: function () { return getUrl_1.getUrl; } });\nvar remove_1 = require(\"./apis/remove\");\nObject.defineProperty(exports, \"remove\", { enumerable: true, get: function () { return remove_1.remove; } });\nvar uploadData_1 = require(\"./apis/uploadData\");\nObject.defineProperty(exports, \"uploadData\", { enumerable: true, get: function () { return uploadData_1.uploadData; } });\nvar downloadData_1 = require(\"./apis/downloadData\");\nObject.defineProperty(exports, \"downloadData\", { enumerable: true, get: function () { return downloadData_1.downloadData; } });\nvar copy_1 = require(\"./apis/copy\");\nObject.defineProperty(exports, \"copy\", { enumerable: true, get: function () { return copy_1.copy; } });\n/** Default Auth exports */\nvar listPaths_1 = require(\"./apis/listPaths\");\nObject.defineProperty(exports, \"listPaths\", { enumerable: true, get: function () { return listPaths_1.listPaths; } });\n/**\n * Internal util functions\n */\nvar assertValidationError_1 = require(\"../errors/utils/assertValidationError\");\nObject.defineProperty(exports, \"assertValidationError\", { enumerable: true, get: function () { return assertValidationError_1.assertValidationError; } });\n/**\n * Utility types\n */\nvar validation_1 = require(\"../errors/types/validation\");\nObject.defineProperty(exports, \"StorageValidationErrorCode\", { enumerable: true, get: function () { return validation_1.StorageValidationErrorCode; } });\nObject.defineProperty(exports, \"validationErrorMap\", { enumerable: true, get: function () { return validation_1.validationErrorMap; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC1T,IAAI,eAAe,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AACtD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC;AAClI,IAAI,wBAAwB,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;AACxE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,wBAAwB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,wBAAwB,CAAC,sBAAsB,CAAC,EAAE,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/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validationErrorMap = exports.StorageValidationErrorCode = exports.assertValidationError = exports.listPaths = exports.copy = exports.downloadData = exports.uploadData = exports.remove = exports.getUrl = exports.getProperties = exports.list = exports.listCallerAccessGrants = exports.getDataAccess = void 0;\nvar getDataAccess_1 = require(\"./apis/getDataAccess\");\nObject.defineProperty(exports, \"getDataAccess\", { enumerable: true, get: function () { return getDataAccess_1.getDataAccess; } });\nvar listCallerAccessGrants_1 = require(\"./apis/listCallerAccessGrants\");\nObject.defineProperty(exports, \"listCallerAccessGrants\", { enumerable: true, get: function () { return listCallerAccessGrants_1.listCallerAccessGrants; } });\nvar list_1 = require(\"./apis/list\");\nObject.defineProperty(exports, \"list\", { enumerable: true, get: function () { return list_1.list; } });\nvar getProperties_1 = require(\"./apis/getProperties\");\nObject.defineProperty(exports, \"getProperties\", { enumerable: true, get: function () { return getProperties_1.getProperties; } });\nvar getUrl_1 = require(\"./apis/getUrl\");\nObject.defineProperty(exports, \"getUrl\", { enumerable: true, get: function () { return getUrl_1.getUrl; } });\nvar remove_1 = require(\"./apis/remove\");\nObject.defineProperty(exports, \"remove\", { enumerable: true, get: function () { return remove_1.remove; } });\nvar uploadData_1 = require(\"./apis/uploadData\");\nObject.defineProperty(exports, \"uploadData\", { enumerable: true, get: function () { return uploadData_1.uploadData; } });\nvar downloadData_1 = require(\"./apis/downloadData\");\nObject.defineProperty(exports, \"downloadData\", { enumerable: true, get: function () { return downloadData_1.downloadData; } });\nvar copy_1 = require(\"./apis/copy\");\nObject.defineProperty(exports, \"copy\", { enumerable: true, get: function () { return copy_1.copy; } });\n/** Default Auth exports */\nvar listPaths_1 = require(\"./apis/listPaths\");\nObject.defineProperty(exports, \"listPaths\", { enumerable: true, get: function () { return listPaths_1.listPaths; } });\n/**\n * Internal util functions\n */\nvar assertValidationError_1 = require(\"../errors/utils/assertValidationError\");\nObject.defineProperty(exports, \"assertValidationError\", { enumerable: true, get: function () { return assertValidationError_1.assertValidationError; } });\n/**\n * Utility types\n */\nvar validation_1 = require(\"../errors/types/validation\");\nObject.defineProperty(exports, \"StorageValidationErrorCode\", { enumerable: true, get: function () { return validation_1.StorageValidationErrorCode; } });\nObject.defineProperty(exports, \"validationErrorMap\", { enumerable: true, get: function () { return validation_1.validationErrorMap; } });\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,0BAA0B,GAAG,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,aAAa,GAAG,MAAM;AACzT,IAAI,eAAe,GAAG,OAAO,CAAC,sBAAsB,CAAC;AACrD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC;AACjI,IAAI,wBAAwB,GAAG,OAAO,CAAC,+BAA+B,CAAC;AACvE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,wBAAwB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,wBAAwB,CAAC,sBAAsB,CAAC,EAAE,EAAE,CAAC;AAC5J,IAAI,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;AACnC,MAAM,CAA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ACnC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;AACtG;AACA,IAAI,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAC7C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,WAAW,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC;AACrH;AACA;AACA;AACA,IAAI,uBAAuB,GAAG,OAAO,CAAC,uCAAuC,CAAC;AAC9E,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,uBAAuB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,uBAAuB,CAAC,qBAAqB,CAAC,EAAE,EAAE,CAAC;AACzJ;AACA;AACA;AACA,IAAI,YAAY,GAAG,OAAO,CAAC,4BAA4B,CAAC;AACxD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,4BAA4B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,0BAA0B,CAAC,EAAE,EAAE,CAAC;AACxJ,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../src/internals/utils/constants.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.ENTITY_IDENTITY_URL = exports.MAX_PAGE_SIZE = exports.DEFAULT_CRED_TTL = void 0;\nexports.DEFAULT_CRED_TTL = 15 * 60; // 15 minutes\nexports.MAX_PAGE_SIZE = 1000;\n// eslint-disable-next-line no-template-curly-in-string\nexports.ENTITY_IDENTITY_URL = '${cognito-identity.amazonaws.com:sub}';\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;AACxF,OAAO,CAAC,gBAAgB,GAAG,EAAE,GAAG,EAAE,CAAC;AACnC,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;AAC7B;AACA,OAAO,CAAC,mBAAmB,GAAG,uCAAuC;;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/internals/utils/constants.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.ENTITY_IDENTITY_URL = exports.MAX_PAGE_SIZE = exports.DEFAULT_CRED_TTL = void 0;\nexports.DEFAULT_CRED_TTL = 15 * 60; // 15 minutes\nexports.MAX_PAGE_SIZE = 1000;\n// eslint-disable-next-line no-template-curly-in-string\nexports.ENTITY_IDENTITY_URL = '${cognito-identity.amazonaws.com:sub}';\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,gBAAgB,GAAG,MAAM;AACvF,OAAO,CAAC,gBAAgB,GAAG,EAAE,GAAG,EAAE,CAAC;AACnC,OAAO,CAAC,aAAa,GAAG,IAAI;AAC5B;AACA,OAAO,CAAC,mBAAmB,GAAG,uCAAuC;;"}
@@ -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 = void 0;\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}\nexports.copy = copy;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;AACtB,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC1C,SAAS,IAAI,CAAC,KAAK,EAAE;AACrB,IAAI,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACnD,CAAC;AACD,OAAO,CAAC,IAAI,GAAG,IAAI;;"}
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 = void 0;\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}\nexports.copy = copy;\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,MAAM;AACrB,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;AACA,OAAO,CAAC,IAAI,GAAG,IAAI;;"}
@@ -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 = void 0;\nconst downloadData_1 = require(\"./internal/downloadData\");\nfunction downloadData(input) {\n return (0, downloadData_1.downloadData)(input);\n}\nexports.downloadData = downloadData;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;AAC9B,MAAM,cAAc,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AAC1D,SAAS,YAAY,CAAC,KAAK,EAAE;AAC7B,IAAI,OAAO,IAAI,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;AACnD,CAAC;AACD,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
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 = void 0;\nconst downloadData_1 = require(\"./internal/downloadData\");\nfunction downloadData(input) {\n return (0, downloadData_1.downloadData)(input);\n}\nexports.downloadData = downloadData;\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,MAAM;AAC7B,MAAM,cAAc,GAAG,OAAO,CAAC,yBAAyB,CAAC;AACzD,SAAS,YAAY,CAAC,KAAK,EAAE;AAC7B,IAAI,OAAO,IAAI,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC;AAClD;AACA,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
@@ -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 = void 0;\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}\nexports.getProperties = getProperties;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/B,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,eAAe,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;AAC5D,SAAS,aAAa,CAAC,KAAK,EAAE;AAC9B,IAAI,OAAO,IAAI,eAAe,CAAC,aAAa,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACrE,CAAC;AACD,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
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 = void 0;\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}\nexports.getProperties = getProperties;\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,MAAM;AAC9B,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;AACA,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
@@ -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 = void 0;\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}\nexports.getUrl = getUrl;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;AACxB,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC9C,SAAS,MAAM,CAAC,KAAK,EAAE;AACvB,IAAI,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACvD,CAAC;AACD,OAAO,CAAC,MAAM,GAAG,MAAM;;"}
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 = void 0;\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}\nexports.getUrl = getUrl;\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;AACA,OAAO,CAAC,MAAM,GAAG,MAAM;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/providers/s3/apis/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUrl = exports.copy = exports.getProperties = exports.list = exports.remove = exports.downloadData = exports.uploadData = void 0;\nvar uploadData_1 = require(\"./uploadData\");\nObject.defineProperty(exports, \"uploadData\", { enumerable: true, get: function () { return uploadData_1.uploadData; } });\nvar downloadData_1 = require(\"./downloadData\");\nObject.defineProperty(exports, \"downloadData\", { enumerable: true, get: function () { return downloadData_1.downloadData; } });\nvar remove_1 = require(\"./remove\");\nObject.defineProperty(exports, \"remove\", { enumerable: true, get: function () { return remove_1.remove; } });\nvar list_1 = require(\"./list\");\nObject.defineProperty(exports, \"list\", { enumerable: true, get: function () { return list_1.list; } });\nvar getProperties_1 = require(\"./getProperties\");\nObject.defineProperty(exports, \"getProperties\", { enumerable: true, get: function () { return getProperties_1.getProperties; } });\nvar copy_1 = require(\"./copy\");\nObject.defineProperty(exports, \"copy\", { enumerable: true, get: function () { return copy_1.copy; } });\nvar getUrl_1 = require(\"./getUrl\");\nObject.defineProperty(exports, \"getUrl\", { enumerable: true, get: function () { return getUrl_1.getUrl; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,UAAU,GAAG,KAAK,CAAC,CAAC;AAC3I,IAAI,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAC3C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC,CAA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AAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/providers/s3/apis/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUrl = exports.copy = exports.getProperties = exports.list = exports.remove = exports.downloadData = exports.uploadData = void 0;\nvar uploadData_1 = require(\"./uploadData\");\nObject.defineProperty(exports, \"uploadData\", { enumerable: true, get: function () { return uploadData_1.uploadData; } });\nvar downloadData_1 = require(\"./downloadData\");\nObject.defineProperty(exports, \"downloadData\", { enumerable: true, get: function () { return downloadData_1.downloadData; } });\nvar remove_1 = require(\"./remove\");\nObject.defineProperty(exports, \"remove\", { enumerable: true, get: function () { return remove_1.remove; } });\nvar list_1 = require(\"./list\");\nObject.defineProperty(exports, \"list\", { enumerable: true, get: function () { return list_1.list; } });\nvar getProperties_1 = require(\"./getProperties\");\nObject.defineProperty(exports, \"getProperties\", { enumerable: true, get: function () { return getProperties_1.getProperties; } });\nvar copy_1 = require(\"./copy\");\nObject.defineProperty(exports, \"copy\", { enumerable: true, get: function () { return copy_1.copy; } });\nvar getUrl_1 = require(\"./getUrl\");\nObject.defineProperty(exports, \"getUrl\", { enumerable: true, get: function () { return getUrl_1.getUrl; } });\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,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,UAAU,GAAG,MAAM;AAC1I,IAAI,YAAY,GAAG,OAAO,C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,GAAG,OAAO,CAAC,UAAU,CAAC;AAClC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;;"}
@@ -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,CAAC;AAC9D,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;AAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACvC,MAAM,YAAY,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACpE,MAAM,uBAAuB,GAAG,OAAO,CAAC,gDAAgD,CAAC,CAAC;AAC1F,MAAM,QAAQ,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AACtD,MAAM,WAAW,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AACrD,MAAM,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC7C,MAAM,mBAAmB,GAAG,CAAC,KAAK,KAAK,IAAI,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;AAClF,MAAM,sBAAsB,GAAG,CAAC,YAAY,EAAE,UAAU,KAAK;AAC7D;AACA;AACA;AACA,IAAI,IAAI,uBAAuB,CAAC,qBAAqB;AACrD;AACA,IAAI,CAAC,YAAY,KAAK,SAAS,IAAI,UAAU,KAAK,SAAS;AAC3D;AACA,SAAS,CAAC,UAAU,IAAI,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,0BAA0B,CAAC,iCAAiC,CAAC,CAAC;AACnH,CAAC,CAAC;AACF,MAAM,IAAI,GAAG,OAAO,OAAO,EAAE,KAAK,KAAK;AACvC,IAAI,OAAO,mBAAmB,CAAC,KAAK,CAAC;AACrC,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E,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,CAAC;AACP,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',\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,GAAG,OAAO,CAAC,qCAAqC,CAAC;AACnE,MAAM,uBAAuB,GAAG,OAAO,CAAC,gDAAgD,CAAC;AACzF,MAAM,QAAQ,GAAG,OAAO,CAAC,2BAA2B,CAAC;AACrD,MAAM,WAAW,GAAG,OAAO,CAAC,uBAAuB,CAAC;AACpD,MAAM,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC5C,MAAM,mBAAmB,GAAG,CAAC,KAAK,KAAK,IAAI,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC;AACjF,MAAM,sBAAsB,GAAG,CAAC,YAAY,EAAE,UAAU,KAAK;AAC7D;AACA;AACA;AACA,IAAI,IAAI,uBAAuB,CAAC,qBAAqB;AACrD;AACA,IAAI,CAAC,YAAY,KAAK,SAAS,IAAI,UAAU,KAAK,SAAS;AAC3D;AACA,SAAS,CAAC,UAAU,IAAI,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,0BAA0B,CAAC,iCAAiC,CAAC;A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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 +1 @@
1
- {"version":3,"file":"downloadData.js","sources":["../../../../../../src/providers/s3/apis/internal/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 = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst resolveS3ConfigAndInput_1 = require(\"../../utils/resolveS3ConfigAndInput\");\nconst utils_2 = require(\"../../utils\");\nconst s3data_1 = require(\"../../utils/client/s3data\");\nconst userAgent_1 = require(\"../../utils/userAgent\");\nconst utils_3 = require(\"../../../../utils\");\nconst constants_1 = require(\"../../utils/constants\");\nconst downloadData = (input) => {\n const abortController = new AbortController();\n const downloadTask = (0, utils_2.createDownloadTask)({\n job: downloadDataJob(input, abortController.signal),\n onCancel: (message) => {\n abortController.abort(message);\n },\n });\n return downloadTask;\n};\nexports.downloadData = downloadData;\nconst downloadDataJob = (downloadDataInput, abortSignal) => async () => {\n const { options: downloadDataOptions } = downloadDataInput;\n const { bucket, keyPrefix, s3Config, identityId } = await (0, resolveS3ConfigAndInput_1.resolveS3ConfigAndInput)(core_1.Amplify, downloadDataInput);\n const { inputType, objectKey } = (0, utils_2.validateStorageOperationInput)(downloadDataInput, identityId);\n (0, utils_2.validateBucketOwnerID)(downloadDataOptions?.expectedBucketOwner);\n const finalKey = inputType === constants_1.STORAGE_INPUT_KEY ? keyPrefix + objectKey : objectKey;\n utils_3.logger.debug(`download ${objectKey} from ${finalKey}.`);\n const { Body: body, LastModified: lastModified, ContentLength: size, ETag: eTag, Metadata: metadata, VersionId: versionId, ContentType: contentType, } = await (0, s3data_1.getObject)({\n ...s3Config,\n abortSignal,\n onDownloadProgress: downloadDataOptions?.onProgress,\n userAgentValue: (0, userAgent_1.getStorageUserAgentValue)(utils_1.StorageAction.DownloadData),\n }, {\n Bucket: bucket,\n Key: finalKey,\n ...(downloadDataOptions?.bytesRange && {\n Range: `bytes=${downloadDataOptions.bytesRange.start}-${downloadDataOptions.bytesRange.end}`,\n }),\n ExpectedBucketOwner: downloadDataOptions?.expectedBucketOwner,\n });\n const result = {\n body,\n lastModified,\n size,\n contentType,\n eTag,\n metadata,\n versionId,\n };\n return inputType === constants_1.STORAGE_INPUT_KEY\n ? { key: objectKey, ...result }\n : { path: objectKey, ...result };\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;AAC9B,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,yBAAyB,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACjF,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACvC,MAAM,QAAQ,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AACtD,MAAM,WAAW,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AACrD,MAAM,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC7C,MAAM,WAAW,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AACrD,MAAM,YAAY,GAAG,CAAC,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,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,GAAG,GAAG,MAAM,IAAI,QAAQ,CAAC,SAAS,EAAE;AAC3L,QAAQ,GAAG,QAAQ;AACnB,QAAQ,WAAW;AACnB,QAAQ,kBAAkB,EAAE,mBAAmB,EAAE,UAAU;AAC3D,QAAQ,cAAc,EAAE,IAAI,WAAW,CAAC,wBAAwB,EAAE,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC;AACrG,KAAK,EAAE;AACP,QAAQ,MAAM,EAAE,MAAM;AACtB,QAAQ,GAAG,EAAE,QAAQ;AACrB,QAAQ,IAAI,mBAAmB,EAAE,UAAU,IAAI;AAC/C,YAAY,KAAK,EAAE,CAAC,MAAM,EAAE,mBAAmB,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,mBAAmB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AACxG,SAAS,CAAC;AACV,QAAQ,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB;AACrE,KAAK,CAAC,CAAC;AACP,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,IAAI;AACZ,QAAQ,YAAY;AACpB,QAAQ,IAAI;AACZ,QAAQ,WAAW;AACnB,QAAQ,IAAI;AACZ,QAAQ,QAAQ;AAChB,QAAQ,SAAS;AACjB,KAAK,CAAC;AACN,IAAI,OAAO,SAAS,KAAK,WAAW,CAAC,iBAAiB;AACtD,UAAU,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE;AACvC,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,CAAC;AACzC,CAAC;;"}
1
+ {"version":3,"file":"downloadData.js","sources":["../../../../../../src/providers/s3/apis/internal/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 = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst resolveS3ConfigAndInput_1 = require(\"../../utils/resolveS3ConfigAndInput\");\nconst utils_2 = require(\"../../utils\");\nconst s3data_1 = require(\"../../utils/client/s3data\");\nconst userAgent_1 = require(\"../../utils/userAgent\");\nconst utils_3 = require(\"../../../../utils\");\nconst constants_1 = require(\"../../utils/constants\");\nconst downloadData = (input) => {\n const abortController = new AbortController();\n const downloadTask = (0, utils_2.createDownloadTask)({\n job: downloadDataJob(input, abortController.signal),\n onCancel: (message) => {\n abortController.abort(message);\n },\n });\n return downloadTask;\n};\nexports.downloadData = downloadData;\nconst downloadDataJob = (downloadDataInput, abortSignal) => async () => {\n const { options: downloadDataOptions } = downloadDataInput;\n const { bucket, keyPrefix, s3Config, identityId } = await (0, resolveS3ConfigAndInput_1.resolveS3ConfigAndInput)(core_1.Amplify, downloadDataInput);\n const { inputType, objectKey } = (0, utils_2.validateStorageOperationInput)(downloadDataInput, identityId);\n (0, utils_2.validateBucketOwnerID)(downloadDataOptions?.expectedBucketOwner);\n const finalKey = inputType === constants_1.STORAGE_INPUT_KEY ? keyPrefix + objectKey : objectKey;\n utils_3.logger.debug(`download ${objectKey} from ${finalKey}.`);\n const { Body: body, LastModified: lastModified, ContentLength: size, ETag: eTag, Metadata: metadata, VersionId: versionId, ContentType: contentType, } = await (0, s3data_1.getObject)({\n ...s3Config,\n abortSignal,\n onDownloadProgress: downloadDataOptions?.onProgress,\n userAgentValue: (0, userAgent_1.getStorageUserAgentValue)(utils_1.StorageAction.DownloadData),\n }, {\n Bucket: bucket,\n Key: finalKey,\n ...(downloadDataOptions?.bytesRange && {\n Range: `bytes=${downloadDataOptions.bytesRange.start}-${downloadDataOptions.bytesRange.end}`,\n }),\n ExpectedBucketOwner: downloadDataOptions?.expectedBucketOwner,\n });\n const result = {\n body,\n lastModified,\n size,\n contentType,\n eTag,\n metadata,\n versionId,\n };\n return inputType === constants_1.STORAGE_INPUT_KEY\n ? { key: objectKey, ...result }\n : { path: objectKey, ...result };\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,MAAM;AAC7B,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,yBAAyB,GAAG,OAAO,CAAC,qCAAqC,CAAC;AAChF,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;AACtC,MAAM,QAAQ,GAAG,OAAO,CAAC,2BAA2B,CAAC;AACrD,MAAM,WAAW,GAAG,OAAO,CAAC,uBAAuB,CAAC;AACpD,MAAM,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAC5C,MAAM,WAAW,GAAG,OAAO,CAAC,uBAAuB,CAAC;AACpD,MAAM,YAAY,GAAG,CAAC,KAAK,KAAK;AAChC,IAAI,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE;AACjD,IAAI,MAAM,YAAY,GAAG,IAAI,OAAO,CAAC,kBAAkB,EAAE;AACzD,QAAQ,GAAG,EAAE,eAAe,CAAC,KAAK,EAAE,eAAe,CAAC,MAAM,CAAC;AAC3D,QAAQ,QAAQ,EAAE,CAAC,OAAO,KAAK;AAC/B,YAAY,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC;AAC1C,SAAS;AACT,KAAK,CAAC;AACN,IAAI,OAAO,YAAY;AACvB,CAAC;AACD,OAAO,CAAC,YAAY,GAAG,YAAY;AACnC,MAAM,eAAe,GAAG,CAAC,iBAAiB,EAAE,WAAW,KAAK,YAAY;AACxE,IAAI,MAAM,EAAE,OAAO,EAAE,mBAAmB,EAAE,GAAG,iBAAiB;AAC9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