@cucumber/cucumber 12.8.3 → 13.0.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 (396) 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 +13 -28
  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 +8 -7
  21. package/lib/api/run_cucumber.d.ts +3 -3
  22. package/lib/api/run_cucumber.js +17 -1
  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/assemble/assemble_test_cases.d.ts +4 -4
  30. package/lib/assemble/assemble_test_cases.js +2 -6
  31. package/lib/assemble/index.js +1 -1
  32. package/lib/assemble/types.d.ts +1 -1
  33. package/lib/assemble/types.js +1 -1
  34. package/lib/cli/i18n.js +5 -3
  35. package/lib/cli/index.d.ts +1 -1
  36. package/lib/cli/index.js +2 -2
  37. package/lib/cli/install_validator.js +4 -3
  38. package/lib/cli/run.js +7 -6
  39. package/lib/cli/validate_node_engine_version.js +2 -4
  40. package/lib/configuration/argv_parser.d.ts +1 -1
  41. package/lib/configuration/argv_parser.js +7 -7
  42. package/lib/configuration/check_schema.d.ts +1 -1
  43. package/lib/configuration/check_schema.js +19 -6
  44. package/lib/configuration/default_configuration.d.ts +1 -1
  45. package/lib/configuration/default_configuration.js +2 -1
  46. package/lib/configuration/from_file.d.ts +2 -2
  47. package/lib/configuration/from_file.js +6 -6
  48. package/lib/configuration/helpers.js +1 -1
  49. package/lib/configuration/index.js +1 -1
  50. package/lib/configuration/locate_file.js +3 -3
  51. package/lib/configuration/merge_configurations.d.ts +1 -1
  52. package/lib/configuration/merge_configurations.js +2 -10
  53. package/lib/configuration/parse_configuration.d.ts +2 -2
  54. package/lib/configuration/parse_configuration.js +3 -11
  55. package/lib/configuration/split_format_descriptor.d.ts +1 -2
  56. package/lib/configuration/split_format_descriptor.js +11 -71
  57. package/lib/configuration/types.d.ts +26 -3
  58. package/lib/configuration/types.js +1 -1
  59. package/lib/configuration/validate_configuration.d.ts +2 -2
  60. package/lib/configuration/validate_configuration.js +5 -3
  61. package/lib/environment/console_logger.d.ts +2 -2
  62. package/lib/environment/console_logger.js +1 -1
  63. package/lib/environment/index.js +1 -1
  64. package/lib/environment/make_environment.d.ts +1 -1
  65. package/lib/environment/make_environment.js +1 -1
  66. package/lib/environment/types.d.ts +1 -1
  67. package/lib/environment/types.js +1 -1
  68. package/lib/filter/filter_plugin.d.ts +2 -2
  69. package/lib/filter/filter_plugin.js +1 -1
  70. package/lib/filter/index.d.ts +1 -1
  71. package/lib/filter/index.js +2 -2
  72. package/lib/filter/order_pickles.d.ts +2 -2
  73. package/lib/filter/order_pickles.js +1 -1
  74. package/lib/filter/types.d.ts +1 -1
  75. package/lib/filter/types.js +1 -1
  76. package/lib/filter_stack_trace.d.ts +1 -1
  77. package/lib/filter_stack_trace.js +1 -1
  78. package/lib/formatter/builder.d.ts +7 -6
  79. package/lib/formatter/builder.js +6 -7
  80. package/lib/formatter/builtin/html.js +2 -2
  81. package/lib/formatter/builtin/index.d.ts +4 -4
  82. package/lib/formatter/builtin/index.js +14 -13
  83. package/lib/formatter/builtin/message.js +2 -2
  84. package/lib/formatter/builtin/pretty.d.ts +6 -0
  85. package/lib/formatter/builtin/pretty.js +19 -0
  86. package/lib/formatter/builtin/progress-bar.d.ts +6 -0
  87. package/lib/formatter/builtin/progress-bar.js +22 -0
  88. package/lib/formatter/builtin/progress.d.ts +6 -0
  89. package/lib/formatter/builtin/progress.js +18 -0
  90. package/lib/formatter/builtin/resolve_terminal_options.d.ts +3 -0
  91. package/lib/formatter/builtin/resolve_terminal_options.js +15 -0
  92. package/lib/formatter/builtin/summary.d.ts +6 -0
  93. package/lib/formatter/builtin/summary.js +15 -0
  94. package/lib/formatter/create_stream.d.ts +2 -2
  95. package/lib/formatter/create_stream.js +3 -5
  96. package/lib/formatter/find_class_or_plugin.js +1 -1
  97. package/lib/formatter/get_color_fns.d.ts +3 -3
  98. package/lib/formatter/get_color_fns.js +23 -52
  99. package/lib/formatter/helpers/duration_helpers.d.ts +1 -1
  100. package/lib/formatter/helpers/duration_helpers.js +1 -1
  101. package/lib/formatter/helpers/event_data_collector.d.ts +2 -2
  102. package/lib/formatter/helpers/event_data_collector.js +4 -6
  103. package/lib/formatter/helpers/formatters.d.ts +1 -1
  104. package/lib/formatter/helpers/formatters.js +1 -3
  105. package/lib/formatter/helpers/gherkin_document_parser.d.ts +1 -1
  106. package/lib/formatter/helpers/gherkin_document_parser.js +20 -18
  107. package/lib/formatter/helpers/index.d.ts +3 -3
  108. package/lib/formatter/helpers/index.js +8 -8
  109. package/lib/formatter/helpers/issue_helpers.d.ts +5 -5
  110. package/lib/formatter/helpers/issue_helpers.js +2 -2
  111. package/lib/formatter/helpers/keyword_type.js +2 -2
  112. package/lib/formatter/helpers/location_helpers.d.ts +1 -1
  113. package/lib/formatter/helpers/location_helpers.js +1 -1
  114. package/lib/formatter/helpers/pickle_parser.d.ts +2 -2
  115. package/lib/formatter/helpers/pickle_parser.js +8 -9
  116. package/lib/formatter/helpers/step_argument_formatter.d.ts +1 -1
  117. package/lib/formatter/helpers/step_argument_formatter.js +1 -1
  118. package/lib/formatter/helpers/summary_helpers.d.ts +2 -2
  119. package/lib/formatter/helpers/summary_helpers.js +8 -4
  120. package/lib/formatter/helpers/test_case_attempt_formatter.d.ts +4 -4
  121. package/lib/formatter/helpers/test_case_attempt_formatter.js +5 -5
  122. package/lib/formatter/helpers/test_case_attempt_parser.d.ts +4 -4
  123. package/lib/formatter/helpers/test_case_attempt_parser.js +4 -9
  124. package/lib/formatter/helpers/usage_helpers/index.d.ts +3 -3
  125. package/lib/formatter/helpers/usage_helpers/index.js +5 -6
  126. package/lib/formatter/import_code.js +2 -2
  127. package/lib/formatter/index.d.ts +25 -13
  128. package/lib/formatter/index.js +2 -2
  129. package/lib/formatter/json_formatter.d.ts +2 -2
  130. package/lib/formatter/json_formatter.js +9 -14
  131. package/lib/formatter/progress_formatter.d.ts +4 -1
  132. package/lib/formatter/progress_formatter.js +4 -1
  133. package/lib/formatter/rerun_formatter.d.ts +1 -1
  134. package/lib/formatter/rerun_formatter.js +2 -2
  135. package/lib/formatter/resolve_implementation.d.ts +1 -1
  136. package/lib/formatter/resolve_implementation.js +2 -2
  137. package/lib/formatter/snippets_formatter.d.ts +1 -1
  138. package/lib/formatter/snippets_formatter.js +2 -2
  139. package/lib/formatter/step_definition_snippet_builder/index.d.ts +4 -4
  140. package/lib/formatter/step_definition_snippet_builder/index.js +3 -3
  141. package/lib/formatter/step_definition_snippet_builder/javascript_snippet_syntax.d.ts +1 -1
  142. package/lib/formatter/step_definition_snippet_builder/javascript_snippet_syntax.js +3 -5
  143. package/lib/formatter/step_definition_snippet_builder/snippet_syntax.d.ts +1 -1
  144. package/lib/formatter/step_definition_snippet_builder/snippet_syntax.js +1 -1
  145. package/lib/formatter/summary_formatter.d.ts +6 -3
  146. package/lib/formatter/summary_formatter.js +6 -3
  147. package/lib/formatter/usage_formatter.d.ts +1 -1
  148. package/lib/formatter/usage_formatter.js +4 -4
  149. package/lib/formatter/usage_json_formatter.d.ts +1 -1
  150. package/lib/formatter/usage_json_formatter.js +3 -3
  151. package/lib/index.d.ts +6 -11
  152. package/lib/index.js +13 -20
  153. package/lib/models/data_table.d.ts +1 -1
  154. package/lib/models/data_table.js +9 -5
  155. package/lib/models/definition.d.ts +4 -4
  156. package/lib/models/definition.js +1 -1
  157. package/lib/models/gherkin_step_keyword.js +1 -1
  158. package/lib/models/step_definition.d.ts +3 -3
  159. package/lib/models/step_definition.js +1 -1
  160. package/lib/models/test_case_hook_definition.d.ts +2 -2
  161. package/lib/models/test_case_hook_definition.js +1 -1
  162. package/lib/models/test_run_hook_definition.d.ts +1 -1
  163. package/lib/models/test_run_hook_definition.js +1 -1
  164. package/lib/models/test_step_hook_definition.d.ts +2 -2
  165. package/lib/models/test_step_hook_definition.js +1 -1
  166. package/lib/paths/index.js +1 -1
  167. package/lib/paths/paths.d.ts +3 -3
  168. package/lib/paths/paths.js +42 -18
  169. package/lib/paths/types.js +1 -1
  170. package/lib/pickle_filter.d.ts +1 -1
  171. package/lib/pickle_filter.js +3 -3
  172. package/lib/plugin/index.d.ts +1 -1
  173. package/lib/plugin/index.js +2 -2
  174. package/lib/plugin/plugin_manager.d.ts +6 -3
  175. package/lib/plugin/plugin_manager.js +33 -22
  176. package/lib/plugin/types.d.ts +76 -10
  177. package/lib/plugin/types.js +1 -1
  178. package/lib/publish/index.js +1 -1
  179. package/lib/publish/publish_plugin.d.ts +2 -2
  180. package/lib/publish/publish_plugin.js +29 -24
  181. package/lib/publish/types.js +1 -1
  182. package/lib/runtime/attachment_manager/index.d.ts +1 -1
  183. package/lib/runtime/attachment_manager/index.js +3 -6
  184. package/lib/runtime/coordinator.d.ts +13 -6
  185. package/lib/runtime/coordinator.js +26 -18
  186. package/lib/runtime/format_error.d.ts +1 -1
  187. package/lib/runtime/format_error.js +43 -15
  188. package/lib/runtime/helpers.d.ts +2 -2
  189. package/lib/runtime/helpers.js +2 -2
  190. package/lib/runtime/index.js +1 -1
  191. package/lib/runtime/make_runtime.d.ts +10 -9
  192. package/lib/runtime/make_runtime.js +4 -5
  193. package/lib/runtime/make_suggestion.d.ts +2 -2
  194. package/lib/runtime/make_suggestion.js +1 -1
  195. package/lib/runtime/parallel/adapter.d.ts +27 -39
  196. package/lib/runtime/parallel/adapter.js +124 -122
  197. package/lib/runtime/parallel/test_cases_phase.d.ts +19 -0
  198. package/lib/runtime/parallel/test_cases_phase.js +63 -0
  199. package/lib/runtime/parallel/test_run_hooks_phase.d.ts +11 -0
  200. package/lib/runtime/parallel/test_run_hooks_phase.js +33 -0
  201. package/lib/runtime/parallel/types.d.ts +38 -22
  202. package/lib/runtime/parallel/types.js +1 -1
  203. package/lib/runtime/parallel/worker.mjs +65 -0
  204. package/lib/runtime/scope/index.js +1 -1
  205. package/lib/runtime/scope/make_proxy.js +1 -1
  206. package/lib/runtime/scope/test_case_scope.d.ts +1 -1
  207. package/lib/runtime/scope/test_case_scope.js +1 -1
  208. package/lib/runtime/scope/test_run_scope.d.ts +1 -1
  209. package/lib/runtime/scope/test_run_scope.js +1 -1
  210. package/lib/runtime/serial/adapter.d.ts +15 -9
  211. package/lib/runtime/serial/adapter.js +21 -9
  212. package/lib/runtime/step_runner.d.ts +2 -2
  213. package/lib/runtime/step_runner.js +2 -2
  214. package/lib/runtime/stopwatch.d.ts +1 -1
  215. package/lib/runtime/stopwatch.js +1 -1
  216. package/lib/runtime/test_case_runner.d.ts +10 -9
  217. package/lib/runtime/test_case_runner.js +20 -12
  218. package/lib/runtime/types.d.ts +7 -3
  219. package/lib/runtime/types.js +1 -1
  220. package/lib/runtime/worker.d.ts +14 -13
  221. package/lib/runtime/worker.js +26 -44
  222. package/lib/sharding/index.js +1 -1
  223. package/lib/sharding/sharding_plugin.d.ts +2 -2
  224. package/lib/sharding/sharding_plugin.js +1 -1
  225. package/lib/step_arguments.d.ts +1 -1
  226. package/lib/step_arguments.js +1 -1
  227. package/lib/support_code_library_builder/build_parameter_type.d.ts +1 -1
  228. package/lib/support_code_library_builder/build_parameter_type.js +5 -3
  229. package/lib/support_code_library_builder/context.js +1 -1
  230. package/lib/support_code_library_builder/get_definition_line_and_uri.d.ts +1 -1
  231. package/lib/support_code_library_builder/get_definition_line_and_uri.js +1 -1
  232. package/lib/support_code_library_builder/index.d.ts +7 -7
  233. package/lib/support_code_library_builder/index.js +9 -9
  234. package/lib/support_code_library_builder/parallel_can_assign_helpers.d.ts +1 -1
  235. package/lib/support_code_library_builder/parallel_can_assign_helpers.js +3 -4
  236. package/lib/support_code_library_builder/sourced_parameter_type_registry.d.ts +2 -2
  237. package/lib/support_code_library_builder/sourced_parameter_type_registry.js +1 -1
  238. package/lib/support_code_library_builder/types.d.ts +8 -8
  239. package/lib/support_code_library_builder/types.js +1 -1
  240. package/lib/support_code_library_builder/validate_arguments.d.ts +1 -1
  241. package/lib/support_code_library_builder/validate_arguments.js +1 -1
  242. package/lib/support_code_library_builder/world.d.ts +2 -2
  243. package/lib/support_code_library_builder/world.js +2 -2
  244. package/lib/time.js +2 -2
  245. package/lib/try_require.js +3 -2
  246. package/lib/types/index.js +1 -1
  247. package/lib/uncaught_exception_manager.js +1 -1
  248. package/lib/user_code_runner.d.ts +1 -1
  249. package/lib/user_code_runner.js +3 -3
  250. package/lib/value_checker.js +1 -1
  251. package/lib/version.d.ts +1 -1
  252. package/lib/version.js +2 -2
  253. package/lib/wrapper.mjs +1 -5
  254. package/package.json +40 -63
  255. package/lib/api/convert_configuration.js.map +0 -1
  256. package/lib/api/emit_support_code_messages.js.map +0 -1
  257. package/lib/api/formatters.js.map +0 -1
  258. package/lib/api/gherkin.js.map +0 -1
  259. package/lib/api/index.js.map +0 -1
  260. package/lib/api/load_configuration.js.map +0 -1
  261. package/lib/api/load_sources.js.map +0 -1
  262. package/lib/api/load_support.js.map +0 -1
  263. package/lib/api/plugins.js.map +0 -1
  264. package/lib/api/run_cucumber.js.map +0 -1
  265. package/lib/api/support.js.map +0 -1
  266. package/lib/api/test_helpers.js.map +0 -1
  267. package/lib/api/types.js.map +0 -1
  268. package/lib/assemble/assemble_test_cases.js.map +0 -1
  269. package/lib/assemble/index.js.map +0 -1
  270. package/lib/assemble/types.js.map +0 -1
  271. package/lib/cli/i18n.js.map +0 -1
  272. package/lib/cli/index.js.map +0 -1
  273. package/lib/cli/install_validator.js.map +0 -1
  274. package/lib/cli/run.js.map +0 -1
  275. package/lib/cli/validate_node_engine_version.js.map +0 -1
  276. package/lib/configuration/argv_parser.js.map +0 -1
  277. package/lib/configuration/check_schema.js.map +0 -1
  278. package/lib/configuration/default_configuration.js.map +0 -1
  279. package/lib/configuration/from_file.js.map +0 -1
  280. package/lib/configuration/helpers.js.map +0 -1
  281. package/lib/configuration/index.js.map +0 -1
  282. package/lib/configuration/locate_file.js.map +0 -1
  283. package/lib/configuration/merge_configurations.js.map +0 -1
  284. package/lib/configuration/parse_configuration.js.map +0 -1
  285. package/lib/configuration/split_format_descriptor.js.map +0 -1
  286. package/lib/configuration/types.js.map +0 -1
  287. package/lib/configuration/validate_configuration.js.map +0 -1
  288. package/lib/environment/console_logger.js.map +0 -1
  289. package/lib/environment/index.js.map +0 -1
  290. package/lib/environment/make_environment.js.map +0 -1
  291. package/lib/environment/types.js.map +0 -1
  292. package/lib/filter/filter_plugin.js.map +0 -1
  293. package/lib/filter/index.js.map +0 -1
  294. package/lib/filter/order_pickles.js.map +0 -1
  295. package/lib/filter/types.js.map +0 -1
  296. package/lib/filter_stack_trace.js.map +0 -1
  297. package/lib/formatter/builder.js.map +0 -1
  298. package/lib/formatter/builtin/html.js.map +0 -1
  299. package/lib/formatter/builtin/index.js.map +0 -1
  300. package/lib/formatter/builtin/message.js.map +0 -1
  301. package/lib/formatter/create_stream.js.map +0 -1
  302. package/lib/formatter/find_class_or_plugin.js.map +0 -1
  303. package/lib/formatter/get_color_fns.js.map +0 -1
  304. package/lib/formatter/helpers/duration_helpers.js.map +0 -1
  305. package/lib/formatter/helpers/event_data_collector.js.map +0 -1
  306. package/lib/formatter/helpers/formatters.js.map +0 -1
  307. package/lib/formatter/helpers/gherkin_document_parser.js.map +0 -1
  308. package/lib/formatter/helpers/index.js.map +0 -1
  309. package/lib/formatter/helpers/issue_helpers.js.map +0 -1
  310. package/lib/formatter/helpers/keyword_type.js.map +0 -1
  311. package/lib/formatter/helpers/location_helpers.js.map +0 -1
  312. package/lib/formatter/helpers/pickle_parser.js.map +0 -1
  313. package/lib/formatter/helpers/step_argument_formatter.js.map +0 -1
  314. package/lib/formatter/helpers/summary_helpers.js.map +0 -1
  315. package/lib/formatter/helpers/test_case_attempt_formatter.js.map +0 -1
  316. package/lib/formatter/helpers/test_case_attempt_parser.js.map +0 -1
  317. package/lib/formatter/helpers/usage_helpers/index.js.map +0 -1
  318. package/lib/formatter/import_code.js.map +0 -1
  319. package/lib/formatter/index.js.map +0 -1
  320. package/lib/formatter/json_formatter.js.map +0 -1
  321. package/lib/formatter/progress_bar_formatter.d.ts +0 -18
  322. package/lib/formatter/progress_bar_formatter.js +0 -103
  323. package/lib/formatter/progress_bar_formatter.js.map +0 -1
  324. package/lib/formatter/progress_formatter.js.map +0 -1
  325. package/lib/formatter/rerun_formatter.js.map +0 -1
  326. package/lib/formatter/resolve_implementation.js.map +0 -1
  327. package/lib/formatter/snippets_formatter.js.map +0 -1
  328. package/lib/formatter/step_definition_snippet_builder/index.js.map +0 -1
  329. package/lib/formatter/step_definition_snippet_builder/javascript_snippet_syntax.js.map +0 -1
  330. package/lib/formatter/step_definition_snippet_builder/snippet_syntax.js.map +0 -1
  331. package/lib/formatter/summary_formatter.js.map +0 -1
  332. package/lib/formatter/usage_formatter.js.map +0 -1
  333. package/lib/formatter/usage_json_formatter.js.map +0 -1
  334. package/lib/index.js.map +0 -1
  335. package/lib/models/data_table.js.map +0 -1
  336. package/lib/models/definition.js.map +0 -1
  337. package/lib/models/gherkin_step_keyword.js.map +0 -1
  338. package/lib/models/step_definition.js.map +0 -1
  339. package/lib/models/test_case_hook_definition.js.map +0 -1
  340. package/lib/models/test_run_hook_definition.js.map +0 -1
  341. package/lib/models/test_step_hook_definition.js.map +0 -1
  342. package/lib/paths/index.js.map +0 -1
  343. package/lib/paths/paths.js.map +0 -1
  344. package/lib/paths/types.js.map +0 -1
  345. package/lib/pickle_filter.js.map +0 -1
  346. package/lib/plugin/index.js.map +0 -1
  347. package/lib/plugin/plugin_manager.js.map +0 -1
  348. package/lib/plugin/types.js.map +0 -1
  349. package/lib/publish/index.js.map +0 -1
  350. package/lib/publish/publish_plugin.js.map +0 -1
  351. package/lib/publish/types.js.map +0 -1
  352. package/lib/runtime/attachment_manager/index.js.map +0 -1
  353. package/lib/runtime/coordinator.js.map +0 -1
  354. package/lib/runtime/format_error.js.map +0 -1
  355. package/lib/runtime/helpers.js.map +0 -1
  356. package/lib/runtime/index.js.map +0 -1
  357. package/lib/runtime/make_runtime.js.map +0 -1
  358. package/lib/runtime/make_suggestion.js.map +0 -1
  359. package/lib/runtime/parallel/adapter.js.map +0 -1
  360. package/lib/runtime/parallel/run_worker.js +0 -25
  361. package/lib/runtime/parallel/run_worker.js.map +0 -1
  362. package/lib/runtime/parallel/types.js.map +0 -1
  363. package/lib/runtime/parallel/worker.d.ts +0 -25
  364. package/lib/runtime/parallel/worker.js +0 -83
  365. package/lib/runtime/parallel/worker.js.map +0 -1
  366. package/lib/runtime/scope/index.js.map +0 -1
  367. package/lib/runtime/scope/make_proxy.js.map +0 -1
  368. package/lib/runtime/scope/test_case_scope.js.map +0 -1
  369. package/lib/runtime/scope/test_run_scope.js.map +0 -1
  370. package/lib/runtime/serial/adapter.js.map +0 -1
  371. package/lib/runtime/step_runner.js.map +0 -1
  372. package/lib/runtime/stopwatch.js.map +0 -1
  373. package/lib/runtime/test_case_runner.js.map +0 -1
  374. package/lib/runtime/types.js.map +0 -1
  375. package/lib/runtime/worker.js.map +0 -1
  376. package/lib/sharding/index.js.map +0 -1
  377. package/lib/sharding/sharding_plugin.js.map +0 -1
  378. package/lib/step_arguments.js.map +0 -1
  379. package/lib/support_code_library_builder/build_parameter_type.js.map +0 -1
  380. package/lib/support_code_library_builder/context.js.map +0 -1
  381. package/lib/support_code_library_builder/get_definition_line_and_uri.js.map +0 -1
  382. package/lib/support_code_library_builder/index.js.map +0 -1
  383. package/lib/support_code_library_builder/parallel_can_assign_helpers.js.map +0 -1
  384. package/lib/support_code_library_builder/sourced_parameter_type_registry.js.map +0 -1
  385. package/lib/support_code_library_builder/types.js.map +0 -1
  386. package/lib/support_code_library_builder/validate_arguments.js.map +0 -1
  387. package/lib/support_code_library_builder/world.js.map +0 -1
  388. package/lib/time.js.map +0 -1
  389. package/lib/try_require.js.map +0 -1
  390. package/lib/tsconfig.node.tsbuildinfo +0 -1
  391. package/lib/types/index.js.map +0 -1
  392. package/lib/uncaught_exception_manager.js.map +0 -1
  393. package/lib/user_code_runner.js.map +0 -1
  394. package/lib/value_checker.js.map +0 -1
  395. package/lib/version.js.map +0 -1
  396. /package/lib/runtime/parallel/{run_worker.d.ts → worker.d.mts} +0 -0
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "gherkin",
9
9
  "tests"
10
10
  ],
11
- "version": "12.8.3",
11
+ "version": "13.0.0",
12
12
  "funding": "https://opencollective.com/cucumber",
13
13
  "homepage": "https://github.com/cucumber/cucumber-js",
14
14
  "author": "Julien Biezemans <jb@jbpros.com>",
@@ -129,6 +129,7 @@
129
129
  "Michael Zedeler <michael@zedeler.dk>",
130
130
  "Miika Hänninen <miika.hanninen@gmail.com>",
131
131
  "Mona Ghassemi (https://github.com/BlueMona)",
132
+ "Mykola Basov (https://github.com/m-basov)",
132
133
  "Namchee (https://github.com/Namchee)",
133
134
  "nebehr <thorgeir@tut.by>",
134
135
  "Nico Jansen <jansennico@gmail.com>",
@@ -146,6 +147,7 @@
146
147
  "please-rewrite <please-rewrite@users.noreply.github.com>",
147
148
  "plocket <plocket@users.noreply.github.com>",
148
149
  "Raphael Gaschignard (https://github.com/rtpg)",
150
+ "Ravi (https://github.com/rkdfx)",
149
151
  "Renier Morales <renier@morales-rodriguez.net>",
150
152
  "Ricardo Albuquerque (https://github.com/ricalbuquerque)",
151
153
  "Rick Lee-Morlang <rick@lee-morlang.com>",
@@ -213,61 +215,56 @@
213
215
  },
214
216
  "types": "./lib/index.d.ts",
215
217
  "engines": {
216
- "node": "20 || 22 || >=24"
218
+ "node": "22 || 24 || >=26"
217
219
  },
218
220
  "enginesTested": {
219
- "node": "20 || 22 || 24 || 25"
221
+ "node": "22 || 24 || 26"
220
222
  },
221
223
  "dependencies": {
222
224
  "@cucumber/ci-environment": "13.0.0",
223
- "@cucumber/cucumber-expressions": "19.0.0",
224
- "@cucumber/gherkin": "38.0.0",
225
+ "@cucumber/cucumber-expressions": "19.0.1",
226
+ "@cucumber/gherkin": "39.1.0",
225
227
  "@cucumber/gherkin-streams": "6.0.0",
226
228
  "@cucumber/gherkin-utils": "11.0.0",
227
229
  "@cucumber/html-formatter": "23.1.0",
228
230
  "@cucumber/junit-xml-formatter": "0.13.3",
229
231
  "@cucumber/message-streams": "4.1.1",
230
232
  "@cucumber/messages": "32.3.1",
231
- "@cucumber/pretty-formatter": "1.0.1",
233
+ "@cucumber/pretty-formatter": "3.3.1",
232
234
  "@cucumber/tag-expressions": "9.1.0",
233
235
  "assertion-error-formatter": "^3.0.0",
234
- "capital-case": "^1.0.4",
235
- "chalk": "^4.1.2",
236
236
  "cli-table3": "0.6.5",
237
- "commander": "^14.0.0",
237
+ "commander": "^15.0.0",
238
238
  "debug": "^4.3.4",
239
239
  "error-stack-parser": "^2.1.4",
240
- "figures": "^3.2.0",
241
- "glob": "^13.0.0",
242
- "has-ansi": "^4.0.1",
243
- "indent-string": "^4.0.0",
244
- "is-installed-globally": "^0.4.0",
245
- "is-stream": "^2.0.0",
240
+ "figures": "^6.0.0",
241
+ "has-ansi": "^6.0.0",
242
+ "indent-string": "^5.0.0",
243
+ "is-installed-globally": "^1.0.0",
244
+ "is-stream": "^4.0.0",
246
245
  "knuth-shuffle-seeded": "^1.0.6",
247
246
  "lodash.merge": "^4.6.2",
248
247
  "lodash.mergewith": "^4.6.2",
249
248
  "luxon": "3.7.2",
250
249
  "mkdirp": "^3.0.0",
251
- "mz": "^2.7.0",
252
- "progress": "^2.0.3",
253
250
  "read-package-up": "^12.0.0",
254
- "semver": "7.7.4",
255
- "string-argv": "0.3.1",
256
- "supports-color": "^8.1.1",
257
- "type-fest": "^4.41.0",
251
+ "semver": "7.8.1",
252
+ "string-argv": "0.3.2",
253
+ "supports-color": "^10.0.0",
254
+ "type-fest": "^5.0.0",
258
255
  "util-arity": "^1.1.0",
259
256
  "yaml": "^2.2.2",
260
257
  "yup": "1.7.1"
261
258
  },
262
259
  "devDependencies": {
263
- "@cucumber/compatibility-kit": "^28.0.0",
260
+ "@biomejs/biome": "^2.4.16",
261
+ "@cucumber/biome-config": "github:cucumber/biome-config#v0.2.0",
262
+ "@cucumber/compatibility-kit": "^29.0.0",
264
263
  "@cucumber/query": "^15.0.1",
265
- "@eslint/compat": "^2.0.0",
266
- "@eslint/eslintrc": "^3.3.1",
267
- "@eslint/js": "^9.29.0",
268
- "@microsoft/api-extractor": "7.58.5",
269
- "@sinonjs/fake-timers": "15.3.2",
270
- "@types/chai": "4.3.20",
264
+ "@microsoft/api-extractor": "7.58.7",
265
+ "@sinonjs/fake-timers": "15.4.0",
266
+ "@tsconfig/recommended": "^1.0.13",
267
+ "@types/chai": "5.2.3",
271
268
  "@types/debug": "4.1.13",
272
269
  "@types/dirty-chai": "2.0.5",
273
270
  "@types/express": "5.0.6",
@@ -278,64 +275,44 @@
278
275
  "@types/luxon": "3.7.1",
279
276
  "@types/mocha": "10.0.10",
280
277
  "@types/mustache": "4.2.6",
281
- "@types/mz": "2.7.9",
282
- "@types/node": "^20.11.25",
283
- "@types/progress": "2.0.7",
278
+ "@types/node": "^22.19.19",
284
279
  "@types/semver": "7.7.1",
285
- "@types/sinon-chai": "3.2.12",
286
- "@types/sinonjs__fake-timers": "15.0.1",
280
+ "@types/sinon-chai": "4.0.0",
287
281
  "@types/stream-buffers": "3.0.8",
288
282
  "@types/tmp": "0.2.6",
289
- "@typescript-eslint/eslint-plugin": "^8.34.0",
290
- "@typescript-eslint/parser": "^8.34.0",
291
- "chai": "4.5.0",
292
- "chai-exclude": "2.1.1",
283
+ "chai": "6.2.2",
284
+ "chai-exclude": "3.0.1",
293
285
  "coffeescript": "2.7.0",
294
- "dependency-lint": "7.1.0",
295
- "dirty-chai": "2.0.1",
296
- "eslint": "^9.29.0",
297
- "eslint-plugin-import": "^2.31.0",
298
- "eslint-plugin-n": "^17.20.0",
299
- "eslint-plugin-unicorn": "^63.0.0",
286
+ "dirty-chai": "3.0.0",
300
287
  "express": "^5.0.0",
301
- "fs-extra": "11.3.4",
288
+ "fs-extra": "11.3.5",
302
289
  "genversion": "3.2.0",
303
290
  "mocha": "^11.0.1",
304
291
  "mustache": "4.2.0",
305
292
  "nyc": "18.0.0",
306
- "prettier": "^3.5.3",
307
293
  "reindent-template-literals": "1.1.0",
308
294
  "shx": "0.4.0",
309
- "sinon": "21.1.2",
310
- "sinon-chai": "3.7.0",
295
+ "sinon": "22.0.0",
296
+ "sinon-chai": "4.0.1",
311
297
  "stream-to-string": "1.2.1",
312
- "tmp": "0.2.5",
313
- "ts-node": "10.9.2",
298
+ "tmp": "0.2.7",
314
299
  "tsd": "0.33.0",
315
- "typedoc": "^0.28.0",
316
- "typescript": "^5.8.3"
317
- },
318
- "overrides": {
319
- "ansi-regex": "^5.0.1"
300
+ "tsx": "^4.22.3",
301
+ "typedoc": "^0.28.19",
302
+ "typescript": "^6.0.0"
320
303
  },
321
304
  "scripts": {
322
- "build-local": "genversion --es6 src/version.ts && tsc --build tsconfig.node.json && shx cp src/wrapper.mjs lib/ && shx cp src/api/wrapper.mjs lib/api/",
305
+ "build-local": "genversion --es6 src/version.ts && tsc --build tsconfig.build.json && shx cp src/wrapper.mjs lib/ && shx cp src/api/wrapper.mjs lib/api/",
323
306
  "cck-test": "mocha \"compatibility/**/*_spec.ts\"",
324
307
  "exports-generate-docs": "typedoc",
325
308
  "exports-test": "api-extractor run --config exports/api/api-extractor.json --verbose && api-extractor run --config exports/root/api-extractor.json --verbose",
326
309
  "exports-update": "api-extractor run --config exports/api/api-extractor.json --verbose --local && api-extractor run --config exports/root/api-extractor.json --verbose --local",
327
310
  "feature-test": "node bin/cucumber.js",
328
- "lint-code-autofix": "eslint --fix \"{compatibility,example,features,scripts,src,test}/**/*.ts\"",
329
- "lint-code": "eslint \"{compatibility,example,features,scripts,src,test}/**/*.ts\"",
330
- "lint-dependencies": "dependency-lint",
331
- "lint-format-autofix": "prettier --write .",
332
- "lint-format": "prettier --check .",
333
- "lint": "npm run lint-code && npm run lint-format && npm run lint-dependencies",
311
+ "fix": "biome check --fix --error-on-warnings",
312
+ "lint": "biome check --error-on-warnings",
334
313
  "preexports-generate-docs": "npm run build-local",
335
314
  "preexports-test": "npm run build-local",
336
315
  "preexports-update": "npm run build-local",
337
- "prelint-autofix": "npm run build-local",
338
- "prelint-code": "npm run build-local",
339
316
  "precck-test": "npm run build-local",
340
317
  "prefeature-test": "npm run build-local",
341
318
  "prepublishOnly": "rm -rf lib && npm run build-local",
@@ -1 +0,0 @@
1
- {"version":3,"file":"convert_configuration.js","sourceRoot":"","sources":["../../src/api/convert_configuration.ts"],"names":[],"mappings":";;AASA,oDAoCC;AA7CD,oDAIyB;AAKlB,KAAK,UAAU,oBAAoB,CACxC,MAAe,EACf,iBAAiC,EACjC,GAAsB;IAEtB,OAAO;QACL,OAAO,EAAE;YACP,KAAK,EAAE,iBAAiB,CAAC,KAAK;YAC9B,cAAc,EAAE,iBAAiB,CAAC,QAAQ;YAC1C,KAAK,EAAE,iBAAiB,CAAC,IAAI;YAC7B,aAAa,EAAE,iBAAiB,CAAC,IAAI;YACrC,KAAK,EAAE,iBAAiB,CAAC,KAAK;YAC9B,KAAK,EAAE,iBAAiB,CAAC,KAAK;SAC/B;QACD,OAAO,EAAE;YACP,cAAc,EAAE,iBAAiB,CAAC,aAAa;YAC/C,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,CAAC;aAChC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE;YACjC,OAAO;gBACL,GAAG,MAAM;gBACT,CAAC,MAAM,CAAC,EAAE,IAAI;aACf,CAAA;QACH,CAAC,EAAE,EAAE,CAAC;QACR,OAAO,EAAE,iBAAiB,CAAC,iBAAiB,EAAE,GAAG,CAAC;QAClD,OAAO,EAAE,iBAAiB,CAAC,aAAa;KACzC,CAAA;AACH,CAAC;AAED,SAAS,iBAAiB,CACxB,iBAAiC,EACjC,GAAsB;IAEtB,MAAM,OAAO,GAAG,YAAY,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAA;IACpD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO;QACL,GAAG,EAAE,GAAG,CAAC,oBAAoB;QAC7B,KAAK,EAAE,GAAG,CAAC,sBAAsB;KAClC,CAAA;AACH,CAAC;AAED,SAAS,YAAY,CACnB,iBAAiC,EACjC,GAAsB;IAEtB,OAAO,CACL,iBAAiB,CAAC,OAAO;QACzB,IAAA,8BAAc,EAAC,GAAG,CAAC,wBAAwB,CAAC;QAC5C,GAAG,CAAC,sBAAsB,KAAK,SAAS,CACzC,CAAA;AACH,CAAC","sourcesContent":["import {\n IConfiguration,\n isTruthyString,\n splitFormatDescriptor,\n} from '../configuration'\nimport { IPublishConfig } from '../publish'\nimport { ILogger } from '../environment'\nimport { IRunConfiguration } from './types'\n\nexport async function convertConfiguration(\n logger: ILogger,\n flatConfiguration: IConfiguration,\n env: NodeJS.ProcessEnv\n): Promise<IRunConfiguration> {\n return {\n sources: {\n paths: flatConfiguration.paths,\n defaultDialect: flatConfiguration.language,\n names: flatConfiguration.name,\n tagExpression: flatConfiguration.tags,\n order: flatConfiguration.order,\n shard: flatConfiguration.shard,\n },\n support: {\n requireModules: flatConfiguration.requireModule,\n requirePaths: flatConfiguration.require,\n importPaths: flatConfiguration.import,\n loaders: flatConfiguration.loader,\n },\n runtime: {\n dryRun: flatConfiguration.dryRun,\n failFast: flatConfiguration.failFast,\n filterStacktraces: !flatConfiguration.backtrace,\n parallel: flatConfiguration.parallel,\n retry: flatConfiguration.retry,\n retryTagFilter: flatConfiguration.retryTagFilter,\n strict: flatConfiguration.strict,\n worldParameters: flatConfiguration.worldParameters,\n },\n formats: convertFormats(logger, flatConfiguration, env),\n plugins: {\n specifiers: flatConfiguration.plugin,\n options: flatConfiguration.pluginOptions,\n },\n }\n}\n\nfunction convertFormats(\n logger: ILogger,\n flatConfiguration: IConfiguration,\n env: NodeJS.ProcessEnv\n) {\n const splitFormats: string[][] = flatConfiguration.format.map((item) =>\n Array.isArray(item) ? item : splitFormatDescriptor(logger, item)\n )\n return {\n stdout:\n [...splitFormats].reverse().find(([, target]) => !target)?.[0] ??\n 'progress',\n files: splitFormats\n .filter(([, target]) => !!target)\n .reduce((mapped, [type, target]) => {\n return {\n ...mapped,\n [target]: type,\n }\n }, {}),\n publish: makePublishConfig(flatConfiguration, env),\n options: flatConfiguration.formatOptions,\n }\n}\n\nfunction makePublishConfig(\n flatConfiguration: IConfiguration,\n env: NodeJS.ProcessEnv\n): IPublishConfig | false {\n const enabled = isPublishing(flatConfiguration, env)\n if (!enabled) {\n return false\n }\n return {\n url: env.CUCUMBER_PUBLISH_URL,\n token: env.CUCUMBER_PUBLISH_TOKEN,\n }\n}\n\nfunction isPublishing(\n flatConfiguration: IConfiguration,\n env: NodeJS.ProcessEnv\n): boolean {\n return (\n flatConfiguration.publish ||\n isTruthyString(env.CUCUMBER_PUBLISH_ENABLED) ||\n env.CUCUMBER_PUBLISH_TOKEN !== undefined\n )\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"emit_support_code_messages.js","sourceRoot":"","sources":["../../src/api/emit_support_code_messages.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,0CA0BC;AA+GD,0DAuBC;AA7KD,sDA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AAO,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAA;IAEzE,kBAAkB,CAAC,uBAAuB;SACvC,GAAG,CAAC,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;QAChC,sBAAsB;KACvB,CAAC,CAAC;SACF,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAA;AACvE,CAAC","sourcesContent":["import { EventEmitter } from 'node:events'\nimport os from 'node:os'\nimport * as messages from '@cucumber/messages'\nimport { Envelope, HookType, IdGenerator } from '@cucumber/messages'\nimport detectCiEnvironment from '@cucumber/ci-environment'\nimport { SupportCodeLibrary } from '../support_code_library_builder/types'\nimport { version } from '../version'\nimport { ILineAndUri } from '../types'\n\ninterface OrderedEnvelope {\n order: number\n envelope: messages.Envelope\n}\n\nexport async function emitMetaMessage(\n eventBroadcaster: EventEmitter,\n env: NodeJS.ProcessEnv\n): Promise<void> {\n const meta: messages.Meta = {\n protocolVersion: messages.version,\n implementation: {\n version,\n name: 'cucumber-js',\n },\n cpu: {\n name: os.arch(),\n },\n os: {\n name: os.platform(),\n version: os.release(),\n },\n runtime: {\n name: 'node.js',\n version: process.versions.node,\n },\n ci: detectCiEnvironment(env),\n }\n eventBroadcaster.emit('envelope', {\n meta,\n })\n}\n\nfunction makeSourceReference(source: ILineAndUri) {\n return {\n uri: source.uri,\n location: {\n line: source.line,\n },\n }\n}\n\nfunction extractPatternSource(pattern: string | RegExp) {\n if (pattern instanceof RegExp) {\n return pattern.flags ? pattern.toString() : pattern.source\n }\n return pattern\n}\n\nfunction collectParameterTypeEnvelopes(\n supportCodeLibrary: SupportCodeLibrary,\n newId: IdGenerator.NewId\n): ReadonlyArray<OrderedEnvelope> {\n const ordered: Array<OrderedEnvelope> = []\n for (const parameterType of supportCodeLibrary.parameterTypeRegistry\n .parameterTypes) {\n if (parameterType.builtin) {\n continue\n }\n const source =\n supportCodeLibrary.parameterTypeRegistry.lookupSource(parameterType)\n ordered.push({\n order: source.order,\n envelope: {\n parameterType: {\n id: newId(),\n name: parameterType.name,\n preferForRegularExpressionMatch: parameterType.preferForRegexpMatch,\n regularExpressions: parameterType.regexpStrings,\n useForSnippets: parameterType.useForSnippets,\n sourceReference: makeSourceReference(source),\n },\n },\n })\n }\n return ordered\n}\n\nfunction collectStepDefinitionEnvelopes(\n supportCodeLibrary: SupportCodeLibrary\n): ReadonlyArray<OrderedEnvelope> {\n return supportCodeLibrary.stepDefinitions.map((stepDefinition) => ({\n order: stepDefinition.order,\n envelope: {\n stepDefinition: {\n id: stepDefinition.id,\n pattern: {\n source: extractPatternSource(stepDefinition.pattern),\n type:\n typeof stepDefinition.pattern === 'string'\n ? messages.StepDefinitionPatternType.CUCUMBER_EXPRESSION\n : messages.StepDefinitionPatternType.REGULAR_EXPRESSION,\n },\n sourceReference: makeSourceReference(stepDefinition),\n },\n },\n }))\n}\n\nfunction collectHookEnvelopes(\n supportCodeLibrary: SupportCodeLibrary\n): ReadonlyArray<OrderedEnvelope> {\n const allHooks = [\n [\n supportCodeLibrary.beforeTestCaseHookDefinitions,\n HookType.BEFORE_TEST_CASE,\n ] as const,\n [\n supportCodeLibrary.afterTestCaseHookDefinitions,\n HookType.AFTER_TEST_CASE,\n ] as const,\n [\n supportCodeLibrary.beforeTestRunHookDefinitions,\n HookType.BEFORE_TEST_RUN,\n ] as const,\n [\n supportCodeLibrary.afterTestRunHookDefinitions,\n HookType.AFTER_TEST_RUN,\n ] as const,\n ]\n const ordered: Array<OrderedEnvelope> = []\n allHooks.forEach(([hooks, type]) => {\n hooks.forEach((hook) => {\n ordered.push({\n order: hook.order,\n envelope: {\n hook: {\n id: hook.id,\n type,\n name: hook.name,\n ...('tagExpression' in hook && {\n tagExpression: hook.tagExpression,\n }),\n sourceReference: makeSourceReference(hook),\n },\n } satisfies Envelope,\n })\n })\n })\n return ordered\n}\n\nexport function emitSupportCodeMessages({\n eventBroadcaster,\n supportCodeLibrary,\n newId,\n}: {\n eventBroadcaster: EventEmitter\n supportCodeLibrary: SupportCodeLibrary\n newId: IdGenerator.NewId\n}): void {\n const orderedEnvelopes = [\n ...collectParameterTypeEnvelopes(supportCodeLibrary, newId),\n ...collectStepDefinitionEnvelopes(supportCodeLibrary),\n ...collectHookEnvelopes(supportCodeLibrary),\n ]\n orderedEnvelopes\n .sort((a, b) => a.order - b.order)\n .forEach(({ envelope }) => eventBroadcaster.emit('envelope', envelope))\n\n supportCodeLibrary.undefinedParameterTypes\n .map((undefinedParameterType) => ({\n undefinedParameterType,\n }))\n .forEach((envelope) => eventBroadcaster.emit('envelope', envelope))\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../src/api/formatters.ts"],"names":[],"mappings":";;;;;AAaA,oDAuFC;AAnGD,yCAAqC;AAKrC,mEAAmD;AAEnD,8DAAyD;AACzD,gFAA2E;AAIpE,KAAK,UAAU,oBAAoB,CAAC,EACzC,GAAG,EACH,GAAG,EACH,MAAM,EACN,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,aAAa,GAad;IACC,MAAM,UAAU,GAA+B,EAAE,CAAA;IAEjD,KAAK,UAAU,mBAAmB,CAChC,MAAwB,EACxB,SAA6B,EAC7B,MAAc,EACd,SAAiB;QAEjB,IAAI,SAAS,KAAK,cAAc,IAAI,CAAE,MAAyB,CAAC,KAAK,EAAE,CAAC;YACtE,MAAM,CAAC,IAAI,CACT,sDAAsD,MAAM,oDAAoD,CACjH,CAAA;YACD,SAAS,GAAG,UAAU,CAAA;QACxB,CAAC;QACD,MAAM,cAAc,GAAG,MAAM,IAAA,8CAAqB,EAAC,SAAS,EAAE,GAAG,CAAC,CAAA;QAClE,IAAI,OAAO,cAAc,KAAK,UAAU,EAAE,CAAC;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AAM,IAAA,4BAAY,EAC9C,MAAM,EACN,aAAa,EACb,GAAG,EACH,MAAM,CACP,CAAA;QACD,MAAM,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,CAAA;IACjE,CAAC;IAED,OAAO,KAAK;QACV,MAAM,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;IAC/D,CAAC,CAAA;AACH,CAAC","sourcesContent":["import { EventEmitter } from 'node:events'\nimport { promisify } from 'node:util'\nimport { WriteStream as TtyWriteStream } from 'node:tty'\nimport { IFormatterStream } from '../formatter'\nimport { EventDataCollector } from '../formatter/helpers'\nimport { SupportCodeLibrary } from '../support_code_library_builder/types'\nimport FormatterBuilder from '../formatter/builder'\nimport { ILogger } from '../environment'\nimport { createStream } from '../formatter/create_stream'\nimport { resolveImplementation } from '../formatter/resolve_implementation'\nimport { PluginManager } from '../plugin'\nimport { IRunOptionsFormats } from './types'\n\nexport async function initializeFormatters({\n env,\n cwd,\n stdout,\n logger,\n onStreamError,\n eventBroadcaster,\n eventDataCollector,\n configuration,\n supportCodeLibrary,\n pluginManager,\n}: {\n env: NodeJS.ProcessEnv\n cwd: string\n stdout: IFormatterStream\n stderr: IFormatterStream\n logger: ILogger\n onStreamError: () => void\n eventBroadcaster: EventEmitter\n eventDataCollector: EventDataCollector\n configuration: IRunOptionsFormats\n supportCodeLibrary: SupportCodeLibrary\n pluginManager: PluginManager\n}): Promise<() => Promise<void>> {\n const cleanupFns: Array<() => Promise<void>> = []\n\n async function initializeFormatter(\n stream: IFormatterStream,\n directory: string | undefined,\n target: string,\n specifier: string\n ): Promise<void> {\n if (specifier === 'progress-bar' && !(stream as TtyWriteStream).isTTY) {\n logger.warn(\n `Cannot use 'progress-bar' formatter for output to '${target}' as not a TTY. Switching to 'progress' formatter.`\n )\n specifier = 'progress'\n }\n const implementation = await resolveImplementation(specifier, cwd)\n if (typeof implementation === 'function') {\n const typeOptions = {\n env,\n cwd,\n eventBroadcaster,\n eventDataCollector,\n log: stream.write.bind(stream),\n parsedArgvOptions: configuration.options,\n stream,\n cleanup:\n stream === stdout\n ? async () => await Promise.resolve()\n : promisify<any>(stream.end.bind(stream)),\n supportCodeLibrary,\n }\n const formatter = await FormatterBuilder.build(\n implementation,\n typeOptions\n )\n cleanupFns.push(async () => formatter.finished())\n } else {\n await pluginManager.initFormatter(\n implementation,\n configuration.options,\n stream,\n stream.write.bind(stream),\n directory\n )\n if (stream !== stdout) {\n cleanupFns.push(promisify<any>(stream.end.bind(stream)))\n }\n }\n }\n\n await initializeFormatter(stdout, undefined, 'stdout', configuration.stdout)\n for (const [target, specifier] of Object.entries(configuration.files)) {\n const { stream, directory } = await createStream(\n target,\n onStreamError,\n cwd,\n logger\n )\n await initializeFormatter(stream, directory, target, specifier)\n }\n\n return async function () {\n await Promise.all(cleanupFns.map((cleanupFn) => cleanupFn()))\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"gherkin.js","sourceRoot":"","sources":["../../src/api/gherkin.ts"],"names":[],"mappings":";;AASA,kDAkDC;AA3DD,+DAGkC;AAElC,2DAA+D;AAIxD,KAAK,UAAU,mBAAmB,CAAC,EACxC,KAAK,EACL,GAAG,EACH,WAAW,EACX,WAAW,EACX,UAAU,GAOX;IAIC,MAAM,YAAY,GAAG,IAAI,qBAAY,EAAE,CAAA;IACvC,MAAM,WAAW,GAAiB,EAAE,CAAA;IACpC,MAAM,gBAAgB,CACpB,WAAW,EACX;QACE,KAAK;QACL,UAAU,EAAE,GAAG;QACf,cAAc,EAAE,WAAW,CAAC,cAAc;KAC3C,EACD,CAAC,QAAQ,EAAE,EAAE;QACX,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;QAC7B,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;YACxB,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;QACvC,CAAC;QACD,UAAU,EAAE,CAAC,QAAQ,CAAC,CAAA;IACxB,CAAC,CACF,CAAA;IACD,MAAM,iBAAiB,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACjE,MAAM,eAAe,GAAG,YAAY;aACjC,mBAAmB,EAAE;aACrB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,CAAA;QACxC,MAAM,QAAQ,GAAG,YAAY,CAAC,WAAW,CACvC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAChD,CAAA;QACD,OAAO;YACL,eAAe;YACf,QAAQ;YACR,MAAM;SACP,CAAA;IACH,CAAC,CAAC,CAAA;IACF,OAAO;QACL,iBAAiB;QACjB,WAAW;KACZ,CAAA;AACH,CAAC;AAED,KAAK,UAAU,gBAAgB,CAC7B,KAAe,EACf,OAA8B,EAC9B,UAAwC;IAExC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,oBAAoB,GAAG,gCAAc,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QACrE,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;QAC3C,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QACvC,oBAAoB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import {\n GherkinStreams,\n IGherkinStreamOptions,\n} from '@cucumber/gherkin-streams'\nimport { Envelope, IdGenerator, ParseError } from '@cucumber/messages'\nimport { Query as GherkinQuery } from '@cucumber/gherkin-utils'\nimport { IFilterablePickle } from '../filter'\nimport { ISourcesCoordinates } from './types'\n\nexport async function getPicklesAndErrors({\n newId,\n cwd,\n sourcePaths,\n coordinates,\n onEnvelope,\n}: {\n newId: IdGenerator.NewId\n cwd: string\n sourcePaths: string[]\n coordinates: ISourcesCoordinates\n onEnvelope?: (envelope: Envelope) => void\n}): Promise<{\n filterablePickles: readonly IFilterablePickle[]\n parseErrors: ParseError[]\n}> {\n const gherkinQuery = new GherkinQuery()\n const parseErrors: ParseError[] = []\n await gherkinFromPaths(\n sourcePaths,\n {\n newId,\n relativeTo: cwd,\n defaultDialect: coordinates.defaultDialect,\n },\n (envelope) => {\n gherkinQuery.update(envelope)\n if (envelope.parseError) {\n parseErrors.push(envelope.parseError)\n }\n onEnvelope?.(envelope)\n }\n )\n const filterablePickles = gherkinQuery.getPickles().map((pickle) => {\n const gherkinDocument = gherkinQuery\n .getGherkinDocuments()\n .find((doc) => doc.uri === pickle.uri)\n const location = gherkinQuery.getLocation(\n pickle.astNodeIds[pickle.astNodeIds.length - 1]\n )\n return {\n gherkinDocument,\n location,\n pickle,\n }\n })\n return {\n filterablePickles,\n parseErrors,\n }\n}\n\nasync function gherkinFromPaths(\n paths: string[],\n options: IGherkinStreamOptions,\n onEnvelope: (envelope: Envelope) => void\n): Promise<void> {\n return new Promise((resolve, reject) => {\n const gherkinMessageStream = GherkinStreams.fromPaths(paths, options)\n gherkinMessageStream.on('data', onEnvelope)\n gherkinMessageStream.on('end', resolve)\n gherkinMessageStream.on('error', reject)\n })\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;AAoBH,uDAAoC;AACpC,iDAA8B;AAC9B,iDAA8B;AAC9B,iDAA8B;AAC9B,0CAAuB","sourcesContent":["/**\n * JavaScript API for running and extending Cucumber\n *\n * @packageDocumentation\n * @module api\n * @remarks\n * These docs cover the API used for running Cucumber programmatically. The entry point is `@cucumber/cucumber/api`.\n */\n\nexport { IConfiguration } from '../configuration'\nexport { ILogger, IRunEnvironment } from '../environment'\nexport { IFilterablePickle, IPickleOrder } from '../filter'\nexport { IResolvedPaths } from '../paths'\nexport {\n CoordinatorEventKey,\n CoordinatorEventValues,\n CoordinatorEventHandler,\n CoordinatorTransformKey,\n CoordinatorTransformValues,\n CoordinatorTransformer,\n CoordinatorContext,\n CoordinatorEnvironment,\n Plugin,\n PluginCleanup,\n PluginOperation,\n} from '../plugin'\nexport { IPublishConfig } from '../publish'\nexport * from './load_configuration'\nexport * from './load_sources'\nexport * from './load_support'\nexport * from './run_cucumber'\nexport * from './types'\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"load_configuration.js","sourceRoot":"","sources":["../../src/api/load_configuration.ts"],"names":[],"mappings":";;AAmBA,8CAgDC;AAnED,8DAAyD;AACzD,oDAMyB;AACzB,gDAAiE;AACjE,mEAA8D;AAG9D;;;;;;GAMG;AACI,KAAK,UAAU,iBAAiB,CACrC,UAAqC,EAAE,EACvC,cAA+B,EAAE;IAEjC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAA,6BAAe,EAAC,WAAW,CAAC,CAAA;IACzD,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,IAAI,IAAA,wBAAU,EAAC,GAAG,CAAC,CAAA;IAClD,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,sCAAsC,UAAU,GAAG,CAAC,CAAA;IACnE,CAAC;SAAM,IAAI,UAAU,KAAK,KAAK,EAAE,CAAC;QAChC,MAAM,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAA;IACxD,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAA;IAC7C,CAAC;IACD,MAAM,oBAAoB,GAAG,UAAU;QACrC,CAAC,CAAC,MAAM,IAAA,wBAAQ,EAAC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC;QAC3D,CAAC,CAAC,EAAE,CAAA;IACN,MAAM,qBAAqB,GAAG,IAAA,kCAAkB,EAC9C,MAAM,EACN,UAAU,EACV,OAAO,CAAC,QAAQ,CACjB,CAAA;IACD,IACE,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC;QACtC,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,EACvC,CAAC;QACD,MAAM,WAAW,GAAG,oBAAoB,CAAC,KAAK,CAAA;QAC9C,MAAM,QAAQ,GAAG,qBAAqB,CAAC,KAAK,CAAA;QAC5C,MAAM,WAAW,GAAG,CAAC,GAAG,WAAW,EAAE,GAAG,QAAQ,CAAC,CAAA;QACjD,MAAM,CAAC,IAAI,CACT,kFAAkF;YAChF,6GAA6G;YAC7G,0GAA0G;YAC1G,yBAAyB,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YACnD,yBAAyB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACjD,CAAA;IACH,CAAC;IACD,MAAM,QAAQ,GAAG,IAAA,mCAAmB,EAClC,qCAAqB,EACrB,oBAAoB,EACpB,qBAAqB,CACtB,CAAA;IACD,MAAM,CAAC,KAAK,CAAC,yBAAyB,EAAE,QAAQ,CAAC,CAAA;IACjD,IAAA,qCAAqB,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;IACvC,MAAM,QAAQ,GAAG,MAAM,IAAA,4CAAoB,EAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAA;IAClE,OAAO;QACL,gBAAgB,EAAE,QAAQ;QAC1B,gBAAgB,EAAE,QAAQ;KAC3B,CAAA;AACH,CAAC","sourcesContent":["import { locateFile } from '../configuration/locate_file'\nimport {\n DEFAULT_CONFIGURATION,\n fromFile,\n mergeConfigurations,\n parseConfiguration,\n validateConfiguration,\n} from '../configuration'\nimport { IRunEnvironment, makeEnvironment } from '../environment'\nimport { convertConfiguration } from './convert_configuration'\nimport { ILoadConfigurationOptions, IResolvedConfiguration } from './types'\n\n/**\n * Load user-authored configuration to be used in a test run\n *\n * @public\n * @param options - Coordinates required to find configuration\n * @param environment - Project environment\n */\nexport async function loadConfiguration(\n options: ILoadConfigurationOptions = {},\n environment: IRunEnvironment = {}\n): Promise<IResolvedConfiguration> {\n const { cwd, env, logger } = makeEnvironment(environment)\n const configFile = options.file ?? locateFile(cwd)\n if (configFile) {\n logger.debug(`Configuration will be loaded from \"${configFile}\"`)\n } else if (configFile === false) {\n logger.debug('Skipping configuration file resolution')\n } else {\n logger.debug('No configuration file found')\n }\n const profileConfiguration = configFile\n ? await fromFile(logger, cwd, configFile, options.profiles)\n : {}\n const providedConfiguration = parseConfiguration(\n logger,\n 'Provided',\n options.provided\n )\n if (\n profileConfiguration.paths?.length > 0 &&\n providedConfiguration.paths?.length > 0\n ) {\n const configPaths = profileConfiguration.paths\n const cliPaths = providedConfiguration.paths\n const mergedPaths = [...configPaths, ...cliPaths]\n logger.warn(\n `You have specified paths in both your configuration file and as CLI arguments.\\n` +\n `In a future major version, the CLI argument will override the configuration file instead of being merged.\\n` +\n `To prepare for this change, see https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md\\n` +\n ` Current result: ${mergedPaths.join(', ')}\\n` +\n ` Future result: ${cliPaths.join(', ')}`\n )\n }\n const original = mergeConfigurations(\n DEFAULT_CONFIGURATION,\n profileConfiguration,\n providedConfiguration\n )\n logger.debug('Resolved configuration:', original)\n validateConfiguration(original, logger)\n const runnable = await convertConfiguration(logger, original, env)\n return {\n useConfiguration: original,\n runConfiguration: runnable,\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"load_sources.js","sourceRoot":"","sources":["../../src/api/load_sources.ts"],"names":[],"mappings":";;AAoBA,kCAoDC;AAxED,iDAAgD;AAChD,oCAAuC;AACvC,gDAAiE;AAOjE,uCAA+C;AAC/C,uCAAoD;AAEpD;;;;;;;GAOG;AACI,KAAK,UAAU,WAAW,CAC/B,WAAgC,EAChC,cAA+B,E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AAM,MAAM,GAAoB,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;QACtE,OAAO;YACL,GAAG,EAAE,MAAM,CAAC,GAAG;YACf,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,OAAO;SACR,CAAA;IACH,CAAC,CAAC,CAAA;IACF,MAAM,aAAa,CAAC,OAAO,EAAE,CAAA;IAC7B,OAAO;QACL,IAAI;QACJ,MAAM;KACP,CAAA;AACH,CAAC","sourcesContent":["import { IdGenerator } from '@cucumber/messages'\nimport { resolvePaths } from '../paths'\nimport { IRunEnvironment, makeEnvironment } from '../environment'\nimport {\n ILoadSourcesResult,\n IPlannedPickle,\n ISourcesCoordinates,\n ISourcesError,\n} from './types'\nimport { getPicklesAndErrors } from './gherkin'\nimport { initializeForLoadSources } from './plugins'\n\n/**\n * Load and parse features, produce a filtered and ordered test plan and/or\n * parse errors\n *\n * @public\n * @param coordinates - Coordinates required to find and process features\n * @param environment - Project environment\n */\nexport async function loadSources(\n coordinates: ISourcesCoordinates,\n environment: IRunEnvironment = {}\n): Promise<ILoadSourcesResult> {\n const mergedEnvironment = makeEnvironment(environment)\n const { cwd, logger } = mergedEnvironment\n const newId = IdGenerator.uuid()\n const pluginManager = await initializeForLoadSources(\n coordinates,\n mergedEnvironment\n )\n const resolvedPaths = await resolvePaths(logger, cwd, coordinates)\n pluginManager.emit('paths:resolve', resolvedPaths)\n const { sourcePaths } = resolvedPaths\n if (sourcePaths.length === 0) {\n return {\n plan: [],\n errors: [],\n }\n }\n const { filterablePickles, parseErrors } = await getPicklesAndErrors({\n newId,\n cwd,\n sourcePaths,\n coordinates,\n onEnvelope: (envelope) => pluginManager.emit('message', envelope),\n })\n const filteredPickles = await pluginManager.transform(\n 'pickles:filter',\n filterablePickles\n )\n const orderedPickles = await pluginManager.transform(\n 'pickles:order',\n filteredPickles\n )\n const plan: IPlannedPickle[] = orderedPickles.map(({ location, pickle }) => ({\n name: pickle.name,\n uri: pickle.uri,\n location,\n }))\n const errors: ISourcesError[] = parseErrors.map(({ source, message }) => {\n return {\n uri: source.uri,\n location: source.location,\n message,\n }\n })\n await pluginManager.cleanup()\n return {\n plan,\n errors,\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"load_support.js","sourceRoot":"","sources":["../../src/api/load_support.ts"],"names":[],"mappings":";;AAcA,kCAoCC;AAlDD,iDAAgD;AAChD,oCAAuC;AACvC,gDAAiE;AAEjE,uCAAiD;AACjD,uCAAoD;AAEpD;;;;;;GAMG;AACI,KAAK,UAAU,WAAW,CAC/B,OAA4B,EAC5B,cAA+B,EAAE;IAEjC,MAAM,iBAAiB,GAAG,IAAA,6BAAe,EAAC,WAAW,CAAC,CAAA;IACtD,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,iBAAiB,CAAA;IACzC,MAAM,KAAK,GAAG,sBAAW,CAAC,IAAI,EAAE,CAAA;IAChC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CACtC;QACE,cAAc,EAAE,EAAE;QAClB,YAAY,EAAE,EAAE;QAChB,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,EAAE;KAChB,EACD,OAAO,CAAC,OAAO,CAChB,CAAA;IACD,MAAM,aAAa,GAAG,MAAM,IAAA,kCAAwB,EAAC,iBAAiB,CAAC,CAAA;IACvE,MAAM,aAAa,GAAG,MAAM,IAAA,oBAAY,EACtC,MAAM,EACN,GAAG,EACH,OAAO,CAAC,OAAO,EACf,kBAAkB,CACnB,CAAA;IACD,aAAa,CAAC,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC,CAAA;IAClD,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,aAAa,CAAA;IACnD,MAAM,kBAAkB,GAAG,MAAM,IAAA,+BAAqB,EAAC;QACrD,MAAM;QACN,GAAG;QACH,KAAK;QACL,cAAc,EAAE,kBAAkB,CAAC,cAAc;QACjD,YAAY;QACZ,OAAO,EAAE,kBAAkB,CAAC,OAAO;QACnC,WAAW;KACZ,CAAC,CAAA;IACF,MAAM,aAAa,CAAC,OAAO,EAAE,CAAA;IAC7B,OAAO,kBAAkB,CAAA;AAC3B,CAAC","sourcesContent":["import { IdGenerator } from '@cucumber/messages'\nimport { resolvePaths } from '../paths'\nimport { IRunEnvironment, makeEnvironment } from '../environment'\nimport { ILoadSupportOptions, ISupportCodeLibrary } from './types'\nimport { getSupportCodeLibrary } from './support'\nimport { initializeForLoadSupport } from './plugins'\n\n/**\n * Load support code for use in test runs\n *\n * @public\n * @param options - Options required to find the support code\n * @param environment - Project environment\n */\nexport async function loadSupport(\n options: ILoadSupportOptions,\n environment: IRunEnvironment = {}\n): Promise<ISupportCodeLibrary> {\n const mergedEnvironment = makeEnvironment(environment)\n const { cwd, logger } = mergedEnvironment\n const newId = IdGenerator.uuid()\n const supportCoordinates = Object.assign(\n {\n requireModules: [],\n requirePaths: [],\n loaders: [],\n importPaths: [],\n },\n options.support\n )\n const pluginManager = await initializeForLoadSupport(mergedEnvironment)\n const resolvedPaths = await resolvePaths(\n logger,\n cwd,\n options.sources,\n supportCoordinates\n )\n pluginManager.emit('paths:resolve', resolvedPaths)\n const { requirePaths, importPaths } = resolvedPaths\n const supportCodeLibrary = await getSupportCodeLibrary({\n logger,\n cwd,\n newId,\n requireModules: supportCoordinates.requireModules,\n requirePaths,\n loaders: supportCoordinates.loaders,\n importPaths,\n })\n await pluginManager.cleanup()\n return supportCodeLibrary\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../src/api/plugins.ts"],"names":[],"mappings":";;;;;AAqDA,4DAQC;AAED,4DAKC;AAED,4DAmCC;AAzGD,uCAAwC;AACxC,0DAA4B;AAE5B,uDAAoC;AACpC,sCAAiD;AACjD,yDAAsC;AACtC,2DAAwC;AACxC,oDAAmD;AAGnD,KAAK,UAAU,YAAY,CAAC,SAAiB,EAAE,GAAW;IACxD,IAAI,CAAC;QACH,IAAI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AC7B,SAAS,CACV,CAAA;QACH,CAAC;IACH,CAAC;IAED,OAAO,aAAa,CAAA;AACtB,CAAC","sourcesContent":["import { pathToFileURL } from 'node:url'\nimport path from 'node:path'\nimport { UsableEnvironment } from '../environment'\nimport filterPlugin from '../filter'\nimport { PluginManager, Plugin } from '../plugin'\nimport publishPlugin from '../publish'\nimport shardingPlugin from '../sharding'\nimport { doesNotHaveValue } from '../value_checker'\nimport { IRunConfiguration, ISourcesCoordinates } from './types'\n\nasync function importPlugin(specifier: string, cwd: string): Promise<any> {\n try {\n let normalized: URL | string = specifier\n if (specifier.startsWith('.')) {\n normalized = pathToFileURL(path.resolve(cwd, specifier))\n } else if (specifier.startsWith('file://')) {\n normalized = new URL(specifier)\n }\n return await import(normalized.toString())\n } catch (e) {\n throw new Error(`Failed to import plugin ${specifier}`, {\n cause: e,\n })\n }\n}\n\nfunction findPlugin(imported: any): Plugin | null {\n return findPluginRecursive(imported, 3)\n}\n\nfunction findPluginRecursive(thing: any, depth: number): Plugin | null {\n if (doesNotHaveValue(thing)) {\n return null\n }\n if (typeof thing === 'object' && thing.type === 'plugin') {\n return thing\n }\n depth--\n if (depth > 0) {\n return findPluginRecursive(thing.default, depth)\n }\n return null\n}\n\nasync function loadPlugin(specifier: string, cwd: string): Promise<Plugin> {\n const imported = await importPlugin(specifier, cwd)\n const found = findPlugin(imported)\n if (!found) {\n throw new Error(`${specifier} does not export a plugin`)\n }\n return found\n}\n\nexport async function initializeForLoadSources(\n coordinates: ISourcesCoordinates,\n environment: UsableEnvironment\n): Promise<PluginManager> {\n // eventually we'll load plugin packages here\n const pluginManager = new PluginManager(environment)\n await pluginManager.initCoordinator('loadSources', filterPlugin, coordinates)\n return pluginManager\n}\n\nexport async function initializeForLoadSupport(\n environment: UsableEnvironment\n): Promise<PluginManager> {\n // eventually we'll load plugin packages here\n return new PluginManager(environment)\n}\n\nexport async function initializeForRunCucumber(\n configuration: IRunConfiguration,\n environment: UsableEnvironment\n): Promise<PluginManager> {\n const pluginManager = new PluginManager(environment)\n\n await pluginManager.initCoordinator(\n 'runCucumber',\n publishPlugin,\n configuration.formats.publish\n )\n await pluginManager.initCoordinator(\n 'runCucumber',\n filterPlugin,\n configuration.sources\n )\n await pluginManager.initCoordinator(\n 'runCucumber',\n shardingPlugin,\n configuration.sources\n )\n\n if (configuration.plugins) {\n for (const specifier of configuration.plugins.specifiers) {\n const plugin = await loadPlugin(specifier, environment.cwd)\n await pluginManager.initCoordinator(\n 'runCucumber',\n plugin,\n configuration.plugins.options,\n specifier\n )\n }\n }\n\n return pluginManager\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"run_cucumber.js","sourceRoot":"","sources":["../../src/api/run_cucumber.ts"],"names":[],"mappings":";;AA2BA,kCA6IC;AAxKD,6CAA0C;AAC1C,iDAAsE;AACtE,gDAAiE;AAEjE,kDAAyD;AACzD,oCAAuC;AACvC,wCAAwC;AAExC,wCAAoC;AACpC,6EAGqC;AACrC,6CAAmD;AACnD,uCAA+C;AAC/C,uCAAoD;AACpD,uCAAiD;AAGjD;;;;;;;GAOG;AACI,KAAK,UAAU,WAAW,CAC/B,OAAoB,EACpB,cAA+B,EAAE,EACjC,SAAuC;IAEvC,MAAM,iBAAiB,GAAG,IAAA,6BAAe,EAAC,WAAW,CAAC,CAAA;IACtD,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,iBAAiB,CAAA;IAE9D,MAAM,CAAC,KAAK,CAAC,uBAAuB,iBAAO;qBACxB,GAAG;gBACR,SAAS;CACxB,CAAC,CAAA;IAEA,MAAM,KAAK,GAAG,sBAAW,CAAC,IAAI,EAAE,CAAA;IAEhC,MAAM,kBAAkB,GACtB,qBAAqB,IAAI,OAAO,CAAC,OAAO;QACtC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB;QACrC,CAAC,CAAC,MAAM,CAAC,MAAM,CACX;YACE,cAAc,EAAE,EAAE;YAClB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,kBAAkB;SAC5B,CAAA;IACH,CAAC;IAED,IAAA,oDAAuB,EAAC;QACtB,gBAAgB;QAChB,kBAAkB;QAClB,KAAK;KACN,CAAC,CAAA;IAEF,MAAM,OAAO,GAAG,MAAM,IAAA,qBAAW,EAAC;QAChC,WAAW,EAAE,iBAAiB;QAC9B,MAAM;QACN,gBAAgB;QAChB,cAAc,EAAE,eAAe;QAC/B,KAAK;QACL,kBAAkB;QAClB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO;KACxC,CAAC,CAAA;IACF,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,EAAE,CAAA;IACnC,MAAM,aAAa,CAAC,OAAO,EAAE,CAAA;IAC7B,MAAM,iBAAiB,EAAE,CAAA;IAEzB,OAAO;QACL,OAAO,EAAE,OAAO,IAAI,CAAC,oBAAoB;QACzC,OAAO,EAAE,kBAAkB;KAC5B,CAAA;AACH,CAAC","sourcesContent":["import { EventEmitter } from 'node:events'\nimport { Envelope, IdGenerator, ParseError } from '@cucumber/messages'\nimport { IRunEnvironment, makeEnvironment } from '../environment'\nimport { IFilterablePickle } from '../filter'\nimport { EventDataCollector } from '../formatter/helpers'\nimport { resolvePaths } from '../paths'\nimport { makeRuntime } from '../runtime'\nimport { SupportCodeLibrary } from '../support_code_library_builder/types'\nimport { version } from '../version'\nimport {\n emitMetaMessage,\n emitSupportCodeMessages,\n} from './emit_support_code_messages'\nimport { initializeFormatters } from './formatters'\nimport { getPicklesAndErrors } from './gherkin'\nimport { initializeForRunCucumber } from './plugins'\nimport { getSupportCodeLibrary } from './support'\nimport { IRunOptions, IRunResult } from './types'\n\n/**\n * Execute a Cucumber test run and return the overall result\n *\n * @public\n * @param options - Options for the run, obtainable via {@link loadConfiguration}\n * @param environment - Project environment\n * @param onMessage - Callback fired each time Cucumber emits a message\n */\nexport async function runCucumber(\n options: IRunOptions,\n environment: IRunEnvironment = {},\n onMessage?: (message: Envelope) => void\n): Promise<IRunResult> {\n const mergedEnvironment = makeEnvironment(environment)\n const { cwd, stdout, stderr, env, logger } = mergedEnvironment\n\n logger.debug(`Running cucumber-js ${version} \nWorking directory: ${cwd}\nRunning from: ${__dirname} \n`)\n\n const newId = IdGenerator.uuid()\n\n const supportCoordinates =\n 'originalCoordinates' in options.support\n ? options.support.originalCoordinates\n : Object.assign(\n {\n requireModules: [],\n requirePaths: [],\n loaders: [],\n importPaths: [],\n },\n options.support\n )\n\n const pluginManager = await initializeForRunCucumber(\n {\n ...options,\n support: supportCoordinates,\n },\n mergedEnvironment\n )\n\n const resolvedPaths = await resolvePaths(\n logger,\n cwd,\n options.sources,\n supportCoordinates\n )\n pluginManager.emit('paths:resolve', resolvedPaths)\n const { sourcePaths, requirePaths, importPaths } = resolvedPaths\n\n const supportCodeLibrary =\n 'originalCoordinates' in options.support\n ? (options.support as SupportCodeLibrary)\n : await getSupportCodeLibrary({\n logger,\n cwd,\n newId,\n requirePaths,\n requireModules: supportCoordinates.requireModules,\n importPaths,\n loaders: supportCoordinates.loaders,\n })\n\n const eventBroadcaster = new EventEmitter()\n if (onMessage) {\n eventBroadcaster.on('envelope', onMessage)\n }\n eventBroadcaster.on('envelope', (value) =>\n pluginManager.emit('message', value)\n )\n const eventDataCollector = new EventDataCollector(eventBroadcaster)\n\n let formatterStreamError = false\n const cleanupFormatters = await initializeFormatters({\n env,\n cwd,\n stdout,\n stderr,\n logger,\n onStreamError: () => (formatterStreamError = true),\n eventBroadcaster,\n eventDataCollector,\n configuration: options.formats,\n supportCodeLibrary,\n pluginManager,\n })\n await emitMetaMessage(eventBroadcaster, env)\n\n let filteredPickles: ReadonlyArray<IFilterablePickle> = []\n let parseErrors: ParseError[] = []\n if (sourcePaths.length > 0) {\n const gherkinResult = await getPicklesAndErrors({\n newId,\n cwd,\n sourcePaths,\n coordinates: options.sources,\n onEnvelope: (envelope) => eventBroadcaster.emit('envelope', envelope),\n })\n filteredPickles = await pluginManager.transform(\n 'pickles:filter',\n gherkinResult.filterablePickles\n )\n filteredPickles = await pluginManager.transform(\n 'pickles:order',\n filteredPickles\n )\n parseErrors = gherkinResult.parseErrors\n }\n if (parseErrors.length) {\n parseErrors.forEach((parseError) => {\n logger.error(\n `Parse error in \"${parseError.source.uri}\" ${parseError.message}`\n )\n })\n await cleanupFormatters()\n await pluginManager.cleanup()\n return {\n success: false,\n support: supportCodeLibrary,\n }\n }\n\n emitSupportCodeMessages({\n eventBroadcaster,\n supportCodeLibrary,\n newId,\n })\n\n const runtime = await makeRuntime({\n environment: mergedEnvironment,\n logger,\n eventBroadcaster,\n sourcedPickles: filteredPickles,\n newId,\n supportCodeLibrary,\n options: options.runtime,\n snippetOptions: options.formats.options,\n })\n const success = await runtime.run()\n await pluginManager.cleanup()\n await cleanupFormatters()\n\n return {\n success: success && !formatterStreamError,\n support: supportCodeLibrary,\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"support.js","sourceRoot":"","sources":["../../src/api/support.ts"],"names":[],"mappings":";;;;;AAQA,sDA4CC;AApDD,6CAAsC;AACtC,uCAAwC;AAGxC,mGAAuE;AACvE,iEAAuC;AAGhC,KAAK,UAAU,qBAAqB,CAAC,EAC1C,MAAM,EACN,GAAG,EACH,KAAK,EACL,cAAc,EACd,YAAY,EACZ,WAAW,EACX,OAAO,GASR;IACC,sCAAyB,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE;QAC1C,cAAc;QACd,YAAY;QACZ,WAAW;QACX,OAAO;KACR,CAAC,CAAA;IAEF,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAC1B,MAAM,CAAC,KAAK,CAAC,oCAAoC,IAAI,GAAG,CAAC,CAAA;QACzD,IAAA,qBAAU,EAAC,IAAI,CAAC,CAAA;IAClB,CAAC,CAAC,CAAA;IACF,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACxB,MAAM,CAAC,KAAK,CAAC,oCAAoC,IAAI,GAAG,CAAC,CAAA;QACzD,IAAA,qBAAU,EAAC,IAAI,CAAC,CAAA;IAClB,CAAC,CAAC,CAAA;IAEF,KAAK,MAAM,SAAS,IAAI,OAAO,EAAE,CAAC;QAChC,MAAM,CAAC,KAAK,CAAC,kCAAkC,SAAS,GAAG,CAAC,CAAA;QAC5D,IAAA,sBAAQ,EAAC,SAAS,EAAE,IAAA,wBAAa,EAAC,IAAI,CAAC,CAAC,CAAA;IAC1C,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;QAC/B,MAAM,CAAC,KAAK,CAAC,mCAAmC,IAAI,GAAG,CAAC,CAAA;QACxD,MAAM,MAAM,CAAC,IAAA,wBAAa,EAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;IAC9C,CAAC;IAED,OAAO,sCAAyB,CAAC,QAAQ,EAAE,CAAA;AAC7C,CAAC","sourcesContent":["import { register } from 'node:module'\nimport { pathToFileURL } from 'node:url'\nimport { IdGenerator } from '@cucumber/messages'\nimport { SupportCodeLibrary } from '../support_code_library_builder/types'\nimport supportCodeLibraryBuilder from '../support_code_library_builder'\nimport tryRequire from '../try_require'\nimport { ILogger } from '../environment'\n\nexport async function getSupportCodeLibrary({\n logger,\n cwd,\n newId,\n requireModules,\n requirePaths,\n importPaths,\n loaders,\n}: {\n logger: ILogger\n cwd: string\n newId: IdGenerator.NewId\n requireModules: string[]\n requirePaths: string[]\n importPaths: string[]\n loaders: string[]\n}): Promise<SupportCodeLibrary> {\n supportCodeLibraryBuilder.reset(cwd, newId, {\n requireModules,\n requirePaths,\n importPaths,\n loaders,\n })\n\n requireModules.map((path) => {\n logger.debug(`Attempting to require code from \"${path}\"`)\n tryRequire(path)\n })\n requirePaths.map((path) => {\n logger.debug(`Attempting to require code from \"${path}\"`)\n tryRequire(path)\n })\n\n for (const specifier of loaders) {\n logger.debug(`Attempting to register loader \"${specifier}\"`)\n register(specifier, pathToFileURL('./'))\n }\n\n for (const path of importPaths) {\n logger.debug(`Attempting to import code from \"${path}\"`)\n await import(pathToFileURL(path).toString())\n }\n\n return supportCodeLibraryBuilder.finalize()\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"test_helpers.js","sourceRoot":"","sources":["../../src/api/test_helpers.ts"],"names":[],"mappings":";;;;;AASA,4CAsBC;AAED,kDAMC;AAvCD,0DAA4B;AAC5B,6CAAyC;AACzC,+CAAsB;AACtB,2EAAqD;AACrD,iDAAgD;AAGhD,MAAM,KAAK,GAAG,sBAAW,CAAC,IAAI,EAAE,CAAA;AAEzB,KAAK,UAAU,gBAAgB;IACpC,MAAM,GAAG,GAAG,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,KAAK,EAAE,EAAE,CAAC,CAAA;IACrE,MAAM,YAAE,CAAC,KAAK,CAAC,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAC/D,MAAM,YAAE,CAAC,SAAS,CAChB,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,EAAE,cAAc,CAAC,EAC1C,IAAA,qCAAQ,EAAC;;;0BAGa,CAAC,CACxB,CAAA;IACD,MAAM,YAAE,CAAC,SAAS,CAChB,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,EAAE,UAAU,CAAC,EACtC,IAAA,qCAAQ,EAAC;;yCAE4B,CAAC,CACvC,CAAA;IACD,MAAM,YAAE,CAAC,SAAS,CAChB,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,EAC9B,wHAAwH,CACzH,CAAA;IACD,MAAM,MAAM,GAAG,IAAI,yBAAW,EAAE,CAAA;IAChC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,CAAA;AACxB,CAAC;AAEM,KAAK,UAAU,mBAAmB,CAAC,WAA4B;IACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,YAAE,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACtD,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;QACX,WAAW,CAAC,MAAM,CAAC,GAAG,EAAE,CAAA;IAC1B,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import path from 'node:path'\nimport { PassThrough } from 'node:stream'\nimport fs from 'mz/fs'\nimport { reindent } from 'reindent-template-literals'\nimport { IdGenerator } from '@cucumber/messages'\nimport { IRunEnvironment } from '../environment'\n\nconst newId = IdGenerator.uuid()\n\nexport async function setupEnvironment(): Promise<Partial<IRunEnvironment>> {\n const cwd = path.join(__dirname, '..', '..', 'tmp', `api_${newId()}`)\n await fs.mkdir(path.join(cwd, 'features'), { recursive: true })\n await fs.writeFile(\n path.join(cwd, 'features', 'test.feature'),\n reindent(`Feature: test fixture\n Scenario: one\n Given a step\n Then another step`)\n )\n await fs.writeFile(\n path.join(cwd, 'features', 'steps.ts'),\n reindent(`import { Given, Then } from '../../../src'\n Given('a step', function () {})\n Then('another step', function () {})`)\n )\n await fs.writeFile(\n path.join(cwd, 'cucumber.mjs'),\n `export default {paths: ['features/test.feature'], requireModule: ['ts-node/register'], require: ['features/steps.ts']}`\n )\n const stdout = new PassThrough()\n return { cwd, stdout }\n}\n\nexport async function teardownEnvironment(environment: IRunEnvironment) {\n return new Promise((resolve) => {\n fs.rm(environment.cwd, { recursive: true }, resolve)\n }).then(() => {\n environment.stdout.end()\n })\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"","sourcesContent":["import { JsonObject } from 'type-fest'\nimport { IPublishConfig } from '../publish'\nimport { IConfiguration } from '../configuration'\nimport { IPickleOrder } from '../filter'\n\n/**\n * Options for {@link loadConfiguration}\n * @public\n */\nexport interface ILoadConfigurationOptions {\n /**\n * Path to load configuration file from, or `false` to skip\n * @default `cucumber.(json|yaml|yml|js|cjs|mjs)`\n */\n file?: string | false\n /**\n * Zero or more profile names from which to source configuration in the file\n * @remarks\n * If omitted or empty, the `default` profile will be used.\n */\n profiles?: string[]\n /**\n * Ad-hoc configuration options to be merged over the top of whatever is\n * loaded from the configuration file/profiles\n * @example\n * \\{\n * failFast: true,\n * parallel: 2\n * \\}\n * @example [\"--fail-fast\", \"--parallel\", \"2\"]\n * @example \"--fail-fast --parallel 2\"\n * @remarks\n * This can also be provided as an array or single string of argv-style\n * arguments.\n */\n provided?: Partial<IConfiguration> | string[] | string\n}\n\n/**\n * Response from {@link loadConfiguration}\n * @public\n */\nexport interface IResolvedConfiguration {\n /**\n * The final flat configuration object resolved from the configuration\n * file/profiles plus any extra provided\n */\n useConfiguration: IConfiguration\n /**\n * The format that can be passed into {@link runCucumber}\n */\n runConfiguration: IRunConfiguration\n}\n\n/**\n * Options relating to sources (i.e. feature files) - where to load them from,\n * how to interpret, filter and order them\n * @public\n */\nexport interface ISourcesCoordinates {\n /**\n * Default Gherkin dialect\n * @remarks\n * Used if no dialect is specified in the feature file itself.\n */\n defaultDialect: string\n /**\n * Paths and/or glob expressions to feature files\n */\n paths: string[]\n /**\n * Regular expressions of which scenario names should match one of to be run\n */\n names: string[]\n /**\n * Tag expression to filter which scenarios should be run\n */\n tagExpression: string\n /**\n * Run in the order defined, or in a random order\n */\n order: IPickleOrder\n /**\n * Shard tests and execute only the selected shard, format `<index>/<total>`\n * @example 1/4\n * @remarks\n * Shards use 1-based numbering\n */\n shard?: string\n}\n\n/**\n * A pickle that has been successfully compiled from a source\n * @public\n */\nexport interface IPlannedPickle {\n /**\n * Name of the pickle (after parameter resolution)\n */\n name: string\n uri: string\n location: {\n line: number\n column?: number\n }\n}\n\n/**\n * An error encountered when parsing a source\n * @public\n */\nexport interface ISourcesError {\n uri: string\n location: {\n line: number\n column?: number\n }\n /**\n * Error message explaining what went wrong with the parse\n */\n message: string\n}\n\n/**\n * Response from {@link loadSources}\n * @public\n */\nexport interface ILoadSourcesResult {\n /**\n * Pickles that have been successfully compiled, in the order they would be\n * run in\n */\n plan: IPlannedPickle[]\n /**\n * Any errors encountered when parsing sources\n */\n errors: ISourcesError[]\n}\n\n/**\n * Options relating to user code (aka support code) - where to load it from and\n * how to preprocess it\n * @public\n */\nexport interface ISupportCodeCoordinates {\n /**\n * Names of transpilation modules to load, via `require()`\n */\n requireModules: string[]\n /**\n * Paths and/or glob expressions of user code to load, via `require()`\n */\n requirePaths: string[]\n /**\n * Paths and/or glob expressions of user code to load, via `import()`\n */\n importPaths: string[]\n /**\n * Specifiers of loaders to register, via `register()`\n */\n loaders: string[]\n}\n\n/**\n * Options for {@link loadSupport}\n * @public\n * @remarks\n * A subset of {@link IRunConfiguration}\n */\nexport interface ILoadSupportOptions {\n /**\n * @remarks\n * This is needed because the default support path locations are derived from\n * feature file locations.\n */\n sources: ISourcesCoordinates\n support: Partial<ISupportCodeCoordinates>\n}\n\n/**\n * Options relating to behaviour when actually running tests\n * @public\n */\nexport interface IRunOptionsRuntime {\n /**\n * Perform a dry run, where a test run is prepared but nothing is executed\n */\n dryRun: boolean\n /**\n * Stop running tests when a test fails\n */\n failFast: boolean\n /**\n * Filter out stack frames from Cucumber's code when formatting stack traces\n */\n filterStacktraces: boolean\n /**\n * Run tests in parallel with the given number of worker processes\n */\n parallel: number\n /**\n * Retry failing tests up to the given number of times\n */\n retry: number\n /**\n * Tag expression to filter which scenarios can be retried\n */\n retryTagFilter: string\n /**\n * Fail the test run if there are pending steps\n */\n strict: boolean\n /**\n * Parameters to be passed to the World\n * @remarks\n * The value must be a JSON-serializable object.\n */\n worldParameters: JsonObject\n}\n\n/**\n * Options relating to formatters - which ones to use, where to write their\n * output, how they should behave\n * @public\n */\nexport interface IRunOptionsFormats {\n /**\n * Name/path of the formatter to use for `stdout` output\n */\n stdout: string\n /**\n * Zero or more mappings of file output path (key) to name/path of the\n * formatter to use (value)\n * @example\n * \\{\n * \"./reports/cucumber.html\": \"html\",\n * \"./reports/custom.txt\": \"./custom-formatter.js\"\n * \\}\n */\n files: Record<string, string>\n /**\n * Options for report publication, or `false` to disable publication\n */\n publish: IPublishConfig | false\n /**\n * Options to be provided to formatters\n * @remarks\n * The value must be a JSON-serializable object.\n */\n options: JsonObject\n}\n\n/**\n * Options relating to plugins - which ones to use and how they should behave\n * @public\n */\nexport interface IRunOptionsPlugins {\n /**\n * Specifiers of plugins to load\n * @example\n * [\n * \"\\@cucumber/my-plugin\",\n * \"./custom-plugin.js\"\n * ]\n * @remarks\n * Each item is a module specifier for a plugin to be loaded.\n */\n specifiers: string[]\n /**\n * Options to be provided to plugins\n * @remarks\n * The value must be a JSON-serializable object.\n */\n options: JsonObject\n}\n\n/**\n * Structured configuration object suitable for passing to {@link runCucumber}\n * @public\n */\nexport interface IRunConfiguration {\n sources: ISourcesCoordinates\n support: Partial<ISupportCodeCoordinates>\n runtime: IRunOptionsRuntime\n formats: IRunOptionsFormats\n plugins?: IRunOptionsPlugins\n}\n\n/**\n * A collection of user-defined code and setup (\"support code\") that can be\n * used for a test run\n * @public\n * @remarks\n * This is mostly a marker interface. The actual instance is a complex object\n * that you shouldn't interact with directly, but some functions return and/or\n * accept it as a means of optimising a test workflow.\n */\nexport interface ISupportCodeLibrary {\n readonly originalCoordinates: ISupportCodeCoordinates\n}\n\n/**\n * Either an actual {@link ISupportCodeLibrary | support code library}, or the\n * {@link ISupportCodeCoordinates | coordinates} required to create and\n * populate one\n * @public\n * @remarks\n * This alias exists because {@link runCucumber} will accept an existing\n * support code library in its options and thus avoid trying to load it again,\n * improving performance and avoiding cache issues for use cases where multiple\n * test runs happen within the same process. Note this is only useful in serial\n * mode, as parallel workers will each load the support code themselves anyway.\n */\nexport type ISupportCodeCoordinatesOrLibrary =\n | Partial<ISupportCodeCoordinates>\n | ISupportCodeLibrary\n\n/**\n * Options for {@link runCucumber}\n * @public\n */\nexport interface IRunOptions {\n sources: ISourcesCoordinates\n support: ISupportCodeCoordinatesOrLibrary\n runtime: IRunOptionsRuntime\n formats: IRunOptionsFormats\n plugins?: IRunOptionsPlugins\n}\n\n/**\n * Response from {@link runCucumber}\n * @public\n */\nexport interface IRunResult {\n /**\n * Whether the test run was overall successful\n * @remarks\n * The exact meaning can vary based on the `strict` configuration option.\n */\n success: boolean\n /**\n * The support code library that was used in the test run\n * @remarks\n * This can be reused in subsequent {@link runCucumber} calls,\n * see {@link ISupportCodeCoordinatesOrLibrary}\n */\n support: ISupportCodeLibrary\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"assemble_test_cases.js","sourceRoot":"","sources":["../../src/assemble/assemble_test_cases.ts"],"names":[],"mappings":";;AAcA,8CAyCC;AA5CD,oDAAgD;AAGzC,KAAK,UAAU,iBAAiB,CACrC,gBAAwB,EACxB,gBAA8B,EAC9B,KAAwB,EACxB,cAA4C,EAC5C,kBAAsC;IAEtC,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,EAAE;QACxD,MAAM,UAAU,GAAG,KAAK,EAAE,CAAA;QAC1B,MAAM,eAAe,GAAe,mBAAmB,CAAC;YACtD,kBAAkB;YAClB,MAAM;YACN,KAAK;SACN,CAAC,CAAA;QACF,MAAM,mBAAmB,GAAe,SAAS,CAAC;YAChD,MAAM;YACN,kBAAkB;YAClB,KAAK;SACN,CAAC,CAAA;QACF,MAAM,cAAc,GAAe,kBAAkB,CAAC;YACpD,kBAAkB;YAClB,MAAM;YACN,KAAK;SACN,CAAC,CAAA;QACF,MAAM,QAAQ,GAAa;YACzB,gBAAgB;YAChB,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,EAAE,EAAE,UAAU;YACd,SAAS,EAAE;gBACT,GAAG,eAAe;gBAClB,GAAG,mBAAmB;gBACtB,GAAG,cAAc;aAClB;SACF,CAAA;QACD,gBAAgB,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,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YAC3B,iBAAiB,EAAE,eAAe,CAAC,GAAG,CACpC,CAAC,cAAc,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,CACtC;YACD,uBAAuB,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,cAAc,EAAE,EAAE;gBAC9D,MAAM,MAAM,GAAG,cAAc,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;gBAC/D,OAAO;oBACL,kBAAkB,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;wBACrC,OAAO;4BACL,KAAK,EAAE,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC;4BAClC,iBAAiB,EAAE,GAAG,CAAC,aAAa,CAAC,IAAI;yBAC1C,CAAA;oBACH,CAAC,CAAC;iBACH,CAAA;YACH,CAAC,CAAC;SACH,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAY;IACpC,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,QAAQ,EAAE,IAAA,6BAAa,EAAC,KAAK,CAAC,QAAQ,CAAC;YACrC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;YACxD,CAAC,CAAC,SAAS;KACd,CAAA;AACH,CAAC","sourcesContent":["import { EventEmitter } from 'node:events'\nimport {\n Envelope,\n IdGenerator,\n Pickle,\n TestCase,\n TestStep,\n Group as MessagesGroup,\n} from '@cucumber/messages'\nimport { Group } from '@cucumber/cucumber-expressions'\nimport { SupportCodeLibrary } from '../support_code_library_builder/types'\nimport { doesHaveValue } from '../value_checker'\nimport { AssembledTestCase, SourcedPickle } from './types'\n\nexport async function assembleTestCases(\n testRunStartedId: string,\n eventBroadcaster: EventEmitter,\n newId: IdGenerator.NewId,\n sourcedPickles: ReadonlyArray<SourcedPickle>,\n supportCodeLibrary: SupportCodeLibrary\n): Promise<ReadonlyArray<AssembledTestCase>> {\n return sourcedPickles.map(({ gherkinDocument, pickle }) => {\n const testCaseId = newId()\n const fromBeforeHooks: TestStep[] = makeBeforeHookSteps({\n supportCodeLibrary,\n pickle,\n newId,\n })\n const fromStepDefinitions: TestStep[] = makeSteps({\n pickle,\n supportCodeLibrary,\n newId,\n })\n const fromAfterHooks: TestStep[] = makeAfterHookSteps({\n supportCodeLibrary,\n pickle,\n newId,\n })\n const testCase: TestCase = {\n testRunStartedId,\n pickleId: pickle.id,\n id: testCaseId,\n testSteps: [\n ...fromBeforeHooks,\n ...fromStepDefinitions,\n ...fromAfterHooks,\n ],\n }\n eventBroadcaster.emit('envelope', { testCase } satisfies Envelope)\n return {\n gherkinDocument,\n pickle,\n testCase,\n }\n })\n}\n\nfunction makeAfterHookSteps({\n supportCodeLibrary,\n pickle,\n newId,\n}: {\n supportCodeLibrary: SupportCodeLibrary\n pickle: Pickle\n newId: IdGenerator.NewId\n}): TestStep[] {\n return supportCodeLibrary.afterTestCaseHookDefinitions\n .slice(0)\n .reverse()\n .filter((hookDefinition) => hookDefinition.appliesToTestCase(pickle))\n .map((hookDefinition) => ({\n id: newId(),\n hookId: hookDefinition.id,\n }))\n}\n\nfunction makeBeforeHookSteps({\n supportCodeLibrary,\n pickle,\n newId,\n}: {\n supportCodeLibrary: SupportCodeLibrary\n pickle: Pickle\n newId: IdGenerator.NewId\n}): TestStep[] {\n return supportCodeLibrary.beforeTestCaseHookDefinitions\n .filter((hookDefinition) => hookDefinition.appliesToTestCase(pickle))\n .map((hookDefinition) => ({\n id: newId(),\n hookId: hookDefinition.id,\n }))\n}\n\nfunction makeSteps({\n pickle,\n supportCodeLibrary,\n newId,\n}: {\n pickle: Pickle\n supportCodeLibrary: SupportCodeLibrary\n newId: () => string\n}): TestStep[] {\n return pickle.steps.map((pickleStep) => {\n const stepDefinitions = supportCodeLibrary.stepDefinitions.filter(\n (stepDefinition) => stepDefinition.matchesStepName(pickleStep.text)\n )\n return {\n id: newId(),\n pickleStepId: pickleStep.id,\n stepDefinitionIds: stepDefinitions.map(\n (stepDefinition) => stepDefinition.id\n ),\n stepMatchArgumentsLists: stepDefinitions.map((stepDefinition) => {\n const result = stepDefinition.expression.match(pickleStep.text)\n return {\n stepMatchArguments: result.map((arg) => {\n return {\n group: mapArgumentGroup(arg.group),\n parameterTypeName: arg.parameterType.name,\n }\n }),\n }\n }),\n }\n })\n}\n\nfunction mapArgumentGroup(group: Group): MessagesGroup {\n return {\n start: group.start,\n value: group.value,\n children: doesHaveValue(group.children)\n ? group.children.map((child) => mapArgumentGroup(child))\n : undefined,\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/assemble/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAqC;AACrC,0CAAuB","sourcesContent":["export * from './assemble_test_cases'\nexport * from './types'\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/assemble/types.ts"],"names":[],"mappings":"","sourcesContent":["import { GherkinDocument, Pickle, TestCase } from '@cucumber/messages'\n\nexport interface SourcedPickle {\n gherkinDocument: GherkinDocument\n pickle: Pickle\n}\n\nexport interface AssembledTestCase {\n gherkinDocument: GherkinDocument\n pickle: Pickle\n testCase: TestCase\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/cli/i18n.ts"],"names":[],"mappings":";;;;;AAgDA,oCAOC;AAED,kCAOC;AAhED,+CAA4C;AAC5C,4DAA8B;AAC9B,+CAA0C;AAE1C,MAAM,QAAQ,GAAG;IACf,SAAS;IACT,MAAM;IACN,YAAY;IACZ,UAAU;IACV,iBAAiB;IACjB,UAAU;IACV,OAAO;IACP,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;CACG,CAAA;AAEV,SAAS,UAAU,CAAC,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G,QAAQ,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC/D,OAAO,CAAC,IAAA,0BAAW,EAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAAA;IACtC,CAAC,CAAC,CAAA;IACF,OAAO,UAAU,CAAC,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,EAAE,IAAI,CAAC,CAAA;AACjE,CAAC","sourcesContent":["import { dialects } from '@cucumber/gherkin'\nimport Table from 'cli-table3'\nimport { capitalCase } from 'capital-case'\n\nconst keywords = [\n 'feature',\n 'rule',\n 'background',\n 'scenario',\n 'scenarioOutline',\n 'examples',\n 'given',\n 'when',\n 'then',\n 'and',\n 'but',\n] as const\n\nfunction getAsTable(header: string[], rows: string[][]): string {\n const table = new Table({\n chars: {\n bottom: '',\n 'bottom-left': '',\n 'bottom-mid': '',\n 'bottom-right': '',\n left: '',\n 'left-mid': '',\n mid: '',\n 'mid-mid': '',\n middle: ' | ',\n right: '',\n 'right-mid': '',\n top: '',\n 'top-left': '',\n 'top-mid': '',\n 'top-right': '',\n },\n style: {\n border: [],\n 'padding-left': 0,\n 'padding-right': 0,\n },\n })\n table.push(header)\n table.push(...rows)\n return table.toString()\n}\n\nexport function getLanguages(): string {\n const rows = Object.keys(dialects).map((isoCode) => [\n isoCode,\n dialects[isoCode].name,\n dialects[isoCode].native,\n ])\n return getAsTable(['ISO 639-1', 'ENGLISH NAME', 'NATIVE NAME'], rows)\n}\n\nexport function getKeywords(isoCode: string): string {\n const language = dialects[isoCode]\n const rows = keywords.map((keyword) => {\n const words = language[keyword].map((s) => `\"${s}\"`).join(', ')\n return [capitalCase(keyword), words]\n })\n return getAsTable(['ENGLISH KEYWORD', 'NATIVE KEYWORDS'], rows)\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts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CAAC;QAED,MAAM,WAAW,GAAG;YAClB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,KAAK,EAAE,YAAY;SACpB,CAAA;QACD,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAE,GACzD,MAAM,IAAA,uBAAiB,EACrB;YACE,IAAI,EAAE,OAAO,CAAC,MAAM;YACpB,QAAQ,EAAE,OAAO,CAAC,OAAO;YACzB,QAAQ,EAAE,iBAAiB;SAC5B,EACD,WAAW,CACZ,CAAA;QACH,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAA,iBAAW,EAAC,gBAAgB,EAAE,WAAW,CAAC,CAAA;QACpE,OAAO;YACL,qBAAqB,EAAE,aAAa,CAAC,SAAS;YAC9C,OAAO;SACR,CAAA;IACH,CAAC;CACF;AAxED,sBAwEC","sourcesContent":["import debug from 'debug'\nimport { ArgvParser } from '../configuration'\nimport { IFormatterStream } from '../formatter'\nimport { loadConfiguration, runCucumber } from '../api'\nimport { getKeywords, getLanguages } from './i18n'\nimport { validateInstall } from './install_validator'\n\nexport interface ICliRunResult {\n shouldExitImmediately: boolean\n success: boolean\n}\n\nexport default class Cli {\n private readonly argv: string[]\n private readonly cwd: string\n private readonly stdout: IFormatterStream\n private readonly stderr: IFormatterStream\n private readonly env: NodeJS.ProcessEnv\n\n constructor({\n argv,\n cwd,\n stdout,\n stderr = process.stderr,\n env,\n }: {\n argv: string[]\n cwd: string\n stdout: IFormatterStream\n stderr?: IFormatterStream\n env: NodeJS.ProcessEnv\n }) {\n this.argv = argv\n this.cwd = cwd\n this.stdout = stdout\n this.stderr = stderr\n this.env = env\n }\n\n async run(): Promise<ICliRunResult> {\n const debugEnabled = debug.enabled('cucumber')\n if (debugEnabled) {\n await validateInstall()\n }\n const { options, configuration: argvConfiguration } = ArgvParser.parse(\n this.argv\n )\n if (options.i18nLanguages) {\n this.stdout.write(getLanguages())\n return {\n shouldExitImmediately: true,\n success: true,\n }\n }\n if (options.i18nKeywords) {\n this.stdout.write(getKeywords(options.i18nKeywords))\n return {\n shouldExitImmediately: true,\n success: true,\n }\n }\n\n const environment = {\n cwd: this.cwd,\n stdout: this.stdout,\n stderr: this.stderr,\n env: this.env,\n debug: debugEnabled,\n }\n const { useConfiguration: configuration, runConfiguration } =\n await loadConfiguration(\n {\n file: options.config,\n profiles: options.profile,\n provided: argvConfiguration,\n },\n environment\n )\n const { success } = await runCucumber(runConfiguration, environment)\n return {\n shouldExitImmediately: configuration.forceExit,\n success,\n }\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"install_validator.js","sourceRoot":"","sources":["../../src/cli/install_validator.ts"],"names":[],"mappings":";;;;;AAGA,0CASC;AAZD,+BAA+B;AAC/B,kFAAuD;AAEhD,KAAK,UAAU,eAAe;IACnC,IAAI,+BAAmB;QACrB,OAAO,CAAC,IAAI,CACV;;;;OAIC,CACF,CAAA;AACL,CAAC","sourcesContent":["/* eslint-disable no-console */\nimport isInstalledGlobally from 'is-installed-globally'\n\nexport async function validateInstall(): Promise<void> {\n if (isInstalledGlobally)\n console.warn(\n `\n It looks like you're running Cucumber from a global installation.\n If so, you'll likely see issues - you need to have Cucumber installed as a local dependency in your project.\n See https://github.com/cucumber/cucumber-js/blob/main/docs/installation.md#invalid-installations\n `\n )\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/cli/run.ts"],"names":[],"mappings":";;;;;AAWA,sBA+BC;AA1CD,+BAA+B;AAC/B;uEACuE;AACvE,iFAA0E;AAC1E,0CAAuC;AAEvC,SAAS,sBAAsB,CAAC,OAAe;IAC7C,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IACtB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC;AAEc,KAAK,UAAU,GAAG;IAC/B,IAAA,wDAAyB,EACvB,OAAO,CAAC,OAAO,EACf,CAAC,KAAK,EAAE,EAAE;QACR,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC,EACD,OAAO,CAAC,IAAI,CACb,CAAA;IAED,MAAM,GAAG,GAAG,IAAI,UAAG,CAAC;QAClB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;QAClB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,GAAG,EAAE,OAAO,CAAC,GAAG;KACjB,CAAC,CAAA;IAEF,IAAI,MAAqB,CAAA;IACzB,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,GAAG,CAAC,GAAG,EAAE,CAAA;IAC1B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,sBAAsB,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACvC,IAAI,MAAM,CAAC,qBAAqB,EAAE,CAAC;QACjC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACxB,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC7B,CAAC;AACH,CAAC","sourcesContent":["/* eslint-disable no-console */\n/* This is one rare place where we're fine to use process/console directly,\n * but other code abstracts those to remain composable and testable. */\nimport { validateNodeEngineVersion } from './validate_node_engine_version'\nimport Cli, { ICliRunResult } from './'\n\nfunction logErrorMessageAndExit(message: string): void {\n console.error(message)\n process.exit(1)\n}\n\nexport default async function run(): Promise<void> {\n validateNodeEngineVersion(\n process.version,\n (error) => {\n console.error(error)\n process.exit(1)\n },\n console.warn\n )\n\n const cli = new Cli({\n argv: process.argv,\n cwd: process.cwd(),\n stdout: process.stdout,\n stderr: process.stderr,\n env: process.env,\n })\n\n let result: ICliRunResult\n try {\n result = await cli.run()\n } catch (error) {\n logErrorMessageAndExit(error)\n }\n\n const exitCode = result.success ? 0 : 1\n if (result.shouldExitImmediately) {\n process.exit(exitCode)\n } else {\n process.exitCode = exitCode\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate_node_engine_version.js","sourceRoot":"","sources":["../../src/cli/validate_node_engine_version.ts"],"names":[],"mappings":";;;;;AAgBA,8DAiBC;AAjCD,sDAAwB;AACxB,0DAA4B;AAC5B,oDAA2B;AAO3B,MAAM,qBAAqB,GAAsB,GAAG,EAAE,CACpD,IAAI,CAAC,KAAK,CACR,iBAAE;KACC,YAAY,CAAC,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;KACjE,QAAQ,EAAE,CACd,CAAA;AAEH,SAAgB,yBAAyB,CACvC,cAAsB,EACtB,OAAkC,EAClC,SAAoC,EACpC,kBAAqC,qBAAqB;IAE1D,MAAM,gBAAgB,GAAG,eAAe,EAAE,CAAC,OAAO,CAAC,IAAI,CAAA;IACvD,MAAM,cAAc,GAAG,eAAe,EAAE,CAAC,aAAa,CAAC,IAAI,CAAA;IAC3D,IAAI,CAAC,gBAAM,CAAC,SAAS,CAAC,cAAc,EAAE,gBAAgB,CAAC,EAAE,CAAC;QACxD,OAAO,CACL,6CAA6C,gBAAgB,6BAA6B,cAAc,EAAE,CAC3G,CAAA;IACH,CAAC;SAAM,IAAI,CAAC,gBAAM,CAAC,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE,CAAC;QAC7D,SAAS,CACP,yBAAyB,cAAc,yIAAyI,CACjL,CAAA;IACH,CAAC;AACH,CAAC","sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport semver from 'semver'\n\ntype PackageJSON = {\n engines: { node: string }\n enginesTested: { node: string }\n}\n\nconst readActualPackageJSON: () => PackageJSON = () =>\n JSON.parse(\n fs\n .readFileSync(path.resolve(__dirname, '..', '..', 'package.json'))\n .toString()\n )\n\nexport function validateNodeEngineVersion(\n currentVersion: string,\n onError: (message: string) => void,\n onWarning: (message: string) => void,\n readPackageJSON: () => PackageJSON = readActualPackageJSON\n): void {\n const requiredVersions = readPackageJSON().engines.node\n const testedVersions = readPackageJSON().enginesTested.node\n if (!semver.satisfies(currentVersion, requiredVersions)) {\n onError(\n `Cucumber can only run on Node.js versions ${requiredVersions}. This Node.js version is ${currentVersion}`\n )\n } else if (!semver.satisfies(currentVersion, testedVersions)) {\n onWarning(\n `This Node.js version (${currentVersion}) has not been tested with this version of Cucumber; it should work normally, but please raise an issue if you see anything unexpected.`\n )\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"argv_parser.js","sourceRoot":"","sources":["../../src/configuration/argv_parser.ts"],"names":[],"mappings":";;;;;AAAA,yCAAmC;AACnC,gEAAgC;AAChC,+CAA4C;AAC5C,wCAAoC;AACpC,kDAAoD;AAoBpD,MAAM,UAAU,GAAG;IACjB,OAAO,CAAI,GAAM,EAAE,OAAY,EAAE;QAC/B,IAAI,GAAG,EAAE,CAAC;YACR,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,CAAA;QACvB,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,SAAS,CAAC,MAAc;QACtB,OAAO,UAAU,GAAW,EAAE,OAAe,EAAE;YAC7C,IAAI,GAAW,CAAA;YACf,IAAI,CAAC;gBACH,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YACvB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,CAAC,GAAU,KAAK,CAAA;gBACtB,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,yBAAyB,CAAC,CAAC,OAAO,KAAK,GAAG,EAAE,CAAC,CAAA;YACxE,CAAC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Aa;gBACb,OAAO;aACR;YACD,aAAa;SACd,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,UAAU,CAAA","sourcesContent":["import { Command } from 'commander'\nimport merge from 'lodash.merge'\nimport { dialects } from '@cucumber/gherkin'\nimport { version } from '../version'\nimport { documentation } from '../formatter/builtin'\nimport { IConfiguration } from './types'\n\nexport interface IParsedArgvOptions {\n config?: string\n i18nKeywords?: string\n i18nLanguages?: boolean\n profile: string[]\n plugin?: string[]\n pluginOptions?: object\n}\n\nexport interface IParsedArgv {\n options: IParsedArgvOptions\n configuration: Partial<IConfiguration>\n}\n\ntype IRawArgvOptions = Partial<Omit<IConfiguration, 'paths'>> &\n IParsedArgvOptions\n\nconst ArgvParser = {\n collect<T>(val: T, memo: T[] = []): T[] {\n if (val) {\n return [...memo, val]\n }\n return undefined\n },\n\n mergeJson(option: string): (str: string, memo?: object) => object {\n return function (str: string, memo: object = {}) {\n let val: object\n try {\n val = JSON.parse(str)\n } catch (error) {\n const e: Error = error\n throw new Error(`${option} passed invalid JSON: ${e.message}: ${str}`)\n }\n if (typeof val !== 'object' || Array.isArray(val)) {\n throw new Error(`${option} must be passed JSON of an object: ${str}`)\n }\n return merge(memo, val)\n }\n },\n\n mergeTags(value: string, memo?: string): string {\n return memo ? `${memo} and (${value})` : `(${value})`\n },\n\n validateCountOption(value: string, optionName: string): number {\n const numericValue = parseInt(value)\n if (isNaN(numericValue) || numericValue < 0) {\n throw new Error(`${optionName} must be a non negative integer`)\n }\n return numericValue\n },\n\n validateLanguage(value: string): string {\n if (!Object.keys(dialects).includes(value)) {\n throw new Error(`Unsupported ISO 639-1: ${value}`)\n }\n return value\n },\n\n parse(argv: string[]): IParsedArgv {\n const program = new Command('cucumber-js')\n\n program\n .allowExcessArguments(true)\n .storeOptionsAsProperties(false)\n .usage('[options] [<GLOB|DIR|FILE[:LINE]>...]')\n .version(version, '-v, --version')\n .option('-b, --backtrace', 'show full backtrace for errors')\n .option('-c, --config <PATH>', 'specify configuration file')\n .option('-d, --dry-run', 'invoke formatters without executing steps')\n .option(\n '--exit, --force-exit',\n 'force shutdown of the event loop when the test run has finished: cucumber will call process.exit'\n )\n .option('--fail-fast', 'abort the run on first failure')\n .option(\n '-f, --format <TYPE[:PATH]>',\n 'specify the output format, optionally supply PATH to redirect formatter output (repeatable). Available formats:\\n' +\n Object.entries(documentation).reduce(\n (previous, [key, description]) =>\n previous + ` ${key}: ${description}\\n`,\n ''\n ),\n ArgvParser.collect\n )\n .option(\n '--format-options <JSON>',\n 'provide options for formatters (repeatable)',\n ArgvParser.mergeJson('--format-options')\n )\n .option(\n '--i18n-keywords <ISO 639-1>',\n 'list language keywords',\n ArgvParser.validateLanguage\n )\n .option('--i18n-languages', 'list languages')\n .option(\n '-i, --import <GLOB|DIR|FILE>',\n 'import files before executing features (repeatable)',\n ArgvParser.collect\n )\n .option(\n '-l, --loader <NODE_MODULE>',\n 'module specifier(s) for loaders to be registered ahead of loading support code',\n ArgvParser.collect\n )\n .option(\n '--language <ISO 639-1>',\n 'provide the default language for feature files'\n )\n .option(\n '--name <REGEXP>',\n 'only execute the scenarios with name matching the expression (repeatable)',\n ArgvParser.collect\n )\n .option(\n '--order <TYPE[:SEED]>',\n 'run scenarios in the specified order. Type should be `defined`, `reverse` or `random`'\n )\n .option(\n '-p, --profile <NAME>',\n 'specify the profile to use (repeatable)',\n ArgvParser.collect,\n []\n )\n .option(\n '--parallel <NUMBER_OF_WORKERS>',\n 'run in parallel with the given number of workers',\n (val) => ArgvParser.validateCountOption(val, '--parallel')\n )\n .option(\n '--plugin <SPECIFIER>',\n 'load a plugin (repeatable)',\n ArgvParser.collect\n )\n .option(\n '--plugin-options <JSON>',\n 'provide options for plugins (repeatable)',\n ArgvParser.mergeJson('--plugin-options')\n )\n .option('--publish', 'Publish a report to https://reports.cucumber.io')\n .option(\n '-r, --require <GLOB|DIR|FILE>',\n 'require files before executing features (repeatable)',\n ArgvParser.collect\n )\n .option(\n '--require-module <NODE_MODULE>',\n 'require node modules before requiring files (repeatable)',\n ArgvParser.collect\n )\n .option(\n '--retry <NUMBER_OF_RETRIES>',\n 'specify the number of times to retry failing test cases (default: 0)',\n (val) => ArgvParser.validateCountOption(val, '--retry')\n )\n .option(\n '--retry-tag-filter <EXPRESSION>',\n `only retries the features or scenarios with tags matching the expression (repeatable).\n This option requires '--retry' to be specified.`,\n ArgvParser.mergeTags\n )\n .option(\n '--shard <INDEX/TOTAL>',\n 'run shard INDEX of TOTAL shards. The index starts at 1'\n )\n .option('--strict', 'fail if there are pending steps')\n .option('--no-strict', 'succeed even if there are pending steps')\n .option(\n '-t, --tags <EXPRESSION>',\n 'only execute the features or scenarios with tags matching the expression (repeatable)',\n ArgvParser.mergeTags\n )\n .option(\n '--world-parameters <JSON>',\n 'provide parameters that will be passed to the world constructor (repeatable)',\n ArgvParser.mergeJson('--world-parameters')\n )\n\n program.addHelpText(\n 'afterAll',\n 'For more details please visit https://github.com/cucumber/cucumber-js/blob/main/docs/cli.md'\n )\n\n program.parse(argv)\n const {\n config,\n i18nKeywords,\n i18nLanguages,\n profile,\n ...regularStuff\n }: IRawArgvOptions = program.opts()\n const configuration: Partial<IConfiguration> = regularStuff\n if (program.args.length > 0) {\n configuration.paths = program.args\n }\n\n return {\n options: {\n config,\n i18nKeywords,\n i18nLanguages,\n profile,\n },\n configuration,\n }\n },\n}\n\nexport default ArgvParser\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"check_schema.js","sourceRoot":"","sources":["../../src/configuration/check_schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,kCAMC;AAzCD,yCAA0B;AAC1B,+CAA4C;AAG5C,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC;IAChC,SAAS,EAAE,GAAG,CAAC,OAAO,EAAE;IACxB,MAAM,EAAE,GAAG,CAAC,OAAO,EAAE;IACrB,IAAI,EAAE,GAAG,CAAC,OAAO,EAAE;IAC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AM,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACpC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE;IAC5B,MAAM,EAAE,GAAG,CAAC,OAAO,EAAE;IACrB,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE;IAClB,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE;CAC9B,CAAC,CAAA;AAEF,SAAgB,WAAW,CAAC,aAAkB;IAC5C,OAAO,MAAM,CAAC,YAAY,CAAC,aAAa,EAAE;QACxC,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE,IAAI;QACZ,YAAY,EAAE,IAAI;KACnB,CAA4B,CAAA;AAC/B,CAAC","sourcesContent":["import * as yup from 'yup'\nimport { dialects } from '@cucumber/gherkin'\nimport { IConfiguration } from './types'\n\nconst schema = yup.object().shape({\n backtrace: yup.boolean(),\n dryRun: yup.boolean(),\n exit: yup.boolean(),\n failFast: yup.boolean(),\n format: yup\n .array()\n .of(\n yup.lazy((val) =>\n Array.isArray(val)\n ? yup.array().of(yup.string()).min(1).max(2)\n : yup.string()\n )\n ),\n formatOptions: yup.object(),\n import: yup.array().of(yup.string()),\n language: yup.string().oneOf(Object.keys(dialects)),\n name: yup.array().of(yup.string()),\n order: yup.string().matches(/^random:.*|random|defined$/),\n paths: yup.array().of(yup.string()),\n parallel: yup.number().integer().min(0),\n publish: yup.boolean(),\n require: yup.array().of(yup.string()),\n requireModule: yup.array().of(yup.string()),\n retry: yup.number().integer().min(0),\n retryTagFilter: yup.string(),\n strict: yup.boolean(),\n tags: yup.string(),\n worldParameters: yup.object(),\n})\n\nexport function checkSchema(configuration: any): Partial<IConfiguration> {\n return schema.validateSync(configuration, {\n abortEarly: false,\n strict: true,\n stripUnknown: true,\n }) as Partial<IConfiguration>\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"default_configuration.js","sourceRoot":"","sources":["../../src/configuration/default_configuration.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAAmB;IACnD,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,EAAE;IACV,aAAa,EAAE,EAAE;IACjB,MAAM,EAAE,EAAE;IACV,aAAa,EAAE,EAAE;IACjB,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,EAAE;IACT,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,EAAE;IACX,aAAa,EAAE,EAAE;IACjB,KAAK,EAAE,CAAC;IACR,cAAc,EAAE,EAAE;IAClB,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,EAAE;IACR,eAAe,EAAE,EAAE;CACpB,CAAA","sourcesContent":["import { IConfiguration } from './types'\n\nexport const DEFAULT_CONFIGURATION: IConfiguration = {\n backtrace: false,\n dryRun: false,\n forceExit: false,\n failFast: false,\n format: [],\n formatOptions: {},\n plugin: [],\n pluginOptions: {},\n import: [],\n language: 'en',\n loader: [],\n name: [],\n order: 'defined',\n paths: [],\n parallel: 0,\n publish: false,\n require: [],\n requireModule: [],\n retry: 0,\n retryTagFilter: '',\n shard: '',\n strict: true,\n tags: '',\n worldParameters: {},\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"from_file.js","sourceRoot":"","sources":["../../src/configuration/from_file.ts"],"names":[],"mappings":";;;;;AAsBA,4BA4CC;AAlED,sDAAwB;AACxB,0DAA4B;AAC5B,yCAAqC;AACrC,uCAAwC;AACxC,gDAAuB;AAGvB,iEAA4D;AAC5D,+DAA0D;AAE1D,MAAM,oBAAoB,GAAG;IAC3B,OAAO;IACP,OAAO;IACP,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM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AM,CAAC,KAAK,CACV,+BAA+B,IAAI,2BAA2B,aAAa,CAAC,IAAI,gBAAgB,CACjG,CAAA;wBACD,iEAAiE;wBACjE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;oBACjC,CAAC;gBACH,CAAC;gBACD,MAAK;QACT,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,uBAAuB,IAAI,wBAAwB,EAAE;YACnE,KAAK,EAAE,KAAK;SACb,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,sBAAsB,QAAQ,4BAA4B,CAAC,CAAA;IAC7E,CAAC;IACD,OAAO,WAAW,CAAA;AACpB,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,QAAgB;IAC7C,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAA;IACzD,MAAM,aAAa,GAAG,MAAM,aAAa,CAAC,EAAE,GAAG,EAAE,mBAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;IAC1E,OAAO,aAAa,EAAE,WAAW,CAAA;AACnC,CAAC","sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport { promisify } from 'node:util'\nimport { pathToFileURL } from 'node:url'\nimport YAML from 'yaml'\nimport { ILogger } from '../environment'\nimport { IConfiguration } from './types'\nimport { mergeConfigurations } from './merge_configurations'\nimport { parseConfiguration } from './parse_configuration'\n\nconst SUPPORTED_EXTENSIONS = [\n '.json',\n '.yaml',\n '.yml',\n '.js',\n '.cjs',\n '.mjs',\n '.ts',\n '.cts',\n '.mts',\n]\n\nexport async function fromFile(\n logger: ILogger,\n cwd: string,\n file: string,\n profiles: string[] = []\n): Promise<Partial<IConfiguration>> {\n let definitions = await loadFile(logger, cwd, file)\n\n const defaultDefinition: unknown = definitions.default\n\n if (defaultDefinition) {\n if (typeof defaultDefinition === 'function') {\n logger.debug('Default function found; loading profiles')\n definitions = await handleDefaultFunctionDefinition(\n definitions,\n defaultDefinition\n )\n }\n } else {\n logger.debug('No default profile defined in configuration file')\n definitions.default = {}\n }\n\n if (profiles.length < 1) {\n logger.debug('No profiles specified; using default profile')\n profiles = ['default']\n }\n\n const definedKeys = Object.keys(definitions)\n profiles.forEach((profileKey) => {\n if (!definedKeys.includes(profileKey)) {\n throw new Error(`Requested profile \"${profileKey}\" doesn't exist`)\n }\n })\n return mergeConfigurations(\n {},\n ...profiles.map((profileKey) =>\n parseConfiguration(\n logger,\n `Profile \"${profileKey}\"`,\n definitions[profileKey]\n )\n )\n )\n}\n\nasync function handleDefaultFunctionDefinition(\n definitions: Record<string, any>,\n defaultDefinition: Function\n): Promise<Record<string, any>> {\n if (Object.keys(definitions).length > 1) {\n throw new Error(\n 'Invalid profiles specified: if a default function definition is provided, no other static profiles should be specified'\n )\n }\n\n const definitionsFromDefault = await defaultDefinition()\n\n return {\n default: {},\n ...definitionsFromDefault,\n }\n}\n\nasync function loadFile(\n logger: ILogger,\n cwd: string,\n file: string\n): Promise<Record<string, any>> {\n const filePath: string = path.join(cwd, file)\n const extension = path.extname(filePath)\n if (!SUPPORTED_EXTENSIONS.includes(extension)) {\n throw new Error(`Unsupported configuration file extension \"${extension}\"`)\n }\n let definitions\n try {\n switch (extension) {\n case '.json':\n definitions = JSON.parse(\n await promisify(fs.readFile)(filePath, { encoding: 'utf-8' })\n )\n break\n case '.yaml':\n case '.yml':\n definitions = YAML.parse(\n await promisify(fs.readFile)(filePath, { encoding: 'utf-8' })\n )\n break\n case '.cjs':\n logger.debug(\n `Loading configuration file \"${file}\" as CommonJS based on extension`\n )\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n definitions = require(filePath)\n break\n case '.cts':\n logger.debug(\n `Loading configuration file \"${file}\" as TypeScript based on extension`\n )\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n definitions = require(filePath)\n break\n case '.mjs':\n logger.debug(\n `Loading configuration file \"${file}\" as ESM based on extension`\n )\n definitions = await import(pathToFileURL(filePath).toString())\n break\n case '.mts':\n case '.ts':\n logger.debug(\n `Loading configuration file \"${file}\" as TypeScript based on extension`\n )\n definitions = await import(pathToFileURL(filePath).toString())\n break\n case '.js':\n {\n const parentPackage = await readPackageJson(filePath)\n if (!parentPackage) {\n logger.debug(\n `Loading configuration file \"${file}\" as CommonJS based on absence of a parent package`\n )\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n definitions = require(filePath)\n } else if (parentPackage.type === 'module') {\n logger.debug(\n `Loading configuration file \"${file}\" as ESM based on \"${parentPackage.name}\" package type`\n )\n definitions = await import(pathToFileURL(filePath).toString())\n } else {\n logger.debug(\n `Loading configuration file \"${file}\" as CommonJS based on \"${parentPackage.name}\" package type`\n )\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n definitions = require(filePath)\n }\n }\n break\n }\n } catch (error) {\n throw new Error(`Configuration file \"${file}\" failed to load/parse`, {\n cause: error,\n })\n }\n\n if (typeof definitions !== 'object') {\n throw new Error(`Configuration file ${filePath} does not export an object`)\n }\n return definitions\n}\n\nasync function readPackageJson(filePath: string) {\n const { readPackageUp } = await import('read-package-up')\n const parentPackage = await readPackageUp({ cwd: path.dirname(filePath) })\n return parentPackage?.packageJson\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/configuration/helpers.ts"],"names":[],"mappings":";;AAAA,wCAKC;AALD,SAAgB,cAAc,CAAC,CAAqB;IAClD,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACpB,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;AAC5C,CAAC","sourcesContent":["export function isTruthyString(s: string | undefined): boolean {\n if (s === undefined) {\n return false\n }\n return s.match(/^(false|no|0)$/i) === null\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/configuration/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,6CAAqD;AAA5C,0HAAA,OAAO,OAAc;AAC9B,0DAAuC;AACvC,8CAA2B;AAC3B,4CAAyB;AACzB,yDAAsC;AACtC,wDAAqC;AACrC,4DAAyC;AACzC,0CAAuB;AACvB,2DAAwC","sourcesContent":["export { default as ArgvParser } from './argv_parser'\nexport * from './default_configuration'\nexport * from './from_file'\nexport * from './helpers'\nexport * from './merge_configurations'\nexport * from './parse_configuration'\nexport * from './split_format_descriptor'\nexport * from './types'\nexport * from './validate_configuration'\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"locate_file.js","sourceRoot":"","sources":["../../src/configuration/locate_file.ts"],"names":[],"mappings":";;;;;AAYA,gCAIC;AAhBD,0DAA4B;AAC5B,+CAAsB;AAEtB,MAAM,iBAAiB,GAAG;IACxB,aAAa;IACb,cAAc;IACd,cAAc;IACd,eAAe;IACf,eAAe;IACf,cAAc;CACf,CAAA;AAED,SAAgB,UAAU,CAAC,GAAW;IACpC,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CACzC,YAAE,CAAC,UAAU,CAAC,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CACxC,CAAA;AACH,CAAC","sourcesContent":["import path from 'node:path'\nimport fs from 'mz/fs'\n\nconst DEFAULT_FILENAMES = [\n 'cucumber.js',\n 'cucumber.cjs',\n 'cucumber.mjs',\n 'cucumber.json',\n 'cucumber.yaml',\n 'cucumber.yml',\n]\n\nexport function locateFile(cwd: string): string | undefined {\n return DEFAULT_FILENAMES.find((filename) =>\n fs.existsSync(path.join(cwd, filename))\n )\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"merge_configurations.js","sourceRoot":"","sources":["../../src/configuration/merge_configurations.ts"],"names":[],"mappings":";;;;;AA6CA,kDAKC;AAl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GAAG,cAAyC;IAE5C,OAAO,IAAA,0BAAS,EAAC,EAAE,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,UAAU,CAAC,CAAA;AAC7D,CAAC","sourcesContent":["import mergeWith from 'lodash.mergewith'\nimport { IConfiguration } from './types'\n\nconst ADDITIVE_ARRAYS = [\n 'format',\n 'import',\n 'loader',\n 'name',\n 'paths',\n 'require',\n 'requireModule',\n]\nconst TAG_EXPRESSIONS = ['tags', 'retryTagFilter']\n\nfunction mergeArrays(objValue: any[], srcValue: any[]) {\n if (objValue && srcValue) {\n return [].concat(objValue, srcValue)\n }\n return undefined\n}\n\nfunction mergeTagExpressions(objValue: string, srcValue: string) {\n if (objValue && srcValue) {\n return `${wrapTagExpression(objValue)} and ${wrapTagExpression(srcValue)}`\n }\n return undefined\n}\n\nfunction wrapTagExpression(raw: string) {\n if (raw.startsWith('(') && raw.endsWith(')')) {\n return raw\n }\n return `(${raw})`\n}\n\nfunction customizer(objValue: any, srcValue: any, key: string): any {\n if (ADDITIVE_ARRAYS.includes(key)) {\n return mergeArrays(objValue, srcValue)\n }\n if (TAG_EXPRESSIONS.includes(key)) {\n return mergeTagExpressions(objValue, srcValue)\n }\n return undefined\n}\n\nexport function mergeConfigurations<T = Partial<IConfiguration>>(\n source: T,\n ...configurations: Partial<IConfiguration>[]\n): T {\n return mergeWith({}, source, ...configurations, customizer)\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse_configuration.js","sourceRoot":"","sources":["../../src/configuration/parse_configuration.ts"],"names":[],"mappings":";;;;;AAMA,gDAmCC;AAzCD,8DAAoC;AAGpC,gEAAsC;AACtC,iDAA4C;AAE5C,SAAgB,kBAAkB,CAChC,MAAe,EACf,MAAc,EACd,UAAmE;IAEnE,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,EAAE,CAAA;IACX,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,mDAAmD,CAAC,CAAA;QAC1E,MAAM,EAAE,aAAa,EAAE,GAAG,qBAAU,CAAC,KAAK,CAAC;YACzC,MAAM;YACN,aAAa;YACb,GAAG,UAAU;SACd,CAAC,CAAA;QACF,OAAO,aAAa,CAAA;IACtB,CAAC;IACD,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACnC,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,mDAAmD,CAAC,CAAA;QAC1E,MAAM,EAAE,aAAa,EAAE,GAAG,qBAAU,CAAC,KAAK,CAAC;YACzC,MAAM;YACN,aAAa;YACb,GAAG,IAAA,qBAAU,EAAC,UAAU,CAAC;SAC1B,CAAC,CAAA;QACF,OAAO,aAAa,CAAA;IACtB,CAAC;IACD,IAAI,CAAC;QACH,OAAO,IAAA,0BAAW,EAAC,UAAU,CAAC,CAAA;IAChC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,GAAG,MAAM,kDAAkD,KAAK,CAAC,MAAM,CAAC,IAAI,CAC1E,GAAG,CACJ,EAAE,CACJ,CAAA;IACH,CAAC;AACH,CAAC","sourcesContent":["import stringArgv from 'string-argv'\nimport { ILogger } from '../environment'\nimport { IConfiguration } from './types'\nimport ArgvParser from './argv_parser'\nimport { checkSchema } from './check_schema'\n\nexport function parseConfiguration(\n logger: ILogger,\n source: string,\n definition: Partial<IConfiguration> | string[] | string | undefined\n): Partial<IConfiguration> {\n if (!definition) {\n return {}\n }\n if (Array.isArray(definition)) {\n logger.debug(`${source} configuration value is an array; parsing as argv`)\n const { configuration } = ArgvParser.parse([\n 'node',\n 'cucumber-js',\n ...definition,\n ])\n return configuration\n }\n if (typeof definition === 'string') {\n logger.debug(`${source} configuration value is a string; parsing as argv`)\n const { configuration } = ArgvParser.parse([\n 'node',\n 'cucumber-js',\n ...stringArgv(definition),\n ])\n return configuration\n }\n try {\n return checkSchema(definition)\n } catch (error) {\n throw new Error(\n `${source} configuration value failed schema validation: ${error.errors.join(\n ' '\n )}`\n )\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"split_format_descriptor.js","sourceRoot":"","sources":["../../src/configuration/split_format_descriptor.ts"],"names":[],"mappings":";;AAEA,sDA6EC;AA7ED,SAAgB,qBAAqB,CACnC,MAAe,EACf,MAAc;IAEd,MAAM,SAAS,GAAG,CAAC,MAAgB,EAAE,EAAE;QACrC,IAAI,QAAQ,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAA;QAC/B,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;YACd,QAAQ,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAA;QAC/B,CAAC;QACD,MAAM,CAAC,IAAI,CACT;YACM,QAAQ,EAAE,CACjB,CAAA;IACH,CAAC,CAAA;IACD,IAAI,MAAgB,CAAA;IACpB,IAAI,MAAM,EAAE,MAAM,CAAA;IAElB,2BAA2B;IAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QACzD,cAAc;QACd,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACvD,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;QACjC,CAAC;QACD,YAAY;aACP,CAAC;YACJ,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;YAC/B,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC5B,SAAS,CAAC,MAAM,CAAC,CAAA;YACnB,CAAC;QACH,CAAC;IACH,CAAC;IACD,YAAY;SACP,IAAI,CAA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K,IAAI,EAAE,CAAC;YAC1D,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;QAC7C,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;QACvB,CAAC;QACD,SAAS,CAAC,MAAM,CAAC,CAAA;IACnB,CAAC;IACD,UAAU;SACL,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC5D,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;QAC/B,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACjC,SAAS,CAAC,MAAM,CAAC,CAAA;QACnB,CAAC;IACH,CAAC;IACD,MAAM;SACD,CAAC;QACJ,MAAM,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;IACvB,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC","sourcesContent":["import { ILogger } from '../environment'\n\nexport function splitFormatDescriptor(\n logger: ILogger,\n option: string\n): string[] {\n const doWarning = (result: string[]) => {\n let expected = `\"${result[0]}\"`\n if (result[1]) {\n expected += `:\"${result[1]}\"`\n }\n logger.warn(\n `Each part of a user-specified format should be quoted; see https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md#ambiguous-colons-in-formats\nChange to ${expected}`\n )\n }\n let result: string[]\n let match1, match2\n\n // \"foo\":\"bar\" or \"foo\":bar\n if ((match1 = option.match(/^\"([^\"]*)\":(.*)$/)) !== null) {\n // \"foo\":\"bar\"\n if ((match2 = match1[2].match(/^\"([^\"]*)\"$/)) !== null) {\n result = [match1[1], match2[1]]\n }\n // \"foo\":bar\n else {\n result = [match1[1], match1[2]]\n if (result[1].includes(':')) {\n doWarning(result)\n }\n }\n }\n // foo:\"bar\"\n else if ((match1 = option.match(/^(.*):\"([^\"]*)\"$/)) !== null) {\n result = [match1[1], match1[2]]\n if (result[0].includes(':')) {\n doWarning(result)\n }\n }\n // \"foo\"\n else if ((match1 = option.match(/^\"([^\"]*)\"$/)) !== null) {\n result = [match1[1], '']\n }\n // file://foo or file:///foo or file://C:/foo or file://C:\\foo or file:///C:/foo or file:///C:\\foo\n else if (\n (match1 = option.match(/^(file:\\/{2,3}(?:[a-zA-Z]:[/\\\\])?)(.*)$/)) !== null\n ) {\n // file://foo:bar\n if ((match2 = match1[2].match(/^([^:]*):(.*)$/)) !== null) {\n result = [match1[1] + match2[1], match2[2]]\n } else {\n result = [option, '']\n }\n doWarning(result)\n }\n // C:\\foo or C:/foo\n else if ((match1 = option.match(/^([a-zA-Z]:[/\\\\])(.*)$/)) !== null) {\n // C:\\foo:bar or C:/foo:bar\n if ((match2 = match1[2].match(/^([^:]*):(.*)$/)) !== null) {\n result = [match1[1] + match2[1], match2[2]]\n } else {\n result = [option, '']\n }\n doWarning(result)\n }\n // foo:bar\n else if ((match1 = option.match(/^([^:]*):(.*)$/)) !== null) {\n result = [match1[1], match1[2]]\n if (option.split(':').length > 2) {\n doWarning(result)\n }\n }\n // foo\n else {\n result = [option, '']\n }\n\n return result\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/configuration/types.ts"],"names":[],"mappings":"","sourcesContent":["import { JsonObject } from 'type-fest'\nimport { IPickleOrder } from '../filter'\n\n/**\n * User-defined configuration\n *\n * @public\n */\nexport interface IConfiguration {\n /**\n * Paths to where your feature files are\n * @default []\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/configuration.md#finding-your-features}\n */\n paths: string[]\n /**\n * Show the full backtrace for errors\n * @default false\n */\n backtrace: boolean\n /**\n * Perform a dry run, where a test run is prepared but nothing is executed\n * @default false\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/dry_run.md}\n */\n dryRun: boolean\n /**\n * Explicitly call `process.exit()` after the test run\n * @default false\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/cli.md#exiting}\n * @remarks\n * This option is only used by the CLI.\n */\n forceExit: boolean\n /**\n * Stop running tests when a test fails\n * @default false\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/fail_fast.md}\n */\n failFast: boolean\n /**\n * Name/path and (optionally) output file path of each formatter to use\n *\n * @example\n * [\n * \"\\@cucumber/pretty-formatter\",\n * [\"html\", \"./reports/cucumber.html\"],\n * [\"./custom-formatter.js\", \"./reports/custom.txt\"]\n * ]\n * @default []\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/formatters.md}\n * @remarks\n * Each item has one or two values. The first (required) identifies the\n * formatter to be used. The second (optional) specifies where the output\n * should be written.\n */\n format: Array<string | [string, string?]>\n /**\n * Options to be provided to formatters\n * @default \\{\\}\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/formatters.md#options}\n * @remarks\n * The value must be a JSON-serializable object.\n */\n formatOptions: JsonObject\n /**\n * Name/path of each plugin to use\n *\n * @example\n * [\n * \"\\@cucumber/my-plugin\",\n * \"./custom-plugin.js\"\n * ]\n * @default []\n * @remarks\n * Each item is a module specifier for a plugin to be loaded.\n */\n plugin: string[]\n /**\n * Options to be provided to plugins\n * @default \\{\\}\n * @remarks\n * The value must be a JSON-serializable object.\n */\n pluginOptions: JsonObject\n /**\n * Paths to where your support code is\n * @default []\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/configuration.md#finding-your-code}\n */\n import: string[]\n /**\n * Default language for your feature files\n * @default \"en\"\n */\n language: string\n /**\n * Module specifier(s) for loaders to be registered ahead of loading support code\n * @default []\n */\n loader: string[]\n /**\n * Regular expressions of which scenario names should match one of to be run\n * @default []\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/filtering.md#names}\n */\n name: string[]\n /**\n * Run in the order defined, or in a random order\n * @default \"defined\"\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/filtering.md#order}\n */\n order: IPickleOrder\n /**\n * Run tests in parallel with the given number of worker processes\n * @default 0\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/parallel.md}\n */\n parallel: number\n /**\n * Shard tests and execute only the selected shard, format `<index>/<total>`\n * @default \"\"\n */\n shard: string\n /**\n * Publish a report of your test run to https://reports.cucumber.io/\n * @default false\n */\n publish: boolean\n /**\n * Paths to where your support code is, for CommonJS\n * @default []\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/configuration.md#finding-your-code}\n */\n require: string[]\n /**\n * Names of transpilation modules to load, via `require()`\n * @default []\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/transpiling.md}\n */\n requireModule: string[]\n /**\n * Retry failing tests up to the given number of times\n * @default 0\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/retry.md}\n */\n retry: number\n /**\n * Tag expression to filter which scenarios can be retried\n * @default \"\"\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/retry.md}\n */\n retryTagFilter: string\n /**\n * Fail the test run if there are pending steps\n * @default true\n */\n strict: boolean\n /**\n * Tag expression to filter which scenarios should be run\n * @default \"\"\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/filtering.md#tags}\n */\n tags: string\n /**\n * Parameters to be passed to your World\n * @default \\{\\}\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/support_files/world.md}\n * @remarks\n * The value must be a JSON-serializable object.\n */\n worldParameters: JsonObject\n}\n\n/**\n * Collection of named configuration profiles\n * @public\n */\nexport type IProfiles = Record<string, Partial<IConfiguration>>\n"]}