@mtkruto/node 0.63.2 → 0.63.4

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 (303) hide show
  1. package/esm/0_deps.d.ts +10 -5
  2. package/esm/0_deps.d.ts.map +1 -1
  3. package/esm/0_deps.js +10 -5
  4. package/esm/0_test_deps.d.ts.map +1 -0
  5. package/esm/_dnt.polyfills.d.ts +13 -0
  6. package/esm/_dnt.polyfills.d.ts.map +1 -1
  7. package/esm/_dnt.polyfills.js +11 -0
  8. package/esm/client/2_client_encrypted.d.ts.map +1 -1
  9. package/esm/client/2_client_encrypted.js +2 -0
  10. package/esm/client/2_file_manager.d.ts.map +1 -1
  11. package/esm/client/2_file_manager.js +8 -5
  12. package/esm/client/2_update_manager.js +11 -11
  13. package/esm/client/5_client.d.ts +0 -9
  14. package/esm/client/5_client.d.ts.map +1 -1
  15. package/esm/client/5_client.js +12 -59
  16. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.d.ts.map +1 -1
  17. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.d.ts.map +1 -1
  18. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.d.ts.map +1 -1
  19. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.d.ts.map +1 -1
  20. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.js +4 -4
  21. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.d.ts.map +1 -1
  22. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/instance_of.d.ts.map +1 -1
  23. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/is_error.d.ts.map +1 -1
  24. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/not_equals.d.ts.map +1 -1
  25. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/throws.d.ts.map +1 -1
  26. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.d.ts.map +1 -1
  27. package/esm/deps/jsr.io/@std/async/1.0.12/_util.d.ts +2 -0
  28. package/esm/deps/jsr.io/@std/async/1.0.12/_util.d.ts.map +1 -0
  29. package/esm/deps/jsr.io/@std/async/1.0.12/_util.js +6 -0
  30. package/esm/deps/jsr.io/@std/async/1.0.12/abortable.d.ts +107 -0
  31. package/esm/deps/jsr.io/@std/async/1.0.12/abortable.d.ts.map +1 -0
  32. package/esm/deps/jsr.io/@std/async/1.0.12/abortable.js +46 -0
  33. package/esm/deps/jsr.io/@std/async/1.0.12/deadline.d.ts +36 -0
  34. package/esm/deps/jsr.io/@std/async/1.0.12/deadline.d.ts.map +1 -0
  35. package/esm/deps/jsr.io/@std/async/1.0.12/deadline.js +38 -0
  36. package/esm/deps/jsr.io/@std/async/1.0.12/debounce.d.ts +44 -0
  37. package/esm/deps/jsr.io/@std/async/1.0.12/debounce.d.ts.map +1 -0
  38. package/esm/deps/jsr.io/@std/async/1.0.12/debounce.js +57 -0
  39. package/esm/deps/jsr.io/@std/async/1.0.12/delay.d.ts +42 -0
  40. package/esm/deps/jsr.io/@std/async/1.0.12/delay.d.ts.map +1 -0
  41. package/esm/deps/jsr.io/@std/async/1.0.12/delay.js +65 -0
  42. package/esm/deps/jsr.io/@std/async/1.0.12/mod.d.ts +22 -0
  43. package/esm/deps/jsr.io/@std/async/1.0.12/mod.d.ts.map +1 -0
  44. package/esm/deps/jsr.io/@std/async/1.0.12/mod.js +23 -0
  45. package/esm/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.d.ts +111 -0
  46. package/esm/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.d.ts.map +1 -0
  47. package/esm/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.js +170 -0
  48. package/esm/deps/jsr.io/@std/async/1.0.12/pool.d.ts +33 -0
  49. package/esm/deps/jsr.io/@std/async/1.0.12/pool.d.ts.map +1 -0
  50. package/esm/deps/jsr.io/@std/async/1.0.12/pool.js +99 -0
  51. package/esm/deps/jsr.io/@std/async/1.0.12/retry.d.ts +110 -0
  52. package/esm/deps/jsr.io/@std/async/1.0.12/retry.d.ts.map +1 -0
  53. package/esm/deps/jsr.io/@std/async/1.0.12/retry.js +107 -0
  54. package/esm/deps/jsr.io/@std/async/1.0.12/tee.d.ts +43 -0
  55. package/esm/deps/jsr.io/@std/async/1.0.12/tee.d.ts.map +1 -0
  56. package/esm/deps/jsr.io/@std/async/1.0.12/tee.js +102 -0
  57. package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/build_message.d.ts.map +1 -1
  58. package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/build_message.js +1 -1
  59. package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/diff.d.ts.map +1 -1
  60. package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/diff.js +1 -1
  61. package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/diff_str.d.ts.map +1 -1
  62. package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/diff_str.js +4 -1
  63. package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/format.d.ts.map +1 -1
  64. package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/format.js +1 -1
  65. package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/styles.d.ts.map +1 -1
  66. package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/styles.js +1 -1
  67. package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/types.d.ts.map +1 -1
  68. package/esm/deps/jsr.io/@std/internal/1.0.6/types.js +3 -0
  69. package/esm/session/1_session.js +4 -4
  70. package/esm/session/2_session_encrypted.d.ts.map +1 -1
  71. package/esm/session/2_session_encrypted.js +5 -8
  72. package/package.json +1 -1
  73. package/script/0_deps.d.ts +10 -5
  74. package/script/0_deps.d.ts.map +1 -1
  75. package/script/0_deps.js +25 -28
  76. package/script/0_test_deps.d.ts.map +1 -0
  77. package/script/_dnt.polyfills.d.ts +13 -0
  78. package/script/_dnt.polyfills.d.ts.map +1 -1
  79. package/script/_dnt.polyfills.js +11 -0
  80. package/script/client/2_client_encrypted.d.ts.map +1 -1
  81. package/script/client/2_client_encrypted.js +2 -0
  82. package/script/client/2_file_manager.d.ts.map +1 -1
  83. package/script/client/2_file_manager.js +7 -4
  84. package/script/client/2_update_manager.js +10 -10
  85. package/script/client/5_client.d.ts +0 -9
  86. package/script/client/5_client.d.ts.map +1 -1
  87. package/script/client/5_client.js +11 -58
  88. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.d.ts.map +1 -1
  89. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.d.ts.map +1 -1
  90. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.d.ts.map +1 -1
  91. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.d.ts.map +1 -1
  92. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.js +4 -4
  93. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.d.ts.map +1 -1
  94. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/instance_of.d.ts.map +1 -1
  95. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/is_error.d.ts.map +1 -1
  96. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/not_equals.d.ts.map +1 -1
  97. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/throws.d.ts.map +1 -1
  98. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.d.ts.map +1 -1
  99. package/script/deps/jsr.io/@std/async/1.0.12/_util.d.ts +2 -0
  100. package/script/deps/jsr.io/@std/async/1.0.12/_util.d.ts.map +1 -0
  101. package/script/deps/jsr.io/@std/async/1.0.12/_util.js +9 -0
  102. package/script/deps/jsr.io/@std/async/1.0.12/abortable.d.ts +107 -0
  103. package/script/deps/jsr.io/@std/async/1.0.12/abortable.d.ts.map +1 -0
  104. package/script/deps/jsr.io/@std/async/1.0.12/abortable.js +49 -0
  105. package/script/deps/jsr.io/@std/async/1.0.12/deadline.d.ts +36 -0
  106. package/script/deps/jsr.io/@std/async/1.0.12/deadline.d.ts.map +1 -0
  107. package/script/deps/jsr.io/@std/async/1.0.12/deadline.js +41 -0
  108. package/script/deps/jsr.io/@std/async/1.0.12/debounce.d.ts +44 -0
  109. package/script/deps/jsr.io/@std/async/1.0.12/debounce.d.ts.map +1 -0
  110. package/script/deps/jsr.io/@std/async/1.0.12/debounce.js +60 -0
  111. package/script/deps/jsr.io/@std/async/1.0.12/delay.d.ts +42 -0
  112. package/script/deps/jsr.io/@std/async/1.0.12/delay.d.ts.map +1 -0
  113. package/script/deps/jsr.io/@std/async/1.0.12/delay.js +91 -0
  114. package/script/deps/jsr.io/@std/async/1.0.12/mod.d.ts +22 -0
  115. package/script/deps/jsr.io/@std/async/1.0.12/mod.d.ts.map +1 -0
  116. package/script/deps/jsr.io/@std/async/1.0.12/mod.js +39 -0
  117. package/script/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.d.ts +111 -0
  118. package/script/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.d.ts.map +1 -0
  119. package/script/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.js +174 -0
  120. package/script/deps/jsr.io/@std/async/1.0.12/pool.d.ts +33 -0
  121. package/script/deps/jsr.io/@std/async/1.0.12/pool.d.ts.map +1 -0
  122. package/script/deps/jsr.io/@std/async/1.0.12/pool.js +102 -0
  123. package/script/deps/jsr.io/@std/async/1.0.12/retry.d.ts +110 -0
  124. package/script/deps/jsr.io/@std/async/1.0.12/retry.d.ts.map +1 -0
  125. package/script/deps/jsr.io/@std/async/1.0.12/retry.js +112 -0
  126. package/script/deps/jsr.io/@std/async/1.0.12/tee.d.ts +43 -0
  127. package/script/deps/jsr.io/@std/async/1.0.12/tee.d.ts.map +1 -0
  128. package/script/deps/jsr.io/@std/async/1.0.12/tee.js +105 -0
  129. package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/build_message.d.ts.map +1 -1
  130. package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/build_message.js +1 -1
  131. package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/diff.d.ts.map +1 -1
  132. package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/diff.js +1 -1
  133. package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/diff_str.d.ts.map +1 -1
  134. package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/diff_str.js +4 -1
  135. package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/format.d.ts.map +1 -1
  136. package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/format.js +1 -1
  137. package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/styles.d.ts.map +1 -1
  138. package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/styles.js +1 -1
  139. package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/types.d.ts.map +1 -1
  140. package/script/deps/jsr.io/@std/internal/1.0.6/types.js +4 -0
  141. package/script/session/1_session.js +3 -3
  142. package/script/session/2_session_encrypted.d.ts.map +1 -1
  143. package/script/session/2_session_encrypted.js +4 -7
  144. package/esm/deps/jsr.io/@std/assert/1.0.11/almost_equals.d.ts +0 -29
  145. package/esm/deps/jsr.io/@std/assert/1.0.11/almost_equals.d.ts.map +0 -1
  146. package/esm/deps/jsr.io/@std/assert/1.0.11/almost_equals.js +0 -46
  147. package/esm/deps/jsr.io/@std/assert/1.0.11/array_includes.d.ts +0 -24
  148. package/esm/deps/jsr.io/@std/assert/1.0.11/array_includes.d.ts.map +0 -1
  149. package/esm/deps/jsr.io/@std/assert/1.0.11/array_includes.js +0 -46
  150. package/esm/deps/jsr.io/@std/assert/1.0.11/exists.d.ts +0 -18
  151. package/esm/deps/jsr.io/@std/assert/1.0.11/exists.d.ts.map +0 -1
  152. package/esm/deps/jsr.io/@std/assert/1.0.11/exists.js +0 -27
  153. package/esm/deps/jsr.io/@std/assert/1.0.11/fail.d.ts +0 -15
  154. package/esm/deps/jsr.io/@std/assert/1.0.11/fail.d.ts.map +0 -1
  155. package/esm/deps/jsr.io/@std/assert/1.0.11/fail.js +0 -20
  156. package/esm/deps/jsr.io/@std/assert/1.0.11/greater.d.ts +0 -20
  157. package/esm/deps/jsr.io/@std/assert/1.0.11/greater.d.ts.map +0 -1
  158. package/esm/deps/jsr.io/@std/assert/1.0.11/greater.js +0 -29
  159. package/esm/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.d.ts +0 -20
  160. package/esm/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.d.ts.map +0 -1
  161. package/esm/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.js +0 -29
  162. package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts +0 -23
  163. package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.js +0 -52
  164. package/esm/deps/jsr.io/@std/assert/1.0.11/is_error.d.ts +0 -25
  165. package/esm/deps/jsr.io/@std/assert/1.0.11/is_error.js +0 -53
  166. package/esm/deps/jsr.io/@std/assert/1.0.11/less.d.ts +0 -19
  167. package/esm/deps/jsr.io/@std/assert/1.0.11/less.d.ts.map +0 -1
  168. package/esm/deps/jsr.io/@std/assert/1.0.11/less.js +0 -28
  169. package/esm/deps/jsr.io/@std/assert/1.0.11/less_or_equal.d.ts +0 -20
  170. package/esm/deps/jsr.io/@std/assert/1.0.11/less_or_equal.d.ts.map +0 -1
  171. package/esm/deps/jsr.io/@std/assert/1.0.11/less_or_equal.js +0 -29
  172. package/esm/deps/jsr.io/@std/assert/1.0.11/match.d.ts +0 -18
  173. package/esm/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +0 -1
  174. package/esm/deps/jsr.io/@std/assert/1.0.11/match.js +0 -26
  175. package/esm/deps/jsr.io/@std/assert/1.0.11/mod.d.ts +0 -44
  176. package/esm/deps/jsr.io/@std/assert/1.0.11/mod.d.ts.map +0 -1
  177. package/esm/deps/jsr.io/@std/assert/1.0.11/mod.js +0 -45
  178. package/esm/deps/jsr.io/@std/assert/1.0.11/not_equals.d.ts +0 -21
  179. package/esm/deps/jsr.io/@std/assert/1.0.11/not_equals.js +0 -33
  180. package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts +0 -20
  181. package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +0 -1
  182. package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.js +0 -29
  183. package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts +0 -18
  184. package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +0 -1
  185. package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.js +0 -26
  186. package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts +0 -23
  187. package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +0 -1
  188. package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.js +0 -32
  189. package/esm/deps/jsr.io/@std/assert/1.0.11/object_match.d.ts +0 -29
  190. package/esm/deps/jsr.io/@std/assert/1.0.11/object_match.d.ts.map +0 -1
  191. package/esm/deps/jsr.io/@std/assert/1.0.11/object_match.js +0 -167
  192. package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts +0 -42
  193. package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts.map +0 -1
  194. package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.js +0 -53
  195. package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts +0 -24
  196. package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +0 -1
  197. package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.js +0 -57
  198. package/esm/deps/jsr.io/@std/assert/1.0.11/string_includes.d.ts +0 -18
  199. package/esm/deps/jsr.io/@std/assert/1.0.11/string_includes.d.ts.map +0 -1
  200. package/esm/deps/jsr.io/@std/assert/1.0.11/string_includes.js +0 -26
  201. package/esm/deps/jsr.io/@std/assert/1.0.11/throws.d.ts +0 -45
  202. package/esm/deps/jsr.io/@std/assert/1.0.11/throws.js +0 -44
  203. package/esm/deps/jsr.io/@std/assert/1.0.11/unimplemented.d.ts +0 -15
  204. package/esm/deps/jsr.io/@std/assert/1.0.11/unimplemented.d.ts.map +0 -1
  205. package/esm/deps/jsr.io/@std/assert/1.0.11/unimplemented.js +0 -20
  206. package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +0 -2
  207. package/script/deps/jsr.io/@std/assert/1.0.11/almost_equals.d.ts +0 -29
  208. package/script/deps/jsr.io/@std/assert/1.0.11/almost_equals.d.ts.map +0 -1
  209. package/script/deps/jsr.io/@std/assert/1.0.11/almost_equals.js +0 -49
  210. package/script/deps/jsr.io/@std/assert/1.0.11/array_includes.d.ts +0 -24
  211. package/script/deps/jsr.io/@std/assert/1.0.11/array_includes.d.ts.map +0 -1
  212. package/script/deps/jsr.io/@std/assert/1.0.11/array_includes.js +0 -49
  213. package/script/deps/jsr.io/@std/assert/1.0.11/exists.d.ts +0 -18
  214. package/script/deps/jsr.io/@std/assert/1.0.11/exists.d.ts.map +0 -1
  215. package/script/deps/jsr.io/@std/assert/1.0.11/exists.js +0 -30
  216. package/script/deps/jsr.io/@std/assert/1.0.11/fail.d.ts +0 -15
  217. package/script/deps/jsr.io/@std/assert/1.0.11/fail.d.ts.map +0 -1
  218. package/script/deps/jsr.io/@std/assert/1.0.11/fail.js +0 -23
  219. package/script/deps/jsr.io/@std/assert/1.0.11/greater.d.ts +0 -20
  220. package/script/deps/jsr.io/@std/assert/1.0.11/greater.d.ts.map +0 -1
  221. package/script/deps/jsr.io/@std/assert/1.0.11/greater.js +0 -32
  222. package/script/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.d.ts +0 -20
  223. package/script/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.d.ts.map +0 -1
  224. package/script/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.js +0 -32
  225. package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts +0 -23
  226. package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.js +0 -55
  227. package/script/deps/jsr.io/@std/assert/1.0.11/is_error.d.ts +0 -25
  228. package/script/deps/jsr.io/@std/assert/1.0.11/is_error.js +0 -56
  229. package/script/deps/jsr.io/@std/assert/1.0.11/less.d.ts +0 -19
  230. package/script/deps/jsr.io/@std/assert/1.0.11/less.d.ts.map +0 -1
  231. package/script/deps/jsr.io/@std/assert/1.0.11/less.js +0 -31
  232. package/script/deps/jsr.io/@std/assert/1.0.11/less_or_equal.d.ts +0 -20
  233. package/script/deps/jsr.io/@std/assert/1.0.11/less_or_equal.d.ts.map +0 -1
  234. package/script/deps/jsr.io/@std/assert/1.0.11/less_or_equal.js +0 -32
  235. package/script/deps/jsr.io/@std/assert/1.0.11/match.d.ts +0 -18
  236. package/script/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +0 -1
  237. package/script/deps/jsr.io/@std/assert/1.0.11/match.js +0 -29
  238. package/script/deps/jsr.io/@std/assert/1.0.11/mod.d.ts +0 -44
  239. package/script/deps/jsr.io/@std/assert/1.0.11/mod.d.ts.map +0 -1
  240. package/script/deps/jsr.io/@std/assert/1.0.11/mod.js +0 -61
  241. package/script/deps/jsr.io/@std/assert/1.0.11/not_equals.d.ts +0 -21
  242. package/script/deps/jsr.io/@std/assert/1.0.11/not_equals.js +0 -36
  243. package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts +0 -20
  244. package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +0 -1
  245. package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.js +0 -32
  246. package/script/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts +0 -18
  247. package/script/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +0 -1
  248. package/script/deps/jsr.io/@std/assert/1.0.11/not_match.js +0 -29
  249. package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts +0 -23
  250. package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +0 -1
  251. package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.js +0 -35
  252. package/script/deps/jsr.io/@std/assert/1.0.11/object_match.d.ts +0 -29
  253. package/script/deps/jsr.io/@std/assert/1.0.11/object_match.d.ts.map +0 -1
  254. package/script/deps/jsr.io/@std/assert/1.0.11/object_match.js +0 -170
  255. package/script/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts +0 -42
  256. package/script/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts.map +0 -1
  257. package/script/deps/jsr.io/@std/assert/1.0.11/rejects.js +0 -56
  258. package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts +0 -24
  259. package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +0 -1
  260. package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.js +0 -60
  261. package/script/deps/jsr.io/@std/assert/1.0.11/string_includes.d.ts +0 -18
  262. package/script/deps/jsr.io/@std/assert/1.0.11/string_includes.d.ts.map +0 -1
  263. package/script/deps/jsr.io/@std/assert/1.0.11/string_includes.js +0 -29
  264. package/script/deps/jsr.io/@std/assert/1.0.11/throws.d.ts +0 -45
  265. package/script/deps/jsr.io/@std/assert/1.0.11/throws.js +0 -47
  266. package/script/deps/jsr.io/@std/assert/1.0.11/unimplemented.d.ts +0 -15
  267. package/script/deps/jsr.io/@std/assert/1.0.11/unimplemented.d.ts.map +0 -1
  268. package/script/deps/jsr.io/@std/assert/1.0.11/unimplemented.js +0 -23
  269. package/script/deps/jsr.io/@std/internal/1.0.5/types.js +0 -3
  270. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.d.ts +0 -0
  271. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.js +0 -0
  272. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.d.ts +0 -0
  273. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.js +0 -0
  274. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.d.ts +0 -0
  275. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.js +0 -0
  276. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.d.ts +0 -0
  277. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.d.ts +0 -0
  278. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.js +0 -0
  279. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.d.ts +0 -0
  280. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.js +0 -0
  281. /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/build_message.d.ts +0 -0
  282. /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/diff.d.ts +0 -0
  283. /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/diff_str.d.ts +0 -0
  284. /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/format.d.ts +0 -0
  285. /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/styles.d.ts +0 -0
  286. /package/esm/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/types.d.ts +0 -0
  287. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.d.ts +0 -0
  288. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.js +0 -0
  289. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.d.ts +0 -0
  290. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.js +0 -0
  291. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.d.ts +0 -0
  292. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.js +0 -0
  293. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.d.ts +0 -0
  294. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.d.ts +0 -0
  295. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.js +0 -0
  296. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.d.ts +0 -0
  297. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.js +0 -0
  298. /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/build_message.d.ts +0 -0
  299. /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/diff.d.ts +0 -0
  300. /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/diff_str.d.ts +0 -0
  301. /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/format.d.ts +0 -0
  302. /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/styles.d.ts +0 -0
  303. /package/script/deps/jsr.io/@std/internal/{1.0.5 → 1.0.6}/types.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.12/pool.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAC5B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,EACrC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAClC,qBAAqB,CAAC,CAAC,CAAC,CAqE1B"}
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
+ // This module is browser compatible.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.pooledMap = pooledMap;
6
+ /** Error message emitted from the thrown error while mapping. */
7
+ const ERROR_WHILE_MAPPING_MESSAGE = "Cannot complete the mapping as an error was thrown from an item";
8
+ /**
9
+ * pooledMap transforms values from an (async) iterable into another async
10
+ * iterable. The transforms are done concurrently, with a max concurrency
11
+ * defined by the poolLimit.
12
+ *
13
+ * If an error is thrown from `iterableFn`, no new transformations will begin.
14
+ * All currently executing transformations are allowed to finish and still
15
+ * yielded on success. After that, the rejections among them are gathered and
16
+ * thrown by the iterator in an `AggregateError`.
17
+ *
18
+ * @example Usage
19
+ * ```ts
20
+ * import { pooledMap } from "@std/async/pool";
21
+ * import { assertEquals } from "@std/assert";
22
+ *
23
+ * const results = pooledMap(
24
+ * 2,
25
+ * [1, 2, 3],
26
+ * (i) => new Promise((r) => setTimeout(() => r(i), 1000)),
27
+ * );
28
+ *
29
+ * assertEquals(await Array.fromAsync(results), [1, 2, 3]);
30
+ * ```
31
+ *
32
+ * @typeParam T the input type.
33
+ * @typeParam R the output type.
34
+ * @param poolLimit The maximum count of items being processed concurrently.
35
+ * @param array The input array for mapping.
36
+ * @param iteratorFn The function to call for every item of the array.
37
+ * @returns The async iterator with the transformed values.
38
+ */
39
+ function pooledMap(poolLimit, array, iteratorFn) {
40
+ // Create the async iterable that is returned from this function.
41
+ const res = new TransformStream({
42
+ async transform(p, controller) {
43
+ try {
44
+ const s = await p;
45
+ controller.enqueue(s);
46
+ }
47
+ catch (e) {
48
+ if (e instanceof AggregateError &&
49
+ e.message === ERROR_WHILE_MAPPING_MESSAGE) {
50
+ controller.error(e);
51
+ }
52
+ }
53
+ },
54
+ });
55
+ // Start processing items from the iterator
56
+ (async () => {
57
+ const writer = res.writable.getWriter();
58
+ const executing = [];
59
+ try {
60
+ for await (const item of array) {
61
+ const p = Promise.resolve().then(() => iteratorFn(item));
62
+ // Only write on success. If we `writer.write()` a rejected promise,
63
+ // that will end the iteration. We don't want that yet. Instead let it
64
+ // fail the race, taking us to the catch block where all currently
65
+ // executing jobs are allowed to finish and all rejections among them
66
+ // can be reported together.
67
+ writer.write(p);
68
+ const e = p.then(() => executing.splice(executing.indexOf(e), 1));
69
+ executing.push(e);
70
+ if (executing.length >= poolLimit) {
71
+ await Promise.race(executing);
72
+ }
73
+ }
74
+ // Wait until all ongoing events have processed, then close the writer.
75
+ await Promise.all(executing);
76
+ writer.close();
77
+ }
78
+ catch {
79
+ const errors = [];
80
+ for (const result of await Promise.allSettled(executing)) {
81
+ if (result.status === "rejected") {
82
+ errors.push(result.reason);
83
+ }
84
+ }
85
+ writer.write(Promise.reject(new AggregateError(errors, ERROR_WHILE_MAPPING_MESSAGE))).catch(() => { });
86
+ }
87
+ })();
88
+ // Feature test until browser coverage is adequate
89
+ return Symbol.asyncIterator in res.readable &&
90
+ typeof res.readable[Symbol.asyncIterator] === "function"
91
+ ? res.readable[Symbol.asyncIterator]()
92
+ : (async function* () {
93
+ const reader = res.readable.getReader();
94
+ while (true) {
95
+ const { done, value } = await reader.read();
96
+ if (done)
97
+ break;
98
+ yield value;
99
+ }
100
+ reader.releaseLock();
101
+ })();
102
+ }
@@ -0,0 +1,110 @@
1
+ /**
2
+ * Error thrown in {@linkcode retry} once the maximum number of failed attempts
3
+ * has been reached.
4
+ *
5
+ * @example Usage
6
+ * ```ts no-assert ignore
7
+ * import { RetryError } from "@std/async/retry";
8
+ *
9
+ * throw new RetryError({ foo: "bar" }, 3);
10
+ * ```
11
+ */
12
+ export declare class RetryError extends Error {
13
+ /**
14
+ * Constructs a new {@linkcode RetryError} instance.
15
+ *
16
+ * @param cause the cause for this error.
17
+ * @param attempts the number of retry attempts made.
18
+ */
19
+ constructor(cause: unknown, attempts: number);
20
+ }
21
+ /** Options for {@linkcode retry}. */
22
+ export interface RetryOptions {
23
+ /**
24
+ * How much to backoff after each retry.
25
+ *
26
+ * @default {2}
27
+ */
28
+ multiplier?: number;
29
+ /**
30
+ * The maximum milliseconds between attempts.
31
+ *
32
+ * @default {60000}
33
+ */
34
+ maxTimeout?: number;
35
+ /**
36
+ * The maximum amount of attempts until failure.
37
+ *
38
+ * @default {5}
39
+ */
40
+ maxAttempts?: number;
41
+ /**
42
+ * The initial and minimum amount of milliseconds between attempts.
43
+ *
44
+ * @default {1000}
45
+ */
46
+ minTimeout?: number;
47
+ /**
48
+ * Amount of jitter to introduce to the time between attempts. This is `1`
49
+ * for full jitter by default.
50
+ *
51
+ * @default {1}
52
+ */
53
+ jitter?: number;
54
+ }
55
+ /**
56
+ * Calls the given (possibly asynchronous) function up to `maxAttempts` times.
57
+ * Retries as long as the given function throws. If the attempts are exhausted,
58
+ * throws a {@linkcode RetryError} with `cause` set to the inner exception.
59
+ *
60
+ * The backoff is calculated by multiplying `minTimeout` with `multiplier` to the power of the current attempt counter (starting at 0 up to `maxAttempts - 1`). It is capped at `maxTimeout` however.
61
+ * How long the actual delay is, depends on `jitter`.
62
+ *
63
+ * When `jitter` is the default value of `1`, waits between two attempts for a
64
+ * randomized amount between 0 and the backoff time. With the default options
65
+ * the maximal delay will be `15s = 1s + 2s + 4s + 8s`. If all five attempts
66
+ * are exhausted the mean delay will be `9.5s = ½(4s + 15s)`.
67
+ *
68
+ * When `jitter` is `0`, waits the full backoff time.
69
+ *
70
+ * @example Example configuration 1
71
+ * ```ts no-assert
72
+ * import { retry } from "@std/async/retry";
73
+ * const req = async () => {
74
+ * // some function that throws sometimes
75
+ * };
76
+ *
77
+ * // Below resolves to the first non-error result of `req`
78
+ * const retryPromise = await retry(req, {
79
+ * multiplier: 2,
80
+ * maxTimeout: 60000,
81
+ * maxAttempts: 5,
82
+ * minTimeout: 100,
83
+ * jitter: 1,
84
+ * });
85
+ * ```
86
+ *
87
+ * @example Example configuration 2
88
+ * ```ts no-assert
89
+ * import { retry } from "@std/async/retry";
90
+ * const req = async () => {
91
+ * // some function that throws sometimes
92
+ * };
93
+ *
94
+ * // Make sure we wait at least 1 minute, but at most 2 minutes
95
+ * const retryPromise = await retry(req, {
96
+ * multiplier: 2.34,
97
+ * maxTimeout: 80000,
98
+ * maxAttempts: 7,
99
+ * minTimeout: 1000,
100
+ * jitter: 0.5,
101
+ * });
102
+ * ```
103
+ *
104
+ * @typeParam T The return type of the function to retry and returned promise.
105
+ * @param fn The function to retry.
106
+ * @param options Additional options.
107
+ * @returns The promise that resolves with the value returned by the function to retry.
108
+ */
109
+ export declare function retry<T>(fn: (() => Promise<T>) | (() => T), options?: RetryOptions): Promise<T>;
110
+ //# sourceMappingURL=retry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.12/retry.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACnC;;;;;OAKG;gBACS,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM;CAK7C;AAED,qCAAqC;AACrC,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAsB,KAAK,CAAC,CAAC,EAC3B,EAAE,EAAE,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAClC,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,CAAC,CAAC,CA6CZ"}
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
+ // This module is browser compatible.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.RetryError = void 0;
6
+ exports.retry = retry;
7
+ const _util_js_1 = require("./_util.js");
8
+ /**
9
+ * Error thrown in {@linkcode retry} once the maximum number of failed attempts
10
+ * has been reached.
11
+ *
12
+ * @example Usage
13
+ * ```ts no-assert ignore
14
+ * import { RetryError } from "@std/async/retry";
15
+ *
16
+ * throw new RetryError({ foo: "bar" }, 3);
17
+ * ```
18
+ */
19
+ class RetryError extends Error {
20
+ /**
21
+ * Constructs a new {@linkcode RetryError} instance.
22
+ *
23
+ * @param cause the cause for this error.
24
+ * @param attempts the number of retry attempts made.
25
+ */
26
+ constructor(cause, attempts) {
27
+ super(`Retrying exceeded the maxAttempts (${attempts}).`);
28
+ this.name = "RetryError";
29
+ this.cause = cause;
30
+ }
31
+ }
32
+ exports.RetryError = RetryError;
33
+ /**
34
+ * Calls the given (possibly asynchronous) function up to `maxAttempts` times.
35
+ * Retries as long as the given function throws. If the attempts are exhausted,
36
+ * throws a {@linkcode RetryError} with `cause` set to the inner exception.
37
+ *
38
+ * The backoff is calculated by multiplying `minTimeout` with `multiplier` to the power of the current attempt counter (starting at 0 up to `maxAttempts - 1`). It is capped at `maxTimeout` however.
39
+ * How long the actual delay is, depends on `jitter`.
40
+ *
41
+ * When `jitter` is the default value of `1`, waits between two attempts for a
42
+ * randomized amount between 0 and the backoff time. With the default options
43
+ * the maximal delay will be `15s = 1s + 2s + 4s + 8s`. If all five attempts
44
+ * are exhausted the mean delay will be `9.5s = ½(4s + 15s)`.
45
+ *
46
+ * When `jitter` is `0`, waits the full backoff time.
47
+ *
48
+ * @example Example configuration 1
49
+ * ```ts no-assert
50
+ * import { retry } from "@std/async/retry";
51
+ * const req = async () => {
52
+ * // some function that throws sometimes
53
+ * };
54
+ *
55
+ * // Below resolves to the first non-error result of `req`
56
+ * const retryPromise = await retry(req, {
57
+ * multiplier: 2,
58
+ * maxTimeout: 60000,
59
+ * maxAttempts: 5,
60
+ * minTimeout: 100,
61
+ * jitter: 1,
62
+ * });
63
+ * ```
64
+ *
65
+ * @example Example configuration 2
66
+ * ```ts no-assert
67
+ * import { retry } from "@std/async/retry";
68
+ * const req = async () => {
69
+ * // some function that throws sometimes
70
+ * };
71
+ *
72
+ * // Make sure we wait at least 1 minute, but at most 2 minutes
73
+ * const retryPromise = await retry(req, {
74
+ * multiplier: 2.34,
75
+ * maxTimeout: 80000,
76
+ * maxAttempts: 7,
77
+ * minTimeout: 1000,
78
+ * jitter: 0.5,
79
+ * });
80
+ * ```
81
+ *
82
+ * @typeParam T The return type of the function to retry and returned promise.
83
+ * @param fn The function to retry.
84
+ * @param options Additional options.
85
+ * @returns The promise that resolves with the value returned by the function to retry.
86
+ */
87
+ async function retry(fn, options) {
88
+ const { multiplier = 2, maxTimeout = 60000, maxAttempts = 5, minTimeout = 1000, jitter = 1, } = options ?? {};
89
+ if (maxTimeout <= 0) {
90
+ throw new TypeError(`Cannot retry as 'maxTimeout' must be positive: current value is ${maxTimeout}`);
91
+ }
92
+ if (minTimeout > maxTimeout) {
93
+ throw new TypeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${minTimeout}', 'maxTimeout=${maxTimeout}'`);
94
+ }
95
+ if (jitter > 1) {
96
+ throw new TypeError(`Cannot retry as 'jitter' must be <= 1: current value is ${jitter}`);
97
+ }
98
+ let attempt = 0;
99
+ while (true) {
100
+ try {
101
+ return await fn();
102
+ }
103
+ catch (error) {
104
+ if (attempt + 1 >= maxAttempts) {
105
+ throw new RetryError(error, maxAttempts);
106
+ }
107
+ const timeout = (0, _util_js_1.exponentialBackoffWithJitter)(maxTimeout, minTimeout, attempt, multiplier, jitter);
108
+ await new Promise((r) => setTimeout(r, timeout));
109
+ }
110
+ attempt++;
111
+ }
112
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Utility for representing n-tuple. Used in {@linkcode tee}.
3
+ *
4
+ * @internal
5
+ */
6
+ export type Tuple<T, N extends number> = N extends N ? number extends N ? T[] : TupleOf<T, N, []> : never;
7
+ /**
8
+ * Utility for representing n-tuple of. Used in {@linkcode Tuple}.
9
+ *
10
+ * @internal
11
+ */
12
+ export type TupleOf<T, N extends number, R extends unknown[]> = R["length"] extends N ? R : TupleOf<T, N, [T, ...R]>;
13
+ /**
14
+ * Branches the given async iterable into the `n` branches.
15
+ *
16
+ * @example Usage
17
+ * ```ts
18
+ * import { tee } from "@std/async/tee";
19
+ * import { assertEquals } from "@std/assert";
20
+ *
21
+ * const gen = async function* gen() {
22
+ * yield 1;
23
+ * yield 2;
24
+ * yield 3;
25
+ * };
26
+ *
27
+ * const [branch1, branch2] = tee(gen());
28
+ *
29
+ * const result1 = await Array.fromAsync(branch1);
30
+ * assertEquals(result1, [1, 2, 3]);
31
+ *
32
+ * const result2 = await Array.fromAsync(branch2);
33
+ * assertEquals(result2, [1, 2, 3]);
34
+ * ```
35
+ *
36
+ * @typeParam T The type of the provided async iterable and the returned async iterables.
37
+ * @typeParam N The amount of branches to tee into.
38
+ * @param iterable The iterable to tee.
39
+ * @param n The amount of branches to tee into.
40
+ * @returns The tuple where each element is an async iterable.
41
+ */
42
+ export declare function tee<T, N extends number = 2>(iterable: AsyncIterable<T>, n?: N): Tuple<AsyncIterable<T>, N>;
43
+ //# sourceMappingURL=tee.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tee.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.12/tee.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,CAAC,GAChD,MAAM,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAC1C,KAAK,CAAC;AAEV;;;;GAIG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,OAAO,EAAE,IAC1D,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,GACrB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAuC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,CAAC,EACzC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,CAAC,GAAE,CAAU,GACZ,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAuB5B"}
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
+ // This module is browser compatible.
4
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
5
+ if (kind === "m") throw new TypeError("Private method is not writable");
6
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
7
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
8
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
9
+ };
10
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
13
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
14
+ };
15
+ var _Queue_source, _Queue_queue;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.tee = tee;
18
+ class Queue {
19
+ constructor(iterable) {
20
+ _Queue_source.set(this, void 0);
21
+ _Queue_queue.set(this, void 0);
22
+ Object.defineProperty(this, "head", {
23
+ enumerable: true,
24
+ configurable: true,
25
+ writable: true,
26
+ value: void 0
27
+ });
28
+ Object.defineProperty(this, "done", {
29
+ enumerable: true,
30
+ configurable: true,
31
+ writable: true,
32
+ value: void 0
33
+ });
34
+ __classPrivateFieldSet(this, _Queue_source, iterable[Symbol.asyncIterator](), "f");
35
+ __classPrivateFieldSet(this, _Queue_queue, {
36
+ value: undefined,
37
+ next: undefined,
38
+ }, "f");
39
+ this.head = __classPrivateFieldGet(this, _Queue_queue, "f");
40
+ this.done = false;
41
+ }
42
+ async next() {
43
+ const result = await __classPrivateFieldGet(this, _Queue_source, "f").next();
44
+ if (!result.done) {
45
+ const nextNode = {
46
+ value: result.value,
47
+ next: undefined,
48
+ };
49
+ __classPrivateFieldGet(this, _Queue_queue, "f").next = nextNode;
50
+ __classPrivateFieldSet(this, _Queue_queue, nextNode, "f");
51
+ }
52
+ else {
53
+ this.done = true;
54
+ }
55
+ }
56
+ }
57
+ _Queue_source = new WeakMap(), _Queue_queue = new WeakMap();
58
+ /**
59
+ * Branches the given async iterable into the `n` branches.
60
+ *
61
+ * @example Usage
62
+ * ```ts
63
+ * import { tee } from "@std/async/tee";
64
+ * import { assertEquals } from "@std/assert";
65
+ *
66
+ * const gen = async function* gen() {
67
+ * yield 1;
68
+ * yield 2;
69
+ * yield 3;
70
+ * };
71
+ *
72
+ * const [branch1, branch2] = tee(gen());
73
+ *
74
+ * const result1 = await Array.fromAsync(branch1);
75
+ * assertEquals(result1, [1, 2, 3]);
76
+ *
77
+ * const result2 = await Array.fromAsync(branch2);
78
+ * assertEquals(result2, [1, 2, 3]);
79
+ * ```
80
+ *
81
+ * @typeParam T The type of the provided async iterable and the returned async iterables.
82
+ * @typeParam N The amount of branches to tee into.
83
+ * @param iterable The iterable to tee.
84
+ * @param n The amount of branches to tee into.
85
+ * @returns The tuple where each element is an async iterable.
86
+ */
87
+ function tee(iterable, n = 2) {
88
+ const queue = new Queue(iterable);
89
+ async function* generator() {
90
+ let buffer = queue.head;
91
+ while (true) {
92
+ if (buffer.next) {
93
+ buffer = buffer.next;
94
+ yield buffer.value;
95
+ }
96
+ else if (queue.done) {
97
+ return;
98
+ }
99
+ else {
100
+ await queue.next();
101
+ }
102
+ }
103
+ }
104
+ return Array.from({ length: n }).map(() => generator());
105
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"build_message.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.5/build_message.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,QAAQ;AAClB;;;GAGG;AACH,UAAU,UAAQ,GACjB,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CASvB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CASrD;AAED,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAC7C,OAAO,GAAE,mBAAwB,GAChC,MAAM,EAAE,CAsBV"}
1
+ {"version":3,"file":"build_message.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.6/build_message.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,QAAQ;AAClB;;;GAGG;AACH,UAAU,UAAQ,GACjB,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CASvB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CASrD;AAED,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAC7C,OAAO,GAAE,mBAAwB,GAChC,MAAM,EAAE,CAsBV"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
3
  // This module is browser compatible.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.createColor = createColor;
@@ -1 +1 @@
1
- {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.5/diff.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEvD,2DAA2D;AAC3D,MAAM,WAAW,aAAa;IAC5B,qCAAqC;IACrC,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;CACZ;AAMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAanD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,aAAa,CAWvE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,CAAC,EAAE,CAAC,EAAE,EACN,CAAC,EAAE,CAAC,EAAE,EACN,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,WAAW,EACnB,kBAAkB,EAAE,MAAM,GACzB,KAAK,CAAC;IACP,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,CAAC,CAAC;CACV,CAAC,CAgCD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,QAAQ,CACtB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,WAAW,EACnB,kBAAkB,EAAE,MAAM,EAC1B,GAAG,EAAE,MAAM,EACX,KAAK,CAAC,EAAE,aAAa,EACrB,IAAI,CAAC,EAAE,aAAa,GACnB,aAAa,CAsBf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAwEvD"}
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.6/diff.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEvD,2DAA2D;AAC3D,MAAM,WAAW,aAAa;IAC5B,qCAAqC;IACrC,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;CACZ;AAMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAanD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,aAAa,CAWvE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,CAAC,EAAE,CAAC,EAAE,EACN,CAAC,EAAE,CAAC,EAAE,EACN,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,WAAW,EACnB,kBAAkB,EAAE,MAAM,GACzB,KAAK,CAAC;IACP,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,CAAC,CAAC;CACV,CAAC,CAgCD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,QAAQ,CACtB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,WAAW,EACnB,kBAAkB,EAAE,MAAM,EAC1B,GAAG,EAAE,MAAM,EACX,KAAK,CAAC,EAAE,aAAa,EACrB,IAAI,CAAC,EAAE,aAAa,GACnB,aAAa,CAsBf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAwEvD"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
3
  // This module is browser compatible.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.createCommon = createCommon;
@@ -1 +1 @@
1
- {"version":3,"file":"diff_str.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.5/diff_str.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAW/C;AAID;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,UAAQ,GAAG,MAAM,EAAE,CAiBnE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EACxB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,GAC3B,UAAU,CAAC,MAAM,CAAC,EAAE,CAetB;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,EAAE,CAkDlE"}
1
+ {"version":3,"file":"diff_str.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.6/diff_str.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAY/C;AAKD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,UAAQ,GAAG,MAAM,EAAE,CAiBnE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EACxB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,GAC3B,UAAU,CAAC,MAAM,CAAC,EAAE,CAetB;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,EAAE,CAkDlE"}
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
+ // This module is browser compatible.
2
4
  Object.defineProperty(exports, "__esModule", { value: true });
3
5
  exports.unescape = unescape;
4
6
  exports.tokenize = tokenize;
@@ -24,6 +26,7 @@ const diff_js_1 = require("./diff.js");
24
26
  */
25
27
  function unescape(string) {
26
28
  return string
29
+ .replaceAll("\\", "\\\\")
27
30
  .replaceAll("\b", "\\b")
28
31
  .replaceAll("\f", "\\f")
29
32
  .replaceAll("\t", "\\t")
@@ -31,7 +34,7 @@ function unescape(string) {
31
34
  // This does not remove line breaks
32
35
  .replaceAll(/\r\n|\r|\n/g, (str) => str === "\r" ? "\\r" : str === "\n" ? "\\n\n" : "\\r\\n\r\n");
33
36
  }
34
- const WHITESPACE_SYMBOLS = /([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/;
37
+ const WHITESPACE_SYMBOLS = /((?:\\[bftv]|[^\S\r\n])+|\\[rn\\]|[()[\]{}'"\r\n]|\b)/;
35
38
  /**
36
39
  * Tokenizes a string into an array of tokens.
37
40
  *
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.5/format.ts"],"names":[],"mappings":"AAuBA,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAezC"}
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.6/format.ts"],"names":[],"mappings":"AAuBA,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAezC"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
3
  // This module is browser compatible.
4
4
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
5
  if (k2 === undefined) k2 = k;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.5/styles.ts"],"names":[],"mappings":"AAqCA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3C;AAWD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.6/styles.ts"],"names":[],"mappings":"AAqCA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3C;AAWD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
3
  // This module is browser compatible.
4
4
  // A module to print ANSI terminal colors. Inspired by chalk, kleur, and colors
5
5
  // on npm.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.5/types.ts"],"names":[],"mappings":"AAEA,kDAAkD;AAClD,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,4BAA4B;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,6BAA6B;IAC7B,KAAK,EAAE,CAAC,CAAC;IACT,+BAA+B;IAC/B,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;CAC3B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.6/types.ts"],"names":[],"mappings":"AAGA,kDAAkD;AAClD,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,4BAA4B;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,6BAA6B;IAC7B,KAAK,EAAE,CAAC,CAAC;IACT,+BAA+B;IAC/B,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;CAC3B"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
+ // This module is browser compatible.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -117,7 +117,7 @@ class Session {
117
117
  return this.transport.connection.connected;
118
118
  }
119
119
  async connect() {
120
- const release = await __classPrivateFieldGet(this, _Session_connectMutex, "f").lock();
120
+ const unlock = await __classPrivateFieldGet(this, _Session_connectMutex, "f").lock();
121
121
  try {
122
122
  if (this.connected) {
123
123
  return;
@@ -128,7 +128,7 @@ class Session {
128
128
  __classPrivateFieldSet(this, _Session_disconnected, false, "f");
129
129
  }
130
130
  finally {
131
- release();
131
+ unlock();
132
132
  }
133
133
  }
134
134
  async waitUntilConnected() {
@@ -167,7 +167,7 @@ _Session_dc = new WeakMap(), _Session_cdn = new WeakMap(), _Session_lastConnect
167
167
  }
168
168
  if (__classPrivateFieldGet(this, _Session_lastConnect, "f") && Date.now() - __classPrivateFieldGet(this, _Session_lastConnect, "f").getTime() <= 10 * _0_deps_js_1.SECOND) {
169
169
  __classPrivateFieldGet(this, _Session_L, "f").debug("reconnecting after a delay");
170
- await new Promise((r) => setTimeout(r, 3 * _0_deps_js_1.SECOND));
170
+ await (0, _0_deps_js_1.delay)(3 * _0_deps_js_1.SECOND);
171
171
  }
172
172
  else {
173
173
  __classPrivateFieldGet(this, _Session_L, "f").debug("reconnecting");
@@ -1 +1 @@
1
- {"version":3,"file":"2_session_encrypted.d.ts","sourceRoot":"","sources":["../../src/session/2_session_encrypted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAA8C,OAAO,EAAuC,MAAM,YAAY,CAAC;AACtH,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AASxD,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC;IACtC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,SAAS,KAAK,IAAI,CAAC;IAC5D,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CACxD;AAQD,qBAAa,gBAAiB,SAAQ,OAAQ,YAAW,OAAO;;IAI9D,QAAQ,EAAE,QAAQ,CAAM;gBAQZ,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,aAAa;IAMpC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC;IAM7C,IAAI,OAAO,IAAI,UAAU,CAExB;IAEc,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAU9B,UAAU,IAAI,IAAI;IAuDrB,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;CA4U9C"}
1
+ {"version":3,"file":"2_session_encrypted.d.ts","sourceRoot":"","sources":["../../src/session/2_session_encrypted.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAA8C,OAAO,EAAuC,MAAM,YAAY,CAAC;AACtH,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AASxD,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC;IACtC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,SAAS,KAAK,IAAI,CAAC;IAC5D,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CACxD;AAQD,qBAAa,gBAAiB,SAAQ,OAAQ,YAAW,OAAO;;IAI9D,QAAQ,EAAE,QAAQ,CAAM;gBAQZ,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,aAAa;IAMpC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC;IAM7C,IAAI,OAAO,IAAI,UAAU,CAExB;IAEc,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAa9B,UAAU,IAAI,IAAI;IAuDrB,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;CAsU9C"}
@@ -78,6 +78,9 @@ class SessionEncrypted extends _1_session_js_1.Session {
78
78
  return __classPrivateFieldGet(this, _SessionEncrypted_authKey, "f");
79
79
  }
80
80
  async connect() {
81
+ if (!this.connected) {
82
+ __classPrivateFieldGet(this, _SessionEncrypted_instances, "m", _SessionEncrypted_rejectAllPending).call(this, new _0_errors_js_1.ConnectionError("Not connected."));
83
+ }
81
84
  await super.connect();
82
85
  if (!__classPrivateFieldGet(_a, _a, "f", _SessionEncrypted_TGCRYPTO_INITED)) {
83
86
  await (0, _0_deps_js_1.initTgCrypto)();
@@ -387,13 +390,7 @@ async function _SessionEncrypted_onMessage(msgId, body) {
387
390
  while (this.connected) {
388
391
  const then = Date.now();
389
392
  try {
390
- await new Promise((resolve, reject) => {
391
- const timeout = setTimeout(resolve, __classPrivateFieldGet(this, _SessionEncrypted_pingInterval, "f") - timeElapsed);
392
- __classPrivateFieldGet(this, _SessionEncrypted_pingLoopAbortController, "f").signal.onabort = () => {
393
- reject(__classPrivateFieldGet(this, _SessionEncrypted_pingLoopAbortController, "f")?.signal.reason);
394
- clearTimeout(timeout);
395
- };
396
- });
393
+ await (0, _0_deps_js_1.delay)(__classPrivateFieldGet(this, _SessionEncrypted_pingInterval, "f") - timeElapsed, { signal: __classPrivateFieldGet(this, _SessionEncrypted_pingLoopAbortController, "f").signal });
397
394
  if (!this.connected) {
398
395
  continue;
399
396
  }