@scriptc/cli-darwin-x64 0.0.0 → 0.2.0

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 (960) hide show
  1. package/dist/LICENSE +202 -0
  2. package/dist/THIRD_PARTY_NOTICES +4 -0
  3. package/dist/bin/scriptc +0 -0
  4. package/dist/bin/scriptc.json +21 -0
  5. package/dist/lib/declarations/scriptc-node-fallback.d.ts +3847 -0
  6. package/dist/lib/declarations/scriptc-overrides.d.ts +92 -0
  7. package/dist/lib/declarations/scriptc.d.ts +98 -0
  8. package/dist/lib/llvm/LICENSE +1 -0
  9. package/dist/lib/llvm/SCRIPTC_LICENSE +1 -0
  10. package/dist/lib/llvm/THIRD_PARTY_NOTICES +1 -0
  11. package/dist/lib/llvm/bin/scriptc-llvm-codegen +0 -0
  12. package/dist/lib/llvm/package.json +35 -0
  13. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_array.o +0 -0
  14. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_assert.o +0 -0
  15. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_async.o +0 -0
  16. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_async_dyn.o +0 -0
  17. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bigint.o +0 -0
  18. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bigint_assert.o +0 -0
  19. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bytes.o +0 -0
  20. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bytes_io.o +0 -0
  21. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_child.o +0 -0
  22. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_closure.o +0 -0
  23. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_console.o +0 -0
  24. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_console_native.o +0 -0
  25. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_copying.o +0 -0
  26. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_crypto_async.o +0 -0
  27. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_cycle.o +0 -0
  28. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_dc.o +0 -0
  29. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_dgram.o +0 -0
  30. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_dyn_handle.o +0 -0
  31. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_dyn_invoke.o +0 -0
  32. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_error.o +0 -0
  33. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_events.o +0 -0
  34. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_events_emitter.o +0 -0
  35. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_exception.o +0 -0
  36. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_fetch.o +0 -0
  37. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_ffi.o +0 -0
  38. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_ffi_queue.o +0 -0
  39. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_file_handle.o +0 -0
  40. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_grapheme.o +0 -0
  41. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_http.o +0 -0
  42. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_http2.o +0 -0
  43. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_inspect.o +0 -0
  44. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_json.o +0 -0
  45. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_lib.o +0 -0
  46. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_loop_epoll.o +0 -0
  47. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_loop_kqueue.o +0 -0
  48. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_loop_wsapoll.o +0 -0
  49. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_map.o +0 -0
  50. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_net.o +0 -0
  51. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_node_builtin.o +0 -0
  52. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_number.o +0 -0
  53. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_object.o +0 -0
  54. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_path.o +0 -0
  55. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_qs.o +0 -0
  56. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_readline.o +0 -0
  57. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_regex.o +0 -0
  58. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_stream.o +0 -0
  59. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_string.o +0 -0
  60. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_symbol.o +0 -0
  61. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_test.o +0 -0
  62. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_tls.o +0 -0
  63. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_tls_ca.o +0 -0
  64. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_union.o +0 -0
  65. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_url.o +0 -0
  66. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_url_params.o +0 -0
  67. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_util.o +0 -0
  68. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_watch.o +0 -0
  69. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_zlib.o +0 -0
  70. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_array.o +0 -0
  71. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_assert.o +0 -0
  72. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_async.o +0 -0
  73. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_async_dyn.o +0 -0
  74. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bigint.o +0 -0
  75. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bigint_assert.o +0 -0
  76. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bytes.o +0 -0
  77. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bytes_io.o +0 -0
  78. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_child.o +0 -0
  79. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_closure.o +0 -0
  80. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_console.o +0 -0
  81. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_console_native.o +0 -0
  82. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_copying.o +0 -0
  83. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_crypto_async.o +0 -0
  84. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_cycle.o +0 -0
  85. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_dc.o +0 -0
  86. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_dgram.o +0 -0
  87. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_dyn_handle.o +0 -0
  88. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_dyn_invoke.o +0 -0
  89. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_error.o +0 -0
  90. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_events.o +0 -0
  91. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_events_emitter.o +0 -0
  92. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_exception.o +0 -0
  93. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_fetch.o +0 -0
  94. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_ffi.o +0 -0
  95. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_ffi_queue.o +0 -0
  96. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_file_handle.o +0 -0
  97. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_grapheme.o +0 -0
  98. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_http.o +0 -0
  99. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_http2.o +0 -0
  100. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_inspect.o +0 -0
  101. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_inspect_island.o +0 -0
  102. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_island.o +0 -0
  103. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_json.o +0 -0
  104. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_lib.o +0 -0
  105. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_loop_epoll.o +0 -0
  106. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_loop_kqueue.o +0 -0
  107. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_loop_wsapoll.o +0 -0
  108. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_map.o +0 -0
  109. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_net.o +0 -0
  110. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_net_island.o +0 -0
  111. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_node_builtin.o +0 -0
  112. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_number.o +0 -0
  113. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_object.o +0 -0
  114. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_path.o +0 -0
  115. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_qs.o +0 -0
  116. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_readline.o +0 -0
  117. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_regex.o +0 -0
  118. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_stream.o +0 -0
  119. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_string.o +0 -0
  120. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_symbol.o +0 -0
  121. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_test.o +0 -0
  122. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_tls.o +0 -0
  123. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_tls_ca.o +0 -0
  124. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_union.o +0 -0
  125. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_url.o +0 -0
  126. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_url_params.o +0 -0
  127. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_util.o +0 -0
  128. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_watch.o +0 -0
  129. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_web.o +0 -0
  130. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_zlib.o +0 -0
  131. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_zlib_island.o +0 -0
  132. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic-text-decoder-legacy/scr_bytes.o +0 -0
  133. package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  134. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_array.o +0 -0
  135. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_assert.o +0 -0
  136. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bigint.o +0 -0
  137. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bigint_assert.o +0 -0
  138. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bytes.o +0 -0
  139. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bytes_io.o +0 -0
  140. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_closure.o +0 -0
  141. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_console.o +0 -0
  142. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_console_native.o +0 -0
  143. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_copying.o +0 -0
  144. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_cycle.o +0 -0
  145. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_dyn_handle.o +0 -0
  146. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_dyn_invoke.o +0 -0
  147. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_error.o +0 -0
  148. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_events_emitter.o +0 -0
  149. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_exception.o +0 -0
  150. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_grapheme.o +0 -0
  151. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_inspect.o +0 -0
  152. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_json.o +0 -0
  153. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_lib.o +0 -0
  154. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_library.o +0 -0
  155. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_map.o +0 -0
  156. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_node_builtin.o +0 -0
  157. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_number.o +0 -0
  158. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_object.o +0 -0
  159. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_path.o +0 -0
  160. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_regex.o +0 -0
  161. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_string.o +0 -0
  162. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_symbol.o +0 -0
  163. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_union.o +0 -0
  164. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_url.o +0 -0
  165. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_url_params.o +0 -0
  166. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_zlib.o +0 -0
  167. package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  168. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_array.o +0 -0
  169. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_assert.o +0 -0
  170. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bigint.o +0 -0
  171. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bigint_assert.o +0 -0
  172. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bytes.o +0 -0
  173. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bytes_io.o +0 -0
  174. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_closure.o +0 -0
  175. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_console.o +0 -0
  176. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_console_native.o +0 -0
  177. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_copying.o +0 -0
  178. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_cycle.o +0 -0
  179. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_dyn_handle.o +0 -0
  180. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_dyn_invoke.o +0 -0
  181. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_error.o +0 -0
  182. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_events_emitter.o +0 -0
  183. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_exception.o +0 -0
  184. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_grapheme.o +0 -0
  185. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_inspect.o +0 -0
  186. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_json.o +0 -0
  187. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_lib.o +0 -0
  188. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_library.o +0 -0
  189. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_map.o +0 -0
  190. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_node_builtin.o +0 -0
  191. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_number.o +0 -0
  192. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_object.o +0 -0
  193. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_path.o +0 -0
  194. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_regex.o +0 -0
  195. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_string.o +0 -0
  196. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_symbol.o +0 -0
  197. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_union.o +0 -0
  198. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_url.o +0 -0
  199. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_url_params.o +0 -0
  200. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_zlib.o +0 -0
  201. package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  202. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_array.o +0 -0
  203. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_assert.o +0 -0
  204. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bigint.o +0 -0
  205. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bigint_assert.o +0 -0
  206. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bytes.o +0 -0
  207. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bytes_io.o +0 -0
  208. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_closure.o +0 -0
  209. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_console.o +0 -0
  210. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_console_native.o +0 -0
  211. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_copying.o +0 -0
  212. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_cycle.o +0 -0
  213. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_dyn_handle.o +0 -0
  214. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_dyn_invoke.o +0 -0
  215. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_error.o +0 -0
  216. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_events_emitter.o +0 -0
  217. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_exception.o +0 -0
  218. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_grapheme.o +0 -0
  219. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_inspect.o +0 -0
  220. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_json.o +0 -0
  221. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_lib.o +0 -0
  222. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_library.o +0 -0
  223. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_map.o +0 -0
  224. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_node_builtin.o +0 -0
  225. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_number.o +0 -0
  226. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_object.o +0 -0
  227. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_path.o +0 -0
  228. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_regex.o +0 -0
  229. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_string.o +0 -0
  230. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_symbol.o +0 -0
  231. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_union.o +0 -0
  232. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_url.o +0 -0
  233. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_url_params.o +0 -0
  234. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_zlib.o +0 -0
  235. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  236. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_array.o +0 -0
  237. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_assert.o +0 -0
  238. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bigint.o +0 -0
  239. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bigint_assert.o +0 -0
  240. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bytes.o +0 -0
  241. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bytes_io.o +0 -0
  242. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_closure.o +0 -0
  243. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_console.o +0 -0
  244. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_console_native.o +0 -0
  245. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_copying.o +0 -0
  246. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_cycle.o +0 -0
  247. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_dyn_handle.o +0 -0
  248. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_dyn_invoke.o +0 -0
  249. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_error.o +0 -0
  250. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_events_emitter.o +0 -0
  251. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_exception.o +0 -0
  252. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_grapheme.o +0 -0
  253. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_inspect.o +0 -0
  254. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_json.o +0 -0
  255. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_lib.o +0 -0
  256. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_library.o +0 -0
  257. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_map.o +0 -0
  258. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_node_builtin.o +0 -0
  259. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_number.o +0 -0
  260. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_object.o +0 -0
  261. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_path.o +0 -0
  262. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_regex.o +0 -0
  263. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_string.o +0 -0
  264. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_symbol.o +0 -0
  265. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_union.o +0 -0
  266. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_url.o +0 -0
  267. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_url_params.o +0 -0
  268. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_zlib.o +0 -0
  269. package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  270. package/dist/lib/runtime-darwin-x64/artifacts/licenses/mbedtls.txt +553 -0
  271. package/dist/lib/runtime-darwin-x64/artifacts/licenses/quickjs-ng.txt +24 -0
  272. package/dist/lib/runtime-darwin-x64/artifacts/licenses/ryu.txt +23 -0
  273. package/dist/lib/runtime-darwin-x64/artifacts/licenses/scriptc-runtime.txt +202 -0
  274. package/dist/lib/runtime-darwin-x64/artifacts/licenses/unicode.txt +39 -0
  275. package/dist/lib/runtime-darwin-x64/artifacts/licenses/zlib.txt +22 -0
  276. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_array.o +0 -0
  277. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_assert.o +0 -0
  278. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_async.o +0 -0
  279. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_async_dyn.o +0 -0
  280. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bigint.o +0 -0
  281. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bigint_assert.o +0 -0
  282. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bytes.o +0 -0
  283. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bytes_io.o +0 -0
  284. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_child.o +0 -0
  285. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_closure.o +0 -0
  286. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_console.o +0 -0
  287. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_console_native.o +0 -0
  288. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_copying.o +0 -0
  289. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_crypto_async.o +0 -0
  290. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_cycle.o +0 -0
  291. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_dc.o +0 -0
  292. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_dgram.o +0 -0
  293. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_dyn_handle.o +0 -0
  294. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_dyn_invoke.o +0 -0
  295. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_error.o +0 -0
  296. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_events.o +0 -0
  297. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_events_emitter.o +0 -0
  298. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_exception.o +0 -0
  299. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_fetch.o +0 -0
  300. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_ffi.o +0 -0
  301. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_ffi_queue.o +0 -0
  302. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_file_handle.o +0 -0
  303. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_grapheme.o +0 -0
  304. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_http.o +0 -0
  305. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_http2.o +0 -0
  306. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_inspect.o +0 -0
  307. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_json.o +0 -0
  308. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_lib.o +0 -0
  309. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_loop_epoll.o +0 -0
  310. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_loop_kqueue.o +0 -0
  311. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_loop_wsapoll.o +0 -0
  312. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_map.o +0 -0
  313. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_net.o +0 -0
  314. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_node_builtin.o +0 -0
  315. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_number.o +0 -0
  316. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_object.o +0 -0
  317. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_path.o +0 -0
  318. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_qs.o +0 -0
  319. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_readline.o +0 -0
  320. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_regex.o +0 -0
  321. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_stream.o +0 -0
  322. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_string.o +0 -0
  323. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_symbol.o +0 -0
  324. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_test.o +0 -0
  325. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_tls.o +0 -0
  326. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_tls_ca.o +0 -0
  327. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_union.o +0 -0
  328. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_url.o +0 -0
  329. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_url_params.o +0 -0
  330. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_util.o +0 -0
  331. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_watch.o +0 -0
  332. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_zlib.o +0 -0
  333. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_array.o +0 -0
  334. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_assert.o +0 -0
  335. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_async.o +0 -0
  336. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_async_dyn.o +0 -0
  337. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bigint.o +0 -0
  338. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bigint_assert.o +0 -0
  339. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bytes.o +0 -0
  340. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bytes_io.o +0 -0
  341. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_child.o +0 -0
  342. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_closure.o +0 -0
  343. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_console.o +0 -0
  344. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_console_native.o +0 -0
  345. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_copying.o +0 -0
  346. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_crypto_async.o +0 -0
  347. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_cycle.o +0 -0
  348. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_dc.o +0 -0
  349. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_dgram.o +0 -0
  350. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_dyn_handle.o +0 -0
  351. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_dyn_invoke.o +0 -0
  352. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_error.o +0 -0
  353. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_events.o +0 -0
  354. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_events_emitter.o +0 -0
  355. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_exception.o +0 -0
  356. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_fetch.o +0 -0
  357. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_ffi.o +0 -0
  358. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_ffi_queue.o +0 -0
  359. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_file_handle.o +0 -0
  360. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_grapheme.o +0 -0
  361. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_http.o +0 -0
  362. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_http2.o +0 -0
  363. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_inspect.o +0 -0
  364. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_inspect_island.o +0 -0
  365. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_island.o +0 -0
  366. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_json.o +0 -0
  367. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_lib.o +0 -0
  368. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_loop_epoll.o +0 -0
  369. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_loop_kqueue.o +0 -0
  370. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_loop_wsapoll.o +0 -0
  371. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_map.o +0 -0
  372. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_net.o +0 -0
  373. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_net_island.o +0 -0
  374. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_node_builtin.o +0 -0
  375. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_number.o +0 -0
  376. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_object.o +0 -0
  377. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_path.o +0 -0
  378. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_qs.o +0 -0
  379. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_readline.o +0 -0
  380. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_regex.o +0 -0
  381. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_stream.o +0 -0
  382. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_string.o +0 -0
  383. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_symbol.o +0 -0
  384. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_test.o +0 -0
  385. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_tls.o +0 -0
  386. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_tls_ca.o +0 -0
  387. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_union.o +0 -0
  388. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_url.o +0 -0
  389. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_url_params.o +0 -0
  390. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_util.o +0 -0
  391. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_watch.o +0 -0
  392. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_web.o +0 -0
  393. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_zlib.o +0 -0
  394. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_zlib_island.o +0 -0
  395. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic-text-decoder-legacy/scr_bytes.o +0 -0
  396. package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
  397. package/dist/lib/runtime-darwin-x64/artifacts/vendor/libregexp/libscriptc-libregexp.a +0 -0
  398. package/dist/lib/runtime-darwin-x64/artifacts/vendor/mbedtls/libscriptc-mbedtls.a +0 -0
  399. package/dist/lib/runtime-darwin-x64/artifacts/vendor/quickjs/libscriptc-quickjs.a +0 -0
  400. package/dist/lib/runtime-darwin-x64/artifacts/vendor/zlib/libscriptc-zlib.a +0 -0
  401. package/dist/lib/runtime-darwin-x64/package.json +24 -0
  402. package/dist/lib/runtime-darwin-x64/runtime-pack.json +5758 -0
  403. package/dist/lib/runtime-sources/LICENSE +202 -0
  404. package/dist/lib/runtime-sources/package.json +22 -0
  405. package/dist/lib/runtime-sources/src/scr_array.c +1444 -0
  406. package/dist/lib/runtime-sources/src/scr_assert.c +1537 -0
  407. package/dist/lib/runtime-sources/src/scr_async.c +3920 -0
  408. package/dist/lib/runtime-sources/src/scr_async.test.c +134 -0
  409. package/dist/lib/runtime-sources/src/scr_async.test.ts +34 -0
  410. package/dist/lib/runtime-sources/src/scr_async_dyn.c +803 -0
  411. package/dist/lib/runtime-sources/src/scr_bigint.c +890 -0
  412. package/dist/lib/runtime-sources/src/scr_bigint_assert.c +22 -0
  413. package/dist/lib/runtime-sources/src/scr_bytes.c +2518 -0
  414. package/dist/lib/runtime-sources/src/scr_bytes_io.c +755 -0
  415. package/dist/lib/runtime-sources/src/scr_child.c +5808 -0
  416. package/dist/lib/runtime-sources/src/scr_closure.c +213 -0
  417. package/dist/lib/runtime-sources/src/scr_console.c +259 -0
  418. package/dist/lib/runtime-sources/src/scr_console_native.c +95 -0
  419. package/dist/lib/runtime-sources/src/scr_copying.c +146 -0
  420. package/dist/lib/runtime-sources/src/scr_crypto_async.c +24 -0
  421. package/dist/lib/runtime-sources/src/scr_cycle.c +565 -0
  422. package/dist/lib/runtime-sources/src/scr_dc.c +814 -0
  423. package/dist/lib/runtime-sources/src/scr_dgram.c +1182 -0
  424. package/dist/lib/runtime-sources/src/scr_dyn_handle.c +96 -0
  425. package/dist/lib/runtime-sources/src/scr_dyn_invoke.c +1626 -0
  426. package/dist/lib/runtime-sources/src/scr_error.c +372 -0
  427. package/dist/lib/runtime-sources/src/scr_events.c +1222 -0
  428. package/dist/lib/runtime-sources/src/scr_events_emitter.c +842 -0
  429. package/dist/lib/runtime-sources/src/scr_exception.c +468 -0
  430. package/dist/lib/runtime-sources/src/scr_fetch.c +7215 -0
  431. package/dist/lib/runtime-sources/src/scr_fetch_curl.c +666 -0
  432. package/dist/lib/runtime-sources/src/scr_ffi.c +143 -0
  433. package/dist/lib/runtime-sources/src/scr_ffi_queue.c +379 -0
  434. package/dist/lib/runtime-sources/src/scr_file_handle.c +562 -0
  435. package/dist/lib/runtime-sources/src/scr_grapheme.c +203 -0
  436. package/dist/lib/runtime-sources/src/scr_grapheme_data.h +842 -0
  437. package/dist/lib/runtime-sources/src/scr_http.c +5808 -0
  438. package/dist/lib/runtime-sources/src/scr_http2.c +3243 -0
  439. package/dist/lib/runtime-sources/src/scr_inspect.c +923 -0
  440. package/dist/lib/runtime-sources/src/scr_inspect_island.c +51 -0
  441. package/dist/lib/runtime-sources/src/scr_island.c +9987 -0
  442. package/dist/lib/runtime-sources/src/scr_island_manifest.h +153 -0
  443. package/dist/lib/runtime-sources/src/scr_json.c +7928 -0
  444. package/dist/lib/runtime-sources/src/scr_json.test.c +182 -0
  445. package/dist/lib/runtime-sources/src/scr_json.test.ts +33 -0
  446. package/dist/lib/runtime-sources/src/scr_lib.c +6304 -0
  447. package/dist/lib/runtime-sources/src/scr_library.c +444 -0
  448. package/dist/lib/runtime-sources/src/scr_loop_epoll.c +241 -0
  449. package/dist/lib/runtime-sources/src/scr_loop_kqueue.c +121 -0
  450. package/dist/lib/runtime-sources/src/scr_loop_wsapoll.c +208 -0
  451. package/dist/lib/runtime-sources/src/scr_map.c +705 -0
  452. package/dist/lib/runtime-sources/src/scr_musl.c +438 -0
  453. package/dist/lib/runtime-sources/src/scr_net.c +3708 -0
  454. package/dist/lib/runtime-sources/src/scr_net_island.c +458 -0
  455. package/dist/lib/runtime-sources/src/scr_node_builtin.c +281 -0
  456. package/dist/lib/runtime-sources/src/scr_number.c +192 -0
  457. package/dist/lib/runtime-sources/src/scr_object.c +80 -0
  458. package/dist/lib/runtime-sources/src/scr_path.c +1281 -0
  459. package/dist/lib/runtime-sources/src/scr_platform.h +119 -0
  460. package/dist/lib/runtime-sources/src/scr_qs.c +496 -0
  461. package/dist/lib/runtime-sources/src/scr_readline.c +288 -0
  462. package/dist/lib/runtime-sources/src/scr_regex.c +1274 -0
  463. package/dist/lib/runtime-sources/src/scr_runtime.h +7207 -0
  464. package/dist/lib/runtime-sources/src/scr_stream.c +3149 -0
  465. package/dist/lib/runtime-sources/src/scr_string.c +1849 -0
  466. package/dist/lib/runtime-sources/src/scr_symbol.c +234 -0
  467. package/dist/lib/runtime-sources/src/scr_test.c +662 -0
  468. package/dist/lib/runtime-sources/src/scr_text_decoder_data.h +7389 -0
  469. package/dist/lib/runtime-sources/src/scr_tls.c +1806 -0
  470. package/dist/lib/runtime-sources/src/scr_tls_ca.c +433 -0
  471. package/dist/lib/runtime-sources/src/scr_union.c +105 -0
  472. package/dist/lib/runtime-sources/src/scr_url.c +1231 -0
  473. package/dist/lib/runtime-sources/src/scr_url_internal.h +29 -0
  474. package/dist/lib/runtime-sources/src/scr_url_params.c +526 -0
  475. package/dist/lib/runtime-sources/src/scr_util.c +984 -0
  476. package/dist/lib/runtime-sources/src/scr_watch.c +568 -0
  477. package/dist/lib/runtime-sources/src/scr_web.c +1854 -0
  478. package/dist/lib/runtime-sources/src/scr_win.c +231 -0
  479. package/dist/lib/runtime-sources/src/scr_win_stats.h +23 -0
  480. package/dist/lib/runtime-sources/src/scr_zlib.c +358 -0
  481. package/dist/lib/runtime-sources/src/scr_zlib_island.c +15 -0
  482. package/dist/lib/runtime-sources/vendor/README.md +60 -0
  483. package/dist/lib/runtime-sources/vendor/curl/COPYRIGHT +534 -0
  484. package/dist/lib/runtime-sources/vendor/curl/include/curl/curl.h +3214 -0
  485. package/dist/lib/runtime-sources/vendor/curl/include/curl/curlver.h +79 -0
  486. package/dist/lib/runtime-sources/vendor/curl/include/curl/easy.h +125 -0
  487. package/dist/lib/runtime-sources/vendor/curl/include/curl/header.h +74 -0
  488. package/dist/lib/runtime-sources/vendor/curl/include/curl/mprintf.h +52 -0
  489. package/dist/lib/runtime-sources/vendor/curl/include/curl/multi.h +460 -0
  490. package/dist/lib/runtime-sources/vendor/curl/include/curl/options.h +70 -0
  491. package/dist/lib/runtime-sources/vendor/curl/include/curl/stdcheaders.h +35 -0
  492. package/dist/lib/runtime-sources/vendor/curl/include/curl/system.h +508 -0
  493. package/dist/lib/runtime-sources/vendor/curl/include/curl/typecheck-gcc.h +716 -0
  494. package/dist/lib/runtime-sources/vendor/curl/include/curl/urlapi.h +149 -0
  495. package/dist/lib/runtime-sources/vendor/curl/include/curl/websockets.h +84 -0
  496. package/dist/lib/runtime-sources/vendor/mbedtls/LICENSE +553 -0
  497. package/dist/lib/runtime-sources/vendor/mbedtls/include/CMakeLists.txt +22 -0
  498. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/aes.h +631 -0
  499. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/aria.h +343 -0
  500. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/asn1.h +642 -0
  501. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/asn1write.h +390 -0
  502. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/base64.h +82 -0
  503. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/bignum.h +1088 -0
  504. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/block_cipher.h +76 -0
  505. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/build_info.h +194 -0
  506. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/camellia.h +305 -0
  507. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ccm.h +526 -0
  508. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/chacha20.h +209 -0
  509. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/chachapoly.h +351 -0
  510. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/check_config.h +1149 -0
  511. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/cipher.h +1250 -0
  512. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/cmac.h +246 -0
  513. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/compat-2.x.h +46 -0
  514. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_legacy_crypto.h +578 -0
  515. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_legacy_from_psa.h +873 -0
  516. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_psa_from_legacy.h +359 -0
  517. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_psa_superset_legacy.h +145 -0
  518. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_ssl.h +91 -0
  519. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_adjust_x509.h +35 -0
  520. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/config_psa.h +61 -0
  521. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/constant_time.h +36 -0
  522. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ctr_drbg.h +596 -0
  523. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/debug.h +156 -0
  524. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/des.h +385 -0
  525. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/dhm.h +972 -0
  526. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ecdh.h +455 -0
  527. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ecdsa.h +674 -0
  528. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ecjpake.h +298 -0
  529. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ecp.h +1517 -0
  530. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/entropy.h +274 -0
  531. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/error.h +201 -0
  532. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/gcm.h +387 -0
  533. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/hkdf.h +124 -0
  534. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/hmac_drbg.h +434 -0
  535. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/lms.h +440 -0
  536. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/mbedtls_config.h +4446 -0
  537. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/md.h +526 -0
  538. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/md5.h +190 -0
  539. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/memory_buffer_alloc.h +142 -0
  540. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/net_sockets.h +299 -0
  541. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/nist_kw.h +166 -0
  542. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/oid.h +727 -0
  543. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pem.h +160 -0
  544. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pk.h +1303 -0
  545. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pkcs12.h +186 -0
  546. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pkcs5.h +198 -0
  547. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/pkcs7.h +252 -0
  548. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/platform.h +516 -0
  549. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/platform_time.h +79 -0
  550. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/platform_util.h +247 -0
  551. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/poly1305.h +168 -0
  552. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/private_access.h +20 -0
  553. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/psa_util.h +207 -0
  554. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ripemd160.h +136 -0
  555. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/rsa.h +1170 -0
  556. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/sha1.h +219 -0
  557. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/sha256.h +200 -0
  558. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/sha3.h +172 -0
  559. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/sha512.h +208 -0
  560. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl.h +5887 -0
  561. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl_cache.h +187 -0
  562. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl_ciphersuites.h +482 -0
  563. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl_cookie.h +106 -0
  564. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/ssl_ticket.h +199 -0
  565. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/threading.h +167 -0
  566. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/timing.h +94 -0
  567. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/version.h +78 -0
  568. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/x509.h +500 -0
  569. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/x509_crl.h +184 -0
  570. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/x509_crt.h +1208 -0
  571. package/dist/lib/runtime-sources/vendor/mbedtls/include/mbedtls/x509_csr.h +382 -0
  572. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/build_info.h +20 -0
  573. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto.h +4998 -0
  574. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_adjust_auto_enabled.h +31 -0
  575. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_adjust_config_dependencies.h +51 -0
  576. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_adjust_config_key_pair_types.h +101 -0
  577. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_adjust_config_synonyms.h +49 -0
  578. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_builtin_composites.h +214 -0
  579. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_builtin_key_derivation.h +118 -0
  580. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_builtin_primitives.h +114 -0
  581. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_compat.h +230 -0
  582. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_config.h +145 -0
  583. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_driver_common.h +44 -0
  584. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_driver_contexts_composites.h +151 -0
  585. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_driver_contexts_key_derivation.h +52 -0
  586. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_driver_contexts_primitives.h +105 -0
  587. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_extra.h +2145 -0
  588. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_legacy.h +88 -0
  589. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_platform.h +102 -0
  590. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_se_driver.h +1383 -0
  591. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_sizes.h +1319 -0
  592. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_struct.h +527 -0
  593. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_types.h +508 -0
  594. package/dist/lib/runtime-sources/vendor/mbedtls/include/psa/crypto_values.h +2782 -0
  595. package/dist/lib/runtime-sources/vendor/mbedtls/library/aes.c +2294 -0
  596. package/dist/lib/runtime-sources/vendor/mbedtls/library/aesce.c +624 -0
  597. package/dist/lib/runtime-sources/vendor/mbedtls/library/aesce.h +136 -0
  598. package/dist/lib/runtime-sources/vendor/mbedtls/library/aesni.c +846 -0
  599. package/dist/lib/runtime-sources/vendor/mbedtls/library/aesni.h +162 -0
  600. package/dist/lib/runtime-sources/vendor/mbedtls/library/alignment.h +704 -0
  601. package/dist/lib/runtime-sources/vendor/mbedtls/library/aria.c +969 -0
  602. package/dist/lib/runtime-sources/vendor/mbedtls/library/asn1parse.c +468 -0
  603. package/dist/lib/runtime-sources/vendor/mbedtls/library/asn1write.c +440 -0
  604. package/dist/lib/runtime-sources/vendor/mbedtls/library/base64.c +322 -0
  605. package/dist/lib/runtime-sources/vendor/mbedtls/library/base64_internal.h +45 -0
  606. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum.c +2583 -0
  607. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_core.c +1240 -0
  608. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_core.h +872 -0
  609. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_core_invasive.h +38 -0
  610. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_internal.h +122 -0
  611. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod.c +394 -0
  612. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod.h +452 -0
  613. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod_raw.c +276 -0
  614. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod_raw.h +416 -0
  615. package/dist/lib/runtime-sources/vendor/mbedtls/library/bignum_mod_raw_invasive.h +34 -0
  616. package/dist/lib/runtime-sources/vendor/mbedtls/library/block_cipher.c +207 -0
  617. package/dist/lib/runtime-sources/vendor/mbedtls/library/block_cipher_internal.h +99 -0
  618. package/dist/lib/runtime-sources/vendor/mbedtls/library/bn_mul.h +1094 -0
  619. package/dist/lib/runtime-sources/vendor/mbedtls/library/camellia.c +1058 -0
  620. package/dist/lib/runtime-sources/vendor/mbedtls/library/ccm.c +777 -0
  621. package/dist/lib/runtime-sources/vendor/mbedtls/library/chacha20.c +563 -0
  622. package/dist/lib/runtime-sources/vendor/mbedtls/library/chacha20_internal.h +23 -0
  623. package/dist/lib/runtime-sources/vendor/mbedtls/library/chachapoly.c +487 -0
  624. package/dist/lib/runtime-sources/vendor/mbedtls/library/check_crypto_config.h +136 -0
  625. package/dist/lib/runtime-sources/vendor/mbedtls/library/cipher.c +1712 -0
  626. package/dist/lib/runtime-sources/vendor/mbedtls/library/cipher_invasive.h +28 -0
  627. package/dist/lib/runtime-sources/vendor/mbedtls/library/cipher_wrap.c +2482 -0
  628. package/dist/lib/runtime-sources/vendor/mbedtls/library/cipher_wrap.h +178 -0
  629. package/dist/lib/runtime-sources/vendor/mbedtls/library/cmac.c +1067 -0
  630. package/dist/lib/runtime-sources/vendor/mbedtls/library/common.h +487 -0
  631. package/dist/lib/runtime-sources/vendor/mbedtls/library/constant_time.c +247 -0
  632. package/dist/lib/runtime-sources/vendor/mbedtls/library/constant_time_impl.h +541 -0
  633. package/dist/lib/runtime-sources/vendor/mbedtls/library/constant_time_internal.h +579 -0
  634. package/dist/lib/runtime-sources/vendor/mbedtls/library/ctr.h +35 -0
  635. package/dist/lib/runtime-sources/vendor/mbedtls/library/ctr_drbg.c +1016 -0
  636. package/dist/lib/runtime-sources/vendor/mbedtls/library/debug.c +475 -0
  637. package/dist/lib/runtime-sources/vendor/mbedtls/library/debug_internal.h +185 -0
  638. package/dist/lib/runtime-sources/vendor/mbedtls/library/des.c +1042 -0
  639. package/dist/lib/runtime-sources/vendor/mbedtls/library/dhm.c +700 -0
  640. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecdh.c +696 -0
  641. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecdsa.c +858 -0
  642. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecjpake.c +1216 -0
  643. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp.c +3674 -0
  644. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp_curves.c +6125 -0
  645. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp_curves_new.c +9 -0
  646. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp_internal_alt.h +287 -0
  647. package/dist/lib/runtime-sources/vendor/mbedtls/library/ecp_invasive.h +305 -0
  648. package/dist/lib/runtime-sources/vendor/mbedtls/library/entropy.c +680 -0
  649. package/dist/lib/runtime-sources/vendor/mbedtls/library/entropy_poll.c +233 -0
  650. package/dist/lib/runtime-sources/vendor/mbedtls/library/entropy_poll.h +64 -0
  651. package/dist/lib/runtime-sources/vendor/mbedtls/library/error.c +878 -0
  652. package/dist/lib/runtime-sources/vendor/mbedtls/library/gcm.c +1330 -0
  653. package/dist/lib/runtime-sources/vendor/mbedtls/library/hkdf.c +161 -0
  654. package/dist/lib/runtime-sources/vendor/mbedtls/library/hmac_drbg.c +633 -0
  655. package/dist/lib/runtime-sources/vendor/mbedtls/library/lmots.c +789 -0
  656. package/dist/lib/runtime-sources/vendor/mbedtls/library/lmots.h +288 -0
  657. package/dist/lib/runtime-sources/vendor/mbedtls/library/lms.c +778 -0
  658. package/dist/lib/runtime-sources/vendor/mbedtls/library/md.c +1108 -0
  659. package/dist/lib/runtime-sources/vendor/mbedtls/library/md5.c +426 -0
  660. package/dist/lib/runtime-sources/vendor/mbedtls/library/md_psa.h +26 -0
  661. package/dist/lib/runtime-sources/vendor/mbedtls/library/md_wrap.h +46 -0
  662. package/dist/lib/runtime-sources/vendor/mbedtls/library/memory_buffer_alloc.c +751 -0
  663. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_common.h +181 -0
  664. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_error.h +89 -0
  665. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_reader.c +538 -0
  666. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_reader.h +366 -0
  667. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_trace.c +112 -0
  668. package/dist/lib/runtime-sources/vendor/mbedtls/library/mps_trace.h +154 -0
  669. package/dist/lib/runtime-sources/vendor/mbedtls/library/net_sockets.c +694 -0
  670. package/dist/lib/runtime-sources/vendor/mbedtls/library/nist_kw.c +729 -0
  671. package/dist/lib/runtime-sources/vendor/mbedtls/library/oid.c +1166 -0
  672. package/dist/lib/runtime-sources/vendor/mbedtls/library/padlock.c +157 -0
  673. package/dist/lib/runtime-sources/vendor/mbedtls/library/padlock.h +111 -0
  674. package/dist/lib/runtime-sources/vendor/mbedtls/library/pem.c +554 -0
  675. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk.c +1602 -0
  676. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk_ecc.c +261 -0
  677. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk_internal.h +241 -0
  678. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk_wrap.c +1618 -0
  679. package/dist/lib/runtime-sources/vendor/mbedtls/library/pk_wrap.h +138 -0
  680. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkcs12.c +437 -0
  681. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkcs5.c +500 -0
  682. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkcs7.c +787 -0
  683. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkparse.c +1392 -0
  684. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkwrite.c +631 -0
  685. package/dist/lib/runtime-sources/vendor/mbedtls/library/pkwrite.h +121 -0
  686. package/dist/lib/runtime-sources/vendor/mbedtls/library/platform.c +402 -0
  687. package/dist/lib/runtime-sources/vendor/mbedtls/library/platform_util.c +258 -0
  688. package/dist/lib/runtime-sources/vendor/mbedtls/library/poly1305.c +492 -0
  689. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto.c +9532 -0
  690. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_aead.c +646 -0
  691. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_aead.h +499 -0
  692. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_cipher.c +747 -0
  693. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_cipher.h +316 -0
  694. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_client.c +22 -0
  695. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_core.h +983 -0
  696. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_core_common.h +52 -0
  697. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_driver_wrappers.h +2896 -0
  698. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_driver_wrappers_no_static.c +256 -0
  699. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_driver_wrappers_no_static.h +31 -0
  700. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_ecp.c +594 -0
  701. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_ecp.h +267 -0
  702. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_ffdh.c +361 -0
  703. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_ffdh.h +131 -0
  704. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_hash.c +470 -0
  705. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_hash.h +211 -0
  706. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_invasive.h +92 -0
  707. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_its.h +131 -0
  708. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_mac.c +505 -0
  709. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_mac.h +264 -0
  710. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_pake.c +571 -0
  711. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_pake.h +159 -0
  712. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_random.c +181 -0
  713. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_random.h +72 -0
  714. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_random_impl.h +200 -0
  715. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_rsa.c +714 -0
  716. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_rsa.h +321 -0
  717. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_se.c +373 -0
  718. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_se.h +192 -0
  719. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_slot_management.c +1137 -0
  720. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_slot_management.h +344 -0
  721. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_storage.c +481 -0
  722. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_crypto_storage.h +392 -0
  723. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_its_file.c +254 -0
  724. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_util.c +614 -0
  725. package/dist/lib/runtime-sources/vendor/mbedtls/library/psa_util_internal.h +100 -0
  726. package/dist/lib/runtime-sources/vendor/mbedtls/library/ripemd160.c +490 -0
  727. package/dist/lib/runtime-sources/vendor/mbedtls/library/rsa.c +3121 -0
  728. package/dist/lib/runtime-sources/vendor/mbedtls/library/rsa_alt_helpers.c +455 -0
  729. package/dist/lib/runtime-sources/vendor/mbedtls/library/rsa_alt_helpers.h +209 -0
  730. package/dist/lib/runtime-sources/vendor/mbedtls/library/rsa_internal.h +188 -0
  731. package/dist/lib/runtime-sources/vendor/mbedtls/library/sha1.c +480 -0
  732. package/dist/lib/runtime-sources/vendor/mbedtls/library/sha256.c +983 -0
  733. package/dist/lib/runtime-sources/vendor/mbedtls/library/sha3.c +721 -0
  734. package/dist/lib/runtime-sources/vendor/mbedtls/library/sha512.c +1115 -0
  735. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_cache.c +410 -0
  736. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_ciphersuites.c +2050 -0
  737. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_ciphersuites_internal.h +154 -0
  738. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_client.c +1023 -0
  739. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_client.h +22 -0
  740. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_cookie.c +384 -0
  741. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_debug_helpers.h +85 -0
  742. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_debug_helpers_generated.c +251 -0
  743. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_misc.h +3198 -0
  744. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_msg.c +6619 -0
  745. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_ticket.c +556 -0
  746. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls.c +10234 -0
  747. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls12_client.c +3688 -0
  748. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls12_server.c +4311 -0
  749. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_client.c +3208 -0
  750. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_generic.c +1793 -0
  751. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_invasive.h +23 -0
  752. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_keys.c +1918 -0
  753. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_keys.h +668 -0
  754. package/dist/lib/runtime-sources/vendor/mbedtls/library/ssl_tls13_server.c +3624 -0
  755. package/dist/lib/runtime-sources/vendor/mbedtls/library/threading.c +193 -0
  756. package/dist/lib/runtime-sources/vendor/mbedtls/library/threading_internal.h +28 -0
  757. package/dist/lib/runtime-sources/vendor/mbedtls/library/timing.c +152 -0
  758. package/dist/lib/runtime-sources/vendor/mbedtls/library/version.c +32 -0
  759. package/dist/lib/runtime-sources/vendor/mbedtls/library/version_features.c +856 -0
  760. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509.c +1776 -0
  761. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_create.c +570 -0
  762. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_crl.c +708 -0
  763. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_crt.c +3311 -0
  764. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_csr.c +648 -0
  765. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509_internal.h +101 -0
  766. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509write.c +174 -0
  767. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509write_crt.c +688 -0
  768. package/dist/lib/runtime-sources/vendor/mbedtls/library/x509write_csr.c +336 -0
  769. package/dist/lib/runtime-sources/vendor/quickjs-ng/CMakeLists.txt +566 -0
  770. package/dist/lib/runtime-sources/vendor/quickjs-ng/LICENSE +24 -0
  771. package/dist/lib/runtime-sources/vendor/quickjs-ng/README.md +24 -0
  772. package/dist/lib/runtime-sources/vendor/quickjs-ng/api-test.c +1195 -0
  773. package/dist/lib/runtime-sources/vendor/quickjs-ng/builtin-array-fromasync.h +119 -0
  774. package/dist/lib/runtime-sources/vendor/quickjs-ng/builtin-iterator-zip-keyed.h +332 -0
  775. package/dist/lib/runtime-sources/vendor/quickjs-ng/builtin-iterator-zip.h +337 -0
  776. package/dist/lib/runtime-sources/vendor/quickjs-ng/cutils.h +1998 -0
  777. package/dist/lib/runtime-sources/vendor/quickjs-ng/dtoa.c +1619 -0
  778. package/dist/lib/runtime-sources/vendor/quickjs-ng/dtoa.h +87 -0
  779. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/function_source.c +81 -0
  780. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/hello.c +53 -0
  781. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/hello_module.c +106 -0
  782. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/repl.c +3036 -0
  783. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/standalone.c +323 -0
  784. package/dist/lib/runtime-sources/vendor/quickjs-ng/gen/test_fib.c +81 -0
  785. package/dist/lib/runtime-sources/vendor/quickjs-ng/libregexp-opcode.h +73 -0
  786. package/dist/lib/runtime-sources/vendor/quickjs-ng/libregexp.c +3474 -0
  787. package/dist/lib/runtime-sources/vendor/quickjs-ng/libregexp.h +101 -0
  788. package/dist/lib/runtime-sources/vendor/quickjs-ng/libunicode-table.h +5173 -0
  789. package/dist/lib/runtime-sources/vendor/quickjs-ng/libunicode.c +2069 -0
  790. package/dist/lib/runtime-sources/vendor/quickjs-ng/libunicode.h +172 -0
  791. package/dist/lib/runtime-sources/vendor/quickjs-ng/list.h +107 -0
  792. package/dist/lib/runtime-sources/vendor/quickjs-ng/lre-test.c +52 -0
  793. package/dist/lib/runtime-sources/vendor/quickjs-ng/qjs.c +762 -0
  794. package/dist/lib/runtime-sources/vendor/quickjs-ng/qjsc.c +673 -0
  795. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-atom.h +280 -0
  796. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-c-atomics.h +54 -0
  797. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-libc.c +5037 -0
  798. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-libc.h +87 -0
  799. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs-opcode.h +377 -0
  800. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs.c +64041 -0
  801. package/dist/lib/runtime-sources/vendor/quickjs-ng/quickjs.h +1447 -0
  802. package/dist/lib/runtime-sources/vendor/quickjs-ng/run-test262.c +2374 -0
  803. package/dist/lib/runtime-sources/vendor/quickjs-ng/unicode_gen.c +3121 -0
  804. package/dist/lib/runtime-sources/vendor/quickjs-ng/unicode_gen_def.h +310 -0
  805. package/dist/lib/runtime-sources/vendor/ryu/LICENSE-Boost +23 -0
  806. package/dist/lib/runtime-sources/vendor/ryu/common.h +114 -0
  807. package/dist/lib/runtime-sources/vendor/ryu/d2s.c +509 -0
  808. package/dist/lib/runtime-sources/vendor/ryu/d2s_full_table.h +367 -0
  809. package/dist/lib/runtime-sources/vendor/ryu/d2s_intrinsics.h +357 -0
  810. package/dist/lib/runtime-sources/vendor/ryu/d2s_small_table.h +186 -0
  811. package/dist/lib/runtime-sources/vendor/ryu/digit_table.h +35 -0
  812. package/dist/lib/runtime-sources/vendor/ryu/ryu.h +46 -0
  813. package/dist/lib/runtime-sources/vendor/unicode/LICENSE +39 -0
  814. package/dist/lib/runtime-sources/vendor/zlib/LICENSE +22 -0
  815. package/dist/lib/runtime-sources/vendor/zlib/adler32.c +164 -0
  816. package/dist/lib/runtime-sources/vendor/zlib/compress.c +75 -0
  817. package/dist/lib/runtime-sources/vendor/zlib/crc32.c +1049 -0
  818. package/dist/lib/runtime-sources/vendor/zlib/crc32.h +9446 -0
  819. package/dist/lib/runtime-sources/vendor/zlib/deflate.c +2139 -0
  820. package/dist/lib/runtime-sources/vendor/zlib/deflate.h +377 -0
  821. package/dist/lib/runtime-sources/vendor/zlib/gzclose.c +23 -0
  822. package/dist/lib/runtime-sources/vendor/zlib/gzguts.h +214 -0
  823. package/dist/lib/runtime-sources/vendor/zlib/gzlib.c +582 -0
  824. package/dist/lib/runtime-sources/vendor/zlib/gzread.c +602 -0
  825. package/dist/lib/runtime-sources/vendor/zlib/gzwrite.c +631 -0
  826. package/dist/lib/runtime-sources/vendor/zlib/infback.c +628 -0
  827. package/dist/lib/runtime-sources/vendor/zlib/inffast.c +320 -0
  828. package/dist/lib/runtime-sources/vendor/zlib/inffast.h +11 -0
  829. package/dist/lib/runtime-sources/vendor/zlib/inffixed.h +94 -0
  830. package/dist/lib/runtime-sources/vendor/zlib/inflate.c +1526 -0
  831. package/dist/lib/runtime-sources/vendor/zlib/inflate.h +126 -0
  832. package/dist/lib/runtime-sources/vendor/zlib/inftrees.c +299 -0
  833. package/dist/lib/runtime-sources/vendor/zlib/inftrees.h +62 -0
  834. package/dist/lib/runtime-sources/vendor/zlib/trees.c +1117 -0
  835. package/dist/lib/runtime-sources/vendor/zlib/trees.h +128 -0
  836. package/dist/lib/runtime-sources/vendor/zlib/uncompr.c +85 -0
  837. package/dist/lib/runtime-sources/vendor/zlib/zconf.h +543 -0
  838. package/dist/lib/runtime-sources/vendor/zlib/zlib.h +1938 -0
  839. package/dist/lib/runtime-sources/vendor/zlib/zutil.c +299 -0
  840. package/dist/lib/runtime-sources/vendor/zlib/zutil.h +254 -0
  841. package/dist/lib/scriptc-comptime +0 -0
  842. package/dist/lib/typescript/LICENSE +55 -0
  843. package/dist/lib/typescript/NOTICE.txt +436 -0
  844. package/dist/lib/typescript/lib/lib.d.ts +20 -0
  845. package/dist/lib/typescript/lib/lib.decorators.d.ts +382 -0
  846. package/dist/lib/typescript/lib/lib.decorators.legacy.d.ts +20 -0
  847. package/dist/lib/typescript/lib/lib.dom.asynciterable.d.ts +18 -0
  848. package/dist/lib/typescript/lib/lib.dom.d.ts +45125 -0
  849. package/dist/lib/typescript/lib/lib.dom.iterable.d.ts +18 -0
  850. package/dist/lib/typescript/lib/lib.es2015.collection.d.ts +159 -0
  851. package/dist/lib/typescript/lib/lib.es2015.core.d.ts +595 -0
  852. package/dist/lib/typescript/lib/lib.es2015.d.ts +26 -0
  853. package/dist/lib/typescript/lib/lib.es2015.generator.d.ts +75 -0
  854. package/dist/lib/typescript/lib/lib.es2015.iterable.d.ts +603 -0
  855. package/dist/lib/typescript/lib/lib.es2015.promise.d.ts +79 -0
  856. package/dist/lib/typescript/lib/lib.es2015.proxy.d.ts +126 -0
  857. package/dist/lib/typescript/lib/lib.es2015.reflect.d.ts +142 -0
  858. package/dist/lib/typescript/lib/lib.es2015.symbol.d.ts +44 -0
  859. package/dist/lib/typescript/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
  860. package/dist/lib/typescript/lib/lib.es2016.array.include.d.ts +114 -0
  861. package/dist/lib/typescript/lib/lib.es2016.d.ts +19 -0
  862. package/dist/lib/typescript/lib/lib.es2016.full.d.ts +21 -0
  863. package/dist/lib/typescript/lib/lib.es2016.intl.d.ts +29 -0
  864. package/dist/lib/typescript/lib/lib.es2017.arraybuffer.d.ts +19 -0
  865. package/dist/lib/typescript/lib/lib.es2017.d.ts +24 -0
  866. package/dist/lib/typescript/lib/lib.es2017.date.d.ts +29 -0
  867. package/dist/lib/typescript/lib/lib.es2017.full.d.ts +21 -0
  868. package/dist/lib/typescript/lib/lib.es2017.intl.d.ts +42 -0
  869. package/dist/lib/typescript/lib/lib.es2017.object.d.ts +47 -0
  870. package/dist/lib/typescript/lib/lib.es2017.sharedmemory.d.ts +133 -0
  871. package/dist/lib/typescript/lib/lib.es2017.string.d.ts +47 -0
  872. package/dist/lib/typescript/lib/lib.es2017.typedarrays.d.ts +51 -0
  873. package/dist/lib/typescript/lib/lib.es2018.asyncgenerator.d.ts +75 -0
  874. package/dist/lib/typescript/lib/lib.es2018.asynciterable.d.ts +51 -0
  875. package/dist/lib/typescript/lib/lib.es2018.d.ts +22 -0
  876. package/dist/lib/typescript/lib/lib.es2018.full.d.ts +22 -0
  877. package/dist/lib/typescript/lib/lib.es2018.intl.d.ts +81 -0
  878. package/dist/lib/typescript/lib/lib.es2018.promise.d.ts +28 -0
  879. package/dist/lib/typescript/lib/lib.es2018.regexp.d.ts +35 -0
  880. package/dist/lib/typescript/lib/lib.es2019.array.d.ts +77 -0
  881. package/dist/lib/typescript/lib/lib.es2019.d.ts +22 -0
  882. package/dist/lib/typescript/lib/lib.es2019.full.d.ts +22 -0
  883. package/dist/lib/typescript/lib/lib.es2019.intl.d.ts +21 -0
  884. package/dist/lib/typescript/lib/lib.es2019.object.d.ts +31 -0
  885. package/dist/lib/typescript/lib/lib.es2019.string.d.ts +35 -0
  886. package/dist/lib/typescript/lib/lib.es2019.symbol.d.ts +22 -0
  887. package/dist/lib/typescript/lib/lib.es2020.bigint.d.ts +763 -0
  888. package/dist/lib/typescript/lib/lib.es2020.d.ts +25 -0
  889. package/dist/lib/typescript/lib/lib.es2020.date.d.ts +40 -0
  890. package/dist/lib/typescript/lib/lib.es2020.full.d.ts +22 -0
  891. package/dist/lib/typescript/lib/lib.es2020.intl.d.ts +472 -0
  892. package/dist/lib/typescript/lib/lib.es2020.number.d.ts +26 -0
  893. package/dist/lib/typescript/lib/lib.es2020.promise.d.ts +45 -0
  894. package/dist/lib/typescript/lib/lib.es2020.sharedmemory.d.ts +97 -0
  895. package/dist/lib/typescript/lib/lib.es2020.string.d.ts +42 -0
  896. package/dist/lib/typescript/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
  897. package/dist/lib/typescript/lib/lib.es2021.d.ts +21 -0
  898. package/dist/lib/typescript/lib/lib.es2021.full.d.ts +22 -0
  899. package/dist/lib/typescript/lib/lib.es2021.intl.d.ts +164 -0
  900. package/dist/lib/typescript/lib/lib.es2021.promise.d.ts +46 -0
  901. package/dist/lib/typescript/lib/lib.es2021.string.d.ts +31 -0
  902. package/dist/lib/typescript/lib/lib.es2021.weakref.d.ts +76 -0
  903. package/dist/lib/typescript/lib/lib.es2022.array.d.ts +119 -0
  904. package/dist/lib/typescript/lib/lib.es2022.d.ts +23 -0
  905. package/dist/lib/typescript/lib/lib.es2022.error.d.ts +73 -0
  906. package/dist/lib/typescript/lib/lib.es2022.full.d.ts +22 -0
  907. package/dist/lib/typescript/lib/lib.es2022.intl.d.ts +143 -0
  908. package/dist/lib/typescript/lib/lib.es2022.object.d.ts +24 -0
  909. package/dist/lib/typescript/lib/lib.es2022.regexp.d.ts +37 -0
  910. package/dist/lib/typescript/lib/lib.es2022.string.d.ts +23 -0
  911. package/dist/lib/typescript/lib/lib.es2023.array.d.ts +922 -0
  912. package/dist/lib/typescript/lib/lib.es2023.collection.d.ts +19 -0
  913. package/dist/lib/typescript/lib/lib.es2023.d.ts +20 -0
  914. package/dist/lib/typescript/lib/lib.es2023.full.d.ts +22 -0
  915. package/dist/lib/typescript/lib/lib.es2023.intl.d.ts +62 -0
  916. package/dist/lib/typescript/lib/lib.es2024.arraybuffer.d.ts +63 -0
  917. package/dist/lib/typescript/lib/lib.es2024.collection.d.ts +27 -0
  918. package/dist/lib/typescript/lib/lib.es2024.d.ts +24 -0
  919. package/dist/lib/typescript/lib/lib.es2024.full.d.ts +22 -0
  920. package/dist/lib/typescript/lib/lib.es2024.object.d.ts +27 -0
  921. package/dist/lib/typescript/lib/lib.es2024.promise.d.ts +33 -0
  922. package/dist/lib/typescript/lib/lib.es2024.regexp.d.ts +23 -0
  923. package/dist/lib/typescript/lib/lib.es2024.sharedmemory.d.ts +66 -0
  924. package/dist/lib/typescript/lib/lib.es2024.string.d.ts +27 -0
  925. package/dist/lib/typescript/lib/lib.es2025.collection.d.ts +94 -0
  926. package/dist/lib/typescript/lib/lib.es2025.d.ts +23 -0
  927. package/dist/lib/typescript/lib/lib.es2025.float16.d.ts +443 -0
  928. package/dist/lib/typescript/lib/lib.es2025.full.d.ts +22 -0
  929. package/dist/lib/typescript/lib/lib.es2025.intl.d.ts +200 -0
  930. package/dist/lib/typescript/lib/lib.es2025.iterator.d.ts +146 -0
  931. package/dist/lib/typescript/lib/lib.es2025.promise.d.ts +32 -0
  932. package/dist/lib/typescript/lib/lib.es2025.regexp.d.ts +30 -0
  933. package/dist/lib/typescript/lib/lib.es5.d.ts +4599 -0
  934. package/dist/lib/typescript/lib/lib.es6.d.ts +21 -0
  935. package/dist/lib/typescript/lib/lib.esnext.array.d.ts +33 -0
  936. package/dist/lib/typescript/lib/lib.esnext.collection.d.ts +47 -0
  937. package/dist/lib/typescript/lib/lib.esnext.d.ts +27 -0
  938. package/dist/lib/typescript/lib/lib.esnext.date.d.ts +21 -0
  939. package/dist/lib/typescript/lib/lib.esnext.decorators.d.ts +26 -0
  940. package/dist/lib/typescript/lib/lib.esnext.disposable.d.ts +191 -0
  941. package/dist/lib/typescript/lib/lib.esnext.error.d.ts +22 -0
  942. package/dist/lib/typescript/lib/lib.esnext.full.d.ts +22 -0
  943. package/dist/lib/typescript/lib/lib.esnext.intl.d.ts +107 -0
  944. package/dist/lib/typescript/lib/lib.esnext.sharedmemory.d.ts +23 -0
  945. package/dist/lib/typescript/lib/lib.esnext.temporal.d.ts +485 -0
  946. package/dist/lib/typescript/lib/lib.esnext.typedarrays.d.ts +90 -0
  947. package/dist/lib/typescript/lib/lib.scripthost.d.ts +320 -0
  948. package/dist/lib/typescript/lib/lib.webworker.asynciterable.d.ts +18 -0
  949. package/dist/lib/typescript/lib/lib.webworker.d.ts +15606 -0
  950. package/dist/lib/typescript/lib/lib.webworker.importscripts.d.ts +21 -0
  951. package/dist/lib/typescript/lib/lib.webworker.iterable.d.ts +18 -0
  952. package/dist/lib/typescript/lib/tsc +0 -0
  953. package/dist/lib/typescript/package.json +45 -0
  954. package/dist/lib/wasi/cli/wasi-paths.js +41 -0
  955. package/dist/lib/wasi/cli/wasi-runner.js +28 -0
  956. package/dist/lib/wasi/package.json +1 -0
  957. package/dist/lib/wasi/wasi-paths.js +25 -0
  958. package/package.json +22 -6
  959. package/README.md +0 -3
  960. package/index.js +0 -2
@@ -0,0 +1,1537 @@
1
+ /* node:assert — the static assertion surface. Every failure throws a
2
+ * catchable AssertionError: a runtime %Error instance whose name is
3
+ * "AssertionError" and whose code slot is "ERR_ASSERTION" (Node's
4
+ * ERR_ASSERTION), so catch-side `instanceof Error`, `.name`, `.message`,
5
+ * and `.code` reads all answer exactly like Node's.
6
+ *
7
+ * Generated messages reproduce Node's assertion_error.js for the SCALAR
8
+ * comparisons this file receives (numbers, strings, booleans): the short
9
+ * `a !== b` form under the 12-character budget (string quotes excluded),
10
+ * the stacked `+ actual - expected` diff above it — including the `^`
11
+ * first-difference indicator for string pairs — and the inline-vs-block
12
+ * split of the not-equal operators (single-line inspect over 5 chars goes
13
+ * on its own block). One deliberate divergence (SEMANTICS.md 103): Node
14
+ * renders a COLORED character diff for string pairs when stderr is a
15
+ * color TTY; this runtime always emits the plain stacked form (the
16
+ * message text itself would be terminal-dependent in Node).
17
+ * Deep-equality over composite values compares honestly in
18
+ * compiler-synthesized helpers; their generated failure messages carry
19
+ * Node's header line WITHOUT the rendered value diff (a full
20
+ * util.inspect has no static lowering — SEMANTICS.md 102).
21
+ *
22
+ * Ownership: all ScrStr arguments are BORROWED; the throw helpers that
23
+ * take ownership say so. Value inspection follows util.inspect's default
24
+ * quoting (single quotes, then double, then backtick; C0 controls and
25
+ * DEL escaped) — exotic C1/Unicode escapes are out of scope
26
+ * (SEMANTICS.md 106). */
27
+ #include "scr_runtime.h"
28
+
29
+ #include <math.h>
30
+ #include <stdio.h>
31
+ #include <stdlib.h>
32
+ #include <string.h>
33
+
34
+ static void scr_assert_oom(void) {
35
+ scr_trap("scriptc: out of memory\n");
36
+ }
37
+
38
+ /* ── a tiny append-only byte buffer for message assembly ─────────────── */
39
+
40
+ typedef struct {
41
+ char *data;
42
+ size_t len;
43
+ size_t cap;
44
+ } ScrAssertBuf;
45
+
46
+ static void ab_grow(ScrAssertBuf *b, size_t need) {
47
+ if (b->len + need <= b->cap) return;
48
+ size_t cap = b->cap ? b->cap * 2 : 64;
49
+ while (cap < b->len + need) cap *= 2;
50
+ char *data = realloc(b->data, cap);
51
+ if (!data) scr_assert_oom();
52
+ b->data = data;
53
+ b->cap = cap;
54
+ }
55
+
56
+ static void ab_bytes(ScrAssertBuf *b, const char *s, size_t len) {
57
+ ab_grow(b, len);
58
+ memcpy(b->data + b->len, s, len);
59
+ b->len += len;
60
+ }
61
+
62
+ static void ab_cstr(ScrAssertBuf *b, const char *s) { ab_bytes(b, s, strlen(s)); }
63
+
64
+ static void ab_char(ScrAssertBuf *b, char c) { ab_bytes(b, &c, 1); }
65
+
66
+ static void ab_str(ScrAssertBuf *b, const ScrStr *s) { ab_bytes(b, s->data, s->len); }
67
+
68
+ static ScrStr *ab_take(ScrAssertBuf *b) {
69
+ ScrStr *out = scr_str_new(b->data ? b->data : "", b->len);
70
+ free(b->data);
71
+ return out;
72
+ }
73
+
74
+ /* ── value inspection (util.inspect's scalar slice) ──────────────────── */
75
+
76
+ /* Number inspection: JS ToString EXCEPT that inspect distinguishes -0. */
77
+ static size_t scr_assert_inspect_f64(double x, char *buf /* >= 33 */) {
78
+ if (x == 0.0 && signbit(x)) {
79
+ memcpy(buf, "-0", 3);
80
+ return 2;
81
+ }
82
+ return scr_f64_to_str(x, buf);
83
+ }
84
+
85
+ /* String inspection: util.inspect's quoting — single quotes by default,
86
+ * double quotes when the text contains ' but no ", backticks when it
87
+ * contains both; backslash/quote/C0/DEL escaped (\b \t \n \f \r named,
88
+ * \x0B and the rest as \xNN — inspect's own table). +1. */
89
+ ScrStr *scr_assert_inspect_str(const ScrStr *s) {
90
+ char quote = '\'';
91
+ bool hasSingle = false, hasDouble = false;
92
+ for (size_t i = 0; i < s->len; i++) {
93
+ if (s->data[i] == '\'') hasSingle = true;
94
+ if (s->data[i] == '"') hasDouble = true;
95
+ }
96
+ if (hasSingle) quote = hasDouble ? '`' : '"';
97
+ ScrAssertBuf b = {0};
98
+ ab_char(&b, quote);
99
+ for (size_t i = 0; i < s->len; i++) {
100
+ unsigned char c = (unsigned char)s->data[i];
101
+ if (c == (unsigned char)quote || c == '\\') {
102
+ ab_char(&b, '\\');
103
+ ab_char(&b, (char)c);
104
+ } else if (c == '\b') {
105
+ ab_cstr(&b, "\\b");
106
+ } else if (c == '\t') {
107
+ ab_cstr(&b, "\\t");
108
+ } else if (c == '\n') {
109
+ ab_cstr(&b, "\\n");
110
+ } else if (c == '\f') {
111
+ ab_cstr(&b, "\\f");
112
+ } else if (c == '\r') {
113
+ ab_cstr(&b, "\\r");
114
+ } else if (c < 0x20 || c == 0x7f) {
115
+ char esc[5];
116
+ snprintf(esc, sizeof esc, "\\x%02X", c);
117
+ ab_cstr(&b, esc);
118
+ } else {
119
+ ab_char(&b, (char)c);
120
+ }
121
+ }
122
+ ab_char(&b, quote);
123
+ return ab_take(&b);
124
+ }
125
+
126
+ /* ── the AssertionError throw ─────────────────────────────────────────── */
127
+
128
+ /* Throws an AssertionError with `message` (ownership MOVES in): a runtime
129
+ * %Error whose name/code are Node's. The exception is pending on return —
130
+ * callers return through the emitter's pending check like every other
131
+ * throwing libCall. */
132
+ void scr_assert_fail_msg(ScrStr *message) {
133
+ ScrError *e = scr_error_new(SCR_ERR_ERROR, message);
134
+ scr_str_release(message); /* scr_error_new retained its copy */
135
+ scr_str_release(e->name);
136
+ e->name = scr_str_new("AssertionError", 14);
137
+ scr_error_set_code(e, "ERR_ASSERTION");
138
+ scr_throw_obj(e, &scr_error_retain_v, &scr_error_release_v, scr_error_trace_arg());
139
+ }
140
+
141
+ /* assert(value) / assert.ok(value[, message]) / assert.fail([message]):
142
+ * the frontend computed the truthiness and the FULL message (the user's
143
+ * string, or the compile-time "The expression evaluated to a falsy
144
+ * value:\n\n <source text>\n" — the source is a compile-time constant
145
+ * where Node re-reads the file). */
146
+ void scr_assert_ok(bool pass, ScrStr *message) {
147
+ if (pass) return;
148
+ scr_assert_fail_msg(scr_str_retain(message));
149
+ }
150
+
151
+ /* SameValue over doubles — Object.is, the comparison of strictEqual AND
152
+ * deepStrictEqual for numbers (NaN equals NaN; +0 and -0 differ). */
153
+ /* ── deepStrictEqual over cyclic values ────────────────────────────────
154
+ * RECURSIVE record types permit reference cycles; Node's deep equality
155
+ * memoizes (value1, value2) pairs so equal cyclic structures compare
156
+ * true instead of recursing forever. The compiler-emitted per-type
157
+ * helpers over cycle-capable types wrap their walks in enter/leave: a
158
+ * PAIR already being compared answers equal (the coinductive step —
159
+ * Node's memo behavior exactly). The stack is global (comparisons never
160
+ * interleave; the emitted walks cannot throw mid-compare). */
161
+ static SCR_TL struct { const void *a, *b; } *g_deq_stack;
162
+ static SCR_TL size_t g_deq_len;
163
+ static SCR_TL size_t g_deq_cap;
164
+
165
+ bool scr_assert_deq_enter(const void *a, const void *b) {
166
+ for (size_t i = 0; i < g_deq_len; i++) {
167
+ if (g_deq_stack[i].a == a && g_deq_stack[i].b == b) return true;
168
+ }
169
+ if (g_deq_len == g_deq_cap) {
170
+ g_deq_cap = g_deq_cap ? g_deq_cap * 2 : 8;
171
+ g_deq_stack = realloc(g_deq_stack, g_deq_cap * sizeof *g_deq_stack);
172
+ if (!g_deq_stack) scr_assert_oom();
173
+ }
174
+ g_deq_stack[g_deq_len].a = a;
175
+ g_deq_stack[g_deq_len].b = b;
176
+ g_deq_len++;
177
+ return false;
178
+ }
179
+
180
+ void scr_assert_deq_leave(void) {
181
+ if (g_deq_len > 0) g_deq_len--;
182
+ }
183
+
184
+ bool scr_assert_same_value_f64(double a, double b) {
185
+ if (a == b) return a != 0.0 || signbit(a) == signbit(b);
186
+ return isnan(a) && isnan(b);
187
+ }
188
+
189
+ /* ── generated equality messages (assertion_error.js, scalar slice) ──── */
190
+
191
+ static const char *scr_assert_eq_header(bool deep) {
192
+ return deep ? "Expected values to be strictly deep-equal:"
193
+ : "Expected values to be strictly equal:";
194
+ }
195
+
196
+ static const char *scr_assert_neq_header(bool deep) {
197
+ return deep ? "Expected \"actual\" not to be strictly deep-equal to:"
198
+ : "Expected \"actual\" to be strictly unequal to:";
199
+ }
200
+
201
+ /* The failing NOT-equal operators (values compared equal): the custom
202
+ * message stands alone; the generated one inlines a short single-line
203
+ * inspect after the header (<= 5 chars), block form otherwise. `insp` is
204
+ * the inspected actual value (borrowed bytes). Exported for the spoke
205
+ * files that carry their own inspection (scr_symbol.c). */
206
+ void scr_assert_neq_fail(const char *insp, size_t ilen, bool deep,
207
+ ScrStr *msg, bool has_msg) {
208
+ if (has_msg) {
209
+ scr_assert_fail_msg(scr_str_retain(msg));
210
+ return;
211
+ }
212
+ ScrAssertBuf b = {0};
213
+ ab_cstr(&b, scr_assert_neq_header(deep));
214
+ ab_cstr(&b, ilen > 5 ? "\n\n" : " ");
215
+ ab_bytes(&b, insp, ilen);
216
+ scr_assert_fail_msg(ab_take(&b));
217
+ }
218
+
219
+ /* The failing EQUAL operators: createErrDiff's scalar paths — a custom
220
+ * message replaces the HEADER (Node appends the diff below it; the empty
221
+ * string falls back to the default header, `message ||` in Node).
222
+ * `quotes` counts the string-typed sides (each contributes 2 quote
223
+ * characters excluded from the short-form budget); `both_zero` is the
224
+ * ±0-vs-±0 special case (never short); `strings` enables the stacked
225
+ * form's first-difference `^` indicator (string pairs only, combined
226
+ * inspected length within the 80-column non-TTY default). Exported for
227
+ * scr_symbol.c's symbol comparison. */
228
+ void scr_assert_eq_fail(const char *ia, size_t la, const char *ib, size_t lb,
229
+ int quotes, bool both_zero, bool strings, bool deep,
230
+ ScrStr *msg, bool has_msg) {
231
+ ScrAssertBuf b = {0};
232
+ if (has_msg && msg->len > 0) {
233
+ ab_str(&b, msg);
234
+ } else {
235
+ ab_cstr(&b, scr_assert_eq_header(deep));
236
+ }
237
+ size_t stringsLen = la + lb - (size_t)(2 * quotes);
238
+ if (stringsLen <= 12 && !both_zero) {
239
+ ab_cstr(&b, "\n\n");
240
+ ab_bytes(&b, ia, la);
241
+ ab_cstr(&b, " !== ");
242
+ ab_bytes(&b, ib, lb);
243
+ ab_cstr(&b, "\n");
244
+ } else {
245
+ ab_cstr(&b, "\n+ actual - expected\n\n+ ");
246
+ ab_bytes(&b, ia, la);
247
+ ab_cstr(&b, "\n- ");
248
+ ab_bytes(&b, ib, lb);
249
+ if (strings && la + lb <= 80) {
250
+ /* The first-difference indicator (getStackedDiff): the first index
251
+ * where actual's characters stop matching expected's — skipped when
252
+ * that lands within the first two content characters (i < 3 over the
253
+ * quoted text) or when actual is a prefix of expected. Node computes
254
+ * this over the INSPECTED text of every simple stacked diff (numbers
255
+ * and symbols included — getSimpleDiff hands getStackedDiff the
256
+ * rendered strings, so its typeof-string test is always true), so
257
+ * every scalar caller passes `strings` true. */
258
+ size_t i = 0;
259
+ while (i < la && i < lb && ia[i] == ib[i]) i++;
260
+ if (i < la && i >= 3) {
261
+ ab_char(&b, '\n');
262
+ for (size_t k = 0; k < i + 2; k++) ab_char(&b, ' ');
263
+ ab_char(&b, '^');
264
+ }
265
+ }
266
+ ab_cstr(&b, "\n");
267
+ }
268
+ scr_assert_fail_msg(ab_take(&b));
269
+ }
270
+
271
+ /* strictEqual / notStrictEqual / deepStrictEqual / notDeepStrictEqual over
272
+ * numbers: Object.is comparison, inspect distinguishes -0. */
273
+ void scr_assert_eq_f64(double a, double b, bool negated, bool deep,
274
+ ScrStr *msg, bool has_msg) {
275
+ bool same = scr_assert_same_value_f64(a, b);
276
+ if ((negated && !same) || (!negated && same)) return;
277
+ char ia[40], ib[40];
278
+ size_t la = scr_assert_inspect_f64(a, ia);
279
+ if (negated) {
280
+ scr_assert_neq_fail(ia, la, deep, msg, has_msg);
281
+ return;
282
+ }
283
+ size_t lb = scr_assert_inspect_f64(b, ib);
284
+ scr_assert_eq_fail(ia, la, ib, lb, 0, a == 0.0 && b == 0.0, true, deep, msg, has_msg);
285
+ }
286
+
287
+ /* The string forms: byte equality IS SameValue for well-formed UTF-8. */
288
+ void scr_assert_eq_str(ScrStr *a, ScrStr *b, bool negated, bool deep,
289
+ ScrStr *msg, bool has_msg) {
290
+ bool same = a->len == b->len && memcmp(a->data, b->data, a->len) == 0;
291
+ if ((negated && !same) || (!negated && same)) return;
292
+ ScrStr *ia = scr_assert_inspect_str(a);
293
+ if (negated) {
294
+ scr_assert_neq_fail(ia->data, ia->len, deep, msg, has_msg);
295
+ scr_str_release(ia);
296
+ return;
297
+ }
298
+ ScrStr *ib = scr_assert_inspect_str(b);
299
+ scr_assert_eq_fail(ia->data, ia->len, ib->data, ib->len, 2, false, true, deep,
300
+ msg, has_msg);
301
+ scr_str_release(ia);
302
+ scr_str_release(ib);
303
+ }
304
+
305
+ /* The boolean forms. */
306
+ void scr_assert_eq_bool(bool a, bool b, bool negated, bool deep,
307
+ ScrStr *msg, bool has_msg) {
308
+ bool same = a == b;
309
+ if ((negated && !same) || (!negated && same)) return;
310
+ const char *ia = a ? "true" : "false";
311
+ if (negated) {
312
+ scr_assert_neq_fail(ia, strlen(ia), deep, msg, has_msg);
313
+ return;
314
+ }
315
+ const char *ib = b ? "true" : "false";
316
+ scr_assert_eq_fail(ia, strlen(ia), ib, strlen(ib), 0, false, true, deep, msg,
317
+ has_msg);
318
+ }
319
+
320
+ /* assert.equal / assert.notEqual: the frontend supplies the completed
321
+ * Abstract Equality verdict (including Node v24's NaN-equals-NaN legacy
322
+ * exception) and util.inspect renderings of the original operands. Node's
323
+ * generated legacy message is one line: "actual == expected" / "actual !=
324
+ * expected". A supplied message, including the empty string, replaces it. */
325
+ void scr_assert_loose_result(bool equal, bool negated, ScrStr *actual,
326
+ ScrStr *expected, ScrStr *msg, bool has_msg) {
327
+ if ((negated && !equal) || (!negated && equal)) return;
328
+ if (has_msg) {
329
+ scr_assert_fail_msg(scr_str_retain(msg));
330
+ return;
331
+ }
332
+ ScrAssertBuf b = {0};
333
+ ab_str(&b, actual);
334
+ ab_cstr(&b, negated ? " != " : " == ");
335
+ ab_str(&b, expected);
336
+ scr_assert_fail_msg(ab_take(&b));
337
+ }
338
+
339
+ /* deepStrictEqual / notDeepStrictEqual over COMPOSITE values: the frontend
340
+ * synthesized the honest structural comparison; this only turns its verdict
341
+ * into Node's throw. The generated message is the header line alone —
342
+ * rendering the value diff needs util.inspect, which has no static
343
+ * lowering (SEMANTICS.md 102). */
344
+ void scr_assert_deep_result(bool equal, bool negated, ScrStr *msg, bool has_msg) {
345
+ if ((negated && !equal) || (!negated && equal)) return;
346
+ if (has_msg && (negated || msg->len > 0)) {
347
+ /* Node: the not-equal operators use the message ALONE (even empty);
348
+ * the equal operators use it as the diff HEADER when non-empty —
349
+ * without a rendered diff below it the two collapse to the same
350
+ * shape here. */
351
+ scr_assert_fail_msg(scr_str_retain(msg));
352
+ return;
353
+ }
354
+ const char *base = negated ? scr_assert_neq_header(true) : scr_assert_eq_header(true);
355
+ scr_assert_fail_msg(scr_str_new(base, strlen(base)));
356
+ }
357
+
358
+ /* deepStrictEqual's content comparison over bytes values (the brand is
359
+ * the frontend's compile-time question — see the header). One elem kind
360
+ * by construction (the frontend's same-static-type gate), but the elem
361
+ * check stays: a defensive answer beats a miscompare. */
362
+ static bool scr_assert_bytes_content_eq(const ScrBytes *a, const ScrBytes *b) {
363
+ if (a->elem != b->elem || a->len != b->len) return false;
364
+ size_t nbytes = a->len * scr_bytes_elem_size(a->elem);
365
+ return nbytes == 0 || memcmp(a->data, b->data, nbytes) == 0;
366
+ }
367
+
368
+ bool scr_assert_bytes_deep_eq(const ScrBytes *a, const ScrBytes *b, bool brands_eq) {
369
+ return brands_eq && scr_assert_bytes_content_eq(a, b);
370
+ }
371
+
372
+ /* strictEqual / notStrictEqual over bytes values: reference identity.
373
+ * The generated messages are Node's OBJECT-comparison headers (createErrDiff
374
+ * routes objects through the reference-equality wording, not the scalar
375
+ * "strictly equal" one); the value renderings below them need the
376
+ * assert-style diff engine, so the header stands alone — the composite
377
+ * stance (SEMANTICS.md 102). */
378
+ void scr_assert_ref_eq_bytes(const ScrBytes *a, const ScrBytes *b, bool negated,
379
+ bool brands_eq, ScrStr *msg, bool has_msg) {
380
+ bool same = a == b;
381
+ if ((negated && !same) || (!negated && same)) return;
382
+ if (has_msg && (negated || msg->len > 0)) {
383
+ /* The deepResult message stance: not-equal operators use it alone
384
+ * (even empty); the equal operators use a non-empty one as the diff
385
+ * header — headerless diffs collapse both to the message itself. */
386
+ scr_assert_fail_msg(scr_str_retain(msg));
387
+ return;
388
+ }
389
+ const char *h;
390
+ if (negated) {
391
+ h = "Expected \"actual\" not to be reference-equal to \"expected\":";
392
+ } else if (brands_eq && scr_assert_bytes_content_eq(a, b)) {
393
+ h = "Values have same structure but are not reference-equal:";
394
+ } else {
395
+ h = "Expected \"actual\" to be reference-equal to \"expected\":";
396
+ }
397
+ scr_assert_fail_msg(scr_str_new(h, strlen(h)));
398
+ }
399
+
400
+ /* strictEqual / notStrictEqual over function values: reference identity.
401
+ * Two distinct functions are never deep-equal, so the failing equal form
402
+ * always takes the reference-equality expectation header. */
403
+ void scr_assert_ref_eq_fn(const ScrClosure *a, const ScrClosure *b, bool negated,
404
+ ScrStr *msg, bool has_msg) {
405
+ bool same = a == b;
406
+ if ((negated && !same) || (!negated && same)) return;
407
+ if (has_msg && (negated || msg->len > 0)) {
408
+ scr_assert_fail_msg(scr_str_retain(msg));
409
+ return;
410
+ }
411
+ const char *h = negated
412
+ ? "Expected \"actual\" not to be reference-equal to \"expected\":"
413
+ : "Expected \"actual\" to be reference-equal to \"expected\":";
414
+ scr_assert_fail_msg(scr_str_new(h, strlen(h)));
415
+ }
416
+
417
+ /* ── strictEqual / deepStrictEqual over CHECKED-DYNAMIC (dyn) operands ──
418
+ * The checked-dynamic tree carries the value's kind at runtime, so one entry point serves
419
+ * the whole quartet: SameValue for the strict pair (numbers by Object.is,
420
+ * strings by bytes, units by kind, arrays/objects/bytes by node identity,
421
+ * functions by the BOXED CLOSURE — two dyn crossings of one function are
422
+ * the same JS function), a structural dyn walk for the deep pair.
423
+ *
424
+ * Failure messages reproduce Node's assertion_error.js against the v24
425
+ * sources: inspectValue is a compact:false / sorted:true / depth-1000
426
+ * rendering of the checked-dynamic tree (each entry on its own line, entries sorted by
427
+ * their RENDERED text — Node's `sorted: true` sorts formatted entries),
428
+ * the simple/stacked scalar forms match the static paths byte-for-byte,
429
+ * and composite diffs run the real myers line diff with Node's printer
430
+ * (5 context lines, then "..." and the "... Skipped lines" banner, comma
431
+ * disparity between object lines treated as equal). Known divergences:
432
+ * key sorting is UTF-8 byte order where Node sorts UTF-16 code units
433
+ * (identical for ASCII keys), dyn function props are not rendered after
434
+ * the [Function: name] form, and values rendering past ~4096 lines fall
435
+ * back to the whole-value +/- form without context collapsing. */
436
+
437
+ /* JS SameValue over two dyn values (Object.is — the strictEqual and
438
+ * notStrictEqual comparison). Functions compare by boxed closure: the
439
+ * ScrDyn box is a boundary artifact, the closure IS the JS identity. */
440
+ static bool scr_assert_dyn_same_value(const ScrDyn *a, const ScrDyn *b) {
441
+ if (a->kind != b->kind) return false;
442
+ switch (a->kind) {
443
+ case SCR_DYN_SYMBOL:
444
+ return a->v.symbol.value == b->v.symbol.value;
445
+ case SCR_DYN_UNDEF:
446
+ case SCR_DYN_NULL:
447
+ return true;
448
+ case SCR_DYN_BOOL:
449
+ return a->v.b == b->v.b;
450
+ case SCR_DYN_BIGINT:
451
+ return scr_bigint_eq(a->v.bigint, b->v.bigint);
452
+ case SCR_DYN_NUM:
453
+ return scr_assert_same_value_f64(a->v.num, b->v.num);
454
+ case SCR_DYN_STR:
455
+ return a->v.str->len == b->v.str->len &&
456
+ memcmp(a->v.str->data, b->v.str->data, a->v.str->len) == 0;
457
+ case SCR_DYN_FUNC:
458
+ return scr_dyn_strict_eq(a, b);
459
+ case SCR_DYN_HANDLE:
460
+ /* Identity is the HANDLE (the strict_eq stance). */
461
+ return a->v.handle.tag == b->v.handle.tag && a->v.handle.ptr == b->v.handle.ptr;
462
+ case SCR_DYN_PROMISE:
463
+ /* Identity is the PROMISE (the strict_eq stance). */
464
+ return a->v.promise == b->v.promise;
465
+ case SCR_DYN_JSVAL:
466
+ /* Identity is the ENGINE VALUE (the strict_eq stance): the engine's
467
+ * === — exact for SameValue too, since wrap-time scalar
468
+ * normalization leaves only reference kinds behind. */
469
+ return a == b || scr_dyn_jsval_ops()->strict_eq(a->v.jsval.cell, b->v.jsval.cell);
470
+ case SCR_DYN_TYPED_REF:
471
+ return scr_dyn_strict_eq(a, b);
472
+ default:
473
+ return a == b; /* ARR/OBJ/BYTES: node identity */
474
+ }
475
+ }
476
+
477
+ /* Node's strict deep equality over two dyn values: kind-wise — Object.is
478
+ * numbers, byte-equal strings, units by kind, per-element arrays,
479
+ * key-set-plus-values objects (dyn keys are unique, so equal lengths and
480
+ * an a⊆b value walk prove the bijection), brand-aware bytes (the buffer
481
+ * flavor bit IS the Buffer-vs-Uint8Array prototype Node compares first),
482
+ * reference identity for functions (boxed closure). Plain recursion:
483
+ * JSON-origin dyn values are trees; a keyed-write cycle (h.self = h) has no
484
+ * memo here where Node carries one (documented divergence). */
485
+ static bool scr_assert_dyn_deep_eq(const ScrDyn *a, const ScrDyn *b) {
486
+ if (a == b) return true;
487
+ if (a->kind == SCR_DYN_PROXY || b->kind == SCR_DYN_PROXY) {
488
+ scr_dyn_proxy_unsupported("deep equality");
489
+ return false;
490
+ }
491
+ if (a->kind == SCR_DYN_TYPED_REF || b->kind == SCR_DYN_TYPED_REF) {
492
+ ScrDyn *ma = a->kind == SCR_DYN_TYPED_REF
493
+ ? scr_dyn_typed_ref_materialize(a)
494
+ : scr_dyn_retain((ScrDyn *)a);
495
+ ScrDyn *mb = b->kind == SCR_DYN_TYPED_REF
496
+ ? scr_dyn_typed_ref_materialize(b)
497
+ : scr_dyn_retain((ScrDyn *)b);
498
+ bool same = scr_assert_dyn_deep_eq(ma, mb);
499
+ scr_dyn_release(ma);
500
+ scr_dyn_release(mb);
501
+ return same;
502
+ }
503
+ if (a->kind != b->kind) {
504
+ /* A MIXED comparison with an island side (wrapped engine object vs
505
+ * dyn data): Node walks both structurally — a plain `false` would
506
+ * mint a fabricated AssertionError for values Node may call equal.
507
+ * Loud fence (the long-tail lane's structural walk). */
508
+ if (a->kind == SCR_DYN_JSVAL || b->kind == SCR_DYN_JSVAL) {
509
+ scr_dyn_isl_fence(a->kind == SCR_DYN_JSVAL ? a : b, "deepStrictEqual");
510
+ }
511
+ return false;
512
+ }
513
+ switch (a->kind) {
514
+ case SCR_DYN_SYMBOL:
515
+ return a->v.symbol.value == b->v.symbol.value;
516
+ case SCR_DYN_UNDEF:
517
+ case SCR_DYN_NULL:
518
+ return true;
519
+ case SCR_DYN_BOOL:
520
+ return a->v.b == b->v.b;
521
+ case SCR_DYN_BIGINT:
522
+ return scr_bigint_eq(a->v.bigint, b->v.bigint);
523
+ case SCR_DYN_NUM:
524
+ return scr_assert_same_value_f64(a->v.num, b->v.num);
525
+ case SCR_DYN_STR:
526
+ return a->v.str->len == b->v.str->len &&
527
+ memcmp(a->v.str->data, b->v.str->data, a->v.str->len) == 0;
528
+ case SCR_DYN_FUNC:
529
+ return scr_dyn_strict_eq(a, b);
530
+ case SCR_DYN_HANDLE:
531
+ /* Node's deepStrictEqual over two distinct live handles walks own
532
+ * enumerable props we do not model; same-handle is the only case a
533
+ * compiled test can honestly answer (documented). */
534
+ return a->v.handle.tag == b->v.handle.tag && a->v.handle.ptr == b->v.handle.ptr;
535
+ case SCR_DYN_PROMISE:
536
+ /* Node compares promises structurally (no own props → equal); the
537
+ * honest arm here is identity — two distinct promises with equal
538
+ * settlements would diverge (documented with the handle stance). */
539
+ return a->v.promise == b->v.promise;
540
+ case SCR_DYN_BYTES: {
541
+ if (a->buffer != b->buffer) return false; /* the prototype gate */
542
+ const ScrBytes *x = a->v.bytes, *y = b->v.bytes;
543
+ if (x->elem != y->elem || x->len != y->len) return false;
544
+ size_t nbytes = x->len * scr_bytes_elem_size(x->elem);
545
+ return nbytes == 0 || memcmp(x->data, y->data, nbytes) == 0;
546
+ }
547
+ case SCR_DYN_ARR: {
548
+ if (a->v.arr.len != b->v.arr.len) return false;
549
+ for (size_t i = 0; i < a->v.arr.len; i++) {
550
+ if (!scr_assert_dyn_deep_eq(a->v.arr.items[i], b->v.arr.items[i])) return false;
551
+ }
552
+ if (a->v.arr.properties || b->v.arr.properties) {
553
+ if (!a->v.arr.properties || !b->v.arr.properties) {
554
+ const ScrDyn *table = a->v.arr.properties ? a->v.arr.properties : b->v.arr.properties;
555
+ if (table->v.obj.len != 0) return false;
556
+ } else if (!scr_assert_dyn_deep_eq(a->v.arr.properties, b->v.arr.properties)) return false;
557
+ }
558
+ return true;
559
+ }
560
+ case SCR_DYN_OBJ: {
561
+ if (a->null_proto != b->null_proto || a->prototype != b->prototype) return false;
562
+ if (a->v.obj.len != b->v.obj.len) return false;
563
+ for (size_t i = 0; i < a->v.obj.len; i++) {
564
+ const ScrDynEntry *ent = &a->v.obj.entries[i];
565
+ ScrDyn *bv = scr_dyn_obj_get(b, ent->key, ent->key_len);
566
+ if (!bv || !scr_assert_dyn_deep_eq(ent->value, bv)) return false;
567
+ }
568
+ return true;
569
+ }
570
+ case SCR_DYN_JSVAL:
571
+ /* Node walks the engine objects structurally — a walk this runtime
572
+ * cannot run. Engine-identical answers true honestly; anything else
573
+ * throws the loud ladder (scr_assert_eq_dyn propagates the pending
574
+ * exception INSTEAD of minting an AssertionError). */
575
+ if (scr_dyn_jsval_ops()->strict_eq(a->v.jsval.cell, b->v.jsval.cell)) return true;
576
+ scr_dyn_isl_fence(a, "deepStrictEqual");
577
+ return false;
578
+ case SCR_DYN_TYPED_REF:
579
+ return false; /* both mixed and same-kind capsules returned above */
580
+ }
581
+ return false; /* unreachable */
582
+ }
583
+
584
+ /* ── inspectValue over the checked-dynamic tree (assertion_error.js's inspect options:
585
+ * compact:false, sorted:true, depth 1000, maxArrayLength Infinity) ───── */
586
+
587
+ #define SCR_ASSERT_CF_DEPTH 1000
588
+
589
+ static void scr_assert_cf_pad(ScrAssertBuf *b, size_t n) {
590
+ ab_grow(b, n);
591
+ memset(b->data + b->len, ' ', n);
592
+ b->len += n;
593
+ }
594
+
595
+ /* Property-key rendering: __proto__ bracketed, identifier-shaped keys
596
+ * bare (the scr_inspect.c ladder), everything else inspect-quoted. */
597
+ static void scr_assert_cf_key(ScrAssertBuf *b, const char *key, size_t len) {
598
+ if (len == 9 && memcmp(key, "__proto__", 9) == 0) {
599
+ ab_cstr(b, "['__proto__']");
600
+ return;
601
+ }
602
+ bool bare = len > 0;
603
+ for (size_t i = 0; bare && i < len; i++) {
604
+ char c = key[i];
605
+ bool head_ok = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_';
606
+ bool tail_ok = head_ok || (c >= '0' && c <= '9');
607
+ bare = i == 0 ? head_ok : tail_ok;
608
+ }
609
+ if (bare) {
610
+ ab_bytes(b, key, len);
611
+ return;
612
+ }
613
+ ScrStr *raw = scr_str_new(key, len);
614
+ ScrStr *q = scr_assert_inspect_str(raw);
615
+ ab_str(b, q);
616
+ scr_str_release(q);
617
+ scr_str_release(raw);
618
+ }
619
+
620
+ /* One rendered object entry, for sorting before emission. */
621
+ typedef struct {
622
+ char *text;
623
+ size_t len;
624
+ } ScrCfEntry;
625
+
626
+ static int scr_assert_cf_entry_cmp(const void *pa, const void *pb) {
627
+ const ScrCfEntry *a = pa, *b = pb;
628
+ size_t n = a->len < b->len ? a->len : b->len;
629
+ int c = n ? memcmp(a->text, b->text, n) : 0;
630
+ if (c) return c;
631
+ return a->len < b->len ? -1 : (a->len > b->len ? 1 : 0);
632
+ }
633
+
634
+ /* Renders `d` at `indent` (the column its CONTINUATION lines start at);
635
+ * the first line is appended in place. */
636
+ static void scr_assert_cf_value(ScrAssertBuf *b, const ScrDyn *d, size_t indent,
637
+ size_t depth) {
638
+ switch (d->kind) {
639
+ case SCR_DYN_UNDEF:
640
+ ab_cstr(b, "undefined");
641
+ return;
642
+ case SCR_DYN_NULL:
643
+ ab_cstr(b, "null");
644
+ return;
645
+ case SCR_DYN_BOOL:
646
+ ab_cstr(b, d->v.b ? "true" : "false");
647
+ return;
648
+ case SCR_DYN_BIGINT: {
649
+ ScrStr *text = scr_bigint_inspect(d->v.bigint);
650
+ ab_str(b, text);
651
+ scr_str_release(text);
652
+ return;
653
+ }
654
+ case SCR_DYN_SYMBOL: {
655
+ ScrStr *text = d->v.symbol.render(d->v.symbol.value);
656
+ ab_str(b, text);
657
+ scr_str_release(text);
658
+ return;
659
+ }
660
+ case SCR_DYN_NUM: {
661
+ char tmp[40];
662
+ size_t n = scr_assert_inspect_f64(d->v.num, tmp);
663
+ ab_bytes(b, tmp, n);
664
+ return;
665
+ }
666
+ case SCR_DYN_STR: {
667
+ ScrStr *q = scr_assert_inspect_str(d->v.str);
668
+ ab_str(b, q);
669
+ scr_str_release(q);
670
+ return;
671
+ }
672
+ case SCR_DYN_FUNC: {
673
+ const char *name = d->v.fn.name;
674
+ if (name && name[0]) {
675
+ ab_cstr(b, "[Function: ");
676
+ ab_cstr(b, name);
677
+ ab_char(b, ']');
678
+ } else {
679
+ ab_cstr(b, "[Function (anonymous)]");
680
+ }
681
+ return;
682
+ }
683
+ case SCR_DYN_HANDLE: {
684
+ /* The depth-elided class form ([ServerResponse]) — the full own-
685
+ * property dump Node renders is internals we do not model; this
686
+ * text only appears inside FAILURE diffs, which already diverge in
687
+ * report format. */
688
+ ab_char(b, '[');
689
+ ab_cstr(b, scr_dyn_handle_cls(d));
690
+ ab_char(b, ']');
691
+ return;
692
+ }
693
+ case SCR_DYN_PROMISE: {
694
+ /* The depth-elided form (Node renders Promise { <state> }; failure
695
+ * diffs already diverge in report format — the handle stance). */
696
+ ab_cstr(b, "[Promise]");
697
+ return;
698
+ }
699
+ case SCR_DYN_BYTES: {
700
+ const ScrBytes *bs = d->v.bytes;
701
+ char prefix[64];
702
+ int pn = snprintf(prefix, sizeof prefix, "%s(%zu) %s[",
703
+ d->buffer ? "Buffer" : "Uint8Array", bs->len,
704
+ d->buffer ? "[Uint8Array] " : "");
705
+ ab_bytes(b, prefix, (size_t)pn);
706
+ if (bs->len == 0) {
707
+ ab_char(b, ']');
708
+ return;
709
+ }
710
+ for (size_t i = 0; i < bs->len; i++) {
711
+ ab_char(b, '\n');
712
+ scr_assert_cf_pad(b, indent + 2);
713
+ char tmp[40];
714
+ size_t n = scr_assert_inspect_f64((double)((const unsigned char *)bs->data)[i], tmp);
715
+ ab_bytes(b, tmp, n);
716
+ if (i + 1 < bs->len) ab_char(b, ',');
717
+ }
718
+ ab_char(b, '\n');
719
+ scr_assert_cf_pad(b, indent);
720
+ ab_char(b, ']');
721
+ return;
722
+ }
723
+ case SCR_DYN_ARR: {
724
+ if (d->v.arr.len == 0) {
725
+ ab_cstr(b, "[]");
726
+ return;
727
+ }
728
+ if (depth == 0) {
729
+ ab_cstr(b, "[Array]");
730
+ return;
731
+ }
732
+ ab_char(b, '[');
733
+ for (size_t i = 0; i < d->v.arr.len; i++) {
734
+ ab_char(b, '\n');
735
+ scr_assert_cf_pad(b, indent + 2);
736
+ scr_assert_cf_value(b, d->v.arr.items[i], indent + 2, depth - 1);
737
+ if (i + 1 < d->v.arr.len) ab_char(b, ',');
738
+ }
739
+ ab_char(b, '\n');
740
+ scr_assert_cf_pad(b, indent);
741
+ ab_char(b, ']');
742
+ return;
743
+ }
744
+ case SCR_DYN_JSVAL: {
745
+ /* The depth-elided placeholder (the handle stance): Node renders
746
+ * the engine object's property dump — internals this walker does
747
+ * not model; the text only appears inside FAILURE reports, which
748
+ * already diverge in format. */
749
+ ab_cstr(b, "[island value]");
750
+ return;
751
+ }
752
+ case SCR_DYN_TYPED_REF: {
753
+ ScrDyn *materialized = scr_dyn_typed_ref_materialize(d);
754
+ scr_assert_cf_value(b, materialized, indent, depth);
755
+ scr_dyn_release(materialized);
756
+ return;
757
+ }
758
+ case SCR_DYN_PROXY:
759
+ scr_assert_cf_value(b, d->v.proxy.target, indent, depth);
760
+ return;
761
+ case SCR_DYN_OBJ: {
762
+ /* The null-proto dictionary renders with Node's prefix in the
763
+ * failure diff too (assertion_error.js inspects both sides). */
764
+ if (d->v.obj.len == 0) {
765
+ ab_cstr(b, d->null_proto ? "[Object: null prototype] {}" : "{}");
766
+ return;
767
+ }
768
+ if (depth == 0) {
769
+ ab_cstr(b, d->null_proto ? "[Object: null prototype]" : "[Object]");
770
+ return;
771
+ }
772
+ if (d->null_proto) ab_cstr(b, "[Object: null prototype] ");
773
+ /* Render every entry, then sort the RENDERED texts (Node's
774
+ * sorted:true sorts formatted entries, quotes included). */
775
+ ScrCfEntry *ents = malloc(d->v.obj.len * sizeof *ents);
776
+ if (!ents) scr_assert_oom();
777
+ for (size_t i = 0; i < d->v.obj.len; i++) {
778
+ const ScrDynEntry *ent = &d->v.obj.entries[i];
779
+ ScrAssertBuf eb = {0};
780
+ scr_assert_cf_key(&eb, ent->key, ent->key_len);
781
+ ab_cstr(&eb, ": ");
782
+ scr_assert_cf_value(&eb, ent->value, indent + 2, depth - 1);
783
+ ents[i].text = eb.data ? eb.data : malloc(1);
784
+ if (!ents[i].text) scr_assert_oom();
785
+ ents[i].len = eb.len;
786
+ }
787
+ qsort(ents, d->v.obj.len, sizeof *ents, scr_assert_cf_entry_cmp);
788
+ ab_char(b, '{');
789
+ for (size_t i = 0; i < d->v.obj.len; i++) {
790
+ ab_char(b, '\n');
791
+ scr_assert_cf_pad(b, indent + 2);
792
+ ab_bytes(b, ents[i].text, ents[i].len);
793
+ if (i + 1 < d->v.obj.len) ab_char(b, ',');
794
+ free(ents[i].text);
795
+ }
796
+ free(ents);
797
+ ab_char(b, '\n');
798
+ scr_assert_cf_pad(b, indent);
799
+ ab_char(b, '}');
800
+ return;
801
+ }
802
+ }
803
+ }
804
+
805
+ static ScrStr *scr_assert_cf_inspect(const ScrDyn *d) {
806
+ ScrAssertBuf b = {0};
807
+ scr_assert_cf_value(&b, d, 0, SCR_ASSERT_CF_DEPTH);
808
+ return ab_take(&b);
809
+ }
810
+
811
+ /* ── the myers line diff (internal/assert/myers_diff.js) ─────────────── */
812
+
813
+ typedef struct {
814
+ const char *s;
815
+ size_t len;
816
+ } ScrLine;
817
+
818
+ /* Splits rendered text into lines (no trailing-newline convention: the
819
+ * renderer never emits a final \n, matching String.prototype.split). */
820
+ static ScrLine *scr_assert_split_lines(const ScrStr *text, size_t *out_n) {
821
+ size_t n = 1;
822
+ for (size_t i = 0; i < text->len; i++) {
823
+ if (text->data[i] == '\n') n++;
824
+ }
825
+ ScrLine *lines = malloc(n * sizeof *lines);
826
+ if (!lines) scr_assert_oom();
827
+ size_t li = 0, start = 0;
828
+ for (size_t i = 0; i <= text->len; i++) {
829
+ if (i == text->len || text->data[i] == '\n') {
830
+ lines[li].s = text->data + start;
831
+ lines[li].len = i - start;
832
+ li++;
833
+ start = i + 1;
834
+ }
835
+ }
836
+ *out_n = n;
837
+ return lines;
838
+ }
839
+
840
+ /* areLinesEqual with the comma-disparity rule: object lines differing
841
+ * only by a trailing comma count as equal. */
842
+ static bool scr_assert_lines_eq(ScrLine a, ScrLine b, bool comma) {
843
+ if (a.len == b.len && (a.len == 0 || memcmp(a.s, b.s, a.len) == 0)) return true;
844
+ if (!comma) return false;
845
+ if (a.len + 1 == b.len && b.s[b.len - 1] == ',' &&
846
+ (a.len == 0 || memcmp(a.s, b.s, a.len) == 0))
847
+ return true;
848
+ if (b.len + 1 == a.len && a.s[a.len - 1] == ',' &&
849
+ (b.len == 0 || memcmp(a.s, b.s, b.len) == 0))
850
+ return true;
851
+ return false;
852
+ }
853
+
854
+ typedef struct {
855
+ int8_t op; /* 1 INSERT (actual), -1 DELETE (expected), 0 NOP */
856
+ ScrLine line;
857
+ } ScrDiffOp;
858
+
859
+ /* The greedy O((N+M)·D) forward walk plus backtrack — a straight port of
860
+ * myersDiff/backtrack. The result array is in REVERSE document order
861
+ * (built back-to-front, like Node's), so the printer walks it from the
862
+ * end. Returns NULL when the inputs exceed the line cap (the caller falls
863
+ * back to the whole-value form). */
864
+ #define SCR_ASSERT_MYERS_CAP 4096
865
+
866
+ static ScrDiffOp *scr_assert_myers(ScrLine *a, size_t an, ScrLine *b, size_t bn,
867
+ bool comma, size_t *out_n) {
868
+ size_t max = an + bn;
869
+ if (max == 0 || max > SCR_ASSERT_MYERS_CAP) return NULL;
870
+ size_t width = 2 * max + 1;
871
+ int32_t *v = calloc(width, sizeof *v);
872
+ int32_t **trace = malloc((max + 1) * sizeof *trace);
873
+ if (!v || !trace) scr_assert_oom();
874
+ size_t traceN = 0;
875
+ size_t foundLevel = 0;
876
+ bool found = false;
877
+ for (size_t d = 0; d <= max && !found; d++) {
878
+ int32_t *snap = malloc(width * sizeof *snap);
879
+ if (!snap) scr_assert_oom();
880
+ memcpy(snap, v, width * sizeof *snap);
881
+ trace[traceN++] = snap;
882
+ for (long k = -(long)d; k <= (long)d; k += 2) {
883
+ size_t off = (size_t)(k + (long)max);
884
+ long x;
885
+ if (k == -(long)d || (k != (long)d && v[off - 1] < v[off + 1])) {
886
+ x = v[off + 1];
887
+ } else {
888
+ x = v[off - 1] + 1;
889
+ }
890
+ long y = x - k;
891
+ while (x < (long)an && y < (long)bn && scr_assert_lines_eq(a[x], b[y], comma)) {
892
+ x++;
893
+ y++;
894
+ }
895
+ v[off] = (int32_t)x;
896
+ if (x >= (long)an && y >= (long)bn) {
897
+ foundLevel = d;
898
+ found = true;
899
+ break;
900
+ }
901
+ }
902
+ }
903
+ free(v);
904
+ if (!found) { /* unreachable: D <= max always terminates */
905
+ for (size_t i = 0; i < traceN; i++) free(trace[i]);
906
+ free(trace);
907
+ return NULL;
908
+ }
909
+ ScrDiffOp *result = malloc((an + bn + 1) * sizeof *result);
910
+ if (!result) scr_assert_oom();
911
+ size_t rn = 0;
912
+ long x = (long)an, y = (long)bn;
913
+ for (long level = (long)foundLevel; level >= 0; level--) {
914
+ int32_t *vv = trace[level];
915
+ long k = x - y;
916
+ long prevK;
917
+ if (k == -level || (k != level && vv[k + (long)max - 1] < vv[k + (long)max + 1])) {
918
+ prevK = k + 1;
919
+ } else {
920
+ prevK = k - 1;
921
+ }
922
+ long prevX = vv[prevK + (long)max];
923
+ long prevY = prevX - prevK;
924
+ while (x > prevX && y > prevY) {
925
+ ScrLine ai = a[x - 1];
926
+ bool aComma = ai.len > 0 && ai.s[ai.len - 1] == ',';
927
+ result[rn].op = 0;
928
+ result[rn].line = (comma && !aComma) ? b[y - 1] : ai;
929
+ rn++;
930
+ x--;
931
+ y--;
932
+ }
933
+ if (level > 0) {
934
+ if (x > prevX) {
935
+ x--;
936
+ result[rn].op = 1;
937
+ result[rn].line = a[x];
938
+ } else {
939
+ y--;
940
+ result[rn].op = -1;
941
+ result[rn].line = b[y];
942
+ }
943
+ rn++;
944
+ }
945
+ }
946
+ for (size_t i = 0; i < traceN; i++) free(trace[i]);
947
+ free(trace);
948
+ *out_n = rn;
949
+ return result;
950
+ }
951
+
952
+ static void scr_assert_line_out(ScrAssertBuf *b, const char *prefix, ScrLine l) {
953
+ ab_cstr(b, prefix);
954
+ ab_bytes(b, l.s, l.len);
955
+ ab_char(b, '\n');
956
+ }
957
+
958
+ /* printMyersDiff: document order (the diff array reversed), 5 context
959
+ * lines per common run, then "..." plus the run's last line and the
960
+ * skipped flag. Trailing common lines past the window drop silently —
961
+ * Node's printer does the same. The message lands WITHOUT its leading
962
+ * newline (the caller places it); trailing whitespace trimmed. */
963
+ static bool scr_assert_print_myers(ScrAssertBuf *b, const ScrDiffOp *diff, size_t n) {
964
+ bool skipped = false;
965
+ size_t nopCount = 0;
966
+ size_t startLen = b->len;
967
+ for (size_t i = n; i-- > 0;) {
968
+ int8_t op = diff[i].op;
969
+ bool hasPrev = i + 1 < n;
970
+ if (hasPrev && diff[i + 1].op == 0 && op != 0) {
971
+ if (nopCount == 6) {
972
+ scr_assert_line_out(b, " ", diff[i + 1].line);
973
+ } else if (nopCount == 7) {
974
+ scr_assert_line_out(b, " ", diff[i + 2].line);
975
+ scr_assert_line_out(b, " ", diff[i + 1].line);
976
+ } else if (nopCount >= 8) {
977
+ ab_cstr(b, "...\n");
978
+ scr_assert_line_out(b, " ", diff[i + 1].line);
979
+ skipped = true;
980
+ }
981
+ nopCount = 0;
982
+ }
983
+ if (op == 1) {
984
+ scr_assert_line_out(b, "+ ", diff[i].line);
985
+ } else if (op == -1) {
986
+ scr_assert_line_out(b, "- ", diff[i].line);
987
+ } else {
988
+ if (nopCount < 5) scr_assert_line_out(b, " ", diff[i].line);
989
+ nopCount++;
990
+ }
991
+ }
992
+ while (b->len > startLen &&
993
+ (b->data[b->len - 1] == '\n' || b->data[b->len - 1] == ' ')) {
994
+ b->len--; /* trimEnd */
995
+ }
996
+ return skipped;
997
+ }
998
+
999
+ /* ── the dyn entry point ─────────────────────────────────────────────── */
1000
+
1001
+ /* Is this dyn kind `typeof == "object" && != null` to assertion_error.js? */
1002
+ static bool scr_assert_dyn_is_object(const ScrDyn *d) {
1003
+ return d->kind == SCR_DYN_ARR || d->kind == SCR_DYN_OBJ || d->kind == SCR_DYN_BYTES ||
1004
+ d->kind == SCR_DYN_HANDLE || d->kind == SCR_DYN_PROMISE ||
1005
+ d->kind == SCR_DYN_TYPED_REF || d->kind == SCR_DYN_PROXY ||
1006
+ scr_dyn_isl_typeof_is(d, "object"); /* engine-held: the engine's typeof */
1007
+ }
1008
+
1009
+ /* The failing EQUAL operators over dyn operands — createErrDiff. */
1010
+ static void scr_assert_dyn_eq_fail(ScrDyn *a, ScrDyn *b, bool deep,
1011
+ ScrStr *msg, bool has_msg) {
1012
+ /* checkOperator: strictEqual over two objects (or two functions)
1013
+ * reports the reference-equality expectation. */
1014
+ bool objOp = !deep && ((scr_assert_dyn_is_object(a) && scr_assert_dyn_is_object(b)) ||
1015
+ (a->kind == SCR_DYN_FUNC && b->kind == SCR_DYN_FUNC));
1016
+ const char *header =
1017
+ deep ? "Expected values to be strictly deep-equal:"
1018
+ : (objOp ? "Expected \"actual\" to be reference-equal to \"expected\":"
1019
+ : "Expected values to be strictly equal:");
1020
+ ScrStr *ia = scr_assert_cf_inspect(a);
1021
+ ScrStr *ib = scr_assert_cf_inspect(b);
1022
+ size_t an, en;
1023
+ ScrLine *alines = scr_assert_split_lines(ia, &an);
1024
+ ScrLine *elines = scr_assert_split_lines(ib, &en);
1025
+ ScrAssertBuf out = {0};
1026
+ const char *customOrHeader = header; /* resolved after operator morphing */
1027
+ bool simple = an == 1 && en == 1 &&
1028
+ (!scr_assert_dyn_is_object(a) || !scr_assert_dyn_is_object(b));
1029
+ bool inspEq = ia->len == ib->len && memcmp(ia->data, ib->data, ia->len) == 0;
1030
+
1031
+ if (simple) {
1032
+ if (has_msg && msg->len > 0) {
1033
+ ab_str(&out, msg);
1034
+ } else {
1035
+ ab_cstr(&out, customOrHeader);
1036
+ }
1037
+ size_t la = ia->len, lb = ib->len;
1038
+ size_t stringsLen = la + lb;
1039
+ if (a->kind == SCR_DYN_STR) stringsLen -= 2;
1040
+ if (b->kind == SCR_DYN_STR) stringsLen -= 2;
1041
+ bool bothZero = a->kind == SCR_DYN_NUM && b->kind == SCR_DYN_NUM &&
1042
+ a->v.num == 0.0 && b->v.num == 0.0;
1043
+ if (stringsLen <= 12 && !bothZero) {
1044
+ ab_cstr(&out, "\n\n");
1045
+ ab_str(&out, ia);
1046
+ ab_cstr(&out, " !== ");
1047
+ ab_str(&out, ib);
1048
+ ab_cstr(&out, "\n");
1049
+ } else {
1050
+ ab_cstr(&out, "\n+ actual - expected\n\n+ ");
1051
+ ab_str(&out, ia);
1052
+ ab_cstr(&out, "\n- ");
1053
+ ab_str(&out, ib);
1054
+ /* getStackedDiff's ^ indicator runs over the INSPECTED text of
1055
+ * every simple stacked diff (its typeof-string test sees the
1056
+ * rendered strings), all kinds included. */
1057
+ if (la + lb <= 80) {
1058
+ size_t i = 0;
1059
+ while (i < la && i < lb && ia->data[i] == ib->data[i]) i++;
1060
+ if (i < la && i >= 3) {
1061
+ ab_char(&out, '\n');
1062
+ for (size_t k = 0; k < i + 2; k++) ab_char(&out, ' ');
1063
+ ab_char(&out, '^');
1064
+ }
1065
+ }
1066
+ ab_cstr(&out, "\n");
1067
+ }
1068
+ } else if (inspEq) {
1069
+ /* Structurally identical renderings that are not the same reference:
1070
+ * the notIdentical banner over the single rendering. */
1071
+ const char *ident = "Values have same structure but are not reference-equal:";
1072
+ if (has_msg && msg->len > 0) {
1073
+ ab_str(&out, msg);
1074
+ } else {
1075
+ ab_cstr(&out, ident);
1076
+ }
1077
+ ab_cstr(&out, "\n");
1078
+ if (an > 50) {
1079
+ ab_cstr(&out, "\n... Skipped lines");
1080
+ ab_cstr(&out, "\n");
1081
+ for (size_t i = 0; i < 50; i++) {
1082
+ ab_bytes(&out, alines[i].s, alines[i].len);
1083
+ ab_char(&out, '\n');
1084
+ }
1085
+ ab_cstr(&out, "...}\n");
1086
+ } else {
1087
+ ab_cstr(&out, "\n");
1088
+ ab_str(&out, ia);
1089
+ ab_cstr(&out, "\n");
1090
+ }
1091
+ } else {
1092
+ /* The myers line diff with Node's printer. checkCommaDisparity is
1093
+ * Node's `actual != null && typeof actual === 'object'`. */
1094
+ bool comma = scr_assert_dyn_is_object(a);
1095
+ size_t dn = 0;
1096
+ ScrDiffOp *diff = scr_assert_myers(alines, an, elines, en, comma, &dn);
1097
+ if (has_msg && msg->len > 0) {
1098
+ ab_str(&out, msg);
1099
+ } else {
1100
+ ab_cstr(&out, customOrHeader);
1101
+ }
1102
+ ab_cstr(&out, "\n+ actual - expected");
1103
+ if (diff) {
1104
+ ScrAssertBuf body = {0};
1105
+ bool skipped = scr_assert_print_myers(&body, diff, dn);
1106
+ if (skipped) ab_cstr(&out, "\n... Skipped lines");
1107
+ ab_cstr(&out, "\n\n");
1108
+ ab_bytes(&out, body.data ? body.data : "", body.len);
1109
+ ab_cstr(&out, "\n");
1110
+ free(body.data);
1111
+ free(diff);
1112
+ } else {
1113
+ /* Past the line cap: the whole-value fallback (documented). */
1114
+ ab_cstr(&out, "\n\n");
1115
+ for (size_t i = 0; i < an; i++) scr_assert_line_out(&out, "+ ", alines[i]);
1116
+ for (size_t i = 0; i < en; i++) {
1117
+ ab_cstr(&out, "- ");
1118
+ ab_bytes(&out, elines[i].s, elines[i].len);
1119
+ if (i + 1 < en) ab_char(&out, '\n');
1120
+ }
1121
+ ab_cstr(&out, "\n");
1122
+ }
1123
+ }
1124
+ free(alines);
1125
+ free(elines);
1126
+ scr_str_release(ia);
1127
+ scr_str_release(ib);
1128
+ scr_assert_fail_msg(ab_take(&out));
1129
+ }
1130
+
1131
+ /* The failing NOT-equal operators over dyn operands (values compared
1132
+ * same): a custom message stands alone; the generated one renders the
1133
+ * actual value under the operator's banner (the object banner for
1134
+ * notStrictEqual over objects/functions), inline when a single short
1135
+ * line, block form otherwise, >50-line renderings collapsed. */
1136
+ static void scr_assert_dyn_neq_fail(ScrDyn *a, bool deep, ScrStr *msg, bool has_msg) {
1137
+ if (has_msg) {
1138
+ scr_assert_fail_msg(scr_str_retain(msg));
1139
+ return;
1140
+ }
1141
+ const char *base =
1142
+ deep ? "Expected \"actual\" not to be strictly deep-equal to:"
1143
+ : ((scr_assert_dyn_is_object(a) || a->kind == SCR_DYN_FUNC)
1144
+ ? "Expected \"actual\" not to be reference-equal to \"expected\":"
1145
+ : "Expected \"actual\" to be strictly unequal to:");
1146
+ ScrStr *ia = scr_assert_cf_inspect(a);
1147
+ size_t an;
1148
+ ScrLine *lines = scr_assert_split_lines(ia, &an);
1149
+ ScrAssertBuf out = {0};
1150
+ ab_cstr(&out, base);
1151
+ if (an == 1) {
1152
+ ab_cstr(&out, lines[0].len > 5 ? "\n\n" : " ");
1153
+ ab_str(&out, ia);
1154
+ } else {
1155
+ ab_cstr(&out, "\n\n");
1156
+ /* res.length > 50: line 47 becomes "..." and the rest drop. */
1157
+ size_t shown = an > 50 ? 47 : an;
1158
+ for (size_t i = 0; i < shown; i++) {
1159
+ if (an > 50 && i == 46) {
1160
+ ab_cstr(&out, "...");
1161
+ } else {
1162
+ ab_bytes(&out, lines[i].s, lines[i].len);
1163
+ }
1164
+ ab_char(&out, '\n');
1165
+ }
1166
+ }
1167
+ free(lines);
1168
+ scr_str_release(ia);
1169
+ scr_assert_fail_msg(ab_take(&out));
1170
+ }
1171
+
1172
+ /* strictEqual / notStrictEqual / deepStrictEqual / notDeepStrictEqual
1173
+ * where either operand is a checked-dynamic value (both arrive as dyn
1174
+ * values — the frontend boxes a static side). Borrows everything. */
1175
+ void scr_assert_eq_dyn(ScrDyn *a, ScrDyn *b, bool negated, bool deep,
1176
+ ScrStr *msg, bool has_msg) {
1177
+ bool same = deep ? scr_assert_dyn_deep_eq(a, b) : scr_assert_dyn_same_value(a, b);
1178
+ /* The deep walk's JSVAL arm fences loudly (an island value it cannot
1179
+ * compare structurally): propagate THAT, never a fabricated
1180
+ * AssertionError over a comparison that did not run. */
1181
+ if (scr_exc_pending()) return;
1182
+ if ((negated && !same) || (!negated && same)) return;
1183
+ if (negated) {
1184
+ scr_assert_dyn_neq_fail(a, deep, msg, has_msg);
1185
+ } else {
1186
+ scr_assert_dyn_eq_fail(a, b, deep, msg, has_msg);
1187
+ }
1188
+ }
1189
+
1190
+ /* Node's expectsError over an error-INSTANCE expected (assert.throws/
1191
+ * rejects second argument): every key of the expected dyn error (the
1192
+ * %error marker skipped; name/message/code is the encoding's surface)
1193
+ * must deep-strict-equal the caught value's — extra ACTUAL keys are fine
1194
+ * (Node walks the expected's keys only). A mismatch fails through the
1195
+ * deep-equal report (a mismatched key implies the full comparison
1196
+ * differs, so the diff is honest); a non-object pair falls back to the
1197
+ * full deep comparison outright. */
1198
+ void scr_assert_expects_err_dyn(ScrDyn *actual, ScrDyn *expected, ScrStr *msg, bool has_msg) {
1199
+ if (actual->kind == SCR_DYN_OBJ && expected->kind == SCR_DYN_OBJ) {
1200
+ bool ok = true;
1201
+ for (size_t i = 0; i < expected->v.obj.len && ok; i++) {
1202
+ const ScrDynEntry *e = &expected->v.obj.entries[i];
1203
+ if (e->key_len == 6 && memcmp(e->key, "%error", 6) == 0) continue;
1204
+ ScrDyn *av = scr_dyn_obj_get(actual, e->key, e->key_len);
1205
+ if (av == NULL || !scr_assert_dyn_deep_eq(av, e->value)) ok = false;
1206
+ }
1207
+ if (ok) return;
1208
+ }
1209
+ scr_assert_eq_dyn(actual, expected, false, true, msg, has_msg);
1210
+ }
1211
+
1212
+ /* assert.throws(fn) that did NOT throw / assert.rejects whose promise
1213
+ * fulfilled: "Missing expected exception|rejection" with Node's details —
1214
+ * ` (${expected.name})` when the expected class or shape carries a name,
1215
+ * then `: message` or `.` (expectsError's NO_EXCEPTION_SENTINEL arm). */
1216
+ void scr_assert_throws_none(bool rejection, ScrStr *ename, bool has_ename,
1217
+ ScrStr *msg, bool has_msg) {
1218
+ ScrAssertBuf b = {0};
1219
+ ab_cstr(&b, rejection ? "Missing expected rejection" : "Missing expected exception");
1220
+ if (has_ename) {
1221
+ ab_cstr(&b, " (");
1222
+ ab_str(&b, ename);
1223
+ ab_char(&b, ')');
1224
+ }
1225
+ if (has_msg) {
1226
+ ab_cstr(&b, ": ");
1227
+ ab_str(&b, msg);
1228
+ } else {
1229
+ ab_cstr(&b, ".");
1230
+ }
1231
+ scr_assert_fail_msg(ab_take(&b));
1232
+ }
1233
+
1234
+ /* assert.throws(fn, ErrorClass) where the thrown Error is NOT an instance
1235
+ * of the expected class: Node's mismatch AssertionError, built from the
1236
+ * received error's name and message. (Node prefers constructor.name; this
1237
+ * runtime carries the `name` slot — identical for the builtin hierarchy,
1238
+ * SEMANTICS.md 105 for subclasses whose constructor name differs.)
1239
+ * Borrows both. */
1240
+ void scr_assert_throws_mismatch(ScrStr *expected_name, ScrError *err,
1241
+ ScrStr *msg, bool has_msg) {
1242
+ if (has_msg) {
1243
+ /* A custom message stands alone (Node's innerFail with the user's
1244
+ * message — the instance-of text is the generated form only). */
1245
+ scr_assert_fail_msg(scr_str_retain(msg));
1246
+ return;
1247
+ }
1248
+ ScrAssertBuf b = {0};
1249
+ ab_cstr(&b, "The error is expected to be an instance of \"");
1250
+ ab_str(&b, expected_name);
1251
+ ab_cstr(&b, "\". Received \"");
1252
+ if (err->name) ab_str(&b, err->name);
1253
+ ab_char(&b, '"');
1254
+ if (err->message && err->message->len > 0) {
1255
+ ab_cstr(&b, "\n\nError message:\n\n");
1256
+ ab_str(&b, err->message);
1257
+ }
1258
+ scr_assert_fail_msg(ab_take(&b));
1259
+ }
1260
+
1261
+ /* ── assert.throws(fn, <object shape>) — expectedException over the
1262
+ * static error surface ─────────────────────────────────────────────────
1263
+ * Node compares each own key of the expected object against the thrown
1264
+ * error: strings by deep-equal (byte equality here), regex values by
1265
+ * test against the actual string. The bounded key set (name/message/
1266
+ * code — everything the static surface carries) makes Node's generated
1267
+ * failure message — a deep-equal diff of two `Comparison` placeholder
1268
+ * objects, keys in inspect's SORTED order (code < message < name), a
1269
+ * regex-valued key that MATCHED rendering as the actual's own value on
1270
+ * both sides — fully enumerable, so the rendering is byte-exact, not
1271
+ * header-only. The accumulator is a static: the begin/slot/end calls are
1272
+ * straight-line inside one synthesized helper, no suspension between. */
1273
+
1274
+ enum { SHAPE_CODE = 0, SHAPE_MESSAGE = 1, SHAPE_NAME = 2 };
1275
+
1276
+ typedef struct {
1277
+ bool present;
1278
+ bool is_re;
1279
+ bool re_matched;
1280
+ ScrStr *val; /* owned: the string value, or the regex's /source/flags */
1281
+ } ScrShapeSlot;
1282
+
1283
+ static SCR_TL struct {
1284
+ ScrError *err; /* borrowed — alive across the straight-line sequence */
1285
+ ScrShapeSlot slots[3];
1286
+ } scr_shape;
1287
+
1288
+ static void scr_shape_clear(void) {
1289
+ for (int k = 0; k < 3; k++) {
1290
+ if (scr_shape.slots[k].val) scr_str_release(scr_shape.slots[k].val);
1291
+ scr_shape.slots[k] = (ScrShapeSlot){0};
1292
+ }
1293
+ scr_shape.err = NULL;
1294
+ }
1295
+
1296
+ void scr_assert_shape_begin(ScrError *err) {
1297
+ scr_shape_clear();
1298
+ scr_shape.err = err;
1299
+ }
1300
+
1301
+ void scr_assert_shape_str(int key, ScrStr *v) {
1302
+ scr_shape.slots[key] = (ScrShapeSlot){
1303
+ .present = true, .is_re = false, .re_matched = false, .val = scr_str_retain(v)};
1304
+ }
1305
+
1306
+ /* The regex slot's storage half — scr_regex.c tested the actual value
1307
+ * already and rendered the /source/flags form (moves in). */
1308
+ void scr_assert_shape_slot_re(int key, bool matched, ScrStr *rendered) {
1309
+ scr_shape.slots[key] = (ScrShapeSlot){
1310
+ .present = true, .is_re = true, .re_matched = matched, .val = rendered};
1311
+ }
1312
+
1313
+ /* The actual error's key value, borrowed; NULL = absent (a NULL code
1314
+ * slot — Node's `!(key in actual)`). name/message are always present. */
1315
+ ScrStr *scr_assert_shape_actual(int key) {
1316
+ switch (key) {
1317
+ case SHAPE_CODE:
1318
+ return scr_shape.err->code;
1319
+ case SHAPE_MESSAGE:
1320
+ return scr_shape.err->message;
1321
+ default:
1322
+ return scr_shape.err->name;
1323
+ }
1324
+ }
1325
+
1326
+ static bool scr_shape_str_eq(const ScrStr *a, const ScrStr *b) {
1327
+ return a->len == b->len && memcmp(a->data, b->data, a->len) == 0;
1328
+ }
1329
+
1330
+ /* Does every expected key match the caught error? (The pass check and
1331
+ * doesNotReject's predicate.) */
1332
+ static bool scr_shape_matches(void) {
1333
+ for (int k = 0; k < 3; k++) {
1334
+ const ScrShapeSlot *s = &scr_shape.slots[k];
1335
+ if (!s->present) continue;
1336
+ ScrStr *actual = scr_assert_shape_actual(k);
1337
+ if (!actual) return false;
1338
+ if (s->is_re ? !s->re_matched : !scr_shape_str_eq(actual, s->val)) return false;
1339
+ }
1340
+ return true;
1341
+ }
1342
+
1343
+ /* One rendered Comparison line: " <key>: <value>" (+ "," unless last).
1344
+ * The value is util.inspect of a string, or the regex's own rendering. */
1345
+ static ScrStr *scr_shape_line(int key, ScrStr *value, bool inspect, bool last) {
1346
+ static const char *names[3] = {"code", "message", "name"};
1347
+ ScrAssertBuf b = {0};
1348
+ ab_cstr(&b, " ");
1349
+ ab_cstr(&b, names[key]);
1350
+ ab_cstr(&b, ": ");
1351
+ if (inspect) {
1352
+ ScrStr *q = scr_assert_inspect_str(value);
1353
+ ab_str(&b, q);
1354
+ scr_str_release(q);
1355
+ } else {
1356
+ ab_str(&b, value);
1357
+ }
1358
+ if (!last) ab_char(&b, ',');
1359
+ return ab_take(&b);
1360
+ }
1361
+
1362
+ /* The failing shape comparison's generated message: Node's deep-equal
1363
+ * diff of the two Comparison renderings. A line diff over two tiny
1364
+ * arrays (<= 5 lines): common lines print with a two-space margin; each
1365
+ * maximal differing gap prints its actual lines (+) then its expected
1366
+ * lines (-) — the myers printer's grouping, verified against v24 across
1367
+ * the enumerable case space. */
1368
+ static void scr_shape_diff_fail(void) {
1369
+ ScrStr *alines[5], *elines[5];
1370
+ size_t an = 0, en = 0;
1371
+ /* Actual Comparison: the expected keys present on the error, sorted
1372
+ * render order (code < message < name); zero keys collapse to the
1373
+ * one-line "Comparison {}". */
1374
+ int akeys[3], ekeys[3];
1375
+ int ank = 0, enk = 0;
1376
+ for (int k = 0; k < 3; k++) {
1377
+ if (!scr_shape.slots[k].present) continue;
1378
+ ekeys[enk++] = k;
1379
+ if (scr_assert_shape_actual(k)) akeys[ank++] = k;
1380
+ }
1381
+ if (ank == 0) {
1382
+ alines[an++] = scr_str_new("Comparison {}", 13);
1383
+ } else {
1384
+ alines[an++] = scr_str_new("Comparison {", 12);
1385
+ for (int i = 0; i < ank; i++) {
1386
+ alines[an++] =
1387
+ scr_shape_line(akeys[i], scr_assert_shape_actual(akeys[i]), true, i == ank - 1);
1388
+ }
1389
+ alines[an++] = scr_str_new("}", 1);
1390
+ }
1391
+ elines[en++] = scr_str_new("Comparison {", 12);
1392
+ for (int i = 0; i < enk; i++) {
1393
+ const ScrShapeSlot *s = &scr_shape.slots[ekeys[i]];
1394
+ /* A regex value that MATCHED renders as the actual's own value on
1395
+ * the expected side too (Node's Comparison constructor), making the
1396
+ * two lines identical. */
1397
+ ScrStr *v = s->is_re && s->re_matched ? scr_assert_shape_actual(ekeys[i]) : s->val;
1398
+ bool inspect = !s->is_re || s->re_matched;
1399
+ elines[en++] = scr_shape_line(ekeys[i], v, inspect, i == enk - 1);
1400
+ }
1401
+ elines[en++] = scr_str_new("}", 1);
1402
+
1403
+ /* LCS table over the two line arrays (byte-equal lines), then the
1404
+ * matched pairs — unique here: distinct keys never render equal lines,
1405
+ * so ambiguity cannot arise. */
1406
+ size_t L[6][6] = {{0}};
1407
+ for (size_t i = an; i-- > 0;) {
1408
+ for (size_t j = en; j-- > 0;) {
1409
+ L[i][j] = scr_shape_str_eq(alines[i], elines[j])
1410
+ ? L[i + 1][j + 1] + 1
1411
+ : (L[i + 1][j] > L[i][j + 1] ? L[i + 1][j] : L[i][j + 1]);
1412
+ }
1413
+ }
1414
+ /* The walk: common lines print with a two-space margin; inside a gap
1415
+ * the >= tie-break prefers actual, so each maximal differing run
1416
+ * groups its + lines before its - lines — the myers printer's
1417
+ * grouping, verified against v24 across the enumerable case space
1418
+ * (the first "\n" doubles as the blank line under the banner). */
1419
+ ScrAssertBuf b = {0};
1420
+ ab_cstr(&b, "Expected values to be strictly deep-equal:\n+ actual - expected\n");
1421
+ size_t i = 0, j = 0;
1422
+ while (i < an && j < en) {
1423
+ if (scr_shape_str_eq(alines[i], elines[j])) {
1424
+ ab_cstr(&b, "\n ");
1425
+ ab_str(&b, alines[i]);
1426
+ i++;
1427
+ j++;
1428
+ } else if (L[i + 1][j] >= L[i][j + 1]) {
1429
+ ab_cstr(&b, "\n+ ");
1430
+ ab_str(&b, alines[i]);
1431
+ i++;
1432
+ } else {
1433
+ ab_cstr(&b, "\n- ");
1434
+ ab_str(&b, elines[j]);
1435
+ j++;
1436
+ }
1437
+ }
1438
+ for (; i < an; i++) {
1439
+ ab_cstr(&b, "\n+ ");
1440
+ ab_str(&b, alines[i]);
1441
+ }
1442
+ for (; j < en; j++) {
1443
+ ab_cstr(&b, "\n- ");
1444
+ ab_str(&b, elines[j]);
1445
+ }
1446
+ ab_cstr(&b, "\n");
1447
+ for (size_t k = 0; k < an; k++) scr_str_release(alines[k]);
1448
+ for (size_t k = 0; k < en; k++) scr_str_release(elines[k]);
1449
+ scr_assert_fail_msg(ab_take(&b));
1450
+ }
1451
+
1452
+ void scr_assert_shape_end(ScrStr *msg, bool has_msg) {
1453
+ if (scr_shape_matches()) {
1454
+ scr_shape_clear();
1455
+ return;
1456
+ }
1457
+ if (has_msg) {
1458
+ scr_shape_clear();
1459
+ scr_assert_fail_msg(scr_str_retain(msg));
1460
+ return;
1461
+ }
1462
+ scr_shape_diff_fail();
1463
+ scr_shape_clear();
1464
+ }
1465
+
1466
+ /* assert.doesNotReject whose rejection matched the expectation (or had
1467
+ * none): expectsNoError's generated message. */
1468
+ void scr_assert_unwanted_rejection(ScrError *err, ScrStr *msg, bool has_msg) {
1469
+ ScrAssertBuf b = {0};
1470
+ ab_cstr(&b, "Got unwanted rejection");
1471
+ if (has_msg) {
1472
+ ab_cstr(&b, ": ");
1473
+ ab_str(&b, msg);
1474
+ } else {
1475
+ ab_char(&b, '.');
1476
+ }
1477
+ ab_cstr(&b, "\nActual message: \"");
1478
+ if (err->message) ab_str(&b, err->message);
1479
+ ab_char(&b, '"');
1480
+ scr_assert_fail_msg(ab_take(&b));
1481
+ }
1482
+
1483
+ /* ── assert.ifError ───────────────────────────────────────────────────
1484
+ * Node throws for ANY value but null/undefined (falsy included); the
1485
+ * frontend routes null/undefined to a no-op and everything else here.
1486
+ * The detail is the error's message (its name when the message is
1487
+ * empty — Node reads constructor.name, identical for the builtin
1488
+ * hierarchy) or the value's inspection. */
1489
+
1490
+ static void scr_assert_iferror_fail(const char *detail, size_t len) {
1491
+ ScrAssertBuf b = {0};
1492
+ ab_cstr(&b, "ifError got unwanted exception: ");
1493
+ ab_bytes(&b, detail, len);
1494
+ scr_assert_fail_msg(ab_take(&b));
1495
+ }
1496
+
1497
+ void scr_assert_iferror_err(ScrError *err) {
1498
+ const ScrStr *d = err->message && err->message->len > 0 ? err->message : err->name;
1499
+ scr_assert_iferror_fail(d ? d->data : "", d ? d->len : 0);
1500
+ }
1501
+
1502
+ void scr_assert_iferror_f64(double x) {
1503
+ char buf[40];
1504
+ size_t n = scr_assert_inspect_f64(x, buf);
1505
+ scr_assert_iferror_fail(buf, n);
1506
+ }
1507
+
1508
+ void scr_assert_iferror_str(ScrStr *s) {
1509
+ ScrStr *q = scr_assert_inspect_str(s);
1510
+ scr_assert_iferror_fail(q->data, q->len);
1511
+ scr_str_release(q);
1512
+ }
1513
+
1514
+ void scr_assert_iferror_bool(bool v) {
1515
+ scr_assert_iferror_fail(v ? "true" : "false", v ? 4 : 5);
1516
+ }
1517
+
1518
+ /* The checked-dynamic argument (test/common's mustSucceed wrapper): the
1519
+ * dyn kind dispatches — units pass quietly, %error-marked objects (the
1520
+ * caughtToDyn encoding) throw with the error's message (its name when
1521
+ * the message is empty, Node's rule), everything else throws with the
1522
+ * value's inspection. */
1523
+ void scr_assert_iferror_dyn(const ScrDyn *v) {
1524
+ if (v->kind == SCR_DYN_UNDEF || v->kind == SCR_DYN_NULL) return;
1525
+ if (v->kind == SCR_DYN_OBJ && scr_dyn_obj_get(v, "%error", 6) != NULL) {
1526
+ const ScrDyn *msg = scr_dyn_obj_get(v, "message", 7);
1527
+ const ScrDyn *name = scr_dyn_obj_get(v, "name", 4);
1528
+ const ScrDyn *d = msg != NULL && msg->kind == SCR_DYN_STR && msg->v.str->len > 0 ? msg : name;
1529
+ if (d != NULL && d->kind == SCR_DYN_STR) {
1530
+ scr_assert_iferror_fail(d->v.str->data, d->v.str->len);
1531
+ return;
1532
+ }
1533
+ }
1534
+ ScrStr *q = scr_assert_cf_inspect(v);
1535
+ scr_assert_iferror_fail(q->data, q->len);
1536
+ scr_str_release(q);
1537
+ }