@oxog/react-check 1.1.2 → 1.1.3

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/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.1.3] - 2025-12-31
9
+
10
+ ### Added
11
+
12
+ - Automatic puppeteer installation: If puppeteer is not installed, ReactCheck will automatically install it on first run
13
+
14
+ ### Fixed
15
+
16
+ - Removed debug console.log statements from production build
17
+
8
18
  ## [1.1.2] - 2025-12-31
9
19
 
10
20
  ### Fixed
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@ import { dirname, resolve, join, extname, basename } from 'path';
5
5
  import { createServer } from 'http';
6
6
  import { createHash } from 'crypto';
7
7
  import { fileURLToPath } from 'url';
8
- import { exec } from 'child_process';
8
+ import { exec, execSync } from 'child_process';
9
9
 
10
10
  var __defProp = Object.defineProperty;
11
11
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -7041,6 +7041,29 @@ var WebUIServer = class extends EventEmitter {
7041
7041
  }
7042
7042
  };
7043
7043
  var logger4 = new Logger({ prefix: "scan", level: 1 /* INFO */ });
7044
+ async function installPuppeteer() {
7045
+ console.log("");
7046
+ console.log(colors.cyan + "\u{1F4E6} Puppeteer is required for browser automation." + colors.reset);
7047
+ console.log(colors.gray + " Installing puppeteer... (this may take a minute)" + colors.reset);
7048
+ console.log("");
7049
+ try {
7050
+ execSync("npm install puppeteer --no-save", {
7051
+ stdio: "inherit",
7052
+ timeout: 3e5
7053
+ // 5 minutes timeout
7054
+ });
7055
+ console.log("");
7056
+ console.log(colors.green + "\u2713 Puppeteer installed successfully!" + colors.reset);
7057
+ console.log("");
7058
+ return true;
7059
+ } catch (error) {
7060
+ console.log("");
7061
+ logger4.error("Failed to install puppeteer automatically.");
7062
+ logger4.info("Please install it manually: npm install puppeteer");
7063
+ logger4.info("Or use --proxy mode: react-check scan --proxy <url>");
7064
+ return false;
7065
+ }
7066
+ }
7044
7067
  function parseScanOptions(args) {
7045
7068
  return {
7046
7069
  target: normalizeTarget(args.target ?? "localhost:3000"),
@@ -7211,12 +7234,19 @@ async function runScanCommand(args) {
7211
7234
  console.log(` Press ${colors.bold}Ctrl+C${colors.reset} to stop scanning`);
7212
7235
  console.log("");
7213
7236
  } else {
7214
- const hasPuppeteer = await isPuppeteerAvailable();
7237
+ let hasPuppeteer = await isPuppeteerAvailable();
7215
7238
  if (!hasPuppeteer) {
7216
- logger4.error("Puppeteer is not installed. Install it with: npm install puppeteer");
7217
- logger4.info("Alternatively, use --proxy mode to scan with your own browser");
7218
- await session.wsServer.stop();
7219
- return 2;
7239
+ const installed = await installPuppeteer();
7240
+ if (!installed) {
7241
+ await session.wsServer.stop();
7242
+ return 2;
7243
+ }
7244
+ hasPuppeteer = await isPuppeteerAvailable();
7245
+ if (!hasPuppeteer) {
7246
+ logger4.error("Puppeteer installation failed. Please try manually: npm install puppeteer");
7247
+ await session.wsServer.stop();
7248
+ return 2;
7249
+ }
7220
7250
  }
7221
7251
  const injectionScript = await getInjectionScript(mergedOptions.port);
7222
7252
  session.browser = new BrowserLauncher({
@@ -7401,7 +7431,7 @@ function generateReport(session) {
7401
7431
  id: session.id
7402
7432
  };
7403
7433
  return {
7404
- version: "1.0.0",
7434
+ version: "1.1.3",
7405
7435
  generated: formatDate(),
7406
7436
  session: sessionInfo,
7407
7437
  summary: exported.stats.summary,
@@ -7593,7 +7623,7 @@ async function runInitCommand(args) {
7593
7623
 
7594
7624
  // src/cli/index.ts
7595
7625
  var logger6 = new Logger({ prefix: "ReactCheck", level: 1 /* INFO */ });
7596
- var VERSION = "1.0.0";
7626
+ var VERSION = "1.1.3";
7597
7627
  function printVersion() {
7598
7628
  console.log(`@oxog/react-check v${VERSION}`);
7599
7629
  }