muagqa 1.0.0 → 1.1.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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muagqa",
3
- "version": "1.0.0",
3
+ "version": "1.1.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,19 +1,16 @@
1
1
  import { execSync } from "child_process";
2
2
  import chalk from "chalk";
3
3
 
4
- export function ensurePlaywrightInstalled() {
4
+ export async function ensurePlaywrightInstalled() {
5
5
  try {
6
+ console.log(chalk.yellow("Checking Playwright installation..."));
7
+
6
8
  execSync("npx playwright --version", { stdio: "ignore" });
7
- return; // Already installed, nothing else to do
8
- } catch (e) {
9
- console.log(chalk.yellow("📦 Playwright not detected. Installing browsers..."));
10
- }
11
9
 
12
- try {
13
- execSync("npx playwright install", { stdio: "inherit" });
14
- console.log(chalk.green("✔ Playwright installation complete.\n"));
15
- } catch (err) {
16
- console.log(chalk.red(" Failed to install Playwright browsers."));
17
- throw err;
10
+ // If successful, browsers are already installed
11
+ return;
12
+ } catch {
13
+ console.log(chalk.cyan("\nPlaywright browsers not found. Installing...\n"));
14
+ execSync("npx playwright install chromium", { stdio: "inherit" });
18
15
  }
19
- }
16
+ }