react-doctor 0.9.23-dev.9413f2d → 0.9.23-dev.a9f8f5e
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-O-ZDqJNj.js → build-section-divider-BUVb5C3q.js} +5 -5
- package/dist/{ci-D_Dwt5x6.js → ci-DmpRpw60.js} +13 -13
- package/dist/cli.js +25 -25
- package/dist/{constants-BmD_c3Yq.js → constants-EMNGZNtj.js} +10 -6
- package/dist/constants-T2clfs7L.js +2 -2
- package/dist/{design-UdTKwfua.js → design-B2AFTWPm.js} +4 -4
- package/dist/{exit-gracefully-Bg3cQ-ab.js → exit-gracefully-COX_0pIA.js} +6 -6
- package/dist/{handle-error-DK1Cwk0S.js → handle-error-JGI0VjJ_.js} +6 -6
- package/dist/index.js +61 -21
- package/dist/{inspect-dDNzgR0W.js → inspect-Csn-D4e7.js} +16 -16
- package/dist/{install-DN3z3DeP.js → install-B_HKPZnA.js} +10 -10
- package/dist/{install-doctor-script-DPeyna6C.js → install-doctor-script-C7ZcfOyV.js} +5 -5
- package/dist/{install-github-workflow-DfJxpKNm.js → install-github-workflow-DD65m71e.js} +6 -6
- package/dist/{install-react-doctor-CyOTFmCo.js → install-react-doctor-DVaf9uig.js} +9 -9
- package/dist/{is-cache-globally-disabled-CveNGcRi.js → is-cache-globally-disabled-CYjFzsDs.js} +4 -4
- package/dist/{jsx-runtime-VZe82PxE.js → jsx-runtime-I75HKe0d.js} +6 -6
- package/dist/{print-branded-header-nLREE-RG.js → print-branded-header-Cpqrn8Z0.js} +4 -4
- package/dist/project-analysis-worker.js +104 -6
- package/dist/{prompt-runtime-scan-url-xneK6fnw.js → prompt-runtime-scan-url-DHS43C3Z.js} +5 -5
- package/dist/{read-object-file-BX3zMVdF.js → read-object-file-DN2kBtSt.js} +4 -4
- package/dist/{record-metric-D0zFHPCM.js → record-metric-CsvG1DEl.js} +58 -22
- package/dist/{report-error-CQRIK6c5.js → report-error-CoEvmdXq.js} +6 -6
- package/dist/{report-workflow-result-BDyGEX4s.js → report-workflow-result-BQfux7m8.js} +6 -6
- package/dist/{resolve-scan-exit-code-Dih6tmMq.js → resolve-scan-exit-code-CEVlTaGO.js} +13 -13
- package/dist/{resolve-scope-CNj3VOa2.js → resolve-scope-DPTg9AXn.js} +6 -6
- package/dist/{rules-Be49Hc4E.js → rules-CPID6VRQ.js} +7 -7
- package/dist/{run-scan-app-B79BhQOV.js → run-scan-app-BGz44hh1.js} +11 -11
- package/dist/{runtime-scan-WgtqujTX.js → runtime-scan-D5M230BR.js} +10 -10
- package/dist/{sanitize-runtime-url-BqUNAFxO.js → sanitize-runtime-url-B1diXe3I.js} +4 -4
- package/dist/{scan-ClM-rBaM.js → scan-Czq8vFpA.js} +10 -10
- package/dist/{should-skip-prompts-BAF_XEVo.js → should-skip-prompts-DK9kL1Jb.js} +4 -4
- package/dist/{should-use-tui-uCfRolPK.js → should-use-tui-BPCRJnN1.js} +4 -4
- package/dist/{start-scan-preamble-DDAT_0oB.js → start-scan-preamble-Zd-z2ssT.js} +5 -5
- package/dist/start-scan-preamble.js +3 -3
- package/dist/{telemetry-runtime-CDP0pvoN.js → telemetry-runtime-DUgifeE1.js} +7 -7
- package/dist/{version-DZetoAyI.js → version-DePuWob4.js} +5 -5
- package/dist/{why-Baji42ba.js → why-Kq4PlC0y.js} +4 -4
- package/dist/{with-run-span-DFuX32jO.js → with-run-span-BvN0J_j_.js} +6 -6
- package/package.json +4 -4
|
@@ -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]="080d5139-eb45-5d17-a97a-43227a319891")}catch(e){}}();
|
|
3
|
+
import { ut as CANONICAL_GITHUB_URL, xt as DOCS_URL } from "./constants-EMNGZNtj.js";
|
|
4
|
+
import { Nt as highlighter } from "./record-metric-CsvG1DEl.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-BUVb5C3q.js.map
|
|
81
|
+
//# debugId=080d5139-eb45-5d17-a97a-43227a319891
|
|
@@ -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]="458b903f-ddfa-5375-a958-8f1656d4e90d")}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-EMNGZNtj.js";
|
|
5
|
+
import { En as runSync, Nt as highlighter, _t as findGitRepositoryRoot, t as recordCount } from "./record-metric-CsvG1DEl.js";
|
|
6
|
+
import { o as isExpectedUserError } from "./telemetry-runtime-DUgifeE1.js";
|
|
7
|
+
import { n as handleUserError, t as handleError } from "./handle-error-JGI0VjJ_.js";
|
|
8
|
+
import { t as reportErrorToSentry } from "./report-error-CoEvmdXq.js";
|
|
9
|
+
import { N as cliLogger, c as spinner, n as findNearestPackageDirectory } from "./install-doctor-script-C7ZcfOyV.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-DD65m71e.js";
|
|
11
|
+
import { a as isValidBlockingLevel, c as openWorkflowPullRequest, l as stageWorkflowFile, n as isScopeValue } from "./resolve-scope-DPTg9AXn.js";
|
|
12
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-DK9kL1Jb.js";
|
|
13
|
+
import { t as printBrandedHeader } from "./print-branded-header-Cpqrn8Z0.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-DmpRpw60.js.map
|
|
7513
|
+
//# debugId=458b903f-ddfa-5375-a958-8f1656d4e90d
|
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-EMNGZNtj.js";
|
|
5
|
+
import "./start-scan-preamble-Zd-z2ssT.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-CsvG1DEl.js";
|
|
7
|
+
import { a as initializeSentry, n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-DUgifeE1.js";
|
|
8
|
+
import { t as exitGracefully } from "./exit-gracefully-COX_0pIA.js";
|
|
9
|
+
import { n as handleUserError, t as handleError } from "./handle-error-JGI0VjJ_.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-CoEvmdXq.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-Czq8vFpA.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-B2AFTWPm.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-D5M230BR.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-Kq4PlC0y.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-B_HKPZnA.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-DmpRpw60.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-DmpRpw60.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-DmpRpw60.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-DePuWob4.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-CPID6VRQ.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-CPID6VRQ.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-CPID6VRQ.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-CPID6VRQ.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-CPID6VRQ.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-CPID6VRQ.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-CPID6VRQ.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-CPID6VRQ.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-Czq8vFpA.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]="cc51fb83-42e8-588d-90ad-ec7c51329f36")}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-Dm_1JQD-.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",
|
|
@@ -428,7 +432,7 @@ const ADOPTED_LINT_CONFIG_MAX_BYTES = 1024 * 1024;
|
|
|
428
432
|
//#region ../core/dist/react-compiler-detection-worker-protocol-Dp5LlrE8.js
|
|
429
433
|
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
434
|
//#endregion
|
|
431
|
-
//#region ../core/dist/react-compiler-detection-client-
|
|
435
|
+
//#region ../core/dist/react-compiler-detection-client-CXd4Mzn3.js
|
|
432
436
|
const pendingOutputsByRequestKey = /* @__PURE__ */ new Map();
|
|
433
437
|
const toRequestKey = (request) => [
|
|
434
438
|
request.directory,
|
|
@@ -1038,7 +1042,7 @@ const METRIC = {
|
|
|
1038
1042
|
jsonOutUsed: "json.out_used"
|
|
1039
1043
|
};
|
|
1040
1044
|
//#endregion
|
|
1041
|
-
export { warmReactCompilerDetection as $, OXLINT_SPLIT_TOTAL_BUDGET_MS as $t, buildGitSourceListingRequest as A, TAILWIND_POSTCSS7_COMPAT_ALIAS as An, GITHUB_ACTIONS_SETUP_URL as At, resolveGitCommand as B, MAINTAINABILITY_CATEGORY as Bt, SENTRY_RELEASE_PREFIX as C, SUPPLY_CHAIN_CACHE_SUBDIR as Cn, ENTERPRISE_CONTACT_URL as Ct, TUI_REPORT_COMPACT_MAX_ROWS as D, SUPPLY_CHAIN_OVERLAP_TIMEOUT_MS as Dn, FILE_LINT_CACHE_MAX_FILE_COUNT as Dt, TRACKED_FILE_FLAGS_GIT_ARGUMENTS as E, SUPPLY_CHAIN_IGNORED_PACKAGES as En, FILE_LINT_CACHE_FILENAME as Et, lowerChildProcessPriority as F, TYPESCRIPT_DECLARATION_FILE_PATTERN as Fn, GIT_SOURCE_LISTING_ARGUMENTS as Ft, resolvePluginPath as G, MILLISECONDS_PER_SECOND as Gt, resolveOxlintThreadCount as H, MAINTAINABILITY_PLUGIN as Ht, prefetchGitCommand as I, VERCEL_NEXTJS_SECURITY_RELEASE_URL as In, HTML_FILE_PATTERN as It, resolveTsConfigRelativePath as J, OXLINT_IGNORED_DECLARATION_DIAGNOSTIC_CODES as Jt, resolveReactDoctorCacheDir as K, MINIFIED_SNIFF_BYTES as Kt, prespawnOxlintWorkers as L,
|
|
1045
|
+
export { warmReactCompilerDetection as $, OXLINT_SPLIT_TOTAL_BUDGET_MS as $t, buildGitSourceListingRequest as A, TAILWIND_POSTCSS7_COMPAT_ALIAS as An, GITHUB_ACTIONS_SETUP_URL as At, resolveGitCommand as B, getCategoryImpact as Bn, MAINTAINABILITY_CATEGORY as Bt, SENTRY_RELEASE_PREFIX as C, SUPPLY_CHAIN_CACHE_SUBDIR as Cn, ENTERPRISE_CONTACT_URL as Ct, TUI_REPORT_COMPACT_MAX_ROWS as D, SUPPLY_CHAIN_OVERLAP_TIMEOUT_MS as Dn, FILE_LINT_CACHE_MAX_FILE_COUNT as Dt, TRACKED_FILE_FLAGS_GIT_ARGUMENTS as E, SUPPLY_CHAIN_IGNORED_PACKAGES as En, FILE_LINT_CACHE_FILENAME as Et, lowerChildProcessPriority as F, TYPESCRIPT_DECLARATION_FILE_PATTERN as Fn, GIT_SOURCE_LISTING_ARGUMENTS as Ft, resolvePluginPath as G, MILLISECONDS_PER_SECOND as Gt, resolveOxlintThreadCount as H, MAINTAINABILITY_PLUGIN as Ht, prefetchGitCommand as I, VERCEL_NEXTJS_SECURITY_RELEASE_URL as In, HTML_FILE_PATTERN as It, resolveTsConfigRelativePath as J, OXLINT_IGNORED_DECLARATION_DIAGNOSTIC_CODES as Jt, resolveReactDoctorCacheDir as K, MINIFIED_SNIFF_BYTES as Kt, prespawnOxlintWorkers as L, VITE_ENTRY_ASSET_FILE_PATTERN as Ln, IGNORED_DIRECTORIES as Lt, buildOxlintWorkerSpawnSpec as M, TELEMETRY_EXPORT_INTERVAL_MS as Mn, GIT_CHECK_ATTR_MAX_BUFFER_BYTES as Mt, discardPrefetchedGitCommands as N, TELEMETRY_SHUTDOWN_TIMEOUT_MS as Nn, GIT_LS_FILES_MAX_BUFFER_BYTES as Nt, TUI_REPORT_DETAIL_WIDTH_FRACTION as O, SUPPLY_CHAIN_PLUGIN as On, GENERATED_BUNDLE_FILE_PATTERN as Ot, killUnadoptedOxlintWorkers as P, TSCONFIG_FILENAMES as Pn, GIT_SHOW_MAX_BUFFER_BYTES as Pt, takeReactCompilerDetection as Q, OXLINT_SPAWN_TIMEOUT_MS as Qt, readSystemConcurrencyFacts as R, VITE_ENTRY_DENSITY_SAMPLE_BYTES as Rn, JSX_DUPLICATION_SOURCE_FILE_PATTERN as Rt, SENTRY_FLUSH_TIMEOUT_MS as S, STAGED_FILES_PROJECT_CONFIG_FILENAMES as Sn, DUPLICATE_JSX_WORKER_IDLE_TIMEOUT_MS as St, STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES as T, SUPPLY_CHAIN_CATEGORY as Tn, FETCH_TIMEOUT_MS as Tt, resolveOxlintToolchainVersions as U, MAINTAINABILITY_SOURCE_FILE_PATTERN as Ut, resolveOxlintBinary as V, MAINTAINABILITY_DUPLICATE_JSX_RULE as Vt, resolveOxlintWorkerRuntime as W, MAX_GLOB_PATTERN_LENGTH_CHARS as Wt, spawnOxlintWorkerProcess as X, OXLINT_OOM_RESCUE_BUDGET_MS as Xt, setChildProcessRef as Y, OXLINT_NODE_REQUIREMENT as Yt, takePrespawnedOxlintWorker as Z, OXLINT_OUTPUT_MAX_BYTES as Zt, SCAN_PREAMBLE_SKIP_FLAGS as _, SOCKET_PACKAGE_PAGE_BASE as _n, DEFAULT_BRANCH_CANDIDATES as _t, CACHE_DISABLED_VALUES as a, REACT_BLOG_RSC_ADVISORY_URL as an, AXIOM_DEFAULT_DOMAIN as at, SCAN_RESULT_CACHE_MAX_HASHED_FILE_SIZE_BYTES as b, SPAWN_ARGS_MAX_LENGTH_CHARS_DARWIN as bn, DOCS_RULES_BASE_URL as bt, HEAD_SHA_GIT_ARGUMENTS as c, RECOMMENDED_PNPM_MINIMUM_RELEASE_AGE_MINUTES as cn, AXIOM_TRACES_PATH as ct, METRIC_DISTRIBUTION_BOUNDARIES as d, SCORE_API_URL as dn, CI_URL as dt, OXLINT_WORKER_JOB_END_MARKER as en, ABORT_EXIT_CODES as et, MINIMUM_VTE_VERSION_FOR_HYPERLINKS as f, SHARE_BASE_URL as fn, COMPILER_CLEANUP_BUCKET as ft, RUN_GIT_MAX_BUFFER_BYTES as g, SOCKET_FREE_USER_AGENT as gn, CONFIG_SCHEMA_URL as gt, REPOSITORY_ROOT_GIT_ARGUMENTS as h, SOCKET_FREE_PURL_API_BASE as hn, CONFIG_FINGERPRINT_FILENAMES as ht, BASELINE_FILES_TEMP_DIR_PREFIX as i, PROJECT_ANALYSIS_WORKER_TIMEOUT_MS as in, AXIOM_DATASET_HEADER as it, buildOxlintChildEnv as j, TARGET_BLANK_BROWSER_SUPPORT as jn, GITHUB_VIEWER_PERMISSION_TIMEOUT_MS as jt, WORKTREE_STATUS_GIT_ARGUMENTS as k, SUPPLY_CHAIN_RULE as kn, GENERATED_SOURCE_DIRECTORY_PATTERN as kt, INTERNAL_ERROR_JSON_FALLBACK as l, ROOT_CAUSE_GROUPABLE_RULE_KEYS as ln, CANONICAL_DISCORD_URL as lt, REACT_DOCTOR_CONFIG_PROJECT_NAME as m, SKILL_NAME as mn, CONFIG_CACHE_TTL_MS as mt, AXIOM_METRICS_DATASET as n, PROJECT_ANALYSIS_WORKER_MEMORY_BUDGET_BYTES as nn, ADOPTED_LINT_CONFIG_MAX_BYTES as nt, CI_TRUST_COMPANIES as o, REACT_ROUTER_CAPABILITY_THRESHOLDS as on, AXIOM_METRICS_DATASET_HEADER as ot, NANOSECONDS_PER_MILLISECOND as p, SIDECAR_LINT_CACHE_FILENAME as pn, COMPILER_CLEANUP_RULE_KEYS as pt, resolveScanConcurrency as q, OCCURRENCE_MATCHED_CATEGORIES as qt, AXIOM_TRACES_DATASET as r, PROJECT_ANALYSIS_WORKER_TIMEOUT_CEILING_MS as rn, APP_ONLY_RULE_KEYS as rt, GH_DEFAULT_BRANCH_PROBE_TIMEOUT_MS as s, REACT_SERVER_DOM_PACKAGES as sn, AXIOM_METRICS_PATH as st, AXIOM_INGEST_TOKEN as t, PROJECT_ANALYSIS_WORKER_MAX_OLD_SPACE_MB as tn, ADOPTABLE_LINT_CONFIG_FILENAMES as tt, METRIC as u, SCANNED_DOT_DIRECTORIES as un, CANONICAL_GITHUB_URL as ut, SCAN_RESULT_CACHE_FILENAME as v, SOURCE_FILE_PATTERN as vn, DIAGNOSTIC_CATEGORY_BUCKETS as vt, STAGED_FILES_TEMP_DIR_PREFIX as w, SUPPLY_CHAIN_CACHE_TTL_MS as wn, ES_TARGET_YEAR_BY_NAME as wt, SENTRY_DSN as x, SPAWN_ARGS_MAX_LENGTH_CHARS_POSIX as xn, DOCS_URL as xt, SCAN_RESULT_CACHE_GIT_ARGUMENTS as y, SPAWN_ARGS_MAX_LENGTH_CHARS as yn, DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS as yt, resolveConfiguredScanConcurrency as z, VITE_ENTRY_PRELUDE_SNIFF_BYTES as zn, JSX_FILE_PATTERN as zt };
|
|
1042
1046
|
|
|
1043
|
-
//# sourceMappingURL=constants-
|
|
1044
|
-
//# debugId=
|
|
1047
|
+
//# sourceMappingURL=constants-EMNGZNtj.js.map
|
|
1048
|
+
//# debugId=cc51fb83-42e8-588d-90ad-ec7c51329f36
|
|
@@ -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]="0205ef54-1f44-5248-963b-b2b17cb287d0")}catch(e){}}();
|
|
3
3
|
const GIT_CHECK_ATTR_MAX_BUFFER_BYTES = 50 * 1024 * 1024;
|
|
4
4
|
const OXLINT_WORKER_JOB_END_MARKER = "__REACT_DOCTOR_OXLINT_JOB_END__";
|
|
5
5
|
const REACT_DOCTOR_PLUGIN_RESET_HOOK_KEY = Symbol.for("react-doctor.reset-filesystem-caches");
|
|
@@ -20,4 +20,4 @@ const JSX_DUPLICATION_SOURCE_FILE_PATTERN = /\.[cm]?(?:jsx?|tsx)$/;
|
|
|
20
20
|
export { MAX_GLOB_PATTERN_LENGTH_CHARS as a, GIT_CHECK_ATTR_MAX_BUFFER_BYTES as c, JSX_DUPLICATION_SOURCE_FILE_PATTERN as i, JSX_DUPLICATION_DEFAULT_MAX_SOURCE_FILES as n, OXLINT_WORKER_JOB_END_MARKER as o, JSX_DUPLICATION_DEFAULT_MAX_SOURCE_LENGTH_CHARS as r, REACT_DOCTOR_PLUGIN_RESET_HOOK_KEY as s, JSX_DUPLICATION_DEFAULT_MAX_JSX_NODES as t };
|
|
21
21
|
|
|
22
22
|
//# sourceMappingURL=constants-T2clfs7L.js.map
|
|
23
|
-
//# debugId=
|
|
23
|
+
//# debugId=0205ef54-1f44-5248-963b-b2b17cb287d0
|
|
@@ -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]="6fc58e28-6eba-535d-9770-7f5a13cd66bd")}catch(e){}}();
|
|
3
|
+
import { t as inspectAction } from "./inspect-Csn-D4e7.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-B2AFTWPm.js.map
|
|
14
|
+
//# debugId=6fc58e28-6eba-535d-9770-7f5a13cd66bd
|
|
@@ -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]="e8f00ef0-bdcb-539f-9b00-0fe1a5b5dca5")}catch(e){}}();
|
|
3
|
+
import { d as isJsonModeActive, m as writeJsonCancellationReport } from "./record-metric-CsvG1DEl.js";
|
|
4
|
+
import { n as shutdownTelemetry, r as flushSentry } from "./telemetry-runtime-DUgifeE1.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-BUVb5C3q.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-COX_0pIA.js.map
|
|
54
|
+
//# debugId=e8f00ef0-bdcb-539f-9b00-0fe1a5b5dca5
|
|
@@ -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]="a62b5299-49ad-516d-9342-7a44c89634d5")}catch(e){}}();
|
|
3
|
+
import { lt as CANONICAL_DISCORD_URL, u as METRIC, ut as CANONICAL_GITHUB_URL } from "./constants-EMNGZNtj.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-CsvG1DEl.js";
|
|
5
|
+
import { c as isNpmCacheCorruptionError, l as formatEnvironmentError, s as formatNpmCacheCorruptionError, u as isEnvironmentError } from "./telemetry-runtime-DUgifeE1.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-JGI0VjJ_.js.map
|
|
115
|
+
//# debugId=a62b5299-49ad-516d-9342-7a44c89634d5
|
package/dist/index.js
CHANGED
|
@@ -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]="4d840b41-57ef-54cb-9a14-4f0b6ab7d42e")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import * as fs$1$2 from "node:fs";
|
|
@@ -26,12 +26,16 @@ import { PassThrough } from "node:stream";
|
|
|
26
26
|
import { convertToTSX } from "@astrojs/compiler/sync";
|
|
27
27
|
import { STATUS_CODES } from "node:http";
|
|
28
28
|
import { gzipSync } from "node:zlib";
|
|
29
|
-
//#region ../core/dist/constants-
|
|
29
|
+
//#region ../core/dist/constants-Dm_1JQD-.js
|
|
30
30
|
const HTML_FILE_PATTERN = /\.html$/i;
|
|
31
31
|
const SOURCE_FILE_PATTERN = /\.(?:astro|tsx?|jsx?|mts|mjs|[hH][tT][mM][lL])$/;
|
|
32
32
|
const GENERATED_BUNDLE_FILE_PATTERN = /\.(iife|umd|global|min)\.m?js$/i;
|
|
33
33
|
const GENERATED_SOURCE_DIRECTORY_PATTERN = /(?:^|\/)__generated__\//;
|
|
34
34
|
const MINIFIED_SNIFF_BYTES = 65536;
|
|
35
|
+
const VITE_ENTRY_ASSET_FILE_PATTERN = /(?:^|[/\\])assets[/\\][^/\\]+-[\w-]{8}\.m?js$/;
|
|
36
|
+
const VITE_ENTRY_PRELUDE_SNIFF_BYTES = 1024;
|
|
37
|
+
const VITE_ENTRY_DENSITY_SAMPLE_BYTES = 32768;
|
|
38
|
+
MINIFIED_SNIFF_BYTES + 2 * VITE_ENTRY_DENSITY_SAMPLE_BYTES;
|
|
35
39
|
const GIT_LS_FILES_MAX_BUFFER_BYTES = 50 * 1024 * 1024;
|
|
36
40
|
const GIT_SOURCE_LISTING_ARGUMENTS = [
|
|
37
41
|
"ls-files",
|
|
@@ -441,7 +445,7 @@ const isPlainObject = (value) => {
|
|
|
441
445
|
//#region ../core/dist/react-compiler-detection-worker-protocol-Dp5LlrE8.js
|
|
442
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);
|
|
443
447
|
//#endregion
|
|
444
|
-
//#region ../core/dist/react-compiler-detection-client-
|
|
448
|
+
//#region ../core/dist/react-compiler-detection-client-CXd4Mzn3.js
|
|
445
449
|
const pendingOutputsByRequestKey = /* @__PURE__ */ new Map();
|
|
446
450
|
const toRequestKey = (request) => [
|
|
447
451
|
request.directory,
|
|
@@ -2716,7 +2720,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2716
2720
|
module.exports = picomatch;
|
|
2717
2721
|
}));
|
|
2718
2722
|
//#endregion
|
|
2719
|
-
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-
|
|
2723
|
+
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-Dw_TcehS.js
|
|
2720
2724
|
var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2721
2725
|
const pico = require_picomatch$1();
|
|
2722
2726
|
const utils = require_utils();
|
|
@@ -2832,6 +2836,7 @@ const compileGlobPatternsLenient = (patterns, onInvalid) => {
|
|
|
2832
2836
|
}
|
|
2833
2837
|
return compiled;
|
|
2834
2838
|
};
|
|
2839
|
+
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2835
2840
|
const isOxcAstNode = (value) => Boolean(value) && typeof value === "object" && typeof value.type === "string";
|
|
2836
2841
|
const getStaticModuleSpecifier = (value) => {
|
|
2837
2842
|
if (!isOxcAstNode(value)) return void 0;
|
|
@@ -3166,7 +3171,7 @@ const collectUnpluginAutoImportGlobalScopes = ({ rootDirectory, candidateFiles }
|
|
|
3166
3171
|
return scopes.some((scope) => scope.names.length > 0) ? scopes : [];
|
|
3167
3172
|
};
|
|
3168
3173
|
//#endregion
|
|
3169
|
-
//#region ../core/dist/detect-duplicate-jsx-subtrees-
|
|
3174
|
+
//#region ../core/dist/detect-duplicate-jsx-subtrees-D7-_Z6Mp.js
|
|
3170
3175
|
const yieldToEventLoop = () => new Promise((resolve) => {
|
|
3171
3176
|
setImmediate(resolve);
|
|
3172
3177
|
});
|
|
@@ -3730,7 +3735,7 @@ const detectDuplicateJsxSubtreesCooperative = async (sourceReader, options = {})
|
|
|
3730
3735
|
});
|
|
3731
3736
|
};
|
|
3732
3737
|
//#endregion
|
|
3733
|
-
//#region ../core/dist/detect-react-compiler-
|
|
3738
|
+
//#region ../core/dist/detect-react-compiler-DKfPrp2s.js
|
|
3734
3739
|
const NEXT_CONFIG_FILENAMES = [
|
|
3735
3740
|
"next.config.js",
|
|
3736
3741
|
"next.config.mjs",
|
|
@@ -66825,17 +66830,19 @@ const collectTypeScriptEmitDuplicateJsPaths = (input) => {
|
|
|
66825
66830
|
const isIgnoredDirectoryName = (directoryName) => IGNORED_DIRECTORIES.has(directoryName) || directoryName.startsWith(".") && !SCANNED_DOT_DIRECTORIES.has(directoryName);
|
|
66826
66831
|
const hasIgnoredPathSegment = (relativePath) => relativePath.split(/[/\\]/).slice(0, -1).some((segment) => isIgnoredDirectoryName(segment));
|
|
66827
66832
|
const isLintableSourceFile = (filePath) => SOURCE_FILE_PATTERN.test(filePath) && !GENERATED_BUNDLE_FILE_PATTERN.test(filePath) && !GENERATED_SOURCE_DIRECTORY_PATTERN.test(filePath);
|
|
66833
|
+
const hasMinifiedSample = (sample) => {
|
|
66834
|
+
const lines = sample.split("\n");
|
|
66835
|
+
const longestLineLength = lines.reduce((longest, line) => Math.max(longest, line.length), 0);
|
|
66836
|
+
const averageLineLength = sample.length / lines.length;
|
|
66837
|
+
return longestLineLength > 1e3 && averageLineLength > 500;
|
|
66838
|
+
};
|
|
66828
66839
|
const isMinifiedSource = (absolutePath) => {
|
|
66829
66840
|
let fileDescriptor;
|
|
66830
66841
|
try {
|
|
66831
66842
|
fileDescriptor = fs$1$2.openSync(absolutePath, "r");
|
|
66832
66843
|
const buffer = Buffer.alloc(MINIFIED_SNIFF_BYTES);
|
|
66833
66844
|
const bytesRead = fs$1$2.readSync(fileDescriptor, buffer, 0, MINIFIED_SNIFF_BYTES, 0);
|
|
66834
|
-
|
|
66835
|
-
const lines = prefix.split("\n");
|
|
66836
|
-
const longestLineLength = lines.reduce((longest, line) => Math.max(longest, line.length), 0);
|
|
66837
|
-
const averageLineLength = prefix.length / lines.length;
|
|
66838
|
-
return longestLineLength > 1e3 && averageLineLength > 500;
|
|
66845
|
+
return hasMinifiedSample(buffer.toString("utf8", 0, bytesRead));
|
|
66839
66846
|
} catch {
|
|
66840
66847
|
return false;
|
|
66841
66848
|
} finally {
|
|
@@ -66861,6 +66868,37 @@ const isLargeMinifiedFile = (absolutePath, knownSizeBytes) => {
|
|
|
66861
66868
|
cachedIsLargeMinifiedByPath.set(absolutePath, result);
|
|
66862
66869
|
return result;
|
|
66863
66870
|
};
|
|
66871
|
+
const MODULE_PRELOAD_POLYFILL_START = /^\(function\(\)\{(?:const|let|var) [\w$]+=document\.createElement\((?:"link"|'link')\)\.relList;/;
|
|
66872
|
+
const MODULE_PRELOAD_POLYFILL_MARKERS = [
|
|
66873
|
+
/\.supports\((?:"modulepreload"|'modulepreload')\)/,
|
|
66874
|
+
/document\.querySelectorAll\([^)]*link\[rel=["']modulepreload["']\]/,
|
|
66875
|
+
/new MutationObserver\(/,
|
|
66876
|
+
/\.observe\(document,/
|
|
66877
|
+
];
|
|
66878
|
+
const isMinifiedViteEntry = (absolutePath, knownSizeBytes) => {
|
|
66879
|
+
if (!VITE_ENTRY_ASSET_FILE_PATTERN.test(absolutePath)) return false;
|
|
66880
|
+
const sizeBytes = knownSizeBytes === void 0 ? statSourceFileSize(absolutePath) : knownSizeBytes;
|
|
66881
|
+
if (sizeBytes === null || sizeBytes < 131072) return false;
|
|
66882
|
+
let fileDescriptor;
|
|
66883
|
+
try {
|
|
66884
|
+
fileDescriptor = fs$1$2.openSync(absolutePath, "r");
|
|
66885
|
+
const buffer = Buffer.alloc(VITE_ENTRY_DENSITY_SAMPLE_BYTES);
|
|
66886
|
+
const preludeBytesRead = fs$1$2.readSync(fileDescriptor, buffer, 0, VITE_ENTRY_PRELUDE_SNIFF_BYTES, 0);
|
|
66887
|
+
const prelude = buffer.toString("utf8", 0, preludeBytesRead);
|
|
66888
|
+
const polyfillEndOffset = prelude.indexOf("})();");
|
|
66889
|
+
if (polyfillEndOffset === -1) return false;
|
|
66890
|
+
const polyfill = prelude.slice(0, polyfillEndOffset);
|
|
66891
|
+
if (!MODULE_PRELOAD_POLYFILL_START.test(polyfill) || !MODULE_PRELOAD_POLYFILL_MARKERS.every((marker) => marker.test(polyfill))) return false;
|
|
66892
|
+
const middleOffset = Math.max(MINIFIED_SNIFF_BYTES, Math.floor((sizeBytes - VITE_ENTRY_DENSITY_SAMPLE_BYTES) / 2));
|
|
66893
|
+
const tailOffset = sizeBytes - VITE_ENTRY_DENSITY_SAMPLE_BYTES;
|
|
66894
|
+
for (const offset of [middleOffset, tailOffset]) if (fs$1$2.readSync(fileDescriptor, buffer, 0, 32768, offset) !== 32768 || !hasMinifiedSample(buffer.toString("utf8"))) return false;
|
|
66895
|
+
return true;
|
|
66896
|
+
} catch {
|
|
66897
|
+
return false;
|
|
66898
|
+
} finally {
|
|
66899
|
+
if (fileDescriptor !== void 0) fs$1$2.closeSync(fileDescriptor);
|
|
66900
|
+
}
|
|
66901
|
+
};
|
|
66864
66902
|
const isMissingPath = (absolutePath) => {
|
|
66865
66903
|
try {
|
|
66866
66904
|
fs$1$2.statSync(absolutePath);
|
|
@@ -66891,7 +66929,7 @@ const toSizedSourceFileEntry = (rootDirectory, relativePath) => {
|
|
|
66891
66929
|
const absolutePath = path$1$1.resolve(rootDirectory, relativePath);
|
|
66892
66930
|
const sizeBytes = statSourceFileSize(absolutePath);
|
|
66893
66931
|
if (sizeBytes === null && isMissingPath(absolutePath)) return null;
|
|
66894
|
-
if (isLargeMinifiedFile(absolutePath, sizeBytes)) return null;
|
|
66932
|
+
if (isLargeMinifiedFile(absolutePath, sizeBytes) || isMinifiedViteEntry(absolutePath, sizeBytes)) return null;
|
|
66895
66933
|
return {
|
|
66896
66934
|
path: relativePath,
|
|
66897
66935
|
sizeBytes: sizeBytes ?? 0
|
|
@@ -70348,7 +70386,6 @@ const DEFAULT_SURFACE_EXCLUDED_TAGS = {
|
|
|
70348
70386
|
score: ["design"],
|
|
70349
70387
|
ciFailure: ["design"]
|
|
70350
70388
|
};
|
|
70351
|
-
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
70352
70389
|
const KNOWN_RULE_KEYS = new Set([...ALL_REACT_DOCTOR_RULE_KEYS, ...EXTERNAL_RULES.map((rule) => rule.key)]);
|
|
70353
70390
|
const BUNDLED_RULE_NAMESPACES = new Set([...KNOWN_RULE_KEYS].flatMap(getEquivalentRuleKeys).map((key) => key.slice(0, key.lastIndexOf("/"))));
|
|
70354
70391
|
const getUnknownBundledRuleKeys = (rules) => Object.keys(rules ?? {}).filter((key) => {
|
|
@@ -74877,6 +74914,12 @@ const createOxlintConfig = ({ pluginPath, diagnosticContextDirectory, project, c
|
|
|
74877
74914
|
}
|
|
74878
74915
|
};
|
|
74879
74916
|
};
|
|
74917
|
+
const internWorkerSidecarProbeIds = (result, trace, internRelativeProbe) => {
|
|
74918
|
+
const probeIds = [];
|
|
74919
|
+
for (const pathIndex of trace.content) probeIds.push(internRelativeProbe("content", result.paths[pathIndex], null));
|
|
74920
|
+
for (const pathIndex of trace.existence) probeIds.push(internRelativeProbe("exists", result.paths[pathIndex], result.existenceAnswers[pathIndex]));
|
|
74921
|
+
return probeIds;
|
|
74922
|
+
};
|
|
74880
74923
|
const TIMELINE_PATH = process.env.REACT_DOCTOR_OXLINT_SPAWN_LOG;
|
|
74881
74924
|
const isOxlintJobTimelineEnabled = TIMELINE_PATH !== void 0;
|
|
74882
74925
|
const appendTimelineLine = (entry) => {
|
|
@@ -76437,8 +76480,8 @@ const REACT_COMPILER_TITLE = "React Compiler can't optimize this";
|
|
|
76437
76480
|
const REACT_COMPILER_TODO_TITLE = "React Compiler doesn't support this syntax";
|
|
76438
76481
|
const REACT_ERROR_BOUNDARY_TITLE = "JSX render errors need an Error Boundary";
|
|
76439
76482
|
const REACT_ERROR_BOUNDARY_MESSAGE = "This try/catch cannot catch errors thrown while the JSX child renders. Use an Error Boundary instead.";
|
|
76440
|
-
const REACT_COMPILER_IMPACT = "
|
|
76441
|
-
const REACT_COMPILER_ACTION = "
|
|
76483
|
+
const REACT_COMPILER_IMPACT = "React Compiler flagged this code during analysis";
|
|
76484
|
+
const REACT_COMPILER_ACTION = "Review the compiler's reason before changing the code.";
|
|
76442
76485
|
const REACT_COMPILER_INCOMPATIBLE_LIBRARY_ACTION = "It's how the library works, not a bug in your code. Memoize values you pass from it into other memoized components, or suppress it with `// react-doctor-disable-next-line react-hooks-js/incompatible-library`.";
|
|
76443
76486
|
const SET_STATE_IN_EFFECT_ACTION = "Prefer deriving or initializing the value before render. If the effect must read a browser API after mount, treat this as advisory or suppress it with `// react-doctor-disable-next-line react-hooks-js/set-state-in-effect`.";
|
|
76444
76487
|
const REACT_COMPILER_GENERIC_MESSAGE = `${REACT_COMPILER_IMPACT}. ${REACT_COMPILER_ACTION}`;
|
|
@@ -76624,7 +76667,7 @@ const parseOxlintOutput = (stdout, project, rootDirectory, sourcePathByLintPath,
|
|
|
76624
76667
|
const absolutePath = resolveAbsolutePath(resolveSourceFilename(filename));
|
|
76625
76668
|
const cached = minifiedFileCache.get(absolutePath);
|
|
76626
76669
|
if (cached !== void 0) return cached;
|
|
76627
|
-
const minified = isMinifiedSource(absolutePath);
|
|
76670
|
+
const minified = isMinifiedSource(absolutePath) || isMinifiedViteEntry(absolutePath);
|
|
76628
76671
|
minifiedFileCache.set(absolutePath, minified);
|
|
76629
76672
|
return minified;
|
|
76630
76673
|
};
|
|
@@ -77443,10 +77486,7 @@ const collectSidecarProbesForFiles = async (input) => {
|
|
|
77443
77486
|
probeIdsByFile.set(file, null);
|
|
77444
77487
|
continue;
|
|
77445
77488
|
}
|
|
77446
|
-
|
|
77447
|
-
for (const pathIndex of trace.content) probeIds.push(internRelativeProbe("content", result.paths[pathIndex], result.existenceAnswers[pathIndex]));
|
|
77448
|
-
for (const pathIndex of trace.existence) probeIds.push(internRelativeProbe("exists", result.paths[pathIndex], result.existenceAnswers[pathIndex]));
|
|
77449
|
-
probeIdsByFile.set(file, probeIds);
|
|
77489
|
+
probeIdsByFile.set(file, internWorkerSidecarProbeIds(result, trace, internRelativeProbe));
|
|
77450
77490
|
}
|
|
77451
77491
|
};
|
|
77452
77492
|
const runParentLane = async () => {
|
|
@@ -79956,4 +79996,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
79956
79996
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
79957
79997
|
|
|
79958
79998
|
//# sourceMappingURL=index.js.map
|
|
79959
|
-
//# debugId=
|
|
79999
|
+
//# debugId=4d840b41-57ef-54cb-9a14-4f0b6ab7d42e
|