@arghajit/dummy 0.3.3 → 0.3.5

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arghajit/dummy",
3
3
  "author": "Arghajit Singha",
4
- "version": "0.3.3",
4
+ "version": "0.3.5",
5
5
  "description": "A Playwright reporter and dashboard for visualizing test results.",
6
6
  "homepage": "https://playwright-pulse-report.netlify.app/",
7
7
  "keywords": [
@@ -45,6 +45,7 @@ async function extractOutputDirFromConfig(configPath) {
45
45
  });
46
46
  config = await import(pathToFileURL(configPath).href);
47
47
  } catch (fallbackError) {
48
+ console.error("Failed to load TypeScript config:", fallbackError);
48
49
  return null;
49
50
  }
50
51
  }
@@ -62,35 +63,49 @@ async function extractOutputDirFromConfig(configPath) {
62
63
  if (
63
64
  typeof reporterPath === "string" &&
64
65
  (reporterPath.includes("playwright-pulse-report") ||
65
- reporterPath.includes("@arghajit/playwright-pulse-report"))
66
+ reporterPath.includes("@arghajit/playwright-pulse-report") ||
67
+ reporterPath.includes("@arghajit/dummy"))
66
68
  ) {
67
69
  if (options && options.outputDir) {
68
- return path.resolve(process.cwd(), options.outputDir);
70
+ const resolvedPath =
71
+ typeof options.outputDir === "string"
72
+ ? options.outputDir
73
+ : options.outputDir;
74
+ console.log(`Found outputDir in config: ${resolvedPath}`);
75
+ return path.resolve(process.cwd(), resolvedPath);
69
76
  }
70
77
  }
71
78
  }
72
79
  }
73
80
  }
74
81
 
82
+ console.log("No matching reporter config found with outputDir");
75
83
  return null;
76
84
  } catch (error) {
85
+ console.error("Error extracting outputDir from config:", error);
77
86
  return null;
78
87
  }
79
88
  }
80
89
 
81
90
  export async function getOutputDir(customOutputDirFromArgs = null) {
82
91
  if (customOutputDirFromArgs) {
92
+ console.log(`Using custom outputDir from CLI: ${customOutputDirFromArgs}`);
83
93
  return path.resolve(process.cwd(), customOutputDirFromArgs);
84
94
  }
85
95
 
86
96
  const { path: configPath, exists } = await findPlaywrightConfig();
97
+ console.log(
98
+ `Config file search result: ${exists ? configPath : "not found"}`
99
+ );
87
100
 
88
101
  if (exists) {
89
102
  const outputDirFromConfig = await extractOutputDirFromConfig(configPath);
90
103
  if (outputDirFromConfig) {
104
+ console.log(`Using outputDir from config: ${outputDirFromConfig}`);
91
105
  return outputDirFromConfig;
92
106
  }
93
107
  }
94
108
 
109
+ console.log(`Using default outputDir: ${DEFAULT_OUTPUT_DIR}`);
95
110
  return path.resolve(process.cwd(), DEFAULT_OUTPUT_DIR);
96
111
  }