@mtkruto/node 0.63.3 → 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 (261) 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_file_manager.d.ts.map +1 -1
  9. package/esm/client/2_file_manager.js +8 -5
  10. package/esm/client/2_update_manager.js +11 -11
  11. package/esm/client/5_client.d.ts +0 -9
  12. package/esm/client/5_client.d.ts.map +1 -1
  13. package/esm/client/5_client.js +12 -37
  14. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.d.ts.map +1 -1
  15. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.d.ts.map +1 -1
  16. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.d.ts.map +1 -1
  17. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.d.ts.map +1 -1
  18. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.d.ts.map +1 -1
  19. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/instance_of.d.ts.map +1 -1
  20. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/is_error.d.ts.map +1 -1
  21. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/not_equals.d.ts.map +1 -1
  22. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/throws.d.ts.map +1 -1
  23. package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.d.ts.map +1 -1
  24. package/esm/deps/jsr.io/@std/async/1.0.12/_util.d.ts +2 -0
  25. package/esm/deps/jsr.io/@std/async/1.0.12/_util.d.ts.map +1 -0
  26. package/esm/deps/jsr.io/@std/async/1.0.12/_util.js +6 -0
  27. package/esm/deps/jsr.io/@std/async/1.0.12/abortable.d.ts +107 -0
  28. package/esm/deps/jsr.io/@std/async/1.0.12/abortable.d.ts.map +1 -0
  29. package/esm/deps/jsr.io/@std/async/1.0.12/abortable.js +46 -0
  30. package/esm/deps/jsr.io/@std/async/1.0.12/deadline.d.ts +36 -0
  31. package/esm/deps/jsr.io/@std/async/1.0.12/deadline.d.ts.map +1 -0
  32. package/esm/deps/jsr.io/@std/async/1.0.12/deadline.js +38 -0
  33. package/esm/deps/jsr.io/@std/async/1.0.12/debounce.d.ts +44 -0
  34. package/esm/deps/jsr.io/@std/async/1.0.12/debounce.d.ts.map +1 -0
  35. package/esm/deps/jsr.io/@std/async/1.0.12/debounce.js +57 -0
  36. package/esm/deps/jsr.io/@std/async/1.0.12/delay.d.ts +42 -0
  37. package/esm/deps/jsr.io/@std/async/1.0.12/delay.d.ts.map +1 -0
  38. package/esm/deps/jsr.io/@std/async/1.0.12/delay.js +65 -0
  39. package/esm/deps/jsr.io/@std/async/1.0.12/mod.d.ts +22 -0
  40. package/esm/deps/jsr.io/@std/async/1.0.12/mod.d.ts.map +1 -0
  41. package/esm/deps/jsr.io/@std/async/1.0.12/mod.js +23 -0
  42. package/esm/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.d.ts +111 -0
  43. package/esm/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.d.ts.map +1 -0
  44. package/esm/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.js +170 -0
  45. package/esm/deps/jsr.io/@std/async/1.0.12/pool.d.ts +33 -0
  46. package/esm/deps/jsr.io/@std/async/1.0.12/pool.d.ts.map +1 -0
  47. package/esm/deps/jsr.io/@std/async/1.0.12/pool.js +99 -0
  48. package/esm/deps/jsr.io/@std/async/1.0.12/retry.d.ts +110 -0
  49. package/esm/deps/jsr.io/@std/async/1.0.12/retry.d.ts.map +1 -0
  50. package/esm/deps/jsr.io/@std/async/1.0.12/retry.js +107 -0
  51. package/esm/deps/jsr.io/@std/async/1.0.12/tee.d.ts +43 -0
  52. package/esm/deps/jsr.io/@std/async/1.0.12/tee.d.ts.map +1 -0
  53. package/esm/deps/jsr.io/@std/async/1.0.12/tee.js +102 -0
  54. package/esm/session/1_session.js +4 -4
  55. package/esm/session/2_session_encrypted.d.ts.map +1 -1
  56. package/esm/session/2_session_encrypted.js +2 -8
  57. package/package.json +1 -1
  58. package/script/0_deps.d.ts +10 -5
  59. package/script/0_deps.d.ts.map +1 -1
  60. package/script/0_deps.js +25 -28
  61. package/script/0_test_deps.d.ts.map +1 -0
  62. package/script/_dnt.polyfills.d.ts +13 -0
  63. package/script/_dnt.polyfills.d.ts.map +1 -1
  64. package/script/_dnt.polyfills.js +11 -0
  65. package/script/client/2_file_manager.d.ts.map +1 -1
  66. package/script/client/2_file_manager.js +7 -4
  67. package/script/client/2_update_manager.js +10 -10
  68. package/script/client/5_client.d.ts +0 -9
  69. package/script/client/5_client.d.ts.map +1 -1
  70. package/script/client/5_client.js +11 -36
  71. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.d.ts.map +1 -1
  72. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.d.ts.map +1 -1
  73. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.d.ts.map +1 -1
  74. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.d.ts.map +1 -1
  75. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.d.ts.map +1 -1
  76. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/instance_of.d.ts.map +1 -1
  77. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/is_error.d.ts.map +1 -1
  78. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/not_equals.d.ts.map +1 -1
  79. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/throws.d.ts.map +1 -1
  80. package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.d.ts.map +1 -1
  81. package/script/deps/jsr.io/@std/async/1.0.12/_util.d.ts +2 -0
  82. package/script/deps/jsr.io/@std/async/1.0.12/_util.d.ts.map +1 -0
  83. package/script/deps/jsr.io/@std/async/1.0.12/_util.js +9 -0
  84. package/script/deps/jsr.io/@std/async/1.0.12/abortable.d.ts +107 -0
  85. package/script/deps/jsr.io/@std/async/1.0.12/abortable.d.ts.map +1 -0
  86. package/script/deps/jsr.io/@std/async/1.0.12/abortable.js +49 -0
  87. package/script/deps/jsr.io/@std/async/1.0.12/deadline.d.ts +36 -0
  88. package/script/deps/jsr.io/@std/async/1.0.12/deadline.d.ts.map +1 -0
  89. package/script/deps/jsr.io/@std/async/1.0.12/deadline.js +41 -0
  90. package/script/deps/jsr.io/@std/async/1.0.12/debounce.d.ts +44 -0
  91. package/script/deps/jsr.io/@std/async/1.0.12/debounce.d.ts.map +1 -0
  92. package/script/deps/jsr.io/@std/async/1.0.12/debounce.js +60 -0
  93. package/script/deps/jsr.io/@std/async/1.0.12/delay.d.ts +42 -0
  94. package/script/deps/jsr.io/@std/async/1.0.12/delay.d.ts.map +1 -0
  95. package/script/deps/jsr.io/@std/async/1.0.12/delay.js +91 -0
  96. package/script/deps/jsr.io/@std/async/1.0.12/mod.d.ts +22 -0
  97. package/script/deps/jsr.io/@std/async/1.0.12/mod.d.ts.map +1 -0
  98. package/script/deps/jsr.io/@std/async/1.0.12/mod.js +39 -0
  99. package/script/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.d.ts +111 -0
  100. package/script/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.d.ts.map +1 -0
  101. package/script/deps/jsr.io/@std/async/1.0.12/mux_async_iterator.js +174 -0
  102. package/script/deps/jsr.io/@std/async/1.0.12/pool.d.ts +33 -0
  103. package/script/deps/jsr.io/@std/async/1.0.12/pool.d.ts.map +1 -0
  104. package/script/deps/jsr.io/@std/async/1.0.12/pool.js +102 -0
  105. package/script/deps/jsr.io/@std/async/1.0.12/retry.d.ts +110 -0
  106. package/script/deps/jsr.io/@std/async/1.0.12/retry.d.ts.map +1 -0
  107. package/script/deps/jsr.io/@std/async/1.0.12/retry.js +112 -0
  108. package/script/deps/jsr.io/@std/async/1.0.12/tee.d.ts +43 -0
  109. package/script/deps/jsr.io/@std/async/1.0.12/tee.d.ts.map +1 -0
  110. package/script/deps/jsr.io/@std/async/1.0.12/tee.js +105 -0
  111. package/script/session/1_session.js +3 -3
  112. package/script/session/2_session_encrypted.d.ts.map +1 -1
  113. package/script/session/2_session_encrypted.js +1 -7
  114. package/esm/deps/jsr.io/@std/assert/1.0.11/almost_equals.d.ts +0 -29
  115. package/esm/deps/jsr.io/@std/assert/1.0.11/almost_equals.d.ts.map +0 -1
  116. package/esm/deps/jsr.io/@std/assert/1.0.11/almost_equals.js +0 -46
  117. package/esm/deps/jsr.io/@std/assert/1.0.11/array_includes.d.ts +0 -24
  118. package/esm/deps/jsr.io/@std/assert/1.0.11/array_includes.d.ts.map +0 -1
  119. package/esm/deps/jsr.io/@std/assert/1.0.11/array_includes.js +0 -46
  120. package/esm/deps/jsr.io/@std/assert/1.0.11/exists.d.ts +0 -18
  121. package/esm/deps/jsr.io/@std/assert/1.0.11/exists.d.ts.map +0 -1
  122. package/esm/deps/jsr.io/@std/assert/1.0.11/exists.js +0 -27
  123. package/esm/deps/jsr.io/@std/assert/1.0.11/fail.d.ts +0 -15
  124. package/esm/deps/jsr.io/@std/assert/1.0.11/fail.d.ts.map +0 -1
  125. package/esm/deps/jsr.io/@std/assert/1.0.11/fail.js +0 -20
  126. package/esm/deps/jsr.io/@std/assert/1.0.11/greater.d.ts +0 -20
  127. package/esm/deps/jsr.io/@std/assert/1.0.11/greater.d.ts.map +0 -1
  128. package/esm/deps/jsr.io/@std/assert/1.0.11/greater.js +0 -29
  129. package/esm/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.d.ts +0 -20
  130. package/esm/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.d.ts.map +0 -1
  131. package/esm/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.js +0 -29
  132. package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts +0 -23
  133. package/esm/deps/jsr.io/@std/assert/1.0.11/instance_of.js +0 -52
  134. package/esm/deps/jsr.io/@std/assert/1.0.11/is_error.d.ts +0 -25
  135. package/esm/deps/jsr.io/@std/assert/1.0.11/is_error.js +0 -53
  136. package/esm/deps/jsr.io/@std/assert/1.0.11/less.d.ts +0 -19
  137. package/esm/deps/jsr.io/@std/assert/1.0.11/less.d.ts.map +0 -1
  138. package/esm/deps/jsr.io/@std/assert/1.0.11/less.js +0 -28
  139. package/esm/deps/jsr.io/@std/assert/1.0.11/less_or_equal.d.ts +0 -20
  140. package/esm/deps/jsr.io/@std/assert/1.0.11/less_or_equal.d.ts.map +0 -1
  141. package/esm/deps/jsr.io/@std/assert/1.0.11/less_or_equal.js +0 -29
  142. package/esm/deps/jsr.io/@std/assert/1.0.11/match.d.ts +0 -18
  143. package/esm/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +0 -1
  144. package/esm/deps/jsr.io/@std/assert/1.0.11/match.js +0 -26
  145. package/esm/deps/jsr.io/@std/assert/1.0.11/mod.d.ts +0 -44
  146. package/esm/deps/jsr.io/@std/assert/1.0.11/mod.d.ts.map +0 -1
  147. package/esm/deps/jsr.io/@std/assert/1.0.11/mod.js +0 -45
  148. package/esm/deps/jsr.io/@std/assert/1.0.11/not_equals.d.ts +0 -21
  149. package/esm/deps/jsr.io/@std/assert/1.0.11/not_equals.js +0 -33
  150. package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts +0 -20
  151. package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +0 -1
  152. package/esm/deps/jsr.io/@std/assert/1.0.11/not_instance_of.js +0 -29
  153. package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts +0 -18
  154. package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +0 -1
  155. package/esm/deps/jsr.io/@std/assert/1.0.11/not_match.js +0 -26
  156. package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts +0 -23
  157. package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +0 -1
  158. package/esm/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.js +0 -32
  159. package/esm/deps/jsr.io/@std/assert/1.0.11/object_match.d.ts +0 -29
  160. package/esm/deps/jsr.io/@std/assert/1.0.11/object_match.d.ts.map +0 -1
  161. package/esm/deps/jsr.io/@std/assert/1.0.11/object_match.js +0 -167
  162. package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts +0 -42
  163. package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts.map +0 -1
  164. package/esm/deps/jsr.io/@std/assert/1.0.11/rejects.js +0 -53
  165. package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts +0 -24
  166. package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +0 -1
  167. package/esm/deps/jsr.io/@std/assert/1.0.11/strict_equals.js +0 -57
  168. package/esm/deps/jsr.io/@std/assert/1.0.11/string_includes.d.ts +0 -18
  169. package/esm/deps/jsr.io/@std/assert/1.0.11/string_includes.d.ts.map +0 -1
  170. package/esm/deps/jsr.io/@std/assert/1.0.11/string_includes.js +0 -26
  171. package/esm/deps/jsr.io/@std/assert/1.0.11/throws.d.ts +0 -45
  172. package/esm/deps/jsr.io/@std/assert/1.0.11/throws.js +0 -44
  173. package/esm/deps/jsr.io/@std/assert/1.0.11/unimplemented.d.ts +0 -15
  174. package/esm/deps/jsr.io/@std/assert/1.0.11/unimplemented.d.ts.map +0 -1
  175. package/esm/deps/jsr.io/@std/assert/1.0.11/unimplemented.js +0 -20
  176. package/script/deps/jsr.io/@std/assert/1.0.11/almost_equals.d.ts +0 -29
  177. package/script/deps/jsr.io/@std/assert/1.0.11/almost_equals.d.ts.map +0 -1
  178. package/script/deps/jsr.io/@std/assert/1.0.11/almost_equals.js +0 -49
  179. package/script/deps/jsr.io/@std/assert/1.0.11/array_includes.d.ts +0 -24
  180. package/script/deps/jsr.io/@std/assert/1.0.11/array_includes.d.ts.map +0 -1
  181. package/script/deps/jsr.io/@std/assert/1.0.11/array_includes.js +0 -49
  182. package/script/deps/jsr.io/@std/assert/1.0.11/exists.d.ts +0 -18
  183. package/script/deps/jsr.io/@std/assert/1.0.11/exists.d.ts.map +0 -1
  184. package/script/deps/jsr.io/@std/assert/1.0.11/exists.js +0 -30
  185. package/script/deps/jsr.io/@std/assert/1.0.11/fail.d.ts +0 -15
  186. package/script/deps/jsr.io/@std/assert/1.0.11/fail.d.ts.map +0 -1
  187. package/script/deps/jsr.io/@std/assert/1.0.11/fail.js +0 -23
  188. package/script/deps/jsr.io/@std/assert/1.0.11/greater.d.ts +0 -20
  189. package/script/deps/jsr.io/@std/assert/1.0.11/greater.d.ts.map +0 -1
  190. package/script/deps/jsr.io/@std/assert/1.0.11/greater.js +0 -32
  191. package/script/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.d.ts +0 -20
  192. package/script/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.d.ts.map +0 -1
  193. package/script/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.js +0 -32
  194. package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.d.ts +0 -23
  195. package/script/deps/jsr.io/@std/assert/1.0.11/instance_of.js +0 -55
  196. package/script/deps/jsr.io/@std/assert/1.0.11/is_error.d.ts +0 -25
  197. package/script/deps/jsr.io/@std/assert/1.0.11/is_error.js +0 -56
  198. package/script/deps/jsr.io/@std/assert/1.0.11/less.d.ts +0 -19
  199. package/script/deps/jsr.io/@std/assert/1.0.11/less.d.ts.map +0 -1
  200. package/script/deps/jsr.io/@std/assert/1.0.11/less.js +0 -31
  201. package/script/deps/jsr.io/@std/assert/1.0.11/less_or_equal.d.ts +0 -20
  202. package/script/deps/jsr.io/@std/assert/1.0.11/less_or_equal.d.ts.map +0 -1
  203. package/script/deps/jsr.io/@std/assert/1.0.11/less_or_equal.js +0 -32
  204. package/script/deps/jsr.io/@std/assert/1.0.11/match.d.ts +0 -18
  205. package/script/deps/jsr.io/@std/assert/1.0.11/match.d.ts.map +0 -1
  206. package/script/deps/jsr.io/@std/assert/1.0.11/match.js +0 -29
  207. package/script/deps/jsr.io/@std/assert/1.0.11/mod.d.ts +0 -44
  208. package/script/deps/jsr.io/@std/assert/1.0.11/mod.d.ts.map +0 -1
  209. package/script/deps/jsr.io/@std/assert/1.0.11/mod.js +0 -61
  210. package/script/deps/jsr.io/@std/assert/1.0.11/not_equals.d.ts +0 -21
  211. package/script/deps/jsr.io/@std/assert/1.0.11/not_equals.js +0 -36
  212. package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts +0 -20
  213. package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.d.ts.map +0 -1
  214. package/script/deps/jsr.io/@std/assert/1.0.11/not_instance_of.js +0 -32
  215. package/script/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts +0 -18
  216. package/script/deps/jsr.io/@std/assert/1.0.11/not_match.d.ts.map +0 -1
  217. package/script/deps/jsr.io/@std/assert/1.0.11/not_match.js +0 -29
  218. package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts +0 -23
  219. package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.d.ts.map +0 -1
  220. package/script/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.js +0 -35
  221. package/script/deps/jsr.io/@std/assert/1.0.11/object_match.d.ts +0 -29
  222. package/script/deps/jsr.io/@std/assert/1.0.11/object_match.d.ts.map +0 -1
  223. package/script/deps/jsr.io/@std/assert/1.0.11/object_match.js +0 -170
  224. package/script/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts +0 -42
  225. package/script/deps/jsr.io/@std/assert/1.0.11/rejects.d.ts.map +0 -1
  226. package/script/deps/jsr.io/@std/assert/1.0.11/rejects.js +0 -56
  227. package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts +0 -24
  228. package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.d.ts.map +0 -1
  229. package/script/deps/jsr.io/@std/assert/1.0.11/strict_equals.js +0 -60
  230. package/script/deps/jsr.io/@std/assert/1.0.11/string_includes.d.ts +0 -18
  231. package/script/deps/jsr.io/@std/assert/1.0.11/string_includes.d.ts.map +0 -1
  232. package/script/deps/jsr.io/@std/assert/1.0.11/string_includes.js +0 -29
  233. package/script/deps/jsr.io/@std/assert/1.0.11/throws.d.ts +0 -45
  234. package/script/deps/jsr.io/@std/assert/1.0.11/throws.js +0 -47
  235. package/script/deps/jsr.io/@std/assert/1.0.11/unimplemented.d.ts +0 -15
  236. package/script/deps/jsr.io/@std/assert/1.0.11/unimplemented.d.ts.map +0 -1
  237. package/script/deps/jsr.io/@std/assert/1.0.11/unimplemented.js +0 -23
  238. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.d.ts +0 -0
  239. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.js +0 -0
  240. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.d.ts +0 -0
  241. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.js +0 -0
  242. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.d.ts +0 -0
  243. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.js +0 -0
  244. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.d.ts +0 -0
  245. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.js +0 -0
  246. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.d.ts +0 -0
  247. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.js +0 -0
  248. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.d.ts +0 -0
  249. /package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.js +0 -0
  250. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.d.ts +0 -0
  251. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assert.js +0 -0
  252. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.d.ts +0 -0
  253. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/assertion_error.js +0 -0
  254. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.d.ts +0 -0
  255. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equal.js +0 -0
  256. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.d.ts +0 -0
  257. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/equals.js +0 -0
  258. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.d.ts +0 -0
  259. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/false.js +0 -0
  260. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.d.ts +0 -0
  261. /package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.12}/unreachable.js +0 -0
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertLessOrEqual = assertLessOrEqual;
4
- // Copyright 2018-2025 the Deno authors. MIT license.
5
- // This module is browser compatible.
6
- const format_js_1 = require("../../internal/1.0.6/format.js");
7
- const assertion_error_js_1 = require("./assertion_error.js");
8
- /**
9
- * Make an assertion that `actual` is less than or equal to `expected`.
10
- * If not then throw.
11
- *
12
- * @example Usage
13
- * ```ts ignore
14
- * import { assertLessOrEqual } from "@std/assert";
15
- *
16
- * assertLessOrEqual(1, 2); // Doesn't throw
17
- * assertLessOrEqual(1, 1); // Doesn't throw
18
- * assertLessOrEqual(1, 0); // Throws
19
- * ```
20
- *
21
- * @typeParam T The type of the values to compare.
22
- * @param actual The actual value to compare.
23
- * @param expected The expected value to compare.
24
- * @param msg The optional message to display if the assertion fails.
25
- */
26
- function assertLessOrEqual(actual, expected, msg) {
27
- if (actual <= expected)
28
- return;
29
- const actualString = (0, format_js_1.format)(actual);
30
- const expectedString = (0, format_js_1.format)(expected);
31
- throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} <= ${expectedString}`);
32
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * Make an assertion that `actual` match RegExp `expected`. If not
3
- * then throw.
4
- *
5
- * @example Usage
6
- * ```ts ignore
7
- * import { assertMatch } from "@std/assert";
8
- *
9
- * assertMatch("Raptor", /Raptor/); // Doesn't throw
10
- * assertMatch("Denosaurus", /Raptor/); // Throws
11
- * ```
12
- *
13
- * @param actual The actual value to be matched.
14
- * @param expected The expected pattern to match.
15
- * @param msg The optional message to display if the assertion fails.
16
- */
17
- export declare function assertMatch(actual: string, expected: RegExp, msg?: string): void;
18
- //# sourceMappingURL=match.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertMatch = assertMatch;
4
- // Copyright 2018-2025 the Deno authors. MIT license.
5
- // This module is browser compatible.
6
- const assertion_error_js_1 = require("./assertion_error.js");
7
- /**
8
- * Make an assertion that `actual` match RegExp `expected`. If not
9
- * then throw.
10
- *
11
- * @example Usage
12
- * ```ts ignore
13
- * import { assertMatch } from "@std/assert";
14
- *
15
- * assertMatch("Raptor", /Raptor/); // Doesn't throw
16
- * assertMatch("Denosaurus", /Raptor/); // Throws
17
- * ```
18
- *
19
- * @param actual The actual value to be matched.
20
- * @param expected The expected pattern to match.
21
- * @param msg The optional message to display if the assertion fails.
22
- */
23
- function assertMatch(actual, expected, msg) {
24
- if (expected.test(actual))
25
- return;
26
- const msgSuffix = msg ? `: ${msg}` : ".";
27
- msg = `Expected actual: "${actual}" to match: "${expected}"${msgSuffix}`;
28
- throw new assertion_error_js_1.AssertionError(msg);
29
- }
@@ -1,44 +0,0 @@
1
- /** A library of assertion functions.
2
- * If the assertion is false an `AssertionError` will be thrown which will
3
- * result in pretty-printed diff of the failing assertion.
4
- *
5
- * This module is browser compatible, but do not rely on good formatting of
6
- * values for AssertionError messages in browsers.
7
- *
8
- * ```ts ignore
9
- * import { assert } from "@std/assert";
10
- *
11
- * assert("I am truthy"); // Doesn't throw
12
- * assert(false); // Throws `AssertionError`
13
- * ```
14
- *
15
- * @module
16
- */
17
- export * from "./almost_equals.js";
18
- export * from "./array_includes.js";
19
- export * from "./equals.js";
20
- export * from "./exists.js";
21
- export * from "./false.js";
22
- export * from "./greater_or_equal.js";
23
- export * from "./greater.js";
24
- export * from "./instance_of.js";
25
- export * from "./is_error.js";
26
- export * from "./less_or_equal.js";
27
- export * from "./less.js";
28
- export * from "./match.js";
29
- export * from "./not_equals.js";
30
- export * from "./not_instance_of.js";
31
- export * from "./not_match.js";
32
- export * from "./not_strict_equals.js";
33
- export * from "./object_match.js";
34
- export * from "./rejects.js";
35
- export * from "./strict_equals.js";
36
- export * from "./string_includes.js";
37
- export * from "./throws.js";
38
- export * from "./assert.js";
39
- export * from "./assertion_error.js";
40
- export * from "./equal.js";
41
- export * from "./fail.js";
42
- export * from "./unimplemented.js";
43
- export * from "./unreachable.js";
44
- //# sourceMappingURL=mod.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/mod.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
@@ -1,61 +0,0 @@
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
- /** A library of assertion functions.
20
- * If the assertion is false an `AssertionError` will be thrown which will
21
- * result in pretty-printed diff of the failing assertion.
22
- *
23
- * This module is browser compatible, but do not rely on good formatting of
24
- * values for AssertionError messages in browsers.
25
- *
26
- * ```ts ignore
27
- * import { assert } from "@std/assert";
28
- *
29
- * assert("I am truthy"); // Doesn't throw
30
- * assert(false); // Throws `AssertionError`
31
- * ```
32
- *
33
- * @module
34
- */
35
- __exportStar(require("./almost_equals.js"), exports);
36
- __exportStar(require("./array_includes.js"), exports);
37
- __exportStar(require("./equals.js"), exports);
38
- __exportStar(require("./exists.js"), exports);
39
- __exportStar(require("./false.js"), exports);
40
- __exportStar(require("./greater_or_equal.js"), exports);
41
- __exportStar(require("./greater.js"), exports);
42
- __exportStar(require("./instance_of.js"), exports);
43
- __exportStar(require("./is_error.js"), exports);
44
- __exportStar(require("./less_or_equal.js"), exports);
45
- __exportStar(require("./less.js"), exports);
46
- __exportStar(require("./match.js"), exports);
47
- __exportStar(require("./not_equals.js"), exports);
48
- __exportStar(require("./not_instance_of.js"), exports);
49
- __exportStar(require("./not_match.js"), exports);
50
- __exportStar(require("./not_strict_equals.js"), exports);
51
- __exportStar(require("./object_match.js"), exports);
52
- __exportStar(require("./rejects.js"), exports);
53
- __exportStar(require("./strict_equals.js"), exports);
54
- __exportStar(require("./string_includes.js"), exports);
55
- __exportStar(require("./throws.js"), exports);
56
- __exportStar(require("./assert.js"), exports);
57
- __exportStar(require("./assertion_error.js"), exports);
58
- __exportStar(require("./equal.js"), exports);
59
- __exportStar(require("./fail.js"), exports);
60
- __exportStar(require("./unimplemented.js"), exports);
61
- __exportStar(require("./unreachable.js"), exports);
@@ -1,21 +0,0 @@
1
- /**
2
- * Make an assertion that `actual` and `expected` are not equal, deeply.
3
- * If not then throw.
4
- *
5
- * Type parameter can be specified to ensure values under comparison have the same type.
6
- *
7
- * @example Usage
8
- * ```ts ignore
9
- * import { assertNotEquals } from "@std/assert";
10
- *
11
- * assertNotEquals(1, 2); // Doesn't throw
12
- * assertNotEquals(1, 1); // Throws
13
- * ```
14
- *
15
- * @typeParam T The type of the values to compare.
16
- * @param actual The actual value to compare.
17
- * @param expected The expected value to compare.
18
- * @param msg The optional message to display if the assertion fails.
19
- */
20
- export declare function assertNotEquals<T>(actual: T, expected: T, msg?: string): void;
21
- //# sourceMappingURL=not_equals.d.ts.map
@@ -1,36 +0,0 @@
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.assertNotEquals = assertNotEquals;
6
- const equal_js_1 = require("./equal.js");
7
- const assertion_error_js_1 = require("./assertion_error.js");
8
- const format_js_1 = require("../../internal/1.0.6/format.js");
9
- /**
10
- * Make an assertion that `actual` and `expected` are not equal, deeply.
11
- * If not then throw.
12
- *
13
- * Type parameter can be specified to ensure values under comparison have the same type.
14
- *
15
- * @example Usage
16
- * ```ts ignore
17
- * import { assertNotEquals } from "@std/assert";
18
- *
19
- * assertNotEquals(1, 2); // Doesn't throw
20
- * assertNotEquals(1, 1); // Throws
21
- * ```
22
- *
23
- * @typeParam T The type of the values to compare.
24
- * @param actual The actual value to compare.
25
- * @param expected The expected value to compare.
26
- * @param msg The optional message to display if the assertion fails.
27
- */
28
- function assertNotEquals(actual, expected, msg) {
29
- if (!(0, equal_js_1.equal)(actual, expected)) {
30
- return;
31
- }
32
- const actualString = (0, format_js_1.format)(actual);
33
- const expectedString = (0, format_js_1.format)(expected);
34
- const msgSuffix = msg ? `: ${msg}` : ".";
35
- throw new assertion_error_js_1.AssertionError(`Expected actual: ${actualString} not to be: ${expectedString}${msgSuffix}`);
36
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Make an assertion that `obj` is not an instance of `type`.
3
- * If so, then throw.
4
- *
5
- * @example Usage
6
- * ```ts ignore
7
- * import { assertNotInstanceOf } from "@std/assert";
8
- *
9
- * assertNotInstanceOf(new Date(), Number); // Doesn't throw
10
- * assertNotInstanceOf(new Date(), Date); // Throws
11
- * ```
12
- *
13
- * @typeParam A The type of the object to check.
14
- * @typeParam T The type of the class to check against.
15
- * @param actual The object to check.
16
- * @param unexpectedType The class constructor to check against.
17
- * @param msg The optional message to display if the assertion fails.
18
- */
19
- export declare function assertNotInstanceOf<A, T>(actual: A, unexpectedType: abstract new (...args: any[]) => T, msg?: string): asserts actual is Exclude<A, T>;
20
- //# sourceMappingURL=not_instance_of.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"not_instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/not_instance_of.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EACtC,MAAM,EAAE,CAAC,EAET,cAAc,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAClD,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAKjC"}
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertNotInstanceOf = assertNotInstanceOf;
4
- // Copyright 2018-2025 the Deno authors. MIT license.
5
- // This module is browser compatible.
6
- const false_js_1 = require("./false.js");
7
- /**
8
- * Make an assertion that `obj` is not an instance of `type`.
9
- * If so, then throw.
10
- *
11
- * @example Usage
12
- * ```ts ignore
13
- * import { assertNotInstanceOf } from "@std/assert";
14
- *
15
- * assertNotInstanceOf(new Date(), Number); // Doesn't throw
16
- * assertNotInstanceOf(new Date(), Date); // Throws
17
- * ```
18
- *
19
- * @typeParam A The type of the object to check.
20
- * @typeParam T The type of the class to check against.
21
- * @param actual The object to check.
22
- * @param unexpectedType The class constructor to check against.
23
- * @param msg The optional message to display if the assertion fails.
24
- */
25
- function assertNotInstanceOf(actual,
26
- // deno-lint-ignore no-explicit-any
27
- unexpectedType, msg) {
28
- const msgSuffix = msg ? `: ${msg}` : ".";
29
- msg =
30
- `Expected object to not be an instance of "${typeof unexpectedType}"${msgSuffix}`;
31
- (0, false_js_1.assertFalse)(actual instanceof unexpectedType, msg);
32
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * Make an assertion that `actual` not match RegExp `expected`. If match
3
- * then throw.
4
- *
5
- * @example Usage
6
- * ```ts ignore
7
- * import { assertNotMatch } from "@std/assert";
8
- *
9
- * assertNotMatch("Denosaurus", /Raptor/); // Doesn't throw
10
- * assertNotMatch("Raptor", /Raptor/); // Throws
11
- * ```
12
- *
13
- * @param actual The actual value to match.
14
- * @param expected The expected value to not match.
15
- * @param msg The optional message to display if the assertion fails.
16
- */
17
- export declare function assertNotMatch(actual: string, expected: RegExp, msg?: string): void;
18
- //# sourceMappingURL=not_match.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"not_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/not_match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertNotMatch = assertNotMatch;
4
- // Copyright 2018-2025 the Deno authors. MIT license.
5
- // This module is browser compatible.
6
- const assertion_error_js_1 = require("./assertion_error.js");
7
- /**
8
- * Make an assertion that `actual` not match RegExp `expected`. If match
9
- * then throw.
10
- *
11
- * @example Usage
12
- * ```ts ignore
13
- * import { assertNotMatch } from "@std/assert";
14
- *
15
- * assertNotMatch("Denosaurus", /Raptor/); // Doesn't throw
16
- * assertNotMatch("Raptor", /Raptor/); // Throws
17
- * ```
18
- *
19
- * @param actual The actual value to match.
20
- * @param expected The expected value to not match.
21
- * @param msg The optional message to display if the assertion fails.
22
- */
23
- function assertNotMatch(actual, expected, msg) {
24
- if (!expected.test(actual))
25
- return;
26
- const msgSuffix = msg ? `: ${msg}` : ".";
27
- msg = `Expected actual: "${actual}" to not match: "${expected}"${msgSuffix}`;
28
- throw new assertion_error_js_1.AssertionError(msg);
29
- }
@@ -1,23 +0,0 @@
1
- /**
2
- * Make an assertion that `actual` and `expected` are not strictly equal, using
3
- * {@linkcode Object.is} for equality comparison. If the values are strictly
4
- * equal then throw.
5
- *
6
- * @example Usage
7
- * ```ts ignore
8
- * import { assertNotStrictEquals } from "@std/assert";
9
- *
10
- * assertNotStrictEquals(1, 1); // Throws
11
- * assertNotStrictEquals(1, 2); // Doesn't throw
12
- *
13
- * assertNotStrictEquals(0, 0); // Throws
14
- * assertNotStrictEquals(0, -0); // Doesn't throw
15
- * ```
16
- *
17
- * @typeParam T The type of the values to compare.
18
- * @param actual The actual value to compare.
19
- * @param expected The expected value to compare.
20
- * @param msg The optional message to display if the assertion fails.
21
- */
22
- export declare function assertNotStrictEquals<T>(actual: T, expected: T, msg?: string): void;
23
- //# sourceMappingURL=not_strict_equals.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"not_strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAYb"}
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertNotStrictEquals = assertNotStrictEquals;
4
- // Copyright 2018-2025 the Deno authors. MIT license.
5
- // This module is browser compatible.
6
- const assertion_error_js_1 = require("./assertion_error.js");
7
- const format_js_1 = require("../../internal/1.0.6/format.js");
8
- /**
9
- * Make an assertion that `actual` and `expected` are not strictly equal, using
10
- * {@linkcode Object.is} for equality comparison. If the values are strictly
11
- * equal then throw.
12
- *
13
- * @example Usage
14
- * ```ts ignore
15
- * import { assertNotStrictEquals } from "@std/assert";
16
- *
17
- * assertNotStrictEquals(1, 1); // Throws
18
- * assertNotStrictEquals(1, 2); // Doesn't throw
19
- *
20
- * assertNotStrictEquals(0, 0); // Throws
21
- * assertNotStrictEquals(0, -0); // Doesn't throw
22
- * ```
23
- *
24
- * @typeParam T The type of the values to compare.
25
- * @param actual The actual value to compare.
26
- * @param expected The expected value to compare.
27
- * @param msg The optional message to display if the assertion fails.
28
- */
29
- function assertNotStrictEquals(actual, expected, msg) {
30
- if (!Object.is(actual, expected)) {
31
- return;
32
- }
33
- const msgSuffix = msg ? `: ${msg}` : ".";
34
- throw new assertion_error_js_1.AssertionError(`Expected "actual" to not be strictly equal to: ${(0, format_js_1.format)(actual)}${msgSuffix}\n`);
35
- }
@@ -1,29 +0,0 @@
1
- /**
2
- * Make an assertion that `expected` object is a subset of `actual` object,
3
- * deeply. If not, then throw a diff of the objects, with mismatching
4
- * properties highlighted.
5
- *
6
- * @example Usage
7
- * ```ts ignore
8
- * import { assertObjectMatch } from "@std/assert";
9
- *
10
- * assertObjectMatch({ foo: "bar" }, { foo: "bar" }); // Doesn't throw
11
- * assertObjectMatch({ foo: "bar" }, { foo: "baz" }); // Throws
12
- * assertObjectMatch({ foo: 1, bar: 2 }, { foo: 1 }); // Doesn't throw
13
- * assertObjectMatch({ foo: 1 }, { foo: 1, bar: 2 }); // Throws
14
- * ```
15
- *
16
- * @example Usage with nested objects
17
- * ```ts ignore
18
- * import { assertObjectMatch } from "@std/assert";
19
- *
20
- * assertObjectMatch({ foo: { bar: 3, baz: 4 } }, { foo: { bar: 3 } }); // Doesn't throw
21
- * assertObjectMatch({ foo: { bar: 3 } }, { foo: { bar: 3, baz: 4 } }); // Throws
22
- * ```
23
- *
24
- * @param actual The actual value to be matched.
25
- * @param expected The expected value to match.
26
- * @param msg The optional message to display if the assertion fails.
27
- */
28
- export declare function assertObjectMatch(actual: Record<PropertyKey, any>, expected: Record<PropertyKey, unknown>, msg?: string): void;
29
- //# sourceMappingURL=object_match.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"object_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/object_match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,iBAAiB,CAE/B,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,EAChC,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EACtC,GAAG,CAAC,EAAE,MAAM,GACX,IAAI,CAUN"}
@@ -1,170 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertObjectMatch = assertObjectMatch;
4
- // Copyright 2018-2025 the Deno authors. MIT license.
5
- // This module is browser compatible.
6
- const equals_js_1 = require("./equals.js");
7
- /**
8
- * Make an assertion that `expected` object is a subset of `actual` object,
9
- * deeply. If not, then throw a diff of the objects, with mismatching
10
- * properties highlighted.
11
- *
12
- * @example Usage
13
- * ```ts ignore
14
- * import { assertObjectMatch } from "@std/assert";
15
- *
16
- * assertObjectMatch({ foo: "bar" }, { foo: "bar" }); // Doesn't throw
17
- * assertObjectMatch({ foo: "bar" }, { foo: "baz" }); // Throws
18
- * assertObjectMatch({ foo: 1, bar: 2 }, { foo: 1 }); // Doesn't throw
19
- * assertObjectMatch({ foo: 1 }, { foo: 1, bar: 2 }); // Throws
20
- * ```
21
- *
22
- * @example Usage with nested objects
23
- * ```ts ignore
24
- * import { assertObjectMatch } from "@std/assert";
25
- *
26
- * assertObjectMatch({ foo: { bar: 3, baz: 4 } }, { foo: { bar: 3 } }); // Doesn't throw
27
- * assertObjectMatch({ foo: { bar: 3 } }, { foo: { bar: 3, baz: 4 } }); // Throws
28
- * ```
29
- *
30
- * @param actual The actual value to be matched.
31
- * @param expected The expected value to match.
32
- * @param msg The optional message to display if the assertion fails.
33
- */
34
- function assertObjectMatch(
35
- // deno-lint-ignore no-explicit-any
36
- actual, expected, msg) {
37
- return (0, equals_js_1.assertEquals)(
38
- // get the intersection of "actual" and "expected"
39
- // side effect: all the instances' constructor field is "Object" now.
40
- filter(actual, expected),
41
- // set (nested) instances' constructor field to be "Object" without changing expected value.
42
- // see https://github.com/denoland/deno_std/pull/1419
43
- filter(expected, expected), msg);
44
- }
45
- function isObject(val) {
46
- return typeof val === "object" && val !== null;
47
- }
48
- function defineProperty(target, key, value) {
49
- return Object.defineProperty(target, key, {
50
- value,
51
- configurable: true,
52
- enumerable: true,
53
- writable: true,
54
- });
55
- }
56
- function filter(a, b) {
57
- const seen = new WeakMap();
58
- return filterObject(a, b);
59
- function filterObject(a, b) {
60
- // Prevent infinite loop with circular references with same filter
61
- const memo = seen.get(a);
62
- if (memo && (memo === b))
63
- return a;
64
- try {
65
- seen.set(a, b);
66
- }
67
- catch (err) {
68
- if (err instanceof TypeError) {
69
- throw new TypeError(`Cannot assertObjectMatch ${a === null ? null : `type ${typeof a}`}`);
70
- }
71
- }
72
- // Filter keys and symbols which are present in both actual and expected
73
- const filtered = {};
74
- const keysA = Reflect.ownKeys(a);
75
- const keysB = Reflect.ownKeys(b);
76
- const entries = keysA.filter((key) => keysB.includes(key))
77
- .map((key) => [key, a[key]]);
78
- if (keysA.length && keysB.length && !entries.length) {
79
- // If both objects are not empty but don't have the same keys or symbols,
80
- // returns the entries in object a.
81
- for (const key of keysA)
82
- defineProperty(filtered, key, a[key]);
83
- return filtered;
84
- }
85
- for (const [key, value] of entries) {
86
- // On regexp references, keep value as it to avoid loosing pattern and flags
87
- if (value instanceof RegExp) {
88
- defineProperty(filtered, key, value);
89
- continue;
90
- }
91
- const subset = b[key];
92
- // On array references, build a filtered array and filter nested objects inside
93
- if (Array.isArray(value) && Array.isArray(subset)) {
94
- defineProperty(filtered, key, filterArray(value, subset));
95
- continue;
96
- }
97
- // On nested objects references, build a filtered object recursively
98
- if (isObject(value) && isObject(subset)) {
99
- // When both operands are maps, build a filtered map with common keys and filter nested objects inside
100
- if ((value instanceof Map) && (subset instanceof Map)) {
101
- defineProperty(filtered, key, new Map([...value].filter(([k]) => subset.has(k)).map(([k, v]) => {
102
- const v2 = subset.get(k);
103
- if (isObject(v) && isObject(v2)) {
104
- return [k, filterObject(v, v2)];
105
- }
106
- return [k, v];
107
- })));
108
- continue;
109
- }
110
- // When both operands are set, build a filtered set with common values
111
- if ((value instanceof Set) && (subset instanceof Set)) {
112
- defineProperty(filtered, key, value.intersection(subset));
113
- continue;
114
- }
115
- defineProperty(filtered, key, filterObject(value, subset));
116
- continue;
117
- }
118
- defineProperty(filtered, key, value);
119
- }
120
- return filtered;
121
- }
122
- function filterArray(a, b) {
123
- // Prevent infinite loop with circular references with same filter
124
- const memo = seen.get(a);
125
- if (memo && (memo === b))
126
- return a;
127
- seen.set(a, b);
128
- const filtered = [];
129
- const count = Math.min(a.length, b.length);
130
- for (let i = 0; i < count; ++i) {
131
- const value = a[i];
132
- const subset = b[i];
133
- // On regexp references, keep value as it to avoid loosing pattern and flags
134
- if (value instanceof RegExp) {
135
- filtered.push(value);
136
- continue;
137
- }
138
- // On array references, build a filtered array and filter nested objects inside
139
- if (Array.isArray(value) && Array.isArray(subset)) {
140
- filtered.push(filterArray(value, subset));
141
- continue;
142
- }
143
- // On nested objects references, build a filtered object recursively
144
- if (isObject(value) && isObject(subset)) {
145
- // When both operands are maps, build a filtered map with common keys and filter nested objects inside
146
- if ((value instanceof Map) && (subset instanceof Map)) {
147
- const map = new Map([...value].filter(([k]) => subset.has(k))
148
- .map(([k, v]) => {
149
- const v2 = subset.get(k);
150
- if (isObject(v) && isObject(v2)) {
151
- return [k, filterObject(v, v2)];
152
- }
153
- return [k, v];
154
- }));
155
- filtered.push(map);
156
- continue;
157
- }
158
- // When both operands are set, build a filtered set with common values
159
- if ((value instanceof Set) && (subset instanceof Set)) {
160
- filtered.push(value.intersection(subset));
161
- continue;
162
- }
163
- filtered.push(filterObject(value, subset));
164
- continue;
165
- }
166
- filtered.push(value);
167
- }
168
- return filtered;
169
- }
170
- }