muagqa 1.2.0 → 1.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muagqa",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "MuagQA CLI — Test case runner with one-time session token and Playwright recorder",
5
5
  "author": "Mary C.N. Enwezor",
6
6
  "license": "MIT",
@@ -1,10 +1,14 @@
1
+ import fs from "fs";
2
+ import path from "path";
1
3
  import { createRequire } from "module";
2
4
 
3
5
  const require = createRequire(import.meta.url);
4
6
 
5
7
  export function getPlaywrightCliPath() {
6
8
  try {
7
- return require.resolve("playwright/cli.js");
9
+ const pkgPath = require.resolve("playwright/package.json");
10
+ const cliPath = path.join(path.dirname(pkgPath), "cli.js");
11
+ return fs.existsSync(cliPath) ? cliPath : null;
8
12
  } catch {
9
13
  return null;
10
14
  }