react-doctor 0.9.23-dev.dfffab3 → 0.9.23-dev.eeff4d4
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-BFxWf70B.js → build-section-divider-M4JYIvJl.js} +5 -5
- package/dist/{ci-CLtdQCIE.js → ci-D7ljXIo9.js} +13 -13
- package/dist/cli.js +25 -25
- package/dist/{constants-BmD_c3Yq.js → constants-BXN6vJ3T.js} +25 -8
- package/dist/{constants-T2clfs7L.js → constants-zyF-Em_y.js} +10 -3
- package/dist/{design-BMqPn207.js → design-XQwuAooI.js} +4 -4
- package/dist/duplicate-jsx-worker.js +1 -1
- package/dist/{exit-gracefully-Bhyw-8gk.js → exit-gracefully-BOyeEcyb.js} +6 -6
- package/dist/{handle-error-BJ_4E2kS.js → handle-error-UWlOKn6r.js} +6 -6
- package/dist/index.d.ts +16 -1
- package/dist/index.js +998 -76
- package/dist/{inspect-BuLr42QI.js → inspect-F_2FwEY4.js} +16 -16
- package/dist/{install-DsuiRD1t.js → install-KoxCju0L.js} +10 -10
- package/dist/{install-doctor-script-DJ6UbhZJ.js → install-doctor-script-BrfKpUzQ.js} +5 -5
- package/dist/{install-github-workflow-BNRbJHjd.js → install-github-workflow-hAvw3S8o.js} +6 -6
- package/dist/{install-react-doctor-BcsOSw5y.js → install-react-doctor-Dt86VM3q.js} +9 -9
- package/dist/{is-cache-globally-disabled-CveNGcRi.js → is-cache-globally-disabled-DaT77eEZ.js} +4 -4
- package/dist/{jsx-runtime-BDdabT1T.js → jsx-runtime-BrXRMax1.js} +6 -6
- package/dist/oxlint-worker.js +1 -1
- package/dist/{print-branded-header-BFh1P9t6.js → print-branded-header-BtUUFoRA.js} +4 -4
- package/dist/project-analysis-worker.js +105 -7
- package/dist/{prompt-runtime-scan-url-CRx8qrV0.js → prompt-runtime-scan-url-Buwk-3bK.js} +5 -5
- package/dist/{read-object-file-D3pRnLyV.js → read-object-file-_cBPiQ53.js} +4 -4
- package/dist/{record-metric-CWxS2npr.js → record-metric-CqZ2oVM5.js} +983 -77
- package/dist/{report-error-DA8uMulb.js → report-error-TQ0RuHaV.js} +6 -6
- package/dist/{report-workflow-result-D6NNwRMm.js → report-workflow-result-AVT357TZ.js} +6 -6
- package/dist/{resolve-scan-exit-code-DE6AIQwU.js → resolve-scan-exit-code-DHwcZs-_.js} +14 -13
- package/dist/{resolve-scope-B3xmSQ0a.js → resolve-scope-C0xGQv5Z.js} +6 -6
- package/dist/{rules-CHxjoZwR.js → rules-DrN3BHA6.js} +7 -7
- package/dist/{run-scan-app-BuI_XZcx.js → run-scan-app-DgD9ZUcX.js} +45 -16
- package/dist/{runtime-scan-0pSZm3M0.js → runtime-scan-CUd9z8wt.js} +10 -10
- package/dist/{sanitize-runtime-url-BCw_Ixks.js → sanitize-runtime-url-BbR8vJyj.js} +4 -4
- package/dist/{scan-Be7a-iK7.js → scan-DStBkQc_.js} +10 -10
- package/dist/{should-skip-prompts-CDudIC40.js → should-skip-prompts-B3A5qWMu.js} +4 -4
- package/dist/{should-use-tui-HuQLii4U.js → should-use-tui-lowPvEnC.js} +4 -4
- package/dist/skills/react-doctor/references/explain.md +21 -0
- package/dist/{start-scan-preamble-DDAT_0oB.js → start-scan-preamble-CTa9UHkf.js} +5 -5
- package/dist/start-scan-preamble.js +3 -3
- package/dist/{telemetry-runtime-De9QafWu.js → telemetry-runtime-DJWGuzba.js} +7 -7
- package/dist/{version-uDDHk7KW.js → version-gbK4YNDr.js} +5 -5
- package/dist/{why-Dww_fJtq.js → why-Cdmh9drp.js} +4 -4
- package/dist/{with-run-span-CRYkeESN.js → with-run-span-CmXGFcgD.js} +6 -6
- package/package.json +2 -2
|
@@ -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 { ut as CANONICAL_GITHUB_URL, xt as DOCS_URL } from "./constants-
|
|
4
|
-
import { Nt as highlighter } from "./record-metric-
|
|
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]="4b1873f3-d70d-544c-84e5-29710ce7d813")}catch(e){}}();
|
|
3
|
+
import { ut as CANONICAL_GITHUB_URL, xt as DOCS_URL } from "./constants-BXN6vJ3T.js";
|
|
4
|
+
import { Nt as highlighter } from "./record-metric-CqZ2oVM5.js";
|
|
5
5
|
//#region src/cli/utils/resolve-measure-width.ts
|
|
6
6
|
const resolveClampedWidth = (input) => {
|
|
7
7
|
const terminalColumns = process.stdout.columns;
|
|
@@ -77,5 +77,5 @@ const buildSectionDivider = () => highlighter.dim(`${DIVIDER_INDENT}${"─".repe
|
|
|
77
77
|
//#endregion
|
|
78
78
|
export { buildFooterLinkLines as n, buildSectionDivider as t };
|
|
79
79
|
|
|
80
|
-
//# sourceMappingURL=build-section-divider-
|
|
81
|
-
//# debugId=
|
|
80
|
+
//# sourceMappingURL=build-section-divider-M4JYIvJl.js.map
|
|
81
|
+
//# debugId=4b1873f3-d70d-544c-84e5-29710ce7d813
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
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]="1c564485-0cc0-56aa-aceb-6fb4591b9024")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import { At as GITHUB_ACTIONS_SETUP_URL, dt as CI_URL, u as METRIC } from "./constants-
|
|
5
|
-
import { En as runSync, Nt as highlighter, _t as findGitRepositoryRoot, t as recordCount } from "./record-metric-
|
|
6
|
-
import { o as isExpectedUserError } from "./telemetry-runtime-
|
|
7
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
8
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
9
|
-
import { N as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-
|
|
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-
|
|
11
|
-
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-
|
|
12
|
-
import { t as shouldSkipPrompts } from "./should-skip-prompts-
|
|
13
|
-
import { t as printBrandedHeader } from "./print-branded-header-
|
|
4
|
+
import { At as GITHUB_ACTIONS_SETUP_URL, dt as CI_URL, u as METRIC } from "./constants-BXN6vJ3T.js";
|
|
5
|
+
import { En as runSync, Nt as highlighter, _t as findGitRepositoryRoot, t as recordCount } from "./record-metric-CqZ2oVM5.js";
|
|
6
|
+
import { o as isExpectedUserError } from "./telemetry-runtime-DJWGuzba.js";
|
|
7
|
+
import { n as handleUserError, t as handleError } from "./handle-error-UWlOKn6r.js";
|
|
8
|
+
import { t as reportErrorToSentry } from "./report-error-TQ0RuHaV.js";
|
|
9
|
+
import { N as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-BrfKpUzQ.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-hAvw3S8o.js";
|
|
11
|
+
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-C0xGQv5Z.js";
|
|
12
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-B3A5qWMu.js";
|
|
13
|
+
import { t as printBrandedHeader } from "./print-branded-header-BtUUFoRA.js";
|
|
14
14
|
import * as fs$1 from "node:fs";
|
|
15
15
|
import * as path$1 from "node:path";
|
|
16
16
|
//#region src/cli/utils/ci/ci-provider.ts
|
|
@@ -7509,5 +7509,5 @@ const ciConfigAction = (options) => runCiCommand("config", runCiConfig, options)
|
|
|
7509
7509
|
//#endregion
|
|
7510
7510
|
export { ciConfigAction, ciInstallAction, ciUpgradeAction };
|
|
7511
7511
|
|
|
7512
|
-
//# sourceMappingURL=ci-
|
|
7513
|
-
//# debugId=
|
|
7512
|
+
//# sourceMappingURL=ci-D7ljXIo9.js.map
|
|
7513
|
+
//# debugId=1c564485-0cc0-56aa-aceb-6fb4591b9024
|
package/dist/cli.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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]="8ce9aa1f-0a85-514c-9759-6b1c0db96ace")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import { dt as CI_URL, ut as CANONICAL_GITHUB_URL } from "./constants-
|
|
5
|
-
import "./start-scan-preamble-
|
|
6
|
-
import { Gn as isFile, Nt as highlighter, Pt as isPathInsideDirectory, S as isDebugFlagEnabled, Un as isDirectory, _ as VERSION, d as isJsonModeActive, gt as filterSourceFiles, h as writeJsonErrorReport, i as isTelemetryEnabled, tn as setColorEnabled, y as CliInputError } from "./record-metric-
|
|
7
|
-
import { a as initializeSentry, n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-
|
|
8
|
-
import { t as exitGracefully } from "./exit-gracefully-
|
|
9
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
4
|
+
import { dt as CI_URL, ut as CANONICAL_GITHUB_URL } from "./constants-BXN6vJ3T.js";
|
|
5
|
+
import "./start-scan-preamble-CTa9UHkf.js";
|
|
6
|
+
import { Gn as isFile, Nt as highlighter, Pt as isPathInsideDirectory, S as isDebugFlagEnabled, Un as isDirectory, _ as VERSION, d as isJsonModeActive, gt as filterSourceFiles, h as writeJsonErrorReport, i as isTelemetryEnabled, tn as setColorEnabled, y as CliInputError } from "./record-metric-CqZ2oVM5.js";
|
|
7
|
+
import { a as initializeSentry, n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-DJWGuzba.js";
|
|
8
|
+
import { t as exitGracefully } from "./exit-gracefully-BOyeEcyb.js";
|
|
9
|
+
import { n as handleUserError, t as handleError } from "./handle-error-UWlOKn6r.js";
|
|
10
10
|
import { n as getLastRunTraceId } from "./active-run-trace-Dewycxda.js";
|
|
11
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
11
|
+
import { t as reportErrorToSentry } from "./report-error-TQ0RuHaV.js";
|
|
12
12
|
import { t as toForwardSlashes } from "./path-format-By20mo8A.js";
|
|
13
13
|
import { t as unrefStdin } from "./unref-stdin-D-NZBFpg.js";
|
|
14
14
|
import * as path$1 from "node:path";
|
|
@@ -3569,7 +3569,7 @@ ${highlighter.dim("Learn more:")}
|
|
|
3569
3569
|
const collectCategoryOption = (value, previousValues) => [...previousValues ?? [], value];
|
|
3570
3570
|
const program = new Command().name("react-doctor").description("Diagnose React codebase health").version(VERSION, "-v, --version", "display the version number").argument("[paths...]", "one project directory or source file paths to scan").option("--lint", "enable linting").option("--no-lint", "skip linting").addOption(new Option("--dead-code").hideHelp()).addOption(new Option("--no-dead-code").hideHelp()).option("--supply-chain", "enable the dependency supply-chain scan (default)").option("--no-supply-chain", "skip the dependency supply-chain scan (Socket.dev dependency health checks)").option("--verbose", "show every rule and per-file details (default shows top 3 rules)").option("--debug", "force a Sentry trace and print its id at the end (paste it into a bug report)").option("--output-dir <dir>", "directory for the full diagnostics dump (default: a temp folder)").option("--score", "output only the score").option("--json", "output a single structured JSON report (suppresses other output)").option("--json-compact", "with --json, emit compact JSON (no indentation)").option("--json-out <path>", "with --json, write the report to a file instead of stdout").option("--no-cache", "disable all scan caches for this run").option("-y, --yes", "skip prompts, scan all workspace projects").option("--no-parallel", "lint serially with one worker (default: parallel across CPU cores; set the worker count with REACT_DOCTOR_PARALLEL)").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple); overrides the `projects` config field").option("--scope <value>", "how much supported JS/TS and inline HTML script source to scan/report: full (default), files, changed (only new issues vs base), lines (issues whose source spans touch changed lines), or contextual (issues in modified rule contexts)").option("--base <ref>", "base git ref for files/changed/lines/contextual scope (auto-detected when omitted)").option("--baseline <report.json>", "report only new issues compared with a saved JSON report").option("--include-untracked", "with --scope files/changed/lines/contextual, also scan ordinary untracked files (respects .gitignore)").addOption(new Option("--diff [base]", "[deprecated] alias for --scope changed (pass `false` to force a full scan)").hideHelp()).addOption(new Option("--changed-files-from <file>", "scan source files listed in a newline-delimited changed-files file").hideHelp()).option("--no-score", "skip the score API, the share URL, and crash reporting").addOption(new Option("--category <category>", "only show diagnostics in a category (repeatable; e.g. Security)").argParser(collectCategoryOption)).option("--no-telemetry", "alias for --no-score (skip the score API, share URL, and crash reporting)").option("--staged", "scan only staged (git index) files for pre-commit hooks (honors --project and config `projects`; exits 0 when nothing is staged)").option("--max-duration <seconds>", MAX_DURATION_OPTION_DESCRIPTION).option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").option("--warning-exit-code <code>", "exit code for non-blocking warnings (2-255). Ignored with --blocking none or --score", parseWarningExitCode).addOption(new Option("--fail-on <level>", "[deprecated] alias for --blocking <level>").hideHelp()).option("--no-respect-inline-disables", "audit mode: neutralize inline lint suppressions before scanning").option("--warnings", "show warning-severity diagnostics (default)").option("--no-warnings", "hide warning-severity diagnostics (errors only)").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderRootHelpEpilog);
|
|
3571
3571
|
program.action(async (positionalPaths = [], flags) => {
|
|
3572
|
-
const { runScanCommand } = await import("./scan-
|
|
3572
|
+
const { runScanCommand } = await import("./scan-DStBkQc_.js");
|
|
3573
3573
|
return runScanCommand({
|
|
3574
3574
|
...resolvePositionalScanInput(positionalPaths),
|
|
3575
3575
|
flags,
|
|
@@ -3577,75 +3577,75 @@ program.action(async (positionalPaths = [], flags) => {
|
|
|
3577
3577
|
});
|
|
3578
3578
|
});
|
|
3579
3579
|
program.command("design [directory]").description("Run only the focused UI design diagnostics").addHelpText("after", renderDesignHelpEpilog).action(async (directory, _options, command) => {
|
|
3580
|
-
const { designAction } = await import("./design-
|
|
3580
|
+
const { designAction } = await import("./design-XQwuAooI.js");
|
|
3581
3581
|
return designAction(directory ?? ".", command.optsWithGlobals());
|
|
3582
3582
|
});
|
|
3583
3583
|
program.command("scan").description("Scan a React interaction in Chrome until you press Enter").argument("[url]", "HTTP(S) URL of the running React app; detects local apps when omitted").option("-f, --format <format>", "report format: text, json, or jsonl", "text").option("--cdp <url>", "reuse Chrome at this remote-debugging endpoint").option("--trace-out <path>", "save the compressed .json.gz DevTools trace at this path").addHelpText("after", renderRuntimeScanHelpEpilog).action(async (url, options) => {
|
|
3584
|
-
const { runtimeScanAction } = await import("./runtime-scan-
|
|
3584
|
+
const { runtimeScanAction } = await import("./runtime-scan-CUd9z8wt.js");
|
|
3585
3585
|
return runtimeScanAction(url, options);
|
|
3586
3586
|
});
|
|
3587
3587
|
program.command("why <location>").description("Explain why a rule fired (or why a suppression didn't apply) at a file:line").option("--project <name>", "select projects: workspace names or directory paths (comma-separated for multiple)").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (location, options) => {
|
|
3588
|
-
const { whyAction } = await import("./why-
|
|
3588
|
+
const { whyAction } = await import("./why-Cdmh9drp.js");
|
|
3589
3589
|
return whyAction(location, options);
|
|
3590
3590
|
});
|
|
3591
3591
|
program.command("install").alias("setup").description("Install the react-doctor skill into your coding agents and optional git hook").option("-y, --yes", "skip prompts, install for all detected agents").option("--dry-run", "show what would be installed without writing files").option("--agent-hooks", "install end-of-turn agent hooks for Claude Code and Cursor").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderInstallHelpEpilog).action(async (options, command) => {
|
|
3592
|
-
const { installAction } = await import("./install-
|
|
3592
|
+
const { installAction } = await import("./install-KoxCju0L.js");
|
|
3593
3593
|
return installAction(options, command);
|
|
3594
3594
|
});
|
|
3595
3595
|
const providerOption = ["--provider <name>", "ci provider: github-actions or gitlab-ci (auto-detected by default)"];
|
|
3596
3596
|
const prOption = ["--pr", "open a pull request with the change instead of writing it to the working tree"];
|
|
3597
3597
|
const ci = program.command("ci").description("Set up, upgrade, and configure React Doctor in your CI");
|
|
3598
3598
|
ci.command("install").description("Add a CI workflow that scans every pull request").option(...providerOption).option(...prOption).option("--blocking <level>", "gate level: none (advisory, default), warning, or error").option("--scope <value>", "what a pull-request scan reports: changed (default), files, lines, full").option("--comment", "post a summary comment on each pull request").option("--no-comment", "don't post a summary comment").option("--review-comments", "add inline review comments on changed lines").option("--no-review-comments", "don't add inline review comments").option("--commit-status", "report a commit status with the health score").option("--no-commit-status", "don't report a commit status").option("-y, --yes", "skip prompts; use the defaults").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addHelpText("after", renderCiHelpEpilog).action(async (_options, command) => {
|
|
3599
|
-
const { ciInstallAction } = await import("./ci-
|
|
3599
|
+
const { ciInstallAction } = await import("./ci-D7ljXIo9.js");
|
|
3600
3600
|
return ciInstallAction(command.optsWithGlobals());
|
|
3601
3601
|
});
|
|
3602
3602
|
ci.command("config").description("Change the gate, scan scope, and pull-request reporting").option(...providerOption).option("--blocking <level>", "gate level: none (advisory), warning, or error").option("--scope <value>", "what a pull-request scan reports: changed, files, lines, contextual, or full").option("--comment", "post a summary comment on each pull request").option("--no-comment", "don't post a summary comment").option("--review-comments", "add inline review comments on changed lines").option("--no-review-comments", "don't add inline review comments").option("--commit-status", "report a commit status with the health score").option("--no-commit-status", "don't report a commit status").option("-y, --yes", "skip prompts; print the current settings").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (_options, command) => {
|
|
3603
|
-
const { ciConfigAction } = await import("./ci-
|
|
3603
|
+
const { ciConfigAction } = await import("./ci-D7ljXIo9.js");
|
|
3604
3604
|
return ciConfigAction(command.optsWithGlobals());
|
|
3605
3605
|
});
|
|
3606
3606
|
ci.command("upgrade").description("Upgrade the CI workflow to the action's current major").option(...providerOption).option(...prOption).option("-y, --yes", "skip prompts").option("-c, --cwd <cwd>", "working directory", process.cwd()).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async (_options, command) => {
|
|
3607
|
-
const { ciUpgradeAction } = await import("./ci-
|
|
3607
|
+
const { ciUpgradeAction } = await import("./ci-D7ljXIo9.js");
|
|
3608
3608
|
return ciUpgradeAction(command.optsWithGlobals());
|
|
3609
3609
|
});
|
|
3610
3610
|
program.command("version").description("show the version with Node and platform info").option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").action(async () => {
|
|
3611
|
-
const { versionAction } = await import("./version-
|
|
3611
|
+
const { versionAction } = await import("./version-gbK4YNDr.js");
|
|
3612
3612
|
return versionAction();
|
|
3613
3613
|
});
|
|
3614
3614
|
const rules = program.command("rules").description("List, explain, and configure which React Doctor rules run");
|
|
3615
3615
|
rules.command("list").description("List rules and the severity they run at under your config").option("--category <name>", "only show rules in a category (e.g. Performance)").option("--tag <name>", "only show rules with a tag (e.g. design, test-noise)").option("--framework <name>", "only show rules for a framework (e.g. global, nextjs)").option("--configured", "only show rules your config has changed from the default").option("--json", "output a structured JSON array").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (_options, command) => {
|
|
3616
|
-
const { rulesListAction } = await import("./rules-
|
|
3616
|
+
const { rulesListAction } = await import("./rules-DrN3BHA6.js");
|
|
3617
3617
|
return rulesListAction(command.optsWithGlobals());
|
|
3618
3618
|
});
|
|
3619
3619
|
rules.command("explain <rule>").description("Explain why a rule matters, its current severity, and how to configure it").option("--json", "output a structured JSON object").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
|
|
3620
|
-
const { rulesExplainAction } = await import("./rules-
|
|
3620
|
+
const { rulesExplainAction } = await import("./rules-DrN3BHA6.js");
|
|
3621
3621
|
return rulesExplainAction(rule, command.optsWithGlobals());
|
|
3622
3622
|
});
|
|
3623
3623
|
rules.command("set <rule> <severity>").description("Set a rule's severity: off, warn, or error").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, severity, _options, command) => {
|
|
3624
|
-
const { rulesSetAction } = await import("./rules-
|
|
3624
|
+
const { rulesSetAction } = await import("./rules-DrN3BHA6.js");
|
|
3625
3625
|
return rulesSetAction(rule, severity, command.optsWithGlobals());
|
|
3626
3626
|
});
|
|
3627
3627
|
rules.command("enable <rule>").description("Enable a rule at its recommended severity (or pass --severity)").option("--severity <level>", "severity to enable at: warn or error").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
|
|
3628
|
-
const { rulesEnableAction } = await import("./rules-
|
|
3628
|
+
const { rulesEnableAction } = await import("./rules-DrN3BHA6.js");
|
|
3629
3629
|
return rulesEnableAction(rule, command.optsWithGlobals());
|
|
3630
3630
|
});
|
|
3631
3631
|
rules.command("disable <rule>").description("Disable a rule so it never runs").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (rule, _options, command) => {
|
|
3632
|
-
const { rulesDisableAction } = await import("./rules-
|
|
3632
|
+
const { rulesDisableAction } = await import("./rules-DrN3BHA6.js");
|
|
3633
3633
|
return rulesDisableAction(rule, command.optsWithGlobals());
|
|
3634
3634
|
});
|
|
3635
3635
|
rules.command("category <category> <severity>").description("Set the severity for a whole category (off, warn, error)").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (category, severity, _options, command) => {
|
|
3636
|
-
const { rulesCategoryAction } = await import("./rules-
|
|
3636
|
+
const { rulesCategoryAction } = await import("./rules-DrN3BHA6.js");
|
|
3637
3637
|
return rulesCategoryAction(category, severity, command.optsWithGlobals());
|
|
3638
3638
|
});
|
|
3639
3639
|
rules.command("ignore-tag <tag>").description("Skip a whole rule family by tag before linting (e.g. design)").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (tag, _options, command) => {
|
|
3640
|
-
const { rulesIgnoreTagAction } = await import("./rules-
|
|
3640
|
+
const { rulesIgnoreTagAction } = await import("./rules-DrN3BHA6.js");
|
|
3641
3641
|
return rulesIgnoreTagAction(tag, command.optsWithGlobals());
|
|
3642
3642
|
});
|
|
3643
3643
|
rules.command("unignore-tag <tag>").description("Stop ignoring a tag previously skipped via ignore-tag").option("-c, --cwd <cwd>", "working directory", process.cwd()).action(async (tag, _options, command) => {
|
|
3644
|
-
const { rulesUnignoreTagAction } = await import("./rules-
|
|
3644
|
+
const { rulesUnignoreTagAction } = await import("./rules-DrN3BHA6.js");
|
|
3645
3645
|
return rulesUnignoreTagAction(tag, command.optsWithGlobals());
|
|
3646
3646
|
});
|
|
3647
3647
|
program.command("experimental-tui [directory]", { hidden: true }).description("[experimental] interactive, scrollable scan report").option("--blocking <level>", "severity that fails CI: error (default), warning, or none (advisory)").option("--warning-exit-code <code>", "exit code for non-blocking warnings (2-255). Ignored with --blocking none or --score", parseWarningExitCode).option("--color", "force colored output").option("--no-color", "disable colored output (also honors NO_COLOR)").addOption(new Option("--no-dead-code").hideHelp()).option("--no-supply-chain", "skip the dependency supply-chain scan").option("--score", "only print the numeric score (for scripts and CI)").option("--no-score", "skip the score API, the share URL, and crash reporting").option("--no-cache", "disable all scan caches for this run").option("--max-duration <seconds>", MAX_DURATION_OPTION_DESCRIPTION).option("-p, --project <names>", "scan specific workspace projects (comma-separated, or *)").option("-y, --yes", "skip the project prompt and scan every discovered project").action(async (directory = ".", _localOptions, command) => {
|
|
3648
|
-
const { runScanCommand } = await import("./scan-
|
|
3648
|
+
const { runScanCommand } = await import("./scan-DStBkQc_.js");
|
|
3649
3649
|
return runScanCommand({
|
|
3650
3650
|
directory,
|
|
3651
3651
|
flags: command.optsWithGlobals(),
|
|
@@ -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]="bcac37e1-2ec0-597c-aaf3-ea08895822b1")}catch(e){}}();
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
5
5
|
import fs from "node:fs";
|
|
@@ -11,13 +11,17 @@ import os from "node:os";
|
|
|
11
11
|
import crypto from "node:crypto";
|
|
12
12
|
import { Worker } from "node:worker_threads";
|
|
13
13
|
import * as net from "node:net";
|
|
14
|
-
//#region ../core/dist/constants-
|
|
14
|
+
//#region ../core/dist/constants-BCogC6RN.js
|
|
15
15
|
const HTML_FILE_PATTERN = /\.html$/i;
|
|
16
16
|
const SOURCE_FILE_PATTERN = /\.(?:astro|tsx?|jsx?|mts|mjs|[hH][tT][mM][lL])$/;
|
|
17
17
|
const GENERATED_BUNDLE_FILE_PATTERN = /\.(iife|umd|global|min)\.m?js$/i;
|
|
18
18
|
const GENERATED_SOURCE_DIRECTORY_PATTERN = /(?:^|\/)__generated__\//;
|
|
19
19
|
const TAILWIND_POSTCSS7_COMPAT_ALIAS = "npm:@tailwindcss/postcss7-compat";
|
|
20
20
|
const MINIFIED_SNIFF_BYTES = 65536;
|
|
21
|
+
const VITE_ENTRY_ASSET_FILE_PATTERN = /(?:^|[/\\])assets[/\\][^/\\]+-[\w-]{8}\.m?js$/;
|
|
22
|
+
const VITE_ENTRY_PRELUDE_SNIFF_BYTES = 1024;
|
|
23
|
+
const VITE_ENTRY_DENSITY_SAMPLE_BYTES = 32768;
|
|
24
|
+
MINIFIED_SNIFF_BYTES + 2 * VITE_ENTRY_DENSITY_SAMPLE_BYTES;
|
|
21
25
|
const GIT_LS_FILES_MAX_BUFFER_BYTES = 50 * 1024 * 1024;
|
|
22
26
|
const GIT_SOURCE_LISTING_ARGUMENTS = [
|
|
23
27
|
"ls-files",
|
|
@@ -306,6 +310,12 @@ const ES_TARGET_YEAR_BY_NAME = {
|
|
|
306
310
|
*/
|
|
307
311
|
const TSCONFIG_FILENAMES = ["tsconfig.json", "tsconfig.base.json"];
|
|
308
312
|
const DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS = [".react-doctor", "audit-backups"];
|
|
313
|
+
const LINT_IGNORE_STYLE_FILENAMES = [
|
|
314
|
+
".eslintignore",
|
|
315
|
+
".oxlintignore",
|
|
316
|
+
".prettierignore"
|
|
317
|
+
];
|
|
318
|
+
const LINT_LINGUIST_FILENAME = ".gitattributes";
|
|
309
319
|
/**
|
|
310
320
|
* Project-config files that `StagedFiles.materialize` copies into
|
|
311
321
|
* the temp directory alongside staged sources so oxlint resolves
|
|
@@ -317,6 +327,8 @@ const STAGED_FILES_PROJECT_CONFIG_FILENAMES = [
|
|
|
317
327
|
"tsconfig.json",
|
|
318
328
|
"tsconfig.base.json",
|
|
319
329
|
"package.json",
|
|
330
|
+
"pnpm-workspace.yaml",
|
|
331
|
+
"nx.json",
|
|
320
332
|
"doctor.config.ts",
|
|
321
333
|
"doctor.config.mts",
|
|
322
334
|
"doctor.config.cts",
|
|
@@ -326,7 +338,9 @@ const STAGED_FILES_PROJECT_CONFIG_FILENAMES = [
|
|
|
326
338
|
"doctor.config.json",
|
|
327
339
|
"doctor.config.jsonc",
|
|
328
340
|
"oxlint.json",
|
|
329
|
-
".oxlintrc.json"
|
|
341
|
+
".oxlintrc.json",
|
|
342
|
+
...LINT_IGNORE_STYLE_FILENAMES,
|
|
343
|
+
LINT_LINGUIST_FILENAME
|
|
330
344
|
];
|
|
331
345
|
const CONFIG_FINGERPRINT_FILENAMES = [
|
|
332
346
|
"doctor.config.ts",
|
|
@@ -340,6 +354,7 @@ const CONFIG_FINGERPRINT_FILENAMES = [
|
|
|
340
354
|
"react-doctor.config.json",
|
|
341
355
|
"package.json",
|
|
342
356
|
"pnpm-workspace.yaml",
|
|
357
|
+
"nx.json",
|
|
343
358
|
"tsconfig.json",
|
|
344
359
|
"tsconfig.base.json",
|
|
345
360
|
".oxlintrc.json",
|
|
@@ -349,7 +364,9 @@ const CONFIG_FINGERPRINT_FILENAMES = [
|
|
|
349
364
|
"yarn.lock",
|
|
350
365
|
"bun.lock",
|
|
351
366
|
"bun.lockb",
|
|
352
|
-
".gitignore"
|
|
367
|
+
".gitignore",
|
|
368
|
+
...LINT_IGNORE_STYLE_FILENAMES,
|
|
369
|
+
LINT_LINGUIST_FILENAME
|
|
353
370
|
];
|
|
354
371
|
const CANONICAL_GITHUB_URL = "https://github.com/millionco/react-doctor";
|
|
355
372
|
const CANONICAL_DISCORD_URL = "https://react.doctor/discord";
|
|
@@ -428,7 +445,7 @@ const ADOPTED_LINT_CONFIG_MAX_BYTES = 1024 * 1024;
|
|
|
428
445
|
//#region ../core/dist/react-compiler-detection-worker-protocol-Dp5LlrE8.js
|
|
429
446
|
const isReactCompilerDetectionReply = (value) => typeof value === "object" && value !== null && "id" in value && typeof value.id === "number" && "hasReactCompiler" in value && (typeof value.hasReactCompiler === "boolean" || value.hasReactCompiler === null);
|
|
430
447
|
//#endregion
|
|
431
|
-
//#region ../core/dist/react-compiler-detection-client-
|
|
448
|
+
//#region ../core/dist/react-compiler-detection-client-Cdrl3lr2.js
|
|
432
449
|
const pendingOutputsByRequestKey = /* @__PURE__ */ new Map();
|
|
433
450
|
const toRequestKey = (request) => [
|
|
434
451
|
request.directory,
|
|
@@ -1038,7 +1055,7 @@ const METRIC = {
|
|
|
1038
1055
|
jsonOutUsed: "json.out_used"
|
|
1039
1056
|
};
|
|
1040
1057
|
//#endregion
|
|
1041
|
-
export { warmReactCompilerDetection as $,
|
|
1058
|
+
export { warmReactCompilerDetection as $, OXLINT_OUTPUT_MAX_BYTES as $t, buildGitSourceListingRequest as A, SUPPLY_CHAIN_PLUGIN as An, GITHUB_ACTIONS_SETUP_URL as At, resolveGitCommand as B, VITE_ENTRY_DENSITY_SAMPLE_BYTES as Bn, LINT_IGNORE_STYLE_FILENAMES as Bt, SENTRY_RELEASE_PREFIX as C, SPAWN_ARGS_MAX_LENGTH_CHARS_POSIX as Cn, ENTERPRISE_CONTACT_URL as Ct, TUI_REPORT_COMPACT_MAX_ROWS as D, SUPPLY_CHAIN_CATEGORY as Dn, FILE_LINT_CACHE_MAX_FILE_COUNT as Dt, TRACKED_FILE_FLAGS_GIT_ARGUMENTS as E, SUPPLY_CHAIN_CACHE_TTL_MS as En, FILE_LINT_CACHE_FILENAME as Et, lowerChildProcessPriority as F, TELEMETRY_SHUTDOWN_TIMEOUT_MS as Fn, GIT_SOURCE_LISTING_ARGUMENTS as Ft, resolvePluginPath as G, MAINTAINABILITY_SOURCE_FILE_PATTERN as Gt, resolveOxlintThreadCount as H, getCategoryImpact as Hn, MAINTAINABILITY_CATEGORY as Ht, prefetchGitCommand as I, TSCONFIG_FILENAMES as In, HTML_FILE_PATTERN as It, resolveTsConfigRelativePath as J, MINIFIED_SNIFF_BYTES as Jt, resolveReactDoctorCacheDir as K, MAX_GLOB_PATTERN_LENGTH_CHARS as Kt, prespawnOxlintWorkers as L, TYPESCRIPT_DECLARATION_FILE_PATTERN as Ln, IGNORED_DIRECTORIES as Lt, buildOxlintWorkerSpawnSpec as M, TAILWIND_POSTCSS7_COMPAT_ALIAS as Mn, GIT_CHECK_ATTR_MAX_BUFFER_BYTES as Mt, discardPrefetchedGitCommands as N, TARGET_BLANK_BROWSER_SUPPORT as Nn, GIT_LS_FILES_MAX_BUFFER_BYTES as Nt, TUI_REPORT_DETAIL_WIDTH_FRACTION as O, SUPPLY_CHAIN_IGNORED_PACKAGES as On, GENERATED_BUNDLE_FILE_PATTERN as Ot, killUnadoptedOxlintWorkers as P, TELEMETRY_EXPORT_INTERVAL_MS as Pn, GIT_SHOW_MAX_BUFFER_BYTES as Pt, takeReactCompilerDetection as Q, OXLINT_OOM_RESCUE_BUDGET_MS as Qt, readSystemConcurrencyFacts as R, VERCEL_NEXTJS_SECURITY_RELEASE_URL as Rn, JSX_DUPLICATION_SOURCE_FILE_PATTERN as Rt, SENTRY_FLUSH_TIMEOUT_MS as S, SPAWN_ARGS_MAX_LENGTH_CHARS_DARWIN as Sn, DUPLICATE_JSX_WORKER_IDLE_TIMEOUT_MS as St, STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES as T, SUPPLY_CHAIN_CACHE_SUBDIR as Tn, FETCH_TIMEOUT_MS as Tt, resolveOxlintToolchainVersions as U, MAINTAINABILITY_DUPLICATE_JSX_RULE as Ut, resolveOxlintBinary as V, VITE_ENTRY_PRELUDE_SNIFF_BYTES as Vn, LINT_LINGUIST_FILENAME as Vt, resolveOxlintWorkerRuntime as W, MAINTAINABILITY_PLUGIN as Wt, spawnOxlintWorkerProcess as X, OXLINT_IGNORED_DECLARATION_DIAGNOSTIC_CODES as Xt, setChildProcessRef as Y, OCCURRENCE_MATCHED_CATEGORIES as Yt, takePrespawnedOxlintWorker as Z, OXLINT_NODE_REQUIREMENT as Zt, SCAN_PREAMBLE_SKIP_FLAGS as _, SOCKET_FREE_PURL_API_BASE as _n, DEFAULT_BRANCH_CANDIDATES as _t, CACHE_DISABLED_VALUES as a, PROJECT_ANALYSIS_WORKER_TIMEOUT_CEILING_MS as an, AXIOM_DEFAULT_DOMAIN as at, SCAN_RESULT_CACHE_MAX_HASHED_FILE_SIZE_BYTES as b, SOURCE_FILE_PATTERN as bn, DOCS_RULES_BASE_URL as bt, HEAD_SHA_GIT_ARGUMENTS as c, REACT_ROUTER_CAPABILITY_THRESHOLDS as cn, AXIOM_TRACES_PATH as ct, METRIC_DISTRIBUTION_BOUNDARIES as d, ROOT_CAUSE_GROUPABLE_RULE_KEYS as dn, CI_URL as dt, OXLINT_SPAWN_TIMEOUT_MS as en, ABORT_EXIT_CODES as et, MINIMUM_VTE_VERSION_FOR_HYPERLINKS as f, SCANNED_DOT_DIRECTORIES as fn, COMPILER_CLEANUP_BUCKET as ft, RUN_GIT_MAX_BUFFER_BYTES as g, SKILL_NAME as gn, CONFIG_SCHEMA_URL as gt, REPOSITORY_ROOT_GIT_ARGUMENTS as h, SIDECAR_LINT_CACHE_FILENAME as hn, CONFIG_FINGERPRINT_FILENAMES as ht, BASELINE_FILES_TEMP_DIR_PREFIX as i, PROJECT_ANALYSIS_WORKER_MEMORY_BUDGET_BYTES as in, AXIOM_DATASET_HEADER as it, buildOxlintChildEnv as j, SUPPLY_CHAIN_RULE as jn, GITHUB_VIEWER_PERMISSION_TIMEOUT_MS as jt, WORKTREE_STATUS_GIT_ARGUMENTS as k, SUPPLY_CHAIN_OVERLAP_TIMEOUT_MS as kn, GENERATED_SOURCE_DIRECTORY_PATTERN as kt, INTERNAL_ERROR_JSON_FALLBACK as l, REACT_SERVER_DOM_PACKAGES as ln, CANONICAL_DISCORD_URL as lt, REACT_DOCTOR_CONFIG_PROJECT_NAME as m, SHARE_BASE_URL as mn, CONFIG_CACHE_TTL_MS as mt, AXIOM_METRICS_DATASET as n, OXLINT_WORKER_JOB_END_MARKER as nn, ADOPTED_LINT_CONFIG_MAX_BYTES as nt, CI_TRUST_COMPANIES as o, PROJECT_ANALYSIS_WORKER_TIMEOUT_MS as on, AXIOM_METRICS_DATASET_HEADER as ot, NANOSECONDS_PER_MILLISECOND as p, SCORE_API_URL as pn, COMPILER_CLEANUP_RULE_KEYS as pt, resolveScanConcurrency as q, MILLISECONDS_PER_SECOND as qt, AXIOM_TRACES_DATASET as r, PROJECT_ANALYSIS_WORKER_MAX_OLD_SPACE_MB as rn, APP_ONLY_RULE_KEYS as rt, GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS as s, REACT_BLOG_RSC_ADVISORY_URL as sn, AXIOM_METRICS_PATH as st, AXIOM_INGEST_TOKEN as t, OXLINT_SPLIT_TOTAL_BUDGET_MS as tn, ADOPTABLE_LINT_CONFIG_FILENAMES as tt, METRIC as u, RECOMMENDED_PNPM_MINIMUM_RELEASE_AGE_MINUTES as un, CANONICAL_GITHUB_URL as ut, SCAN_RESULT_CACHE_FILENAME as v, SOCKET_FREE_USER_AGENT as vn, DIAGNOSTIC_CATEGORY_BUCKETS as vt, STAGED_FILES_TEMP_DIR_PREFIX as w, STAGED_FILES_PROJECT_CONFIG_FILENAMES as wn, ES_TARGET_YEAR_BY_NAME as wt, SENTRY_DSN as x, SPAWN_ARGS_MAX_LENGTH_CHARS as xn, DOCS_URL as xt, SCAN_RESULT_CACHE_GIT_ARGUMENTS as y, SOCKET_PACKAGE_PAGE_BASE as yn, DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS as yt, resolveConfiguredScanConcurrency as z, VITE_ENTRY_ASSET_FILE_PATTERN as zn, JSX_FILE_PATTERN as zt };
|
|
1042
1059
|
|
|
1043
|
-
//# sourceMappingURL=constants-
|
|
1044
|
-
//# debugId=
|
|
1060
|
+
//# sourceMappingURL=constants-BXN6vJ3T.js.map
|
|
1061
|
+
//# debugId=bcac37e1-2ec0-597c-aaf3-ea08895822b1
|
|
@@ -1,6 +1,13 @@
|
|
|
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]="5ade8f3b-6291-5d40-8bc7-805d873bd71f")}catch(e){}}();
|
|
3
3
|
const GIT_CHECK_ATTR_MAX_BUFFER_BYTES = 50 * 1024 * 1024;
|
|
4
|
+
const LINT_IGNORE_STYLE_FILENAMES = [
|
|
5
|
+
".eslintignore",
|
|
6
|
+
".oxlintignore",
|
|
7
|
+
".prettierignore"
|
|
8
|
+
];
|
|
9
|
+
[...LINT_IGNORE_STYLE_FILENAMES];
|
|
10
|
+
[...LINT_IGNORE_STYLE_FILENAMES];
|
|
4
11
|
const OXLINT_WORKER_JOB_END_MARKER = "__REACT_DOCTOR_OXLINT_JOB_END__";
|
|
5
12
|
const REACT_DOCTOR_PLUGIN_RESET_HOOK_KEY = Symbol.for("react-doctor.reset-filesystem-caches");
|
|
6
13
|
new Map(Object.entries({
|
|
@@ -19,5 +26,5 @@ const JSX_DUPLICATION_SOURCE_FILE_PATTERN = /\.[cm]?(?:jsx?|tsx)$/;
|
|
|
19
26
|
//#endregion
|
|
20
27
|
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
28
|
|
|
22
|
-
//# sourceMappingURL=constants-
|
|
23
|
-
//# debugId=
|
|
29
|
+
//# sourceMappingURL=constants-zyF-Em_y.js.map
|
|
30
|
+
//# debugId=5ade8f3b-6291-5d40-8bc7-805d873bd71f
|
|
@@ -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]="b1b192c7-1a0c-501f-b647-c860ec0e2ab5")}catch(e){}}();
|
|
3
|
+
import { t as inspectAction } from "./inspect-F_2FwEY4.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-XQwuAooI.js.map
|
|
14
|
+
//# debugId=b1b192c7-1a0c-501f-b647-c860ec0e2ab5
|
|
@@ -2,7 +2,7 @@
|
|
|
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]="2e6ed830-bad0-5ab3-ad49-45058c727107")}catch(e){}}();
|
|
3
3
|
import { t as typescriptBinding } from "./_react-doctor_require-typescript-DXQDYeWK.js";
|
|
4
4
|
import { t as unwrapTypescriptExpression } from "./unwrap-typescript-expression-CrEPQUWz.js";
|
|
5
|
-
import { i as JSX_DUPLICATION_SOURCE_FILE_PATTERN } from "./constants-
|
|
5
|
+
import { i as JSX_DUPLICATION_SOURCE_FILE_PATTERN } from "./constants-zyF-Em_y.js";
|
|
6
6
|
import * as fs$2 from "node:fs";
|
|
7
7
|
import * as path$1 from "node:path";
|
|
8
8
|
import crypto from "node:crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { d as isJsonModeActive, m as writeJsonCancellationReport } from "./record-metric-
|
|
4
|
-
import { n as shutdownTelemetry, r as flushSentry } from "./telemetry-runtime-
|
|
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]="822ab8d4-8dda-52bf-bc0b-f525ee1c75fb")}catch(e){}}();
|
|
3
|
+
import { d as isJsonModeActive, m as writeJsonCancellationReport } from "./record-metric-CqZ2oVM5.js";
|
|
4
|
+
import { n as shutdownTelemetry, r as flushSentry } from "./telemetry-runtime-DJWGuzba.js";
|
|
5
5
|
import { t as activeScanAbortRegistry } from "./active-scan-abort-registry-CCTgal0O.js";
|
|
6
|
-
import { n as buildFooterLinkLines, t as buildSectionDivider } from "./build-section-divider-
|
|
6
|
+
import { n as buildFooterLinkLines, t as buildSectionDivider } from "./build-section-divider-M4JYIvJl.js";
|
|
7
7
|
//#region src/cli/utils/active-tui-renderer.ts
|
|
8
8
|
let activeTuiRenderer = null;
|
|
9
9
|
const registerActiveTuiRenderer = (renderer) => {
|
|
@@ -50,5 +50,5 @@ const exitGracefully = () => {
|
|
|
50
50
|
//#endregion
|
|
51
51
|
export { registerActiveTuiRenderer as n, exitGracefully as t };
|
|
52
52
|
|
|
53
|
-
//# sourceMappingURL=exit-gracefully-
|
|
54
|
-
//# debugId=
|
|
53
|
+
//# sourceMappingURL=exit-gracefully-BOyeEcyb.js.map
|
|
54
|
+
//# debugId=822ab8d4-8dda-52bf-bc0b-f525ee1c75fb
|
|
@@ -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 { lt as CANONICAL_DISCORD_URL, u as METRIC, ut as CANONICAL_GITHUB_URL } from "./constants-
|
|
4
|
-
import { En as runSync, It as isReactDoctorError, Nt as highlighter, Wn as isErrnoException, _ as VERSION, _n as gen, bt as formatErrorChain, ln as error, t as recordCount, xt as formatReactDoctorError } from "./record-metric-
|
|
5
|
-
import { c as isNpmCacheCorruptionError, l as formatEnvironmentError, s as formatNpmCacheCorruptionError, u as isEnvironmentError } from "./telemetry-runtime-
|
|
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]="53b3cf5e-67a0-5db3-9b9e-865d4f0e0d13")}catch(e){}}();
|
|
3
|
+
import { lt as CANONICAL_DISCORD_URL, u as METRIC, ut as CANONICAL_GITHUB_URL } from "./constants-BXN6vJ3T.js";
|
|
4
|
+
import { En as runSync, It as isReactDoctorError, Nt as highlighter, Wn as isErrnoException, _ as VERSION, _n as gen, bt as formatErrorChain, ln as error, t as recordCount, xt as formatReactDoctorError } from "./record-metric-CqZ2oVM5.js";
|
|
5
|
+
import { c as isNpmCacheCorruptionError, l as formatEnvironmentError, s as formatNpmCacheCorruptionError, u as isEnvironmentError } from "./telemetry-runtime-DJWGuzba.js";
|
|
6
6
|
//#region src/cli/utils/handle-error.ts
|
|
7
7
|
const OTLP_ENDPOINT_ENVIRONMENT_VARIABLE = "REACT_DOCTOR_OTLP_ENDPOINT";
|
|
8
8
|
const OTLP_AUTH_HEADER_ENVIRONMENT_VARIABLE = "REACT_DOCTOR_OTLP_AUTH_HEADER";
|
|
@@ -111,5 +111,5 @@ const handleUserError = (error$1, options = {}) => {
|
|
|
111
111
|
//#endregion
|
|
112
112
|
export { handleUserError as n, handleError as t };
|
|
113
113
|
|
|
114
|
-
//# sourceMappingURL=handle-error-
|
|
115
|
-
//# debugId=
|
|
114
|
+
//# sourceMappingURL=handle-error-UWlOKn6r.js.map
|
|
115
|
+
//# debugId=53b3cf5e-67a0-5db3-9b9e-865d4f0e0d13
|
package/dist/index.d.ts
CHANGED
|
@@ -341,7 +341,7 @@ interface Pipeable {
|
|
|
341
341
|
*/
|
|
342
342
|
declare const Class$1: new () => Pipeable;
|
|
343
343
|
//#endregion
|
|
344
|
-
//#region ../core/dist/resolve-scan-concurrency-
|
|
344
|
+
//#region ../core/dist/resolve-scan-concurrency-L_F79m9a.d.ts
|
|
345
345
|
/**
|
|
346
346
|
* A secondary source location attached to a diagnostic (oxlint's
|
|
347
347
|
* non-primary labels). Editors render these as
|
|
@@ -599,6 +599,12 @@ interface SupplyChainConfig {
|
|
|
599
599
|
*/
|
|
600
600
|
includeDevDependencies?: boolean;
|
|
601
601
|
}
|
|
602
|
+
interface OnlyExportComponentsConfig {
|
|
603
|
+
allowExportNames?: string[];
|
|
604
|
+
allowConstantExport?: boolean;
|
|
605
|
+
customHOCs?: string[];
|
|
606
|
+
checkJS?: boolean;
|
|
607
|
+
}
|
|
602
608
|
interface ReactDoctorConfig {
|
|
603
609
|
$schema?: string;
|
|
604
610
|
ignore?: ReactDoctorIgnoreConfig;
|
|
@@ -754,6 +760,15 @@ interface ReactDoctorConfig {
|
|
|
754
760
|
* no auth noun — e.g. a project-local `requireWorkspaceMember`.
|
|
755
761
|
*/
|
|
756
762
|
serverAuthFunctionNames?: string[];
|
|
763
|
+
/**
|
|
764
|
+
* Options for the `only-export-components` rule, mirroring
|
|
765
|
+
* `eslint-plugin-react-refresh`. List project HOCs in `customHOCs`
|
|
766
|
+
* (e.g. `withErrorBoundary`) so `export const Screen =
|
|
767
|
+
* withErrorBoundary(ScreenContent)` counts as a component export;
|
|
768
|
+
* `allowExportNames`, `allowConstantExport`, and `checkJS` work the
|
|
769
|
+
* same as upstream. Unset keys keep the rule's defaults.
|
|
770
|
+
*/
|
|
771
|
+
onlyExportComponents?: OnlyExportComponentsConfig;
|
|
757
772
|
/**
|
|
758
773
|
* Whether to respect inline `// eslint-disable*`, `// oxlint-disable*`,
|
|
759
774
|
* and `// react-doctor-disable*` comments in source files. Default: `true`.
|