@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
@@ -1 +1 @@
1
- {"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/equals.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAkBb"}
1
+ {"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/equals.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAkBb"}
@@ -1,10 +1,10 @@
1
1
  // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { equal } from "./equal.js";
4
- import { buildMessage } from "../../internal/1.0.5/build_message.js";
5
- import { diff } from "../../internal/1.0.5/diff.js";
6
- import { diffStr } from "../../internal/1.0.5/diff_str.js";
7
- import { format } from "../../internal/1.0.5/format.js";
4
+ import { buildMessage } from "../../internal/1.0.6/build_message.js";
5
+ import { diff } from "../../internal/1.0.6/diff.js";
6
+ import { diffStr } from "../../internal/1.0.6/diff_str.js";
7
+ import { format } from "../../internal/1.0.6/format.js";
8
8
  import { AssertionError } from "./assertion_error.js";
9
9
  /**
10
10
  * Make an assertion that `actual` and `expected` are equal, deeply. If not
@@ -1 +1 @@
1
- {"version":3,"file":"false.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/false.ts"],"names":[],"mappings":"AAIA,uDAAuD;AACvD,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;AAE3D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,IAAI,IAAI,KAAK,CAI1E"}
1
+ {"version":3,"file":"false.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/false.ts"],"names":[],"mappings":"AAIA,uDAAuD;AACvD,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;AAE3D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,IAAI,IAAI,KAAK,CAI1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/instance_of.ts"],"names":[],"mappings":"AAIA,sBAAsB;AAEtB,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AACzD,4BAA4B;AAC5B,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,cAAc,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;AAE3E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAE9B,CAAC,SAAS,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAE9C,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,CAAC,EACf,GAAG,SAAK,GACP,OAAO,CAAC,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC,CA6BnC"}
1
+ {"version":3,"file":"instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/instance_of.ts"],"names":[],"mappings":"AAIA,sBAAsB;AAEtB,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AACzD,4BAA4B;AAC5B,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,cAAc,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;AAE3E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAE9B,CAAC,SAAS,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAE9C,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,CAAC,EACf,GAAG,SAAK,GACP,OAAO,CAAC,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC,CA6BnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"is_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/is_error.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EACnD,KAAK,EAAE,OAAO,EAEd,UAAU,CAAC,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC/C,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAC5B,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,KAAK,IAAI,CAAC,CA8BpB"}
1
+ {"version":3,"file":"is_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/is_error.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EACnD,KAAK,EAAE,OAAO,EAEd,UAAU,CAAC,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC/C,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAC5B,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,KAAK,IAAI,CAAC,CA8BpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"not_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/not_equals.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAUtE"}
1
+ {"version":3,"file":"not_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/not_equals.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAUtE"}
@@ -1 +1 @@
1
- {"version":3,"file":"throws.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/throws.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,OAAO,EACjB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC;AACX;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EAClD,EAAE,EAAE,MAAM,OAAO,EAEjB,UAAU,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC9C,WAAW,CAAC,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,CAAC,CAAC"}
1
+ {"version":3,"file":"throws.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/throws.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,OAAO,EACjB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC;AACX;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EAClD,EAAE,EAAE,MAAM,OAAO,EAEjB,UAAU,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC9C,WAAW,CAAC,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"unreachable.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/unreachable.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAG/C"}
1
+ {"version":3,"file":"unreachable.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/unreachable.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAG/C"}
@@ -0,0 +1,2 @@
1
+ export declare function exponentialBackoffWithJitter(cap: number, base: number, attempt: number, multiplier: number, jitter: number): number;
2
+ //# sourceMappingURL=_util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_util.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.12/_util.ts"],"names":[],"mappings":"AAGA,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,UAIf"}
@@ -0,0 +1,6 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+ export function exponentialBackoffWithJitter(cap, base, attempt, multiplier, jitter) {
4
+ const exp = Math.min(cap, base * multiplier ** attempt);
5
+ return (1 - jitter * Math.random()) * exp;
6
+ }
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Make a {@linkcode Promise} abortable with the given signal.
3
+ *
4
+ * @throws {DOMException} If the signal is already aborted and `signal.reason`
5
+ * is undefined. Otherwise, throws `signal.reason`.
6
+ * @typeParam T The type of the provided and returned promise.
7
+ * @param p The promise to make abortable.
8
+ * @param signal The signal to abort the promise with.
9
+ * @returns A promise that can be aborted.
10
+ *
11
+ * @example Error-handling a timeout
12
+ * ```ts ignore
13
+ * import { abortable, delay } from "@std/async";
14
+ * import { assertRejects, assertEquals } from "@std/assert";
15
+ *
16
+ * const promise = delay(1_000);
17
+ *
18
+ * // Rejects with `DOMException` after 100 ms
19
+ * await assertRejects(
20
+ * () => abortable(promise, AbortSignal.timeout(100)),
21
+ * DOMException,
22
+ * "Signal timed out."
23
+ * );
24
+ * ```
25
+ *
26
+ * @example Error-handling an abort
27
+ * ```ts ignore
28
+ * import { abortable, delay } from "@std/async";
29
+ * import { assertRejects, assertEquals } from "@std/assert";
30
+ *
31
+ * const promise = delay(1_000);
32
+ * const controller = new AbortController();
33
+ * controller.abort(new Error("This is my reason"));
34
+ *
35
+ * // Rejects with `DOMException` immediately
36
+ * await assertRejects(
37
+ * () => abortable(promise, controller.signal),
38
+ * Error,
39
+ * "This is my reason"
40
+ * );
41
+ * ```
42
+ */
43
+ export declare function abortable<T>(p: Promise<T>, signal: AbortSignal): Promise<T>;
44
+ /**
45
+ * Make an {@linkcode AsyncIterable} abortable with the given signal.
46
+ *
47
+ * @throws {DOMException} If the signal is already aborted and `signal.reason`
48
+ * is undefined. Otherwise, throws `signal.reason`.
49
+ * @typeParam T The type of the provided and returned async iterable.
50
+ * @param p The async iterable to make abortable.
51
+ * @param signal The signal to abort the promise with.
52
+ * @returns An async iterable that can be aborted.
53
+ *
54
+ * @example Error-handling a timeout
55
+ * ```ts
56
+ * import { abortable, delay } from "@std/async";
57
+ * import { assertRejects, assertEquals } from "@std/assert";
58
+ *
59
+ * const asyncIter = async function* () {
60
+ * yield "Hello";
61
+ * await delay(1_000);
62
+ * yield "World";
63
+ * };
64
+ *
65
+ * const items: string[] = [];
66
+ * // Below throws `DOMException` after 100 ms and items become `["Hello"]`
67
+ * await assertRejects(
68
+ * async () => {
69
+ * for await (const item of abortable(asyncIter(), AbortSignal.timeout(100))) {
70
+ * items.push(item);
71
+ * }
72
+ * },
73
+ * DOMException,
74
+ * "Signal timed out."
75
+ * );
76
+ * assertEquals(items, ["Hello"]);
77
+ * ```
78
+ *
79
+ * @example Error-handling an abort
80
+ * ```ts
81
+ * import { abortable, delay } from "@std/async";
82
+ * import { assertRejects, assertEquals } from "@std/assert";
83
+ *
84
+ * const asyncIter = async function* () {
85
+ * yield "Hello";
86
+ * await delay(1_000);
87
+ * yield "World";
88
+ * };
89
+ * const controller = new AbortController();
90
+ * controller.abort(new Error("This is my reason"));
91
+ *
92
+ * const items: string[] = [];
93
+ * // Below throws `DOMException` immediately
94
+ * await assertRejects(
95
+ * async () => {
96
+ * for await (const item of abortable(asyncIter(), controller.signal)) {
97
+ * items.push(item);
98
+ * }
99
+ * },
100
+ * Error,
101
+ * "This is my reason"
102
+ * );
103
+ * assertEquals(items, []);
104
+ * ```
105
+ */
106
+ export declare function abortable<T>(p: AsyncIterable<T>, signal: AbortSignal): AsyncGenerator<T>;
107
+ //# sourceMappingURL=abortable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abortable.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.12/abortable.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH,wBAAgB,SAAS,CAAC,CAAC,EACzB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,EACnB,MAAM,EAAE,WAAW,GAClB,cAAc,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,46 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+ export function abortable(p, signal) {
4
+ if (p instanceof Promise) {
5
+ return abortablePromise(p, signal);
6
+ }
7
+ else {
8
+ return abortableAsyncIterable(p, signal);
9
+ }
10
+ }
11
+ function abortablePromise(p, signal) {
12
+ if (signal.aborted)
13
+ return Promise.reject(signal.reason);
14
+ const { promise, reject } = Promise.withResolvers();
15
+ const abort = () => reject(signal.reason);
16
+ signal.addEventListener("abort", abort, { once: true });
17
+ return Promise.race([promise, p]).finally(() => {
18
+ signal.removeEventListener("abort", abort);
19
+ });
20
+ }
21
+ async function* abortableAsyncIterable(p, signal) {
22
+ signal.throwIfAborted();
23
+ const { promise, reject } = Promise.withResolvers();
24
+ const abort = () => reject(signal.reason);
25
+ signal.addEventListener("abort", abort, { once: true });
26
+ const it = p[Symbol.asyncIterator]();
27
+ try {
28
+ while (true) {
29
+ const race = Promise.race([promise, it.next()]);
30
+ race.catch(() => {
31
+ signal.removeEventListener("abort", abort);
32
+ });
33
+ const { done, value } = await race;
34
+ if (done) {
35
+ signal.removeEventListener("abort", abort);
36
+ const result = await it.return?.(value);
37
+ return result?.value;
38
+ }
39
+ yield value;
40
+ }
41
+ }
42
+ catch (e) {
43
+ await it.return?.();
44
+ throw e;
45
+ }
46
+ }
@@ -0,0 +1,36 @@
1
+ /** Options for {@linkcode deadline}. */
2
+ export interface DeadlineOptions {
3
+ /** Signal used to abort the deadline. */
4
+ signal?: AbortSignal;
5
+ }
6
+ /**
7
+ * Create a promise which will be rejected with {@linkcode DOMException} when
8
+ * a given delay is exceeded.
9
+ *
10
+ * Note: Prefer to use {@linkcode AbortSignal.timeout} instead for the APIs
11
+ * that accept {@linkcode AbortSignal}.
12
+ *
13
+ * @throws {DOMException & { name: "TimeoutError" }} If the provided duration
14
+ * runs out before resolving.
15
+ * @throws {DOMException & { name: "AbortError" }} If the optional signal is
16
+ * aborted with the default `reason` before resolving or timing out.
17
+ * @throws {AbortSignal["reason"]} If the optional signal is aborted with a
18
+ * custom `reason` before resolving or timing out.
19
+ * @typeParam T The type of the provided and returned promise.
20
+ * @param p The promise to make rejectable.
21
+ * @param ms Duration in milliseconds for when the promise should time out.
22
+ * @param options Additional options.
23
+ * @returns A promise that will reject if the provided duration runs out before resolving.
24
+ *
25
+ * @example Usage
26
+ * ```ts ignore
27
+ * import { deadline } from "@std/async/deadline";
28
+ * import { delay } from "@std/async/delay";
29
+ *
30
+ * const delayedPromise = delay(1_000);
31
+ * // Below throws `DOMException` after 10 ms
32
+ * const result = await deadline(delayedPromise, 10);
33
+ * ```
34
+ */
35
+ export declare function deadline<T>(p: Promise<T>, ms: number, options?: DeadlineOptions): Promise<T>;
36
+ //# sourceMappingURL=deadline.d.ts.map
@@ -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,38 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+ import { abortable } from "./abortable.js";
4
+ /**
5
+ * Create a promise which will be rejected with {@linkcode DOMException} when
6
+ * a given delay is exceeded.
7
+ *
8
+ * Note: Prefer to use {@linkcode AbortSignal.timeout} instead for the APIs
9
+ * that accept {@linkcode AbortSignal}.
10
+ *
11
+ * @throws {DOMException & { name: "TimeoutError" }} If the provided duration
12
+ * runs out before resolving.
13
+ * @throws {DOMException & { name: "AbortError" }} If the optional signal is
14
+ * aborted with the default `reason` before resolving or timing out.
15
+ * @throws {AbortSignal["reason"]} If the optional signal is aborted with a
16
+ * custom `reason` before resolving or timing out.
17
+ * @typeParam T The type of the provided and returned promise.
18
+ * @param p The promise to make rejectable.
19
+ * @param ms Duration in milliseconds for when the promise should time out.
20
+ * @param options Additional options.
21
+ * @returns A promise that will reject if the provided duration runs out before resolving.
22
+ *
23
+ * @example Usage
24
+ * ```ts ignore
25
+ * import { deadline } from "@std/async/deadline";
26
+ * import { delay } from "@std/async/delay";
27
+ *
28
+ * const delayedPromise = delay(1_000);
29
+ * // Below throws `DOMException` after 10 ms
30
+ * const result = await deadline(delayedPromise, 10);
31
+ * ```
32
+ */
33
+ export async function deadline(p, ms, options = {}) {
34
+ const signals = [AbortSignal.timeout(ms)];
35
+ if (options.signal)
36
+ signals.push(options.signal);
37
+ return await abortable(p, AbortSignal.any(signals));
38
+ }
@@ -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,57 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+ /**
4
+ * Creates a debounced function that delays the given `func`
5
+ * by a given `wait` time in milliseconds. If the method is called
6
+ * again before the timeout expires, the previous call will be
7
+ * aborted.
8
+ *
9
+ * @example Usage
10
+ * ```ts ignore
11
+ * import { debounce } from "@std/async/debounce";
12
+ *
13
+ * const log = debounce(
14
+ * (event: Deno.FsEvent) =>
15
+ * console.log("[%s] %s", event.kind, event.paths[0]),
16
+ * 200,
17
+ * );
18
+ *
19
+ * for await (const event of Deno.watchFs("./")) {
20
+ * log(event);
21
+ * }
22
+ * // wait 200ms ...
23
+ * // output: Function debounced after 200ms with baz
24
+ * ```
25
+ *
26
+ * @typeParam T The arguments of the provided function.
27
+ * @param fn The function to debounce.
28
+ * @param wait The time in milliseconds to delay the function.
29
+ * @returns The debounced function.
30
+ */
31
+ // deno-lint-ignore no-explicit-any
32
+ export function debounce(fn, wait) {
33
+ let timeout = null;
34
+ let flush = null;
35
+ const debounced = ((...args) => {
36
+ debounced.clear();
37
+ flush = () => {
38
+ debounced.clear();
39
+ fn.call(debounced, ...args);
40
+ };
41
+ timeout = Number(setTimeout(flush, wait));
42
+ });
43
+ debounced.clear = () => {
44
+ if (typeof timeout === "number") {
45
+ clearTimeout(timeout);
46
+ timeout = null;
47
+ flush = null;
48
+ }
49
+ };
50
+ debounced.flush = () => {
51
+ flush?.();
52
+ };
53
+ Object.defineProperty(debounced, "pending", {
54
+ get: () => typeof timeout === "number",
55
+ });
56
+ return debounced;
57
+ }
@@ -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,65 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+ /** Options for {@linkcode delay}. */
4
+ import * as dntShim from "../../../../../_dnt.shims.js";
5
+ /**
6
+ * Resolve a {@linkcode Promise} after a given amount of milliseconds.
7
+ *
8
+ * @throws {DOMException} If the optional signal is aborted before the delay
9
+ * duration, and `signal.reason` is undefined.
10
+ * @param ms Duration in milliseconds for how long the delay should last.
11
+ * @param options Additional options.
12
+ *
13
+ * @example Basic usage
14
+ * ```ts no-assert
15
+ * import { delay } from "@std/async/delay";
16
+ *
17
+ * // ...
18
+ * const delayedPromise = delay(100);
19
+ * const result = await delayedPromise;
20
+ * // ...
21
+ * ```
22
+ *
23
+ * @example Disable persistence
24
+ *
25
+ * Setting `persistent` to `false` will allow the process to continue to run as
26
+ * long as the timer exists.
27
+ *
28
+ * ```ts no-assert ignore
29
+ * import { delay } from "@std/async/delay";
30
+ *
31
+ * // ...
32
+ * await delay(100, { persistent: false });
33
+ * // ...
34
+ * ```
35
+ */
36
+ export function delay(ms, options = {}) {
37
+ const { signal, persistent = true } = options;
38
+ if (signal?.aborted)
39
+ return Promise.reject(signal.reason);
40
+ return new Promise((resolve, reject) => {
41
+ const abort = () => {
42
+ clearTimeout(i);
43
+ reject(signal?.reason);
44
+ };
45
+ const done = () => {
46
+ signal?.removeEventListener("abort", abort);
47
+ resolve();
48
+ };
49
+ const i = setTimeout(done, ms);
50
+ signal?.addEventListener("abort", abort, { once: true });
51
+ if (persistent === false) {
52
+ try {
53
+ // @ts-ignore For browser compatibility
54
+ dntShim.Deno.unrefTimer(i);
55
+ }
56
+ catch (error) {
57
+ if (!(error instanceof ReferenceError)) {
58
+ throw error;
59
+ }
60
+ // deno-lint-ignore no-console
61
+ console.error("`persistent` option is only available in Deno");
62
+ }
63
+ }
64
+ });
65
+ }
@@ -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,23 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ // This module is browser compatible.
3
+ /**
4
+ * Provide helpers with asynchronous tasks like {@linkcode delay | delays},
5
+ * {@linkcode debounce | debouncing}, {@linkcode retry | retrying}, or
6
+ * {@linkcode pooledMap | pooling}.
7
+ *
8
+ * ```ts no-assert
9
+ * import { delay } from "@std/async/delay";
10
+ *
11
+ * await delay(100); // waits for 100 milliseconds
12
+ * ```
13
+ *
14
+ * @module
15
+ */
16
+ export * from "./abortable.js";
17
+ export * from "./deadline.js";
18
+ export * from "./debounce.js";
19
+ export * from "./delay.js";
20
+ export * from "./mux_async_iterator.js";
21
+ export * from "./pool.js";
22
+ export * from "./tee.js";
23
+ export * from "./retry.js";