@azure/storage-blob 12.28.0-beta.2 → 12.29.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/dist/browser/BatchResponseParser.js +1 -1
  2. package/dist/browser/BatchResponseParser.js.map +1 -1
  3. package/dist/browser/BlobBatch.d.ts +8 -8
  4. package/dist/browser/BlobBatch.js +1 -1
  5. package/dist/browser/BlobBatch.js.map +1 -1
  6. package/dist/browser/BlobBatchClient.d.ts +10 -10
  7. package/dist/browser/BlobBatchClient.js +2 -2
  8. package/dist/browser/BlobBatchClient.js.map +1 -1
  9. package/dist/browser/BlobLeaseClient.d.ts +10 -10
  10. package/dist/browser/BlobLeaseClient.js +10 -10
  11. package/dist/browser/BlobLeaseClient.js.map +1 -1
  12. package/dist/browser/BlobServiceClient.d.ts +11 -11
  13. package/dist/browser/BlobServiceClient.js +11 -11
  14. package/dist/browser/BlobServiceClient.js.map +1 -1
  15. package/dist/browser/Clients.d.ts +36 -36
  16. package/dist/browser/Clients.js +23 -23
  17. package/dist/browser/Clients.js.map +1 -1
  18. package/dist/browser/ContainerClient.d.ts +16 -16
  19. package/dist/browser/ContainerClient.js +15 -15
  20. package/dist/browser/ContainerClient.js.map +1 -1
  21. package/dist/browser/Pipeline.d.ts.map +1 -1
  22. package/dist/browser/Pipeline.js +2 -1
  23. package/dist/browser/Pipeline.js.map +1 -1
  24. package/dist/browser/Range.d.ts +1 -1
  25. package/dist/browser/Range.js.map +1 -1
  26. package/dist/browser/StorageRetryPolicyFactory.d.ts +2 -2
  27. package/dist/browser/StorageRetryPolicyFactory.js.map +1 -1
  28. package/dist/browser/generated/src/models/index.d.ts +97 -82
  29. package/dist/browser/generated/src/models/index.d.ts.map +1 -1
  30. package/dist/browser/generated/src/models/index.js.map +1 -1
  31. package/dist/browser/generated/src/models/mappers.d.ts.map +1 -1
  32. package/dist/browser/generated/src/models/mappers.js +105 -0
  33. package/dist/browser/generated/src/models/mappers.js.map +1 -1
  34. package/dist/browser/generated/src/models/parameters.js +1 -1
  35. package/dist/browser/generated/src/models/parameters.js.map +1 -1
  36. package/dist/browser/generated/src/storageClient.js +2 -2
  37. package/dist/browser/generated/src/storageClient.js.map +1 -1
  38. package/dist/browser/policies/StorageRetryPolicy.d.ts.map +1 -1
  39. package/dist/browser/policies/StorageRetryPolicy.js +15 -16
  40. package/dist/browser/policies/StorageRetryPolicy.js.map +1 -1
  41. package/dist/browser/policies/StorageRetryPolicyV2.d.ts.map +1 -1
  42. package/dist/browser/policies/StorageRetryPolicyV2.js +15 -16
  43. package/dist/browser/policies/StorageRetryPolicyV2.js.map +1 -1
  44. package/dist/browser/policies/StorageSharedKeyCredentialPolicy.d.ts +1 -1
  45. package/dist/browser/policies/StorageSharedKeyCredentialPolicy.js +2 -2
  46. package/dist/browser/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
  47. package/dist/browser/sas/AccountSASPermissions.d.ts +1 -1
  48. package/dist/browser/sas/AccountSASPermissions.js +2 -2
  49. package/dist/browser/sas/AccountSASPermissions.js.map +1 -1
  50. package/dist/browser/sas/AccountSASResourceTypes.d.ts +1 -1
  51. package/dist/browser/sas/AccountSASResourceTypes.js +1 -1
  52. package/dist/browser/sas/AccountSASResourceTypes.js.map +1 -1
  53. package/dist/browser/sas/AccountSASSignatureValues.d.ts +3 -3
  54. package/dist/browser/sas/AccountSASSignatureValues.js +1 -1
  55. package/dist/browser/sas/AccountSASSignatureValues.js.map +1 -1
  56. package/dist/browser/sas/BlobSASSignatureValues.d.ts +1 -1
  57. package/dist/browser/sas/BlobSASSignatureValues.js +1 -1
  58. package/dist/browser/sas/BlobSASSignatureValues.js.map +1 -1
  59. package/dist/browser/sas/ContainerSASPermissions.d.ts +1 -1
  60. package/dist/browser/sas/ContainerSASPermissions.js +1 -1
  61. package/dist/browser/sas/ContainerSASPermissions.js.map +1 -1
  62. package/dist/browser/sas/SASQueryParameters.d.ts +2 -2
  63. package/dist/browser/sas/SASQueryParameters.js.map +1 -1
  64. package/dist/browser/utils/constants.js +2 -2
  65. package/dist/browser/utils/constants.js.map +1 -1
  66. package/dist/browser/utils/utils.common.d.ts +2 -2
  67. package/dist/browser/utils/utils.common.js +3 -3
  68. package/dist/browser/utils/utils.common.js.map +1 -1
  69. package/dist/commonjs/BatchResponseParser.js +1 -1
  70. package/dist/commonjs/BatchResponseParser.js.map +1 -1
  71. package/dist/commonjs/BlobBatch.d.ts +8 -8
  72. package/dist/commonjs/BlobBatch.js +1 -1
  73. package/dist/commonjs/BlobBatch.js.map +1 -1
  74. package/dist/commonjs/BlobBatchClient.d.ts +10 -10
  75. package/dist/commonjs/BlobBatchClient.js +2 -2
  76. package/dist/commonjs/BlobBatchClient.js.map +1 -1
  77. package/dist/commonjs/BlobLeaseClient.d.ts +10 -10
  78. package/dist/commonjs/BlobLeaseClient.js +10 -10
  79. package/dist/commonjs/BlobLeaseClient.js.map +1 -1
  80. package/dist/commonjs/BlobServiceClient.d.ts +11 -11
  81. package/dist/commonjs/BlobServiceClient.js +11 -11
  82. package/dist/commonjs/BlobServiceClient.js.map +1 -1
  83. package/dist/commonjs/Clients.d.ts +36 -36
  84. package/dist/commonjs/Clients.js +23 -23
  85. package/dist/commonjs/Clients.js.map +1 -1
  86. package/dist/commonjs/ContainerClient.d.ts +16 -16
  87. package/dist/commonjs/ContainerClient.js +15 -15
  88. package/dist/commonjs/ContainerClient.js.map +1 -1
  89. package/dist/commonjs/Pipeline.d.ts.map +1 -1
  90. package/dist/commonjs/Pipeline.js +1 -0
  91. package/dist/commonjs/Pipeline.js.map +1 -1
  92. package/dist/commonjs/Range.d.ts +1 -1
  93. package/dist/commonjs/Range.js.map +1 -1
  94. package/dist/commonjs/StorageRetryPolicyFactory.d.ts +2 -2
  95. package/dist/commonjs/StorageRetryPolicyFactory.js.map +1 -1
  96. package/dist/commonjs/credentials/UserDelegationKeyCredential.d.ts +1 -1
  97. package/dist/commonjs/credentials/UserDelegationKeyCredential.js +1 -1
  98. package/dist/commonjs/credentials/UserDelegationKeyCredential.js.map +1 -1
  99. package/dist/commonjs/generated/src/models/index.d.ts +97 -82
  100. package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
  101. package/dist/commonjs/generated/src/models/index.js.map +1 -1
  102. package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
  103. package/dist/commonjs/generated/src/models/mappers.js +105 -0
  104. package/dist/commonjs/generated/src/models/mappers.js.map +1 -1
  105. package/dist/commonjs/generated/src/models/parameters.js +1 -1
  106. package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
  107. package/dist/commonjs/generated/src/storageClient.js +2 -2
  108. package/dist/commonjs/generated/src/storageClient.js.map +1 -1
  109. package/dist/commonjs/policies/StorageRetryPolicy.d.ts.map +1 -1
  110. package/dist/commonjs/policies/StorageRetryPolicy.js +14 -15
  111. package/dist/commonjs/policies/StorageRetryPolicy.js.map +1 -1
  112. package/dist/commonjs/policies/StorageRetryPolicyV2.d.ts.map +1 -1
  113. package/dist/commonjs/policies/StorageRetryPolicyV2.js +14 -15
  114. package/dist/commonjs/policies/StorageRetryPolicyV2.js.map +1 -1
  115. package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.d.ts +1 -1
  116. package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +2 -2
  117. package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
  118. package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +2 -2
  119. package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
  120. package/dist/commonjs/sas/AccountSASPermissions.d.ts +1 -1
  121. package/dist/commonjs/sas/AccountSASPermissions.js +2 -2
  122. package/dist/commonjs/sas/AccountSASPermissions.js.map +1 -1
  123. package/dist/commonjs/sas/AccountSASResourceTypes.d.ts +1 -1
  124. package/dist/commonjs/sas/AccountSASResourceTypes.js +1 -1
  125. package/dist/commonjs/sas/AccountSASResourceTypes.js.map +1 -1
  126. package/dist/commonjs/sas/AccountSASSignatureValues.d.ts +3 -3
  127. package/dist/commonjs/sas/AccountSASSignatureValues.js +1 -1
  128. package/dist/commonjs/sas/AccountSASSignatureValues.js.map +1 -1
  129. package/dist/commonjs/sas/BlobSASSignatureValues.d.ts +1 -1
  130. package/dist/commonjs/sas/BlobSASSignatureValues.js +1 -1
  131. package/dist/commonjs/sas/BlobSASSignatureValues.js.map +1 -1
  132. package/dist/commonjs/sas/ContainerSASPermissions.d.ts +1 -1
  133. package/dist/commonjs/sas/ContainerSASPermissions.js +1 -1
  134. package/dist/commonjs/sas/ContainerSASPermissions.js.map +1 -1
  135. package/dist/commonjs/sas/SASQueryParameters.d.ts +2 -2
  136. package/dist/commonjs/sas/SASQueryParameters.js.map +1 -1
  137. package/dist/commonjs/utils/constants.js +2 -2
  138. package/dist/commonjs/utils/constants.js.map +1 -1
  139. package/dist/commonjs/utils/utils.common.d.ts +2 -2
  140. package/dist/commonjs/utils/utils.common.js +3 -3
  141. package/dist/commonjs/utils/utils.common.js.map +1 -1
  142. package/dist/esm/BatchResponseParser.js +1 -1
  143. package/dist/esm/BatchResponseParser.js.map +1 -1
  144. package/dist/esm/BlobBatch.d.ts +8 -8
  145. package/dist/esm/BlobBatch.js +1 -1
  146. package/dist/esm/BlobBatch.js.map +1 -1
  147. package/dist/esm/BlobBatchClient.d.ts +10 -10
  148. package/dist/esm/BlobBatchClient.js +2 -2
  149. package/dist/esm/BlobBatchClient.js.map +1 -1
  150. package/dist/esm/BlobLeaseClient.d.ts +10 -10
  151. package/dist/esm/BlobLeaseClient.js +10 -10
  152. package/dist/esm/BlobLeaseClient.js.map +1 -1
  153. package/dist/esm/BlobServiceClient.d.ts +11 -11
  154. package/dist/esm/BlobServiceClient.js +11 -11
  155. package/dist/esm/BlobServiceClient.js.map +1 -1
  156. package/dist/esm/Clients.d.ts +36 -36
  157. package/dist/esm/Clients.js +23 -23
  158. package/dist/esm/Clients.js.map +1 -1
  159. package/dist/esm/ContainerClient.d.ts +16 -16
  160. package/dist/esm/ContainerClient.js +15 -15
  161. package/dist/esm/ContainerClient.js.map +1 -1
  162. package/dist/esm/Pipeline.d.ts.map +1 -1
  163. package/dist/esm/Pipeline.js +2 -1
  164. package/dist/esm/Pipeline.js.map +1 -1
  165. package/dist/esm/Range.d.ts +1 -1
  166. package/dist/esm/Range.js.map +1 -1
  167. package/dist/esm/StorageRetryPolicyFactory.d.ts +2 -2
  168. package/dist/esm/StorageRetryPolicyFactory.js.map +1 -1
  169. package/dist/esm/credentials/UserDelegationKeyCredential.d.ts +1 -1
  170. package/dist/esm/credentials/UserDelegationKeyCredential.js +1 -1
  171. package/dist/esm/credentials/UserDelegationKeyCredential.js.map +1 -1
  172. package/dist/esm/generated/src/models/index.d.ts +97 -82
  173. package/dist/esm/generated/src/models/index.d.ts.map +1 -1
  174. package/dist/esm/generated/src/models/index.js.map +1 -1
  175. package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
  176. package/dist/esm/generated/src/models/mappers.js +105 -0
  177. package/dist/esm/generated/src/models/mappers.js.map +1 -1
  178. package/dist/esm/generated/src/models/parameters.js +1 -1
  179. package/dist/esm/generated/src/models/parameters.js.map +1 -1
  180. package/dist/esm/generated/src/storageClient.js +2 -2
  181. package/dist/esm/generated/src/storageClient.js.map +1 -1
  182. package/dist/esm/policies/StorageRetryPolicy.d.ts.map +1 -1
  183. package/dist/esm/policies/StorageRetryPolicy.js +15 -16
  184. package/dist/esm/policies/StorageRetryPolicy.js.map +1 -1
  185. package/dist/esm/policies/StorageRetryPolicyV2.d.ts.map +1 -1
  186. package/dist/esm/policies/StorageRetryPolicyV2.js +15 -16
  187. package/dist/esm/policies/StorageRetryPolicyV2.js.map +1 -1
  188. package/dist/esm/policies/StorageSharedKeyCredentialPolicy.d.ts +1 -1
  189. package/dist/esm/policies/StorageSharedKeyCredentialPolicy.js +2 -2
  190. package/dist/esm/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
  191. package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.js +2 -2
  192. package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
  193. package/dist/esm/sas/AccountSASPermissions.d.ts +1 -1
  194. package/dist/esm/sas/AccountSASPermissions.js +2 -2
  195. package/dist/esm/sas/AccountSASPermissions.js.map +1 -1
  196. package/dist/esm/sas/AccountSASResourceTypes.d.ts +1 -1
  197. package/dist/esm/sas/AccountSASResourceTypes.js +1 -1
  198. package/dist/esm/sas/AccountSASResourceTypes.js.map +1 -1
  199. package/dist/esm/sas/AccountSASSignatureValues.d.ts +3 -3
  200. package/dist/esm/sas/AccountSASSignatureValues.js +1 -1
  201. package/dist/esm/sas/AccountSASSignatureValues.js.map +1 -1
  202. package/dist/esm/sas/BlobSASSignatureValues.d.ts +1 -1
  203. package/dist/esm/sas/BlobSASSignatureValues.js +1 -1
  204. package/dist/esm/sas/BlobSASSignatureValues.js.map +1 -1
  205. package/dist/esm/sas/ContainerSASPermissions.d.ts +1 -1
  206. package/dist/esm/sas/ContainerSASPermissions.js +1 -1
  207. package/dist/esm/sas/ContainerSASPermissions.js.map +1 -1
  208. package/dist/esm/sas/SASQueryParameters.d.ts +2 -2
  209. package/dist/esm/sas/SASQueryParameters.js.map +1 -1
  210. package/dist/esm/utils/constants.js +2 -2
  211. package/dist/esm/utils/constants.js.map +1 -1
  212. package/dist/esm/utils/utils.common.d.ts +2 -2
  213. package/dist/esm/utils/utils.common.js +3 -3
  214. package/dist/esm/utils/utils.common.js.map +1 -1
  215. package/dist/react-native/BatchResponseParser.js +1 -1
  216. package/dist/react-native/BatchResponseParser.js.map +1 -1
  217. package/dist/react-native/BlobBatch.d.ts +8 -8
  218. package/dist/react-native/BlobBatch.js +1 -1
  219. package/dist/react-native/BlobBatch.js.map +1 -1
  220. package/dist/react-native/BlobBatchClient.d.ts +10 -10
  221. package/dist/react-native/BlobBatchClient.js +2 -2
  222. package/dist/react-native/BlobBatchClient.js.map +1 -1
  223. package/dist/react-native/BlobLeaseClient.d.ts +10 -10
  224. package/dist/react-native/BlobLeaseClient.js +10 -10
  225. package/dist/react-native/BlobLeaseClient.js.map +1 -1
  226. package/dist/react-native/BlobServiceClient.d.ts +11 -11
  227. package/dist/react-native/BlobServiceClient.js +11 -11
  228. package/dist/react-native/BlobServiceClient.js.map +1 -1
  229. package/dist/react-native/Clients.d.ts +36 -36
  230. package/dist/react-native/Clients.js +23 -23
  231. package/dist/react-native/Clients.js.map +1 -1
  232. package/dist/react-native/ContainerClient.d.ts +16 -16
  233. package/dist/react-native/ContainerClient.js +15 -15
  234. package/dist/react-native/ContainerClient.js.map +1 -1
  235. package/dist/react-native/Pipeline.d.ts.map +1 -1
  236. package/dist/react-native/Pipeline.js +2 -1
  237. package/dist/react-native/Pipeline.js.map +1 -1
  238. package/dist/react-native/Range.d.ts +1 -1
  239. package/dist/react-native/Range.js.map +1 -1
  240. package/dist/react-native/StorageRetryPolicyFactory.d.ts +2 -2
  241. package/dist/react-native/StorageRetryPolicyFactory.js.map +1 -1
  242. package/dist/react-native/credentials/UserDelegationKeyCredential.d.ts +1 -1
  243. package/dist/react-native/credentials/UserDelegationKeyCredential.js +1 -1
  244. package/dist/react-native/credentials/UserDelegationKeyCredential.js.map +1 -1
  245. package/dist/react-native/generated/src/models/index.d.ts +97 -82
  246. package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
  247. package/dist/react-native/generated/src/models/index.js.map +1 -1
  248. package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -1
  249. package/dist/react-native/generated/src/models/mappers.js +105 -0
  250. package/dist/react-native/generated/src/models/mappers.js.map +1 -1
  251. package/dist/react-native/generated/src/models/parameters.js +1 -1
  252. package/dist/react-native/generated/src/models/parameters.js.map +1 -1
  253. package/dist/react-native/generated/src/storageClient.js +2 -2
  254. package/dist/react-native/generated/src/storageClient.js.map +1 -1
  255. package/dist/react-native/policies/StorageRetryPolicy.d.ts.map +1 -1
  256. package/dist/react-native/policies/StorageRetryPolicy.js +15 -16
  257. package/dist/react-native/policies/StorageRetryPolicy.js.map +1 -1
  258. package/dist/react-native/policies/StorageRetryPolicyV2.d.ts.map +1 -1
  259. package/dist/react-native/policies/StorageRetryPolicyV2.js +15 -16
  260. package/dist/react-native/policies/StorageRetryPolicyV2.js.map +1 -1
  261. package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.d.ts +1 -1
  262. package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.js +2 -2
  263. package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
  264. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.js +2 -2
  265. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
  266. package/dist/react-native/sas/AccountSASPermissions.d.ts +1 -1
  267. package/dist/react-native/sas/AccountSASPermissions.js +2 -2
  268. package/dist/react-native/sas/AccountSASPermissions.js.map +1 -1
  269. package/dist/react-native/sas/AccountSASResourceTypes.d.ts +1 -1
  270. package/dist/react-native/sas/AccountSASResourceTypes.js +1 -1
  271. package/dist/react-native/sas/AccountSASResourceTypes.js.map +1 -1
  272. package/dist/react-native/sas/AccountSASSignatureValues.d.ts +3 -3
  273. package/dist/react-native/sas/AccountSASSignatureValues.js +1 -1
  274. package/dist/react-native/sas/AccountSASSignatureValues.js.map +1 -1
  275. package/dist/react-native/sas/BlobSASSignatureValues.d.ts +1 -1
  276. package/dist/react-native/sas/BlobSASSignatureValues.js +1 -1
  277. package/dist/react-native/sas/BlobSASSignatureValues.js.map +1 -1
  278. package/dist/react-native/sas/ContainerSASPermissions.d.ts +1 -1
  279. package/dist/react-native/sas/ContainerSASPermissions.js +1 -1
  280. package/dist/react-native/sas/ContainerSASPermissions.js.map +1 -1
  281. package/dist/react-native/sas/SASQueryParameters.d.ts +2 -2
  282. package/dist/react-native/sas/SASQueryParameters.js.map +1 -1
  283. package/dist/react-native/utils/constants.js +2 -2
  284. package/dist/react-native/utils/constants.js.map +1 -1
  285. package/dist/react-native/utils/utils.common.d.ts +2 -2
  286. package/dist/react-native/utils/utils.common.js +3 -3
  287. package/dist/react-native/utils/utils.common.js.map +1 -1
  288. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"Pipeline.js","sourceRoot":"","sources":["../../src/Pipeline.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAOlC,OAAO,EAQL,iBAAiB,EACjB,gCAAgC,GACjC,MAAM,yBAAyB,CAAC;AAQjC,OAAO,EAEL,+BAA+B,EAC/B,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iCAAiC,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EACL,kBAAkB,EAClB,oCAAoC,EACpC,wCAAwC,EACxC,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,iCAAiC,EAAE,MAAM,iDAAiD,CAAC;AAEpG,kFAAkF;AAClF,kCAAkC;AAClC,OAAO,EACL,kBAAkB,GASnB,CAAC;AAsDF;;;;GAIG;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eAAe;QACf,WAAW;QACX,aAAa;QACb,oCAAoC;QACpC,iBAAiB;QACjB,uBAAuB;KACxB,CAAC;IAEF,MAAM,cAAc,GAAgB;QAClC,WAAW,EAAE,KAAK,EAAE,OAAoB,EAAE,EAAE;YAC1C,OAAO;gBACL,OAAO;gBACP,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE;gBAChC,MAAM,EAAE,GAAG;aACZ,CAAC;QACJ,CAAC;KACF,CAAC;IACF,MAAM,wBAAwB,GAAyB;QACrD,GAAG,CAAC,SAA+B,EAAE,QAAgB;YACnD,gBAAgB;QAClB,CAAC;QACD,SAAS,CAAC,SAA+B;YACvC,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;IACF,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC;IAChF,MAAM,UAAU,GAAG,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC;IACnD,6EAA6E;IAC7E,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAAE;QAC5C,OAAO,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n KeepAliveOptions,\n ExtendedServiceClientOptions,\n HttpPipelineLogLevel,\n} from \"@azure/core-http-compat\";\nimport {\n CompatResponse as HttpOperationResponse,\n RequestPolicy as IHttpClient,\n HttpHeadersLike as HttpHeaders,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n WebResourceLike as WebResource,\n convertHttpClient,\n createRequestPolicyFactoryPolicy,\n} from \"@azure/core-http-compat\";\nimport type {\n ProxySettings as ProxyOptions,\n UserAgentPolicyOptions as UserAgentOptions,\n Pipeline as CorePipeline,\n PipelinePolicy,\n HttpClient,\n} from \"@azure/core-rest-pipeline\";\nimport {\n RequestBodyType as HttpRequestBody,\n bearerTokenAuthenticationPolicy,\n decompressResponsePolicyName,\n} from \"@azure/core-rest-pipeline\";\nimport { authorizeRequestOnTenantChallenge, createClientPipeline } from \"@azure/core-client\";\nimport { parseXML, stringifyXML } from \"@azure/core-xml\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { logger } from \"./log.js\";\nimport type { StorageRetryOptions } from \"./StorageRetryPolicyFactory.js\";\nimport { StorageRetryPolicyFactory } from \"./StorageRetryPolicyFactory.js\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential.js\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential.js\";\nimport {\n StorageOAuthScopes,\n StorageBlobLoggingAllowedHeaderNames,\n StorageBlobLoggingAllowedQueryParameters,\n SDK_VERSION,\n} from \"./utils/constants.js\";\nimport { getCachedDefaultHttpClient } from \"@azure/storage-common\";\nimport { storageBrowserPolicy } from \"./policies/StorageBrowserPolicyV2.js\";\nimport { storageRetryPolicy } from \"./policies/StorageRetryPolicyV2.js\";\nimport { storageSharedKeyCredentialPolicy } from \"./policies/StorageSharedKeyCredentialPolicyV2.js\";\nimport { StorageBrowserPolicyFactory } from \"./StorageBrowserPolicyFactory.js\";\nimport { storageCorrectContentLengthPolicy } from \"./policies/StorageCorrectContentLengthPolicy.js\";\n\n// Export following interfaces and types for customers who want to implement their\n// own RequestPolicy or HTTPClient\nexport {\n StorageOAuthScopes,\n IHttpClient,\n HttpHeaders,\n HttpRequestBody,\n HttpOperationResponse,\n WebResource,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions,\n};\n\n/**\n * A subset of `@azure/core-http` ServiceClientOptions\n */\nexport interface ServiceClientOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * Optional. Overrides the default policy factories.\n */\n requestPolicyFactories?:\n | RequestPolicyFactory[]\n | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => void | RequestPolicyFactory[]);\n}\n\n/**\n * Option interface for Pipeline constructor.\n */\nexport interface PipelineOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n}\n\n/**\n * An interface for the {@link Pipeline} class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport interface PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n readonly options: PipelineOptions;\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n toServiceClientOptions(): ServiceClientOptions;\n}\n\n/**\n * A helper to decide if a given argument satisfies the Pipeline contract\n * @param pipeline - An argument that may be a Pipeline\n * @returns true when the argument satisfies the Pipeline contract\n */\nexport function isPipelineLike(pipeline: unknown): pipeline is PipelineLike {\n if (!pipeline || typeof pipeline !== \"object\") {\n return false;\n }\n\n const castPipeline = pipeline as PipelineLike;\n\n return (\n Array.isArray(castPipeline.factories) &&\n typeof castPipeline.options === \"object\" &&\n typeof castPipeline.toServiceClientOptions === \"function\"\n );\n}\n\n/**\n * A Pipeline class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport class Pipeline implements PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n public readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n public readonly options: PipelineOptions;\n\n /**\n * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.\n *\n * @param factories -\n * @param options -\n */\n constructor(factories: RequestPolicyFactory[], options: PipelineOptions = {}) {\n this.factories = factories;\n this.options = options;\n }\n\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n public toServiceClientOptions(): ServiceClientOptions {\n return {\n httpClient: this.options.httpClient,\n requestPolicyFactories: this.factories,\n };\n }\n}\n\n/**\n * Options interface for the {@link newPipeline} function.\n */\nexport interface StoragePipelineOptions {\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxyOptions;\n /**\n * Options for adding user agent details to outgoing requests.\n */\n userAgentOptions?: UserAgentOptions;\n /**\n * Configures the built-in retry policy behavior.\n */\n retryOptions?: StorageRetryOptions;\n /**\n * Keep alive configurations. Default keep-alive is enabled.\n */\n keepAliveOptions?: KeepAliveOptions;\n /**\n * Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * The audience used to retrieve an AAD token.\n * By default, audience 'https://storage.azure.com/.default' will be used.\n */\n audience?: string | string[];\n}\n\n/**\n * Creates a new Pipeline object with Credential provided.\n *\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param pipelineOptions - Optional. Options.\n * @returns A new Pipeline object.\n */\nexport function newPipeline(\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n pipelineOptions: StoragePipelineOptions = {},\n): Pipeline {\n if (!credential) {\n credential = new AnonymousCredential();\n }\n const pipeline = new Pipeline([], pipelineOptions);\n (pipeline as any)._credential = credential;\n return pipeline;\n}\n\nfunction processDownlevelPipeline(\n pipeline: PipelineLike,\n): { wrappedPolicies: PipelinePolicy; afterRetry: boolean } | undefined {\n const knownFactoryFunctions = [\n isAnonymousCredential,\n isStorageSharedKeyCredential,\n isCoreHttpBearerTokenFactory,\n isStorageBrowserPolicyFactory,\n isStorageRetryPolicyFactory,\n isStorageTelemetryPolicyFactory,\n isCoreHttpPolicyFactory,\n ];\n if (pipeline.factories.length) {\n const novelFactories = pipeline.factories.filter((factory) => {\n return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory));\n });\n if (novelFactories.length) {\n const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory));\n // if there are any left over, wrap in a requestPolicyFactoryPolicy\n return {\n wrappedPolicies: createRequestPolicyFactoryPolicy(novelFactories),\n afterRetry: hasInjector,\n };\n }\n }\n return undefined;\n}\n\nexport function getCoreClientOptions(pipeline: PipelineLike): ExtendedServiceClientOptions {\n const { httpClient: v1Client, ...restOptions } = pipeline.options as StoragePipelineOptions;\n\n let httpClient: HttpClient = (pipeline as any)._coreHttpClient;\n if (!httpClient) {\n httpClient = v1Client ? convertHttpClient(v1Client) : getCachedDefaultHttpClient();\n (pipeline as any)._coreHttpClient = httpClient;\n }\n\n let corePipeline: CorePipeline = (pipeline as any)._corePipeline;\n if (!corePipeline) {\n const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`;\n const userAgentPrefix =\n restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix\n ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n corePipeline = createClientPipeline({\n ...restOptions,\n loggingOptions: {\n additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,\n additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters,\n logger: logger.info,\n },\n userAgentOptions: {\n userAgentPrefix,\n },\n serializationOptions: {\n stringifyXML,\n serializerOptions: {\n xml: {\n // Use customized XML char key of \"#\" so we can deserialize metadata\n // with \"_\" key\n xmlCharKey: \"#\",\n },\n },\n },\n deserializationOptions: {\n parseXML,\n serializerOptions: {\n xml: {\n // Use customized XML char key of \"#\" so we can deserialize metadata\n // with \"_\" key\n xmlCharKey: \"#\",\n },\n },\n },\n });\n corePipeline.removePolicy({ phase: \"Retry\" });\n corePipeline.removePolicy({ name: decompressResponsePolicyName });\n corePipeline.addPolicy(storageCorrectContentLengthPolicy());\n corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: \"Retry\" });\n corePipeline.addPolicy(storageBrowserPolicy());\n const downlevelResults = processDownlevelPipeline(pipeline);\n if (downlevelResults) {\n corePipeline.addPolicy(\n downlevelResults.wrappedPolicies,\n downlevelResults.afterRetry ? { afterPhase: \"Retry\" } : undefined,\n );\n }\n const credential = getCredentialFromPipeline(pipeline);\n if (isTokenCredential(credential)) {\n corePipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential,\n scopes: restOptions.audience ?? StorageOAuthScopes,\n challengeCallbacks: { authorizeRequestOnChallenge: authorizeRequestOnTenantChallenge },\n }),\n { phase: \"Sign\" },\n );\n } else if (credential instanceof StorageSharedKeyCredential) {\n corePipeline.addPolicy(\n storageSharedKeyCredentialPolicy({\n accountName: credential.accountName,\n accountKey: (credential as any).accountKey,\n }),\n { phase: \"Sign\" },\n );\n }\n (pipeline as any)._corePipeline = corePipeline;\n }\n return {\n ...restOptions,\n allowInsecureConnection: true,\n httpClient,\n pipeline: corePipeline,\n };\n}\n\nexport function getCredentialFromPipeline(\n pipeline: PipelineLike,\n): StorageSharedKeyCredential | AnonymousCredential | TokenCredential {\n // see if we squirreled one away on the type itself\n if ((pipeline as any)._credential) {\n return (pipeline as any)._credential;\n }\n // if it came from another package, loop over the factories and look for one like before\n let credential = new AnonymousCredential();\n for (const factory of pipeline.factories) {\n if (isTokenCredential((factory as any).credential)) {\n // Only works if the factory has been attached a \"credential\" property.\n // We do that in newPipeline() when using TokenCredential.\n credential = (factory as any).credential;\n } else if (isStorageSharedKeyCredential(factory)) {\n return factory;\n }\n }\n return credential;\n}\n\nfunction isStorageSharedKeyCredential(\n factory: RequestPolicyFactory,\n): factory is StorageSharedKeyCredential {\n if (factory instanceof StorageSharedKeyCredential) {\n return true;\n }\n return factory.constructor.name === \"StorageSharedKeyCredential\";\n}\n\nfunction isAnonymousCredential(factory: RequestPolicyFactory): factory is AnonymousCredential {\n if (factory instanceof AnonymousCredential) {\n return true;\n }\n return factory.constructor.name === \"AnonymousCredential\";\n}\n\nfunction isCoreHttpBearerTokenFactory(factory: RequestPolicyFactory): boolean {\n return isTokenCredential((factory as any).credential);\n}\n\nfunction isStorageBrowserPolicyFactory(\n factory: RequestPolicyFactory,\n): factory is StorageBrowserPolicyFactory {\n if (factory instanceof StorageBrowserPolicyFactory) {\n return true;\n }\n return factory.constructor.name === \"StorageBrowserPolicyFactory\";\n}\n\nfunction isStorageRetryPolicyFactory(\n factory: RequestPolicyFactory,\n): factory is StorageRetryPolicyFactory {\n if (factory instanceof StorageRetryPolicyFactory) {\n return true;\n }\n return factory.constructor.name === \"StorageRetryPolicyFactory\";\n}\n\nfunction isStorageTelemetryPolicyFactory(factory: RequestPolicyFactory): boolean {\n return factory.constructor.name === \"TelemetryPolicyFactory\";\n}\n\nfunction isInjectorPolicyFactory(factory: RequestPolicyFactory): boolean {\n return factory.constructor.name === \"InjectorPolicyFactory\";\n}\n\nfunction isCoreHttpPolicyFactory(factory: RequestPolicyFactory): boolean {\n const knownPolicies = [\n \"GenerateClientRequestIdPolicy\",\n \"TracingPolicy\",\n \"LogPolicy\",\n \"ProxyPolicy\",\n \"DisableResponseDecompressionPolicy\",\n \"KeepAlivePolicy\",\n \"DeserializationPolicy\",\n ];\n\n const mockHttpClient: IHttpClient = {\n sendRequest: async (request: WebResource) => {\n return {\n request,\n headers: request.headers.clone(),\n status: 500,\n };\n },\n };\n const mockRequestPolicyOptions: RequestPolicyOptions = {\n log(_logLevel: HttpPipelineLogLevel, _message: string): void {\n /* do nothing */\n },\n shouldLog(_logLevel: HttpPipelineLogLevel): boolean {\n return false;\n },\n };\n const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions);\n const policyName = policyInstance.constructor.name;\n // bundlers sometimes add a custom suffix to the class name to make it unique\n return knownPolicies.some((knownPolicyName) => {\n return policyName.startsWith(knownPolicyName);\n });\n}\n"]}
1
+ {"version":3,"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oC;QACpC,iBAAiB;QACjB,uBAAuB;KACxB,CAAC;IAEF,MAAM,cAAc,GAAgB;QAClC,WAAW,EAAE,KAAK,EAAE,OAAoB,EAAE,EAAE;YAC1C,OAAO;gBACL,OAAO;gBACP,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE;gBAChC,MAAM,EAAE,GAAG;aACZ,CAAC;QACJ,CAAC;KACF,CAAC;IACF,MAAM,wBAAwB,GAAyB;QACrD,GAAG,CAAC,SAA+B,EAAE,QAAgB;YACnD,gBAAgB;QAClB,CAAC;QACD,SAAS,CAAC,SAA+B;YACvC,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;IACF,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC;IAChF,MAAM,UAAU,GAAG,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC;IACnD,6EAA6E;IAC7E,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAAE;QAC5C,OAAO,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n KeepAliveOptions,\n ExtendedServiceClientOptions,\n HttpPipelineLogLevel,\n} from \"@azure/core-http-compat\";\nimport {\n CompatResponse as HttpOperationResponse,\n RequestPolicy as IHttpClient,\n HttpHeadersLike as HttpHeaders,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n WebResourceLike as WebResource,\n convertHttpClient,\n createRequestPolicyFactoryPolicy,\n} from \"@azure/core-http-compat\";\nimport type {\n ProxySettings as ProxyOptions,\n UserAgentPolicyOptions as UserAgentOptions,\n Pipeline as CorePipeline,\n PipelinePolicy,\n HttpClient,\n} from \"@azure/core-rest-pipeline\";\nimport {\n RequestBodyType as HttpRequestBody,\n bearerTokenAuthenticationPolicy,\n decompressResponsePolicyName,\n} from \"@azure/core-rest-pipeline\";\nimport { authorizeRequestOnTenantChallenge, createClientPipeline } from \"@azure/core-client\";\nimport { parseXML, stringifyXML } from \"@azure/core-xml\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { logger } from \"./log.js\";\nimport type { StorageRetryOptions } from \"./StorageRetryPolicyFactory.js\";\nimport { StorageRetryPolicyFactory } from \"./StorageRetryPolicyFactory.js\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential.js\";\nimport { AnonymousCredential } from \"./credentials/AnonymousCredential.js\";\nimport {\n StorageOAuthScopes,\n StorageBlobLoggingAllowedHeaderNames,\n StorageBlobLoggingAllowedQueryParameters,\n SDK_VERSION,\n} from \"./utils/constants.js\";\nimport {\n getCachedDefaultHttpClient,\n storageRequestFailureDetailsParserPolicy,\n} from \"@azure/storage-common\";\nimport { storageBrowserPolicy } from \"./policies/StorageBrowserPolicyV2.js\";\nimport { storageRetryPolicy } from \"./policies/StorageRetryPolicyV2.js\";\nimport { storageSharedKeyCredentialPolicy } from \"./policies/StorageSharedKeyCredentialPolicyV2.js\";\nimport { StorageBrowserPolicyFactory } from \"./StorageBrowserPolicyFactory.js\";\nimport { storageCorrectContentLengthPolicy } from \"./policies/StorageCorrectContentLengthPolicy.js\";\n\n// Export following interfaces and types for customers who want to implement their\n// own RequestPolicy or HTTPClient\nexport {\n StorageOAuthScopes,\n IHttpClient,\n HttpHeaders,\n HttpRequestBody,\n HttpOperationResponse,\n WebResource,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions,\n};\n\n/**\n * A subset of `@azure/core-http` ServiceClientOptions\n */\nexport interface ServiceClientOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * Optional. Overrides the default policy factories.\n */\n requestPolicyFactories?:\n | RequestPolicyFactory[]\n | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => void | RequestPolicyFactory[]);\n}\n\n/**\n * Option interface for Pipeline constructor.\n */\nexport interface PipelineOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n}\n\n/**\n * An interface for the {@link Pipeline} class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport interface PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n readonly options: PipelineOptions;\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n toServiceClientOptions(): ServiceClientOptions;\n}\n\n/**\n * A helper to decide if a given argument satisfies the Pipeline contract\n * @param pipeline - An argument that may be a Pipeline\n * @returns true when the argument satisfies the Pipeline contract\n */\nexport function isPipelineLike(pipeline: unknown): pipeline is PipelineLike {\n if (!pipeline || typeof pipeline !== \"object\") {\n return false;\n }\n\n const castPipeline = pipeline as PipelineLike;\n\n return (\n Array.isArray(castPipeline.factories) &&\n typeof castPipeline.options === \"object\" &&\n typeof castPipeline.toServiceClientOptions === \"function\"\n );\n}\n\n/**\n * A Pipeline class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport class Pipeline implements PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n public readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n public readonly options: PipelineOptions;\n\n /**\n * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.\n *\n * @param factories -\n * @param options -\n */\n constructor(factories: RequestPolicyFactory[], options: PipelineOptions = {}) {\n this.factories = factories;\n this.options = options;\n }\n\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n public toServiceClientOptions(): ServiceClientOptions {\n return {\n httpClient: this.options.httpClient,\n requestPolicyFactories: this.factories,\n };\n }\n}\n\n/**\n * Options interface for the {@link newPipeline} function.\n */\nexport interface StoragePipelineOptions {\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxyOptions;\n /**\n * Options for adding user agent details to outgoing requests.\n */\n userAgentOptions?: UserAgentOptions;\n /**\n * Configures the built-in retry policy behavior.\n */\n retryOptions?: StorageRetryOptions;\n /**\n * Keep alive configurations. Default keep-alive is enabled.\n */\n keepAliveOptions?: KeepAliveOptions;\n /**\n * Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * The audience used to retrieve an AAD token.\n * By default, audience 'https://storage.azure.com/.default' will be used.\n */\n audience?: string | string[];\n}\n\n/**\n * Creates a new Pipeline object with Credential provided.\n *\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param pipelineOptions - Optional. Options.\n * @returns A new Pipeline object.\n */\nexport function newPipeline(\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n pipelineOptions: StoragePipelineOptions = {},\n): Pipeline {\n if (!credential) {\n credential = new AnonymousCredential();\n }\n const pipeline = new Pipeline([], pipelineOptions);\n (pipeline as any)._credential = credential;\n return pipeline;\n}\n\nfunction processDownlevelPipeline(\n pipeline: PipelineLike,\n): { wrappedPolicies: PipelinePolicy; afterRetry: boolean } | undefined {\n const knownFactoryFunctions = [\n isAnonymousCredential,\n isStorageSharedKeyCredential,\n isCoreHttpBearerTokenFactory,\n isStorageBrowserPolicyFactory,\n isStorageRetryPolicyFactory,\n isStorageTelemetryPolicyFactory,\n isCoreHttpPolicyFactory,\n ];\n if (pipeline.factories.length) {\n const novelFactories = pipeline.factories.filter((factory) => {\n return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory));\n });\n if (novelFactories.length) {\n const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory));\n // if there are any left over, wrap in a requestPolicyFactoryPolicy\n return {\n wrappedPolicies: createRequestPolicyFactoryPolicy(novelFactories),\n afterRetry: hasInjector,\n };\n }\n }\n return undefined;\n}\n\nexport function getCoreClientOptions(pipeline: PipelineLike): ExtendedServiceClientOptions {\n const { httpClient: v1Client, ...restOptions } = pipeline.options as StoragePipelineOptions;\n\n let httpClient: HttpClient = (pipeline as any)._coreHttpClient;\n if (!httpClient) {\n httpClient = v1Client ? convertHttpClient(v1Client) : getCachedDefaultHttpClient();\n (pipeline as any)._coreHttpClient = httpClient;\n }\n\n let corePipeline: CorePipeline = (pipeline as any)._corePipeline;\n if (!corePipeline) {\n const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`;\n const userAgentPrefix =\n restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix\n ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n corePipeline = createClientPipeline({\n ...restOptions,\n loggingOptions: {\n additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,\n additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters,\n logger: logger.info,\n },\n userAgentOptions: {\n userAgentPrefix,\n },\n serializationOptions: {\n stringifyXML,\n serializerOptions: {\n xml: {\n // Use customized XML char key of \"#\" so we can deserialize metadata\n // with \"_\" key\n xmlCharKey: \"#\",\n },\n },\n },\n deserializationOptions: {\n parseXML,\n serializerOptions: {\n xml: {\n // Use customized XML char key of \"#\" so we can deserialize metadata\n // with \"_\" key\n xmlCharKey: \"#\",\n },\n },\n },\n });\n corePipeline.removePolicy({ phase: \"Retry\" });\n corePipeline.removePolicy({ name: decompressResponsePolicyName });\n corePipeline.addPolicy(storageCorrectContentLengthPolicy());\n corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: \"Retry\" });\n corePipeline.addPolicy(storageRequestFailureDetailsParserPolicy());\n corePipeline.addPolicy(storageBrowserPolicy());\n const downlevelResults = processDownlevelPipeline(pipeline);\n if (downlevelResults) {\n corePipeline.addPolicy(\n downlevelResults.wrappedPolicies,\n downlevelResults.afterRetry ? { afterPhase: \"Retry\" } : undefined,\n );\n }\n const credential = getCredentialFromPipeline(pipeline);\n if (isTokenCredential(credential)) {\n corePipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential,\n scopes: restOptions.audience ?? StorageOAuthScopes,\n challengeCallbacks: { authorizeRequestOnChallenge: authorizeRequestOnTenantChallenge },\n }),\n { phase: \"Sign\" },\n );\n } else if (credential instanceof StorageSharedKeyCredential) {\n corePipeline.addPolicy(\n storageSharedKeyCredentialPolicy({\n accountName: credential.accountName,\n accountKey: (credential as any).accountKey,\n }),\n { phase: \"Sign\" },\n );\n }\n (pipeline as any)._corePipeline = corePipeline;\n }\n return {\n ...restOptions,\n allowInsecureConnection: true,\n httpClient,\n pipeline: corePipeline,\n };\n}\n\nexport function getCredentialFromPipeline(\n pipeline: PipelineLike,\n): StorageSharedKeyCredential | AnonymousCredential | TokenCredential {\n // see if we squirreled one away on the type itself\n if ((pipeline as any)._credential) {\n return (pipeline as any)._credential;\n }\n // if it came from another package, loop over the factories and look for one like before\n let credential = new AnonymousCredential();\n for (const factory of pipeline.factories) {\n if (isTokenCredential((factory as any).credential)) {\n // Only works if the factory has been attached a \"credential\" property.\n // We do that in newPipeline() when using TokenCredential.\n credential = (factory as any).credential;\n } else if (isStorageSharedKeyCredential(factory)) {\n return factory;\n }\n }\n return credential;\n}\n\nfunction isStorageSharedKeyCredential(\n factory: RequestPolicyFactory,\n): factory is StorageSharedKeyCredential {\n if (factory instanceof StorageSharedKeyCredential) {\n return true;\n }\n return factory.constructor.name === \"StorageSharedKeyCredential\";\n}\n\nfunction isAnonymousCredential(factory: RequestPolicyFactory): factory is AnonymousCredential {\n if (factory instanceof AnonymousCredential) {\n return true;\n }\n return factory.constructor.name === \"AnonymousCredential\";\n}\n\nfunction isCoreHttpBearerTokenFactory(factory: RequestPolicyFactory): boolean {\n return isTokenCredential((factory as any).credential);\n}\n\nfunction isStorageBrowserPolicyFactory(\n factory: RequestPolicyFactory,\n): factory is StorageBrowserPolicyFactory {\n if (factory instanceof StorageBrowserPolicyFactory) {\n return true;\n }\n return factory.constructor.name === \"StorageBrowserPolicyFactory\";\n}\n\nfunction isStorageRetryPolicyFactory(\n factory: RequestPolicyFactory,\n): factory is StorageRetryPolicyFactory {\n if (factory instanceof StorageRetryPolicyFactory) {\n return true;\n }\n return factory.constructor.name === \"StorageRetryPolicyFactory\";\n}\n\nfunction isStorageTelemetryPolicyFactory(factory: RequestPolicyFactory): boolean {\n return factory.constructor.name === \"TelemetryPolicyFactory\";\n}\n\nfunction isInjectorPolicyFactory(factory: RequestPolicyFactory): boolean {\n return factory.constructor.name === \"InjectorPolicyFactory\";\n}\n\nfunction isCoreHttpPolicyFactory(factory: RequestPolicyFactory): boolean {\n const knownPolicies = [\n \"GenerateClientRequestIdPolicy\",\n \"TracingPolicy\",\n \"LogPolicy\",\n \"ProxyPolicy\",\n \"DisableResponseDecompressionPolicy\",\n \"KeepAlivePolicy\",\n \"DeserializationPolicy\",\n ];\n\n const mockHttpClient: IHttpClient = {\n sendRequest: async (request: WebResource) => {\n return {\n request,\n headers: request.headers.clone(),\n status: 500,\n };\n },\n };\n const mockRequestPolicyOptions: RequestPolicyOptions = {\n log(_logLevel: HttpPipelineLogLevel, _message: string): void {\n /* do nothing */\n },\n shouldLog(_logLevel: HttpPipelineLogLevel): boolean {\n return false;\n },\n };\n const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions);\n const policyName = policyInstance.constructor.name;\n // bundlers sometimes add a custom suffix to the class name to make it unique\n return knownPolicies.some((knownPolicyName) => {\n return policyName.startsWith(knownPolicyName);\n });\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Range for Blob Service Operations.
3
- * @see https://learn.microsoft.com/en-us/rest/api/storageservices/specifying-the-range-header-for-blob-service-operations
3
+ * @see https://learn.microsoft.com/rest/api/storageservices/specifying-the-range-header-for-blob-service-operations
4
4
  */
5
5
  export interface Range {
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Range.js","sourceRoot":"","sources":["../../src/Range.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAkBlC;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,MAAa;IACzC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,UAAU,CAAC,wCAAwC,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,UAAU,CAClB,mGAAmG,CACpG,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC,KAAK;QACjB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE;QAC9D,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,GAAG,CAAC;AAChC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Range for Blob Service Operations.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/specifying-the-range-header-for-blob-service-operations\n */\nexport interface Range {\n /**\n * StartByte, larger than or equal 0.\n */\n offset: number;\n /**\n * Optional. Count of bytes, larger than 0.\n * If not provided, will return bytes from offset to the end.\n */\n count?: number;\n}\n\n/**\n * Generate a range string. For example:\n *\n * \"bytes=255-\" or \"bytes=0-511\"\n *\n * @param iRange -\n */\nexport function rangeToString(iRange: Range): string {\n if (iRange.offset < 0) {\n throw new RangeError(`Range.offset cannot be smaller than 0.`);\n }\n if (iRange.count && iRange.count <= 0) {\n throw new RangeError(\n `Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`,\n );\n }\n return iRange.count\n ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}`\n : `bytes=${iRange.offset}-`;\n}\n"]}
1
+ {"version":3,"file":"Range.js","sourceRoot":"","sources":["../../src/Range.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAkBlC;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,MAAa;IACzC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,UAAU,CAAC,wCAAwC,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,UAAU,CAClB,mGAAmG,CACpG,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC,KAAK;QACjB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE;QAC9D,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,GAAG,CAAC;AAChC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Range for Blob Service Operations.\n * @see https://learn.microsoft.com/rest/api/storageservices/specifying-the-range-header-for-blob-service-operations\n */\nexport interface Range {\n /**\n * StartByte, larger than or equal 0.\n */\n offset: number;\n /**\n * Optional. Count of bytes, larger than 0.\n * If not provided, will return bytes from offset to the end.\n */\n count?: number;\n}\n\n/**\n * Generate a range string. For example:\n *\n * \"bytes=255-\" or \"bytes=0-511\"\n *\n * @param iRange -\n */\nexport function rangeToString(iRange: Range): string {\n if (iRange.offset < 0) {\n throw new RangeError(`Range.offset cannot be smaller than 0.`);\n }\n if (iRange.count && iRange.count <= 0) {\n throw new RangeError(\n `Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`,\n );\n }\n return iRange.count\n ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}`\n : `bytes=${iRange.offset}-`;\n}\n"]}
@@ -21,7 +21,7 @@ export interface StorageRetryOptions {
21
21
  * A value of zero or undefined means no default timeout on SDK client, Azure
22
22
  * Storage server's default timeout policy will be used.
23
23
  *
24
- * @see https://learn.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-blob-service-operations
24
+ * @see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations
25
25
  */
26
26
  readonly tryTimeoutInMs?: number;
27
27
  /**
@@ -41,7 +41,7 @@ export interface StorageRetryOptions {
41
41
  *
42
42
  * NOTE: Before setting this field, make sure you understand the issues around
43
43
  * reading stale and potentially-inconsistent data at
44
- * {@link https://learn.microsoft.com/en-us/azure/storage/common/storage-designing-ha-apps-with-ragrs}
44
+ * {@link https://learn.microsoft.com/azure/storage/common/storage-designing-ha-apps-with-ragrs}
45
45
  */
46
46
  readonly secondaryHost?: string;
47
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"StorageRetryPolicyFactory.js","sourceRoot":"","sources":["../../src/StorageRetryPolicyFactory.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,CAAC;AAmDtD;;GAEG;AACH,MAAM,OAAO,yBAAyB;IAGpC;;;OAGG;IACH,YAAY,YAAkC;QAC5C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,UAAyB,EAAE,OAA6B;QACpE,OAAO,IAAI,kBAAkB,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACxE,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n RequestPolicy,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n RequestPolicyFactory,\n} from \"@azure/core-http-compat\";\nimport { StorageRetryPolicy } from \"./policies/StorageRetryPolicy.js\";\nimport { StorageRetryPolicyType } from \"./policies/StorageRetryPolicyType.js\";\n\nexport { StorageRetryPolicyType, StorageRetryPolicy };\n\n/**\n * Storage Blob retry options interface.\n */\nexport interface StorageRetryOptions {\n /**\n * Optional. StorageRetryPolicyType, default is exponential retry policy.\n */\n readonly retryPolicyType?: StorageRetryPolicyType;\n\n /**\n * Optional. Max try number of attempts, default is 4.\n * A value of 1 means 1 try and no retries.\n * A value smaller than 1 means default retry number of attempts.\n */\n readonly maxTries?: number;\n\n /**\n * Optional. Indicates the maximum time in ms allowed for any single try of an HTTP request.\n * A value of zero or undefined means no default timeout on SDK client, Azure\n * Storage server's default timeout policy will be used.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-blob-service-operations\n */\n readonly tryTimeoutInMs?: number;\n\n /**\n * Optional. Specifies the amount of delay to use before retrying an operation (default is 4s or 4 * 1000ms).\n * The delay increases (exponentially or linearly) with each retry up to a maximum specified by\n * maxRetryDelayInMs. If you specify 0, then you must also specify 0 for maxRetryDelayInMs.\n */\n readonly retryDelayInMs?: number;\n\n /**\n * Optional. Specifies the maximum delay allowed before retrying an operation (default is 120s or 120 * 1000ms).\n * If you specify 0, then you must also specify 0 for retryDelayInMs.\n */\n readonly maxRetryDelayInMs?: number;\n\n /**\n * If a secondaryHost is specified, retries will be tried against this host. If secondaryHost is undefined\n * (the default) then operations are not retried against another host.\n *\n * NOTE: Before setting this field, make sure you understand the issues around\n * reading stale and potentially-inconsistent data at\n * {@link https://learn.microsoft.com/en-us/azure/storage/common/storage-designing-ha-apps-with-ragrs}\n */\n readonly secondaryHost?: string;\n}\n\n/**\n * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects.\n */\nexport class StorageRetryPolicyFactory implements RequestPolicyFactory {\n private retryOptions?: StorageRetryOptions;\n\n /**\n * Creates an instance of StorageRetryPolicyFactory.\n * @param retryOptions -\n */\n constructor(retryOptions?: StorageRetryOptions) {\n this.retryOptions = retryOptions;\n }\n\n /**\n * Creates a StorageRetryPolicy object.\n *\n * @param nextPolicy -\n * @param options -\n */\n public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageRetryPolicy {\n return new StorageRetryPolicy(nextPolicy, options, this.retryOptions);\n }\n}\n"]}
1
+ {"version":3,"file":"StorageRetryPolicyFactory.js","sourceRoot":"","sources":["../../src/StorageRetryPolicyFactory.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,CAAC;AAmDtD;;GAEG;AACH,MAAM,OAAO,yBAAyB;IAGpC;;;OAGG;IACH,YAAY,YAAkC;QAC5C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,UAAyB,EAAE,OAA6B;QACpE,OAAO,IAAI,kBAAkB,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACxE,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n RequestPolicy,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n RequestPolicyFactory,\n} from \"@azure/core-http-compat\";\nimport { StorageRetryPolicy } from \"./policies/StorageRetryPolicy.js\";\nimport { StorageRetryPolicyType } from \"./policies/StorageRetryPolicyType.js\";\n\nexport { StorageRetryPolicyType, StorageRetryPolicy };\n\n/**\n * Storage Blob retry options interface.\n */\nexport interface StorageRetryOptions {\n /**\n * Optional. StorageRetryPolicyType, default is exponential retry policy.\n */\n readonly retryPolicyType?: StorageRetryPolicyType;\n\n /**\n * Optional. Max try number of attempts, default is 4.\n * A value of 1 means 1 try and no retries.\n * A value smaller than 1 means default retry number of attempts.\n */\n readonly maxTries?: number;\n\n /**\n * Optional. Indicates the maximum time in ms allowed for any single try of an HTTP request.\n * A value of zero or undefined means no default timeout on SDK client, Azure\n * Storage server's default timeout policy will be used.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations\n */\n readonly tryTimeoutInMs?: number;\n\n /**\n * Optional. Specifies the amount of delay to use before retrying an operation (default is 4s or 4 * 1000ms).\n * The delay increases (exponentially or linearly) with each retry up to a maximum specified by\n * maxRetryDelayInMs. If you specify 0, then you must also specify 0 for maxRetryDelayInMs.\n */\n readonly retryDelayInMs?: number;\n\n /**\n * Optional. Specifies the maximum delay allowed before retrying an operation (default is 120s or 120 * 1000ms).\n * If you specify 0, then you must also specify 0 for retryDelayInMs.\n */\n readonly maxRetryDelayInMs?: number;\n\n /**\n * If a secondaryHost is specified, retries will be tried against this host. If secondaryHost is undefined\n * (the default) then operations are not retried against another host.\n *\n * NOTE: Before setting this field, make sure you understand the issues around\n * reading stale and potentially-inconsistent data at\n * {@link https://learn.microsoft.com/azure/storage/common/storage-designing-ha-apps-with-ragrs}\n */\n readonly secondaryHost?: string;\n}\n\n/**\n * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects.\n */\nexport class StorageRetryPolicyFactory implements RequestPolicyFactory {\n private retryOptions?: StorageRetryOptions;\n\n /**\n * Creates an instance of StorageRetryPolicyFactory.\n * @param retryOptions -\n */\n constructor(retryOptions?: StorageRetryOptions) {\n this.retryOptions = retryOptions;\n }\n\n /**\n * Creates a StorageRetryPolicy object.\n *\n * @param nextPolicy -\n * @param options -\n */\n public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageRetryPolicy {\n return new StorageRetryPolicy(nextPolicy, options, this.retryOptions);\n }\n}\n"]}
@@ -3,7 +3,7 @@ import type { UserDelegationKey } from "../BlobServiceClient.js";
3
3
  * ONLY AVAILABLE IN NODE.JS RUNTIME.
4
4
  *
5
5
  * UserDelegationKeyCredential is only used for generation of user delegation SAS.
6
- * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas
6
+ * @see https://learn.microsoft.com/rest/api/storageservices/create-user-delegation-sas
7
7
  */
8
8
  export declare class UserDelegationKeyCredential {
9
9
  /**
@@ -5,7 +5,7 @@ import { createHmac } from "node:crypto";
5
5
  * ONLY AVAILABLE IN NODE.JS RUNTIME.
6
6
  *
7
7
  * UserDelegationKeyCredential is only used for generation of user delegation SAS.
8
- * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas
8
+ * @see https://learn.microsoft.com/rest/api/storageservices/create-user-delegation-sas
9
9
  */
10
10
  export class UserDelegationKeyCredential {
11
11
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"UserDelegationKeyCredential.js","sourceRoot":"","sources":["../../../src/credentials/UserDelegationKeyCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC;;;;;GAKG;AACH,MAAM,OAAO,2BAA2B;IAgBtC;;;;OAIG;IACH,YAAY,WAAmB,EAAE,iBAAoC;QACnE,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED;;;;OAIG;IACI,iBAAiB,CAAC,YAAoB;QAC3C,gEAAgE;QAEhE,OAAO,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createHmac } from \"node:crypto\";\nimport type { UserDelegationKey } from \"../BlobServiceClient.js\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * UserDelegationKeyCredential is only used for generation of user delegation SAS.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas\n */\nexport class UserDelegationKeyCredential {\n /**\n * Azure Storage account name; readonly.\n */\n public readonly accountName: string;\n\n /**\n * Azure Storage user delegation key; readonly.\n */\n public readonly userDelegationKey: UserDelegationKey;\n\n /**\n * Key value in Buffer type.\n */\n private readonly key: Buffer;\n\n /**\n * Creates an instance of UserDelegationKeyCredential.\n * @param accountName -\n * @param userDelegationKey -\n */\n constructor(accountName: string, userDelegationKey: UserDelegationKey) {\n this.accountName = accountName;\n this.userDelegationKey = userDelegationKey;\n this.key = Buffer.from(userDelegationKey.value, \"base64\");\n }\n\n /**\n * Generates a hash signature for an HTTP request or for a SAS.\n *\n * @param stringToSign -\n */\n public computeHMACSHA256(stringToSign: string): string {\n // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);\n\n return createHmac(\"sha256\", this.key).update(stringToSign, \"utf8\").digest(\"base64\");\n }\n}\n"]}
1
+ {"version":3,"file":"UserDelegationKeyCredential.js","sourceRoot":"","sources":["../../../src/credentials/UserDelegationKeyCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC;;;;;GAKG;AACH,MAAM,OAAO,2BAA2B;IAgBtC;;;;OAIG;IACH,YAAY,WAAmB,EAAE,iBAAoC;QACnE,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED;;;;OAIG;IACI,iBAAiB,CAAC,YAAoB;QAC3C,gEAAgE;QAEhE,OAAO,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createHmac } from \"node:crypto\";\nimport type { UserDelegationKey } from \"../BlobServiceClient.js\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * UserDelegationKeyCredential is only used for generation of user delegation SAS.\n * @see https://learn.microsoft.com/rest/api/storageservices/create-user-delegation-sas\n */\nexport class UserDelegationKeyCredential {\n /**\n * Azure Storage account name; readonly.\n */\n public readonly accountName: string;\n\n /**\n * Azure Storage user delegation key; readonly.\n */\n public readonly userDelegationKey: UserDelegationKey;\n\n /**\n * Key value in Buffer type.\n */\n private readonly key: Buffer;\n\n /**\n * Creates an instance of UserDelegationKeyCredential.\n * @param accountName -\n * @param userDelegationKey -\n */\n constructor(accountName: string, userDelegationKey: UserDelegationKey) {\n this.accountName = accountName;\n this.userDelegationKey = userDelegationKey;\n this.key = Buffer.from(userDelegationKey.value, \"base64\");\n }\n\n /**\n * Generates a hash signature for an HTTP request or for a SAS.\n *\n * @param stringToSign -\n */\n public computeHMACSHA256(stringToSign: string): string {\n // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);\n\n return createHmac(\"sha256\", this.key).update(stringToSign, \"utf8\").digest(\"base64\");\n }\n}\n"]}