@cucumber/cucumber 12.9.0 → 13.1.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 (400) hide show
  1. package/README.md +8 -3
  2. package/bin/cucumber.js +2 -1
  3. package/lib/api/convert_configuration.d.ts +3 -4
  4. package/lib/api/convert_configuration.js +9 -11
  5. package/lib/api/emit_support_code_messages.d.ts +3 -3
  6. package/lib/api/emit_support_code_messages.js +16 -65
  7. package/lib/api/formatters.d.ts +7 -7
  8. package/lib/api/formatters.js +5 -2
  9. package/lib/api/gherkin.d.ts +3 -3
  10. package/lib/api/gherkin.js +2 -4
  11. package/lib/api/index.d.ts +2 -2
  12. package/lib/api/index.js +1 -1
  13. package/lib/api/load_configuration.d.ts +2 -2
  14. package/lib/api/load_configuration.js +4 -5
  15. package/lib/api/load_sources.d.ts +2 -2
  16. package/lib/api/load_sources.js +2 -2
  17. package/lib/api/load_support.d.ts +2 -2
  18. package/lib/api/load_support.js +3 -3
  19. package/lib/api/plugins.d.ts +2 -2
  20. package/lib/api/plugins.js +2 -2
  21. package/lib/api/run_cucumber.d.ts +3 -3
  22. package/lib/api/run_cucumber.js +19 -3
  23. package/lib/api/support.d.ts +3 -3
  24. package/lib/api/support.js +5 -5
  25. package/lib/api/test_helpers.d.ts +1 -1
  26. package/lib/api/test_helpers.js +8 -10
  27. package/lib/api/types.d.ts +9 -5
  28. package/lib/api/types.js +1 -1
  29. package/lib/api/wrapper.d.mts +5 -0
  30. package/lib/api/wrapper.mjs +6 -6
  31. package/lib/assemble/assemble_test_cases.d.ts +4 -4
  32. package/lib/assemble/assemble_test_cases.js +2 -6
  33. package/lib/assemble/index.js +1 -1
  34. package/lib/assemble/types.d.ts +1 -1
  35. package/lib/assemble/types.js +1 -1
  36. package/lib/cli/i18n.js +5 -3
  37. package/lib/cli/index.d.ts +1 -1
  38. package/lib/cli/index.js +2 -2
  39. package/lib/cli/install_validator.js +4 -3
  40. package/lib/cli/run.js +7 -6
  41. package/lib/cli/validate_node_engine_version.js +2 -4
  42. package/lib/configuration/argv_parser.d.ts +1 -1
  43. package/lib/configuration/argv_parser.js +7 -7
  44. package/lib/configuration/check_schema.d.ts +1 -1
  45. package/lib/configuration/check_schema.js +17 -6
  46. package/lib/configuration/default_configuration.d.ts +1 -1
  47. package/lib/configuration/default_configuration.js +2 -1
  48. package/lib/configuration/from_file.d.ts +2 -2
  49. package/lib/configuration/from_file.js +6 -6
  50. package/lib/configuration/helpers.js +1 -1
  51. package/lib/configuration/index.js +1 -1
  52. package/lib/configuration/locate_file.js +3 -3
  53. package/lib/configuration/merge_configurations.d.ts +1 -1
  54. package/lib/configuration/merge_configurations.js +2 -10
  55. package/lib/configuration/parse_configuration.d.ts +2 -2
  56. package/lib/configuration/parse_configuration.js +3 -11
  57. package/lib/configuration/split_format_descriptor.d.ts +1 -2
  58. package/lib/configuration/split_format_descriptor.js +11 -71
  59. package/lib/configuration/types.d.ts +26 -3
  60. package/lib/configuration/types.js +1 -1
  61. package/lib/configuration/validate_configuration.d.ts +2 -2
  62. package/lib/configuration/validate_configuration.js +5 -3
  63. package/lib/environment/console_logger.d.ts +2 -2
  64. package/lib/environment/console_logger.js +1 -1
  65. package/lib/environment/index.js +1 -1
  66. package/lib/environment/make_environment.d.ts +1 -1
  67. package/lib/environment/make_environment.js +1 -1
  68. package/lib/environment/types.d.ts +1 -1
  69. package/lib/environment/types.js +1 -1
  70. package/lib/filter/filter_plugin.d.ts +1 -1
  71. package/lib/filter/filter_plugin.js +1 -1
  72. package/lib/filter/index.d.ts +1 -1
  73. package/lib/filter/index.js +2 -2
  74. package/lib/filter/order_pickles.d.ts +2 -2
  75. package/lib/filter/order_pickles.js +1 -1
  76. package/lib/filter/types.d.ts +1 -1
  77. package/lib/filter/types.js +1 -1
  78. package/lib/filter_stack_trace.d.ts +1 -1
  79. package/lib/filter_stack_trace.js +1 -1
  80. package/lib/formatter/builder.d.ts +8 -7
  81. package/lib/formatter/builder.js +6 -7
  82. package/lib/formatter/builtin/html.js +2 -2
  83. package/lib/formatter/builtin/index.d.ts +4 -4
  84. package/lib/formatter/builtin/index.js +14 -13
  85. package/lib/formatter/builtin/message.js +2 -2
  86. package/lib/formatter/builtin/pretty.d.ts +6 -0
  87. package/lib/formatter/builtin/pretty.js +19 -0
  88. package/lib/formatter/builtin/progress-bar.d.ts +6 -0
  89. package/lib/formatter/builtin/progress-bar.js +22 -0
  90. package/lib/formatter/builtin/progress.d.ts +6 -0
  91. package/lib/formatter/builtin/progress.js +18 -0
  92. package/lib/formatter/builtin/resolve_terminal_options.d.ts +3 -0
  93. package/lib/formatter/builtin/resolve_terminal_options.js +15 -0
  94. package/lib/formatter/builtin/summary.d.ts +6 -0
  95. package/lib/formatter/builtin/summary.js +15 -0
  96. package/lib/formatter/create_stream.d.ts +2 -2
  97. package/lib/formatter/create_stream.js +4 -7
  98. package/lib/formatter/find_class_or_plugin.js +1 -1
  99. package/lib/formatter/get_color_fns.d.ts +3 -3
  100. package/lib/formatter/get_color_fns.js +23 -52
  101. package/lib/formatter/helpers/duration_helpers.d.ts +1 -1
  102. package/lib/formatter/helpers/duration_helpers.js +1 -1
  103. package/lib/formatter/helpers/event_data_collector.d.ts +15 -15
  104. package/lib/formatter/helpers/event_data_collector.js +17 -44
  105. package/lib/formatter/helpers/formatters.d.ts +1 -1
  106. package/lib/formatter/helpers/formatters.js +1 -3
  107. package/lib/formatter/helpers/gherkin_document_parser.d.ts +5 -5
  108. package/lib/formatter/helpers/gherkin_document_parser.js +20 -18
  109. package/lib/formatter/helpers/index.d.ts +3 -3
  110. package/lib/formatter/helpers/index.js +8 -8
  111. package/lib/formatter/helpers/issue_helpers.d.ts +10 -10
  112. package/lib/formatter/helpers/issue_helpers.js +2 -2
  113. package/lib/formatter/helpers/keyword_type.js +2 -2
  114. package/lib/formatter/helpers/location_helpers.d.ts +1 -1
  115. package/lib/formatter/helpers/location_helpers.js +1 -1
  116. package/lib/formatter/helpers/pickle_parser.d.ts +10 -10
  117. package/lib/formatter/helpers/pickle_parser.js +8 -9
  118. package/lib/formatter/helpers/step_argument_formatter.d.ts +2 -2
  119. package/lib/formatter/helpers/step_argument_formatter.js +1 -1
  120. package/lib/formatter/helpers/summary_helpers.d.ts +4 -4
  121. package/lib/formatter/helpers/summary_helpers.js +19 -48
  122. package/lib/formatter/helpers/test_case_attempt_formatter.d.ts +4 -4
  123. package/lib/formatter/helpers/test_case_attempt_formatter.js +16 -49
  124. package/lib/formatter/helpers/test_case_attempt_parser.d.ts +9 -9
  125. package/lib/formatter/helpers/test_case_attempt_parser.js +12 -45
  126. package/lib/formatter/helpers/usage_helpers/index.d.ts +6 -6
  127. package/lib/formatter/helpers/usage_helpers/index.js +13 -49
  128. package/lib/formatter/import_code.js +2 -2
  129. package/lib/formatter/index.d.ts +25 -13
  130. package/lib/formatter/index.js +2 -2
  131. package/lib/formatter/json_formatter.d.ts +22 -22
  132. package/lib/formatter/json_formatter.js +11 -49
  133. package/lib/formatter/progress_formatter.d.ts +7 -3
  134. package/lib/formatter/progress_formatter.js +11 -41
  135. package/lib/formatter/rerun_formatter.d.ts +1 -1
  136. package/lib/formatter/rerun_formatter.js +4 -37
  137. package/lib/formatter/resolve_implementation.d.ts +1 -1
  138. package/lib/formatter/resolve_implementation.js +2 -2
  139. package/lib/formatter/snippets_formatter.d.ts +1 -1
  140. package/lib/formatter/snippets_formatter.js +4 -37
  141. package/lib/formatter/step_definition_snippet_builder/index.d.ts +6 -6
  142. package/lib/formatter/step_definition_snippet_builder/index.js +3 -3
  143. package/lib/formatter/step_definition_snippet_builder/javascript_snippet_syntax.d.ts +1 -1
  144. package/lib/formatter/step_definition_snippet_builder/javascript_snippet_syntax.js +3 -5
  145. package/lib/formatter/step_definition_snippet_builder/snippet_syntax.d.ts +1 -1
  146. package/lib/formatter/step_definition_snippet_builder/snippet_syntax.js +1 -1
  147. package/lib/formatter/summary_formatter.d.ts +7 -4
  148. package/lib/formatter/summary_formatter.js +6 -3
  149. package/lib/formatter/usage_formatter.d.ts +1 -1
  150. package/lib/formatter/usage_formatter.js +6 -39
  151. package/lib/formatter/usage_json_formatter.d.ts +1 -1
  152. package/lib/formatter/usage_json_formatter.js +3 -3
  153. package/lib/index.d.ts +9 -14
  154. package/lib/index.js +17 -25
  155. package/lib/models/data_table.d.ts +2 -2
  156. package/lib/models/data_table.js +9 -5
  157. package/lib/models/definition.d.ts +5 -5
  158. package/lib/models/definition.js +1 -1
  159. package/lib/models/gherkin_step_keyword.js +1 -1
  160. package/lib/models/step_definition.d.ts +3 -3
  161. package/lib/models/step_definition.js +1 -1
  162. package/lib/models/test_case_hook_definition.d.ts +3 -3
  163. package/lib/models/test_case_hook_definition.js +1 -1
  164. package/lib/models/test_run_hook_definition.d.ts +1 -1
  165. package/lib/models/test_run_hook_definition.js +1 -1
  166. package/lib/models/test_step_hook_definition.d.ts +3 -3
  167. package/lib/models/test_step_hook_definition.js +1 -1
  168. package/lib/paths/index.js +1 -1
  169. package/lib/paths/paths.d.ts +3 -3
  170. package/lib/paths/paths.js +42 -18
  171. package/lib/paths/types.js +1 -1
  172. package/lib/pickle_filter.d.ts +9 -8
  173. package/lib/pickle_filter.js +3 -3
  174. package/lib/plugin/index.d.ts +1 -1
  175. package/lib/plugin/index.js +2 -2
  176. package/lib/plugin/plugin_manager.d.ts +2 -2
  177. package/lib/plugin/plugin_manager.js +1 -1
  178. package/lib/plugin/types.d.ts +59 -9
  179. package/lib/plugin/types.js +1 -1
  180. package/lib/publish/index.js +1 -1
  181. package/lib/publish/publish_plugin.d.ts +1 -1
  182. package/lib/publish/publish_plugin.js +14 -15
  183. package/lib/publish/types.js +1 -1
  184. package/lib/runtime/attachment_manager/index.d.ts +3 -3
  185. package/lib/runtime/attachment_manager/index.js +12 -48
  186. package/lib/runtime/coordinator.d.ts +16 -8
  187. package/lib/runtime/coordinator.js +38 -19
  188. package/lib/runtime/format_error.d.ts +1 -1
  189. package/lib/runtime/format_error.js +43 -15
  190. package/lib/runtime/helpers.d.ts +5 -5
  191. package/lib/runtime/helpers.js +6 -39
  192. package/lib/runtime/index.js +1 -1
  193. package/lib/runtime/make_runtime.d.ts +10 -9
  194. package/lib/runtime/make_runtime.js +5 -6
  195. package/lib/runtime/make_suggestion.d.ts +2 -2
  196. package/lib/runtime/make_suggestion.js +1 -1
  197. package/lib/runtime/parallel/adapter.d.ts +30 -39
  198. package/lib/runtime/parallel/adapter.js +134 -120
  199. package/lib/runtime/parallel/test_cases_phase.d.ts +19 -0
  200. package/lib/runtime/parallel/test_cases_phase.js +63 -0
  201. package/lib/runtime/parallel/test_run_hooks_phase.d.ts +11 -0
  202. package/lib/runtime/parallel/test_run_hooks_phase.js +33 -0
  203. package/lib/runtime/parallel/types.d.ts +38 -22
  204. package/lib/runtime/parallel/types.js +1 -1
  205. package/lib/runtime/parallel/worker.mjs +65 -0
  206. package/lib/runtime/scope/index.js +1 -1
  207. package/lib/runtime/scope/make_proxy.js +1 -1
  208. package/lib/runtime/scope/test_case_scope.d.ts +1 -1
  209. package/lib/runtime/scope/test_case_scope.js +1 -1
  210. package/lib/runtime/scope/test_run_scope.d.ts +1 -1
  211. package/lib/runtime/scope/test_run_scope.js +1 -1
  212. package/lib/runtime/serial/adapter.d.ts +15 -9
  213. package/lib/runtime/serial/adapter.js +21 -9
  214. package/lib/runtime/step_runner.d.ts +5 -5
  215. package/lib/runtime/step_runner.js +7 -40
  216. package/lib/runtime/stopwatch.d.ts +2 -2
  217. package/lib/runtime/stopwatch.js +1 -1
  218. package/lib/runtime/test_case_runner.d.ts +20 -20
  219. package/lib/runtime/test_case_runner.js +31 -60
  220. package/lib/runtime/types.d.ts +13 -4
  221. package/lib/runtime/types.js +1 -1
  222. package/lib/runtime/worker.d.ts +14 -13
  223. package/lib/runtime/worker.js +26 -44
  224. package/lib/sharding/index.js +1 -1
  225. package/lib/sharding/sharding_plugin.d.ts +1 -1
  226. package/lib/sharding/sharding_plugin.js +1 -1
  227. package/lib/step_arguments.d.ts +4 -4
  228. package/lib/step_arguments.js +1 -1
  229. package/lib/support_code_library_builder/build_parameter_type.d.ts +1 -1
  230. package/lib/support_code_library_builder/build_parameter_type.js +5 -3
  231. package/lib/support_code_library_builder/context.js +1 -1
  232. package/lib/support_code_library_builder/get_definition_line_and_uri.d.ts +1 -1
  233. package/lib/support_code_library_builder/get_definition_line_and_uri.js +1 -1
  234. package/lib/support_code_library_builder/index.d.ts +7 -8
  235. package/lib/support_code_library_builder/index.js +9 -9
  236. package/lib/support_code_library_builder/parallel_can_assign_helpers.d.ts +1 -1
  237. package/lib/support_code_library_builder/parallel_can_assign_helpers.js +3 -4
  238. package/lib/support_code_library_builder/sourced_parameter_type_registry.d.ts +2 -2
  239. package/lib/support_code_library_builder/sourced_parameter_type_registry.js +1 -1
  240. package/lib/support_code_library_builder/types.d.ts +17 -17
  241. package/lib/support_code_library_builder/types.js +1 -1
  242. package/lib/support_code_library_builder/validate_arguments.d.ts +1 -1
  243. package/lib/support_code_library_builder/validate_arguments.js +1 -1
  244. package/lib/support_code_library_builder/world.d.ts +2 -2
  245. package/lib/support_code_library_builder/world.js +2 -2
  246. package/lib/time.d.ts +2 -2
  247. package/lib/time.js +6 -39
  248. package/lib/try_require.js +3 -2
  249. package/lib/types/index.js +1 -1
  250. package/lib/uncaught_exception_manager.js +1 -1
  251. package/lib/user_code_runner.d.ts +1 -1
  252. package/lib/user_code_runner.js +3 -3
  253. package/lib/value_checker.js +1 -1
  254. package/lib/version.d.ts +1 -1
  255. package/lib/version.js +3 -3
  256. package/lib/wrapper.d.mts +43 -0
  257. package/lib/wrapper.mjs +37 -45
  258. package/package.json +50 -75
  259. package/lib/api/convert_configuration.js.map +0 -1
  260. package/lib/api/emit_support_code_messages.js.map +0 -1
  261. package/lib/api/formatters.js.map +0 -1
  262. package/lib/api/gherkin.js.map +0 -1
  263. package/lib/api/index.js.map +0 -1
  264. package/lib/api/load_configuration.js.map +0 -1
  265. package/lib/api/load_sources.js.map +0 -1
  266. package/lib/api/load_support.js.map +0 -1
  267. package/lib/api/plugins.js.map +0 -1
  268. package/lib/api/run_cucumber.js.map +0 -1
  269. package/lib/api/support.js.map +0 -1
  270. package/lib/api/test_helpers.js.map +0 -1
  271. package/lib/api/types.js.map +0 -1
  272. package/lib/assemble/assemble_test_cases.js.map +0 -1
  273. package/lib/assemble/index.js.map +0 -1
  274. package/lib/assemble/types.js.map +0 -1
  275. package/lib/cli/i18n.js.map +0 -1
  276. package/lib/cli/index.js.map +0 -1
  277. package/lib/cli/install_validator.js.map +0 -1
  278. package/lib/cli/run.js.map +0 -1
  279. package/lib/cli/validate_node_engine_version.js.map +0 -1
  280. package/lib/configuration/argv_parser.js.map +0 -1
  281. package/lib/configuration/check_schema.js.map +0 -1
  282. package/lib/configuration/default_configuration.js.map +0 -1
  283. package/lib/configuration/from_file.js.map +0 -1
  284. package/lib/configuration/helpers.js.map +0 -1
  285. package/lib/configuration/index.js.map +0 -1
  286. package/lib/configuration/locate_file.js.map +0 -1
  287. package/lib/configuration/merge_configurations.js.map +0 -1
  288. package/lib/configuration/parse_configuration.js.map +0 -1
  289. package/lib/configuration/split_format_descriptor.js.map +0 -1
  290. package/lib/configuration/types.js.map +0 -1
  291. package/lib/configuration/validate_configuration.js.map +0 -1
  292. package/lib/environment/console_logger.js.map +0 -1
  293. package/lib/environment/index.js.map +0 -1
  294. package/lib/environment/make_environment.js.map +0 -1
  295. package/lib/environment/types.js.map +0 -1
  296. package/lib/filter/filter_plugin.js.map +0 -1
  297. package/lib/filter/index.js.map +0 -1
  298. package/lib/filter/order_pickles.js.map +0 -1
  299. package/lib/filter/types.js.map +0 -1
  300. package/lib/filter_stack_trace.js.map +0 -1
  301. package/lib/formatter/builder.js.map +0 -1
  302. package/lib/formatter/builtin/html.js.map +0 -1
  303. package/lib/formatter/builtin/index.js.map +0 -1
  304. package/lib/formatter/builtin/message.js.map +0 -1
  305. package/lib/formatter/create_stream.js.map +0 -1
  306. package/lib/formatter/find_class_or_plugin.js.map +0 -1
  307. package/lib/formatter/get_color_fns.js.map +0 -1
  308. package/lib/formatter/helpers/duration_helpers.js.map +0 -1
  309. package/lib/formatter/helpers/event_data_collector.js.map +0 -1
  310. package/lib/formatter/helpers/formatters.js.map +0 -1
  311. package/lib/formatter/helpers/gherkin_document_parser.js.map +0 -1
  312. package/lib/formatter/helpers/index.js.map +0 -1
  313. package/lib/formatter/helpers/issue_helpers.js.map +0 -1
  314. package/lib/formatter/helpers/keyword_type.js.map +0 -1
  315. package/lib/formatter/helpers/location_helpers.js.map +0 -1
  316. package/lib/formatter/helpers/pickle_parser.js.map +0 -1
  317. package/lib/formatter/helpers/step_argument_formatter.js.map +0 -1
  318. package/lib/formatter/helpers/summary_helpers.js.map +0 -1
  319. package/lib/formatter/helpers/test_case_attempt_formatter.js.map +0 -1
  320. package/lib/formatter/helpers/test_case_attempt_parser.js.map +0 -1
  321. package/lib/formatter/helpers/usage_helpers/index.js.map +0 -1
  322. package/lib/formatter/import_code.js.map +0 -1
  323. package/lib/formatter/index.js.map +0 -1
  324. package/lib/formatter/json_formatter.js.map +0 -1
  325. package/lib/formatter/progress_bar_formatter.d.ts +0 -18
  326. package/lib/formatter/progress_bar_formatter.js +0 -103
  327. package/lib/formatter/progress_bar_formatter.js.map +0 -1
  328. package/lib/formatter/progress_formatter.js.map +0 -1
  329. package/lib/formatter/rerun_formatter.js.map +0 -1
  330. package/lib/formatter/resolve_implementation.js.map +0 -1
  331. package/lib/formatter/snippets_formatter.js.map +0 -1
  332. package/lib/formatter/step_definition_snippet_builder/index.js.map +0 -1
  333. package/lib/formatter/step_definition_snippet_builder/javascript_snippet_syntax.js.map +0 -1
  334. package/lib/formatter/step_definition_snippet_builder/snippet_syntax.js.map +0 -1
  335. package/lib/formatter/summary_formatter.js.map +0 -1
  336. package/lib/formatter/usage_formatter.js.map +0 -1
  337. package/lib/formatter/usage_json_formatter.js.map +0 -1
  338. package/lib/index.js.map +0 -1
  339. package/lib/models/data_table.js.map +0 -1
  340. package/lib/models/definition.js.map +0 -1
  341. package/lib/models/gherkin_step_keyword.js.map +0 -1
  342. package/lib/models/step_definition.js.map +0 -1
  343. package/lib/models/test_case_hook_definition.js.map +0 -1
  344. package/lib/models/test_run_hook_definition.js.map +0 -1
  345. package/lib/models/test_step_hook_definition.js.map +0 -1
  346. package/lib/paths/index.js.map +0 -1
  347. package/lib/paths/paths.js.map +0 -1
  348. package/lib/paths/types.js.map +0 -1
  349. package/lib/pickle_filter.js.map +0 -1
  350. package/lib/plugin/index.js.map +0 -1
  351. package/lib/plugin/plugin_manager.js.map +0 -1
  352. package/lib/plugin/types.js.map +0 -1
  353. package/lib/publish/index.js.map +0 -1
  354. package/lib/publish/publish_plugin.js.map +0 -1
  355. package/lib/publish/types.js.map +0 -1
  356. package/lib/runtime/attachment_manager/index.js.map +0 -1
  357. package/lib/runtime/coordinator.js.map +0 -1
  358. package/lib/runtime/format_error.js.map +0 -1
  359. package/lib/runtime/helpers.js.map +0 -1
  360. package/lib/runtime/index.js.map +0 -1
  361. package/lib/runtime/make_runtime.js.map +0 -1
  362. package/lib/runtime/make_suggestion.js.map +0 -1
  363. package/lib/runtime/parallel/adapter.js.map +0 -1
  364. package/lib/runtime/parallel/run_worker.js +0 -25
  365. package/lib/runtime/parallel/run_worker.js.map +0 -1
  366. package/lib/runtime/parallel/types.js.map +0 -1
  367. package/lib/runtime/parallel/worker.d.ts +0 -25
  368. package/lib/runtime/parallel/worker.js +0 -83
  369. package/lib/runtime/parallel/worker.js.map +0 -1
  370. package/lib/runtime/scope/index.js.map +0 -1
  371. package/lib/runtime/scope/make_proxy.js.map +0 -1
  372. package/lib/runtime/scope/test_case_scope.js.map +0 -1
  373. package/lib/runtime/scope/test_run_scope.js.map +0 -1
  374. package/lib/runtime/serial/adapter.js.map +0 -1
  375. package/lib/runtime/step_runner.js.map +0 -1
  376. package/lib/runtime/stopwatch.js.map +0 -1
  377. package/lib/runtime/test_case_runner.js.map +0 -1
  378. package/lib/runtime/types.js.map +0 -1
  379. package/lib/runtime/worker.js.map +0 -1
  380. package/lib/sharding/index.js.map +0 -1
  381. package/lib/sharding/sharding_plugin.js.map +0 -1
  382. package/lib/step_arguments.js.map +0 -1
  383. package/lib/support_code_library_builder/build_parameter_type.js.map +0 -1
  384. package/lib/support_code_library_builder/context.js.map +0 -1
  385. package/lib/support_code_library_builder/get_definition_line_and_uri.js.map +0 -1
  386. package/lib/support_code_library_builder/index.js.map +0 -1
  387. package/lib/support_code_library_builder/parallel_can_assign_helpers.js.map +0 -1
  388. package/lib/support_code_library_builder/sourced_parameter_type_registry.js.map +0 -1
  389. package/lib/support_code_library_builder/types.js.map +0 -1
  390. package/lib/support_code_library_builder/validate_arguments.js.map +0 -1
  391. package/lib/support_code_library_builder/world.js.map +0 -1
  392. package/lib/time.js.map +0 -1
  393. package/lib/try_require.js.map +0 -1
  394. package/lib/tsconfig.node.tsbuildinfo +0 -1
  395. package/lib/types/index.js.map +0 -1
  396. package/lib/uncaught_exception_manager.js.map +0 -1
  397. package/lib/user_code_runner.js.map +0 -1
  398. package/lib/value_checker.js.map +0 -1
  399. package/lib/version.js.map +0 -1
  400. /package/lib/runtime/parallel/{run_worker.d.ts → worker.d.mts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/support_code_library_builder/index.ts"],"names":[],"mappings":";;;;;;AAEA,4DAA8B;AAC9B,yEAGuC;AACvC,oGAAwE;AACxE,oGAAwE;AACxE,kGAE2C;AAC3C,gFAAsD;AACtD,kDAAqD;AACrD,oDAAgD;AAEhD,8EAAoD;AAkBpD,oDAA2B;AAC3B,+EAAuE;AACvE,iEAA2D;AAC3D,uFAAgF;AAsChF,MAAa,yBAAyB;IACpB,OAAO,CAA2B;IAC1C,mBAAmB,CAAyB;IAC5C,kCAAkC,CAAiC;IACnE,iCAAiC,CAAgC;IACjE,kCAAkC,CAAiC;IACnE,mCAAmC,CAAiC;IACpE,kCAAkC,CAAgC;IAClE,mCAAmC,CAAiC;IACpE,GAAG,CAAQ;IACX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KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;SAC1C,CAAA;IACH,CAAC;IAED,KAAK,CACH,GAAW,EACX,KAAwB,EACxB,sBAA+C;QAC7C,cAAc,EAAE,EAAE;QAClB,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,EAAE;QACf,OAAO,EAAE,EAAE;KACZ;QAED,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAA;QAC9C,IAAI,CAAC,kCAAkC,GAAG,EAAE,CAAA;QAC5C,IAAI,CAAC,iCAAiC,GAAG,EAAE,CAAA;QAC3C,IAAI,CAAC,kCAAkC,GAAG,EAAE,CAAA;QAC5C,IAAI,CAAC,mCAAmC,GAAG,EAAE,CAAA;QAC7C,IAAI,CAAC,kCAAkC,GAAG,EAAE,CAAA;QAC5C,IAAI,CAAC,mCAAmC,GAAG,EAAE,CAAA;QAC7C,IAAI,CAAC,yBAAyB,GAAG,IAAI,CAAA;QACrC,IAAI,CAAC,eAAe,GAAG,CAAC,CAAA;QACxB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAA;QAC1B,IAAI,CAAC,qBAAqB,GAAG,IAAI,8DAA4B,EAAE,CAAA;QAC/D,IAAI,CAAC,qBAAqB,GAAG,EAAE,CAAA;QAC/B,IAAI,CAAC,iBAAiB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAA;QACnC,IAAI,CAAC,KAAK,GAAG,eAAK,CAAA;QAClB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;CACF;AA5aD,8DA4aC;AAED,kBAAe,IAAI,yBAAyB,EAAE,CAAA","sourcesContent":["import { IdGenerator } from '@cucumber/messages'\nimport * as messages from '@cucumber/messages'\nimport arity from 'util-arity'\nimport {\n CucumberExpression,\n RegularExpression,\n} from '@cucumber/cucumber-expressions'\nimport TestCaseHookDefinition from '../models/test_case_hook_definition'\nimport TestStepHookDefinition from '../models/test_step_hook_definition'\nimport TestRunHookDefinition, {\n ITestRunHookDefinitionOptions,\n} from '../models/test_run_hook_definition'\nimport StepDefinition from '../models/step_definition'\nimport { formatLocation } from '../formatter/helpers'\nimport { doesHaveValue } from '../value_checker'\nimport { GherkinStepKeyword } from '../models/gherkin_step_keyword'\nimport validateArguments from './validate_arguments'\n\nimport {\n DefineStepPattern,\n IDefineStepOptions,\n IDefineSupportCodeMethods,\n IDefineTestCaseHookOptions,\n IDefineTestStepHookOptions,\n IDefineTestRunHookOptions,\n IParameterTypeDefinition,\n SupportCodeLibrary,\n TestCaseHookFunction,\n TestStepHookFunction,\n ParallelAssignmentValidator,\n ISupportCodeCoordinates,\n IDefineStep,\n CanonicalSupportCodeIds,\n} from './types'\nimport World from './world'\nimport { getDefinitionLineAndUri } from './get_definition_line_and_uri'\nimport { buildParameterType } from './build_parameter_type'\nimport { SourcedParameterTypeRegistry } from './sourced_parameter_type_registry'\n\ninterface IStepDefinitionConfig {\n code: Function\n line: number\n options: any\n order: number\n keyword: GherkinStepKeyword\n pattern: string | RegExp\n uri: string\n}\n\ninterface ITestCaseHookDefinitionConfig {\n code: any\n line: number\n options: any\n order: number\n uri: string\n}\n\ninterface ITestStepHookDefinitionConfig {\n code: Function\n line: number\n options: any\n order: number\n uri: string\n}\n\ninterface ITestRunHookDefinitionConfig {\n code: Function\n line: number\n options: any\n order: number\n uri: string\n}\n\ntype LibraryStatus = 'PENDING' | 'OPEN' | 'FINALIZED'\n\nexport class SupportCodeLibraryBuilder {\n public readonly methods: IDefineSupportCodeMethods\n private originalCoordinates: ISupportCodeCoordinates\n private afterTestCaseHookDefinitionConfigs: ITestCaseHookDefinitionConfig[]\n private afterTestRunHookDefinitionConfigs: ITestRunHookDefinitionConfig[]\n private afterTestStepHookDefinitionConfigs: ITestStepHookDefinitionConfig[]\n private beforeTestCaseHookDefinitionConfigs: ITestCaseHookDefinitionConfig[]\n private beforeTestRunHookDefinitionConfigs: ITestRunHookDefinitionConfig[]\n private beforeTestStepHookDefinitionConfigs: ITestStepHookDefinitionConfig[]\n private cwd: string\n private defaultTimeout: number\n private definitionFunctionWrapper: any\n private definitionOrder: number\n private newId: IdGenerator.NewId\n private parameterTypeRegistry: SourcedParameterTypeRegistry\n private stepDefinitionConfigs: IStepDefinitionConfig[]\n private World: any\n private parallelCanAssign: ParallelAssignmentValidator\n private status: LibraryStatus = 'PENDING'\n\n constructor() {\n const methods: IDefineSupportCodeMethods = {\n After: this.defineTestCaseHook(\n () => this.afterTestCaseHookDefinitionConfigs\n ),\n AfterAll: this.defineTestRunHook(\n () => this.afterTestRunHookDefinitionConfigs\n ),\n AfterStep: this.defineTestStepHook(\n () => this.afterTestStepHookDefinitionConfigs\n ),\n Before: this.defineTestCaseHook(\n () => this.beforeTestCaseHookDefinitionConfigs\n ),\n BeforeAll: this.defineTestRunHook(\n () => this.beforeTestRunHookDefinitionConfigs\n ),\n BeforeStep: this.defineTestStepHook(\n () => this.beforeTestStepHookDefinitionConfigs\n ),\n defineParameterType: this.defineParameterType.bind(this),\n defineStep: this.defineStep('Unknown', () => this.stepDefinitionConfigs),\n Given: this.defineStep('Given', () => this.stepDefinitionConfigs),\n setDefaultTimeout: (milliseconds) => {\n this.defaultTimeout = milliseconds\n },\n setDefinitionFunctionWrapper: (fn) => {\n this.definitionFunctionWrapper = fn\n },\n setWorldConstructor: (fn) => {\n this.World = fn\n },\n setParallelCanAssign: (fn: ParallelAssignmentValidator): void => {\n this.parallelCanAssign = fn\n },\n Then: this.defineStep('Then', () => this.stepDefinitionConfigs),\n When: this.defineStep('When', () => this.stepDefinitionConfigs),\n }\n const checkInstall = (method: string) => {\n if (this.status === 'PENDING') {\n throw new Error(\n `\n You're calling functions (e.g. \"${method}\") on an instance of Cucumber that isn't running (status: ${this.status}).\n This means you may have an invalid installation, potentially due to:\n - Cucumber being installed globally\n - A project structure where your support code is depending on a different instance of Cucumber\n Either way, you'll need to address this in order for Cucumber to work.\n See https://github.com/cucumber/cucumber-js/blob/main/docs/installation.md#invalid-installations\n `\n )\n }\n }\n this.methods = new Proxy(methods, {\n get(\n target: IDefineSupportCodeMethods,\n method: keyof IDefineSupportCodeMethods\n ): any {\n return (...args: any[]) => {\n checkInstall(method)\n // @ts-expect-error difficult to type this correctly\n return target[method](...args)\n }\n },\n })\n }\n\n defineParameterType(options: IParameterTypeDefinition<any>): void {\n const parameterType = buildParameterType(options)\n const source = getDefinitionLineAndUri(this.cwd)\n this.parameterTypeRegistry.defineSourcedParameterType(\n parameterType,\n source,\n this.definitionOrder++\n )\n }\n\n defineStep(\n keyword: GherkinStepKeyword,\n getCollection: () => IStepDefinitionConfig[]\n ): IDefineStep {\n return (\n pattern: DefineStepPattern,\n options: IDefineStepOptions | Function,\n code?: Function\n ) => {\n if (typeof options === 'function') {\n code = options\n options = {}\n }\n const { line, uri } = getDefinitionLineAndUri(this.cwd)\n validateArguments({\n args: { code, pattern, options },\n fnName: 'defineStep',\n location: formatLocation({ line, uri }),\n })\n getCollection().push({\n code,\n line,\n options,\n order: this.definitionOrder++,\n keyword,\n pattern,\n uri,\n })\n }\n }\n\n defineTestCaseHook(\n getCollection: () => ITestCaseHookDefinitionConfig[]\n ): <WorldType>(\n options:\n | string\n | IDefineTestCaseHookOptions\n | TestCaseHookFunction<WorldType>,\n code?: TestCaseHookFunction<WorldType>\n ) => void {\n return <WorldType>(\n options:\n | string\n | IDefineTestCaseHookOptions\n | TestCaseHookFunction<WorldType>,\n code?: TestCaseHookFunction<WorldType>\n ) => {\n if (typeof options === 'string') {\n options = { tags: options }\n } else if (typeof options === 'function') {\n code = options\n options = {}\n }\n const { line, uri } = getDefinitionLineAndUri(this.cwd)\n validateArguments({\n args: { code, options },\n fnName: 'defineTestCaseHook',\n location: formatLocation({ line, uri }),\n })\n getCollection().push({\n code,\n line,\n options,\n order: this.definitionOrder++,\n uri,\n })\n }\n }\n\n defineTestStepHook(\n getCollection: () => ITestStepHookDefinitionConfig[]\n ): <WorldType>(\n options:\n | string\n | IDefineTestStepHookOptions\n | TestStepHookFunction<WorldType>,\n code?: TestStepHookFunction<WorldType>\n ) => void {\n return <WorldType>(\n options:\n | string\n | IDefineTestStepHookOptions\n | TestStepHookFunction<WorldType>,\n code?: TestStepHookFunction<WorldType>\n ) => {\n if (typeof options === 'string') {\n options = { tags: options }\n } else if (typeof options === 'function') {\n code = options\n options = {}\n }\n const { line, uri } = getDefinitionLineAndUri(this.cwd)\n validateArguments({\n args: { code, options },\n fnName: 'defineTestStepHook',\n location: formatLocation({ line, uri }),\n })\n getCollection().push({\n code,\n line,\n options,\n order: this.definitionOrder++,\n uri,\n })\n }\n }\n\n defineTestRunHook(\n getCollection: () => ITestRunHookDefinitionConfig[]\n ): (options: IDefineTestRunHookOptions | Function, code?: Function) => void {\n return (options: IDefineTestRunHookOptions | Function, code?: Function) => {\n if (typeof options === 'function') {\n code = options\n options = {}\n }\n const { line, uri } = getDefinitionLineAndUri(this.cwd)\n validateArguments({\n args: { code, options },\n fnName: 'defineTestRunHook',\n location: formatLocation({ line, uri }),\n })\n getCollection().push({\n code,\n line,\n options,\n order: this.definitionOrder++,\n uri,\n })\n }\n }\n\n wrapCode({\n code,\n wrapperOptions,\n }: {\n code: Function\n wrapperOptions: any\n }): Function {\n if (doesHaveValue(this.definitionFunctionWrapper)) {\n const codeLength = code.length\n const wrappedCode = this.definitionFunctionWrapper(code, wrapperOptions)\n if (wrappedCode !== code) {\n return arity(codeLength, wrappedCode)\n }\n return wrappedCode\n }\n return code\n }\n\n buildTestCaseHookDefinitions(\n configs: ITestCaseHookDefinitionConfig[],\n canonicalIds?: string[]\n ): TestCaseHookDefinition[] {\n return configs.map(({ code, line, options, order, uri }, index) => {\n const wrappedCode = this.wrapCode({\n code,\n wrapperOptions: options.wrapperOptions,\n })\n return new TestCaseHookDefinition({\n code: wrappedCode,\n id: canonicalIds ? canonicalIds[index] : this.newId(),\n line,\n options,\n order,\n unwrappedCode: code,\n uri,\n })\n })\n }\n\n buildTestStepHookDefinitions(\n configs: ITestStepHookDefinitionConfig[]\n ): TestStepHookDefinition[] {\n return configs.map(({ code, line, options, order, uri }) => {\n const wrappedCode = this.wrapCode({\n code,\n wrapperOptions: options.wrapperOptions,\n })\n return new TestStepHookDefinition({\n code: wrappedCode,\n id: this.newId(),\n line,\n options,\n order,\n unwrappedCode: code,\n uri,\n })\n })\n }\n\n buildTestRunHookDefinitions(\n configs: ITestRunHookDefinitionConfig[],\n canonicalIds?: string[]\n ): TestRunHookDefinition[] {\n return configs.map(({ code, line, options, order, uri }, index) => {\n const wrappedCode = this.wrapCode({\n code,\n wrapperOptions: options.wrapperOptions,\n })\n return new TestRunHookDefinition({\n code: wrappedCode,\n id: canonicalIds ? canonicalIds[index] : this.newId(),\n line,\n options: options as ITestRunHookDefinitionOptions,\n order,\n unwrappedCode: code,\n uri,\n })\n })\n }\n\n buildStepDefinitions(canonicalIds?: string[]): {\n stepDefinitions: StepDefinition[]\n undefinedParameterTypes: messages.UndefinedParameterType[]\n } {\n const stepDefinitions: StepDefinition[] = []\n const undefinedParameterTypes: messages.UndefinedParameterType[] = []\n this.stepDefinitionConfigs.forEach(\n ({ code, line, options, order, keyword, pattern, uri }, index) => {\n let expression\n if (typeof pattern === 'string') {\n try {\n expression = new CucumberExpression(\n pattern,\n this.parameterTypeRegistry\n )\n } catch (e) {\n if (doesHaveValue(e.undefinedParameterTypeName)) {\n undefinedParameterTypes.push({\n name: e.undefinedParameterTypeName,\n expression: pattern,\n })\n return\n }\n throw e\n }\n } else {\n expression = new RegularExpression(\n pattern,\n this.parameterTypeRegistry\n )\n }\n\n const wrappedCode = this.wrapCode({\n code,\n wrapperOptions: options.wrapperOptions,\n })\n stepDefinitions.push(\n new StepDefinition({\n code: wrappedCode,\n expression,\n id: canonicalIds ? canonicalIds[index] : this.newId(),\n line,\n options,\n order,\n keyword,\n pattern,\n unwrappedCode: code,\n uri,\n })\n )\n }\n )\n return { stepDefinitions, undefinedParameterTypes }\n }\n\n finalize(canonicalIds?: CanonicalSupportCodeIds): SupportCodeLibrary {\n this.status = 'FINALIZED'\n const stepDefinitionsResult = this.buildStepDefinitions(\n canonicalIds?.stepDefinitionIds\n )\n return {\n originalCoordinates: this.originalCoordinates,\n afterTestCaseHookDefinitions: this.buildTestCaseHookDefinitions(\n this.afterTestCaseHookDefinitionConfigs,\n canonicalIds?.afterTestCaseHookDefinitionIds\n ),\n afterTestRunHookDefinitions: this.buildTestRunHookDefinitions(\n this.afterTestRunHookDefinitionConfigs,\n canonicalIds?.afterTestRunHookDefinitionIds\n ),\n afterTestStepHookDefinitions: this.buildTestStepHookDefinitions(\n this.afterTestStepHookDefinitionConfigs\n ),\n beforeTestCaseHookDefinitions: this.buildTestCaseHookDefinitions(\n this.beforeTestCaseHookDefinitionConfigs,\n canonicalIds?.beforeTestCaseHookDefinitionIds\n ),\n beforeTestRunHookDefinitions: this.buildTestRunHookDefinitions(\n this.beforeTestRunHookDefinitionConfigs,\n canonicalIds?.beforeTestRunHookDefinitionIds\n ),\n beforeTestStepHookDefinitions: this.buildTestStepHookDefinitions(\n this.beforeTestStepHookDefinitionConfigs\n ),\n defaultTimeout: this.defaultTimeout,\n parameterTypeRegistry: this.parameterTypeRegistry,\n undefinedParameterTypes: stepDefinitionsResult.undefinedParameterTypes,\n stepDefinitions: stepDefinitionsResult.stepDefinitions,\n World: this.World,\n parallelCanAssign: this.parallelCanAssign,\n }\n }\n\n reset(\n cwd: string,\n newId: IdGenerator.NewId,\n originalCoordinates: ISupportCodeCoordinates = {\n requireModules: [],\n requirePaths: [],\n importPaths: [],\n loaders: [],\n }\n ): void {\n this.cwd = cwd\n this.newId = newId\n this.originalCoordinates = originalCoordinates\n this.afterTestCaseHookDefinitionConfigs = []\n this.afterTestRunHookDefinitionConfigs = []\n this.afterTestStepHookDefinitionConfigs = []\n this.beforeTestCaseHookDefinitionConfigs = []\n this.beforeTestRunHookDefinitionConfigs = []\n this.beforeTestStepHookDefinitionConfigs = []\n this.definitionFunctionWrapper = null\n this.definitionOrder = 0\n this.defaultTimeout = 5000\n this.parameterTypeRegistry = new SourcedParameterTypeRegistry()\n this.stepDefinitionConfigs = []\n this.parallelCanAssign = () => true\n this.World = World\n this.status = 'OPEN'\n }\n}\n\nexport default new SupportCodeLibraryBuilder()\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"parallel_can_assign_helpers.js","sourceRoot":"","sources":["../../src/support_code_library_builder/parallel_can_assign_helpers.ts"],"names":[],"mappings":";;AAOA,sDAWC;AAfD,SAAS,MAAM,CAAC,MAAuB,EAAE,OAAe;IACtD,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,OAAO,CAAC,CAAA;AACnD,CAAC;AAED,SAAgB,qBAAqB,CACnC,QAAkB;IAElB,OAAO,CAAC,UAA2B,EAAE,UAA6B,EAAE,EAAE;QACpE,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE;YAChC,OAAO,CACL,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC;gBAC5B,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAC7C,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;AACH,CAAC","sourcesContent":["import * as messages from '@cucumber/messages'\nimport { ParallelAssignmentValidator } from './types'\n\nfunction hasTag(pickle: messages.Pickle, tagName: string): boolean {\n return pickle.tags.some((t) => t.name == tagName)\n}\n\nexport function atMostOnePicklePerTag(\n tagNames: string[]\n): ParallelAssignmentValidator {\n return (inQuestion: messages.Pickle, inProgress: messages.Pickle[]) => {\n return tagNames.every((tagName) => {\n return (\n !hasTag(inQuestion, tagName) ||\n inProgress.every((p) => !hasTag(p, tagName))\n )\n })\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sourced_parameter_type_registry.js","sourceRoot":"","sources":["../../src/support_code_library_builder/sourced_parameter_type_registry.ts"],"names":[],"mappings":";;;AAAA,yEAGuC;AAGvC,MAAa,4BAA6B,SAAQ,4CAAqB;IAC7D,qBAAqB,GAGzB,IAAI,OAAO,EAAE,CAAA;IAEjB,0BAA0B,CACxB,aAAqC,EACrC,MAAmB,EACnB,KAAa;QAEb,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAA;QACvC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC,CAAA;IACrE,CAAC;IAED,YAAY,CAAC,aAAqC;QAChD,OAAO,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;IACtD,CAAC;CACF;AAlBD,oEAkBC","sourcesContent":["import {\n ParameterType,\n ParameterTypeRegistry,\n} from '@cucumber/cucumber-expressions'\nimport { ILineAndUri } from '../types'\n\nexport class SourcedParameterTypeRegistry extends ParameterTypeRegistry {\n private parameterTypeToSource: WeakMap<\n ParameterType<unknown>,\n ILineAndUri & { order: number }\n > = new WeakMap()\n\n defineSourcedParameterType(\n parameterType: ParameterType<unknown>,\n source: ILineAndUri,\n order: number\n ) {\n this.defineParameterType(parameterType)\n this.parameterTypeToSource.set(parameterType, { ...source, order })\n }\n\n lookupSource(parameterType: ParameterType<unknown>) {\n return this.parameterTypeToSource.get(parameterType)\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/support_code_library_builder/types.ts"],"names":[],"mappings":"","sourcesContent":["import * as messages from '@cucumber/messages'\nimport { JsonObject } from 'type-fest'\nimport TestCaseHookDefinition from '../models/test_case_hook_definition'\nimport TestStepHookDefinition from '../models/test_step_hook_definition'\nimport TestRunHookDefinition from '../models/test_run_hook_definition'\nimport StepDefinition from '../models/step_definition'\nimport { IWorld } from './world'\nimport { SourcedParameterTypeRegistry } from './sourced_parameter_type_registry'\n\nexport type DefineStepPattern = string | RegExp\nexport type ParallelAssignmentValidator = (\n pickle: messages.Pickle,\n runningPickles: messages.Pickle[]\n) => boolean\nexport interface ITestCaseHookParameter {\n gherkinDocument: messages.GherkinDocument\n pickle: messages.Pickle\n result?: messages.TestStepResult\n error?: any\n willBeRetried?: boolean\n testCaseStartedId: string\n}\n\nexport interface ITestStepHookParameter {\n gherkinDocument: messages.GherkinDocument\n pickle: messages.Pickle\n pickleStep: messages.PickleStep\n result: messages.TestStepResult\n error?: any\n testCaseStartedId: string\n testStepId: string\n}\n\nexport type TestRunHookFunction = (this: {\n parameters: JsonObject\n}) => any | Promise<any>\n\nexport type TestCaseHookFunction<WorldType> = (\n this: WorldType,\n arg: ITestCaseHookParameter\n) => any | Promise<any>\n\nexport type TestStepHookFunction<WorldType> = (\n this: WorldType,\n arg: ITestStepHookParameter\n) => any | Promise<any>\n\nexport type TestStepFunction<WorldType> = (\n this: WorldType,\n ...args: any[]\n) => any | Promise<any>\n\nexport interface IDefineStepOptions {\n timeout?: number\n wrapperOptions?: any\n}\n\nexport interface IDefineTestCaseHookOptions {\n name?: string\n tags?: string\n timeout?: number\n}\n\nexport interface IDefineTestStepHookOptions {\n tags?: string\n timeout?: number\n}\n\nexport interface IDefineTestRunHookOptions {\n name?: string\n timeout?: number\n}\n\nexport interface IParameterTypeDefinition<T> {\n name: string\n regexp: readonly RegExp[] | readonly string[] | RegExp | string\n transformer?: (...match: string[]) => T\n useForSnippets?: boolean\n preferForRegexpMatch?: boolean\n}\n\nexport type IDefineStep = (<WorldType = IWorld>(\n pattern: DefineStepPattern,\n code: TestStepFunction<WorldType>\n) => void) &\n (<WorldType = IWorld>(\n pattern: DefineStepPattern,\n options: IDefineStepOptions,\n code: TestStepFunction<WorldType>\n ) => void)\n\nexport interface IDefineSupportCodeMethods {\n defineParameterType: (options: IParameterTypeDefinition<any>) => void\n defineStep: IDefineStep\n setDefaultTimeout: (milliseconds: number) => void\n setDefinitionFunctionWrapper: (fn: Function) => void\n setParallelCanAssign: (fn: ParallelAssignmentValidator) => void\n setWorldConstructor: (fn: any) => void\n After: (<WorldType = IWorld>(code: TestCaseHookFunction<WorldType>) => void) &\n (<WorldType = IWorld>(\n tags: string,\n code: TestCaseHookFunction<WorldType>\n ) => void) &\n (<WorldType = IWorld>(\n options: IDefineTestCaseHookOptions,\n code: TestCaseHookFunction<WorldType>\n ) => void)\n AfterStep: (<WorldType = IWorld>(\n code: TestStepHookFunction<WorldType>\n ) => void) &\n (<WorldType = IWorld>(\n tags: string,\n code: TestStepHookFunction<WorldType>\n ) => void) &\n (<WorldType = IWorld>(\n options: IDefineTestStepHookOptions,\n code: TestStepHookFunction<WorldType>\n ) => void)\n AfterAll: ((code: TestRunHookFunction) => void) &\n ((options: IDefineTestRunHookOptions, code: TestRunHookFunction) => void)\n Before: (<WorldType = IWorld>(\n code: TestCaseHookFunction<WorldType>\n ) => void) &\n (<WorldType = IWorld>(\n tags: string,\n code: TestCaseHookFunction<WorldType>\n ) => void) &\n (<WorldType = IWorld>(\n options: IDefineTestCaseHookOptions,\n code: TestCaseHookFunction<WorldType>\n ) => void)\n BeforeStep: (<WorldType = IWorld>(\n code: TestStepHookFunction<WorldType>\n ) => void) &\n (<WorldType = IWorld>(\n tags: string,\n code: TestStepHookFunction<WorldType>\n ) => void) &\n (<WorldType = IWorld>(\n options: IDefineTestStepHookOptions,\n code: TestStepHookFunction<WorldType>\n ) => void)\n BeforeAll: ((code: TestRunHookFunction) => void) &\n ((options: IDefineTestRunHookOptions, code: TestRunHookFunction) => void)\n Given: IDefineStep\n Then: IDefineStep\n When: IDefineStep\n}\n\nexport interface ISupportCodeCoordinates {\n requireModules: string[]\n requirePaths: string[]\n importPaths: string[]\n loaders: string[]\n}\n\nexport interface CanonicalSupportCodeIds {\n stepDefinitionIds: string[]\n beforeTestCaseHookDefinitionIds: string[]\n afterTestCaseHookDefinitionIds: string[]\n beforeTestRunHookDefinitionIds: string[]\n afterTestRunHookDefinitionIds: string[]\n}\n\nexport interface SupportCodeLibrary {\n readonly originalCoordinates: ISupportCodeCoordinates\n readonly afterTestCaseHookDefinitions: TestCaseHookDefinition[]\n readonly afterTestStepHookDefinitions: TestStepHookDefinition[]\n readonly afterTestRunHookDefinitions: TestRunHookDefinition[]\n readonly beforeTestCaseHookDefinitions: TestCaseHookDefinition[]\n readonly beforeTestStepHookDefinitions: TestStepHookDefinition[]\n readonly beforeTestRunHookDefinitions: TestRunHookDefinition[]\n readonly defaultTimeout: number\n readonly stepDefinitions: StepDefinition[]\n readonly undefinedParameterTypes: messages.UndefinedParameterType[]\n readonly parameterTypeRegistry: SourcedParameterTypeRegistry\n readonly World: any\n readonly parallelCanAssign: ParallelAssignmentValidator\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate_arguments.js","sourceRoot":"","sources":["../../src/support_code_library_builder/validate_arguments.ts"],"names":[],"mappings":";;AAgFA,oCAgBC;AAlFD,MAAM,iBAAiB,GAAG;IACxB,YAAY,EAAE,oBAAoB;IAClC,SAAS,CAAC,EAAE,OAAO,EAAwB;QACzC,OAAO,OAAO,OAAO,KAAK,QAAQ,CAAA;IACpC,CAAC;CACF,CAAA;AAED,MAAM,wBAAwB,GAAG;IAC/B,UAAU,EAAE,mBAAmB;IAC/B,YAAY,EAAE,SAAS;IACvB,SAAS,CAAC,EAAE,OAAO,EAAwB;QACzC,OAAO,OAAO,CAAC,OAAO,IAAI,IAAI,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,CAAA;IACvE,CAAC;CACF,CAAA;AAED,MAAM,YAAY,GAAG;IACnB,YAAY,EAAE,UAAU;IACxB,SAAS,CAAC,EAAE,IAAI,EAAwB;QACtC,OAAO,OAAO,IAAI,KAAK,UAAU,CAAA;IACnC,CAAC;CACF,CAAA;AAED,MAAM,WAAW,GAAkC;IACjD,iBAAiB,EAAE;QACjB,EAAE,UAAU,EAAE,gBAAgB,EAAE,G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,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,EAAE;QACtE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CACb,GAAG,QAAQ,aAAa,UAAU,iBAAiB,YAAY,EAAE,CAClE,CAAA;QACH,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { DefineStepPattern, IDefineStepOptions } from './types'\n\ninterface IValidation {\n identifier: string\n expectedType: string\n predicate: (args: any) => boolean\n}\n\ninterface IDefineStepArguments {\n pattern?: DefineStepPattern\n options?: IDefineStepOptions\n code?: Function\n}\n\nconst optionsValidation = {\n expectedType: 'object or function',\n predicate({ options }: IDefineStepArguments) {\n return typeof options === 'object'\n },\n}\n\nconst optionsTimeoutValidation = {\n identifier: '\"options.timeout\"',\n expectedType: 'integer',\n predicate({ options }: IDefineStepArguments) {\n return options.timeout == null || typeof options.timeout === 'number'\n },\n}\n\nconst fnValidation = {\n expectedType: 'function',\n predicate({ code }: IDefineStepArguments) {\n return typeof code === 'function'\n },\n}\n\nconst validations: Record<string, IValidation[]> = {\n defineTestRunHook: [\n { identifier: 'first argument', ...optionsValidation },\n optionsTimeoutValidation,\n { identifier: 'second argument', ...fnValidation },\n ],\n defineTestCaseHook: [\n { identifier: 'first argument', ...optionsValidation },\n {\n identifier: '\"options.tags\"',\n expectedType: 'string',\n predicate({ options }) {\n return options.tags == null || typeof options.tags === 'string'\n },\n },\n optionsTimeoutValidation,\n { identifier: 'second argument', ...fnValidation },\n ],\n defineTestStepHook: [\n { identifier: 'first argument', ...optionsValidation },\n {\n identifier: '\"options.tags\"',\n expectedType: 'string',\n predicate({ options }) {\n return options.tags == null || typeof options.tags === 'string'\n },\n },\n optionsTimeoutValidation,\n { identifier: 'second argument', ...fnValidation },\n ],\n defineStep: [\n {\n identifier: 'first argument',\n expectedType: 'string or regular expression',\n predicate({ pattern }) {\n return pattern instanceof RegExp || typeof pattern === 'string'\n },\n },\n { identifier: 'second argument', ...optionsValidation },\n optionsTimeoutValidation,\n { identifier: 'third argument', ...fnValidation },\n ],\n}\n\nexport default function validateArguments({\n args,\n fnName,\n location,\n}: {\n args?: IDefineStepArguments\n fnName: string\n location: string\n}): void {\n validations[fnName].forEach(({ identifier, expectedType, predicate }) => {\n if (!predicate(args)) {\n throw new Error(\n `${location}: Invalid ${identifier}: should be a ${expectedType}`\n )\n }\n })\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"world.js","sourceRoot":"","sources":["../../src/support_code_library_builder/world.ts"],"names":[],"mappings":";;AAsBA,MAAqB,KAAK;IAGR,MAAM,CAAmB;IACzB,GAAG,CAAY;IACf,IAAI,CAAa;IACjB,UAAU,CAAgB;IAE1C,YAAY,EACV,MAAM,EACN,GAAG,EACH,IAAI,EACJ,UAAU,GACoB;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,CAAC;CACF;AAnBD,wBAmBC","sourcesContent":["import {\n ICreateAttachment,\n ICreateLink,\n ICreateLog,\n} from '../runtime/attachment_manager'\n\nexport interface IWorldOptions<ParametersType = any> {\n attach: ICreateAttachment\n log: ICreateLog\n link: ICreateLink\n parameters: ParametersType\n}\n\nexport interface IWorld<ParametersType = any> {\n readonly attach: ICreateAttachment\n readonly log: ICreateLog\n readonly link: ICreateLink\n readonly parameters: ParametersType\n\n [key: string]: any\n}\n\nexport default class World<ParametersType = any>\n implements IWorld<ParametersType>\n{\n public readonly attach: ICreateAttachment\n public readonly log: ICreateLog\n public readonly link: ICreateLink\n public readonly parameters: ParametersType\n\n constructor({\n attach,\n log,\n link,\n parameters,\n }: IWorldOptions<ParametersType>) {\n this.attach = attach\n this.log = log\n this.link = link\n this.parameters = parameters\n }\n}\n"]}
package/lib/time.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"time.js","sourceRoot":"","sources":["../src/time.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,8DAUC;AAED,wDAiBC;AAzDD,qDAA6C;AAC7C,6DAA8C;AAa9C,MAAM,OAAO,GAAqC;IAChD,aAAa,EAAE,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC;IACzC,YAAY,EAAE,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC;IACvC,IAAI;IACJ,WAAW,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC;IACrC,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC;IACnC,WAAW,EAAX,6BAAW;CACZ,CAAA;AAED,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE,CAAC;IACxC,OAAO,CAAC,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAChD,OAAO,CAAC,cAAc,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AACtD,CAAC;AAED,SAAgB,yBAAyB,CACvC,gBAAoC,EACpC,iBAAqC;IAErC,MAAM,cAAc,GAClB,QAAQ,CAAC,cAAc,CAAC,iCAAiC,CACvD,iBAAiB,CAClB;QACD,QAAQ,CAAC,cAAc,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,CAAA;IAC7E,OAAO,QAAQ,CAAC,cAAc,CAAC,sBAAsB,CAAC,cAAc,CAAC,CAAA;AACvE,CAAC;AAEM,KAAK,UAAU,sBAAsB,CAC1C,OAAmB,EACnB,qBAA6B,EAC7B,iBAAyB,EAAE;IAE3B,IAAI,SAAwC,CAAA;IAC5C,IAAI,cAAc,KAAK,EAAE,EAAE,CAAC;QAC1B,cAAc,GAAG,kCAAkC,qBAAqB,eAAe,CAAA;IACzF,CAAC;IACD,MAAM,cAAc,GAAG,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACxD,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,EAAE;YAClC,MAAM,CAAC,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC,CAAA;QACnC,CAAC,EAAE,qBAAqB,CAAC,CAAA;IAC3B,CAAC,CAAC,CAAA;IACF,OAAO,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAChE,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAChC,CAAA;AACH,CAAC;AAED,kBAAe,OAAO,CAAA","sourcesContent":["import { performance } from 'node:perf_hooks'\nimport * as messages from '@cucumber/messages'\n\ninterface ProtectedTimingBuiltins {\n clearImmediate: typeof clearImmediate\n clearInterval: typeof clearInterval\n clearTimeout: typeof clearTimeout\n Date: typeof Date\n setImmediate: typeof setImmediate\n setInterval: typeof setInterval\n setTimeout: typeof setTimeout\n performance: typeof performance\n}\n\nconst methods: Partial<ProtectedTimingBuiltins> = {\n clearInterval: clearInterval.bind(global),\n clearTimeout: clearTimeout.bind(global),\n Date,\n setInterval: setInterval.bind(global),\n setTimeout: setTimeout.bind(global),\n performance,\n}\n\nif (typeof setImmediate !== 'undefined') {\n methods.setImmediate = setImmediate.bind(global)\n methods.clearImmediate = clearImmediate.bind(global)\n}\n\nexport function durationBetweenTimestamps(\n startedTimestamp: messages.Timestamp,\n finishedTimestamp: messages.Timestamp\n): messages.Duration {\n const durationMillis =\n messages.TimeConversion.timestampToMillisecondsSinceEpoch(\n finishedTimestamp\n ) -\n messages.TimeConversion.timestampToMillisecondsSinceEpoch(startedTimestamp)\n return messages.TimeConversion.millisecondsToDuration(durationMillis)\n}\n\nexport async function wrapPromiseWithTimeout<T>(\n promise: Promise<T>,\n timeoutInMilliseconds: number,\n timeoutMessage: string = ''\n): Promise<T> {\n let timeoutId: ReturnType<typeof setTimeout>\n if (timeoutMessage === '') {\n timeoutMessage = `Action did not complete within ${timeoutInMilliseconds} milliseconds`\n }\n const timeoutPromise = new Promise<T>((resolve, reject) => {\n timeoutId = methods.setTimeout(() => {\n reject(new Error(timeoutMessage))\n }, timeoutInMilliseconds)\n })\n return await Promise.race([promise, timeoutPromise]).finally(() =>\n methods.clearTimeout(timeoutId)\n )\n}\n\nexport default methods\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"try_require.js","sourceRoot":"","sources":["../src/try_require.ts"],"names":[],"mappings":";;AAMA,6BAoBC;AA1BD;;;;;GAKG;AACH,SAAwB,UAAU,CAAC,IAAY;IAC7C,IAAI,CAAC;QACH,OAAO,OAAO,CAAC,IAAI,CAAC,CAAA,CAAC,4DAA4D;IACnF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;YACrC,MAAM,KAAK,CACT,2CAA2C,IAAI;oGAC6C,EAC5F,EAAE,KAAK,EAAE,KAAK,EAAE,CACjB,CAAA;QACH,CAAC;aAAM,IAAI,KAAK,CAAC,IAAI,KAAK,0BAA0B,EAAE,CAAC;YACrD,MAAM,KAAK,CACT,+DAA+D,IAAI;uGAC4B,EAC/F,EAAE,KAAK,EAAE,KAAK,EAAE,CACjB,CAAA;QACH,CAAC;aAAM,CAAC;YACN,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["/**\n * Provides a try guarded require call that will throw a more detailed error when\n * the ERR_REQUIRE_ESM error code is encountered.\n *\n * @param {string} path File path to require from.\n */\nexport default function tryRequire(path: string) {\n try {\n return require(path) // eslint-disable-line @typescript-eslint/no-require-imports\n } catch (error) {\n if (error.code === 'ERR_REQUIRE_ESM') {\n throw Error(\n `Cucumber expected a CommonJS module at '${path}' but found an ES module.\n Either change the file to CommonJS syntax or use the --import directive instead of --require.`,\n { cause: error }\n )\n } else if (error.code === 'ERR_REQUIRE_ASYNC_MODULE') {\n throw Error(\n `Cucumber expected a CommonJS module or simple ES module at '${path}' but found an async ES module.\n Either change the file so it can be required or use the --import directive instead of --require.`,\n { cause: error }\n )\n } else {\n throw error\n }\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"root":["../src/filter_stack_trace.ts","../src/index.ts","../src/pickle_filter.ts","../src/step_arguments.ts","../src/time.ts","../src/try_require.ts","../src/uncaught_exception_manager.ts","../src/user_code_runner.ts","../src/value_checker.ts","../src/version.ts","../src/api/convert_configuration.ts","../src/api/emit_support_code_messages.ts","../src/api/formatters.ts","../src/api/gherkin.ts","../src/api/index.ts","../src/api/load_configuration.ts","../src/api/load_sources.ts","../src/api/load_support.ts","../src/api/plugins.ts","../src/api/run_cucumber.ts","../src/api/support.ts","../src/api/test_helpers.ts","../src/api/types.ts","../src/assemble/assemble_test_cases.ts","../src/assemble/index.ts","../src/assemble/types.ts","../src/cli/i18n.ts","../src/cli/index.ts","../src/cli/install_validator.ts","../src/cli/run.ts","../src/cli/validate_node_engine_version.ts","../src/configuration/argv_parser.ts","../src/configuration/check_schema.ts","../src/configuration/default_configuration.ts","../src/configuration/from_file.ts","../src/configuration/helpers.ts","../src/configuration/index.ts","../src/configuration/locate_file.ts","../src/configuration/merge_configurations.ts","../src/configuration/parse_configuration.ts","../src/configuration/split_format_descriptor.ts","../src/configuration/types.ts","../src/configuration/validate_configuration.ts","../src/environment/console_logger.ts","../src/environment/index.ts","../src/environment/make_environment.ts","../src/environment/types.ts","../src/filter/filter_plugin.ts","../src/filter/index.ts","../src/filter/order_pickles.ts","../src/filter/types.ts","../src/formatter/builder.ts","../src/formatter/create_stream.ts","../src/formatter/find_class_or_plugin.ts","../src/formatter/get_color_fns.ts","../src/formatter/import_code.ts","../src/formatter/index.ts","../src/formatter/json_formatter.ts","../src/formatter/progress_bar_formatter.ts","../src/formatter/progress_formatter.ts","../src/formatter/rerun_formatter.ts","../src/formatter/resolve_implementation.ts","../src/formatter/snippets_formatter.ts","../src/formatter/summary_formatter.ts","../src/formatter/usage_formatter.ts","../src/formatter/usage_json_formatter.ts","../src/formatter/builtin/html.ts","../src/formatter/builtin/index.ts","../src/formatter/builtin/message.ts","../src/formatter/helpers/duration_helpers.ts","../src/formatter/helpers/event_data_collector.ts","../src/formatter/helpers/formatters.ts","../src/formatter/helpers/gherkin_document_parser.ts","../src/formatter/helpers/index.ts","../src/formatter/helpers/issue_helpers.ts","../src/formatter/helpers/keyword_type.ts","../src/formatter/helpers/location_helpers.ts","../src/formatter/helpers/pickle_parser.ts","../src/formatter/helpers/step_argument_formatter.ts","../src/formatter/helpers/summary_helpers.ts","../src/formatter/helpers/test_case_attempt_formatter.ts","../src/formatter/helpers/test_case_attempt_parser.ts","../src/formatter/helpers/usage_helpers/index.ts","../src/formatter/step_definition_snippet_builder/index.ts","../src/formatter/step_definition_snippet_builder/javascript_snippet_syntax.ts","../src/formatter/step_definition_snippet_builder/snippet_syntax.ts","../src/models/data_table.ts","../src/models/definition.ts","../src/models/gherkin_step_keyword.ts","../src/models/step_definition.ts","../src/models/test_case_hook_definition.ts","../src/models/test_run_hook_definition.ts","../src/models/test_step_hook_definition.ts","../src/paths/index.ts","../src/paths/paths.ts","../src/paths/types.ts","../src/plugin/index.ts","../src/plugin/plugin_manager.ts","../src/plugin/types.ts","../src/publish/index.ts","../src/publish/publish_plugin.ts","../src/publish/types.ts","../src/runtime/coordinator.ts","../src/runtime/format_error.ts","../src/runtime/helpers.ts","../src/runtime/index.ts","../src/runtime/make_runtime.ts","../src/runtime/make_suggestion.ts","../src/runtime/step_runner.ts","../src/runtime/stopwatch.ts","../src/runtime/test_case_runner.ts","../src/runtime/types.ts","../src/runtime/worker.ts","../src/runtime/attachment_manager/index.ts","../src/runtime/parallel/adapter.ts","../src/runtime/parallel/run_worker.ts","../src/runtime/parallel/types.ts","../src/runtime/parallel/worker.ts","../src/runtime/scope/index.ts","../src/runtime/scope/make_proxy.ts","../src/runtime/scope/test_case_scope.ts","../src/runtime/scope/test_run_scope.ts","../src/runtime/serial/adapter.ts","../src/sharding/index.ts","../src/sharding/sharding_plugin.ts","../src/support_code_library_builder/build_parameter_type.ts","../src/support_code_library_builder/context.ts","../src/support_code_library_builder/get_definition_line_and_uri.ts","../src/support_code_library_builder/index.ts","../src/support_code_library_builder/parallel_can_assign_helpers.ts","../src/support_code_library_builder/sourced_parameter_type_registry.ts","../src/support_code_library_builder/types.ts","../src/support_code_library_builder/validate_arguments.ts","../src/support_code_library_builder/world.ts","../src/types/index.ts","../src/types/assertion-error-formatter/index.d.ts","../src/types/is-generator/index.d.ts","../src/types/knuth-shuffle-seeded/index.d.ts","../src/types/stack-chain/index.d.ts","../src/types/supports-color/index.d.ts"],"version":"5.9.3"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"","sourcesContent":["export interface ILineAndUri {\n line: number\n uri: string\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"uncaught_exception_manager.js","sourceRoot":"","sources":["../src/uncaught_exception_manager.ts"],"names":[],"mappings":";;AAEA,MAAM,wBAAwB,GAAG;IAC/B,eAAe,CAAC,OAAkC;QAChD,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;IACnD,CAAC;IAED,iBAAiB,CAAC,OAAkC;QAClD,OAAO,CAAC,cAAc,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;IACtD,CAAC;CACF,CAAA;AAED,kBAAe,wBAAwB,CAAA","sourcesContent":["import UncaughtExceptionListener = NodeJS.UncaughtExceptionListener\n\nconst UncaughtExceptionManager = {\n registerHandler(handler: UncaughtExceptionListener): void {\n process.addListener('uncaughtException', handler)\n },\n\n unregisterHandler(handler: UncaughtExceptionListener): void {\n process.removeListener('uncaughtException', handler)\n },\n}\n\nexport default UncaughtExceptionManager\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"user_code_runner.js","sourceRoot":"","sources":["../src/user_code_runner.ts"],"names":[],"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AAM,CAAC,CAAC,CAAC,CAAA;YACxB,CAAC;iBAAM,CAAC;gBACN,KAAK,GAAG,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;YACxD,CAAC;QACH,CAAC;QAED,oCAAwB,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAA;QAE5D,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA;IAC1B,CAAC;CACF,CAAA;AAED,kBAAe,cAAc,CAAA","sourcesContent":["import util from 'node:util'\nimport { wrapPromiseWithTimeout } from './time'\nimport UncaughtExceptionManager from './uncaught_exception_manager'\nimport { doesHaveValue } from './value_checker'\n\nexport interface IRunRequest {\n argsArray: any[]\n thisArg: any\n fn: Function\n timeoutInMilliseconds: number\n}\n\nexport interface IRunResponse {\n error?: any\n result?: any\n}\n\nconst UserCodeRunner = {\n async run({\n argsArray,\n thisArg,\n fn,\n timeoutInMilliseconds,\n }: IRunRequest): Promise<IRunResponse> {\n const callbackPromise = new Promise((resolve, reject) => {\n argsArray.push((error: Error, result: IRunResponse) => {\n if (doesHaveValue(error)) {\n reject(error)\n } else {\n resolve(result)\n }\n })\n })\n\n let fnReturn\n try {\n fnReturn = fn.apply(thisArg, argsArray)\n } catch (e) {\n const error = e instanceof Error ? e : util.format(e)\n return { error }\n }\n\n const racingPromises = []\n const callbackInterface = fn.length === argsArray.length\n const promiseInterface =\n doesHaveValue(fnReturn) && typeof fnReturn.then === 'function'\n\n if (callbackInterface && promiseInterface) {\n return {\n error: new Error(\n 'function uses multiple asynchronous interfaces: callback and promise\\n' +\n 'to use the callback interface: do not return a promise\\n' +\n 'to use the promise interface: remove the last argument to the function'\n ),\n }\n } else if (callbackInterface) {\n racingPromises.push(callbackPromise)\n } else if (promiseInterface) {\n racingPromises.push(fnReturn)\n } else {\n return { result: fnReturn }\n }\n\n let exceptionHandler\n const uncaughtExceptionPromise = new Promise((resolve, reject) => {\n exceptionHandler = reject\n UncaughtExceptionManager.registerHandler(exceptionHandler)\n })\n racingPromises.push(uncaughtExceptionPromise)\n\n let finalPromise = Promise.race(racingPromises)\n if (timeoutInMilliseconds >= 0) {\n const timeoutMessage =\n 'function timed out, ensure the ' +\n (callbackInterface ? 'callback is executed' : 'promise resolves') +\n ` within ${timeoutInMilliseconds.toString()} milliseconds`\n finalPromise = wrapPromiseWithTimeout(\n finalPromise,\n timeoutInMilliseconds,\n timeoutMessage\n )\n }\n\n let error, result\n try {\n result = await finalPromise\n } catch (e) {\n if (e instanceof Error) {\n error = e\n } else if (doesHaveValue(e)) {\n error = util.format(e)\n } else {\n error = new Error('Promise rejected without a reason')\n }\n }\n\n UncaughtExceptionManager.unregisterHandler(exceptionHandler)\n\n return { error, result }\n },\n}\n\nexport default UserCodeRunner\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"value_checker.js","sourceRoot":"","sources":["../src/value_checker.ts"],"names":[],"mappings":";;AAAA,sCAEC;AAED,4CAEC;AAED,wCAKC;AAbD,SAAgB,aAAa,CAAI,KAAQ;IACvC,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAA;AACjC,CAAC;AAED,SAAgB,gBAAgB,CAAI,KAAQ;IAC1C,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAA;AAC9C,CAAC;AAED,SAAgB,cAAc,CAAI,KAAQ,EAAE,YAAe;IACzD,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,YAAY,CAAA;AACrB,CAAC","sourcesContent":["export function doesHaveValue<T>(value: T): boolean {\n return !doesNotHaveValue(value)\n}\n\nexport function doesNotHaveValue<T>(value: T): boolean {\n return value === null || value === undefined\n}\n\nexport function valueOrDefault<T>(value: T, defaultValue: T): T {\n if (doesHaveValue(value)) {\n return value\n }\n return defaultValue\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,2BAA2B;AACd,QAAA,OAAO,GAAG,QAAQ,CAAA","sourcesContent":["// Generated by genversion.\nexport const version = '12.9.0'\n"]}