@azure/storage-blob 12.31.0 → 12.32.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 (443) hide show
  1. package/dist/browser/BatchUtils.d.ts +1 -1
  2. package/dist/browser/BatchUtils.d.ts.map +1 -0
  3. package/dist/browser/BatchUtils.js +1 -1
  4. package/dist/browser/BatchUtils.js.map +1 -0
  5. package/dist/browser/BlobDownloadResponse.d.ts +5 -2
  6. package/dist/browser/BlobDownloadResponse.d.ts.map +1 -0
  7. package/dist/browser/BlobDownloadResponse.js +9 -5
  8. package/dist/browser/BlobDownloadResponse.js.map +1 -0
  9. package/dist/browser/BlobQueryResponse.d.ts +1 -1
  10. package/dist/browser/BlobQueryResponse.d.ts.map +1 -0
  11. package/dist/browser/BlobQueryResponse.js +1 -1
  12. package/dist/browser/BlobQueryResponse.js.map +1 -0
  13. package/dist/browser/BlobServiceClient.d.ts +36 -5
  14. package/dist/browser/BlobServiceClient.d.ts.map +1 -1
  15. package/dist/browser/BlobServiceClient.js +29 -17
  16. package/dist/browser/BlobServiceClient.js.map +1 -1
  17. package/dist/browser/Clients.d.ts +68 -14
  18. package/dist/browser/Clients.d.ts.map +1 -1
  19. package/dist/browser/Clients.js +97 -28
  20. package/dist/browser/Clients.js.map +1 -1
  21. package/dist/browser/ContainerClient.d.ts +6 -4
  22. package/dist/browser/ContainerClient.d.ts.map +1 -1
  23. package/dist/browser/ContainerClient.js +8 -6
  24. package/dist/browser/ContainerClient.js.map +1 -1
  25. package/dist/browser/Pipeline.d.ts +2 -3
  26. package/dist/browser/Pipeline.d.ts.map +1 -1
  27. package/dist/browser/Pipeline.js.map +1 -1
  28. package/dist/browser/generated/src/models/index.d.ts +59 -4
  29. package/dist/browser/generated/src/models/index.d.ts.map +1 -1
  30. package/dist/browser/generated/src/models/index.js +2 -2
  31. package/dist/browser/generated/src/models/index.js.map +1 -1
  32. package/dist/browser/generated/src/models/mappers.d.ts.map +1 -1
  33. package/dist/browser/generated/src/models/mappers.js +65 -0
  34. package/dist/browser/generated/src/models/mappers.js.map +1 -1
  35. package/dist/browser/generated/src/models/parameters.d.ts +7 -0
  36. package/dist/browser/generated/src/models/parameters.d.ts.map +1 -1
  37. package/dist/browser/generated/src/models/parameters.js +71 -1
  38. package/dist/browser/generated/src/models/parameters.js.map +1 -1
  39. package/dist/browser/generated/src/operations/appendBlob.js +5 -0
  40. package/dist/browser/generated/src/operations/appendBlob.js.map +1 -1
  41. package/dist/browser/generated/src/operations/blob.js +3 -0
  42. package/dist/browser/generated/src/operations/blob.js.map +1 -1
  43. package/dist/browser/generated/src/operations/blockBlob.js +10 -0
  44. package/dist/browser/generated/src/operations/blockBlob.js.map +1 -1
  45. package/dist/browser/generated/src/operations/pageBlob.js +5 -0
  46. package/dist/browser/generated/src/operations/pageBlob.js.map +1 -1
  47. package/dist/browser/generated/src/storageClient.js +2 -2
  48. package/dist/browser/generated/src/storageClient.js.map +1 -1
  49. package/dist/browser/generatedModels.d.ts +4 -4
  50. package/dist/browser/generatedModels.d.ts.map +1 -1
  51. package/dist/browser/generatedModels.js.map +1 -1
  52. package/dist/browser/index.d.ts +9 -9
  53. package/dist/browser/index.d.ts.map +1 -0
  54. package/dist/browser/index.js +1 -2
  55. package/dist/browser/index.js.map +1 -0
  56. package/dist/browser/internal-avro/index.d.ts +9 -2
  57. package/dist/browser/internal-avro/index.d.ts.map +1 -0
  58. package/dist/browser/internal-avro/index.js +14 -1
  59. package/dist/browser/internal-avro/index.js.map +1 -0
  60. package/dist/browser/models.d.ts +43 -0
  61. package/dist/browser/models.d.ts.map +1 -1
  62. package/dist/browser/models.js.map +1 -1
  63. package/dist/browser/sas/BlobSASSignatureValues.d.ts +11 -1
  64. package/dist/browser/sas/BlobSASSignatureValues.d.ts.map +1 -1
  65. package/dist/browser/sas/BlobSASSignatureValues.js +133 -2
  66. package/dist/browser/sas/BlobSASSignatureValues.js.map +1 -1
  67. package/dist/browser/sas/SASQueryParameters.d.ts +23 -2
  68. package/dist/browser/sas/SASQueryParameters.d.ts.map +1 -1
  69. package/dist/browser/sas/SASQueryParameters.js +34 -2
  70. package/dist/browser/sas/SASQueryParameters.js.map +1 -1
  71. package/dist/browser/utils/RetriableReadableStream.d.ts.map +1 -1
  72. package/dist/browser/utils/RetriableReadableStream.js +1 -0
  73. package/dist/browser/utils/RetriableReadableStream.js.map +1 -1
  74. package/dist/browser/utils/constants.d.ts.map +1 -1
  75. package/dist/browser/utils/constants.js +2 -2
  76. package/dist/browser/utils/constants.js.map +1 -1
  77. package/dist/browser/utils/utils.common.d.ts +16 -1
  78. package/dist/browser/utils/utils.common.d.ts.map +1 -1
  79. package/dist/browser/utils/utils.common.js +26 -0
  80. package/dist/browser/utils/utils.common.js.map +1 -1
  81. package/dist/browser/utils/utils.d.ts +12 -6
  82. package/dist/browser/utils/utils.d.ts.map +1 -0
  83. package/dist/browser/utils/utils.js +11 -11
  84. package/dist/browser/utils/utils.js.map +1 -0
  85. package/dist/commonjs/BatchResponse.js +15 -5
  86. package/dist/commonjs/BatchResponse.js.map +7 -1
  87. package/dist/commonjs/BatchResponseParser.js +127 -136
  88. package/dist/commonjs/BatchResponseParser.js.map +7 -1
  89. package/dist/commonjs/BatchUtils.js +38 -15
  90. package/dist/commonjs/BatchUtils.js.map +7 -1
  91. package/dist/commonjs/BlobBatch.js +280 -258
  92. package/dist/commonjs/BlobBatch.js.map +7 -1
  93. package/dist/commonjs/BlobBatchClient.js +188 -169
  94. package/dist/commonjs/BlobBatchClient.js.map +7 -1
  95. package/dist/commonjs/BlobDownloadResponse.d.ts +2 -1
  96. package/dist/commonjs/BlobDownloadResponse.d.ts.map +1 -1
  97. package/dist/commonjs/BlobDownloadResponse.js +487 -467
  98. package/dist/commonjs/BlobDownloadResponse.js.map +7 -1
  99. package/dist/commonjs/BlobLeaseClient.js +226 -196
  100. package/dist/commonjs/BlobLeaseClient.js.map +7 -1
  101. package/dist/commonjs/BlobQueryResponse.common.js +378 -365
  102. package/dist/commonjs/BlobQueryResponse.common.js.map +7 -1
  103. package/dist/commonjs/BlobQueryResponse.js +387 -371
  104. package/dist/commonjs/BlobQueryResponse.js.map +7 -1
  105. package/dist/commonjs/BlobServiceClient.d.ts +36 -5
  106. package/dist/commonjs/BlobServiceClient.d.ts.map +1 -1
  107. package/dist/commonjs/BlobServiceClient.js +784 -684
  108. package/dist/commonjs/BlobServiceClient.js.map +7 -1
  109. package/dist/commonjs/Clients.d.ts +68 -14
  110. package/dist/commonjs/Clients.d.ts.map +1 -1
  111. package/dist/commonjs/Clients.js +3120 -2804
  112. package/dist/commonjs/Clients.js.map +7 -1
  113. package/dist/commonjs/ContainerClient.d.ts +6 -4
  114. package/dist/commonjs/ContainerClient.d.ts.map +1 -1
  115. package/dist/commonjs/ContainerClient.js +1348 -1253
  116. package/dist/commonjs/ContainerClient.js.map +7 -1
  117. package/dist/commonjs/PageBlobRangeResponse.js +45 -31
  118. package/dist/commonjs/PageBlobRangeResponse.js.map +7 -1
  119. package/dist/commonjs/Pipeline.d.ts +2 -3
  120. package/dist/commonjs/Pipeline.d.ts.map +1 -1
  121. package/dist/commonjs/Pipeline.js +244 -244
  122. package/dist/commonjs/Pipeline.js.map +7 -1
  123. package/dist/commonjs/Range.js +35 -22
  124. package/dist/commonjs/Range.js.map +7 -1
  125. package/dist/commonjs/StorageClient.js +67 -54
  126. package/dist/commonjs/StorageClient.js.map +7 -1
  127. package/dist/commonjs/StorageContextClient.js +34 -19
  128. package/dist/commonjs/StorageContextClient.js.map +7 -1
  129. package/dist/commonjs/generated/src/index.js +32 -16
  130. package/dist/commonjs/generated/src/index.js.map +7 -1
  131. package/dist/commonjs/generated/src/models/index.d.ts +59 -4
  132. package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
  133. package/dist/commonjs/generated/src/models/index.js +164 -267
  134. package/dist/commonjs/generated/src/models/index.js.map +7 -1
  135. package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
  136. package/dist/commonjs/generated/src/models/mappers.js +8767 -8334
  137. package/dist/commonjs/generated/src/models/mappers.js.map +7 -1
  138. package/dist/commonjs/generated/src/models/parameters.d.ts +7 -0
  139. package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -1
  140. package/dist/commonjs/generated/src/models/parameters.js +2074 -1679
  141. package/dist/commonjs/generated/src/models/parameters.js.map +7 -1
  142. package/dist/commonjs/generated/src/operations/appendBlob.js +253 -214
  143. package/dist/commonjs/generated/src/operations/appendBlob.js.map +7 -1
  144. package/dist/commonjs/generated/src/operations/blob.js +1043 -961
  145. package/dist/commonjs/generated/src/operations/blob.js.map +7 -1
  146. package/dist/commonjs/generated/src/operations/blockBlob.js +406 -353
  147. package/dist/commonjs/generated/src/operations/blockBlob.js.map +7 -1
  148. package/dist/commonjs/generated/src/operations/container.js +735 -665
  149. package/dist/commonjs/generated/src/operations/container.js.map +7 -1
  150. package/dist/commonjs/generated/src/operations/index.js +31 -17
  151. package/dist/commonjs/generated/src/operations/index.js.map +7 -1
  152. package/dist/commonjs/generated/src/operations/pageBlob.js +491 -434
  153. package/dist/commonjs/generated/src/operations/pageBlob.js.map +7 -1
  154. package/dist/commonjs/generated/src/operations/service.js +352 -303
  155. package/dist/commonjs/generated/src/operations/service.js.map +7 -1
  156. package/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +15 -10
  157. package/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js.map +7 -1
  158. package/dist/commonjs/generated/src/operationsInterfaces/blob.js +15 -10
  159. package/dist/commonjs/generated/src/operationsInterfaces/blob.js.map +7 -1
  160. package/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +15 -10
  161. package/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js.map +7 -1
  162. package/dist/commonjs/generated/src/operationsInterfaces/container.js +15 -10
  163. package/dist/commonjs/generated/src/operationsInterfaces/container.js.map +7 -1
  164. package/dist/commonjs/generated/src/operationsInterfaces/index.js +31 -17
  165. package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +7 -1
  166. package/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +15 -10
  167. package/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js.map +7 -1
  168. package/dist/commonjs/generated/src/operationsInterfaces/service.js +15 -10
  169. package/dist/commonjs/generated/src/operationsInterfaces/service.js.map +7 -1
  170. package/dist/commonjs/generated/src/storageClient.js +81 -63
  171. package/dist/commonjs/generated/src/storageClient.js.map +7 -1
  172. package/dist/commonjs/generatedModels.d.ts +4 -4
  173. package/dist/commonjs/generatedModels.d.ts.map +1 -1
  174. package/dist/commonjs/generatedModels.js +30 -11
  175. package/dist/commonjs/generatedModels.js.map +7 -1
  176. package/dist/commonjs/index.d.ts +14 -14
  177. package/dist/commonjs/index.d.ts.map +1 -1
  178. package/dist/commonjs/index.js +106 -52
  179. package/dist/commonjs/index.js.map +7 -1
  180. package/dist/commonjs/internal-avro/AvroConstants.js +36 -10
  181. package/dist/commonjs/internal-avro/AvroConstants.js.map +7 -1
  182. package/dist/commonjs/internal-avro/AvroParser.js +307 -297
  183. package/dist/commonjs/internal-avro/AvroParser.js.map +7 -1
  184. package/dist/commonjs/internal-avro/AvroReadable.js +26 -7
  185. package/dist/commonjs/internal-avro/AvroReadable.js.map +7 -1
  186. package/dist/commonjs/internal-avro/AvroReadableFromBlob.js +69 -50
  187. package/dist/commonjs/internal-avro/AvroReadableFromBlob.js.map +7 -1
  188. package/dist/commonjs/internal-avro/AvroReadableFromStream.js +96 -84
  189. package/dist/commonjs/internal-avro/AvroReadableFromStream.js.map +7 -1
  190. package/dist/commonjs/internal-avro/AvroReader.js +118 -110
  191. package/dist/commonjs/internal-avro/AvroReader.js.map +7 -1
  192. package/dist/commonjs/internal-avro/index.d.ts +1 -1
  193. package/dist/commonjs/internal-avro/index.d.ts.map +1 -1
  194. package/dist/commonjs/internal-avro/index.js +33 -12
  195. package/dist/commonjs/internal-avro/index.js.map +7 -1
  196. package/dist/commonjs/internal-avro/utils/utils.common.js +33 -17
  197. package/dist/commonjs/internal-avro/utils/utils.common.js.map +7 -1
  198. package/dist/commonjs/log.js +28 -11
  199. package/dist/commonjs/log.js.map +7 -1
  200. package/dist/commonjs/models.d.ts +43 -0
  201. package/dist/commonjs/models.d.ts.map +1 -1
  202. package/dist/commonjs/models.js +74 -115
  203. package/dist/commonjs/models.js.map +7 -1
  204. package/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +116 -126
  205. package/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js.map +7 -1
  206. package/dist/commonjs/sas/AccountSASPermissions.js +233 -226
  207. package/dist/commonjs/sas/AccountSASPermissions.js.map +7 -1
  208. package/dist/commonjs/sas/AccountSASResourceTypes.js +80 -70
  209. package/dist/commonjs/sas/AccountSASResourceTypes.js.map +7 -1
  210. package/dist/commonjs/sas/AccountSASServices.js +88 -78
  211. package/dist/commonjs/sas/AccountSASServices.js.map +7 -1
  212. package/dist/commonjs/sas/AccountSASSignatureValues.js +119 -100
  213. package/dist/commonjs/sas/AccountSASSignatureValues.js.map +7 -1
  214. package/dist/commonjs/sas/BlobSASPermissions.js +204 -194
  215. package/dist/commonjs/sas/BlobSASPermissions.js.map +7 -1
  216. package/dist/commonjs/sas/BlobSASSignatureValues.d.ts +11 -1
  217. package/dist/commonjs/sas/BlobSASSignatureValues.d.ts.map +1 -1
  218. package/dist/commonjs/sas/BlobSASSignatureValues.js +822 -641
  219. package/dist/commonjs/sas/BlobSASSignatureValues.js.map +7 -1
  220. package/dist/commonjs/sas/ContainerSASPermissions.js +232 -220
  221. package/dist/commonjs/sas/ContainerSASPermissions.js.map +7 -1
  222. package/dist/commonjs/sas/SASQueryParameters.d.ts +23 -2
  223. package/dist/commonjs/sas/SASQueryParameters.d.ts.map +1 -1
  224. package/dist/commonjs/sas/SASQueryParameters.js +423 -361
  225. package/dist/commonjs/sas/SASQueryParameters.js.map +7 -1
  226. package/dist/commonjs/sas/SasIPRange.js +27 -14
  227. package/dist/commonjs/sas/SasIPRange.js.map +7 -1
  228. package/dist/commonjs/tsdoc-metadata.json +1 -1
  229. package/dist/commonjs/utils/Batch.js +134 -127
  230. package/dist/commonjs/utils/Batch.js.map +7 -1
  231. package/dist/commonjs/utils/BlobQuickQueryStream.js +129 -115
  232. package/dist/commonjs/utils/BlobQuickQueryStream.js.map +7 -1
  233. package/dist/commonjs/utils/Mutex.js +78 -64
  234. package/dist/commonjs/utils/Mutex.js.map +7 -1
  235. package/dist/commonjs/utils/RetriableReadableStream.d.ts.map +1 -1
  236. package/dist/commonjs/utils/RetriableReadableStream.js +128 -125
  237. package/dist/commonjs/utils/RetriableReadableStream.js.map +7 -1
  238. package/dist/commonjs/utils/SharedKeyComparator.js +437 -65
  239. package/dist/commonjs/utils/SharedKeyComparator.js.map +7 -1
  240. package/dist/commonjs/utils/constants.d.ts.map +1 -1
  241. package/dist/commonjs/utils/constants.js +290 -223
  242. package/dist/commonjs/utils/constants.js.map +7 -1
  243. package/dist/commonjs/utils/tracing.js +32 -16
  244. package/dist/commonjs/utils/tracing.js.map +7 -1
  245. package/dist/commonjs/utils/utils.common.d.ts +16 -1
  246. package/dist/commonjs/utils/utils.common.d.ts.map +1 -1
  247. package/dist/commonjs/utils/utils.common.js +566 -740
  248. package/dist/commonjs/utils/utils.common.js.map +7 -1
  249. package/dist/commonjs/utils/utils.js +131 -128
  250. package/dist/commonjs/utils/utils.js.map +7 -1
  251. package/dist/esm/BlobDownloadResponse.d.ts +2 -1
  252. package/dist/esm/BlobDownloadResponse.d.ts.map +1 -1
  253. package/dist/esm/BlobDownloadResponse.js +8 -1
  254. package/dist/esm/BlobDownloadResponse.js.map +1 -1
  255. package/dist/esm/BlobServiceClient.d.ts +36 -5
  256. package/dist/esm/BlobServiceClient.d.ts.map +1 -1
  257. package/dist/esm/BlobServiceClient.js +29 -17
  258. package/dist/esm/BlobServiceClient.js.map +1 -1
  259. package/dist/esm/Clients.d.ts +68 -14
  260. package/dist/esm/Clients.d.ts.map +1 -1
  261. package/dist/esm/Clients.js +97 -28
  262. package/dist/esm/Clients.js.map +1 -1
  263. package/dist/esm/ContainerClient.d.ts +6 -4
  264. package/dist/esm/ContainerClient.d.ts.map +1 -1
  265. package/dist/esm/ContainerClient.js +8 -6
  266. package/dist/esm/ContainerClient.js.map +1 -1
  267. package/dist/esm/Pipeline.d.ts +2 -3
  268. package/dist/esm/Pipeline.d.ts.map +1 -1
  269. package/dist/esm/Pipeline.js.map +1 -1
  270. package/dist/esm/generated/src/models/index.d.ts +59 -4
  271. package/dist/esm/generated/src/models/index.d.ts.map +1 -1
  272. package/dist/esm/generated/src/models/index.js +2 -2
  273. package/dist/esm/generated/src/models/index.js.map +1 -1
  274. package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
  275. package/dist/esm/generated/src/models/mappers.js +65 -0
  276. package/dist/esm/generated/src/models/mappers.js.map +1 -1
  277. package/dist/esm/generated/src/models/parameters.d.ts +7 -0
  278. package/dist/esm/generated/src/models/parameters.d.ts.map +1 -1
  279. package/dist/esm/generated/src/models/parameters.js +71 -1
  280. package/dist/esm/generated/src/models/parameters.js.map +1 -1
  281. package/dist/esm/generated/src/operations/appendBlob.js +5 -0
  282. package/dist/esm/generated/src/operations/appendBlob.js.map +1 -1
  283. package/dist/esm/generated/src/operations/blob.js +3 -0
  284. package/dist/esm/generated/src/operations/blob.js.map +1 -1
  285. package/dist/esm/generated/src/operations/blockBlob.js +10 -0
  286. package/dist/esm/generated/src/operations/blockBlob.js.map +1 -1
  287. package/dist/esm/generated/src/operations/pageBlob.js +5 -0
  288. package/dist/esm/generated/src/operations/pageBlob.js.map +1 -1
  289. package/dist/esm/generated/src/storageClient.js +2 -2
  290. package/dist/esm/generated/src/storageClient.js.map +1 -1
  291. package/dist/esm/generatedModels.d.ts +4 -4
  292. package/dist/esm/generatedModels.d.ts.map +1 -1
  293. package/dist/esm/generatedModels.js.map +1 -1
  294. package/dist/esm/index.d.ts +14 -14
  295. package/dist/esm/index.d.ts.map +1 -1
  296. package/dist/esm/index.js +0 -1
  297. package/dist/esm/index.js.map +1 -1
  298. package/dist/esm/internal-avro/index.d.ts +1 -1
  299. package/dist/esm/internal-avro/index.d.ts.map +1 -1
  300. package/dist/esm/internal-avro/index.js.map +1 -1
  301. package/dist/esm/models.d.ts +43 -0
  302. package/dist/esm/models.d.ts.map +1 -1
  303. package/dist/esm/models.js.map +1 -1
  304. package/dist/esm/sas/BlobSASSignatureValues.d.ts +11 -1
  305. package/dist/esm/sas/BlobSASSignatureValues.d.ts.map +1 -1
  306. package/dist/esm/sas/BlobSASSignatureValues.js +133 -2
  307. package/dist/esm/sas/BlobSASSignatureValues.js.map +1 -1
  308. package/dist/esm/sas/SASQueryParameters.d.ts +23 -2
  309. package/dist/esm/sas/SASQueryParameters.d.ts.map +1 -1
  310. package/dist/esm/sas/SASQueryParameters.js +34 -2
  311. package/dist/esm/sas/SASQueryParameters.js.map +1 -1
  312. package/dist/esm/utils/RetriableReadableStream.d.ts.map +1 -1
  313. package/dist/esm/utils/RetriableReadableStream.js +1 -0
  314. package/dist/esm/utils/RetriableReadableStream.js.map +1 -1
  315. package/dist/esm/utils/constants.d.ts.map +1 -1
  316. package/dist/esm/utils/constants.js +2 -2
  317. package/dist/esm/utils/constants.js.map +1 -1
  318. package/dist/esm/utils/utils.common.d.ts +16 -1
  319. package/dist/esm/utils/utils.common.d.ts.map +1 -1
  320. package/dist/esm/utils/utils.common.js +26 -0
  321. package/dist/esm/utils/utils.common.js.map +1 -1
  322. package/dist/react-native/BlobDownloadResponse.d.ts +5 -2
  323. package/dist/react-native/BlobDownloadResponse.d.ts.map +1 -0
  324. package/dist/react-native/BlobDownloadResponse.js +9 -5
  325. package/dist/react-native/BlobDownloadResponse.js.map +1 -0
  326. package/dist/react-native/BlobQueryResponse.d.ts +1 -1
  327. package/dist/react-native/BlobQueryResponse.d.ts.map +1 -0
  328. package/dist/react-native/BlobQueryResponse.js +1 -1
  329. package/dist/react-native/BlobQueryResponse.js.map +1 -0
  330. package/dist/react-native/BlobServiceClient.d.ts +36 -5
  331. package/dist/react-native/BlobServiceClient.d.ts.map +1 -1
  332. package/dist/react-native/BlobServiceClient.js +29 -17
  333. package/dist/react-native/BlobServiceClient.js.map +1 -1
  334. package/dist/react-native/Clients.d.ts +68 -14
  335. package/dist/react-native/Clients.d.ts.map +1 -1
  336. package/dist/react-native/Clients.js +97 -28
  337. package/dist/react-native/Clients.js.map +1 -1
  338. package/dist/react-native/ContainerClient.d.ts +6 -4
  339. package/dist/react-native/ContainerClient.d.ts.map +1 -1
  340. package/dist/react-native/ContainerClient.js +8 -6
  341. package/dist/react-native/ContainerClient.js.map +1 -1
  342. package/dist/react-native/Pipeline.d.ts +2 -3
  343. package/dist/react-native/Pipeline.d.ts.map +1 -1
  344. package/dist/react-native/Pipeline.js.map +1 -1
  345. package/dist/react-native/generated/src/models/index.d.ts +59 -4
  346. package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
  347. package/dist/react-native/generated/src/models/index.js +2 -2
  348. package/dist/react-native/generated/src/models/index.js.map +1 -1
  349. package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -1
  350. package/dist/react-native/generated/src/models/mappers.js +65 -0
  351. package/dist/react-native/generated/src/models/mappers.js.map +1 -1
  352. package/dist/react-native/generated/src/models/parameters.d.ts +7 -0
  353. package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -1
  354. package/dist/react-native/generated/src/models/parameters.js +71 -1
  355. package/dist/react-native/generated/src/models/parameters.js.map +1 -1
  356. package/dist/react-native/generated/src/operations/appendBlob.js +5 -0
  357. package/dist/react-native/generated/src/operations/appendBlob.js.map +1 -1
  358. package/dist/react-native/generated/src/operations/blob.js +3 -0
  359. package/dist/react-native/generated/src/operations/blob.js.map +1 -1
  360. package/dist/react-native/generated/src/operations/blockBlob.js +10 -0
  361. package/dist/react-native/generated/src/operations/blockBlob.js.map +1 -1
  362. package/dist/react-native/generated/src/operations/pageBlob.js +5 -0
  363. package/dist/react-native/generated/src/operations/pageBlob.js.map +1 -1
  364. package/dist/react-native/generated/src/storageClient.js +2 -2
  365. package/dist/react-native/generated/src/storageClient.js.map +1 -1
  366. package/dist/react-native/generatedModels.d.ts +4 -4
  367. package/dist/react-native/generatedModels.d.ts.map +1 -1
  368. package/dist/react-native/generatedModels.js.map +1 -1
  369. package/dist/react-native/index.d.ts +14 -14
  370. package/dist/react-native/index.d.ts.map +1 -1
  371. package/dist/react-native/index.js +0 -1
  372. package/dist/react-native/index.js.map +1 -1
  373. package/dist/react-native/internal-avro/index.d.ts +1 -1
  374. package/dist/react-native/internal-avro/index.d.ts.map +1 -1
  375. package/dist/react-native/internal-avro/index.js.map +1 -1
  376. package/dist/react-native/models.d.ts +43 -0
  377. package/dist/react-native/models.d.ts.map +1 -1
  378. package/dist/react-native/models.js.map +1 -1
  379. package/dist/react-native/sas/BlobSASSignatureValues.d.ts +11 -1
  380. package/dist/react-native/sas/BlobSASSignatureValues.d.ts.map +1 -1
  381. package/dist/react-native/sas/BlobSASSignatureValues.js +133 -2
  382. package/dist/react-native/sas/BlobSASSignatureValues.js.map +1 -1
  383. package/dist/react-native/sas/SASQueryParameters.d.ts +23 -2
  384. package/dist/react-native/sas/SASQueryParameters.d.ts.map +1 -1
  385. package/dist/react-native/sas/SASQueryParameters.js +34 -2
  386. package/dist/react-native/sas/SASQueryParameters.js.map +1 -1
  387. package/dist/react-native/utils/RetriableReadableStream.d.ts.map +1 -1
  388. package/dist/react-native/utils/RetriableReadableStream.js +1 -0
  389. package/dist/react-native/utils/RetriableReadableStream.js.map +1 -1
  390. package/dist/react-native/utils/constants.d.ts.map +1 -1
  391. package/dist/react-native/utils/constants.js +2 -2
  392. package/dist/react-native/utils/constants.js.map +1 -1
  393. package/dist/react-native/utils/utils.common.d.ts +16 -1
  394. package/dist/react-native/utils/utils.common.d.ts.map +1 -1
  395. package/dist/react-native/utils/utils.common.js +26 -0
  396. package/dist/react-native/utils/utils.common.js.map +1 -1
  397. package/dist/react-native/utils/utils.d.ts +12 -6
  398. package/dist/react-native/utils/utils.d.ts.map +1 -0
  399. package/dist/react-native/utils/utils.js +11 -11
  400. package/dist/react-native/utils/utils.js.map +1 -0
  401. package/package.json +3 -20
  402. package/dist/browser/BatchUtils-browser.d.mts.map +0 -1
  403. package/dist/browser/BatchUtils-browser.mjs.map +0 -1
  404. package/dist/browser/BlobDownloadResponse-browser.d.mts.map +0 -1
  405. package/dist/browser/BlobDownloadResponse-browser.mjs.map +0 -1
  406. package/dist/browser/BlobQueryResponse-browser.d.mts.map +0 -1
  407. package/dist/browser/BlobQueryResponse-browser.mjs.map +0 -1
  408. package/dist/browser/credentials/StorageSharedKeyCredential-react-native.d.mts +0 -3
  409. package/dist/browser/credentials/StorageSharedKeyCredential-react-native.d.mts.map +0 -1
  410. package/dist/browser/credentials/StorageSharedKeyCredential-react-native.mjs +0 -5
  411. package/dist/browser/credentials/StorageSharedKeyCredential-react-native.mjs.map +0 -1
  412. package/dist/browser/index-browser.d.mts.map +0 -1
  413. package/dist/browser/index-browser.mjs.map +0 -1
  414. package/dist/browser/internal-avro/index-browser.d.mts.map +0 -1
  415. package/dist/browser/internal-avro/index-browser.mjs.map +0 -1
  416. package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts +0 -17
  417. package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts.map +0 -1
  418. package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs +0 -18
  419. package/dist/browser/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs.map +0 -1
  420. package/dist/browser/utils/utils-browser.d.mts.map +0 -1
  421. package/dist/browser/utils/utils-browser.mjs.map +0 -1
  422. package/dist/esm/credentials/StorageSharedKeyCredential-react-native.d.mts +0 -3
  423. package/dist/esm/credentials/StorageSharedKeyCredential-react-native.d.mts.map +0 -1
  424. package/dist/esm/credentials/StorageSharedKeyCredential-react-native.mjs +0 -5
  425. package/dist/esm/credentials/StorageSharedKeyCredential-react-native.mjs.map +0 -1
  426. package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts +0 -17
  427. package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts.map +0 -1
  428. package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs +0 -18
  429. package/dist/esm/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs.map +0 -1
  430. package/dist/react-native/BlobDownloadResponse-react-native.d.mts.map +0 -1
  431. package/dist/react-native/BlobDownloadResponse-react-native.mjs.map +0 -1
  432. package/dist/react-native/BlobQueryResponse-react-native.d.mts.map +0 -1
  433. package/dist/react-native/BlobQueryResponse-react-native.mjs.map +0 -1
  434. package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.d.mts +0 -3
  435. package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.d.mts.map +0 -1
  436. package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.mjs +0 -5
  437. package/dist/react-native/credentials/StorageSharedKeyCredential-react-native.mjs.map +0 -1
  438. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts +0 -17
  439. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.d.mts.map +0 -1
  440. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs +0 -18
  441. package/dist/react-native/policies/StorageSharedKeyCredentialPolicyV2-react-native.mjs.map +0 -1
  442. package/dist/react-native/utils/utils-react-native.d.mts.map +0 -1
  443. package/dist/react-native/utils/utils-react-native.mjs.map +0 -1
@@ -1 +1,7 @@
1
- {"version":3,"file":"Pipeline.js","sourceRoot":"","sources":["../../src/Pipeline.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AA+HlC,wCAYC;AAmFD,kCAUC;AA8BD,oDAuFC;AAED,8DAmBC;AA3WD,8DAUiC;AAQjC,kEAImC;AACnC,oDAA6F;AAC7F,8CAAyD;AAEzD,gDAAqD;AACrD,qCAAkC;AAElC,0DAW+B;AAE/B,uDAK8B;AAK5B,mGATA,iCA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AC,WAAW,CAAC,IAAI,KAAK,wBAAwB,CAAC;AAC/D,CAAC;AAED,SAAS,uBAAuB,CAAC,OAA6B;IAC5D,OAAO,OAAO,CAAC,WAAW,CAAC,IAAI,KAAK,uBAAuB,CAAC;AAC9D,CAAC;AAED,SAAS,uBAAuB,CAAC,OAA6B;IAC5D,MAAM,aAAa,GAAG;QACpB,+BAA+B;QAC/B,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 \"@azure/storage-common\";\nimport {\n StorageRetryPolicyFactory,\n AnonymousCredential,\n StorageSharedKeyCredential,\n getCachedDefaultHttpClient,\n storageRequestFailureDetailsParserPolicy,\n storageBrowserPolicy,\n storageRetryPolicy,\n storageSharedKeyCredentialPolicy,\n StorageBrowserPolicyFactory,\n storageCorrectContentLengthPolicy,\n} from \"@azure/storage-common\";\n\nimport {\n StorageOAuthScopes,\n StorageBlobLoggingAllowedHeaderNames,\n StorageBlobLoggingAllowedQueryParameters,\n SDK_VERSION,\n} from \"./utils/constants.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
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/storage/storage-blob/src/Pipeline.ts"],
4
+ "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 RequestBodyType as HttpRequestBody,\n} from \"@azure/core-rest-pipeline\";\nimport {\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 \"@azure/storage-common\";\nimport {\n StorageRetryPolicyFactory,\n AnonymousCredential,\n StorageSharedKeyCredential,\n getCachedDefaultHttpClient,\n storageRequestFailureDetailsParserPolicy,\n storageBrowserPolicy,\n storageRetryPolicy,\n storageSharedKeyCredentialPolicy,\n StorageBrowserPolicyFactory,\n storageCorrectContentLengthPolicy,\n} from \"@azure/storage-common\";\n\nimport {\n StorageOAuthScopes,\n StorageBlobLoggingAllowedHeaderNames,\n StorageBlobLoggingAllowedQueryParameters,\n SDK_VERSION,\n} from \"./utils/constants.js\";\n\n// Export following interfaces and types for customers who want to implement their\n// own RequestPolicy or HTTPClient\nexport {\n StorageOAuthScopes,\n type IHttpClient,\n type HttpHeaders,\n type HttpRequestBody,\n type HttpOperationResponse,\n type WebResource,\n type RequestPolicyFactory,\n type RequestPolicy,\n type 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"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,8BAUO;AASP,gCAGO;AACP,yBAAwE;AACxE,sBAAuC;AAEvC,uBAAkC;AAClC,iBAAuB;AAEvB,4BAWO;AAEP,uBAKO;AAyEA,SAAS,eAAe,UAA6C;AAC1E,MAAI,CAAC,YAAY,OAAO,aAAa,UAAU;AAC7C,WAAO;AAAA,EACT;AAEA,QAAM,eAAe;AAErB,SACE,MAAM,QAAQ,aAAa,SAAS,KACpC,OAAO,aAAa,YAAY,YAChC,OAAO,aAAa,2BAA2B;AAEnD;AAUO,MAAM,SAAiC;AAAA;AAAA;AAAA;AAAA,EAI5B;AAAA;AAAA;AAAA;AAAA,EAIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQhB,YAAY,WAAmC,UAA2B,CAAC,GAAG;AAC5E,SAAK,YAAY;AACjB,SAAK,UAAU;AAAA,EACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,yBAA+C;AACpD,WAAO;AAAA,MACL,YAAY,KAAK,QAAQ;AAAA,MACzB,wBAAwB,KAAK;AAAA,IAC/B;AAAA,EACF;AACF;AAwCO,SAAS,YACd,YACA,kBAA0C,CAAC,GACjC;AACV,MAAI,CAAC,YA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MAAM;AAAA,QAC/B,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,EACF;AACA,QAAM,2BAAiD;AAAA,IACrD,IAAI,WAAiC,UAAwB;AAAA,IAE7D;AAAA,IACA,UAAU,WAA0C;AAClD,aAAO;AAAA,IACT;AAAA,EACF;AACA,QAAM,iBAAiB,QAAQ,OAAO,gBAAgB,wBAAwB;AAC9E,QAAM,aAAa,eAAe,YAAY;AAE9C,SAAO,cAAc,KAAK,CAAC,oBAAoB;AAC7C,WAAO,WAAW,WAAW,eAAe;AAAA,EAC9C,CAAC;AACH;",
6
+ "names": []
7
+ }
@@ -1,24 +1,37 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.rangeToString = rangeToString;
6
- /**
7
- * Generate a range string. For example:
8
- *
9
- * "bytes=255-" or "bytes=0-511"
10
- *
11
- * @param iRange -
12
- */
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var Range_exports = {};
19
+ __export(Range_exports, {
20
+ rangeToString: () => rangeToString
21
+ });
22
+ module.exports = __toCommonJS(Range_exports);
13
23
  function rangeToString(iRange) {
14
- if (iRange.offset < 0) {
15
- throw new RangeError(`Range.offset cannot be smaller than 0.`);
16
- }
17
- if (iRange.count && iRange.count <= 0) {
18
- throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`);
19
- }
20
- return iRange.count
21
- ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}`
22
- : `bytes=${iRange.offset}-`;
24
+ if (iRange.offset < 0) {
25
+ throw new RangeError(`Range.offset cannot be smaller than 0.`);
26
+ }
27
+ if (iRange.count && iRange.count <= 0) {
28
+ throw new RangeError(
29
+ `Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`
30
+ );
31
+ }
32
+ return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`;
23
33
  }
24
- //# sourceMappingURL=Range.js.map
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ rangeToString
37
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"Range.js","sourceRoot":"","sources":["../../src/Range.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAyBlC,sCAYC;AAnBD;;;;;;GAMG;AACH,SAAgB,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"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/storage/storage-blob/src/Range.ts"],
4
+ "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"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BO,SAAS,cAAc,QAAuB;AACnD,MAAI,OAAO,SAAS,GAAG;AACrB,UAAM,IAAI,WAAW,wCAAwC;AAAA,EAC/D;AACA,MAAI,OAAO,SAAS,OAAO,SAAS,GAAG;AACrC,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO,OAAO,QACV,SAAS,OAAO,MAAM,IAAI,OAAO,SAAS,OAAO,QAAQ,CAAC,KAC1D,SAAS,OAAO,MAAM;AAC5B;",
6
+ "names": []
7
+ }
@@ -1,56 +1,69 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.StorageClient = void 0;
6
- const StorageContextClient_js_1 = require("./StorageContextClient.js");
7
- const Pipeline_js_1 = require("./Pipeline.js");
8
- const utils_common_js_1 = require("./utils/utils.common.js");
9
- /**
10
- * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient}
11
- * and etc.
12
- */
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var StorageClient_exports = {};
19
+ __export(StorageClient_exports, {
20
+ StorageClient: () => StorageClient
21
+ });
22
+ module.exports = __toCommonJS(StorageClient_exports);
23
+ var import_StorageContextClient = require("./StorageContextClient.js");
24
+ var import_Pipeline = require("./Pipeline.js");
25
+ var import_utils_common = require("./utils/utils.common.js");
13
26
  class StorageClient {
14
- /**
15
- * Encoded URL string value.
16
- */
17
- url;
18
- accountName;
19
- /**
20
- * Request policy pipeline.
21
- *
22
- * @internal
23
- */
24
- pipeline;
25
- /**
26
- * 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.
27
- */
28
- credential;
29
- /**
30
- * StorageClient is a reference to protocol layer operations entry, which is
31
- * generated by AutoRest generator.
32
- */
33
- storageClientContext;
34
- /**
35
- */
36
- isHttps;
37
- /**
38
- * Creates an instance of StorageClient.
39
- * @param url - url to resource
40
- * @param pipeline - request policy pipeline.
41
- */
42
- constructor(url, pipeline) {
43
- // URL should be encoded and only once, protocol layer shouldn't encode URL again
44
- this.url = (0, utils_common_js_1.escapeURLPath)(url);
45
- this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url);
46
- this.pipeline = pipeline;
47
- this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline));
48
- this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https");
49
- this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline);
50
- // Override protocol layer's default content-type
51
- const storageClientContext = this.storageClientContext;
52
- storageClientContext.requestContentType = undefined;
53
- }
27
+ /**
28
+ * Encoded URL string value.
29
+ */
30
+ url;
31
+ accountName;
32
+ /**
33
+ * Request policy pipeline.
34
+ *
35
+ * @internal
36
+ */
37
+ pipeline;
38
+ /**
39
+ * 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.
40
+ */
41
+ credential;
42
+ /**
43
+ * StorageClient is a reference to protocol layer operations entry, which is
44
+ * generated by AutoRest generator.
45
+ */
46
+ storageClientContext;
47
+ /**
48
+ */
49
+ isHttps;
50
+ /**
51
+ * Creates an instance of StorageClient.
52
+ * @param url - url to resource
53
+ * @param pipeline - request policy pipeline.
54
+ */
55
+ constructor(url, pipeline) {
56
+ this.url = (0, import_utils_common.escapeURLPath)(url);
57
+ this.accountName = (0, import_utils_common.getAccountNameFromUrl)(url);
58
+ this.pipeline = pipeline;
59
+ this.storageClientContext = new import_StorageContextClient.StorageContextClient(this.url, (0, import_Pipeline.getCoreClientOptions)(pipeline));
60
+ this.isHttps = (0, import_utils_common.iEqual)((0, import_utils_common.getURLScheme)(this.url) || "", "https");
61
+ this.credential = (0, import_Pipeline.getCredentialFromPipeline)(pipeline);
62
+ const storageClientContext = this.storageClientContext;
63
+ storageClientContext.requestContentType = void 0;
64
+ }
54
65
  }
55
- exports.StorageClient = StorageClient;
56
- //# sourceMappingURL=StorageClient.js.map
66
+ // Annotate the CommonJS export names for ESM import in node:
67
+ 0 && (module.exports = {
68
+ StorageClient
69
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"StorageClient.js","sourceRoot":"","sources":["../../src/StorageClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,uEAAiE;AAEjE,+CAAgF;AAChF,6DAKiC;AAejC;;;GAGG;AACH,MAAsB,aAAa;IACjC;;OAEG;IACa,GAAG,CAAS;IACZ,WAAW,CAAS;IACpC;;;;OAIG;IACgB,QAAQ,CAAe;IAC1C;;OAEG;IACa,UAAU,CAAqE;IAC/F;;;OAGG;IACgB,oBAAoB,CAAuB;IAC9D;OACG;IACgB,OAAO,CAAU;IAEpC;;;;OAIG;IACH,YAAsB,GAAW,EAAE,QAAsB;QACvD,iFAAiF;QACjF,IAAI,CAAC,GAAG,GAAG,IAAA,+BAAa,EAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,IAAA,uCAAqB,EAAC,GAAG,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,oBAAoB,GAAG,IAAI,8CAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAA,kCAAoB,EAAC,QAAQ,CAAC,CAAC,CAAC;QAE/F,IAAI,CAAC,OAAO,GAAG,IAAA,wBAAM,EAAC,IAAA,8BAAY,EAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;QAE7D,IAAI,CAAC,UAAU,GAAG,IAAA,uCAAyB,EAAC,QAAQ,CAAC,CAAC;QAEtD,iDAAiD;QACjD,MAAM,oBAAoB,GAAG,IAAI,CAAC,oBAA2B,CAAC;QAC9D,oBAAoB,CAAC,kBAAkB,GAAG,SAAS,CAAC;IACtD,CAAC;CACF;AA7CD,sCA6CC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { StorageClient as StorageClientContext } from \"./generated/src/index.js\";\nimport { StorageContextClient } from \"./StorageContextClient.js\";\nimport type { PipelineLike } from \"./Pipeline.js\";\nimport { getCoreClientOptions, getCredentialFromPipeline } from \"./Pipeline.js\";\nimport {\n escapeURLPath,\n getURLScheme,\n iEqual,\n getAccountNameFromUrl,\n} from \"./utils/utils.common.js\";\nimport type { AnonymousCredential, StorageSharedKeyCredential } from \"@azure/storage-common\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { OperationTracingOptions } from \"@azure/core-tracing\";\n\n/**\n * An interface for options common to every remote operation.\n */\nexport interface CommonOptions {\n /**\n * Options to configure spans created when tracing is enabled.\n */\n tracingOptions?: OperationTracingOptions;\n}\n\n/**\n * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient}\n * and etc.\n */\nexport abstract class StorageClient {\n /**\n * Encoded URL string value.\n */\n public readonly url: string;\n public readonly accountName: string;\n /**\n * Request policy pipeline.\n *\n * @internal\n */\n protected readonly pipeline: PipelineLike;\n /**\n * 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 */\n public readonly credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n /**\n * StorageClient is a reference to protocol layer operations entry, which is\n * generated by AutoRest generator.\n */\n protected readonly storageClientContext: StorageClientContext;\n /**\n */\n protected readonly isHttps: boolean;\n\n /**\n * Creates an instance of StorageClient.\n * @param url - url to resource\n * @param pipeline - request policy pipeline.\n */\n protected constructor(url: string, pipeline: PipelineLike) {\n // URL should be encoded and only once, protocol layer shouldn't encode URL again\n this.url = escapeURLPath(url);\n this.accountName = getAccountNameFromUrl(url);\n this.pipeline = pipeline;\n this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline));\n\n this.isHttps = iEqual(getURLScheme(this.url) || \"\", \"https\");\n\n this.credential = getCredentialFromPipeline(pipeline);\n\n // Override protocol layer's default content-type\n const storageClientContext = this.storageClientContext as any;\n storageClientContext.requestContentType = undefined;\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/storage/storage-blob/src/StorageClient.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { StorageClient as StorageClientContext } from \"./generated/src/index.js\";\nimport { StorageContextClient } from \"./StorageContextClient.js\";\nimport type { PipelineLike } from \"./Pipeline.js\";\nimport { getCoreClientOptions, getCredentialFromPipeline } from \"./Pipeline.js\";\nimport {\n escapeURLPath,\n getURLScheme,\n iEqual,\n getAccountNameFromUrl,\n} from \"./utils/utils.common.js\";\nimport type { AnonymousCredential, StorageSharedKeyCredential } from \"@azure/storage-common\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { OperationTracingOptions } from \"@azure/core-tracing\";\n\n/**\n * An interface for options common to every remote operation.\n */\nexport interface CommonOptions {\n /**\n * Options to configure spans created when tracing is enabled.\n */\n tracingOptions?: OperationTracingOptions;\n}\n\n/**\n * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient}\n * and etc.\n */\nexport abstract class StorageClient {\n /**\n * Encoded URL string value.\n */\n public readonly url: string;\n public readonly accountName: string;\n /**\n * Request policy pipeline.\n *\n * @internal\n */\n protected readonly pipeline: PipelineLike;\n /**\n * 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 */\n public readonly credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n /**\n * StorageClient is a reference to protocol layer operations entry, which is\n * generated by AutoRest generator.\n */\n protected readonly storageClientContext: StorageClientContext;\n /**\n */\n protected readonly isHttps: boolean;\n\n /**\n * Creates an instance of StorageClient.\n * @param url - url to resource\n * @param pipeline - request policy pipeline.\n */\n protected constructor(url: string, pipeline: PipelineLike) {\n // URL should be encoded and only once, protocol layer shouldn't encode URL again\n this.url = escapeURLPath(url);\n this.accountName = getAccountNameFromUrl(url);\n this.pipeline = pipeline;\n this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline));\n\n this.isHttps = iEqual(getURLScheme(this.url) || \"\", \"https\");\n\n this.credential = getCredentialFromPipeline(pipeline);\n\n // Override protocol layer's default content-type\n const storageClientContext = this.storageClientContext as any;\n storageClientContext.requestContentType = undefined;\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kCAAqC;AAErC,sBAAgE;AAChE,0BAKO;AAmBA,MAAe,cAAc;AAAA;AAAA;AAAA;AAAA,EAIlB;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMG;AAAA;AAAA;AAAA;AAAA,EAIH;AAAA;AAAA;AAAA;AAAA;AAAA,EAKG;AAAA;AAAA;AAAA,EAGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOT,YAAY,KAAa,UAAwB;AAEzD,SAAK,UAAM,mCAAc,GAAG;AAC5B,SAAK,kBAAc,2CAAsB,GAAG;AAC5C,SAAK,WAAW;AAChB,SAAK,uBAAuB,IAAI,iDAAqB,KAAK,SAAK,sCAAqB,QAAQ,CAAC;AAE7F,SAAK,cAAU,gCAAO,kCAAa,KAAK,GAAG,KAAK,IAAI,OAAO;AAE3D,SAAK,iBAAa,2CAA0B,QAAQ;AAGpD,UAAM,uBAAuB,KAAK;AAClC,yBAAqB,qBAAqB;AAAA,EAC5C;AACF;",
6
+ "names": []
7
+ }
@@ -1,21 +1,36 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.StorageContextClient = void 0;
6
- const index_js_1 = require("./generated/src/index.js");
7
- /**
8
- * @internal
9
- */
10
- class StorageContextClient extends index_js_1.StorageClient {
11
- async sendOperationRequest(operationArguments, operationSpec) {
12
- const operationSpecToSend = { ...operationSpec };
13
- if (operationSpecToSend.path === "/{containerName}" ||
14
- operationSpecToSend.path === "/{containerName}/{blob}") {
15
- operationSpecToSend.path = "";
16
- }
17
- return super.sendOperationRequest(operationArguments, operationSpecToSend);
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var StorageContextClient_exports = {};
19
+ __export(StorageContextClient_exports, {
20
+ StorageContextClient: () => StorageContextClient
21
+ });
22
+ module.exports = __toCommonJS(StorageContextClient_exports);
23
+ var import_src = require("./generated/src/index.js");
24
+ class StorageContextClient extends import_src.StorageClient {
25
+ async sendOperationRequest(operationArguments, operationSpec) {
26
+ const operationSpecToSend = { ...operationSpec };
27
+ if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") {
28
+ operationSpecToSend.path = "";
18
29
  }
30
+ return super.sendOperationRequest(operationArguments, operationSpecToSend);
31
+ }
19
32
  }
20
- exports.StorageContextClient = StorageContextClient;
21
- //# sourceMappingURL=StorageContextClient.js.map
33
+ // Annotate the CommonJS export names for ESM import in node:
34
+ 0 && (module.exports = {
35
+ StorageContextClient
36
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"StorageContextClient.js","sourceRoot":"","sources":["../../src/StorageContextClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,uDAAyD;AAEzD;;GAEG;AACH,MAAa,oBAAqB,SAAQ,wBAAa;IACrD,KAAK,CAAC,oBAAoB,CACxB,kBAAsC,EACtC,aAA4B;QAE5B,MAAM,mBAAmB,GAAG,EAAE,GAAG,aAAa,EAAE,CAAC;QAEjD,IACE,mBAAmB,CAAC,IAAI,KAAK,kBAAkB;YAC/C,mBAAmB,CAAC,IAAI,KAAK,yBAAyB,EACtD,CAAC;YACD,mBAAmB,CAAC,IAAI,GAAG,EAAE,CAAC;QAChC,CAAC;QACD,OAAO,KAAK,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;IAC7E,CAAC;CACF;AAfD,oDAeC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationArguments, OperationSpec } from \"@azure/core-client\";\nimport { StorageClient } from \"./generated/src/index.js\";\n\n/**\n * @internal\n */\nexport class StorageContextClient extends StorageClient {\n async sendOperationRequest<T>(\n operationArguments: OperationArguments,\n operationSpec: OperationSpec,\n ): Promise<T> {\n const operationSpecToSend = { ...operationSpec };\n\n if (\n operationSpecToSend.path === \"/{containerName}\" ||\n operationSpecToSend.path === \"/{containerName}/{blob}\"\n ) {\n operationSpecToSend.path = \"\";\n }\n return super.sendOperationRequest(operationArguments, operationSpecToSend);\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/storage/storage-blob/src/StorageContextClient.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationArguments, OperationSpec } from \"@azure/core-client\";\nimport { StorageClient } from \"./generated/src/index.js\";\n\n/**\n * @internal\n */\nexport class StorageContextClient extends StorageClient {\n async sendOperationRequest<T>(\n operationArguments: OperationArguments,\n operationSpec: OperationSpec,\n ): Promise<T> {\n const operationSpecToSend = { ...operationSpec };\n\n if (\n operationSpecToSend.path === \"/{containerName}\" ||\n operationSpecToSend.path === \"/{containerName}/{blob}\"\n ) {\n operationSpecToSend.path = \"\";\n }\n return super.sendOperationRequest(operationArguments, operationSpecToSend);\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,iBAA8B;AAKvB,MAAM,6BAA6B,yBAAc;AAAA,EACtD,MAAM,qBACJ,oBACA,eACY;AACZ,UAAM,sBAAsB,EAAE,GAAG,cAAc;AAE/C,QACE,oBAAoB,SAAS,sBAC7B,oBAAoB,SAAS,2BAC7B;AACA,0BAAoB,OAAO;AAAA,IAC7B;AACA,WAAO,MAAM,qBAAqB,oBAAoB,mBAAmB;AAAA,EAC3E;AACF;",
6
+ "names": []
7
+ }
@@ -1,16 +1,32 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) Microsoft Corporation.
4
- * Licensed under the MIT License.
5
- *
6
- * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.StorageClient = void 0;
11
- const tslib_1 = require("tslib");
12
- tslib_1.__exportStar(require("./models/index.js"), exports);
13
- var storageClient_js_1 = require("./storageClient.js");
14
- Object.defineProperty(exports, "StorageClient", { enumerable: true, get: function () { return storageClient_js_1.StorageClient; } });
15
- tslib_1.__exportStar(require("./operationsInterfaces/index.js"), exports);
16
- //# sourceMappingURL=index.js.map
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var src_exports = {};
20
+ __export(src_exports, {
21
+ StorageClient: () => import_storageClient.StorageClient
22
+ });
23
+ module.exports = __toCommonJS(src_exports);
24
+ __reExport(src_exports, require("./models/index.js"), module.exports);
25
+ var import_storageClient = require("./storageClient.js");
26
+ __reExport(src_exports, require("./operationsInterfaces/index.js"), module.exports);
27
+ // Annotate the CommonJS export names for ESM import in node:
28
+ 0 && (module.exports = {
29
+ StorageClient,
30
+ ...require("./models/index.js"),
31
+ ...require("./operationsInterfaces/index.js")
32
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,4DAAkC;AAClC,uDAAmD;AAA1C,iHAAA,aAAa,OAAA;AACtB,0EAAgD","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./models/index.js\";\nexport { StorageClient } from \"./storageClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/storage/storage-blob/src/generated/src/index.ts"],
4
+ "sourcesContent": ["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./models/index.js\";\nexport { StorageClient } from \"./storageClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,wBAAc,8BARd;AASA,2BAA8B;AAC9B,wBAAc,4CAVd;",
6
+ "names": []
7
+ }