react-doctor 0.9.14 → 0.9.15-dev.23d6160
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/README.md +3 -0
- package/dist/_react-doctor_require-typescript-DXQDYeWK.js +16 -0
- package/dist/{active-run-trace-dlIZeEvb.js → active-run-trace-Dewycxda.js} +3 -3
- package/dist/{active-scan-abort-registry-B72ASBUh.js → active-scan-abort-registry-CCTgal0O.js} +3 -3
- package/dist/{build-section-divider-8DpL5BjN.js → build-section-divider-Bt7znRi8.js} +5 -4
- package/dist/{ci-DH_jkNS4.js → ci-vktx9bIK.js} +14 -13
- package/dist/cli.js +32 -29
- package/dist/constants-DJ3RtEMu.js +1035 -0
- package/dist/{constants-CKOk_Fa9.js → constants-DNh19qg9.js} +3 -3
- package/dist/{design-DR72z3tB.js → design-CH3L5hSZ.js} +4 -4
- package/dist/{devtools-DOdrAPkZ.js → devtools-D20sefkm.js} +3 -3
- package/dist/duplicate-jsx-worker.js +62 -62
- package/dist/{exit-gracefully-BP0lJPao.js → exit-gracefully-Y5XyTvxu.js} +7 -7
- package/dist/fs-utils-C88IbqFa.js +45 -0
- package/dist/{get-east-asian-width-CM5BOEC-.js → get-east-asian-width-DRPy7dqz.js} +4 -4
- package/dist/{handle-error-BO7AUOeO.js → handle-error-8NlzFVoW.js} +6 -5
- package/dist/index.d.ts +8511 -8509
- package/dist/index.js +12734 -12338
- package/dist/{inspect-CtwjUwiF.js → inspect-Cs2Ojloa.js} +28 -21
- package/dist/{install-DAwHDunN.js → install-C4JkqZoO.js} +10 -9
- package/dist/{install-doctor-script-DousNjwa.js → install-doctor-script-Dr4O5HID.js} +17 -8
- package/dist/{install-github-workflow-DNfyCbSd.js → install-github-workflow-Dtf07ISQ.js} +10 -10
- package/dist/{install-react-doctor-CofgPrzS.js → install-react-doctor-Bi_Dav6m.js} +15 -11
- package/dist/is-cache-globally-disabled-De19063F.js +10 -0
- package/dist/{jsx-runtime-Dv_yWxfg.js → jsx-runtime-CND_0px2.js} +11 -10
- package/dist/oxlint-worker.js +95 -5
- package/dist/{path-format-DnHpmJwG.js → path-format-By20mo8A.js} +3 -3
- package/dist/{print-branded-header-CFoO5ZHN.js → print-branded-header-DqaKyGKm.js} +4 -4
- package/dist/project-analysis-worker.js +459 -461
- package/dist/{prompt-runtime-scan-url-9tmVyRA2.js → prompt-runtime-scan-url-DiI3_zIx.js} +6 -6
- package/dist/react-compiler-detection-worker.d.ts +1 -0
- package/dist/react-compiler-detection-worker.js +1029 -0
- package/dist/{read-object-file-C8gGTrwo.js → read-object-file-DBJkVOGK.js} +4 -4
- package/dist/{record-metric-DMuxA69u.js → record-metric-C-ZZzzDc.js} +12589 -13129
- package/dist/{report-error-DynYEdrW.js → report-error-_C-eJJHZ.js} +7 -6
- package/dist/{report-workflow-result-C0nwk5Eq.js → report-workflow-result-BA_xTdWY.js} +24 -11
- package/dist/{resolve-scope-CtDh9FtN.js → resolve-scope-Cl4BiTkm.js} +7 -7
- package/dist/{rules-Dtp6I51W.js → rules-DAQXfBXb.js} +8 -7
- package/dist/{run-scan-app-DTjrGFyP.js → run-scan-app-CN5nwdB-.js} +12 -11
- package/dist/{runtime-scan-DylzMW6d.js → runtime-scan-DFdypOyE.js} +13 -12
- package/dist/{sanitize-runtime-url-CtosBgav.js → sanitize-runtime-url-yCL8ZAFd.js} +4 -4
- package/dist/{scan-i9quJrxG.js → scan-C6U_DFdI.js} +10 -9
- package/dist/{semver-DlmXks31.js → semver-BZIuy1gP.js} +3 -3
- package/dist/{should-fail-scan-gate-uW8_hnTc.js → should-fail-scan-gate-2mIY6wHj.js} +1848 -1825
- package/dist/{should-skip-prompts-fmi7PPp5.js → should-skip-prompts-CuyyYvRd.js} +4 -4
- package/dist/{should-use-tui-DaLPPhMi.js → should-use-tui-CbbIdX9b.js} +4 -4
- package/dist/start-scan-preamble-DVhXIPc0.d.ts +1 -0
- package/dist/start-scan-preamble-DZknzhHU.js +68 -0
- package/dist/start-scan-preamble.d.ts +1 -0
- package/dist/start-scan-preamble.js +4 -0
- package/dist/{telemetry-runtime-CxBC0gEj.js → telemetry-runtime-DLq3FDzI.js} +7 -6
- package/dist/{unref-stdin-SK3WfwxS.js → unref-stdin-D-NZBFpg.js} +3 -3
- package/dist/unwrap-typescript-expression-CrEPQUWz.js +14 -0
- package/dist/{version-Bti3M8BN.js → version-DO7dtT21.js} +5 -4
- package/dist/{why-dcQaGoJz.js → why-uxPDWtZO.js} +4 -4
- package/dist/{with-run-span-Lynvloyt.js → with-run-span-BCopjALe.js} +7 -6
- package/package.json +7 -5
- package/dist/_react-doctor_require-typescript-DnwIzXJn.js +0 -7
- package/dist/unwrap-typescript-expression-CbO_6kmC.js +0 -14
package/README.md
CHANGED
|
@@ -59,6 +59,9 @@ This adds the workflow, scans every pull request, and posts a summary comment. C
|
|
|
59
59
|
|
|
60
60
|
You can configure which rules to run and how to run them in `doctor.config.ts`.
|
|
61
61
|
|
|
62
|
+
The pnpm hardening check is off by default. To enable it, set
|
|
63
|
+
`rules: { "react-doctor/require-pnpm-hardening": "warn" }` in your config.
|
|
64
|
+
|
|
62
65
|
[Learn more →](https://react.doctor/docs/configuration/config-files)
|
|
63
66
|
|
|
64
67
|
## Runtime performance traces
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
//#region \0react-doctor:require-typescript
|
|
3
|
+
const requireTypescript = createRequire(import.meta.url);
|
|
4
|
+
const loadTypescript = () => {
|
|
5
|
+
const realModule = requireTypescript("typescript");
|
|
6
|
+
typescriptBinding = realModule;
|
|
7
|
+
return realModule;
|
|
8
|
+
};
|
|
9
|
+
let typescriptBinding = new Proxy({}, {
|
|
10
|
+
get: (_target, key) => Reflect.get(loadTypescript(), key),
|
|
11
|
+
has: (_target, key) => Reflect.has(loadTypescript(), key)
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { typescriptBinding as t };
|
|
15
|
+
!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]="ad041add-451a-54d8-9d3a-b264e28ea9a8")}catch(e){}}();
|
|
16
|
+
//# debugId=ad041add-451a-54d8-9d3a-b264e28ea9a8
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/cli/utils/active-run-trace.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]="48d55113-5c1a-5bd6-9947-ff2116274782")}catch(e){}}();
|
|
4
4
|
let activeRunTrace = null;
|
|
5
5
|
const setActiveRunTrace = (trace) => {
|
|
6
6
|
activeRunTrace = trace;
|
|
@@ -14,5 +14,5 @@ const getLastRunTraceId = () => lastRunTraceId;
|
|
|
14
14
|
//#endregion
|
|
15
15
|
export { setActiveRunTrace as i, getLastRunTraceId as n, recordRunTraceId as r, getActiveRunTrace as t };
|
|
16
16
|
|
|
17
|
-
//# sourceMappingURL=active-run-trace-
|
|
18
|
-
//# debugId=
|
|
17
|
+
//# sourceMappingURL=active-run-trace-Dewycxda.js.map
|
|
18
|
+
//# debugId=48d55113-5c1a-5bd6-9947-ff2116274782
|
package/dist/{active-scan-abort-registry-B72ASBUh.js → active-scan-abort-registry-CCTgal0O.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]="e0d0ca7d-c392-5d1c-a559-9a81595ca671")}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-CCTgal0O.js.map
|
|
28
|
+
//# debugId=e0d0ca7d-c392-5d1c-a559-9a81595ca671
|
|
@@ -1,6 +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]="
|
|
3
|
-
import {
|
|
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]="761f9501-2abb-5d73-b3a5-7cfbb41e2b90")}catch(e){}}();
|
|
3
|
+
import { bt as DOCS_URL, lt as CANONICAL_GITHUB_URL } from "./constants-DJ3RtEMu.js";
|
|
4
|
+
import { Ot as highlighter } from "./record-metric-C-ZZzzDc.js";
|
|
4
5
|
//#region src/cli/utils/resolve-measure-width.ts
|
|
5
6
|
const resolveClampedWidth = (input) => {
|
|
6
7
|
const terminalColumns = process.stdout.columns;
|
|
@@ -76,5 +77,5 @@ const buildSectionDivider = () => highlighter.dim(`${DIVIDER_INDENT}${"─".repe
|
|
|
76
77
|
//#endregion
|
|
77
78
|
export { buildFooterLinkLines as n, buildSectionDivider as t };
|
|
78
79
|
|
|
79
|
-
//# sourceMappingURL=build-section-divider-
|
|
80
|
-
//# debugId=
|
|
80
|
+
//# sourceMappingURL=build-section-divider-Bt7znRi8.js.map
|
|
81
|
+
//# debugId=761f9501-2abb-5d73-b3a5-7cfbb41e2b90
|
|
@@ -1,17 +1,18 @@
|
|
|
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]="576d0387-036f-52cf-946c-0797b36fab8b")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { a as
|
|
11
|
-
import {
|
|
12
|
-
import { t as
|
|
13
|
-
import
|
|
4
|
+
import { kt as GITHUB_ACTIONS_SETUP_URL, u as METRIC, ut as CI_URL } from "./constants-DJ3RtEMu.js";
|
|
5
|
+
import { Ot as highlighter, t as recordCount, yn as runSync } from "./record-metric-C-ZZzzDc.js";
|
|
6
|
+
import { o as isExpectedUserError } from "./telemetry-runtime-DLq3FDzI.js";
|
|
7
|
+
import { n as handleUserError, t as handleError } from "./handle-error-8NlzFVoW.js";
|
|
8
|
+
import { t as reportErrorToSentry } from "./report-error-_C-eJJHZ.js";
|
|
9
|
+
import { N as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-Dr4O5HID.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-Dtf07ISQ.js";
|
|
11
|
+
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-Cl4BiTkm.js";
|
|
12
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-CuyyYvRd.js";
|
|
13
|
+
import { t as printBrandedHeader } from "./print-branded-header-DqaKyGKm.js";
|
|
14
14
|
import * as fs$1 from "node:fs";
|
|
15
|
+
import * as path$1 from "node:path";
|
|
15
16
|
//#region src/cli/utils/ci/ci-provider.ts
|
|
16
17
|
const ADVISORY_GATE = {
|
|
17
18
|
blocking: "none",
|
|
@@ -7498,5 +7499,5 @@ const ciConfigAction = (options) => runCiCommand("config", runCiConfig, options)
|
|
|
7498
7499
|
//#endregion
|
|
7499
7500
|
export { ciConfigAction, ciInstallAction, ciUpgradeAction };
|
|
7500
7501
|
|
|
7501
|
-
//# sourceMappingURL=ci-
|
|
7502
|
-
//# debugId=
|
|
7502
|
+
//# sourceMappingURL=ci-vktx9bIK.js.map
|
|
7503
|
+
//# debugId=576d0387-036f-52cf-946c-0797b36fab8b
|
package/dist/cli.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
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]="d3696fb6-15d5-5a85-b708-3f058c610990")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { n as
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
4
|
+
import { lt as CANONICAL_GITHUB_URL, ut as CI_URL } from "./constants-DJ3RtEMu.js";
|
|
5
|
+
import "./start-scan-preamble-DZknzhHU.js";
|
|
6
|
+
import { In as isDirectory, Ot as highlighter, Rn as isFile, S as isDebugFlagEnabled, Yt as setColorEnabled, _ as VERSION, d as isJsonModeActive, h as writeJsonErrorReport, ht as filterSourceFiles, i as isTelemetryEnabled, kt as isPathInsideDirectory, y as CliInputError } from "./record-metric-C-ZZzzDc.js";
|
|
7
|
+
import { a as initializeSentry, n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-DLq3FDzI.js";
|
|
8
|
+
import { t as exitGracefully } from "./exit-gracefully-Y5XyTvxu.js";
|
|
9
|
+
import { n as handleUserError, t as handleError } from "./handle-error-8NlzFVoW.js";
|
|
10
|
+
import { n as getLastRunTraceId } from "./active-run-trace-Dewycxda.js";
|
|
11
|
+
import { t as reportErrorToSentry } from "./report-error-_C-eJJHZ.js";
|
|
12
|
+
import { t as toForwardSlashes } from "./path-format-By20mo8A.js";
|
|
13
|
+
import { t as unrefStdin } from "./unref-stdin-D-NZBFpg.js";
|
|
13
14
|
import * as path$1 from "node:path";
|
|
15
|
+
import { execFileSync } from "node:child_process";
|
|
14
16
|
//#region ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/error.js
|
|
15
17
|
var require_error = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
16
18
|
/**
|
|
@@ -3358,6 +3360,7 @@ const COMMAND_FLAG_SPECS = new Map([
|
|
|
3358
3360
|
"--no-dead-code",
|
|
3359
3361
|
"--no-score",
|
|
3360
3362
|
"--no-supply-chain",
|
|
3363
|
+
"--score",
|
|
3361
3364
|
"--yes"
|
|
3362
3365
|
]),
|
|
3363
3366
|
longOptionsWithRequiredValues: new Set([
|
|
@@ -3556,7 +3559,7 @@ ${highlighter.dim("Learn more:")}
|
|
|
3556
3559
|
const collectCategoryOption = (value, previousValues) => [...previousValues ?? [], value];
|
|
3557
3560
|
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);
|
|
3558
3561
|
program.action(async (positionalPaths = [], flags) => {
|
|
3559
|
-
const { runScanCommand } = await import("./scan-
|
|
3562
|
+
const { runScanCommand } = await import("./scan-C6U_DFdI.js");
|
|
3560
3563
|
return runScanCommand({
|
|
3561
3564
|
...resolvePositionalScanInput(positionalPaths),
|
|
3562
3565
|
flags,
|
|
@@ -3564,75 +3567,75 @@ program.action(async (positionalPaths = [], flags) => {
|
|
|
3564
3567
|
});
|
|
3565
3568
|
});
|
|
3566
3569
|
program.command("design [directory]").description("Run only the focused UI design diagnostics").addHelpText("after", renderDesignHelpEpilog).action(async (directory, _options, command) => {
|
|
3567
|
-
const { designAction } = await import("./design-
|
|
3570
|
+
const { designAction } = await import("./design-CH3L5hSZ.js");
|
|
3568
3571
|
return designAction(directory ?? ".", command.optsWithGlobals());
|
|
3569
3572
|
});
|
|
3570
3573
|
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) => {
|
|
3571
|
-
const { runtimeScanAction } = await import("./runtime-scan-
|
|
3574
|
+
const { runtimeScanAction } = await import("./runtime-scan-DFdypOyE.js");
|
|
3572
3575
|
return runtimeScanAction(url, options);
|
|
3573
3576
|
});
|
|
3574
3577
|
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) => {
|
|
3575
|
-
const { whyAction } = await import("./why-
|
|
3578
|
+
const { whyAction } = await import("./why-uxPDWtZO.js");
|
|
3576
3579
|
return whyAction(location, options);
|
|
3577
3580
|
});
|
|
3578
3581
|
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) => {
|
|
3579
|
-
const { installAction } = await import("./install-
|
|
3582
|
+
const { installAction } = await import("./install-C4JkqZoO.js");
|
|
3580
3583
|
return installAction(options, command);
|
|
3581
3584
|
});
|
|
3582
3585
|
const providerOption = ["--provider <name>", "ci provider: github-actions or gitlab-ci (auto-detected by default)"];
|
|
3583
3586
|
const prOption = ["--pr", "open a pull request with the change instead of writing it to the working tree"];
|
|
3584
3587
|
const ci = program.command("ci").description("Set up, upgrade, and configure React Doctor in your CI");
|
|
3585
3588
|
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) => {
|
|
3586
|
-
const { ciInstallAction } = await import("./ci-
|
|
3589
|
+
const { ciInstallAction } = await import("./ci-vktx9bIK.js");
|
|
3587
3590
|
return ciInstallAction(command.optsWithGlobals());
|
|
3588
3591
|
});
|
|
3589
3592
|
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) => {
|
|
3590
|
-
const { ciConfigAction } = await import("./ci-
|
|
3593
|
+
const { ciConfigAction } = await import("./ci-vktx9bIK.js");
|
|
3591
3594
|
return ciConfigAction(command.optsWithGlobals());
|
|
3592
3595
|
});
|
|
3593
3596
|
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) => {
|
|
3594
|
-
const { ciUpgradeAction } = await import("./ci-
|
|
3597
|
+
const { ciUpgradeAction } = await import("./ci-vktx9bIK.js");
|
|
3595
3598
|
return ciUpgradeAction(command.optsWithGlobals());
|
|
3596
3599
|
});
|
|
3597
3600
|
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 () => {
|
|
3598
|
-
const { versionAction } = await import("./version-
|
|
3601
|
+
const { versionAction } = await import("./version-DO7dtT21.js");
|
|
3599
3602
|
return versionAction();
|
|
3600
3603
|
});
|
|
3601
3604
|
const rules = program.command("rules").description("List, explain, and configure which React Doctor rules run");
|
|
3602
3605
|
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) => {
|
|
3603
|
-
const { rulesListAction } = await import("./rules-
|
|
3606
|
+
const { rulesListAction } = await import("./rules-DAQXfBXb.js");
|
|
3604
3607
|
return rulesListAction(command.optsWithGlobals());
|
|
3605
3608
|
});
|
|
3606
3609
|
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) => {
|
|
3607
|
-
const { rulesExplainAction } = await import("./rules-
|
|
3610
|
+
const { rulesExplainAction } = await import("./rules-DAQXfBXb.js");
|
|
3608
3611
|
return rulesExplainAction(rule, command.optsWithGlobals());
|
|
3609
3612
|
});
|
|
3610
3613
|
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) => {
|
|
3611
|
-
const { rulesSetAction } = await import("./rules-
|
|
3614
|
+
const { rulesSetAction } = await import("./rules-DAQXfBXb.js");
|
|
3612
3615
|
return rulesSetAction(rule, severity, command.optsWithGlobals());
|
|
3613
3616
|
});
|
|
3614
3617
|
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) => {
|
|
3615
|
-
const { rulesEnableAction } = await import("./rules-
|
|
3618
|
+
const { rulesEnableAction } = await import("./rules-DAQXfBXb.js");
|
|
3616
3619
|
return rulesEnableAction(rule, command.optsWithGlobals());
|
|
3617
3620
|
});
|
|
3618
3621
|
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) => {
|
|
3619
|
-
const { rulesDisableAction } = await import("./rules-
|
|
3622
|
+
const { rulesDisableAction } = await import("./rules-DAQXfBXb.js");
|
|
3620
3623
|
return rulesDisableAction(rule, command.optsWithGlobals());
|
|
3621
3624
|
});
|
|
3622
3625
|
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) => {
|
|
3623
|
-
const { rulesCategoryAction } = await import("./rules-
|
|
3626
|
+
const { rulesCategoryAction } = await import("./rules-DAQXfBXb.js");
|
|
3624
3627
|
return rulesCategoryAction(category, severity, command.optsWithGlobals());
|
|
3625
3628
|
});
|
|
3626
3629
|
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) => {
|
|
3627
|
-
const { rulesIgnoreTagAction } = await import("./rules-
|
|
3630
|
+
const { rulesIgnoreTagAction } = await import("./rules-DAQXfBXb.js");
|
|
3628
3631
|
return rulesIgnoreTagAction(tag, command.optsWithGlobals());
|
|
3629
3632
|
});
|
|
3630
3633
|
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) => {
|
|
3631
|
-
const { rulesUnignoreTagAction } = await import("./rules-
|
|
3634
|
+
const { rulesUnignoreTagAction } = await import("./rules-DAQXfBXb.js");
|
|
3632
3635
|
return rulesUnignoreTagAction(tag, command.optsWithGlobals());
|
|
3633
3636
|
});
|
|
3634
3637
|
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) => {
|
|
3635
|
-
const { runScanCommand } = await import("./scan-
|
|
3638
|
+
const { runScanCommand } = await import("./scan-C6U_DFdI.js");
|
|
3636
3639
|
return runScanCommand({
|
|
3637
3640
|
directory,
|
|
3638
3641
|
flags: command.optsWithGlobals(),
|
|
@@ -3672,4 +3675,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
3672
3675
|
export {};
|
|
3673
3676
|
|
|
3674
3677
|
//# sourceMappingURL=cli.js.map
|
|
3675
|
-
//# debugId=
|
|
3678
|
+
//# debugId=d3696fb6-15d5-5a85-b708-3f058c610990
|