@dev-blinq/cucumber_client 1.0.1574-dev → 1.0.1576-dev

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.
@@ -288,6 +288,11 @@ export class CodePage {
288
288
  codePart.name = node.id.name;
289
289
  }
290
290
  }
291
+ findKey(funcString, key) {
292
+ const sourceRegex = new RegExp(`${key}:\\s*(.*)`);
293
+ const match = funcString.match(sourceRegex);
294
+ return match ? match[1] : null;
295
+ }
291
296
  collectAllTemplates() {
292
297
  const templates = [];
293
298
  if (this.cucumberCalls.length > 0) {
@@ -300,10 +305,12 @@ export class CodePage {
300
305
  const stepType = cucumberCall["stepType"];
301
306
  let firstFind = true;
302
307
  const stepPaths = [];
308
+ let source = null;
303
309
  for (let j = 0; j < this.methods.length; j++) {
304
310
  const method = this.methods[j];
305
311
  if (method.name === methodName) {
306
312
  if (firstFind) {
313
+ source = this.findKey(method.codePart, "source");
307
314
  foundMethod = true;
308
315
  const paramsObj = (method.node?.params ?? []);
309
316
  if (paramsObj && paramsObj.length > 0) {
@@ -315,7 +322,7 @@ export class CodePage {
315
322
  }
316
323
  }
317
324
  if (foundMethod) {
318
- templates.push({ pattern, methodName, params, stepType, paths: stepPaths });
325
+ templates.push({ pattern, methodName, params, stepType, paths: stepPaths, source });
319
326
  }
320
327
  }
321
328
  }
@@ -235,6 +235,7 @@ export const getImplementedSteps = async (projectDir) => {
235
235
  pattern: template.pattern,
236
236
  paths: template.paths,
237
237
  routeItems: step.routeItems,
238
+ isApiStep: template.source === "api",
238
239
  };
239
240
 
240
241
  implementedSteps.push(implementedStep);
@@ -260,6 +261,7 @@ export const getImplementedSteps = async (projectDir) => {
260
261
  mjsFile: template.mjsFile,
261
262
  pattern: template.pattern,
262
263
  paths: template.paths,
264
+ isApiStep: template.source === "api",
263
265
  };
264
266
  // reconstruct the parameters
265
267
  const parameters = [];
package/bin/index.js CHANGED
@@ -16,3 +16,6 @@ export * from "./client/profiler.js";
16
16
  export * from "./client/code_cleanup/utils.js";
17
17
  export * from "./client/code_cleanup/find_step_definition_references.js";
18
18
  export * from "./client/recorderv3/bvt_init.js";
19
+
20
+ export * from "./client/recorderv3/step_utils.js";
21
+ export * from "./client/recorderv3/update_feature.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1574-dev",
3
+ "version": "1.0.1576-dev",
4
4
  "description": " ",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",