@oxog/react-check 1.1.5 → 1.1.6

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/dist/cli.js CHANGED
@@ -7061,21 +7061,26 @@ async function installPuppeteer(wsServer) {
7061
7061
  }
7062
7062
  const args = process.argv.slice(1);
7063
7063
  const { spawn } = await import('child_process');
7064
+ const isWindows = process.platform === "win32";
7064
7065
  const child = spawn(process.execPath, args, {
7065
7066
  stdio: "inherit",
7066
- env: process.env
7067
+ env: process.env,
7068
+ shell: isWindows,
7069
+ detached: false
7067
7070
  });
7068
7071
  await new Promise((resolve3) => {
7069
7072
  child.on("exit", (code) => {
7070
7073
  process.exit(code ?? 0);
7071
7074
  });
7072
- child.on("error", () => {
7075
+ child.on("error", (err) => {
7076
+ console.error("Spawn error:", err);
7073
7077
  resolve3();
7074
7078
  });
7075
7079
  });
7076
7080
  return false;
7077
7081
  } catch (error) {
7078
7082
  console.log("");
7083
+ console.error("Puppeteer installation error:", error);
7079
7084
  logger4.error("Failed to install puppeteer automatically.");
7080
7085
  logger4.info("Please install it manually: npm install puppeteer");
7081
7086
  logger4.info("Or use --proxy mode: react-check scan --proxy <url>");
@@ -7442,7 +7447,7 @@ function generateReport(session) {
7442
7447
  id: session.id
7443
7448
  };
7444
7449
  return {
7445
- version: "1.1.5",
7450
+ version: "1.1.6",
7446
7451
  generated: formatDate(),
7447
7452
  session: sessionInfo,
7448
7453
  summary: exported.stats.summary,
@@ -7634,7 +7639,7 @@ async function runInitCommand(args) {
7634
7639
 
7635
7640
  // src/cli/index.ts
7636
7641
  var logger6 = new Logger({ prefix: "ReactCheck", level: 1 /* INFO */ });
7637
- var VERSION = "1.1.5";
7642
+ var VERSION = "1.1.6";
7638
7643
  function printVersion() {
7639
7644
  console.log(`@oxog/react-check v${VERSION}`);
7640
7645
  }
@@ -7699,6 +7704,14 @@ var CLI = class {
7699
7704
  }
7700
7705
  };
7701
7706
  async function main() {
7707
+ process.on("uncaughtException", (error) => {
7708
+ console.error(semantic.error("Uncaught exception:"), error);
7709
+ process.exit(1);
7710
+ });
7711
+ process.on("unhandledRejection", (reason) => {
7712
+ console.error(semantic.error("Unhandled rejection:"), reason);
7713
+ process.exit(1);
7714
+ });
7702
7715
  const cli = new CLI(process.argv.slice(2));
7703
7716
  const exitCode = await cli.run();
7704
7717
  process.exit(exitCode);