@azure/storage-common 12.4.0-alpha.20260310.1 → 12.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (477) hide show
  1. package/dist/browser/BufferScheduler-browser.d.mts +7 -0
  2. package/dist/browser/BufferScheduler-browser.d.mts.map +1 -0
  3. package/dist/browser/BufferScheduler-browser.mjs +11 -0
  4. package/dist/browser/BufferScheduler-browser.mjs.map +1 -0
  5. package/dist/browser/StorageBrowserPolicyFactory.d.ts +1 -1
  6. package/dist/browser/StorageBrowserPolicyFactory.d.ts.map +1 -1
  7. package/dist/browser/StorageBrowserPolicyFactory.js +1 -1
  8. package/dist/browser/StorageBrowserPolicyFactory.js.map +1 -1
  9. package/dist/browser/StructuredMessageDecoding.d.ts +1 -1
  10. package/dist/browser/StructuredMessageDecoding.d.ts.map +1 -1
  11. package/dist/browser/StructuredMessageDecoding.js +3 -22
  12. package/dist/browser/StructuredMessageDecoding.js.map +1 -1
  13. package/dist/browser/StructuredMessageDecodingStream-browser.d.mts +11 -0
  14. package/dist/browser/StructuredMessageDecodingStream-browser.d.mts.map +1 -0
  15. package/dist/browser/{StructuredMessageDecodingStream.js → StructuredMessageDecodingStream-browser.mjs} +4 -4
  16. package/dist/browser/StructuredMessageDecodingStream-browser.mjs.map +1 -0
  17. package/dist/browser/StructuredMessageEncoding.d.ts +1 -1
  18. package/dist/browser/StructuredMessageEncoding.d.ts.map +1 -1
  19. package/dist/browser/StructuredMessageEncoding.js +8 -28
  20. package/dist/browser/StructuredMessageEncoding.js.map +1 -1
  21. package/dist/browser/{StructuredMessageEncodingStream.d.ts → StructuredMessageEncodingStream-browser.d.mts} +2 -2
  22. package/dist/browser/StructuredMessageEncodingStream-browser.d.mts.map +1 -0
  23. package/dist/browser/{StructuredMessageEncodingStream.js → StructuredMessageEncodingStream-browser.mjs} +13 -11
  24. package/dist/browser/StructuredMessageEncodingStream-browser.mjs.map +1 -0
  25. package/dist/browser/bufferHelpers-browser.d.mts +18 -0
  26. package/dist/browser/bufferHelpers-browser.d.mts.map +1 -0
  27. package/dist/browser/bufferHelpers-browser.mjs +27 -0
  28. package/dist/browser/bufferHelpers-browser.mjs.map +1 -0
  29. package/dist/browser/bufferHelpers.common.d.ts +7 -0
  30. package/dist/browser/bufferHelpers.common.d.ts.map +1 -0
  31. package/dist/browser/bufferHelpers.common.js +22 -0
  32. package/dist/browser/bufferHelpers.common.js.map +1 -0
  33. package/dist/browser/crc64.js +5 -1
  34. package/dist/{react-native/credentials/StorageSharedKeyCredential.d.ts → browser/credentials/StorageSharedKeyCredential-browser.d.mts} +1 -1
  35. package/dist/browser/credentials/StorageSharedKeyCredential-browser.d.mts.map +1 -0
  36. package/dist/browser/credentials/{StorageSharedKeyCredential.js → StorageSharedKeyCredential-browser.mjs} +1 -1
  37. package/dist/browser/credentials/StorageSharedKeyCredential-browser.mjs.map +1 -0
  38. package/dist/browser/credentials/UserDelegationKey.d.ts +38 -0
  39. package/dist/browser/credentials/UserDelegationKey.d.ts.map +1 -0
  40. package/dist/browser/{interfaces.js → credentials/UserDelegationKey.js} +1 -1
  41. package/dist/browser/credentials/UserDelegationKey.js.map +1 -0
  42. package/dist/{react-native/credentials/UserDelegationKeyCredential.d.ts → browser/credentials/UserDelegationKeyCredential-browser.d.mts} +2 -13
  43. package/dist/browser/credentials/UserDelegationKeyCredential-browser.d.mts.map +1 -0
  44. package/dist/browser/credentials/{UserDelegationKeyCredential.js → UserDelegationKeyCredential-browser.mjs} +1 -1
  45. package/dist/browser/credentials/UserDelegationKeyCredential-browser.mjs.map +1 -0
  46. package/dist/browser/index.d.ts +1 -19
  47. package/dist/browser/index.d.ts.map +1 -1
  48. package/dist/browser/index.js +1 -19
  49. package/dist/browser/index.js.map +1 -1
  50. package/dist/browser/indexPlatform-browser.d.mts +25 -0
  51. package/dist/browser/indexPlatform-browser.d.mts.map +1 -0
  52. package/dist/browser/indexPlatform-browser.mjs +24 -0
  53. package/dist/browser/indexPlatform-browser.mjs.map +1 -0
  54. package/dist/browser/interfaces-browser.d.mts +14 -0
  55. package/dist/browser/interfaces-browser.d.mts.map +1 -0
  56. package/dist/browser/interfaces-browser.mjs +4 -0
  57. package/dist/browser/interfaces-browser.mjs.map +1 -0
  58. package/dist/browser/policies/{StorageBrowserPolicy.d.ts → StorageBrowserPolicy-browser.d.mts} +1 -1
  59. package/dist/browser/policies/StorageBrowserPolicy-browser.d.mts.map +1 -0
  60. package/dist/browser/policies/{StorageBrowserPolicy.js → StorageBrowserPolicy-browser.mjs} +1 -5
  61. package/dist/browser/policies/StorageBrowserPolicy-browser.mjs.map +1 -0
  62. package/dist/browser/policies/{StorageBrowserPolicyV2.d.ts → StorageBrowserPolicyV2-browser.d.mts} +1 -1
  63. package/dist/browser/policies/StorageBrowserPolicyV2-browser.d.mts.map +1 -0
  64. package/dist/browser/policies/{StorageBrowserPolicyV2.js → StorageBrowserPolicyV2-browser.mjs} +1 -5
  65. package/dist/browser/policies/StorageBrowserPolicyV2-browser.mjs.map +1 -0
  66. package/dist/browser/policies/{StorageCorrectContentLengthPolicy.d.ts → StorageCorrectContentLengthPolicy-browser.d.mts} +1 -1
  67. package/dist/browser/policies/StorageCorrectContentLengthPolicy-browser.d.mts.map +1 -0
  68. package/dist/browser/policies/{StorageCorrectContentLengthPolicy.js → StorageCorrectContentLengthPolicy-browser.mjs} +1 -1
  69. package/dist/browser/policies/StorageCorrectContentLengthPolicy-browser.mjs.map +1 -0
  70. package/dist/browser/policies/{StorageSharedKeyCredentialPolicyV2.d.ts → StorageSharedKeyCredentialPolicyV2-browser.d.mts} +3 -3
  71. package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-browser.d.mts.map +1 -0
  72. package/dist/browser/policies/{StorageSharedKeyCredentialPolicyV2.js → StorageSharedKeyCredentialPolicyV2-browser.mjs} +1 -1
  73. package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-browser.mjs.map +1 -0
  74. package/dist/browser/streamHelpers-browser.d.mts +6 -0
  75. package/dist/browser/streamHelpers-browser.d.mts.map +1 -0
  76. package/dist/browser/streamHelpers-browser.mjs +10 -0
  77. package/dist/browser/streamHelpers-browser.mjs.map +1 -0
  78. package/dist/browser/utils/constants.d.ts.map +1 -1
  79. package/dist/browser/utils/constants.js +1 -1
  80. package/dist/browser/utils/constants.js.map +1 -1
  81. package/dist/browser/utils/utils.common.d.ts +0 -12
  82. package/dist/browser/utils/utils.common.d.ts.map +1 -1
  83. package/dist/browser/utils/utils.common.js +4 -20
  84. package/dist/browser/utils/utils.common.js.map +1 -1
  85. package/dist/commonjs/BufferScheduler.js +1 -0
  86. package/dist/commonjs/BufferScheduler.js.map +1 -1
  87. package/dist/commonjs/BuffersStream.js +3 -0
  88. package/dist/commonjs/BuffersStream.js.map +2 -2
  89. package/dist/commonjs/PooledBuffer.js +1 -0
  90. package/dist/commonjs/PooledBuffer.js.map +1 -1
  91. package/dist/commonjs/StorageBrowserPolicyFactory.d.ts.map +1 -1
  92. package/dist/commonjs/StorageBrowserPolicyFactory.js +1 -0
  93. package/dist/commonjs/StorageBrowserPolicyFactory.js.map +2 -2
  94. package/dist/commonjs/StorageCRC64Calculator.js +1 -0
  95. package/dist/commonjs/StorageCRC64Calculator.js.map +1 -1
  96. package/dist/commonjs/StorageRetryPolicyFactory.js +1 -0
  97. package/dist/commonjs/StorageRetryPolicyFactory.js.map +1 -1
  98. package/dist/commonjs/StructuredMessageDecoding.d.ts +1 -1
  99. package/dist/commonjs/StructuredMessageDecoding.d.ts.map +1 -1
  100. package/dist/commonjs/StructuredMessageDecoding.js +4 -20
  101. package/dist/commonjs/StructuredMessageDecoding.js.map +3 -3
  102. package/dist/commonjs/StructuredMessageDecodingStream.js +1 -0
  103. package/dist/commonjs/StructuredMessageDecodingStream.js.map +1 -1
  104. package/dist/commonjs/StructuredMessageEncoding.d.ts +1 -1
  105. package/dist/commonjs/StructuredMessageEncoding.d.ts.map +1 -1
  106. package/dist/commonjs/StructuredMessageEncoding.js +9 -26
  107. package/dist/commonjs/StructuredMessageEncoding.js.map +3 -3
  108. package/dist/commonjs/StructuredMessageEncodingStream.d.ts +1 -1
  109. package/dist/commonjs/StructuredMessageEncodingStream.d.ts.map +1 -1
  110. package/dist/commonjs/StructuredMessageEncodingStream.js +1 -0
  111. package/dist/commonjs/StructuredMessageEncodingStream.js.map +2 -2
  112. package/dist/commonjs/bufferHelpers.common.d.ts +7 -0
  113. package/dist/commonjs/bufferHelpers.common.d.ts.map +1 -0
  114. package/dist/commonjs/bufferHelpers.common.js +39 -0
  115. package/dist/commonjs/bufferHelpers.common.js.map +7 -0
  116. package/dist/commonjs/bufferHelpers.d.ts +18 -0
  117. package/dist/commonjs/bufferHelpers.d.ts.map +1 -0
  118. package/dist/commonjs/bufferHelpers.js +45 -0
  119. package/dist/commonjs/bufferHelpers.js.map +7 -0
  120. package/dist/commonjs/cache.js +1 -0
  121. package/dist/commonjs/cache.js.map +1 -1
  122. package/dist/commonjs/crc64.js +3 -1
  123. package/dist/commonjs/credentials/AnonymousCredential.js +1 -0
  124. package/dist/commonjs/credentials/AnonymousCredential.js.map +1 -1
  125. package/dist/commonjs/credentials/Credential.js +1 -0
  126. package/dist/commonjs/credentials/Credential.js.map +1 -1
  127. package/dist/commonjs/credentials/StorageSharedKeyCredential.js +1 -0
  128. package/dist/commonjs/credentials/StorageSharedKeyCredential.js.map +1 -1
  129. package/dist/commonjs/credentials/UserDelegationKey.d.ts +38 -0
  130. package/dist/commonjs/credentials/UserDelegationKey.d.ts.map +1 -0
  131. package/dist/commonjs/credentials/UserDelegationKey.js +16 -0
  132. package/dist/commonjs/credentials/UserDelegationKey.js.map +7 -0
  133. package/dist/commonjs/credentials/UserDelegationKeyCredential.d.ts +1 -37
  134. package/dist/commonjs/credentials/UserDelegationKeyCredential.d.ts.map +1 -1
  135. package/dist/commonjs/credentials/UserDelegationKeyCredential.js +1 -0
  136. package/dist/commonjs/credentials/UserDelegationKeyCredential.js.map +3 -3
  137. package/dist/commonjs/index.d.ts +1 -21
  138. package/dist/commonjs/index.d.ts.map +1 -1
  139. package/dist/commonjs/index.js +3 -48
  140. package/dist/commonjs/index.js.map +3 -3
  141. package/dist/commonjs/indexPlatform.d.ts +26 -0
  142. package/dist/commonjs/indexPlatform.d.ts.map +1 -0
  143. package/dist/commonjs/indexPlatform.js +73 -0
  144. package/dist/commonjs/indexPlatform.js.map +7 -0
  145. package/dist/commonjs/interfaces.js +1 -0
  146. package/dist/commonjs/interfaces.js.map +1 -1
  147. package/dist/commonjs/log.js +1 -0
  148. package/dist/commonjs/log.js.map +1 -1
  149. package/dist/commonjs/policies/AnonymousCredentialPolicy.js +1 -0
  150. package/dist/commonjs/policies/AnonymousCredentialPolicy.js.map +1 -1
  151. package/dist/commonjs/policies/CredentialPolicy.js +1 -0
  152. package/dist/commonjs/policies/CredentialPolicy.js.map +1 -1
  153. package/dist/commonjs/policies/RequestPolicy.js +3 -0
  154. package/dist/commonjs/policies/RequestPolicy.js.map +2 -2
  155. package/dist/commonjs/policies/StorageBrowserPolicy.d.ts +2 -0
  156. package/dist/commonjs/policies/StorageBrowserPolicy.d.ts.map +1 -1
  157. package/dist/commonjs/policies/StorageBrowserPolicy.js +1 -15
  158. package/dist/commonjs/policies/StorageBrowserPolicy.js.map +3 -3
  159. package/dist/commonjs/policies/StorageBrowserPolicyV2.d.ts +2 -0
  160. package/dist/commonjs/policies/StorageBrowserPolicyV2.d.ts.map +1 -1
  161. package/dist/commonjs/policies/StorageBrowserPolicyV2.js +1 -15
  162. package/dist/commonjs/policies/StorageBrowserPolicyV2.js.map +3 -3
  163. package/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +1 -0
  164. package/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js.map +1 -1
  165. package/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js +1 -0
  166. package/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js.map +1 -1
  167. package/dist/commonjs/policies/StorageRetryPolicy.js +1 -0
  168. package/dist/commonjs/policies/StorageRetryPolicy.js.map +1 -1
  169. package/dist/commonjs/policies/StorageRetryPolicyType.js +1 -0
  170. package/dist/commonjs/policies/StorageRetryPolicyType.js.map +1 -1
  171. package/dist/commonjs/policies/StorageRetryPolicyV2.js +1 -0
  172. package/dist/commonjs/policies/StorageRetryPolicyV2.js.map +1 -1
  173. package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.d.ts.map +1 -1
  174. package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +1 -0
  175. package/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js.map +2 -2
  176. package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +1 -0
  177. package/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
  178. package/dist/commonjs/streamHelpers.d.ts +7 -0
  179. package/dist/commonjs/streamHelpers.d.ts.map +1 -0
  180. package/dist/commonjs/{utils/tracing.js → streamHelpers.js} +9 -12
  181. package/dist/commonjs/streamHelpers.js.map +7 -0
  182. package/dist/commonjs/tsdoc-metadata.json +1 -1
  183. package/dist/commonjs/utils/SharedKeyComparator.js +1 -0
  184. package/dist/commonjs/utils/SharedKeyComparator.js.map +1 -1
  185. package/dist/commonjs/utils/constants.d.ts.map +1 -1
  186. package/dist/commonjs/utils/constants.js +2 -1
  187. package/dist/commonjs/utils/constants.js.map +2 -2
  188. package/dist/commonjs/utils/utils.common.d.ts +0 -12
  189. package/dist/commonjs/utils/utils.common.d.ts.map +1 -1
  190. package/dist/commonjs/utils/utils.common.js +4 -13
  191. package/dist/commonjs/utils/utils.common.js.map +3 -3
  192. package/dist/esm/StorageBrowserPolicyFactory.d.ts.map +1 -1
  193. package/dist/esm/StorageBrowserPolicyFactory.js.map +1 -1
  194. package/dist/esm/StructuredMessageDecoding.d.ts +1 -1
  195. package/dist/esm/StructuredMessageDecoding.d.ts.map +1 -1
  196. package/dist/esm/StructuredMessageDecoding.js +3 -22
  197. package/dist/esm/StructuredMessageDecoding.js.map +1 -1
  198. package/dist/esm/StructuredMessageEncoding.d.ts +1 -1
  199. package/dist/esm/StructuredMessageEncoding.d.ts.map +1 -1
  200. package/dist/esm/StructuredMessageEncoding.js +8 -28
  201. package/dist/esm/StructuredMessageEncoding.js.map +1 -1
  202. package/dist/esm/StructuredMessageEncodingStream.d.ts +1 -1
  203. package/dist/esm/StructuredMessageEncodingStream.d.ts.map +1 -1
  204. package/dist/esm/StructuredMessageEncodingStream.js.map +1 -1
  205. package/dist/esm/bufferHelpers.common.d.ts +7 -0
  206. package/dist/esm/bufferHelpers.common.d.ts.map +1 -0
  207. package/dist/esm/bufferHelpers.common.js +22 -0
  208. package/dist/esm/bufferHelpers.common.js.map +1 -0
  209. package/dist/esm/bufferHelpers.d.ts +18 -0
  210. package/dist/esm/bufferHelpers.d.ts.map +1 -0
  211. package/dist/esm/bufferHelpers.js +27 -0
  212. package/dist/esm/bufferHelpers.js.map +1 -0
  213. package/dist/esm/crc64.js +27 -1
  214. package/dist/esm/credentials/UserDelegationKey.d.ts +38 -0
  215. package/dist/esm/credentials/UserDelegationKey.d.ts.map +1 -0
  216. package/dist/{react-native/interfaces.js → esm/credentials/UserDelegationKey.js} +1 -1
  217. package/dist/esm/credentials/UserDelegationKey.js.map +1 -0
  218. package/dist/esm/credentials/UserDelegationKeyCredential.d.ts +1 -37
  219. package/dist/esm/credentials/UserDelegationKeyCredential.d.ts.map +1 -1
  220. package/dist/esm/credentials/UserDelegationKeyCredential.js +0 -1
  221. package/dist/esm/credentials/UserDelegationKeyCredential.js.map +1 -1
  222. package/dist/esm/index.d.ts +1 -21
  223. package/dist/esm/index.d.ts.map +1 -1
  224. package/dist/esm/index.js +1 -20
  225. package/dist/esm/index.js.map +1 -1
  226. package/dist/esm/indexPlatform.d.ts +26 -0
  227. package/dist/esm/indexPlatform.d.ts.map +1 -0
  228. package/dist/esm/indexPlatform.js +25 -0
  229. package/dist/esm/indexPlatform.js.map +1 -0
  230. package/dist/esm/policies/StorageBrowserPolicy.d.ts +2 -0
  231. package/dist/esm/policies/StorageBrowserPolicy.d.ts.map +1 -1
  232. package/dist/esm/policies/StorageBrowserPolicy.js +2 -12
  233. package/dist/esm/policies/StorageBrowserPolicy.js.map +1 -1
  234. package/dist/esm/policies/StorageBrowserPolicyV2.d.ts +2 -0
  235. package/dist/esm/policies/StorageBrowserPolicyV2.d.ts.map +1 -1
  236. package/dist/esm/policies/StorageBrowserPolicyV2.js +2 -12
  237. package/dist/esm/policies/StorageBrowserPolicyV2.js.map +1 -1
  238. package/dist/esm/policies/StorageSharedKeyCredentialPolicy.d.ts.map +1 -1
  239. package/dist/esm/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
  240. package/dist/esm/streamHelpers.d.ts +7 -0
  241. package/dist/esm/streamHelpers.d.ts.map +1 -0
  242. package/dist/esm/streamHelpers.js +11 -0
  243. package/dist/esm/streamHelpers.js.map +1 -0
  244. package/dist/esm/utils/constants.d.ts.map +1 -1
  245. package/dist/esm/utils/constants.js +1 -1
  246. package/dist/esm/utils/constants.js.map +1 -1
  247. package/dist/esm/utils/utils.common.d.ts +0 -12
  248. package/dist/esm/utils/utils.common.d.ts.map +1 -1
  249. package/dist/esm/utils/utils.common.js +4 -20
  250. package/dist/esm/utils/utils.common.js.map +1 -1
  251. package/dist/react-native/BufferScheduler-browser.d.mts +7 -0
  252. package/dist/react-native/BufferScheduler-browser.d.mts.map +1 -0
  253. package/dist/react-native/BufferScheduler-browser.mjs +11 -0
  254. package/dist/react-native/BufferScheduler-browser.mjs.map +1 -0
  255. package/dist/react-native/BufferScheduler-react-native.d.mts +3 -0
  256. package/dist/react-native/BufferScheduler-react-native.d.mts.map +1 -0
  257. package/dist/react-native/BufferScheduler-react-native.mjs +4 -0
  258. package/dist/react-native/BufferScheduler-react-native.mjs.map +1 -0
  259. package/dist/react-native/StorageBrowserPolicyFactory.d.ts +1 -1
  260. package/dist/react-native/StorageBrowserPolicyFactory.d.ts.map +1 -1
  261. package/dist/react-native/StorageBrowserPolicyFactory.js +1 -1
  262. package/dist/react-native/StorageBrowserPolicyFactory.js.map +1 -1
  263. package/dist/react-native/StructuredMessageDecodingStream-react-native.d.mts +6 -0
  264. package/dist/react-native/StructuredMessageDecodingStream-react-native.d.mts.map +1 -0
  265. package/dist/react-native/StructuredMessageDecodingStream-react-native.mjs +7 -0
  266. package/dist/react-native/StructuredMessageDecodingStream-react-native.mjs.map +1 -0
  267. package/dist/react-native/StructuredMessageEncoding.d.ts +1 -1
  268. package/dist/react-native/StructuredMessageEncoding.d.ts.map +1 -1
  269. package/dist/react-native/StructuredMessageEncoding.js +8 -28
  270. package/dist/react-native/StructuredMessageEncoding.js.map +1 -1
  271. package/dist/react-native/StructuredMessageEncodingStream-react-native.d.mts +10 -0
  272. package/dist/react-native/StructuredMessageEncodingStream-react-native.d.mts.map +1 -0
  273. package/dist/react-native/StructuredMessageEncodingStream-react-native.mjs +56 -0
  274. package/dist/react-native/StructuredMessageEncodingStream-react-native.mjs.map +1 -0
  275. package/dist/react-native/bufferHelpers-browser.d.mts +18 -0
  276. package/dist/react-native/bufferHelpers-browser.d.mts.map +1 -0
  277. package/dist/react-native/bufferHelpers-browser.mjs +27 -0
  278. package/dist/react-native/bufferHelpers-browser.mjs.map +1 -0
  279. package/dist/react-native/bufferHelpers-react-native.d.mts +2 -0
  280. package/dist/react-native/bufferHelpers-react-native.d.mts.map +1 -0
  281. package/dist/react-native/bufferHelpers-react-native.mjs +5 -0
  282. package/dist/react-native/bufferHelpers-react-native.mjs.map +1 -0
  283. package/dist/react-native/bufferHelpers.common.d.ts +7 -0
  284. package/dist/react-native/bufferHelpers.common.d.ts.map +1 -0
  285. package/dist/react-native/bufferHelpers.common.js +22 -0
  286. package/dist/react-native/bufferHelpers.common.js.map +1 -0
  287. package/dist/react-native/crc64.js +5 -1
  288. package/dist/{browser/credentials/StorageSharedKeyCredential.d.ts → react-native/credentials/StorageSharedKeyCredential-browser.d.mts} +1 -1
  289. package/dist/react-native/credentials/StorageSharedKeyCredential-browser.d.mts.map +1 -0
  290. package/dist/react-native/credentials/{StorageSharedKeyCredential.js → StorageSharedKeyCredential-browser.mjs} +4 -4
  291. package/dist/react-native/credentials/StorageSharedKeyCredential-browser.mjs.map +1 -0
  292. package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.d.mts +2 -0
  293. package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.d.mts.map +1 -0
  294. package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.mjs +4 -0
  295. package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.mjs.map +1 -0
  296. package/dist/react-native/credentials/UserDelegationKey.d.ts +38 -0
  297. package/dist/react-native/credentials/UserDelegationKey.d.ts.map +1 -0
  298. package/dist/react-native/credentials/UserDelegationKey.js +4 -0
  299. package/dist/react-native/credentials/UserDelegationKey.js.map +1 -0
  300. package/dist/{browser/credentials/UserDelegationKeyCredential.d.ts → react-native/credentials/UserDelegationKeyCredential-browser.d.mts} +2 -13
  301. package/dist/react-native/credentials/UserDelegationKeyCredential-browser.d.mts.map +1 -0
  302. package/dist/react-native/credentials/{UserDelegationKeyCredential.js → UserDelegationKeyCredential-browser.mjs} +3 -3
  303. package/dist/react-native/credentials/UserDelegationKeyCredential-browser.mjs.map +1 -0
  304. package/dist/react-native/credentials/UserDelegationKeyCredential-react-native.d.mts +2 -0
  305. package/dist/react-native/credentials/UserDelegationKeyCredential-react-native.d.mts.map +1 -0
  306. package/dist/react-native/credentials/UserDelegationKeyCredential-react-native.mjs +4 -0
  307. package/dist/react-native/credentials/UserDelegationKeyCredential-react-native.mjs.map +1 -0
  308. package/dist/react-native/index.d.ts +1 -21
  309. package/dist/react-native/index.d.ts.map +1 -1
  310. package/dist/react-native/index.js +1 -20
  311. package/dist/react-native/index.js.map +1 -1
  312. package/dist/react-native/indexPlatform-browser.d.mts +25 -0
  313. package/dist/react-native/indexPlatform-browser.d.mts.map +1 -0
  314. package/dist/react-native/indexPlatform-browser.mjs +24 -0
  315. package/dist/react-native/indexPlatform-browser.mjs.map +1 -0
  316. package/dist/react-native/indexPlatform-react-native.d.mts +2 -0
  317. package/dist/react-native/indexPlatform-react-native.d.mts.map +1 -0
  318. package/dist/react-native/indexPlatform-react-native.mjs +4 -0
  319. package/dist/react-native/indexPlatform-react-native.mjs.map +1 -0
  320. package/dist/react-native/interfaces-browser.d.mts +14 -0
  321. package/dist/react-native/interfaces-browser.d.mts.map +1 -0
  322. package/dist/react-native/interfaces-browser.mjs +4 -0
  323. package/dist/react-native/interfaces-browser.mjs.map +1 -0
  324. package/dist/react-native/interfaces-react-native.d.mts +2 -0
  325. package/dist/react-native/interfaces-react-native.d.mts.map +1 -0
  326. package/dist/react-native/interfaces-react-native.mjs +4 -0
  327. package/dist/react-native/interfaces-react-native.mjs.map +1 -0
  328. package/dist/react-native/policies/{StorageBrowserPolicy.d.ts → StorageBrowserPolicy-browser.d.mts} +1 -1
  329. package/dist/react-native/policies/StorageBrowserPolicy-browser.d.mts.map +1 -0
  330. package/dist/react-native/policies/{StorageBrowserPolicy.js → StorageBrowserPolicy-browser.mjs} +1 -5
  331. package/dist/react-native/policies/StorageBrowserPolicy-browser.mjs.map +1 -0
  332. package/dist/react-native/policies/StorageBrowserPolicy-react-native.d.mts +2 -0
  333. package/dist/react-native/policies/StorageBrowserPolicy-react-native.d.mts.map +1 -0
  334. package/dist/react-native/policies/StorageBrowserPolicy-react-native.mjs +4 -0
  335. package/dist/react-native/policies/StorageBrowserPolicy-react-native.mjs.map +1 -0
  336. package/dist/react-native/policies/{StorageBrowserPolicyV2.d.ts → StorageBrowserPolicyV2-browser.d.mts} +1 -1
  337. package/dist/react-native/policies/StorageBrowserPolicyV2-browser.d.mts.map +1 -0
  338. package/dist/react-native/policies/{StorageBrowserPolicyV2.js → StorageBrowserPolicyV2-browser.mjs} +1 -5
  339. package/dist/react-native/policies/StorageBrowserPolicyV2-browser.mjs.map +1 -0
  340. package/dist/react-native/policies/StorageBrowserPolicyV2-react-native.d.mts +2 -0
  341. package/dist/react-native/policies/StorageBrowserPolicyV2-react-native.d.mts.map +1 -0
  342. package/dist/react-native/policies/StorageBrowserPolicyV2-react-native.mjs +4 -0
  343. package/dist/react-native/policies/StorageBrowserPolicyV2-react-native.mjs.map +1 -0
  344. package/dist/react-native/policies/{StorageCorrectContentLengthPolicy.d.ts → StorageCorrectContentLengthPolicy-browser.d.mts} +1 -1
  345. package/dist/react-native/policies/StorageCorrectContentLengthPolicy-browser.d.mts.map +1 -0
  346. package/dist/react-native/policies/{StorageCorrectContentLengthPolicy.js → StorageCorrectContentLengthPolicy-browser.mjs} +1 -10
  347. package/dist/react-native/policies/StorageCorrectContentLengthPolicy-browser.mjs.map +1 -0
  348. package/dist/react-native/policies/StorageCorrectContentLengthPolicy-react-native.d.mts +2 -0
  349. package/dist/react-native/policies/StorageCorrectContentLengthPolicy-react-native.d.mts.map +1 -0
  350. package/dist/react-native/policies/StorageCorrectContentLengthPolicy-react-native.mjs +4 -0
  351. package/dist/react-native/policies/StorageCorrectContentLengthPolicy-react-native.mjs.map +1 -0
  352. package/dist/react-native/policies/{StorageSharedKeyCredentialPolicyV2.d.ts → StorageSharedKeyCredentialPolicyV2-browser.d.mts} +8 -2
  353. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-browser.d.mts.map +1 -0
  354. package/dist/react-native/policies/{StorageSharedKeyCredentialPolicyV2.js → StorageSharedKeyCredentialPolicyV2-browser.mjs} +1 -1
  355. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-browser.mjs.map +1 -0
  356. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts +2 -0
  357. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts.map +1 -0
  358. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs +4 -0
  359. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs.map +1 -0
  360. package/dist/react-native/streamHelpers-browser.d.mts +6 -0
  361. package/dist/react-native/streamHelpers-browser.d.mts.map +1 -0
  362. package/dist/react-native/streamHelpers-browser.mjs +10 -0
  363. package/dist/react-native/streamHelpers-browser.mjs.map +1 -0
  364. package/dist/react-native/streamHelpers-react-native.d.mts +2 -0
  365. package/dist/react-native/streamHelpers-react-native.d.mts.map +1 -0
  366. package/dist/react-native/streamHelpers-react-native.mjs +4 -0
  367. package/dist/react-native/streamHelpers-react-native.mjs.map +1 -0
  368. package/dist/react-native/utils/constants.d.ts.map +1 -1
  369. package/dist/react-native/utils/constants.js +1 -1
  370. package/dist/react-native/utils/constants.js.map +1 -1
  371. package/dist/react-native/utils/utils.common.d.ts +0 -12
  372. package/dist/react-native/utils/utils.common.d.ts.map +1 -1
  373. package/dist/react-native/utils/utils.common.js +4 -20
  374. package/dist/react-native/utils/utils.common.js.map +1 -1
  375. package/package.json +32 -20
  376. package/dist/browser/BufferScheduler.d.ts +0 -3
  377. package/dist/browser/BufferScheduler.d.ts.map +0 -1
  378. package/dist/browser/BufferScheduler.js +0 -8
  379. package/dist/browser/BufferScheduler.js.map +0 -1
  380. package/dist/browser/BuffersStream.d.ts +0 -41
  381. package/dist/browser/BuffersStream.d.ts.map +0 -1
  382. package/dist/browser/BuffersStream.js +0 -97
  383. package/dist/browser/BuffersStream.js.map +0 -1
  384. package/dist/browser/PooledBuffer.d.ts +0 -63
  385. package/dist/browser/PooledBuffer.d.ts.map +0 -1
  386. package/dist/browser/PooledBuffer.js +0 -95
  387. package/dist/browser/PooledBuffer.js.map +0 -1
  388. package/dist/browser/StructuredMessageDecodingStream.d.ts +0 -8
  389. package/dist/browser/StructuredMessageDecodingStream.d.ts.map +0 -1
  390. package/dist/browser/StructuredMessageDecodingStream.js.map +0 -1
  391. package/dist/browser/StructuredMessageEncodingStream.d.ts.map +0 -1
  392. package/dist/browser/StructuredMessageEncodingStream.js.map +0 -1
  393. package/dist/browser/credentials/StorageSharedKeyCredential.d.ts.map +0 -1
  394. package/dist/browser/credentials/StorageSharedKeyCredential.js.map +0 -1
  395. package/dist/browser/credentials/UserDelegationKeyCredential.d.ts.map +0 -1
  396. package/dist/browser/credentials/UserDelegationKeyCredential.js.map +0 -1
  397. package/dist/browser/interfaces.d.ts +0 -12
  398. package/dist/browser/interfaces.d.ts.map +0 -1
  399. package/dist/browser/interfaces.js.map +0 -1
  400. package/dist/browser/policies/StorageBrowserPolicy.d.ts.map +0 -1
  401. package/dist/browser/policies/StorageBrowserPolicy.js.map +0 -1
  402. package/dist/browser/policies/StorageBrowserPolicyV2.d.ts.map +0 -1
  403. package/dist/browser/policies/StorageBrowserPolicyV2.js.map +0 -1
  404. package/dist/browser/policies/StorageCorrectContentLengthPolicy.d.ts.map +0 -1
  405. package/dist/browser/policies/StorageCorrectContentLengthPolicy.js.map +0 -1
  406. package/dist/browser/policies/StorageSharedKeyCredentialPolicy.d.ts +0 -54
  407. package/dist/browser/policies/StorageSharedKeyCredentialPolicy.d.ts.map +0 -1
  408. package/dist/browser/policies/StorageSharedKeyCredentialPolicy.js +0 -145
  409. package/dist/browser/policies/StorageSharedKeyCredentialPolicy.js.map +0 -1
  410. package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2.d.ts.map +0 -1
  411. package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2.js.map +0 -1
  412. package/dist/browser/utils/SharedKeyComparator.d.ts +0 -2
  413. package/dist/browser/utils/SharedKeyComparator.d.ts.map +0 -1
  414. package/dist/browser/utils/SharedKeyComparator.js +0 -73
  415. package/dist/browser/utils/SharedKeyComparator.js.map +0 -1
  416. package/dist/browser/utils/tracing.d.ts +0 -6
  417. package/dist/browser/utils/tracing.d.ts.map +0 -1
  418. package/dist/browser/utils/tracing.js +0 -14
  419. package/dist/browser/utils/tracing.js.map +0 -1
  420. package/dist/commonjs/utils/tracing.d.ts +0 -6
  421. package/dist/commonjs/utils/tracing.d.ts.map +0 -1
  422. package/dist/commonjs/utils/tracing.js.map +0 -7
  423. package/dist/esm/utils/tracing.d.ts +0 -6
  424. package/dist/esm/utils/tracing.d.ts.map +0 -1
  425. package/dist/esm/utils/tracing.js +0 -14
  426. package/dist/esm/utils/tracing.js.map +0 -1
  427. package/dist/react-native/BufferScheduler.d.ts +0 -3
  428. package/dist/react-native/BufferScheduler.d.ts.map +0 -1
  429. package/dist/react-native/BufferScheduler.js +0 -8
  430. package/dist/react-native/BufferScheduler.js.map +0 -1
  431. package/dist/react-native/BuffersStream.d.ts +0 -41
  432. package/dist/react-native/BuffersStream.d.ts.map +0 -1
  433. package/dist/react-native/BuffersStream.js +0 -97
  434. package/dist/react-native/BuffersStream.js.map +0 -1
  435. package/dist/react-native/PooledBuffer.d.ts +0 -63
  436. package/dist/react-native/PooledBuffer.d.ts.map +0 -1
  437. package/dist/react-native/PooledBuffer.js +0 -95
  438. package/dist/react-native/PooledBuffer.js.map +0 -1
  439. package/dist/react-native/StructuredMessageDecoding.d.ts +0 -31
  440. package/dist/react-native/StructuredMessageDecoding.d.ts.map +0 -1
  441. package/dist/react-native/StructuredMessageDecoding.js +0 -201
  442. package/dist/react-native/StructuredMessageDecoding.js.map +0 -1
  443. package/dist/react-native/StructuredMessageDecodingStream.d.ts +0 -22
  444. package/dist/react-native/StructuredMessageDecodingStream.d.ts.map +0 -1
  445. package/dist/react-native/StructuredMessageDecodingStream.js +0 -79
  446. package/dist/react-native/StructuredMessageDecodingStream.js.map +0 -1
  447. package/dist/react-native/StructuredMessageEncodingStream.d.ts +0 -22
  448. package/dist/react-native/StructuredMessageEncodingStream.d.ts.map +0 -1
  449. package/dist/react-native/StructuredMessageEncodingStream.js +0 -180
  450. package/dist/react-native/StructuredMessageEncodingStream.js.map +0 -1
  451. package/dist/react-native/credentials/StorageSharedKeyCredential.d.ts.map +0 -1
  452. package/dist/react-native/credentials/StorageSharedKeyCredential.js.map +0 -1
  453. package/dist/react-native/credentials/UserDelegationKeyCredential.d.ts.map +0 -1
  454. package/dist/react-native/credentials/UserDelegationKeyCredential.js.map +0 -1
  455. package/dist/react-native/interfaces.d.ts +0 -12
  456. package/dist/react-native/interfaces.d.ts.map +0 -1
  457. package/dist/react-native/interfaces.js.map +0 -1
  458. package/dist/react-native/policies/StorageBrowserPolicy.d.ts.map +0 -1
  459. package/dist/react-native/policies/StorageBrowserPolicy.js.map +0 -1
  460. package/dist/react-native/policies/StorageBrowserPolicyV2.d.ts.map +0 -1
  461. package/dist/react-native/policies/StorageBrowserPolicyV2.js.map +0 -1
  462. package/dist/react-native/policies/StorageCorrectContentLengthPolicy.d.ts.map +0 -1
  463. package/dist/react-native/policies/StorageCorrectContentLengthPolicy.js.map +0 -1
  464. package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.d.ts +0 -54
  465. package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.d.ts.map +0 -1
  466. package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.js +0 -145
  467. package/dist/react-native/policies/StorageSharedKeyCredentialPolicy.js.map +0 -1
  468. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.d.ts.map +0 -1
  469. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2.js.map +0 -1
  470. package/dist/react-native/utils/SharedKeyComparator.d.ts +0 -2
  471. package/dist/react-native/utils/SharedKeyComparator.d.ts.map +0 -1
  472. package/dist/react-native/utils/SharedKeyComparator.js +0 -73
  473. package/dist/react-native/utils/SharedKeyComparator.js.map +0 -1
  474. package/dist/react-native/utils/tracing.d.ts +0 -6
  475. package/dist/react-native/utils/tracing.d.ts.map +0 -1
  476. package/dist/react-native/utils/tracing.js +0 -14
  477. package/dist/react-native/utils/tracing.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"BufferScheduler.js","sourceRoot":"","sources":["../../src/BufferScheduler.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,6EAA6E;AAC7E,0CAA0C;AAC1C,+DAA+D;AAC/D,MAAM,OAAO,eAAe;CAAG","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// This file is used as a shim of \"BufferScheduler\" for some browser bundlers\n// when trying to bundle \"BufferScheduler\"\n// \"BufferScheduler\" class is only available in Node.js runtime\nexport class BufferScheduler {}\n"]}
@@ -1,41 +0,0 @@
1
- import type { ReadableOptions } from "node:stream";
2
- import { Readable } from "node:stream";
3
- /**
4
- * Options to configure the BuffersStream.
5
- */
6
- export interface BuffersStreamOptions extends ReadableOptions {
7
- }
8
- /**
9
- * This class generates a readable stream from the data in an array of buffers.
10
- */
11
- export declare class BuffersStream extends Readable {
12
- private buffers;
13
- private byteLength;
14
- /**
15
- * The offset of data to be read in the current buffer.
16
- */
17
- private byteOffsetInCurrentBuffer;
18
- /**
19
- * The index of buffer to be read in the array of buffers.
20
- */
21
- private bufferIndex;
22
- /**
23
- * The total length of data already read.
24
- */
25
- private pushedBytesLength;
26
- /**
27
- * Creates an instance of BuffersStream that will emit the data
28
- * contained in the array of buffers.
29
- *
30
- * @param buffers - Array of buffers containing the data
31
- * @param byteLength - The total length of data contained in the buffers
32
- */
33
- constructor(buffers: Buffer[], byteLength: number, options?: BuffersStreamOptions);
34
- /**
35
- * Internal _read() that will be called when the stream wants to pull more data in.
36
- *
37
- * @param size - Optional. The size of data to be read
38
- */
39
- _read(size?: number): void;
40
- }
41
- //# sourceMappingURL=BuffersStream.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BuffersStream.d.ts","sourceRoot":"","sources":["../../src/BuffersStream.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,eAAe;CAAG;AAEhE;;GAEG;AACH,qBAAa,aAAc,SAAQ,QAAQ;IAwBvC,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,UAAU;IAxBpB;;OAEG;IACH,OAAO,CAAC,yBAAyB,CAAS;IAE1C;;OAEG;IACH,OAAO,CAAC,WAAW,CAAS;IAE5B;;OAEG;IACH,OAAO,CAAC,iBAAiB,CAAS;IAElC;;;;;;OAMG;gBAEO,OAAO,EAAE,MAAM,EAAE,EACjB,UAAU,EAAE,MAAM,EAC1B,OAAO,CAAC,EAAE,oBAAoB;IAiBhC;;;;OAIG;IACI,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;CA+ClC"}
@@ -1,97 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { Readable } from "node:stream";
4
- /**
5
- * This class generates a readable stream from the data in an array of buffers.
6
- */
7
- export class BuffersStream extends Readable {
8
- buffers;
9
- byteLength;
10
- /**
11
- * The offset of data to be read in the current buffer.
12
- */
13
- byteOffsetInCurrentBuffer;
14
- /**
15
- * The index of buffer to be read in the array of buffers.
16
- */
17
- bufferIndex;
18
- /**
19
- * The total length of data already read.
20
- */
21
- pushedBytesLength;
22
- /**
23
- * Creates an instance of BuffersStream that will emit the data
24
- * contained in the array of buffers.
25
- *
26
- * @param buffers - Array of buffers containing the data
27
- * @param byteLength - The total length of data contained in the buffers
28
- */
29
- constructor(buffers, byteLength, options) {
30
- super(options);
31
- this.buffers = buffers;
32
- this.byteLength = byteLength;
33
- this.byteOffsetInCurrentBuffer = 0;
34
- this.bufferIndex = 0;
35
- this.pushedBytesLength = 0;
36
- // check byteLength is no larger than buffers[] total length
37
- let buffersLength = 0;
38
- for (const buf of this.buffers) {
39
- buffersLength += buf.byteLength;
40
- }
41
- if (buffersLength < this.byteLength) {
42
- throw new Error("Data size shouldn't be larger than the total length of buffers.");
43
- }
44
- }
45
- /**
46
- * Internal _read() that will be called when the stream wants to pull more data in.
47
- *
48
- * @param size - Optional. The size of data to be read
49
- */
50
- _read(size) {
51
- if (this.pushedBytesLength >= this.byteLength) {
52
- this.push(null);
53
- }
54
- if (!size) {
55
- size = this.readableHighWaterMark;
56
- }
57
- const outBuffers = [];
58
- let i = 0;
59
- while (i < size && this.pushedBytesLength < this.byteLength) {
60
- // The last buffer may be longer than the data it contains.
61
- const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength;
62
- const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer;
63
- const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers);
64
- if (remaining > size - i) {
65
- // chunkSize = size - i
66
- const end = this.byteOffsetInCurrentBuffer + size - i;
67
- outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));
68
- this.pushedBytesLength += size - i;
69
- this.byteOffsetInCurrentBuffer = end;
70
- i = size;
71
- break;
72
- }
73
- else {
74
- // chunkSize = remaining
75
- const end = this.byteOffsetInCurrentBuffer + remaining;
76
- outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));
77
- if (remaining === remainingCapacityInThisBuffer) {
78
- // this.buffers[this.bufferIndex] used up, shift to next one
79
- this.byteOffsetInCurrentBuffer = 0;
80
- this.bufferIndex++;
81
- }
82
- else {
83
- this.byteOffsetInCurrentBuffer = end;
84
- }
85
- this.pushedBytesLength += remaining;
86
- i += remaining;
87
- }
88
- }
89
- if (outBuffers.length > 1) {
90
- this.push(Buffer.concat(outBuffers));
91
- }
92
- else if (outBuffers.length === 1) {
93
- this.push(outBuffers[0]);
94
- }
95
- }
96
- }
97
- //# sourceMappingURL=BuffersStream.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BuffersStream.js","sourceRoot":"","sources":["../../src/BuffersStream.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAOvC;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,QAAQ;IAwB/B;IACA;IAxBV;;OAEG;IACK,yBAAyB,CAAS;IAE1C;;OAEG;IACK,WAAW,CAAS;IAE5B;;OAEG;IACK,iBAAiB,CAAS;IAElC;;;;;;OAMG;IACH,YACU,OAAiB,EACj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KAAK,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ReadableOptions } from \"node:stream\";\nimport { Readable } from \"node:stream\";\n\n/**\n * Options to configure the BuffersStream.\n */\nexport interface BuffersStreamOptions extends ReadableOptions {}\n\n/**\n * This class generates a readable stream from the data in an array of buffers.\n */\nexport class BuffersStream extends Readable {\n /**\n * The offset of data to be read in the current buffer.\n */\n private byteOffsetInCurrentBuffer: number;\n\n /**\n * The index of buffer to be read in the array of buffers.\n */\n private bufferIndex: number;\n\n /**\n * The total length of data already read.\n */\n private pushedBytesLength: number;\n\n /**\n * Creates an instance of BuffersStream that will emit the data\n * contained in the array of buffers.\n *\n * @param buffers - Array of buffers containing the data\n * @param byteLength - The total length of data contained in the buffers\n */\n constructor(\n private buffers: Buffer[],\n private byteLength: number,\n options?: BuffersStreamOptions,\n ) {\n super(options);\n this.byteOffsetInCurrentBuffer = 0;\n this.bufferIndex = 0;\n this.pushedBytesLength = 0;\n\n // check byteLength is no larger than buffers[] total length\n let buffersLength = 0;\n for (const buf of this.buffers) {\n buffersLength += buf.byteLength;\n }\n if (buffersLength < this.byteLength) {\n throw new Error(\"Data size shouldn't be larger than the total length of buffers.\");\n }\n }\n\n /**\n * Internal _read() that will be called when the stream wants to pull more data in.\n *\n * @param size - Optional. The size of data to be read\n */\n public _read(size?: number): void {\n if (this.pushedBytesLength >= this.byteLength) {\n this.push(null);\n }\n\n if (!size) {\n size = this.readableHighWaterMark;\n }\n\n const outBuffers: Buffer[] = [];\n let i = 0;\n while (i < size && this.pushedBytesLength < this.byteLength) {\n // The last buffer may be longer than the data it contains.\n const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength;\n const remainingCapacityInThisBuffer =\n this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer;\n const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers);\n if (remaining > size - i) {\n // chunkSize = size - i\n const end = this.byteOffsetInCurrentBuffer + size - i;\n outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));\n this.pushedBytesLength += size - i;\n this.byteOffsetInCurrentBuffer = end;\n i = size;\n break;\n } else {\n // chunkSize = remaining\n const end = this.byteOffsetInCurrentBuffer + remaining;\n outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));\n if (remaining === remainingCapacityInThisBuffer) {\n // this.buffers[this.bufferIndex] used up, shift to next one\n this.byteOffsetInCurrentBuffer = 0;\n this.bufferIndex++;\n } else {\n this.byteOffsetInCurrentBuffer = end;\n }\n this.pushedBytesLength += remaining;\n i += remaining;\n }\n }\n\n if (outBuffers.length > 1) {\n this.push(Buffer.concat(outBuffers));\n } else if (outBuffers.length === 1) {\n this.push(outBuffers[0]);\n }\n }\n}\n"]}
@@ -1,63 +0,0 @@
1
- import type { Readable } from "node:stream";
2
- /**
3
- * This class provides a buffer container which conceptually has no hard size limit.
4
- * It accepts a capacity, an array of input buffers and the total length of input data.
5
- * It will allocate an internal "buffer" of the capacity and fill the data in the input buffers
6
- * into the internal "buffer" serially with respect to the total length.
7
- * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream
8
- * assembled from all the data in the internal "buffer".
9
- */
10
- export declare class PooledBuffer {
11
- /**
12
- * Internal buffers used to keep the data.
13
- * Each buffer has a length of the maxBufferLength except last one.
14
- */
15
- private buffers;
16
- /**
17
- * The total size of internal buffers.
18
- */
19
- private readonly capacity;
20
- /**
21
- * The total size of data contained in internal buffers.
22
- */
23
- private _size;
24
- /**
25
- * The size of the data contained in the pooled buffers.
26
- */
27
- get size(): number;
28
- /**
29
- * Creates an instance of PooledBuffer with given capacity.
30
- * Internal buffers are allocated but contains no data.
31
- * Users may call the {@link PooledBuffer.fill} method to fill this
32
- * pooled buffer with data.
33
- *
34
- * @param capacity - Total capacity of the internal buffers
35
- */
36
- constructor(capacity: number);
37
- /**
38
- * Creates an instance of PooledBuffer with given capacity.
39
- * Internal buffers are allocated and filled with data in the input buffers serially
40
- * with respect to the total length.
41
- *
42
- * @param capacity - Total capacity of the internal buffers
43
- * @param buffers - Input buffers containing the data to be filled in the pooled buffer
44
- * @param totalLength - Total length of the data to be filled in.
45
- */
46
- constructor(capacity: number, buffers: Buffer[], totalLength: number);
47
- /**
48
- * Fill the internal buffers with data in the input buffers serially
49
- * with respect to the total length and the total capacity of the internal buffers.
50
- * Data copied will be shift out of the input buffers.
51
- *
52
- * @param buffers - Input buffers containing the data to be filled in the pooled buffer
53
- * @param totalLength - Total length of the data to be filled in.
54
- *
55
- */
56
- fill(buffers: Buffer[], totalLength: number): void;
57
- /**
58
- * Get the readable stream assembled from all the data in the internal buffers.
59
- *
60
- */
61
- getReadableStream(): Readable;
62
- }
63
- //# sourceMappingURL=PooledBuffer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PooledBuffer.d.ts","sourceRoot":"","sources":["../../src/PooledBuffer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAS5C;;;;;;;GAOG;AACH,qBAAa,YAAY;IACvB;;;OAGG;IACH,OAAO,CAAC,OAAO,CAAgB;IAE/B;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAElC;;OAEG;IACH,OAAO,CAAC,KAAK,CAAS;IAEtB;;OAEG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;;;;;;OAOG;gBACS,QAAQ,EAAE,MAAM;IAE5B;;;;;;;;OAQG;gBACS,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM;IAoBpE;;;;;;;;OAQG;IACI,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;IAiCzD;;;OAGG;IACI,iBAAiB,IAAI,QAAQ;CAGrC"}
@@ -1,95 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { BuffersStream } from "./BuffersStream.js";
4
- import buffer from "node:buffer";
5
- /**
6
- * maxBufferLength is max size of each buffer in the pooled buffers.
7
- */
8
- const maxBufferLength = buffer.constants.MAX_LENGTH;
9
- /**
10
- * This class provides a buffer container which conceptually has no hard size limit.
11
- * It accepts a capacity, an array of input buffers and the total length of input data.
12
- * It will allocate an internal "buffer" of the capacity and fill the data in the input buffers
13
- * into the internal "buffer" serially with respect to the total length.
14
- * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream
15
- * assembled from all the data in the internal "buffer".
16
- */
17
- export class PooledBuffer {
18
- /**
19
- * Internal buffers used to keep the data.
20
- * Each buffer has a length of the maxBufferLength except last one.
21
- */
22
- buffers = [];
23
- /**
24
- * The total size of internal buffers.
25
- */
26
- capacity;
27
- /**
28
- * The total size of data contained in internal buffers.
29
- */
30
- _size;
31
- /**
32
- * The size of the data contained in the pooled buffers.
33
- */
34
- get size() {
35
- return this._size;
36
- }
37
- constructor(capacity, buffers, totalLength) {
38
- this.capacity = capacity;
39
- this._size = 0;
40
- // allocate
41
- const bufferNum = Math.ceil(capacity / maxBufferLength);
42
- for (let i = 0; i < bufferNum; i++) {
43
- let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength;
44
- if (len === 0) {
45
- len = maxBufferLength;
46
- }
47
- this.buffers.push(Buffer.allocUnsafe(len));
48
- }
49
- if (buffers) {
50
- this.fill(buffers, totalLength);
51
- }
52
- }
53
- /**
54
- * Fill the internal buffers with data in the input buffers serially
55
- * with respect to the total length and the total capacity of the internal buffers.
56
- * Data copied will be shift out of the input buffers.
57
- *
58
- * @param buffers - Input buffers containing the data to be filled in the pooled buffer
59
- * @param totalLength - Total length of the data to be filled in.
60
- *
61
- */
62
- fill(buffers, totalLength) {
63
- this._size = Math.min(this.capacity, totalLength);
64
- let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0;
65
- while (totalCopiedNum < this._size) {
66
- const source = buffers[i];
67
- const target = this.buffers[j];
68
- const copiedNum = source.copy(target, targetOffset, sourceOffset);
69
- totalCopiedNum += copiedNum;
70
- sourceOffset += copiedNum;
71
- targetOffset += copiedNum;
72
- if (sourceOffset === source.length) {
73
- i++;
74
- sourceOffset = 0;
75
- }
76
- if (targetOffset === target.length) {
77
- j++;
78
- targetOffset = 0;
79
- }
80
- }
81
- // clear copied from source buffers
82
- buffers.splice(0, i);
83
- if (buffers.length > 0) {
84
- buffers[0] = buffers[0].slice(sourceOffset);
85
- }
86
- }
87
- /**
88
- * Get the readable stream assembled from all the data in the internal buffers.
89
- *
90
- */
91
- getReadableStream() {
92
- return new BuffersStream(this.buffers, this.size);
93
- }
94
- }
95
- //# sourceMappingURL=PooledBuffer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PooledBuffer.js","sourceRoot":"","sources":["../../src/PooledBuffer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC;;GAEG;AAEH,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,OAAO,YAAY;IACvB;;;OAGG;IACK,OAAO,GAAa,EAAE,CAAC;IAE/B;;OAEG;IACc,QAAQ,CAAS;IAElC;;OAEG;IACK,KAAK,CAAS;IAEtB;;OAEG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAsBD,YAAY,QAAgB,EAAE,OAAkB,EAAE,WAAoB;QACpE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QAEf,WAAW;QACX,M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B,IAAI,YAAY,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC;gBACnC,CAAC,EAAE,CAAC;gBACJ,YAAY,GAAG,CAAC,CAAC;YACnB,CAAC;YACD,IAAI,YAAY,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC;gBACnC,CAAC,EAAE,CAAC;gBACJ,YAAY,GAAG,CAAC,CAAC;YACnB,CAAC;QACH,CAAC;QAED,mCAAmC;QACnC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrB,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAED;;;OAGG;IACI,iBAAiB;QACtB,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { BuffersStream } from \"./BuffersStream.js\";\nimport type { Readable } from \"node:stream\";\nimport buffer from \"node:buffer\";\n\n/**\n * maxBufferLength is max size of each buffer in the pooled buffers.\n */\n\nconst maxBufferLength = buffer.constants.MAX_LENGTH;\n\n/**\n * This class provides a buffer container which conceptually has no hard size limit.\n * It accepts a capacity, an array of input buffers and the total length of input data.\n * It will allocate an internal \"buffer\" of the capacity and fill the data in the input buffers\n * into the internal \"buffer\" serially with respect to the total length.\n * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream\n * assembled from all the data in the internal \"buffer\".\n */\nexport class PooledBuffer {\n /**\n * Internal buffers used to keep the data.\n * Each buffer has a length of the maxBufferLength except last one.\n */\n private buffers: Buffer[] = [];\n\n /**\n * The total size of internal buffers.\n */\n private readonly capacity: number;\n\n /**\n * The total size of data contained in internal buffers.\n */\n private _size: number;\n\n /**\n * The size of the data contained in the pooled buffers.\n */\n public get size(): number {\n return this._size;\n }\n\n /**\n * Creates an instance of PooledBuffer with given capacity.\n * Internal buffers are allocated but contains no data.\n * Users may call the {@link PooledBuffer.fill} method to fill this\n * pooled buffer with data.\n *\n * @param capacity - Total capacity of the internal buffers\n */\n constructor(capacity: number);\n\n /**\n * Creates an instance of PooledBuffer with given capacity.\n * Internal buffers are allocated and filled with data in the input buffers serially\n * with respect to the total length.\n *\n * @param capacity - Total capacity of the internal buffers\n * @param buffers - Input buffers containing the data to be filled in the pooled buffer\n * @param totalLength - Total length of the data to be filled in.\n */\n constructor(capacity: number, buffers: Buffer[], totalLength: number);\n constructor(capacity: number, buffers?: Buffer[], totalLength?: number) {\n this.capacity = capacity;\n this._size = 0;\n\n // allocate\n const bufferNum = Math.ceil(capacity / maxBufferLength);\n for (let i = 0; i < bufferNum; i++) {\n let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength;\n if (len === 0) {\n len = maxBufferLength;\n }\n this.buffers.push(Buffer.allocUnsafe(len));\n }\n\n if (buffers) {\n this.fill(buffers, totalLength!);\n }\n }\n\n /**\n * Fill the internal buffers with data in the input buffers serially\n * with respect to the total length and the total capacity of the internal buffers.\n * Data copied will be shift out of the input buffers.\n *\n * @param buffers - Input buffers containing the data to be filled in the pooled buffer\n * @param totalLength - Total length of the data to be filled in.\n *\n */\n public fill(buffers: Buffer[], totalLength: number): void {\n this._size = Math.min(this.capacity, totalLength);\n\n let i = 0,\n j = 0,\n targetOffset = 0,\n sourceOffset = 0,\n totalCopiedNum = 0;\n while (totalCopiedNum < this._size) {\n const source = buffers[i];\n const target = this.buffers[j];\n const copiedNum = source.copy(target, targetOffset, sourceOffset);\n\n totalCopiedNum += copiedNum;\n sourceOffset += copiedNum;\n targetOffset += copiedNum;\n if (sourceOffset === source.length) {\n i++;\n sourceOffset = 0;\n }\n if (targetOffset === target.length) {\n j++;\n targetOffset = 0;\n }\n }\n\n // clear copied from source buffers\n buffers.splice(0, i);\n if (buffers.length > 0) {\n buffers[0] = buffers[0].slice(sourceOffset);\n }\n }\n\n /**\n * Get the readable stream assembled from all the data in the internal buffers.\n *\n */\n public getReadableStream(): Readable {\n return new BuffersStream(this.buffers, this.size);\n }\n}\n"]}
@@ -1,8 +0,0 @@
1
- export declare const structuredMessageDecodingStream = 1;
2
- /**
3
- * To decode structured body for CRC64 content validtion in storage downloading.
4
- * @param source -
5
- * @returns -
6
- */
7
- export declare function structuredMessageDecodingBrowser(source: Blob | ReadableStream<Uint8Array>): Promise<Blob>;
8
- //# sourceMappingURL=StructuredMessageDecodingStream.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StructuredMessageDecodingStream.d.ts","sourceRoot":"","sources":["../../src/StructuredMessageDecodingStream.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAejD;;;;GAIG;AACH,wBAAsB,gCAAgC,CAAC,MAAM,EAAE,IAAI,GAAG,cAAc,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA0B/G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StructuredMessageDecodingStream.js","sourceRoot":"","sources":["../../src/StructuredMessageDecodingStream.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC;AAEjD,KAAK,UAAU,IAAI,CACjB,MAAmC,EACnC,eAA0C;IAC1C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;IAC5C,2DAA2D;IAC3D,IAAI,IAAI,EAAE,CAAC;QACT,OAAO;IACT,CAAC;IAED,qDAAqD;IACrD,eAAe,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAC3C,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,gCAAgC,CAAC,MAAyC;IAC9F,MAAM,YAAY,GAAG,CAAC,MAAM,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;IACzE,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,EAAE,CAAC;IACxC,IAAI,eAAe,GAA2C,SAAS,CAAC;IACxE,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC;QAChC,KAAK,CAAC,UAAU;YACd,eAAe,GAAG,IAAI,yBAAyB,CAAC,CAAC,IAAI,EAAE,EAAE;gBACvD,IAAI,IAAI,KAAK,IAAI,EACf,CAAC;oBACC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;gBAC1B,CAAC;qBACE,CAAC;oBACJ,UAAU,CAAC,KAAK,EAAE,CAAC;gBACrB,CAAC;YAAA,CAAC,CAAC,CAAC;QACR,CAAC;QACD,IAAI,CAAE,UAAU;YACd,IAAI,CAAC,MAAM,EAAE,eAAgB,CAAC;iBAC3B,IAAI,CAAC,GAAG,EAAE;gBACT,OAAO;YACT,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;gBACb,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YAAA,CAAC,CAAC,CAAC;QAC9B,CAAC;KACF,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;IACtC,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { StructuredMessageDecoding } from \"./StructuredMessageDecoding.js\";\n\nexport const structuredMessageDecodingStream = 1;\n\nasync function pump(\n reader: ReadableStreamDefaultReader, \n messageDecoding: StructuredMessageDecoding) : Promise<void> {\n const { done, value } = await reader.read();\n // When no more data needs to be consumed, close the stream\n if (done) {\n return;\n }\n \n // Enqueue the next data chunk into our target stream\n messageDecoding.sourceDataHandler(value);\n}\n\n/**\n * To decode structured body for CRC64 content validtion in storage downloading.\n * @param source -\n * @returns -\n */\nexport async function structuredMessageDecodingBrowser(source: Blob | ReadableStream<Uint8Array>): Promise<Blob> {\n const sourceStream = (source instanceof Blob) ? source.stream() : source;\n const reader = sourceStream.getReader();\n let messageDecoding : StructuredMessageDecoding | undefined = undefined;\n const stream = new ReadableStream({\n start(controller) {\n messageDecoding = new StructuredMessageDecoding((data) => {\n if (null !== data) \n {\n controller.enqueue(data)\n }\n else {\n controller.close();\n }});\n },\n pull (controller) {\n pump(reader, messageDecoding!)\n .then(() =>{\n return;\n })\n .catch((err) => {\n controller.error(err)});\n }\n });\n const response = new Response(stream);\n return response.blob();\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StructuredMessageEncodingStream.d.ts","sourceRoot":"","sources":["../../src/StructuredMessageEncodingStream.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,IAAI,eAAe,EACnC,MAAM,2BAA2B,CAAC;AAsDnC,wBAAsB,yBAAyB,CAC3C,MAAM,EAAE,eAAe,EACvB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,oBAAoB,EAAE,MAAM,CAAA;CAAE,CAAC,CAwClE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StructuredMessageEncodingStream.js","sourceRoot":"","sources":["../../src/StructuredMessageEncodingStream.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,KAAK,UAAU,IAAI,CACjB,MAAmC,EACnC,UAA2C,EAC3C,cACkB;IAClB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;IAE5C,IAAI,KAAK,EAAE,CAAC;QACV,qDAAqD;QACrD,cAAc,CAAC,MAAM,CAAC,iBAAiB,CAAC,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AAoB;aACpD,CAAA;QACH,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;AACzF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n RequestBodyType as HttpRequestBody,\n} from \"@azure/core-rest-pipeline\";\nimport { StructuredMessageEncoding } from \"./StructuredMessageEncoding.js\";\n\nasync function pump(\n reader: ReadableStreamDefaultReader, \n controller: ReadableStreamDefaultController,\n encodingStream: { stream: StructuredMessageEncoding,\n closed: boolean}) : Promise<void> {\n const { done, value } = await reader.read();\n\n if (value) { \n // Enqueue the next data chunk into our target stream\n encodingStream.stream.sourceDataHandler(value);\n }\n // When no more data needs to be consumed, close the stream\n if (done) {\n if (!encodingStream.closed) {\n encodingStream.closed = true;\n controller.close();\n }\n return;\n }\n}\n\nasync function BrowserStream(source: Blob | ReadableStream<Uint8Array>, contentLength: number): Promise<{content: Blob, encodedContentLength: number}> {\n const sourceStream = (source instanceof Blob) ? source.stream() : source;\n const reader = sourceStream.getReader();\n\n let encodingStream : { stream: StructuredMessageEncoding,\n closed: boolean} | undefined = undefined;\n const stream = new ReadableStream({\n start(controller) { \n encodingStream = { stream: new StructuredMessageEncoding((data) => {\n controller.enqueue(data)\n }, contentLength),\n closed: false};\n },\n pull (controller) {\n pump(reader, controller, encodingStream!).then(() =>{\n return;\n })\n .catch((err) =>{\n controller.error(err);\n });\n }\n });\n\n const response = new Response(stream);\n return {\n content: await response.blob(),\n encodedContentLength: encodingStream!.stream.messageLength,\n }\n}\n\nexport async function structuredMessageEncoding(\n source: HttpRequestBody,\n contentLength: number,\n ): Promise<{ body: HttpRequestBody, encodedContentLength: number }> {\n if (source === null) {\n return {\n body: source,\n encodedContentLength: contentLength,\n }\n }\n\n if (source instanceof Blob) {\n const encoding = await BrowserStream(source, contentLength);\n return {\n body: encoding.content,\n encodedContentLength: encoding.encodedContentLength\n }\n }\n\n if (((typeof source) === 'string')\n || (source instanceof ArrayBuffer)) {\n \n const encoding = await BrowserStream(new Blob([source]), contentLength);\n\n return {\n body: encoding.content,\n encodedContentLength: encoding.encodedContentLength\n }\n }\n\n if (ArrayBuffer.isView(source)) {\n let encoding = undefined;\n if (source.buffer instanceof ArrayBuffer) {\n encoding = await BrowserStream(new Blob([source.buffer.slice(source.byteOffset, source.byteOffset + source.byteLength)]), contentLength); \n\n return {\n body: encoding.content,\n encodedContentLength: encoding.encodedContentLength\n }\n }\n }\n\n throw new Error(\"The specified request body type is not supported for CRC64 checksum\");\n }\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StorageSharedKeyCredential.d.ts","sourceRoot":"","sources":["../../../src/credentials/StorageSharedKeyCredential.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,IAAI,oBAAoB,EACjD,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,UAAU;IACxD;;OAEG;IACH,SAAgB,WAAW,EAAG,MAAM,CAAC;IAErC;;;;OAIG;gBACS,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAKrD;;;;;OAKG;IACI,MAAM,CAAC,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,oBAAoB,GAAG,aAAa;IAIxF;;;;OAIG;IACI,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM;CAGxD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StorageSharedKeyCredential.js","sourceRoot":"","sources":["../../../src/credentials/StorageSharedKeyCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;;GAIG;AACH,MAAM,OAAO,0BAA2B,SAAQ,UAAU;IACxD;;OAEG;IACa,WAAW,CAAU;IAErC;;;;OAIG;IACH,YAAY,YAAoB,EAAE,WAAmB;QACnD,KAAK,EAAE,CAAC;QACR,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;IACjF,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,WAA0B,EAAE,QAA8B;QACtE,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;IACjF,CAAC;IAED;;;;OAIG;IACI,iBAAiB,CAAC,aAAqB;QAC5C,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;IACjF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n RequestPolicy,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n} from \"@azure/core-http-compat\";\nimport { Credential } from \"./Credential.js\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * StorageSharedKeyCredential for account key authorization of Azure Storage service.\n */\nexport class StorageSharedKeyCredential extends Credential {\n /**\n * Azure Storage account name; readonly.\n */\n public readonly accountName!: string;\n\n /**\n * Creates an instance of StorageSharedKeyCredential.\n * @param accountName -\n * @param accountKey -\n */\n constructor(_accountName: string, _accountKey: string) {\n super();\n throw new Error(\"StorageSharedKeyCredential is not supported in the browser.\");\n }\n\n /**\n * Creates a StorageSharedKeyCredentialPolicy object.\n *\n * @param _nextPolicy -\n * @param _options -\n */\n public create(_nextPolicy: RequestPolicy, _options: RequestPolicyOptions): RequestPolicy {\n throw new Error(\"StorageSharedKeyCredential is not supported in the browser.\");\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 throw new Error(\"StorageSharedKeyCredential is not supported in the browser.\");\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserDelegationKeyCredential.d.ts","sourceRoot":"","sources":["../../../src/credentials/UserDelegationKeyCredential.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,IAAI,CAAC;IACrB,eAAe,EAAE,IAAI,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,qBAAa,2BAA2B;IACtC,SAAgB,WAAW,EAAE,MAAM,CAAC;IACpC,SAAgB,iBAAiB,EAAE,iBAAiB,CAAC;gBAEzC,WAAW,EAAE,MAAM,EAAE,iBAAiB,EAAE,iBAAiB;IAM9D,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM;CAGxD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserDelegationKeyCredential.js","sourceRoot":"","sources":["../../../src/credentials/UserDelegationKeyCredential.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAelC;;;;GAIG;AACH,MAAM,OAAO,2BAA2B;IACtB,WAAW,CAAS;IACpB,iBAAiB,CAAoB;IAErD,YAAY,WAAmB,EAAE,iBAAoC;QACnE,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAClF,CAAC;IAEM,iBAAiB,CAAC,aAAqB;QAC5C,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAClF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * A user delegation key.\n */\nexport interface UserDelegationKey {\n signedObjectId: string;\n signedTenantId: string;\n signedStartsOn: Date;\n signedExpiresOn: Date;\n signedService: string;\n signedVersion: string;\n value: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * UserDelegationKeyCredential is only used for generation of user delegation SAS.\n */\nexport class UserDelegationKeyCredential {\n public readonly accountName: string;\n public readonly userDelegationKey: UserDelegationKey;\n\n constructor(accountName: string, userDelegationKey: UserDelegationKey) {\n this.accountName = accountName;\n this.userDelegationKey = userDelegationKey;\n throw new Error(\"UserDelegationKeyCredential is not supported in the browser.\");\n }\n\n public computeHMACSHA256(_stringToSign: string): string {\n throw new Error(\"UserDelegationKeyCredential is not supported in the browser.\");\n }\n}\n"]}
@@ -1,12 +0,0 @@
1
- /**
2
- * A Node.js Readable stream that also has a `destroy` method.
3
- */
4
- export interface NodeJSReadableStream extends NodeJS.ReadableStream {
5
- /**
6
- * Destroy the stream. Optionally emit an 'error' event, and emit a
7
- * 'close' event (unless emitClose is set to false). After this call,
8
- * internal resources will be released.
9
- */
10
- destroy(error?: Error): this;
11
- }
12
- //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/interfaces.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,MAAM,CAAC,cAAc;IACjE;;;;OAIG;IACH,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;CAC9B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/interfaces.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * A Node.js Readable stream that also has a `destroy` method.\n */\nexport interface NodeJSReadableStream extends NodeJS.ReadableStream {\n /**\n * Destroy the stream. Optionally emit an 'error' event, and emit a\n * 'close' event (unless emitClose is set to false). After this call,\n * internal resources will be released.\n */\n destroy(error?: Error): this;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StorageBrowserPolicy.d.ts","sourceRoot":"","sources":["../../../src/policies/StorageBrowserPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,E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O,CAAC,GAAG,GAAG,eAAe,CAC3B,OAAO,CAAC,GAAG,EACX,YAAY,CAAC,UAAU,CAAC,sBAAsB,EAC9C,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAChC,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAE/C,oFAAoF;QACpF,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;QAEvD,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n RequestPolicy,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n WebResourceLike as WebResource,\n CompatResponse as HttpOperationResponse,\n} from \"@azure/core-http-compat\";\nimport { BaseRequestPolicy } from \"./RequestPolicy.js\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport { HeaderConstants, URLConstants } from \"../utils/constants.js\";\nimport { setURLParameter } from \"../utils/utils.common.js\";\n\n/**\n * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including:\n *\n * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'.\n * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL\n * thus avoid the browser cache.\n *\n * 2. Remove cookie header for security\n *\n * 3. Remove content-length header to avoid browsers warning\n */\nexport class StorageBrowserPolicy extends BaseRequestPolicy {\n /**\n * Creates an instance of StorageBrowserPolicy.\n * @param nextPolicy -\n * @param options -\n */\n // The base class has a protected constructor. Adding a public one to enable constructing of this class.\n /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/\n constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions) {\n super(nextPolicy, options);\n }\n\n /**\n * Sends out request.\n *\n * @param request -\n */\n public async sendRequest(request: WebResource): Promise<HttpOperationResponse> {\n if (isNodeLike) {\n return this._nextPolicy.sendRequest(request);\n }\n\n if (request.method.toUpperCase() === \"GET\" || request.method.toUpperCase() === \"HEAD\") {\n request.url = setURLParameter(\n request.url,\n URLConstants.Parameters.FORCE_BROWSER_NO_CACHE,\n new Date().getTime().toString(),\n );\n }\n\n request.headers.remove(HeaderConstants.COOKIE);\n\n // According to XHR standards, content-length should be fully controlled by browsers\n request.headers.remove(HeaderConstants.CONTENT_LENGTH);\n\n return this._nextPolicy.sendRequest(request);\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StorageBrowserPolicyV2.d.ts","sourceRoot":"","sources":["../../../src/policies/StorageBrowserPolicyV2.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIV,cAAc,EACf,MAAM,2BAA2B,CAAC;AAKnC;;GAEG;AACH,eAAO,MAAM,wBAAwB,yBAAyB,CAAC;AAE/D;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,cAAc,CAuBrD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StorageBrowserPolicyV2.js","sourceRoot":"","sources":["../../../src/policies/StorageBrowserPolicyV2.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAE/D;;;GAGG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO;QACL,IAAI,EAAE,wBAAwB;QAC9B,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,UAAU,EAAE,CAAC;gBACf,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;YAED,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;gBAC1D,OAAO,CAAC,GAAG,GAAG,eAAe,CAC3B,OAAO,CAAC,GAAG,EACX,YAAY,CAAC,UAAU,CAAC,sBAAsB,EAC9C,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAChC,CAAC;YACJ,CAAC;YAED,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;YAE/C,oFAAoF;YACpF,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;YACvD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n PipelinePolicy,\n} from \"@azure/core-rest-pipeline\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport { HeaderConstants, URLConstants } from \"../utils/constants.js\";\nimport { setURLParameter } from \"../utils/utils.common.js\";\n\n/**\n * The programmatic identifier of the StorageBrowserPolicy.\n */\nexport const storageBrowserPolicyName = \"storageBrowserPolicy\";\n\n/**\n * storageBrowserPolicy is a policy used to prevent browsers from caching requests\n * and to remove cookies and explicit content-length headers.\n */\nexport function storageBrowserPolicy(): PipelinePolicy {\n return {\n name: storageBrowserPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n if (isNodeLike) {\n return next(request);\n }\n\n if (request.method === \"GET\" || request.method === \"HEAD\") {\n request.url = setURLParameter(\n request.url,\n URLConstants.Parameters.FORCE_BROWSER_NO_CACHE,\n new Date().getTime().toString(),\n );\n }\n\n request.headers.delete(HeaderConstants.COOKIE);\n\n // According to XHR standards, content-length should be fully controlled by browsers\n request.headers.delete(HeaderConstants.CONTENT_LENGTH);\n return next(request);\n },\n };\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StorageCorrectContentLengthPolicy.d.ts","sourceRoot":"","sources":["../../../src/policies/StorageCorrectContentLengthPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIV,cAAc,EACf,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,qCAAqC,sCAAsC,CAAC;AAEzF;;GAEG;AACH,wBAAgB,iCAAiC,IAAI,cAAc,CAOlE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StorageCorrectContentLengthPolicy.js","sourceRoot":"","sources":["../../../src/policies/StorageCorrectContentLengthPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC;;GAEG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,mCAAmC,CAAC;AAEzF;;GAEG;AACH,MAAM,UAAU,iCAAiC;IAC/C,OAAO;QACL,IAAI,EAAE,qCAAqC;QAC3C,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n PipelinePolicy,\n} from \"@azure/core-rest-pipeline\";\n\n/**\n * The programmatic identifier of the storageCorrectContentLengthPolicy.\n */\nexport const storageCorrectContentLengthPolicyName = \"StorageCorrectContentLengthPolicy\";\n\n/**\n * storageCorrectContentLengthPolicy to correctly set Content-Length header with request body length.\n */\nexport function storageCorrectContentLengthPolicy(): PipelinePolicy {\n return {\n name: storageCorrectContentLengthPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n return next(request);\n },\n };\n}\n"]}
@@ -1,54 +0,0 @@
1
- import type { RequestPolicy, RequestPolicyOptionsLike as RequestPolicyOptions, WebResourceLike as WebResource } from "@azure/core-http-compat";
2
- import type { StorageSharedKeyCredential } from "../credentials/StorageSharedKeyCredential.js";
3
- import { CredentialPolicy } from "./CredentialPolicy.js";
4
- /**
5
- * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key.
6
- */
7
- export declare class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
8
- /**
9
- * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy
10
- */
11
- private readonly factory;
12
- /**
13
- * Creates an instance of StorageSharedKeyCredentialPolicy.
14
- * @param nextPolicy -
15
- * @param options -
16
- * @param factory -
17
- */
18
- constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptions, factory: StorageSharedKeyCredential);
19
- /**
20
- * Signs request.
21
- *
22
- * @param request -
23
- */
24
- protected signRequest(request: WebResource): WebResource;
25
- /**
26
- * Retrieve header value according to shared key sign rules.
27
- * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key
28
- *
29
- * @param request -
30
- * @param headerName -
31
- */
32
- private getHeaderValueToSign;
33
- /**
34
- * To construct the CanonicalizedHeaders portion of the signature string, follow these steps:
35
- * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header.
36
- * 2. Convert each HTTP header name to lowercase.
37
- * 3. Sort the headers lexicographically by header name, in ascending order.
38
- * Each header may appear only once in the string.
39
- * 4. Replace any linear whitespace in the header value with a single space.
40
- * 5. Trim any whitespace around the colon in the header.
41
- * 6. Finally, append a new-line character to each canonicalized header in the resulting list.
42
- * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string.
43
- *
44
- * @param request -
45
- */
46
- private getCanonicalizedHeadersString;
47
- /**
48
- * Retrieves the webResource canonicalized resource string.
49
- *
50
- * @param request -
51
- */
52
- private getCanonicalizedResourceString;
53
- }
54
- //# sourceMappingURL=StorageSharedKeyCredentialPolicy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StorageSharedKeyCredentialPolicy.d.ts","sourceRoot":"","sources":["../../../src/policies/StorageSharedKeyCredentialPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,IAAI,oBAAoB,EAChD,eAAe,IAAI,WAAW,EAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAG/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,gBAAgB;IACpE;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IAErD;;;;;OAKG;gBAED,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,0BAA0B;IAMrC;;;;OAIG;IACH,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW;IA2CxD;;;;;;OAMG;IACH,OAAO,CAAC,oBAAoB;IAiB5B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,6BAA6B;IA2BrC;;;;OAIG;IACH,OAAO,CAAC,8BAA8B;CA0BvC"}