sickbay 1.15.9 → 1.15.10

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Header
3
- } from "./chunk-GATOECD6.js";
3
+ } from "./chunk-S7IEDXU2.js";
4
4
 
5
5
  // src/components/DiffApp.tsx
6
6
  import React, { useState, useEffect } from "react";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-IQYSZ3UW.js";
4
4
  import {
5
5
  Header
6
- } from "./chunk-GATOECD6.js";
6
+ } from "./chunk-S7IEDXU2.js";
7
7
  import {
8
8
  detectPackageManager,
9
9
  detectProject
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-MBVA75EM.js";
7
7
  import {
8
8
  Header
9
- } from "./chunk-GATOECD6.js";
9
+ } from "./chunk-S7IEDXU2.js";
10
10
  import {
11
11
  runSickbay
12
12
  } from "./chunk-W4GJ5ISW.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-IQYSZ3UW.js";
4
4
  import {
5
5
  Header
6
- } from "./chunk-GATOECD6.js";
6
+ } from "./chunk-S7IEDXU2.js";
7
7
  import {
8
8
  detectProject
9
9
  } from "./chunk-W4GJ5ISW.js";
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-IQYSZ3UW.js";
8
8
  import {
9
9
  Header
10
- } from "./chunk-GATOECD6.js";
10
+ } from "./chunk-S7IEDXU2.js";
11
11
  import "./chunk-W4GJ5ISW.js";
12
12
  import {
13
13
  detectRegressions,
@@ -705,7 +705,7 @@ function TuiApp({
705
705
  return () => timers.forEach(clearTimeout);
706
706
  }, []);
707
707
  useEffect7(() => {
708
- checkForUpdate("1.15.8").then((info) => {
708
+ checkForUpdate("1.15.9").then((info) => {
709
709
  if (info) setUpdateInfo(info);
710
710
  });
711
711
  }, []);
@@ -835,7 +835,7 @@ function TuiApp({
835
835
  const webReport = monorepoReportRef.current ?? reportRef.current;
836
836
  if (!webReport) return;
837
837
  try {
838
- const { serveWeb } = await import("./web-PL4RX5A2.js");
838
+ const { serveWeb } = await import("./web-3JO6YQIG.js");
839
839
  const { default: openBrowser } = await import("open");
840
840
  let aiService;
841
841
  if (withAI && process.env.ANTHROPIC_API_KEY && !monorepoReportRef.current) {
@@ -11,7 +11,7 @@ var ASCII_ART = `
11
11
  A vitals health check for your app
12
12
  `.trim();
13
13
  function Header({ projectName }) {
14
- return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React.createElement(Text, { color: "green" }, ASCII_ART), /* @__PURE__ */ React.createElement(Box, { marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { dimColor: true }, " v", "1.15.8")), projectName && /* @__PURE__ */ React.createElement(Box, { marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { dimColor: true }, " Analyzing "), /* @__PURE__ */ React.createElement(Text, { bold: true, color: "white" }, projectName)));
14
+ return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React.createElement(Text, { color: "green" }, ASCII_ART), /* @__PURE__ */ React.createElement(Box, { marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { dimColor: true }, " v", "1.15.9")), projectName && /* @__PURE__ */ React.createElement(Box, { marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { dimColor: true }, " Analyzing "), /* @__PURE__ */ React.createElement(Text, { bold: true, color: "white" }, projectName)));
15
15
  }
16
16
 
17
17
  export {
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-TYG7ZQBP.js";
9
9
  import {
10
10
  Header
11
- } from "./chunk-GATOECD6.js";
11
+ } from "./chunk-S7IEDXU2.js";
12
12
  import {
13
13
  getScoreEmoji,
14
14
  runSickbay,
@@ -202,7 +202,7 @@ function App({
202
202
  if (openWeb) {
203
203
  setPhase("opening-web");
204
204
  try {
205
- const { serveWeb } = await import("./web-PL4RX5A2.js");
205
+ const { serveWeb } = await import("./web-3JO6YQIG.js");
206
206
  const { default: openBrowser } = await import("open");
207
207
  let aiService;
208
208
  if (enableAI && process.env.ANTHROPIC_API_KEY) {
@@ -268,7 +268,7 @@ function App({
268
268
  if (openWeb) {
269
269
  setPhase("opening-web");
270
270
  try {
271
- const { serveWeb } = await import("./web-PL4RX5A2.js");
271
+ const { serveWeb } = await import("./web-3JO6YQIG.js");
272
272
  const { default: openBrowser } = await import("open");
273
273
  let aiService;
274
274
  if (enableAI && process.env.ANTHROPIC_API_KEY) {
@@ -317,7 +317,7 @@ if (existsSync(globalConfigPath)) {
317
317
  }
318
318
  config({ debug: false, quiet: true });
319
319
  var program = new Command();
320
- program.name("sickbay").description("React project health check CLI").version("1.15.8", "-v, --version").enablePositionalOptions().passThroughOptions().option("-p, --path <path>", "project path to analyze", process.cwd()).option("-c, --checks <checks>", "comma-separated list of checks to run").option("--package <name>", "scope to a single named package (monorepo only)").option("--json", "output raw JSON report").option("--web", "open web dashboard after scan").option("--no-ai", "disable AI features").option("--no-quotes", "suppress personality quotes in output").option("--verbose", "show verbose output").action(async (options) => {
320
+ program.name("sickbay").description("React project health check CLI").version("1.15.9", "-v, --version").enablePositionalOptions().passThroughOptions().option("-p, --path <path>", "project path to analyze", process.cwd()).option("-c, --checks <checks>", "comma-separated list of checks to run").option("--package <name>", "scope to a single named package (monorepo only)").option("--json", "output raw JSON report").option("--web", "open web dashboard after scan").option("--no-ai", "disable AI features").option("--no-quotes", "suppress personality quotes in output").option("--verbose", "show verbose output").action(async (options) => {
321
321
  if (!existsSync(options.path)) {
322
322
  process.stderr.write(`Error: path does not exist: ${options.path}
323
323
  `);
@@ -332,7 +332,7 @@ program.name("sickbay").description("React project health check CLI").version("1
332
332
  const updatePromise = (async () => {
333
333
  try {
334
334
  const { checkForUpdate } = await import("./update-check-M7IFOMLJ.js");
335
- return await checkForUpdate("1.15.8");
335
+ return await checkForUpdate("1.15.9");
336
336
  } catch {
337
337
  return null;
338
338
  }
@@ -458,7 +458,7 @@ program.command("fix").description("Interactively fix issues found by sickbay sc
458
458
  }
459
459
  const { resolveProject } = await import("./resolve-package-LP7CD7JU.js");
460
460
  const resolution = await resolveProject(options.path, options.package);
461
- const { FixApp } = await import("./FixApp-QRZTLYGC.js");
461
+ const { FixApp } = await import("./FixApp-H7W77W6M.js");
462
462
  const checks = options.checks ? options.checks.split(",").map((s) => s.trim()) : void 0;
463
463
  const projectPath = resolution.isMonorepo ? resolution.targetPath ?? options.path : resolution.targetPath;
464
464
  render(
@@ -484,7 +484,7 @@ program.command("trend").description("Show score history and trends over time").
484
484
  const { resolveProject } = await import("./resolve-package-LP7CD7JU.js");
485
485
  const resolution = await resolveProject(options.path, options.package);
486
486
  const projectPath = resolution.isMonorepo ? resolution.targetPath ?? options.path : resolution.targetPath;
487
- const { TrendApp } = await import("./TrendApp-3MG7OPMM.js");
487
+ const { TrendApp } = await import("./TrendApp-5LK7JZ3Y.js");
488
488
  render(
489
489
  React7.createElement(TrendApp, {
490
490
  projectPath,
@@ -506,7 +506,7 @@ program.command("stats").description("Show a quick codebase overview and project
506
506
  const { resolveProject } = await import("./resolve-package-LP7CD7JU.js");
507
507
  const resolution = await resolveProject(options.path, options.package);
508
508
  const projectPath = resolution.isMonorepo ? resolution.targetPath ?? options.path : resolution.targetPath;
509
- const { StatsApp } = await import("./StatsApp-FPMKI45D.js");
509
+ const { StatsApp } = await import("./StatsApp-XYGCOHKG.js");
510
510
  render(
511
511
  React7.createElement(StatsApp, {
512
512
  projectPath,
@@ -518,7 +518,7 @@ program.command("stats").description("Show a quick codebase overview and project
518
518
  );
519
519
  });
520
520
  program.command("tui").description("Launch the persistent developer dashboard").option("-p, --path <path>", "project path to monitor", process.cwd()).option("--no-watch", "disable file-watching auto-refresh").option("--no-quotes", "suppress personality quotes in output").option("--refresh <seconds>", "auto-refresh interval in seconds", "300").option("-c, --checks <checks>", "comma-separated list of checks to run").action(async (options) => {
521
- const { TuiApp } = await import("./TuiApp-CGUY6DP2.js");
521
+ const { TuiApp } = await import("./TuiApp-GN57TL66.js");
522
522
  const checks = options.checks ? options.checks.split(",").map((s) => s.trim()) : void 0;
523
523
  render(
524
524
  React7.createElement(TuiApp, {
@@ -541,7 +541,7 @@ program.command("doctor").description("Diagnose project setup and configuration
541
541
  const { resolveProject } = await import("./resolve-package-LP7CD7JU.js");
542
542
  const resolution = await resolveProject(options.path, options.package);
543
543
  const projectPath = resolution.isMonorepo ? resolution.targetPath ?? options.path : resolution.targetPath;
544
- const { DoctorApp } = await import("./DoctorApp-4SV4QW3O.js");
544
+ const { DoctorApp } = await import("./DoctorApp-3MUEJRYX.js");
545
545
  render(
546
546
  React7.createElement(DoctorApp, {
547
547
  projectPath,
@@ -593,7 +593,7 @@ program.command("diff <branch>").description("Compare health score against anoth
593
593
  }
594
594
  }
595
595
  const checks = options.checks ? options.checks.split(",").map((s) => s.trim()) : void 0;
596
- const { DiffApp } = await import("./DiffApp-UEZKPPRV.js");
596
+ const { DiffApp } = await import("./DiffApp-W7AYJXAC.js");
597
597
  render(
598
598
  React7.createElement(DiffApp, {
599
599
  projectPath: options.path,
@@ -50,7 +50,7 @@ async function getFreePort(preferred, attempts = 0) {
50
50
  }
51
51
  return new Promise((resolve2, reject) => {
52
52
  const server = http.createServer();
53
- server.listen(preferred, () => {
53
+ server.listen(preferred, "127.0.0.1", () => {
54
54
  const addr = server.address();
55
55
  server.close(() => resolve2(addr.port));
56
56
  });
@@ -245,10 +245,19 @@ async function serveWeb(report, preferredPort = 3030, aiService) {
245
245
  res.end(readFileSync(join(distDir, "index.html")));
246
246
  }
247
247
  });
248
- return new Promise((resolve2) => {
248
+ return new Promise((resolve2, reject) => {
249
249
  const shutdown = () => server.close();
250
250
  process.once("SIGINT", shutdown);
251
251
  process.once("SIGTERM", shutdown);
252
+ server.once("error", (err) => {
253
+ process.off("SIGINT", shutdown);
254
+ process.off("SIGTERM", shutdown);
255
+ if (err.code === "EADDRINUSE") {
256
+ reject(new Error(`Port ${port} is already in use. Stop the other process or try again.`));
257
+ } else {
258
+ reject(err);
259
+ }
260
+ });
252
261
  server.listen(port, "127.0.0.1", () => {
253
262
  resolve2(`http://localhost:${port}`);
254
263
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sickbay",
3
- "version": "1.15.9",
3
+ "version": "1.15.10",
4
4
  "description": "Zero-config health check CLI for JavaScript and TypeScript projects",
5
5
  "license": "MIT",
6
6
  "repository": {