@typespec/ts-http-runtime 0.3.5 → 0.3.7

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/auth/credentials.js.map +1 -1
  2. package/dist/browser/auth/oauth2Flows.js.map +1 -1
  3. package/dist/browser/client/clientHelpers.js +1 -1
  4. package/dist/browser/client/clientHelpers.js.map +1 -1
  5. package/dist/browser/client/common.d.ts +3 -2
  6. package/dist/browser/client/common.js.map +1 -1
  7. package/dist/browser/client/getClient.js +1 -1
  8. package/dist/browser/client/getClient.js.map +1 -1
  9. package/dist/browser/client/multipart.js +1 -1
  10. package/dist/browser/client/multipart.js.map +1 -1
  11. package/dist/browser/client/restError.js +5 -4
  12. package/dist/browser/client/restError.js.map +1 -1
  13. package/dist/browser/client/sendRequest.js +13 -10
  14. package/dist/browser/client/sendRequest.js.map +1 -1
  15. package/dist/browser/constants.js +1 -1
  16. package/dist/browser/constants.js.map +1 -1
  17. package/dist/browser/createPipelineFromOptions.d.ts +1 -1
  18. package/dist/browser/createPipelineFromOptions.js +2 -21
  19. package/dist/browser/createPipelineFromOptions.js.map +1 -1
  20. package/dist/browser/{defaultHttpClient.d.ts → defaultHttpClient-browser.d.mts} +1 -1
  21. package/dist/browser/{defaultHttpClient.js → defaultHttpClient-browser.mjs} +1 -1
  22. package/dist/browser/defaultHttpClient-browser.mjs.map +1 -0
  23. package/dist/browser/encoding.d.ts +13 -0
  24. package/dist/browser/encoding.js +19 -0
  25. package/dist/browser/encoding.js.map +1 -0
  26. package/dist/{commonjs/util/checkEnvironment.d.ts → browser/env-browser.d.mts} +21 -1
  27. package/dist/{esm/util/checkEnvironment.js → browser/env-browser.mjs} +26 -12
  28. package/dist/browser/env-browser.mjs.map +1 -0
  29. package/dist/browser/formData-web.d.mts +9 -0
  30. package/dist/browser/formData-web.mjs +12 -0
  31. package/dist/browser/formData-web.mjs.map +1 -0
  32. package/dist/browser/httpHeaders.js +11 -1
  33. package/dist/browser/httpHeaders.js.map +1 -1
  34. package/dist/browser/index.d.ts +3 -14
  35. package/dist/browser/index.js +2 -2
  36. package/dist/browser/index.js.map +1 -1
  37. package/dist/browser/interfaces.d.ts +15 -14
  38. package/dist/browser/interfaces.js.map +1 -1
  39. package/dist/browser/logger/debug.js +3 -2
  40. package/dist/browser/logger/debug.js.map +1 -1
  41. package/dist/{react-native/logger/log.d.ts → browser/logger/log-web.d.mts} +1 -1
  42. package/dist/browser/logger/{log.js → log-web.mjs} +1 -1
  43. package/dist/browser/logger/log-web.mjs.map +1 -0
  44. package/dist/browser/logger/logger.js +2 -2
  45. package/dist/browser/logger/logger.js.map +1 -1
  46. package/dist/browser/pipelineRequest.js.map +1 -1
  47. package/dist/browser/policies/auth/basicAuthenticationPolicy.js +1 -1
  48. package/dist/browser/policies/auth/basicAuthenticationPolicy.js.map +1 -1
  49. package/dist/browser/policies/auth/checkInsecureConnection.js +3 -2
  50. package/dist/browser/policies/auth/checkInsecureConnection.js.map +1 -1
  51. package/dist/browser/policies/{decompressResponsePolicy.d.ts → decompressResponsePolicy-web.d.mts} +1 -1
  52. package/dist/browser/policies/{decompressResponsePolicy.js → decompressResponsePolicy-web.mjs} +1 -1
  53. package/dist/browser/policies/decompressResponsePolicy-web.mjs.map +1 -0
  54. package/dist/browser/policies/formDataPolicy.js +5 -12
  55. package/dist/browser/policies/formDataPolicy.js.map +1 -1
  56. package/dist/browser/policies/internal.d.ts +2 -2
  57. package/dist/browser/policies/internal.js +2 -2
  58. package/dist/browser/policies/internal.js.map +1 -1
  59. package/dist/browser/policies/logPolicy.js +1 -1
  60. package/dist/browser/policies/logPolicy.js.map +1 -1
  61. package/dist/browser/policies/multipartPolicy.js +6 -2
  62. package/dist/browser/policies/multipartPolicy.js.map +1 -1
  63. package/dist/browser/policies/platformPolicies-web.d.mts +10 -0
  64. package/dist/browser/policies/platformPolicies-web.mjs +12 -0
  65. package/dist/browser/policies/platformPolicies-web.mjs.map +1 -0
  66. package/dist/browser/policies/platformPolicies.d.ts +25 -0
  67. package/dist/browser/policies/platformPolicies.js +30 -0
  68. package/dist/browser/policies/platformPolicies.js.map +1 -0
  69. package/dist/browser/policies/proxyPolicy-web.d.mts +2 -0
  70. package/dist/{react-native/policies/proxyPolicy.js → browser/policies/proxyPolicy-web.mjs} +1 -1
  71. package/dist/browser/policies/proxyPolicy-web.mjs.map +1 -0
  72. package/dist/browser/restError.js +1 -1
  73. package/dist/browser/restError.js.map +1 -1
  74. package/dist/browser/types-browser.d.mts +19 -0
  75. package/dist/browser/types-browser.mjs +4 -0
  76. package/dist/browser/types-browser.mjs.map +1 -0
  77. package/dist/browser/util/bytesEncoding-web.d.mts +2 -0
  78. package/dist/{react-native/util/bytesEncoding.js → browser/util/bytesEncoding-web.mjs} +1 -1
  79. package/dist/browser/util/bytesEncoding-web.mjs.map +1 -0
  80. package/dist/browser/util/bytesEncoding.common.d.ts +4 -4
  81. package/dist/browser/util/bytesEncoding.common.js +3 -4
  82. package/dist/browser/util/bytesEncoding.common.js.map +1 -1
  83. package/dist/browser/util/concat-browser.d.mts +16 -0
  84. package/dist/browser/util/{concat.js → concat-browser.mjs} +4 -11
  85. package/dist/browser/util/concat-browser.mjs.map +1 -0
  86. package/dist/browser/util/inspect-web.d.mts +2 -0
  87. package/dist/{react-native/util/inspect.js → browser/util/inspect-web.mjs} +1 -1
  88. package/dist/browser/util/inspect-web.mjs.map +1 -0
  89. package/dist/browser/util/internal.d.ts +3 -3
  90. package/dist/browser/util/internal.js +3 -3
  91. package/dist/browser/util/internal.js.map +1 -1
  92. package/dist/browser/util/sha256-web.d.mts +2 -0
  93. package/dist/{react-native/util/sha256.js → browser/util/sha256-web.mjs} +1 -1
  94. package/dist/browser/util/sha256-web.mjs.map +1 -0
  95. package/dist/browser/util/sha256.common.js +1 -1
  96. package/dist/browser/util/sha256.common.js.map +1 -1
  97. package/dist/browser/util/typeGuards-browser.d.mts +14 -0
  98. package/dist/browser/util/typeGuards-browser.mjs +26 -0
  99. package/dist/browser/util/typeGuards-browser.mjs.map +1 -0
  100. package/dist/browser/util/typeGuards.d.ts +5 -4
  101. package/dist/browser/util/typeGuards.js +4 -10
  102. package/dist/browser/util/typeGuards.js.map +1 -1
  103. package/dist/browser/util/userAgent.d.ts +2 -0
  104. package/dist/browser/util/userAgent.js +2 -1
  105. package/dist/browser/util/userAgent.js.map +1 -1
  106. package/dist/browser/util/{userAgentPlatform.d.ts → userAgentPlatform-browser.d.mts} +1 -1
  107. package/dist/browser/util/{userAgentPlatform.js → userAgentPlatform-browser.mjs} +1 -1
  108. package/dist/browser/util/userAgentPlatform-browser.mjs.map +1 -0
  109. package/dist/browser/util/uuidUtils.js +1 -6
  110. package/dist/browser/util/uuidUtils.js.map +1 -1
  111. package/dist/commonjs/auth/credentials.js.map +2 -2
  112. package/dist/commonjs/auth/oauth2Flows.js.map +1 -1
  113. package/dist/commonjs/client/clientHelpers.js +2 -2
  114. package/dist/commonjs/client/clientHelpers.js.map +2 -2
  115. package/dist/commonjs/client/common.d.ts +3 -2
  116. package/dist/commonjs/client/common.js.map +1 -1
  117. package/dist/commonjs/client/getClient.js +3 -3
  118. package/dist/commonjs/client/getClient.js.map +2 -2
  119. package/dist/commonjs/client/multipart.js.map +1 -1
  120. package/dist/commonjs/client/restError.js +5 -4
  121. package/dist/commonjs/client/restError.js.map +2 -2
  122. package/dist/commonjs/client/sendRequest.js +26 -8
  123. package/dist/commonjs/client/sendRequest.js.map +2 -2
  124. package/dist/commonjs/constants.js +1 -1
  125. package/dist/commonjs/constants.js.map +1 -1
  126. package/dist/commonjs/createPipelineFromOptions.d.ts +1 -1
  127. package/dist/commonjs/createPipelineFromOptions.js +2 -19
  128. package/dist/commonjs/createPipelineFromOptions.js.map +2 -2
  129. package/dist/{browser/util/checkEnvironment.d.ts → commonjs/env.d.ts} +21 -1
  130. package/dist/commonjs/env.js +67 -0
  131. package/dist/commonjs/env.js.map +7 -0
  132. package/dist/commonjs/formData.d.ts +10 -0
  133. package/dist/commonjs/{logger/log.common.js → formData.js} +18 -19
  134. package/dist/commonjs/formData.js.map +7 -0
  135. package/dist/commonjs/httpHeaders.js +4 -1
  136. package/dist/commonjs/httpHeaders.js.map +2 -2
  137. package/dist/commonjs/index.d.ts +1 -12
  138. package/dist/commonjs/index.js +2 -2
  139. package/dist/commonjs/index.js.map +2 -2
  140. package/dist/commonjs/interfaces.d.ts +15 -14
  141. package/dist/commonjs/interfaces.js.map +1 -1
  142. package/dist/commonjs/logger/debug.js +2 -1
  143. package/dist/commonjs/logger/debug.js.map +2 -2
  144. package/dist/commonjs/logger/logger.js +2 -1
  145. package/dist/commonjs/logger/logger.js.map +2 -2
  146. package/dist/commonjs/nodeHttpClient.js +3 -1
  147. package/dist/commonjs/nodeHttpClient.js.map +2 -2
  148. package/dist/commonjs/pipelineRequest.js +2 -2
  149. package/dist/commonjs/pipelineRequest.js.map +2 -2
  150. package/dist/commonjs/policies/auth/basicAuthenticationPolicy.js.map +1 -1
  151. package/dist/commonjs/policies/auth/checkInsecureConnection.js +3 -2
  152. package/dist/commonjs/policies/auth/checkInsecureConnection.js.map +2 -2
  153. package/dist/commonjs/policies/formDataPolicy.js +4 -11
  154. package/dist/commonjs/policies/formDataPolicy.js.map +2 -2
  155. package/dist/commonjs/policies/internal.d.ts +1 -1
  156. package/dist/commonjs/policies/internal.js +7 -7
  157. package/dist/commonjs/policies/internal.js.map +2 -2
  158. package/dist/commonjs/policies/logPolicy.js +1 -1
  159. package/dist/commonjs/policies/logPolicy.js.map +2 -2
  160. package/dist/commonjs/policies/multipartPolicy.js +2 -2
  161. package/dist/commonjs/policies/multipartPolicy.js.map +2 -2
  162. package/dist/commonjs/policies/platformPolicies.d.ts +25 -0
  163. package/dist/commonjs/policies/platformPolicies.js +43 -0
  164. package/dist/commonjs/policies/platformPolicies.js.map +7 -0
  165. package/dist/commonjs/restError.js.map +1 -1
  166. package/dist/commonjs/tsdoc-metadata.json +1 -1
  167. package/dist/commonjs/types.d.ts +19 -0
  168. package/dist/commonjs/types.js +16 -0
  169. package/dist/commonjs/types.js.map +7 -0
  170. package/dist/commonjs/util/concat.d.ts +1 -1
  171. package/dist/commonjs/util/concat.js.map +2 -2
  172. package/dist/commonjs/util/internal.d.ts +1 -1
  173. package/dist/commonjs/util/internal.js +10 -10
  174. package/dist/commonjs/util/internal.js.map +2 -2
  175. package/dist/commonjs/util/typeGuards-node.d.ts +13 -0
  176. package/dist/commonjs/util/{inspect.common.js → typeGuards-node.js} +15 -7
  177. package/dist/commonjs/util/typeGuards-node.js.map +7 -0
  178. package/dist/commonjs/util/typeGuards.d.ts +5 -4
  179. package/dist/commonjs/util/typeGuards.js +6 -13
  180. package/dist/commonjs/util/typeGuards.js.map +2 -2
  181. package/dist/commonjs/util/userAgent.d.ts +2 -0
  182. package/dist/commonjs/util/userAgent.js +7 -5
  183. package/dist/commonjs/util/userAgent.js.map +2 -2
  184. package/dist/commonjs/util/uuidUtils.js +1 -1
  185. package/dist/commonjs/util/uuidUtils.js.map +2 -2
  186. package/dist/esm/auth/credentials.js.map +1 -1
  187. package/dist/esm/auth/oauth2Flows.js.map +1 -1
  188. package/dist/esm/client/clientHelpers.js.map +1 -1
  189. package/dist/esm/client/common.d.ts +3 -2
  190. package/dist/esm/client/common.js.map +1 -1
  191. package/dist/esm/client/getClient.js +1 -1
  192. package/dist/esm/client/getClient.js.map +1 -1
  193. package/dist/esm/client/multipart.js.map +1 -1
  194. package/dist/esm/client/restError.js +5 -4
  195. package/dist/esm/client/restError.js.map +1 -1
  196. package/dist/esm/client/sendRequest.js +13 -10
  197. package/dist/esm/client/sendRequest.js.map +1 -1
  198. package/dist/esm/constants.js +1 -1
  199. package/dist/esm/constants.js.map +1 -1
  200. package/dist/esm/createPipelineFromOptions.d.ts +1 -1
  201. package/dist/esm/createPipelineFromOptions.js +2 -21
  202. package/dist/esm/createPipelineFromOptions.js.map +1 -1
  203. package/dist/{react-native/util/checkEnvironment.d.ts → esm/env.d.ts} +21 -1
  204. package/dist/esm/env.js +48 -0
  205. package/dist/esm/env.js.map +1 -0
  206. package/dist/esm/formData.d.ts +10 -0
  207. package/dist/esm/formData.js +26 -0
  208. package/dist/esm/formData.js.map +1 -0
  209. package/dist/esm/httpHeaders.js +11 -1
  210. package/dist/esm/httpHeaders.js.map +1 -1
  211. package/dist/esm/index.d.ts +1 -12
  212. package/dist/esm/index.js.map +1 -1
  213. package/dist/esm/interfaces.d.ts +15 -14
  214. package/dist/esm/interfaces.js.map +1 -1
  215. package/dist/esm/logger/debug.js +2 -1
  216. package/dist/esm/logger/debug.js.map +1 -1
  217. package/dist/esm/logger/logger.js +2 -2
  218. package/dist/esm/logger/logger.js.map +1 -1
  219. package/dist/esm/nodeHttpClient.js +3 -1
  220. package/dist/esm/nodeHttpClient.js.map +1 -1
  221. package/dist/esm/pipelineRequest.js.map +1 -1
  222. package/dist/esm/policies/auth/basicAuthenticationPolicy.js.map +1 -1
  223. package/dist/esm/policies/auth/checkInsecureConnection.js +3 -2
  224. package/dist/esm/policies/auth/checkInsecureConnection.js.map +1 -1
  225. package/dist/esm/policies/formDataPolicy.js +4 -11
  226. package/dist/esm/policies/formDataPolicy.js.map +1 -1
  227. package/dist/esm/policies/internal.d.ts +1 -1
  228. package/dist/esm/policies/internal.js +1 -1
  229. package/dist/esm/policies/internal.js.map +1 -1
  230. package/dist/esm/policies/logPolicy.js +1 -1
  231. package/dist/esm/policies/logPolicy.js.map +1 -1
  232. package/dist/esm/policies/multipartPolicy.js +4 -0
  233. package/dist/esm/policies/multipartPolicy.js.map +1 -1
  234. package/dist/esm/policies/platformPolicies.d.ts +25 -0
  235. package/dist/esm/policies/platformPolicies.js +30 -0
  236. package/dist/esm/policies/platformPolicies.js.map +1 -0
  237. package/dist/esm/restError.js.map +1 -1
  238. package/dist/esm/types.d.ts +19 -0
  239. package/dist/esm/types.js +4 -0
  240. package/dist/esm/types.js.map +1 -0
  241. package/dist/esm/util/concat.d.ts +1 -1
  242. package/dist/esm/util/concat.js.map +1 -1
  243. package/dist/esm/util/internal.d.ts +1 -1
  244. package/dist/esm/util/internal.js +1 -1
  245. package/dist/esm/util/internal.js.map +1 -1
  246. package/dist/esm/util/typeGuards-node.d.ts +13 -0
  247. package/dist/esm/util/typeGuards-node.js +20 -0
  248. package/dist/esm/util/typeGuards-node.js.map +1 -0
  249. package/dist/esm/util/typeGuards.d.ts +5 -4
  250. package/dist/esm/util/typeGuards.js +4 -10
  251. package/dist/esm/util/typeGuards.js.map +1 -1
  252. package/dist/esm/util/userAgent.d.ts +2 -0
  253. package/dist/esm/util/userAgent.js +1 -0
  254. package/dist/esm/util/userAgent.js.map +1 -1
  255. package/dist/esm/util/uuidUtils.js +1 -1
  256. package/dist/esm/util/uuidUtils.js.map +1 -1
  257. package/dist/react-native/auth/credentials.js.map +1 -1
  258. package/dist/react-native/auth/oauth2Flows.js.map +1 -1
  259. package/dist/react-native/client/clientHelpers.js +1 -1
  260. package/dist/react-native/client/clientHelpers.js.map +1 -1
  261. package/dist/react-native/client/common.d.ts +3 -2
  262. package/dist/react-native/client/common.js.map +1 -1
  263. package/dist/react-native/client/getClient.js +1 -1
  264. package/dist/react-native/client/getClient.js.map +1 -1
  265. package/dist/react-native/client/multipart.js +1 -1
  266. package/dist/react-native/client/multipart.js.map +1 -1
  267. package/dist/react-native/client/restError.js +5 -4
  268. package/dist/react-native/client/restError.js.map +1 -1
  269. package/dist/react-native/client/sendRequest.js +13 -10
  270. package/dist/react-native/client/sendRequest.js.map +1 -1
  271. package/dist/react-native/constants.js +1 -1
  272. package/dist/react-native/constants.js.map +1 -1
  273. package/dist/react-native/createPipelineFromOptions.d.ts +1 -1
  274. package/dist/react-native/createPipelineFromOptions.js +2 -21
  275. package/dist/react-native/createPipelineFromOptions.js.map +1 -1
  276. package/dist/react-native/{defaultHttpClient.d.ts → defaultHttpClient-react-native.d.mts} +1 -1
  277. package/dist/react-native/{defaultHttpClient.js → defaultHttpClient-react-native.mjs} +1 -1
  278. package/dist/react-native/defaultHttpClient-react-native.mjs.map +1 -0
  279. package/dist/react-native/encoding-react-native.d.mts +21 -0
  280. package/dist/react-native/encoding-react-native.mjs +25 -0
  281. package/dist/react-native/encoding-react-native.mjs.map +1 -0
  282. package/dist/{esm/util/checkEnvironment.d.ts → react-native/env-react-native.d.mts} +21 -1
  283. package/dist/react-native/env-react-native.mjs +50 -0
  284. package/dist/react-native/env-react-native.mjs.map +1 -0
  285. package/dist/react-native/formData-web.d.mts +9 -0
  286. package/dist/react-native/formData-web.mjs +12 -0
  287. package/dist/react-native/formData-web.mjs.map +1 -0
  288. package/dist/react-native/httpHeaders.js +11 -1
  289. package/dist/react-native/httpHeaders.js.map +1 -1
  290. package/dist/react-native/index.d.ts +3 -14
  291. package/dist/react-native/index.js +2 -2
  292. package/dist/react-native/index.js.map +1 -1
  293. package/dist/react-native/interfaces.d.ts +15 -14
  294. package/dist/react-native/interfaces.js.map +1 -1
  295. package/dist/react-native/logger/debug.js +3 -2
  296. package/dist/react-native/logger/debug.js.map +1 -1
  297. package/dist/{browser/logger/log.d.ts → react-native/logger/log-web.d.mts} +1 -1
  298. package/dist/react-native/logger/{log.js → log-web.mjs} +1 -1
  299. package/dist/react-native/logger/log-web.mjs.map +1 -0
  300. package/dist/react-native/logger/logger.js +2 -2
  301. package/dist/react-native/logger/logger.js.map +1 -1
  302. package/dist/react-native/pipelineRequest.js +1 -1
  303. package/dist/react-native/pipelineRequest.js.map +1 -1
  304. package/dist/react-native/policies/auth/basicAuthenticationPolicy.js +1 -1
  305. package/dist/react-native/policies/auth/basicAuthenticationPolicy.js.map +1 -1
  306. package/dist/react-native/policies/auth/checkInsecureConnection.js +3 -2
  307. package/dist/react-native/policies/auth/checkInsecureConnection.js.map +1 -1
  308. package/dist/react-native/policies/decompressResponsePolicy-web.d.mts +8 -0
  309. package/dist/react-native/policies/decompressResponsePolicy-web.mjs +11 -0
  310. package/dist/react-native/policies/decompressResponsePolicy-web.mjs.map +1 -0
  311. package/dist/react-native/policies/formDataPolicy.js +5 -12
  312. package/dist/react-native/policies/formDataPolicy.js.map +1 -1
  313. package/dist/react-native/policies/internal.d.ts +2 -2
  314. package/dist/react-native/policies/internal.js +2 -2
  315. package/dist/react-native/policies/internal.js.map +1 -1
  316. package/dist/react-native/policies/logPolicy.js +1 -1
  317. package/dist/react-native/policies/logPolicy.js.map +1 -1
  318. package/dist/react-native/policies/multipartPolicy.js +7 -3
  319. package/dist/react-native/policies/multipartPolicy.js.map +1 -1
  320. package/dist/react-native/policies/platformPolicies-web.d.mts +10 -0
  321. package/dist/react-native/policies/platformPolicies-web.mjs +12 -0
  322. package/dist/react-native/policies/platformPolicies-web.mjs.map +1 -0
  323. package/dist/react-native/policies/platformPolicies.d.ts +25 -0
  324. package/dist/react-native/policies/platformPolicies.js +30 -0
  325. package/dist/react-native/policies/platformPolicies.js.map +1 -0
  326. package/dist/react-native/policies/proxyPolicy-web.d.mts +2 -0
  327. package/dist/{browser/policies/proxyPolicy.js → react-native/policies/proxyPolicy-web.mjs} +1 -1
  328. package/dist/react-native/policies/proxyPolicy-web.mjs.map +1 -0
  329. package/dist/react-native/restError.js +1 -1
  330. package/dist/react-native/restError.js.map +1 -1
  331. package/dist/react-native/types-react-native.d.mts +19 -0
  332. package/dist/react-native/types-react-native.mjs +4 -0
  333. package/dist/react-native/types-react-native.mjs.map +1 -0
  334. package/dist/react-native/util/bytesEncoding-web.d.mts +2 -0
  335. package/dist/{browser/util/bytesEncoding.js → react-native/util/bytesEncoding-web.mjs} +1 -1
  336. package/dist/react-native/util/bytesEncoding-web.mjs.map +1 -0
  337. package/dist/react-native/util/bytesEncoding.common.d.ts +4 -4
  338. package/dist/react-native/util/bytesEncoding.common.js +3 -4
  339. package/dist/react-native/util/bytesEncoding.common.js.map +1 -1
  340. package/dist/react-native/util/{concat.d.ts → concat-react-native.d.mts} +10 -3
  341. package/dist/react-native/util/{concat.js → concat-react-native.mjs} +2 -2
  342. package/dist/react-native/util/concat-react-native.mjs.map +1 -0
  343. package/dist/react-native/util/inspect-web.d.mts +2 -0
  344. package/dist/{browser/util/inspect.js → react-native/util/inspect-web.mjs} +1 -1
  345. package/dist/react-native/util/inspect-web.mjs.map +1 -0
  346. package/dist/react-native/util/internal.d.ts +4 -4
  347. package/dist/react-native/util/internal.js +4 -4
  348. package/dist/react-native/util/internal.js.map +1 -1
  349. package/dist/react-native/util/sha256-web.d.mts +2 -0
  350. package/dist/{browser/util/sha256.js → react-native/util/sha256-web.mjs} +1 -1
  351. package/dist/react-native/util/sha256-web.mjs.map +1 -0
  352. package/dist/react-native/util/sha256.common.js +1 -1
  353. package/dist/react-native/util/sha256.common.js.map +1 -1
  354. package/dist/react-native/util/typeGuards-react-native.d.mts +16 -0
  355. package/dist/react-native/util/typeGuards-react-native.mjs +34 -0
  356. package/dist/react-native/util/typeGuards-react-native.mjs.map +1 -0
  357. package/dist/react-native/util/typeGuards.d.ts +5 -4
  358. package/dist/react-native/util/typeGuards.js +4 -10
  359. package/dist/react-native/util/typeGuards.js.map +1 -1
  360. package/dist/react-native/util/userAgent.d.ts +2 -0
  361. package/dist/react-native/util/userAgent.js +2 -1
  362. package/dist/react-native/util/userAgent.js.map +1 -1
  363. package/dist/react-native/util/{userAgentPlatform.d.ts → userAgentPlatform-react-native.d.mts} +1 -1
  364. package/dist/react-native/util/{userAgentPlatform.js → userAgentPlatform-react-native.mjs} +1 -1
  365. package/dist/react-native/util/userAgentPlatform-react-native.mjs.map +1 -0
  366. package/dist/react-native/util/uuidUtils-react-native.d.mts +7 -0
  367. package/dist/react-native/util/{uuidUtils.common.js → uuidUtils-react-native.mjs} +8 -3
  368. package/dist/react-native/util/uuidUtils-react-native.mjs.map +1 -0
  369. package/package.json +96 -11
  370. package/dist/browser/defaultHttpClient.js.map +0 -1
  371. package/dist/browser/logger/log.js.map +0 -1
  372. package/dist/browser/nodeHttpClient.d.ts +0 -9
  373. package/dist/browser/nodeHttpClient.js +0 -347
  374. package/dist/browser/nodeHttpClient.js.map +0 -1
  375. package/dist/browser/policies/decompressResponsePolicy.js.map +0 -1
  376. package/dist/browser/policies/proxyPolicy.d.ts +0 -2
  377. package/dist/browser/policies/proxyPolicy.js.map +0 -1
  378. package/dist/browser/util/bytesEncoding.d.ts +0 -2
  379. package/dist/browser/util/bytesEncoding.js.map +0 -1
  380. package/dist/browser/util/checkEnvironment.js +0 -41
  381. package/dist/browser/util/checkEnvironment.js.map +0 -1
  382. package/dist/browser/util/concat.d.ts +0 -17
  383. package/dist/browser/util/concat.js.map +0 -1
  384. package/dist/browser/util/inspect.d.ts +0 -2
  385. package/dist/browser/util/inspect.js.map +0 -1
  386. package/dist/browser/util/sha256.d.ts +0 -2
  387. package/dist/browser/util/sha256.js.map +0 -1
  388. package/dist/browser/util/userAgentPlatform.js.map +0 -1
  389. package/dist/browser/util/uuidUtils.common.d.ts +0 -13
  390. package/dist/browser/util/uuidUtils.common.js +0 -40
  391. package/dist/browser/util/uuidUtils.common.js.map +0 -1
  392. package/dist/browser/xhrHttpClient.d.ts +0 -7
  393. package/dist/browser/xhrHttpClient.js +0 -174
  394. package/dist/browser/xhrHttpClient.js.map +0 -1
  395. package/dist/commonjs/fetchHttpClient.d.ts +0 -12
  396. package/dist/commonjs/fetchHttpClient.js +0 -238
  397. package/dist/commonjs/fetchHttpClient.js.map +0 -7
  398. package/dist/commonjs/logger/log.common.d.ts +0 -2
  399. package/dist/commonjs/logger/log.common.js.map +0 -7
  400. package/dist/commonjs/policies/proxyPolicy.common.d.ts +0 -19
  401. package/dist/commonjs/policies/proxyPolicy.common.js +0 -44
  402. package/dist/commonjs/policies/proxyPolicy.common.js.map +0 -7
  403. package/dist/commonjs/util/arrayBuffer.d.ts +0 -7
  404. package/dist/commonjs/util/arrayBuffer.js +0 -37
  405. package/dist/commonjs/util/arrayBuffer.js.map +0 -7
  406. package/dist/commonjs/util/bytesEncoding.common.d.ts +0 -61
  407. package/dist/commonjs/util/bytesEncoding.common.js +0 -106
  408. package/dist/commonjs/util/bytesEncoding.common.js.map +0 -7
  409. package/dist/commonjs/util/checkEnvironment.js +0 -46
  410. package/dist/commonjs/util/checkEnvironment.js.map +0 -7
  411. package/dist/commonjs/util/inspect.common.d.ts +0 -2
  412. package/dist/commonjs/util/inspect.common.js.map +0 -7
  413. package/dist/commonjs/util/sha256.common.d.ts +0 -14
  414. package/dist/commonjs/util/sha256.common.js +0 -70
  415. package/dist/commonjs/util/sha256.common.js.map +0 -7
  416. package/dist/commonjs/util/uuidUtils.common.d.ts +0 -13
  417. package/dist/commonjs/util/uuidUtils.common.js +0 -49
  418. package/dist/commonjs/util/uuidUtils.common.js.map +0 -7
  419. package/dist/commonjs/xhrHttpClient.d.ts +0 -7
  420. package/dist/commonjs/xhrHttpClient.js +0 -186
  421. package/dist/commonjs/xhrHttpClient.js.map +0 -7
  422. package/dist/esm/fetchHttpClient.d.ts +0 -12
  423. package/dist/esm/fetchHttpClient.js +0 -279
  424. package/dist/esm/fetchHttpClient.js.map +0 -1
  425. package/dist/esm/logger/log.common.d.ts +0 -2
  426. package/dist/esm/logger/log.common.js +0 -23
  427. package/dist/esm/logger/log.common.js.map +0 -1
  428. package/dist/esm/policies/proxyPolicy.common.d.ts +0 -19
  429. package/dist/esm/policies/proxyPolicy.common.js +0 -24
  430. package/dist/esm/policies/proxyPolicy.common.js.map +0 -1
  431. package/dist/esm/util/arrayBuffer.d.ts +0 -7
  432. package/dist/esm/util/arrayBuffer.js +0 -20
  433. package/dist/esm/util/arrayBuffer.js.map +0 -1
  434. package/dist/esm/util/bytesEncoding.common.d.ts +0 -61
  435. package/dist/esm/util/bytesEncoding.common.js +0 -110
  436. package/dist/esm/util/bytesEncoding.common.js.map +0 -1
  437. package/dist/esm/util/checkEnvironment.js.map +0 -1
  438. package/dist/esm/util/inspect.common.d.ts +0 -2
  439. package/dist/esm/util/inspect.common.js +0 -4
  440. package/dist/esm/util/inspect.common.js.map +0 -1
  441. package/dist/esm/util/sha256.common.d.ts +0 -14
  442. package/dist/esm/util/sha256.common.js +0 -49
  443. package/dist/esm/util/sha256.common.js.map +0 -1
  444. package/dist/esm/util/uuidUtils.common.d.ts +0 -13
  445. package/dist/esm/util/uuidUtils.common.js +0 -40
  446. package/dist/esm/util/uuidUtils.common.js.map +0 -1
  447. package/dist/esm/xhrHttpClient.d.ts +0 -7
  448. package/dist/esm/xhrHttpClient.js +0 -174
  449. package/dist/esm/xhrHttpClient.js.map +0 -1
  450. package/dist/react-native/defaultHttpClient.js.map +0 -1
  451. package/dist/react-native/fetchHttpClient.d.ts +0 -12
  452. package/dist/react-native/fetchHttpClient.js +0 -279
  453. package/dist/react-native/fetchHttpClient.js.map +0 -1
  454. package/dist/react-native/logger/log.js.map +0 -1
  455. package/dist/react-native/nodeHttpClient.d.ts +0 -9
  456. package/dist/react-native/nodeHttpClient.js +0 -347
  457. package/dist/react-native/nodeHttpClient.js.map +0 -1
  458. package/dist/react-native/policies/decompressResponsePolicy.d.ts +0 -11
  459. package/dist/react-native/policies/decompressResponsePolicy.js +0 -23
  460. package/dist/react-native/policies/decompressResponsePolicy.js.map +0 -1
  461. package/dist/react-native/policies/proxyPolicy.d.ts +0 -2
  462. package/dist/react-native/policies/proxyPolicy.js.map +0 -1
  463. package/dist/react-native/util/bytesEncoding.d.ts +0 -2
  464. package/dist/react-native/util/bytesEncoding.js.map +0 -1
  465. package/dist/react-native/util/checkEnvironment.js +0 -41
  466. package/dist/react-native/util/checkEnvironment.js.map +0 -1
  467. package/dist/react-native/util/concat.js.map +0 -1
  468. package/dist/react-native/util/inspect.d.ts +0 -2
  469. package/dist/react-native/util/inspect.js.map +0 -1
  470. package/dist/react-native/util/sha256.d.ts +0 -2
  471. package/dist/react-native/util/sha256.js.map +0 -1
  472. package/dist/react-native/util/userAgentPlatform.js.map +0 -1
  473. package/dist/react-native/util/uuidUtils.common.d.ts +0 -13
  474. package/dist/react-native/util/uuidUtils.common.js.map +0 -1
  475. package/dist/react-native/util/uuidUtils.d.ts +0 -2
  476. package/dist/react-native/util/uuidUtils.js +0 -4
  477. package/dist/react-native/util/uuidUtils.js.map +0 -1
@@ -1,5 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
+ import { decodeUtf8, encodeUtf8 } from "../encoding-react-native.mjs";
3
4
  /**
4
5
  * The helper that transforms bytes with specific character encoding into string
5
6
  * @param bytes - the uint8array bytes
@@ -55,9 +56,7 @@ export function uint8ArrayToBase64Url(bytes) {
55
56
  * @internal
56
57
  */
57
58
  export function uint8ArrayToUtf8String(bytes) {
58
- const decoder = new TextDecoder();
59
- const dataString = decoder.decode(bytes);
60
- return dataString;
59
+ return decodeUtf8(bytes);
61
60
  }
62
61
  /**
63
62
  * Decodes a Uint8Array into a hex string
@@ -71,7 +70,7 @@ export function uint8ArrayToHexString(bytes) {
71
70
  * @internal
72
71
  */
73
72
  export function utf8StringToUint8Array(value) {
74
- return new TextEncoder().encode(value);
73
+ return encodeUtf8(value);
75
74
  }
76
75
  /**
77
76
  * Encodes a Base64 string into a Uint8Array.
@@ -1 +1 @@
1
- {"version":3,"file":"bytesEncoding.common.js","sourceRoot":"","sources":["../../../src/util/bytesEncoding.common.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAWlC;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAiB,EAAE,MAAoB;IACxE,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,OAAO;YACV,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;QACvC,KAAK,QAAQ;YACX,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACnC,KAAK,WAAW;YACd,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;QACtC,KAAK,KAAK;YACR,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa,EAAE,MAAoB;IACpE,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,OAAO;YACV,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;QACvC,KAAK,QAAQ;YACX,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACnC,KAAK,WAAW;YACd,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;QACtC,KAAK,KAAK;YACR,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAiB;IAClD,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AACtE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAiB;IACrD,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC7F,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAiB;IACtD,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAClC,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAiB;IACrD,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAa;IAClD,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACzC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,OAAO,IAAI,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAa;IACjD,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACjE,OAAO,kBAAkB,CAAC,YAAY,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,wBAAwB,CAAC,CAAC;AAEpD;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAa;IACjD,sGAAsG;IACtG,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;QAC1C,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAChC,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YAC5D,oFAAoF;YACpF,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC3B,CAAC;QAED,KAAK,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,UAAU,GAAG,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\ndeclare global {\n // stub these out for the browser\n function btoa(input: string): string;\n function atob(input: string): string;\n}\n\n/** The supported character encoding type */\nexport type EncodingType = \"utf-8\" | \"base64\" | \"base64url\" | \"hex\";\n\n/**\n * The helper that transforms bytes with specific character encoding into string\n * @param bytes - the uint8array bytes\n * @param format - the format we use to encode the byte\n * @returns a string of the encoded string\n */\nexport function uint8ArrayToString(bytes: Uint8Array, format: EncodingType): string {\n switch (format) {\n case \"utf-8\":\n return uint8ArrayToUtf8String(bytes);\n case \"base64\":\n return uint8ArrayToBase64(bytes);\n case \"base64url\":\n return uint8ArrayToBase64Url(bytes);\n case \"hex\":\n return uint8ArrayToHexString(bytes);\n }\n}\n\n/**\n * The helper that transforms string to specific character encoded bytes array.\n * @param value - the string to be converted\n * @param format - the format we use to decode the value\n * @returns a uint8array\n */\nexport function stringToUint8Array(value: string, format: EncodingType): Uint8Array {\n switch (format) {\n case \"utf-8\":\n return utf8StringToUint8Array(value);\n case \"base64\":\n return base64ToUint8Array(value);\n case \"base64url\":\n return base64UrlToUint8Array(value);\n case \"hex\":\n return hexStringToUint8Array(value);\n }\n}\n\n/**\n * Decodes a Uint8Array into a Base64 string.\n * @internal\n */\nexport function uint8ArrayToBase64(bytes: Uint8Array): string {\n return btoa([...bytes].map((x) => String.fromCharCode(x)).join(\"\"));\n}\n\n/**\n * Decodes a Uint8Array into a Base64Url string.\n * @internal\n */\nexport function uint8ArrayToBase64Url(bytes: Uint8Array): string {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\n\n/**\n * Decodes a Uint8Array into a javascript string.\n * @internal\n */\nexport function uint8ArrayToUtf8String(bytes: Uint8Array): string {\n const decoder = new TextDecoder();\n const dataString = decoder.decode(bytes);\n return dataString;\n}\n\n/**\n * Decodes a Uint8Array into a hex string\n * @internal\n */\nexport function uint8ArrayToHexString(bytes: Uint8Array): string {\n return [...bytes].map((x) => x.toString(16).padStart(2, \"0\")).join(\"\");\n}\n\n/**\n * Encodes a JavaScript string into a Uint8Array.\n * @internal\n */\nexport function utf8StringToUint8Array(value: string): Uint8Array {\n return new TextEncoder().encode(value);\n}\n\n/**\n * Encodes a Base64 string into a Uint8Array.\n * @internal\n */\nexport function base64ToUint8Array(value: string): Uint8Array {\n return new Uint8Array([...atob(value)].map((x) => x.charCodeAt(0)));\n}\n\n/**\n * Encodes a Base64Url string into a Uint8Array.\n * @internal\n */\nexport function base64UrlToUint8Array(value: string): Uint8Array {\n const base64String = value.replace(/-/g, \"+\").replace(/_/g, \"/\");\n return base64ToUint8Array(base64String);\n}\n\nconst hexDigits = new Set(\"0123456789abcdefABCDEF\");\n\n/**\n * Encodes a hex string into a Uint8Array\n * @internal\n */\nexport function hexStringToUint8Array(value: string): Uint8Array {\n // If value has odd length, the last character will be ignored, consistent with NodeJS Buffer behavior\n const bytes = new Uint8Array(value.length / 2);\n for (let i = 0; i < value.length / 2; ++i) {\n const highNibble = value[2 * i];\n const lowNibble = value[2 * i + 1];\n if (!hexDigits.has(highNibble) || !hexDigits.has(lowNibble)) {\n // Replicate Node Buffer behavior by exiting early when we encounter an invalid byte\n return bytes.slice(0, i);\n }\n\n bytes[i] = parseInt(`${highNibble}${lowNibble}`, 16);\n }\n\n return bytes;\n}\n"]}
1
+ {"version":3,"file":"bytesEncoding.common.js","sourceRoot":"","sources":["../../../src/util/bytesEncoding.common.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { decodeUtf8, encodeUtf8 } from \"#platform/encoding\";\n\ndeclare global {\n // stub these out for the browser\n function btoa(input: string): string;\n function atob(input: string): string;\n}\n\n/** The supported character encoding type */\nexport type EncodingType = \"utf-8\" | \"base64\" | \"base64url\" | \"hex\";\n\n/**\n * The helper that transforms bytes with specific character encoding into string\n * @param bytes - the uint8array bytes\n * @param format - the format we use to encode the byte\n * @returns a string of the encoded string\n */\nexport function uint8ArrayToString(bytes: Uint8Array, format: EncodingType): string {\n switch (format) {\n case \"utf-8\":\n return uint8ArrayToUtf8String(bytes);\n case \"base64\":\n return uint8ArrayToBase64(bytes);\n case \"base64url\":\n return uint8ArrayToBase64Url(bytes);\n case \"hex\":\n return uint8ArrayToHexString(bytes);\n }\n}\n\n/**\n * The helper that transforms string to specific character encoded bytes array.\n * @param value - the string to be converted\n * @param format - the format we use to decode the value\n * @returns a uint8array\n */\nexport function stringToUint8Array(value: string, format: EncodingType): Uint8Array {\n switch (format) {\n case \"utf-8\":\n return utf8StringToUint8Array(value);\n case \"base64\":\n return base64ToUint8Array(value);\n case \"base64url\":\n return base64UrlToUint8Array(value);\n case \"hex\":\n return hexStringToUint8Array(value);\n }\n}\n\n/**\n * Decodes a Uint8Array into a Base64 string.\n * @internal\n */\nexport function uint8ArrayToBase64(bytes: Uint8Array): string {\n return btoa([...bytes].map((x) => String.fromCharCode(x)).join(\"\"));\n}\n\n/**\n * Decodes a Uint8Array into a Base64Url string.\n * @internal\n */\nexport function uint8ArrayToBase64Url(bytes: Uint8Array): string {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\n\n/**\n * Decodes a Uint8Array into a javascript string.\n * @internal\n */\nexport function uint8ArrayToUtf8String(bytes: Uint8Array): string {\n return decodeUtf8(bytes);\n}\n\n/**\n * Decodes a Uint8Array into a hex string\n * @internal\n */\nexport function uint8ArrayToHexString(bytes: Uint8Array): string {\n return [...bytes].map((x) => x.toString(16).padStart(2, \"0\")).join(\"\");\n}\n\n/**\n * Encodes a JavaScript string into a Uint8Array.\n * @internal\n */\nexport function utf8StringToUint8Array(value: string): Uint8Array<ArrayBuffer> {\n return encodeUtf8(value);\n}\n\n/**\n * Encodes a Base64 string into a Uint8Array.\n * @internal\n */\nexport function base64ToUint8Array(value: string): Uint8Array<ArrayBuffer> {\n return new Uint8Array([...atob(value)].map((x) => x.charCodeAt(0)));\n}\n\n/**\n * Encodes a Base64Url string into a Uint8Array.\n * @internal\n */\nexport function base64UrlToUint8Array(value: string): Uint8Array<ArrayBuffer> {\n const base64String = value.replace(/-/g, \"+\").replace(/_/g, \"/\");\n return base64ToUint8Array(base64String);\n}\n\nconst hexDigits = new Set(\"0123456789abcdefABCDEF\");\n\n/**\n * Encodes a hex string into a Uint8Array\n * @internal\n */\nexport function hexStringToUint8Array(value: string): Uint8Array<ArrayBuffer> {\n // If value has odd length, the last character will be ignored, consistent with NodeJS Buffer behavior\n const bytes = new Uint8Array(value.length / 2);\n for (let i = 0; i < value.length / 2; ++i) {\n const highNibble = value[2 * i];\n const lowNibble = value[2 * i + 1];\n if (!hexDigits.has(highNibble) || !hexDigits.has(lowNibble)) {\n // Replicate Node Buffer behavior by exiting early when we encounter an invalid byte\n return bytes.slice(0, i);\n }\n\n bytes[i] = parseInt(`${highNibble}${lowNibble}`, 16);\n }\n\n return bytes;\n}\n"]}
@@ -1,9 +1,16 @@
1
1
  /**
2
2
  * Accepted binary data types for concat
3
3
  *
4
+ * React Native doesn't natively provide ReadableStream or NodeJS.ReadableStream,
5
+ * but apps may polyfill them. The structural stream type lets callers pass polyfilled
6
+ * stream objects; they are handled at runtime via duck-typing (isWebReadableStream).
7
+ *
4
8
  * @internal
5
9
  */
6
- export type ConcatSource = ReadableStream<Uint8Array> | NodeJS.ReadableStream | Uint8Array | Blob;
10
+ export type ConcatSource = Uint8Array<ArrayBuffer> | Blob | {
11
+ getReader(): unknown;
12
+ tee(): unknown;
13
+ };
7
14
  /**
8
15
  * Utility function that concatenates a set of binary inputs into one combined output.
9
16
  *
@@ -31,5 +38,5 @@ export type ConcatSource = ReadableStream<Uint8Array> | NodeJS.ReadableStream |
31
38
  *
32
39
  * @internal
33
40
  */
34
- export declare function concat(sources: (ConcatSource | (() => ConcatSource))[]): Promise<(() => NodeJS.ReadableStream) | Blob>;
35
- //# sourceMappingURL=concat.d.ts.map
41
+ export declare function concat(sources: (ConcatSource | (() => ConcatSource))[]): Promise<Blob>;
42
+ //# sourceMappingURL=concat-react-native.d.mts.map
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { isWebReadableStream } from "./typeGuards.js";
3
+ import { isWebReadableStream } from "./typeGuards-react-native.mjs";
4
4
  /**
5
5
  * Utility function that concatenates a set of binary inputs into one combined output.
6
6
  *
@@ -48,4 +48,4 @@ export async function concat(sources) {
48
48
  // time and defers the check to the runtime.
49
49
  return new Blob(parts);
50
50
  }
51
- //# sourceMappingURL=concat.js.map
51
+ //# sourceMappingURL=concat-react-native.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concat-react-native.mjs","sourceRoot":"","sources":["../../../src/util/concat-react-native.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAc3D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,OAAgD;IAC3E,MAAM,KAAK,GAA0B,EAAE,CAAC;IACxC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,OAAO,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;QAClE,IAAI,QAAQ,YAAY,IAAI,IAAI,QAAQ,YAAY,UAAU,EAAE,CAAC;YAC/D,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvB,CAAC;aAAM,IAAI,mBAAmB,CAAC,QAAQ,CAAC,EAAE,CAAC;YACzC,qDAAqD;YACrD,KAAK,CAAC,IAAI,CAAC,MAAM,IAAI,QAAQ,CAAC,QAAiB,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3D,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,4BAA4B,OAAO,QAAQ,EAAE,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAED,qEAAqE;IACrE,uEAAuE;IACvE,4CAA4C;IAC5C,OAAO,IAAI,IAAI,CAAC,KAA0B,CAAC,CAAC;AAC9C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { isWebReadableStream } from \"#platform/typeGuards\";\n\n/**\n * Accepted binary data types for concat\n *\n * React Native doesn't natively provide ReadableStream or NodeJS.ReadableStream,\n * but apps may polyfill them. The structural stream type lets callers pass polyfilled\n * stream objects; they are handled at runtime via duck-typing (isWebReadableStream).\n *\n * @internal\n */\nexport type ConcatSource =\n Uint8Array<ArrayBuffer> | Blob | { getReader(): unknown; tee(): unknown };\n\n/**\n * Utility function that concatenates a set of binary inputs into one combined output.\n *\n * React Native runs on the Hermes engine, which implements a subset of web\n * APIs with narrower type contracts than full browsers:\n *\n * - **Blob**: natively supported, but its constructor only accepts\n * `(Blob | string)[]` — NOT the full `BlobPart[]` union. Passing a\n * `Uint8Array` to `new Blob([uint8])` throws at runtime.\n * See https://github.com/facebook/react-native/issues/44125\n *\n * - **Uint8Array**: works as a data type, but cannot be passed to the Blob\n * constructor without a polyfill (e.g. react-native-blob-jsi-helper).\n * See https://github.com/facebook/react-native/issues/41079\n *\n * - **ReadableStream / Response**: not available by default. Apps can polyfill\n * these (e.g. web-streams-polyfill + react-native-fetch-api).\n *\n * This implementation handles all source types and defers to the runtime,\n * so apps with the appropriate polyfills get correct behavior while apps\n * without them get the engine's native error.\n *\n * @param sources - array of sources for the concatenation\n * @returns a `Blob` representing all the concatenated inputs.\n *\n * @internal\n */\nexport async function concat(sources: (ConcatSource | (() => ConcatSource))[]): Promise<Blob> {\n const parts: (Blob | Uint8Array)[] = [];\n for (const source of sources) {\n const resolved = typeof source === \"function\" ? source() : source;\n if (resolved instanceof Blob || resolved instanceof Uint8Array) {\n parts.push(resolved);\n } else if (isWebReadableStream(resolved)) {\n // Requires ReadableStream + Response polyfills in RN\n parts.push(await new Response(resolved as never).blob());\n } else {\n throw new Error(`Unsupported source type: ${typeof resolved}`);\n }\n }\n\n // Hermes's Blob constructor natively accepts only (Blob | string)[].\n // Uint8Array requires a polyfill — the cast lets it through at compile\n // time and defers the check to the runtime.\n return new Blob(parts as (Blob | string)[]);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export * from "./inspect.common.js";
2
+ //# sourceMappingURL=inspect-web.d.mts.map
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  export * from "./inspect.common.js";
4
- //# sourceMappingURL=inspect.js.map
4
+ //# sourceMappingURL=inspect-web.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspect-web.mjs","sourceRoot":"","sources":["../../../src/util/inspect-web.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./inspect.common.js\";\n"]}
@@ -2,9 +2,9 @@ export { calculateRetryDelay } from "./delay.js";
2
2
  export { getRandomIntegerInclusive } from "./random.js";
3
3
  export { isObject, type UnknownObject } from "./object.js";
4
4
  export { isError } from "./error.js";
5
- export { computeSha256Hash, computeSha256Hmac } from "./sha256.js";
6
- export { randomUUID } from "./uuidUtils.js";
7
- export { isBrowser, isBun, isNodeLike, isNodeRuntime, isDeno, isReactNative, isWebWorker, } from "./checkEnvironment.js";
8
- export { stringToUint8Array, uint8ArrayToString, type EncodingType } from "./bytesEncoding.js";
5
+ export { computeSha256Hash, computeSha256Hmac } from "./sha256-web.mjs";
6
+ export { randomUUID } from "./uuidUtils-react-native.mjs";
7
+ export { isBrowser, isBun, isNodeLike, isNodeRuntime, isDeno, isReactNative, isWebWorker, } from "../env-react-native.mjs";
8
+ export { stringToUint8Array, uint8ArrayToString, type EncodingType } from "./bytesEncoding-web.mjs";
9
9
  export { Sanitizer, type SanitizerOptions } from "./sanitizer.js";
10
10
  //# sourceMappingURL=internal.d.ts.map
@@ -4,9 +4,9 @@ export { calculateRetryDelay } from "./delay.js";
4
4
  export { getRandomIntegerInclusive } from "./random.js";
5
5
  export { isObject } from "./object.js";
6
6
  export { isError } from "./error.js";
7
- export { computeSha256Hash, computeSha256Hmac } from "./sha256.js";
8
- export { randomUUID } from "./uuidUtils.js";
9
- export { isBrowser, isBun, isNodeLike, isNodeRuntime, isDeno, isReactNative, isWebWorker, } from "./checkEnvironment.js";
10
- export { stringToUint8Array, uint8ArrayToString } from "./bytesEncoding.js";
7
+ export { computeSha256Hash, computeSha256Hmac } from "./sha256-web.mjs";
8
+ export { randomUUID } from "./uuidUtils-react-native.mjs";
9
+ export { isBrowser, isBun, isNodeLike, isNodeRuntime, isDeno, isReactNative, isWebWorker, } from "../env-react-native.mjs";
10
+ export { stringToUint8Array, uint8ArrayToString } from "./bytesEncoding-web.mjs";
11
11
  export { Sanitizer } from "./sanitizer.js";
12
12
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/util/internal.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAsB,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,SAAS,EACT,KAAK,EACL,UAAU,EACV,aAAa,EACb,MAAM,EACN,aAAa,EACb,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAqB,MAAM,oBAAoB,CAAC;AAC/F,OAAO,EAAE,SAAS,EAAyB,MAAM,gBAAgB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { calculateRetryDelay } from \"./delay.js\";\nexport { getRandomIntegerInclusive } from \"./random.js\";\nexport { isObject, type UnknownObject } from \"./object.js\";\nexport { isError } from \"./error.js\";\nexport { computeSha256Hash, computeSha256Hmac } from \"./sha256.js\";\nexport { randomUUID } from \"./uuidUtils.js\";\nexport {\n isBrowser,\n isBun,\n isNodeLike,\n isNodeRuntime,\n isDeno,\n isReactNative,\n isWebWorker,\n} from \"./checkEnvironment.js\";\nexport { stringToUint8Array, uint8ArrayToString, type EncodingType } from \"./bytesEncoding.js\";\nexport { Sanitizer, type SanitizerOptions } from \"./sanitizer.js\";\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/util/internal.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAsB,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,SAAS,EACT,KAAK,EACL,UAAU,EACV,aAAa,EACb,MAAM,EACN,aAAa,EACb,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAqB,MAAM,yBAAyB,CAAC;AACpG,OAAO,EAAE,SAAS,EAAyB,MAAM,gBAAgB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { calculateRetryDelay } from \"./delay.js\";\nexport { getRandomIntegerInclusive } from \"./random.js\";\nexport { isObject, type UnknownObject } from \"./object.js\";\nexport { isError } from \"./error.js\";\nexport { computeSha256Hash, computeSha256Hmac } from \"#platform/sha256\";\nexport { randomUUID } from \"#platform/uuid\";\nexport {\n isBrowser,\n isBun,\n isNodeLike,\n isNodeRuntime,\n isDeno,\n isReactNative,\n isWebWorker,\n} from \"#platform/env\";\nexport { stringToUint8Array, uint8ArrayToString, type EncodingType } from \"#platform/bytesEncoding\";\nexport { Sanitizer, type SanitizerOptions } from \"./sanitizer.js\";\n"]}
@@ -0,0 +1,2 @@
1
+ export * from "./sha256.common.js";
2
+ //# sourceMappingURL=sha256-web.d.mts.map
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  export * from "./sha256.common.js";
4
- //# sourceMappingURL=sha256.js.map
4
+ //# sourceMappingURL=sha256-web.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sha256-web.mjs","sourceRoot":"","sources":["../../../src/util/sha256-web.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./sha256.common.js\";\n"]}
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { stringToUint8Array, uint8ArrayToString } from "./bytesEncoding.js";
3
+ import { stringToUint8Array, uint8ArrayToString } from "./bytesEncoding.common.js";
4
4
  let subtleCrypto;
5
5
  /**
6
6
  * Returns a cached reference to the Web API crypto.subtle object.
@@ -1 +1 @@
1
- {"version":3,"file":"sha256.common.js","sourceRoot":"","sources":["../../../src/util/sha256.common.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AA6C5E,IAAI,YAAsC,CAAC;AAE3C;;;GAGG;AACH,SAAS,SAAS;IAChB,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;IACvF,CAAC;IAED,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAClC,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,GAAW,EACX,YAAoB,EACpB,QAA0B;IAE1B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,QAAQ,GAAG,kBAAkB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IACnD,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAEpE,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,SAAS,CACtC,KAAK,EACL,QAAQ,EACR;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC1B,EACD,KAAK,EACL,CAAC,MAAM,CAAC,CACT,CAAC;IACF,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,IAAI,CACjC;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC1B,EACD,SAAS,EACT,iBAAiB,CAClB,CAAC;IAEF,OAAO,kBAAkB,CAAC,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC;AACjE,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAe,EACf,QAA0B;IAE1B,MAAM,YAAY,GAAG,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1D,MAAM,MAAM,GAAG,MAAM,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,YAAY,CAAC,CAAC;IAE3E,OAAO,kBAAkB,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC;AAC9D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { stringToUint8Array, uint8ArrayToString } from \"./bytesEncoding.js\";\n\n// stubs for browser self.crypto\ninterface JsonWebKey {}\ninterface CryptoKey {}\ntype KeyUsage =\n | \"decrypt\"\n | \"deriveBits\"\n | \"deriveKey\"\n | \"encrypt\"\n | \"sign\"\n | \"unwrapKey\"\n | \"verify\"\n | \"wrapKey\";\ninterface Algorithm {\n name: string;\n}\ninterface SubtleCrypto {\n importKey(\n format: string,\n keyData: JsonWebKey,\n algorithm: HmacImportParams,\n extractable: boolean,\n usage: KeyUsage[],\n ): Promise<CryptoKey>;\n sign(\n algorithm: HmacImportParams,\n key: CryptoKey,\n data: ArrayBufferView | ArrayBuffer,\n ): Promise<ArrayBuffer>;\n digest(algorithm: Algorithm, data: ArrayBufferView | ArrayBuffer): Promise<ArrayBuffer>;\n}\ninterface Crypto {\n readonly subtle: SubtleCrypto;\n getRandomValues<T extends ArrayBufferView | null>(array: T): T;\n}\ndeclare const self: {\n crypto: Crypto;\n};\ninterface HmacImportParams {\n name: string;\n hash: Algorithm;\n length?: number;\n}\n\nlet subtleCrypto: SubtleCrypto | undefined;\n\n/**\n * Returns a cached reference to the Web API crypto.subtle object.\n * @internal\n */\nfunction getCrypto(): SubtleCrypto {\n if (subtleCrypto) {\n return subtleCrypto;\n }\n\n if (!self.crypto || !self.crypto.subtle) {\n throw new Error(\"Your browser environment does not support cryptography functions.\");\n }\n\n subtleCrypto = self.crypto.subtle;\n return subtleCrypto;\n}\n\n/**\n * Generates a SHA-256 HMAC signature.\n * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash.\n * @param stringToSign - The data to be signed.\n * @param encoding - The textual encoding to use for the returned HMAC digest.\n */\nexport async function computeSha256Hmac(\n key: string,\n stringToSign: string,\n encoding: \"base64\" | \"hex\",\n): Promise<string> {\n const crypto = getCrypto();\n const keyBytes = stringToUint8Array(key, \"base64\");\n const stringToSignBytes = stringToUint8Array(stringToSign, \"utf-8\");\n\n const cryptoKey = await crypto.importKey(\n \"raw\",\n keyBytes,\n {\n name: \"HMAC\",\n hash: { name: \"SHA-256\" },\n },\n false,\n [\"sign\"],\n );\n const signature = await crypto.sign(\n {\n name: \"HMAC\",\n hash: { name: \"SHA-256\" },\n },\n cryptoKey,\n stringToSignBytes,\n );\n\n return uint8ArrayToString(new Uint8Array(signature), encoding);\n}\n\n/**\n * Generates a SHA-256 hash.\n * @param content - The data to be included in the hash.\n * @param encoding - The textual encoding to use for the returned hash.\n */\nexport async function computeSha256Hash(\n content: string,\n encoding: \"base64\" | \"hex\",\n): Promise<string> {\n const contentBytes = stringToUint8Array(content, \"utf-8\");\n const digest = await getCrypto().digest({ name: \"SHA-256\" }, contentBytes);\n\n return uint8ArrayToString(new Uint8Array(digest), encoding);\n}\n"]}
1
+ {"version":3,"file":"sha256.common.js","sourceRoot":"","sources":["../../../src/util/sha256.common.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAsCnF,IAAI,YAAsC,CAAC;AAE3C;;;GAGG;AACH,SAAS,SAAS;IAChB,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;IACvF,CAAC;IAED,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAClC,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,GAAW,EACX,YAAoB,EACpB,QAA0B;IAE1B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,QAAQ,GAAG,kBAAkB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IACnD,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAEpE,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,SAAS,CACtC,KAAK,EACL,QAAQ,EACR;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC1B,EACD,KAAK,EACL,CAAC,MAAM,CAAC,CACT,CAAC;IACF,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,IAAI,CACjC;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC1B,EACD,SAAS,EACT,iBAAiB,CAClB,CAAC;IAEF,OAAO,kBAAkB,CAAC,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC;AACjE,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAe,EACf,QAA0B;IAE1B,MAAM,YAAY,GAAG,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1D,MAAM,MAAM,GAAG,MAAM,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,YAAY,CAAC,CAAC;IAE3E,OAAO,kBAAkB,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC;AAC9D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { stringToUint8Array, uint8ArrayToString } from \"./bytesEncoding.common.js\";\n\n// stubs for browser self.crypto\ninterface JsonWebKey {}\ninterface CryptoKey {}\ntype KeyUsage =\n \"decrypt\" | \"deriveBits\" | \"deriveKey\" | \"encrypt\" | \"sign\" | \"unwrapKey\" | \"verify\" | \"wrapKey\";\ninterface Algorithm {\n name: string;\n}\ninterface SubtleCrypto {\n importKey(\n format: string,\n keyData: JsonWebKey,\n algorithm: HmacImportParams,\n extractable: boolean,\n usage: KeyUsage[],\n ): Promise<CryptoKey>;\n sign(\n algorithm: HmacImportParams,\n key: CryptoKey,\n data: ArrayBufferView | ArrayBuffer,\n ): Promise<ArrayBuffer>;\n digest(algorithm: Algorithm, data: ArrayBufferView | ArrayBuffer): Promise<ArrayBuffer>;\n}\ninterface Crypto {\n readonly subtle: SubtleCrypto;\n getRandomValues<T extends ArrayBufferView | null>(array: T): T;\n}\ndeclare const self: {\n crypto: Crypto;\n};\ninterface HmacImportParams {\n name: string;\n hash: Algorithm;\n length?: number;\n}\n\nlet subtleCrypto: SubtleCrypto | undefined;\n\n/**\n * Returns a cached reference to the Web API crypto.subtle object.\n * @internal\n */\nfunction getCrypto(): SubtleCrypto {\n if (subtleCrypto) {\n return subtleCrypto;\n }\n\n if (!self.crypto || !self.crypto.subtle) {\n throw new Error(\"Your browser environment does not support cryptography functions.\");\n }\n\n subtleCrypto = self.crypto.subtle;\n return subtleCrypto;\n}\n\n/**\n * Generates a SHA-256 HMAC signature.\n * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash.\n * @param stringToSign - The data to be signed.\n * @param encoding - The textual encoding to use for the returned HMAC digest.\n */\nexport async function computeSha256Hmac(\n key: string,\n stringToSign: string,\n encoding: \"base64\" | \"hex\",\n): Promise<string> {\n const crypto = getCrypto();\n const keyBytes = stringToUint8Array(key, \"base64\");\n const stringToSignBytes = stringToUint8Array(stringToSign, \"utf-8\");\n\n const cryptoKey = await crypto.importKey(\n \"raw\",\n keyBytes,\n {\n name: \"HMAC\",\n hash: { name: \"SHA-256\" },\n },\n false,\n [\"sign\"],\n );\n const signature = await crypto.sign(\n {\n name: \"HMAC\",\n hash: { name: \"SHA-256\" },\n },\n cryptoKey,\n stringToSignBytes,\n );\n\n return uint8ArrayToString(new Uint8Array(signature), encoding);\n}\n\n/**\n * Generates a SHA-256 hash.\n * @param content - The data to be included in the hash.\n * @param encoding - The textual encoding to use for the returned hash.\n */\nexport async function computeSha256Hash(\n content: string,\n encoding: \"base64\" | \"hex\",\n): Promise<string> {\n const contentBytes = stringToUint8Array(content, \"utf-8\");\n const digest = await getCrypto().digest({ name: \"SHA-256\" }, contentBytes);\n\n return uint8ArrayToString(new Uint8Array(digest), encoding);\n}\n"]}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Node.js readable streams are not natively available in React Native, but apps
3
+ * may polyfill them (e.g. `readable-stream` for Event Hubs). Use duck-typing
4
+ * so polyfilled streams are detected at runtime.
5
+ *
6
+ * @internal
7
+ */
8
+ export declare function isNodeReadableStream(x: unknown): x is never;
9
+ /**
10
+ * Web ReadableStream is not natively available in React Native, but apps may
11
+ * polyfill it. Use duck-typing so polyfilled streams are detected at runtime.
12
+ *
13
+ * @internal
14
+ */
15
+ export declare function isWebReadableStream(x: unknown): x is never;
16
+ //# sourceMappingURL=typeGuards-react-native.d.mts.map
@@ -0,0 +1,34 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ /**
4
+ * Node.js readable streams are not natively available in React Native, but apps
5
+ * may polyfill them (e.g. `readable-stream` for Event Hubs). Use duck-typing
6
+ * so polyfilled streams are detected at runtime.
7
+ *
8
+ * @internal
9
+ */
10
+ export function isNodeReadableStream(x) {
11
+ return (x !== null &&
12
+ x !== undefined &&
13
+ typeof x === "object" &&
14
+ "pipe" in x &&
15
+ typeof x.pipe === "function" &&
16
+ "read" in x &&
17
+ typeof x.read === "function");
18
+ }
19
+ /**
20
+ * Web ReadableStream is not natively available in React Native, but apps may
21
+ * polyfill it. Use duck-typing so polyfilled streams are detected at runtime.
22
+ *
23
+ * @internal
24
+ */
25
+ export function isWebReadableStream(x) {
26
+ return (x !== null &&
27
+ x !== undefined &&
28
+ typeof x === "object" &&
29
+ "getReader" in x &&
30
+ typeof x.getReader === "function" &&
31
+ "tee" in x &&
32
+ typeof x.tee === "function");
33
+ }
34
+ //# sourceMappingURL=typeGuards-react-native.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeGuards-react-native.mjs","sourceRoot":"","sources":["../../../src/util/typeGuards-react-native.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,CAAU;IAC7C,OAAO,CACL,CAAC,KAAK,IAAI;QACV,CAAC,KAAK,SAAS;QACf,OAAO,CAAC,KAAK,QAAQ;QACrB,MAAM,IAAI,CAAC;QACX,OAAO,CAAC,CAAC,IAAI,KAAK,UAAU;QAC5B,MAAM,IAAI,CAAC;QACX,OAAO,CAAC,CAAC,IAAI,KAAK,UAAU,CAC7B,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,CAAU;IAC5C,OAAO,CACL,CAAC,KAAK,IAAI;QACV,CAAC,KAAK,SAAS;QACf,OAAO,CAAC,KAAK,QAAQ;QACrB,WAAW,IAAI,CAAC;QAChB,OAAO,CAAC,CAAC,SAAS,KAAK,UAAU;QACjC,KAAK,IAAI,CAAC;QACV,OAAO,CAAC,CAAC,GAAG,KAAK,UAAU,CAC5B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Node.js readable streams are not natively available in React Native, but apps\n * may polyfill them (e.g. `readable-stream` for Event Hubs). Use duck-typing\n * so polyfilled streams are detected at runtime.\n *\n * @internal\n */\nexport function isNodeReadableStream(x: unknown): x is never {\n return (\n x !== null &&\n x !== undefined &&\n typeof x === \"object\" &&\n \"pipe\" in x &&\n typeof x.pipe === \"function\" &&\n \"read\" in x &&\n typeof x.read === \"function\"\n );\n}\n\n/**\n * Web ReadableStream is not natively available in React Native, but apps may\n * polyfill it. Use duck-typing so polyfilled streams are detected at runtime.\n *\n * @internal\n */\nexport function isWebReadableStream(x: unknown): x is never {\n return (\n x !== null &&\n x !== undefined &&\n typeof x === \"object\" &&\n \"getReader\" in x &&\n typeof x.getReader === \"function\" &&\n \"tee\" in x &&\n typeof x.tee === \"function\"\n );\n}\n"]}
@@ -1,6 +1,7 @@
1
- export declare function isNodeReadableStream(x: unknown): x is NodeJS.ReadableStream;
2
- export declare function isWebReadableStream(x: unknown): x is ReadableStream;
3
- export declare function isBinaryBody(body: unknown): body is Uint8Array | NodeJS.ReadableStream | ReadableStream<Uint8Array> | (() => NodeJS.ReadableStream) | (() => ReadableStream<Uint8Array>) | Blob;
4
- export declare function isReadableStream(x: unknown): x is ReadableStream | NodeJS.ReadableStream;
1
+ import type { NodeReadableStream, WebReadableStream } from "../types-react-native.mjs";
2
+ import { isNodeReadableStream, isWebReadableStream } from "./typeGuards-react-native.mjs";
3
+ export { isNodeReadableStream, isWebReadableStream };
4
+ export declare function isBinaryBody(body: unknown): body is Uint8Array | NodeReadableStream | WebReadableStream<Uint8Array> | (() => NodeReadableStream) | (() => WebReadableStream<Uint8Array>) | Blob;
5
+ export declare function isReadableStream(x: unknown): x is WebReadableStream | NodeReadableStream;
5
6
  export declare function isBlob(x: unknown): x is Blob;
6
7
  //# sourceMappingURL=typeGuards.d.ts.map
@@ -1,24 +1,18 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- export function isNodeReadableStream(x) {
4
- return Boolean(x && typeof x["pipe"] === "function");
5
- }
6
- export function isWebReadableStream(x) {
7
- return Boolean(x &&
8
- typeof x.getReader === "function" &&
9
- typeof x.tee === "function");
10
- }
3
+ import { isNodeReadableStream, isWebReadableStream } from "./typeGuards-react-native.mjs";
4
+ export { isNodeReadableStream, isWebReadableStream };
11
5
  export function isBinaryBody(body) {
12
6
  return (body !== undefined &&
13
7
  (body instanceof Uint8Array ||
14
8
  isReadableStream(body) ||
15
9
  typeof body === "function" ||
16
- (typeof Blob !== "undefined" && body instanceof Blob)));
10
+ body instanceof Blob));
17
11
  }
18
12
  export function isReadableStream(x) {
19
13
  return isNodeReadableStream(x) || isWebReadableStream(x);
20
14
  }
21
15
  export function isBlob(x) {
22
- return typeof Blob !== "undefined" && x instanceof Blob;
16
+ return x instanceof Blob;
23
17
  }
24
18
  //# sourceMappingURL=typeGuards.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeGuards.js","sourceRoot":"","sources":["../../../src/util/typeGuards.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,UAAU,oBAAoB,CAAC,CAAU;IAC7C,OAAO,OAAO,CAAC,CAAC,IAAI,OAAQ,CAA2B,CAAC,MAAM,CAAC,KAAK,UAAU,CAAC,CAAC;AAClF,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,CAAU;IAC5C,OAAO,OAAO,CACZ,CAAC;QACD,OAAQ,CAAoB,CAAC,SAAS,KAAK,UAAU;QACrD,OAAQ,CAAoB,CAAC,GAAG,KAAK,UAAU,CAChD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,IAAa;IAQb,OAAO,CACL,IAAI,KAAK,SAAS;QAClB,CAAC,IAAI,YAAY,UAAU;YACzB,gBAAgB,CAAC,IAAI,CAAC;YACtB,OAAO,IAAI,KAAK,UAAU;YAC1B,CAAC,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,YAAY,IAAI,CAAC,CAAC,CACzD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,CAAU;IACzC,OAAO,oBAAoB,CAAC,CAAC,CAAC,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,CAAU;IAC/B,OAAO,OAAO,IAAI,KAAK,WAAW,IAAI,CAAC,YAAY,IAAI,CAAC;AAC1D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport function isNodeReadableStream(x: unknown): x is NodeJS.ReadableStream {\n return Boolean(x && typeof (x as NodeJS.ReadableStream)[\"pipe\"] === \"function\");\n}\n\nexport function isWebReadableStream(x: unknown): x is ReadableStream {\n return Boolean(\n x &&\n typeof (x as ReadableStream).getReader === \"function\" &&\n typeof (x as ReadableStream).tee === \"function\",\n );\n}\n\nexport function isBinaryBody(\n body: unknown,\n): body is\n | Uint8Array\n | NodeJS.ReadableStream\n | ReadableStream<Uint8Array>\n | (() => NodeJS.ReadableStream)\n | (() => ReadableStream<Uint8Array>)\n | Blob {\n return (\n body !== undefined &&\n (body instanceof Uint8Array ||\n isReadableStream(body) ||\n typeof body === \"function\" ||\n (typeof Blob !== \"undefined\" && body instanceof Blob))\n );\n}\n\nexport function isReadableStream(x: unknown): x is ReadableStream | NodeJS.ReadableStream {\n return isNodeReadableStream(x) || isWebReadableStream(x);\n}\n\nexport function isBlob(x: unknown): x is Blob {\n return typeof Blob !== \"undefined\" && x instanceof Blob;\n}\n"]}
1
+ {"version":3,"file":"typeGuards.js","sourceRoot":"","sources":["../../../src/util/typeGuards.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEjF,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;AAErD,MAAM,UAAU,YAAY,CAC1B,IAAa;IAQb,OAAO,CACL,IAAI,KAAK,SAAS;QAClB,CAAC,IAAI,YAAY,UAAU;YACzB,gBAAgB,CAAC,IAAI,CAAC;YACtB,OAAO,IAAI,KAAK,UAAU;YAC1B,IAAI,YAAY,IAAI,CAAC,CACxB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,CAAU;IACzC,OAAO,oBAAoB,CAAC,CAAC,CAAC,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,CAAU;IAC/B,OAAO,CAAC,YAAY,IAAI,CAAC;AAC3B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { NodeReadableStream, WebReadableStream } from \"#platform/types\";\nimport { isNodeReadableStream, isWebReadableStream } from \"#platform/typeGuards\";\n\nexport { isNodeReadableStream, isWebReadableStream };\n\nexport function isBinaryBody(\n body: unknown,\n): body is\n | Uint8Array\n | NodeReadableStream\n | WebReadableStream<Uint8Array>\n | (() => NodeReadableStream)\n | (() => WebReadableStream<Uint8Array>)\n | Blob {\n return (\n body !== undefined &&\n (body instanceof Uint8Array ||\n isReadableStream(body) ||\n typeof body === \"function\" ||\n body instanceof Blob)\n );\n}\n\nexport function isReadableStream(x: unknown): x is WebReadableStream | NodeReadableStream {\n return isNodeReadableStream(x) || isWebReadableStream(x);\n}\n\nexport function isBlob(x: unknown): x is Blob {\n return x instanceof Blob;\n}\n"]}
@@ -1,3 +1,5 @@
1
+ import { setPlatformSpecificData } from "./userAgentPlatform-react-native.mjs";
2
+ export { setPlatformSpecificData };
1
3
  /**
2
4
  * @internal
3
5
  */
@@ -1,7 +1,8 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { getHeaderName, setPlatformSpecificData } from "./userAgentPlatform.js";
3
+ import { getHeaderName, setPlatformSpecificData } from "./userAgentPlatform-react-native.mjs";
4
4
  import { SDK_VERSION } from "../constants.js";
5
+ export { setPlatformSpecificData };
5
6
  function getUserAgentString(telemetryInfo) {
6
7
  const parts = [];
7
8
  for (const [key, value] of telemetryInfo) {
@@ -1 +1 @@
1
- {"version":3,"file":"userAgent.js","sourceRoot":"","sources":["../../../src/util/userAgent.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,SAAS,kBAAkB,CAAC,aAAkC;IAC5D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,aAAa,EAAE,CAAC;QACzC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;QAC9C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,aAAa,EAAE,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAe;IACrD,MAAM,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC9C,WAAW,CAAC,GAAG,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IAChD,MAAM,uBAAuB,CAAC,WAAW,CAAC,CAAC;IAC3C,MAAM,YAAY,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;IAC3E,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getHeaderName, setPlatformSpecificData } from \"./userAgentPlatform.js\";\nimport { SDK_VERSION } from \"../constants.js\";\n\nfunction getUserAgentString(telemetryInfo: Map<string, string>): string {\n const parts: string[] = [];\n for (const [key, value] of telemetryInfo) {\n const token = value ? `${key}/${value}` : key;\n parts.push(token);\n }\n return parts.join(\" \");\n}\n\n/**\n * @internal\n */\nexport function getUserAgentHeaderName(): string {\n return getHeaderName();\n}\n\n/**\n * @internal\n */\nexport async function getUserAgentValue(prefix?: string): Promise<string> {\n const runtimeInfo = new Map<string, string>();\n runtimeInfo.set(\"ts-http-runtime\", SDK_VERSION);\n await setPlatformSpecificData(runtimeInfo);\n const defaultAgent = getUserAgentString(runtimeInfo);\n const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent;\n return userAgentValue;\n}\n"]}
1
+ {"version":3,"file":"userAgent.js","sourceRoot":"","sources":["../../../src/util/userAgent.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,uBAAuB,EAAE,CAAC;AAEnC,SAAS,kBAAkB,CAAC,aAAkC;IAC5D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,aAAa,EAAE,CAAC;QACzC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;QAC9C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,aAAa,EAAE,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAe;IACrD,MAAM,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC9C,WAAW,CAAC,GAAG,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IAChD,MAAM,uBAAuB,CAAC,WAAW,CAAC,CAAC;IAC3C,MAAM,YAAY,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;IAC3E,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getHeaderName, setPlatformSpecificData } from \"#platform/userAgent\";\nimport { SDK_VERSION } from \"../constants.js\";\n\nexport { setPlatformSpecificData };\n\nfunction getUserAgentString(telemetryInfo: Map<string, string>): string {\n const parts: string[] = [];\n for (const [key, value] of telemetryInfo) {\n const token = value ? `${key}/${value}` : key;\n parts.push(token);\n }\n return parts.join(\" \");\n}\n\n/**\n * @internal\n */\nexport function getUserAgentHeaderName(): string {\n return getHeaderName();\n}\n\n/**\n * @internal\n */\nexport async function getUserAgentValue(prefix?: string): Promise<string> {\n const runtimeInfo = new Map<string, string>();\n runtimeInfo.set(\"ts-http-runtime\", SDK_VERSION);\n await setPlatformSpecificData(runtimeInfo);\n const defaultAgent = getUserAgentString(runtimeInfo);\n const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent;\n return userAgentValue;\n}\n"]}
@@ -6,4 +6,4 @@ export declare function getHeaderName(): string;
6
6
  * @internal
7
7
  */
8
8
  export declare function setPlatformSpecificData(map: Map<string, string>): Promise<void>;
9
- //# sourceMappingURL=userAgentPlatform.d.ts.map
9
+ //# sourceMappingURL=userAgentPlatform-react-native.d.mts.map
@@ -16,4 +16,4 @@ export async function setPlatformSpecificData(map) {
16
16
  map.set("react-native", `${major}.${minor}.${patch} (${Platform.OS} ${Platform.Version})`);
17
17
  }
18
18
  }
19
- //# sourceMappingURL=userAgentPlatform.js.map
19
+ //# sourceMappingURL=userAgentPlatform-react-native.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userAgentPlatform-react-native.mjs","sourceRoot":"","sources":["../../../src/util/userAgentPlatform-react-native.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,GAAwB;IACpE,IAAI,QAAQ,CAAC,SAAS,EAAE,kBAAkB,EAAE,CAAC;QAC3C,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,SAAS,CAAC,kBAAkB,CAAC;QACtE,GAAG,CAAC,GAAG,CAAC,cAAc,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK,QAAQ,CAAC,EAAE,IAAI,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC;IAC7F,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Platform } from \"react-native\";\n\n/**\n * @internal\n */\nexport function getHeaderName(): string {\n return \"x-ms-useragent\";\n}\n\n/**\n * @internal\n */\nexport async function setPlatformSpecificData(map: Map<string, string>): Promise<void> {\n if (Platform.constants?.reactNativeVersion) {\n const { major, minor, patch } = Platform.constants.reactNativeVersion;\n map.set(\"react-native\", `${major}.${minor}.${patch} (${Platform.OS} ${Platform.Version})`);\n }\n}\n"]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Generated Universally Unique Identifier
3
+ *
4
+ * @returns RFC4122 v4 UUID.
5
+ */
6
+ export declare function randomUUID(): string;
7
+ //# sourceMappingURL=uuidUtils-react-native.d.mts.map
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * @returns RFC4122 v4 UUID.
7
7
  */
8
- export function generateUUID() {
8
+ function generateUUID() {
9
9
  let uuid = "";
10
10
  for (let i = 0; i < 32; i++) {
11
11
  // Generate a random number between 0 and 15
@@ -29,12 +29,17 @@ export function generateUUID() {
29
29
  }
30
30
  return uuid;
31
31
  }
32
+ // NOTE: globalThis.crypto.randomUUID is not available on React Native engines
33
+ // (e.g. Hermes/JSC), so fall back to a manual implementation when it is missing.
34
+ const uuidFunction = typeof globalThis?.crypto?.randomUUID === "function"
35
+ ? globalThis.crypto.randomUUID.bind(globalThis.crypto)
36
+ : generateUUID;
32
37
  /**
33
38
  * Generated Universally Unique Identifier
34
39
  *
35
40
  * @returns RFC4122 v4 UUID.
36
41
  */
37
42
  export function randomUUID() {
38
- return generateUUID();
43
+ return uuidFunction();
39
44
  }
40
- //# sourceMappingURL=uuidUtils.common.js.map
45
+ //# sourceMappingURL=uuidUtils-react-native.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uuidUtils-react-native.mjs","sourceRoot":"","sources":["../../../src/util/uuidUtils-react-native.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC;;;;GAIG;AACH,SAAS,YAAY;IACnB,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,4CAA4C;QAC5C,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACpD,iDAAiD;QACjD,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;YACb,IAAI,IAAI,GAAG,CAAC;QACd,CAAC;aAAM,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;YACpB,oDAAoD;YACpD,IAAI,IAAI,CAAC,CAAC,YAAY,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACpD,CAAC;aAAM,CAAC;YACN,oDAAoD;YACpD,IAAI,IAAI,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACpC,CAAC;QACD,8DAA8D;QAC9D,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;YAChD,IAAI,IAAI,GAAG,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,8EAA8E;AAC9E,iFAAiF;AACjF,MAAM,YAAY,GAChB,OAAO,UAAU,EAAE,MAAM,EAAE,UAAU,KAAK,UAAU;IAClD,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IACtD,CAAC,CAAC,YAAY,CAAC;AAEnB;;;;GAIG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,YAAY,EAAE,CAAC;AACxB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\ninterface Crypto {\n randomUUID(): string;\n}\n\ndeclare const globalThis: {\n crypto?: Crypto;\n};\n\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nfunction generateUUID(): string {\n let uuid = \"\";\n for (let i = 0; i < 32; i++) {\n // Generate a random number between 0 and 15\n const randomNumber = Math.floor(Math.random() * 16);\n // Set the UUID version to 4 in the 13th position\n if (i === 12) {\n uuid += \"4\";\n } else if (i === 16) {\n // Set the UUID variant to \"10\" in the 17th position\n uuid += ((randomNumber & 0x3) | 0x8).toString(16);\n } else {\n // Add a random hexadecimal digit to the UUID string\n uuid += randomNumber.toString(16);\n }\n // Add hyphens to the UUID string at the appropriate positions\n if (i === 7 || i === 11 || i === 15 || i === 19) {\n uuid += \"-\";\n }\n }\n return uuid;\n}\n\n// NOTE: globalThis.crypto.randomUUID is not available on React Native engines\n// (e.g. Hermes/JSC), so fall back to a manual implementation when it is missing.\nconst uuidFunction =\n typeof globalThis?.crypto?.randomUUID === \"function\"\n ? globalThis.crypto.randomUUID.bind(globalThis.crypto)\n : generateUUID;\n\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID(): string {\n return uuidFunction();\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/ts-http-runtime",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "Isomorphic client library for making HTTP requests in node.js and browser.",
5
5
  "sdk-type": "client",
6
6
  "type": "module",
@@ -8,6 +8,86 @@
8
8
  "types": "./dist/commonjs/index.d.ts",
9
9
  "browser": "./dist/browser/index.js",
10
10
  "react-native": "./dist/react-native/index.js",
11
+ "imports": {
12
+ "#platform/types": {
13
+ "browser": "./src/types-browser.mts",
14
+ "react-native": "./src/types-react-native.mts",
15
+ "default": "./src/types.ts"
16
+ },
17
+ "#platform/env": {
18
+ "browser": "./src/env-browser.mts",
19
+ "react-native": "./src/env-react-native.mts",
20
+ "default": "./src/env.ts"
21
+ },
22
+ "#platform/encoding": {
23
+ "react-native": "./src/encoding-react-native.mts",
24
+ "default": "./src/encoding.ts"
25
+ },
26
+ "#platform/httpClient": {
27
+ "browser": "./src/defaultHttpClient-browser.mts",
28
+ "react-native": "./src/defaultHttpClient-react-native.mts",
29
+ "default": "./src/defaultHttpClient.ts"
30
+ },
31
+ "#platform/formData": {
32
+ "browser": "./src/formData-web.mts",
33
+ "react-native": "./src/formData-web.mts",
34
+ "default": "./src/formData.ts"
35
+ },
36
+ "#platform/log": {
37
+ "browser": "./src/logger/log-web.mts",
38
+ "react-native": "./src/logger/log-web.mts",
39
+ "default": "./src/logger/log.ts"
40
+ },
41
+ "#platform/decompress": {
42
+ "browser": "./src/policies/decompressResponsePolicy-web.mts",
43
+ "react-native": "./src/policies/decompressResponsePolicy-web.mts",
44
+ "default": "./src/policies/decompressResponsePolicy.ts"
45
+ },
46
+ "#platform/proxy": {
47
+ "browser": "./src/policies/proxyPolicy-web.mts",
48
+ "react-native": "./src/policies/proxyPolicy-web.mts",
49
+ "default": "./src/policies/proxyPolicy.ts"
50
+ },
51
+ "#platform/bytesEncoding": {
52
+ "browser": "./src/util/bytesEncoding-web.mts",
53
+ "react-native": "./src/util/bytesEncoding-web.mts",
54
+ "default": "./src/util/bytesEncoding.ts"
55
+ },
56
+ "#platform/concat": {
57
+ "browser": "./src/util/concat-browser.mts",
58
+ "react-native": "./src/util/concat-react-native.mts",
59
+ "default": "./src/util/concat.ts"
60
+ },
61
+ "#platform/inspect": {
62
+ "browser": "./src/util/inspect-web.mts",
63
+ "react-native": "./src/util/inspect-web.mts",
64
+ "default": "./src/util/inspect.ts"
65
+ },
66
+ "#platform/sha256": {
67
+ "browser": "./src/util/sha256-web.mts",
68
+ "react-native": "./src/util/sha256-web.mts",
69
+ "default": "./src/util/sha256.ts"
70
+ },
71
+ "#platform/userAgent": {
72
+ "browser": "./src/util/userAgentPlatform-browser.mts",
73
+ "react-native": "./src/util/userAgentPlatform-react-native.mts",
74
+ "default": "./src/util/userAgentPlatform.ts"
75
+ },
76
+ "#platform/uuid": {
77
+ "react-native": "./src/util/uuidUtils-react-native.mts",
78
+ "default": "./src/util/uuidUtils.ts"
79
+ },
80
+ "#platform/typeGuards": {
81
+ "browser": "./src/util/typeGuards-browser.mts",
82
+ "react-native": "./src/util/typeGuards-react-native.mts",
83
+ "default": "./src/util/typeGuards-node.ts"
84
+ },
85
+ "#platform/policies": {
86
+ "browser": "./src/policies/platformPolicies-web.mts",
87
+ "react-native": "./src/policies/platformPolicies-web.mts",
88
+ "default": "./src/policies/platformPolicies.ts"
89
+ }
90
+ },
11
91
  "exports": {
12
92
  "./package.json": "./package.json",
13
93
  ".": {
@@ -89,7 +169,11 @@
89
169
  "LICENSE",
90
170
  "README.md"
91
171
  ],
92
- "repository": "github:Azure/azure-sdk-for-js",
172
+ "repository": {
173
+ "type": "git",
174
+ "url": "git+https://github.com/Azure/azure-sdk-for-js",
175
+ "directory": "sdk/core/ts-http-runtime"
176
+ },
93
177
  "keywords": [
94
178
  "azure",
95
179
  "cloud"
@@ -100,9 +184,9 @@
100
184
  "url": "https://github.com/Azure/azure-sdk-for-js/issues"
101
185
  },
102
186
  "engines": {
103
- "node": ">=20.0.0"
187
+ "node": ">=22.0.0"
104
188
  },
105
- "homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/ts-http-runtime/",
189
+ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/ts-http-runtime/README.md",
106
190
  "sideEffects": false,
107
191
  "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
108
192
  "//metadata": {
@@ -128,14 +212,14 @@
128
212
  "tslib": "^2.6.2"
129
213
  },
130
214
  "devDependencies": {
131
- "@types/node": "^20.19.25",
215
+ "@types/node": "^22.0.0",
132
216
  "@types/react": "^19.2.14",
133
217
  "@vitest/browser-playwright": "^4.1.2",
134
218
  "@vitest/coverage-istanbul": "^4.1.2",
135
219
  "cross-env": "^10.1.0",
136
220
  "eslint": "^9.39.1",
137
- "playwright": "^1.58.2",
138
- "prettier": "^3.6.2",
221
+ "playwright": "^1.60.0",
222
+ "prettier": "^3.9.1",
139
223
  "react-native": "^0.84.1",
140
224
  "rimraf": "^6.1.0",
141
225
  "tsx": "^4.20.4",
@@ -150,16 +234,17 @@
150
234
  "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
151
235
  "build:samples": "echo Skipped.",
152
236
  "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"",
153
- "clean": "rimraf --glob dist dist-* temp types *.tgz *.log",
237
+ "clean": "rimraf --glob dist temp *.tsbuildinfo *.tgz coverage test-results.*",
154
238
  "execute:samples": "echo skipped",
155
239
  "extract-api": "dev-tool run build-package && dev-tool run extract-api",
156
240
  "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"",
157
241
  "lint": "eslint package.json src test",
158
242
  "lint:fix": "eslint package.json src test --fix --fix-type [problem,suggestion]",
159
243
  "pack": "pnpm pack 2>&1",
160
- "test": "npm run test:node && npm run test:browser",
161
- "test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --no-test-proxy --browser",
162
- "test:node": "dev-tool run build-test --no-browser-test && dev-tool run test:vitest --no-test-proxy",
244
+ "test": "tsc -b --noEmit && npm run test:node && npm run test:browser && npm run test:react-native",
245
+ "test:browser": "dev-tool run test:vitest --no-test-proxy --browser",
246
+ "test:node": "dev-tool run test:vitest --no-test-proxy",
247
+ "test:react-native": "dev-tool run test:vitest --no-test-proxy --browser -- -c vitest.react-native.config.ts",
163
248
  "update-snippets": "dev-tool run update-snippets"
164
249
  }
165
250
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultHttpClient.js","sourceRoot":"","sources":["../../src/defaultHttpClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,qBAAqB,EAAE,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { HttpClient } from \"./interfaces.js\";\nimport { createFetchHttpClient } from \"./fetchHttpClient.js\";\n\n/**\n * Create the correct HttpClient for the current environment.\n */\nexport function createDefaultHttpClient(): HttpClient {\n return createFetchHttpClient();\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"log.js","sourceRoot":"","sources":["../../../src/logger/log.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { log } from \"./log.common.js\";\n"]}