@azure/storage-file-share 12.25.0-alpha.20240826.1 → 12.25.0-alpha.20240827.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. package/dist/index.js +47 -47
  2. package/dist/index.js.map +1 -1
  3. package/dist-esm/storage-blob/src/BatchResponse.js +1 -1
  4. package/dist-esm/storage-blob/src/BatchResponse.js.map +1 -1
  5. package/dist-esm/storage-blob/src/BatchResponseParser.js +1 -1
  6. package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -1
  7. package/dist-esm/storage-blob/src/BatchUtils.js +1 -1
  8. package/dist-esm/storage-blob/src/BatchUtils.js.map +1 -1
  9. package/dist-esm/storage-blob/src/BlobBatch.js +1 -1
  10. package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -1
  11. package/dist-esm/storage-blob/src/BlobBatchClient.js +1 -1
  12. package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -1
  13. package/dist-esm/storage-blob/src/BlobDownloadResponse.js +1 -1
  14. package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -1
  15. package/dist-esm/storage-blob/src/BlobLeaseClient.js +1 -1
  16. package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
  17. package/dist-esm/storage-blob/src/BlobQueryResponse.js +1 -1
  18. package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -1
  19. package/dist-esm/storage-blob/src/BlobServiceClient.js +1 -1
  20. package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
  21. package/dist-esm/storage-blob/src/Clients.js +1 -1
  22. package/dist-esm/storage-blob/src/Clients.js.map +1 -1
  23. package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
  24. package/dist-esm/storage-blob/src/PageBlobRangeResponse.js +1 -1
  25. package/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map +1 -1
  26. package/dist-esm/storage-blob/src/Pipeline.js +1 -1
  27. package/dist-esm/storage-blob/src/Pipeline.js.map +1 -1
  28. package/dist-esm/storage-blob/src/Range.js +1 -1
  29. package/dist-esm/storage-blob/src/Range.js.map +1 -1
  30. package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js +1 -1
  31. package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map +1 -1
  32. package/dist-esm/storage-blob/src/StorageClient.js +1 -1
  33. package/dist-esm/storage-blob/src/StorageClient.js.map +1 -1
  34. package/dist-esm/storage-blob/src/StorageContextClient.js +1 -1
  35. package/dist-esm/storage-blob/src/StorageContextClient.js.map +1 -1
  36. package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js +1 -1
  37. package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +1 -1
  38. package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js +1 -1
  39. package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js.map +1 -1
  40. package/dist-esm/storage-blob/src/credentials/Credential.js +1 -1
  41. package/dist-esm/storage-blob/src/credentials/Credential.js.map +1 -1
  42. package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js +1 -1
  43. package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js.map +1 -1
  44. package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js +1 -1
  45. package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map +1 -1
  46. package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.browser.js +1 -1
  47. package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.browser.js.map +1 -1
  48. package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js +1 -1
  49. package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map +1 -1
  50. package/dist-esm/storage-blob/src/generatedModels.js +1 -1
  51. package/dist-esm/storage-blob/src/generatedModels.js.map +1 -1
  52. package/dist-esm/storage-blob/src/index.js +1 -1
  53. package/dist-esm/storage-blob/src/index.js.map +1 -1
  54. package/dist-esm/storage-blob/src/log.js +1 -1
  55. package/dist-esm/storage-blob/src/log.js.map +1 -1
  56. package/dist-esm/storage-blob/src/models.js +1 -1
  57. package/dist-esm/storage-blob/src/models.js.map +1 -1
  58. package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js +1 -1
  59. package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map +1 -1
  60. package/dist-esm/storage-blob/src/policies/CredentialPolicy.js +1 -1
  61. package/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map +1 -1
  62. package/dist-esm/storage-blob/src/policies/RequestPolicy.js +1 -1
  63. package/dist-esm/storage-blob/src/policies/RequestPolicy.js.map +1 -1
  64. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js +1 -1
  65. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map +1 -1
  66. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js +1 -1
  67. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js.map +1 -1
  68. package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.browser.js +1 -1
  69. package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.browser.js.map +1 -1
  70. package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js +1 -1
  71. package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js.map +1 -1
  72. package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js +1 -1
  73. package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -1
  74. package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +1 -1
  75. package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +1 -1
  76. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js +1 -1
  77. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
  78. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js +1 -1
  79. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js.map +1 -1
  80. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +1 -1
  81. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
  82. package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js +1 -1
  83. package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map +1 -1
  84. package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js +1 -1
  85. package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js.map +1 -1
  86. package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js +1 -1
  87. package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js.map +1 -1
  88. package/dist-esm/storage-blob/src/sas/AccountSASServices.js +1 -1
  89. package/dist-esm/storage-blob/src/sas/AccountSASServices.js.map +1 -1
  90. package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js +1 -1
  91. package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map +1 -1
  92. package/dist-esm/storage-blob/src/sas/BlobSASPermissions.js +1 -1
  93. package/dist-esm/storage-blob/src/sas/BlobSASPermissions.js.map +1 -1
  94. package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js +1 -1
  95. package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map +1 -1
  96. package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js +1 -1
  97. package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map +1 -1
  98. package/dist-esm/storage-blob/src/sas/SASQueryParameters.js +1 -1
  99. package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -1
  100. package/dist-esm/storage-blob/src/sas/SasIPRange.js +1 -1
  101. package/dist-esm/storage-blob/src/sas/SasIPRange.js.map +1 -1
  102. package/dist-esm/storage-blob/src/utils/Batch.js +1 -1
  103. package/dist-esm/storage-blob/src/utils/Batch.js.map +1 -1
  104. package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js +1 -1
  105. package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +1 -1
  106. package/dist-esm/storage-blob/src/utils/Mutex.js +1 -1
  107. package/dist-esm/storage-blob/src/utils/Mutex.js.map +1 -1
  108. package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js +1 -1
  109. package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +1 -1
  110. package/dist-esm/storage-blob/src/utils/SharedKeyComparator.js +1 -1
  111. package/dist-esm/storage-blob/src/utils/SharedKeyComparator.js.map +1 -1
  112. package/dist-esm/storage-blob/src/utils/cache.js +1 -1
  113. package/dist-esm/storage-blob/src/utils/cache.js.map +1 -1
  114. package/dist-esm/storage-blob/src/utils/constants.js +1 -1
  115. package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
  116. package/dist-esm/storage-blob/src/utils/tracing.js +1 -1
  117. package/dist-esm/storage-blob/src/utils/tracing.js.map +1 -1
  118. package/dist-esm/storage-blob/src/utils/utils.common.js +1 -1
  119. package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -1
  120. package/dist-esm/storage-blob/src/utils/utils.node.js +1 -1
  121. package/dist-esm/storage-blob/src/utils/utils.node.js.map +1 -1
  122. package/dist-esm/storage-file-share/src/AccountSASPermissions.js +1 -1
  123. package/dist-esm/storage-file-share/src/AccountSASPermissions.js.map +1 -1
  124. package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js +1 -1
  125. package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js.map +1 -1
  126. package/dist-esm/storage-file-share/src/AccountSASServices.js +1 -1
  127. package/dist-esm/storage-file-share/src/AccountSASServices.js.map +1 -1
  128. package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js +1 -1
  129. package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js.map +1 -1
  130. package/dist-esm/storage-file-share/src/Clients.js +1 -1
  131. package/dist-esm/storage-file-share/src/Clients.js.map +1 -1
  132. package/dist-esm/storage-file-share/src/FileDownloadResponse.browser.js +1 -1
  133. package/dist-esm/storage-file-share/src/FileDownloadResponse.browser.js.map +1 -1
  134. package/dist-esm/storage-file-share/src/FileDownloadResponse.js +1 -1
  135. package/dist-esm/storage-file-share/src/FileDownloadResponse.js.map +1 -1
  136. package/dist-esm/storage-file-share/src/FileSASPermissions.js +1 -1
  137. package/dist-esm/storage-file-share/src/FileSASPermissions.js.map +1 -1
  138. package/dist-esm/storage-file-share/src/FileSASSignatureValues.js +1 -1
  139. package/dist-esm/storage-file-share/src/FileSASSignatureValues.js.map +1 -1
  140. package/dist-esm/storage-file-share/src/FileSystemAttributes.js +1 -1
  141. package/dist-esm/storage-file-share/src/FileSystemAttributes.js.map +1 -1
  142. package/dist-esm/storage-file-share/src/Pipeline.js +1 -1
  143. package/dist-esm/storage-file-share/src/Pipeline.js.map +1 -1
  144. package/dist-esm/storage-file-share/src/Range.js +1 -1
  145. package/dist-esm/storage-file-share/src/Range.js.map +1 -1
  146. package/dist-esm/storage-file-share/src/SASQueryParameters.js +1 -1
  147. package/dist-esm/storage-file-share/src/SASQueryParameters.js.map +1 -1
  148. package/dist-esm/storage-file-share/src/SasIPRange.js +1 -1
  149. package/dist-esm/storage-file-share/src/SasIPRange.js.map +1 -1
  150. package/dist-esm/storage-file-share/src/ShareClientInternal.js +1 -1
  151. package/dist-esm/storage-file-share/src/ShareClientInternal.js.map +1 -1
  152. package/dist-esm/storage-file-share/src/ShareSASPermissions.js +1 -1
  153. package/dist-esm/storage-file-share/src/ShareSASPermissions.js.map +1 -1
  154. package/dist-esm/storage-file-share/src/ShareServiceClient.js +1 -1
  155. package/dist-esm/storage-file-share/src/ShareServiceClient.js.map +1 -1
  156. package/dist-esm/storage-file-share/src/StorageClient.js +1 -1
  157. package/dist-esm/storage-file-share/src/StorageClient.js.map +1 -1
  158. package/dist-esm/storage-file-share/src/StorageContextClient.js +1 -1
  159. package/dist-esm/storage-file-share/src/StorageContextClient.js.map +1 -1
  160. package/dist-esm/storage-file-share/src/StorageRetryPolicyFactory.js +1 -1
  161. package/dist-esm/storage-file-share/src/StorageRetryPolicyFactory.js.map +1 -1
  162. package/dist-esm/storage-file-share/src/generatedModels.js +1 -1
  163. package/dist-esm/storage-file-share/src/generatedModels.js.map +1 -1
  164. package/dist-esm/storage-file-share/src/index.browser.js +1 -1
  165. package/dist-esm/storage-file-share/src/index.browser.js.map +1 -1
  166. package/dist-esm/storage-file-share/src/index.js +1 -1
  167. package/dist-esm/storage-file-share/src/index.js.map +1 -1
  168. package/dist-esm/storage-file-share/src/log.js +1 -1
  169. package/dist-esm/storage-file-share/src/log.js.map +1 -1
  170. package/dist-esm/storage-file-share/src/models.js +1 -1
  171. package/dist-esm/storage-file-share/src/models.js.map +1 -1
  172. package/dist-esm/storage-file-share/src/policies/StorageRetryPolicy.js +1 -1
  173. package/dist-esm/storage-file-share/src/policies/StorageRetryPolicy.js.map +1 -1
  174. package/dist-esm/storage-file-share/src/policies/StorageRetryPolicyV2.js +1 -1
  175. package/dist-esm/storage-file-share/src/policies/StorageRetryPolicyV2.js.map +1 -1
  176. package/dist-esm/storage-file-share/src/utils/Batch.js +1 -1
  177. package/dist-esm/storage-file-share/src/utils/Batch.js.map +1 -1
  178. package/dist-esm/storage-file-share/src/utils/BufferScheduler.js +1 -1
  179. package/dist-esm/storage-file-share/src/utils/BufferScheduler.js.map +1 -1
  180. package/dist-esm/storage-file-share/src/utils/RetriableReadableStream.js +1 -1
  181. package/dist-esm/storage-file-share/src/utils/RetriableReadableStream.js.map +1 -1
  182. package/dist-esm/storage-file-share/src/utils/constants.js +1 -1
  183. package/dist-esm/storage-file-share/src/utils/constants.js.map +1 -1
  184. package/dist-esm/storage-file-share/src/utils/tracing.js +1 -1
  185. package/dist-esm/storage-file-share/src/utils/tracing.js.map +1 -1
  186. package/dist-esm/storage-file-share/src/utils/utils.browser.js +1 -1
  187. package/dist-esm/storage-file-share/src/utils/utils.browser.js.map +1 -1
  188. package/dist-esm/storage-file-share/src/utils/utils.common.js +1 -1
  189. package/dist-esm/storage-file-share/src/utils/utils.common.js.map +1 -1
  190. package/dist-esm/storage-file-share/src/utils/utils.node.js +1 -1
  191. package/dist-esm/storage-file-share/src/utils/utils.node.js.map +1 -1
  192. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ContainerSASPermissions.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/ContainerSASPermissions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;GAMG;AACH,MAAM,OAAO,uBAAuB;IAApC;QA6GE;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,QAAG,GAAY,KAAK,CAAC;QAE5B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,UAAK,GAAY,KAAK,CAAC;QAE9B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,kBAAa,GAAY,KAAK,CAAC;QAEtC;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,QAAG,GAAY,KAAK,CAAC;QAE5B;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,YAAO,GAAY,KAAK,CAAC;QAEhC;;WAEG;QACI,0BAAqB,GAAY,KAAK,CAAC;QAE9C;;WAEG;QACI,oBAAe,GAAY,KAAK,CAAC;QAExC;;WAEG;QACI,iBAAY,GAAY,KAAK,CAAC;IAqDvC,CAAC;IAhOC;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,WAAmB;QACrC,MAAM,uBAAuB,GAAG,IAAI,uBAAuB,EAAE,CAAC;QAE9D,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;YAC/B,QAAQ,IAAI,EAAE,CAAC;gBACb,KAAK,GAAG;oBACN,uBAAuB,CAAC,IAAI,GAAG,IAAI,CAAC;oBACpC,MAAM;gBACR,KAAK,GAAG;oBACN,uBAAuB,CAA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QACxB,CAAC;QACD,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,OAAO,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container.\n * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation.\n * Once all the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nexport class ContainerSASPermissions {\n /**\n * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @param permissions -\n */\n public static parse(permissions: string): ContainerSASPermissions {\n const containerSASPermissions = new ContainerSASPermissions();\n\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n containerSASPermissions.read = true;\n break;\n case \"a\":\n containerSASPermissions.add = true;\n break;\n case \"c\":\n containerSASPermissions.create = true;\n break;\n case \"w\":\n containerSASPermissions.write = true;\n break;\n case \"d\":\n containerSASPermissions.delete = true;\n break;\n case \"l\":\n containerSASPermissions.list = true;\n break;\n case \"t\":\n containerSASPermissions.tag = true;\n break;\n case \"x\":\n containerSASPermissions.deleteVersion = true;\n break;\n case \"m\":\n containerSASPermissions.move = true;\n break;\n case \"e\":\n containerSASPermissions.execute = true;\n break;\n case \"i\":\n containerSASPermissions.setImmutabilityPolicy = true;\n break;\n case \"y\":\n containerSASPermissions.permanentDelete = true;\n break;\n case \"f\":\n containerSASPermissions.filterByTags = true;\n break;\n default:\n throw new RangeError(`Invalid permission ${char}`);\n }\n }\n\n return containerSASPermissions;\n }\n\n /**\n * Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it\n * and boolean values for them.\n *\n * @param permissionLike -\n */\n public static from(permissionLike: ContainerSASPermissionsLike): ContainerSASPermissions {\n const containerSASPermissions = new ContainerSASPermissions();\n if (permissionLike.read) {\n containerSASPermissions.read = true;\n }\n if (permissionLike.add) {\n containerSASPermissions.add = true;\n }\n if (permissionLike.create) {\n containerSASPermissions.create = true;\n }\n if (permissionLike.write) {\n containerSASPermissions.write = true;\n }\n if (permissionLike.delete) {\n containerSASPermissions.delete = true;\n }\n if (permissionLike.list) {\n containerSASPermissions.list = true;\n }\n if (permissionLike.deleteVersion) {\n containerSASPermissions.deleteVersion = true;\n }\n if (permissionLike.tag) {\n containerSASPermissions.tag = true;\n }\n if (permissionLike.move) {\n containerSASPermissions.move = true;\n }\n if (permissionLike.execute) {\n containerSASPermissions.execute = true;\n }\n if (permissionLike.setImmutabilityPolicy) {\n containerSASPermissions.setImmutabilityPolicy = true;\n }\n if (permissionLike.permanentDelete) {\n containerSASPermissions.permanentDelete = true;\n }\n if (permissionLike.filterByTags) {\n containerSASPermissions.filterByTags = true;\n }\n return containerSASPermissions;\n }\n\n /**\n * Specifies Read access granted.\n */\n public read: boolean = false;\n\n /**\n * Specifies Add access granted.\n */\n public add: boolean = false;\n\n /**\n * Specifies Create access granted.\n */\n public create: boolean = false;\n\n /**\n * Specifies Write access granted.\n */\n public write: boolean = false;\n\n /**\n * Specifies Delete access granted.\n */\n public delete: boolean = false;\n\n /**\n * Specifies Delete version access granted.\n */\n public deleteVersion: boolean = false;\n\n /**\n * Specifies List access granted.\n */\n public list: boolean = false;\n\n /**\n * Specfies Tag access granted.\n */\n public tag: boolean = false;\n\n /**\n * Specifies Move access granted.\n */\n public move: boolean = false;\n\n /**\n * Specifies Execute access granted.\n */\n public execute: boolean = false;\n\n /**\n * Specifies SetImmutabilityPolicy access granted.\n */\n public setImmutabilityPolicy: boolean = false;\n\n /**\n * Specifies that Permanent Delete is permitted.\n */\n public permanentDelete: boolean = false;\n\n /**\n * Specifies that Filter Blobs by Tags is permitted.\n */\n public filterByTags: boolean = false;\n\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * The order of the characters should be as specified here to ensure correctness.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n */\n public toString(): string {\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.move) {\n permissions.push(\"m\");\n }\n if (this.execute) {\n permissions.push(\"e\");\n }\n if (this.setImmutabilityPolicy) {\n permissions.push(\"i\");\n }\n if (this.permanentDelete) {\n permissions.push(\"y\");\n }\n if (this.filterByTags) {\n permissions.push(\"f\");\n }\n return permissions.join(\"\");\n }\n}\n\n/**\n * A type that looks like a Container SAS permission.\n * Used in {@link ContainerSASPermissions} to parse SAS permissions from raw objects.\n */\nexport interface ContainerSASPermissionsLike {\n /**\n * Specifies Read access granted.\n */\n read?: boolean;\n\n /**\n * Specifies Add access granted.\n */\n add?: boolean;\n\n /**\n * Specifies Create access granted.\n */\n create?: boolean;\n\n /**\n * Specifies Write access granted.\n */\n write?: boolean;\n\n /**\n * Specifies Delete access granted.\n */\n delete?: boolean;\n\n /**\n * Specifies Delete version access granted.\n */\n deleteVersion?: boolean;\n\n /**\n * Specifies List access granted.\n */\n list?: boolean;\n\n /**\n * Specfies Tag access granted.\n */\n tag?: boolean;\n\n /**\n * Specifies Move access granted.\n */\n move?: boolean;\n\n /**\n * Specifies Execute access granted.\n */\n execute?: boolean;\n\n /**\n * Specifies SetImmutabilityPolicy access granted.\n */\n setImmutabilityPolicy?: boolean;\n\n /**\n * Specifies that Permanent Delete is permitted.\n */\n permanentDelete?: boolean;\n\n /**\n * Specifies that Filter Blobs by Tags is permitted.\n */\n filterByTags?: boolean;\n}\n"]}
1
+ {"version":3,"file":"ContainerSASPermissions.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/ContainerSASPermissions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;GAMG;AACH,MAAM,OAAO,uBAAuB;IAApC;QA6GE;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,QAAG,GAAY,KAAK,CAAC;QAE5B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,UAAK,GAAY,KAAK,CAAC;QAE9B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,kBAAa,GAAY,KAAK,CAAC;QAEtC;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,QAAG,GAAY,KAAK,CAAC;QAE5B;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,YAAO,GAAY,KAAK,CAAC;QAEhC;;WAEG;QACI,0BAAqB,GAAY,KAAK,CAAC;QAE9C;;WAEG;QACI,oBAAe,GAAY,KAAK,CAAC;QAExC;;WAEG;QACI,iBAAY,GAAY,KAAK,CAAC;IAqDvC,CAAC;IAhOC;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,WAAmB;QACrC,MAAM,uBAAuB,GAAG,IAAI,uBAAuB,EAAE,CAAC;QAE9D,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;YAC/B,QAAQ,IAAI,EAAE,CAAC;gBACb,KAAK,GAAG;oBACN,uBAAuB,CAAC,IAAI,GAAG,IAAI,CAAC;oBACpC,MAAM;gBACR,KAAK,GAAG;oBACN,uBAAuB,CAAC,GAAG,GAAG,IAAI,CAAC;oBACnC,MAAM;gBACR,KAAK,GAAG;oBACN,uBAAuB,CAAC,MAAM,GAAG,IAAI,CAAC;oBACtC,MAAM;gBACR,KAAK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AW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container.\n * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation.\n * Once all the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nexport class ContainerSASPermissions {\n /**\n * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @param permissions -\n */\n public static parse(permissions: string): ContainerSASPermissions {\n const containerSASPermissions = new ContainerSASPermissions();\n\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n containerSASPermissions.read = true;\n break;\n case \"a\":\n containerSASPermissions.add = true;\n break;\n case \"c\":\n containerSASPermissions.create = true;\n break;\n case \"w\":\n containerSASPermissions.write = true;\n break;\n case \"d\":\n containerSASPermissions.delete = true;\n break;\n case \"l\":\n containerSASPermissions.list = true;\n break;\n case \"t\":\n containerSASPermissions.tag = true;\n break;\n case \"x\":\n containerSASPermissions.deleteVersion = true;\n break;\n case \"m\":\n containerSASPermissions.move = true;\n break;\n case \"e\":\n containerSASPermissions.execute = true;\n break;\n case \"i\":\n containerSASPermissions.setImmutabilityPolicy = true;\n break;\n case \"y\":\n containerSASPermissions.permanentDelete = true;\n break;\n case \"f\":\n containerSASPermissions.filterByTags = true;\n break;\n default:\n throw new RangeError(`Invalid permission ${char}`);\n }\n }\n\n return containerSASPermissions;\n }\n\n /**\n * Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it\n * and boolean values for them.\n *\n * @param permissionLike -\n */\n public static from(permissionLike: ContainerSASPermissionsLike): ContainerSASPermissions {\n const containerSASPermissions = new ContainerSASPermissions();\n if (permissionLike.read) {\n containerSASPermissions.read = true;\n }\n if (permissionLike.add) {\n containerSASPermissions.add = true;\n }\n if (permissionLike.create) {\n containerSASPermissions.create = true;\n }\n if (permissionLike.write) {\n containerSASPermissions.write = true;\n }\n if (permissionLike.delete) {\n containerSASPermissions.delete = true;\n }\n if (permissionLike.list) {\n containerSASPermissions.list = true;\n }\n if (permissionLike.deleteVersion) {\n containerSASPermissions.deleteVersion = true;\n }\n if (permissionLike.tag) {\n containerSASPermissions.tag = true;\n }\n if (permissionLike.move) {\n containerSASPermissions.move = true;\n }\n if (permissionLike.execute) {\n containerSASPermissions.execute = true;\n }\n if (permissionLike.setImmutabilityPolicy) {\n containerSASPermissions.setImmutabilityPolicy = true;\n }\n if (permissionLike.permanentDelete) {\n containerSASPermissions.permanentDelete = true;\n }\n if (permissionLike.filterByTags) {\n containerSASPermissions.filterByTags = true;\n }\n return containerSASPermissions;\n }\n\n /**\n * Specifies Read access granted.\n */\n public read: boolean = false;\n\n /**\n * Specifies Add access granted.\n */\n public add: boolean = false;\n\n /**\n * Specifies Create access granted.\n */\n public create: boolean = false;\n\n /**\n * Specifies Write access granted.\n */\n public write: boolean = false;\n\n /**\n * Specifies Delete access granted.\n */\n public delete: boolean = false;\n\n /**\n * Specifies Delete version access granted.\n */\n public deleteVersion: boolean = false;\n\n /**\n * Specifies List access granted.\n */\n public list: boolean = false;\n\n /**\n * Specfies Tag access granted.\n */\n public tag: boolean = false;\n\n /**\n * Specifies Move access granted.\n */\n public move: boolean = false;\n\n /**\n * Specifies Execute access granted.\n */\n public execute: boolean = false;\n\n /**\n * Specifies SetImmutabilityPolicy access granted.\n */\n public setImmutabilityPolicy: boolean = false;\n\n /**\n * Specifies that Permanent Delete is permitted.\n */\n public permanentDelete: boolean = false;\n\n /**\n * Specifies that Filter Blobs by Tags is permitted.\n */\n public filterByTags: boolean = false;\n\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * The order of the characters should be as specified here to ensure correctness.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n */\n public toString(): string {\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.move) {\n permissions.push(\"m\");\n }\n if (this.execute) {\n permissions.push(\"e\");\n }\n if (this.setImmutabilityPolicy) {\n permissions.push(\"i\");\n }\n if (this.permanentDelete) {\n permissions.push(\"y\");\n }\n if (this.filterByTags) {\n permissions.push(\"f\");\n }\n return permissions.join(\"\");\n }\n}\n\n/**\n * A type that looks like a Container SAS permission.\n * Used in {@link ContainerSASPermissions} to parse SAS permissions from raw objects.\n */\nexport interface ContainerSASPermissionsLike {\n /**\n * Specifies Read access granted.\n */\n read?: boolean;\n\n /**\n * Specifies Add access granted.\n */\n add?: boolean;\n\n /**\n * Specifies Create access granted.\n */\n create?: boolean;\n\n /**\n * Specifies Write access granted.\n */\n write?: boolean;\n\n /**\n * Specifies Delete access granted.\n */\n delete?: boolean;\n\n /**\n * Specifies Delete version access granted.\n */\n deleteVersion?: boolean;\n\n /**\n * Specifies List access granted.\n */\n list?: boolean;\n\n /**\n * Specfies Tag access granted.\n */\n tag?: boolean;\n\n /**\n * Specifies Move access granted.\n */\n move?: boolean;\n\n /**\n * Specifies Execute access granted.\n */\n execute?: boolean;\n\n /**\n * Specifies SetImmutabilityPolicy access granted.\n */\n setImmutabilityPolicy?: boolean;\n\n /**\n * Specifies that Permanent Delete is permitted.\n */\n permanentDelete?: boolean;\n\n /**\n * Specifies that Filter Blobs by Tags is permitted.\n */\n filterByTags?: boolean;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { ipRangeToString } from "./SasIPRange";
4
4
  import { truncatedISO8061Date } from "../utils/utils.common";
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"SASQueryParameters.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/SASQueryParameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAG7D;;GAEG;AACH,MAAM,CAAN,IAAY,WAUX;AAVD,WAAY,WAAW;IACrB;;OAEG;IACH,8BAAe,CAAA;IAEf;;OAEG;IACH,0CAA2B,CAAA;AAC7B,CAAC,EAVW,WAAW,KAAX,WAAW,QAUtB;AA4FD;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAkB;IA+I7B;;;;OAIG;IACH,IAAW,OAAO;QAChB,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,OAAO;gBACL,GAAG,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG;gBAC1B,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK;aAC/B,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IA0DD,YACE,OAAe,EACf,SAAiB,EACjB,oBAAyD,EACzD,QAAiB,EACjB,aAAsB,EACtB,QAAsB,EACtB,QAAe,EACf,SAAgB,EAChB,OAAoB,EACpB,UAAmB,EACnB,QAAiB,EACjB,YAAqB,EACrB,kBAA2B,EAC3B,eAAwB,EACxB,eAAwB,EACxB,WAAoB,EACpB,iBAAqC,EACrC,0BAAmC,EACnC,aAAsB,EACtB,eAAwB;QAExB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,IAAI,oBAAoB,KAAK,SAAS,IAAI,OAAO,oBAAoB,KAAK,QAAQ,EAAE,CAAC;YACnF,4BA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MAAM;oBACT,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;oBACnE,MAAM;gBACR,KAAK,MAAM;oBACT,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;oBACnE,MAAM;gBACR,KAAK,MAAM;oBACT,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;oBAC/D,MAAM;gBACR,KAAK,OAAO;oBACV,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,0BAA0B,CAAC,CAAC;oBAC9E,MAAM;gBACR,KAAK,MAAM;oBACT,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;oBACjE,MAAM;YACV,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED;;;;;;OAMG;IACK,uBAAuB,CAAC,OAAiB,EAAE,GAAW,EAAE,KAAc;QAC5E,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO;QACT,CAAC;QAED,GAAG,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC9B,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { SasIPRange, ipRangeToString } from \"./SasIPRange\";\nimport { truncatedISO8061Date } from \"../utils/utils.common\";\nimport { UserDelegationKey } from \"../BlobServiceClient\";\n\n/**\n * Protocols for generated SAS.\n */\nexport enum SASProtocol {\n /**\n * Protocol that allows HTTPS only\n */\n Https = \"https\",\n\n /**\n * Protocol that allows both HTTPS and HTTP\n */\n HttpsAndHttp = \"https,http\",\n}\n\n/**\n * Options to construct {@link SASQueryParameters}.\n */\nexport interface SASQueryParametersOptions {\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for\n * more details.\n */\n permissions?: string;\n /**\n * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}\n * for more details.\n */\n services?: string;\n /**\n * Optional. The storage resource types being accessed (only for Account SAS). Please refer to\n * {@link AccountSASResourceTypes} for more details.\n */\n resourceTypes?: string;\n /**\n * Optional. The allowed HTTP protocol(s).\n */\n protocol?: SASProtocol;\n /**\n * Optional. The start time for this SAS token.\n */\n startsOn?: Date;\n /**\n * Optional only when identifier is provided. The expiry time for this SAS token.\n */\n expiresOn?: Date;\n /**\n * Optional. IP ranges allowed in this SAS.\n */\n ipRange?: SasIPRange;\n /**\n * Optional. The signed identifier (only for {@link BlobSASSignatureValues}).\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n */\n identifier?: string;\n /**\n * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n encryptionScope?: string;\n /**\n * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}).\n * @see https://docs.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only\n */\n resource?: string;\n /**\n * Value for cache-control header in Blob/File Service SAS.\n */\n cacheControl?: string;\n /**\n * Value for content-disposition header in Blob/File Service SAS.\n */\n contentDisposition?: string;\n /**\n * Value for content-encoding header in Blob/File Service SAS.\n */\n contentEncoding?: string;\n /**\n * Value for content-length header in Blob/File Service SAS.\n */\n contentLanguage?: string;\n /**\n * Value for content-type header in Blob/File Service SAS.\n */\n contentType?: string;\n /**\n * User delegation key properties.\n */\n userDelegationKey?: UserDelegationKey;\n /**\n * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key\n * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key\n * has the required permissions before granting access but no additional permission check for the user specified in\n * this value will be performed. This cannot be used in conjuction with {@link signedUnauthorizedUserObjectId}.\n * This is only used for User Delegation SAS.\n */\n preauthorizedAgentObjectId?: string;\n /**\n * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access.\n * This is only used for User Delegation SAS.\n */\n correlationId?: string;\n}\n\n/**\n * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly\n * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues}\n * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should\n * be taken here in case there are existing query parameters, which might affect the appropriate means of appending\n * these query parameters).\n *\n * NOTE: Instances of this class are immutable.\n */\nexport class SASQueryParameters {\n /**\n * The storage API version.\n */\n public readonly version: string;\n\n /**\n * Optional. The allowed HTTP protocol(s).\n */\n public readonly protocol?: SASProtocol;\n\n /**\n * Optional. The start time for this SAS token.\n */\n public readonly startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The expiry time for this SAS token.\n */\n public readonly expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for\n * more details.\n */\n public readonly permissions?: string;\n\n /**\n * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}\n * for more details.\n */\n public readonly services?: string;\n\n /**\n * Optional. The storage resource types being accessed (only for Account SAS). Please refer to\n * {@link AccountSASResourceTypes} for more details.\n */\n public readonly resourceTypes?: string;\n\n /**\n * Optional. The signed identifier (only for {@link BlobSASSignatureValues}).\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n */\n public readonly identifier?: string;\n\n /**\n * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n public readonly encryptionScope?: string;\n\n /**\n * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}).\n * @see https://docs.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only\n */\n public readonly resource?: string;\n\n /**\n * The signature for the SAS token.\n */\n public readonly signature: string;\n\n /**\n * Value for cache-control header in Blob/File Service SAS.\n */\n public readonly cacheControl?: string;\n\n /**\n * Value for content-disposition header in Blob/File Service SAS.\n */\n public readonly contentDisposition?: string;\n\n /**\n * Value for content-encoding header in Blob/File Service SAS.\n */\n public readonly contentEncoding?: string;\n\n /**\n * Value for content-length header in Blob/File Service SAS.\n */\n public readonly contentLanguage?: string;\n\n /**\n * Value for content-type header in Blob/File Service SAS.\n */\n public readonly contentType?: string;\n\n /**\n * Inner value of getter ipRange.\n */\n private readonly ipRangeInner?: SasIPRange;\n\n /**\n * The Azure Active Directory object ID in GUID format.\n * Property of user delegation key.\n */\n private readonly signedOid?: string;\n\n /**\n * The Azure Active Directory tenant ID in GUID format.\n * Property of user delegation key.\n */\n private readonly signedTenantId?: string;\n\n /**\n * The date-time the key is active.\n * Property of user delegation key.\n */\n private readonly signedStartsOn?: Date;\n\n /**\n * The date-time the key expires.\n * Property of user delegation key.\n */\n private readonly signedExpiresOn?: Date;\n\n /**\n * Abbreviation of the Azure Storage service that accepts the user delegation key.\n * Property of user delegation key.\n */\n private readonly signedService?: string;\n\n /**\n * The service version that created the user delegation key.\n * Property of user delegation key.\n */\n private readonly signedVersion?: string;\n\n /**\n * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key\n * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key\n * has the required permissions before granting access but no additional permission check for the user specified in\n * this value will be performed. This is only used for User Delegation SAS.\n */\n public readonly preauthorizedAgentObjectId?: string;\n\n /**\n * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access.\n * This is only used for User Delegation SAS.\n */\n public readonly correlationId?: string;\n\n /**\n * Optional. IP range allowed for this SAS.\n *\n * @readonly\n */\n public get ipRange(): SasIPRange | undefined {\n if (this.ipRangeInner) {\n return {\n end: this.ipRangeInner.end,\n start: this.ipRangeInner.start,\n };\n }\n return undefined;\n }\n\n /**\n * Creates an instance of SASQueryParameters.\n *\n * @param version - Representing the storage version\n * @param signature - Representing the signature for the SAS token\n * @param permissions - Representing the storage permissions\n * @param services - Representing the storage services being accessed (only for Account SAS)\n * @param resourceTypes - Representing the storage resource types being accessed (only for Account SAS)\n * @param protocol - Representing the allowed HTTP protocol(s)\n * @param startsOn - Representing the start time for this SAS token\n * @param expiresOn - Representing the expiry time for this SAS token\n * @param ipRange - Representing the range of valid IP addresses for this SAS token\n * @param identifier - Representing the signed identifier (only for Service SAS)\n * @param resource - Representing the storage container or blob (only for Service SAS)\n * @param cacheControl - Representing the cache-control header (only for Blob/File Service SAS)\n * @param contentDisposition - Representing the content-disposition header (only for Blob/File Service SAS)\n * @param contentEncoding - Representing the content-encoding header (only for Blob/File Service SAS)\n * @param contentLanguage - Representing the content-language header (only for Blob/File Service SAS)\n * @param contentType - Representing the content-type header (only for Blob/File Service SAS)\n * @param userDelegationKey - Representing the user delegation key properties\n * @param preauthorizedAgentObjectId - Representing the authorized AAD Object ID (only for User Delegation SAS)\n * @param correlationId - Representing the correlation ID (only for User Delegation SAS)\n * @param encryptionScope -\n */\n constructor(\n version: string,\n signature: string,\n permissions?: string,\n services?: string,\n resourceTypes?: string,\n protocol?: SASProtocol,\n startsOn?: Date,\n expiresOn?: Date,\n ipRange?: SasIPRange,\n identifier?: string,\n resource?: string,\n cacheControl?: string,\n contentDisposition?: string,\n contentEncoding?: string,\n contentLanguage?: string,\n contentType?: string,\n userDelegationKey?: UserDelegationKey,\n preauthorizedAgentObjectId?: string,\n correlationId?: string,\n encryptionScope?: string,\n );\n\n /**\n * Creates an instance of SASQueryParameters.\n *\n * @param version - Representing the storage version\n * @param signature - Representing the signature for the SAS token\n * @param options - Optional. Options to construct the SASQueryParameters.\n */\n constructor(version: string, signature: string, options?: SASQueryParametersOptions);\n\n constructor(\n version: string,\n signature: string,\n permissionsOrOptions?: string | SASQueryParametersOptions,\n services?: string,\n resourceTypes?: string,\n protocol?: SASProtocol,\n startsOn?: Date,\n expiresOn?: Date,\n ipRange?: SasIPRange,\n identifier?: string,\n resource?: string,\n cacheControl?: string,\n contentDisposition?: string,\n contentEncoding?: string,\n contentLanguage?: string,\n contentType?: string,\n userDelegationKey?: UserDelegationKey,\n preauthorizedAgentObjectId?: string,\n correlationId?: string,\n encryptionScope?: string,\n ) {\n this.version = version;\n this.signature = signature;\n\n if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== \"string\") {\n // SASQueryParametersOptions\n this.permissions = permissionsOrOptions.permissions;\n this.services = permissionsOrOptions.services;\n this.resourceTypes = permissionsOrOptions.resourceTypes;\n this.protocol = permissionsOrOptions.protocol;\n this.startsOn = permissionsOrOptions.startsOn;\n this.expiresOn = permissionsOrOptions.expiresOn;\n this.ipRangeInner = permissionsOrOptions.ipRange;\n this.identifier = permissionsOrOptions.identifier;\n this.encryptionScope = permissionsOrOptions.encryptionScope;\n this.resource = permissionsOrOptions.resource;\n this.cacheControl = permissionsOrOptions.cacheControl;\n this.contentDisposition = permissionsOrOptions.contentDisposition;\n this.contentEncoding = permissionsOrOptions.contentEncoding;\n this.contentLanguage = permissionsOrOptions.contentLanguage;\n this.contentType = permissionsOrOptions.contentType;\n\n if (permissionsOrOptions.userDelegationKey) {\n this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId;\n this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId;\n this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn;\n this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn;\n this.signedService = permissionsOrOptions.userDelegationKey.signedService;\n this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion;\n\n this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId;\n this.correlationId = permissionsOrOptions.correlationId;\n }\n } else {\n this.services = services;\n this.resourceTypes = resourceTypes;\n this.expiresOn = expiresOn;\n this.permissions = permissionsOrOptions;\n this.protocol = protocol;\n this.startsOn = startsOn;\n this.ipRangeInner = ipRange;\n this.encryptionScope = encryptionScope;\n this.identifier = identifier;\n this.resource = resource;\n this.cacheControl = cacheControl;\n this.contentDisposition = contentDisposition;\n this.contentEncoding = contentEncoding;\n this.contentLanguage = contentLanguage;\n this.contentType = contentType;\n\n if (userDelegationKey) {\n this.signedOid = userDelegationKey.signedObjectId;\n this.signedTenantId = userDelegationKey.signedTenantId;\n this.signedStartsOn = userDelegationKey.signedStartsOn;\n this.signedExpiresOn = userDelegationKey.signedExpiresOn;\n this.signedService = userDelegationKey.signedService;\n this.signedVersion = userDelegationKey.signedVersion;\n\n this.preauthorizedAgentObjectId = preauthorizedAgentObjectId;\n this.correlationId = correlationId;\n }\n }\n }\n\n /**\n * Encodes all SAS query parameters into a string that can be appended to a URL.\n *\n */\n public toString(): string {\n const params: string[] = [\n \"sv\",\n \"ss\",\n \"srt\",\n \"spr\",\n \"st\",\n \"se\",\n \"sip\",\n \"si\",\n \"ses\",\n \"skoid\", // Signed object ID\n \"sktid\", // Signed tenant ID\n \"skt\", // Signed key start time\n \"ske\", // Signed key expiry time\n \"sks\", // Signed key service\n \"skv\", // Signed key version\n \"sr\",\n \"sp\",\n \"sig\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"saoid\",\n \"scid\",\n ];\n const queries: string[] = [];\n\n for (const param of params) {\n switch (param) {\n case \"sv\":\n this.tryAppendQueryParameter(queries, param, this.version);\n break;\n case \"ss\":\n this.tryAppendQueryParameter(queries, param, this.services);\n break;\n case \"srt\":\n this.tryAppendQueryParameter(queries, param, this.resourceTypes);\n break;\n case \"spr\":\n this.tryAppendQueryParameter(queries, param, this.protocol);\n break;\n case \"st\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined,\n );\n break;\n case \"se\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined,\n );\n break;\n case \"sip\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.ipRange ? ipRangeToString(this.ipRange) : undefined,\n );\n break;\n case \"si\":\n this.tryAppendQueryParameter(queries, param, this.identifier);\n break;\n case \"ses\":\n this.tryAppendQueryParameter(queries, param, this.encryptionScope);\n break;\n case \"skoid\": // Signed object ID\n this.tryAppendQueryParameter(queries, param, this.signedOid);\n break;\n case \"sktid\": // Signed tenant ID\n this.tryAppendQueryParameter(queries, param, this.signedTenantId);\n break;\n case \"skt\": // Signed key start time\n this.tryAppendQueryParameter(\n queries,\n param,\n this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : undefined,\n );\n break;\n case \"ske\": // Signed key expiry time\n this.tryAppendQueryParameter(\n queries,\n param,\n this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : undefined,\n );\n break;\n case \"sks\": // Signed key service\n this.tryAppendQueryParameter(queries, param, this.signedService);\n break;\n case \"skv\": // Signed key version\n this.tryAppendQueryParameter(queries, param, this.signedVersion);\n break;\n case \"sr\":\n this.tryAppendQueryParameter(queries, param, this.resource);\n break;\n case \"sp\":\n this.tryAppendQueryParameter(queries, param, this.permissions);\n break;\n case \"sig\":\n this.tryAppendQueryParameter(queries, param, this.signature);\n break;\n case \"rscc\":\n this.tryAppendQueryParameter(queries, param, this.cacheControl);\n break;\n case \"rscd\":\n this.tryAppendQueryParameter(queries, param, this.contentDisposition);\n break;\n case \"rsce\":\n this.tryAppendQueryParameter(queries, param, this.contentEncoding);\n break;\n case \"rscl\":\n this.tryAppendQueryParameter(queries, param, this.contentLanguage);\n break;\n case \"rsct\":\n this.tryAppendQueryParameter(queries, param, this.contentType);\n break;\n case \"saoid\":\n this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId);\n break;\n case \"scid\":\n this.tryAppendQueryParameter(queries, param, this.correlationId);\n break;\n }\n }\n return queries.join(\"&\");\n }\n\n /**\n * A private helper method used to filter and append query key/value pairs into an array.\n *\n * @param queries -\n * @param key -\n * @param value -\n */\n private tryAppendQueryParameter(queries: string[], key: string, value?: string): void {\n if (!value) {\n return;\n }\n\n key = encodeURIComponent(key);\n value = encodeURIComponent(value);\n if (key.length > 0 && value.length > 0) {\n queries.push(`${key}=${value}`);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"SASQueryParameters.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/SASQueryParameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAG7D;;GAEG;AACH,MAAM,CAAN,IAAY,WAUX;AAVD,WAAY,WAAW;IACrB;;OAEG;IACH,8BAAe,CAAA;IAEf;;OAEG;IACH,0CAA2B,CAAA;AAC7B,CAAC,EAVW,WAAW,KAAX,WAAW,QAUtB;AA4FD;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAkB;IA+I7B;;;;OAIG;IACH,IAAW,OAAO;QAChB,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,OAAO;gBACL,GAAG,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG;gBAC1B,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK;aAC/B,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IA0DD,YACE,OAAe,EACf,SAAiB,EACjB,oBAAyD,EACzD,QAAiB,EACjB,aAAsB,EACtB,QAAsB,EACtB,QAAe,EACf,SAAgB,EAChB,OAAoB,EACpB,UAAmB,EACnB,QAAiB,EACjB,YAAqB,EACrB,kB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,MAAM,GAAG,CAAC,EAAE,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { SasIPRange, ipRangeToString } from \"./SasIPRange\";\nimport { truncatedISO8061Date } from \"../utils/utils.common\";\nimport { UserDelegationKey } from \"../BlobServiceClient\";\n\n/**\n * Protocols for generated SAS.\n */\nexport enum SASProtocol {\n /**\n * Protocol that allows HTTPS only\n */\n Https = \"https\",\n\n /**\n * Protocol that allows both HTTPS and HTTP\n */\n HttpsAndHttp = \"https,http\",\n}\n\n/**\n * Options to construct {@link SASQueryParameters}.\n */\nexport interface SASQueryParametersOptions {\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for\n * more details.\n */\n permissions?: string;\n /**\n * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}\n * for more details.\n */\n services?: string;\n /**\n * Optional. The storage resource types being accessed (only for Account SAS). Please refer to\n * {@link AccountSASResourceTypes} for more details.\n */\n resourceTypes?: string;\n /**\n * Optional. The allowed HTTP protocol(s).\n */\n protocol?: SASProtocol;\n /**\n * Optional. The start time for this SAS token.\n */\n startsOn?: Date;\n /**\n * Optional only when identifier is provided. The expiry time for this SAS token.\n */\n expiresOn?: Date;\n /**\n * Optional. IP ranges allowed in this SAS.\n */\n ipRange?: SasIPRange;\n /**\n * Optional. The signed identifier (only for {@link BlobSASSignatureValues}).\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n */\n identifier?: string;\n /**\n * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n encryptionScope?: string;\n /**\n * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}).\n * @see https://docs.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only\n */\n resource?: string;\n /**\n * Value for cache-control header in Blob/File Service SAS.\n */\n cacheControl?: string;\n /**\n * Value for content-disposition header in Blob/File Service SAS.\n */\n contentDisposition?: string;\n /**\n * Value for content-encoding header in Blob/File Service SAS.\n */\n contentEncoding?: string;\n /**\n * Value for content-length header in Blob/File Service SAS.\n */\n contentLanguage?: string;\n /**\n * Value for content-type header in Blob/File Service SAS.\n */\n contentType?: string;\n /**\n * User delegation key properties.\n */\n userDelegationKey?: UserDelegationKey;\n /**\n * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key\n * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key\n * has the required permissions before granting access but no additional permission check for the user specified in\n * this value will be performed. This cannot be used in conjuction with {@link signedUnauthorizedUserObjectId}.\n * This is only used for User Delegation SAS.\n */\n preauthorizedAgentObjectId?: string;\n /**\n * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access.\n * This is only used for User Delegation SAS.\n */\n correlationId?: string;\n}\n\n/**\n * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly\n * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues}\n * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should\n * be taken here in case there are existing query parameters, which might affect the appropriate means of appending\n * these query parameters).\n *\n * NOTE: Instances of this class are immutable.\n */\nexport class SASQueryParameters {\n /**\n * The storage API version.\n */\n public readonly version: string;\n\n /**\n * Optional. The allowed HTTP protocol(s).\n */\n public readonly protocol?: SASProtocol;\n\n /**\n * Optional. The start time for this SAS token.\n */\n public readonly startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The expiry time for this SAS token.\n */\n public readonly expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for\n * more details.\n */\n public readonly permissions?: string;\n\n /**\n * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}\n * for more details.\n */\n public readonly services?: string;\n\n /**\n * Optional. The storage resource types being accessed (only for Account SAS). Please refer to\n * {@link AccountSASResourceTypes} for more details.\n */\n public readonly resourceTypes?: string;\n\n /**\n * Optional. The signed identifier (only for {@link BlobSASSignatureValues}).\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n */\n public readonly identifier?: string;\n\n /**\n * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n public readonly encryptionScope?: string;\n\n /**\n * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}).\n * @see https://docs.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only\n */\n public readonly resource?: string;\n\n /**\n * The signature for the SAS token.\n */\n public readonly signature: string;\n\n /**\n * Value for cache-control header in Blob/File Service SAS.\n */\n public readonly cacheControl?: string;\n\n /**\n * Value for content-disposition header in Blob/File Service SAS.\n */\n public readonly contentDisposition?: string;\n\n /**\n * Value for content-encoding header in Blob/File Service SAS.\n */\n public readonly contentEncoding?: string;\n\n /**\n * Value for content-length header in Blob/File Service SAS.\n */\n public readonly contentLanguage?: string;\n\n /**\n * Value for content-type header in Blob/File Service SAS.\n */\n public readonly contentType?: string;\n\n /**\n * Inner value of getter ipRange.\n */\n private readonly ipRangeInner?: SasIPRange;\n\n /**\n * The Azure Active Directory object ID in GUID format.\n * Property of user delegation key.\n */\n private readonly signedOid?: string;\n\n /**\n * The Azure Active Directory tenant ID in GUID format.\n * Property of user delegation key.\n */\n private readonly signedTenantId?: string;\n\n /**\n * The date-time the key is active.\n * Property of user delegation key.\n */\n private readonly signedStartsOn?: Date;\n\n /**\n * The date-time the key expires.\n * Property of user delegation key.\n */\n private readonly signedExpiresOn?: Date;\n\n /**\n * Abbreviation of the Azure Storage service that accepts the user delegation key.\n * Property of user delegation key.\n */\n private readonly signedService?: string;\n\n /**\n * The service version that created the user delegation key.\n * Property of user delegation key.\n */\n private readonly signedVersion?: string;\n\n /**\n * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key\n * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key\n * has the required permissions before granting access but no additional permission check for the user specified in\n * this value will be performed. This is only used for User Delegation SAS.\n */\n public readonly preauthorizedAgentObjectId?: string;\n\n /**\n * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access.\n * This is only used for User Delegation SAS.\n */\n public readonly correlationId?: string;\n\n /**\n * Optional. IP range allowed for this SAS.\n *\n * @readonly\n */\n public get ipRange(): SasIPRange | undefined {\n if (this.ipRangeInner) {\n return {\n end: this.ipRangeInner.end,\n start: this.ipRangeInner.start,\n };\n }\n return undefined;\n }\n\n /**\n * Creates an instance of SASQueryParameters.\n *\n * @param version - Representing the storage version\n * @param signature - Representing the signature for the SAS token\n * @param permissions - Representing the storage permissions\n * @param services - Representing the storage services being accessed (only for Account SAS)\n * @param resourceTypes - Representing the storage resource types being accessed (only for Account SAS)\n * @param protocol - Representing the allowed HTTP protocol(s)\n * @param startsOn - Representing the start time for this SAS token\n * @param expiresOn - Representing the expiry time for this SAS token\n * @param ipRange - Representing the range of valid IP addresses for this SAS token\n * @param identifier - Representing the signed identifier (only for Service SAS)\n * @param resource - Representing the storage container or blob (only for Service SAS)\n * @param cacheControl - Representing the cache-control header (only for Blob/File Service SAS)\n * @param contentDisposition - Representing the content-disposition header (only for Blob/File Service SAS)\n * @param contentEncoding - Representing the content-encoding header (only for Blob/File Service SAS)\n * @param contentLanguage - Representing the content-language header (only for Blob/File Service SAS)\n * @param contentType - Representing the content-type header (only for Blob/File Service SAS)\n * @param userDelegationKey - Representing the user delegation key properties\n * @param preauthorizedAgentObjectId - Representing the authorized AAD Object ID (only for User Delegation SAS)\n * @param correlationId - Representing the correlation ID (only for User Delegation SAS)\n * @param encryptionScope -\n */\n constructor(\n version: string,\n signature: string,\n permissions?: string,\n services?: string,\n resourceTypes?: string,\n protocol?: SASProtocol,\n startsOn?: Date,\n expiresOn?: Date,\n ipRange?: SasIPRange,\n identifier?: string,\n resource?: string,\n cacheControl?: string,\n contentDisposition?: string,\n contentEncoding?: string,\n contentLanguage?: string,\n contentType?: string,\n userDelegationKey?: UserDelegationKey,\n preauthorizedAgentObjectId?: string,\n correlationId?: string,\n encryptionScope?: string,\n );\n\n /**\n * Creates an instance of SASQueryParameters.\n *\n * @param version - Representing the storage version\n * @param signature - Representing the signature for the SAS token\n * @param options - Optional. Options to construct the SASQueryParameters.\n */\n constructor(version: string, signature: string, options?: SASQueryParametersOptions);\n\n constructor(\n version: string,\n signature: string,\n permissionsOrOptions?: string | SASQueryParametersOptions,\n services?: string,\n resourceTypes?: string,\n protocol?: SASProtocol,\n startsOn?: Date,\n expiresOn?: Date,\n ipRange?: SasIPRange,\n identifier?: string,\n resource?: string,\n cacheControl?: string,\n contentDisposition?: string,\n contentEncoding?: string,\n contentLanguage?: string,\n contentType?: string,\n userDelegationKey?: UserDelegationKey,\n preauthorizedAgentObjectId?: string,\n correlationId?: string,\n encryptionScope?: string,\n ) {\n this.version = version;\n this.signature = signature;\n\n if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== \"string\") {\n // SASQueryParametersOptions\n this.permissions = permissionsOrOptions.permissions;\n this.services = permissionsOrOptions.services;\n this.resourceTypes = permissionsOrOptions.resourceTypes;\n this.protocol = permissionsOrOptions.protocol;\n this.startsOn = permissionsOrOptions.startsOn;\n this.expiresOn = permissionsOrOptions.expiresOn;\n this.ipRangeInner = permissionsOrOptions.ipRange;\n this.identifier = permissionsOrOptions.identifier;\n this.encryptionScope = permissionsOrOptions.encryptionScope;\n this.resource = permissionsOrOptions.resource;\n this.cacheControl = permissionsOrOptions.cacheControl;\n this.contentDisposition = permissionsOrOptions.contentDisposition;\n this.contentEncoding = permissionsOrOptions.contentEncoding;\n this.contentLanguage = permissionsOrOptions.contentLanguage;\n this.contentType = permissionsOrOptions.contentType;\n\n if (permissionsOrOptions.userDelegationKey) {\n this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId;\n this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId;\n this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn;\n this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn;\n this.signedService = permissionsOrOptions.userDelegationKey.signedService;\n this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion;\n\n this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId;\n this.correlationId = permissionsOrOptions.correlationId;\n }\n } else {\n this.services = services;\n this.resourceTypes = resourceTypes;\n this.expiresOn = expiresOn;\n this.permissions = permissionsOrOptions;\n this.protocol = protocol;\n this.startsOn = startsOn;\n this.ipRangeInner = ipRange;\n this.encryptionScope = encryptionScope;\n this.identifier = identifier;\n this.resource = resource;\n this.cacheControl = cacheControl;\n this.contentDisposition = contentDisposition;\n this.contentEncoding = contentEncoding;\n this.contentLanguage = contentLanguage;\n this.contentType = contentType;\n\n if (userDelegationKey) {\n this.signedOid = userDelegationKey.signedObjectId;\n this.signedTenantId = userDelegationKey.signedTenantId;\n this.signedStartsOn = userDelegationKey.signedStartsOn;\n this.signedExpiresOn = userDelegationKey.signedExpiresOn;\n this.signedService = userDelegationKey.signedService;\n this.signedVersion = userDelegationKey.signedVersion;\n\n this.preauthorizedAgentObjectId = preauthorizedAgentObjectId;\n this.correlationId = correlationId;\n }\n }\n }\n\n /**\n * Encodes all SAS query parameters into a string that can be appended to a URL.\n *\n */\n public toString(): string {\n const params: string[] = [\n \"sv\",\n \"ss\",\n \"srt\",\n \"spr\",\n \"st\",\n \"se\",\n \"sip\",\n \"si\",\n \"ses\",\n \"skoid\", // Signed object ID\n \"sktid\", // Signed tenant ID\n \"skt\", // Signed key start time\n \"ske\", // Signed key expiry time\n \"sks\", // Signed key service\n \"skv\", // Signed key version\n \"sr\",\n \"sp\",\n \"sig\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"saoid\",\n \"scid\",\n ];\n const queries: string[] = [];\n\n for (const param of params) {\n switch (param) {\n case \"sv\":\n this.tryAppendQueryParameter(queries, param, this.version);\n break;\n case \"ss\":\n this.tryAppendQueryParameter(queries, param, this.services);\n break;\n case \"srt\":\n this.tryAppendQueryParameter(queries, param, this.resourceTypes);\n break;\n case \"spr\":\n this.tryAppendQueryParameter(queries, param, this.protocol);\n break;\n case \"st\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined,\n );\n break;\n case \"se\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined,\n );\n break;\n case \"sip\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.ipRange ? ipRangeToString(this.ipRange) : undefined,\n );\n break;\n case \"si\":\n this.tryAppendQueryParameter(queries, param, this.identifier);\n break;\n case \"ses\":\n this.tryAppendQueryParameter(queries, param, this.encryptionScope);\n break;\n case \"skoid\": // Signed object ID\n this.tryAppendQueryParameter(queries, param, this.signedOid);\n break;\n case \"sktid\": // Signed tenant ID\n this.tryAppendQueryParameter(queries, param, this.signedTenantId);\n break;\n case \"skt\": // Signed key start time\n this.tryAppendQueryParameter(\n queries,\n param,\n this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : undefined,\n );\n break;\n case \"ske\": // Signed key expiry time\n this.tryAppendQueryParameter(\n queries,\n param,\n this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : undefined,\n );\n break;\n case \"sks\": // Signed key service\n this.tryAppendQueryParameter(queries, param, this.signedService);\n break;\n case \"skv\": // Signed key version\n this.tryAppendQueryParameter(queries, param, this.signedVersion);\n break;\n case \"sr\":\n this.tryAppendQueryParameter(queries, param, this.resource);\n break;\n case \"sp\":\n this.tryAppendQueryParameter(queries, param, this.permissions);\n break;\n case \"sig\":\n this.tryAppendQueryParameter(queries, param, this.signature);\n break;\n case \"rscc\":\n this.tryAppendQueryParameter(queries, param, this.cacheControl);\n break;\n case \"rscd\":\n this.tryAppendQueryParameter(queries, param, this.contentDisposition);\n break;\n case \"rsce\":\n this.tryAppendQueryParameter(queries, param, this.contentEncoding);\n break;\n case \"rscl\":\n this.tryAppendQueryParameter(queries, param, this.contentLanguage);\n break;\n case \"rsct\":\n this.tryAppendQueryParameter(queries, param, this.contentType);\n break;\n case \"saoid\":\n this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId);\n break;\n case \"scid\":\n this.tryAppendQueryParameter(queries, param, this.correlationId);\n break;\n }\n }\n return queries.join(\"&\");\n }\n\n /**\n * A private helper method used to filter and append query key/value pairs into an array.\n *\n * @param queries -\n * @param key -\n * @param value -\n */\n private tryAppendQueryParameter(queries: string[], key: string, value?: string): void {\n if (!value) {\n return;\n }\n\n key = encodeURIComponent(key);\n value = encodeURIComponent(value);\n if (key.length > 0 && value.length > 0) {\n queries.push(`${key}=${value}`);\n }\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  /**
4
4
  * Generate SasIPRange format string. For example:
5
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"SasIPRange.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/SasIPRange.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAkBlC;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,OAAmB;IACjD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;AACzE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Allowed IP range for a SAS.\n */\nexport interface SasIPRange {\n /**\n * Starting IP address in the IP range.\n * If end IP doesn't provide, start IP will the only IP allowed.\n */\n start: string;\n /**\n * Optional. IP address that ends the IP range.\n * If not provided, start IP will the only IP allowed.\n */\n end?: string;\n}\n\n/**\n * Generate SasIPRange format string. For example:\n *\n * \"8.8.8.8\" or \"1.1.1.1-255.255.255.255\"\n *\n * @param ipRange -\n */\nexport function ipRangeToString(ipRange: SasIPRange): string {\n return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start;\n}\n"]}
1
+ {"version":3,"file":"SasIPRange.js","sourceRoot":"","sources":["../../../../../storage-blob/src/sas/SasIPRange.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAkBlC;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,OAAmB;IACjD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;AACzE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Allowed IP range for a SAS.\n */\nexport interface SasIPRange {\n /**\n * Starting IP address in the IP range.\n * If end IP doesn't provide, start IP will the only IP allowed.\n */\n start: string;\n /**\n * Optional. IP address that ends the IP range.\n * If not provided, start IP will the only IP allowed.\n */\n end?: string;\n}\n\n/**\n * Generate SasIPRange format string. For example:\n *\n * \"8.8.8.8\" or \"1.1.1.1-255.255.255.255\"\n *\n * @param ipRange -\n */\nexport function ipRangeToString(ipRange: SasIPRange): string {\n return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  // In browser, during webpack or browserify bundling, this module will be replaced by 'events'
4
4
  // https://github.com/Gozala/events
5
5
  import { EventEmitter } from "events";
@@ -1 +1 @@
1
- {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EAAE,CAAC;YACvC,IAAI,SAAS,EAAE,CAAC;gBACd,SAAS,EAAE,CAAC;YACd,CAAC;iBAAM,CAAC;gBACN,OAAO;YACT,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// In browser, during webpack or browserify bundling, this module will be replaced by 'events'\n// https://github.com/Gozala/events\nimport { EventEmitter } from \"events\";\n\n/**\n * Operation is an async function to be executed and managed by Batch.\n */\nexport declare type Operation = () => Promise<any>;\n\n/**\n * States for Batch.\n */\nenum BatchStates {\n Good,\n Error,\n}\n\n/**\n * Batch provides basic parallel execution with concurrency limits.\n * Will stop execute left operations when one of the executed operation throws an error.\n * But Batch cannot cancel ongoing operations, you need to cancel them by yourself.\n */\nexport class Batch {\n /**\n * Concurrency. Must be lager than 0.\n */\n private concurrency: number;\n\n /**\n * Number of active operations under execution.\n */\n private actives: number = 0;\n\n /**\n * Number of completed operations under execution.\n */\n private completed: number = 0;\n\n /**\n * Offset of next operation to be executed.\n */\n private offset: number = 0;\n\n /**\n * Operation array to be executed.\n */\n private operations: Operation[] = [];\n\n /**\n * States of Batch. When an error happens, state will turn into error.\n * Batch will stop execute left operations.\n */\n private state: BatchStates = BatchStates.Good;\n\n /**\n * A private emitter used to pass events inside this class.\n */\n private emitter: EventEmitter;\n\n /**\n * Creates an instance of Batch.\n * @param concurrency -\n */\n public constructor(concurrency: number = 5) {\n if (concurrency < 1) {\n throw new RangeError(\"concurrency must be larger than 0\");\n }\n this.concurrency = concurrency;\n this.emitter = new EventEmitter();\n }\n\n /**\n * Add a operation into queue.\n *\n * @param operation -\n */\n public addOperation(operation: Operation): void {\n this.operations.push(async () => {\n try {\n this.actives++;\n await operation();\n this.actives--;\n this.completed++;\n this.parallelExecute();\n } catch (error: any) {\n this.emitter.emit(\"error\", error);\n }\n });\n }\n\n /**\n * Start execute operations in the queue.\n *\n */\n public async do(): Promise<void> {\n if (this.operations.length === 0) {\n return Promise.resolve();\n }\n\n this.parallelExecute();\n\n return new Promise<void>((resolve, reject) => {\n this.emitter.on(\"finish\", resolve);\n\n this.emitter.on(\"error\", (error) => {\n this.state = BatchStates.Error;\n reject(error);\n });\n });\n }\n\n /**\n * Get next operation to be executed. Return null when reaching ends.\n *\n */\n private nextOperation(): Operation | null {\n if (this.offset < this.operations.length) {\n return this.operations[this.offset++];\n }\n return null;\n }\n\n /**\n * Start execute operations. One one the most important difference between\n * this method with do() is that do() wraps as an sync method.\n *\n */\n private parallelExecute(): void {\n if (this.state === BatchStates.Error) {\n return;\n }\n\n if (this.completed >= this.operations.length) {\n this.emitter.emit(\"finish\");\n return;\n }\n\n while (this.actives < this.concurrency) {\n const operation = this.nextOperation();\n if (operation) {\n operation();\n } else {\n return;\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"Batch.js","sourceRoot":"","sources":["../../../../../storage-blob/src/utils/Batch.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,8FAA8F;AAC9F,mCAAmC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAOtC;;GAEG;AACH,IAAK,WAGJ;AAHD,WAAK,WAAW;IACd,6CAAI,CAAA;IACJ,+CAAK,CAAA;AACP,CAAC,EAHI,WAAW,KAAX,WAAW,QAGf;AAED;;;;GAIG;AACH,MAAM,OAAO,KAAK;IAqChB;;;OAGG;IACH,YAAmB,cAAsB,CAAC;QAnC1C;;WAEG;QACK,YAAO,GAAW,CAAC,CAAC;QAE5B;;WAEG;QACK,cAAS,GAAW,CAAC,CAAC;QAE9B;;WAEG;QACK,WAAM,GAAW,CAAC,CAAC;QAE3B;;WAEG;QACK,eAAU,GAAgB,EAAE,CAAC;QAErC;;;WAGG;QACK,UAAK,GAAgB,WAAW,CAAC,IAAI,CAAC;QAY5C,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC;YACpB,MAAM,IAAI,UAAU,CAAC,mCAAmC,CAAC,CAAC;QAC5D,CAAC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YACzC,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACxC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACK,eAAe;QACrB,IAAI,IAAI,CAAC,KAAK,KAAK,WAAW,CAAC,KAAK,EAAE,CAAC;YACrC,OAAO;QACT,CAAC;QAED,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;YAC7C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5B,OAAO;QACT,CAAC;QAED,OAAO,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;YACvC,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;YACvC,IAAI,SAAS,EAAE,CAAC;gBACd,SAAS,EAAE,CAAC;YACd,CAAC;iBAAM,CAAC;gBACN,OAAO;YACT,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// In browser, during webpack or browserify bundling, this module will be replaced by 'events'\n// https://github.com/Gozala/events\nimport { EventEmitter } from \"events\";\n\n/**\n * Operation is an async function to be executed and managed by Batch.\n */\nexport declare type Operation = () => Promise<any>;\n\n/**\n * States for Batch.\n */\nenum BatchStates {\n Good,\n Error,\n}\n\n/**\n * Batch provides basic parallel execution with concurrency limits.\n * Will stop execute left operations when one of the executed operation throws an error.\n * But Batch cannot cancel ongoing operations, you need to cancel them by yourself.\n */\nexport class Batch {\n /**\n * Concurrency. Must be lager than 0.\n */\n private concurrency: number;\n\n /**\n * Number of active operations under execution.\n */\n private actives: number = 0;\n\n /**\n * Number of completed operations under execution.\n */\n private completed: number = 0;\n\n /**\n * Offset of next operation to be executed.\n */\n private offset: number = 0;\n\n /**\n * Operation array to be executed.\n */\n private operations: Operation[] = [];\n\n /**\n * States of Batch. When an error happens, state will turn into error.\n * Batch will stop execute left operations.\n */\n private state: BatchStates = BatchStates.Good;\n\n /**\n * A private emitter used to pass events inside this class.\n */\n private emitter: EventEmitter;\n\n /**\n * Creates an instance of Batch.\n * @param concurrency -\n */\n public constructor(concurrency: number = 5) {\n if (concurrency < 1) {\n throw new RangeError(\"concurrency must be larger than 0\");\n }\n this.concurrency = concurrency;\n this.emitter = new EventEmitter();\n }\n\n /**\n * Add a operation into queue.\n *\n * @param operation -\n */\n public addOperation(operation: Operation): void {\n this.operations.push(async () => {\n try {\n this.actives++;\n await operation();\n this.actives--;\n this.completed++;\n this.parallelExecute();\n } catch (error: any) {\n this.emitter.emit(\"error\", error);\n }\n });\n }\n\n /**\n * Start execute operations in the queue.\n *\n */\n public async do(): Promise<void> {\n if (this.operations.length === 0) {\n return Promise.resolve();\n }\n\n this.parallelExecute();\n\n return new Promise<void>((resolve, reject) => {\n this.emitter.on(\"finish\", resolve);\n\n this.emitter.on(\"error\", (error) => {\n this.state = BatchStates.Error;\n reject(error);\n });\n });\n }\n\n /**\n * Get next operation to be executed. Return null when reaching ends.\n *\n */\n private nextOperation(): Operation | null {\n if (this.offset < this.operations.length) {\n return this.operations[this.offset++];\n }\n return null;\n }\n\n /**\n * Start execute operations. One one the most important difference between\n * this method with do() is that do() wraps as an sync method.\n *\n */\n private parallelExecute(): void {\n if (this.state === BatchStates.Error) {\n return;\n }\n\n if (this.completed >= this.operations.length) {\n this.emitter.emit(\"finish\");\n return;\n }\n\n while (this.actives < this.concurrency) {\n const operation = this.nextOperation();\n if (operation) {\n operation();\n } else {\n return;\n }\n }\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { Readable } from "stream";
4
4
  import { AvroReadableFromStream, AvroReader } from "../../../storage-internal-avro/src";
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"BlobQuickQueryStream.js","sourceRoot":"","sources":["../../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AAU,EAAE,CAAC,CAAC;oBAC/C,CAAC;oBACD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBAChB,MAAM;gBACR,KAAK,qDAAqD;oBACxD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;wBACjB,MAAM,KAAK,GAAI,GAAW,CAAC,KAAK,CAAC;wBACjC,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;4BAC/B,MAAM,KAAK,CAAC,qCAAqC,CAAC,CAAC;wBACrD,CAAC;wBACD,MAAM,IAAI,GAAI,GAAW,CAAC,IAAI,CAAC;wBAC/B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;4BAC7B,MAAM,KAAK,CAAC,oCAAoC,CAAC,CAAC;wBACpD,CAAC;wBACD,MAAM,WAAW,GAAI,GAAW,CAAC,WAAW,CAAC;wBAC7C,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;4BACpC,MAAM,KAAK,CAAC,2CAA2C,CAAC,CAAC;wBAC3D,CAAC;wBACD,MAAM,QAAQ,GAAI,GAAW,CAAC,QAAQ,CAAC;wBACvC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;4BACjC,MAAM,KAAK,CAAC,wCAAwC,CAAC,CAAC;wBACxD,CAAC;wBACD,IAAI,CAAC,OAAO,CAAC;4BACX,QAAQ;4BACR,IAAI;4BACJ,OAAO,EAAE,KAAK;4BACd,WAAW;yBACZ,CAAC,CAAC;oBACL,CAAC;oBACD,MAAM;gBACR;oBACE,MAAM,KAAK,CAAC,kBAAkB,MAAM,2BAA2B,CAAC,CAAC;YACrE,CAAC;QACH,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;IAC/C,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Readable } from \"stream\";\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { TransferProgressEvent } from \"@azure/core-rest-pipeline\";\n\nimport { AvroReadableFromStream, AvroReader } from \"../../../storage-internal-avro/src\";\nimport { BlobQueryError } from \"../Clients\";\n\nexport interface BlobQuickQueryStreamOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Read progress event handler\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Callback to receive error events during the query operaiton.\n */\n onError?: (error: BlobQueryError) => void;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query.\n */\nexport class BlobQuickQueryStream extends Readable {\n private source: NodeJS.ReadableStream;\n private avroReader: AvroReader;\n private avroIter: AsyncIterableIterator<unknown | null>;\n private avroPaused: boolean = true;\n private onProgress?: (progress: TransferProgressEvent) => void;\n private onError?: (error: BlobQueryError) => void;\n\n /**\n * Creates an instance of BlobQuickQueryStream.\n *\n * @param source - The current ReadableStream returned from getter\n * @param options -\n */\n public constructor(source: NodeJS.ReadableStream, options: BlobQuickQueryStreamOptions = {}) {\n super();\n this.source = source;\n this.onProgress = options.onProgress;\n this.onError = options.onError;\n this.avroReader = new AvroReader(new AvroReadableFromStream(this.source));\n this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal });\n }\n\n public _read(): void {\n if (this.avroPaused) {\n this.readInternal().catch((err) => {\n this.emit(\"error\", err);\n });\n }\n }\n\n private async readInternal() {\n this.avroPaused = false;\n let avroNext;\n do {\n avroNext = await this.avroIter.next();\n if (avroNext.done) {\n break;\n }\n const obj = avroNext.value;\n const schema = (obj as any).$schema;\n if (typeof schema !== \"string\") {\n throw Error(\"Missing schema in avro record.\");\n }\n\n switch (schema) {\n case \"com.microsoft.azure.storage.queryBlobContents.resultData\":\n {\n const data = (obj as any).data;\n if (data instanceof Uint8Array === false) {\n throw Error(\"Invalid data in avro result record.\");\n }\n if (!this.push(Buffer.from(data))) {\n this.avroPaused = true;\n }\n }\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.progress\":\n {\n const bytesScanned = (obj as any).bytesScanned;\n if (typeof bytesScanned !== \"number\") {\n throw Error(\"Invalid bytesScanned in avro progress record.\");\n }\n if (this.onProgress) {\n this.onProgress({ loadedBytes: bytesScanned });\n }\n }\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.end\":\n if (this.onProgress) {\n const totalBytes = (obj as any).totalBytes;\n if (typeof totalBytes !== \"number\") {\n throw Error(\"Invalid totalBytes in avro end record.\");\n }\n this.onProgress({ loadedBytes: totalBytes });\n }\n this.push(null);\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.error\":\n if (this.onError) {\n const fatal = (obj as any).fatal;\n if (typeof fatal !== \"boolean\") {\n throw Error(\"Invalid fatal in avro error record.\");\n }\n const name = (obj as any).name;\n if (typeof name !== \"string\") {\n throw Error(\"Invalid name in avro error record.\");\n }\n const description = (obj as any).description;\n if (typeof description !== \"string\") {\n throw Error(\"Invalid description in avro error record.\");\n }\n const position = (obj as any).position;\n if (typeof position !== \"number\") {\n throw Error(\"Invalid position in avro error record.\");\n }\n this.onError({\n position,\n name,\n isFatal: fatal,\n description,\n });\n }\n break;\n default:\n throw Error(`Unknown schema ${schema} in avro progress record.`);\n }\n } while (!avroNext.done && !this.avroPaused);\n }\n}\n"]}
1
+ {"version":3,"file":"BlobQuickQueryStream.js","sourceRoot":"","sources":["../../../../../storage-blob/src/utils/BlobQuickQueryStream.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAKlC,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAqBxF;;;;GAIG;AACH,MAAM,OAAO,oBAAqB,SAAQ,QAAQ;IAQhD;;;;;OAKG;IACH,YAAmB,MAA6B,EAAE,UAA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C,CAAC;wBACrD,CAAC;wBACD,MAAM,IAAI,GAAI,GAAW,CAAC,IAAI,CAAC;wBAC/B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;4BAC7B,MAAM,KAAK,CAAC,oCAAoC,CAAC,CAAC;wBACpD,CAAC;wBACD,MAAM,WAAW,GAAI,GAAW,CAAC,WAAW,CAAC;wBAC7C,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;4BACpC,MAAM,KAAK,CAAC,2CAA2C,CAAC,CAAC;wBAC3D,CAAC;wBACD,MAAM,QAAQ,GAAI,GAAW,CAAC,QAAQ,CAAC;wBACvC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;4BACjC,MAAM,KAAK,CAAC,wCAAwC,CAAC,CAAC;wBACxD,CAAC;wBACD,IAAI,CAAC,OAAO,CAAC;4BACX,QAAQ;4BACR,IAAI;4BACJ,OAAO,EAAE,KAAK;4BACd,WAAW;yBACZ,CAAC,CAAC;oBACL,CAAC;oBACD,MAAM;gBACR;oBACE,MAAM,KAAK,CAAC,kBAAkB,MAAM,2BAA2B,CAAC,CAAC;YACrE,CAAC;QACH,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;IAC/C,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Readable } from \"stream\";\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { TransferProgressEvent } from \"@azure/core-rest-pipeline\";\n\nimport { AvroReadableFromStream, AvroReader } from \"../../../storage-internal-avro/src\";\nimport { BlobQueryError } from \"../Clients\";\n\nexport interface BlobQuickQueryStreamOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n\n /**\n * Read progress event handler\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Callback to receive error events during the query operaiton.\n */\n onError?: (error: BlobQueryError) => void;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query.\n */\nexport class BlobQuickQueryStream extends Readable {\n private source: NodeJS.ReadableStream;\n private avroReader: AvroReader;\n private avroIter: AsyncIterableIterator<unknown | null>;\n private avroPaused: boolean = true;\n private onProgress?: (progress: TransferProgressEvent) => void;\n private onError?: (error: BlobQueryError) => void;\n\n /**\n * Creates an instance of BlobQuickQueryStream.\n *\n * @param source - The current ReadableStream returned from getter\n * @param options -\n */\n public constructor(source: NodeJS.ReadableStream, options: BlobQuickQueryStreamOptions = {}) {\n super();\n this.source = source;\n this.onProgress = options.onProgress;\n this.onError = options.onError;\n this.avroReader = new AvroReader(new AvroReadableFromStream(this.source));\n this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal });\n }\n\n public _read(): void {\n if (this.avroPaused) {\n this.readInternal().catch((err) => {\n this.emit(\"error\", err);\n });\n }\n }\n\n private async readInternal() {\n this.avroPaused = false;\n let avroNext;\n do {\n avroNext = await this.avroIter.next();\n if (avroNext.done) {\n break;\n }\n const obj = avroNext.value;\n const schema = (obj as any).$schema;\n if (typeof schema !== \"string\") {\n throw Error(\"Missing schema in avro record.\");\n }\n\n switch (schema) {\n case \"com.microsoft.azure.storage.queryBlobContents.resultData\":\n {\n const data = (obj as any).data;\n if (data instanceof Uint8Array === false) {\n throw Error(\"Invalid data in avro result record.\");\n }\n if (!this.push(Buffer.from(data))) {\n this.avroPaused = true;\n }\n }\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.progress\":\n {\n const bytesScanned = (obj as any).bytesScanned;\n if (typeof bytesScanned !== \"number\") {\n throw Error(\"Invalid bytesScanned in avro progress record.\");\n }\n if (this.onProgress) {\n this.onProgress({ loadedBytes: bytesScanned });\n }\n }\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.end\":\n if (this.onProgress) {\n const totalBytes = (obj as any).totalBytes;\n if (typeof totalBytes !== \"number\") {\n throw Error(\"Invalid totalBytes in avro end record.\");\n }\n this.onProgress({ loadedBytes: totalBytes });\n }\n this.push(null);\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.error\":\n if (this.onError) {\n const fatal = (obj as any).fatal;\n if (typeof fatal !== \"boolean\") {\n throw Error(\"Invalid fatal in avro error record.\");\n }\n const name = (obj as any).name;\n if (typeof name !== \"string\") {\n throw Error(\"Invalid name in avro error record.\");\n }\n const description = (obj as any).description;\n if (typeof description !== \"string\") {\n throw Error(\"Invalid description in avro error record.\");\n }\n const position = (obj as any).position;\n if (typeof position !== \"number\") {\n throw Error(\"Invalid position in avro error record.\");\n }\n this.onError({\n position,\n name,\n isFatal: fatal,\n description,\n });\n }\n break;\n default:\n throw Error(`Unknown schema ${schema} in avro progress record.`);\n }\n } while (!avroNext.done && !this.avroPaused);\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  var MutexLockStatus;
4
4
  (function (MutexLockStatus) {
5
5
  MutexLockStatus[MutexLockStatus["LOCKED"] = 0] = "LOCKED";
@@ -1 +1 @@
1
- {"version":3,"file":"Mutex.js","sourceRoot":"","sources":["../../../../../storage-blob/src/utils/Mutex.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,IAAK,eAGJ;AAHD,WAAK,eAAe;IAClB,yDAAM,CAAA;IACN,6DAAQ,CAAA;AACV,CAAC,EAHI,eAAe,KAAf,eAAe,QAGnB;AAID;;GAEG;AACH,MAAM,OAAO,KAAK;IAChB;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAW;QAClC,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YACnC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,SAAS,IAAI,IAAI,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C,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxE,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;YAC5C,YAAY,CAAC,GAAG,EAAE;gBAChB,OAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;;AAlBc,UAAI,GAAuC,EAAE,CAAC;AAC9C,eAAS,GAAkC,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nenum MutexLockStatus {\n LOCKED,\n UNLOCKED,\n}\n\ntype Callback = (...args: any[]) => any;\n\n/**\n * An async mutex lock.\n */\nexport class Mutex {\n /**\n * Lock for a specific key. If the lock has been acquired by another customer, then\n * will wait until getting the lock.\n *\n * @param key - lock key\n */\n public static async lock(key: string): Promise<void> {\n return new Promise<void>((resolve) => {\n if (this.keys[key] === undefined || this.keys[key] === MutexLockStatus.UNLOCKED) {\n this.keys[key] = MutexLockStatus.LOCKED;\n resolve();\n } else {\n this.onUnlockEvent(key, () => {\n this.keys[key] = MutexLockStatus.LOCKED;\n resolve();\n });\n }\n });\n }\n\n /**\n * Unlock a key.\n *\n * @param key -\n */\n public static async unlock(key: string): Promise<void> {\n return new Promise<void>((resolve) => {\n if (this.keys[key] === MutexLockStatus.LOCKED) {\n this.emitUnlockEvent(key);\n }\n delete this.keys[key];\n resolve();\n });\n }\n\n private static keys: { [key: string]: MutexLockStatus } = {};\n private static listeners: { [key: string]: Callback[] } = {};\n\n private static onUnlockEvent(key: string, handler: Callback) {\n if (this.listeners[key] === undefined) {\n this.listeners[key] = [handler];\n } else {\n this.listeners[key].push(handler);\n }\n }\n\n private static emitUnlockEvent(key: string) {\n if (this.listeners[key] !== undefined && this.listeners[key].length > 0) {\n const handler = this.listeners[key].shift();\n setImmediate(() => {\n handler!.call(this);\n });\n }\n }\n}\n"]}
1
+ {"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,CAAC;IAKO,MAAM,CAAC,aAAa,CAAC,GAAW,EAAE,OAAiB;QACzD,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;YACtC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAClC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IAEO,MAAM,CAAC,eAAe,CAAC,GAAW;QACxC,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxE,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;YAC5C,YAAY,CAAC,GAAG,EAAE;gBAChB,OAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;;AAlBc,UAAI,GAAuC,EAAE,CAAC;AAC9C,eAAS,GAAkC,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nenum MutexLockStatus {\n LOCKED,\n UNLOCKED,\n}\n\ntype Callback = (...args: any[]) => any;\n\n/**\n * An async mutex lock.\n */\nexport class Mutex {\n /**\n * Lock for a specific key. If the lock has been acquired by another customer, then\n * will wait until getting the lock.\n *\n * @param key - lock key\n */\n public static async lock(key: string): Promise<void> {\n return new Promise<void>((resolve) => {\n if (this.keys[key] === undefined || this.keys[key] === MutexLockStatus.UNLOCKED) {\n this.keys[key] = MutexLockStatus.LOCKED;\n resolve();\n } else {\n this.onUnlockEvent(key, () => {\n this.keys[key] = MutexLockStatus.LOCKED;\n resolve();\n });\n }\n });\n }\n\n /**\n * Unlock a key.\n *\n * @param key -\n */\n public static async unlock(key: string): Promise<void> {\n return new Promise<void>((resolve) => {\n if (this.keys[key] === MutexLockStatus.LOCKED) {\n this.emitUnlockEvent(key);\n }\n delete this.keys[key];\n resolve();\n });\n }\n\n private static keys: { [key: string]: MutexLockStatus } = {};\n private static listeners: { [key: string]: Callback[] } = {};\n\n private static onUnlockEvent(key: string, handler: Callback) {\n if (this.listeners[key] === undefined) {\n this.listeners[key] = [handler];\n } else {\n this.listeners[key].push(handler);\n }\n }\n\n private static emitUnlockEvent(key: string) {\n if (this.listeners[key] !== undefined && this.listeners[key].length > 0) {\n const handler = this.listeners[key].shift();\n setImmediate(() => {\n handler!.call(this);\n });\n }\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { AbortError } from "@azure/abort-controller";
4
4
  import { Readable } from "stream";
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"RetriableReadableStream.js","sourceRoot":"","sources":["../../../../../storage-blob/src/utils/RetriableReadableStream.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAgClC;;;;GAIG;AACH,MAAM,OAAO,uBAAwB,SAAQ,QAAQ;IAWnD;;;;;;;;;OASG;IACH,YACE,MAA6B,EAC7B,MAA4B,EAC5B,MAAc,EACd,KAAa,EACb,UAA0C,EAAE;QAE5C,KAAK,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;QAtB1C,YAAO,GAAW,CAAC,CAAC;QAuDpB,sBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE;YAC3C,IAAI,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;gBACnC,IAAI,CAAC,OAAO,CAAC,iBAAiB,G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AC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortError } from \"@azure/abort-controller\";\nimport { TransferProgressEvent } from \"@azure/core-rest-pipeline\";\nimport { Readable } from \"stream\";\n\nexport type ReadableStreamGetter = (offset: number) => Promise<NodeJS.ReadableStream>;\n\nexport interface RetriableReadableStreamOptions {\n /**\n * Max retry count (greater than or equal to 0), undefined or invalid value means no retry\n */\n maxRetryRequests?: number;\n\n /**\n * Read progress event handler\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Debug purpose only. Used to inject an unexpected end to existing internal stream,\n * to test stream retry works well or not.\n *\n * When assign it to true, for next incoming \"data\" event of internal stream,\n * RetriableReadableStream will try to emit an \"end\" event to existing internal\n * stream to force it end and start retry from the breaking point.\n * The value will then update to \"undefined\", once the injection works.\n */\n doInjectErrorOnce?: boolean;\n\n /**\n * A threshold, not a limit. Dictates the amount of data that a stream buffers before it stops asking for more data.\n */\n highWaterMark?: number;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends.\n */\nexport class RetriableReadableStream extends Readable {\n private start: number;\n private offset: number;\n private end: number;\n private getter: ReadableStreamGetter;\n private source: NodeJS.ReadableStream;\n private retries: number = 0;\n private maxRetryRequests: number;\n private onProgress?: (progress: TransferProgressEvent) => void;\n private options: RetriableReadableStreamOptions;\n\n /**\n * Creates an instance of RetriableReadableStream.\n *\n * @param source - The current ReadableStream returned from getter\n * @param getter - A method calling downloading request returning\n * a new ReadableStream from specified offset\n * @param offset - Offset position in original data source to read\n * @param count - How much data in original data source to read\n * @param options -\n */\n public constructor(\n source: NodeJS.ReadableStream,\n getter: ReadableStreamGetter,\n offset: number,\n count: number,\n options: RetriableReadableStreamOptions = {},\n ) {\n super({ highWaterMark: options.highWaterMark });\n this.getter = getter;\n this.source = source;\n this.start = offset;\n this.offset = offset;\n this.end = offset + count - 1;\n this.maxRetryRequests =\n options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0;\n this.onProgress = options.onProgress;\n this.options = options;\n\n this.setSourceEventHandlers();\n }\n\n public _read(): void {\n this.source.resume();\n }\n\n private setSourceEventHandlers() {\n this.source.on(\"data\", this.sourceDataHandler);\n this.source.on(\"end\", this.sourceErrorOrEndHandler);\n this.source.on(\"error\", this.sourceErrorOrEndHandler);\n // needed for Node14\n this.source.on(\"aborted\", this.sourceAbortedHandler);\n }\n\n private removeSourceEventHandlers() {\n this.source.removeListener(\"data\", this.sourceDataHandler);\n this.source.removeListener(\"end\", this.sourceErrorOrEndHandler);\n this.source.removeListener(\"error\", this.sourceErrorOrEndHandler);\n this.source.removeListener(\"aborted\", this.sourceAbortedHandler);\n }\n\n private sourceDataHandler = (data: Buffer) => {\n if (this.options.doInjectErrorOnce) {\n this.options.doInjectErrorOnce = undefined;\n this.source.pause();\n this.sourceErrorOrEndHandler();\n (this.source as Readable).destroy();\n return;\n }\n\n // console.log(\n // `Offset: ${this.offset}, Received ${data.length} from internal stream`\n // );\n this.offset += data.length;\n if (this.onProgress) {\n this.onProgress({ loadedBytes: this.offset - this.start });\n }\n if (!this.push(data)) {\n this.source.pause();\n }\n };\n\n private sourceAbortedHandler = () => {\n const abortError = new AbortError(\"The operation was aborted.\");\n this.destroy(abortError);\n };\n\n private sourceErrorOrEndHandler = (err?: Error) => {\n if (err && err.name === \"AbortError\") {\n this.destroy(err);\n return;\n }\n\n // console.log(\n // `Source stream emits end or error, offset: ${\n // this.offset\n // }, dest end : ${this.end}`\n // );\n this.removeSourceEventHandlers();\n if (this.offset - 1 === this.end) {\n this.push(null);\n } else if (this.offset <= this.end) {\n // console.log(\n // `retries: ${this.retries}, max retries: ${this.maxRetries}`\n // );\n if (this.retries < this.maxRetryRequests) {\n this.retries += 1;\n this.getter(this.offset)\n .then((newSource) => {\n this.source = newSource;\n this.setSourceEventHandlers();\n return;\n })\n .catch((error) => {\n this.destroy(error);\n });\n } else {\n this.destroy(\n new Error(\n `Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${\n this.offset - 1\n }, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${\n this.maxRetryRequests\n }`,\n ),\n );\n }\n } else {\n this.destroy(\n new Error(\n `Data corruption failure: Received more data than original request, data needed offset is ${\n this.end\n }, received offset: ${this.offset - 1}`,\n ),\n );\n }\n };\n\n _destroy(error: Error | null, callback: (error?: Error) => void): void {\n // remove listener from source and release source\n this.removeSourceEventHandlers();\n (this.source as Readable).destroy();\n\n callback(error === null ? undefined : error);\n }\n}\n"]}
1
+ {"version":3,"file":"RetriableReadableStream.js","sourceRoot":"","sources":["../../../../../storage-blob/src/utils/RetriableReadableStream.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAgClC;;;;GAIG;AACH,MAAM,OAAO,uBAAwB,SAAQ,QAAQ;IAWnD;;;;;;;;;OASG;IACH,YACE,MAA6B,EAC7B,MAA4B,EAC5B,MAAc,EACd,KAAa,EACb,UAA0C,EAAE;QAE5C,KAAK,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;QAtB1C,YAAO,GAAW,CAAC,CAAC;QAuDpB,sBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE;YAC3C,IAAI,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;gBACnC,IAAI,CAAC,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;gBAC3C,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;gBACpB,IAAI,CAAC,uBAAuB,EAAE,CAAC;gBAC9B,IAAI,CAAC,MAAmB,CAAC,OAAO,EAAE,CAAC;gBACpC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,CAAC,sBAAsB,EAAE,CAAC;IAChC,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;IAEO,sBAAsB;QAC5B,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;QACtD,oBAAoB;QACpB,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACvD,CAAC;IAEO,yBAAyB;QAC/B,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC3D,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;QAChE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;QAClE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACnE,CAAC;IA+ED,QAAQ,CAAC,KAAmB,EAAE,QAAiC;QAC7D,iDAAiD;QACjD,IAAI,CAAC,yBAAyB,EAAE,CAAC;QAChC,IAAI,CAAC,MAAmB,CAAC,OAAO,EAAE,CAAC;QAEpC,QAAQ,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AbortError } from \"@azure/abort-controller\";\nimport { TransferProgressEvent } from \"@azure/core-rest-pipeline\";\nimport { Readable } from \"stream\";\n\nexport type ReadableStreamGetter = (offset: number) => Promise<NodeJS.ReadableStream>;\n\nexport interface RetriableReadableStreamOptions {\n /**\n * Max retry count (greater than or equal to 0), undefined or invalid value means no retry\n */\n maxRetryRequests?: number;\n\n /**\n * Read progress event handler\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * Debug purpose only. Used to inject an unexpected end to existing internal stream,\n * to test stream retry works well or not.\n *\n * When assign it to true, for next incoming \"data\" event of internal stream,\n * RetriableReadableStream will try to emit an \"end\" event to existing internal\n * stream to force it end and start retry from the breaking point.\n * The value will then update to \"undefined\", once the injection works.\n */\n doInjectErrorOnce?: boolean;\n\n /**\n * A threshold, not a limit. Dictates the amount of data that a stream buffers before it stops asking for more data.\n */\n highWaterMark?: number;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends.\n */\nexport class RetriableReadableStream extends Readable {\n private start: number;\n private offset: number;\n private end: number;\n private getter: ReadableStreamGetter;\n private source: NodeJS.ReadableStream;\n private retries: number = 0;\n private maxRetryRequests: number;\n private onProgress?: (progress: TransferProgressEvent) => void;\n private options: RetriableReadableStreamOptions;\n\n /**\n * Creates an instance of RetriableReadableStream.\n *\n * @param source - The current ReadableStream returned from getter\n * @param getter - A method calling downloading request returning\n * a new ReadableStream from specified offset\n * @param offset - Offset position in original data source to read\n * @param count - How much data in original data source to read\n * @param options -\n */\n public constructor(\n source: NodeJS.ReadableStream,\n getter: ReadableStreamGetter,\n offset: number,\n count: number,\n options: RetriableReadableStreamOptions = {},\n ) {\n super({ highWaterMark: options.highWaterMark });\n this.getter = getter;\n this.source = source;\n this.start = offset;\n this.offset = offset;\n this.end = offset + count - 1;\n this.maxRetryRequests =\n options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0;\n this.onProgress = options.onProgress;\n this.options = options;\n\n this.setSourceEventHandlers();\n }\n\n public _read(): void {\n this.source.resume();\n }\n\n private setSourceEventHandlers() {\n this.source.on(\"data\", this.sourceDataHandler);\n this.source.on(\"end\", this.sourceErrorOrEndHandler);\n this.source.on(\"error\", this.sourceErrorOrEndHandler);\n // needed for Node14\n this.source.on(\"aborted\", this.sourceAbortedHandler);\n }\n\n private removeSourceEventHandlers() {\n this.source.removeListener(\"data\", this.sourceDataHandler);\n this.source.removeListener(\"end\", this.sourceErrorOrEndHandler);\n this.source.removeListener(\"error\", this.sourceErrorOrEndHandler);\n this.source.removeListener(\"aborted\", this.sourceAbortedHandler);\n }\n\n private sourceDataHandler = (data: Buffer) => {\n if (this.options.doInjectErrorOnce) {\n this.options.doInjectErrorOnce = undefined;\n this.source.pause();\n this.sourceErrorOrEndHandler();\n (this.source as Readable).destroy();\n return;\n }\n\n // console.log(\n // `Offset: ${this.offset}, Received ${data.length} from internal stream`\n // );\n this.offset += data.length;\n if (this.onProgress) {\n this.onProgress({ loadedBytes: this.offset - this.start });\n }\n if (!this.push(data)) {\n this.source.pause();\n }\n };\n\n private sourceAbortedHandler = () => {\n const abortError = new AbortError(\"The operation was aborted.\");\n this.destroy(abortError);\n };\n\n private sourceErrorOrEndHandler = (err?: Error) => {\n if (err && err.name === \"AbortError\") {\n this.destroy(err);\n return;\n }\n\n // console.log(\n // `Source stream emits end or error, offset: ${\n // this.offset\n // }, dest end : ${this.end}`\n // );\n this.removeSourceEventHandlers();\n if (this.offset - 1 === this.end) {\n this.push(null);\n } else if (this.offset <= this.end) {\n // console.log(\n // `retries: ${this.retries}, max retries: ${this.maxRetries}`\n // );\n if (this.retries < this.maxRetryRequests) {\n this.retries += 1;\n this.getter(this.offset)\n .then((newSource) => {\n this.source = newSource;\n this.setSourceEventHandlers();\n return;\n })\n .catch((error) => {\n this.destroy(error);\n });\n } else {\n this.destroy(\n new Error(\n `Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${\n this.offset - 1\n }, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${\n this.maxRetryRequests\n }`,\n ),\n );\n }\n } else {\n this.destroy(\n new Error(\n `Data corruption failure: Received more data than original request, data needed offset is ${\n this.end\n }, received offset: ${this.offset - 1}`,\n ),\n );\n }\n };\n\n _destroy(error: Error | null, callback: (error?: Error) => void): void {\n // remove listener from source and release source\n this.removeSourceEventHandlers();\n (this.source as Readable).destroy();\n\n callback(error === null ? undefined : error);\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  /*
4
4
  * We need to imitate .Net culture-aware sorting, which is used in storage service.
5
5
  * Below tables contain sort-keys for en-US culture.
@@ -1 +1 @@
1
- {"version":3,"file":"SharedKeyComparator.js","sourceRoot":"","sources":["../../../../../storage-blob/src/utils/SharedKeyComparator.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,SAAS,GAAG,IAAI,WAAW,CAAC;IAChC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;IAC7F,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK;IAC9F,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,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AAC,GAAG,CAAC;QAChF,MAAM,OAAO,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAChF,IAAI,OAAO,KAAK,GAAG,IAAI,OAAO,KAAK,GAAG,EAAE,CAAC;YACvC,CAAC,GAAG,CAAC,CAAC;YACN,CAAC,GAAG,CAAC,CAAC;YACN,EAAE,UAAU,CAAC;QACf,CAAC;aAAM,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;YAC/B,EAAE,CAAC,CAAC;YACJ,EAAE,CAAC,CAAC;QACN,CAAC;aAAM,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;YACzB,EAAE,CAAC,CAAC;QACN,CAAC;aAAM,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;YACzB,EAAE,CAAC,CAAC;QACN,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,GAAG,OAAO,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/*\n * We need to imitate .Net culture-aware sorting, which is used in storage service.\n * Below tables contain sort-keys for en-US culture.\n */\nconst table_lv0 = new Uint32Array([\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x71c, 0x0, 0x71f, 0x721,\n 0x723, 0x725, 0x0, 0x0, 0x0, 0x72d, 0x803, 0x0, 0x0, 0x733, 0x0, 0xd03, 0xd1a, 0xd1c, 0xd1e,\n 0xd20, 0xd22, 0xd24, 0xd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 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n]);\nconst table_lv4 = new Uint32Array([\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x8012, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8212, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n]);\n\nexport function compareHeader(lhs: string, rhs: string): number {\n if (isLessThan(lhs, rhs)) return -1;\n\n return 1;\n}\n\nfunction isLessThan(lhs: string, rhs: string): boolean {\n const tables = [table_lv0, table_lv2, table_lv4];\n let curr_level = 0;\n let i = 0;\n let j = 0;\n while (curr_level < tables.length) {\n if (curr_level === tables.length - 1 && i !== j) {\n return i > j;\n }\n const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 0x1;\n const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 0x1;\n if (weight1 === 0x1 && weight2 === 0x1) {\n i = 0;\n j = 0;\n ++curr_level;\n } else if (weight1 === weight2) {\n ++i;\n ++j;\n } else if (weight1 === 0) {\n ++i;\n } else if (weight2 === 0) {\n ++j;\n } else {\n return weight1 < weight2;\n }\n }\n return false;\n}\n"]}
1
+ {"version":3,"file":"SharedKeyComparator.js","sourceRoot":"","sources":["../../../../../storage-blob/src/utils/SharedKeyComparator.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,SAAS,GAAG,IAAI,WAAW,CAAC;IAChC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;IAC7F,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK;IAC9F,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;IAC3F,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,K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I,OAAO,KAAK,GAAG,IAAI,OAAO,KAAK,GAAG,EAAE,CAAC;YACvC,CAAC,GAAG,CAAC,CAAC;YACN,CAAC,GAAG,CAAC,CAAC;YACN,EAAE,UAAU,CAAC;QACf,CAAC;aAAM,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;YAC/B,EAAE,CAAC,CAAC;YACJ,EAAE,CAAC,CAAC;QACN,CAAC;aAAM,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;YACzB,EAAE,CAAC,CAAC;QACN,CAAC;aAAM,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;YACzB,EAAE,CAAC,CAAC;QACN,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,GAAG,OAAO,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * We need to imitate .Net culture-aware sorting, which is used in storage service.\n * Below tables contain sort-keys for en-US culture.\n */\nconst table_lv0 = new Uint32Array([\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x71c, 0x0, 0x71f, 0x721,\n 0x723, 0x725, 0x0, 0x0, 0x0, 0x72d, 0x803, 0x0, 0x0, 0x733, 0x0, 0xd03, 0xd1a, 0xd1c, 0xd1e,\n 0xd20, 0xd22, 0xd24, 0xd26, 0xd28, 0xd2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe02, 0xe09, 0xe0a,\n 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, 0xe7c, 0xe7e, 0xe89,\n 0xe8a, 0xe91, 0xe99, 0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x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x8012, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8212, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n]);\n\nexport function compareHeader(lhs: string, rhs: string): number {\n if (isLessThan(lhs, rhs)) return -1;\n\n return 1;\n}\n\nfunction isLessThan(lhs: string, rhs: string): boolean {\n const tables = [table_lv0, table_lv2, table_lv4];\n let curr_level = 0;\n let i = 0;\n let j = 0;\n while (curr_level < tables.length) {\n if (curr_level === tables.length - 1 && i !== j) {\n return i > j;\n }\n const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 0x1;\n const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 0x1;\n if (weight1 === 0x1 && weight2 === 0x1) {\n i = 0;\n j = 0;\n ++curr_level;\n } else if (weight1 === weight2) {\n ++i;\n ++j;\n } else if (weight1 === 0) {\n ++i;\n } else if (weight2 === 0) {\n ++j;\n } else {\n return weight1 < weight2;\n }\n }\n return false;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { createDefaultHttpClient } from "@azure/core-rest-pipeline";
4
4
  let _defaultHttpClient;
5
5
  export function getCachedDefaultHttpClient() {
@@ -1 +1 @@
1
- {"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../../../storage-blob/src/utils/cache.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,uBAAuB,EAAc,MAAM,2BAA2B,CAAC;AAEhF,IAAI,kBAA8B,CAAC;AAEnC,MAAM,UAAU,0BAA0B;IACxC,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACxB,kBAAkB,GAAG,uBAAuB,EAAE,CAAC;IACjD,CAAC;IACD,OAAO,kBAAkB,CAAC;AAC5B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createDefaultHttpClient, HttpClient } from \"@azure/core-rest-pipeline\";\n\nlet _defaultHttpClient: HttpClient;\n\nexport function getCachedDefaultHttpClient(): HttpClient {\n if (!_defaultHttpClient) {\n _defaultHttpClient = createDefaultHttpClient();\n }\n return _defaultHttpClient;\n}\n"]}
1
+ {"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../../../storage-blob/src/utils/cache.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,uBAAuB,EAAc,MAAM,2BAA2B,CAAC;AAEhF,IAAI,kBAA8B,CAAC;AAEnC,MAAM,UAAU,0BAA0B;IACxC,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACxB,kBAAkB,GAAG,uBAAuB,EAAE,CAAC;IACjD,CAAC;IACD,OAAO,kBAAkB,CAAC;AAC5B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createDefaultHttpClient, HttpClient } from \"@azure/core-rest-pipeline\";\n\nlet _defaultHttpClient: HttpClient;\n\nexport function getCachedDefaultHttpClient(): HttpClient {\n if (!_defaultHttpClient) {\n _defaultHttpClient = createDefaultHttpClient();\n }\n return _defaultHttpClient;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export const SDK_VERSION = "12.25.0-beta.2";
4
4
  export const SERVICE_VERSION = "2024-11-04";
5
5
  export const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../storage-blob/src/utils/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,gBAAgB,CAAC;AACpD,MAAM,CAAC,MAAM,eAAe,GAAW,YAAY,CAAC;AAEpD,MAAM,CAAC,MAAM,gCAAgC,GAAW,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,QAAQ;AACnF,MAAM,CAAC,MAAM,gCAAgC,GAAW,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,SAAS;AACrF,MAAM,CAAC,MAAM,qBAAqB,GAAW,KAAK,CAAC;AACnD,MAAM,CAAC,MAAM,+BAA+B,GAAW,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,MAAM;AAC9E,MAAM,CAAC,MAAM,iCAAiC,GAAW,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,MAAM;AAChF,MAAM,CAAC,MAAM,mCAAmC,GAAW,CAAC,CAAC;AAE7D,MAAM,CAAC,MAAM,eAAe,GAAW,GAAG,GAAG,IAAI,CAAC,CAAC,QAAQ;AAC3D;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAsB,oCAAoC,CAAC;AAE1F,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,UAAU,EAA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ACP,OAAO;CACR,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const SDK_VERSION: string = \"12.25.0-beta.2\";\nexport const SERVICE_VERSION: string = \"2024-11-04\";\n\nexport const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES: number = 256 * 1024 * 1024; // 256MB\nexport const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES: number = 4000 * 1024 * 1024; // 4000MB\nexport const BLOCK_BLOB_MAX_BLOCKS: number = 50000;\nexport const DEFAULT_BLOCK_BUFFER_SIZE_BYTES: number = 8 * 1024 * 1024; // 8MB\nexport const DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES: number = 4 * 1024 * 1024; // 4MB\nexport const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS: number = 5;\n\nexport const REQUEST_TIMEOUT: number = 100 * 1000; // In ms\n/**\n * The OAuth scope to use with Azure Storage.\n */\nexport const StorageOAuthScopes: string | string[] = \"https://storage.azure.com/.default\";\n\nexport const URLConstants = {\n Parameters: {\n FORCE_BROWSER_NO_CACHE: \"_\",\n SIGNATURE: \"sig\",\n SNAPSHOT: \"snapshot\",\n VERSIONID: \"versionid\",\n TIMEOUT: \"timeout\",\n },\n};\n\nexport const HTTPURLConnection = {\n HTTP_ACCEPTED: 202,\n HTTP_CONFLICT: 409,\n HTTP_NOT_FOUND: 404,\n HTTP_PRECON_FAILED: 412,\n HTTP_RANGE_NOT_SATISFIABLE: 416,\n};\n\nexport const HeaderConstants = {\n AUTHORIZATION: \"Authorization\",\n AUTHORIZATION_SCHEME: \"Bearer\",\n CONTENT_ENCODING: \"Content-Encoding\",\n CONTENT_ID: \"Content-ID\",\n CONTENT_LANGUAGE: \"Content-Language\",\n CONTENT_LENGTH: \"Content-Length\",\n CONTENT_MD5: \"Content-Md5\",\n CONTENT_TRANSFER_ENCODING: \"Content-Transfer-Encoding\",\n CONTENT_TYPE: \"Content-Type\",\n COOKIE: \"Cookie\",\n DATE: \"date\",\n IF_MATCH: \"if-match\",\n IF_MODIFIED_SINCE: \"if-modified-since\",\n IF_NONE_MATCH: \"if-none-match\",\n IF_UNMODIFIED_SINCE: \"if-unmodified-since\",\n PREFIX_FOR_STORAGE: \"x-ms-\",\n RANGE: \"Range\",\n USER_AGENT: \"User-Agent\",\n X_MS_CLIENT_REQUEST_ID: \"x-ms-client-request-id\",\n X_MS_COPY_SOURCE: \"x-ms-copy-source\",\n X_MS_DATE: \"x-ms-date\",\n X_MS_ERROR_CODE: \"x-ms-error-code\",\n X_MS_VERSION: \"x-ms-version\",\n X_MS_CopySourceErrorCode: \"x-ms-copy-source-error-code\",\n};\n\nexport const ETagNone = \"\";\nexport const ETagAny = \"*\";\n\nexport const SIZE_1_MB = 1 * 1024 * 1024;\nexport const BATCH_MAX_REQUEST = 256;\nexport const BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB;\nexport const HTTP_LINE_ENDING = \"\\r\\n\";\nexport const HTTP_VERSION_1_1 = \"HTTP/1.1\";\n\nexport const EncryptionAlgorithmAES25 = \"AES256\";\n\nexport const DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`;\n\nexport const StorageBlobLoggingAllowedHeaderNames = [\n \"Access-Control-Allow-Origin\",\n \"Cache-Control\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"Request-Id\",\n \"traceparent\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"x-ms-client-request-id\",\n \"x-ms-date\",\n \"x-ms-error-code\",\n \"x-ms-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-version\",\n \"Accept-Ranges\",\n \"Content-Disposition\",\n \"Content-Encoding\",\n \"Content-Language\",\n \"Content-MD5\",\n \"Content-Range\",\n \"ETag\",\n \"Last-Modified\",\n \"Server\",\n \"Vary\",\n \"x-ms-content-crc64\",\n \"x-ms-copy-action\",\n \"x-ms-copy-completion-time\",\n \"x-ms-copy-id\",\n \"x-ms-copy-progress\",\n \"x-ms-copy-status\",\n \"x-ms-has-immutability-policy\",\n \"x-ms-has-legal-hold\",\n \"x-ms-lease-state\",\n \"x-ms-lease-status\",\n \"x-ms-range\",\n \"x-ms-request-server-encrypted\",\n \"x-ms-server-encrypted\",\n \"x-ms-snapshot\",\n \"x-ms-source-range\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"x-ms-access-tier\",\n \"x-ms-access-tier-change-time\",\n \"x-ms-access-tier-inferred\",\n \"x-ms-account-kind\",\n \"x-ms-archive-status\",\n \"x-ms-blob-append-offset\",\n \"x-ms-blob-cache-control\",\n \"x-ms-blob-committed-block-count\",\n \"x-ms-blob-condition-appendpos\",\n \"x-ms-blob-condition-maxsize\",\n \"x-ms-blob-content-disposition\",\n \"x-ms-blob-content-encoding\",\n \"x-ms-blob-content-language\",\n \"x-ms-blob-content-length\",\n \"x-ms-blob-content-md5\",\n \"x-ms-blob-content-type\",\n \"x-ms-blob-public-access\",\n \"x-ms-blob-sequence-number\",\n \"x-ms-blob-type\",\n \"x-ms-copy-destination-snapshot\",\n \"x-ms-creation-time\",\n \"x-ms-default-encryption-scope\",\n \"x-ms-delete-snapshots\",\n \"x-ms-delete-type-permanent\",\n \"x-ms-deny-encryption-scope-override\",\n \"x-ms-encryption-algorithm\",\n \"x-ms-if-sequence-number-eq\",\n \"x-ms-if-sequence-number-le\",\n \"x-ms-if-sequence-number-lt\",\n \"x-ms-incremental-copy\",\n \"x-ms-lease-action\",\n \"x-ms-lease-break-period\",\n \"x-ms-lease-duration\",\n \"x-ms-lease-id\",\n \"x-ms-lease-time\",\n \"x-ms-page-write\",\n \"x-ms-proposed-lease-id\",\n \"x-ms-range-get-content-md5\",\n \"x-ms-rehydrate-priority\",\n \"x-ms-sequence-number-action\",\n \"x-ms-sku-name\",\n \"x-ms-source-content-md5\",\n \"x-ms-source-if-match\",\n \"x-ms-source-if-modified-since\",\n \"x-ms-source-if-none-match\",\n \"x-ms-source-if-unmodified-since\",\n \"x-ms-tag-count\",\n \"x-ms-encryption-key-sha256\",\n \"x-ms-copy-source-error-code\",\n \"x-ms-copy-source-status-code\",\n \"x-ms-if-tags\",\n \"x-ms-source-if-tags\",\n];\n\nexport const StorageBlobLoggingAllowedQueryParameters = [\n \"comp\",\n \"maxresults\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"se\",\n \"si\",\n \"sip\",\n \"sp\",\n \"spr\",\n \"sr\",\n \"srt\",\n \"ss\",\n \"st\",\n \"sv\",\n \"include\",\n \"marker\",\n \"prefix\",\n \"copyid\",\n \"restype\",\n \"blockid\",\n \"blocklisttype\",\n \"delimiter\",\n \"prevsnapshot\",\n \"ske\",\n \"skoid\",\n \"sks\",\n \"skt\",\n \"sktid\",\n \"skv\",\n \"snapshot\",\n];\n\nexport const BlobUsesCustomerSpecifiedEncryptionMsg = \"BlobUsesCustomerSpecifiedEncryption\";\nexport const BlobDoesNotUseCustomerSpecifiedEncryption =\n \"BlobDoesNotUseCustomerSpecifiedEncryption\";\n\n/// List of ports used for path style addressing.\n/// Path style addressing means that storage account is put in URI's Path segment in instead of in host.\nexport const PathStylePorts = [\n \"10000\",\n \"10001\",\n \"10002\",\n \"10003\",\n \"10004\",\n \"10100\",\n \"10101\",\n \"10102\",\n \"10103\",\n \"10104\",\n \"11000\",\n \"11001\",\n \"11002\",\n \"11003\",\n \"11004\",\n \"11100\",\n \"11101\",\n \"11102\",\n \"11103\",\n \"11104\",\n];\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../storage-blob/src/utils/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,G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MAAM;IACN,MAAM;IACN,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,SAAS;IACT,eAAe;IACf,WAAW;IACX,cAAc;IACd,KAAK;IACL,OAAO;IACP,KAAK;IACL,KAAK;IACL,OAAO;IACP,KAAK;IACL,UAAU;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG,qCAAqC,CAAC;AAC5F,MAAM,CAAC,MAAM,yCAAyC,GACpD,2CAA2C,CAAC;AAE9C,iDAAiD;AACjD,wGAAwG;AACxG,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;CACR,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"12.25.0-beta.2\";\nexport const SERVICE_VERSION: string = \"2024-11-04\";\n\nexport const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES: number = 256 * 1024 * 1024; // 256MB\nexport const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES: number = 4000 * 1024 * 1024; // 4000MB\nexport const BLOCK_BLOB_MAX_BLOCKS: number = 50000;\nexport const DEFAULT_BLOCK_BUFFER_SIZE_BYTES: number = 8 * 1024 * 1024; // 8MB\nexport const DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES: number = 4 * 1024 * 1024; // 4MB\nexport const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS: number = 5;\n\nexport const REQUEST_TIMEOUT: number = 100 * 1000; // In ms\n/**\n * The OAuth scope to use with Azure Storage.\n */\nexport const StorageOAuthScopes: string | string[] = \"https://storage.azure.com/.default\";\n\nexport const URLConstants = {\n Parameters: {\n FORCE_BROWSER_NO_CACHE: \"_\",\n SIGNATURE: \"sig\",\n SNAPSHOT: \"snapshot\",\n VERSIONID: \"versionid\",\n TIMEOUT: \"timeout\",\n },\n};\n\nexport const HTTPURLConnection = {\n HTTP_ACCEPTED: 202,\n HTTP_CONFLICT: 409,\n HTTP_NOT_FOUND: 404,\n HTTP_PRECON_FAILED: 412,\n HTTP_RANGE_NOT_SATISFIABLE: 416,\n};\n\nexport const HeaderConstants = {\n AUTHORIZATION: \"Authorization\",\n AUTHORIZATION_SCHEME: \"Bearer\",\n CONTENT_ENCODING: \"Content-Encoding\",\n CONTENT_ID: \"Content-ID\",\n CONTENT_LANGUAGE: \"Content-Language\",\n CONTENT_LENGTH: \"Content-Length\",\n CONTENT_MD5: \"Content-Md5\",\n CONTENT_TRANSFER_ENCODING: \"Content-Transfer-Encoding\",\n CONTENT_TYPE: \"Content-Type\",\n COOKIE: \"Cookie\",\n DATE: \"date\",\n IF_MATCH: \"if-match\",\n IF_MODIFIED_SINCE: \"if-modified-since\",\n IF_NONE_MATCH: \"if-none-match\",\n IF_UNMODIFIED_SINCE: \"if-unmodified-since\",\n PREFIX_FOR_STORAGE: \"x-ms-\",\n RANGE: \"Range\",\n USER_AGENT: \"User-Agent\",\n X_MS_CLIENT_REQUEST_ID: \"x-ms-client-request-id\",\n X_MS_COPY_SOURCE: \"x-ms-copy-source\",\n X_MS_DATE: \"x-ms-date\",\n X_MS_ERROR_CODE: \"x-ms-error-code\",\n X_MS_VERSION: \"x-ms-version\",\n X_MS_CopySourceErrorCode: \"x-ms-copy-source-error-code\",\n};\n\nexport const ETagNone = \"\";\nexport const ETagAny = \"*\";\n\nexport const SIZE_1_MB = 1 * 1024 * 1024;\nexport const BATCH_MAX_REQUEST = 256;\nexport const BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB;\nexport const HTTP_LINE_ENDING = \"\\r\\n\";\nexport const HTTP_VERSION_1_1 = \"HTTP/1.1\";\n\nexport const EncryptionAlgorithmAES25 = \"AES256\";\n\nexport const DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`;\n\nexport const StorageBlobLoggingAllowedHeaderNames = [\n \"Access-Control-Allow-Origin\",\n \"Cache-Control\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"Request-Id\",\n \"traceparent\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"x-ms-client-request-id\",\n \"x-ms-date\",\n \"x-ms-error-code\",\n \"x-ms-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-version\",\n \"Accept-Ranges\",\n \"Content-Disposition\",\n \"Content-Encoding\",\n \"Content-Language\",\n \"Content-MD5\",\n \"Content-Range\",\n \"ETag\",\n \"Last-Modified\",\n \"Server\",\n \"Vary\",\n \"x-ms-content-crc64\",\n \"x-ms-copy-action\",\n \"x-ms-copy-completion-time\",\n \"x-ms-copy-id\",\n \"x-ms-copy-progress\",\n \"x-ms-copy-status\",\n \"x-ms-has-immutability-policy\",\n \"x-ms-has-legal-hold\",\n \"x-ms-lease-state\",\n \"x-ms-lease-status\",\n \"x-ms-range\",\n \"x-ms-request-server-encrypted\",\n \"x-ms-server-encrypted\",\n \"x-ms-snapshot\",\n \"x-ms-source-range\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"x-ms-access-tier\",\n \"x-ms-access-tier-change-time\",\n \"x-ms-access-tier-inferred\",\n \"x-ms-account-kind\",\n \"x-ms-archive-status\",\n \"x-ms-blob-append-offset\",\n \"x-ms-blob-cache-control\",\n \"x-ms-blob-committed-block-count\",\n \"x-ms-blob-condition-appendpos\",\n \"x-ms-blob-condition-maxsize\",\n \"x-ms-blob-content-disposition\",\n \"x-ms-blob-content-encoding\",\n \"x-ms-blob-content-language\",\n \"x-ms-blob-content-length\",\n \"x-ms-blob-content-md5\",\n \"x-ms-blob-content-type\",\n \"x-ms-blob-public-access\",\n \"x-ms-blob-sequence-number\",\n \"x-ms-blob-type\",\n \"x-ms-copy-destination-snapshot\",\n \"x-ms-creation-time\",\n \"x-ms-default-encryption-scope\",\n \"x-ms-delete-snapshots\",\n \"x-ms-delete-type-permanent\",\n \"x-ms-deny-encryption-scope-override\",\n \"x-ms-encryption-algorithm\",\n \"x-ms-if-sequence-number-eq\",\n \"x-ms-if-sequence-number-le\",\n \"x-ms-if-sequence-number-lt\",\n \"x-ms-incremental-copy\",\n \"x-ms-lease-action\",\n \"x-ms-lease-break-period\",\n \"x-ms-lease-duration\",\n \"x-ms-lease-id\",\n \"x-ms-lease-time\",\n \"x-ms-page-write\",\n \"x-ms-proposed-lease-id\",\n \"x-ms-range-get-content-md5\",\n \"x-ms-rehydrate-priority\",\n \"x-ms-sequence-number-action\",\n \"x-ms-sku-name\",\n \"x-ms-source-content-md5\",\n \"x-ms-source-if-match\",\n \"x-ms-source-if-modified-since\",\n \"x-ms-source-if-none-match\",\n \"x-ms-source-if-unmodified-since\",\n \"x-ms-tag-count\",\n \"x-ms-encryption-key-sha256\",\n \"x-ms-copy-source-error-code\",\n \"x-ms-copy-source-status-code\",\n \"x-ms-if-tags\",\n \"x-ms-source-if-tags\",\n];\n\nexport const StorageBlobLoggingAllowedQueryParameters = [\n \"comp\",\n \"maxresults\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"se\",\n \"si\",\n \"sip\",\n \"sp\",\n \"spr\",\n \"sr\",\n \"srt\",\n \"ss\",\n \"st\",\n \"sv\",\n \"include\",\n \"marker\",\n \"prefix\",\n \"copyid\",\n \"restype\",\n \"blockid\",\n \"blocklisttype\",\n \"delimiter\",\n \"prevsnapshot\",\n \"ske\",\n \"skoid\",\n \"sks\",\n \"skt\",\n \"sktid\",\n \"skv\",\n \"snapshot\",\n];\n\nexport const BlobUsesCustomerSpecifiedEncryptionMsg = \"BlobUsesCustomerSpecifiedEncryption\";\nexport const BlobDoesNotUseCustomerSpecifiedEncryption =\n \"BlobDoesNotUseCustomerSpecifiedEncryption\";\n\n/// List of ports used for path style addressing.\n/// Path style addressing means that storage account is put in URI's Path segment in instead of in host.\nexport const PathStylePorts = [\n \"10000\",\n \"10001\",\n \"10002\",\n \"10003\",\n \"10004\",\n \"10100\",\n \"10101\",\n \"10102\",\n \"10103\",\n \"10104\",\n \"11000\",\n \"11001\",\n \"11002\",\n \"11003\",\n \"11004\",\n \"11100\",\n \"11101\",\n \"11102\",\n \"11103\",\n \"11104\",\n];\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { createTracingClient } from "@azure/core-tracing";
4
4
  import { SDK_VERSION } from "./constants";
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../../storage-blob/src/utils/tracing.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;IAC/C,WAAW,EAAE,qBAAqB;IAClC,cAAc,EAAE,WAAW;IAC3B,SAAS,EAAE,mBAAmB;CAC/B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants\";\n\n/**\n * Creates a span using the global tracer.\n * @internal\n */\nexport const tracingClient = createTracingClient({\n packageName: \"@azure/storage-blob\",\n packageVersion: SDK_VERSION,\n namespace: \"Microsoft.Storage\",\n});\n"]}
1
+ {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../../storage-blob/src/utils/tracing.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;IAC/C,WAAW,EAAE,qBAAqB;IAClC,cAAc,EAAE,WAAW;IAC3B,SAAS,EAAE,mBAAmB;CAC/B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants\";\n\n/**\n * Creates a span using the global tracer.\n * @internal\n */\nexport const tracingClient = createTracingClient({\n packageName: \"@azure/storage-blob\",\n packageVersion: SDK_VERSION,\n namespace: \"Microsoft.Storage\",\n});\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { createHttpHeaders } from "@azure/core-rest-pipeline";
4
4
  import { isNode } from "@azure/core-util";
5
5
  import { DevelopmentConnectionString, HeaderConstants, PathStylePorts, URLConstants, } from "./constants";