react-doctor 0.9.13-dev.fa72869 → 0.9.13-dev.fd64d26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_react-doctor_require-typescript-DnwIzXJn.js +7 -0
- package/dist/{active-scan-abort-registry-DwG6tSPy.js → active-scan-abort-registry-B72ASBUh.js} +3 -3
- package/dist/build-section-divider-DqBNBmQx.js +80 -0
- package/dist/{ci-DJX0d-zr.js → ci-C9VIuxer.js} +12 -12
- package/dist/cli.js +25 -26
- package/dist/constants-CKOk_Fa9.js +23 -0
- package/dist/{design-16noMOyv.js → design-Bi2Vyiox.js} +4 -4
- package/dist/{devtools-CC2PAZ85.js → devtools-DOdrAPkZ.js} +3 -3
- package/dist/duplicate-jsx-worker.d.ts +1 -0
- package/dist/duplicate-jsx-worker.js +636 -0
- package/dist/{exit-gracefully-CmnLSIyy.js → exit-gracefully-BECsBTnW.js} +7 -7
- package/dist/{get-east-asian-width-Bv2TD3Xj.js → get-east-asian-width-CM5BOEC-.js} +3 -3
- package/dist/{handle-error-BoWVnsAX.js → handle-error-Bpa6UIOi.js} +5 -5
- package/dist/index.js +2329 -1616
- package/dist/{inspect-CQjmfc6o.js → inspect-CIlLTl74.js} +25 -21
- package/dist/{install-BI45HWXE.js → install-CWRhGRwA.js} +9 -9
- package/dist/{install-doctor-script-Czibd55T.js → install-doctor-script-4bc7a9Xa.js} +5 -5
- package/dist/{install-github-workflow-DAW5HCoZ.js → install-github-workflow-CApF2UUE.js} +5 -5
- package/dist/{install-react-doctor-0EPCiZSM.js → install-react-doctor-5JVhuBwj.js} +8 -8
- package/dist/{jsx-runtime-CpHGdrl2.js → jsx-runtime-BiIKqx7W.js} +7 -7
- package/dist/oxlint-worker.d.ts +1 -0
- package/dist/oxlint-worker.js +135 -0
- package/dist/{print-branded-header-D99_D1jG.js → print-branded-header-I68eir6S.js} +4 -4
- package/dist/project-analysis-worker.js +452 -469
- package/dist/{prompt-runtime-scan-url-BXbCor1e.js → prompt-runtime-scan-url-DTURCZJx.js} +5 -5
- package/dist/{read-object-file-B74hRgMl.js → read-object-file-D_so7aRw.js} +4 -4
- package/dist/{record-metric-BcJN2xOB.js → record-metric-Cs3byi4j.js} +1823 -1059
- package/dist/{report-error-OirqwZb5.js → report-error-C6cwK5ek.js} +7 -7
- package/dist/{report-workflow-result-C4EMosul.js → report-workflow-result-C__-WR2y.js} +5 -5
- package/dist/{resolve-scope-CKnF1u7B.js → resolve-scope-Ded7Rst2.js} +6 -6
- package/dist/{rules-D-04wsFx.js → rules-zE-OOAQv.js} +6 -6
- package/dist/{run-scan-app-hjGd9Nt9.js → run-scan-app-vOe1geDj.js} +28 -22
- package/dist/{runtime-scan-5ucpiIRF.js → runtime-scan-BpV7bw6k.js} +14 -14
- package/dist/{sanitize-runtime-url-KJQEVCa5.js → sanitize-runtime-url-Bz3numjM.js} +5 -5
- package/dist/{scan-Busv3qJ_.js → scan-lvKKvrda.js} +9 -9
- package/dist/{semver-DFtnEmN-.js → semver-DlmXks31.js} +3 -3
- package/dist/{should-fail-scan-gate-D1mS86Ff.js → should-fail-scan-gate-Chyg9-UY.js} +116 -72
- package/dist/{should-skip-prompts-DkasjzpQ.js → should-skip-prompts-DHnGjhIu.js} +4 -4
- package/dist/{should-use-tui-B5bj9qhm.js → should-use-tui-DXeiBj0r.js} +4 -4
- package/dist/{telemetry-runtime-DFNjke5Y.js → telemetry-runtime-C4xTDemQ.js} +153 -5
- package/dist/unwrap-typescript-expression-CbO_6kmC.js +14 -0
- package/dist/{version-DKEaWdQZ.js → version-BEYXWT3R.js} +4 -4
- package/dist/{why-BP622crq.js → why-Bd-soKyA.js} +4 -4
- package/dist/{with-run-span-B9bjgvks.js → with-run-span-B6t6uEzq.js} +5 -5
- package/package.json +4 -4
- package/dist/build-section-divider-DPs8DOje.js +0 -216
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
//#region \0react-doctor:require-typescript
|
|
3
|
+
var _react_doctor_require_typescript_default = createRequire(import.meta.url)("typescript");
|
|
4
|
+
//#endregion
|
|
5
|
+
export { _react_doctor_require_typescript_default as t };
|
|
6
|
+
!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]="ddeb2d92-7bfa-5c33-a47c-43e79ea45d45")}catch(e){}}();
|
|
7
|
+
//# debugId=ddeb2d92-7bfa-5c33-a47c-43e79ea45d45
|
package/dist/{active-scan-abort-registry-DwG6tSPy.js → active-scan-abort-registry-B72ASBUh.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/cli/utils/active-scan-abort-registry.ts
|
|
2
2
|
|
|
3
|
-
!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]="
|
|
3
|
+
!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]="2bb9a1df-68e7-54d6-b02d-0498c8fb9707")}catch(e){}}();
|
|
4
4
|
const activeScanAbortControllers = /* @__PURE__ */ new Set();
|
|
5
5
|
const activeScanCleanups = /* @__PURE__ */ new Set();
|
|
6
6
|
const activeScanAbortRegistry = {
|
|
@@ -24,5 +24,5 @@ const activeScanAbortRegistry = {
|
|
|
24
24
|
//#endregion
|
|
25
25
|
export { activeScanAbortRegistry as t };
|
|
26
26
|
|
|
27
|
-
//# sourceMappingURL=active-scan-abort-registry-
|
|
28
|
-
//# debugId=
|
|
27
|
+
//# sourceMappingURL=active-scan-abort-registry-B72ASBUh.js.map
|
|
28
|
+
//# debugId=2bb9a1df-68e7-54d6-b02d-0498c8fb9707
|
|
@@ -0,0 +1,80 @@
|
|
|
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]="abaaca0c-71fe-555c-8413-e58c50df83e8")}catch(e){}}();
|
|
3
|
+
import { Jt as highlighter, hr as DOCS_URL, lr as CANONICAL_GITHUB_URL } from "./record-metric-Cs3byi4j.js";
|
|
4
|
+
//#region src/cli/utils/resolve-measure-width.ts
|
|
5
|
+
const resolveClampedWidth = (input) => {
|
|
6
|
+
const terminalColumns = process.stdout.columns;
|
|
7
|
+
if (!terminalColumns || terminalColumns <= 0) return input.fullWidth;
|
|
8
|
+
const availableColumns = terminalColumns - input.reservedColumns;
|
|
9
|
+
return Math.max(input.minWidth, Math.min(input.fullWidth, availableColumns));
|
|
10
|
+
};
|
|
11
|
+
const resolveMeasureWidth = (reservedColumns = 0) => resolveClampedWidth({
|
|
12
|
+
reservedColumns,
|
|
13
|
+
fullWidth: 60,
|
|
14
|
+
minWidth: 24
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/cli/utils/wrap-indented-text.ts
|
|
18
|
+
const wrapLine = (lineText, width, breakLongWords) => {
|
|
19
|
+
if (lineText.length <= width) return [lineText];
|
|
20
|
+
const wrappedLines = [];
|
|
21
|
+
let remainingText = lineText.trim();
|
|
22
|
+
while (remainingText.length > width) {
|
|
23
|
+
const candidateText = remainingText.slice(0, width);
|
|
24
|
+
const breakIndex = candidateText.lastIndexOf(" ");
|
|
25
|
+
if (breakIndex <= 0) {
|
|
26
|
+
if (breakLongWords) {
|
|
27
|
+
wrappedLines.push(candidateText);
|
|
28
|
+
remainingText = remainingText.slice(width).trimStart();
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
const nextSpace = remainingText.indexOf(" ");
|
|
32
|
+
if (nextSpace === -1) break;
|
|
33
|
+
wrappedLines.push(remainingText.slice(0, nextSpace));
|
|
34
|
+
remainingText = remainingText.slice(nextSpace + 1).trimStart();
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
wrappedLines.push(remainingText.slice(0, breakIndex));
|
|
38
|
+
remainingText = remainingText.slice(breakIndex + 1).trimStart();
|
|
39
|
+
}
|
|
40
|
+
if (remainingText.length > 0) wrappedLines.push(remainingText);
|
|
41
|
+
return wrappedLines;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Greedy word-wrap to a character width, returning one string per line
|
|
45
|
+
* (no indentation applied). Preserves existing `\n` boundaries.
|
|
46
|
+
*/
|
|
47
|
+
const wrapTextToWidth = (text, width, options = {}) => {
|
|
48
|
+
if (width <= 0) return text.split("\n");
|
|
49
|
+
const breakLongWords = options.breakLongWords ?? true;
|
|
50
|
+
return text.split("\n").flatMap((lineText) => wrapLine(lineText, width, breakLongWords));
|
|
51
|
+
};
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/cli/utils/build-footer-description-lines.ts
|
|
54
|
+
const FOOTER_DESCRIPTION_INDENT = " ";
|
|
55
|
+
const buildFooterDescriptionLines = (description) => {
|
|
56
|
+
return wrapTextToWidth(description, resolveMeasureWidth(2)).map((line) => highlighter.dim(`${FOOTER_DESCRIPTION_INDENT}${line}`));
|
|
57
|
+
};
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/cli/utils/build-footer-link-lines.ts
|
|
60
|
+
const buildFooterLinkLines = ({ shareUrl }) => [
|
|
61
|
+
...shareUrl === null ? [] : [
|
|
62
|
+
` ${highlighter.bold("Share:")} ${highlighter.info(shareUrl)}`,
|
|
63
|
+
...buildFooterDescriptionLines("Tell others how you did on socials"),
|
|
64
|
+
""
|
|
65
|
+
],
|
|
66
|
+
` ${highlighter.bold("Docs:")} ${highlighter.info(DOCS_URL)}`,
|
|
67
|
+
...buildFooterDescriptionLines("Learn more about fixing issues, setting up CI/CD, and configuring rules with a config file"),
|
|
68
|
+
"",
|
|
69
|
+
` ${highlighter.bold("GitHub:")} ${highlighter.info(CANONICAL_GITHUB_URL)}`,
|
|
70
|
+
...buildFooterDescriptionLines("Report issues and star the repository!")
|
|
71
|
+
];
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/cli/utils/build-section-divider.ts
|
|
74
|
+
const DIVIDER_INDENT = " ";
|
|
75
|
+
const buildSectionDivider = () => highlighter.dim(`${DIVIDER_INDENT}${"─".repeat(resolveMeasureWidth(2))}`);
|
|
76
|
+
//#endregion
|
|
77
|
+
export { buildFooterLinkLines as n, buildSectionDivider as t };
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=build-section-divider-DqBNBmQx.js.map
|
|
80
|
+
//# debugId=abaaca0c-71fe-555c-8413-e58c50df83e8
|
|
@@ -1,15 +1,15 @@
|
|
|
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]="
|
|
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]="d5e3f613-aa2e-5b53-8923-a2be2a51c004")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
7
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
8
|
-
import { M as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-
|
|
9
|
-
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-
|
|
10
|
-
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-
|
|
11
|
-
import { t as shouldSkipPrompts } from "./should-skip-prompts-
|
|
12
|
-
import { t as printBrandedHeader } from "./print-branded-header-
|
|
4
|
+
import { Jt as highlighter, T as METRIC, Vn as runSync, _r as GITHUB_ACTIONS_SETUP_URL, t as recordCount, ur as CI_URL } from "./record-metric-Cs3byi4j.js";
|
|
5
|
+
import { o as isExpectedUserError } from "./telemetry-runtime-C4xTDemQ.js";
|
|
6
|
+
import { n as handleUserError, t as handleError } from "./handle-error-Bpa6UIOi.js";
|
|
7
|
+
import { t as reportErrorToSentry } from "./report-error-C6cwK5ek.js";
|
|
8
|
+
import { M as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-4bc7a9Xa.js";
|
|
9
|
+
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-CApF2UUE.js";
|
|
10
|
+
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-Ded7Rst2.js";
|
|
11
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-DHnGjhIu.js";
|
|
12
|
+
import { t as printBrandedHeader } from "./print-branded-header-I68eir6S.js";
|
|
13
13
|
import * as path$1 from "node:path";
|
|
14
14
|
import * as fs$1 from "node:fs";
|
|
15
15
|
//#region src/cli/utils/ci/ci-provider.ts
|
|
@@ -7498,5 +7498,5 @@ const ciConfigAction = (options) => runCiCommand("config", runCiConfig, options)
|
|
|
7498
7498
|
//#endregion
|
|
7499
7499
|
export { ciConfigAction, ciInstallAction, ciUpgradeAction };
|
|
7500
7500
|
|
|
7501
|
-
//# sourceMappingURL=ci-
|
|
7502
|
-
//# debugId=
|
|
7501
|
+
//# sourceMappingURL=ci-C9VIuxer.js.map
|
|
7502
|
+
//# debugId=d5e3f613-aa2e-5b53-8923-a2be2a51c004
|
package/dist/cli.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
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]="
|
|
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]="60c18426-379f-553e-b91c-20dc13884c36")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import {
|
|
5
|
-
import { n as shutdownTelemetry,
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { n as handleUserError, t as handleError } from "./handle-error-BoWVnsAX.js";
|
|
4
|
+
import { Ft as filterSourceFiles, H as isDebugFlagEnabled, Jt as highlighter, Xt as isPathInsideDirectory, _ as VERSION, d as isJsonModeActive, h as writeJsonErrorReport, i as isTelemetryEnabled, lr as CANONICAL_GITHUB_URL, rr as isFile, tr as isDirectory, ur as CI_URL, vn as setColorEnabled, z as CliInputError } from "./record-metric-Cs3byi4j.js";
|
|
5
|
+
import { a as initializeSentry, n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-C4xTDemQ.js";
|
|
6
|
+
import { t as exitGracefully } from "./exit-gracefully-BECsBTnW.js";
|
|
7
|
+
import { n as handleUserError, t as handleError } from "./handle-error-Bpa6UIOi.js";
|
|
9
8
|
import { n as getLastRunTraceId } from "./active-run-trace-dlIZeEvb.js";
|
|
10
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
9
|
+
import { t as reportErrorToSentry } from "./report-error-C6cwK5ek.js";
|
|
11
10
|
import { t as toForwardSlashes } from "./path-format-DnHpmJwG.js";
|
|
12
11
|
import { t as unrefStdin } from "./unref-stdin-SK3WfwxS.js";
|
|
13
12
|
import { execFileSync } from "node:child_process";
|
|
@@ -3557,7 +3556,7 @@ ${highlighter.dim("Learn more:")}
|
|
|
3557
3556
|
const collectCategoryOption = (value, previousValues) => [...previousValues ?? [], value];
|
|
3558
3557
|
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("--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);
|
|
3559
3558
|
program.action(async (positionalPaths = [], flags) => {
|
|
3560
|
-
const { runScanCommand } = await import("./scan-
|
|
3559
|
+
const { runScanCommand } = await import("./scan-lvKKvrda.js");
|
|
3561
3560
|
return runScanCommand({
|
|
3562
3561
|
...resolvePositionalScanInput(positionalPaths),
|
|
3563
3562
|
flags,
|
|
@@ -3565,75 +3564,75 @@ program.action(async (positionalPaths = [], flags) => {
|
|
|
3565
3564
|
});
|
|
3566
3565
|
});
|
|
3567
3566
|
program.command("design [directory]").description("Run only the focused UI design diagnostics").addHelpText("after", renderDesignHelpEpilog).action(async (directory, _options, command) => {
|
|
3568
|
-
const { designAction } = await import("./design-
|
|
3567
|
+
const { designAction } = await import("./design-Bi2Vyiox.js");
|
|
3569
3568
|
return designAction(directory ?? ".", command.optsWithGlobals());
|
|
3570
3569
|
});
|
|
3571
3570
|
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) => {
|
|
3572
|
-
const { runtimeScanAction } = await import("./runtime-scan-
|
|
3571
|
+
const { runtimeScanAction } = await import("./runtime-scan-BpV7bw6k.js");
|
|
3573
3572
|
return runtimeScanAction(url, options);
|
|
3574
3573
|
});
|
|
3575
3574
|
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) => {
|
|
3576
|
-
const { whyAction } = await import("./why-
|
|
3575
|
+
const { whyAction } = await import("./why-Bd-soKyA.js");
|
|
3577
3576
|
return whyAction(location, options);
|
|
3578
3577
|
});
|
|
3579
3578
|
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) => {
|
|
3580
|
-
const { installAction } = await import("./install-
|
|
3579
|
+
const { installAction } = await import("./install-CWRhGRwA.js");
|
|
3581
3580
|
return installAction(options, command);
|
|
3582
3581
|
});
|
|
3583
3582
|
const providerOption = ["--provider <name>", "ci provider: github-actions or gitlab-ci (auto-detected by default)"];
|
|
3584
3583
|
const prOption = ["--pr", "open a pull request with the change instead of writing it to the working tree"];
|
|
3585
3584
|
const ci = program.command("ci").description("Set up, upgrade, and configure React Doctor in your CI");
|
|
3586
3585
|
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) => {
|
|
3587
|
-
const { ciInstallAction } = await import("./ci-
|
|
3586
|
+
const { ciInstallAction } = await import("./ci-C9VIuxer.js");
|
|
3588
3587
|
return ciInstallAction(command.optsWithGlobals());
|
|
3589
3588
|
});
|
|
3590
3589
|
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) => {
|
|
3591
|
-
const { ciConfigAction } = await import("./ci-
|
|
3590
|
+
const { ciConfigAction } = await import("./ci-C9VIuxer.js");
|
|
3592
3591
|
return ciConfigAction(command.optsWithGlobals());
|
|
3593
3592
|
});
|
|
3594
3593
|
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) => {
|
|
3595
|
-
const { ciUpgradeAction } = await import("./ci-
|
|
3594
|
+
const { ciUpgradeAction } = await import("./ci-C9VIuxer.js");
|
|
3596
3595
|
return ciUpgradeAction(command.optsWithGlobals());
|
|
3597
3596
|
});
|
|
3598
3597
|
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 () => {
|
|
3599
|
-
const { versionAction } = await import("./version-
|
|
3598
|
+
const { versionAction } = await import("./version-BEYXWT3R.js");
|
|
3600
3599
|
return versionAction();
|
|
3601
3600
|
});
|
|
3602
3601
|
const rules = program.command("rules").description("List, explain, and configure which React Doctor rules run");
|
|
3603
3602
|
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) => {
|
|
3604
|
-
const { rulesListAction } = await import("./rules-
|
|
3603
|
+
const { rulesListAction } = await import("./rules-zE-OOAQv.js");
|
|
3605
3604
|
return rulesListAction(command.optsWithGlobals());
|
|
3606
3605
|
});
|
|
3607
3606
|
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) => {
|
|
3608
|
-
const { rulesExplainAction } = await import("./rules-
|
|
3607
|
+
const { rulesExplainAction } = await import("./rules-zE-OOAQv.js");
|
|
3609
3608
|
return rulesExplainAction(rule, command.optsWithGlobals());
|
|
3610
3609
|
});
|
|
3611
3610
|
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) => {
|
|
3612
|
-
const { rulesSetAction } = await import("./rules-
|
|
3611
|
+
const { rulesSetAction } = await import("./rules-zE-OOAQv.js");
|
|
3613
3612
|
return rulesSetAction(rule, severity, command.optsWithGlobals());
|
|
3614
3613
|
});
|
|
3615
3614
|
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) => {
|
|
3616
|
-
const { rulesEnableAction } = await import("./rules-
|
|
3615
|
+
const { rulesEnableAction } = await import("./rules-zE-OOAQv.js");
|
|
3617
3616
|
return rulesEnableAction(rule, command.optsWithGlobals());
|
|
3618
3617
|
});
|
|
3619
3618
|
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) => {
|
|
3620
|
-
const { rulesDisableAction } = await import("./rules-
|
|
3619
|
+
const { rulesDisableAction } = await import("./rules-zE-OOAQv.js");
|
|
3621
3620
|
return rulesDisableAction(rule, command.optsWithGlobals());
|
|
3622
3621
|
});
|
|
3623
3622
|
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) => {
|
|
3624
|
-
const { rulesCategoryAction } = await import("./rules-
|
|
3623
|
+
const { rulesCategoryAction } = await import("./rules-zE-OOAQv.js");
|
|
3625
3624
|
return rulesCategoryAction(category, severity, command.optsWithGlobals());
|
|
3626
3625
|
});
|
|
3627
3626
|
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) => {
|
|
3628
|
-
const { rulesIgnoreTagAction } = await import("./rules-
|
|
3627
|
+
const { rulesIgnoreTagAction } = await import("./rules-zE-OOAQv.js");
|
|
3629
3628
|
return rulesIgnoreTagAction(tag, command.optsWithGlobals());
|
|
3630
3629
|
});
|
|
3631
3630
|
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) => {
|
|
3632
|
-
const { rulesUnignoreTagAction } = await import("./rules-
|
|
3631
|
+
const { rulesUnignoreTagAction } = await import("./rules-zE-OOAQv.js");
|
|
3633
3632
|
return rulesUnignoreTagAction(tag, command.optsWithGlobals());
|
|
3634
3633
|
});
|
|
3635
3634
|
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) => {
|
|
3636
|
-
const { runScanCommand } = await import("./scan-
|
|
3635
|
+
const { runScanCommand } = await import("./scan-lvKKvrda.js");
|
|
3637
3636
|
return runScanCommand({
|
|
3638
3637
|
directory,
|
|
3639
3638
|
flags: command.optsWithGlobals(),
|
|
@@ -3673,4 +3672,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
3673
3672
|
export {};
|
|
3674
3673
|
|
|
3675
3674
|
//# sourceMappingURL=cli.js.map
|
|
3676
|
-
//# debugId=
|
|
3675
|
+
//# debugId=60c18426-379f-553e-b91c-20dc13884c36
|
|
@@ -0,0 +1,23 @@
|
|
|
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]="c45a53d9-69ae-5b9b-ba0a-877e3a50c6c1")}catch(e){}}();
|
|
3
|
+
const GIT_CHECK_ATTR_MAX_BUFFER_BYTES = 50 * 1024 * 1024;
|
|
4
|
+
const OXLINT_WORKER_JOB_END_MARKER = "__REACT_DOCTOR_OXLINT_JOB_END__";
|
|
5
|
+
const REACT_DOCTOR_PLUGIN_RESET_HOOK_KEY = Symbol.for("react-doctor.reset-filesystem-caches");
|
|
6
|
+
new Map(Object.entries({
|
|
7
|
+
Security: "An attacker can read user data, act as your users, or run code you never shipped.",
|
|
8
|
+
Bugs: "Real users hit crashes, wrong output, or state that silently corrupts.",
|
|
9
|
+
Performance: "Users feel extra latency and wasted renders on every interaction.",
|
|
10
|
+
Accessibility: "Users on screen readers, keyboards, or assistive tech get locked out.",
|
|
11
|
+
Maintainability: "Every future change gets slower and riskier to make."
|
|
12
|
+
}));
|
|
13
|
+
const MAX_GLOB_PATTERN_LENGTH_CHARS = 1024;
|
|
14
|
+
process.env.REACT_DOCTOR_CORE_VERSION;
|
|
15
|
+
const JSX_DUPLICATION_DEFAULT_MAX_SOURCE_FILES = 5e3;
|
|
16
|
+
const JSX_DUPLICATION_DEFAULT_MAX_SOURCE_LENGTH_CHARS = 1e6;
|
|
17
|
+
const JSX_DUPLICATION_DEFAULT_MAX_JSX_NODES = 5e4;
|
|
18
|
+
const JSX_DUPLICATION_SOURCE_FILE_PATTERN = /\.[cm]?(?:jsx?|tsx)$/;
|
|
19
|
+
//#endregion
|
|
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
|
+
|
|
22
|
+
//# sourceMappingURL=constants-CKOk_Fa9.js.map
|
|
23
|
+
//# debugId=c45a53d9-69ae-5b9b-ba0a-877e3a50c6c1
|
|
@@ -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]="
|
|
3
|
-
import { t as inspectAction } from "./inspect-
|
|
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]="d3636872-ac70-5889-b850-00cdd0c41f71")}catch(e){}}();
|
|
3
|
+
import { t as inspectAction } from "./inspect-CIlLTl74.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-
|
|
14
|
-
//# debugId=
|
|
13
|
+
//# sourceMappingURL=design-Bi2Vyiox.js.map
|
|
14
|
+
//# debugId=d3636872-ac70-5889-b850-00cdd0c41f71
|
|
@@ -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]="
|
|
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]="cecca582-ed22-56ec-9778-25ac18e5f42d")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
4
|
//#region ../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/constants.js
|
|
5
5
|
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -16999,5 +16999,5 @@ if (await isDevToolsReachable()) {
|
|
|
16999
16999
|
//#endregion
|
|
17000
17000
|
export {};
|
|
17001
17001
|
|
|
17002
|
-
//# sourceMappingURL=devtools-
|
|
17003
|
-
//# debugId=
|
|
17002
|
+
//# sourceMappingURL=devtools-DOdrAPkZ.js.map
|
|
17003
|
+
//# debugId=cecca582-ed22-56ec-9778-25ac18e5f42d
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|