@serenity-js/cucumber 3.41.2 → 3.42.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 (610) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/esm/adapter/CucumberCLIAdapter.d.ts +54 -0
  3. package/esm/adapter/CucumberCLIAdapter.d.ts.map +1 -0
  4. package/esm/adapter/CucumberCLIAdapter.js +215 -0
  5. package/esm/adapter/CucumberCLIAdapter.js.map +1 -0
  6. package/esm/adapter/CucumberConfig.d.ts +255 -0
  7. package/esm/adapter/CucumberConfig.d.ts.map +1 -0
  8. package/esm/adapter/CucumberConfig.js +2 -0
  9. package/esm/adapter/CucumberConfig.js.map +1 -0
  10. package/esm/adapter/CucumberFormat.d.ts +26 -0
  11. package/esm/adapter/CucumberFormat.d.ts.map +1 -0
  12. package/esm/adapter/CucumberFormat.js +48 -0
  13. package/esm/adapter/CucumberFormat.js.map +1 -0
  14. package/esm/adapter/CucumberOptions.d.ts +29 -0
  15. package/esm/adapter/CucumberOptions.d.ts.map +1 -0
  16. package/esm/adapter/CucumberOptions.js +145 -0
  17. package/esm/adapter/CucumberOptions.js.map +1 -0
  18. package/esm/adapter/index.d.ts +5 -0
  19. package/esm/adapter/index.d.ts.map +1 -0
  20. package/esm/adapter/index.js +5 -0
  21. package/esm/adapter/index.js.map +1 -0
  22. package/esm/adapter/output/OutputDescriptor.d.ts +8 -0
  23. package/esm/adapter/output/OutputDescriptor.d.ts.map +1 -0
  24. package/esm/adapter/output/OutputDescriptor.js +2 -0
  25. package/esm/adapter/output/OutputDescriptor.js.map +1 -0
  26. package/esm/adapter/output/SerenityFormatterOutput.d.ts +8 -0
  27. package/esm/adapter/output/SerenityFormatterOutput.d.ts.map +1 -0
  28. package/esm/adapter/output/SerenityFormatterOutput.js +2 -0
  29. package/esm/adapter/output/SerenityFormatterOutput.js.map +1 -0
  30. package/esm/adapter/output/StandardOutput.d.ts +9 -0
  31. package/esm/adapter/output/StandardOutput.d.ts.map +1 -0
  32. package/esm/adapter/output/StandardOutput.js +10 -0
  33. package/esm/adapter/output/StandardOutput.js.map +1 -0
  34. package/esm/adapter/output/StandardOutputDescriptor.d.ts +9 -0
  35. package/esm/adapter/output/StandardOutputDescriptor.d.ts.map +1 -0
  36. package/esm/adapter/output/StandardOutputDescriptor.js +12 -0
  37. package/esm/adapter/output/StandardOutputDescriptor.js.map +1 -0
  38. package/esm/adapter/output/TempFileOutput.d.ts +12 -0
  39. package/esm/adapter/output/TempFileOutput.d.ts.map +1 -0
  40. package/esm/adapter/output/TempFileOutput.js +14 -0
  41. package/esm/adapter/output/TempFileOutput.js.map +1 -0
  42. package/esm/adapter/output/TempFileOutputDescriptor.d.ts +17 -0
  43. package/esm/adapter/output/TempFileOutputDescriptor.d.ts.map +1 -0
  44. package/esm/adapter/output/TempFileOutputDescriptor.js +24 -0
  45. package/esm/adapter/output/TempFileOutputDescriptor.js.map +1 -0
  46. package/esm/adapter/output/index.d.ts +5 -0
  47. package/esm/adapter/output/index.d.ts.map +1 -0
  48. package/esm/adapter/output/index.js +5 -0
  49. package/esm/adapter/output/index.js.map +1 -0
  50. package/esm/errors/AmbiguousStepDefinitionError.d.ts +9 -0
  51. package/esm/errors/AmbiguousStepDefinitionError.d.ts.map +1 -0
  52. package/esm/errors/AmbiguousStepDefinitionError.js +11 -0
  53. package/esm/errors/AmbiguousStepDefinitionError.js.map +1 -0
  54. package/esm/errors/index.d.ts +2 -0
  55. package/esm/errors/index.d.ts.map +1 -0
  56. package/esm/errors/index.js +2 -0
  57. package/esm/errors/index.js.map +1 -0
  58. package/esm/index.d.ts +7 -0
  59. package/esm/index.d.ts.map +1 -0
  60. package/esm/index.js +19 -0
  61. package/esm/index.js.map +1 -0
  62. package/esm/listeners/legacy/CucumberEventProtocolAdapter.d.ts +18 -0
  63. package/esm/listeners/legacy/CucumberEventProtocolAdapter.d.ts.map +1 -0
  64. package/esm/listeners/legacy/CucumberEventProtocolAdapter.js +127 -0
  65. package/esm/listeners/legacy/CucumberEventProtocolAdapter.js.map +1 -0
  66. package/esm/listeners/legacy/CucumberFormatterOptions.d.ts +15 -0
  67. package/esm/listeners/legacy/CucumberFormatterOptions.d.ts.map +1 -0
  68. package/esm/listeners/legacy/CucumberFormatterOptions.js +2 -0
  69. package/esm/listeners/legacy/CucumberFormatterOptions.js.map +1 -0
  70. package/esm/listeners/legacy/Dependencies.d.ts +17 -0
  71. package/esm/listeners/legacy/Dependencies.d.ts.map +1 -0
  72. package/esm/listeners/legacy/Dependencies.js +2 -0
  73. package/esm/listeners/legacy/Dependencies.js.map +1 -0
  74. package/esm/listeners/legacy/cucumber-0.d.ts +3 -0
  75. package/esm/listeners/legacy/cucumber-0.d.ts.map +1 -0
  76. package/esm/listeners/legacy/cucumber-0.js +100 -0
  77. package/esm/listeners/legacy/cucumber-0.js.map +1 -0
  78. package/esm/listeners/legacy/cucumber-1.d.ts +2 -0
  79. package/esm/listeners/legacy/cucumber-1.d.ts.map +1 -0
  80. package/esm/listeners/legacy/cucumber-1.js +2 -0
  81. package/esm/listeners/legacy/cucumber-1.js.map +1 -0
  82. package/esm/listeners/legacy/cucumber-2.d.ts +3 -0
  83. package/esm/listeners/legacy/cucumber-2.d.ts.map +1 -0
  84. package/esm/listeners/legacy/cucumber-2.js +8 -0
  85. package/esm/listeners/legacy/cucumber-2.js.map +1 -0
  86. package/esm/listeners/legacy/cucumber-3.d.ts +13 -0
  87. package/esm/listeners/legacy/cucumber-3.d.ts.map +1 -0
  88. package/esm/listeners/legacy/cucumber-3.js +27 -0
  89. package/esm/listeners/legacy/cucumber-3.js.map +1 -0
  90. package/esm/listeners/legacy/cucumber-4.d.ts +13 -0
  91. package/esm/listeners/legacy/cucumber-4.d.ts.map +1 -0
  92. package/esm/listeners/legacy/cucumber-4.js +26 -0
  93. package/esm/listeners/legacy/cucumber-4.js.map +1 -0
  94. package/esm/listeners/legacy/cucumber-5.d.ts +2 -0
  95. package/esm/listeners/legacy/cucumber-5.d.ts.map +1 -0
  96. package/esm/listeners/legacy/cucumber-5.js +2 -0
  97. package/esm/listeners/legacy/cucumber-5.js.map +1 -0
  98. package/esm/listeners/legacy/cucumber-6.d.ts +2 -0
  99. package/esm/listeners/legacy/cucumber-6.d.ts.map +1 -0
  100. package/esm/listeners/legacy/cucumber-6.js +2 -0
  101. package/esm/listeners/legacy/cucumber-6.js.map +1 -0
  102. package/esm/listeners/legacy/gherkin/GherkinParserAdapter.d.ts +31 -0
  103. package/esm/listeners/legacy/gherkin/GherkinParserAdapter.d.ts.map +1 -0
  104. package/esm/listeners/legacy/gherkin/GherkinParserAdapter.js +164 -0
  105. package/esm/listeners/legacy/gherkin/GherkinParserAdapter.js.map +1 -0
  106. package/esm/listeners/legacy/gherkin/constructables.d.ts +2 -0
  107. package/esm/listeners/legacy/gherkin/constructables.d.ts.map +1 -0
  108. package/esm/listeners/legacy/gherkin/constructables.js +2 -0
  109. package/esm/listeners/legacy/gherkin/constructables.js.map +1 -0
  110. package/esm/listeners/legacy/gherkin/feature-files/Cache.d.ts +17 -0
  111. package/esm/listeners/legacy/gherkin/feature-files/Cache.d.ts.map +1 -0
  112. package/esm/listeners/legacy/gherkin/feature-files/Cache.js +32 -0
  113. package/esm/listeners/legacy/gherkin/feature-files/Cache.js.map +1 -0
  114. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileLoader.d.ts +16 -0
  115. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileLoader.d.ts.map +1 -0
  116. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileLoader.js +26 -0
  117. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileLoader.js.map +1 -0
  118. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileMap.d.ts +19 -0
  119. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileMap.d.ts.map +1 -0
  120. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileMap.js +44 -0
  121. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileMap.js.map +1 -0
  122. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileMapper.d.ts +14 -0
  123. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileMapper.d.ts.map +1 -0
  124. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileMapper.js +97 -0
  125. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileMapper.js.map +1 -0
  126. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileParser.d.ts +13 -0
  127. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileParser.d.ts.map +1 -0
  128. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileParser.js +27 -0
  129. package/esm/listeners/legacy/gherkin/feature-files/FeatureFileParser.js.map +1 -0
  130. package/esm/listeners/legacy/gherkin/feature-files/errors/ItemNotFoundError.d.ts +8 -0
  131. package/esm/listeners/legacy/gherkin/feature-files/errors/ItemNotFoundError.d.ts.map +1 -0
  132. package/esm/listeners/legacy/gherkin/feature-files/errors/ItemNotFoundError.js +10 -0
  133. package/esm/listeners/legacy/gherkin/feature-files/errors/ItemNotFoundError.js.map +1 -0
  134. package/esm/listeners/legacy/gherkin/feature-files/errors/UnableToParseFeatureFileError.d.ts +8 -0
  135. package/esm/listeners/legacy/gherkin/feature-files/errors/UnableToParseFeatureFileError.d.ts.map +1 -0
  136. package/esm/listeners/legacy/gherkin/feature-files/errors/UnableToParseFeatureFileError.js +10 -0
  137. package/esm/listeners/legacy/gherkin/feature-files/errors/UnableToParseFeatureFileError.js.map +1 -0
  138. package/esm/listeners/legacy/gherkin/feature-files/errors/UnableToReadFeatureFileError.d.ts +8 -0
  139. package/esm/listeners/legacy/gherkin/feature-files/errors/UnableToReadFeatureFileError.d.ts.map +1 -0
  140. package/esm/listeners/legacy/gherkin/feature-files/errors/UnableToReadFeatureFileError.js +10 -0
  141. package/esm/listeners/legacy/gherkin/feature-files/errors/UnableToReadFeatureFileError.js.map +1 -0
  142. package/esm/listeners/legacy/gherkin/feature-files/errors/UnableToRetrieveFeatureFileMap.d.ts +8 -0
  143. package/esm/listeners/legacy/gherkin/feature-files/errors/UnableToRetrieveFeatureFileMap.d.ts.map +1 -0
  144. package/esm/listeners/legacy/gherkin/feature-files/errors/UnableToRetrieveFeatureFileMap.js +10 -0
  145. package/esm/listeners/legacy/gherkin/feature-files/errors/UnableToRetrieveFeatureFileMap.js.map +1 -0
  146. package/esm/listeners/legacy/gherkin/feature-files/errors/index.d.ts +5 -0
  147. package/esm/listeners/legacy/gherkin/feature-files/errors/index.d.ts.map +1 -0
  148. package/esm/listeners/legacy/gherkin/feature-files/errors/index.js +5 -0
  149. package/esm/listeners/legacy/gherkin/feature-files/errors/index.js.map +1 -0
  150. package/esm/listeners/legacy/gherkin/feature-files/index.d.ts +6 -0
  151. package/esm/listeners/legacy/gherkin/feature-files/index.d.ts.map +1 -0
  152. package/esm/listeners/legacy/gherkin/feature-files/index.js +6 -0
  153. package/esm/listeners/legacy/gherkin/feature-files/index.js.map +1 -0
  154. package/esm/listeners/legacy/gherkin/index.d.ts +4 -0
  155. package/esm/listeners/legacy/gherkin/index.d.ts.map +1 -0
  156. package/esm/listeners/legacy/gherkin/index.js +4 -0
  157. package/esm/listeners/legacy/gherkin/index.js.map +1 -0
  158. package/esm/listeners/legacy/gherkin/model/Background.d.ts +13 -0
  159. package/esm/listeners/legacy/gherkin/model/Background.d.ts.map +1 -0
  160. package/esm/listeners/legacy/gherkin/model/Background.js +14 -0
  161. package/esm/listeners/legacy/gherkin/model/Background.js.map +1 -0
  162. package/esm/listeners/legacy/gherkin/model/Feature.d.ts +13 -0
  163. package/esm/listeners/legacy/gherkin/model/Feature.d.ts.map +1 -0
  164. package/esm/listeners/legacy/gherkin/model/Feature.js +14 -0
  165. package/esm/listeners/legacy/gherkin/model/Feature.js.map +1 -0
  166. package/esm/listeners/legacy/gherkin/model/FeatureFileNode.d.ts +12 -0
  167. package/esm/listeners/legacy/gherkin/model/FeatureFileNode.d.ts.map +1 -0
  168. package/esm/listeners/legacy/gherkin/model/FeatureFileNode.js +14 -0
  169. package/esm/listeners/legacy/gherkin/model/FeatureFileNode.js.map +1 -0
  170. package/esm/listeners/legacy/gherkin/model/Hook.d.ts +7 -0
  171. package/esm/listeners/legacy/gherkin/model/Hook.d.ts.map +1 -0
  172. package/esm/listeners/legacy/gherkin/model/Hook.js +7 -0
  173. package/esm/listeners/legacy/gherkin/model/Hook.js.map +1 -0
  174. package/esm/listeners/legacy/gherkin/model/Scenario.d.ts +16 -0
  175. package/esm/listeners/legacy/gherkin/model/Scenario.d.ts.map +1 -0
  176. package/esm/listeners/legacy/gherkin/model/Scenario.js +18 -0
  177. package/esm/listeners/legacy/gherkin/model/Scenario.js.map +1 -0
  178. package/esm/listeners/legacy/gherkin/model/ScenarioOutline.d.ts +18 -0
  179. package/esm/listeners/legacy/gherkin/model/ScenarioOutline.d.ts.map +1 -0
  180. package/esm/listeners/legacy/gherkin/model/ScenarioOutline.js +16 -0
  181. package/esm/listeners/legacy/gherkin/model/ScenarioOutline.js.map +1 -0
  182. package/esm/listeners/legacy/gherkin/model/Step.d.ts +7 -0
  183. package/esm/listeners/legacy/gherkin/model/Step.d.ts.map +1 -0
  184. package/esm/listeners/legacy/gherkin/model/Step.js +7 -0
  185. package/esm/listeners/legacy/gherkin/model/Step.js.map +1 -0
  186. package/esm/listeners/legacy/gherkin/model/index.d.ts +8 -0
  187. package/esm/listeners/legacy/gherkin/model/index.d.ts.map +1 -0
  188. package/esm/listeners/legacy/gherkin/model/index.js +8 -0
  189. package/esm/listeners/legacy/gherkin/model/index.js.map +1 -0
  190. package/esm/listeners/legacy/gherkin/nodes/ASTNode.d.ts +9 -0
  191. package/esm/listeners/legacy/gherkin/nodes/ASTNode.d.ts.map +1 -0
  192. package/esm/listeners/legacy/gherkin/nodes/ASTNode.js +2 -0
  193. package/esm/listeners/legacy/gherkin/nodes/ASTNode.js.map +1 -0
  194. package/esm/listeners/legacy/gherkin/nodes/Background.d.ts +8 -0
  195. package/esm/listeners/legacy/gherkin/nodes/Background.d.ts.map +1 -0
  196. package/esm/listeners/legacy/gherkin/nodes/Background.js +2 -0
  197. package/esm/listeners/legacy/gherkin/nodes/Background.js.map +1 -0
  198. package/esm/listeners/legacy/gherkin/nodes/Comment.d.ts +9 -0
  199. package/esm/listeners/legacy/gherkin/nodes/Comment.d.ts.map +1 -0
  200. package/esm/listeners/legacy/gherkin/nodes/Comment.js +2 -0
  201. package/esm/listeners/legacy/gherkin/nodes/Comment.js.map +1 -0
  202. package/esm/listeners/legacy/gherkin/nodes/DataTable.d.ts +10 -0
  203. package/esm/listeners/legacy/gherkin/nodes/DataTable.d.ts.map +1 -0
  204. package/esm/listeners/legacy/gherkin/nodes/DataTable.js +2 -0
  205. package/esm/listeners/legacy/gherkin/nodes/DataTable.js.map +1 -0
  206. package/esm/listeners/legacy/gherkin/nodes/DocString.d.ts +9 -0
  207. package/esm/listeners/legacy/gherkin/nodes/DocString.d.ts.map +1 -0
  208. package/esm/listeners/legacy/gherkin/nodes/DocString.js +2 -0
  209. package/esm/listeners/legacy/gherkin/nodes/DocString.js.map +1 -0
  210. package/esm/listeners/legacy/gherkin/nodes/Examples.d.ts +16 -0
  211. package/esm/listeners/legacy/gherkin/nodes/Examples.d.ts.map +1 -0
  212. package/esm/listeners/legacy/gherkin/nodes/Examples.js +2 -0
  213. package/esm/listeners/legacy/gherkin/nodes/Examples.js.map +1 -0
  214. package/esm/listeners/legacy/gherkin/nodes/Feature.d.ts +16 -0
  215. package/esm/listeners/legacy/gherkin/nodes/Feature.d.ts.map +1 -0
  216. package/esm/listeners/legacy/gherkin/nodes/Feature.js +2 -0
  217. package/esm/listeners/legacy/gherkin/nodes/Feature.js.map +1 -0
  218. package/esm/listeners/legacy/gherkin/nodes/GherkinDocument.d.ts +11 -0
  219. package/esm/listeners/legacy/gherkin/nodes/GherkinDocument.d.ts.map +1 -0
  220. package/esm/listeners/legacy/gherkin/nodes/GherkinDocument.js +2 -0
  221. package/esm/listeners/legacy/gherkin/nodes/GherkinDocument.js.map +1 -0
  222. package/esm/listeners/legacy/gherkin/nodes/Location.d.ts +8 -0
  223. package/esm/listeners/legacy/gherkin/nodes/Location.d.ts.map +1 -0
  224. package/esm/listeners/legacy/gherkin/nodes/Location.js +2 -0
  225. package/esm/listeners/legacy/gherkin/nodes/Location.js.map +1 -0
  226. package/esm/listeners/legacy/gherkin/nodes/Scenario.d.ts +10 -0
  227. package/esm/listeners/legacy/gherkin/nodes/Scenario.d.ts.map +1 -0
  228. package/esm/listeners/legacy/gherkin/nodes/Scenario.js +2 -0
  229. package/esm/listeners/legacy/gherkin/nodes/Scenario.js.map +1 -0
  230. package/esm/listeners/legacy/gherkin/nodes/ScenarioDefinition.d.ts +15 -0
  231. package/esm/listeners/legacy/gherkin/nodes/ScenarioDefinition.d.ts.map +1 -0
  232. package/esm/listeners/legacy/gherkin/nodes/ScenarioDefinition.js +2 -0
  233. package/esm/listeners/legacy/gherkin/nodes/ScenarioDefinition.js.map +1 -0
  234. package/esm/listeners/legacy/gherkin/nodes/ScenarioOutline.d.ts +12 -0
  235. package/esm/listeners/legacy/gherkin/nodes/ScenarioOutline.d.ts.map +1 -0
  236. package/esm/listeners/legacy/gherkin/nodes/ScenarioOutline.js +2 -0
  237. package/esm/listeners/legacy/gherkin/nodes/ScenarioOutline.js.map +1 -0
  238. package/esm/listeners/legacy/gherkin/nodes/Step.d.ts +12 -0
  239. package/esm/listeners/legacy/gherkin/nodes/Step.d.ts.map +1 -0
  240. package/esm/listeners/legacy/gherkin/nodes/Step.js +2 -0
  241. package/esm/listeners/legacy/gherkin/nodes/Step.js.map +1 -0
  242. package/esm/listeners/legacy/gherkin/nodes/StepArgument.d.ts +8 -0
  243. package/esm/listeners/legacy/gherkin/nodes/StepArgument.d.ts.map +1 -0
  244. package/esm/listeners/legacy/gherkin/nodes/StepArgument.js +2 -0
  245. package/esm/listeners/legacy/gherkin/nodes/StepArgument.js.map +1 -0
  246. package/esm/listeners/legacy/gherkin/nodes/TableCell.d.ts +8 -0
  247. package/esm/listeners/legacy/gherkin/nodes/TableCell.d.ts.map +1 -0
  248. package/esm/listeners/legacy/gherkin/nodes/TableCell.js +2 -0
  249. package/esm/listeners/legacy/gherkin/nodes/TableCell.js.map +1 -0
  250. package/esm/listeners/legacy/gherkin/nodes/TableRow.d.ts +10 -0
  251. package/esm/listeners/legacy/gherkin/nodes/TableRow.d.ts.map +1 -0
  252. package/esm/listeners/legacy/gherkin/nodes/TableRow.js +2 -0
  253. package/esm/listeners/legacy/gherkin/nodes/TableRow.js.map +1 -0
  254. package/esm/listeners/legacy/gherkin/nodes/Tag.d.ts +9 -0
  255. package/esm/listeners/legacy/gherkin/nodes/Tag.d.ts.map +1 -0
  256. package/esm/listeners/legacy/gherkin/nodes/Tag.js +2 -0
  257. package/esm/listeners/legacy/gherkin/nodes/Tag.js.map +1 -0
  258. package/esm/listeners/legacy/gherkin/nodes/index.d.ts +17 -0
  259. package/esm/listeners/legacy/gherkin/nodes/index.d.ts.map +1 -0
  260. package/esm/listeners/legacy/gherkin/nodes/index.js +17 -0
  261. package/esm/listeners/legacy/gherkin/nodes/index.js.map +1 -0
  262. package/esm/listeners/legacy/index.d.ts +10 -0
  263. package/esm/listeners/legacy/index.d.ts.map +1 -0
  264. package/esm/listeners/legacy/index.js +48 -0
  265. package/esm/listeners/legacy/index.js.map +1 -0
  266. package/esm/listeners/legacy/notifier/Notifier.d.ts +27 -0
  267. package/esm/listeners/legacy/notifier/Notifier.d.ts.map +1 -0
  268. package/esm/listeners/legacy/notifier/Notifier.js +82 -0
  269. package/esm/listeners/legacy/notifier/Notifier.js.map +1 -0
  270. package/esm/listeners/legacy/notifier/ResultMapper.d.ts +15 -0
  271. package/esm/listeners/legacy/notifier/ResultMapper.d.ts.map +1 -0
  272. package/esm/listeners/legacy/notifier/ResultMapper.js +80 -0
  273. package/esm/listeners/legacy/notifier/ResultMapper.js.map +1 -0
  274. package/esm/listeners/legacy/notifier/index.d.ts +3 -0
  275. package/esm/listeners/legacy/notifier/index.d.ts.map +1 -0
  276. package/esm/listeners/legacy/notifier/index.js +3 -0
  277. package/esm/listeners/legacy/notifier/index.js.map +1 -0
  278. package/esm/listeners/messages/CucumberMessagesListener.d.ts +18 -0
  279. package/esm/listeners/messages/CucumberMessagesListener.d.ts.map +1 -0
  280. package/esm/listeners/messages/CucumberMessagesListener.js +65 -0
  281. package/esm/listeners/messages/CucumberMessagesListener.js.map +1 -0
  282. package/esm/listeners/messages/index.d.ts +7 -0
  283. package/esm/listeners/messages/index.d.ts.map +1 -0
  284. package/esm/listeners/messages/index.js +8 -0
  285. package/esm/listeners/messages/index.js.map +1 -0
  286. package/esm/listeners/messages/parser/CucumberMessagesParser.d.ts +45 -0
  287. package/esm/listeners/messages/parser/CucumberMessagesParser.d.ts.map +1 -0
  288. package/esm/listeners/messages/parser/CucumberMessagesParser.js +211 -0
  289. package/esm/listeners/messages/parser/CucumberMessagesParser.js.map +1 -0
  290. package/esm/listeners/messages/parser/TestStepFormatter.d.ts +14 -0
  291. package/esm/listeners/messages/parser/TestStepFormatter.d.ts.map +1 -0
  292. package/esm/listeners/messages/parser/TestStepFormatter.js +61 -0
  293. package/esm/listeners/messages/parser/TestStepFormatter.js.map +1 -0
  294. package/esm/listeners/messages/parser/types/ExtractedScenario.d.ts +9 -0
  295. package/esm/listeners/messages/parser/types/ExtractedScenario.d.ts.map +1 -0
  296. package/esm/listeners/messages/parser/types/ExtractedScenario.js +2 -0
  297. package/esm/listeners/messages/parser/types/ExtractedScenario.js.map +1 -0
  298. package/esm/listeners/messages/parser/types/ExtractedScenarioOutline.d.ts +7 -0
  299. package/esm/listeners/messages/parser/types/ExtractedScenarioOutline.d.ts.map +1 -0
  300. package/esm/listeners/messages/parser/types/ExtractedScenarioOutline.js +2 -0
  301. package/esm/listeners/messages/parser/types/ExtractedScenarioOutline.js.map +1 -0
  302. package/esm/listeners/messages/parser/types/index.d.ts +3 -0
  303. package/esm/listeners/messages/parser/types/index.d.ts.map +1 -0
  304. package/esm/listeners/messages/parser/types/index.js +3 -0
  305. package/esm/listeners/messages/parser/types/index.js.map +1 -0
  306. package/esm/listeners/messages/types/cucumber.d.ts +63 -0
  307. package/esm/listeners/messages/types/cucumber.d.ts.map +1 -0
  308. package/esm/listeners/messages/types/cucumber.js +7 -0
  309. package/esm/listeners/messages/types/cucumber.js.map +1 -0
  310. package/lib/adapter/CucumberCLIAdapter.d.ts +5 -5
  311. package/lib/adapter/CucumberCLIAdapter.d.ts.map +1 -1
  312. package/lib/adapter/CucumberCLIAdapter.js +4 -4
  313. package/lib/adapter/CucumberCLIAdapter.js.map +1 -1
  314. package/lib/adapter/CucumberOptions.d.ts +3 -3
  315. package/lib/adapter/CucumberOptions.d.ts.map +1 -1
  316. package/lib/adapter/CucumberOptions.js +1 -1
  317. package/lib/adapter/CucumberOptions.js.map +1 -1
  318. package/lib/adapter/index.d.ts +4 -4
  319. package/lib/adapter/index.d.ts.map +1 -1
  320. package/lib/adapter/index.js +4 -4
  321. package/lib/adapter/index.js.map +1 -1
  322. package/lib/adapter/output/SerenityFormatterOutput.d.ts +1 -1
  323. package/lib/adapter/output/SerenityFormatterOutput.d.ts.map +1 -1
  324. package/lib/adapter/output/StandardOutput.d.ts +2 -2
  325. package/lib/adapter/output/StandardOutput.d.ts.map +1 -1
  326. package/lib/adapter/output/StandardOutput.js +2 -2
  327. package/lib/adapter/output/StandardOutput.js.map +1 -1
  328. package/lib/adapter/output/StandardOutputDescriptor.d.ts +1 -1
  329. package/lib/adapter/output/StandardOutputDescriptor.d.ts.map +1 -1
  330. package/lib/adapter/output/TempFileOutput.d.ts +3 -3
  331. package/lib/adapter/output/TempFileOutput.d.ts.map +1 -1
  332. package/lib/adapter/output/TempFileOutput.js +2 -2
  333. package/lib/adapter/output/TempFileOutput.js.map +1 -1
  334. package/lib/adapter/output/TempFileOutputDescriptor.d.ts +2 -2
  335. package/lib/adapter/output/TempFileOutputDescriptor.d.ts.map +1 -1
  336. package/lib/adapter/output/TempFileOutputDescriptor.js +1 -1
  337. package/lib/adapter/output/TempFileOutputDescriptor.js.map +1 -1
  338. package/lib/adapter/output/index.d.ts +4 -4
  339. package/lib/adapter/output/index.d.ts.map +1 -1
  340. package/lib/adapter/output/index.js +4 -4
  341. package/lib/adapter/output/index.js.map +1 -1
  342. package/lib/errors/AmbiguousStepDefinitionError.d.ts +1 -1
  343. package/lib/errors/AmbiguousStepDefinitionError.d.ts.map +1 -1
  344. package/lib/errors/AmbiguousStepDefinitionError.js +1 -1
  345. package/lib/errors/AmbiguousStepDefinitionError.js.map +1 -1
  346. package/lib/errors/index.d.ts +1 -1
  347. package/lib/errors/index.d.ts.map +1 -1
  348. package/lib/errors/index.js +1 -1
  349. package/lib/errors/index.js.map +1 -1
  350. package/lib/index.d.ts +1 -1
  351. package/lib/index.d.ts.map +1 -1
  352. package/lib/index.js +7 -4
  353. package/lib/index.js.map +1 -1
  354. package/lib/listeners/legacy/CucumberEventProtocolAdapter.d.ts +3 -3
  355. package/lib/listeners/legacy/CucumberEventProtocolAdapter.d.ts.map +1 -1
  356. package/lib/listeners/legacy/CucumberEventProtocolAdapter.js +21 -21
  357. package/lib/listeners/legacy/CucumberEventProtocolAdapter.js.map +1 -1
  358. package/lib/listeners/legacy/Dependencies.d.ts +3 -3
  359. package/lib/listeners/legacy/Dependencies.d.ts.map +1 -1
  360. package/lib/listeners/legacy/cucumber-0.d.ts +2 -3
  361. package/lib/listeners/legacy/cucumber-0.d.ts.map +1 -1
  362. package/lib/listeners/legacy/cucumber-0.js +50 -48
  363. package/lib/listeners/legacy/cucumber-0.js.map +1 -1
  364. package/lib/listeners/legacy/cucumber-1.d.ts +1 -2
  365. package/lib/listeners/legacy/cucumber-1.d.ts.map +1 -1
  366. package/lib/listeners/legacy/cucumber-1.js +7 -1
  367. package/lib/listeners/legacy/cucumber-1.js.map +1 -1
  368. package/lib/listeners/legacy/cucumber-2.d.ts +2 -3
  369. package/lib/listeners/legacy/cucumber-2.d.ts.map +1 -1
  370. package/lib/listeners/legacy/cucumber-2.js +9 -4
  371. package/lib/listeners/legacy/cucumber-2.js.map +1 -1
  372. package/lib/listeners/legacy/cucumber-3.d.ts +4 -5
  373. package/lib/listeners/legacy/cucumber-3.d.ts.map +1 -1
  374. package/lib/listeners/legacy/cucumber-3.js +8 -5
  375. package/lib/listeners/legacy/cucumber-3.js.map +1 -1
  376. package/lib/listeners/legacy/cucumber-4.d.ts +4 -5
  377. package/lib/listeners/legacy/cucumber-4.d.ts.map +1 -1
  378. package/lib/listeners/legacy/cucumber-4.js +8 -5
  379. package/lib/listeners/legacy/cucumber-4.js.map +1 -1
  380. package/lib/listeners/legacy/cucumber-5.d.ts +1 -2
  381. package/lib/listeners/legacy/cucumber-5.d.ts.map +1 -1
  382. package/lib/listeners/legacy/cucumber-5.js +7 -1
  383. package/lib/listeners/legacy/cucumber-5.js.map +1 -1
  384. package/lib/listeners/legacy/cucumber-6.d.ts +1 -2
  385. package/lib/listeners/legacy/cucumber-6.d.ts.map +1 -1
  386. package/lib/listeners/legacy/cucumber-6.js +7 -1
  387. package/lib/listeners/legacy/cucumber-6.js.map +1 -1
  388. package/lib/listeners/legacy/gherkin/GherkinParserAdapter.d.ts +1 -1
  389. package/lib/listeners/legacy/gherkin/GherkinParserAdapter.d.ts.map +1 -1
  390. package/lib/listeners/legacy/gherkin/feature-files/Cache.js +2 -2
  391. package/lib/listeners/legacy/gherkin/feature-files/Cache.js.map +1 -1
  392. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileLoader.d.ts +5 -5
  393. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileLoader.d.ts.map +1 -1
  394. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileLoader.js +2 -2
  395. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileLoader.js.map +1 -1
  396. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileMap.d.ts +1 -1
  397. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileMap.d.ts.map +1 -1
  398. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileMap.js +4 -4
  399. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileMap.js.map +1 -1
  400. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileMapper.d.ts +3 -3
  401. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileMapper.d.ts.map +1 -1
  402. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileMapper.js +12 -12
  403. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileMapper.js.map +1 -1
  404. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileParser.d.ts +2 -2
  405. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileParser.d.ts.map +1 -1
  406. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileParser.js +3 -3
  407. package/lib/listeners/legacy/gherkin/feature-files/FeatureFileParser.js.map +1 -1
  408. package/lib/listeners/legacy/gherkin/feature-files/errors/ItemNotFoundError.d.ts +1 -1
  409. package/lib/listeners/legacy/gherkin/feature-files/errors/ItemNotFoundError.d.ts.map +1 -1
  410. package/lib/listeners/legacy/gherkin/feature-files/errors/ItemNotFoundError.js +1 -1
  411. package/lib/listeners/legacy/gherkin/feature-files/errors/ItemNotFoundError.js.map +1 -1
  412. package/lib/listeners/legacy/gherkin/feature-files/errors/UnableToParseFeatureFileError.d.ts +1 -1
  413. package/lib/listeners/legacy/gherkin/feature-files/errors/UnableToParseFeatureFileError.d.ts.map +1 -1
  414. package/lib/listeners/legacy/gherkin/feature-files/errors/UnableToParseFeatureFileError.js +1 -1
  415. package/lib/listeners/legacy/gherkin/feature-files/errors/UnableToParseFeatureFileError.js.map +1 -1
  416. package/lib/listeners/legacy/gherkin/feature-files/errors/UnableToReadFeatureFileError.d.ts +1 -1
  417. package/lib/listeners/legacy/gherkin/feature-files/errors/UnableToReadFeatureFileError.d.ts.map +1 -1
  418. package/lib/listeners/legacy/gherkin/feature-files/errors/UnableToReadFeatureFileError.js +1 -1
  419. package/lib/listeners/legacy/gherkin/feature-files/errors/UnableToReadFeatureFileError.js.map +1 -1
  420. package/lib/listeners/legacy/gherkin/feature-files/errors/UnableToRetrieveFeatureFileMap.d.ts +1 -1
  421. package/lib/listeners/legacy/gherkin/feature-files/errors/UnableToRetrieveFeatureFileMap.d.ts.map +1 -1
  422. package/lib/listeners/legacy/gherkin/feature-files/errors/UnableToRetrieveFeatureFileMap.js +1 -1
  423. package/lib/listeners/legacy/gherkin/feature-files/errors/UnableToRetrieveFeatureFileMap.js.map +1 -1
  424. package/lib/listeners/legacy/gherkin/feature-files/errors/index.d.ts +4 -4
  425. package/lib/listeners/legacy/gherkin/feature-files/errors/index.d.ts.map +1 -1
  426. package/lib/listeners/legacy/gherkin/feature-files/errors/index.js +4 -4
  427. package/lib/listeners/legacy/gherkin/feature-files/errors/index.js.map +1 -1
  428. package/lib/listeners/legacy/gherkin/feature-files/index.d.ts +5 -5
  429. package/lib/listeners/legacy/gherkin/feature-files/index.d.ts.map +1 -1
  430. package/lib/listeners/legacy/gherkin/feature-files/index.js +5 -5
  431. package/lib/listeners/legacy/gherkin/feature-files/index.js.map +1 -1
  432. package/lib/listeners/legacy/gherkin/index.d.ts +3 -3
  433. package/lib/listeners/legacy/gherkin/index.d.ts.map +1 -1
  434. package/lib/listeners/legacy/gherkin/index.js +3 -3
  435. package/lib/listeners/legacy/gherkin/index.js.map +1 -1
  436. package/lib/listeners/legacy/gherkin/model/Background.d.ts +4 -4
  437. package/lib/listeners/legacy/gherkin/model/Background.d.ts.map +1 -1
  438. package/lib/listeners/legacy/gherkin/model/Background.js +2 -2
  439. package/lib/listeners/legacy/gherkin/model/Background.js.map +1 -1
  440. package/lib/listeners/legacy/gherkin/model/Feature.d.ts +4 -4
  441. package/lib/listeners/legacy/gherkin/model/Feature.d.ts.map +1 -1
  442. package/lib/listeners/legacy/gherkin/model/Feature.js +2 -2
  443. package/lib/listeners/legacy/gherkin/model/Feature.js.map +1 -1
  444. package/lib/listeners/legacy/gherkin/model/FeatureFileNode.d.ts +2 -2
  445. package/lib/listeners/legacy/gherkin/model/FeatureFileNode.d.ts.map +1 -1
  446. package/lib/listeners/legacy/gherkin/model/Hook.d.ts +1 -1
  447. package/lib/listeners/legacy/gherkin/model/Hook.d.ts.map +1 -1
  448. package/lib/listeners/legacy/gherkin/model/Hook.js +2 -2
  449. package/lib/listeners/legacy/gherkin/model/Hook.js.map +1 -1
  450. package/lib/listeners/legacy/gherkin/model/Scenario.d.ts +5 -5
  451. package/lib/listeners/legacy/gherkin/model/Scenario.d.ts.map +1 -1
  452. package/lib/listeners/legacy/gherkin/model/Scenario.js +2 -2
  453. package/lib/listeners/legacy/gherkin/model/Scenario.js.map +1 -1
  454. package/lib/listeners/legacy/gherkin/model/ScenarioOutline.d.ts +4 -4
  455. package/lib/listeners/legacy/gherkin/model/ScenarioOutline.d.ts.map +1 -1
  456. package/lib/listeners/legacy/gherkin/model/ScenarioOutline.js +2 -2
  457. package/lib/listeners/legacy/gherkin/model/ScenarioOutline.js.map +1 -1
  458. package/lib/listeners/legacy/gherkin/model/Step.d.ts +1 -1
  459. package/lib/listeners/legacy/gherkin/model/Step.d.ts.map +1 -1
  460. package/lib/listeners/legacy/gherkin/model/Step.js +2 -2
  461. package/lib/listeners/legacy/gherkin/model/Step.js.map +1 -1
  462. package/lib/listeners/legacy/gherkin/model/index.d.ts +7 -7
  463. package/lib/listeners/legacy/gherkin/model/index.d.ts.map +1 -1
  464. package/lib/listeners/legacy/gherkin/model/index.js +7 -7
  465. package/lib/listeners/legacy/gherkin/model/index.js.map +1 -1
  466. package/lib/listeners/legacy/gherkin/nodes/ASTNode.d.ts +1 -1
  467. package/lib/listeners/legacy/gherkin/nodes/ASTNode.d.ts.map +1 -1
  468. package/lib/listeners/legacy/gherkin/nodes/Background.d.ts +1 -1
  469. package/lib/listeners/legacy/gherkin/nodes/Background.d.ts.map +1 -1
  470. package/lib/listeners/legacy/gherkin/nodes/Comment.d.ts +1 -1
  471. package/lib/listeners/legacy/gherkin/nodes/Comment.d.ts.map +1 -1
  472. package/lib/listeners/legacy/gherkin/nodes/DataTable.d.ts +2 -2
  473. package/lib/listeners/legacy/gherkin/nodes/DataTable.d.ts.map +1 -1
  474. package/lib/listeners/legacy/gherkin/nodes/DocString.d.ts +1 -1
  475. package/lib/listeners/legacy/gherkin/nodes/DocString.d.ts.map +1 -1
  476. package/lib/listeners/legacy/gherkin/nodes/Examples.d.ts +3 -3
  477. package/lib/listeners/legacy/gherkin/nodes/Examples.d.ts.map +1 -1
  478. package/lib/listeners/legacy/gherkin/nodes/Feature.d.ts +3 -3
  479. package/lib/listeners/legacy/gherkin/nodes/Feature.d.ts.map +1 -1
  480. package/lib/listeners/legacy/gherkin/nodes/GherkinDocument.d.ts +2 -2
  481. package/lib/listeners/legacy/gherkin/nodes/GherkinDocument.d.ts.map +1 -1
  482. package/lib/listeners/legacy/gherkin/nodes/Scenario.d.ts +2 -2
  483. package/lib/listeners/legacy/gherkin/nodes/Scenario.d.ts.map +1 -1
  484. package/lib/listeners/legacy/gherkin/nodes/ScenarioDefinition.d.ts +3 -3
  485. package/lib/listeners/legacy/gherkin/nodes/ScenarioDefinition.d.ts.map +1 -1
  486. package/lib/listeners/legacy/gherkin/nodes/ScenarioOutline.d.ts +3 -3
  487. package/lib/listeners/legacy/gherkin/nodes/ScenarioOutline.d.ts.map +1 -1
  488. package/lib/listeners/legacy/gherkin/nodes/Step.d.ts +2 -2
  489. package/lib/listeners/legacy/gherkin/nodes/Step.d.ts.map +1 -1
  490. package/lib/listeners/legacy/gherkin/nodes/StepArgument.d.ts +1 -1
  491. package/lib/listeners/legacy/gherkin/nodes/StepArgument.d.ts.map +1 -1
  492. package/lib/listeners/legacy/gherkin/nodes/TableCell.d.ts +1 -1
  493. package/lib/listeners/legacy/gherkin/nodes/TableCell.d.ts.map +1 -1
  494. package/lib/listeners/legacy/gherkin/nodes/TableRow.d.ts +2 -2
  495. package/lib/listeners/legacy/gherkin/nodes/TableRow.d.ts.map +1 -1
  496. package/lib/listeners/legacy/gherkin/nodes/Tag.d.ts +1 -1
  497. package/lib/listeners/legacy/gherkin/nodes/Tag.d.ts.map +1 -1
  498. package/lib/listeners/legacy/gherkin/nodes/index.d.ts +16 -16
  499. package/lib/listeners/legacy/gherkin/nodes/index.d.ts.map +1 -1
  500. package/lib/listeners/legacy/gherkin/nodes/index.js +16 -16
  501. package/lib/listeners/legacy/gherkin/nodes/index.js.map +1 -1
  502. package/lib/listeners/legacy/index.d.ts +1 -1
  503. package/lib/listeners/legacy/index.d.ts.map +1 -1
  504. package/lib/listeners/legacy/index.js +27 -4
  505. package/lib/listeners/legacy/index.js.map +1 -1
  506. package/lib/listeners/legacy/notifier/Notifier.d.ts +3 -3
  507. package/lib/listeners/legacy/notifier/Notifier.d.ts.map +1 -1
  508. package/lib/listeners/legacy/notifier/Notifier.js +2 -2
  509. package/lib/listeners/legacy/notifier/Notifier.js.map +1 -1
  510. package/lib/listeners/legacy/notifier/ResultMapper.d.ts +1 -1
  511. package/lib/listeners/legacy/notifier/ResultMapper.d.ts.map +1 -1
  512. package/lib/listeners/legacy/notifier/ResultMapper.js +3 -3
  513. package/lib/listeners/legacy/notifier/ResultMapper.js.map +1 -1
  514. package/lib/listeners/legacy/notifier/index.d.ts +2 -2
  515. package/lib/listeners/legacy/notifier/index.d.ts.map +1 -1
  516. package/lib/listeners/legacy/notifier/index.js +2 -2
  517. package/lib/listeners/legacy/notifier/index.js.map +1 -1
  518. package/lib/listeners/messages/CucumberMessagesListener.d.ts +4 -5
  519. package/lib/listeners/messages/CucumberMessagesListener.d.ts.map +1 -1
  520. package/lib/listeners/messages/CucumberMessagesListener.js +9 -6
  521. package/lib/listeners/messages/CucumberMessagesListener.js.map +1 -1
  522. package/lib/listeners/messages/index.d.ts +1 -1
  523. package/lib/listeners/messages/index.d.ts.map +1 -1
  524. package/lib/listeners/messages/index.js +5 -2
  525. package/lib/listeners/messages/index.js.map +1 -1
  526. package/lib/listeners/messages/parser/CucumberMessagesParser.d.ts +2 -2
  527. package/lib/listeners/messages/parser/CucumberMessagesParser.d.ts.map +1 -1
  528. package/lib/listeners/messages/parser/CucumberMessagesParser.js +6 -6
  529. package/lib/listeners/messages/parser/CucumberMessagesParser.js.map +1 -1
  530. package/lib/listeners/messages/parser/types/ExtractedScenario.d.ts +1 -1
  531. package/lib/listeners/messages/parser/types/ExtractedScenario.d.ts.map +1 -1
  532. package/lib/listeners/messages/parser/types/ExtractedScenarioOutline.d.ts +1 -1
  533. package/lib/listeners/messages/parser/types/ExtractedScenarioOutline.d.ts.map +1 -1
  534. package/lib/listeners/messages/parser/types/index.d.ts +2 -2
  535. package/lib/listeners/messages/parser/types/index.d.ts.map +1 -1
  536. package/lib/listeners/messages/parser/types/index.js +2 -2
  537. package/lib/listeners/messages/parser/types/index.js.map +1 -1
  538. package/lib/package.json +1 -0
  539. package/package.json +43 -8
  540. package/src/adapter/CucumberCLIAdapter.ts +9 -9
  541. package/src/adapter/CucumberOptions.ts +3 -3
  542. package/src/adapter/index.ts +4 -4
  543. package/src/adapter/output/SerenityFormatterOutput.ts +1 -1
  544. package/src/adapter/output/StandardOutput.ts +3 -3
  545. package/src/adapter/output/StandardOutputDescriptor.ts +1 -1
  546. package/src/adapter/output/TempFileOutput.ts +4 -4
  547. package/src/adapter/output/TempFileOutputDescriptor.ts +2 -2
  548. package/src/adapter/output/index.ts +4 -4
  549. package/src/errors/AmbiguousStepDefinitionError.ts +1 -1
  550. package/src/errors/index.ts +1 -1
  551. package/src/index.ts +7 -4
  552. package/src/listeners/legacy/CucumberEventProtocolAdapter.ts +8 -8
  553. package/src/listeners/legacy/Dependencies.ts +3 -3
  554. package/src/listeners/legacy/cucumber-0.ts +8 -8
  555. package/src/listeners/legacy/cucumber-1.ts +1 -1
  556. package/src/listeners/legacy/cucumber-2.ts +5 -6
  557. package/src/listeners/legacy/cucumber-3.ts +5 -5
  558. package/src/listeners/legacy/cucumber-4.ts +5 -5
  559. package/src/listeners/legacy/cucumber-5.ts +1 -1
  560. package/src/listeners/legacy/cucumber-6.ts +1 -1
  561. package/src/listeners/legacy/gherkin/GherkinParserAdapter.ts +1 -1
  562. package/src/listeners/legacy/gherkin/feature-files/Cache.ts +1 -1
  563. package/src/listeners/legacy/gherkin/feature-files/FeatureFileLoader.ts +5 -5
  564. package/src/listeners/legacy/gherkin/feature-files/FeatureFileMap.ts +2 -2
  565. package/src/listeners/legacy/gherkin/feature-files/FeatureFileMapper.ts +8 -8
  566. package/src/listeners/legacy/gherkin/feature-files/FeatureFileParser.ts +3 -3
  567. package/src/listeners/legacy/gherkin/feature-files/errors/ItemNotFoundError.ts +1 -1
  568. package/src/listeners/legacy/gherkin/feature-files/errors/UnableToParseFeatureFileError.ts +1 -1
  569. package/src/listeners/legacy/gherkin/feature-files/errors/UnableToReadFeatureFileError.ts +1 -1
  570. package/src/listeners/legacy/gherkin/feature-files/errors/UnableToRetrieveFeatureFileMap.ts +1 -1
  571. package/src/listeners/legacy/gherkin/feature-files/errors/index.ts +4 -4
  572. package/src/listeners/legacy/gherkin/feature-files/index.ts +5 -5
  573. package/src/listeners/legacy/gherkin/index.ts +3 -3
  574. package/src/listeners/legacy/gherkin/model/Background.ts +4 -4
  575. package/src/listeners/legacy/gherkin/model/Feature.ts +4 -4
  576. package/src/listeners/legacy/gherkin/model/FeatureFileNode.ts +2 -2
  577. package/src/listeners/legacy/gherkin/model/Hook.ts +1 -1
  578. package/src/listeners/legacy/gherkin/model/Scenario.ts +5 -5
  579. package/src/listeners/legacy/gherkin/model/ScenarioOutline.ts +4 -4
  580. package/src/listeners/legacy/gherkin/model/Step.ts +1 -1
  581. package/src/listeners/legacy/gherkin/model/index.ts +7 -7
  582. package/src/listeners/legacy/gherkin/nodes/ASTNode.ts +1 -1
  583. package/src/listeners/legacy/gherkin/nodes/Background.ts +1 -1
  584. package/src/listeners/legacy/gherkin/nodes/Comment.ts +1 -1
  585. package/src/listeners/legacy/gherkin/nodes/DataTable.ts +2 -2
  586. package/src/listeners/legacy/gherkin/nodes/DocString.ts +1 -1
  587. package/src/listeners/legacy/gherkin/nodes/Examples.ts +3 -3
  588. package/src/listeners/legacy/gherkin/nodes/Feature.ts +3 -3
  589. package/src/listeners/legacy/gherkin/nodes/GherkinDocument.ts +2 -2
  590. package/src/listeners/legacy/gherkin/nodes/Scenario.ts +2 -2
  591. package/src/listeners/legacy/gherkin/nodes/ScenarioDefinition.ts +3 -3
  592. package/src/listeners/legacy/gherkin/nodes/ScenarioOutline.ts +3 -3
  593. package/src/listeners/legacy/gherkin/nodes/Step.ts +2 -2
  594. package/src/listeners/legacy/gherkin/nodes/StepArgument.ts +1 -1
  595. package/src/listeners/legacy/gherkin/nodes/TableCell.ts +1 -1
  596. package/src/listeners/legacy/gherkin/nodes/TableRow.ts +2 -2
  597. package/src/listeners/legacy/gherkin/nodes/Tag.ts +1 -1
  598. package/src/listeners/legacy/gherkin/nodes/index.ts +16 -16
  599. package/src/listeners/legacy/index.ts +27 -5
  600. package/src/listeners/legacy/notifier/Notifier.ts +6 -6
  601. package/src/listeners/legacy/notifier/ResultMapper.ts +3 -3
  602. package/src/listeners/legacy/notifier/index.ts +2 -2
  603. package/src/listeners/messages/CucumberMessagesListener.ts +8 -7
  604. package/src/listeners/messages/index.ts +3 -2
  605. package/src/listeners/messages/parser/CucumberMessagesParser.ts +9 -9
  606. package/src/listeners/messages/parser/types/ExtractedScenario.ts +1 -1
  607. package/src/listeners/messages/parser/types/ExtractedScenarioOutline.ts +1 -1
  608. package/src/listeners/messages/parser/types/index.ts +2 -2
  609. package/tsconfig-cjs.build.json +13 -0
  610. package/tsconfig-esm.build.json +13 -0
@@ -0,0 +1,164 @@
1
+ import { AstBuilder, GherkinClassicTokenMatcher, Parser } from '@cucumber/gherkin';
2
+ import { IdGenerator } from '@cucumber/messages';
3
+ /**
4
+ * Adapts the new @cucumber/gherkin Parser to produce output compatible with the old gherkin 5.x format.
5
+ *
6
+ * @private
7
+ */
8
+ export class GherkinParserAdapter {
9
+ parser;
10
+ constructor() {
11
+ const createUuid = IdGenerator.uuid();
12
+ const builder = new AstBuilder(createUuid);
13
+ const matcher = new GherkinClassicTokenMatcher();
14
+ this.parser = new Parser(builder, matcher);
15
+ }
16
+ parse(featureContent) {
17
+ const newDoc = this.parser.parse(featureContent);
18
+ return this.adaptDocument(newDoc);
19
+ }
20
+ adaptDocument(doc) {
21
+ return {
22
+ type: 'GherkinDocument',
23
+ feature: doc.feature ? this.adaptFeature(doc.feature) : undefined,
24
+ comments: (doc.comments || []).map(c => this.adaptComment(c)),
25
+ };
26
+ }
27
+ adaptFeature(feature) {
28
+ return {
29
+ type: 'Feature',
30
+ location: feature.location,
31
+ tags: feature.tags.map(t => this.adaptTag(t)),
32
+ language: feature.language,
33
+ keyword: feature.keyword,
34
+ name: feature.name,
35
+ description: this.trimDescription(feature.description),
36
+ children: feature.children.map(child => this.adaptChild(child)),
37
+ };
38
+ }
39
+ adaptChild(child) {
40
+ if (child.background) {
41
+ return this.adaptBackground(child.background);
42
+ }
43
+ if (child.scenario) {
44
+ // Check if it's a Scenario Outline by looking at the keyword or examples
45
+ if (child.scenario.keyword === 'Scenario Outline' || child.scenario.keyword === 'Scenario Template' || child.scenario.examples.length > 0) {
46
+ return this.adaptScenarioOutline(child.scenario);
47
+ }
48
+ return this.adaptScenario(child.scenario);
49
+ }
50
+ // Rule children are not supported in the legacy format
51
+ throw new Error('Unsupported feature child type');
52
+ }
53
+ adaptBackground(bg) {
54
+ return {
55
+ type: 'Background',
56
+ location: bg.location,
57
+ tags: [],
58
+ keyword: bg.keyword,
59
+ name: bg.name,
60
+ description: this.trimDescription(bg.description),
61
+ steps: bg.steps.map(s => this.adaptStep(s)),
62
+ };
63
+ }
64
+ adaptScenario(scenario) {
65
+ return {
66
+ type: 'Scenario',
67
+ location: scenario.location,
68
+ tags: scenario.tags.map(t => this.adaptTag(t)),
69
+ keyword: scenario.keyword,
70
+ name: scenario.name,
71
+ description: this.trimDescription(scenario.description),
72
+ steps: scenario.steps.map(s => this.adaptStep(s)),
73
+ };
74
+ }
75
+ adaptScenarioOutline(scenario) {
76
+ return {
77
+ type: 'ScenarioOutline',
78
+ location: scenario.location,
79
+ tags: scenario.tags.map(t => this.adaptTag(t)),
80
+ keyword: scenario.keyword,
81
+ name: scenario.name,
82
+ description: this.trimDescription(scenario.description),
83
+ steps: scenario.steps.map(s => this.adaptStep(s)),
84
+ examples: scenario.examples.map(e => this.adaptExamples(e)),
85
+ };
86
+ }
87
+ adaptStep(step) {
88
+ const result = {
89
+ type: 'Step',
90
+ location: step.location,
91
+ keyword: step.keyword,
92
+ text: step.text,
93
+ };
94
+ if (step.dataTable) {
95
+ result.argument = this.adaptDataTable(step.dataTable);
96
+ }
97
+ else if (step.docString) {
98
+ result.argument = this.adaptDocString(step.docString);
99
+ }
100
+ return result;
101
+ }
102
+ adaptDataTable(dataTable) {
103
+ return {
104
+ type: 'DataTable',
105
+ location: dataTable.location,
106
+ rows: dataTable.rows.map(r => this.adaptTableRow(r)),
107
+ };
108
+ }
109
+ adaptDocString(docString) {
110
+ return {
111
+ type: 'DocString',
112
+ location: docString.location,
113
+ content: docString.content,
114
+ };
115
+ }
116
+ adaptExamples(examples) {
117
+ return {
118
+ type: 'Examples',
119
+ location: examples.location,
120
+ tags: examples.tags.map(t => this.adaptTag(t)),
121
+ keyword: examples.keyword,
122
+ name: examples.name,
123
+ description: this.trimDescription(examples.description),
124
+ tableHeader: this.adaptTableRow(examples.tableHeader),
125
+ tableBody: examples.tableBody.map(r => this.adaptTableRow(r)),
126
+ };
127
+ }
128
+ adaptTableRow(row) {
129
+ return {
130
+ type: 'TableRow',
131
+ location: row.location,
132
+ cells: row.cells.map(c => ({
133
+ type: 'TableCell',
134
+ location: c.location,
135
+ value: c.value,
136
+ })),
137
+ };
138
+ }
139
+ adaptTag(tag) {
140
+ return {
141
+ type: 'Tag',
142
+ location: tag.location,
143
+ name: tag.name,
144
+ };
145
+ }
146
+ adaptComment(comment) {
147
+ return {
148
+ type: 'Comment',
149
+ location: comment.location,
150
+ text: comment.text,
151
+ };
152
+ }
153
+ /**
154
+ * Trims the description and returns it, or undefined if the description is empty.
155
+ * The old gherkin 5.x parser returned undefined for empty descriptions, which the mapper
156
+ * then passes directly to constructors using `description && new Description(description)`.
157
+ */
158
+ trimDescription(description) {
159
+ const trimmed = description?.trim();
160
+ // Return undefined for empty descriptions to match old gherkin 5.x behavior
161
+ return trimmed || undefined;
162
+ }
163
+ }
164
+ //# sourceMappingURL=GherkinParserAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GherkinParserAdapter.js","sourceRoot":"","sources":["../../../../src/listeners/legacy/gherkin/GherkinParserAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,0BAA0B,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEnF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIjD;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IACZ,MAAM,CAAmC;IAE1D;QACI,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;QACtC,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC;QAC3C,MAAM,OAAO,GAAG,IAAI,0BAA0B,EAAE,CAAC;QACjD,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,cAAsB;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAEO,aAAa,CAAC,GAA6B;QAC/C,OAAO;YACH,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS;YACjE,QAAQ,EAAE,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,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IAAI,EAAE,OAAO,CAAC,IAAI;SACrB,CAAC;IACN,CAAC;IAED;;;;OAIG;IACK,eAAe,CAAC,WAA+B;QACnD,MAAM,OAAO,GAAG,WAAW,EAAE,IAAI,EAAE,CAAC;QACpC,4EAA4E;QAC5E,OAAO,OAAO,IAAI,SAAS,CAAC;IAChC,CAAC;CACJ"}
@@ -0,0 +1,2 @@
1
+ export type Constructor<T> = new (...args: any[]) => T;
2
+ //# sourceMappingURL=constructables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constructables.d.ts","sourceRoot":"","sources":["../../../../src/listeners/legacy/gherkin/constructables.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=constructables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constructables.js","sourceRoot":"","sources":["../../../../src/listeners/legacy/gherkin/constructables.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import type { TinyType } from 'tiny-types';
2
+ /**
3
+ * @private
4
+ */
5
+ export declare class Cache<Key extends TinyType, Value> {
6
+ private store;
7
+ constructor(store?: {
8
+ [id: string]: Value;
9
+ });
10
+ set(key: Key, value: Value): void;
11
+ get(key: Key): Value;
12
+ has(key: Key): boolean;
13
+ size(): number;
14
+ clear(): void;
15
+ private idOf;
16
+ }
17
+ //# sourceMappingURL=Cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../../../../src/listeners/legacy/gherkin/feature-files/Cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C;;GAEG;AACH,qBAAa,KAAK,CAAC,GAAG,SAAS,QAAQ,EAAE,KAAK;IAC9B,OAAO,CAAC,KAAK;gBAAL,KAAK,GAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,CAAA;KAAO;IAGvD,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAIjC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,KAAK;IAUpB,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAItB,IAAI,IAAI,MAAM;IAId,KAAK,IAAI,IAAI;IAIb,OAAO,CAAC,IAAI;CAGf"}
@@ -0,0 +1,32 @@
1
+ import { UnableToRetrieveFeatureFileMap } from './errors/index.js';
2
+ /**
3
+ * @private
4
+ */
5
+ export class Cache {
6
+ store;
7
+ constructor(store = {}) {
8
+ this.store = store;
9
+ }
10
+ set(key, value) {
11
+ this.store[this.idOf(key)] = value;
12
+ }
13
+ get(key) {
14
+ if (!this.store[this.idOf(key)]) {
15
+ throw new UnableToRetrieveFeatureFileMap(`Make sure you cache a value under ${key.toString()} before trying to retrieve it`);
16
+ }
17
+ return this.store[this.idOf(key)];
18
+ }
19
+ has(key) {
20
+ return !!this.store[this.idOf(key)];
21
+ }
22
+ size() {
23
+ return Object.keys(this.store).length;
24
+ }
25
+ clear() {
26
+ this.store = {};
27
+ }
28
+ idOf(key) {
29
+ return key.toString();
30
+ }
31
+ }
32
+ //# sourceMappingURL=Cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../../../../src/listeners/legacy/gherkin/feature-files/Cache.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAEnE;;GAEG;AACH,MAAM,OAAO,KAAK;IACM;IAApB,YAAoB,QAAiC,EAAE;QAAnC,UAAK,GAAL,KAAK,CAA8B;IACvD,CAAC;IAED,GAAG,CAAC,GAAQ,EAAE,KAAY;QACtB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;IACvC,CAAC;IAED,GAAG,CAAC,GAAQ;QACR,IAAI,CAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,8BAA8B,CACpC,qCAAsC,GAAG,CAAC,QAAQ,EAAG,+BAA+B,CACvF,CAAC;QACN,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,CAAC;IAED,GAAG,CAAC,GAAQ;QACR,OAAO,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,IAAI;QACA,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IAC1C,CAAC;IAED,KAAK;QACD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IACpB,CAAC;IAEO,IAAI,CAAC,GAAQ;QACjB,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;CACJ"}
@@ -0,0 +1,16 @@
1
+ import type { Path } from '@serenity-js/core/io';
2
+ import { Cache } from './Cache.js';
3
+ import type { FeatureFileMap } from './FeatureFileMap.js';
4
+ import type { FeatureFileMapper } from './FeatureFileMapper.js';
5
+ import type { FeatureFileParser } from './FeatureFileParser.js';
6
+ /**
7
+ * @private
8
+ */
9
+ export declare class FeatureFileLoader {
10
+ private readonly parser;
11
+ private readonly mapper;
12
+ private readonly cache;
13
+ constructor(parser: FeatureFileParser, mapper: FeatureFileMapper, cache?: Cache<Path, FeatureFileMap>);
14
+ load(path: Path): Promise<FeatureFileMap>;
15
+ }
16
+ //# sourceMappingURL=FeatureFileLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureFileLoader.d.ts","sourceRoot":"","sources":["../../../../../src/listeners/legacy/gherkin/feature-files/FeatureFileLoader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;GAEG;AACH,qBAAa,iBAAiB;IAEtB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAFL,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,iBAAiB,EACzB,KAAK,GAAE,KAAK,CAAC,IAAI,EAAE,cAAc,CAAe;IAIrE,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC;CAY5C"}
@@ -0,0 +1,26 @@
1
+ import { Cache } from './Cache.js';
2
+ /**
3
+ * @private
4
+ */
5
+ export class FeatureFileLoader {
6
+ parser;
7
+ mapper;
8
+ cache;
9
+ constructor(parser, mapper, cache = new Cache()) {
10
+ this.parser = parser;
11
+ this.mapper = mapper;
12
+ this.cache = cache;
13
+ }
14
+ load(path) {
15
+ if (this.cache.has(path)) {
16
+ return Promise.resolve(this.cache.get(path));
17
+ }
18
+ return this.parser.parse(path)
19
+ .then(document => this.mapper.map(document, path))
20
+ .then(map => {
21
+ this.cache.set(path, map);
22
+ return this.cache.get(path);
23
+ });
24
+ }
25
+ }
26
+ //# sourceMappingURL=FeatureFileLoader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureFileLoader.js","sourceRoot":"","sources":["../../../../../src/listeners/legacy/gherkin/feature-files/FeatureFileLoader.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAKnC;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAEL;IACA;IACA;IAHrB,YACqB,MAAyB,EACzB,MAAyB,EACzB,QAAqC,IAAI,KAAK,EAAE;QAFhD,WAAM,GAAN,MAAM,CAAmB;QACzB,WAAM,GAAN,MAAM,CAAmB;QACzB,UAAK,GAAL,KAAK,CAA2C;IAErE,CAAC;IAED,IAAI,CAAC,IAAU;QACX,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACvB,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;aACzB,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;aACjD,IAAI,CAAC,GAAG,CAAC,EAAE;YACR,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;IACX,CAAC;CACJ"}
@@ -0,0 +1,19 @@
1
+ import type { Constructor } from '../constructables.js';
2
+ /**
3
+ * @private
4
+ */
5
+ export declare class FeatureFileMap {
6
+ private readonly map;
7
+ constructor(map?: {
8
+ [line: number]: object;
9
+ });
10
+ set(item: object): {
11
+ onLine: (line: number) => FeatureFileMap;
12
+ };
13
+ get<T>(type: Constructor<T>): {
14
+ onLine: (line: number) => T;
15
+ };
16
+ getFirst<T>(type: Constructor<T>): T;
17
+ size(): number;
18
+ }
19
+ //# sourceMappingURL=FeatureFileMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureFileMap.d.ts","sourceRoot":"","sources":["../../../../../src/listeners/legacy/gherkin/feature-files/FeatureFileMap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD;;GAEG;AACH,qBAAa,cAAc;IAEX,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,GAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAO;IAGjE,GAAG,CAAC,IAAI,EAAE,MAAM;uBAEO,MAAM,KAAG,cAAc;;IAQ9C,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;uBAEJ,MAAM,KAAG,CAAC;;IAgBjC,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC;IAcpC,IAAI,IAAI,MAAM;CAGjB"}
@@ -0,0 +1,44 @@
1
+ import { ItemNotFoundError } from './errors/index.js';
2
+ /**
3
+ * @private
4
+ */
5
+ export class FeatureFileMap {
6
+ map;
7
+ constructor(map = {}) {
8
+ this.map = map;
9
+ }
10
+ set(item) {
11
+ return ({
12
+ onLine: (line) => {
13
+ this.map[line] = item;
14
+ return this;
15
+ },
16
+ });
17
+ }
18
+ get(type) {
19
+ return ({
20
+ onLine: (line) => {
21
+ const found = this.map[line];
22
+ if (!found) {
23
+ throw new ItemNotFoundError(`Nothing was found on line ${line}`);
24
+ }
25
+ if (!(found instanceof type)) {
26
+ throw new ItemNotFoundError(`Item on line ${line} is a ${found.constructor.name}, not a ${type.name}`);
27
+ }
28
+ return found;
29
+ },
30
+ });
31
+ }
32
+ getFirst(type) {
33
+ const items = Object.keys(this.map).map(line => this.map[line]), found = items.find(value => value instanceof type);
34
+ if (!found) {
35
+ const existingTypes = items.map(item => item.constructor.name).join(', ') || 'no items.';
36
+ throw new ItemNotFoundError(`Didn't find any ${type.name} amongst ${existingTypes}`);
37
+ }
38
+ return found;
39
+ }
40
+ size() {
41
+ return Object.keys(this.map).length;
42
+ }
43
+ }
44
+ //# sourceMappingURL=FeatureFileMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureFileMap.js","sourceRoot":"","sources":["../../../../../src/listeners/legacy/gherkin/feature-files/FeatureFileMap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;GAEG;AACH,MAAM,OAAO,cAAc;IAEM;IAA7B,YAA6B,MAAkC,EAAE;QAApC,QAAG,GAAH,GAAG,CAAiC;IACjE,CAAC;IAED,GAAG,CAAC,IAAY;QACZ,OAAO,CAAC;YACJ,MAAM,EAAE,CAAC,IAAY,EAAkB,EAAE;gBACrC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;gBAEtB,OAAO,IAAI,CAAC;YAChB,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;IAED,GAAG,CAAI,IAAoB;QACvB,OAAO,CAAC;YACJ,MAAM,EAAE,CAAC,IAAY,EAAK,EAAE;gBACxB,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAE7B,IAAI,CAAE,KAAK,EAAE,CAAC;oBACV,MAAM,IAAI,iBAAiB,CAAC,6BAA8B,IAAK,EAAE,CAAC,CAAC;gBACvE,CAAC;gBAED,IAAI,CAAE,CAAC,KAAK,YAAY,IAAI,CAAC,EAAG,CAAC;oBAC7B,MAAM,IAAI,iBAAiB,CAAC,gBAAiB,IAAK,SAAU,KAAK,CAAC,WAAW,CAAC,IAAK,WAAY,IAAI,CAAC,IAAK,EAAE,CAAC,CAAC;gBACjH,CAAC;gBAED,OAAO,KAAU,CAAC;YACtB,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;IAED,QAAQ,CAAI,IAAoB;QAC5B,MACI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EACzD,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,YAAY,IAAI,CAAC,CAAC;QAEvD,IAAI,CAAE,KAAK,EAAE,CAAC;YACV,MAAM,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC;YAEzF,MAAM,IAAI,iBAAiB,CAAC,mBAAoB,IAAI,CAAC,IAAK,YAAa,aAAc,EAAE,CAAC,CAAC;QAC7F,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI;QACA,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,CAAC;CACJ"}
@@ -0,0 +1,14 @@
1
+ import type { Path } from '@serenity-js/core/io';
2
+ import type * as nodes from '../nodes/index.js';
3
+ import { FeatureFileMap } from './FeatureFileMap.js';
4
+ /**
5
+ * @private
6
+ */
7
+ export declare class FeatureFileMapper {
8
+ map(document: nodes.GherkinDocument, path: Path): FeatureFileMap;
9
+ private asStep;
10
+ private tagsFrom;
11
+ private interpolateStepArgument;
12
+ private interpolate;
13
+ }
14
+ //# sourceMappingURL=FeatureFileMapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureFileMapper.d.ts","sourceRoot":"","sources":["../../../../../src/listeners/legacy/gherkin/feature-files/FeatureFileMapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAMjD,OAAO,KAAK,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;GAEG;AACH,qBAAa,iBAAiB;IAC1B,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,eAAe,EAAE,IAAI,EAAE,IAAI,GAAG,cAAc;IAkJhE,OAAO,CAAC,MAAM;IAed,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,uBAAuB;IAkB/B,OAAO,CAAC,WAAW;CAWtB"}
@@ -0,0 +1,97 @@
1
+ import { FileSystemLocation } from '@serenity-js/core/io';
2
+ import { Description, Name, ScenarioParameters, Tags } from '@serenity-js/core/model';
3
+ import { Background, Feature, Scenario, ScenarioOutline, Step } from '../model/index.js';
4
+ import { FeatureFileMap } from './FeatureFileMap.js';
5
+ /**
6
+ * @private
7
+ */
8
+ export class FeatureFileMapper {
9
+ map(document, path) {
10
+ const map = new FeatureFileMap();
11
+ if (!(document && document.feature)) {
12
+ return map;
13
+ }
14
+ let background;
15
+ document.feature.children.forEach(scenarioDefinition => {
16
+ switch (scenarioDefinition.type) {
17
+ case 'Background':
18
+ background = new Background(new FileSystemLocation(path, scenarioDefinition.location.line, scenarioDefinition.location.column), new Name(scenarioDefinition.name), scenarioDefinition.description && new Description(scenarioDefinition.description), scenarioDefinition.steps.map(step => this.asStep(path, step)));
19
+ map.set(background).onLine(scenarioDefinition.location.line);
20
+ break;
21
+ case 'Scenario':
22
+ map.set(new Scenario(new FileSystemLocation(path, scenarioDefinition.location.line, scenarioDefinition.location.column), new Name(scenarioDefinition.name), scenarioDefinition.description && new Description(scenarioDefinition.description), (background ? background.steps : []).concat(scenarioDefinition.steps.map(step => this.asStep(path, step))), this.tagsFrom(document.feature.tags, scenarioDefinition.tags))).onLine(scenarioDefinition.location.line);
23
+ break;
24
+ case 'ScenarioOutline': {
25
+ const outline = scenarioDefinition, parameters = {};
26
+ // @see https://github.com/cucumber/gherkin-javascript/blob/v5.1.0/lib/gherkin/pickles/compiler.js#L45
27
+ outline.examples.filter(e => e.tableHeader !== undefined).forEach(examples => {
28
+ const exampleSetName = new Name(examples.name), exampleSetDescription = new Description(examples.description || ''), variableCells = examples.tableHeader.cells;
29
+ examples.tableBody.forEach(values => {
30
+ const valueCells = values.cells, steps = background ? background.steps : [];
31
+ outline.steps.forEach(scenarioOutlineStep => {
32
+ const interpolatedStepText = this.interpolate(scenarioOutlineStep.text, variableCells, valueCells), interpolatedStepArgument = this.interpolateStepArgument(scenarioOutlineStep.argument, variableCells, valueCells);
33
+ steps.push(new Step(new FileSystemLocation(path, scenarioOutlineStep.location.line, scenarioOutlineStep.location.column), new Name([
34
+ scenarioOutlineStep.keyword,
35
+ interpolatedStepText,
36
+ interpolatedStepArgument,
37
+ ].filter(_ => !!_).join(''))));
38
+ });
39
+ const scenarioParameters = variableCells
40
+ .map((cell, i) => ({ [cell.value]: valueCells[i].value }))
41
+ .reduce((acc, current) => {
42
+ return { ...acc, ...current };
43
+ }, {});
44
+ parameters[values.location.line] = new ScenarioParameters(exampleSetName, exampleSetDescription, scenarioParameters);
45
+ map.set(new Scenario(new FileSystemLocation(path, values.location.line, values.location.column), new Name(outline.name), outline.description && new Description(outline.description), steps, this.tagsFrom(document.feature.tags, outline.tags, examples.tags), new FileSystemLocation(path, outline.location.line, outline.location.column))).onLine(values.location.line);
46
+ });
47
+ });
48
+ map.set(new ScenarioOutline(new FileSystemLocation(path, outline.location.line, outline.location.column), new Name(outline.name), outline.description && new Description(outline.description), (background ? background.steps : []).concat(outline.steps.map(step => this.asStep(path, step, [], []))), parameters)).onLine(scenarioDefinition.location.line);
49
+ break;
50
+ }
51
+ }
52
+ });
53
+ map.set(new Feature(new FileSystemLocation(path, document.feature.location.line, document.feature.location.column), new Name(document.feature.name), document.feature.description && new Description(document.feature.description), background)).onLine(document.feature.location.line);
54
+ return map;
55
+ }
56
+ asStep(path, step, variableCells = [], valueCells = []) {
57
+ return new Step(new FileSystemLocation(path, step.location.line, step.location.column), new Name([
58
+ step.keyword,
59
+ step.text,
60
+ this.interpolateStepArgument(step.argument, variableCells, valueCells),
61
+ ].filter(_ => !!_).join('')));
62
+ }
63
+ tagsFrom(...listsOfTags) {
64
+ return flattened(flattened(listsOfTags).map(tag => Tags.from(tag.name)));
65
+ }
66
+ interpolateStepArgument(argument, variableCells, valueCells) {
67
+ switch (true) {
68
+ case argument && argument.type === 'DocString':
69
+ return '\n' + this.interpolate(argument.content, variableCells, valueCells);
70
+ case argument && argument.type === 'DataTable':
71
+ return '\n' + this.interpolate(argument.rows
72
+ .map(row => `| ${row.cells.map(cell => cell.value).join(' | ')} |`)
73
+ .join('\n'), variableCells, valueCells);
74
+ default:
75
+ return '';
76
+ }
77
+ }
78
+ // @see https://github.com/cucumber/gherkin-javascript/blob/v5.1.0/lib/gherkin/pickles/compiler.js#L115
79
+ interpolate(text, variableCells, valueCells) {
80
+ variableCells.forEach((variableCell, n) => {
81
+ const valueCell = valueCells[n];
82
+ const search = new RegExp('<' + variableCell.value + '>', 'g');
83
+ // JS Specific - dollar sign needs to be escaped with another dollar sign
84
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter
85
+ const replacement = valueCell.value.replaceAll(new RegExp('\\$', 'g'), '$$$$');
86
+ text = text.replace(search, replacement);
87
+ });
88
+ return text;
89
+ }
90
+ }
91
+ /**
92
+ * @private
93
+ */
94
+ function flattened(listsOfLists) {
95
+ return listsOfLists.reduce((acc, list) => acc.concat(list), []);
96
+ }
97
+ //# sourceMappingURL=FeatureFileMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureFileMapper.js","sourceRoot":"","sources":["../../../../../src/listeners/legacy/gherkin/feature-files/FeatureFileMapper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEtF,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzF,OAAO,EAAE,cAAc,EAAE,MAAM,qBA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CAAC;AACpE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { Path } from '@serenity-js/core/io';
2
+ import type { GherkinDocument } from '../nodes/index.js';
3
+ /**
4
+ * @private
5
+ */
6
+ export declare class FeatureFileParser {
7
+ private readonly gherkinParser;
8
+ constructor(gherkinParser: {
9
+ parse: (feature: string) => GherkinDocument;
10
+ });
11
+ parse(uri: Path): Promise<GherkinDocument>;
12
+ }
13
+ //# sourceMappingURL=FeatureFileParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureFileParser.d.ts","sourceRoot":"","sources":["../../../../../src/listeners/legacy/gherkin/feature-files/FeatureFileParser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD;;GAEG;AACH,qBAAa,iBAAiB;IACd,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE;QAAE,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,eAAe,CAAA;KAAE;IAG3F,KAAK,CAAC,GAAG,EAAE,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC;CAoB7C"}
@@ -0,0 +1,27 @@
1
+ import fs from 'node:fs';
2
+ import { UnableToParseFeatureFileError, UnableToReadFeatureFileError } from './errors/index.js';
3
+ /**
4
+ * @private
5
+ */
6
+ export class FeatureFileParser {
7
+ gherkinParser;
8
+ constructor(gherkinParser) {
9
+ this.gherkinParser = gherkinParser;
10
+ }
11
+ parse(uri) {
12
+ return new Promise((resolve, reject) => {
13
+ fs.readFile(uri.value, (error, data) => {
14
+ if (error) {
15
+ return reject(new UnableToReadFeatureFileError(`Could not read feature file at "${uri.value}"`, error));
16
+ }
17
+ try {
18
+ return resolve(this.gherkinParser.parse(data.toString('utf8')));
19
+ }
20
+ catch (parseError) {
21
+ return reject(new UnableToParseFeatureFileError(`Could not parse feature file at "${uri.value}"`, parseError));
22
+ }
23
+ });
24
+ });
25
+ }
26
+ }
27
+ //# sourceMappingURL=FeatureFileParser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureFileParser.js","sourceRoot":"","sources":["../../../../../src/listeners/legacy/gherkin/feature-files/FeatureFileParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AAKzB,OAAO,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAEhG;;GAEG;AACH,MAAM,OAAO,iBAAiB;IACG;IAA7B,YAA6B,aAA8D;QAA9D,kBAAa,GAAb,aAAa,CAAiD;IAC3F,CAAC;IAED,KAAK,CAAC,GAAS;QACX,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,KAAwC,EAAE,IAAY,EAAE,EAAE;gBAC9E,IAAI,KAAK,EAAE,CAAC;oBACR,OAAO,MAAM,CACT,IAAI,4BAA4B,CAAC,mCAAoC,GAAG,CAAC,KAAM,GAAG,EAAE,KAAK,CAAC,CAC7F,CAAC;gBACN,CAAC;gBAED,IAAI,CAAC;oBACD,OAAO,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBACpE,CAAC;gBACD,OAAO,UAAU,EAAE,CAAC;oBAChB,OAAO,MAAM,CACT,IAAI,6BAA6B,CAAC,oCAAqC,GAAG,CAAC,KAAM,GAAG,EAAE,UAAU,CAAC,CACpG,CAAC;gBACN,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -0,0 +1,8 @@
1
+ import { RuntimeError } from '@serenity-js/core/errors';
2
+ /**
3
+ * @private
4
+ */
5
+ export declare class ItemNotFoundError extends RuntimeError {
6
+ constructor(message: string, cause?: Error);
7
+ }
8
+ //# sourceMappingURL=ItemNotFoundError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ItemNotFoundError.d.ts","sourceRoot":"","sources":["../../../../../../src/listeners/legacy/gherkin/feature-files/errors/ItemNotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;gBACnC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAG7C"}
@@ -0,0 +1,10 @@
1
+ import { RuntimeError } from '@serenity-js/core/errors';
2
+ /**
3
+ * @private
4
+ */
5
+ export class ItemNotFoundError extends RuntimeError {
6
+ constructor(message, cause) {
7
+ super(ItemNotFoundError, message, cause);
8
+ }
9
+ }
10
+ //# sourceMappingURL=ItemNotFoundError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ItemNotFoundError.js","sourceRoot":"","sources":["../../../../../../src/listeners/legacy/gherkin/feature-files/errors/ItemNotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,YAAY;IAC/C,YAAY,OAAe,EAAE,KAAa;QACtC,KAAK,CAAC,iBAAiB,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAC7C,CAAC;CACJ"}
@@ -0,0 +1,8 @@
1
+ import { RuntimeError } from '@serenity-js/core/errors';
2
+ /**
3
+ * @private
4
+ */
5
+ export declare class UnableToParseFeatureFileError extends RuntimeError {
6
+ constructor(message: string, cause?: Error);
7
+ }
8
+ //# sourceMappingURL=UnableToParseFeatureFileError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnableToParseFeatureFileError.d.ts","sourceRoot":"","sources":["../../../../../../src/listeners/legacy/gherkin/feature-files/errors/UnableToParseFeatureFileError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,YAAY;gBAC/C,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAG7C"}
@@ -0,0 +1,10 @@
1
+ import { RuntimeError } from '@serenity-js/core/errors';
2
+ /**
3
+ * @private
4
+ */
5
+ export class UnableToParseFeatureFileError extends RuntimeError {
6
+ constructor(message, cause) {
7
+ super(UnableToParseFeatureFileError, message, cause);
8
+ }
9
+ }
10
+ //# sourceMappingURL=UnableToParseFeatureFileError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnableToParseFeatureFileError.js","sourceRoot":"","sources":["../../../../../../src/listeners/legacy/gherkin/feature-files/errors/UnableToParseFeatureFileError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD;;GAEG;AACH,MAAM,OAAO,6BAA8B,SAAQ,YAAY;IAC3D,YAAY,OAAe,EAAE,KAAa;QACtC,KAAK,CAAC,6BAA6B,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IACzD,CAAC;CACJ"}
@@ -0,0 +1,8 @@
1
+ import { RuntimeError } from '@serenity-js/core/errors';
2
+ /**
3
+ * @private
4
+ */
5
+ export declare class UnableToReadFeatureFileError extends RuntimeError {
6
+ constructor(message: string, cause?: Error);
7
+ }
8
+ //# sourceMappingURL=UnableToReadFeatureFileError.d.ts.map