@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":"deadline.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.12/deadline.ts"],"names":[],"mappings":"AAKA,wCAAwC;AACxC,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,QAAQ,CAAC,CAAC,EAC9B,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EACb,EAAE,EAAE,MAAM,EACV,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,CAAC,CAAC,CAIZ"}
@@ -0,0 +1,41 @@
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.deadline = deadline;
6
+ const abortable_js_1 = require("./abortable.js");
7
+ /**
8
+ * Create a promise which will be rejected with {@linkcode DOMException} when
9
+ * a given delay is exceeded.
10
+ *
11
+ * Note: Prefer to use {@linkcode AbortSignal.timeout} instead for the APIs
12
+ * that accept {@linkcode AbortSignal}.
13
+ *
14
+ * @throws {DOMException & { name: "TimeoutError" }} If the provided duration
15
+ * runs out before resolving.
16
+ * @throws {DOMException & { name: "AbortError" }} If the optional signal is
17
+ * aborted with the default `reason` before resolving or timing out.
18
+ * @throws {AbortSignal["reason"]} If the optional signal is aborted with a
19
+ * custom `reason` before resolving or timing out.
20
+ * @typeParam T The type of the provided and returned promise.
21
+ * @param p The promise to make rejectable.
22
+ * @param ms Duration in milliseconds for when the promise should time out.
23
+ * @param options Additional options.
24
+ * @returns A promise that will reject if the provided duration runs out before resolving.
25
+ *
26
+ * @example Usage
27
+ * ```ts ignore
28
+ * import { deadline } from "@std/async/deadline";
29
+ * import { delay } from "@std/async/delay";
30
+ *
31
+ * const delayedPromise = delay(1_000);
32
+ * // Below throws `DOMException` after 10 ms
33
+ * const result = await deadline(delayedPromise, 10);
34
+ * ```
35
+ */
36
+ async function deadline(p, ms, options = {}) {
37
+ const signals = [AbortSignal.timeout(ms)];
38
+ if (options.signal)
39
+ signals.push(options.signal);
40
+ return await (0, abortable_js_1.abortable)(p, AbortSignal.any(signals));
41
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * A debounced function that will be delayed by a given `wait`
3
+ * time in milliseconds. If the method is called again before
4
+ * the timeout expires, the previous call will be aborted.
5
+ */
6
+ export interface DebouncedFunction<T extends Array<unknown>> {
7
+ (...args: T): void;
8
+ /** Clears the debounce timeout and omits calling the debounced function. */
9
+ clear(): void;
10
+ /** Clears the debounce timeout and calls the debounced function immediately. */
11
+ flush(): void;
12
+ /** Returns a boolean whether a debounce call is pending or not. */
13
+ readonly pending: boolean;
14
+ }
15
+ /**
16
+ * Creates a debounced function that delays the given `func`
17
+ * by a given `wait` time in milliseconds. If the method is called
18
+ * again before the timeout expires, the previous call will be
19
+ * aborted.
20
+ *
21
+ * @example Usage
22
+ * ```ts ignore
23
+ * import { debounce } from "@std/async/debounce";
24
+ *
25
+ * const log = debounce(
26
+ * (event: Deno.FsEvent) =>
27
+ * console.log("[%s] %s", event.kind, event.paths[0]),
28
+ * 200,
29
+ * );
30
+ *
31
+ * for await (const event of Deno.watchFs("./")) {
32
+ * log(event);
33
+ * }
34
+ * // wait 200ms ...
35
+ * // output: Function debounced after 200ms with baz
36
+ * ```
37
+ *
38
+ * @typeParam T The arguments of the provided function.
39
+ * @param fn The function to debounce.
40
+ * @param wait The time in milliseconds to delay the function.
41
+ * @returns The debounced function.
42
+ */
43
+ export declare function debounce<T extends Array<any>>(fn: (this: DebouncedFunction<T>, ...args: T) => void, wait: number): DebouncedFunction<T>;
44
+ //# sourceMappingURL=debounce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.12/debounce.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC;IACzD,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;IACnB,4EAA4E;IAC5E,KAAK,IAAI,IAAI,CAAC;IACd,gFAAgF;IAChF,KAAK,IAAI,IAAI,CAAC;IACd,mEAAmE;IACnE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,EAC3C,EAAE,EAAE,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,EACpD,IAAI,EAAE,MAAM,GACX,iBAAiB,CAAC,CAAC,CAAC,CA8BtB"}
@@ -0,0 +1,60 @@
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.debounce = debounce;
6
+ /**
7
+ * Creates a debounced function that delays the given `func`
8
+ * by a given `wait` time in milliseconds. If the method is called
9
+ * again before the timeout expires, the previous call will be
10
+ * aborted.
11
+ *
12
+ * @example Usage
13
+ * ```ts ignore
14
+ * import { debounce } from "@std/async/debounce";
15
+ *
16
+ * const log = debounce(
17
+ * (event: Deno.FsEvent) =>
18
+ * console.log("[%s] %s", event.kind, event.paths[0]),
19
+ * 200,
20
+ * );
21
+ *
22
+ * for await (const event of Deno.watchFs("./")) {
23
+ * log(event);
24
+ * }
25
+ * // wait 200ms ...
26
+ * // output: Function debounced after 200ms with baz
27
+ * ```
28
+ *
29
+ * @typeParam T The arguments of the provided function.
30
+ * @param fn The function to debounce.
31
+ * @param wait The time in milliseconds to delay the function.
32
+ * @returns The debounced function.
33
+ */
34
+ // deno-lint-ignore no-explicit-any
35
+ function debounce(fn, wait) {
36
+ let timeout = null;
37
+ let flush = null;
38
+ const debounced = ((...args) => {
39
+ debounced.clear();
40
+ flush = () => {
41
+ debounced.clear();
42
+ fn.call(debounced, ...args);
43
+ };
44
+ timeout = Number(setTimeout(flush, wait));
45
+ });
46
+ debounced.clear = () => {
47
+ if (typeof timeout === "number") {
48
+ clearTimeout(timeout);
49
+ timeout = null;
50
+ flush = null;
51
+ }
52
+ };
53
+ debounced.flush = () => {
54
+ flush?.();
55
+ };
56
+ Object.defineProperty(debounced, "pending", {
57
+ get: () => typeof timeout === "number",
58
+ });
59
+ return debounced;
60
+ }
@@ -0,0 +1,42 @@
1
+ export interface DelayOptions {
2
+ /** Signal used to abort the delay. */
3
+ signal?: AbortSignal;
4
+ /** Indicates whether the process should continue to run as long as the timer exists.
5
+ *
6
+ * @default {true}
7
+ */
8
+ persistent?: boolean;
9
+ }
10
+ /**
11
+ * Resolve a {@linkcode Promise} after a given amount of milliseconds.
12
+ *
13
+ * @throws {DOMException} If the optional signal is aborted before the delay
14
+ * duration, and `signal.reason` is undefined.
15
+ * @param ms Duration in milliseconds for how long the delay should last.
16
+ * @param options Additional options.
17
+ *
18
+ * @example Basic usage
19
+ * ```ts no-assert
20
+ * import { delay } from "@std/async/delay";
21
+ *
22
+ * // ...
23
+ * const delayedPromise = delay(100);
24
+ * const result = await delayedPromise;
25
+ * // ...
26
+ * ```
27
+ *
28
+ * @example Disable persistence
29
+ *
30
+ * Setting `persistent` to `false` will allow the process to continue to run as
31
+ * long as the timer exists.
32
+ *
33
+ * ```ts no-assert ignore
34
+ * import { delay } from "@std/async/delay";
35
+ *
36
+ * // ...
37
+ * await delay(100, { persistent: false });
38
+ * // ...
39
+ * ```
40
+ */
41
+ export declare function delay(ms: number, options?: DelayOptions): Promise<void>;
42
+ //# sourceMappingURL=delay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delay.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.12/delay.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC3B,sCAAsC;IACtC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B3E"}
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
+ // This module is browser compatible.
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || function (mod) {
21
+ if (mod && mod.__esModule) return mod;
22
+ var result = {};
23
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
+ __setModuleDefault(result, mod);
25
+ return result;
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.delay = delay;
29
+ /** Options for {@linkcode delay}. */
30
+ const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
31
+ /**
32
+ * Resolve a {@linkcode Promise} after a given amount of milliseconds.
33
+ *
34
+ * @throws {DOMException} If the optional signal is aborted before the delay
35
+ * duration, and `signal.reason` is undefined.
36
+ * @param ms Duration in milliseconds for how long the delay should last.
37
+ * @param options Additional options.
38
+ *
39
+ * @example Basic usage
40
+ * ```ts no-assert
41
+ * import { delay } from "@std/async/delay";
42
+ *
43
+ * // ...
44
+ * const delayedPromise = delay(100);
45
+ * const result = await delayedPromise;
46
+ * // ...
47
+ * ```
48
+ *
49
+ * @example Disable persistence
50
+ *
51
+ * Setting `persistent` to `false` will allow the process to continue to run as
52
+ * long as the timer exists.
53
+ *
54
+ * ```ts no-assert ignore
55
+ * import { delay } from "@std/async/delay";
56
+ *
57
+ * // ...
58
+ * await delay(100, { persistent: false });
59
+ * // ...
60
+ * ```
61
+ */
62
+ function delay(ms, options = {}) {
63
+ const { signal, persistent = true } = options;
64
+ if (signal?.aborted)
65
+ return Promise.reject(signal.reason);
66
+ return new Promise((resolve, reject) => {
67
+ const abort = () => {
68
+ clearTimeout(i);
69
+ reject(signal?.reason);
70
+ };
71
+ const done = () => {
72
+ signal?.removeEventListener("abort", abort);
73
+ resolve();
74
+ };
75
+ const i = setTimeout(done, ms);
76
+ signal?.addEventListener("abort", abort, { once: true });
77
+ if (persistent === false) {
78
+ try {
79
+ // @ts-ignore For browser compatibility
80
+ dntShim.Deno.unrefTimer(i);
81
+ }
82
+ catch (error) {
83
+ if (!(error instanceof ReferenceError)) {
84
+ throw error;
85
+ }
86
+ // deno-lint-ignore no-console
87
+ console.error("`persistent` option is only available in Deno");
88
+ }
89
+ }
90
+ });
91
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Provide helpers with asynchronous tasks like {@linkcode delay | delays},
3
+ * {@linkcode debounce | debouncing}, {@linkcode retry | retrying}, or
4
+ * {@linkcode pooledMap | pooling}.
5
+ *
6
+ * ```ts no-assert
7
+ * import { delay } from "@std/async/delay";
8
+ *
9
+ * await delay(100); // waits for 100 milliseconds
10
+ * ```
11
+ *
12
+ * @module
13
+ */
14
+ export * from "./abortable.js";
15
+ export * from "./deadline.js";
16
+ export * from "./debounce.js";
17
+ export * from "./delay.js";
18
+ export * from "./mux_async_iterator.js";
19
+ export * from "./pool.js";
20
+ export * from "./tee.js";
21
+ export * from "./retry.js";
22
+ //# sourceMappingURL=mod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.12/mod.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
+ // This module is browser compatible.
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ /**
20
+ * Provide helpers with asynchronous tasks like {@linkcode delay | delays},
21
+ * {@linkcode debounce | debouncing}, {@linkcode retry | retrying}, or
22
+ * {@linkcode pooledMap | pooling}.
23
+ *
24
+ * ```ts no-assert
25
+ * import { delay } from "@std/async/delay";
26
+ *
27
+ * await delay(100); // waits for 100 milliseconds
28
+ * ```
29
+ *
30
+ * @module
31
+ */
32
+ __exportStar(require("./abortable.js"), exports);
33
+ __exportStar(require("./deadline.js"), exports);
34
+ __exportStar(require("./debounce.js"), exports);
35
+ __exportStar(require("./delay.js"), exports);
36
+ __exportStar(require("./mux_async_iterator.js"), exports);
37
+ __exportStar(require("./pool.js"), exports);
38
+ __exportStar(require("./tee.js"), exports);
39
+ __exportStar(require("./retry.js"), exports);
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Multiplexes multiple async iterators into a single stream. It currently
3
+ * makes an assumption that the final result (the value returned and not
4
+ * yielded from the iterator) does not matter; if there is any result, it is
5
+ * discarded.
6
+ *
7
+ * @example Usage
8
+ * ```ts
9
+ * import { MuxAsyncIterator } from "@std/async/mux-async-iterator";
10
+ * import { assertEquals } from "@std/assert";
11
+ *
12
+ * async function* gen123(): AsyncIterableIterator<number> {
13
+ * yield 1;
14
+ * yield 2;
15
+ * yield 3;
16
+ * }
17
+ *
18
+ * async function* gen456(): AsyncIterableIterator<number> {
19
+ * yield 4;
20
+ * yield 5;
21
+ * yield 6;
22
+ * }
23
+ *
24
+ * const mux = new MuxAsyncIterator<number>();
25
+ * mux.add(gen123());
26
+ * mux.add(gen456());
27
+ *
28
+ * const result = await Array.fromAsync(mux);
29
+ *
30
+ * assertEquals(result, [1, 4, 2, 5, 3, 6]);
31
+ * ```
32
+ *
33
+ * @typeParam T The type of the provided async iterables and generated async iterable.
34
+ */
35
+ export declare class MuxAsyncIterator<T> implements AsyncIterable<T> {
36
+ #private;
37
+ /**
38
+ * Add an async iterable to the stream.
39
+ *
40
+ * @param iterable The async iterable to add.
41
+ *
42
+ * @example Usage
43
+ * ```ts
44
+ * import { MuxAsyncIterator } from "@std/async/mux-async-iterator";
45
+ * import { assertEquals } from "@std/assert";
46
+ *
47
+ * async function* gen123(): AsyncIterableIterator<number> {
48
+ * yield 1;
49
+ * yield 2;
50
+ * yield 3;
51
+ * }
52
+ *
53
+ * const mux = new MuxAsyncIterator<number>();
54
+ * mux.add(gen123());
55
+ *
56
+ * const result = await Array.fromAsync(mux.iterate());
57
+ *
58
+ * assertEquals(result, [1, 2, 3]);
59
+ * ```
60
+ */
61
+ add(iterable: AsyncIterable<T>): void;
62
+ /**
63
+ * Returns an async iterator of the stream.
64
+ * @returns the async iterator for all the added async iterables.
65
+ *
66
+ * @example Usage
67
+ * ```ts
68
+ * import { MuxAsyncIterator } from "@std/async/mux-async-iterator";
69
+ * import { assertEquals } from "@std/assert";
70
+ *
71
+ * async function* gen123(): AsyncIterableIterator<number> {
72
+ * yield 1;
73
+ * yield 2;
74
+ * yield 3;
75
+ * }
76
+ *
77
+ * const mux = new MuxAsyncIterator<number>();
78
+ * mux.add(gen123());
79
+ *
80
+ * const result = await Array.fromAsync(mux.iterate());
81
+ *
82
+ * assertEquals(result, [1, 2, 3]);
83
+ * ```
84
+ */
85
+ iterate(): AsyncIterableIterator<T>;
86
+ /**
87
+ * Implements an async iterator for the stream.
88
+ * @returns the async iterator for all the added async iterables.
89
+ *
90
+ * @example Usage
91
+ * ```ts
92
+ * import { MuxAsyncIterator } from "@std/async/mux-async-iterator";
93
+ * import { assertEquals } from "@std/assert";
94
+ *
95
+ * async function* gen123(): AsyncIterableIterator<number> {
96
+ * yield 1;
97
+ * yield 2;
98
+ * yield 3;
99
+ * }
100
+ *
101
+ * const mux = new MuxAsyncIterator<number>();
102
+ * mux.add(gen123());
103
+ *
104
+ * const result = await Array.fromAsync(mux);
105
+ *
106
+ * assertEquals(result, [1, 2, 3]);
107
+ * ```
108
+ */
109
+ [Symbol.asyncIterator](): AsyncIterator<T>;
110
+ }
111
+ //# sourceMappingURL=mux_async_iterator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mux_async_iterator.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,gBAAgB,CAAC,CAAC,CAAE,YAAW,aAAa,CAAC,CAAC,CAAC;;IAO1D;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,GAAG,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;IAqB9B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACI,OAAO,IAAI,qBAAqB,CAAC,CAAC,CAAC;IAsB1C;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC;CAG3C"}
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
+ // This module is browser compatible.
4
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
5
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
6
+ 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");
7
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
8
+ };
9
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10
+ if (kind === "m") throw new TypeError("Private method is not writable");
11
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
12
+ 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");
13
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
14
+ };
15
+ var _MuxAsyncIterator_instances, _MuxAsyncIterator_iteratorCount, _MuxAsyncIterator_yields, _MuxAsyncIterator_throws, _MuxAsyncIterator_signal, _MuxAsyncIterator_callIteratorNext;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.MuxAsyncIterator = void 0;
18
+ /**
19
+ * Multiplexes multiple async iterators into a single stream. It currently
20
+ * makes an assumption that the final result (the value returned and not
21
+ * yielded from the iterator) does not matter; if there is any result, it is
22
+ * discarded.
23
+ *
24
+ * @example Usage
25
+ * ```ts
26
+ * import { MuxAsyncIterator } from "@std/async/mux-async-iterator";
27
+ * import { assertEquals } from "@std/assert";
28
+ *
29
+ * async function* gen123(): AsyncIterableIterator<number> {
30
+ * yield 1;
31
+ * yield 2;
32
+ * yield 3;
33
+ * }
34
+ *
35
+ * async function* gen456(): AsyncIterableIterator<number> {
36
+ * yield 4;
37
+ * yield 5;
38
+ * yield 6;
39
+ * }
40
+ *
41
+ * const mux = new MuxAsyncIterator<number>();
42
+ * mux.add(gen123());
43
+ * mux.add(gen456());
44
+ *
45
+ * const result = await Array.fromAsync(mux);
46
+ *
47
+ * assertEquals(result, [1, 4, 2, 5, 3, 6]);
48
+ * ```
49
+ *
50
+ * @typeParam T The type of the provided async iterables and generated async iterable.
51
+ */
52
+ class MuxAsyncIterator {
53
+ constructor() {
54
+ _MuxAsyncIterator_instances.add(this);
55
+ _MuxAsyncIterator_iteratorCount.set(this, 0);
56
+ _MuxAsyncIterator_yields.set(this, []);
57
+ // deno-lint-ignore no-explicit-any
58
+ _MuxAsyncIterator_throws.set(this, []);
59
+ _MuxAsyncIterator_signal.set(this, Promise.withResolvers());
60
+ }
61
+ /**
62
+ * Add an async iterable to the stream.
63
+ *
64
+ * @param iterable The async iterable to add.
65
+ *
66
+ * @example Usage
67
+ * ```ts
68
+ * import { MuxAsyncIterator } from "@std/async/mux-async-iterator";
69
+ * import { assertEquals } from "@std/assert";
70
+ *
71
+ * async function* gen123(): AsyncIterableIterator<number> {
72
+ * yield 1;
73
+ * yield 2;
74
+ * yield 3;
75
+ * }
76
+ *
77
+ * const mux = new MuxAsyncIterator<number>();
78
+ * mux.add(gen123());
79
+ *
80
+ * const result = await Array.fromAsync(mux.iterate());
81
+ *
82
+ * assertEquals(result, [1, 2, 3]);
83
+ * ```
84
+ */
85
+ add(iterable) {
86
+ var _a;
87
+ __classPrivateFieldSet(this, _MuxAsyncIterator_iteratorCount, (_a = __classPrivateFieldGet(this, _MuxAsyncIterator_iteratorCount, "f"), ++_a), "f");
88
+ __classPrivateFieldGet(this, _MuxAsyncIterator_instances, "m", _MuxAsyncIterator_callIteratorNext).call(this, iterable[Symbol.asyncIterator]());
89
+ }
90
+ /**
91
+ * Returns an async iterator of the stream.
92
+ * @returns the async iterator for all the added async iterables.
93
+ *
94
+ * @example Usage
95
+ * ```ts
96
+ * import { MuxAsyncIterator } from "@std/async/mux-async-iterator";
97
+ * import { assertEquals } from "@std/assert";
98
+ *
99
+ * async function* gen123(): AsyncIterableIterator<number> {
100
+ * yield 1;
101
+ * yield 2;
102
+ * yield 3;
103
+ * }
104
+ *
105
+ * const mux = new MuxAsyncIterator<number>();
106
+ * mux.add(gen123());
107
+ *
108
+ * const result = await Array.fromAsync(mux.iterate());
109
+ *
110
+ * assertEquals(result, [1, 2, 3]);
111
+ * ```
112
+ */
113
+ async *iterate() {
114
+ while (__classPrivateFieldGet(this, _MuxAsyncIterator_iteratorCount, "f") > 0) {
115
+ // Sleep until any of the wrapped iterators yields.
116
+ await __classPrivateFieldGet(this, _MuxAsyncIterator_signal, "f").promise;
117
+ // Note that while we're looping over `yields`, new items may be added.
118
+ for (const { iterator, value } of __classPrivateFieldGet(this, _MuxAsyncIterator_yields, "f")) {
119
+ yield value;
120
+ __classPrivateFieldGet(this, _MuxAsyncIterator_instances, "m", _MuxAsyncIterator_callIteratorNext).call(this, iterator);
121
+ }
122
+ if (__classPrivateFieldGet(this, _MuxAsyncIterator_throws, "f").length) {
123
+ for (const e of __classPrivateFieldGet(this, _MuxAsyncIterator_throws, "f")) {
124
+ throw e;
125
+ }
126
+ }
127
+ // Clear the `yields` list and reset the `signal` promise.
128
+ __classPrivateFieldGet(this, _MuxAsyncIterator_yields, "f").length = 0;
129
+ __classPrivateFieldSet(this, _MuxAsyncIterator_signal, Promise.withResolvers(), "f");
130
+ }
131
+ }
132
+ /**
133
+ * Implements an async iterator for the stream.
134
+ * @returns the async iterator for all the added async iterables.
135
+ *
136
+ * @example Usage
137
+ * ```ts
138
+ * import { MuxAsyncIterator } from "@std/async/mux-async-iterator";
139
+ * import { assertEquals } from "@std/assert";
140
+ *
141
+ * async function* gen123(): AsyncIterableIterator<number> {
142
+ * yield 1;
143
+ * yield 2;
144
+ * yield 3;
145
+ * }
146
+ *
147
+ * const mux = new MuxAsyncIterator<number>();
148
+ * mux.add(gen123());
149
+ *
150
+ * const result = await Array.fromAsync(mux);
151
+ *
152
+ * assertEquals(result, [1, 2, 3]);
153
+ * ```
154
+ */
155
+ [(_MuxAsyncIterator_iteratorCount = new WeakMap(), _MuxAsyncIterator_yields = new WeakMap(), _MuxAsyncIterator_throws = new WeakMap(), _MuxAsyncIterator_signal = new WeakMap(), _MuxAsyncIterator_instances = new WeakSet(), _MuxAsyncIterator_callIteratorNext = async function _MuxAsyncIterator_callIteratorNext(iterator) {
156
+ var _a;
157
+ try {
158
+ const { value, done } = await iterator.next();
159
+ if (done) {
160
+ __classPrivateFieldSet(this, _MuxAsyncIterator_iteratorCount, (_a = __classPrivateFieldGet(this, _MuxAsyncIterator_iteratorCount, "f"), --_a), "f");
161
+ }
162
+ else {
163
+ __classPrivateFieldGet(this, _MuxAsyncIterator_yields, "f").push({ iterator, value });
164
+ }
165
+ }
166
+ catch (e) {
167
+ __classPrivateFieldGet(this, _MuxAsyncIterator_throws, "f").push(e);
168
+ }
169
+ __classPrivateFieldGet(this, _MuxAsyncIterator_signal, "f").resolve();
170
+ }, Symbol.asyncIterator)]() {
171
+ return this.iterate();
172
+ }
173
+ }
174
+ exports.MuxAsyncIterator = MuxAsyncIterator;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * pooledMap transforms values from an (async) iterable into another async
3
+ * iterable. The transforms are done concurrently, with a max concurrency
4
+ * defined by the poolLimit.
5
+ *
6
+ * If an error is thrown from `iterableFn`, no new transformations will begin.
7
+ * All currently executing transformations are allowed to finish and still
8
+ * yielded on success. After that, the rejections among them are gathered and
9
+ * thrown by the iterator in an `AggregateError`.
10
+ *
11
+ * @example Usage
12
+ * ```ts
13
+ * import { pooledMap } from "@std/async/pool";
14
+ * import { assertEquals } from "@std/assert";
15
+ *
16
+ * const results = pooledMap(
17
+ * 2,
18
+ * [1, 2, 3],
19
+ * (i) => new Promise((r) => setTimeout(() => r(i), 1000)),
20
+ * );
21
+ *
22
+ * assertEquals(await Array.fromAsync(results), [1, 2, 3]);
23
+ * ```
24
+ *
25
+ * @typeParam T the input type.
26
+ * @typeParam R the output type.
27
+ * @param poolLimit The maximum count of items being processed concurrently.
28
+ * @param array The input array for mapping.
29
+ * @param iteratorFn The function to call for every item of the array.
30
+ * @returns The async iterator with the transformed values.
31
+ */
32
+ export declare function pooledMap<T, R>(poolLimit: number, array: Iterable<T> | AsyncIterable<T>, iteratorFn: (data: T) => Promise<R>): AsyncIterableIterator<R>;
33
+ //# sourceMappingURL=pool.d.ts.map