react-doctor 0.9.11 → 0.9.12-dev.a2b460d
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/{build-section-divider-sLcWe1hO.js → build-section-divider-Vz879zXD.js} +7 -7
- package/dist/{ci-DsrrD52i.js → ci-BVYrYekU.js} +11 -11
- package/dist/cli.js +22 -22
- package/dist/{design-CP25gyyg.js → design-D-TYN_tr.js} +4 -4
- package/dist/{exit-gracefully-CVVkBxDS.js → exit-gracefully-Cjv5kC_l.js} +6 -6
- package/dist/index.d.ts +17 -19
- package/dist/index.js +150 -34
- package/dist/{inspect-D6y8oLtg.js → inspect-kkvDHKDE.js} +19 -19
- package/dist/{install-afMFGeTB.js → install-ZeYvD9Rw.js} +8 -8
- package/dist/{install-doctor-script-Be7Mv3-l.js → install-doctor-script-D58Hr1dM.js} +4 -4
- package/dist/{install-github-workflow-Dev2F6Ea.js → install-github-workflow-DkMicv8E.js} +6 -6
- package/dist/{install-react-doctor-DIPVunY4.js → install-react-doctor-CjgE52al.js} +8 -8
- package/dist/lsp.js +55 -24
- package/dist/{print-branded-header-D5jLdo4p.js → print-branded-header-D4QYSu-h.js} +4 -4
- package/dist/{read-object-file-CEh1CqnD.js → read-object-file-OFRlvCAL.js} +4 -4
- package/dist/{record-metric-CJxSHfJD.js → record-metric-CMe2d1Xv.js} +86 -41
- package/dist/{report-error-CAEixMg1.js → report-error-1l7v6_dE.js} +5 -5
- package/dist/{report-workflow-result-C0jbKH8p.js → report-workflow-result-EagkH_v9.js} +5 -5
- package/dist/{resolve-scope-DS7rcRRz.js → resolve-scope-CMNrOdDf.js} +6 -6
- package/dist/{rules-BJynymuU.js → rules-CzR1qUru.js} +6 -6
- package/dist/{run-scan-app-BGzlyiIB.js → run-scan-app-Ciq22jzp.js} +69 -36
- package/dist/{scan-CgPRG6_z.js → scan-D4m5r4Rs.js} +8 -8
- package/dist/{should-fail-scan-gate-4jf7ZRdL.js → should-fail-scan-gate-lMTlhEhE.js} +56 -21
- package/dist/{should-skip-prompts-C78r7Ww7.js → should-skip-prompts-mXKZBNCz.js} +4 -4
- package/dist/{unref-stdin-Dc8ipkaw.js → unref-stdin-Cxhw67r6.js} +4 -4
- package/dist/{version-DDrwsTas.js → version-CnvVY2VD.js} +4 -4
- package/dist/{why-BRNrKY1b.js → why-BktDEhhH.js} +4 -4
- package/package.json +7 -9
|
@@ -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]="
|
|
3
|
-
import { At as anonymizeInPlace, Fn as scrubSensitivePaths, M as SENTRY_FLUSH_TIMEOUT_MS, Y as CANONICAL_GITHUB_URL, a as isEnvFlagEnabled, cn as highlighter, i as isTelemetryEnabled, jt as anonymizeText, nt as DOCS_URL, o as buildSentryScope } from "./record-metric-
|
|
4
|
-
import { c as isExpectedUserError } from "./unref-stdin-
|
|
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]="140b0cea-029f-5af2-8653-e99462b0ce17")}catch(e){}}();
|
|
3
|
+
import { At as anonymizeInPlace, Fn as scrubSensitivePaths, M as SENTRY_FLUSH_TIMEOUT_MS, Y as CANONICAL_GITHUB_URL, a as isEnvFlagEnabled, cn as highlighter, i as isTelemetryEnabled, jt as anonymizeText, nt as DOCS_URL, o as buildSentryScope } from "./record-metric-CMe2d1Xv.js";
|
|
4
|
+
import { c as isExpectedUserError } from "./unref-stdin-Cxhw67r6.js";
|
|
5
5
|
import * as Sentry from "@sentry/node";
|
|
6
6
|
//#region src/cli/utils/scrub-sentry-event.ts
|
|
7
7
|
/**
|
|
@@ -71,13 +71,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
71
71
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
72
72
|
* standard `SENTRY_RELEASE` override.
|
|
73
73
|
*/
|
|
74
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.9.
|
|
74
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.9.12-dev.a2b460d`;
|
|
75
75
|
/**
|
|
76
76
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
77
77
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
78
78
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
79
79
|
*/
|
|
80
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.9.
|
|
80
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.9.12-dev.a2b460d") ? "development" : "production");
|
|
81
81
|
//#endregion
|
|
82
82
|
//#region src/instrument.ts
|
|
83
83
|
let isInitialized = false;
|
|
@@ -227,5 +227,5 @@ const buildSectionDivider = () => highlighter.dim(`${DIVIDER_INDENT}${"─".repe
|
|
|
227
227
|
//#endregion
|
|
228
228
|
export { initializeSentry as a, flushSentry as i, buildFooterLinkLines as n, activeScanAbortRegistry as r, buildSectionDivider as t };
|
|
229
229
|
|
|
230
|
-
//# sourceMappingURL=build-section-divider-
|
|
231
|
-
//# debugId=
|
|
230
|
+
//# sourceMappingURL=build-section-divider-Vz879zXD.js.map
|
|
231
|
+
//# debugId=140b0cea-029f-5af2-8653-e99462b0ce17
|
|
@@ -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]="
|
|
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]="78f87d33-c5f6-5495-9915-ffb7a60836c3")}catch(e){}}();
|
|
3
3
|
import { n as __require, r as __toESM, t as __commonJSMin } from "./chunk-q7NCDQ7-.js";
|
|
4
|
-
import { X as CI_URL, ar as runSync, cn as highlighter, ot as GITHUB_ACTIONS_SETUP_URL, t as recordCount, w as METRIC } from "./record-metric-
|
|
5
|
-
import { c as isExpectedUserError } from "./unref-stdin-
|
|
6
|
-
import { n as handleError, r as handleUserError, t as reportErrorToSentry } from "./report-error-
|
|
7
|
-
import { L as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-
|
|
8
|
-
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-
|
|
9
|
-
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-
|
|
10
|
-
import { t as shouldSkipPrompts } from "./should-skip-prompts-
|
|
11
|
-
import { t as printBrandedHeader } from "./print-branded-header-
|
|
4
|
+
import { X as CI_URL, ar as runSync, cn as highlighter, ot as GITHUB_ACTIONS_SETUP_URL, t as recordCount, w as METRIC } from "./record-metric-CMe2d1Xv.js";
|
|
5
|
+
import { c as isExpectedUserError } from "./unref-stdin-Cxhw67r6.js";
|
|
6
|
+
import { n as handleError, r as handleUserError, t as reportErrorToSentry } from "./report-error-1l7v6_dE.js";
|
|
7
|
+
import { L as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-D58Hr1dM.js";
|
|
8
|
+
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-DkMicv8E.js";
|
|
9
|
+
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-CMNrOdDf.js";
|
|
10
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-mXKZBNCz.js";
|
|
11
|
+
import { t as printBrandedHeader } from "./print-branded-header-D4QYSu-h.js";
|
|
12
12
|
import * as path$1 from "node:path";
|
|
13
13
|
import * as fs$1 from "node:fs";
|
|
14
14
|
//#region src/cli/utils/ci/ci-provider.ts
|
|
@@ -7497,5 +7497,5 @@ const ciConfigAction = (options) => runCiCommand("config", runCiConfig, options)
|
|
|
7497
7497
|
//#endregion
|
|
7498
7498
|
export { ciConfigAction, ciInstallAction, ciUpgradeAction };
|
|
7499
7499
|
|
|
7500
|
-
//# sourceMappingURL=ci-
|
|
7501
|
-
//# debugId=
|
|
7500
|
+
//# sourceMappingURL=ci-BVYrYekU.js.map
|
|
7501
|
+
//# debugId=78f87d33-c5f6-5495-9915-ffb7a60836c3
|
package/dist/cli.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
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]="c779427c-ed7c-5be4-b123-73410d3af015")}catch(e){}}();
|
|
3
3
|
import { n as __require, r as __toESM, t as __commonJSMin } from "./chunk-q7NCDQ7-.js";
|
|
4
|
-
import { In as setColorEnabled, R as CliInputError, V as isDebugFlagEnabled, X as CI_URL, Y as CANONICAL_GITHUB_URL, cn as highlighter, d as isJsonModeActive, g as VERSION, i as isTelemetryEnabled, m as writeJsonErrorReport } from "./record-metric-
|
|
5
|
-
import { c as isExpectedUserError, r as getLastRunTraceId, s as shutdownTelemetry, t as unrefStdin } from "./unref-stdin-
|
|
6
|
-
import { a as initializeSentry, i as flushSentry } from "./build-section-divider-
|
|
7
|
-
import { t as exitGracefully } from "./exit-gracefully-
|
|
8
|
-
import { n as handleError, r as handleUserError, t as reportErrorToSentry } from "./report-error-
|
|
4
|
+
import { In as setColorEnabled, R as CliInputError, V as isDebugFlagEnabled, X as CI_URL, Y as CANONICAL_GITHUB_URL, cn as highlighter, d as isJsonModeActive, g as VERSION, i as isTelemetryEnabled, m as writeJsonErrorReport } from "./record-metric-CMe2d1Xv.js";
|
|
5
|
+
import { c as isExpectedUserError, r as getLastRunTraceId, s as shutdownTelemetry, t as unrefStdin } from "./unref-stdin-Cxhw67r6.js";
|
|
6
|
+
import { a as initializeSentry, i as flushSentry } from "./build-section-divider-Vz879zXD.js";
|
|
7
|
+
import { t as exitGracefully } from "./exit-gracefully-Cjv5kC_l.js";
|
|
8
|
+
import { n as handleError, r as handleUserError, t as reportErrorToSentry } from "./report-error-1l7v6_dE.js";
|
|
9
9
|
import { execFileSync } from "node:child_process";
|
|
10
10
|
//#region ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/error.js
|
|
11
11
|
var require_error = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -3481,7 +3481,7 @@ ${highlighter.dim("Learn more:")}
|
|
|
3481
3481
|
const collectCategoryOption = (value, previousValues) => [...previousValues ?? [], value];
|
|
3482
3482
|
const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[directory]", "project directory to scan", ".").option("--lint", "enable linting").option("--no-lint", "skip linting").option("--dead-code", "enable dead-code analysis (default)").option("--no-dead-code", "skip dead-code analysis (unused files / exports / dependencies, circular imports)").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);
|
|
3483
3483
|
program.action(async (directory = ".", flags) => {
|
|
3484
|
-
const { runScanCommand } = await import("./scan-
|
|
3484
|
+
const { runScanCommand } = await import("./scan-D4m5r4Rs.js");
|
|
3485
3485
|
return runScanCommand({
|
|
3486
3486
|
directory,
|
|
3487
3487
|
flags,
|
|
@@ -3489,72 +3489,72 @@ program.action(async (directory = ".", flags) => {
|
|
|
3489
3489
|
});
|
|
3490
3490
|
});
|
|
3491
3491
|
program.command("design [directory]").description("Run only the focused UI design diagnostics").addHelpText("after", renderDesignHelpEpilog).action(async (directory, _options, command) => {
|
|
3492
|
-
const { designAction } = await import("./design-
|
|
3492
|
+
const { designAction } = await import("./design-D-TYN_tr.js");
|
|
3493
3493
|
return designAction(directory ?? ".", command.optsWithGlobals());
|
|
3494
3494
|
});
|
|
3495
3495
|
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) => {
|
|
3496
|
-
const { whyAction } = await import("./why-
|
|
3496
|
+
const { whyAction } = await import("./why-BktDEhhH.js");
|
|
3497
3497
|
return whyAction(location, options);
|
|
3498
3498
|
});
|
|
3499
3499
|
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 native non-blocking 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) => {
|
|
3500
|
-
const { installAction } = await import("./install-
|
|
3500
|
+
const { installAction } = await import("./install-ZeYvD9Rw.js");
|
|
3501
3501
|
return installAction(options, command);
|
|
3502
3502
|
});
|
|
3503
3503
|
const providerOption = ["--provider <name>", "ci provider: github-actions or gitlab-ci (auto-detected by default)"];
|
|
3504
3504
|
const prOption = ["--pr", "open a pull request with the change instead of writing it to the working tree"];
|
|
3505
3505
|
const ci = program.command("ci").description("Set up, upgrade, and configure React Doctor in your CI");
|
|
3506
3506
|
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) => {
|
|
3507
|
-
const { ciInstallAction } = await import("./ci-
|
|
3507
|
+
const { ciInstallAction } = await import("./ci-BVYrYekU.js");
|
|
3508
3508
|
return ciInstallAction(command.optsWithGlobals());
|
|
3509
3509
|
});
|
|
3510
3510
|
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) => {
|
|
3511
|
-
const { ciConfigAction } = await import("./ci-
|
|
3511
|
+
const { ciConfigAction } = await import("./ci-BVYrYekU.js");
|
|
3512
3512
|
return ciConfigAction(command.optsWithGlobals());
|
|
3513
3513
|
});
|
|
3514
3514
|
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) => {
|
|
3515
|
-
const { ciUpgradeAction } = await import("./ci-
|
|
3515
|
+
const { ciUpgradeAction } = await import("./ci-BVYrYekU.js");
|
|
3516
3516
|
return ciUpgradeAction(command.optsWithGlobals());
|
|
3517
3517
|
});
|
|
3518
3518
|
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 () => {
|
|
3519
|
-
const { versionAction } = await import("./version-
|
|
3519
|
+
const { versionAction } = await import("./version-CnvVY2VD.js");
|
|
3520
3520
|
return versionAction();
|
|
3521
3521
|
});
|
|
3522
3522
|
const rules = program.command("rules").description("List, explain, and configure which React Doctor rules run");
|
|
3523
3523
|
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) => {
|
|
3524
|
-
const { rulesListAction } = await import("./rules-
|
|
3524
|
+
const { rulesListAction } = await import("./rules-CzR1qUru.js");
|
|
3525
3525
|
return rulesListAction(command.optsWithGlobals());
|
|
3526
3526
|
});
|
|
3527
3527
|
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) => {
|
|
3528
|
-
const { rulesExplainAction } = await import("./rules-
|
|
3528
|
+
const { rulesExplainAction } = await import("./rules-CzR1qUru.js");
|
|
3529
3529
|
return rulesExplainAction(rule, command.optsWithGlobals());
|
|
3530
3530
|
});
|
|
3531
3531
|
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) => {
|
|
3532
|
-
const { rulesSetAction } = await import("./rules-
|
|
3532
|
+
const { rulesSetAction } = await import("./rules-CzR1qUru.js");
|
|
3533
3533
|
return rulesSetAction(rule, severity, command.optsWithGlobals());
|
|
3534
3534
|
});
|
|
3535
3535
|
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) => {
|
|
3536
|
-
const { rulesEnableAction } = await import("./rules-
|
|
3536
|
+
const { rulesEnableAction } = await import("./rules-CzR1qUru.js");
|
|
3537
3537
|
return rulesEnableAction(rule, command.optsWithGlobals());
|
|
3538
3538
|
});
|
|
3539
3539
|
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) => {
|
|
3540
|
-
const { rulesDisableAction } = await import("./rules-
|
|
3540
|
+
const { rulesDisableAction } = await import("./rules-CzR1qUru.js");
|
|
3541
3541
|
return rulesDisableAction(rule, command.optsWithGlobals());
|
|
3542
3542
|
});
|
|
3543
3543
|
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) => {
|
|
3544
|
-
const { rulesCategoryAction } = await import("./rules-
|
|
3544
|
+
const { rulesCategoryAction } = await import("./rules-CzR1qUru.js");
|
|
3545
3545
|
return rulesCategoryAction(category, severity, command.optsWithGlobals());
|
|
3546
3546
|
});
|
|
3547
3547
|
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) => {
|
|
3548
|
-
const { rulesIgnoreTagAction } = await import("./rules-
|
|
3548
|
+
const { rulesIgnoreTagAction } = await import("./rules-CzR1qUru.js");
|
|
3549
3549
|
return rulesIgnoreTagAction(tag, command.optsWithGlobals());
|
|
3550
3550
|
});
|
|
3551
3551
|
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) => {
|
|
3552
|
-
const { rulesUnignoreTagAction } = await import("./rules-
|
|
3552
|
+
const { rulesUnignoreTagAction } = await import("./rules-CzR1qUru.js");
|
|
3553
3553
|
return rulesUnignoreTagAction(tag, command.optsWithGlobals());
|
|
3554
3554
|
});
|
|
3555
3555
|
program.command("experimental-lsp", { hidden: false }).description("[experimental] run the React Doctor language server over stdio (for editors)").allowUnknownOption().action(() => {});
|
|
3556
3556
|
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)").option("--no-dead-code", "skip dead-code analysis").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) => {
|
|
3557
|
-
const { runScanCommand } = await import("./scan-
|
|
3557
|
+
const { runScanCommand } = await import("./scan-D4m5r4Rs.js");
|
|
3558
3558
|
return runScanCommand({
|
|
3559
3559
|
directory,
|
|
3560
3560
|
flags: command.optsWithGlobals(),
|
|
@@ -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]="7c9e148d-f31f-56f0-8f3d-5ba7ab111299")}catch(e){}}();
|
|
3
|
+
import { t as inspectAction } from "./inspect-kkvDHKDE.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-D-TYN_tr.js.map
|
|
14
|
+
//# debugId=7c9e148d-f31f-56f0-8f3d-5ba7ab111299
|
|
@@ -1,8 +1,8 @@
|
|
|
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 { d as isJsonModeActive, m as writeJsonErrorReport } from "./record-metric-
|
|
4
|
-
import { s as shutdownTelemetry } from "./unref-stdin-
|
|
5
|
-
import { i as flushSentry, n as buildFooterLinkLines, r as activeScanAbortRegistry, t as buildSectionDivider } from "./build-section-divider-
|
|
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]="bd95a7a7-0356-5ed5-91a0-95e7f28f5b63")}catch(e){}}();
|
|
3
|
+
import { d as isJsonModeActive, m as writeJsonErrorReport } from "./record-metric-CMe2d1Xv.js";
|
|
4
|
+
import { s as shutdownTelemetry } from "./unref-stdin-Cxhw67r6.js";
|
|
5
|
+
import { i as flushSentry, n as buildFooterLinkLines, r as activeScanAbortRegistry, t as buildSectionDivider } from "./build-section-divider-Vz879zXD.js";
|
|
6
6
|
//#region src/cli/utils/active-tui-renderer.ts
|
|
7
7
|
let activeTuiRenderer = null;
|
|
8
8
|
const registerActiveTuiRenderer = (renderer) => {
|
|
@@ -44,5 +44,5 @@ const exitGracefully = () => {
|
|
|
44
44
|
//#endregion
|
|
45
45
|
export { registerActiveTuiRenderer as n, exitGracefully as t };
|
|
46
46
|
|
|
47
|
-
//# sourceMappingURL=exit-gracefully-
|
|
48
|
-
//# debugId=
|
|
47
|
+
//# sourceMappingURL=exit-gracefully-Cjv5kC_l.js.map
|
|
48
|
+
//# debugId=bd95a7a7-0356-5ed5-91a0-95e7f28f5b63
|
package/dist/index.d.ts
CHANGED
|
@@ -10366,11 +10366,11 @@ interface DiagnoseResult {
|
|
|
10366
10366
|
scannedFileCount?: number;
|
|
10367
10367
|
project: ProjectInfo;
|
|
10368
10368
|
/**
|
|
10369
|
-
* Whether the scanned project resolved a React-compatible runtime
|
|
10370
|
-
* or
|
|
10371
|
-
*
|
|
10372
|
-
*
|
|
10373
|
-
*
|
|
10369
|
+
* Whether the scanned project resolved a React-compatible runtime directly
|
|
10370
|
+
* or through a React-backed framework. `false` means every React-runtime
|
|
10371
|
+
* rule family was gated off, not that the scan target was unsupported:
|
|
10372
|
+
* other detected framework and library rule families still run, as do
|
|
10373
|
+
* framework-neutral rules on any analyzable project.
|
|
10374
10374
|
* Mirrors `JsonReport.reactDetected`; same predicate as
|
|
10375
10375
|
* `hasReactRuntime(result.project)`. Always set by `diagnose()`;
|
|
10376
10376
|
* optional so hand-constructed results keep compiling.
|
|
@@ -10427,7 +10427,8 @@ interface DiagnoseProjectsResult {
|
|
|
10427
10427
|
score: ScoreResult | null;
|
|
10428
10428
|
/**
|
|
10429
10429
|
* Whether any successfully scanned project resolved a React-compatible
|
|
10430
|
-
* runtime
|
|
10430
|
+
* runtime directly or through a React-backed framework. Absent when no
|
|
10431
|
+
* project scanned successfully.
|
|
10431
10432
|
* See `DiagnoseResult.reactDetected` for gating guidance; per-project
|
|
10432
10433
|
* detail is on each `ProjectResultOk.reactDetected`.
|
|
10433
10434
|
*/
|
|
@@ -10660,14 +10661,13 @@ interface JsonReportV1$1 {
|
|
|
10660
10661
|
mode: JsonReportMode;
|
|
10661
10662
|
baselineDegraded?: boolean;
|
|
10662
10663
|
/**
|
|
10663
|
-
* Whether any scanned project resolved a React-compatible runtime
|
|
10664
|
-
* or
|
|
10665
|
-
*
|
|
10666
|
-
*
|
|
10667
|
-
*
|
|
10668
|
-
*
|
|
10669
|
-
*
|
|
10670
|
-
* is empty), on error reports, and on reports from older CLI versions.
|
|
10664
|
+
* Whether any scanned project resolved a React-compatible runtime directly
|
|
10665
|
+
* or through a React-backed framework. `false` means every React-runtime
|
|
10666
|
+
* rule family was gated off, not that the scan target was unsupported:
|
|
10667
|
+
* other detected framework and library rule families still run, as do
|
|
10668
|
+
* framework-neutral rules on any analyzable project. Absent when
|
|
10669
|
+
* nothing was scanned (`projects` is empty), on error reports, and on
|
|
10670
|
+
* reports from older CLI versions.
|
|
10671
10671
|
*/
|
|
10672
10672
|
reactDetected?: boolean;
|
|
10673
10673
|
diff: JsonReportDiffInfo | null;
|
|
@@ -10972,13 +10972,11 @@ declare const defineConfig: (config: ReactDoctorConfig) => ReactDoctorConfig; //
|
|
|
10972
10972
|
//#endregion
|
|
10973
10973
|
//#region src/utils/has-react-runtime.d.ts
|
|
10974
10974
|
/**
|
|
10975
|
-
* Whether project discovery resolved a React-compatible runtime
|
|
10976
|
-
*
|
|
10977
|
-
* predicate that grants the `react` capability, so `false` means every
|
|
10978
|
-
* React-runtime rule family was gated off for the project.
|
|
10975
|
+
* Whether project discovery resolved a React-compatible runtime directly or
|
|
10976
|
+
* through a framework whose runtime is necessarily React-compatible.
|
|
10979
10977
|
*/
|
|
10980
10978
|
declare const hasReactRuntime: (project: ProjectInfo) => boolean; //#endregion
|
|
10981
|
-
//#region src/utils/
|
|
10979
|
+
//#region src/utils/has-supported-framework-or-library.d.ts
|
|
10982
10980
|
//#endregion
|
|
10983
10981
|
//#region ../api/dist/index.d.ts
|
|
10984
10982
|
//#region src/diagnose.d.ts
|