k6-cucumber-steps 1.2.27 → 2.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 (116) hide show
  1. package/README.md +190 -177
  2. package/dist/cli.d.ts +3 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +72 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/commands/init.command.d.ts +4 -0
  7. package/dist/commands/init.command.d.ts.map +1 -0
  8. package/dist/commands/init.command.js +30 -0
  9. package/dist/commands/init.command.js.map +1 -0
  10. package/dist/generators/feature.parser.d.ts +12 -0
  11. package/dist/generators/feature.parser.d.ts.map +1 -0
  12. package/dist/generators/feature.parser.js +208 -0
  13. package/dist/generators/feature.parser.js.map +1 -0
  14. package/dist/generators/k6-script.generator.d.ts +11 -0
  15. package/dist/generators/k6-script.generator.d.ts.map +1 -0
  16. package/dist/generators/k6-script.generator.js +233 -0
  17. package/dist/generators/k6-script.generator.js.map +1 -0
  18. package/dist/generators/project.generator.d.ts +14 -0
  19. package/dist/generators/project.generator.d.ts.map +1 -0
  20. package/dist/generators/project.generator.js +497 -0
  21. package/dist/generators/project.generator.js.map +1 -0
  22. package/dist/index.d.ts +24 -0
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +53 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/runners/k6.runner.d.ts +19 -0
  27. package/dist/runners/k6.runner.d.ts.map +1 -0
  28. package/dist/runners/k6.runner.js +127 -0
  29. package/dist/runners/k6.runner.js.map +1 -0
  30. package/dist/step-registry.d.ts +14 -0
  31. package/dist/step-registry.d.ts.map +1 -0
  32. package/dist/step-registry.js +36 -0
  33. package/dist/step-registry.js.map +1 -0
  34. package/dist/types/index.d.ts +35 -0
  35. package/dist/types/index.d.ts.map +1 -0
  36. package/dist/types/index.js +3 -0
  37. package/dist/types/index.js.map +1 -0
  38. package/package.json +40 -62
  39. package/LICENSE +0 -21
  40. package/bin/k6-cucumber-steps.js +0 -176
  41. package/docs/data/search.json +0 -1
  42. package/docs/fonts/Inconsolata-Regular.ttf +0 -0
  43. package/docs/fonts/OpenSans-Regular.ttf +0 -0
  44. package/docs/fonts/WorkSans-Bold.ttf +0 -0
  45. package/docs/global.html +0 -36
  46. package/docs/index.html +0 -91
  47. package/docs/k6-cucumber-steps/1.2.8/data/search.json +0 -1
  48. package/docs/k6-cucumber-steps/1.2.8/fonts/Inconsolata-Regular.ttf +0 -0
  49. package/docs/k6-cucumber-steps/1.2.8/fonts/OpenSans-Regular.ttf +0 -0
  50. package/docs/k6-cucumber-steps/1.2.8/fonts/WorkSans-Bold.ttf +0 -0
  51. package/docs/k6-cucumber-steps/1.2.8/global.html +0 -3
  52. package/docs/k6-cucumber-steps/1.2.8/helpers_generateHeaders.js.html +0 -38
  53. package/docs/k6-cucumber-steps/1.2.8/helpers_resolveBody.js.html +0 -65
  54. package/docs/k6-cucumber-steps/1.2.8/index.html +0 -91
  55. package/docs/k6-cucumber-steps/1.2.8/module-generateHeaders.html +0 -3
  56. package/docs/k6-cucumber-steps/1.2.8/module-resolveBody.html +0 -3
  57. package/docs/k6-cucumber-steps/1.2.8/scripts/core.js +0 -726
  58. package/docs/k6-cucumber-steps/1.2.8/scripts/core.min.js +0 -23
  59. package/docs/k6-cucumber-steps/1.2.8/scripts/resize.js +0 -90
  60. package/docs/k6-cucumber-steps/1.2.8/scripts/search.js +0 -265
  61. package/docs/k6-cucumber-steps/1.2.8/scripts/search.min.js +0 -6
  62. package/docs/k6-cucumber-steps/1.2.8/scripts/third-party/Apache-License-2.0.txt +0 -202
  63. package/docs/k6-cucumber-steps/1.2.8/scripts/third-party/fuse.js +0 -9
  64. package/docs/k6-cucumber-steps/1.2.8/scripts/third-party/hljs-line-num-original.js +0 -369
  65. package/docs/k6-cucumber-steps/1.2.8/scripts/third-party/hljs-line-num.js +0 -1
  66. package/docs/k6-cucumber-steps/1.2.8/scripts/third-party/hljs-original.js +0 -5171
  67. package/docs/k6-cucumber-steps/1.2.8/scripts/third-party/hljs.js +0 -1
  68. package/docs/k6-cucumber-steps/1.2.8/scripts/third-party/popper.js +0 -5
  69. package/docs/k6-cucumber-steps/1.2.8/scripts/third-party/tippy.js +0 -1
  70. package/docs/k6-cucumber-steps/1.2.8/scripts/third-party/tocbot.js +0 -672
  71. package/docs/k6-cucumber-steps/1.2.8/scripts/third-party/tocbot.min.js +0 -1
  72. package/docs/k6-cucumber-steps/1.2.8/styles/clean-jsdoc-theme-base.css +0 -1159
  73. package/docs/k6-cucumber-steps/1.2.8/styles/clean-jsdoc-theme-dark.css +0 -412
  74. package/docs/k6-cucumber-steps/1.2.8/styles/clean-jsdoc-theme-light.css +0 -482
  75. package/docs/k6-cucumber-steps/1.2.8/styles/clean-jsdoc-theme-scrollbar.css +0 -30
  76. package/docs/k6-cucumber-steps/1.2.8/styles/clean-jsdoc-theme-without-scrollbar.min.css +0 -1
  77. package/docs/k6-cucumber-steps/1.2.8/styles/clean-jsdoc-theme.min.css +0 -1
  78. package/docs/k6-cucumber-steps/1.2.8/utils_k6Runner.js.html +0 -95
  79. package/docs/load_test_steps.js.html +0 -664
  80. package/docs/scripts/core.js +0 -726
  81. package/docs/scripts/core.min.js +0 -23
  82. package/docs/scripts/resize.js +0 -90
  83. package/docs/scripts/search.js +0 -265
  84. package/docs/scripts/search.min.js +0 -6
  85. package/docs/scripts/third-party/Apache-License-2.0.txt +0 -202
  86. package/docs/scripts/third-party/fuse.js +0 -9
  87. package/docs/scripts/third-party/hljs-line-num-original.js +0 -369
  88. package/docs/scripts/third-party/hljs-line-num.js +0 -1
  89. package/docs/scripts/third-party/hljs-original.js +0 -5171
  90. package/docs/scripts/third-party/hljs.js +0 -1
  91. package/docs/scripts/third-party/popper.js +0 -5
  92. package/docs/scripts/third-party/tippy.js +0 -1
  93. package/docs/scripts/third-party/tocbot.js +0 -672
  94. package/docs/scripts/third-party/tocbot.min.js +0 -1
  95. package/docs/styles/clean-jsdoc-theme-base.css +0 -1159
  96. package/docs/styles/clean-jsdoc-theme-dark.css +0 -412
  97. package/docs/styles/clean-jsdoc-theme-light.css +0 -482
  98. package/docs/styles/clean-jsdoc-theme-scrollbar.css +0 -30
  99. package/docs/styles/clean-jsdoc-theme-without-scrollbar.min.css +0 -1
  100. package/docs/styles/clean-jsdoc-theme.min.css +0 -1
  101. package/index.js +0 -1
  102. package/lib/helpers/buildK6Script.d.ts +0 -1
  103. package/lib/helpers/buildK6Script.js +0 -103
  104. package/lib/helpers/generateHeaders.d.ts +0 -5
  105. package/lib/helpers/generateHeaders.js +0 -48
  106. package/lib/helpers/resolveBody.d.ts +0 -2
  107. package/lib/helpers/resolveBody.js +0 -78
  108. package/lib/helpers/resolvePayloadPath.js +0 -25
  109. package/lib/helpers/runK6ScriptFromWorld.js +0 -26
  110. package/lib/utils/k6Runner.d.ts +0 -6
  111. package/lib/utils/k6Runner.js +0 -89
  112. package/scripts/cucumber.js +0 -18
  113. package/scripts/linkReports.js +0 -107
  114. package/step_definitions/load_test_steps.d.ts +0 -89
  115. package/step_definitions/load_test_steps.js +0 -689
  116. package/step_definitions/world.js +0 -41
@@ -1,41 +0,0 @@
1
- //world.js
2
- import { setWorldConstructor } from "@cucumber/cucumber";
3
-
4
- class CustomWorld {
5
- constructor({ parameters, pickle }) {
6
- this.options = {};
7
- this.configurations = {};
8
- this.endpoints = [];
9
- this.authType = "";
10
- this.postBody = {};
11
- this.aliases = {};
12
- this.lastRequest = null;
13
- this.lastResponse = null;
14
-
15
- this.overwrite =
16
- parameters?.overwrite ||
17
- process.env.K6_CUCUMBER_OVERWRITE === "true" ||
18
- false;
19
-
20
- // ✅ Store scenario example values from <placeholders>
21
- this.parameters = {};
22
-
23
- if (parameters) {
24
- this.parameters = { ...parameters };
25
- }
26
-
27
- if (pickle?.steps?.length) {
28
- const matches = pickle.steps.flatMap((step) => {
29
- return [...(step.text?.matchAll(/<([^>]+)>/g) || [])];
30
- });
31
- matches.forEach((match) => {
32
- const key = match[1];
33
- if (parameters?.[key]) {
34
- this.parameters[key] = parameters[key];
35
- }
36
- });
37
- }
38
- }
39
- }
40
-
41
- setWorldConstructor(CustomWorld);