sickbay 1.7.5 → 1.8.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Header
3
- } from "./chunk-CHJ4O7AA.js";
3
+ } from "./chunk-EONIXEDB.js";
4
4
 
5
5
  // src/components/DiffApp.tsx
6
6
  import React, { useState, useEffect } from "react";
@@ -119,7 +119,7 @@ function DiffApp({ projectPath, branch, jsonOutput, checks, verbose }) {
119
119
  useEffect(() => {
120
120
  (async () => {
121
121
  try {
122
- const { runSickbay } = await import("./dist-ZNY63JZW.js");
122
+ const { runSickbay } = await import("./dist-PJQ2AQQL.js");
123
123
  const currentReport = await runSickbay({
124
124
  projectPath,
125
125
  checks,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  shortName
3
- } from "./chunk-IHD3GBCE.js";
3
+ } from "./chunk-LRBDCBJG.js";
4
4
  import {
5
5
  Header
6
- } from "./chunk-CHJ4O7AA.js";
6
+ } from "./chunk-EONIXEDB.js";
7
7
  import {
8
8
  detectPackageManager,
9
9
  detectProject
10
- } from "./chunk-FEOQ6TWI.js";
10
+ } from "./chunk-NYE7UH3H.js";
11
11
 
12
12
  // src/components/DoctorApp.tsx
13
13
  import React, { useState, useEffect } from "react";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  shortName
3
- } from "./chunk-IHD3GBCE.js";
3
+ } from "./chunk-LRBDCBJG.js";
4
4
  import {
5
5
  ProgressList
6
6
  } from "./chunk-MBVA75EM.js";
7
7
  import {
8
8
  Header
9
- } from "./chunk-CHJ4O7AA.js";
9
+ } from "./chunk-EONIXEDB.js";
10
10
  import {
11
11
  runSickbay
12
- } from "./chunk-FEOQ6TWI.js";
12
+ } from "./chunk-NYE7UH3H.js";
13
13
 
14
14
  // src/components/FixApp.tsx
15
15
  import React, { useState, useEffect, useCallback } from "react";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  shortName
3
- } from "./chunk-IHD3GBCE.js";
3
+ } from "./chunk-LRBDCBJG.js";
4
4
  import {
5
5
  Header
6
- } from "./chunk-CHJ4O7AA.js";
6
+ } from "./chunk-EONIXEDB.js";
7
7
  import {
8
8
  detectProject
9
- } from "./chunk-FEOQ6TWI.js";
9
+ } from "./chunk-NYE7UH3H.js";
10
10
 
11
11
  // src/components/StatsApp.tsx
12
12
  import React, { useState, useEffect } from "react";
@@ -4,11 +4,11 @@ import {
4
4
  } from "./chunk-SHO3ZXTH.js";
5
5
  import {
6
6
  shortName
7
- } from "./chunk-IHD3GBCE.js";
7
+ } from "./chunk-LRBDCBJG.js";
8
8
  import {
9
9
  Header
10
- } from "./chunk-CHJ4O7AA.js";
11
- import "./chunk-FEOQ6TWI.js";
10
+ } from "./chunk-EONIXEDB.js";
11
+ import "./chunk-NYE7UH3H.js";
12
12
  import {
13
13
  detectRegressions,
14
14
  loadHistory
@@ -14,7 +14,7 @@ import {
14
14
  detectMonorepo,
15
15
  runSickbay,
16
16
  runSickbayMonorepo
17
- } from "./chunk-FEOQ6TWI.js";
17
+ } from "./chunk-NYE7UH3H.js";
18
18
  import {
19
19
  loadHistory
20
20
  } from "./chunk-3OR2GFVE.js";
@@ -689,7 +689,7 @@ function TuiApp({
689
689
  return () => timers.forEach(clearTimeout);
690
690
  }, []);
691
691
  useEffect7(() => {
692
- checkForUpdate("1.7.4").then((info) => {
692
+ checkForUpdate("1.7.5").then((info) => {
693
693
  if (info) setUpdateInfo(info);
694
694
  });
695
695
  }, []);
@@ -715,7 +715,7 @@ function TuiApp({
715
715
  } catch {
716
716
  }
717
717
  try {
718
- const { getDependencyTree } = await import("./dist-ZNY63JZW.js");
718
+ const { getDependencyTree } = await import("./dist-PJQ2AQQL.js");
719
719
  const { saveDepTree } = await import("./history-XLNVZEDI.js");
720
720
  const tree = await getDependencyTree(projectPath, result.projectInfo.packageManager);
721
721
  saveDepTree(projectPath, tree);
@@ -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.7.4")), 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.7.5")), 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 {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  detectMonorepo
3
- } from "./chunk-FEOQ6TWI.js";
3
+ } from "./chunk-NYE7UH3H.js";
4
4
 
5
5
  // src/lib/resolve-package.ts
6
6
  import { readFileSync } from "fs";
@@ -87,6 +87,12 @@ function defineConfig(config) {
87
87
  return config;
88
88
  }
89
89
  var CONFIG_FILES = ["sickbay.config.ts", "sickbay.config.js", "sickbay.config.mjs"];
90
+ function getCheckConfig(config, checkId) {
91
+ if (!config?.checks) return null;
92
+ const entry = config.checks[checkId];
93
+ if (typeof entry === "object" && entry.enabled !== false) return entry;
94
+ return null;
95
+ }
90
96
  function isCheckDisabled(config, checkId) {
91
97
  if (!config?.checks) return false;
92
98
  const entry = config.checks[checkId];
@@ -114,6 +120,29 @@ function resolveConfigMeta(config) {
114
120
  const hasCustomConfig = disabledChecks.length > 0 || overriddenChecks.length > 0 || config.weights !== void 0 && Object.keys(config.weights).length > 0 || config.exclude !== void 0 && config.exclude.length > 0;
115
121
  return { hasCustomConfig, overriddenChecks, disabledChecks };
116
122
  }
123
+ var KNOWN_THRESHOLD_KEYS = {
124
+ outdated: ["maxOutdated"],
125
+ complexity: [
126
+ "react-component",
127
+ "custom-hook",
128
+ "node-service",
129
+ "route-file",
130
+ "ts-utility",
131
+ "config",
132
+ "test",
133
+ "general"
134
+ ],
135
+ jscpd: ["warnPercent", "criticalPercent"],
136
+ coverage: ["lines", "functions"],
137
+ eslint: ["maxErrors"],
138
+ typescript: ["maxErrors"],
139
+ madge: ["maxCircular"],
140
+ "todo-scanner": ["patterns"],
141
+ "asset-size": ["imageWarn", "imageCritical", "svgWarn", "fontWarn", "totalWarn", "totalCritical"],
142
+ "source-map-explorer": ["warnSize", "failSize"],
143
+ "license-checker": ["blocklist"],
144
+ git: ["staleMonths", "maxRemoteBranches"]
145
+ };
117
146
  function validateConfig(config, knownCheckIds) {
118
147
  if (config.weights) {
119
148
  for (const [category, value] of Object.entries(config.weights)) {
@@ -123,12 +152,26 @@ function validateConfig(config, knownCheckIds) {
123
152
  }
124
153
  }
125
154
  if (config.checks) {
126
- for (const checkId of Object.keys(config.checks)) {
155
+ for (const [checkId, entry] of Object.entries(config.checks)) {
127
156
  if (!knownCheckIds.includes(checkId)) {
128
157
  process.stderr.write(
129
158
  `Warning: Unknown check "${checkId}" in sickbay.config \u2014 it will be ignored.
130
159
  `
131
160
  );
161
+ continue;
162
+ }
163
+ if (typeof entry === "object" && entry.thresholds) {
164
+ const knownKeys = KNOWN_THRESHOLD_KEYS[checkId];
165
+ if (knownKeys) {
166
+ for (const key of Object.keys(entry.thresholds)) {
167
+ if (!knownKeys.includes(key)) {
168
+ process.stderr.write(
169
+ `Warning: Unknown threshold key "${key}" for check "${checkId}" \u2014 it will be ignored.
170
+ `
171
+ );
172
+ }
173
+ }
174
+ }
132
175
  }
133
176
  }
134
177
  }
@@ -983,8 +1026,15 @@ var AssetSizeRunner = class extends BaseRunner {
983
1026
  name = "asset-size";
984
1027
  category = "performance";
985
1028
  applicableRuntimes = ["browser"];
986
- async run(projectPath) {
1029
+ async run(projectPath, options) {
987
1030
  const elapsed = timer();
1031
+ const t = options?.checkConfig?.thresholds;
1032
+ const imageWarn = t?.imageWarn ?? IMAGE_WARN;
1033
+ const imageCritical = t?.imageCritical ?? IMAGE_CRITICAL;
1034
+ const svgWarn = t?.svgWarn ?? SVG_WARN;
1035
+ const fontWarn = t?.fontWarn ?? FONT_WARN;
1036
+ const totalWarn = t?.totalWarn ?? TOTAL_WARN;
1037
+ const totalCritical = t?.totalCritical ?? TOTAL_CRITICAL;
988
1038
  try {
989
1039
  const assets = [];
990
1040
  for (const dir of ASSET_DIRS) {
@@ -999,7 +1049,7 @@ var AssetSizeRunner = class extends BaseRunner {
999
1049
  const sizeKB = Math.round(asset.size / 1024);
1000
1050
  const sizeMB = (asset.size / (1024 * 1024)).toFixed(1);
1001
1051
  if (asset.type === "image") {
1002
- if (asset.size > IMAGE_CRITICAL) {
1052
+ if (asset.size > imageCritical) {
1003
1053
  issues.push({
1004
1054
  severity: "critical",
1005
1055
  message: `${asset.path} \u2014 ${sizeMB}MB image (exceeds 2MB)`,
@@ -1009,7 +1059,7 @@ var AssetSizeRunner = class extends BaseRunner {
1009
1059
  },
1010
1060
  reportedBy: ["asset-size"]
1011
1061
  });
1012
- } else if (asset.size > IMAGE_WARN) {
1062
+ } else if (asset.size > imageWarn) {
1013
1063
  issues.push({
1014
1064
  severity: "warning",
1015
1065
  message: `${asset.path} \u2014 ${sizeKB}KB image (exceeds 500KB)`,
@@ -1019,7 +1069,7 @@ var AssetSizeRunner = class extends BaseRunner {
1019
1069
  });
1020
1070
  }
1021
1071
  } else if (asset.type === "svg") {
1022
- if (asset.size > SVG_WARN) {
1072
+ if (asset.size > svgWarn) {
1023
1073
  issues.push({
1024
1074
  severity: "warning",
1025
1075
  message: `${asset.path} \u2014 ${sizeKB}KB SVG (exceeds 100KB, likely unoptimized)`,
@@ -1031,7 +1081,7 @@ var AssetSizeRunner = class extends BaseRunner {
1031
1081
  });
1032
1082
  }
1033
1083
  } else if (asset.type === "font") {
1034
- if (asset.size > FONT_WARN) {
1084
+ if (asset.size > fontWarn) {
1035
1085
  issues.push({
1036
1086
  severity: "warning",
1037
1087
  message: `${asset.path} \u2014 ${sizeKB}KB font (exceeds 500KB)`,
@@ -1045,14 +1095,14 @@ var AssetSizeRunner = class extends BaseRunner {
1045
1095
  }
1046
1096
  }
1047
1097
  const totalMB = (totalSize / (1024 * 1024)).toFixed(1);
1048
- if (totalSize > TOTAL_CRITICAL) {
1098
+ if (totalSize > totalCritical) {
1049
1099
  issues.push({
1050
1100
  severity: "critical",
1051
1101
  message: `Total asset size is ${totalMB}MB \u2014 exceeds 10MB threshold`,
1052
1102
  fix: { description: "Review and optimize all static assets to reduce total payload" },
1053
1103
  reportedBy: ["asset-size"]
1054
1104
  });
1055
- } else if (totalSize > TOTAL_WARN) {
1105
+ } else if (totalSize > totalWarn) {
1056
1106
  issues.push({
1057
1107
  severity: "warning",
1058
1108
  message: `Total asset size is ${totalMB}MB \u2014 consider optimizing`,
@@ -1203,8 +1253,25 @@ var ComplexityRunner = class extends BaseRunner {
1203
1253
  async isApplicable(projectPath) {
1204
1254
  return SOURCE_DIRS.some((dir) => existsSync5(join11(projectPath, dir)));
1205
1255
  }
1206
- async run(projectPath) {
1256
+ async run(projectPath, options) {
1207
1257
  const elapsed = timer();
1258
+ const userThresholds = options?.checkConfig?.thresholds;
1259
+ const mergedThresholds = { ...FILE_TYPE_THRESHOLDS };
1260
+ if (userThresholds) {
1261
+ for (const [key, overrides] of Object.entries(userThresholds)) {
1262
+ const ft = key;
1263
+ if (mergedThresholds[ft] && overrides) {
1264
+ mergedThresholds[ft] = {
1265
+ warn: overrides.warn ?? mergedThresholds[ft].warn,
1266
+ critical: overrides.critical ?? mergedThresholds[ft].critical
1267
+ };
1268
+ }
1269
+ }
1270
+ }
1271
+ const resolveThresholds = (filePath) => {
1272
+ const fileType = classifyFile(filePath);
1273
+ return { ...mergedThresholds[fileType], fileType };
1274
+ };
1208
1275
  try {
1209
1276
  const files = SOURCE_DIRS.flatMap(
1210
1277
  (dir) => existsSync5(join11(projectPath, dir)) ? scanDirectory(join11(projectPath, dir), projectPath) : []
@@ -1212,7 +1279,7 @@ var ComplexityRunner = class extends BaseRunner {
1212
1279
  const issues = [];
1213
1280
  let oversizedCount = 0;
1214
1281
  for (const f of files) {
1215
- const { warn, critical, fileType } = getThresholds(f.path);
1282
+ const { warn, critical, fileType } = resolveThresholds(f.path);
1216
1283
  if (f.lines >= warn) {
1217
1284
  oversizedCount++;
1218
1285
  const label = getFileTypeLabel(fileType);
@@ -1228,7 +1295,7 @@ var ComplexityRunner = class extends BaseRunner {
1228
1295
  const avgLines = files.length > 0 ? Math.round(totalLines / files.length) : 0;
1229
1296
  const score = Math.max(0, 100 - oversizedCount * 10);
1230
1297
  const topFiles = [...files].sort((a, b) => b.lines - a.lines).slice(0, 10).map((f) => {
1231
- const { warn, critical, fileType } = getThresholds(f.path);
1298
+ const { warn, critical, fileType } = resolveThresholds(f.path);
1232
1299
  return { ...f, fileType, warn, critical };
1233
1300
  });
1234
1301
  return {
@@ -1456,11 +1523,14 @@ var CoverageRunner = class extends BaseRunner {
1456
1523
  }
1457
1524
  return true;
1458
1525
  }
1459
- async run(projectPath) {
1526
+ async run(projectPath, options) {
1460
1527
  const elapsed = timer();
1528
+ const thresholds = options?.checkConfig?.thresholds;
1529
+ const lineTarget = thresholds?.lines ?? 80;
1530
+ const functionTarget = thresholds?.functions ?? 80;
1461
1531
  const runner = this.detectTestRunner(projectPath);
1462
1532
  if (!runner) {
1463
- return this.readExistingCoverage(projectPath, elapsed);
1533
+ return this.readExistingCoverage(projectPath, elapsed, lineTarget);
1464
1534
  }
1465
1535
  try {
1466
1536
  const hasCoverage = this.hasCoverageProvider(projectPath, runner);
@@ -1515,7 +1585,9 @@ var CoverageRunner = class extends BaseRunner {
1515
1585
  coverageData,
1516
1586
  runner,
1517
1587
  hasCoverage,
1518
- packageManager
1588
+ packageManager,
1589
+ lineTarget,
1590
+ functionTarget
1519
1591
  );
1520
1592
  } catch (err) {
1521
1593
  return {
@@ -1532,7 +1604,7 @@ var CoverageRunner = class extends BaseRunner {
1532
1604
  };
1533
1605
  }
1534
1606
  }
1535
- buildResult(elapsed, counts, coverage, runner, hasCoverage, packageManager = "npm") {
1607
+ buildResult(elapsed, counts, coverage, runner, hasCoverage, packageManager = "npm", lineTarget = 80, functionTarget = 80) {
1536
1608
  const issues = [];
1537
1609
  if (counts.failed > 0) {
1538
1610
  issues.push({
@@ -1543,18 +1615,18 @@ var CoverageRunner = class extends BaseRunner {
1543
1615
  });
1544
1616
  }
1545
1617
  if (coverage) {
1546
- if (coverage.lines.pct < 80) {
1618
+ if (coverage.lines.pct < lineTarget) {
1547
1619
  issues.push({
1548
1620
  severity: coverage.lines.pct < 50 ? "critical" : "warning",
1549
- message: `Line coverage: ${coverage.lines.pct.toFixed(1)}% (target: 80%)`,
1621
+ message: `Line coverage: ${coverage.lines.pct.toFixed(1)}% (target: ${lineTarget}%)`,
1550
1622
  fix: { description: "Add tests to improve coverage" },
1551
1623
  reportedBy: ["coverage"]
1552
1624
  });
1553
1625
  }
1554
- if (coverage.functions.pct < 80) {
1626
+ if (coverage.functions.pct < functionTarget) {
1555
1627
  issues.push({
1556
1628
  severity: "warning",
1557
- message: `Function coverage: ${coverage.functions.pct.toFixed(1)}% (target: 80%)`,
1629
+ message: `Function coverage: ${coverage.functions.pct.toFixed(1)}% (target: ${functionTarget}%)`,
1558
1630
  fix: { description: "Add tests for uncovered functions" },
1559
1631
  reportedBy: ["coverage"]
1560
1632
  });
@@ -1578,7 +1650,7 @@ var CoverageRunner = class extends BaseRunner {
1578
1650
  const covAvg = (coverage.lines.pct + coverage.statements.pct + coverage.functions.pct + coverage.branches.pct) / 4;
1579
1651
  score = Math.round(score * 0.6 + covAvg * 0.4);
1580
1652
  }
1581
- const status = counts.failed > 0 ? "fail" : coverage && coverage.lines.pct < 50 ? "fail" : coverage && coverage.lines.pct < 80 ? "warning" : issues.length > 0 ? "warning" : "pass";
1653
+ const status = counts.failed > 0 ? "fail" : coverage && coverage.lines.pct < 50 ? "fail" : coverage && coverage.lines.pct < lineTarget ? "warning" : issues.length > 0 ? "warning" : "pass";
1582
1654
  return {
1583
1655
  id: "coverage",
1584
1656
  category: this.category,
@@ -1603,7 +1675,7 @@ var CoverageRunner = class extends BaseRunner {
1603
1675
  }
1604
1676
  };
1605
1677
  }
1606
- readExistingCoverage(projectPath, elapsed) {
1678
+ readExistingCoverage(projectPath, elapsed, lineTarget = 80) {
1607
1679
  const coveragePath = COVERAGE_PATHS.map((p) => join13(projectPath, p)).find(existsSync7);
1608
1680
  if (!coveragePath) {
1609
1681
  return this.skipped("No test runner or coverage report found");
@@ -1617,10 +1689,10 @@ var CoverageRunner = class extends BaseRunner {
1617
1689
  const { lines, statements, functions, branches } = candidate;
1618
1690
  const avg = (lines.pct + statements.pct + functions.pct + branches.pct) / 4;
1619
1691
  const issues = [];
1620
- if (lines.pct < 80) {
1692
+ if (lines.pct < lineTarget) {
1621
1693
  issues.push({
1622
1694
  severity: lines.pct < 50 ? "critical" : "warning",
1623
- message: `Line coverage: ${lines.pct.toFixed(1)}% (target: 80%)`,
1695
+ message: `Line coverage: ${lines.pct.toFixed(1)}% (target: ${lineTarget}%)`,
1624
1696
  reportedBy: ["coverage"]
1625
1697
  });
1626
1698
  }
@@ -1726,8 +1798,10 @@ var ESLintRunner = class extends BaseRunner {
1726
1798
  async isApplicable(projectPath) {
1727
1799
  return existsSync8(join14(projectPath, ".eslintrc.js")) || existsSync8(join14(projectPath, ".eslintrc.cjs")) || existsSync8(join14(projectPath, ".eslintrc.json")) || existsSync8(join14(projectPath, ".eslintrc.yml")) || existsSync8(join14(projectPath, "eslint.config.js")) || existsSync8(join14(projectPath, "eslint.config.mjs")) || existsSync8(join14(projectPath, "eslint.config.cjs"));
1728
1800
  }
1729
- async run(projectPath) {
1801
+ async run(projectPath, options) {
1730
1802
  const elapsed = timer();
1803
+ const thresholds = options?.checkConfig?.thresholds;
1804
+ const maxErrors = thresholds?.maxErrors ?? 10;
1731
1805
  try {
1732
1806
  const candidateDirs = ["src", "lib", "app"];
1733
1807
  const dirsToScan = candidateDirs.filter((d) => existsSync8(join14(projectPath, d)));
@@ -1771,7 +1845,7 @@ var ESLintRunner = class extends BaseRunner {
1771
1845
  category: this.category,
1772
1846
  name: "Lint",
1773
1847
  score,
1774
- status: totalErrors > 10 ? "fail" : totalErrors > 0 ? "warning" : totalWarnings > 0 ? "warning" : "pass",
1848
+ status: totalErrors > maxErrors ? "fail" : totalErrors > 0 ? "warning" : totalWarnings > 0 ? "warning" : "pass",
1775
1849
  issues,
1776
1850
  toolsUsed: ["eslint"],
1777
1851
  duration: elapsed(),
@@ -1799,8 +1873,11 @@ var GitRunner = class extends BaseRunner {
1799
1873
  async isApplicable(projectPath) {
1800
1874
  return fileExists(projectPath, ".git");
1801
1875
  }
1802
- async run(projectPath) {
1876
+ async run(projectPath, options) {
1803
1877
  const elapsed = timer();
1878
+ const thresholds = options?.checkConfig?.thresholds;
1879
+ const staleMonths = thresholds?.staleMonths ?? 6;
1880
+ const maxRemoteBranches = thresholds?.maxRemoteBranches ?? 20;
1804
1881
  try {
1805
1882
  const [lastCommitResult, logCountResult, contributorsResult] = await Promise.allSettled([
1806
1883
  execa5("git", ["log", "-1", "--format=%cr"], { cwd: projectPath }),
@@ -1821,7 +1898,7 @@ var GitRunner = class extends BaseRunner {
1821
1898
  const commitCount = logCountResult.status === "fulfilled" ? parseInt(logCountResult.value.stdout.trim(), 10) : 0;
1822
1899
  const contributorCount = contributorsResult.status === "fulfilled" ? contributorsResult.value.stdout.trim().split("\n").filter(Boolean).length : 0;
1823
1900
  const issues = [];
1824
- const isStale = lastCommit.includes("year") || lastCommit.includes("month") && parseInt(lastCommit) > 6;
1901
+ const isStale = lastCommit.includes("year") || lastCommit.includes("month") && parseInt(lastCommit) > staleMonths;
1825
1902
  if (isStale) {
1826
1903
  issues.push({
1827
1904
  severity: "warning",
@@ -1829,7 +1906,7 @@ var GitRunner = class extends BaseRunner {
1829
1906
  reportedBy: ["git"]
1830
1907
  });
1831
1908
  }
1832
- if (remoteBranches > 20) {
1909
+ if (remoteBranches > maxRemoteBranches) {
1833
1910
  issues.push({
1834
1911
  severity: "info",
1835
1912
  message: `${remoteBranches} remote branches \u2014 consider pruning stale branches`,
@@ -2027,8 +2104,11 @@ var HeavyDepsRunner = class extends BaseRunner {
2027
2104
  var JscpdRunner = class extends BaseRunner {
2028
2105
  name = "jscpd";
2029
2106
  category = "code-quality";
2030
- async run(projectPath) {
2107
+ async run(projectPath, options) {
2031
2108
  const elapsed = timer();
2109
+ const thresholds = options?.checkConfig?.thresholds;
2110
+ const warnPercent = thresholds?.warnPercent ?? 5;
2111
+ const criticalPercent = thresholds?.criticalPercent ?? 20;
2032
2112
  const available = await isCommandAvailable("jscpd");
2033
2113
  if (!available) {
2034
2114
  return this.skipped("jscpd not installed \u2014 run: npm i -g jscpd");
@@ -2052,9 +2132,9 @@ var JscpdRunner = class extends BaseRunner {
2052
2132
  const percentage = data.statistics?.total.percentage ?? 0;
2053
2133
  const clones = data.statistics?.total.clones ?? 0;
2054
2134
  const issues = [];
2055
- if (percentage > 5) {
2135
+ if (percentage > warnPercent) {
2056
2136
  issues.push({
2057
- severity: percentage > 20 ? "critical" : "warning",
2137
+ severity: percentage > criticalPercent ? "critical" : "warning",
2058
2138
  message: `${percentage.toFixed(1)}% code duplication detected (${clones} clone${clones !== 1 ? "s" : ""})`,
2059
2139
  fix: {
2060
2140
  description: "Extract duplicated code into shared utilities or components"
@@ -2067,7 +2147,7 @@ var JscpdRunner = class extends BaseRunner {
2067
2147
  category: this.category,
2068
2148
  name: "Code Duplication",
2069
2149
  score: Math.max(0, 100 - Math.round(percentage * 3)),
2070
- status: percentage === 0 ? "pass" : percentage > 20 ? "fail" : percentage > 5 ? "warning" : "pass",
2150
+ status: percentage === 0 ? "pass" : percentage > criticalPercent ? "fail" : percentage > warnPercent ? "warning" : "pass",
2071
2151
  issues,
2072
2152
  toolsUsed: ["jscpd"],
2073
2153
  duration: elapsed(),
@@ -2219,8 +2299,10 @@ var PROBLEMATIC_LICENSES = ["GPL-2.0", "GPL-3.0", "AGPL-3.0", "LGPL-2.1", "LGPL-
2219
2299
  var LicenseCheckerRunner = class extends BaseRunner {
2220
2300
  name = "license-checker";
2221
2301
  category = "security";
2222
- async run(projectPath) {
2302
+ async run(projectPath, options) {
2223
2303
  const elapsed = timer();
2304
+ const thresholds = options?.checkConfig?.thresholds;
2305
+ const blocklist = thresholds?.blocklist ?? PROBLEMATIC_LICENSES;
2224
2306
  const available = await isCommandAvailable("license-checker");
2225
2307
  if (!available) {
2226
2308
  return this.skipped("license-checker not installed \u2014 run: npm i -g license-checker");
@@ -2236,7 +2318,7 @@ var LicenseCheckerRunner = class extends BaseRunner {
2236
2318
  const issues = [];
2237
2319
  for (const [pkg, info] of Object.entries(licenses)) {
2238
2320
  const license = info.licenses;
2239
- if (PROBLEMATIC_LICENSES.some((l) => license.includes(l))) {
2321
+ if (blocklist.some((l) => license.includes(l))) {
2240
2322
  issues.push({
2241
2323
  severity: "warning",
2242
2324
  message: `${pkg} uses ${license} license \u2014 may be incompatible with commercial use`,
@@ -2311,8 +2393,10 @@ function findCircularDeps(graph) {
2311
2393
  var MadgeRunner = class extends BaseRunner {
2312
2394
  name = "madge";
2313
2395
  category = "code-quality";
2314
- async run(projectPath) {
2396
+ async run(projectPath, options) {
2315
2397
  const elapsed = timer();
2398
+ const thresholds = options?.checkConfig?.thresholds;
2399
+ const maxCircular = thresholds?.maxCircular ?? 5;
2316
2400
  const available = await isCommandAvailable("madge");
2317
2401
  if (!available) {
2318
2402
  return this.skipped("madge not installed \u2014 run: npm i -g madge");
@@ -2347,7 +2431,7 @@ var MadgeRunner = class extends BaseRunner {
2347
2431
  category: this.category,
2348
2432
  name: "Circular Dependencies",
2349
2433
  score: circles.length === 0 ? 100 : Math.max(0, 100 - circles.length * 10),
2350
- status: circles.length === 0 ? "pass" : circles.length > 5 ? "fail" : "warning",
2434
+ status: circles.length === 0 ? "pass" : circles.length > maxCircular ? "fail" : "warning",
2351
2435
  issues,
2352
2436
  toolsUsed: ["madge"],
2353
2437
  duration: elapsed(),
@@ -3300,9 +3384,11 @@ var NpmAuditRunner = class extends BaseRunner {
3300
3384
  var OutdatedRunner = class extends BaseRunner {
3301
3385
  name = "outdated";
3302
3386
  category = "dependencies";
3303
- async run(projectPath) {
3387
+ async run(projectPath, options) {
3304
3388
  const elapsed = timer();
3305
3389
  const pm = detectPackageManager(projectPath);
3390
+ const thresholds = options?.checkConfig?.thresholds;
3391
+ const maxOutdated = thresholds?.maxOutdated ?? 15;
3306
3392
  if (pm === "yarn" || pm === "bun") {
3307
3393
  return this.skipped(`${pm} outdated not supported \u2014 run: ${pm} outdated`);
3308
3394
  }
@@ -3335,7 +3421,7 @@ var OutdatedRunner = class extends BaseRunner {
3335
3421
  category: this.category,
3336
3422
  name: "Outdated Packages",
3337
3423
  score: Math.max(0, 100 - count * 3),
3338
- status: count === 0 ? "pass" : count > 15 ? "fail" : "warning",
3424
+ status: count === 0 ? "pass" : count > maxOutdated ? "fail" : "warning",
3339
3425
  issues,
3340
3426
  toolsUsed: [pm],
3341
3427
  duration: elapsed(),
@@ -3745,8 +3831,11 @@ var SourceMapExplorerRunner = class extends BaseRunner {
3745
3831
  displayName = "Bundle Size";
3746
3832
  category = "performance";
3747
3833
  applicableRuntimes = ["browser"];
3748
- async run(projectPath) {
3834
+ async run(projectPath, options) {
3749
3835
  const elapsed = timer();
3836
+ const t = options?.checkConfig?.thresholds;
3837
+ const warnSize = t?.warnSize ?? SIZE_THRESHOLD_WARN;
3838
+ const failSize = t?.failSize ?? SIZE_THRESHOLD_FAIL;
3750
3839
  const buildDir = fileExists(projectPath, "dist") ? "dist" : "build";
3751
3840
  const buildPath = join29(projectPath, buildDir);
3752
3841
  const mapFiles = await globby("**/*.js.map", {
@@ -3773,7 +3862,7 @@ var SourceMapExplorerRunner = class extends BaseRunner {
3773
3862
  const totalKB = Math.round(totalBytes / 1024);
3774
3863
  const largestKB = Math.round(largestBytes / 1024);
3775
3864
  const issues = [];
3776
- if (largestBytes > SIZE_THRESHOLD_FAIL) {
3865
+ if (largestBytes > failSize) {
3777
3866
  issues.push({
3778
3867
  severity: "critical",
3779
3868
  message: `Largest bundle is ${largestKB}KB \u2014 exceeds 1MB threshold`,
@@ -3782,7 +3871,7 @@ var SourceMapExplorerRunner = class extends BaseRunner {
3782
3871
  },
3783
3872
  reportedBy: ["source-map-explorer"]
3784
3873
  });
3785
- } else if (largestBytes > SIZE_THRESHOLD_WARN) {
3874
+ } else if (largestBytes > warnSize) {
3786
3875
  issues.push({
3787
3876
  severity: "warning",
3788
3877
  message: `Largest bundle is ${largestKB}KB \u2014 consider optimizing`,
@@ -3792,7 +3881,7 @@ var SourceMapExplorerRunner = class extends BaseRunner {
3792
3881
  reportedBy: ["source-map-explorer"]
3793
3882
  });
3794
3883
  }
3795
- const score = largestBytes > SIZE_THRESHOLD_FAIL ? 40 : largestBytes > SIZE_THRESHOLD_WARN ? 70 : 100;
3884
+ const score = largestBytes > failSize ? 40 : largestBytes > warnSize ? 70 : 100;
3796
3885
  return {
3797
3886
  id: "source-map-explorer",
3798
3887
  category: this.category,
@@ -3845,7 +3934,7 @@ var SourceMapExplorerRunner = class extends BaseRunner {
3845
3934
  const totalKB = Math.round(totalBytes / 1024);
3846
3935
  const initialKB = Math.round(initialBytes / 1024);
3847
3936
  const issues = [];
3848
- if (initialBytes > SIZE_THRESHOLD_FAIL) {
3937
+ if (initialBytes > failSize) {
3849
3938
  issues.push({
3850
3939
  severity: "critical",
3851
3940
  message: `Initial bundle is ${initialKB}KB \u2014 exceeds 1MB threshold`,
@@ -3854,7 +3943,7 @@ var SourceMapExplorerRunner = class extends BaseRunner {
3854
3943
  },
3855
3944
  reportedBy: ["bundle-size-check"]
3856
3945
  });
3857
- } else if (initialBytes > SIZE_THRESHOLD_WARN) {
3946
+ } else if (initialBytes > warnSize) {
3858
3947
  issues.push({
3859
3948
  severity: "warning",
3860
3949
  message: `Initial bundle is ${initialKB}KB \u2014 consider optimizing`,
@@ -3864,7 +3953,7 @@ var SourceMapExplorerRunner = class extends BaseRunner {
3864
3953
  reportedBy: ["bundle-size-check"]
3865
3954
  });
3866
3955
  }
3867
- const score = initialBytes > SIZE_THRESHOLD_FAIL ? 40 : initialBytes > SIZE_THRESHOLD_WARN ? 70 : 100;
3956
+ const score = initialBytes > failSize ? 40 : initialBytes > warnSize ? 70 : 100;
3868
3957
  return {
3869
3958
  id: "source-map-explorer",
3870
3959
  category: this.category,
@@ -3905,7 +3994,10 @@ var SourceMapExplorerRunner = class extends BaseRunner {
3905
3994
  }
3906
3995
  }
3907
3996
  };
3908
- var TODO_PATTERN = /\b(TODO|FIXME|HACK)\b[:\s]*(.*)/i;
3997
+ var DEFAULT_PATTERNS = ["TODO", "FIXME", "HACK"];
3998
+ function buildPattern(patterns) {
3999
+ return new RegExp("\\b(" + patterns.join("|") + ")\\b[:\\s]*(.*)", "i");
4000
+ }
3909
4001
  var STRING_LITERAL_RE = /("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|`(?:[^`\\]|\\.)*`)/g;
3910
4002
  function stripStringLiterals(line) {
3911
4003
  return line.replace(STRING_LITERAL_RE, (m) => " ".repeat(m.length));
@@ -3917,10 +4009,13 @@ var TodoScannerRunner = class extends BaseRunner {
3917
4009
  async isApplicable(projectPath) {
3918
4010
  return existsSync18(join30(projectPath, "src"));
3919
4011
  }
3920
- async run(projectPath) {
4012
+ async run(projectPath, options) {
3921
4013
  const elapsed = timer();
4014
+ const thresholds = options?.checkConfig?.thresholds;
4015
+ const patterns = thresholds?.patterns ?? DEFAULT_PATTERNS;
4016
+ const pattern = buildPattern(patterns);
3922
4017
  try {
3923
- const todos = scanDirectory4(join30(projectPath, "src"), projectPath);
4018
+ const todos = scanDirectory4(join30(projectPath, "src"), projectPath, pattern);
3924
4019
  const issues = todos.map((t) => ({
3925
4020
  severity: t.kind === "FIXME" || t.kind === "HACK" ? "warning" : "info",
3926
4021
  message: `${t.file}:${t.line} \u2014 ${t.kind}: ${t.text || "(no description)"}`,
@@ -3965,7 +4060,7 @@ var TodoScannerRunner = class extends BaseRunner {
3965
4060
  }
3966
4061
  };
3967
4062
  var SELF_REFERENCING_FILES = /* @__PURE__ */ new Set(["todo-scanner.ts", "todo-scanner.test.ts"]);
3968
- function scanDirectory4(dir, projectRoot) {
4063
+ function scanDirectory4(dir, projectRoot, pattern) {
3969
4064
  const todos = [];
3970
4065
  try {
3971
4066
  for (const entry of readdirSync15(dir)) {
@@ -3974,22 +4069,22 @@ function scanDirectory4(dir, projectRoot) {
3974
4069
  const fullPath = join30(dir, entry);
3975
4070
  const stat = statSync16(fullPath);
3976
4071
  if (stat.isDirectory()) {
3977
- todos.push(...scanDirectory4(fullPath, projectRoot));
4072
+ todos.push(...scanDirectory4(fullPath, projectRoot, pattern));
3978
4073
  } else if (SOURCE_EXTENSIONS3.has(extname7(entry))) {
3979
- todos.push(...scanFile2(fullPath, projectRoot));
4074
+ todos.push(...scanFile2(fullPath, projectRoot, pattern));
3980
4075
  }
3981
4076
  }
3982
4077
  } catch {
3983
4078
  }
3984
4079
  return todos;
3985
4080
  }
3986
- function scanFile2(filePath, projectRoot) {
4081
+ function scanFile2(filePath, projectRoot, pattern) {
3987
4082
  const todos = [];
3988
4083
  try {
3989
4084
  const lines = readFileSync25(filePath, "utf-8").split("\n");
3990
4085
  const relPath = filePath.replace(projectRoot + "/", "");
3991
4086
  for (let i = 0; i < lines.length; i++) {
3992
- const match = stripStringLiterals(lines[i]).match(TODO_PATTERN);
4087
+ const match = stripStringLiterals(lines[i]).match(pattern);
3993
4088
  if (match) {
3994
4089
  todos.push({
3995
4090
  file: relPath,
@@ -4009,8 +4104,10 @@ var TypeScriptRunner = class extends BaseRunner {
4009
4104
  async isApplicable(projectPath) {
4010
4105
  return existsSync19(join31(projectPath, "tsconfig.json"));
4011
4106
  }
4012
- async run(projectPath) {
4107
+ async run(projectPath, options) {
4013
4108
  const elapsed = timer();
4109
+ const thresholds = options?.checkConfig?.thresholds;
4110
+ const maxErrors = thresholds?.maxErrors ?? 20;
4014
4111
  try {
4015
4112
  const { stdout, stderr } = await execa13("tsc", ["--noEmit", "--pretty", "false"], {
4016
4113
  cwd: projectPath,
@@ -4042,7 +4139,7 @@ var TypeScriptRunner = class extends BaseRunner {
4042
4139
  category: this.category,
4043
4140
  name: "Type Safety",
4044
4141
  score,
4045
- status: count === 0 ? "pass" : count > 20 ? "fail" : "warning",
4142
+ status: count === 0 ? "pass" : count > maxErrors ? "fail" : "warning",
4046
4143
  issues,
4047
4144
  toolsUsed: ["tsc"],
4048
4145
  duration: elapsed(),
@@ -4365,7 +4462,11 @@ async function runSickbay(options = {}) {
4365
4462
  const applicable = await runner.isApplicable(projectPath, context);
4366
4463
  if (!applicable) return null;
4367
4464
  options.onCheckStart?.(runner.name);
4368
- const result = await runner.run(projectPath, { verbose: options.verbose });
4465
+ const checkCfg = getCheckConfig(config, runner.name);
4466
+ const result = await runner.run(projectPath, {
4467
+ verbose: options.verbose,
4468
+ checkConfig: checkCfg ? { thresholds: checkCfg.thresholds, exclude: checkCfg.exclude } : void 0
4469
+ });
4369
4470
  options.onCheckComplete?.(result);
4370
4471
  return result;
4371
4472
  })
@@ -4481,6 +4582,7 @@ async function getDependencyTree(projectPath, packageManager) {
4481
4582
 
4482
4583
  export {
4483
4584
  defineConfig,
4585
+ getCheckConfig,
4484
4586
  isCheckDisabled,
4485
4587
  resolveConfigMeta,
4486
4588
  validateConfig,
package/dist/config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  defineConfig
3
- } from "./chunk-FEOQ6TWI.js";
3
+ } from "./chunk-NYE7UH3H.js";
4
4
  export {
5
5
  defineConfig
6
6
  };
@@ -12,6 +12,7 @@ import {
12
12
  detectPackageManager,
13
13
  detectProject,
14
14
  getAvailableChecks,
15
+ getCheckConfig,
15
16
  getDependencyTree,
16
17
  getScoreColor,
17
18
  getScoreEmoji,
@@ -21,7 +22,7 @@ import {
21
22
  runSickbay,
22
23
  runSickbayMonorepo,
23
24
  validateConfig
24
- } from "./chunk-FEOQ6TWI.js";
25
+ } from "./chunk-NYE7UH3H.js";
25
26
  export {
26
27
  CRITICAL_LINES,
27
28
  SCORE_EXCELLENT,
@@ -36,6 +37,7 @@ export {
36
37
  detectPackageManager,
37
38
  detectProject,
38
39
  getAvailableChecks,
40
+ getCheckConfig,
39
41
  getDependencyTree,
40
42
  getScoreColor,
41
43
  getScoreEmoji,
package/dist/index.js CHANGED
@@ -8,12 +8,12 @@ import {
8
8
  } from "./chunk-TYG7ZQBP.js";
9
9
  import {
10
10
  Header
11
- } from "./chunk-CHJ4O7AA.js";
11
+ } from "./chunk-EONIXEDB.js";
12
12
  import {
13
13
  getScoreEmoji,
14
14
  runSickbay,
15
15
  runSickbayMonorepo
16
- } from "./chunk-FEOQ6TWI.js";
16
+ } from "./chunk-NYE7UH3H.js";
17
17
 
18
18
  // src/index.ts
19
19
  import { existsSync } from "fs";
@@ -176,7 +176,7 @@ function App({
176
176
  setMonorepoReport(r);
177
177
  setProjectName(`monorepo (${r.packages.length} packages)`);
178
178
  try {
179
- const { getDependencyTree } = await import("./dist-ZNY63JZW.js");
179
+ const { getDependencyTree } = await import("./dist-PJQ2AQQL.js");
180
180
  const { saveDepTree } = await import("./history-XLNVZEDI.js");
181
181
  const packages = {};
182
182
  for (const pkg of r.packages) {
@@ -245,7 +245,7 @@ function App({
245
245
  } catch {
246
246
  }
247
247
  try {
248
- const { getDependencyTree } = await import("./dist-ZNY63JZW.js");
248
+ const { getDependencyTree } = await import("./dist-PJQ2AQQL.js");
249
249
  const { saveDepTree } = await import("./history-XLNVZEDI.js");
250
250
  const tree = await getDependencyTree(projectPath, r.projectInfo.packageManager);
251
251
  saveDepTree(projectPath, tree);
@@ -303,7 +303,7 @@ if (existsSync(globalConfigPath)) {
303
303
  }
304
304
  config({ debug: false, quiet: true });
305
305
  var program = new Command();
306
- program.name("sickbay").description("React project health check CLI").version("1.7.4", "-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) => {
306
+ program.name("sickbay").description("React project health check CLI").version("1.7.5", "-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) => {
307
307
  if (options.path && options.path !== process.cwd()) {
308
308
  const projectEnvPath = join(options.path, ".env");
309
309
  if (existsSync(projectEnvPath)) {
@@ -313,13 +313,13 @@ program.name("sickbay").description("React project health check CLI").version("1
313
313
  const updatePromise = (async () => {
314
314
  try {
315
315
  const { checkForUpdate } = await import("./update-check-M7IFOMLJ.js");
316
- return await checkForUpdate("1.7.4");
316
+ return await checkForUpdate("1.7.5");
317
317
  } catch {
318
318
  return null;
319
319
  }
320
320
  })();
321
321
  const checks = options.checks ? options.checks.split(",").map((s) => s.trim()) : void 0;
322
- const { detectMonorepo, runSickbay: runSickbay2, runSickbayMonorepo: runSickbayMonorepo2 } = await import("./dist-ZNY63JZW.js");
322
+ const { detectMonorepo, runSickbay: runSickbay2, runSickbayMonorepo: runSickbayMonorepo2 } = await import("./dist-PJQ2AQQL.js");
323
323
  const monorepoInfo = await detectMonorepo(options.path);
324
324
  if (options.package && monorepoInfo.isMonorepo) {
325
325
  const { readFileSync } = await import("fs");
@@ -383,7 +383,7 @@ program.name("sickbay").description("React project health check CLI").version("1
383
383
  } catch {
384
384
  }
385
385
  try {
386
- const { getDependencyTree } = await import("./dist-ZNY63JZW.js");
386
+ const { getDependencyTree } = await import("./dist-PJQ2AQQL.js");
387
387
  const { saveDepTree } = await import("./history-XLNVZEDI.js");
388
388
  const tree = await getDependencyTree(options.path, report.projectInfo.packageManager);
389
389
  saveDepTree(options.path, tree);
@@ -406,7 +406,7 @@ program.name("sickbay").description("React project health check CLI").version("1
406
406
  );
407
407
  });
408
408
  program.command("init").description("Initialize .sickbay/ folder and run an initial baseline scan").option("-p, --path <path>", "project path to initialize", process.cwd()).action(async (options) => {
409
- const { initSickbay } = await import("./init-LTMLZWIF.js");
409
+ const { initSickbay } = await import("./init-WBLDUGEB.js");
410
410
  await initSickbay(options.path);
411
411
  });
412
412
  program.command("fix").description("Interactively fix issues found by sickbay scan").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 package (monorepo only)").option("--all", "apply all available fixes without prompting").option("--dry-run", "show what would be fixed without executing").option("--verbose", "show verbose output").action(async (options) => {
@@ -416,9 +416,9 @@ program.command("fix").description("Interactively fix issues found by sickbay sc
416
416
  config({ path: projectEnvPath, override: true });
417
417
  }
418
418
  }
419
- const { resolveProject } = await import("./resolve-package-KZ4Q6AFH.js");
419
+ const { resolveProject } = await import("./resolve-package-7S4ZB3OA.js");
420
420
  const resolution = await resolveProject(options.path, options.package);
421
- const { FixApp } = await import("./FixApp-KLSCU2W3.js");
421
+ const { FixApp } = await import("./FixApp-46TGLR3C.js");
422
422
  const checks = options.checks ? options.checks.split(",").map((s) => s.trim()) : void 0;
423
423
  const projectPath = resolution.isMonorepo ? resolution.targetPath ?? options.path : resolution.targetPath;
424
424
  render(
@@ -441,10 +441,10 @@ program.command("trend").description("Show score history and trends over time").
441
441
  config({ path: projectEnvPath, override: true });
442
442
  }
443
443
  }
444
- const { resolveProject } = await import("./resolve-package-KZ4Q6AFH.js");
444
+ const { resolveProject } = await import("./resolve-package-7S4ZB3OA.js");
445
445
  const resolution = await resolveProject(options.path, options.package);
446
446
  const projectPath = resolution.isMonorepo ? resolution.targetPath ?? options.path : resolution.targetPath;
447
- const { TrendApp } = await import("./TrendApp-FH7FV3ID.js");
447
+ const { TrendApp } = await import("./TrendApp-WMFR4L3A.js");
448
448
  render(
449
449
  React6.createElement(TrendApp, {
450
450
  projectPath,
@@ -463,10 +463,10 @@ program.command("stats").description("Show a quick codebase overview and project
463
463
  config({ path: projectEnvPath, override: true });
464
464
  }
465
465
  }
466
- const { resolveProject } = await import("./resolve-package-KZ4Q6AFH.js");
466
+ const { resolveProject } = await import("./resolve-package-7S4ZB3OA.js");
467
467
  const resolution = await resolveProject(options.path, options.package);
468
468
  const projectPath = resolution.isMonorepo ? resolution.targetPath ?? options.path : resolution.targetPath;
469
- const { StatsApp } = await import("./StatsApp-AYIELKMZ.js");
469
+ const { StatsApp } = await import("./StatsApp-5YMWUNHQ.js");
470
470
  render(
471
471
  React6.createElement(StatsApp, {
472
472
  projectPath,
@@ -478,7 +478,7 @@ program.command("stats").description("Show a quick codebase overview and project
478
478
  );
479
479
  });
480
480
  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) => {
481
- const { TuiApp } = await import("./TuiApp-TK44JMFI.js");
481
+ const { TuiApp } = await import("./TuiApp-DDC2E3SZ.js");
482
482
  const checks = options.checks ? options.checks.split(",").map((s) => s.trim()) : void 0;
483
483
  render(
484
484
  React6.createElement(TuiApp, {
@@ -498,10 +498,10 @@ program.command("doctor").description("Diagnose project setup and configuration
498
498
  config({ path: projectEnvPath, override: true });
499
499
  }
500
500
  }
501
- const { resolveProject } = await import("./resolve-package-KZ4Q6AFH.js");
501
+ const { resolveProject } = await import("./resolve-package-7S4ZB3OA.js");
502
502
  const resolution = await resolveProject(options.path, options.package);
503
503
  const projectPath = resolution.isMonorepo ? resolution.targetPath ?? options.path : resolution.targetPath;
504
- const { DoctorApp } = await import("./DoctorApp-XDSVZUFD.js");
504
+ const { DoctorApp } = await import("./DoctorApp-XVZMFDLM.js");
505
505
  render(
506
506
  React6.createElement(DoctorApp, {
507
507
  projectPath,
@@ -514,13 +514,13 @@ program.command("doctor").description("Diagnose project setup and configuration
514
514
  );
515
515
  });
516
516
  program.command("badge").description("Generate a health score badge for your README").option("-p, --path <path>", "project path", process.cwd()).option("--package <name>", "scope to a single package (monorepo only)").option("--html", "output HTML <img> tag instead of markdown").option("--url", "output bare badge URL only").option("--label <text>", "custom badge label", "sickbay").option("--scan", "run a fresh scan instead of using last report").action(async (options) => {
517
- const { resolveProject } = await import("./resolve-package-KZ4Q6AFH.js");
517
+ const { resolveProject } = await import("./resolve-package-7S4ZB3OA.js");
518
518
  const resolution = await resolveProject(options.path, options.package);
519
519
  const projectPath = resolution.isMonorepo ? resolution.targetPath ?? options.path : resolution.targetPath;
520
520
  const { loadScoreFromLastReport, badgeUrl, badgeMarkdown, badgeHtml } = await import("./badge-KQ73KEIN.js");
521
521
  let score = options.scan ? null : loadScoreFromLastReport(projectPath);
522
522
  if (score === null) {
523
- const { runSickbay: runSickbay2 } = await import("./dist-ZNY63JZW.js");
523
+ const { runSickbay: runSickbay2 } = await import("./dist-PJQ2AQQL.js");
524
524
  const report = await runSickbay2({ projectPath, quotes: false });
525
525
  try {
526
526
  const { saveEntry, saveLastReport } = await import("./history-XLNVZEDI.js");
@@ -549,7 +549,7 @@ program.command("diff <branch>").description("Compare health score against anoth
549
549
  }
550
550
  }
551
551
  const checks = options.checks ? options.checks.split(",").map((s) => s.trim()) : void 0;
552
- const { DiffApp } = await import("./DiffApp-6ALNMFOT.js");
552
+ const { DiffApp } = await import("./DiffApp-CG2DRKTU.js");
553
553
  render(
554
554
  React6.createElement(DiffApp, {
555
555
  projectPath: options.path,
@@ -2,7 +2,7 @@ import {
2
2
  detectContext,
3
3
  getAvailableChecks,
4
4
  runSickbay
5
- } from "./chunk-FEOQ6TWI.js";
5
+ } from "./chunk-NYE7UH3H.js";
6
6
  import {
7
7
  saveEntry
8
8
  } from "./chunk-3OR2GFVE.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  resolveProject,
3
3
  shortName
4
- } from "./chunk-IHD3GBCE.js";
5
- import "./chunk-FEOQ6TWI.js";
4
+ } from "./chunk-LRBDCBJG.js";
5
+ import "./chunk-NYE7UH3H.js";
6
6
  export {
7
7
  resolveProject,
8
8
  shortName
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sickbay",
3
- "version": "1.7.5",
3
+ "version": "1.8.0",
4
4
  "description": "Zero-config health check CLI for JavaScript and TypeScript projects",
5
5
  "license": "MIT",
6
6
  "repository": {