react-doctor 0.9.17-dev.fe5ed09 → 0.9.18-dev.84ad0c8

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.
Files changed (43) hide show
  1. package/README.md +16 -74
  2. package/dist/{build-section-divider-jdDJ0_Vv.js → build-section-divider-B-0Npb8u.js} +5 -5
  3. package/dist/{ci-B69AXoJ9.js → ci-9ON49Bu6.js} +24 -14
  4. package/dist/cli.js +41 -32
  5. package/dist/{constants-DHn5rUeg.js → constants-ClqojoT2.js} +8 -5
  6. package/dist/constants-DNh19qg9.js +2 -2
  7. package/dist/{design-tfgkvQeX.js → design-BeVEhCLv.js} +4 -4
  8. package/dist/duplicate-jsx-worker.js +3 -3
  9. package/dist/{exit-gracefully-DZR14OKB.js → exit-gracefully-D2FYEGJS.js} +6 -6
  10. package/dist/{handle-error-Bj42p4Sw.js → handle-error-BsqqJmAO.js} +6 -6
  11. package/dist/index.d.ts +14 -6
  12. package/dist/index.js +334 -58
  13. package/dist/{inspect-CvENw7Ib.js → inspect-DwCSMHsS.js} +31 -23
  14. package/dist/{install-BczXj1aK.js → install-CpxB4W1u.js} +10 -10
  15. package/dist/{install-doctor-script-D2671Liy.js → install-doctor-script-D7sGRKum.js} +5 -5
  16. package/dist/{install-github-workflow-CRfLqBmy.js → install-github-workflow-CvZGQWwF.js} +21 -8
  17. package/dist/{install-react-doctor-DFwguFs-.js → install-react-doctor-DeX8yk4x.js} +9 -9
  18. package/dist/{is-cache-globally-disabled-DDlh_f1u.js → is-cache-globally-disabled-DnyI809X.js} +4 -4
  19. package/dist/{jsx-runtime-DcVXAnkV.js → jsx-runtime-DQ-tKHOv.js} +6 -6
  20. package/dist/{print-branded-header-DBVtv5Tr.js → print-branded-header-5sESdKnm.js} +4 -4
  21. package/dist/{prompt-runtime-scan-url-DbZhGuOm.js → prompt-runtime-scan-url-DGhmSMFv.js} +5 -5
  22. package/dist/{read-object-file-DB530_Fl.js → read-object-file-DEVTo4EH.js} +4 -4
  23. package/dist/{record-metric-B03OYFof.js → record-metric-C-qingN9.js} +439 -84
  24. package/dist/{report-error-BulWOi7r.js → report-error-HfFXI5vd.js} +6 -6
  25. package/dist/{report-workflow-result-Bu3ua6IL.js → report-workflow-result-Cm0adY-X.js} +8 -7
  26. package/dist/{should-fail-scan-gate-D2-LV9oP.js → resolve-scan-exit-code-BY2bQZUP.js} +37 -41
  27. package/dist/{resolve-scope-DpwfVe0L.js → resolve-scope-BajZr0FF.js} +10 -9
  28. package/dist/{rules-lsAfRYRW.js → rules-Cb5XoHlz.js} +7 -7
  29. package/dist/{run-scan-app-BKSG5wy7.js → run-scan-app-BMi9Dk74.js} +33 -23
  30. package/dist/{runtime-scan-BdEQdmNB.js → runtime-scan-y3m8LYbU.js} +10 -10
  31. package/dist/{sanitize-runtime-url-CR1L-ZVf.js → sanitize-runtime-url-RakASgaA.js} +4 -4
  32. package/dist/{scan-CSS_HWO-.js → scan-BMNqmD4X.js} +14 -13
  33. package/dist/{should-skip-prompts-lOJNuSDr.js → should-skip-prompts-xpfkejus.js} +4 -4
  34. package/dist/{should-use-tui-DmVzga6l.js → should-use-tui-BabyKy3n.js} +4 -4
  35. package/dist/skills/react-doctor/SKILL.md +19 -8
  36. package/dist/skills/react-doctor/references/explain.md +5 -0
  37. package/dist/{start-scan-preamble-BPz3nzCQ.js → start-scan-preamble-DgEn5GlY.js} +5 -5
  38. package/dist/start-scan-preamble.js +3 -3
  39. package/dist/{telemetry-runtime-Dp_wDVEZ.js → telemetry-runtime-UgvDG9lo.js} +7 -7
  40. package/dist/{version-BPQK2YWB.js → version-BEf9DbV_.js} +5 -5
  41. package/dist/{why-i1SnenZb.js → why-BWgYOBs8.js} +4 -4
  42. package/dist/{with-run-span--F1xHym-.js → with-run-span-DTnbt4wj.js} +6 -6
  43. package/package.json +4 -4
package/README.md CHANGED
@@ -7,64 +7,53 @@
7
7
  [![version](https://img.shields.io/npm/v/react-doctor?style=flat&colorA=000000&colorB=000000)](https://npmjs.com/package/react-doctor)
8
8
  [![downloads](https://img.shields.io/npm/dt/react-doctor.svg?style=flat&colorA=000000&colorB=000000)](https://npmjs.com/package/react-doctor)
9
9
 
10
- Your agent writes bad React, this catches it.
10
+ React Doctor runs deterministic checks on your code. It reports issues in state and effects, performance, architecture, security, accessibility, and maintainability.
11
11
 
12
- React Doctor deterministically scans your codebase and finds issues across state and effects, performance, architecture, security, accessibility, and maintainability. It highlights overly complex React functions and repeated JSX trees that are good candidates for composition.
12
+ Supports React projects built with Next.js, Vite, Astro, TanStack, React Native, and Expo.
13
13
 
14
- Works across React frameworks and React-enabled sites - Next.js, Vite, Astro, TanStack, React Native, Expo, you name it.
15
-
16
- [Website →](https://react.doctor/docs)
14
+ [Documentation →](https://react.doctor/docs)
17
15
 
18
16
  ## Install
19
17
 
20
- ### 1. Quick start
18
+ ### 1. Run a scan
21
19
 
22
- Run this at your project root to get an audit.
20
+ Run this command from your project root:
23
21
 
24
22
  ```bash
25
23
  npx react-doctor@latest
26
24
  ```
27
25
 
28
- Pass file paths to scan only the files that another CI step selected.
29
-
30
- ```bash
31
- npx react-doctor@latest src/a.tsx src/b.tsx
32
- ```
33
-
34
26
  https://github.com/user-attachments/assets/07cc88d9-9589-44c3-aa73-5d603cb1c570
35
27
 
36
28
  ### 2. Install for agents
37
29
 
38
- Once you have an audit, you can install the skill for your coding agent to learn from the issues and fix them in the future.
30
+ Install the skill to help your coding agent find and fix React issues:
39
31
 
40
32
  ```bash
41
33
  npx react-doctor@latest install
42
34
  ```
43
35
 
44
- Works with Claude Code, Cursor, Codex, OpenCode, and many more.
36
+ Supports coding agents including Claude Code, Cursor, Codex, and OpenCode.
45
37
 
46
38
  ### 3. Run in CI
47
39
 
48
- React Doctor reviews every pull request and reports only the issues your change introduced, not your existing backlog. Set it up with one command:
40
+ Scan each pull request and report the issues it introduces:
49
41
 
50
42
  ```bash
51
43
  npx react-doctor@latest ci install
52
44
  ```
53
45
 
54
- This adds the workflow, scans every pull request, and posts a summary comment. Change the gate, scan scope, and comments anytime with `react-doctor ci config`, and bump the action with `react-doctor ci upgrade`. GitHub Actions is fully supported; GitLab CI gets a gate-only scaffold.
55
-
56
- Set `comment-on-clean: false` in the Action inputs to create comments only when the scan finds issues. Existing comments still update after a clean scan.
57
-
58
46
  [CI docs →](https://react.doctor/ci)
59
47
 
60
48
  ### 4. Configure rules
61
49
 
62
- You can configure which rules to run and how to run them in `doctor.config.ts`.
50
+ Choose rules and scan settings in `doctor.config.ts`.
63
51
 
64
- The pnpm hardening check is off by default. To enable it, set
65
- `rules: { "react-doctor/require-pnpm-hardening": "warn" }` in your config.
52
+ With `customRulesOnly: true`, explicit `rules` settings of `"warn"` or `"error"`
53
+ enable selected ported rules. Legacy rule names also work. Other ported rules and
54
+ the React Compiler plugin stay off.
66
55
 
67
- [Learn more →](https://react.doctor/docs/configuration/config-files)
56
+ [Configuration docs →](https://react.doctor/docs/configuration/config-files)
68
57
 
69
58
  ## Runtime performance traces
70
59
 
@@ -74,63 +63,16 @@ Record a Chrome DevTools performance trace while you interact with a running Rea
74
63
  npx react-doctor@latest scan http://localhost:3000
75
64
  ```
76
65
 
77
- React Doctor opens system Chrome in a temporary isolated profile, records until you press Enter
78
- (up to five minutes), and flashes purple outlines with component names as React renders. It then
79
- returns a readable summary plus the path to a compressed DevTools trace. Use `--format json` or
80
- `--format jsonl` for coding agents. In an interactive terminal, you can run `react-doctor scan`
81
- without a URL and choose a detected localhost app or enter another URL; coding agents and CI must
82
- pass the URL explicitly.
83
-
84
- An already-open normal browser is left alone. To reuse an authenticated session, start a dedicated
85
- Chrome profile with remote debugging, sign in, close its non-blank tabs, and pass its endpoint:
86
-
87
- ```bash
88
- npx react-doctor@latest scan https://app.example.com --cdp http://127.0.0.1:9222
89
- ```
90
-
91
- Chrome performance tracing is browser-wide, so React Doctor rejects attached profiles with open
92
- pages. It closes blank startup tabs before tracing and closes its scan tab afterward; the attached
93
- browser stays open. The trace is stored locally and is never uploaded, but it can contain page
94
- URLs, source paths, and React profiling details. Treat it as sensitive application data.
95
-
96
- ## Scan scope
97
-
98
- `--scope changed --base <ref>` reports only new findings in files touched by the diff. It scans those files at the base and in the current tree. Uncommitted changes use `HEAD` when the base is the current branch.
99
-
100
- Findings are grouped by file path (following Git renames) and rule ID. Only the increase in each group's finding count is new: two findings at base and three now produce one new finding; two at base and two now produce none. Formatting, variable renames, edits inside flagged code, and line shifts do not create new findings when the count stays the same. Groups with no count increase need no location matching. When the count increases, exact fingerprint and message matches are paired first. Message similarity and line distance adjusted for Git diff shifts then select the most likely added findings. This is a count gate: fixing one issue and adding another under the same rule in the same file produces no increase. Current rule, severity, tag, and ignore settings apply before matching.
101
-
102
- New files have no base findings. Add `--include-untracked` to scan untracked files too. Deleted files and removed findings are not reported. `--blocking`, the exit code, and summary counts use only the unmatched current findings. The score still describes the current scan.
103
-
104
- Use `--scope lines` to report findings on changed lines, or `--scope files` to report all findings in changed files. The default `--scope full` scans the full project.
105
-
106
- Save a full scan once, then reuse it as the comparison base:
107
-
108
- ```bash
109
- react-doctor --json --blocking none > base-report.json
110
- react-doctor --baseline base-report.json --blocking warning
111
- react-doctor --scope changed --baseline base-report.json --blocking warning
112
- ```
113
-
114
- `--baseline` uses the same matching rules and skips the base scan. Use the same React Doctor version, rules, and scan options for both scans. The saved report must be a complete scan with fingerprints, not a previous comparison result. Saved reports record each project's source-dependent filter settings (`textComponents`, `rawTextWrapperComponents`, and `respectInlineDisables`). A mismatch requires a new base report with the current settings, or a Git comparison. Reports cannot recover findings that the original scan suppressed. Regenerate older reports that lack fingerprints or filter settings. Without Git, a saved report still works; rename matching requires Git history for the report's `sourceRevision`. With `--scope changed`, Git limits the scan to changed files when available; otherwise the full current tree is compared.
115
-
116
- JSON reports keep schema version 3 and add optional diagnostic `fingerprint`, report `sourceRevision`, and per-project `sourceFilterConfigHash` fields. The `baseline` block records `source` (`"base"` or `"baseline"`), `baseRef`, `baselineFile` for saved reports, and `matchedCount`. `newCount` equals the summary finding count.
66
+ [Runtime trace docs →](https://react.doctor/docs/reference/cli-reference#runtime-performance-traces)
117
67
 
118
68
  ## Telemetry
119
69
 
120
- The CLI reports crashes, basic run traces, and anonymous usage counters to [Sentry](https://sentry.io/) to help us fix bugs and prioritize work.
121
-
122
- We collect:
123
-
124
- - Environment: CLI version, platform, Node version
125
- - Invocation: which command, package manager, and run context (whether it's local vs. CI vs. coding agent)
126
- - Project shape: framework, React version, TypeScript, project size (NO file contents)
127
- - Rules fired: rule names and counts only (e.g. `react-doctor/no-array-index-as-key`) (NO code or specific findings)
128
- - De-minified React Doctor CLI stack traces
70
+ The CLI collects crash reports and anonymous usage data. See [Data use](https://react.doctor/docs/legal/data-use) for details.
129
71
 
130
72
  To opt out, run: `npx react-doctor@latest --no-telemetry`
131
73
 
132
74
  ## Contributing
133
75
 
134
- [Issues welcome!](https://github.com/millionco/react-doctor/issues)
76
+ [Report an issue](https://github.com/millionco/react-doctor/issues)
135
77
 
136
78
  MIT-licensed
@@ -1,7 +1,7 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="70f0d153-f5ce-5378-bebb-d7b95b7e62c5")}catch(e){}}();
3
- import { bt as DOCS_URL, lt as CANONICAL_GITHUB_URL } from "./constants-DHn5rUeg.js";
4
- import { At as highlighter } from "./record-metric-B03OYFof.js";
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="03af05e0-41dd-52ae-9524-fd332fffcd79")}catch(e){}}();
3
+ import { bt as DOCS_URL, lt as CANONICAL_GITHUB_URL } from "./constants-ClqojoT2.js";
4
+ import { Mt as highlighter } from "./record-metric-C-qingN9.js";
5
5
  //#region src/cli/utils/resolve-measure-width.ts
6
6
  const resolveClampedWidth = (input) => {
7
7
  const terminalColumns = process.stdout.columns;
@@ -77,5 +77,5 @@ const buildSectionDivider = () => highlighter.dim(`${DIVIDER_INDENT}${"─".repe
77
77
  //#endregion
78
78
  export { buildFooterLinkLines as n, buildSectionDivider as t };
79
79
 
80
- //# sourceMappingURL=build-section-divider-jdDJ0_Vv.js.map
81
- //# debugId=70f0d153-f5ce-5378-bebb-d7b95b7e62c5
80
+ //# sourceMappingURL=build-section-divider-B-0Npb8u.js.map
81
+ //# debugId=03af05e0-41dd-52ae-9524-fd332fffcd79
@@ -1,16 +1,16 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e753b4b2-6596-5c01-b786-5945874ef731")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b6d10cd7-5bc2-5000-a896-efa59ce13c14")}catch(e){}}();
3
3
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
4
- import { kt as GITHUB_ACTIONS_SETUP_URL, u as METRIC, ut as CI_URL } from "./constants-DHn5rUeg.js";
5
- import { At as highlighter, Cn as runSync, t as recordCount } from "./record-metric-B03OYFof.js";
6
- import { o as isExpectedUserError } from "./telemetry-runtime-Dp_wDVEZ.js";
7
- import { n as handleUserError, t as handleError } from "./handle-error-Bj42p4Sw.js";
8
- import { t as reportErrorToSentry } from "./report-error-BulWOi7r.js";
9
- import { N as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-D2671Liy.js";
10
- import { a as readReactDoctorWorkflow, d as detectDefaultBranch, f as runCommand, l as prompts, n as getReactDoctorWorkflowPath, s as upgradeWorkflowActionToV2, t as buildWorkflowContent } from "./install-github-workflow-CRfLqBmy.js";
11
- import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-DpwfVe0L.js";
12
- import { t as shouldSkipPrompts } from "./should-skip-prompts-lOJNuSDr.js";
13
- import { t as printBrandedHeader } from "./print-branded-header-DBVtv5Tr.js";
4
+ import { kt as GITHUB_ACTIONS_SETUP_URL, u as METRIC, ut as CI_URL } from "./constants-ClqojoT2.js";
5
+ import { Mt as highlighter, Tn as runSync, _t as findGitRepositoryRoot, t as recordCount } from "./record-metric-C-qingN9.js";
6
+ import { o as isExpectedUserError } from "./telemetry-runtime-UgvDG9lo.js";
7
+ import { n as handleUserError, t as handleError } from "./handle-error-BsqqJmAO.js";
8
+ import { t as reportErrorToSentry } from "./report-error-HfFXI5vd.js";
9
+ import { N as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-D7sGRKum.js";
10
+ import { a as readReactDoctorWorkflow, d as detectDefaultBranch, f as runCommand, l as prompts, n as getReactDoctorWorkflowPath, s as upgradeWorkflowActionToV2, t as buildWorkflowContent } from "./install-github-workflow-CvZGQWwF.js";
11
+ import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-BajZr0FF.js";
12
+ import { t as shouldSkipPrompts } from "./should-skip-prompts-xpfkejus.js";
13
+ import { t as printBrandedHeader } from "./print-branded-header-5sESdKnm.js";
14
14
  import * as fs$1 from "node:fs";
15
15
  import * as path$1 from "node:path";
16
16
  //#region src/cli/utils/ci/ci-provider.ts
@@ -39,6 +39,11 @@ const BLOCKING_CHOICES = [
39
39
  }
40
40
  ];
41
41
  const SCOPE_CHOICES = [
42
+ {
43
+ value: "contextual",
44
+ title: "Modified contexts",
45
+ description: "Issues in modified functions, JSX elements, or files, as selected by each rule"
46
+ },
42
47
  {
43
48
  value: "changed",
44
49
  title: "New issues",
@@ -86,6 +91,7 @@ const BLOCKING_SUMMARY = {
86
91
  error: "Fail the check on new error-level findings"
87
92
  };
88
93
  const SCOPE_SUMMARY = {
94
+ contextual: "Report issues in modified rule contexts",
89
95
  full: "Scan the whole project on every run",
90
96
  files: "Report every issue in changed files",
91
97
  lines: "Report issues whose source spans touch changed lines",
@@ -6887,7 +6893,7 @@ const containsReactDoctor$1 = (content) => {
6887
6893
  }
6888
6894
  };
6889
6895
  const findActionWorkflowFile = (projectRoot) => {
6890
- const workflowsDir = path$1.join(projectRoot, ".github", "workflows");
6896
+ const workflowsDir = path$1.dirname(getReactDoctorWorkflowPath(projectRoot));
6891
6897
  let entries;
6892
6898
  try {
6893
6899
  entries = fs$1.readdirSync(workflowsDir).sort();
@@ -6915,6 +6921,10 @@ const readWorkflow$1 = (projectRoot) => {
6915
6921
  return findActionWorkflowFile(projectRoot);
6916
6922
  };
6917
6923
  const scaffold$1 = (projectRoot, defaultBranch, gate) => {
6924
+ if (findGitRepositoryRoot(projectRoot) === null) return {
6925
+ status: "failed",
6926
+ path: getReactDoctorWorkflowPath(projectRoot)
6927
+ };
6918
6928
  const existing = readWorkflow$1(projectRoot);
6919
6929
  if (existing) return {
6920
6930
  status: "exists",
@@ -7499,5 +7509,5 @@ const ciConfigAction = (options) => runCiCommand("config", runCiConfig, options)
7499
7509
  //#endregion
7500
7510
  export { ciConfigAction, ciInstallAction, ciUpgradeAction };
7501
7511
 
7502
- //# sourceMappingURL=ci-B69AXoJ9.js.map
7503
- //# debugId=e753b4b2-6596-5c01-b786-5945874ef731
7512
+ //# sourceMappingURL=ci-9ON49Bu6.js.map
7513
+ //# debugId=b6d10cd7-5bc2-5000-a896-efa59ce13c14
package/dist/cli.js CHANGED
@@ -1,14 +1,14 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cc8f2e34-2b12-55f0-907a-f0131fd67226")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8ce9aa1f-0a85-514c-9759-6b1c0db96ace")}catch(e){}}();
3
3
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
4
- import { lt as CANONICAL_GITHUB_URL, ut as CI_URL } from "./constants-DHn5rUeg.js";
5
- import "./start-scan-preamble-BPz3nzCQ.js";
6
- import { At as highlighter, Bn as isDirectory, Hn as isFile, Qt as setColorEnabled, S as isDebugFlagEnabled, _ as VERSION, d as isJsonModeActive, h as writeJsonErrorReport, ht as filterSourceFiles, i as isTelemetryEnabled, jt as isPathInsideDirectory, y as CliInputError } from "./record-metric-B03OYFof.js";
7
- import { a as initializeSentry, n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-Dp_wDVEZ.js";
8
- import { t as exitGracefully } from "./exit-gracefully-DZR14OKB.js";
9
- import { n as handleUserError, t as handleError } from "./handle-error-Bj42p4Sw.js";
4
+ import { lt as CANONICAL_GITHUB_URL, ut as CI_URL } from "./constants-ClqojoT2.js";
5
+ import "./start-scan-preamble-DgEn5GlY.js";
6
+ import { Hn as isDirectory, Mt as highlighter, Nt as isPathInsideDirectory, S as isDebugFlagEnabled, Wn as isFile, _ as VERSION, d as isJsonModeActive, en as setColorEnabled, gt as filterSourceFiles, h as writeJsonErrorReport, i as isTelemetryEnabled, y as CliInputError } from "./record-metric-C-qingN9.js";
7
+ import { a as initializeSentry, n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-UgvDG9lo.js";
8
+ import { t as exitGracefully } from "./exit-gracefully-D2FYEGJS.js";
9
+ import { n as handleUserError, t as handleError } from "./handle-error-BsqqJmAO.js";
10
10
  import { n as getLastRunTraceId } from "./active-run-trace-Dewycxda.js";
11
- import { t as reportErrorToSentry } from "./report-error-BulWOi7r.js";
11
+ import { t as reportErrorToSentry } from "./report-error-HfFXI5vd.js";
12
12
  import { t as toForwardSlashes } from "./path-format-By20mo8A.js";
13
13
  import { t as unrefStdin } from "./unref-stdin-D-NZBFpg.js";
14
14
  import * as path$1 from "node:path";
@@ -3124,6 +3124,13 @@ const normalizeHelpInvocation = (argv, knownCommands) => {
3124
3124
  return [...nodeArguments, "--help"];
3125
3125
  };
3126
3126
  //#endregion
3127
+ //#region src/cli/utils/parse-warning-exit-code.ts
3128
+ const parseWarningExitCode = (value) => {
3129
+ const exitCode = Number(value);
3130
+ if (!/^\d+$/.test(value) || !Number.isInteger(exitCode) || exitCode <= 1 || exitCode > 255) throw new InvalidArgumentError(`Expected an integer from 2 to 255.`);
3131
+ return exitCode;
3132
+ };
3133
+ //#endregion
3127
3134
  //#region src/cli/utils/print-debug-trace.ts
3128
3135
  /**
3129
3136
  * The `--debug` end-of-run line, pure so it's testable without a live exporter.
@@ -3241,7 +3248,8 @@ const ROOT_FLAG_SPEC = {
3241
3248
  "--output-dir",
3242
3249
  "--fail-on",
3243
3250
  "--project",
3244
- "--scope"
3251
+ "--scope",
3252
+ "--warning-exit-code"
3245
3253
  ]),
3246
3254
  longOptionsWithOptionalValues: new Set(["--diff"]),
3247
3255
  shortOptionsWithoutValues: new Set([
@@ -3367,7 +3375,8 @@ const COMMAND_FLAG_SPECS = new Map([
3367
3375
  longOptionsWithRequiredValues: new Set([
3368
3376
  "--blocking",
3369
3377
  "--max-duration",
3370
- "--project"
3378
+ "--project",
3379
+ "--warning-exit-code"
3371
3380
  ]),
3372
3381
  longOptionsWithOptionalValues: /* @__PURE__ */ new Set(),
3373
3382
  shortOptionsWithoutValues: new Set(["-h", "-y"]),
@@ -3558,9 +3567,9 @@ ${highlighter.dim("Learn more:")}
3558
3567
  ${highlighter.info(CI_URL)}
3559
3568
  `;
3560
3569
  const collectCategoryOption = (value, previousValues) => [...previousValues ?? [], value];
3561
- const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[paths...]", "one project directory or source file paths to scan").option("--lint", "enable linting").option("--no-lint", "skip linting").addOption(new Option("--dead-code").hideHelp()).addOption(new Option("--no-dead-code").hideHelp()).option("--supply-chain", "enable the dependency supply-chain scan (default)").option("--no-supply-chain", "skip the dependency supply-chain scan (Socket.dev dependency health checks)").option("--verbose", "show every rule and per-file details (default shows top 3 rules)").option("--debug", "force a Sentry trace and print its id at the end (paste it into a bug report)").option("--output-dir <dir>", "directory for the full diagnostics dump (default: a temp folder)").option("--score", "output only the score").option("--json", "output a single structured JSON report (suppresses other output)").option("--json-compact", "with --json, emit compact JSON (no indentation)").option("--json-out <path>", "with --json, write the report to a file instead of stdout").option("--no-cache", "disable all scan caches for this run").option("-y, --yes", "skip prompts, scan all workspace projects").option("--no-parallel", "lint serially with one worker (default: parallel across CPU cores; set the worker count with REACT_DOCTOR_PARALLEL)").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple); overrides the `projects` config field").option("--scope <value>", "how much supported JS/TS and inline HTML script source to scan/report: full (default), files, changed (only new issues vs base), or lines (issues whose source spans touch changed lines)").option("--baseline <report.json>", "report only new issues compared with a saved JSON report").option("--base <ref>", "base git ref for files/changed/lines scope (auto-detected when omitted)").option("--include-untracked", "with --scope files/changed/lines, also scan ordinary untracked files (respects .gitignore)").addOption(new Option("--diff [base]", "[deprecated] alias for --scope changed (pass `false` to force a full scan)").hideHelp()).addOption(new Option("--changed-files-from <file>", "scan source files listed in a newline-delimited changed-files file").hideHelp()).option("--no-score", "skip the score API, the share URL, and crash reporting").addOption(new Option("--category <category>", "only show diagnostics in a category (repeatable; e.g. Security)").argParser(collectCategoryOption)).option("--no-telemetry", "alias for --no-score (skip the score API, share URL, and crash reporting)").option("--staged", "scan only staged (git index) files for pre-commit hooks (honors --project and config `projects`; exits 0 when nothing is staged)").option("--max-duration <seconds>", MAX_DURATION_OPTION_DESCRIPTION).option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").addOption(new Option("--fail-on <level>", "[deprecated] alias for --blocking <level>").hideHelp()).option("--no-respect-inline-disables", "audit mode: neutralize inline lint suppressions before scanning").option("--warnings", "show warning-severity diagnostics (default)").option("--no-warnings", "hide warning-severity diagnostics (errors only)").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderRootHelpEpilog);
3570
+ const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[paths...]", "one project directory or source file paths to scan").option("--lint", "enable linting").option("--no-lint", "skip linting").addOption(new Option("--dead-code").hideHelp()).addOption(new Option("--no-dead-code").hideHelp()).option("--supply-chain", "enable the dependency supply-chain scan (default)").option("--no-supply-chain", "skip the dependency supply-chain scan (Socket.dev dependency health checks)").option("--verbose", "show every rule and per-file details (default shows top 3 rules)").option("--debug", "force a Sentry trace and print its id at the end (paste it into a bug report)").option("--output-dir <dir>", "directory for the full diagnostics dump (default: a temp folder)").option("--score", "output only the score").option("--json", "output a single structured JSON report (suppresses other output)").option("--json-compact", "with --json, emit compact JSON (no indentation)").option("--json-out <path>", "with --json, write the report to a file instead of stdout").option("--no-cache", "disable all scan caches for this run").option("-y, --yes", "skip prompts, scan all workspace projects").option("--no-parallel", "lint serially with one worker (default: parallel across CPU cores; set the worker count with REACT_DOCTOR_PARALLEL)").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple); overrides the `projects` config field").option("--scope <value>", "how much supported JS/TS and inline HTML script source to scan/report: full (default), files, changed (only new issues vs base), lines (issues whose source spans touch changed lines), or contextual (issues in modified rule contexts)").option("--base <ref>", "base git ref for files/changed/lines/contextual scope (auto-detected when omitted)").option("--baseline <report.json>", "report only new issues compared with a saved JSON report").option("--include-untracked", "with --scope files/changed/lines/contextual, also scan ordinary untracked files (respects .gitignore)").addOption(new Option("--diff [base]", "[deprecated] alias for --scope changed (pass `false` to force a full scan)").hideHelp()).addOption(new Option("--changed-files-from <file>", "scan source files listed in a newline-delimited changed-files file").hideHelp()).option("--no-score", "skip the score API, the share URL, and crash reporting").addOption(new Option("--category <category>", "only show diagnostics in a category (repeatable; e.g. Security)").argParser(collectCategoryOption)).option("--no-telemetry", "alias for --no-score (skip the score API, share URL, and crash reporting)").option("--staged", "scan only staged (git index) files for pre-commit hooks (honors --project and config `projects`; exits 0 when nothing is staged)").option("--max-duration <seconds>", MAX_DURATION_OPTION_DESCRIPTION).option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").option("--warning-exit-code <code>", "exit code for non-blocking warnings (2-255). Ignored with --blocking none or --score", parseWarningExitCode).addOption(new Option("--fail-on <level>", "[deprecated] alias for --blocking <level>").hideHelp()).option("--no-respect-inline-disables", "audit mode: neutralize inline lint suppressions before scanning").option("--warnings", "show warning-severity diagnostics (default)").option("--no-warnings", "hide warning-severity diagnostics (errors only)").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderRootHelpEpilog);
3562
3571
  program.action(async (positionalPaths = [], flags) => {
3563
- const { runScanCommand } = await import("./scan-CSS_HWO-.js");
3572
+ const { runScanCommand } = await import("./scan-BMNqmD4X.js");
3564
3573
  return runScanCommand({
3565
3574
  ...resolvePositionalScanInput(positionalPaths),
3566
3575
  flags,
@@ -3568,75 +3577,75 @@ program.action(async (positionalPaths = [], flags) => {
3568
3577
  });
3569
3578
  });
3570
3579
  program.command("design [directory]").description("Run only the focused UI design diagnostics").addHelpText("after", renderDesignHelpEpilog).action(async (directory, _options, command) => {
3571
- const { designAction } = await import("./design-tfgkvQeX.js");
3580
+ const { designAction } = await import("./design-BeVEhCLv.js");
3572
3581
  return designAction(directory ?? ".", command.optsWithGlobals());
3573
3582
  });
3574
3583
  program.command("scan").description("Scan a React interaction in Chrome until you press Enter").argument("[url]", "HTTP(S) URL of the running React app; detects local apps when omitted").option("-f, --format <format>", "report format: text, json, or jsonl", "text").option("--cdp <url>", "reuse Chrome at this remote-debugging endpoint").option("--trace-out <path>", "save the compressed .json.gz DevTools trace at this path").addHelpText("after", renderRuntimeScanHelpEpilog).action(async (url, options) => {
3575
- const { runtimeScanAction } = await import("./runtime-scan-BdEQdmNB.js");
3584
+ const { runtimeScanAction } = await import("./runtime-scan-y3m8LYbU.js");
3576
3585
  return runtimeScanAction(url, options);
3577
3586
  });
3578
3587
  program.command("why <location>").description("Explain why a rule fired (or why a suppression didn't apply) at a file:line").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple)").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (location, options) => {
3579
- const { whyAction } = await import("./why-i1SnenZb.js");
3588
+ const { whyAction } = await import("./why-BWgYOBs8.js");
3580
3589
  return whyAction(location, options);
3581
3590
  });
3582
3591
  program.command("install").alias("setup").description("Install the react-doctor skill into your coding agents and optional git hook").option("-y, --yes", "skip prompts, install for all detected agents").option("--dry-run", "show what would be installed without writing files").option("--agent-hooks", "install end-of-turn agent hooks for Claude Code and Cursor").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderInstallHelpEpilog).action(async (options, command) => {
3583
- const { installAction } = await import("./install-BczXj1aK.js");
3592
+ const { installAction } = await import("./install-CpxB4W1u.js");
3584
3593
  return installAction(options, command);
3585
3594
  });
3586
3595
  const providerOption = ["--provider <name>", "ci provider: github-actions or gitlab-ci (auto-detected by default)"];
3587
3596
  const prOption = ["--pr", "open a pull request with the change instead of writing it to the working tree"];
3588
3597
  const ci = program.command("ci").description("Set up, upgrade, and configure React Doctor in your CI");
3589
3598
  ci.command("install").description("Add a CI workflow that scans every pull request").option(...providerOption).option(...prOption).option("--blocking <level>", "gate level: none (advisory, default), warning, or error").option("--scope <value>", "what a pull-request scan reports: changed (default), files, lines, full").option("--comment", "post a summary comment on each pull request").option("--no-comment", "don't post a summary comment").option("--review-comments", "add inline review comments on changed lines").option("--no-review-comments", "don't add inline review comments").option("--commit-status", "report a commit status with the health score").option("--no-commit-status", "don't report a commit status").option("-y, --yes", "skip prompts; use the defaults").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderCiHelpEpilog).action(async (_options, command) => {
3590
- const { ciInstallAction } = await import("./ci-B69AXoJ9.js");
3599
+ const { ciInstallAction } = await import("./ci-9ON49Bu6.js");
3591
3600
  return ciInstallAction(command.optsWithGlobals());
3592
3601
  });
3593
- ci.command("config").description("Change the gate, scan scope, and pull-request reporting").option(...providerOption).option("--blocking <level>", "gate level: none (advisory), warning, or error").option("--scope <value>", "what a pull-request scan reports: changed, files, lines, or full").option("--comment", "post a summary comment on each pull request").option("--no-comment", "don't post a summary comment").option("--review-comments", "add inline review comments on changed lines").option("--no-review-comments", "don't add inline review comments").option("--commit-status", "report a commit status with the health score").option("--no-commit-status", "don't report a commit status").option("-y, --yes", "skip prompts; print the current settings").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (_options, command) => {
3594
- const { ciConfigAction } = await import("./ci-B69AXoJ9.js");
3602
+ ci.command("config").description("Change the gate, scan scope, and pull-request reporting").option(...providerOption).option("--blocking <level>", "gate level: none (advisory), warning, or error").option("--scope <value>", "what a pull-request scan reports: changed, files, lines, contextual, or full").option("--comment", "post a summary comment on each pull request").option("--no-comment", "don't post a summary comment").option("--review-comments", "add inline review comments on changed lines").option("--no-review-comments", "don't add inline review comments").option("--commit-status", "report a commit status with the health score").option("--no-commit-status", "don't report a commit status").option("-y, --yes", "skip prompts; print the current settings").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (_options, command) => {
3603
+ const { ciConfigAction } = await import("./ci-9ON49Bu6.js");
3595
3604
  return ciConfigAction(command.optsWithGlobals());
3596
3605
  });
3597
3606
  ci.command("upgrade").description("Upgrade the CI workflow to the action's current major").option(...providerOption).option(...prOption).option("-y, --yes", "skip prompts").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (_options, command) => {
3598
- const { ciUpgradeAction } = await import("./ci-B69AXoJ9.js");
3607
+ const { ciUpgradeAction } = await import("./ci-9ON49Bu6.js");
3599
3608
  return ciUpgradeAction(command.optsWithGlobals());
3600
3609
  });
3601
3610
  program.command("version").description("show the version with Node and platform info").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async () => {
3602
- const { versionAction } = await import("./version-BPQK2YWB.js");
3611
+ const { versionAction } = await import("./version-BEf9DbV_.js");
3603
3612
  return versionAction();
3604
3613
  });
3605
3614
  const rules = program.command("rules").description("List, explain, and configure which React Doctor rules run");
3606
3615
  rules.command("list").description("List rules and the severity they run at under your config").option("--category <name>", "only show rules in a category (e.g. Performance)").option("--tag <name>", "only show rules with a tag (e.g. design, test-noise)").option("--framework <name>", "only show rules for a framework (e.g. global, nextjs)").option("--configured", "only show rules your config has changed from the default").option("--json", "output a structured JSON array").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (_options, command) => {
3607
- const { rulesListAction } = await import("./rules-lsAfRYRW.js");
3616
+ const { rulesListAction } = await import("./rules-Cb5XoHlz.js");
3608
3617
  return rulesListAction(command.optsWithGlobals());
3609
3618
  });
3610
3619
  rules.command("explain <rule>").description("Explain why a rule matters, its current severity, and how to configure it").option("--json", "output a structured JSON object").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
3611
- const { rulesExplainAction } = await import("./rules-lsAfRYRW.js");
3620
+ const { rulesExplainAction } = await import("./rules-Cb5XoHlz.js");
3612
3621
  return rulesExplainAction(rule, command.optsWithGlobals());
3613
3622
  });
3614
3623
  rules.command("set <rule> <severity>").description("Set a rule's severity: off, warn, or error").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, severity, _options, command) => {
3615
- const { rulesSetAction } = await import("./rules-lsAfRYRW.js");
3624
+ const { rulesSetAction } = await import("./rules-Cb5XoHlz.js");
3616
3625
  return rulesSetAction(rule, severity, command.optsWithGlobals());
3617
3626
  });
3618
3627
  rules.command("enable <rule>").description("Enable a rule at its recommended severity (or pass --severity)").option("--severity <level>", "severity to enable at: warn or error").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
3619
- const { rulesEnableAction } = await import("./rules-lsAfRYRW.js");
3628
+ const { rulesEnableAction } = await import("./rules-Cb5XoHlz.js");
3620
3629
  return rulesEnableAction(rule, command.optsWithGlobals());
3621
3630
  });
3622
3631
  rules.command("disable <rule>").description("Disable a rule so it never runs").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
3623
- const { rulesDisableAction } = await import("./rules-lsAfRYRW.js");
3632
+ const { rulesDisableAction } = await import("./rules-Cb5XoHlz.js");
3624
3633
  return rulesDisableAction(rule, command.optsWithGlobals());
3625
3634
  });
3626
3635
  rules.command("category <category> <severity>").description("Set the severity for a whole category (off, warn, error)").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (category, severity, _options, command) => {
3627
- const { rulesCategoryAction } = await import("./rules-lsAfRYRW.js");
3636
+ const { rulesCategoryAction } = await import("./rules-Cb5XoHlz.js");
3628
3637
  return rulesCategoryAction(category, severity, command.optsWithGlobals());
3629
3638
  });
3630
3639
  rules.command("ignore-tag <tag>").description("Skip a whole rule family by tag before linting (e.g. design)").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (tag, _options, command) => {
3631
- const { rulesIgnoreTagAction } = await import("./rules-lsAfRYRW.js");
3640
+ const { rulesIgnoreTagAction } = await import("./rules-Cb5XoHlz.js");
3632
3641
  return rulesIgnoreTagAction(tag, command.optsWithGlobals());
3633
3642
  });
3634
3643
  rules.command("unignore-tag <tag>").description("Stop ignoring a tag previously skipped via ignore-tag").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (tag, _options, command) => {
3635
- const { rulesUnignoreTagAction } = await import("./rules-lsAfRYRW.js");
3644
+ const { rulesUnignoreTagAction } = await import("./rules-Cb5XoHlz.js");
3636
3645
  return rulesUnignoreTagAction(tag, command.optsWithGlobals());
3637
3646
  });
3638
- program.command("experimental-tui [directory]", { hidden: true }).description("[experimental] interactive, scrollable scan report").option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addOption(new Option("--no-dead-code").hideHelp()).option("--no-supply-chain", "skip the dependency supply-chain scan").option("--score", "only print the numeric score (for scripts and CI)").option("--no-score", "skip the score API, the share URL, and crash reporting").option("--no-cache", "disable all scan caches for this run").option("--max-duration <seconds>", MAX_DURATION_OPTION_DESCRIPTION).option("-p, --project <names>", "scan specific workspace projects (comma-separated, or *)").option("-y, --yes", "skip the project prompt and scan every discovered project").action(async (directory = ".", _localOptions, command) => {
3639
- const { runScanCommand } = await import("./scan-CSS_HWO-.js");
3647
+ program.command("experimental-tui [directory]", { hidden: true }).description("[experimental] interactive, scrollable scan report").option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").option("--warning-exit-code <code>", "exit code for non-blocking warnings (2-255). Ignored with --blocking none or --score", parseWarningExitCode).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addOption(new Option("--no-dead-code").hideHelp()).option("--no-supply-chain", "skip the dependency supply-chain scan").option("--score", "only print the numeric score (for scripts and CI)").option("--no-score", "skip the score API, the share URL, and crash reporting").option("--no-cache", "disable all scan caches for this run").option("--max-duration <seconds>", MAX_DURATION_OPTION_DESCRIPTION).option("-p, --project <names>", "scan specific workspace projects (comma-separated, or *)").option("-y, --yes", "skip the project prompt and scan every discovered project").action(async (directory = ".", _localOptions, command) => {
3648
+ const { runScanCommand } = await import("./scan-BMNqmD4X.js");
3640
3649
  return runScanCommand({
3641
3650
  directory,
3642
3651
  flags: command.optsWithGlobals(),
@@ -3676,4 +3685,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
3676
3685
  export {};
3677
3686
 
3678
3687
  //# sourceMappingURL=cli.js.map
3679
- //# debugId=cc8f2e34-2b12-55f0-907a-f0131fd67226
3688
+ //# debugId=8ce9aa1f-0a85-514c-9759-6b1c0db96ace
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a2fb00c2-593b-5d58-b7fe-378efd853ad4")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4b4f33cb-e042-5208-8890-b431923be181")}catch(e){}}();
3
3
  import { createRequire } from "node:module";
4
4
  import * as fs$1 from "node:fs";
5
5
  import fs from "node:fs";
@@ -11,7 +11,7 @@ import os from "node:os";
11
11
  import crypto from "node:crypto";
12
12
  import { Worker } from "node:worker_threads";
13
13
  import * as net from "node:net";
14
- //#region ../core/dist/constants-E-ghW6VY.js
14
+ //#region ../core/dist/constants-C2xkPKhq.js
15
15
  const HTML_FILE_PATTERN = /\.html$/i;
16
16
  const SOURCE_FILE_PATTERN = /\.(?:astro|tsx?|jsx?|mts|mjs|[hH][tT][mM][lL])$/;
17
17
  const GENERATED_BUNDLE_FILE_PATTERN = /\.(iife|umd|global|min)\.m?js$/i;
@@ -32,6 +32,7 @@ const IGNORED_DIRECTORIES = new Set([
32
32
  ".angular",
33
33
  ".astro",
34
34
  ".cache",
35
+ ".cloudflare",
35
36
  ".contentlayer",
36
37
  ".direnv",
37
38
  ".docusaurus",
@@ -43,6 +44,7 @@ const IGNORED_DIRECTORIES = new Set([
43
44
  ".next",
44
45
  ".nuxt",
45
46
  ".nx",
47
+ ".open-next",
46
48
  ".output",
47
49
  ".parcel-cache",
48
50
  ".serverless",
@@ -425,7 +427,7 @@ const MAINTAINABILITY_CATEGORY = "Maintainability";
425
427
  //#region ../core/dist/react-compiler-detection-worker-protocol-Dp5LlrE8.js
426
428
  const isReactCompilerDetectionReply = (value) => typeof value === "object" && value !== null && "id" in value && typeof value.id === "number" && "hasReactCompiler" in value && (typeof value.hasReactCompiler === "boolean" || value.hasReactCompiler === null);
427
429
  //#endregion
428
- //#region ../core/dist/react-compiler-detection-client-fc698QTY.js
430
+ //#region ../core/dist/react-compiler-detection-client-DdqffphF.js
429
431
  const pendingOutputsByRequestKey = /* @__PURE__ */ new Map();
430
432
  const toRequestKey = (request) => [
431
433
  request.directory,
@@ -982,6 +984,7 @@ const METRIC = {
982
984
  projectPathSelected: "project.path_selected",
983
985
  projectConfigSelected: "project.config_selected",
984
986
  scanCompleted: "scan.completed",
987
+ scanWarningExitCodeConfigured: "scan.warning_exit_code.configured",
985
988
  scanDuration: "scan.duration",
986
989
  scanFeedbackDelay: "scan.feedback_delay",
987
990
  scanPhaseDuration: "scan.phase_duration",
@@ -1031,5 +1034,5 @@ const METRIC = {
1031
1034
  //#endregion
1032
1035
  export { warmReactCompilerDetection as $, OXLINT_WORKER_JOB_END_MARKER as $t, buildGitSourceListingRequest as A, TARGET_BLANK_BROWSER_SUPPORT as An, GITHUB_VIEWER_PERMISSION_TIMEOUT_MS as At, resolveGitCommand as B, MAINTAINABILITY_DUPLICATE_JSX_RULE as Bt, SENTRY_RELEASE_PREFIX as C, SUPPLY_CHAIN_CACHE_TTL_MS as Cn, ES_TARGET_YEAR_BY_NAME as Ct, TUI_REPORT_COMPACT_MAX_ROWS as D, SUPPLY_CHAIN_PLUGIN as Dn, GENERATED_BUNDLE_FILE_PATTERN as Dt, TRACKED_FILE_FLAGS_GIT_ARGUMENTS as E, SUPPLY_CHAIN_OVERLAP_TIMEOUT_MS as En, FILE_LINT_CACHE_MAX_FILE_COUNT as Et, lowerChildProcessPriority as F, VERCEL_NEXTJS_SECURITY_RELEASE_URL as Fn, HTML_FILE_PATTERN as Ft, resolvePluginPath as G, MINIFIED_SNIFF_BYTES as Gt, resolveOxlintThreadCount as H, MAINTAINABILITY_SOURCE_FILE_PATTERN as Ht, prefetchGitCommand as I, getCategoryImpact as In, IGNORED_DIRECTORIES as It, resolveTsConfigRelativePath as J, OXLINT_NODE_REQUIREMENT as Jt, resolveReactDoctorCacheDir as K, OCCURRENCE_MATCHED_CATEGORIES as Kt, prespawnOxlintWorkers as L, JSX_DUPLICATION_SOURCE_FILE_PATTERN as Lt, buildOxlintWorkerSpawnSpec as M, TELEMETRY_SHUTDOWN_TIMEOUT_MS as Mn, GIT_LS_FILES_MAX_BUFFER_BYTES as Mt, discardPrefetchedGitCommands as N, TSCONFIG_FILENAMES as Nn, GIT_SHOW_MAX_BUFFER_BYTES as Nt, TUI_REPORT_DETAIL_WIDTH_FRACTION as O, SUPPLY_CHAIN_RULE as On, GENERATED_SOURCE_DIRECTORY_PATTERN as Ot, killUnadoptedOxlintWorkers as P, TYPESCRIPT_DECLARATION_FILE_PATTERN as Pn, GIT_SOURCE_LISTING_ARGUMENTS as Pt, takeReactCompilerDetection as Q, OXLINT_SPLIT_TOTAL_BUDGET_MS as Qt, readSystemConcurrencyFacts as R, JSX_FILE_PATTERN as Rt, SENTRY_FLUSH_TIMEOUT_MS as S, SUPPLY_CHAIN_CACHE_SUBDIR as Sn, ENTERPRISE_CONTACT_URL as St, STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES as T, SUPPLY_CHAIN_IGNORED_PACKAGES as Tn, FILE_LINT_CACHE_FILENAME as Tt, resolveOxlintToolchainVersions as U, MAX_GLOB_PATTERN_LENGTH_CHARS as Ut, resolveOxlintBinary as V, MAINTAINABILITY_PLUGIN as Vt, resolveOxlintWorkerRuntime as W, MILLISECONDS_PER_SECOND as Wt, spawnOxlintWorkerProcess as X, OXLINT_OUTPUT_MAX_BYTES as Xt, setChildProcessRef as Y, OXLINT_OOM_RESCUE_BUDGET_MS as Yt, takePrespawnedOxlintWorker as Z, OXLINT_SPAWN_TIMEOUT_MS as Zt, SCAN_PREAMBLE_SKIP_FLAGS as _, SOURCE_FILE_PATTERN as _n, DIAGNOSTIC_CATEGORY_BUCKETS as _t, CACHE_DISABLED_VALUES as a, REACT_ROUTER_CAPABILITY_THRESHOLDS as an, AXIOM_METRICS_DATASET_HEADER as at, SCAN_RESULT_CACHE_MAX_HASHED_FILE_SIZE_BYTES as b, SPAWN_ARGS_MAX_LENGTH_CHARS_POSIX as bn, DOCS_URL as bt, HEAD_SHA_GIT_ARGUMENTS as c, ROOT_CAUSE_GROUPABLE_RULE_KEYS as cn, CANONICAL_DISCORD_URL as ct, METRIC_DISTRIBUTION_BOUNDARIES as d, SHARE_BASE_URL as dn, COMPILER_CLEANUP_BUCKET as dt, PROJECT_ANALYSIS_WORKER_MAX_OLD_SPACE_MB as en, ABORT_EXIT_CODES as et, MINIMUM_VTE_VERSION_FOR_HYPERLINKS as f, SIDECAR_LINT_CACHE_FILENAME as fn, COMPILER_CLEANUP_RULE_KEYS as ft, RUN_GIT_MAX_BUFFER_BYTES as g, SOCKET_PACKAGE_PAGE_BASE as gn, DEFAULT_BRANCH_CANDIDATES as gt, REPOSITORY_ROOT_GIT_ARGUMENTS as h, SOCKET_FREE_USER_AGENT as hn, CONFIG_SCHEMA_URL as ht, BASELINE_FILES_TEMP_DIR_PREFIX as i, REACT_BLOG_RSC_ADVISORY_URL as in, AXIOM_DEFAULT_DOMAIN as it, buildOxlintChildEnv as j, TELEMETRY_EXPORT_INTERVAL_MS as jn, GIT_CHECK_ATTR_MAX_BUFFER_BYTES as jt, WORKTREE_STATUS_GIT_ARGUMENTS as k, TAILWIND_POSTCSS7_COMPAT_ALIAS as kn, GITHUB_ACTIONS_SETUP_URL as kt, INTERNAL_ERROR_JSON_FALLBACK as l, SCANNED_DOT_DIRECTORIES as ln, CANONICAL_GITHUB_URL as lt, REACT_DOCTOR_CONFIG_PROJECT_NAME as m, SOCKET_FREE_PURL_API_BASE as mn, CONFIG_FINGERPRINT_FILENAMES as mt, AXIOM_METRICS_DATASET as n, PROJECT_ANALYSIS_WORKER_TIMEOUT_CEILING_MS as nn, APP_ONLY_RULE_KEYS as nt, CI_TRUST_COMPANIES as o, REACT_SERVER_DOM_PACKAGES as on, AXIOM_METRICS_PATH as ot, NANOSECONDS_PER_MILLISECOND as p, SKILL_NAME as pn, CONFIG_CACHE_TTL_MS as pt, resolveScanConcurrency as q, OXLINT_IGNORED_DECLARATION_DIAGNOSTIC_CODES as qt, AXIOM_TRACES_DATASET as r, PROJECT_ANALYSIS_WORKER_TIMEOUT_MS as rn, AXIOM_DATASET_HEADER as rt, GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS as s, RECOMMENDED_PNPM_MINIMUM_RELEASE_AGE_MINUTES as sn, AXIOM_TRACES_PATH as st, AXIOM_INGEST_TOKEN as t, PROJECT_ANALYSIS_WORKER_MEMORY_BUDGET_BYTES as tn, ADOPTABLE_LINT_CONFIG_FILENAMES as tt, METRIC as u, SCORE_API_URL as un, CI_URL as ut, SCAN_RESULT_CACHE_FILENAME as v, SPAWN_ARGS_MAX_LENGTH_CHARS as vn, DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS as vt, STAGED_FILES_TEMP_DIR_PREFIX as w, SUPPLY_CHAIN_CATEGORY as wn, FETCH_TIMEOUT_MS as wt, SENTRY_DSN as x, STAGED_FILES_PROJECT_CONFIG_FILENAMES as xn, DUPLICATE_JSX_WORKER_IDLE_TIMEOUT_MS as xt, SCAN_RESULT_CACHE_GIT_ARGUMENTS as y, SPAWN_ARGS_MAX_LENGTH_CHARS_DARWIN as yn, DOCS_RULES_BASE_URL as yt, resolveConfiguredScanConcurrency as z, MAINTAINABILITY_CATEGORY as zt };
1033
1036
 
1034
- //# sourceMappingURL=constants-DHn5rUeg.js.map
1035
- //# debugId=a2fb00c2-593b-5d58-b7fe-378efd853ad4
1037
+ //# sourceMappingURL=constants-ClqojoT2.js.map
1038
+ //# debugId=4b4f33cb-e042-5208-8890-b431923be181
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ec0f5177-2747-59db-8b39-27f1cc08b1ed")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="03cb31e4-5d3e-5024-841c-9d08f5fb53d3")}catch(e){}}();
3
3
  const GIT_CHECK_ATTR_MAX_BUFFER_BYTES = 50 * 1024 * 1024;
4
4
  const OXLINT_WORKER_JOB_END_MARKER = "__REACT_DOCTOR_OXLINT_JOB_END__";
5
5
  const REACT_DOCTOR_PLUGIN_RESET_HOOK_KEY = Symbol.for("react-doctor.reset-filesystem-caches");
@@ -20,4 +20,4 @@ const JSX_DUPLICATION_SOURCE_FILE_PATTERN = /\.[cm]?(?:jsx?|tsx)$/;
20
20
  export { MAX_GLOB_PATTERN_LENGTH_CHARS as a, GIT_CHECK_ATTR_MAX_BUFFER_BYTES as c, JSX_DUPLICATION_SOURCE_FILE_PATTERN as i, JSX_DUPLICATION_DEFAULT_MAX_SOURCE_FILES as n, OXLINT_WORKER_JOB_END_MARKER as o, JSX_DUPLICATION_DEFAULT_MAX_SOURCE_LENGTH_CHARS as r, REACT_DOCTOR_PLUGIN_RESET_HOOK_KEY as s, JSX_DUPLICATION_DEFAULT_MAX_JSX_NODES as t };
21
21
 
22
22
  //# sourceMappingURL=constants-DNh19qg9.js.map
23
- //# debugId=ec0f5177-2747-59db-8b39-27f1cc08b1ed
23
+ //# debugId=03cb31e4-5d3e-5024-841c-9d08f5fb53d3
@@ -1,6 +1,6 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c69ddf03-dd7a-5dcc-8ead-b1bf380ca496")}catch(e){}}();
3
- import { t as inspectAction } from "./inspect-CvENw7Ib.js";
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fe54649b-5307-5f83-a5c7-f93c7f163705")}catch(e){}}();
3
+ import { t as inspectAction } from "./inspect-DwCSMHsS.js";
4
4
  //#region src/cli/commands/design.ts
5
5
  const designAction = async (directory, flags) => inspectAction(directory, {
6
6
  ...flags,
@@ -10,5 +10,5 @@ const designAction = async (directory, flags) => inspectAction(directory, {
10
10
  //#endregion
11
11
  export { designAction };
12
12
 
13
- //# sourceMappingURL=design-tfgkvQeX.js.map
14
- //# debugId=c69ddf03-dd7a-5dcc-8ead-b1bf380ca496
13
+ //# sourceMappingURL=design-BeVEhCLv.js.map
14
+ //# debugId=fe54649b-5307-5f83-a5c7-f93c7f163705
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3fb1e6c0-870e-54f2-9dd3-ef90f8a0c9bf")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="dd62388e-7fa5-5466-9293-75c1091a30f7")}catch(e){}}();
3
3
  import { t as typescriptBinding } from "./_react-doctor_require-typescript-DXQDYeWK.js";
4
4
  import { t as unwrapTypescriptExpression } from "./unwrap-typescript-expression-CrEPQUWz.js";
5
5
  import { i as JSX_DUPLICATION_SOURCE_FILE_PATTERN } from "./constants-DNh19qg9.js";
@@ -80,7 +80,7 @@ const createJsxSourceReader = (input) => {
80
80
  const getTypescriptScriptKind = (fileName) => {
81
81
  if (fileName.endsWith(".tsx")) return typescriptBinding.ScriptKind.TSX;
82
82
  if (fileName.endsWith(".jsx")) return typescriptBinding.ScriptKind.JSX;
83
- if (fileName.endsWith(".ts")) return typescriptBinding.ScriptKind.TS;
83
+ if (/\.[cm]?ts$/.test(fileName)) return typescriptBinding.ScriptKind.TS;
84
84
  return typescriptBinding.ScriptKind.JS;
85
85
  };
86
86
  //#endregion
@@ -633,4 +633,4 @@ startDuplicateJsxWorker();
633
633
  export {};
634
634
 
635
635
  //# sourceMappingURL=duplicate-jsx-worker.js.map
636
- //# debugId=3fb1e6c0-870e-54f2-9dd3-ef90f8a0c9bf
636
+ //# debugId=dd62388e-7fa5-5466-9293-75c1091a30f7
@@ -1,9 +1,9 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0354bdfb-953e-54e2-b7b8-9f034aed87c3")}catch(e){}}();
3
- import { d as isJsonModeActive, m as writeJsonCancellationReport } from "./record-metric-B03OYFof.js";
4
- import { n as shutdownTelemetry, r as flushSentry } from "./telemetry-runtime-Dp_wDVEZ.js";
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4e7cbc28-f3e3-5214-a062-1bc45df21077")}catch(e){}}();
3
+ import { d as isJsonModeActive, m as writeJsonCancellationReport } from "./record-metric-C-qingN9.js";
4
+ import { n as shutdownTelemetry, r as flushSentry } from "./telemetry-runtime-UgvDG9lo.js";
5
5
  import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-CCTgal0O.js";
6
- import { n as buildFooterLinkLines, t as buildSectionDivider } from "./build-section-divider-jdDJ0_Vv.js";
6
+ import { n as buildFooterLinkLines, t as buildSectionDivider } from "./build-section-divider-B-0Npb8u.js";
7
7
  //#region src/cli/utils/active-tui-renderer.ts
8
8
  let activeTuiRenderer = null;
9
9
  const registerActiveTuiRenderer = (renderer) => {
@@ -50,5 +50,5 @@ const exitGracefully = () => {
50
50
  //#endregion
51
51
  export { registerActiveTuiRenderer as n, exitGracefully as t };
52
52
 
53
- //# sourceMappingURL=exit-gracefully-DZR14OKB.js.map
54
- //# debugId=0354bdfb-953e-54e2-b7b8-9f034aed87c3
53
+ //# sourceMappingURL=exit-gracefully-D2FYEGJS.js.map
54
+ //# debugId=4e7cbc28-f3e3-5214-a062-1bc45df21077