@cucumber/cucumber 11.2.0 → 12.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 (204) hide show
  1. package/lib/api/convert_configuration.d.ts +0 -1
  2. package/lib/api/convert_configuration.js +1 -2
  3. package/lib/api/convert_configuration.js.map +1 -1
  4. package/lib/api/formatters.d.ts +0 -2
  5. package/lib/api/formatters.js +1 -2
  6. package/lib/api/formatters.js.map +1 -1
  7. package/lib/api/gherkin.js +1 -2
  8. package/lib/api/gherkin.js.map +1 -1
  9. package/lib/api/load_configuration.js +1 -2
  10. package/lib/api/load_configuration.js.map +1 -1
  11. package/lib/api/load_sources.js +1 -2
  12. package/lib/api/load_sources.js.map +1 -1
  13. package/lib/api/load_support.js +1 -2
  14. package/lib/api/load_support.js.map +1 -1
  15. package/lib/api/plugins.js +3 -4
  16. package/lib/api/plugins.js.map +1 -1
  17. package/lib/api/run_cucumber.js +1 -2
  18. package/lib/api/run_cucumber.js.map +1 -1
  19. package/lib/api/support.js +1 -2
  20. package/lib/api/support.js.map +1 -1
  21. package/lib/api/test_helpers.js +2 -3
  22. package/lib/api/test_helpers.js.map +1 -1
  23. package/lib/assemble/assemble_test_cases.d.ts +0 -1
  24. package/lib/assemble/assemble_test_cases.js +1 -2
  25. package/lib/assemble/assemble_test_cases.js.map +1 -1
  26. package/lib/cli/helpers.d.ts +0 -2
  27. package/lib/cli/helpers.js +20 -11
  28. package/lib/cli/helpers.js.map +1 -1
  29. package/lib/cli/i18n.js +2 -3
  30. package/lib/cli/i18n.js.map +1 -1
  31. package/lib/cli/index.d.ts +0 -1
  32. package/lib/cli/index.js.map +1 -1
  33. package/lib/cli/install_validator.js +1 -2
  34. package/lib/cli/install_validator.js.map +1 -1
  35. package/lib/cli/run.js +1 -1
  36. package/lib/cli/run.js.map +1 -1
  37. package/lib/cli/validate_node_engine_version.js +1 -2
  38. package/lib/cli/validate_node_engine_version.js.map +1 -1
  39. package/lib/configuration/argv_parser.js +0 -1
  40. package/lib/configuration/argv_parser.js.map +1 -1
  41. package/lib/configuration/check_schema.js +18 -10
  42. package/lib/configuration/check_schema.js.map +1 -1
  43. package/lib/configuration/default_configuration.js +0 -1
  44. package/lib/configuration/default_configuration.js.map +1 -1
  45. package/lib/configuration/from_file.js +4 -5
  46. package/lib/configuration/from_file.js.map +1 -1
  47. package/lib/configuration/helpers.js +1 -2
  48. package/lib/configuration/helpers.js.map +1 -1
  49. package/lib/configuration/locate_file.js +1 -2
  50. package/lib/configuration/locate_file.js.map +1 -1
  51. package/lib/configuration/merge_configurations.js +1 -2
  52. package/lib/configuration/merge_configurations.js.map +1 -1
  53. package/lib/configuration/parse_configuration.js +1 -2
  54. package/lib/configuration/parse_configuration.js.map +1 -1
  55. package/lib/configuration/split_format_descriptor.js +1 -2
  56. package/lib/configuration/split_format_descriptor.js.map +1 -1
  57. package/lib/configuration/types.d.ts +0 -5
  58. package/lib/configuration/types.js.map +1 -1
  59. package/lib/configuration/validate_configuration.js +1 -5
  60. package/lib/configuration/validate_configuration.js.map +1 -1
  61. package/lib/environment/console_logger.d.ts +0 -1
  62. package/lib/environment/console_logger.js.map +1 -1
  63. package/lib/environment/make_environment.js +1 -2
  64. package/lib/environment/make_environment.js.map +1 -1
  65. package/lib/environment/types.d.ts +0 -1
  66. package/lib/filter_stack_trace.js +2 -3
  67. package/lib/filter_stack_trace.js.map +1 -1
  68. package/lib/formatter/builder.d.ts +1 -5
  69. package/lib/formatter/builder.js.map +1 -1
  70. package/lib/formatter/builtin/html.js +1 -4
  71. package/lib/formatter/builtin/html.js.map +1 -1
  72. package/lib/formatter/builtin/index.d.ts +1 -1
  73. package/lib/formatter/create_stream.d.ts +0 -1
  74. package/lib/formatter/create_stream.js +3 -4
  75. package/lib/formatter/create_stream.js.map +1 -1
  76. package/lib/formatter/find_class_or_plugin.js +1 -2
  77. package/lib/formatter/find_class_or_plugin.js.map +1 -1
  78. package/lib/formatter/get_color_fns.d.ts +0 -2
  79. package/lib/formatter/get_color_fns.js +1 -1
  80. package/lib/formatter/get_color_fns.js.map +1 -1
  81. package/lib/formatter/helpers/duration_helpers.js +2 -3
  82. package/lib/formatter/helpers/duration_helpers.js.map +1 -1
  83. package/lib/formatter/helpers/event_data_collector.d.ts +0 -1
  84. package/lib/formatter/helpers/event_data_collector.js +17 -7
  85. package/lib/formatter/helpers/event_data_collector.js.map +1 -1
  86. package/lib/formatter/helpers/gherkin_document_parser.js +4 -5
  87. package/lib/formatter/helpers/gherkin_document_parser.js.map +1 -1
  88. package/lib/formatter/helpers/index.js +17 -7
  89. package/lib/formatter/helpers/index.js.map +1 -1
  90. package/lib/formatter/helpers/issue_helpers.js +6 -7
  91. package/lib/formatter/helpers/issue_helpers.js.map +1 -1
  92. package/lib/formatter/helpers/keyword_type.js +3 -3
  93. package/lib/formatter/helpers/keyword_type.js.map +1 -1
  94. package/lib/formatter/helpers/location_helpers.js +1 -2
  95. package/lib/formatter/helpers/location_helpers.js.map +1 -1
  96. package/lib/formatter/helpers/pickle_parser.js +4 -5
  97. package/lib/formatter/helpers/pickle_parser.js.map +1 -1
  98. package/lib/formatter/helpers/step_argument_formatter.js +1 -2
  99. package/lib/formatter/helpers/step_argument_formatter.js.map +1 -1
  100. package/lib/formatter/helpers/summary_helpers.js +18 -9
  101. package/lib/formatter/helpers/summary_helpers.js.map +1 -1
  102. package/lib/formatter/helpers/test_case_attempt_formatter.js +18 -9
  103. package/lib/formatter/helpers/test_case_attempt_formatter.js.map +1 -1
  104. package/lib/formatter/helpers/test_case_attempt_parser.js +18 -9
  105. package/lib/formatter/helpers/test_case_attempt_parser.js.map +1 -1
  106. package/lib/formatter/helpers/usage_helpers/index.js +18 -9
  107. package/lib/formatter/helpers/usage_helpers/index.js.map +1 -1
  108. package/lib/formatter/import_code.js +1 -2
  109. package/lib/formatter/import_code.js.map +1 -1
  110. package/lib/formatter/index.d.ts +0 -2
  111. package/lib/formatter/json_formatter.js +17 -7
  112. package/lib/formatter/json_formatter.js.map +1 -1
  113. package/lib/formatter/progress_bar_formatter.js.map +1 -1
  114. package/lib/formatter/progress_formatter.js +17 -7
  115. package/lib/formatter/progress_formatter.js.map +1 -1
  116. package/lib/formatter/rerun_formatter.js +17 -7
  117. package/lib/formatter/rerun_formatter.js.map +1 -1
  118. package/lib/formatter/resolve_implementation.js +1 -2
  119. package/lib/formatter/resolve_implementation.js.map +1 -1
  120. package/lib/formatter/snippets_formatter.js +17 -7
  121. package/lib/formatter/snippets_formatter.js.map +1 -1
  122. package/lib/formatter/step_definition_snippet_builder/index.js.map +1 -1
  123. package/lib/formatter/step_definition_snippet_builder/javascript_snippet_syntax.js.map +1 -1
  124. package/lib/formatter/step_definition_snippet_builder/snippet_syntax.js +1 -1
  125. package/lib/formatter/step_definition_snippet_builder/snippet_syntax.js.map +1 -1
  126. package/lib/formatter/summary_formatter.js.map +1 -1
  127. package/lib/formatter/usage_formatter.js +17 -7
  128. package/lib/formatter/usage_formatter.js.map +1 -1
  129. package/lib/formatter/usage_json_formatter.js.map +1 -1
  130. package/lib/index.d.ts +4 -4
  131. package/lib/index.js +17 -7
  132. package/lib/index.js.map +1 -1
  133. package/lib/models/data_table.js.map +1 -1
  134. package/lib/models/step_definition.js.map +1 -1
  135. package/lib/paths/paths.js +1 -2
  136. package/lib/paths/paths.js.map +1 -1
  137. package/lib/pickle_filter.js.map +1 -1
  138. package/lib/plugin/plugin_manager.js +1 -1
  139. package/lib/plugin/plugin_manager.js.map +1 -1
  140. package/lib/publish/publish_plugin.js +46 -16
  141. package/lib/publish/publish_plugin.js.map +1 -1
  142. package/lib/runtime/attachment_manager/index.d.ts +0 -2
  143. package/lib/runtime/attachment_manager/index.js +17 -7
  144. package/lib/runtime/attachment_manager/index.js.map +1 -1
  145. package/lib/runtime/coordinator.d.ts +0 -1
  146. package/lib/runtime/format_error.js +1 -2
  147. package/lib/runtime/format_error.js.map +1 -1
  148. package/lib/runtime/helpers.js +20 -11
  149. package/lib/runtime/helpers.js.map +1 -1
  150. package/lib/runtime/make_runtime.d.ts +0 -1
  151. package/lib/runtime/make_runtime.js +1 -2
  152. package/lib/runtime/make_runtime.js.map +1 -1
  153. package/lib/runtime/parallel/adapter.d.ts +0 -2
  154. package/lib/runtime/parallel/adapter.js.map +1 -1
  155. package/lib/runtime/parallel/run_worker.js.map +1 -1
  156. package/lib/runtime/parallel/worker.js.map +1 -1
  157. package/lib/runtime/run_test_run_hooks.js.map +1 -1
  158. package/lib/runtime/scope/make_proxy.js +1 -2
  159. package/lib/runtime/scope/make_proxy.js.map +1 -1
  160. package/lib/runtime/scope/test_case_scope.js +2 -2
  161. package/lib/runtime/scope/test_case_scope.js.map +1 -1
  162. package/lib/runtime/scope/test_run_scope.js +2 -2
  163. package/lib/runtime/scope/test_run_scope.js.map +1 -1
  164. package/lib/runtime/serial/adapter.d.ts +0 -1
  165. package/lib/runtime/serial/adapter.js.map +1 -1
  166. package/lib/runtime/step_runner.d.ts +5 -1
  167. package/lib/runtime/step_runner.js +24 -12
  168. package/lib/runtime/step_runner.js.map +1 -1
  169. package/lib/runtime/stopwatch.js.map +1 -1
  170. package/lib/runtime/test_case_runner.d.ts +4 -4
  171. package/lib/runtime/test_case_runner.js +47 -20
  172. package/lib/runtime/test_case_runner.js.map +1 -1
  173. package/lib/runtime/worker.d.ts +0 -1
  174. package/lib/runtime/worker.js.map +1 -1
  175. package/lib/step_arguments.js +1 -2
  176. package/lib/step_arguments.js.map +1 -1
  177. package/lib/support_code_library_builder/build_parameter_type.js +1 -2
  178. package/lib/support_code_library_builder/build_parameter_type.js.map +1 -1
  179. package/lib/support_code_library_builder/get_definition_line_and_uri.js +1 -2
  180. package/lib/support_code_library_builder/get_definition_line_and_uri.js.map +1 -1
  181. package/lib/support_code_library_builder/index.js.map +1 -1
  182. package/lib/support_code_library_builder/parallel_can_assign_helpers.js +1 -2
  183. package/lib/support_code_library_builder/parallel_can_assign_helpers.js.map +1 -1
  184. package/lib/support_code_library_builder/types.d.ts +2 -0
  185. package/lib/support_code_library_builder/types.js.map +1 -1
  186. package/lib/support_code_library_builder/validate_arguments.js +1 -1
  187. package/lib/support_code_library_builder/validate_arguments.js.map +1 -1
  188. package/lib/time.d.ts +0 -2
  189. package/lib/time.js +19 -10
  190. package/lib/time.js.map +1 -1
  191. package/lib/try_require.js +2 -2
  192. package/lib/try_require.js.map +1 -1
  193. package/lib/tsconfig.node.tsbuildinfo +1 -0
  194. package/lib/uncaught_exception_manager.d.ts +0 -1
  195. package/lib/user_code_runner.js.map +1 -1
  196. package/lib/value_checker.js +3 -4
  197. package/lib/value_checker.js.map +1 -1
  198. package/lib/version.d.ts +1 -1
  199. package/lib/version.js +1 -1
  200. package/lib/version.js.map +1 -1
  201. package/package.json +59 -60
  202. package/lib/publish/http_stream.d.ts +0 -30
  203. package/lib/publish/http_stream.js +0 -117
  204. package/lib/publish/http_stream.js.map +0 -1
package/lib/cli/i18n.js CHANGED
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getKeywords = exports.getLanguages = void 0;
6
+ exports.getLanguages = getLanguages;
7
+ exports.getKeywords = getKeywords;
7
8
  const gherkin_1 = require("@cucumber/gherkin");
8
9
  const cli_table3_1 = __importDefault(require("cli-table3"));
9
10
  const capital_case_1 = require("capital-case");
@@ -57,7 +58,6 @@ function getLanguages() {
57
58
  ]);
58
59
  return getAsTable(['ISO 639-1', 'ENGLISH NAME', 'NATIVE NAME'], rows);
59
60
  }
60
- exports.getLanguages = getLanguages;
61
61
  function getKeywords(isoCode) {
62
62
  const language = gherkin_1.dialects[isoCode];
63
63
  const rows = keywords.map((keyword) => {
@@ -66,5 +66,4 @@ function getKeywords(isoCode) {
66
66
  });
67
67
  return getAsTable(['ENGLISH KEYWORD', 'NATIVE KEYWORDS'], rows);
68
68
  }
69
- exports.getKeywords = getKeywords;
70
69
  //# sourceMappingUR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,CAAC,OAAO,CAAC,CAAC,MAAM;KACzB,CAAC,CAAA;IACF,OAAO,UAAU,CAAC,CAAC,WAAW,EAAE,cAAc,EAAE,aAAa,CAAC,EAAE,IAAI,CAAC,CAAA;AACvE,CAAC;AAPD,oCAOC;AAED,SAAgB,WAAW,CAAC,OAAe;IACzC,MAAM,QAAQ,GAAG,kBAAQ,CAAC,OAAO,CAAC,CAAA;IAClC,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QACpC,MAAM,KAAK,GAAG,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;AAPD,kCAOC","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
+ {"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,MAAgB,EAAE,IAAgB;IACpD,MAAM,KAAK,GAAG,IAAI,oBAAK,CAAC;QACtB,KAAK,EAAE;YACL,MAAM,EAAE,EAAE;YACV,aAAa,EAAE,EAAE;YACjB,YAAY,EAAE,EAAE;YAChB,cAAc,EAAE,EAAE;YAClB,IAAI,EAAE,EAAE;YACR,UAAU,EAAE,EAAE;YACd,GAAG,EAAE,EAAE;YACP,SAAS,EAAE,EAAE;YACb,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,EAAE;YACT,WAAW,EAAE,EAAE;YACf,GAAG,EAAE,EAAE;YACP,UAAU,EAAE,EAAE;YACd,SAAS,EAAE,EAAE;YACb,WAAW,EAAE,EAAE;SAChB;QACD,KAAK,EAAE;YACL,MAAM,EAAE,EAAE;YACV,cAAc,EAAE,CAAC;YACjB,eAAe,EAAE,CAAC;SACnB;KACF,CAAC,CAAA;IACF,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAClB,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAA;IACnB,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAA;AACzB,CAAC;AAED,SAAgB,YAAY;IAC1B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;QAClD,OAAO;QACP,kBAAQ,CAAC,OAAO,CAAC,CAAC,IAAI;QACtB,kBAAQ,CAAC,OAAO,CAAC,CAAC,MAAM;KACzB,CAAC,CAAA;IACF,OAAO,UAAU,CAAC,CAAC,WAAW,EAAE,cAAc,EAAE,aAAa,CAAC,EAAE,IAAI,CAAC,CAAA;AACvE,CAAC;AAED,SAAgB,WAAW,CAAC,OAAe;IACzC,MAAM,QAAQ,GAAG,kBAAQ,CAAC,OAAO,CAAC,CAAA;IAClC,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QACpC,MAAM,KAAK,GAAG,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,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { IFormatterStream } from '../formatter';
3
2
  export interface ICliRunResult {
4
3
  shouldExitImmediately: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,oDAA6C;AAE7C,gCAAuD;AACvD,iCAAkD;AAClD,2DAAqD;AAOrD,MAAqB,GAAG;IACL,IAAI,CAAU;IACd,GAAG,CAAQ;IACX,MAAM,CAAkB;IACxB,MAAM,CAAkB;IACxB,GAAG,CAAmB;IAEvC,YAAY,EACV,IAAI,EACJ,GAAG,EACH,MAAM,EACN,MAAM,GAAG,OAAO,CAAC,MAAM,EACvB,GAAG,GAOJ;QACC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,GAAG,GA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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
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,oDAA6C;AAE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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"]}
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.validateInstall = void 0;
6
+ exports.validateInstall = validateInstall;
7
7
  /* eslint-disable no-console */
8
8
  const is_installed_globally_1 = __importDefault(require("is-installed-globally"));
9
9
  async function validateInstall() {
@@ -14,5 +14,4 @@ async function validateInstall() {
14
14
  See https://github.com/cucumber/cucumber-js/blob/main/docs/installation.md#invalid-installations
15
15
  `);
16
16
  }
17
- exports.validateInstall = validateInstall;
18
17
  //# sourceMappingURL=install_validator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"install_validator.js","sourceRoot":"","sources":["../../src/cli/install_validator.ts"],"names":[],"mappings":";;;;;;AAAA,+BAA+B;AAC/B,kFAAuD;AAEhD,KAAK,UAAU,eAAe;IACnC,IAAI,+BAAmB;QACrB,OAAO,CAAC,IAAI,CACV;;;;OAIC,CACF,CAAA;AACL,CAAC;AATD,0CASC","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
+ {"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"]}
package/lib/cli/run.js CHANGED
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = run;
6
7
  /* eslint-disable no-console */
7
8
  /* This is one rare place where we're fine to use process/console directly,
8
9
  * but other code abstracts those to remain composable and testable. */
@@ -39,5 +40,4 @@ async function run() {
39
40
  process.exitCode = exitCode;
40
41
  }
41
42
  }
42
- exports.default = run;
43
43
  //# sourceMappingURL=run.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/cli/run.ts"],"names":[],"mappings":";;;;;AAAA,+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;QACF,MAAM,GAAG,MAAM,GAAG,CAAC,GAAG,EAAE,CAAA;KACzB;IAAC,OAAO,KAAK,EAAE;QACd,sBAAsB,CAAC,KAAK,CAAC,CAAA;KAC9B;IAED,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACvC,IAAI,MAAM,CAAC,qBAAqB,EAAE;QAChC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;KACvB;SAAM;QACL,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAA;KAC5B;AACH,CAAC;AA/BD,sBA+BC","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
+ {"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"]}
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.validateNodeEngineVersion = void 0;
6
+ exports.validateNodeEngineVersion = validateNodeEngineVersion;
7
7
  const node_fs_1 = __importDefault(require("node:fs"));
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
9
  const semver_1 = __importDefault(require("semver"));
@@ -20,5 +20,4 @@ function validateNodeEngineVersion(currentVersion, onError, onWarning, readPacka
20
20
  onWarning(`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.`);
21
21
  }
22
22
  }
23
- exports.validateNodeEngineVersion = validateNodeEngineVersion;
24
23
  //# sourceMappingURL=validate_node_engine_version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate_node_engine_version.js","sourceRoot":"","sources":["../../src/cli/validate_node_engine_version.ts"],"names":[],"mappings":";;;;;;AAAA,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;QACvD,OAAO,CACL,6CAA6C,gBAAgB,6BAA6B,cAAc,EAAE,CAC3G,CAAA;KACF;SAAM,IAAI,CAAC,gBAAM,CAAC,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE;QAC5D,SAAS,CACP,yBAAyB,cAAc,yIAAyI,CACjL,CAAA;KACF;AACH,CAAC;AAjBD,8DAiBC","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
+ {"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"]}
@@ -71,7 +71,6 @@ const ArgvParser = {
71
71
  .option('-p, --profile <NAME>', 'specify the profile to use (repeatable)', ArgvParser.collect, [])
72
72
  .option('--parallel <NUMBER_OF_WORKERS>', 'run in parallel with the given number of workers', (val) => ArgvParser.validateCountOption(val, '--parallel'))
73
73
  .option('--publish', 'Publish a report to https://reports.cucumber.io')
74
- .option('--publish-quiet', "Don't print information banner about publishing reports")
75
74
  .option('-r, --require <GLOB|DIR|FILE>', 'require files before executing features (repeatable)', ArgvParser.collect)
76
75
  .option('--require-module <NODE_MODULE>', 'require node modules before requiring files (repeatable)', ArgvParser.collect)
77
76
  .option('--retry <NUMBER_OF_RETRIES>', 'specify the number of times to retry failing test cases (default: 0)', (val) => ArgvParser.validateCountOption(val, '--retry'))
@@ -1 +1 @@
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;AAkBpD,MAAM,UAAU,GAAG;IACjB,OAAO,CAAI,GAAM,EAAE,OAAY,EAAE;QAC/B,IAAI,GAAG,EAAE;YACP,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG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,MAAM,GAAG,CAAC,EAAE;YAC3B,aAAa,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,CAAA;SACnC;QAED,OAAO;YACL,OAAO,EAAE;gBACP,MAAM;gBACN,YAAY;gBACZ,aAAa;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}\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 .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\n .option(\n '--order <TYPE[:SEED]>',\n 'run scenarios in the specified order. Type should be `defined` 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('--publish', 'Publish a report to https://reports.cucumber.io')\n .option(\n '--publish-quiet',\n \"Don't print information banner about publishing reports\"\n )\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('--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
+ {"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;AAkBpD,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,IAA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AAO,EAAE;gBACP,MAAM;gBACN,YAAY;gBACZ,aAAa;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}\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 .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\n .option(\n '--order <TYPE[:SEED]>',\n 'run scenarios in the specified order. Type should be `defined` 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('--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('--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"]}
@@ -15,15 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.checkSchema = void 0;
36
+ exports.checkSchema = checkSchema;
27
37
  const yup = __importStar(require("yup"));
28
38
  const gherkin_1 = require("@cucumber/gherkin");
29
39
  const schema = yup.object().shape({
@@ -44,7 +54,6 @@ const schema = yup.object().shape({
44
54
  paths: yup.array().of(yup.string()),
45
55
  parallel: yup.number().integer().min(0),
46
56
  publish: yup.boolean(),
47
- publishQuiet: yup.boolean(),
48
57
  require: yup.array().of(yup.string()),
49
58
  requireModule: yup.array().of(yup.string()),
50
59
  retry: yup.number().integer().min(0),
@@ -60,5 +69,4 @@ function checkSchema(configuration) {
60
69
  stripUnknown: true,
61
70
  });
62
71
  }
63
- exports.checkSchema = checkSchema;
64
72
  //# sourceMappingURL=check_schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"check_schema.js","sourceRoot":"","sources":["../../src/configuration/check_schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,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;IACnB,QAAQ,EAAE,GAAG,CAAC,OAAO,EAAE;IACvB,MAAM,EAAE,GAAG;SACR,KAAK,EAAE;SACP,EAAE,CACD,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CACf,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QAChB,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAA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AAW,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;AAND,kCAMC","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 publishQuiet: 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
+ {"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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,GAAG,CAAC,MAAM,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"]}
@@ -16,7 +16,6 @@ exports.DEFAULT_CONFIGURATION = {
16
16
  paths: [],
17
17
  parallel: 0,
18
18
  publish: false,
19
- publishQuiet: false,
20
19
  require: [],
21
20
  requireModule: [],
22
21
  retry: 0,
@@ -1 +1 @@
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,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,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,EAAE;IACX,aAAa,EAAE,EAAE;IACjB,KAAK,EAAE,CAAC;IACR,cAAc,EAAE,EAAE;IAClB,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 import: [],\n language: 'en',\n loader: [],\n name: [],\n order: 'defined',\n paths: [],\n parallel: 0,\n publish: false,\n publishQuiet: false,\n require: [],\n requireModule: [],\n retry: 0,\n retryTagFilter: '',\n strict: true,\n tags: '',\n worldParameters: {},\n}\n"]}
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,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,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 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 strict: true,\n tags: '',\n worldParameters: {},\n}\n"]}
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.fromFile = void 0;
6
+ exports.fromFile = fromFile;
7
7
  const node_fs_1 = __importDefault(require("node:fs"));
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
9
  const node_util_1 = require("node:util");
@@ -36,7 +36,6 @@ async function fromFile(logger, cwd, file, profiles = []) {
36
36
  });
37
37
  return (0, merge_configurations_1.mergeConfigurations)({}, ...profiles.map((profileKey) => (0, parse_configuration_1.parseConfiguration)(logger, `Profile "${profileKey}"`, definitions[profileKey])));
38
38
  }
39
- exports.fromFile = fromFile;
40
39
  async function handleDefaultFunctionDefinition(definitions, defaultDefinition) {
41
40
  if (Object.keys(definitions).length > 1) {
42
41
  throw new Error('Invalid profiles specified: if a default function definition is provided, no other static profiles should be specified');
@@ -61,7 +60,7 @@ async function loadFile(logger, cwd, file) {
61
60
  break;
62
61
  case '.cjs':
63
62
  logger.debug(`Loading configuration file "${file}" as CommonJS based on extension`);
64
- // eslint-disable-next-line @typescript-eslint/no-var-requires
63
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
65
64
  definitions = require(filePath);
66
65
  break;
67
66
  case '.mjs':
@@ -73,7 +72,7 @@ async function loadFile(logger, cwd, file) {
73
72
  const parentPackage = await readPackageJson(filePath);
74
73
  if (!parentPackage) {
75
74
  logger.debug(`Loading configuration file "${file}" as CommonJS based on absence of a parent package`);
76
- // eslint-disable-next-line @typescript-eslint/no-var-requires
75
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
77
76
  definitions = require(filePath);
78
77
  }
79
78
  else if (parentPackage.type === 'module') {
@@ -82,7 +81,7 @@ async function loadFile(logger, cwd, file) {
82
81
  }
83
82
  else {
84
83
  logger.debug(`Loading configuration file "${file}" as CommonJS based on "${parentPackage.name}" package type`);
85
- // eslint-disable-next-line @typescript-eslint/no-var-requires
84
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
86
85
  definitions = require(filePath);
87
86
  }
88
87
  }
@@ -1 +1 @@
1
- {"version":3,"file":"from_file.js","sourceRoot":"","sources":["../../src/configuration/from_file.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAwB;AACxB,0DAA4B;AAC5B,yCAAqC;AACrC,uCAAwC;AACxC,gDAAuB;AAGvB,iEAA4D;AAC5D,+DAA0D;AAEnD,KAAK,UAAU,QAAQ,CAC5B,MAAe,EACf,GAAW,EACX,IAAY,EACZ,WAAqB,EAAE;IAEvB,IAAI,WAAW,GAAG,MAAM,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;IAEnD,MAAM,iBAAiB,GAAY,WAAW,CAAC,OAAO,CAAA;IAEtD,IAAI,iBAAiB,EAAE;QACrB,IAAI,OAAO,iBAAiB,KAAK,UAAU,EAAE;YAC3C,MAAM,CAAC,KAAK,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Aa,CAAC,IAAI,KAAK,QAAQ,EAAE;oBAC1C,MAAM,CAAC,KAAK,CACV,+BAA+B,IAAI,sBAAsB,aAAa,CAAC,IAAI,gBAAgB,CAC5F,CAAA;oBACD,WAAW,GAAG,MAAM,MAAM,CAAC,IAAA,wBAAa,EAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;iBAC/D;qBAAM;oBACL,MAAM,CAAC,KAAK,CACV,+BAA+B,IAAI,2BAA2B,aAAa,CAAC,IAAI,gBAAgB,CACjG,CAAA;oBACD,8DAA8D;oBAC9D,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;iBAChC;aACF;YACD,MAAK;QACP;YACE,MAAM,IAAI,KAAK,CAAC,6CAA6C,SAAS,GAAG,CAAC,CAAA;KAC7E;IACD,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;QACnC,MAAM,IAAI,KAAK,CAAC,sBAAsB,QAAQ,4BAA4B,CAAC,CAAA;KAC5E;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\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 let definitions\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-var-requires\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 '.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-var-requires\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-var-requires\n definitions = require(filePath)\n }\n }\n break\n default:\n throw new Error(`Unsupported configuration file extension \"${extension}\"`)\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
+ {"version":3,"file":"from_file.js","sourceRoot":"","sources":["../../src/configuration/from_file.ts"],"names":[],"mappings":";;;;;AAUA,4BA4CC;AAtDD,sDAAwB;AACxB,0DAA4B;AAC5B,yCAAqC;AACrC,uCAAwC;AACxC,gDAAuB;AAGvB,iEAA4D;AAC5D,+DAA0D;AAEnD,KAAK,UAAU,QAAQ,CAC5B,MAAe,EACf,GAAW,EACX,IAAY,EACZ,WAAqB,EAAE;IAEvB,IAAI,WAAW,GAAG,MAAM,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;IAEnD,MAAM,iBAAiB,GAAY,WAAW,CAAC,OAAO,CAAA;IAEtD,IAAI,iBAAiB,EAAE,CAAC;QACtB,IAAI,OAAO,iBAAiB,KAAK,UAAU,EAAE,CAAC;YAC5C,MAAM,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAA;YACxD,WAAW,GAAG,MAAM,+BAA+B,CACjD,WAAW,EACX,iBAAiB,CAClB,CAAA;QACH,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,KAAK,CAA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AAsB,aAAa,CAAC,IAAI,gBAAgB,CAC5F,CAAA;oBACD,WAAW,GAAG,MAAM,MAAM,CAAC,IAAA,wBAAa,EAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;gBAChE,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,KAAK,CACV,+BAA+B,IAAI,2BAA2B,aAAa,CAAC,IAAI,gBAAgB,CACjG,CAAA;oBACD,iEAAiE;oBACjE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;gBACjC,CAAC;YACH,CAAC;YACD,MAAK;QACP;YACE,MAAM,IAAI,KAAK,CAAC,6CAA6C,SAAS,GAAG,CAAC,CAAA;IAC9E,CAAC;IACD,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\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 let definitions\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 '.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 '.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 default:\n throw new Error(`Unsupported configuration file extension \"${extension}\"`)\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,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isTruthyString = void 0;
3
+ exports.isTruthyString = isTruthyString;
4
4
  function isTruthyString(s) {
5
5
  if (s === undefined) {
6
6
  return false;
7
7
  }
8
8
  return s.match(/^(false|no|0)$/i) === null;
9
9
  }
10
- exports.isTruthyString = isTruthyString;
11
10
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/configuration/helpers.ts"],"names":[],"mappings":";;;AAAA,SAAgB,cAAc,CAAC,CAAqB;IAClD,IAAI,CAAC,KAAK,SAAS,EAAE;QACnB,OAAO,KAAK,CAAA;KACb;IACD,OAAO,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;AAC5C,CAAC;AALD,wCAKC","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
+ {"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"]}
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.locateFile = void 0;
6
+ exports.locateFile = locateFile;
7
7
  const node_path_1 = __importDefault(require("node:path"));
8
8
  const fs_1 = __importDefault(require("mz/fs"));
9
9
  const DEFAULT_FILENAMES = [
@@ -17,5 +17,4 @@ const DEFAULT_FILENAMES = [
17
17
  function locateFile(cwd) {
18
18
  return DEFAULT_FILENAMES.find((filename) => fs_1.default.existsSync(node_path_1.default.join(cwd, filename)));
19
19
  }
20
- exports.locateFile = locateFile;
21
20
  //# sourceMappingURL=locate_file.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"locate_file.js","sourceRoot":"","sources":["../../src/configuration/locate_file.ts"],"names":[],"mappings":";;;;;;AAAA,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;AAJD,gCAIC","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
+ {"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"]}
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.mergeConfigurations = void 0;
6
+ exports.mergeConfigurations = mergeConfigurations;
7
7
  const lodash_mergewith_1 = __importDefault(require("lodash.mergewith"));
8
8
  const ADDITIVE_ARRAYS = [
9
9
  'format',
@@ -45,5 +45,4 @@ function customizer(objValue, srcValue, key) {
45
45
  function mergeConfigurations(source, ...configurations) {
46
46
  return (0, lodash_mergewith_1.default)({}, source, ...configurations, customizer);
47
47
  }
48
- exports.mergeConfigurations = mergeConfigurations;
49
48
  //# sourceMappingURL=merge_configurations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"merge_configurations.js","sourceRoot":"","sources":["../../src/configuration/merge_configurations.ts"],"names":[],"mappings":";;;;;;AAAA,wEAAwC;AAGxC,MAAM,eAAe,GAAG;IACtB,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,OAAO;IACP,SAAS;IACT,eAAe;CAChB,CAAA;AACD,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;AAElD,SAAS,WAAW,CAAC,QAAe,EAAE,QAAe;IACnD,IAAI,QAAQ,IAAI,QAAQ,EAAE;QACxB,OAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;KACrC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED,SAAS,mBAAmB,CAAC,QAAgB,EAAE,QAAgB;IAC7D,IAAI,QAAQ,IAAI,QAAQ,EAAE;QACxB,OAAO,GAAG,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,iBAAiB,CAAC,QAAQ,CAAC,EAAE,CAAA;KAC3E;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED,SAAS,iBAAiB,CAAC,GAAW;IACpC,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC5C,OAAO,GAAG,CAAA;KACX;IACD,OAAO,IAAI,GAAG,GAAG,CAAA;AACnB,CAAC;AAED,SAAS,UAAU,CAAC,QAAa,EAAE,QAAa,EAAE,GAAW;IAC3D,IAAI,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACjC,OAAO,WAAW,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;KACvC;IACD,IAAI,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACjC,OAAO,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;KAC/C;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED,SAAgB,mBAAmB,CACjC,MAAS,EACT,GAAG,cAAyC;IAE5C,OAAO,IAAA,0BAAS,EAAC,EAAE,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,UAAU,CAAC,CAAA;AAC7D,CAAC;AALD,kDAKC","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
+ {"version":3,"file":"merge_configurations.js","sourceRoot":"","sources":["../../src/configuration/merge_configurations.ts"],"names":[],"mappings":";;;;;AA6CA,kDAKC;AAlDD,wEAAwC;AAGxC,MAAM,eAAe,GAAG;IACtB,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,OAAO;IACP,S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AA;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"]}
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.parseConfiguration = void 0;
6
+ exports.parseConfiguration = parseConfiguration;
7
7
  const string_argv_1 = __importDefault(require("string-argv"));
8
8
  const argv_parser_1 = __importDefault(require("./argv_parser"));
9
9
  const check_schema_1 = require("./check_schema");
@@ -36,5 +36,4 @@ function parseConfiguration(logger, source, definition) {
36
36
  throw new Error(`${source} configuration value failed schema validation: ${error.errors.join(' ')}`);
37
37
  }
38
38
  }
39
- exports.parseConfiguration = parseConfiguration;
40
39
  //# sourceMappingURL=parse_configuration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse_configuration.js","sourceRoot":"","sources":["../../src/configuration/parse_configuration.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAoC;AAGpC,gEAAsC;AACtC,iDAA4C;AAE5C,SAAgB,kBAAkB,CAChC,MAAe,EACf,MAAc,EACd,UAAmE;IAEnE,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,EAAE,CAAA;KACV;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QAC7B,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;KACrB;IACD,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAClC,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;KACrB;IACD,IAAI;QACF,OAAO,IAAA,0BAAW,EAAC,UAAU,CAAC,CAAA;KAC/B;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,IAAI,KAAK,CACb,GAAG,MAAM,kDAAkD,KAAK,CAAC,MAAM,CAAC,IAAI,CAC1E,GAAG,CACJ,EAAE,CACJ,CAAA;KACF;AACH,CAAC;AAnCD,gDAmCC","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
+ {"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,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.splitFormatDescriptor = void 0;
3
+ exports.splitFormatDescriptor = splitFormatDescriptor;
4
4
  function splitFormatDescriptor(logger, option) {
5
5
  const doWarning = (result) => {
6
6
  let expected = `"${result[0]}"`;
@@ -72,5 +72,4 @@ Change to ${expected}`);
72
72
  }
73
73
  return result;
74
74
  }
75
- exports.splitFormatDescriptor = splitFormatDescriptor;
76
75
  //# sourceMappingURL=split_format_descriptor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"split_format_descriptor.js","sourceRoot":"","sources":["../../src/configuration/split_format_descriptor.ts"],"names":[],"mappings":";;;AAEA,SAAgB,qBAAqB,CAC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E;QAC3D,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;YAChC,SAAS,CAAC,MAAM,CAAC,CAAA;SAClB;KACF;IACD,MAAM;SACD;QACH,MAAM,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;KACtB;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AA7ED,sDA6EC","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
+ {"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,CAA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AC7C,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;QACvB,CAAC;QACD,SAAS,CAAC,MAAM,CAAC,CAAA;IACnB,CAAC;IACD,mBAAmB;SACd,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QACpE,2BAA2B;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,KAAK,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"]}
@@ -101,11 +101,6 @@ export interface IConfiguration {
101
101
  * @default false
102
102
  */
103
103
  publish: boolean;
104
- /**
105
- * @deprecated no longer needed
106
- * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md}
107
- */
108
- publishQuiet: boolean;
109
104
  /**
110
105
  * Paths to where your support code is, for CommonJS
111
106
  * @default []
@@ -1 +1 @@
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 * 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 * Publish a report of your test run to https://reports.cucumber.io/\n * @default false\n */\n publish: boolean\n /**\n * @deprecated no longer needed\n * @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md}\n */\n publishQuiet: 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"]}
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 * 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 * 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"]}