@dev-blinq/cucumber_client 1.0.1740-dev → 1.0.1741-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.
@@ -26,17 +26,22 @@ export function handleFileInitOps(projectDir, logger) {
26
26
  FIXED_FOLDER_NAMES.STEP_DEFINITIONS,
27
27
  FIXED_FILE_NAMES.UTILS
28
28
  );
29
-
29
+ console.log("🍊", __dirname, "🍎", process.cwd());
30
30
  const utilsTemplateFilePath = path.join(
31
31
  __dirname,
32
32
  `../../${FIXED_FOLDER_NAMES.ASSETS}`,
33
33
  FIXED_FOLDER_NAMES.TEMPLATES,
34
34
  FIXED_FILE_NAMES.UTILS_TEMPLATE
35
35
  );
36
- const utilsContent = readFileSync(utilsTemplateFilePath, UTF8_ENCODING);
37
36
  writeFileSync(utilsFilePath, utilsContent, UTF8_ENCODING);
38
37
  logger.info("🔆 utilsTemplateFilePath:", utilsTemplateFilePath);
39
38
  logger.info("☀️ exists:", existsSync(utilsTemplateFilePath));
39
+
40
+ if (!existsSync(utilsTemplateFilePath)) {
41
+ throw new Error(`Utils template not found at: ${utilsTemplateFilePath}`);
42
+ }
43
+
44
+ const utilsContent = readFileSync(utilsTemplateFilePath, UTF8_ENCODING);
40
45
  const hooksTemplateFilePath = path.join(
41
46
  __dirname,
42
47
  `../../${FIXED_FOLDER_NAMES.ASSETS}`,
@@ -53,6 +58,18 @@ export function handleFileInitOps(projectDir, logger) {
53
58
 
54
59
  return { featureFolder, utilsFilePath, utilsContent };
55
60
  } catch (error) {
61
+ console.log(
62
+ "🔰🔰🔰🔰🔰🔰",
63
+ JSON.stringify(
64
+ {
65
+ type: SaveJobErrorType.FILE_SYSTEM_ERROR,
66
+ message: "❌ Failed to initialize step definition folder structure",
67
+ meta: { reason: getErrorMessage(error) },
68
+ },
69
+ null,
70
+ 2
71
+ )
72
+ );
56
73
  throw new UpdateStepDefinitionsError({
57
74
  type: SaveJobErrorType.FILE_SYSTEM_ERROR,
58
75
  message: "❌ Failed to initialize step definition folder structure",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1740-dev",
3
+ "version": "1.0.1741-dev",
4
4
  "description": " ",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",